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 |
---|---|---|---|---|---|---|
/ Reset all variables before entering init_loop() and loop() | void resetControlVariables() {
a1_cnt_ = 0;
b1_cnt_ = 0;
x1_cnt_ = 0;
y1_cnt_ = 0;
lb1_cnt_ = 0;
rb1_cnt_ = 0;
lsb1_cnt_ = 0;
rsb1_cnt_ = 0;
lt1_left_cnt_ = 0;
lt1_right_cnt_ = 0;
a2_cnt_ = 0;
b2_cnt_ = 0;
x2_cnt_ = 0;
y2_cnt_ = 0;
lb2_cnt_ = 0;
rb2_cnt_ = 0;
lsb2_cnt_ = 0;
rsb2_cnt_ = 0;
curr_time_ = 0.0;
loop_cnt_ = 0;
last_imu_read_loop_id_ = -1;
last_motor_read_loop_id_ = -1;
last_rgb_range_stone_read_loop_id_ = -1;
last_range_stone_read_loop_id_ = -1;
last_range_right_read_loop_id_ = -1;
last_range_left_read_loop_id_ = -1;
last_range_stone_read_time_ = 0;
last_range_right_read_time_ = 0;
last_range_left_read_time_ = 0;
range_stone_dist_init_min_ = 0;
range_right_dist_init_min_ = 0;
range_left_dist_init_min_ = 0;
range_stone_error_detected_ = false;
range_right_error_detected_ = false;
range_left_error_detected_ = false;
battery_voltage_ = 0.0;
last_button_time_ = 0.0;
last_button_a1_time_ = 0.0;
last_button_b1_time_ = 0.0;
last_button_rb1_time_ = 0.0;
last_button_time2_ = 0.0;
last_double_stone_time_ = 0.0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void resetLoop(){\n\t\tloopTime = 0;\n\t}",
"public void reset() {\n cycles = 0;\n nextHaltCycle = GB_CYCLES_PER_FRAME;\n nextUpdateCycle = 0;\n running = false;\n timer.reset();\n \n cpu.reset();\n ram.reset();\n soundHandler.reset();\n }",
"@Override\r\n public void init_loop() {\r\n }",
"@Override\r\n public void init_loop() {\r\n }",
"public static void variableReset() {\n\t\tLogic.pieceJumped = 0;\n\t\tLogic.bool = false;\n\t\tLogic.curComp = null;\n\t\tLogic.prevComp = null;\n\t\tLogic.jumpedComp = null;\n\t\tLogic.ydiff = 0;\n\t\tLogic.xdiff = 0;\n\t\tLogic.jumping = false;\n\t\tmultipleJump = false;\n\t\t\n\t}",
"@Override\n public void init_loop() {\n }",
"@Override\n public void init_loop() {\n }",
"@Override\n public void init_loop() {\n }",
"@Override\n public void init_loop() {\n }",
"@Override\n public void init_loop() {\n }",
"@Override\n public void init_loop() {\n }",
"@Override\n public void init_loop() {\n }",
"@Override\n public void init_loop() {\n }",
"@Override\n public void init_loop() {\n }",
"@Override\n public void init_loop() {\n }",
"@Override\n public void init_loop() {\n }",
"@Override\n public void init_loop() {\n }",
"@Override\n public void init_loop() {\n }",
"@Override\n public void init_loop() {\n }",
"@Override\n public void init_loop() {\n }",
"@Override\n public void init_loop() {\n }",
"public void reset ()\n\t{\n\t\t//The PaperAirplane and the walls (both types) use their reconstruct ()\n\t\t//method to set themselves back to their starting points.\n\t\tp.reconstruct ();\n\t\tfor (int i = 0; i < w.length; i++)\n\t\t\tw[i].reconstruct ();\n\t\t\n\t\tfor (int i = 0; i < sW.length; i++)\n\t\t\tsW[i].reconstruct ();\n\t\t\t\n\t\t//the time is reset using the resetTime () method from the Timer class.\n\t\ttime.resetTime ();\n\t\t\n\t\t//the score is reset using the reconstruct method from the Score class.\n\t\tscore.reconstruct ();\n\t\t\n\t\t//The following variables are set back to their original values set in\n\t\t//the driver class.\n\t\ttimePassed = 0;\t\n\t\tnumClicks = 0;\n\t\teventFrame = 0;\n\t\tlevel = 1;\n\t\txClouds1 = 0;\n\t\txClouds2 = -500;\n\t\tyBkg1 = 0;\n\t\tyBkg2 = 600;\t\t\n\t}",
"@Override public void init_loop() {\n loop_cnt_++;\n }",
"private void reset() {\n //todo test it !\n longitude = 0.0;\n latitude = 0.0;\n IDToday = 0L;\n venVolToday = 0L;\n PM25Today = 0;\n PM25Source = 0;\n DBCanRun = true;\n DBRunTime = 0;\n isPMSearchRunning = false;\n isLocationChanged = false;\n isUploadRunning = false;\n refreshAll();\n locationInitial();\n DBInitial();\n sensorInitial();\n }",
"protected void reset(){\n inited = false;\n }",
"void Reset() {\n lq = 0;\n ls = 0;\n }",
"@Override\n public void init_loop() {}",
"protected void reInitialize() {\n leftSpeed = 0;\n rightSpeed = 0;\n leftPosition = 0;\n rightPosition = 0;\n }",
"private void reset() {\n ms = s = m = h = 0;\n actualizar();\n }",
"@Override\n public void init_loop() {\n smDrive.init_loop();\n smArm.init_loop();\n }",
"public void reset() {\n solving = false;\n length = 0;\n checks = 0;\n }",
"private void reset () {\n this.logic = null;\n this.lastPulse = 0;\n this.pulseDelta = 0;\n }",
"private void ResetVarC() {\n anchura = true;\n iterator = 0;\n Yencoding = new ArrayList<Integer>();\n Cbencoding = new ArrayList<Integer>();\n Crencoding = new ArrayList<Integer>();\n FY = new StringBuilder();\n FCB = new StringBuilder();\n FCR = new StringBuilder();\n }",
"public void reset() {\n\t\tinit(0, 0, 1, false);\n\t}",
"public static void cleanseInits() {\n delayDuration = null;\n timerFrequency = null;\n numProcessorThreads = null;\n maxProcessorTasks = null;\n }",
"private void resetParameters() {\n\t\twKeyDown = false;\n\t\taKeyDown = false;\n\t\tsKeyDown = false;\n\t\tdKeyDown = false;\n\t\tmouseDown = false;\n\t\t// reset mouse\n\t\tMouse.destroy();\n\t\ttry {\n\t\t\tMouse.create();\n\t\t} catch (LWJGLException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t// resets the player's hp\n\t\tplayer.setHP(1000);\n\t\t// resets the player's position\n\t\tplayer.setX(initPlayerX);\n\t\tplayer.setY(initPlayerY);\n\t\t// the game is not over\n\t\tgameOver = false;\n\t\tstopDrawingPlayer = false;\n\t\tgameWon = false;\n\t\t// clears the entity arraylists\n\t\tenemy.clear();\n\t\tbullet.clear();\n\t\tenemy_bullet.clear();\n\t\tpowerup.clear();\n\t\texplosion.clear();\n\t\t// cash and totalCash are 0\n\t\tcash = 0;\n\t\ttotalCash = 0;\n\t\t// bullet is activated, upgraded weapons are not activated\n\t\tbulletShot = true;\n\t\tdoubleShot = false;\n\t\tlaserShot = false;\n\t\t// boss\n\t\tbossSpawned = false;\n\t\tbossMovement = 3;\n\t\tbossExplosionNum = 0;\n\t}",
"public void reset() {\n delta = 0.0;\n solucionActual = null;\n mejorSolucion = null;\n solucionVecina = null;\n iteracionesDiferenteTemperatura = 0;\n iteracionesMismaTemperatura = 0;\n esquemaReduccion = 0;\n vecindad = null;\n temperatura = 0.0;\n temperaturaInicial = 0.0;\n tipoProblema = 0;\n alfa = 0;\n beta = 0;\n }",
"void resetLoop () {\n try {\n timer.cancel();\n timer.purge();\n } catch (Exception e) {\n\n }\n timer = new Timer();\n timer.schedule(new LoopTask(), stepDelay, stepDelay);\n }",
"private void reset() {\n }",
"void reset(){\n if (vars!=null){\n vars.clear();\n }\n if (gVars!=null){\n gVars.clear();\n }\n }",
"@Override public void start() {\n timer_.reset();\n\n resetControlVariables(); // need reset all key counters bcz they are used in init_loop()\n }",
"public static void Reset(){\n\t\ttstr = 0;\n\t\ttluc = 0;\n\t\ttmag = 0; \n\t\ttacc = 0;\n\t\ttdef = 0; \n\t\ttspe = 0;\n\t\ttHP = 10;\n\t\ttMP = 0;\n\t\tstatPoints = 13;\n\t}",
"public void reset() {\n\t\tfor (int x = 0; x < worldWidth; x++) {\n\t\t\tfor (int y = 0; y < worldHeight; y++) {\n\t\t\t\ttileArr[x][y].restart();\n\t\t\t}\n\t\t}\n\t\tlost = false;\n\t\tisFinished = false;\n\t\tplaceBombs();\n\t\tsetNumbers();\n\t}",
"public void reset() {\n\t\tmCycleFlip = false;\n\t\tmRepeated = 0;\n\t\tmMore = true;\n //mOneMoreTime = true;\n \n\t\t// 추가\n\t\tmStarted = mEnded = false;\n\t\tmCanceled = false;\n }",
"private void resetAfterGame() {\n }",
"void initLoop(){\n Context c = getContext();\n if (c == null){\n if (getLoop() > 0){\n setContext(new Context());\n initContext(getContext());\n }\n }\n else {\n initContext(getContext());\n }\n }",
"public void reset(){\n this.context.msr.setReadyForInput(false);\n emptyAllInputBuffers();\n emptyAllOutputBuffers();\n emptyEngineersConsoleBuffer();\n }",
"public static void reset() {\n\t\tbat1.reset();\n\t\tbat2.reset();\n\t\tball.reset();\n\t}",
"public void resetVariables() {\n\t\tArrays.fill(variables, 0.0);\n\t}",
"public void reset()\n\t{\n\t\tm_running = false;\n\t\tm_elapsedMs = 0;\n\t\tm_lastMs = 0;\n\t}",
"public void reset() {\n\n\t\tazDiff = 0.0;\n\t\taltDiff = 0.0;\n\t\trotDiff = 0.0;\n\n\t\tazMax = 0.0;\n\t\taltMax = 0.0;\n\t\trotMax = 0.0;\n\n\t\tazInt = 0.0;\n\t\taltInt = 0.0;\n\t\trotInt = 0.0;\n\n\t\tazSqInt = 0.0;\n\t\taltSqInt = 0.0;\n\t\trotSqInt = 0.0;\n\n\t\tazSum = 0.0;\n\t\taltSum = 0.0;\n\t\trotSum = 0.0;\n\n\t\tcount = 0;\n\n\t\tstartTime = System.currentTimeMillis();\n\t\ttimeStamp = startTime;\n\n\t\trotTrkIsLost = false;\n\t\tsetEnableAlerts(true);\n\n\t}",
"final void reset() {\r\n\t\t\tsp = 0;\r\n\t\t\thp = 0;\r\n\t\t}",
"protected void initialize() {\n\t\tright = left = throttle = turn = forward = 0;\n\t}",
"public void reset () {}",
"private void resetVarD() {\n width = 0;\n height = 0;\n sizeY = 0;\n sizeCB = 0;\n sizeCR = 0;\n sizeYc = 0;\n sizeCBc = 0;\n sizeCRc = 0;\n iteradorFreq = 0;\n i = 0;\n FreqY = new HashMap<>();\n FreqCB = new HashMap<>();\n FreqCR = new HashMap<>();\n Ydes = new ArrayList<>();\n CBdes = new ArrayList<>();\n CRdes = new ArrayList<>();\n }",
"protected void reset() {\n speed = 2.0;\n max_bomb = 1;\n flame = false;\n }",
"public static void reset() {\r\n\t\t// System.out.println(\"ExPar.reset()\");\r\n\t\t// new RuntimeException().printStackTrace();\r\n\t\truntimePars.clear();\r\n\t\tresetValues();\r\n\t\tGlobalAssignments.exec();\r\n\t}",
"public void resetAllOperations() {\n\t\t/*\n\t\t * Check to see if we are in any countdown modes\n\t\t */\n\t\tif(inCountdown1Mode) {\n\t\t\twarmUpWindow1.dismiss();\n\t\t}\t\t\n\t\tif(inBaselineMode) {\n\t\t\tbaselineWindow.dismiss();\n\t\t}\n\t\t\n\t\t/**\n\t\t * Turn off any red leds\n\t\t */\n\t\tledOn1.setVisibility(View.INVISIBLE);\n\t\tledOn2.setVisibility(View.INVISIBLE);\n\t\tledOn3.setVisibility(View.INVISIBLE);\n\t\tledOn4.setVisibility(View.INVISIBLE);\n\t\tledOn5.setVisibility(View.INVISIBLE);\n\t\tledOn6.setVisibility(View.INVISIBLE);\n\t\tledOn7.setVisibility(View.INVISIBLE);\n\t\tledOn8.setVisibility(View.INVISIBLE);\n\t\tledOn9.setVisibility(View.INVISIBLE);\n\t\t\n\t\t/*\n\t\t * Reset any program flow variables\n\t\t */\n\t\tinCountdown1Mode = false;\n\t\tinBaselineMode = false;\n\t\ton = false;\n\t\tmodeChange = false;\n\t\twarmedUp = false;\n\t\t\n\t\t/*\n\t\t * Reset counts\n\t\t */\n\t\tcountdown1 = WARMUP_COUNT;\n\t\tcountdown2 = BASELINE_COUNT;\n\t\ttvUpdate(tvSensorValue, \"--\");\n\t\t\n\t\tcountdown1Handler.removeCallbacksAndMessages(null);\n\t\tcountdown2Handler.removeCallbacksAndMessages(null);\n\t\tmodeHandler.removeCallbacksAndMessages(null);\n\t\ttickHandler.removeCallbacksAndMessages(null);\n\t\tsetLEDsHandler.removeCallbacksAndMessages(null);\n\t\t\n\t\t// Stop taking measurements\n\t\tstreamer.disable();\n\t\t// Disable the sensor\n\t\tdroneApp.myDrone.quickDisable(qsSensor);\n\t}",
"@Override\n public void init_loop() {\n telemetry.addData(\"Say\", \"We pressed INIT!\");\n robot.clawRight.setPosition(0);\n robot.clawLeft.setPosition(0);\n }",
"protected void reset() {\n\t\t}",
"public void resetObjects() {\n if (wind1.isOffScreen()) {\n wind1.reset(wind3.getBoundingRectangle().y - buffer - rand.nextInt(AssetHandler.SCREEN_HEIGHT / 4));\n }\n if (wind2.isOffScreen()) {\n wind2.reset(wind1.getBoundingRectangle().y - buffer - rand.nextInt(AssetHandler.SCREEN_HEIGHT / 4));\n }\n if (wind3.isOffScreen()) {\n wind3.reset(wind2.getBoundingRectangle().y - buffer - rand.nextInt(AssetHandler.SCREEN_HEIGHT / 4));\n }\n\n //Again, check if the clouds go off the screen and then reset them.\n cloudBuffer = rand.nextInt(AssetHandler.SCREEN_HEIGHT / 4) + AssetHandler.SCREEN_HEIGHT / 4;\n if (cloud1.isOffScreen()) {\n cloud1.reset(cloud4.y - cloudBuffer);\n }\n if (cloud2.isOffScreen()) {\n cloud2.reset(cloud1.y - cloudBuffer);\n }\n if (cloud3.isOffScreen()) {\n cloud3.reset(cloud2.y - cloudBuffer);\n }\n if (cloud4.isOffScreen()) {\n cloud4.reset(cloud3.y - cloudBuffer);\n }\n\n //Check if birds (drones) go above the screen and reset them\n birdBuffer = rand.nextInt(AssetHandler.SCREEN_HEIGHT / 2 + AssetHandler.SCREEN_HEIGHT / 3) + AssetHandler.SCREEN_HEIGHT / 2;\n if (drone1.isOffScreen()) {\n drone1.reset(drone2.y - birdBuffer);\n }\n birdBuffer = rand.nextInt(AssetHandler.SCREEN_HEIGHT / 2 + AssetHandler.SCREEN_HEIGHT / 3) + AssetHandler.SCREEN_HEIGHT / 2;\n if (drone2.isOffScreen()) {\n drone2.reset(drone1.y - birdBuffer);\n }\n\n }",
"void reset() ;",
"private void initVars(){\n this.sOut = new StringBuilder();\n this.curPos = this.frameCount = 0;\n this.heldKeys = new int[257];\n this.showCursor = false;\n this.fontId = DAGGER40;\n Arrays.fill(this.heldKeys,-1);\n }",
"public void reset(){\r\n\t\tSystem.out.println(\"(EnigmaMachine) Initial Positions: \" + Arrays.toString(initPositions));\r\n\t\trotors.setPositions(initPositions);\r\n\t}",
"private void init() {\n this.playing = true;\n this.hand.clear();\n this.onTable = 0;\n this.points = 0;\n }",
"public static void reset(){\r\n\t\tx=0;\r\n\t\ty=0;\r\n\t}",
"public void reset() \n {\n cumulativeTrials = 0;\n\t numTwoHeads = 0;\n\t numTwoTails = 0;\n\t numHeadTails = 0;\n }",
"public void reset() {\n\t\tVector2 gravity = new Vector2(world.getGravity() );\n\t\t\n\t\tfor(Obstacle obj : objects) {\n\t\t\tobj.deactivatePhysics(world);\n\t\t}\n\t\tobjects.clear();\n\t\taddQueue.clear();\n\t\tworld.dispose();\n\t\t\n\t\tworld = new World(gravity,false);\n\t\tsetComplete(false);\n\t\tsetFailure(false);\n\t\tpopulateLevel();\n\t}",
"public void reset(){\n\n boxPositions = new HashMap<>();\n boxWeights = new ArrayList<Stack<Box>>();\n for(int i = 0; i < 16; i++) {\n boxPositions.put(i*40, i);\n }\n for ( int i = 0; i < 16; i++){\n boxWeights.add( new Stack< Box >());\n }\n boxGen = new BoxGenerator();\n\n timeCounter = 100;\n mc.resetLazarusPosition();\n\n }",
"public void reset()\n\t{\n\t\tdelayCount = 0f;\n\t\trepeatCount = 0;\n\t\tenabled = true;\n\t}",
"void reset() {\n if (myGrass != null) {\n myGrass.reset();\n }\n if (myCowboy != null) {\n myCowboy.reset();\n }\n if (myLeftTumbleweeds != null) {\n for (int i = 0; i < myLeftTumbleweeds.length; i++) {\n myLeftTumbleweeds[i].reset();\n }\n }\n if (myRightTumbleweeds != null) {\n for (int i = 0; i < myRightTumbleweeds.length; i++) {\n myRightTumbleweeds[i].reset();\n }\n }\n myLeft = false;\n myCurrentLeftX = Grass.CYCLE * Grass.TILE_WIDTH;\n }",
"void reset() {\n errors.clear();\n variables.clear();\n }",
"@Override\n public void init_loop() {\n hookPosDeg = HOOK_UP;\n clawPosDeg = CLAW_OPEN;\n hookPos = map(hookPosDeg, HOOK_MIN_POS_DEG, HOOK_MAX_POS_DEG, HOOK_MIN_POS, HOOK_MAX_POS);\n clawPos = map(clawPosDeg, CLAW_MIN_POS_DEG, CLAW_MAX_POS_DEG, CLAW_MIN_POS, CLAW_MAX_POS);\n hook.setPosition(hookPos);\n claw.setPosition(clawPos);\n\n// armTarget = ARM_CENTER;\n// arm.setTargetPosition(armTarget);\n// arm.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n// arm.setPower(.3);\n }",
"public void reset() {\r\n\t\tplayAgain = false;\r\n\t\tmainMenu = false;\r\n\t\tachievement = 0;\r\n\t}",
"protected void reInitialize() {\r\n currentPos.reInitialize();\r\n motorState.reInitialize();\r\n armState = KSGripperStates.ARM_UP;\r\n gripperState = KSGripperStates.GRIP_OPEN;\r\n objPresent = false;\r\n objHeld = false;\r\n resistivity = 0;\r\n }",
"void reset()\n {\n\n }",
"protected void initialize() {\n \tRobot.driveBase.resetEnc(2);\n \tRobot.gyro.reset();\n \t//stop extraneous moving parts\n }",
"public static void reset() {\n start = new Date().getTime();\n killed = 0;\n time = 0;\n }",
"public void reset(){\n ioTime=0;\n waitingTime=0;\n state=\"unstarted\";\n rem=total_CPU_time;\n ioBurstTime=0;\n cpuBurstTime=0;\n remainingCPUBurstTime=null;\n }",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"private void resetTemporary(){\n temporaryConstants = null;\n temporaryVariables = null;\n }"
]
| [
"0.7289469",
"0.7164366",
"0.70518935",
"0.70518935",
"0.69381607",
"0.6920025",
"0.6920025",
"0.6920025",
"0.6920025",
"0.6920025",
"0.6920025",
"0.6920025",
"0.6920025",
"0.6920025",
"0.6920025",
"0.6920025",
"0.6920025",
"0.6920025",
"0.6920025",
"0.6920025",
"0.6920025",
"0.69024503",
"0.6848438",
"0.6844954",
"0.6839885",
"0.6825678",
"0.68154424",
"0.6806736",
"0.6763447",
"0.6737173",
"0.67369866",
"0.6728709",
"0.6705798",
"0.6691773",
"0.66833836",
"0.668216",
"0.6676381",
"0.6668668",
"0.665426",
"0.665225",
"0.66369057",
"0.6625427",
"0.66008747",
"0.6565561",
"0.65437496",
"0.6536984",
"0.6533711",
"0.65221214",
"0.65171254",
"0.65090615",
"0.6456612",
"0.64555323",
"0.6454737",
"0.6450699",
"0.6444944",
"0.6440809",
"0.6437522",
"0.6433963",
"0.64335716",
"0.64247787",
"0.64209235",
"0.6410086",
"0.6396687",
"0.63827497",
"0.63784665",
"0.6367279",
"0.635982",
"0.6354512",
"0.635124",
"0.6342227",
"0.63418776",
"0.6341068",
"0.6300085",
"0.62979037",
"0.62898505",
"0.62893146",
"0.6286446",
"0.62782466",
"0.6268792",
"0.6266804",
"0.6266804",
"0.6266804",
"0.6266804",
"0.6266804",
"0.6266804",
"0.6266804",
"0.6266804",
"0.6266804",
"0.6266804",
"0.6266804",
"0.6266804",
"0.6266804",
"0.6266804",
"0.6266804",
"0.6266804",
"0.6266804",
"0.6266804",
"0.6266804",
"0.6266804",
"0.626389"
]
| 0.7090289 | 2 |
/ Return true if it's RED team | boolean isRedTeam() {
return ( START_AS_RED ? (!color_flipped_) : color_flipped_ );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasTeam();",
"public Team getTeamRed() {\r\n return teamRed;\r\n }",
"@Override\n\tpublic boolean isIsTeamMatch() {\n\t\treturn _esfTournament.isIsTeamMatch();\n\t}",
"private boolean multipleTeams(SettingsClass s){\r\n int a =s.getPlayerColor(0);\r\n for(int i=0;i<s.getNumPlayers();i++){\r\n if(a!=s.getPlayerColor(i)){\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"@Override\n\tpublic boolean getIsTeamMatch() {\n\t\treturn _esfTournament.getIsTeamMatch();\n\t}",
"public boolean hasTeam(User std) {\r\n\t\tboolean hasTeam = false;\r\n\t\tHashMap<String, ArrayList<String>> map = MySQLConnector.executeMySQL(\"select\", \"SELECT * FROM `is480-matching`.students WHERE id = \" + std.getID() + \" ;\");\r\n\t\tSet<String> keySet = map.keySet();\r\n\t\tIterator<String> iterator = keySet.iterator();\r\n\t\t\r\n\t\twhile (iterator.hasNext()){\r\n\t\t\tString key = iterator.next();\r\n\t\t\tArrayList<String> array = map.get(key);\t\r\n\t\t\tint teamId \t= Integer.parseInt(array.get(3));\r\n\t\t\t\r\n\t\t\tif(teamId != 0){\r\n\t\t\t\thasTeam = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn hasTeam;\r\n\t}",
"public boolean isWinner(boolean isRed){\n\n for(int i =0; i<mCheckerBoard.size(); i++){\n if(mCheckerBoard.get(i)!=null && mCheckerBoard.get(i).isRed() != isRed){\n return false;\n }\n }\n return true;\n }",
"@Override\n public boolean hasWonGame( int team ) {\n boolean canReach = false;\n if(team == 1){\n for(Dot sDot:board.getStartNodes1()){\n for(Dot eDot:board.getEndNodes1()){\n if(canReachDFS(sDot,eDot)){\n canReach = true;\n }\n }\n }\n }\n else if(team ==2){\n for(Dot sDot:board.getStartNodes2()){\n for(Dot eDot:board.getEndNodes2()){\n if(canReachDFS(sDot,eDot)){\n canReach = true;\n }\n }\n }\n }\n return canReach;\n }",
"@Test\n public void isGameOverNoRed()\n {\n // Setup.\n final CheckersGameInjector injector = new CheckersGameInjector();\n final List<Agent> agents = createAgents(injector);\n final CheckersEnvironment environment = createEnvironment(injector, agents);\n\n for (int y = 8 - 3; y < 8; y++)\n {\n for (int x = 0; x < 8; x++)\n {\n if ((x % 2) != (y % 2))\n {\n final CheckersPosition position = CheckersPosition.findByCoordinates(x, y);\n environment.removeToken(position);\n }\n }\n }\n\n assertThat(environment.getTokenCountFor(CheckersTeam.RED), is(0));\n assertThat(environment.getTokenCountFor(CheckersTeam.WHITE), is(12));\n\n final CheckersAdjudicator adjudicator = injector.injectAdjudicator();\n\n // Run / Verify.\n assertTrue(adjudicator.isGameOver(environment));\n }",
"default public boolean isTeamLeader() {\n return equals(team().leader());\n }",
"public boolean hasTeam() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"private boolean teamExist(String teamName) {\n boolean doesExist = false;\n for (Team team : scoreboard.getTeams()) if (team.getName().equals(teamName)) doesExist = true;\n return doesExist;\n }",
"public boolean hasTeam() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"@Override\n protected String checkIfGameOver() {\n if(state.isGameOver() == -1) {\n return \"Blue team wins\";\n } else if(state.isGameOver() == 1) {\n return \"Red team wins\";\n } else {\n return null;\n }\n }",
"public boolean areGamesScheduled(String team) {\n\n try {\n if (getPlayerInfo(team, \"status\", \"status\").equals(\"\") ||\n getPlayerInfo(team, \"status\", \"status\").equals(\"Preview\") ||\n getPlayerInfo(team, \"status\", \"status\").equals(\"Pre-Game\") ||\n getPlayerInfo(team, \"status\", \"status\").equals(\"Warmup\") ||\n getPlayerInfo(team, \"status\", \"status\").equals(\"In Progress\") ||\n getPlayerInfo(team, \"status\", \"status\").equals(\"Postponed\") ||\n getPlayerInfo(team, \"status\", \"status\").equals(\"Completed Early\") ||\n getPlayerInfo(team, \"status\", \"status\").equals(\"Game Over\") ||\n getPlayerInfo(team, \"status\", \"status\").equals(\"Final\")) {\n }\n }\n catch (java.lang.NullPointerException npe) {\n\n return false;\n }\n catch (java.lang.RuntimeException npe) {\n\n return false;\n }\n\n // no errors so there are games scheduled for this date\n return true;\n }",
"public boolean isRed() {\r\n\t\treturn getColor() == RED;\r\n\t}",
"public boolean isRed(RBNode<T> node) {\n return (node != null)&&(node.color == RED)? true : false;\r\n }",
"public boolean isRed(Node n){\n if(n == null)\n return false;\n return n.isColor() == RED;\n }",
"public boolean expectToBeat(RugbyTeam aTeam) {\r\n\r\n\t\tif (this.hasRitual == true && aTeam.hasRitual == false) {\r\n\t\t\treturn true;\r\n\t\t} else if ((this.wins - this.losses) > (aTeam.wins - aTeam.losses)) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"boolean getRedact();",
"boolean getRedact();",
"private boolean canAddRedTile() {\n\n\t\tif(isAllPiecesEaten(Game.getInstance().getCurrentPlayerColor())) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isRed()\n {\n // TODO: replace this line with your code\n }",
"private boolean isRed(Color color){\r\n return color == Color.red;\r\n }",
"public boolean Draft() {\n\t\ttry {\n\t\t\tint option;\n\t\t\tint correctAnswer;\n\t\t\tdo {\n\n\t\t\t\tSystem.out.println(\"Which team won? (1. Red 2. Blue )\");\n\t\t\t\toption = scanner.nextInt();\n\t\t\t\tif (option > 2 || option < 1)\n\t\t\t\t\tSystem.err.println(\"Please, insert valid value\");\n\n\t\t\t} while (option != 1 && option != 2);\n\n\t\t\tif (this.blueWins > this.redWins)\n\t\t\t\tcorrectAnswer = 2;\n\t\t\telse\n\t\t\t\tcorrectAnswer = 1;\n\n\t\t\tif (correctAnswer == option)\n\t\t\t\treturn true;\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Please, insert an Intenger value\");\n\t\t}\n\n\t\treturn false;\n\n\t}",
"private TeamId findWinningTeam(){\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS) {\n return TeamId.TEAM_1;\n }\n else {\n return TeamId.TEAM_2;\n }\n }",
"public boolean isEliminated(String team) {\n\n return false;\n }",
"@Override\n public boolean isLocalPlayersTurn() {\n return getTeam().equals(currentBoard.turn());\n }",
"public Boolean isTeamMember(final Artifact artifact);",
"public boolean isGameOver() {\n if (!isFirstTurn) {\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS||state.score().totalPoints(TeamId.TEAM_2)>=Jass.WINNING_POINTS) {\n return true;\n }\n else {\n return false;\n }\n } \n else {return false;}\n }",
"public Color getColor()\n {\n return mTeam.getColor();\n }",
"private boolean canAddBlueTile() {\n\t\tint soldierCount=0,queenCount=0;\n\n\n\t\tArrayList<Piece> playerPieces = Board.getInstance().getColorPieces(Game.getInstance().getCurrentPlayerColor());\n\t\tfor(Piece p:playerPieces)\n\t\t{\n\t\t\tif(p instanceof Soldier)\n\t\t\t{\n\t\t\t\tsoldierCount++;\n\t\t\t}\n\t\t\tif(p instanceof Queen)\n\t\t\t{\n\t\t\t\tqueenCount++;\n\t\t\t}\n\t\t}\n\t\treturn (soldierCount == 2 && queenCount == 1);\n\t}",
"public boolean teamExist(Team t) {\n return getTeam(t.getName()) != null;\n }",
"boolean hasAttackerRoleId();",
"@Test\n public void isRedTest() {\n assertTrue(red_piece.isRed());\n assertTrue(!white_piece.isRed());\n }",
"private boolean sameTeamCheck(char state)\r\n {\r\n if((state == 'b' && isHuman) || (state == 'p' && !isHuman))\r\n return true;\r\n return false;\r\n }",
"public boolean isAutoTeam() {\n return isPreventCollision() && getBoolean(\"auto-team\", true);\n }",
"public boolean findTeam(String teamName) throws SQLException {\n\t\tConnection conn = DriverManager.getConnection(\"jdbc:sqlite:users\");\n\t\tStatement stmt = conn.createStatement();\n\t\tString SQL = \"select * from leaguestandings where TeamName = '\" + teamName + \"';\";\n\n\t\tResultSet rset = stmt.executeQuery(SQL);\n\n\t\tif (rset.next()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean isEliminated(String team) {\n return certificateOfElimination(team) != null;\r\n }",
"public Team getTeamBlue() {\r\n return teamBlue;\r\n }",
"String getWonTeam() {\r\n return this.teamName;\r\n }",
"private Player checkIfEatsRedPlayer(Player player)\n {\n int x_cord = getMidPoint(player.x_cordinate);//player.x_cordinate;\n int y_cord = getMidPoint(player.y_cordinate);//player.y_cordinate;\n int redx1 = getMidPoint(getRed_player1().x_cordinate);\n int redx2 = getMidPoint(getRed_player2().x_cordinate);\n int redx3 = getMidPoint(getRed_player3().x_cordinate);\n int redx4 = getMidPoint(getRed_player4().x_cordinate);\n int redy1 = getMidPoint(getRed_player1().y_cordinate);\n int redy2 = getMidPoint(getRed_player2().y_cordinate);\n int redy3 = getMidPoint(getRed_player3().y_cordinate);\n int redy4 = getMidPoint(getRed_player4().y_cordinate);\n if (collisionDetection(x_cord, y_cord, redx1, redy1) == 1)\n {\n return getRed_player1();\n }\n else if (collisionDetection(x_cord, y_cord, redx2, redy2) == 1)\n {\n return getRed_player2();\n }\n else if (collisionDetection(x_cord, y_cord, redx3, redy3) == 1)\n {\n return getRed_player3();\n }\n else if (collisionDetection(x_cord, y_cord, redx4, redy4) == 1)\n {\n return getRed_player4();\n }\n else\n {\n return null;\n }\n }",
"public boolean checkForVictory() {\n // keep track of whether we have seen any pieces of either color.\n boolean anyWhitePieces = false;\n boolean anyRedPieces = false;\n // iterate through each row\n for (Row row : this.redBoard) {\n // whether we iterate through the red or white board does not matter; they contain the same pieces, just\n // in a different layout\n // iterate through each space in a row\n for (Space space : row) {\n // if there is a piece on this space\n if (space.getPiece() != null) {\n if (space.getPiece().getColor() == Piece.COLOR.RED) {\n // and if it's red, we have now seen at least one red piece\n anyRedPieces = true;\n } else if (space.getPiece().getColor() == Piece.COLOR.WHITE) {\n // and if it's white, we have now seen at least one white piece\n anyWhitePieces = true;\n }\n }\n }\n }\n // if we haven't seen any pieces of a color, then the other player has won\n if (!anyRedPieces) {\n // white player has won\n markGameAsDone(getWhitePlayer().getName() + \" has captured all the pieces.\");\n return true;\n } else if (!anyWhitePieces) {\n // red player has won\n markGameAsDone(getRedPlayer().getName() + \" has captured all the pieces.\");\n return true;\n }\n return false;\n }",
"public FightTeam team();",
"static boolean canWin() throws GameActionException {\n\t\tfloat difference = 1000 - rc.getTeamVictoryPoints();\n\t\tif ((rc.getTeamBullets() / 10) >= difference) {\n\t\t\trc.donate(rc.getTeamBullets());\n\t\t\treturn true;\n\t\t} else\n\t\t\treturn false;\n\t}",
"private boolean isTeamAWinner(BattleFactory factory) {\r\n\t\tBattle battle = factory.generateBattle();\r\n\t\tdo {\r\n\t\t\tBattleAction action = battle.nextAction();\r\n\t\t\tif (action instanceof ActionFinish) {\r\n\t\t\t\tif (((ActionFinish) action).teamAVictor) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} while (!battle.isOver());\r\n\t\treturn false;\r\n\t}",
"int getTeam();",
"public boolean isSetTeam_id() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TEAM_ID_ISSET_ID);\n }",
"private void checkForJudgeAndTeam(IInternalContest contest) {\n Account account = contest.getAccounts(ClientType.Type.TEAM).firstElement();\n assertFalse(\"Team account not generated\", account == null);\n assertFalse(\"Team account not generated\", account.getClientId().equals(Type.TEAM));\n \n account = contest.getAccounts(ClientType.Type.JUDGE).firstElement();\n assertFalse(\"Judge account not generated\", account == null);\n assertFalse(\"Team account not generated\", account.getClientId().equals(Type.TEAM));\n\n }",
"public boolean isEliminated(String team) {\n FlowNetwork flowNetwork = createFlowNetwork(findTeamIndex(team));\n new FordFulkerson(flowNetwork, 0, numVertices - 1);\n double epsilon = 1.0E-6;\n for (FlowEdge gameVertex : flowNetwork.adj(0)) {\n if (Math.abs(gameVertex.flow() - gameVertex.capacity()) > epsilon)\n return true;\n }\n return false;\n }",
"public boolean MatchColor(){\n boolean result = false;\n String gameData;\n gameData = DriverStation.getInstance().getGameSpecificMessage();\n if(gameData.length() > 0)\n {\n switch (gameData.charAt(0))\n {\n case 'B' :\n //Blue case code\n result = StopPanelWithColor(kRedTarget);\n break;\n case 'G' :\n //Green case code\n result = StopPanelWithColor(kYellowTarget);\n break; \n case 'R' :\n //Red case code\n result = StopPanelWithColor(kBlueTarget);\n break;\n case 'Y' :\n //Yellow case code\n result = StopPanelWithColor(kGreenTarget);\n break;\n default :\n //This is corrupt data\n break;\n }\n } else {\n //Code for no data received yet\n }\n return result;\n }",
"public boolean meTurn(){\n return (isWhite && isWhitePlayer) || (!isWhite && !isWhitePlayer);\n }",
"public static boolean isTeam(long id) {\n Team team = getTeam(id);\n return !(team == null);\n }",
"private boolean checkGameStatus() {\n int res = model.getWinner();\n if (res == Model.DRAW) {\n draw();\n return false;\n } else if (res == Model.WHITE) {\n whiteScore++;\n view.getPrompt().setText(whiteName + \" win!\");\n prepareRestart();\n return false;\n } else if (res == Model.BLACK) {\n blackScore++;\n view.getPrompt().setText(blackName + \" win!\");\n prepareRestart();\n return false;\n }\n return true;\n }",
"@Test\n public void determineWinnerNoRedMove()\n {\n // Setup.\n final CheckersGameInjector injector = new CheckersGameInjector();\n final List<Agent> agents = createAgents(injector);\n final Agent agentRed = agents.get(0);\n final Agent agentWhite = agents.get(1);\n final CheckersEnvironment environment = new CheckersEnvironment();\n\n environment.placeToken(CheckersPosition.P07, King.WHITE.withAgent(agentWhite));\n environment.placeToken(CheckersPosition.P03, Pawn.WHITE.withAgent(agentWhite));\n environment.placeToken(CheckersPosition.P02, Pawn.WHITE.withAgent(agentWhite));\n environment.placeToken(CheckersPosition.P12, Pawn.RED.withAgent(agentRed));\n environment.placeToken(CheckersPosition.P08, Pawn.RED.withAgent(agentRed));\n environment.placeToken(CheckersPosition.P04, King.RED.withAgent(agentRed));\n // System.out.println(environment);\n\n assertThat(environment.getTokenCountFor(CheckersTeam.RED), is(3));\n assertThat(environment.getTokenCountFor(CheckersTeam.WHITE), is(3));\n\n final CheckersAdjudicator adjudicator = injector.injectAdjudicator();\n\n // Run / Verify.\n assertTrue(adjudicator.isGameOver(environment));\n assertThat(adjudicator.determineWinner(environment), is(agentWhite));\n }",
"private boolean getFlightTeamStatus(String flightId) throws DAOException {\n\n List<TeamMember> teamList;\n\n try (ProxyConnection connection = ConnectionPool.getInstance().getConnection()) {\n FlightTeamDAO flightTeamDao = new FlightTeamDAO(connection);\n teamList = flightTeamDao.findFlightTeamByFlightId(flightId);\n }\n return teamList.isEmpty();\n }",
"boolean hasAttackerRoleName();",
"private Boolean isRed(Node h){\n\t\tif(h.color == null)\n\t\t\treturn false;\n\t\treturn h.color==RED;\n\t}",
"public String getGameStatus(String team) {\n\n String gameStatus = \"\";\n\n String[] mlbTeam = {\"D-backs\", \"Braves\", \"Orioles\", \"Red Sox\", \"Cubs\", \"White Sox\", \"Reds\", \"Indians\", \"Rockies\",\n \"Tigers\", \"Astros\", \"Royals\", \"Angels\", \"Dodgers\", \"Marlins\", \"Brewers\", \"Twins\", \"Mets\",\n \"Yankees\", \"Athletics\", \"Phillies\", \"Pirates\", \"Cardinals\", \"Padres\", \"Giants\", \"Mariners\",\n \"Rays\", \"Rangers\", \"Blue Jays\", \"Nationals\"};\n\n search:\n for (int i = 0; i < 1; i++) {\n\n for (int j = 0; j < mlbTeam.length; j++) {\n if (mlbTeam[j].equals(team)) {\n break search;\n }\n }\n\n team = \"No team\";\n i++;\n }\n try {\n // indicate if today is an off day for the team selected\n if (getPlayerInfo(team, \"status\", \"status\").equals(\"\")) {\n gameStatus = \"No game scheduled for the \" + uppercaseFirstLetters(team);\n }\n }\n catch (NullPointerException npe) {\n gameStatus = \"No game scheduled for the \" + uppercaseFirstLetters(team);\n }\n\n // display error message if there is no match to the team name inputted\n if (team.equals(\"No team\")) {\n gameStatus = \"ERROR: Please enter current MLB team name.\";\n }\n // indicate if today is an off day for the team selected\n else if (getPlayerInfo(team, \"status\", \"status\").equals(\"\")) {\n gameStatus = \"No game scheduled for the \" + team;\n }\n else {\n gameStatus = getPlayerInfo(team, \"status\", \"status\");\n }\n\n return gameStatus;\n }",
"public boolean isPlayerInThisGame(Player player) {\n return player.equals(getRedPlayer()) || player.equals(getWhitePlayer());\n }",
"private boolean isRed(Node x) {\n if (x == null)\n return false;\n return x.color == RED;\n }",
"public final boolean checkForWin() {\r\n boolean result = false;\r\n String player = \"\";\r\n \r\n for (Rail rail : rails) {\r\n if (rail.isWinner()) {\r\n result = true;\r\n for(Tile tile : rail.getTiles()) {\r\n tile.setBackground(Color.GREEN);\r\n player = tile.getText();\r\n }\r\n if (player.equals(\"X\")) {\r\n winningPlayer = \"X\";\r\n this.xWins++;\r\n } else if (player.equals(\"0\")) {\r\n winningPlayer = \"0\";\r\n this.oWins++;\r\n }\r\n break;\r\n }\r\n }\r\n \r\n return result;\r\n }",
"public boolean areOnSameTeam(UUID s1, UUID s2) {\n\t\tTeam team = plugin.getTeamManager().getPlayerTeam(s1);\n\t\tTeam warpeeTeam = plugin.getTeamManager().getPlayerTeam(s2);\n\n\t\tif (team == null || warpeeTeam == null) {\n\t\t\treturn false;\n\t\t}\n\t\tif (team != warpeeTeam)\n\t\t\treturn false;\n\n\t\tif (team == warpeeTeam)\n\t\t\treturn true;\n\t\treturn false;\n\n\t}",
"public boolean isRun() {\n if (!isValid()) {\n return false;\n }\n else {\n if (tiles.get(0).getColour() == tiles.get(1).getColour()) {\n return true;\n } else {\n return false;\n }\n }\n }",
"private void setTeamInfo_Red2() {\n redTeamNumber2.setText(fixNumTeam(redTeamNumber2.getText(), \"Red 2\"));\n\n redTeamNumber2.setBackground(Color.WHITE);\n\n FieldAndRobots.getInstance().setTeamNumber(FieldAndRobots.RED, FieldAndRobots.TWO,\n Integer.parseInt(redTeamNumber2.getText()));\n FieldAndRobots.getInstance().actOnRobot(FieldAndRobots.RED,\n FieldAndRobots.TWO, FieldAndRobots.SpecialState.ZERO_BATTERY);\n\n if (!Main.isSimpleMode()) {\n PLC_Sender.getInstance().updatePLC_TeamNum(true);\n }\n }",
"@Override\n\tpublic boolean isIsJuniorMatch() {\n\t\treturn _esfTournament.isIsJuniorMatch();\n\t}",
"public boolean isEliminated(String team) {\n if (team == null || !st.contains(team))\n throw new IllegalArgumentException(\"Invalid Arguments!\");\n if (n == 1) return false;\n int x = st.get(team);\n for (int i = 0; i < n; i++) {\n if (w[x] + r[x] < w[i]) return true;\n }\n if (n == 2) return false;\n\n int V = n * (n - 1) / 2 + 2;\n FlowNetwork G = new FlowNetwork(V);\n int s = 0;\n int t = 1;\n\n for (int i = 0; i < n; i++) {\n if (i != x) G.addEdge(new FlowEdge(teamV(i, x), t, w[x] + r[x] - w[i]));\n for (int j = i + 1; j < n; j++) {\n if (i != x && j != x) {\n G.addEdge(new FlowEdge(s, gameV(i, j, x), g[i][j]));\n G.addEdge(new FlowEdge(gameV(i, j, x), teamV(i, x), Integer.MAX_VALUE));\n G.addEdge(new FlowEdge(gameV(i, j, x), teamV(j, x), Integer.MAX_VALUE));\n }\n }\n }\n\n FordFulkerson ff = new FordFulkerson(G, s, t);\n for (int v = (n - 1) * (n - 2) / 2 + 2; v < V; v++) {\n if (ff.inCut(v)) return true;\n }\n return false;\n }",
"public String getAwayTeam();",
"public static boolean isEnemyTerran() {\n return AtlantisGame.enemy().getRace().equals(RaceTypes.Terran);\n }",
"public boolean areOnSameTeam(Player p1, Player p2) {\n\t\treturn areOnSameTeam(p1.getUniqueId(), p2.getUniqueId());\n\n\t}",
"boolean isPlayerTurn();",
"public boolean isActiveTeam(int teamId) {\n\t\treturn (teamId == getActiveTeam().id);\n\t}",
"public boolean isSetTeamName() {\n return this.teamName != null;\n }",
"public static boolean goDoubleTeam(Team team) {\r\n\t\tint highest = -100;\r\n\t\tboolean allowed = false;\r\n\t\t\r\n\t\t//Find the highest score.\r\n\t\tif (Utils.stringToInt(Main.teamOne.score) > highest) \r\n\t\t\thighest = Utils.stringToInt(Main.teamOne.score);\r\n\t\tif (Utils.stringToInt(Main.teamTwo.score) > highest) \r\n\t\t\thighest = Utils.stringToInt(Main.teamTwo.score);\r\n\t\t\r\n\t\t//Compare highest with team to see if difference exceeds 200.\r\n\t\tif (Utils.stringToInt(team.score) + 200 <= highest)\r\n\t\t\tallowed = true;\r\n\t\r\n\t\treturn allowed;\r\n\t}",
"private void setTeamInfo_Red1() {\n redTeamNumber1.setText(fixNumTeam(redTeamNumber1.getText(), \"Red 1\"));\n\n redTeamNumber1.setBackground(Color.WHITE);\n\n FieldAndRobots.getInstance().setTeamNumber(FieldAndRobots.RED,\n FieldAndRobots.ONE, Integer.parseInt(redTeamNumber1.getText()));\n FieldAndRobots.getInstance().actOnRobot(FieldAndRobots.RED,\n FieldAndRobots.ONE, FieldAndRobots.SpecialState.ZERO_BATTERY);\n\n if (!Main.isSimpleMode()) {\n PLC_Sender.getInstance().updatePLC_TeamNum(true);\n }\n }",
"private boolean isCheckMate() {\n if (whitePlayer.getOccupiedSet().isEmpty()) {\n System.out.println(\"BLACK PLAYER WINS\");\n return true;\n }\n else if (blackPlayer.getOccupiedSet().isEmpty()) {\n System.out.println(\"WHITE PLAYER WINS\");\n return true;\n }\n else return false;\n }",
"public String getHomeTeam();",
"public static Team whoWonGameTeam() {\r\n\t\tint highest = Main.winScoreNumb;\r\n\t\tTeam winner = null;\r\n\t\t\r\n\t\t//Winner is team one.\r\n\t\tif (Utils.stringToInt(Main.team1Score) >= highest) {\r\n\t\t\thighest = Utils.stringToInt(Main.team1Score);\r\n\t\t\twinner = Main.teamOne;\r\n\t\t}\r\n\t\t//Winner is team two.\r\n\t\tif (Utils.stringToInt(Main.team2Score) >= highest) {\r\n\t\t\thighest = Utils.stringToInt(Main.team2Score);\r\n\t\t\twinner = Main.teamTwo;\r\n\t\t}\r\n\t\t\r\n\t\treturn winner;\r\n\t}",
"public boolean roadBlocked(Player player)\n {\n int num = 0;\n int num2 = 0;\n int num3 = 0;\n if (person_to_play == 1)\n {\n num = check4CollisionWithRed(player);\n num2 = check4CollisionWithGreen(player);\n num3 = check4CollisionWithYellow(player);\n }\n else if (person_to_play == 2)\n {\n //println(\"inside road block\");\n num = check4CollisionWithBlue(player);\n num2 = check4CollisionWithGreen(player);\n num3 = check4CollisionWithYellow(player);\n //println(\"num=\"+num);\n }\n else if (person_to_play == 3)\n {\n num = check4CollisionWithBlue(player);\n num2 = check4CollisionWithRed(player);\n num3 = check4CollisionWithYellow(player);\n }\n else if (person_to_play == 4)\n {\n num = check4CollisionWithBlue(player);\n num2 = check4CollisionWithRed(player);\n num3 = check4CollisionWithGreen(player);\n }\n if (num > 1 || num2 > 1 || num3 > 1)\n {\n return true;\n }\n return false;\n }",
"public boolean isRedstoneLamp() {\n return this.type == Type.REDSTONELAMP;\n }",
"public String getTeamStatus(){\n int i;\n StringBuilder s = new StringBuilder();\n\n s.append(employeeStatus());\n if(this.curHeadCount <= 0)\n s.append(\" and no direct reports yet\");\n else {\n s.append(\" and is managing:\");\n for(i=0;i<this.curHeadCount;i++){\n s.append(\"\\n\");\n s.append(this.employee[i].employeeStatus());\n }\n }\n\n return s.toString();\n }",
"public String getTeam() {\n return team;\n }",
"@Override\n\tpublic boolean isIsSingleMatch() {\n\t\treturn _esfTournament.isIsSingleMatch();\n\t}",
"public boolean isEliminated(String team) {\n validate(team);\n if (isTrivialEliminate(team)) return true;\n FlowNetwork fn = createFlow(team);\n FordFulkerson maxflow = new FordFulkerson(fn, 0, fn.V() - 1);\n for (FlowEdge e : fn.adj(0))\n if (0 == e.from() && e.flow() < e.capacity()) return true;\n return false;\n }",
"public boolean addTeam(T team){\n if (teams.contains(team)){\n System.out.println(\"Cant add team is allready in the league list.\");\n return false;\n }else{\n teams.add(team);\n return true;\n }\n }",
"public int getTeam() {\n return team_;\n }",
"public boolean isSolved() {\n if (getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(1, 1) != RubiksColor.BLUE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(2, 1) != RubiksColor.BLUE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(3, 1) != RubiksColor.BLUE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(1, 2) != RubiksColor.BLUE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(3, 2) != RubiksColor.BLUE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(1, 3) != RubiksColor.BLUE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(2, 3) != RubiksColor.BLUE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(3, 3) != RubiksColor.BLUE) return false;\n\n if (getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(1, 1) != RubiksColor.YELLOW) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(2, 1) != RubiksColor.YELLOW) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(3, 1) != RubiksColor.YELLOW) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(1, 2) != RubiksColor.YELLOW) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(3, 2) != RubiksColor.YELLOW) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(1, 3) != RubiksColor.YELLOW) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(2, 3) != RubiksColor.YELLOW) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(3, 3) != RubiksColor.YELLOW) return false;\n\n if (getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(1, 1) != RubiksColor.GREEN) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(2, 1) != RubiksColor.GREEN) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(3, 1) != RubiksColor.GREEN) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(1, 2) != RubiksColor.GREEN) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(3, 2) != RubiksColor.GREEN) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(1, 3) != RubiksColor.GREEN) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(2, 3) != RubiksColor.GREEN) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(3, 3) != RubiksColor.GREEN) return false;\n\n if (getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(1, 1) != RubiksColor.WHITE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(2, 1) != RubiksColor.WHITE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(3, 1) != RubiksColor.WHITE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(1, 2) != RubiksColor.WHITE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(3, 2) != RubiksColor.WHITE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(1, 3) != RubiksColor.WHITE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(2, 3) != RubiksColor.WHITE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(3, 3) != RubiksColor.WHITE) return false;\n\n if (getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(1, 1) != RubiksColor.ORANGE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(2, 1) != RubiksColor.ORANGE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(3, 1) != RubiksColor.ORANGE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(1, 2) != RubiksColor.ORANGE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(3, 2) != RubiksColor.ORANGE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(1, 3) != RubiksColor.ORANGE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(2, 3) != RubiksColor.ORANGE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(3, 3) != RubiksColor.ORANGE) return false;\n\n if (getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(1, 1) != RubiksColor.RED) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(2, 1) != RubiksColor.RED) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(3, 1) != RubiksColor.RED) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(1, 2) != RubiksColor.RED) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(3, 2) != RubiksColor.RED) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(1, 3) != RubiksColor.RED) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(2, 3) != RubiksColor.RED) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(3, 3) != RubiksColor.RED) return false;\n\n return true;\n }",
"public boolean teamsFilled() {\n\t\ttry {\n\t\t\tif (getTeams().last() == true) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn false;\n\t}",
"boolean canMove(Color player) {\n int[][] myStatusBoard;\n if (_playerOnMove == ORANGE) {\n myStatusBoard = _orangeStatusBoard;\n } else {\n myStatusBoard = _violetStatusBoard;\n }\n if (Game._totalMoves < 2) {\n return true;\n }\n int i, j;\n for (i = 0; i < 16; i++) {\n for (j = 0; j < 16; j++) {\n if (myStatusBoard[i][j] == 1) {\n if (findMove(i, j, myStatusBoard)) {\n return true;\n }\n }\n }\n }\n return false;\n }",
"public boolean isInTeam(Fighter fighter) {\n\t\treturn fighters.contains(fighter);\n\t}",
"public String getTeam() {\r\n\t\treturn Team;\r\n\t}",
"private boolean checkForBigGameWin(){\n boolean truth = false;\n if (checkGameWin(getLettersOfAllGames())){\n truth = true;\n }\n return truth;\n }",
"public boolean isEliminated(String team) {\n return certificateOfElimination(team) != null;\n }",
"public void checkWin(){\n boolean result = false;\n if(game.getTurn() > 3){\n Player currentPlayer = game.getPlayerTurn();\n int playernumber = currentPlayer.getPlayericon();\n result = game.winChecker(game.getBored(),playernumber);\n if(result == true) {\n setWinMsgBox(currentPlayer.getPlayerName() + \" Is victorious :)\",\"WIN\");\n }else if(game.getTurn() == 8 && result == false){\n setWinMsgBox(\"Too bad it is a draw, No one out smarted the other -_-\",\"DRAW\");\n }else{}\n }else{\n result = false;\n }\n }",
"public boolean isGreen()\n {\n // TODO: replace this line with your code\n }",
"private final String checkIfGameOver() {\n\t\tif(state.getGameOver()){\n\t\t\tint winner = state.getWinner();\n\t\t\tif(winner == CbgState.PLAYER_1){\n\t\t\t\treturn (\"Playre 1 won with \" + state.getScore(CbgState.PLAYER_1) + \" points.\");\n\t\t\t}\n\t\t\telse if(winner == CbgState.PLAYER_2){\n\t\t\t\treturn (\"Playre 2 won with \" + state.getScore(CbgState.PLAYER_1) + \" points.\");\n\t\t\t}\n\t\t\telse return \"ERROR\";//if something horrible happens\n\t\t}\n\n\t\treturn \"FALSE\";//if game is not over\n\n\t}",
"@java.lang.Override\n public boolean getRedact() {\n return redact_;\n }",
"@java.lang.Override\n public boolean getRedact() {\n return redact_;\n }",
"public boolean isEliminated(String team) {\n validateTeam(team);\n int teamId = teamsMap.get(team);\n if (isTrivial(teamId)) {\n return true;\n }\n else {\n return buildNetwork(teamId).eliminated;\n }\n }",
"boolean isFalseColor();"
]
| [
"0.7430659",
"0.68227154",
"0.6755472",
"0.6614444",
"0.63963425",
"0.6269669",
"0.62563354",
"0.62423795",
"0.62192607",
"0.62174046",
"0.6216008",
"0.6177069",
"0.61655474",
"0.6136699",
"0.6076335",
"0.60534686",
"0.6039118",
"0.6000783",
"0.598964",
"0.5972112",
"0.5972112",
"0.59632444",
"0.5950678",
"0.5945107",
"0.5942819",
"0.59389526",
"0.5928796",
"0.5887369",
"0.5883418",
"0.583959",
"0.58127856",
"0.57864946",
"0.5765945",
"0.5762974",
"0.5756752",
"0.5751525",
"0.5749833",
"0.57481337",
"0.57322425",
"0.5725324",
"0.5710673",
"0.5707086",
"0.5695854",
"0.5691397",
"0.56872857",
"0.5683303",
"0.56692433",
"0.565749",
"0.5657391",
"0.56562203",
"0.5647537",
"0.5640079",
"0.5624971",
"0.5617836",
"0.56163174",
"0.5612749",
"0.56110424",
"0.56087023",
"0.55974054",
"0.5596462",
"0.5587113",
"0.5569594",
"0.55673003",
"0.55648744",
"0.55555457",
"0.55471367",
"0.5546373",
"0.5545312",
"0.55334264",
"0.55240846",
"0.551326",
"0.55053174",
"0.55022246",
"0.55003536",
"0.5497531",
"0.5496788",
"0.5494261",
"0.54839694",
"0.5475454",
"0.5471076",
"0.54671663",
"0.5466988",
"0.546221",
"0.54517996",
"0.54470617",
"0.5443325",
"0.54418325",
"0.5440797",
"0.5437949",
"0.54353607",
"0.5428233",
"0.54226327",
"0.54187715",
"0.54150426",
"0.5414401",
"0.5406907",
"0.5404402",
"0.5404402",
"0.53979295",
"0.5397281"
]
| 0.7926348 | 0 |
/ Return current robot heading based on gyro/IMU reading | double getHeading() {
if( CACHE_IMU_READING && loop_cnt_==last_imu_read_loop_id_ ) {
// return the existing heading when getHeading() is called in the same loop
return heading_ ;
}
heading_ = 0;
if( USE_IMU && imu_!=null && imu_init_ok_ ) {
imu_angles_ = imu_.getAngularOrientation().toAxesReference(AxesReference.INTRINSIC).toAxesOrder(AxesOrder.ZYX); // acquiring angles are expensive, keep it minimal
// IMU can automatically detect orientation, and return heading as first angle, 2020/01/25
heading_ = AngleUnit.DEGREES.normalize(imu_angles_.firstAngle);
last_imu_read_loop_id_ = loop_cnt_;
} else if( USE_IMU2 && imu2_!=null && imu2_init_ok_ ) {
// use IMU2 if IMU failed
imu2_angles_ = imu2_.getAngularOrientation().toAxesReference(AxesReference.INTRINSIC).toAxesOrder(AxesOrder.ZYX);
heading_ = AngleUnit.DEGREES.normalize(imu2_angles_.firstAngle);
last_imu_read_loop_id_ = loop_cnt_;
}
return heading_;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getHeading() {\n return Rotation2d.fromDegrees(m_gyro.getAngle()).getDegrees();\n }",
"private float getHeading() {\n Orientation anglesA = robot.imu.getAngularOrientation(\n AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n return AngleUnit.DEGREES.normalize(\n AngleUnit.DEGREES.fromUnit(anglesA.angleUnit, anglesA.firstAngle));\n }",
"public Rotation2d getHeading() {\n return Rotation2d.fromDegrees(Math.IEEEremainder(gyro.getAngle(), 360) * (Const.kGyroReversed ? -1.0 : 1.0));\n }",
"double readImuHeading() {\n double h = -360.0;\n if( USE_IMU && imu_!=null && imu_init_ok_ ) {\n h = imu_.getAngularOrientation().firstAngle;\n }\n return h;\n }",
"public double getHeading() {\n return imu.getAngularOrientation().firstAngle;\n }",
"public double getHeadingInDegrees(){\r\n double headingRadians = calculateHeadingRadians();\r\n return headingRadians * 180 / Math.PI;\r\n }",
"double readImu2Heading() {\n double h = -360.0;\n if( USE_IMU2 && imu2_!=null && imu2_init_ok_ ) {\n h = imu2_.getAngularOrientation().firstAngle;\n }\n return h;\n }",
"public Double getCompassHeading() {\n\t\treturn compassHeading;\n\t}",
"public double getGyroInRad(){\n return 0.0;//TODO:Pull and return gyro in radians\n }",
"public double getYawAngle () {\n return gyro.getAngle() * Math.PI / 180; //Convert the angle to radians.\n }",
"public double getGyroInDeg(){\n return 0.0;//TODO:Pull gyro in radians and convert to degrees\n }",
"public interface DisplacementSensor {\n\n // return current heading reported by sensor, in degrees.\n // convention is positive angles CCW, wrapping from 359-0\n public float getDisp();\n\n}",
"float getHeading();",
"float getHeading();",
"float getHeading();",
"public static double calculateHeading(double compassRadians, Location readFrom){\n GeomagneticField field = new GeomagneticField((float)readFrom.getLatitude(), (float)readFrom.getLongitude(), (float)readFrom.getHeight(), System.currentTimeMillis());\n float declination = field.getDeclination();\n return compassRadians + Math.toRadians(declination);\n }",
"protected float getGyroscopeAngle() {\n if (doGyro) {\n Orientation exangles = bosch.getAngularOrientation(AxesReference.EXTRINSIC, AxesOrder.XYZ, AngleUnit.DEGREES);\n float gyroAngle = exangles.thirdAngle;\n //exangles.\n //telemetry.addData(\"angle\", \"angle: \" + exangles.thirdAngle);\n float calculated = normalizeAngle(reverseAngle(gyroAngle));\n //telemetry.addData(\"angle2\",\"calculated:\" + calculated);\n return calculated;\n } else {\n return 0.0f;\n }\n }",
"public double getRolledHeading() {\n double heading = 360.0 - getRawHeading();\n if (lastHeading < 100 && heading > 300) {\n rotationAmt--;\n } else if (heading < 100 && lastHeading > 300) {\n rotationAmt++;\n }\n lastHeading = heading;\n return heading + rotationAmt * 360.0;\n }",
"public float getHeading() {\n return heading_;\n }",
"public float getHeading() {\n return heading_;\n }",
"public float getHeading() {\n return heading_;\n }",
"public float getHeading() {\n return heading_;\n }",
"public double getHeadingAtTimeStamp(long timeStamp) {\n\n double heading = Double.NaN;\n\n try {\n if (timeStamp > m_gyroData.get(0).timeStamp) {\n\n heading = m_gyroData.get(0).angle;\n System.out.println(String.format(\n \"Couldn't determine heading from timeStamp %d, it's too young. Returned youngest heading of %f.\", timeStamp,\n heading));\n /*\n * We don't have data fresher than the timeStamp the caller is looking for; we\n * haven't acquired it yet. So just return the freshest heading we have.\n */\n return heading;\n }\n } catch (Exception e) {\n /*\n * We don't have ANY heading information. Just return NaN to the caller.\n */\n\n System.out.println(String.format(\n \"Couldn't return ANY heading for timestamp %d. No heading data has been added. (Did you call GyroDiary::add() periodically?)\",\n timeStamp));\n return Double.NaN;\n }\n\n try {\n if (timeStamp < m_gyroData.get(m_gyroData.size() - 1).timeStamp) {\n heading = m_gyroData.get(m_gyroData.size() - 1).angle;\n System.out.println(\n String.format(\"Couldn't determine heading from timeStamp %d, it's too old. Returned oldest heading of %f.\",\n timeStamp, heading));\n return heading;\n }\n } catch (Exception e) {\n /*\n * We don't have ANY heading information. Just return NaN to the caller.\n */\n System.out.println(String.format(\n \"Couldn't return ANY heading for timestamp %d. No heading data has been added. (Did you call GyroDiary::add() periodically?)\",\n timeStamp));\n return Double.NaN;\n }\n\n for (int index = 0; index < m_gyroData.size() - 1; ++index) {\n\n if (timeStamp <= m_gyroData.get(index).timeStamp) {\n\n /*\n * We've found two headings that are bracketing the timeStamp the caller asked\n * for. Perform a linear interpolation between these two headings to get the\n * best heading information we can generate.\n */\n double y0 = m_gyroData.get(index).angle;\n double y1 = m_gyroData.get(index + 1).angle;\n\n long x0 = m_gyroData.get(index).timeStamp;\n long x1 = m_gyroData.get(index + 1).timeStamp;\n\n try {\n heading = (y0 + (timeStamp - x0) * (y1 - y0) / (x1 - x0));\n } catch (Exception e) {\n heading = y0;\n\n System.out.println(String.format(\"Couldn't interpolate heading for timeStamp %d. Returned %f instead. %s\",\n timeStamp, heading, e.toString()));\n }\n\n }\n }\n return heading;\n }",
"public double getGyroAngle() {\n double[] ypr = new double[3];\n gyro.GetYawPitchRoll(ypr);\n return ypr[0];\n }",
"public double GyroPosition() {\n\t\tswitch (gyroToUse) {\n\t\tcase ANALOG:\n\t\t\tgyroAngle = gyro.getAngle();\n\t\t\tbreak;\n\n\t\tcase SPI:\n\t\t\tgyroAngle = spi.getAngle();\n\t\t\tbreak;\n\n\t\tcase IMU:\n\t\t\tgyroAngle = imu.getAngleZ();\n\t\t\tbreak;\n\t\t}\n\n\t\tgyroAngle = gyroAngle % 360;\n\n\t\t// SmartDashboard.putNumber(\"gyroAngle\", gyroAngle);\n\t\treturn gyroAngle;\n\n\t}",
"public float getHeading() {\n return heading_;\n }",
"public float getHeading() {\n return heading_;\n }",
"double getHeadingDiff(double init_h) {\n double curr_h = getHeading();\n double diff_h = init_h - curr_h;\n if( diff_h>=360.0 ) diff_h -= 360.0;\n else if( diff_h<=-360.0 ) diff_h += 360.0;\n return diff_h ;\n }",
"public synchronized double getPitch() {\n\t\tif (isConnected) {\n\t\t\treturn gyro.getPitch();\n\t\t}\n\t\telse {\n\t\t\treturn 0;\n\t\t}\n\t}",
"int getSensorRotationDegrees();",
"float getDir() {\n return degrees(_rotVector.heading());\n }",
"@Deprecated\n public float getRobotAngle() {\n //There are a couple options here, they are as follows:\n // - gyro_board.getYaw() (Proccesed gyro data)\n // - gyro_board.getCompassHeading() (Proccessed compass data)\n // - gyro_board.getFusedHeading() (Combined compass and gyro data)\n\n float board_angle;\n if (gyro_board.isMagneticDisturbance()){\n board_angle = getGyroSensorAngle();\n } else {\n board_angle = getCompassCorrectedForAlliance();\n }\n\n return board_angle;\n }",
"public int getGyroAngle() {\r\n \treturn (int)Math.round(gyro.getAngle());\r\n }",
"public Direction getCurrentHeading()\r\n\t{\r\n\t\treturn this.currentDirection;\r\n\t\t\r\n\t}",
"private double getAngle()\n {\n // We experimentally determined the Z axis is the axis we want to use for heading angle.\n // We have to process the angle because the imu works in euler angles so the Z axis is\n // returned as 0 to +180 or 0 to -180 rolling back to -179 or +179 when rotation passes\n // 180 degrees. We detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return globalAngle;\n }",
"public double getGyroAngleX() {\n return m_gyro.getAngleX();\n }",
"private double getAngle() {\n // We experimentally determined the Z axis is the axis we want to use for\n // heading angle. We have to process the angle because the imu works in\n // euler angles so the Z axis is returned as 0 to +180 or 0 to -180\n // rolling back to -179 or +179 when rotation passes 180 degrees. We\n // detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC,\n AxesOrder.ZYX, AngleUnit.DEGREES);\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return globalAngle;\n }",
"@Override\n\tpublic void onHeadingSensorChanged(float[] orientation) {\n\t\t\n\t}",
"public int getCameraSensorRotation();",
"double getMagnetic(double reading);",
"@Override\r\n\tpublic int getOrientation(Robot robot)\r\n\t{\r\n\t\treturn robot.getOrientation().ordinal();\r\n\t}",
"Motion getMotion6() {\n try {\n motion.ax = (float) readRegWord(MPU6050_RA_ACCEL_XOUT_H) * accelerometerCoef;\n motion.ay = (float) readRegWord(MPU6050_RA_ACCEL_YOUT_H) * accelerometerCoef;\n motion.az = (float) readRegWord(MPU6050_RA_ACCEL_ZOUT_H) * accelerometerCoef;\n motion.gx = (float) readRegWord(MPU6050_RA_GYRO_XOUT_H) * gyroscopeCoef;\n motion.gy = (float) readRegWord(MPU6050_RA_GYRO_YOUT_H) * gyroscopeCoef;\n motion.gz = (float) readRegWord(MPU6050_RA_GYRO_ZOUT_H) * gyroscopeCoef;\n return motion;\n } catch (IOException e) {\n throw new IllegalStateException(\"Could not read the accel/gyro readings.\", e);\n }\n }",
"public double getAngle()\n {\n // We experimentally determined the Z axis is the axis we want to use for heading angle.\n // We have to process the angle because the imu works in euler angles so the Z axis is\n // returned as 0 to +180 or 0 to -180 rolling back to -179 or +179 when rotation passes\n // 180 degrees. We detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return globalAngle;\n }",
"public double calculateHeadingRadians(){\r\n if(coordinateHistory.size() > 2){\r\n GPSCoordinate firstPoint = coordinateHistory.get(coordinateHistory.size() - 2);\r\n GPSCoordinate secondPoint = coordinateHistory.get(coordinateHistory.size() - 1);\r\n \r\n if(!firstPoint.compareTo(secondPoint)){\r\n double latA = firstPoint.getLatitude();\r\n double longA = firstPoint.getLongitude();\r\n double latB = secondPoint.getLatitude();\r\n double longB = secondPoint.getLongitude();\r\n\r\n double X = Math.cos(latB) * Math.sin(longB - longA);\r\n double Y = (Math.cos(latA) * Math.sin(latB)) - (Math.sin(latA) * Math.cos(latB) * Math.cos(longB - longA));\r\n\r\n headingRadians = - Math.atan2(X, Y);\r\n return headingRadians;\r\n }else{\r\n return headingRadians;\r\n }\r\n }else{\r\n return headingRadians;\r\n }\r\n }",
"public java.lang.Object getRobotOrientation() throws CallError, InterruptedException {\n return (java.lang.Object)service.call(\"getRobotOrientation\").get();\n }",
"double normalizeHeading(double h) {\n double nh = h;\n if( h>-180 && h<180 ) {\n } else if( h <= -180 ) {\n nh = h+360;\n } else if( h > 180 ) {\n nh = h-360;\n }\n return nh;\n }",
"private float calculateAngles(){\n\t\t// First we will move the current angle heading into the previous angle heading slot.\n\t\tdata.PID.headings[0] = data.PID.headings[1];\n\t\t// Then, we assign the new angle heading.\n\t\tdata.PID.headings[1] = data.imu.getAngularOrientation().firstAngle;\n\n\t\t// Finally we calculate a computedTarget from the current angle heading.\n\t\tdata.PID.computedTarget = data.PID.headings[1] + (data.PID.IMURotations * 360);\n\n\t\t// Now we determine if we need to re-calculate the angles.\n\t\tif(data.PID.headings[0] > 300 && data.PID.headings[1] < 60) {\n\t\t\tdata.PID.IMURotations++; //rotations of 360 degrees\n\t\t\tcalculateAngles();\n\t\t} else if(data.PID.headings[0] < 60 && data.PID.headings[1] > 300) {\n\t\t\tdata.PID.IMURotations--;\n\t\t\tcalculateAngles();\n\t\t}\n\t\treturn data.PID.headings[1];\n\t}",
"public double getGyroAngleY() {\n return m_gyro.getAngleY();\n }",
"float getYaw();",
"float getYaw();",
"double getCompass(double magnetic);",
"public float getYaw() {\n return yaw;\n }",
"@Override\n public int getCameraOrientation() {\n return characteristics_sensor_orientation;\n }",
"public double getGyroAngleZ() {\n return m_gyro.getAngleZ();\n }",
"public synchronized double getRoll() {\n\t\tif (isConnected) {\n\t\t\treturn gyro.getRoll();\n\t\t}\n\t\telse {\n\t\t\treturn 0;\n\t\t}\n\t}",
"public interface Gyro {\n /**\n * Get the amount of time the gyro spends calibrating\n *\n * @return Length of gyro calibration period\n */\n double getCalibrationPeriod();\n\n /**\n * Set the amount of time the gyro will spend calibrating\n *\n * @param calibrationPeriod Desired length of gyro calibration period\n */\n void setCalibrationPeriod(double calibrationPeriod);\n\n /**\n * Reset calibration and angle monitoring\n */\n void fullReset();\n\n /**\n * Starts calibrating the gyro. Resets the calibration value and begins\n * sampling gyro values to get the average 0 value. Sample time determined\n * by calibrationTicks\n */\n void startCalibration();\n\n /**\n * Finishes calibration. Stops calibrating and sets the calibration value.\n */\n void finishCalibration();\n\n /**\n * Gets the zero point for rate measurement\n *\n * @return The offset found by calibration\n */\n double getCalibrationOffset();\n\n /**\n * Checks if the gyro is currently calibrating.\n * If it is, measured rate and angle values are not guaranteed to be accurate.\n *\n * @return Whether the gyro is currently calibrating\n */\n boolean isCalibrating();\n\n /**\n * Gets the rate of yaw change from the gyro\n *\n * @return The rate of yaw change in degrees per second, positive is clockwise\n */\n double getRate();\n\n /**\n * Gets the yaw of the gyro\n *\n * @return The yaw of the gyro in degrees\n */\n double getAngle();\n\n /**\n * Resets the current angle of the gyro to zero\n */\n void resetAngle();\n}",
"public int getAngle(){\n\t\tif(!resetCoordinates()&&robot.imu1.isGyroCalibrated()){\n\t\t\trobot.angles=robot.imu1.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\t\t\tdouble currentAngle=robot.angles.firstAngle;\n\t\t\tint finalAngle= robot.startingAngle+(int)Math.round(currentAngle);\n\t\t\tif(finalAngle<0){\n\t\t\t\treturn 360+finalAngle;\n\t\t\t}\n\t\t\treturn finalAngle;\n\n\t\t}\n\t\telse if(!resetCoordinates()&&robot.imu.isGyroCalibrated()){\n\t\t\trobot.angles=robot.imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.YZX, AngleUnit.DEGREES);\n\t\t\tdouble currentAngle=robot.angles.firstAngle;\n\t\t\tint finalAngle= robot.startingAngle+(int)Math.round(currentAngle);\n\t\t\tif(finalAngle<0){\n\t\t\t\treturn 360+finalAngle;\n\t\t\t}\n\t\t\treturn finalAngle;\n\n\t\t}\n\t\telse if(resetCoordinates()){\n\t\t\tdouble oldAngle = robot.rotation.thirdAngle;\n\t\t\tdouble posAngle = oldAngle;\n\t\t\tint finalAngle;\n\t\t\tif (oldAngle < 0) posAngle = 360 - Math.abs(oldAngle);\n\t\t\tif((int) (Math.round(posAngle)) - 45 < 0){\n\t\t\t\tfinalAngle = 360-(int)Math.round(posAngle);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfinalAngle = (int) (Math.round(posAngle)) - 45;\n\t\t\t}\n\t\t\treturn finalAngle;\n\t\t}\n\t\telse{\n\t\t\treturn 10000;\n\t\t}\n\t}",
"double getPitch();",
"public void updateGyro() {\n\t\tangleToForward = gyro.getAngle();\n\t\tif (angleToForward >= 360) {\n\t\t\tangleToForward -= 360;\n\t\t} else if (angleToForward < 0) {\n\t\t\tangleToForward += 360;\n\t\t}\n\n\t}",
"public float getYaw() {\n return yaw_;\n }",
"public float getYaw() {\n return yaw_;\n }",
"double normaliseHeading(double ang) {\r\n\t\tif (ang > 2 * PI)\r\n\t\t\tang -= 2 * PI;\r\n\t\tif (ang < 0)\r\n\t\t\tang += 2 * PI;\r\n\t\treturn ang;\r\n\t}",
"@Override\n\t\t\tpublic double pidGet() {\n\t\t\t\tSmartDashboard.putNumber(\"value\", Robot.driveTrain.getRobotAngle());\n\t\t\t\treturn Robot.driveTrain.getRobotAngle();\n\t\t\t}",
"public double getGryoAngle() {\n\n\t\t// Normalize the angle\n\t\tdouble angle = gyro.getAngle() % 360;\n\n\t\tif (angle < 0) {\n\t\t\tangle = angle + 360;\n\t\t}\n\n\t\treturn angle;\n\t}",
"float getPitch();",
"float getPitch();",
"public float getYaw() {\n return yaw_;\n }",
"public float getYaw() {\n return yaw_;\n }",
"public float calculateIdealHeading(double currentHeading, Vector2 target) {\n\t\tdouble delta_x = target.x() - position.x();\r\n\t\tdouble delta_y = target.y() - position.y();\r\n\t\tdouble idealAngle = Math.toDegrees(Math.atan(delta_x / delta_y));\r\n\t\treturn (float)idealAngle;\r\n\t}",
"public static Gyro getGyro() {\n return sGyro;\n }",
"@Override\n public void gyroYaw(int value, int timestamp) {\n }",
"public String getOrientation(){\n\n if(robot.getRotation()%360 == 0){\n return \"NORTH\";\n } else if(robot.getRotation()%360 == 90\n ||robot.getRotation()%360 == -270){\n return \"EAST\";\n } else if(robot.getRotation()%360 == 180\n ||robot.getRotation()%360 == -180){\n return \"SOUTH\";\n } else if(robot.getRotation()%360 == 270\n ||robot.getRotation()%360 == -90){\n return \"WEST\";\n } else\n\n errorMessage(\"Id:10T error\");\n return null;\n }",
"public static double getHeading(double heading) {\n double newHeading;\n if (heading >=0.0 && heading < 90.0)\n newHeading = -1.0;\n else if (heading >= 90.0 && heading < 180.0)\n newHeading = -0.33;\n else if (heading >= 180.0 && heading < 270.0)\n newHeading = 0.33;\n else if (heading >= 270.0 && heading < 360.0)\n newHeading = 1.0;\n else\n newHeading = -1.0;\n return newHeading;\n }",
"public double curSwing(){\r\n return swingGyro.getAngle();\r\n }",
"public Rotation2d getGyro() {\n\t\treturn Rotation2dKt.getDegree(gyro.getAngle() - gyroZero);\n\t}",
"public float getMotor_ang_target_velocity() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readFloat(__io__address + 132);\n\t\t} else {\n\t\t\treturn __io__block.readFloat(__io__address + 124);\n\t\t}\n\t}",
"@Override\n\tpublic int getMotorSpeed() {\n\t\tupdateIR();\n\t\treturn direction*360;\n\t}",
"@MavlinkFieldInfo(\n position = 9,\n unitSize = 2,\n description = \"Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX\"\n )\n public final int hdg() {\n return this.hdg;\n }",
"private static double calcHeading(double angleA, double angleB) { \n\t\t\n\t\tdouble heading;\n\t\t\n\t\tif (angleA < angleB){\n\t\t\theading = 45 - (angleA + angleB) /2 ;\n\t\t}else {\n\t\t\theading = 225 - (angleA + angleB) /2 ;\t\n\t\t}\n\t\treturn heading;\n\t}",
"public double[] getGyro();",
"public void zeroHeading() {\n m_gyro.reset();\n }",
"@Override\n public void onSensorChanged(SensorEvent event) {\n theta = (float) Math.toDegrees(Math.atan(event.values[1] / event.values[2]));\n\n\n }",
"public float obtenMotor(){\r\n return this.motor;\r\n }",
"private double getGyroError(double targetAngle) {\n double error = targetAngle - imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.XZY, AngleUnit.DEGREES).thirdAngle;\n\n // keep the error on a range of -179 to 180\n while(opModeIsActive() && error > 180) error -= 360;\n while(opModeIsActive() && error <= -180) error += 360;\n\n return error;\n }",
"public void right90 () {\n saveHeading = 0; //modernRoboticsI2cGyro.getHeading();\n gyroTurn(TURN_SPEED, saveHeading - 90);\n gyroHold(HOLD_SPEED, saveHeading - 90, 0.5);\n }",
"@Override\n public void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n mAccelerometer = event.values;\n }\n if (event.sensor.getType() == Sensor.TYPE_MAGNETIC_FIELD) {\n mGeomagnetic = event.values;\n }\n\n if (mAccelerometer != null && mGeomagnetic != null) {\n float R[] = new float[9];\n float I[] = new float[9];\n boolean success = SensorManager.getRotationMatrix(R, I, mAccelerometer, mGeomagnetic);\n if (success) {\n float orientation[] = new float[3];\n SensorManager.getOrientation(R, orientation);\n // at this point, orientation contains the azimuth(direction), pitch and roll values.\n azimuth = 180*orientation[0] / Math.PI;\n double pitch = 180*orientation[1] / Math.PI;\n double roll = 180*orientation[2] / Math.PI;\n\n // Toast.makeText(getApplicationContext(),azimuth+\"--\",Toast.LENGTH_SHORT).show();\n }\n }\n }",
"public void updateOrientationAngles() {\n SensorManager.getRotationMatrix(rotationMatrix, null,\n accelerometerReading, magnetometerReading);\n\n // \"mRotationMatrix\" now has up-to-date information.\n\n float[] angles = SensorManager.getOrientation(rotationMatrix, orientationAngles);\n azimuth = (float) Math.toDegrees(angles[0]);\n // \"mOrientationAngles\" now has up-to-date information.\n TextView az = findViewById(R.id.az);\n rotateDriver(azimuth);\n\n az.setText(Float.toString(azimuth));\n }",
"double getAcceleration ();",
"public void setHeading() {\n super.setHeading(getPrevious().getHeadingTo(this)); //The absolute angle position that robot needs to face to reach this position\n }",
"private double getAngle()\n {\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n return angles.firstAngle;\n }",
"@Override\n\tpublic void onSensorChanged(SensorEvent se) {\n\t\teventIesim++;\n\t\tif(eventIesim == THRESHOLD_EVENTS)\n\t\t{\n\n\t\t\tswitch (se.sensor.getType())\n\t\t\t{\n\t\t\t\tcase Sensor.TYPE_ACCELEROMETER:\n\t\t\t\t{\n\t\t\t\t\taccelerometerValues = se.values.clone();\n\t\t\t\t\tnew ListenerThread(accelerometerValues,delta_orientation,context,gps).start(); // use the last orientation set\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase Sensor.TYPE_MAGNETIC_FIELD:\n\t\t\t\t{\n\t\t\t\t\tgeomagneticMatrix = se.values.clone();\n\t\t\t\t\tsensorReady = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t} \n\n\t\t\tif (geomagneticMatrix != null && accelerometerValues != null && sensorReady) \n\t\t\t{\n\t\t\t\tsensorReady = false;\n\n\t\t\t\tfloat[] R = new float[16];\n\t\t\t\tfloat[] I = new float[16];\n\n\t\t\t\tSensorManager.getRotationMatrix(R, I, accelerometerValues, geomagneticMatrix);\n\n\t\t\t\tfloat[] actual_orientation = new float[3];\n\t\t\t\tSensorManager.getOrientation(R, actual_orientation); // lastorientation filled with orientation in radiant\n\t\t\t\t\n\t\t\t\tdelta_orientation[0]= (delta_orientation[0] > actual_orientation[0]) ? (delta_orientation[0] - actual_orientation[0]) : (actual_orientation[0] - delta_orientation[0]);\n\t\t\t\tdelta_orientation[1]= (delta_orientation[1] > actual_orientation[1]) ? (delta_orientation[1] - actual_orientation[1]) : (actual_orientation[1] - delta_orientation[1]);\n\t\t\t\tdelta_orientation[2]= (delta_orientation[2] > actual_orientation[2]) ? (delta_orientation[2] - actual_orientation[2]) : (actual_orientation[2] - delta_orientation[2]);\n\n\t\t\t\tLog.i(TAG, \"acceleration with gravity x:\"+accelerometerValues[0]+\" y:\"+accelerometerValues[1]+\" z:\"+accelerometerValues[2]);\n\n\t\t\t\tnew ListenerThread(accelerometerValues,delta_orientation,context,gps).start();\n\n\t\t\t\tLog.i(TAG, \"orientation x:\"+delta_orientation[0]+\" y:\"+delta_orientation[1]+\" z:\"+delta_orientation[2]);\n\t\t\t\t//Toast.makeText(context, \"orientation x:\"+delta_orientation[0]+\" y:\"+delta_orientation[1]+\" z:\"+delta_orientation[2], Toast.LENGTH_SHORT).show();\n\t\t\t\t\n\t\t\t\tdelta_orientation = actual_orientation;\n\t\t\t}\n\t\t\teventIesim = 0;\n\t\t}\n\t\t\n\n\n\t}",
"public double getAngle2() {\n\n // We experimentally determined the Z axis is the axis we want to use for heading angle.\n // We have to process the angle because the imu works in euler angles so the Z axis is\n // returned as 0 to +180 or 0 to -180 rolling back to -179 or +179 when rotation passes\n // 180 degrees. We detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return (globalAngle);\n\n }",
"public int getDeviceRotation();",
"protected void initialize() {\n \tRobot.gyroSubsystem.reset();\n \tstartAngle = Robot.gyroSubsystem.gyroPosition();\n \ttargetAngle = startAngle + goal;\n }",
"public void function_yaw(int x, int y,int gyro){\n\n\n }",
"public double getAccelY() {\n return m_accelerometer.getY();\n }",
"public float calculateDeltaIdealHeading(double currentHeading, Vector2 target) {\r\n\t\t//first calculate the angle from here to the target\r\n\t\tdouble delta_x = target.x() - position.x();\r\n\t\tdouble delta_y = target.y() - position.y();\r\n\t\tdouble idealAngle = Math.toDegrees(Math.atan(delta_x / delta_y));\r\n\t\tdouble deltaAngle = idealAngle - currentHeading;\r\n\t\treturn (float)deltaAngle;\r\n\t}",
"@Override\n public void onSensorChanged(SensorEvent event) {\n mOrientation = event.values[0];\n }",
"public String getYaw()\n\t{\n\t\treturn yaw.getText();\n\t}",
"public double getRightJoystickHorizontal() {\n\t\treturn getRawAxis(RIGHT_STICK_HORIZONTAL);\n\t}"
]
| [
"0.8118042",
"0.8056666",
"0.7725817",
"0.7585154",
"0.73448396",
"0.70868134",
"0.70427847",
"0.6886599",
"0.6884681",
"0.6854208",
"0.68505687",
"0.6775642",
"0.67640924",
"0.67640924",
"0.67640924",
"0.6690107",
"0.6683682",
"0.665634",
"0.6627259",
"0.6596944",
"0.6596944",
"0.65726787",
"0.65361136",
"0.6535083",
"0.6523151",
"0.6488194",
"0.6488194",
"0.64701337",
"0.6440403",
"0.643988",
"0.6377447",
"0.6377335",
"0.63640976",
"0.63261425",
"0.63112706",
"0.6298307",
"0.62780446",
"0.6246576",
"0.6189201",
"0.61850065",
"0.61837506",
"0.6124502",
"0.61128145",
"0.61117387",
"0.6085584",
"0.6085028",
"0.6079169",
"0.60685676",
"0.60518",
"0.60518",
"0.6050162",
"0.60500544",
"0.60444087",
"0.60339093",
"0.6032448",
"0.6016372",
"0.60046095",
"0.5981153",
"0.59809357",
"0.59406114",
"0.59406114",
"0.59328467",
"0.59294677",
"0.5909275",
"0.5904996",
"0.5904996",
"0.5899949",
"0.5899949",
"0.58922356",
"0.588503",
"0.58848274",
"0.58518803",
"0.58501196",
"0.5849202",
"0.5845342",
"0.58282626",
"0.58236897",
"0.5779535",
"0.5755133",
"0.57510376",
"0.5746342",
"0.5745576",
"0.5735688",
"0.5735121",
"0.57323587",
"0.57314694",
"0.57241124",
"0.5721236",
"0.57191557",
"0.5719129",
"0.5717033",
"0.570908",
"0.5704612",
"0.5704052",
"0.5700032",
"0.56827146",
"0.5682575",
"0.5681611",
"0.56710017",
"0.566213"
]
| 0.78634834 | 2 |
/ Return heading diff for a given init heading | double getHeadingDiff(double init_h) {
double curr_h = getHeading();
double diff_h = init_h - curr_h;
if( diff_h>=360.0 ) diff_h -= 360.0;
else if( diff_h<=-360.0 ) diff_h += 360.0;
return diff_h ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"float getHeading();",
"float getHeading();",
"float getHeading();",
"public final native int getHeading() /*-{\n return this.getHeading() || 0;\n }-*/;",
"public int getHeading()\n\t{\n\t\treturn heading;\n\t}",
"public static double getHeading(double heading) {\n double newHeading;\n if (heading >=0.0 && heading < 90.0)\n newHeading = -1.0;\n else if (heading >= 90.0 && heading < 180.0)\n newHeading = -0.33;\n else if (heading >= 180.0 && heading < 270.0)\n newHeading = 0.33;\n else if (heading >= 270.0 && heading < 360.0)\n newHeading = 1.0;\n else\n newHeading = -1.0;\n return newHeading;\n }",
"public int heading() {\n\t\theading = heading + 5;\n\t\tif (heading >= 359) {\n\t\t\t//Setting the heading to 0\n\t\t\tsetHeading(0);\n\t\t}\n\t\t//Returning the heading\n\t\treturn heading;\n\t}",
"public Heading getHeading()\n {\n\treturn this.heading;\n }",
"public String getHeading() {\n return heading;\n }",
"public String getHeading() {\n return heading;\n }",
"double normalizeHeading(double h) {\n double nh = h;\n if( h>-180 && h<180 ) {\n } else if( h <= -180 ) {\n nh = h+360;\n } else if( h > 180 ) {\n nh = h-360;\n }\n return nh;\n }",
"private org.gwtbootstrap3.client.ui.Heading get_f_Heading18() {\n return build_f_Heading18();\n }",
"private static double calcHeading(double angleA, double angleB) { \n\t\t\n\t\tdouble heading;\n\t\t\n\t\tif (angleA < angleB){\n\t\t\theading = 45 - (angleA + angleB) /2 ;\n\t\t}else {\n\t\t\theading = 225 - (angleA + angleB) /2 ;\t\n\t\t}\n\t\treturn heading;\n\t}",
"public float getHeading() {\n return heading_;\n }",
"public float getHeading() {\n return heading_;\n }",
"public float getHeading() {\n return heading_;\n }",
"public float getHeading() {\n return heading_;\n }",
"private String collectHeading(Document doc) {\n String heading = doc.select(\"[class^=header1 style]\").first().text();\r\n\r\n return heading;\r\n }",
"private org.gwtbootstrap3.client.ui.Heading get_f_Heading30() {\n return build_f_Heading30();\n }",
"public float getHeading() {\n return heading_;\n }",
"public float getHeading() {\n return heading_;\n }",
"@JsProperty(name = \"heading\")\n public native double heading();",
"@Test\n\tpublic void h2_header_test() {\n\t\tString text = \"## heading2\";\n\t\tassertEquals(\"<html><h2>heading2</h2></html>\", createHTML(text));\n\t}",
"@Test\n\tpublic void h1_header_test() {\n\t\tString text = \"# heading1\";\n\t\tassertEquals(\"<html><h1>heading1</h1></html>\", createHTML(text));\n\t}",
"public double getRolledHeading() {\n double heading = 360.0 - getRawHeading();\n if (lastHeading < 100 && heading > 300) {\n rotationAmt--;\n } else if (heading < 100 && lastHeading > 300) {\n rotationAmt++;\n }\n lastHeading = heading;\n return heading + rotationAmt * 360.0;\n }",
"private float getHeading() {\n Orientation anglesA = robot.imu.getAngularOrientation(\n AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n return AngleUnit.DEGREES.normalize(\n AngleUnit.DEGREES.fromUnit(anglesA.angleUnit, anglesA.firstAngle));\n }",
"public void initHeading(Direction heading)\r\n\t{\r\n\t\tthis.currentDirection=heading;\r\n\t}",
"public double getError(double desiredHeading) {\n return desiredHeading - getHeading();\n }",
"public static void VerifyCommonComponent_2DIVs_H1(String renderingControl){\t\t\t\t\n\t\ttry{\n\t\t\tactualHeaderText=sitecoreObj.aboutusCommonComponent_2Divs_H1.isDisplayed();\n\t\t\tAssert.assertEquals(actualHeaderText, true);\n\t\t\tlog.info(\"The Actual AboutUs \" + renderingControl + \" Title - <\"+sitecoreObj.aboutusCommonComponent_2Divs_H1.getTagName()+\">\");\n\t\t\tlog.info(\"The Expected AboutUs \" + renderingControl + \" Title - <h1>\");\t\n\t\t\tlog.info(\"TEST PASSED: The Actual and Expected AboutUs \" + renderingControl + \" Title are Same\");\n\t\t}catch(AssertionError e){\n\t\t\tlog.error(\"The Actual AboutUs \" + renderingControl + \" Title - <\"+sitecoreObj.aboutusCommonComponent_2Divs_H1.getTagName()+\">\");\n\t\t\tlog.error(\"The Expected AboutUs \" + renderingControl + \" Title - <h1>\");\t\t\t\t\t\t\n\t\t\tlog.error(\"TEST FAILED: The Actual and Expected AboutUs \" + renderingControl + \" Title are NOT same\");\n\t\t}catch(org.openqa.selenium.NoSuchElementException e){\n\t\t\tlog.error(\"TEST FAILED: There is No Title On \" + renderingControl + \" element\");\n\t\t}\n\t}",
"private org.gwtbootstrap3.client.ui.Heading get_f_Heading50() {\n return build_f_Heading50();\n }",
"private org.gwtbootstrap3.client.ui.Heading get_f_Heading40() {\n return build_f_Heading40();\n }",
"double getHeading() {\n if( CACHE_IMU_READING && loop_cnt_==last_imu_read_loop_id_ ) {\n // return the existing heading when getHeading() is called in the same loop\n return heading_ ;\n }\n\n heading_ = 0;\n if( USE_IMU && imu_!=null && imu_init_ok_ ) {\n imu_angles_ = imu_.getAngularOrientation().toAxesReference(AxesReference.INTRINSIC).toAxesOrder(AxesOrder.ZYX); // acquiring angles are expensive, keep it minimal\n // IMU can automatically detect orientation, and return heading as first angle, 2020/01/25\n heading_ = AngleUnit.DEGREES.normalize(imu_angles_.firstAngle);\n last_imu_read_loop_id_ = loop_cnt_;\n } else if( USE_IMU2 && imu2_!=null && imu2_init_ok_ ) {\n // use IMU2 if IMU failed\n imu2_angles_ = imu2_.getAngularOrientation().toAxesReference(AxesReference.INTRINSIC).toAxesOrder(AxesOrder.ZYX);\n heading_ = AngleUnit.DEGREES.normalize(imu2_angles_.firstAngle);\n last_imu_read_loop_id_ = loop_cnt_;\n }\n return heading_;\n }",
"private void makeHeaderAndIntroTexts()\r\n\t{\r\n\t\t// Header\r\n\t\tTextProperties headerProps = new TextProperties();\r\n\t\theaderProps.set(AnimationPropertiesKeys.FONT_PROPERTY, new Font(Font.SANS_SERIF, Font.BOLD, 25));\r\n\t\theader = lang.newText(new Coordinates(20, 30), ALGORITHM_NAME, \"header\", null, headerProps);\r\n\t\t\r\n\t // Intro texts\r\n\t TextProperties introProperties = new TextProperties();\r\n\t introProperties.set(AnimationPropertiesKeys.FONT_PROPERTY, new Font(Font.SANS_SERIF, Font.PLAIN, 20));\r\n\t \r\n\t RectProperties rectProps = new RectProperties();\r\n\t rectProps.set(AnimationPropertiesKeys.FILLED_PROPERTY, true);\r\n\t rectProps.set(AnimationPropertiesKeys.FILL_PROPERTY, Color.WHITE);\r\n\t rectProps.set(AnimationPropertiesKeys.DEPTH_PROPERTY, 2);\r\n\t @SuppressWarnings(\"unused\")\r\n\t\tRect hRect = lang.newRect(new Offset(-5, -5, \"header\", AnimalScript.DIRECTION_NW), new Offset(5, 5, \"header\", AnimalScript.DIRECTION_SE), \"hRect\", null, rectProps);\r\n\t \r\n\t String intro1Text = \"- Connects all points within linking length into one group\";\r\n\t String intro2Text = \"- Goes through 1-3 iterations. Each with a smaller linking length and a different color\";\r\n\t String intro3Text = \"- To aid understanding, the linking length will be visualized with a circle around the current point\";\r\n\t String searchText = useKDTreeToSearch ? \"KDTree for Nearest Neighbour Search [O(2N^0.5) in 2D per search]\" : \"Linear Search for Nearest Neighbour Search [O(2N) in 2D per search]\";\r\n\t String using = \"Using:\";\r\n\t \r\n\t intro1 = lang.newText(new Offset(0, 10, \"header\", AnimalScript.DIRECTION_SW), intro1Text, \"intro1\", null, introProperties);\r\n\t intro2 = lang.newText(new Offset(0, 0, \"intro1\", AnimalScript.DIRECTION_SW), intro2Text, \"intro2\", null, introProperties);\r\n\t intro3 = lang.newText(new Offset(0, 0, \"intro2\", AnimalScript.DIRECTION_SW), intro3Text, \"intro3\", null, introProperties);\r\n\t \r\n\t usingIntro = lang.newText(new Offset(0, 30, \"intro3\", AnimalScript.DIRECTION_SW), using, \"usingIntro\", null, introProperties);\r\n\t intro4 = lang.newText(new Offset(10, 0, \"usingIntro\", AnimalScript.DIRECTION_SW), \"Linking length = \"+distance, \"intro4\", null, introProperties);\r\n\t intro5 = lang.newText(new Offset(0, 0, \"intro4\", AnimalScript.DIRECTION_SW), searchText, \"intro5\", null, introProperties);\r\n\t intro6 = lang.newText(new Offset(0, 0, \"intro5\", AnimalScript.DIRECTION_SW), \"Size: \"+width+\" x \"+height+\" with ~\"+amountOfStars+\" points\", \"intro6\", null, introProperties);\r\n\t intro7 = lang.newText(new Offset(0, 0, \"intro6\", AnimalScript.DIRECTION_SW), \"Showing \"+amountOfStepsShown+\" steps in first iteration, half of that afterwards\", \"intro7\", null, introProperties);\r\n\t intro8 = lang.newText(new Offset(0, 0, \"intro7\", AnimalScript.DIRECTION_SW), \"Iterations: \"+amountOfIterations, \"intro8\", null, introProperties);\r\n\t}",
"public Heading() {\n\t\tthis(MIN);\n\t}",
"public double getHeading() {\n return imu.getAngularOrientation().firstAngle;\n }",
"double getStartH();",
"public static String header(int homework, String homeworkDescription, \n double project, String projectDescription, String lastModified)\n {\n String temp = \"\";\n temp += getHorizontalLine(SYMBOL, LINE_LENGTH) + \"\\n\";\n temp += authorLine();\n temp += courseLine();\n temp += timeLine();\n temp += homeworkLine(homework, homeworkDescription);\n temp += projectLine(project, projectDescription);\n temp += lastModifiedLine(lastModified);\n temp += getHorizontalLine(SYMBOL, LINE_LENGTH);\n return temp;\n }",
"boolean hasHeading();",
"boolean hasHeading();",
"boolean hasHeading();",
"@Test\n\tpublic void h1_header_bold_test() {\n\t\tString text = \"# **heading1**\";\n\t\tassertEquals(\"<html><h1><strong>heading1</strong></h1></html>\", createHTML(text));\n\t}",
"private org.gwtbootstrap3.client.ui.Heading get_f_Heading6() {\n return build_f_Heading6();\n }",
"public Heading(Double compassHeading) {\n\t\tthis.compassHeading = compassHeading;\n\t}",
"public double calculateHeadingRadians(){\r\n if(coordinateHistory.size() > 2){\r\n GPSCoordinate firstPoint = coordinateHistory.get(coordinateHistory.size() - 2);\r\n GPSCoordinate secondPoint = coordinateHistory.get(coordinateHistory.size() - 1);\r\n \r\n if(!firstPoint.compareTo(secondPoint)){\r\n double latA = firstPoint.getLatitude();\r\n double longA = firstPoint.getLongitude();\r\n double latB = secondPoint.getLatitude();\r\n double longB = secondPoint.getLongitude();\r\n\r\n double X = Math.cos(latB) * Math.sin(longB - longA);\r\n double Y = (Math.cos(latA) * Math.sin(latB)) - (Math.sin(latA) * Math.cos(latB) * Math.cos(longB - longA));\r\n\r\n headingRadians = - Math.atan2(X, Y);\r\n return headingRadians;\r\n }else{\r\n return headingRadians;\r\n }\r\n }else{\r\n return headingRadians;\r\n }\r\n }",
"@Test\n\tpublic void h2_header_bold_test() {\n\t\tString text = \"## **heading2**\";\n\t\tassertEquals(\"<html><h2><strong>heading2</strong></h2></html>\", createHTML(text));\n\t}",
"public void setHeading(String heading) {\n this.heading = heading;\n }",
"public float getInterpolatedHeading (float u) {\r\n\r\n float newHeading;\r\n \r\n // if linear interpolation\r\n if (this.linear == 1) {\r\n\r\n newHeading = keyFrame[1].heading + \r\n ((keyFrame[2].heading - keyFrame[1].heading) * u);\r\n } else {\r\n\r\n newHeading = h0 + u * (h1 + u * (h2 + u * h3));\r\n\r\n }\r\n\r\n return newHeading;\r\n }",
"public static String header(int homework, double project, String lastModified)\n {\n String temp = \"\";\n temp += getHorizontalLine(SYMBOL, LINE_LENGTH) + \"\\n\";\n temp += authorLine();\n temp += courseLine();\n temp += timeLine();\n temp += homeworkLine(homework);\n temp += projectLine(project);\n temp += lastModifiedLine(lastModified);\n temp += getHorizontalLine(SYMBOL, LINE_LENGTH);\n return temp;\n }",
"public static void VerifyHeaderItem_CommonComponent_Div_H2(String renderingControl){\t\t\t\t\n\t\ttry{\n\t\t\tactualHeaderText=sitecoreObj.aboutusHeaderItemTitleRightTop.isDisplayed();\n\t\t\tAssert.assertEquals(actualHeaderText, true);\n\t\t\tlog.info(\"The Actual AboutUs \" + renderingControl + \" Title - <\"+sitecoreObj.aboutusHeaderItemTitleRightTop.getTagName()+\">\");\n\t\t\tlog.info(\"The Expected AboutUs \" + renderingControl + \" Title - <h1>\");\t\n\t\t\tlog.info(\"TEST PASSED: The Actual and Expected AboutUs \" + renderingControl + \" Title are Same\");\n\t\t}catch(AssertionError e){\n\t\t\tlog.error(\"The Actual AboutUs \" + renderingControl + \" Title - <\"+sitecoreObj.aboutusHeaderItemTitleRightTop.getTagName()+\">\");\n\t\t\tlog.error(\"The Expected AboutUs \" + renderingControl + \" Title - <h1>\");\t\t\t\t\t\t\n\t\t\tlog.error(\"TEST FAILED: The Actual and Expected AboutUs \" + renderingControl + \" Title are NOT same\");\n\t\t}catch(org.openqa.selenium.NoSuchElementException e){\n\t\t\tlog.error(\"TEST FAILED: There is No Title On \" + renderingControl + \" element\");\n\t\t}\n\t}",
"public int setHeading(int i) {\n\t\theading = i;\n\t\t//Returning the heading\n\t\treturn heading;\n\t}",
"private static Heading parse(String record) {\n\t\tString[] parts = record.split(\" \", 2);\n\t\tint weight = Integer.parseInt(parts[0].substring(1));\n\t\tHeading heading = new Heading(weight, parts[1].trim());\n\t\treturn heading;\n\t}",
"private org.gwtbootstrap3.client.ui.Heading get_f_Heading77() {\n return build_f_Heading77();\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 }",
"private void initializeAnimalHeader() {\r\n\t\t//initialize text\r\n\t\tTextProperties textProps = new TextProperties();\r\n\t\ttextProps.set(AnimationPropertiesKeys.FONT_PROPERTY, new Font(\"SansSerif\", Font.BOLD, 24));\r\n\t\ttextProps.set(AnimationPropertiesKeys.DEPTH_PROPERTY, 1);\r\n\t\tlang.newText(new Coordinates(20, 30), \"ShiftRows\", \"header\", null, textProps);\r\n\t\t//initialize rectangle\r\n\t\tRectProperties hRectProps = new RectProperties();\r\n\t\thRectProps.set(AnimationPropertiesKeys.DEPTH_PROPERTY, 2);\r\n\t\tlang.newRect(new Offset(-5, -5, \"header\", AnimalScript.DIRECTION_NW), new Offset(5, 5, \"header\", AnimalScript.DIRECTION_SE), \"hRect\", null, hRectProps);\r\n\t}",
"public String getDiff() {\n return this.diff;\n }",
"double getHorDist(double initial_hor_vel, double time)\n {\n ux = initial_hor_vel;\n t = time;\n x = ux*t;\n return x;\n }",
"@Test\n\tpublic void h1_header_italic_test() {\n\t\tString text = \"# *heading1*\";\n\t\tassertEquals(\"<html><h1><em>heading1</em></h1></html>\", createHTML(text));\n\t}",
"public String getDiff() {\n this.tanDiff();\n return this.tandiff;\n }",
"void heading(JavaScriptObject source, JavaScriptObject error, JavaScriptObject code, JavaScriptObject type, JavaScriptObject success, JavaScriptObject heading);",
"public SSLHeadingWidgetComponent getHeading(final SessionContext ctx)\r\n\t{\r\n\t\treturn (SSLHeadingWidgetComponent)getProperty( ctx, HEADING);\r\n\t}",
"public void changeHeading(int newHeading)\n\t{\n\t\theading = newHeading;\n\t}",
"public static String getHeadSection(Configuration c){\n String head = \"<div class=\\\"head\\\">\\n\";\n if(c.getTitle()!=null &&!\"\".equals(c.getTitle()))\n head+=\"<h1 property=\\\"dc:title schema:name\\\">\"+c.getTitle()+\"</h1>\\n\";\n if(c.getReleaseDate()!=null && !\"\".equals(c.getReleaseDate()))\n head+=\"<span property=\\\"dc:modified schema:dateModified\\\" content=\\\"\"+c.getReleaseDate()+\"\\\"></span>\\n\"+\n \"<h2>Release \"+c.getReleaseDate()+\"</h2>\\n\";\n if(c.getThisVersion()!=null && !\"\".equals(c.getThisVersion()))\n head+=\"<dl>\\n\"+\n \"<dt>This version:</dt>\\n\"+\n \"<dd><a href=\\\"\"+c.getThisVersion()+\"\\\">\"+c.getThisVersion()+\"</a></dd>\\n\"+\n \"</dl>\";\n if(c.getLatestVersion()!=null && !\"\".equals(c.getLatestVersion()))\n head+=\"<dl><dt>Latest version:</dt>\\n\"+\n \"<dd><a href=\\\"\"+c.getLatestVersion()+\"\\\">\"+c.getLatestVersion()+\"</a></dd>\\n\"+\n \"</dl>\";\n if(c.getPreviousVersion()!=null && !\"\".equals(c.getPreviousVersion()))\n head+= \"<dl>\\n\"+\n \"<dt>Previous version:</dt>\\n\"+\n \"<dd><a property=\\\"schema:significantLink prov:wasRevisionOf\\\" href=\\\"\"+c.getPreviousVersion()+\"\\\">\"+c.getPreviousVersion()+\"</a></dd>\\n\"+\n \"</dl>\\n\";\n if(c.getRevision()!=null && !\"\".equals(c.getRevision()))\n head +=\"<dt>Revision</dt>\\n\"+\n \"<dd property=\\\"schema:version\\\">\"+c.getRevision()+\"</dd>\\n\";\n if(!c.getCreators().isEmpty())\n head += getAuthors(c.getCreators())+\"\\n\";\n if(!c.getContributors().isEmpty())\n head += getContributors(c.getContributors())+\"\\n\";\n if(!c.getImportedOntologies().isEmpty())\n head += getImports(c.getImportedOntologies())+\"\\n\";\n if(!c.getExtendedOntologies().isEmpty())\n head += getExtends(c.getExtendedOntologies())+\"\\n\";\n \n if(c.getLicense()!=null){\n String licenseName = c.getLicense().getName();//\"license name goes here\";\n String licenseURL = c.getLicense().getUrl();//\"http://insertlicenseURIhere.org\";\n if(licenseURL == null || \"\".equals(licenseURL))licenseURL = \"http://insertlicenseURIhere.org\";\n if(licenseName == null || \"\".equals(licenseName)) licenseName = \"license name goes here\";\n if(c.getLicense().getIcon()!=null && !\"\".equals(c.getLicense().getIcon())){\n head+=\"<a property=\\\"dc:rights\\\" href=\\\"\"+licenseURL+\"\\\" rel=\\\"license\\\">\\n\" +\n \"<img src=\\\"\"+c.getLicense().getIcon()+\"\\\" style=\\\"border-width:0\\\" alt=\\\"License\\\"></img>\\n\" +\n \"</a>\\n<br/>\";\n }\n head+=\"<dl>This work is licensed under a <a rel=\\\"license\\\" href=\\\"\"+licenseURL+\"\\\">\"+licenseName+\"</a>.</dl>\\n\"+\n \"<span property=\\\"dc:license\\\" resource=\\\"\"+licenseURL+\"\\\"></span>\\n\";\n }\n head+= \"<hr/>\\n\"+\n \"</div>\\n\";\n return head;\n }",
"double readImu2Heading() {\n double h = -360.0;\n if( USE_IMU2 && imu2_!=null && imu2_init_ok_ ) {\n h = imu2_.getAngularOrientation().firstAngle;\n }\n return h;\n }",
"@Test\n\tpublic void h2_header_italic_test() {\n\t\tString text = \"## *heading2*\";\n\t\tassertEquals(\"<html><h2><em>heading2</em></h2></html>\", createHTML(text));\n\t}",
"public void extractTableheadings()\n\n\t{\n\t\topen();\n\n\t\tList<String> headings= inTable(table).getHeadings();\n\t\tfor(String h:headings)\n\t\t\tSystem.out.println(h);\n\n\t}",
"public void autonZeroHeading() {\n \tString direction = SmartDashboard.getString(\"Calibration_Orientation\", \"North\");\n \tswitch (direction) {\n \t\tdefault: zeroHeading();\n \t\t\tbreak;\n \t\tcase \"North\": zeroHeading(0.0);\n \t\t\tbreak;\n \t\tcase \"South\": zeroHeading(180.0);\n \t\t\tbreak;\n \t\tcase \"East\": zeroHeading(-90.0);\n \t\t\tbreak;\n \t\tcase \"West\": zeroHeading(90.0);\n \t\t\tbreak;\n \t\tcase \"-135\" : zeroHeading(135.0);\n \t\t\tbreak;\n \t}\n }",
"private void initRowHeaders() {\n TableColumn aColumn = jTable1.getColumnModel().getColumn(0);\n TableCellRenderer aRenderer = jTable1.getTableHeader().getDefaultRenderer();\n if (aRenderer == null) {\n System.out.println(\" Aouch !\");\n aColumn = jTable1.getColumnModel().getColumn(0);\n aRenderer = aColumn.getHeaderRenderer();\n if (aRenderer == null) {\n System.out.println(\" Aouch Aouch !\");\n // System.exit(3);\n exitForm(null);\n }\n }\n Component aComponent = aRenderer.getTableCellRendererComponent(jTable1, aColumn.getHeaderValue(), false, false, -1, 0);\n aFont = aComponent.getFont();\n aBackground = aComponent.getBackground();\n aForeground = aComponent.getForeground();\n\n border = (Border) UIManager.getDefaults().get(\"TableHeader.cellBorder\");\n insets = border.getBorderInsets(jTable1.getTableHeader());\n metrics = jTable1.getFontMetrics(aFont);\n }",
"private void setNPCInitialHeading()\n {\n float alpha = (float) (Math.PI/2 - Math.atan2(end.getZ()-begin.getZ(), end.getX()-begin.getX()));\n npc.setAngle(alpha);\n npc.setSpeed(NPC.walkSpeed);//this automatically sets the \"walk\" anim so no need for this line:\n //npc.setAnimation(\"walk\");\n npc.setHeadingUpdateTime();\n }",
"private void updateDateHeading(Calendar startDate) {\r\n TextView textViewDateHeading = findViewById(R.id.tv_current_heading);\r\n\r\n String dateHeading = \"\";\r\n SimpleDateFormat dateFormat;\r\n\r\n // Check if endDate is today, so either today or this week is displayed\r\n Calendar today = Calendar.getInstance();\r\n if((endDate.get(Calendar.DAY_OF_YEAR) == today.get(Calendar.DAY_OF_YEAR))\r\n && (endDate.get(Calendar.YEAR) == today.get(Calendar.YEAR))) {\r\n if(dataType.equals(\"NON-SED\")) {\r\n dateHeading = getString(R.string.day_heading_today);\r\n } else {\r\n dateHeading = getString(R.string.week_heading_this_week);\r\n }\r\n } else { // not today or this week\r\n if(dataType.equals(\"NON-SED\")) {\r\n dateFormat = new SimpleDateFormat(getString(R.string.day_heading_date_format));\r\n dateHeading = dateFormat.format(endDate.getTime());\r\n } else {\r\n dateFormat = new SimpleDateFormat(getString(R.string.week_heading_date_format));\r\n dateHeading = getString(R.string.week_heading_with_dates,\r\n dateFormat.format(startDate.getTime()),\r\n dateFormat.format(endDate.getTime()));\r\n }\r\n }\r\n\r\n textViewDateHeading.setText(dateHeading);\r\n }",
"public static void VerifyHeaderItem_CommonComponent_Div_Div2_H2(String renderingControl){\n\t\ttry{\n\t\t\tactualTitleImg=sitecoreObj.aboutusCommonComponent_Div_Div2_H2.isDisplayed();\n\t\t\tAssert.assertEquals(actualTitleImg, true);\n\t\t\tlog.info(\"The Actual AboutUs \" + renderingControl + \" Title - <\"+sitecoreObj.aboutusCommonComponent_Div_Div2_H2.getTagName()+\">\");\n\t\t\tlog.info(\"The Expected AboutUs \" + renderingControl + \" Title - <h1>\");\n\t\t\tlog.info(\"TEST PASSED: The Actual and Expected AboutUs \" + renderingControl + \" Title are Same\");\n\t\t}catch(AssertionError e){\n\t\t\tlog.error(\"The Actual AboutUs \" + renderingControl + \" Title - \"+sitecoreObj.aboutusCommonComponent_Div_Div2_H2.getTagName());\n\t\t\tlog.error(\"The Expected AboutUs \" + renderingControl + \" Title - <h1>\");\n\t\t\tlog.error(\"TEST FAILED: The Actual and Expected AboutUs \" + renderingControl + \" Title are NOT same\");\n\t\t}catch(org.openqa.selenium.NoSuchElementException e){\n\t\t\tlog.error(\"TEST FAILED: There is No Title On \" + renderingControl + \" element\");\n\t\t}\t\t\t\t\n\t}",
"public SSLHeadingWidgetComponent getHeading()\r\n\t{\r\n\t\treturn getHeading( getSession().getSessionContext() );\r\n\t}",
"float getSectionHeaderHeight(int section);",
"private int parseHead(String s) \r\n\t{\r\n\t\tString[] parts = LineBase.getParts(LineBase.toWhiteSpaced(this.strLineBase), \"=\");\r\n\t\treturn Integer.parseInt(parts[1]);\r\n\t}",
"@Test\n void generateCorrectBalanceSheetHeader() {\n assertEquals(\"2017\",\n datesHelper.generateBalanceSheetHeading(\"2016-01-01\", \"2017-01-14\", false));\n\n // Test 381 days shows month (more than 12 month period)\n assertEquals(\"13 months to 16 February 2016\",\n datesHelper.generateBalanceSheetHeading(\"2015-02-01\", \"2016-02-16\", false));\n\n // Test 349 days shows month (less than 12 month period)\n assertEquals(\"11 months to 1 January 2017\",\n datesHelper.generateBalanceSheetHeading(\"2016-01-19\", \"2017-01-01\", false));\n\n // Test exactly 381 days shows months leap year\n assertEquals(\"13 months to 16 February 2015\",\n datesHelper.generateBalanceSheetHeading(\"2014-02-01\", \"2015-02-16\", false));\n \n // Test 336 days shows 'month' rather than 'months'\n assertEquals(\"1 month to 1 April 2015\",\n datesHelper.generateBalanceSheetHeading(\"2015-03-07\", \"2015-04-01\", false));\n\n // \"Test exactly 351 days show yyyy\"\n assertEquals(\"2015\",\n datesHelper.generateBalanceSheetHeading(\"2014-04-01\", \"2015-03-16\", false));\n \n // Test exactly 351 days show years leap year\n assertEquals(\"2016\",\n datesHelper.generateBalanceSheetHeading(\"2015-04-01\", \"2016-03-16\", false));\n\n // Test 1st year filing within 15 days either side of 1 year period with same\n // year is just year\n assertEquals(\"30 June 2015\",\n datesHelper.generateBalanceSheetHeading(\"2014-06-01\", \"2015-06-30\", true));\n\n }",
"public String getHomeH(String team) {\n\n String homeH;\n // if the game status is preview or postponed\n if (getGameStatus(team).equals(\"Preview\") || getGameStatus(team).equals(\"Postponed\")) {\n homeH = \"\";\n }\n else {\n homeH = getLineScore(team, \"linescore\",\"h\", \"home\");\n }\n\n return homeH;\n }",
"double readImuHeading() {\n double h = -360.0;\n if( USE_IMU && imu_!=null && imu_init_ok_ ) {\n h = imu_.getAngularOrientation().firstAngle;\n }\n return h;\n }",
"public Double getCompassHeading() {\n\t\treturn compassHeading;\n\t}",
"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}",
"private static void printHeading(){\n\t\tSystem.out.println(\"Your Name\");\n\t\tSystem.out.println(\"Course name and semester\");\n\t\tSystem.out.println(\"Programming Project 1\");\n\t\tSystem.out.println(\"Your Name in Code\");\n\t\tSystem.out.println();\n\n\t}",
"public double getHeadingInDegrees(){\r\n double headingRadians = calculateHeadingRadians();\r\n return headingRadians * 180 / Math.PI;\r\n }",
"public Direction getCurrentHeading()\r\n\t{\r\n\t\treturn this.currentDirection;\r\n\t\t\r\n\t}",
"public List getHeadings() \n {\n return headings;\n }",
"public double getH();",
"public float calculateDeltaIdealHeading(double currentHeading, Vector2 target) {\r\n\t\t//first calculate the angle from here to the target\r\n\t\tdouble delta_x = target.x() - position.x();\r\n\t\tdouble delta_y = target.y() - position.y();\r\n\t\tdouble idealAngle = Math.toDegrees(Math.atan(delta_x / delta_y));\r\n\t\tdouble deltaAngle = idealAngle - currentHeading;\r\n\t\treturn (float)deltaAngle;\r\n\t}",
"String makeHeader() {\n StringBuilder ans = new StringBuilder(\" \"); // README shows two spaces at\n String sep=\"\"; //start with nothing to separate, then switch to | to separate\n for (int i = 0; i < toDisplay.getWidth(); i++) {\n ans.append(sep);\n ans.append(i);\n sep = \"|\";\n }\n ans.append(\"\\n\");\n return ans.toString();\n }",
"public void assertStaffPageHeading() {\n waitForElement(xpathHeading);\n String actualHeading = assertAndGetText(xpathHeading);\n logger.info(\"# Staff page header: \" + actualHeading);\n assertEquals(actualHeading, HEADING,\n \"Actual heading '\" + actualHeading + \"' should be same as expected heading '\" + HEADING\n + \"'.\");\n }",
"public Rotation2d getHeading() {\n return Rotation2d.fromDegrees(Math.IEEEremainder(gyro.getAngle(), 360) * (Const.kGyroReversed ? -1.0 : 1.0));\n }",
"public float calculateIdealHeading(double currentHeading, Vector2 target) {\n\t\tdouble delta_x = target.x() - position.x();\r\n\t\tdouble delta_y = target.y() - position.y();\r\n\t\tdouble idealAngle = Math.toDegrees(Math.atan(delta_x / delta_y));\r\n\t\treturn (float)idealAngle;\r\n\t}",
"@Test\n public void validHeaderTest(){\n //test for a complete header with some missing values\n Header h;\n SimpleReader sr = new SimpleReader();\n String fileForLexer = sr.FileToString(\"sample_abc/piece1.abc\");\n abcLexer lex = new abcLexer(fileForLexer);\n abcParser parser = new abcParser(lex);\n h=parser.parseHeader();\n assertEquals(h.getIndex(),\"1\");\n assertEquals(h.getTitle(),\"PieceNo.1\");\n assertEquals(h.getComposer(),\"Unknown\");//uses a default value\n assertEquals(h.getIndex(),\"1\");\n assertEquals(h.getMeter(),\"4/4\");\n assertEquals(h.getNoteLength(),\"1/4\");\n assertEquals(h.getTempo(),\"140\");\n assertEquals(h.getKey(),\"C\");\n }",
"double getEndH();",
"public static void VerifyCommonComponent_2DIVs_H2(String renderingControl){\t\t\t\t\n\t\ttry{\n\t\t\tactualHeaderText=sitecoreObj.aboutusCommonComponent_2Divs_H2.isDisplayed();\n\t\t\tAssert.assertEquals(actualHeaderText, true);\n\t\t\tlog.info(\"The Actual AboutUs \" + renderingControl + \" Title - <\"+sitecoreObj.aboutusCommonComponent_2Divs_H2.getTagName()+\">\");\n\t\t\tlog.info(\"The Expected AboutUs \" + renderingControl + \" Title - <h2>\");\t\n\t\t\tlog.info(\"TEST PASSED: The Actual and Expected AboutUs \" + renderingControl + \" Title are Same\");\n\t\t}catch(AssertionError e){\n\t\t\tlog.error(\"The Actual AboutUs \" + renderingControl + \" Title - <\"+sitecoreObj.aboutusCommonComponent_2Divs_H2.getTagName()+\">\");\n\t\t\tlog.error(\"The Expected AboutUs \" + renderingControl + \" Title - <h2>\");\t\t\t\t\t\t\n\t\t\tlog.error(\"TEST FAILED: The Actual and Expected AboutUs \" + renderingControl + \" Title are NOT same\");\n\t\t}catch(org.openqa.selenium.NoSuchElementException e){\n\t\t\tlog.error(\"TEST FAILED: There is No Title On \" + renderingControl + \" element\");\n\t\t}\n\t}",
"public String get_setupdefine_HelpMenu_HdrText() {\r\n\t\tWebElement setupdefine_HelpMenu = driver.findElementByAccessibilityId(\"helpHeader\");\r\n\t\treturn FetchText(setupdefine_HelpMenu);\r\n\t}",
"public void visitHeading(XmlContainerElement x) {\n\t\tAssert.require(x.getName().equals(\"text:h\"), \n\t\t\"Visiting wrong node...\");\n\t\tint ilevel = 1;\n\t\tif (x.attributes.has(\"text:level\")) {\n\t\t\tilevel = Integer.parseInt(x.attributes.at(\"text:level\"));\n\t\t\tisHeading = true;\n\t\t} else {\n\t\t\tSystem.err.println(\"Error: Heading without level!!\");\n\t\t}\n\t\t\n\t\tx.visitChildren(this);\t\t\n\t\tisHeading = false;\n\t\tHeadingList.add(new Headings( sContent, ilevel ));\n\t}",
"protected void adaptHeaderTable(TableLayout dialogTable){\n\t\t// get localized headline string\n\t\tfinal String HEADLINE_STRING = getResources().getString(R.string.headline);\n\t\tint amountRows = dialogTable.getChildCount()-1;\n\t\tfor(int i=1; i<amountRows+1; i++){\n\t\t\tString otherString = ((EditText) ((TableRow) dialogTable.getChildAt(i)).getChildAt(1)).getText().toString();\n\t\t\tTextView textToChange = ((TextView) ((TableRow) targetFragment.headerTable.getChildAt(0)).getChildAt(i-1));\n\t\t\tif(otherString.isEmpty()) {\n\t\t\t\totherString = HEADLINE_STRING+\" \"+String.valueOf(i);\n\t\t\t}\n\t\t\ttextToChange.setText(otherString);\n\t\t}\n\t}",
"public TempTableHeader getHeader1() { return header1; }",
"@Override\n public float getH() {\n return h + font.getSize() + border.getH();\n }",
"@Test\n public void voicesAndvarMeterHeaderTest(){\n Header h;\n SimpleReader sr = new SimpleReader();\n String fileForLexer = sr.FileToString(\"sample_abc/invention.abc\");\n abcLexer lex = new abcLexer(fileForLexer);\n abcParser parser = new abcParser(lex);\n h=parser.parseHeader();\n assertEquals(h.getMeter(),\"4/4\");// this will test for M:C\n ArrayList<String> voice = new ArrayList<String>();\n voice.add(\"V:1\");\n voice.add(\"V:2\");\n assertEquals(h.getVoice(),voice);\n }",
"public abstract boolean isFirstLineHeader();",
"@Override\n public void setHeading(String heading) {\n }",
"protected String elaboraHead() {\n String testo = VUOTA;\n String testoIncluso = VUOTA;\n\n // Avviso visibile solo in modifica\n testo += elaboraAvvisoScrittura();\n\n // Posiziona il TOC\n testoIncluso += elaboraTOC();\n\n // Posiziona il ritorno\n testoIncluso += elaboraRitorno();\n\n // Posizione il template di avviso\n testoIncluso += elaboraTemplateAvviso();\n\n // Ritorno ed avviso vanno (eventualmente) protetti con 'include'\n testo += elaboraInclude(testoIncluso);\n\n // Posiziona l'incipit della pagina\n testo += A_CAPO;\n testo += elaboraIncipit();\n\n // valore di ritorno\n return testo;\n }"
]
| [
"0.6426794",
"0.6426794",
"0.6426794",
"0.5945456",
"0.5934131",
"0.5909542",
"0.58892274",
"0.579159",
"0.5788811",
"0.5788811",
"0.5760367",
"0.5683863",
"0.56203973",
"0.55912095",
"0.55912095",
"0.5570031",
"0.5533982",
"0.5515077",
"0.551026",
"0.54646087",
"0.54646087",
"0.54608846",
"0.5438978",
"0.54192686",
"0.53786325",
"0.5364458",
"0.5341374",
"0.5334012",
"0.5296897",
"0.52903306",
"0.5278881",
"0.5258371",
"0.5238091",
"0.5229757",
"0.52175117",
"0.5204971",
"0.5203788",
"0.5198455",
"0.5198455",
"0.5198455",
"0.5197882",
"0.5176059",
"0.5159569",
"0.515586",
"0.51512396",
"0.51482016",
"0.5142945",
"0.5124675",
"0.5115463",
"0.51134557",
"0.5113167",
"0.5107467",
"0.5079938",
"0.5046925",
"0.5026749",
"0.50129145",
"0.50121367",
"0.5011387",
"0.49500868",
"0.49303314",
"0.49145755",
"0.4913388",
"0.491138",
"0.48384055",
"0.48320112",
"0.4830789",
"0.4827381",
"0.4813104",
"0.4813002",
"0.4802414",
"0.47954053",
"0.47903302",
"0.47880617",
"0.47716275",
"0.4769425",
"0.47692192",
"0.47664505",
"0.4765116",
"0.47639805",
"0.47586197",
"0.4745434",
"0.4733011",
"0.47295004",
"0.4728595",
"0.47224557",
"0.47203785",
"0.4715494",
"0.47112855",
"0.4696473",
"0.4682383",
"0.46821862",
"0.46799827",
"0.46609813",
"0.4658906",
"0.4655042",
"0.4651168",
"0.46461207",
"0.46433103",
"0.4638093",
"0.46334842"
]
| 0.7880651 | 0 |
/ Gets the heading from REV IMU/IMU2 | double readImuHeading() {
double h = -360.0;
if( USE_IMU && imu_!=null && imu_init_ok_ ) {
h = imu_.getAngularOrientation().firstAngle;
}
return h;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"double readImu2Heading() {\n double h = -360.0;\n if( USE_IMU2 && imu2_!=null && imu2_init_ok_ ) {\n h = imu2_.getAngularOrientation().firstAngle;\n }\n return h;\n }",
"float getHeading();",
"float getHeading();",
"float getHeading();",
"double getHeading() {\n if( CACHE_IMU_READING && loop_cnt_==last_imu_read_loop_id_ ) {\n // return the existing heading when getHeading() is called in the same loop\n return heading_ ;\n }\n\n heading_ = 0;\n if( USE_IMU && imu_!=null && imu_init_ok_ ) {\n imu_angles_ = imu_.getAngularOrientation().toAxesReference(AxesReference.INTRINSIC).toAxesOrder(AxesOrder.ZYX); // acquiring angles are expensive, keep it minimal\n // IMU can automatically detect orientation, and return heading as first angle, 2020/01/25\n heading_ = AngleUnit.DEGREES.normalize(imu_angles_.firstAngle);\n last_imu_read_loop_id_ = loop_cnt_;\n } else if( USE_IMU2 && imu2_!=null && imu2_init_ok_ ) {\n // use IMU2 if IMU failed\n imu2_angles_ = imu2_.getAngularOrientation().toAxesReference(AxesReference.INTRINSIC).toAxesOrder(AxesOrder.ZYX);\n heading_ = AngleUnit.DEGREES.normalize(imu2_angles_.firstAngle);\n last_imu_read_loop_id_ = loop_cnt_;\n }\n return heading_;\n }",
"public int getHeading()\n\t{\n\t\treturn heading;\n\t}",
"public String getHeading() {\n return heading;\n }",
"public String getHeading() {\n return heading;\n }",
"private String collectHeading(Document doc) {\n String heading = doc.select(\"[class^=header1 style]\").first().text();\r\n\r\n return heading;\r\n }",
"public final native int getHeading() /*-{\n return this.getHeading() || 0;\n }-*/;",
"public double getHeading() {\n return imu.getAngularOrientation().firstAngle;\n }",
"SmilHead getHead();",
"public static String getHeader() {\n return \"S I R\";\n }",
"public Heading getHeading()\n {\n\treturn this.heading;\n }",
"public IMobileSMTitle getTitle();",
"public int heading() {\n\t\theading = heading + 5;\n\t\tif (heading >= 359) {\n\t\t\t//Setting the heading to 0\n\t\t\tsetHeading(0);\n\t\t}\n\t\t//Returning the heading\n\t\treturn heading;\n\t}",
"public float getHeading() {\n return heading_;\n }",
"public float getHeading() {\n return heading_;\n }",
"public float getHeading() {\n return heading_;\n }",
"private float getHeading() {\n Orientation anglesA = robot.imu.getAngularOrientation(\n AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n return AngleUnit.DEGREES.normalize(\n AngleUnit.DEGREES.fromUnit(anglesA.angleUnit, anglesA.firstAngle));\n }",
"public float getHeading() {\n return heading_;\n }",
"@Override\n\tpublic String getDisplayName()\n\t{\n\t\treturn this.getCameraActivity().getString(R.string.scene_hdr);\n\t}",
"public abstract String header();",
"public VCFHeader getHeader();",
"public String getHeader();",
"public float getHeading() {\n return heading_;\n }",
"public float getHeading() {\n return heading_;\n }",
"public String getHeadimg() {\n return headimg;\n }",
"public String getHeadimg() {\n return headimg;\n }",
"public String getHeader() {\n\t\tString item_text = getQuantityString(getCount());\n\t\tString header = getActivity().getString(R.string.browse_items_text, item_text, getCount());\n\t\treturn header;\n\t}",
"String makeHeader() {\n StringBuilder ans = new StringBuilder(\" \"); // README shows two spaces at\n String sep=\"\"; //start with nothing to separate, then switch to | to separate\n for (int i = 0; i < toDisplay.getWidth(); i++) {\n ans.append(sep);\n ans.append(i);\n sep = \"|\";\n }\n ans.append(\"\\n\");\n return ans.toString();\n }",
"public String get_setupdefine_HelpMenu_HdrText() {\r\n\t\tWebElement setupdefine_HelpMenu = driver.findElementByAccessibilityId(\"helpHeader\");\r\n\t\treturn FetchText(setupdefine_HelpMenu);\r\n\t}",
"com.didiyun.base.v1.Header getHeader();",
"public String getLBR_DocLine_ICMS_UU();",
"java.lang.String getHeader();",
"protected String elaboraHead() {\n String testo = VUOTA;\n String testoIncluso = VUOTA;\n\n // Avviso visibile solo in modifica\n testo += elaboraAvvisoScrittura();\n\n // Posiziona il TOC\n testoIncluso += elaboraTOC();\n\n // Posiziona il ritorno\n testoIncluso += elaboraRitorno();\n\n // Posizione il template di avviso\n testoIncluso += elaboraTemplateAvviso();\n\n // Ritorno ed avviso vanno (eventualmente) protetti con 'include'\n testo += elaboraInclude(testoIncluso);\n\n // Posiziona l'incipit della pagina\n testo += A_CAPO;\n testo += elaboraIncipit();\n\n // valore di ritorno\n return testo;\n }",
"public String getHeaderText(){\n\t\treturn headerText.toString();\n\t}",
"private org.gwtbootstrap3.client.ui.Heading get_f_Heading18() {\n return build_f_Heading18();\n }",
"stockFilePT102.StockHeaderDocument.StockHeader getStockHeader();",
"IDisplayString getTitle();",
"protected String getPageHeader()\n {\n if (this.pageHeader == null) {\n String title = (this.privateLabel != null)? this.privateLabel.getPageTitle() : \"\";\n StringBuffer sb = new StringBuffer();\n sb.append(\"<center>\");\n sb.append(\"<span style='font-size:14pt;'><b>\" + title + \"</b></span>\");\n sb.append(\"<hr>\");\n sb.append(\"</center>\");\n this.pageHeader = sb.toString();\n }\n return this.pageHeader;\n }",
"public String getHeader()\r\n\t{\r\n\t\treturn header;\r\n\t}",
"public String getHeader1() {\n return header1;\n }",
"public String getHeadImg() {\n return headImg;\n }",
"private org.gwtbootstrap3.client.ui.Heading get_f_Heading40() {\n return build_f_Heading40();\n }",
"java.lang.String getTitle();",
"java.lang.String getTitle();",
"java.lang.String getTitle();",
"java.lang.String getTitle();",
"java.lang.String getTitle();",
"public String getbyHeader(){\n String byHed=driver.findElement(byHeader).getText();\n return byHed;\n }",
"private org.gwtbootstrap3.client.ui.Heading get_f_Heading50() {\n return build_f_Heading50();\n }",
"public Rotation2d getHeading() {\n return Rotation2d.fromDegrees(Math.IEEEremainder(gyro.getAngle(), 360) * (Const.kGyroReversed ? -1.0 : 1.0));\n }",
"private static void printHeading(){\n\t\tSystem.out.println(\"Your Name\");\n\t\tSystem.out.println(\"Course name and semester\");\n\t\tSystem.out.println(\"Programming Project 1\");\n\t\tSystem.out.println(\"Your Name in Code\");\n\t\tSystem.out.println();\n\n\t}",
"public String getPageHeaderParagraph() {\r\n\t\treturn controls.getText(\"eVisit\", \"CSS_header_paragraph\");\r\n\t}",
"public void\nprintHir( String pHeader );",
"public String getWantedProductHeader()throws Exception{\r\n SearchPageFactory pageFactory = new SearchPageFactory(driver);\r\n String listedItemHeader = getElementText(pageFactory.listedItemHeader);\r\n return listedItemHeader;\r\n }",
"private org.gwtbootstrap3.client.ui.Heading get_f_Heading77() {\n return build_f_Heading77();\n }",
"public String getTitle() {\n return find(by.tagName(\"h1\")).getText();\n }",
"public String printHeader() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"\\n***********************************\\n\");\n sb.append(\"\\tAbacus\\n\");\n try {\n sb.append(\"\\tVersion: \");\n //sb.append(abacus.class.getPackage().getImplementationVersion());\n sb.append(\"2.6\");\n } catch (Exception e) {\n // Don't print anything\n }\n sb.append(\"\\n***********************************\\n\")\n .append(\"Developed and written by: Damian Fermin and Alexey Nesvizhskii\\n\")\n .append(\"Modifications by Dmitry Avtonomov\\n\")\n .append(\"Copyright 2010 Damian Fermin\\n\\n\")\n .append(\"Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\")\n .append(\"you may not use this file except in compliance with the License.\\n\")\n .append(\"You may obtain a copy of the License at \\n\\n\")\n .append(\"http://www.apache.org/licenses/LICENSE-2.0\\n\\n\")\n .append(\"Unless required by applicable law or agreed to in writing, software\\n\")\n .append(\"distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\")\n .append(\"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\")\n .append(\"See the License for the specific language governing permissions and\\n\")\n .append(\"limitations under the License.\\n\\n\");\n return sb.toString();\n }",
"@JsProperty(name = \"heading\")\n public native double heading();",
"public SSLHeadingWidgetComponent getHeading()\r\n\t{\r\n\t\treturn getHeading( getSession().getSessionContext() );\r\n\t}",
"public String getHeader() {\n\t\tif (null != this.header) {\n\t\t\treturn this.header;\n\t\t}\n\t\tValueExpression _ve = getValueExpression(\"header\");\n\t\tif (_ve != null) {\n\t\t\treturn (String) _ve.getValue(getFacesContext().getELContext());\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"public String getPlayerListHeader ( ) {\n\t\treturn extract ( handle -> handle.getPlayerListHeader ( ) );\n\t}",
"private org.gwtbootstrap3.client.ui.Heading get_f_Heading30() {\n return build_f_Heading30();\n }",
"public String getHeaderLine() {\r\n\t\tif(header == null)return \"\";\r\n\t\treturn header;\r\n\t}",
"@Transient\n public String getSlimGridHeading() {\n\tList<MarkerGridHeading> headings = this.getGridHeadings();\n\tif ((headings != null) && (headings.size() > 0)) {\n\t return headings.get(0).getHeadingAbbreviation();\n\t}\n\treturn null;\n }",
"public String getHeadicon() {\n return headicon;\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 }",
"double normalizeHeading(double h) {\n double nh = h;\n if( h>-180 && h<180 ) {\n } else if( h <= -180 ) {\n nh = h+360;\n } else if( h > 180 ) {\n nh = h-360;\n }\n return nh;\n }",
"public String getHeader() {\n return header;\n }",
"public String getHeader() {\n return header;\n }",
"public String getHeadline() {\r\n return headline;\r\n }",
"public HeadComponent getHead() {\n\t\treturn (HeadComponent) snake.getLast();\n\t}",
"public String SubHeadTitle()\n\t{\n\t\t//Click on Add a new Computer on Home Page to Navigate to Creation of Computer Page\n\t\tAddComputer.click();\n\t\t\n\t\t//Wait Time after each transaction\n\t\tWebDriverWait wait = new WebDriverWait(driver,2);\n\t\t\n\t\tString Subheadtitle = SubheadTitle.getText();\n\t\treturn Subheadtitle;\n\t}",
"private static String getPSMHeader() {\r\n return \"PSM No.\" + SEP\r\n + \"Spectrum title\" + SEP\r\n + \"Peptide Sequence\" + SEP\r\n + \"Protein Accession\" + SEP\r\n + \"Intensity Score\" + SEP\r\n + \"Matched Peaks\" + SEP;\r\n }",
"public RTCMHeader getRtcmHeader()\n {\n\treturn this.rtcmHeader;\n }",
"public String getHeader() {\n\t\tString header = \"id\" + \",\" + \"chrId\" + \",\" + \"strand\" + \",\" + \"TSS\" + \",\" + \"PolyASite\"\n\t\t\t\t\t\t+ \",\" + \"5SSPos\" + \",\" + \"3SSPos\" + \",\" + \"intronLength\" + \",\" + \"terminalExonLength\"\n\t\t\t\t\t\t+ \",\" + \"BPS_3SS_distance\" + \",\" + \"PolyPyGCContent\" + \",\" + \"IntronGCContent\" + \",\" + \"terminalExonGCContent\"\n\t\t\t\t\t\t+ \",\" + \"5SS\" + \",\" + \"3SS\" + \",\" + \"BPS\"\n\t\t\t\t\t\t+ \",\" + \"5SSRank\" + \",\" + \"3SSRank\" + \",\" + \"BPSRank\"\n\t\t\t\t\t\t+ \",\" + \"5SSLevenshteinDistance\" + \",\" + \"3SSLevenshteinDistance\" + \",\" + \"BPSLevenshteinDistance\";\n\t\treturn header; \n\t}",
"public void setHeader() {\n tvHeader.setText(getResources().getString(R.string.text_skill));\n tvDots.setVisibility(View.INVISIBLE);\n }",
"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 }",
"public String getHeader() {\n\t\treturn _header;\n\t}",
"public static void VerifyHeaderItem_CommonComponent_Div_H2(String renderingControl){\t\t\t\t\n\t\ttry{\n\t\t\tactualHeaderText=sitecoreObj.aboutusHeaderItemTitleRightTop.isDisplayed();\n\t\t\tAssert.assertEquals(actualHeaderText, true);\n\t\t\tlog.info(\"The Actual AboutUs \" + renderingControl + \" Title - <\"+sitecoreObj.aboutusHeaderItemTitleRightTop.getTagName()+\">\");\n\t\t\tlog.info(\"The Expected AboutUs \" + renderingControl + \" Title - <h1>\");\t\n\t\t\tlog.info(\"TEST PASSED: The Actual and Expected AboutUs \" + renderingControl + \" Title are Same\");\n\t\t}catch(AssertionError e){\n\t\t\tlog.error(\"The Actual AboutUs \" + renderingControl + \" Title - <\"+sitecoreObj.aboutusHeaderItemTitleRightTop.getTagName()+\">\");\n\t\t\tlog.error(\"The Expected AboutUs \" + renderingControl + \" Title - <h1>\");\t\t\t\t\t\t\n\t\t\tlog.error(\"TEST FAILED: The Actual and Expected AboutUs \" + renderingControl + \" Title are NOT same\");\n\t\t}catch(org.openqa.selenium.NoSuchElementException e){\n\t\t\tlog.error(\"TEST FAILED: There is No Title On \" + renderingControl + \" element\");\n\t\t}\n\t}",
"double getHeadingDiff(double init_h) {\n double curr_h = getHeading();\n double diff_h = init_h - curr_h;\n if( diff_h>=360.0 ) diff_h -= 360.0;\n else if( diff_h<=-360.0 ) diff_h += 360.0;\n return diff_h ;\n }",
"public float getInterpolatedHeading (float u) {\r\n\r\n float newHeading;\r\n \r\n // if linear interpolation\r\n if (this.linear == 1) {\r\n\r\n newHeading = keyFrame[1].heading + \r\n ((keyFrame[2].heading - keyFrame[1].heading) * u);\r\n } else {\r\n\r\n newHeading = h0 + u * (h1 + u * (h2 + u * h3));\r\n\r\n }\r\n\r\n return newHeading;\r\n }",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"public String getTitle() {\n return bufTitle;\n }"
]
| [
"0.70897985",
"0.681059",
"0.681059",
"0.681059",
"0.6728169",
"0.6669363",
"0.6541932",
"0.6541932",
"0.64983165",
"0.6386385",
"0.62775934",
"0.61813474",
"0.6165063",
"0.6160866",
"0.6112569",
"0.60833335",
"0.6071503",
"0.6071503",
"0.60499173",
"0.6046139",
"0.6040675",
"0.60147935",
"0.5940607",
"0.59165055",
"0.5907445",
"0.589971",
"0.589971",
"0.58918375",
"0.58918375",
"0.5865678",
"0.5793594",
"0.57555914",
"0.57543206",
"0.56790805",
"0.56749934",
"0.56436634",
"0.55889034",
"0.5579718",
"0.5568625",
"0.5568415",
"0.55679685",
"0.55637866",
"0.5547899",
"0.5525559",
"0.55063224",
"0.5496719",
"0.5496719",
"0.5496719",
"0.5496719",
"0.5496719",
"0.54910916",
"0.548932",
"0.54868144",
"0.5484309",
"0.54836786",
"0.54803854",
"0.54675454",
"0.54659235",
"0.54647845",
"0.545775",
"0.54491866",
"0.5447592",
"0.5447313",
"0.54418457",
"0.5431637",
"0.5417287",
"0.5416292",
"0.5411697",
"0.5405602",
"0.5403527",
"0.5403104",
"0.5403104",
"0.5401866",
"0.5398313",
"0.5393342",
"0.53892344",
"0.53863317",
"0.53772426",
"0.5377054",
"0.53684115",
"0.53567415",
"0.5353011",
"0.53528917",
"0.5338759",
"0.53192055",
"0.53192055",
"0.53192055",
"0.53192055",
"0.53192055",
"0.53192055",
"0.53192055",
"0.53192055",
"0.53192055",
"0.53192055",
"0.53192055",
"0.53192055",
"0.53192055",
"0.53192055",
"0.53192055",
"0.5316855"
]
| 0.6842696 | 1 |
/ Gets the heading from REV IMU2 | double readImu2Heading() {
double h = -360.0;
if( USE_IMU2 && imu2_!=null && imu2_init_ok_ ) {
h = imu2_.getAngularOrientation().firstAngle;
}
return h;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"float getHeading();",
"float getHeading();",
"float getHeading();",
"public int getHeading()\n\t{\n\t\treturn heading;\n\t}",
"public String getHeading() {\n return heading;\n }",
"public String getHeading() {\n return heading;\n }",
"private String collectHeading(Document doc) {\n String heading = doc.select(\"[class^=header1 style]\").first().text();\r\n\r\n return heading;\r\n }",
"public final native int getHeading() /*-{\n return this.getHeading() || 0;\n }-*/;",
"double readImuHeading() {\n double h = -360.0;\n if( USE_IMU && imu_!=null && imu_init_ok_ ) {\n h = imu_.getAngularOrientation().firstAngle;\n }\n return h;\n }",
"public Heading getHeading()\n {\n\treturn this.heading;\n }",
"double getHeading() {\n if( CACHE_IMU_READING && loop_cnt_==last_imu_read_loop_id_ ) {\n // return the existing heading when getHeading() is called in the same loop\n return heading_ ;\n }\n\n heading_ = 0;\n if( USE_IMU && imu_!=null && imu_init_ok_ ) {\n imu_angles_ = imu_.getAngularOrientation().toAxesReference(AxesReference.INTRINSIC).toAxesOrder(AxesOrder.ZYX); // acquiring angles are expensive, keep it minimal\n // IMU can automatically detect orientation, and return heading as first angle, 2020/01/25\n heading_ = AngleUnit.DEGREES.normalize(imu_angles_.firstAngle);\n last_imu_read_loop_id_ = loop_cnt_;\n } else if( USE_IMU2 && imu2_!=null && imu2_init_ok_ ) {\n // use IMU2 if IMU failed\n imu2_angles_ = imu2_.getAngularOrientation().toAxesReference(AxesReference.INTRINSIC).toAxesOrder(AxesOrder.ZYX);\n heading_ = AngleUnit.DEGREES.normalize(imu2_angles_.firstAngle);\n last_imu_read_loop_id_ = loop_cnt_;\n }\n return heading_;\n }",
"public static String getHeader() {\n return \"S I R\";\n }",
"SmilHead getHead();",
"public double getHeading() {\n return imu.getAngularOrientation().firstAngle;\n }",
"public int heading() {\n\t\theading = heading + 5;\n\t\tif (heading >= 359) {\n\t\t\t//Setting the heading to 0\n\t\t\tsetHeading(0);\n\t\t}\n\t\t//Returning the heading\n\t\treturn heading;\n\t}",
"public float getHeading() {\n return heading_;\n }",
"public float getHeading() {\n return heading_;\n }",
"public float getHeading() {\n return heading_;\n }",
"public abstract String header();",
"@Override\n\tpublic String getDisplayName()\n\t{\n\t\treturn this.getCameraActivity().getString(R.string.scene_hdr);\n\t}",
"public float getHeading() {\n return heading_;\n }",
"public IMobileSMTitle getTitle();",
"public VCFHeader getHeader();",
"public String getHeader();",
"public float getHeading() {\n return heading_;\n }",
"public float getHeading() {\n return heading_;\n }",
"private float getHeading() {\n Orientation anglesA = robot.imu.getAngularOrientation(\n AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n return AngleUnit.DEGREES.normalize(\n AngleUnit.DEGREES.fromUnit(anglesA.angleUnit, anglesA.firstAngle));\n }",
"public String getHeader() {\n\t\tString item_text = getQuantityString(getCount());\n\t\tString header = getActivity().getString(R.string.browse_items_text, item_text, getCount());\n\t\treturn header;\n\t}",
"String makeHeader() {\n StringBuilder ans = new StringBuilder(\" \"); // README shows two spaces at\n String sep=\"\"; //start with nothing to separate, then switch to | to separate\n for (int i = 0; i < toDisplay.getWidth(); i++) {\n ans.append(sep);\n ans.append(i);\n sep = \"|\";\n }\n ans.append(\"\\n\");\n return ans.toString();\n }",
"public String getHeadimg() {\n return headimg;\n }",
"public String getHeadimg() {\n return headimg;\n }",
"com.didiyun.base.v1.Header getHeader();",
"public String get_setupdefine_HelpMenu_HdrText() {\r\n\t\tWebElement setupdefine_HelpMenu = driver.findElementByAccessibilityId(\"helpHeader\");\r\n\t\treturn FetchText(setupdefine_HelpMenu);\r\n\t}",
"protected String elaboraHead() {\n String testo = VUOTA;\n String testoIncluso = VUOTA;\n\n // Avviso visibile solo in modifica\n testo += elaboraAvvisoScrittura();\n\n // Posiziona il TOC\n testoIncluso += elaboraTOC();\n\n // Posiziona il ritorno\n testoIncluso += elaboraRitorno();\n\n // Posizione il template di avviso\n testoIncluso += elaboraTemplateAvviso();\n\n // Ritorno ed avviso vanno (eventualmente) protetti con 'include'\n testo += elaboraInclude(testoIncluso);\n\n // Posiziona l'incipit della pagina\n testo += A_CAPO;\n testo += elaboraIncipit();\n\n // valore di ritorno\n return testo;\n }",
"protected String getPageHeader()\n {\n if (this.pageHeader == null) {\n String title = (this.privateLabel != null)? this.privateLabel.getPageTitle() : \"\";\n StringBuffer sb = new StringBuffer();\n sb.append(\"<center>\");\n sb.append(\"<span style='font-size:14pt;'><b>\" + title + \"</b></span>\");\n sb.append(\"<hr>\");\n sb.append(\"</center>\");\n this.pageHeader = sb.toString();\n }\n return this.pageHeader;\n }",
"IDisplayString getTitle();",
"java.lang.String getTitle();",
"java.lang.String getTitle();",
"java.lang.String getTitle();",
"java.lang.String getTitle();",
"java.lang.String getTitle();",
"stockFilePT102.StockHeaderDocument.StockHeader getStockHeader();",
"public String getHeaderText(){\n\t\treturn headerText.toString();\n\t}",
"public String getPageHeaderParagraph() {\r\n\t\treturn controls.getText(\"eVisit\", \"CSS_header_paragraph\");\r\n\t}",
"java.lang.String getHeader();",
"public String getTitle() {\n return find(by.tagName(\"h1\")).getText();\n }",
"public String getHeader()\r\n\t{\r\n\t\treturn header;\r\n\t}",
"public String printHeader() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"\\n***********************************\\n\");\n sb.append(\"\\tAbacus\\n\");\n try {\n sb.append(\"\\tVersion: \");\n //sb.append(abacus.class.getPackage().getImplementationVersion());\n sb.append(\"2.6\");\n } catch (Exception e) {\n // Don't print anything\n }\n sb.append(\"\\n***********************************\\n\")\n .append(\"Developed and written by: Damian Fermin and Alexey Nesvizhskii\\n\")\n .append(\"Modifications by Dmitry Avtonomov\\n\")\n .append(\"Copyright 2010 Damian Fermin\\n\\n\")\n .append(\"Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\")\n .append(\"you may not use this file except in compliance with the License.\\n\")\n .append(\"You may obtain a copy of the License at \\n\\n\")\n .append(\"http://www.apache.org/licenses/LICENSE-2.0\\n\\n\")\n .append(\"Unless required by applicable law or agreed to in writing, software\\n\")\n .append(\"distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\")\n .append(\"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\")\n .append(\"See the License for the specific language governing permissions and\\n\")\n .append(\"limitations under the License.\\n\\n\");\n return sb.toString();\n }",
"public String getHeadline() {\r\n return headline;\r\n }",
"public SSLHeadingWidgetComponent getHeading()\r\n\t{\r\n\t\treturn getHeading( getSession().getSessionContext() );\r\n\t}",
"private static void printHeading(){\n\t\tSystem.out.println(\"Your Name\");\n\t\tSystem.out.println(\"Course name and semester\");\n\t\tSystem.out.println(\"Programming Project 1\");\n\t\tSystem.out.println(\"Your Name in Code\");\n\t\tSystem.out.println();\n\n\t}",
"private org.gwtbootstrap3.client.ui.Heading get_f_Heading18() {\n return build_f_Heading18();\n }",
"public String getTitle() {\n return bufTitle;\n }",
"public String SubHeadTitle()\n\t{\n\t\t//Click on Add a new Computer on Home Page to Navigate to Creation of Computer Page\n\t\tAddComputer.click();\n\t\t\n\t\t//Wait Time after each transaction\n\t\tWebDriverWait wait = new WebDriverWait(driver,2);\n\t\t\n\t\tString Subheadtitle = SubheadTitle.getText();\n\t\treturn Subheadtitle;\n\t}",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"public String getHeader1() {\n return header1;\n }",
"public HeadComponent getHead() {\n\t\treturn (HeadComponent) snake.getLast();\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 }",
"public java.lang.String getTitle();",
"private org.gwtbootstrap3.client.ui.Heading get_f_Heading40() {\n return build_f_Heading40();\n }",
"public String getbyHeader(){\n String byHed=driver.findElement(byHeader).getText();\n return byHed;\n }",
"public String getWantedProductHeader()throws Exception{\r\n SearchPageFactory pageFactory = new SearchPageFactory(driver);\r\n String listedItemHeader = getElementText(pageFactory.listedItemHeader);\r\n return listedItemHeader;\r\n }",
"public void\nprintHir( String pHeader );",
"@JsProperty(name = \"heading\")\n public native double heading();",
"public RTCMHeader getRtcmHeader()\n {\n\treturn this.rtcmHeader;\n }",
"public String getLBR_DocLine_ICMS_UU();",
"public String getPlayerListHeader ( ) {\n\t\treturn extract ( handle -> handle.getPlayerListHeader ( ) );\n\t}",
"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 String getHeader() {\n\t\tif (null != this.header) {\n\t\t\treturn this.header;\n\t\t}\n\t\tValueExpression _ve = getValueExpression(\"header\");\n\t\tif (_ve != null) {\n\t\t\treturn (String) _ve.getValue(getFacesContext().getELContext());\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"public Rotation2d getHeading() {\n return Rotation2d.fromDegrees(Math.IEEEremainder(gyro.getAngle(), 360) * (Const.kGyroReversed ? -1.0 : 1.0));\n }",
"PageHeader getPageHeader();",
"PageHeader getPageHeader();",
"public String getHeadImg() {\n return headImg;\n }",
"public String getHeader() {\n return header;\n }",
"public String getHeader() {\n return header;\n }",
"private org.gwtbootstrap3.client.ui.Heading get_f_Heading30() {\n return build_f_Heading30();\n }",
"@Transient\n public String getSlimGridHeading() {\n\tList<MarkerGridHeading> headings = this.getGridHeadings();\n\tif ((headings != null) && (headings.size() > 0)) {\n\t return headings.get(0).getHeadingAbbreviation();\n\t}\n\treturn null;\n }",
"public String getHeader() {\n\t\tString header = \"id\" + \",\" + \"chrId\" + \",\" + \"strand\" + \",\" + \"TSS\" + \",\" + \"PolyASite\"\n\t\t\t\t\t\t+ \",\" + \"5SSPos\" + \",\" + \"3SSPos\" + \",\" + \"intronLength\" + \",\" + \"terminalExonLength\"\n\t\t\t\t\t\t+ \",\" + \"BPS_3SS_distance\" + \",\" + \"PolyPyGCContent\" + \",\" + \"IntronGCContent\" + \",\" + \"terminalExonGCContent\"\n\t\t\t\t\t\t+ \",\" + \"5SS\" + \",\" + \"3SS\" + \",\" + \"BPS\"\n\t\t\t\t\t\t+ \",\" + \"5SSRank\" + \",\" + \"3SSRank\" + \",\" + \"BPSRank\"\n\t\t\t\t\t\t+ \",\" + \"5SSLevenshteinDistance\" + \",\" + \"3SSLevenshteinDistance\" + \",\" + \"BPSLevenshteinDistance\";\n\t\treturn header; \n\t}",
"public String getHeader() {\n\t\treturn _header;\n\t}",
"public String getHeaderLine() {\r\n\t\tif(header == null)return \"\";\r\n\t\treturn header;\r\n\t}",
"private org.gwtbootstrap3.client.ui.Heading get_f_Heading77() {\n return build_f_Heading77();\n }",
"private org.gwtbootstrap3.client.ui.Heading get_f_Heading50() {\n return build_f_Heading50();\n }",
"private static String getPSMHeader() {\r\n return \"PSM No.\" + SEP\r\n + \"Spectrum title\" + SEP\r\n + \"Peptide Sequence\" + SEP\r\n + \"Protein Accession\" + SEP\r\n + \"Intensity Score\" + SEP\r\n + \"Matched Peaks\" + SEP;\r\n }",
"String getHeadLiteral();",
"public PHeader getHeader() {\n\t\treturn header;\n\t}",
"public WebElement getSearchPageHeaderText()\n{\n\treturn driver.findElement(headertext);\n}"
]
| [
"0.6953632",
"0.6953632",
"0.6953632",
"0.6927565",
"0.680693",
"0.680693",
"0.6733977",
"0.65679073",
"0.65599316",
"0.6491443",
"0.6425806",
"0.6337517",
"0.63121086",
"0.6290067",
"0.6202793",
"0.62010664",
"0.62010664",
"0.6179691",
"0.6178184",
"0.6170329",
"0.61637783",
"0.6148072",
"0.6125819",
"0.6051443",
"0.6024701",
"0.6024701",
"0.5980325",
"0.59727657",
"0.5934776",
"0.5931267",
"0.5931267",
"0.59224474",
"0.5921029",
"0.5881003",
"0.5869165",
"0.5861929",
"0.584653",
"0.584653",
"0.584653",
"0.584653",
"0.584653",
"0.58463836",
"0.5835994",
"0.5834887",
"0.57831484",
"0.57670814",
"0.5750198",
"0.5748554",
"0.57415986",
"0.5739462",
"0.57353556",
"0.5701373",
"0.56924015",
"0.5684475",
"0.56815135",
"0.56815135",
"0.56815135",
"0.56815135",
"0.56815135",
"0.56815135",
"0.56815135",
"0.56815135",
"0.56815135",
"0.56815135",
"0.56815135",
"0.56815135",
"0.56815135",
"0.56815135",
"0.56815135",
"0.56791353",
"0.566966",
"0.56681436",
"0.5650044",
"0.5648891",
"0.5644195",
"0.56371176",
"0.56316966",
"0.5622766",
"0.5617526",
"0.5617454",
"0.56171274",
"0.5617021",
"0.56104183",
"0.5600468",
"0.55888164",
"0.55888164",
"0.5576867",
"0.557429",
"0.557429",
"0.5572921",
"0.5572691",
"0.55707514",
"0.55649585",
"0.55600584",
"0.55542886",
"0.55344903",
"0.5529594",
"0.551878",
"0.55166996",
"0.55108434"
]
| 0.68929327 | 4 |
/ Normalize a given heading with value of (360,360] to range (180,180] | double normalizeHeading(double h) {
double nh = h;
if( h>-180 && h<180 ) {
} else if( h <= -180 ) {
nh = h+360;
} else if( h > 180 ) {
nh = h-360;
}
return nh;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"double normaliseHeading(double ang) {\r\n\t\tif (ang > 2 * PI)\r\n\t\t\tang -= 2 * PI;\r\n\t\tif (ang < 0)\r\n\t\t\tang += 2 * PI;\r\n\t\treturn ang;\r\n\t}",
"public static double getHeading(double heading) {\n double newHeading;\n if (heading >=0.0 && heading < 90.0)\n newHeading = -1.0;\n else if (heading >= 90.0 && heading < 180.0)\n newHeading = -0.33;\n else if (heading >= 180.0 && heading < 270.0)\n newHeading = 0.33;\n else if (heading >= 270.0 && heading < 360.0)\n newHeading = 1.0;\n else\n newHeading = -1.0;\n return newHeading;\n }",
"private float normalize(float angle) {\n\t\tfloat a = angle;\n\t\twhile (a > 180)\n\t\t\ta -= 360;\n\t\twhile (a < -180)\n\t\t\ta += 360;\n\t\treturn a;\n\t}",
"public double normalizeBearing( double angle )\n {\n while ( angle > 180 )\n {\n angle -= 360;\n }\n while ( angle < -180 )\n {\n angle += 360;\n }\n return angle;\n }",
"private void normalizeOrientation() {\n\t\twhile (this.orientation >= 2 * Math.PI) {\n\t\t\torientation -= 2 * Math.PI;\n\t\t}\n\t\twhile (this.orientation < 0) {\n\t\t\torientation += 2 * Math.PI;\n\t\t}\n\t}",
"double normaliseBearing(double ang) {\r\n\t\tif (ang > PI)\r\n\t\t\tang -= 2 * PI;\r\n\t\tif (ang < -PI)\r\n\t\t\tang += 2 * PI;\r\n\t\treturn ang;\r\n\t}",
"public double getRolledHeading() {\n double heading = 360.0 - getRawHeading();\n if (lastHeading < 100 && heading > 300) {\n rotationAmt--;\n } else if (heading < 100 && lastHeading > 300) {\n rotationAmt++;\n }\n lastHeading = heading;\n return heading + rotationAmt * 360.0;\n }",
"double getHeadingDiff(double init_h) {\n double curr_h = getHeading();\n double diff_h = init_h - curr_h;\n if( diff_h>=360.0 ) diff_h -= 360.0;\n else if( diff_h<=-360.0 ) diff_h += 360.0;\n return diff_h ;\n }",
"private static double convertBearingTo360(double dBearing){\n\t\t\n\t\t//dOut = output\n\t\t\n\t\tdouble dOut;\n\t\t\n\t\tdOut = dBearing;\n\t\t\n\t\twhile(dOut>360){\n\t\t\tdOut=dOut-360.;\n\t\t}\n\t\twhile(dOut<0){\n\t\t\tdOut=dOut+360.;\n\t\t}\n\t\t\n\t\treturn dOut;\n\t}",
"public float calculateIdealHeading(double currentHeading, Vector2 target) {\n\t\tdouble delta_x = target.x() - position.x();\r\n\t\tdouble delta_y = target.y() - position.y();\r\n\t\tdouble idealAngle = Math.toDegrees(Math.atan(delta_x / delta_y));\r\n\t\treturn (float)idealAngle;\r\n\t}",
"public double getHeadingInDegrees(){\r\n double headingRadians = calculateHeadingRadians();\r\n return headingRadians * 180 / Math.PI;\r\n }",
"public static double normalizeAngle(double a, double center)\r\n/* 25: */ {\r\n/* 26: 91 */ return a - 6.283185307179586D * FastMath.floor((a + 3.141592653589793D - center) / 6.283185307179586D);\r\n/* 27: */ }",
"public static float headingToArc(float pHeading, boolean pTurnRight){\n pHeading %= 360;\n pHeading = pHeading < 0 ? 360 + pHeading : pHeading;\n pHeading = 360 - pHeading;\n pHeading = pTurnRight ? pHeading - 90 : pHeading + 90;\n return pHeading;\n }",
"protected double normalizeDegrees(double locationBearing) {\n if (locationBearing >= 0.0 && locationBearing <= 180) {\n return locationBearing;\n } else {\n return 180 + (180 + locationBearing);\n }\n }",
"public Heading(Double compassHeading) {\n\t\tthis.compassHeading = compassHeading;\n\t}",
"public Builder setHeading(float value) {\n bitField0_ |= 0x00000001;\n heading_ = value;\n onChanged();\n return this;\n }",
"public Builder setHeading(float value) {\n bitField0_ |= 0x00000001;\n heading_ = value;\n onChanged();\n return this;\n }",
"public Builder setHeading(float value) {\n bitField0_ |= 0x00000002;\n heading_ = value;\n onChanged();\n return this;\n }",
"float getHeading();",
"float getHeading();",
"float getHeading();",
"public void autonZeroHeading() {\n \tString direction = SmartDashboard.getString(\"Calibration_Orientation\", \"North\");\n \tswitch (direction) {\n \t\tdefault: zeroHeading();\n \t\t\tbreak;\n \t\tcase \"North\": zeroHeading(0.0);\n \t\t\tbreak;\n \t\tcase \"South\": zeroHeading(180.0);\n \t\t\tbreak;\n \t\tcase \"East\": zeroHeading(-90.0);\n \t\t\tbreak;\n \t\tcase \"West\": zeroHeading(90.0);\n \t\t\tbreak;\n \t\tcase \"-135\" : zeroHeading(135.0);\n \t\t\tbreak;\n \t}\n }",
"double adjust_angle_rotation(double angle) {\n double temp;\n temp=angle;\n if(temp>90) {\n temp=180-temp;\n }\n return temp;\n }",
"public float getInterpolatedHeading (float u) {\r\n\r\n float newHeading;\r\n \r\n // if linear interpolation\r\n if (this.linear == 1) {\r\n\r\n newHeading = keyFrame[1].heading + \r\n ((keyFrame[2].heading - keyFrame[1].heading) * u);\r\n } else {\r\n\r\n newHeading = h0 + u * (h1 + u * (h2 + u * h3));\r\n\r\n }\r\n\r\n return newHeading;\r\n }",
"public static float standardizeAngle(float angle) {\n float result = modulo(angle, FastMath.TWO_PI);\n if (result >= FastMath.PI) {\n result -= FastMath.TWO_PI;\n }\n\n assert result >= -FastMath.PI : result;\n assert result < FastMath.PI : result;\n return result;\n }",
"public static float map180to360(float angle) {\n return (angle + 360) % 360;\n }",
"private float angularRounding(float input) {\n if (input >= 180.0f) {\n return input - 360.0f;\n } else if (input <= -180.0f) {\n return 360 + input;\n } else {\n return input;\n }\n }",
"private float getHeading() {\n Orientation anglesA = robot.imu.getAngularOrientation(\n AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n return AngleUnit.DEGREES.normalize(\n AngleUnit.DEGREES.fromUnit(anglesA.angleUnit, anglesA.firstAngle));\n }",
"private static double calcHeading(double angleA, double angleB) { \n\t\t\n\t\tdouble heading;\n\t\t\n\t\tif (angleA < angleB){\n\t\t\theading = 45 - (angleA + angleB) /2 ;\n\t\t}else {\n\t\t\theading = 225 - (angleA + angleB) /2 ;\t\n\t\t}\n\t\treturn heading;\n\t}",
"public float calculateDeltaIdealHeading(double currentHeading, Vector2 target) {\r\n\t\t//first calculate the angle from here to the target\r\n\t\tdouble delta_x = target.x() - position.x();\r\n\t\tdouble delta_y = target.y() - position.y();\r\n\t\tdouble idealAngle = Math.toDegrees(Math.atan(delta_x / delta_y));\r\n\t\tdouble deltaAngle = idealAngle - currentHeading;\r\n\t\treturn (float)deltaAngle;\r\n\t}",
"private void controlCompass(ArrayList<Float> heading, SeekBar slider){\n\t\tif(!heading.isEmpty() && !(slider.getProgress()>=heading.size())) { //If we have data\n\t\t\tspinCompass(compass, heading.get(slider.getProgress()));\n\t\t}\n\t}",
"public static double normalizedDegrees(final double inputDegrees) {\n double degrees = inputDegrees;\n\n while (degrees < 0) {\n degrees += 360;\n }\n while (degrees >= 360) {\n degrees -= 360;\n }\n\n return degrees;\n }",
"public Rotation2d getHeading() {\n return Rotation2d.fromDegrees(Math.IEEEremainder(gyro.getAngle(), 360) * (Const.kGyroReversed ? -1.0 : 1.0));\n }",
"public static double calculateHeading(double compassRadians, Location readFrom){\n GeomagneticField field = new GeomagneticField((float)readFrom.getLatitude(), (float)readFrom.getLongitude(), (float)readFrom.getHeight(), System.currentTimeMillis());\n float declination = field.getDeclination();\n return compassRadians + Math.toRadians(declination);\n }",
"public double calculateHeadingRadians(){\r\n if(coordinateHistory.size() > 2){\r\n GPSCoordinate firstPoint = coordinateHistory.get(coordinateHistory.size() - 2);\r\n GPSCoordinate secondPoint = coordinateHistory.get(coordinateHistory.size() - 1);\r\n \r\n if(!firstPoint.compareTo(secondPoint)){\r\n double latA = firstPoint.getLatitude();\r\n double longA = firstPoint.getLongitude();\r\n double latB = secondPoint.getLatitude();\r\n double longB = secondPoint.getLongitude();\r\n\r\n double X = Math.cos(latB) * Math.sin(longB - longA);\r\n double Y = (Math.cos(latA) * Math.sin(latB)) - (Math.sin(latA) * Math.cos(latB) * Math.cos(longB - longA));\r\n\r\n headingRadians = - Math.atan2(X, Y);\r\n return headingRadians;\r\n }else{\r\n return headingRadians;\r\n }\r\n }else{\r\n return headingRadians;\r\n }\r\n }",
"public static double to_360(double deg) {\n return modulo(deg,360);\n }",
"public static double reduce360Degrees(double degrees){\n return degrees % 360;\n }",
"public void setCompassHeading(Double compassHeading) {\n\t\tthis.compassHeading = compassHeading;\n\t}",
"public void initHeading(Direction heading)\r\n\t{\r\n\t\tthis.currentDirection=heading;\r\n\t}",
"public PositionController setHeading(double heading) {\n pid.setTarget(heading);\n isBlindRotating = false;\n return this;\n }",
"public void setHeading() {\n super.setHeading(getPrevious().getHeadingTo(this)); //The absolute angle position that robot needs to face to reach this position\n }",
"public Double getCompassHeading() {\n\t\treturn compassHeading;\n\t}",
"private double AdjustDegree(double value)\n\t{\n\t\tif(value > 360.0)\n\t\t{\n\t\t\twhile (value > 360.0)\n\t\t\t{\n\t\t\t\tvalue -= 360.0;\n\t\t\t}\n\t\t}\n\t\tif(value < 0.0)\n\t\t{\n\t\t\twhile (value < 0.0)\n\t\t\t{\n\t\t\t\tvalue += 360.0;\n\t\t\t}\n\t\t}\n\t\treturn value;\n\t}",
"public double headingTo(GeoPoint gp) {\n // Implementation hints:\n // 1. You may find the mehtod Math.atan2() useful when\n // implementing this method. More info can be found at:\n // http://docs.oracle.com/javase/8/docs/api/java/lang/Math.html\n //\n // 2. Keep in mind that in our coordinate system, north is 0\n // degrees and degrees increase in the clockwise direction. By\n // mathematical convention, \"east\" is 0 degrees, and degrees\n // increase in the counterclockwise direction.\n\n // I will put this point in the (0,0) and compute the atan2 on the\n // diifernce between them.\n checkRep();\n double x = (gp.latitude - this.latitude) * KM_PER_DEGREE_LATITUDE;\n double y = (gp.longitude - this.longitude) * KM_PER_DEGREE_LONGITUDE;\n double theta = Math.toDegrees(Math.atan2(x, y));\n theta = theta < 0 ? 360 + theta : theta;\n if (theta >= 0 && theta <= 90)\n return 90 - theta;\n return 360 - (theta - 90);\n }",
"public float getHeading() {\n return heading_;\n }",
"public float getHeading() {\n return heading_;\n }",
"private static void convertHertzToRelativeCent(List<Double> convertedValues) {\r\n for (int i = 0; i < convertedValues.size(); i++) {\r\n Double hertzValue = convertedValues.get(i);\r\n Double pitchValueInCentFoldedToOneOctave = PitchConverter.hertzToRelativeCent(hertzValue);\r\n convertedValues.set(i, pitchValueInCentFoldedToOneOctave);\r\n }\r\n }",
"public Double subtract(Double amount) {\n\n\t\tif (amount > this.compassHeading) {\n\t\t\tthis.compassHeading = MAX - (amount - this.compassHeading);\n\t\t\treturn this.compassHeading;\n\t\t}\n\n\t\tthis.compassHeading -= amount;\n\n\t\treturn this.compassHeading;\n\t}",
"private float calculateAngles(){\n\t\t// First we will move the current angle heading into the previous angle heading slot.\n\t\tdata.PID.headings[0] = data.PID.headings[1];\n\t\t// Then, we assign the new angle heading.\n\t\tdata.PID.headings[1] = data.imu.getAngularOrientation().firstAngle;\n\n\t\t// Finally we calculate a computedTarget from the current angle heading.\n\t\tdata.PID.computedTarget = data.PID.headings[1] + (data.PID.IMURotations * 360);\n\n\t\t// Now we determine if we need to re-calculate the angles.\n\t\tif(data.PID.headings[0] > 300 && data.PID.headings[1] < 60) {\n\t\t\tdata.PID.IMURotations++; //rotations of 360 degrees\n\t\t\tcalculateAngles();\n\t\t} else if(data.PID.headings[0] < 60 && data.PID.headings[1] > 300) {\n\t\t\tdata.PID.IMURotations--;\n\t\t\tcalculateAngles();\n\t\t}\n\t\treturn data.PID.headings[1];\n\t}",
"public double turn (double degrees) {\n setHeading(getHeading() + degrees);\n return Math.abs(degrees);\n }",
"public float getHeading() {\n return heading_;\n }",
"private void normalize() {\n this.x = (this.x - RobocodeRunner.width / 2) / RobocodeRunner.width;\n this.y = (this.y - RobocodeRunner.height / 2) / RobocodeRunner.height;\n this.distance /= Math.sqrt(RobocodeRunner.width * RobocodeRunner.width + RobocodeRunner.height * RobocodeRunner.height);\n this.enemyHeading /= 90;\n this.enemyDx /= 8;\n this.enemyDy /= 8;\n this.gunToTurn /= 180;\n this.angle /= 180;\n }",
"public float getHeading() {\n return heading_;\n }",
"private void processOrientation(Quaternion raw) {\r\n\t\tfloat t = 1.0f - (raw.x * raw.x) - (raw.y * raw.y) - (raw.z * raw.z);\r\n\t\tif (t < 0.0f) raw.w = 0.0f;\r\n\t\telse raw.w = -(FastMath.sqrt(t));\r\n\t}",
"double getCalibratedLevelAngle();",
"protected void rotateTo(double target) {\n robot.rightFront.setDirection(REVERSE);\n robot.rightBack.setDirection(REVERSE);\n\n while (opModeIsActive() && robot.rightFront.getDirection() != REVERSE) {\n idle();\n }\n\n if (target < 0) target += 360;\n\n double heading = get360Heading();\n while (opModeIsActive() && !withinRange(heading, target)) {\n // Run Dubberke-Richards logic\n if (Math.abs(heading - target) <= 180) {\n if (heading-target >= 0) {\n rotateRight();\n } else {\n rotateLeft();\n }\n } else { // |heading-target| > 180\n if (heading-target<0) {\n rotateRight();\n } else {\n rotateLeft();\n }\n }\n\n // Update heading for next loop\n heading = get360Heading();\n\n telemetry.addData(\"Heading\", heading);\n telemetry.update();\n }\n\n halt();\n }",
"double getHeading() {\n if( CACHE_IMU_READING && loop_cnt_==last_imu_read_loop_id_ ) {\n // return the existing heading when getHeading() is called in the same loop\n return heading_ ;\n }\n\n heading_ = 0;\n if( USE_IMU && imu_!=null && imu_init_ok_ ) {\n imu_angles_ = imu_.getAngularOrientation().toAxesReference(AxesReference.INTRINSIC).toAxesOrder(AxesOrder.ZYX); // acquiring angles are expensive, keep it minimal\n // IMU can automatically detect orientation, and return heading as first angle, 2020/01/25\n heading_ = AngleUnit.DEGREES.normalize(imu_angles_.firstAngle);\n last_imu_read_loop_id_ = loop_cnt_;\n } else if( USE_IMU2 && imu2_!=null && imu2_init_ok_ ) {\n // use IMU2 if IMU failed\n imu2_angles_ = imu2_.getAngularOrientation().toAxesReference(AxesReference.INTRINSIC).toAxesOrder(AxesOrder.ZYX);\n heading_ = AngleUnit.DEGREES.normalize(imu2_angles_.firstAngle);\n last_imu_read_loop_id_ = loop_cnt_;\n }\n return heading_;\n }",
"public void changeHeading(int newHeading)\n\t{\n\t\theading = newHeading;\n\t}",
"public static native void Normalize(long lpjFbxDualQuaternion);",
"public float getHeading() {\n return heading_;\n }",
"public float getHeading() {\n return heading_;\n }",
"public interface DisplacementSensor {\n\n // return current heading reported by sensor, in degrees.\n // convention is positive angles CCW, wrapping from 359-0\n public float getDisp();\n\n}",
"double readImu2Heading() {\n double h = -360.0;\n if( USE_IMU2 && imu2_!=null && imu2_init_ok_ ) {\n h = imu2_.getAngularOrientation().firstAngle;\n }\n return h;\n }",
"double readImuHeading() {\n double h = -360.0;\n if( USE_IMU && imu_!=null && imu_init_ok_ ) {\n h = imu_.getAngularOrientation().firstAngle;\n }\n return h;\n }",
"private void setNPCInitialHeading()\n {\n float alpha = (float) (Math.PI/2 - Math.atan2(end.getZ()-begin.getZ(), end.getX()-begin.getX()));\n npc.setAngle(alpha);\n npc.setSpeed(NPC.walkSpeed);//this automatically sets the \"walk\" anim so no need for this line:\n //npc.setAnimation(\"walk\");\n npc.setHeadingUpdateTime();\n }",
"protected final void setHeading(final int heading) {\n if (heading < 1 || heading > 6) {\n throw new IllegalArgumentException(\n \"Heading parameter must be between 1 and 6 (inclusive\");\n }\n if (heading < 5)\n setBold(true);\n setFontSize((int) (getFontSize() * HEADING_MULT[heading]));\n }",
"private static void convertHertzToAbsoluteCent(List<Double> convertedValues) {\r\n for (int i = 0; i < convertedValues.size(); i++) {\r\n Double valueInHertz = convertedValues.get(i);\r\n convertedValues.set(i, PitchConverter.hertzToAbsoluteCent(valueInHertz));\r\n }\r\n }",
"public double getHeading() {\n return Rotation2d.fromDegrees(m_gyro.getAngle()).getDegrees();\n }",
"public double getHeading() {\n return imu.getAngularOrientation().firstAngle;\n }",
"private static double rotate(double bearing, double degrees) {\n double newBearing = bearing + degrees;\n if (newBearing >= 360) {\n newBearing -= 360;\n }\n return newBearing;\n }",
"void turnToDir(float angle) { \n float radian = radians(angle);\n _rotVector.set(cos(radian), sin(radian));\n _rotVector.setMag(1);\n }",
"@NotNull\n private Coordinate flipH() {\n angle = 180 - angle;\n Coordinate nextCenterPointCoordinate = new Coordinate(\n this.centerPointCoordinate.getXCoordinate() - (Constants.BULLET_SPEED * Math.cos(Math.toRadians(90 - angle))),\n this.centerPointCoordinate.getYCoordinate());\n return nextCenterPointCoordinate;\n }",
"@Override\n\tpublic void onHeadingSensorChanged(float[] orientation) {\n\t\t\n\t}",
"public void applyStrategy(){\n\t\tfloat dx, dy;\n\t\t\n\t\tdx = targetCar.getX() - myCar.getX();\n\t\tdy = targetCar.getY() - myCar.getY();\n\t\t\n\t\t// awesome, atan2 handles all the hard parts of arctan calculations\n\t\tint angle = (int)Math.toDegrees( Math.atan2(dx, dy) );\n\t\tmyCar.setHeading( angle );\n\t}",
"private double normalizeImageValue(double value){\n return value/(31);\n }",
"private double changeDirection(double theta) {\n // Check angle not out of bounds\n theta = (theta > MAX_ANGLE) ? MAX_ANGLE : theta;\n theta = (theta < -MAX_ANGLE) ? -MAX_ANGLE : theta;\n\n return theta;\n }",
"public double translateAngle( Figure f, double angle, double dir);",
"public void setOrientation(EditText facingCompass){\n if (facingCompass.getText().toString().matches(\"NORTH\")) {\n orientation = 0;\n rotateRight = orientation;\n angleF = 0;\n\n } else if (facingCompass.getText().toString().matches(\"EAST\")) {\n orientation = 1;\n rotateRight = orientation;\n angleF = 90;\n\n } else if (facingCompass.getText().toString().matches(\"SOUTH\")) {\n orientation = 2;\n rotateRight = orientation;\n angleF = 180;\n\n } else if (facingCompass.getText().toString().matches(\"WEST\")) {\n orientation = 3;\n rotateRight = orientation;\n angleF = 270;\n\n } else\n errorMessage(\"Invalid F Direction...\\ndefaulted to NORTH\");\n return;\n }",
"private static double radToDeg(float rad)\r\n/* 30: */ {\r\n/* 31:39 */ return rad * 180.0F / 3.141592653589793D;\r\n/* 32: */ }",
"public void normalize() {\r\n\t\tfloat length = (float) this.lenght();\r\n\t\tif (length > 0) {\r\n\t\t\tx /= length;\r\n\t\t\ty /= length;\r\n\t\t\tz /= length;\r\n\t\t}\r\n\t}",
"public void zeroHeading() {\n gyro.reset();\n gyro.zeroYaw();\n }",
"public int heading() {\n\t\theading = heading + 5;\n\t\tif (heading >= 359) {\n\t\t\t//Setting the heading to 0\n\t\t\tsetHeading(0);\n\t\t}\n\t\t//Returning the heading\n\t\treturn heading;\n\t}",
"public void resetAngle() {\n\t\t//this.angle = (this.orientation % 4 + 4) * (90);\n\t\tthis.angle = this.orientation * 90*-1;\n\t\tthis.tweenAngle.setCurrentValue(this.angle);\n\t\tthis.tweenAngle.setTargetValue(this.angle);\n\t}",
"public double getWidthInDeg();",
"public Rotation to(Bearing target) {\n int diff = ((target.getValue() - this.getValue() + 8) % 8);\n switch (diff) {\n case 0:\n return Rotation.NONE;\n case 2:\n return Rotation.R90;\n case 4:\n return Rotation.R180;\n case 6:\n return Rotation.L90;\n default:\n throw new RuntimeException();\n// throw new RuntimeException(\"Not implemented...\");\n }\n }",
"float getDir() {\n return degrees(_rotVector.heading());\n }",
"private void turnBearing(int bearing) {\n int heading = gyro.getHeadingBasic();\n int cw = (bearing - heading + FULL_CIRCLE) % FULL_CIRCLE;\n int ccw = (heading - bearing + FULL_CIRCLE) % FULL_CIRCLE;\n\n // Turn the short way\n if (Math.abs(cw) <= Math.abs(ccw)) {\n turnAngle(cw);\n } else {\n turnAngle(-ccw);\n }\n }",
"public void normalize(){\n\tstrength = 50;\n\tdefense = 55;\n\tattRating = 0.4\t;\n }",
"public static double orientRoundup(double testOrient2){\n\t\tif (testOrient2 < 0) {testOrient2 += 360;}\n\t\tif (testOrient2 > 360) {testOrient2 -= 360;}\n\t\treturn testOrient2;\n\t}",
"public void normalize(){\n\t_defense = originalDefense;\n\t_strength = originalStrength;\n }",
"void onOrientationChanged(float azimuth, float pitch, float roll);",
"public static float rad2deg(float rad) {return rad/D2R;}",
"public void normalize()\n {\n\tdef += 200*counter;\n\tdmg -= 0.5*counter;\n\tcounter = 0;\n }",
"private double degToRadian(double angle)\n\t{\n\t\treturn angle/180*Math.PI;\n\t}",
"public void normalize() { sets length to 1\n //\n double length = Math.sqrt(x * x + y * y);\n\n if (length != 0.0) {\n float s = 1.0f / (float) length;\n x = x * s;\n y = y * s;\n }\n }",
"public void setHeading(String heading) {\n this.heading = heading;\n }",
"public void pitch(double angle) {\n heading = rotateVectorAroundAxis(heading, left, angle);\r\n up = rotateVectorAroundAxis(up, left, angle);\r\n\r\n }",
"private static double degToRad(float deg)\r\n/* 25: */ {\r\n/* 26:32 */ return deg * 3.141592653589793D / 180.0D;\r\n/* 27: */ }",
"private void fixDirections() {\n\t\tdouble sensDir = sens.getDirection();\n\t\tif (sensDir > 360) {\n\t\t\tsensDir -= 360;\n\t\t} // Rotate back around to keep it tidy\n\t\telse if (sensDir < 1) {\n\t\t\tsensDir += 360;\n\t\t}\n\t\tsens.setDirection(sensDir);\n\n\t\tif (desiredDirection > 360) {\n\t\t\tdesiredDirection -= 360;\n\t\t} // Rotate back around to keep it tidy\n\t\telse if (desiredDirection < 1) {\n\t\t\tdesiredDirection += 360;\n\t\t}\n\t}",
"public void rotate(float val){\n\t\trot = val % 360;\n\t\tif(w>0){\n\t\t\tinvalidate();\t\n\t\t}\n\t\t\n\t\t\n\t}"
]
| [
"0.72716206",
"0.7262095",
"0.6786755",
"0.66619223",
"0.6548429",
"0.61182356",
"0.6055653",
"0.6038536",
"0.59924054",
"0.59216213",
"0.59028864",
"0.5829018",
"0.57738596",
"0.5736534",
"0.5696143",
"0.56802064",
"0.5646758",
"0.56402135",
"0.56256914",
"0.56256914",
"0.56256914",
"0.56194717",
"0.5515267",
"0.54748553",
"0.54391545",
"0.5426813",
"0.5423389",
"0.54051214",
"0.5394727",
"0.539275",
"0.53728336",
"0.53478",
"0.5330208",
"0.5313244",
"0.5302241",
"0.52909696",
"0.52884775",
"0.52766937",
"0.5255709",
"0.5236951",
"0.5227403",
"0.52219296",
"0.5221836",
"0.5182715",
"0.5179251",
"0.5179251",
"0.5169981",
"0.5169223",
"0.5167434",
"0.51671183",
"0.5151982",
"0.5129017",
"0.51037073",
"0.5092258",
"0.50808126",
"0.5059588",
"0.5057671",
"0.50519186",
"0.50361603",
"0.503019",
"0.503019",
"0.5014091",
"0.5011555",
"0.49949047",
"0.49639007",
"0.49554217",
"0.49546194",
"0.49512",
"0.49455374",
"0.49445972",
"0.49206844",
"0.4877179",
"0.48751473",
"0.48351946",
"0.48348567",
"0.48269138",
"0.48238212",
"0.48160818",
"0.4801188",
"0.47991014",
"0.47636878",
"0.47518685",
"0.4743935",
"0.4739638",
"0.47358537",
"0.47350708",
"0.47322333",
"0.47282284",
"0.47269362",
"0.4710019",
"0.47014076",
"0.46935722",
"0.46911255",
"0.46890885",
"0.46712336",
"0.46666387",
"0.46562505",
"0.46548",
"0.4651786",
"0.46454442"
]
| 0.8149813 | 0 |
/ Computes the current battery voltage Copy from /robotcontroller/external/samples/ConceptTelemetry.java | double getBatteryVoltage(boolean first_reading) {
double result = Double.POSITIVE_INFINITY;
for (VoltageSensor sensor : hardwareMap.voltageSensor) {
double voltage = sensor.getVoltage();
if (voltage > 0) {
result = Math.min(result, voltage);
if(first_reading) break; // return the first valid reading (>0.0) to minimize overhead
}
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getVoltage ()\n {\n return _voltage;\n }",
"int getOutputVoltage();",
"int getOutputVoltageRaw();",
"public double getVoltage() {\n\t\treturn this.voltage;\n\t}",
"public synchronized float getVoltage(){\n\t\t getData(REG_MMXCOMMAND, buf, 1);\n\t\t // 37 is the constant given by Mindsensors support 5/2011 to return millivolts. KPT\n return (37f*(buf[0]&0xff))*.001f;\n\t}",
"EDataType getVoltage();",
"public static double getVoltage(LinearOpMode myLOM) {\n HardwareMap hardwareMap = myLOM.hardwareMap;\n\n // Use enum to access the voltage sensor without knowing its \n // name in the hardwareMap. Only one sensor will be found.\n List <VoltageSensor> voltageSensors;\n voltageSensors = hardwareMap.getAll(VoltageSensor.class);\n\n // make sure there is a sensor\n if (voltageSensors.size() > 0) {\n \n // iterate one time\n for (VoltageSensor myVoltageSensor : voltageSensors) {\n batteryVoltage = myVoltageSensor.getVoltage();\n } // end FOR loop\n } // end IF\n \n // provide voltage value to the calling Block\n return batteryVoltage;\n \n }",
"int getBattery();",
"EDataType getVoltagePerReactivePower();",
"public static final native int getChargingVoltage();",
"int getInputVoltageRaw();",
"int getInputVoltage();",
"private synchronized void updateBattery(){\n \tdouble battery = MathUtils.round(Battery.getVoltage(),1);\n \tstore(new DisplayableData(\"battery\", battery+\"V\", battery));\n }",
"public Byte getBattery() {\n return battery;\n }",
"@Override\r\n\tpublic float getEnergyConsumption() {\r\n\t\treturn 2500 - robot.getBatteryLevel();\r\n\t}",
"public int getBattery() {\n return battery_;\n }",
"public double getDistance(){\n return sensor.getVoltage()*100/2.54 - 12;\n }",
"public int getBatteryLevel() { return batteryLevel; }",
"private double getBatteryStatistic(String args) throws Exception\n {\n IntentFilter ifilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);\n Intent batteryStatus = contextToUse.registerReceiver(null, ifilter);\n int level = batteryStatus.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);\n int scale = batteryStatus.getIntExtra(BatteryManager.EXTRA_SCALE, -1);\n if(args.toLowerCase() == voltsArg)\n {\n return(level);\n }\n else\n {\n float batteryPct = level / (float)scale;\n return((double)batteryPct);\n }\n //TODO:IMPLEMENT BATTERY STATISTICS GETTER\n }",
"int getBatteryPercentage();",
"double a_right_back_drive_power ()\n {\n double l_return = 0.0;\n\n if (right_back_drv_Motor != null)\n {\n l_return = right_back_drv_Motor.getPower ();\n }\n\n return l_return;\n\n }",
"protected abstract void getPotentiometerValue(int value, int channelNo);",
"float getNominalVoltageOutOfPhase();",
"public native int getBatteryPowerRemaining();",
"public DJIBatteryCell (int voltage)\n {\n _voltage = voltage;\n }",
"public int getBattery() {\n return battery_;\n }",
"private double measureTemp() {\n try {\n analog0 = blueTooth.sensor(0);\n analog1 = blueTooth.sensor(1);\n return ((analog0 - analog1) * 5 * 100) / 1024.0;\n } catch (TimeoutException ex) {\n Logger.getLogger(TempMeasure.class.getName()).log(Level.SEVERE, null, ex);\n }\n return ((analog0 - analog1) * 5 * 100) / 1024.0;\n }",
"public double getMeterPower() {\n final double current = this.getMeterCurrent().isPresent() ? this.getMeterCurrent().get() : 0;\n final double voltage = this.getMeterVoltage().isPresent() ? this.getMeterVoltage().get() : 0;\n return current * voltage;\n }",
"public synchronized int getCurrentBatteryLevel() {\n return curBatteryLevel;\n }",
"private static float getVoltage(String id) throws IOException, InterruptedException, NumberFormatException {\n return pi4jSystemInfoConnector.getVoltage(id);\r\n\r\n }",
"public double getCurrentFuel();",
"public Long getCurrentBatteryLevel() {\n if (this.type == BikeType.ELECTRICAL) {\n return Math.round((this.getCurrentBattery() / this.getMaxBattery() * 100.0));\n } else {\n return 0L;\n }\n }",
"@java.lang.Override\n public float getBatteryPercentage() {\n return batteryPercentage_;\n }",
"@Override\r\n\tpublic double getEnergy(Robot robot)\r\n\t{\r\n\t\treturn robot.getEnergy(EnergyUnit.WATTSECOND);\r\n\t}",
"@java.lang.Override public google.maps.fleetengine.v1.BatteryStatus getBatteryStatus() {\n @SuppressWarnings(\"deprecation\")\n google.maps.fleetengine.v1.BatteryStatus result = google.maps.fleetengine.v1.BatteryStatus.valueOf(batteryStatus_);\n return result == null ? google.maps.fleetengine.v1.BatteryStatus.UNRECOGNIZED : result;\n }",
"private WifiBatteryStats getStats() {\n return mBatteryStats.getWifiBatteryStats();\n }",
"@Override\n public double getVelocity()\n {\n final String funcName = \"getVelocity\";\n double velocity = encoder.getVelocity() * encoderSign / 60.0;\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%f\", velocity);\n }\n\n return velocity;\n }",
"double a_left_back_drive_power()\n {\n double l_return = 0.0;\n if (left_back_drv_Motor != null)\n {\n l_return = left_back_drv_Motor.getPower ();\n }\n\n return l_return;\n\n }",
"@java.lang.Override\n public google.maps.fleetengine.v1.BatteryStatus getBatteryStatus() {\n @SuppressWarnings(\"deprecation\")\n google.maps.fleetengine.v1.BatteryStatus result = google.maps.fleetengine.v1.BatteryStatus.valueOf(batteryStatus_);\n return result == null ? google.maps.fleetengine.v1.BatteryStatus.UNRECOGNIZED : result;\n }",
"int getChargerCurrentRaw();",
"@java.lang.Override\n public float getBatteryPercentage() {\n return batteryPercentage_;\n }",
"private String tempConversion() {\n int reading = ((record[17] & 255) + ((record[21] & 0x30) << 4));\n\n double voltage = (reading * 3.3) / 1024;\n return formatter.format((voltage - .6) / .01);\n\n }",
"@Override\n\tprotected int getSensorData() {\n\t\treturn sensor.getLightValue();\n\t}",
"private void updateBatteryParameterValues(final int updateIndex) {\n\t\tUltraDuoPlusDialog.log.log(java.util.logging.Level.FINEST, GDE.STRING_ENTRY);\n\t\t//0=cellType,1=numCells,2=capacity,3=year,4=month,5=day,\n\t\t//6=chargeCurrent,7=deltaPeak,8=preDeltaPeakDelay,9=trickleCurrent,10=chargeOffTemperature,11=chargeMaxCapacity,12=chargeSafetyTimer,13=rePeakCycle,14=chargeVoltage,15=repaekDelay,16=flatLimitCheck,26=storeVoltage\n\t\t//17=dischargeCurrent,18=dischargOffVolage,19=dischargeOffTemp,20=dischargemaxCapacity,21=NiMhMatchVoltage\n\t\t//22=cycleDirection,23=cycleCount,24=chargeEndDelay,25=dischargeEndDelay\n\t\tif (updateIndex == 2) { //capacity change\n\t\t\tthis.memoryValues[6] = this.memoryValues[2]; //charge current 1.0 C\n\t\t\tthis.memoryValues[17] = this.memoryValues[2]; //discharge current 1.0 C\n\t\t}\n\t\tif (updateIndex != 6) {\n\t\t\t//this.memoryValues[12] = this.memoryValues[2] / 30; //chargeSafetyTimer\n\t\t\t//this.memoryValues[12] = this.memoryValues[12] - (this.memoryValues[12] % 10); //chargeSafetyTimer\n\t\t\tthis.memoryValues[20] = 105;//dischargemaxCapacity\n\t\t\t//this.memoryValues[22] = 1; //cycleDirection D->C\n\t\t\tthis.memoryValues[23] = 1; //cycleCount\n\t\t\tthis.memoryValues[24] = 30; //chargeEndDelay\n\t\t\tthis.memoryValues[25] = 10; //dischargeEndDelay\n\t\t\tswitch (this.memoryValues[0]) {\n\t\t\tcase 0: //NiCd\n\t\t\t\tthis.memoryValues[11] = 120;//chargeMaxCapacity\n\t\t\t\tthis.memoryValues[10] = (this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45 ? this.channelValues1[4] == 0 : this.channelValues1[0] == 0) ? 50 : (9 / 5) * 50 + 32; //chargeOffTemperature\n\t\t\t\tthis.memoryValues[12] = Double.valueOf(90 * (1.0 * this.memoryValues[2] / this.memoryValues[6])).intValue(); //chargeSafetyTimer\n\t\t\t\tthis.memoryValues[9] = updateIndex == 0 ? 550 : this.memoryValues[9]; //this.memoryValues[2] / 10; //trickleCurrent\n\t\t\t\tthis.memoryValues[7] = 7; //deltaPeak mV\n\t\t\t\tthis.memoryValues[8] = 3; //preDeltaPeakDelay min\n\t\t\t\tthis.memoryValues[13] = 1; //rePeakCycle\n\t\t\t\tthis.memoryValues[15] = 3; //rePaekDelay min\n\t\t\t\tthis.memoryValues[16] = 1; //flatLimitCheck\n\t\t\t\tthis.memoryValues[18] = 900;//dischargeVoltage/cell\n\t\t\t\tthis.memoryValues[19] = (this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45 ? this.channelValues1[4] == 0 : this.channelValues1[0] == 0) ? 65 : (9 / 5) * 65 + 32; //dischargeOffTemperature\n\t\t\t\tthis.memoryValues[21] = 1200;//NiMhMatchVoltage\n\t\t\t\tbreak;\n\t\t\tcase 1: //NiMh\n\t\t\t\tif (updateIndex == 2 && (this.stepChargeTabItem != null || !this.stepChargeTabItem.isDisposed())) { //capacity change\n\t\t\t\t\tthis.memoryStepValues[3] = this.memoryStepValues[7] = 0;\n\t\t\t\t\tthis.stepChargeComposite.setStepChargeValues(this.memoryValues[2], this.memoryValues[6], this.memoryStepValues);\n\n\t\t\t\t\tthis.stepChargeComposite.getStepChargeValues(UltraDuoPlusDialog.this.memoryStepValues);\n\t\t\t\t\tthis.chargeGroup.notifyListeners(SWT.Selection, new Event());\n\t\t\t\t}\n\t\t\t\tthis.memoryValues[11] = 120; //chargeMaxCapacity\n\t\t\t\tthis.memoryValues[10] = (this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45 ? this.channelValues1[4] == 0 : this.channelValues1[0] == 0) ? 50 : (9 / 5) * 50 + 32; //chargeOffTemperature\n\t\t\t\tthis.memoryValues[12] = Double.valueOf(90 * (1.0 * this.memoryValues[2] / this.memoryValues[6])).intValue(); //chargeSafetyTimer\n\t\t\t\tthis.memoryValues[9] = updateIndex == 0 ? 0 : this.memoryValues[9]; //this.memoryValues[2] / 10; //trickleCurrent\n\t\t\t\tthis.memoryValues[7] = 5; //deltaPeak mV\n\t\t\t\tthis.memoryValues[8] = 3; //preDeltaPeakDelay min\n\t\t\t\tthis.memoryValues[13] = 1; //rePeakCycle\n\t\t\t\tthis.memoryValues[15] = 3; //rePaekDelay min\n\t\t\t\tthis.memoryValues[16] = 1; //flatLimitCheck\n\t\t\t\tthis.memoryValues[18] = 1000; //dischargeVoltage/cell\n\t\t\t\tthis.memoryValues[19] = (this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45 ? this.channelValues1[4] == 0 : this.channelValues1[0] == 0) ? 65 : (9 / 5) * 65 + 32; //dischargeOffTemperature\n\t\t\t\tthis.memoryValues[21] = 1200; //NiMhMatchVoltage\n\t\t\t\tbreak;\n\t\t\tcase 2: //LiIo\n\t\t\t\tthis.memoryValues[11] = 105; //chargeMaxCapacity\n\t\t\t\tthis.memoryValues[10] = (this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45 ? this.channelValues1[4] == 0 : this.channelValues1[0] == 0) ? 45 : (9 / 5) * 45 + 32; //chargeOffTemperature\n\t\t\t\tthis.memoryValues[12] = Double.valueOf(120 * (1.0 * this.memoryValues[2] / this.memoryValues[6])).intValue(); //chargeSafetyTimer\n\t\t\t\tthis.memoryValues[9] = 0; //trickleCurrent\n\t\t\t\tthis.memoryValues[14] = 4100; //chargeVoltage/cell\n\t\t\t\tthis.memoryValues[26] = 3800; //storeVoltage/cell\n\t\t\t\tthis.memoryValues[18] = 3000; //dischargeVoltage/cell\n\t\t\t\tthis.memoryValues[19] = (this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45 ? this.channelValues1[4] == 0 : this.channelValues1[0] == 0) ? 55 : (9 / 5) * 55 + 32; //dischargeOffTemperature\n\t\t\t\tbreak;\n\t\t\tcase 3: //LiPo\n\t\t\t\tthis.memoryValues[11] = 105; //chargeMaxCapacity\n\t\t\t\tthis.memoryValues[10] = (this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45 ? this.channelValues1[4] == 0 : this.channelValues1[0] == 0) ? 45 : (9 / 5) * 45 + 32; //chargeOffTemperature\n\t\t\t\tthis.memoryValues[12] = Double.valueOf(120 * (1.0 * this.memoryValues[2] / this.memoryValues[6])).intValue(); //chargeSafetyTimer\n\t\t\t\tthis.memoryValues[9] = 0; //trickleCurrent\n\t\t\t\tthis.memoryValues[14] = 4200; //chargeVoltage/cell\n\t\t\t\tthis.memoryValues[26] = 3900; //storeVoltage/cell\n\t\t\t\tthis.memoryValues[18] = 3100; //dischargeVoltage/cell\n\t\t\t\tthis.memoryValues[19] = (this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45 ? this.channelValues1[4] == 0 : this.channelValues1[0] == 0) ? 55 : (9 / 5) * 55 + 32; //dischargeOffTemperature\n\t\t\t\tbreak;\n\t\t\tcase 4: //LiFe\n\t\t\t\tthis.memoryValues[11] = 105; //chargeMaxCapacity\n\t\t\t\tthis.memoryValues[10] = (this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45 ? this.channelValues1[4] == 0 : this.channelValues1[0] == 0) ? 45 : (9 / 5) * 45 + 32; //chargeOffTemperature\n\t\t\t\tthis.memoryValues[12] = Double.valueOf(120 * (1.0 * this.memoryValues[2] / this.memoryValues[6])).intValue(); //chargeSafetyTimer\n\t\t\t\tthis.memoryValues[9] = 0; //trickleCurrent\n\t\t\t\tthis.memoryValues[14] = 3600; //chargeVoltage/cell\n\t\t\t\tthis.memoryValues[26] = 3500; //storeVoltage/cell\n\t\t\t\tthis.memoryValues[18] = 2500; //dischargeVoltage/cell\n\t\t\t\tthis.memoryValues[19] = (this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45 ? this.channelValues1[4] == 0 : this.channelValues1[0] == 0) ? 55 : (9 / 5) * 55 + 32; //dischargeOffTemperature\n\t\t\t\tbreak;\n\t\t\tcase 5: //PB\n\t\t\t\tthis.memoryValues[6] = this.memoryValues[2] / 10; //charge current 0.1 C\n\t\t\t\tthis.memoryValues[11] = 105; //chargeMaxCapacity\n\t\t\t\tthis.memoryValues[10] = (this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45 ? this.channelValues1[4] == 0 : this.channelValues1[0] == 0) ? 50 : (9 / 5) * 50 + 32; //chargeOffTemperature\n\t\t\t\tthis.memoryValues[12] = 905; //chargeSafetyTimer\n\t\t\t\tthis.memoryValues[9] = this.memoryValues[2] / 10; //trickleCurrent\n\t\t\t\tthis.memoryValues[14] = 2300; //chargeVoltage/cell\n\t\t\t\tthis.memoryValues[18] = 1800; //dischargeVoltage/cell\n\t\t\t\tthis.memoryValues[19] = (this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45 ? this.channelValues1[4] == 0 : this.channelValues1[0] == 0) ? 55 : (9 / 5) * 55 + 32; //dischargeOffTemperature\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse { //updateIndex == 6\n\t\t\tswitch (this.memoryValues[0]) {\n\t\t\tcase 0: //NiCd\n\t\t\t\tthis.memoryValues[12] = Double.valueOf(90 * (1.0 * this.memoryValues[2] / this.memoryValues[6])).intValue(); //chargeSafetyTimer\n\t\t\t\tbreak;\n\t\t\tcase 1: //NiMh\n\t\t\t\tthis.memoryValues[12] = Double.valueOf(90 * (1.0 * this.memoryValues[2] / this.memoryValues[6])).intValue(); //chargeSafetyTimer\n\t\t\t\tbreak;\n\t\t\tcase 2: //LiIo\n\t\t\t\tthis.memoryValues[12] = Double.valueOf(120 * (1.0 * this.memoryValues[2] / this.memoryValues[6])).intValue(); //chargeSafetyTimer\n\t\t\t\tbreak;\n\t\t\tcase 3: //LiPo\n\t\t\t\tthis.memoryValues[12] = Double.valueOf(120 * (1.0 * this.memoryValues[2] / this.memoryValues[6])).intValue(); //chargeSafetyTimer\n\t\t\t\tbreak;\n\t\t\tcase 4: //LiFe\n\t\t\t\tthis.memoryValues[12] = Double.valueOf(120 * (1.0 * this.memoryValues[2] / this.memoryValues[6])).intValue(); //chargeSafetyTimer\n\t\t\t\tbreak;\n\t\t\tcase 5: //PB\n\t\t\t\tthis.memoryValues[12] = 905; //chargeSafetyTimer\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\t\n\t\tthis.memoryValues[12] = this.memoryValues[12] > 905 ? 905 : this.memoryValues[12];\n\n\t\t//update parameter controls\n\t\tfor (int i = 0; i < UltramatSerialPort.SIZE_MEMORY_SETUP; i++) {\n\t\t\tif (this.memoryParameters[i] != null) {\n\t\t\t\tthis.memoryParameters[i].setSliderSelection(this.memoryValues[i]);\n\t\t\t}\n\t\t}\n\t\tif (UltraDuoPlusDialog.log.isLoggable(java.util.logging.Level.FINER)) {\n\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\tfor (int i = 0; i < UltramatSerialPort.SIZE_MEMORY_SETUP; i++) {\n\t\t\t\tsb.append(String.format(\"%04d\", this.memoryValues[i])).append(GDE.STRING_LEFT_BRACKET).append(i).append(GDE.STRING_RIGHT_BRACKET_COMMA); //$NON-NLS-1$\n\t\t\t}\n\t\t\tUltraDuoPlusDialog.log.log(java.util.logging.Level.FINER, sb.toString());\n\t\t}\n\t}",
"public abstract double readLightValue();",
"public void collect() {\n _collectorMotor.set(collectSpeed);\n //system..out.println(\"Collector Power: \" + _collectorMotor.get());\n }",
"@Override\n public double getPower()\n {\n final String funcName = \"getPower\";\n double power = motor.get();\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%f\", power);\n }\n\n return power;\n }",
"double a_right_front_drive_power ()\n {\n double l_return = 0.0;\n\n if (right_front_drv_Motor != null)\n {\n l_return = right_front_drv_Motor.getPower ();\n }\n\n return l_return;\n\n }",
"float getMainUtteranceDynamicGain();",
"public double getVolga() {\r\n return volga;\r\n }",
"public double getValue() {\n\t\treturn sensorval;\n\t}",
"@Override\n\tprotected void GetDataFromNative() {\n\t\tAverageFuelRate = CAN1Comm.Get_AverageFuelRate_333_PGN65390();\n\t\tLatestFuelConsumed = CAN1Comm.Get_ADaysFuelUsed_1405_PGN65390();\t\n\t}",
"public double ElectricCurrent() {\n return OCCwrapJavaJNI.Units_Dimensions_ElectricCurrent(swigCPtr, this);\n }",
"public long getMeasRcvdPowerdBm() {\r\n return measRcvdPowerdBm;\r\n }",
"private void onFullBattery() {\n\n }",
"public double getEnginePower(){\n return enginePower;\n }",
"public static final float getBatteryGain() {\r\n\t\treturn BATTERY_GAIN;\r\n\t}",
"double getMotorVelocity( MotorName m ) {\n double vol = 0.0;\n if( motor_read_mode_==MotorBulkReadMode.BULK_READ_MANUAL && loop_cnt_!=last_motor_read_loop_id_ ) {\n // Important Step 4: If you are using MANUAL mode, you must clear the BulkCache once per control cycle\n for( LynxModule module : all_hubs_ ) {\n module.clearBulkCache();\n }\n }\n switch ( m ) {\n case MOTOR_LF:\n vol = motorLF_.getVelocity();\n break;\n case MOTOR_LB:\n vol = motorLB_.getVelocity();\n break;\n case MOTOR_RF:\n vol = motorRF_.getVelocity();\n break;\n case MOTOR_RB:\n vol = motorRB_.getVelocity();\n break;\n case MOTOR_LEFT_INTAKE:\n vol = motor_left_intake_.getVelocity();\n break;\n case MOTOR_RIGHT_INTAKE:\n vol = motor_right_intake_.getVelocity();\n break;\n case MOTOR_LIFT:\n vol = motor_lift_.getVelocity();\n break;\n default:\n break;\n }\n last_motor_read_loop_id_ = loop_cnt_ ;\n return vol;\n }",
"protected byte[] getMeasuredRoomTemperature() {return null;}",
"public double getValue()\n\t{\n\t\treturn ifD1.getValue();// X100 lux\n\t}",
"public double getVelocityRPM();",
"org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry getTelemetry();",
"public float getMicGainDb();",
"@java.lang.Override public int getBatteryStatusValue() {\n return batteryStatus_;\n }",
"public double getVolumeLitres() {\n return volumeLitres;\n }",
"public double getHumidity()\n {\n return humidity;\n }",
"@Override // same as gt sum of all hatches\n public long getMaxInputVoltage() {\n return getMaxInputVoltageSum();\n }",
"public abstract double getMeasurement();",
"public abstract double getMeasurement();",
"public double lhv(){\n return comp.getLHV() * (molarMass()/1000) * (1000/PhysicalProperties.MOLAR_VOLUME);\n }",
"public float batteryLevel() {\n return 1;\n }",
"double getMagnetic(double reading);",
"protected double getEnginePower(){\n return enginePower;\n }",
"@Generated\n @Selector(\"batteryLevel\")\n public native float batteryLevel();",
"public static int getBatteryLevel() {\n if (utilitiesDll == null) {\n return -1;\n }\n return utilitiesDll.RecupererBatterie();\n }",
"@Override\n public List<Object> getBatteryLog(Map<String, Object> condition) {\n return null;\n }",
"@java.lang.Override public int getBatteryStatusValue() {\n return batteryStatus_;\n }",
"double getPWMRate();",
"private double getVelocity() {\n \tif (currentState == DriveState.accelerating) {\n \t\treturn acceleration * timer.get();\n \t}\n \telse if (currentState == DriveState.cruisung) {\n \t\treturn maxVelocity;\n \t}\n \telse if (currentState == DriveState.decelerating) {\n \t\treturn maxVelocity - acceleration * (timer.get());\n \t}\n \t\t\n \treturn 0;\n }",
"public double[] getCurrentMotorVelocitiesInCentimetersPerSecond()\n {\n return finchController.getCurrentMotorVelocitiesInCentimetersPerSecond();\n }",
"public double getTemp(){\n return currentTemp;\n }",
"int getLumOff(){\n return getPercentageValue(\"lumOff\");\n }",
"public int getHumidity(){\n return VirtualHardwareManager.getInstance().getHumidity();\n }",
"public static List<Double> getBatteryList(String port, String year, String month, String day) throws IOException, InterruptedException{\r\n\t\tvar detailsList = getSensors(port, year, month, day);\r\n\t\tvar numOfSensors = detailsList.size();\r\n\t\tvar batteryList = new ArrayList<Double>();\r\n\t\tfor(var i=0; i<numOfSensors; i++) {\r\n\t\t\tvar details = detailsList.get(i);\r\n\t\t\tvar battery = details.battery;\r\n\t\t\tbatteryList.add(battery);\r\n\t\t}\r\n\t\treturn batteryList;\r\n\t}",
"public double getCyclinderVolume();",
"@VTID(14)\r\n double getValue();",
"protected double[] getCurrentSteps() {\n// final int speedSteps = mPowerProfile.getNumSpeedSteps(); //amount of CPU working Frequents\n final int speedSteps = 10;\n final double[] powerCpuNormal = new double[speedSteps];\n for (int p = 0; p < speedSteps; p++) {\n// powerCpuNormal[p] = mPowerProfile.getAveragePower(PowerProfile.POWER_CPU_ACTIVE, p);\n powerCpuNormal[p] = 100 * (p + 1);\n }\n\n return powerCpuNormal;\n }",
"public void setVoltage(double voltage) {\n\t\tthis.voltage = voltage;\n\t}",
"double getAcceleration ();",
"public Double getTVA()\n {\n return (20.0/100.0);\n }",
"@Override\n public double getValue() {\n return currentLoad;\n }",
"public interface OnBatteryLow{void changeBrightness(int buttatyPercents);\n}",
"public float getPollData() {\r\n // FIXME getDeadZone ??\r\n if (jinputComponent != null) {\r\n // value = jinputComponent.getPollData(); <- heh - this borked everything\r\n // ! :) cuz abs(value - component.value) :P\r\n return jinputComponent.getPollData();\r\n } // else\r\n // FIXME - handle virtual input\r\n return virtualValue;\r\n }",
"Measurement getAccumulation();",
"@ComputerMethod\n private FloatingLong getEnergyUsage() {\n return energyContainer.getEnergyPerTick();\n }",
"public double getCurrent() {\n return elevatorSpark.getOutputCurrent();\n }",
"public double getClimbMotorPercentPower() {\n\t\treturn climbMotor2.getMotorOutputPercent();\n\t}",
"public double get_thermal_reading() {\n\t\t\n\t\treturn 0;\n\t}",
"@Override\n public double obtenerVolumen(){\n return (1.0 / 3.0) * c.obtenerArea() * c.obtenerAltura();\n }",
"int getEnergy();"
]
| [
"0.68579966",
"0.6812054",
"0.6803465",
"0.67168635",
"0.65646476",
"0.6459503",
"0.6395143",
"0.63831824",
"0.6365473",
"0.63416904",
"0.6293411",
"0.6143786",
"0.6133401",
"0.6117254",
"0.6065154",
"0.5895203",
"0.5868969",
"0.58664834",
"0.5857332",
"0.584944",
"0.583031",
"0.58128774",
"0.57825136",
"0.5770472",
"0.5764552",
"0.575454",
"0.56880283",
"0.56866634",
"0.5672677",
"0.56483155",
"0.5625155",
"0.5620911",
"0.5604613",
"0.55872464",
"0.554517",
"0.5538212",
"0.5511435",
"0.5504567",
"0.5502664",
"0.5498563",
"0.54979205",
"0.5492094",
"0.5488276",
"0.5459901",
"0.54592854",
"0.5456342",
"0.5428649",
"0.54282236",
"0.54243755",
"0.54125196",
"0.54085094",
"0.53908634",
"0.5383717",
"0.5355362",
"0.5352629",
"0.53474885",
"0.5345007",
"0.5338995",
"0.53241247",
"0.5322561",
"0.5317949",
"0.5316278",
"0.5313469",
"0.5311171",
"0.530817",
"0.5296917",
"0.52927095",
"0.52898604",
"0.52898604",
"0.52794945",
"0.52761495",
"0.52754253",
"0.52681756",
"0.5267118",
"0.52584606",
"0.5255223",
"0.5254536",
"0.5238059",
"0.5234698",
"0.52189326",
"0.5218283",
"0.5208342",
"0.5203842",
"0.52036375",
"0.5197569",
"0.51956123",
"0.5195158",
"0.51913387",
"0.51792604",
"0.5169551",
"0.5156957",
"0.5152369",
"0.5152249",
"0.51518244",
"0.5146483",
"0.5141013",
"0.51372176",
"0.5128989",
"0.5128878",
"0.51286453"
]
| 0.6518112 | 5 |
/ Return true if all drive motors' encoder are 0s | boolean areAllDriveMotorsReset() {
return ( getMotorEncoder(MotorName.MOTOR_LF)==0
&& getMotorEncoder(MotorName.MOTOR_LB)==0
&& getMotorEncoder(MotorName.MOTOR_RF)==0
&& getMotorEncoder(MotorName.MOTOR_RB)==0
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static boolean checkEncoder(TalonSRX... motors)\n {\n boolean result = true;\n\n for (TalonSRX t : motors)\n {\n boolean isPresent = t.getSensorCollection().getPulseWidthRiseToRiseUs() != 0;\n\n if (isPresent)\n {\n System.out.println(String.format(\"Motor %d encoder present\", t.getDeviceID()));\n }\n else\n {\n ConsoleLogger.error(String.format(\"Encoder not present for talon %d\", t.getDeviceID()));\n }\n result &= isPresent;\n }\n return result;\n }",
"public boolean isZero() {\n\t\treturn ((get() >> 7) & 1) == 1;\n\t}",
"public boolean mo17601d() {\n return (this.f2600h == 0 && this.f2601i == 0) ? false : true;\n }",
"public boolean perdu() {\r\n return this.robots.isEmpty();\r\n }",
"public boolean m21289OooO0O0() {\n for (int i = 1; i < this.f22760OooO0O0; i++) {\n if (this.f22759OooO00o[i] != 0) {\n return false;\n }\n }\n return this.f22759OooO00o[0] == 1;\n }",
"@Override\n\tpublic boolean\n\tisZero()\n\t{\n\t\treturn( data[0] == 0 && data[1] == 0 && data[2] == 0 );\n\t}",
"public boolean isZero() {\r\n return (this.getReal() == 0 && this.getImag() == 0) ? true : false;\r\n }",
"public boolean isZero() {\r\n for (int i = 0; i < this.getDimension(); i++) {\r\n if (this.getComponent(i) != 0)\r\n return false;\r\n }\r\n return true;\r\n }",
"public boolean mo28509d() {\n return this.f11168b.size() > 0;\n }",
"public boolean getZeroFlag() {\n // PROGRAM 1: Student must complete this method\n // return value is a placeholder, student should replace with correct return\n int zero = 0; //integer to keep track of how many '1's are in the output array\n for (int i = 0; i < output.length; i++) {\n if (output[i]) { //when we come across a 1, add 1 to the zero integer.\n zero += 1;\n }\n }\n if (zero > 0) { //if the method caught any '1's, then the output binary number is not 0.\n zeroFlag = false;\n } else {\n zeroFlag = true; //otherwise, it is\n }\n return zeroFlag; //return the zeroFlag\n }",
"public boolean carParkEmpty() {\r\n\t\tif (getNumCars() == 0 && getNumMotorCycles() == 0) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public boolean mo8481d() {\n return !this.f3533c.isEmpty() && !this.f3532b.isEmpty();\n }",
"public boolean mo8478c() {\n return this.f3532b.size() > 0;\n }",
"public boolean mo25065c() {\n return mo25066d() == 1;\n }",
"private static boolean checkZero(int[] count) {\n\t\tfor (int i = 0; i < count.length; i++) {\n\t\t\tif (count[i] != 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public boolean isZero() {\n\n return realPart == 0d && imaginaryPart == 0d;\n }",
"public boolean isZero() {\n return mJavaSize == 0 && mRegisteredNativeSize == 0;\n }",
"public boolean mo7629p() {\n return this.f4372b.size() > 0;\n }",
"public boolean encoderDrive(int encoderDelta, driveStyle drive, double motorPower, double timeout, DcMotor[] motors)\n {\n\n\n switch(drive)\n {\n case FORWARD:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(0, -motorPower, 0)[0]);\n motors[1].setPower(setPower(0, -motorPower, 0)[1]);\n motors[2].setPower(setPower(0, -motorPower, 0)[2]);\n motors[3].setPower(setPower(0, -motorPower, 0)[3]);\n\n while (motors[2].getCurrentPosition() >= (-encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n\n\n }\n\n case BACKWARD:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(0, motorPower, 0)[0]);\n motors[1].setPower(setPower(0, motorPower, 0)[1]);\n motors[2].setPower(setPower(0, motorPower, 0)[2]);\n motors[3].setPower(setPower(0, motorPower, 0)[3]);\n\n while (motors[2].getCurrentPosition() <= (encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case STRAFE_LEFT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n while (motors[2].getCurrentPosition() >= (encoderReadingLB - encoderDelta))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case STRAFE_RIGHT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(motorPower, 0, 0)[3]);\n\n while (motors[2].getCurrentPosition() >= (-encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case FORWARD_LEFT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(-motorPower, -motorPower, 0)[0]);\n motors[1].setPower(setPower(-motorPower, -motorPower, 0)[1]);\n motors[2].setPower(setPower(-motorPower, -motorPower, 0)[2]);\n motors[3].setPower(setPower(-motorPower, -motorPower, 0)[3]);\n\n while (motors[2].getCurrentPosition() <= (encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case FORWARD_RIGHT:\n {\n double encoderReadingRB = motors[1].getCurrentPosition();\n motors[0].setPower(setPower(motorPower, -motorPower, 0)[0]);\n motors[1].setPower(setPower(motorPower, -motorPower, 0)[1]);\n motors[2].setPower(setPower(motorPower, -motorPower, 0)[2]);\n motors[3].setPower(setPower(motorPower, -motorPower, 0)[3]);\n\n while (motors[1].getCurrentPosition() >= (-encoderDelta + encoderReadingRB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case BACKWARD_LEFT:\n {\n double encoderReadingRB = motors[1].getCurrentPosition();\n motors[0].setPower(setPower(-motorPower, motorPower, 0)[0]);\n motors[1].setPower(setPower(-motorPower, motorPower, 0)[1]);\n motors[2].setPower(setPower(-motorPower, motorPower, 0)[2]);\n motors[3].setPower(setPower(-motorPower, motorPower, 0)[3]);\n\n while (motors[1].getCurrentPosition() <= (encoderDelta + encoderReadingRB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case BACKWARD_RIGHT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(motorPower, motorPower, 0)[0]);\n motors[1].setPower(setPower(motorPower, motorPower, 0)[1]);\n motors[2].setPower(setPower(motorPower, motorPower, 0)[2]);\n motors[3].setPower(setPower(motorPower, motorPower, 0)[3]);\n\n while (motors[2].getCurrentPosition() >= (-encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case PIVOT_LEFT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(0, 0, -motorPower)[0]);\n motors[1].setPower(setPower(0, 0, -motorPower)[1]);\n motors[2].setPower(setPower(0, 0, -motorPower)[2]);\n motors[3].setPower(setPower(0, 0, -motorPower)[3]);\n\n while (motors[2].getCurrentPosition() >= (-encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case PIVOT_RIGHT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(0, 0, motorPower)[0]);\n motors[1].setPower(setPower(0, 0, motorPower)[1]);\n motors[2].setPower(setPower(0, 0, motorPower)[2]);\n motors[3].setPower(setPower(0, 0, motorPower)[3]);\n\n while (motors[2].getCurrentPosition() <= (encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n\n }\n\n return true;\n }",
"public boolean zeroFinder()\n {\n return zeroFinder(0);\n }",
"public Boolean checkHercules() {\r\n \tBoolean flag = true;\r\n \tfor(int i = 0; i < 44; i++) {\r\n \t\tif(hercules[i] == 0) {\r\n \t\t\tflag = false;\r\n \t\t}\r\n \t}\r\n \treturn flag;\r\n }",
"public boolean mo20821e() {\n return this.f18932b.isEmpty();\n }",
"private final synchronized boolean m60360c() {\n return this.f49750a.getAll().isEmpty();\n }",
"public boolean m21293OooO0OO() {\n if (this.f22758OooO00o == 0) {\n return true;\n }\n for (int i = 0; i < this.f22760OooO0O0; i++) {\n if (this.f22759OooO00o[i] != 0) {\n return false;\n }\n }\n return true;\n }",
"public boolean isZero()\r\n {\r\n boolean is = true;\r\n for (int i = 0; i < SIZE; i++)\r\n {\r\n if ( this.myArray[i] != 0)\r\n {\r\n is = false;\r\n }\r\n }\r\n return is;\r\n }",
"public boolean hasZeroVolume() {\n\t\treturn getSize() == 0;\n\t}",
"public boolean mo8172b() {\n return this.f720a.isEmpty();\n }",
"public static boolean controlManager() {\n boolean empty = false;\n\n if(OnAirPlane.isEmpty()) {\n empty = true;\n }\n return empty;\n }",
"private void testEncoder() {\n\n flMotor.setPower(0.50);\n frMotor.setPower(0.50);\n blMotor.setPower(0.50);\n brMotor.setPower(0.50);\n\n // wait while opmode is active and left motor is busy running to position.\n\n while (opModeIsActive() && flMotor.isBusy()) {\n telemetry.addData(\"encoder-fwd-left\", flMotor.getCurrentPosition() + \" busy=\" + flMotor.isBusy());\n telemetry.addData(\"encoder-fwd-right\", frMotor.getCurrentPosition() + \" busy=\" + frMotor.isBusy());\n telemetry.addData(\"encoder-bck-left\", blMotor.getCurrentPosition() + \" busy=\" + blMotor.isBusy());\n telemetry.addData(\"encoder-bck-right\", brMotor.getCurrentPosition() + \" busy=\" + brMotor.isBusy());\n telemetry.update();\n idle();\n }\n\n // set motor power to zero to turn off motors. The motors stop on their own but\n // power is still applied so we turn off the power.\n\n flMotor.setPower(0.0);\n frMotor.setPower(0.0);\n blMotor.setPower(0.0);\n brMotor.setPower(0.0);\n\n // wait 5 sec to you can observe the final encoder position.\n\n resetStartTime();\n\n while (opModeIsActive() && getRuntime() < 5) {\n telemetry.addData(\"encoder-fwd-left-end\", flMotor.getCurrentPosition());\n telemetry.addData(\"encoder-fwd-right-end\", frMotor.getCurrentPosition());\n telemetry.addData(\"encoder-bck-left-end\", blMotor.getCurrentPosition());\n telemetry.addData(\"encoder-bck-right-end\", brMotor.getCurrentPosition());\n telemetry.update();\n idle();\n }\n\n // From current position back up to starting point. In this example instead of\n // having the motor monitor the encoder we will monitor the encoder ourselves.\n\n flMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n frMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n blMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n brMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n flMotor.setTargetPosition(0);\n frMotor.setTargetPosition(0);\n blMotor.setTargetPosition(0);\n brMotor.setTargetPosition(0);\n\n // Power sign matters again as we are running without encoder.\n flMotor.setPower(-0.50);\n frMotor.setPower(-0.50);\n blMotor.setPower(-0.50);\n brMotor.setPower(-0.50);\n\n while (opModeIsActive() && flMotor.getCurrentPosition() > flMotor.getTargetPosition()) {\n telemetry.addData(\"encoder-back-left\", flMotor.getCurrentPosition());\n telemetry.addData(\"encoder-back-right\", frMotor.getCurrentPosition());\n telemetry.addData(\"encoder-back-left\", blMotor.getCurrentPosition());\n telemetry.addData(\"encoder-back-right\", brMotor.getCurrentPosition());\n telemetry.update();\n idle();\n }\n\n // set motor power to zero to stop motors.\n flMotor.setPower(0.0);\n frMotor.setPower(0.0);\n blMotor.setPower(0.0);\n brMotor.setPower(0.0);\n\n resetStartTime();\n\n while (opModeIsActive() && getRuntime() < 5) {\n telemetry.addData(\"encoder-back-left-end\", flMotor.getCurrentPosition());\n telemetry.addData(\"encoder-back-right-end\", frMotor.getCurrentPosition());\n telemetry.addData(\"encoder-back-left-end\", blMotor.getCurrentPosition());\n telemetry.addData(\"encoder-back-right-end\", brMotor.getCurrentPosition());\n telemetry.update();\n idle();\n }\n }",
"public boolean mo9235as() {\n return false;\n }",
"protected boolean isFinished() {\n \tif (Math.abs(_finalTickTargetLeft - Robot.driveTrain.getEncoderLeft()) <= 0 &&\n \t\t\tMath.abs(_finalTickTargetRight - Robot.driveTrain.getEncoderRight()) <= 0)\n \t{\n \t\treturn true;\n \t}\n return false;\n }",
"@Override\n public boolean isConnected()\n {\n // hacky, but should work\n return motor.getFirmwareString() != null;\n }",
"public boolean mo133098c() {\n return !this.f113305c.isEmpty();\n }",
"private final synchronized boolean m12565b() {\n return this.f10287a.getAll().isEmpty();\n }",
"public void resetDriveEncoders() {\r\n motorLeft.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\r\n motorRight.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\r\n\r\n motorLeft.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\r\n motorRight.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\r\n }",
"public final boolean mo88313a() {\n if (this.f90938h == null || this.f90934d.getVisibility() == 0) {\n return true;\n }\n return false;\n }",
"boolean motorsAreBusy();",
"public boolean mo9328f() {\n boolean z;\n synchronized (this.f8650a) {\n z = mo9316b() != null;\n }\n return z;\n }",
"public boolean isEmpty() {\r\n\tfor (int i = 0; i < this.size; i++) {\r\n\t if (this.territory[0][i] != 0 || this.territory[1][i] != 0) {\r\n\t\treturn false;\r\n\t }\r\n\t}\r\n\r\n\treturn true;\r\n }",
"@SuppressWarnings(\"unused\")\n\tprivate boolean wasAnyButtonPressed() {\n\t\tfor (ArcadeButton button : buttons) {\n\t\t\tif (button.getPressCounter() > 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isRCODEInFlagAllZero()\n {\n if ((this.flag & 0x000F) == 0)\n {\n return true;\n }\n else return false;\n }",
"@Override\n public boolean isNullSigActive() {\n if (!isShutDown()) {\n for (Mounted m : getMisc()) {\n EquipmentType type = m.getType();\n if (type.hasFlag(MiscType.F_NULLSIG) && m.curMode().equals(\"On\") && m.isReady()) {\n return true;\n }\n }\n }\n return false;\n }",
"public boolean isZero() {\n\t\treturn x == 0.0 && y == 0.0 && z == 0.0;\n\t}",
"private boolean m56640d() {\n return !this.f40954f || this.f40951c.isEmpty();\n }",
"@Override\n protected boolean isFinished() {\n if(direction){\n if(leftTarget <= Robot.driveTrain.getLeftEncoderDistanceInches() || rightTarget <= Robot.driveTrain.getRightEncoderDistanceInches()){\n turnPID.resetPID();\n return true;\n } else{\n return false;\n }\n \n } else{\n if(leftTarget >= Robot.driveTrain.getLeftEncoderDistanceInches() || rightTarget >= Robot.driveTrain.getRightEncoderDistanceInches()){\n turnPID.resetPID();\n return true;\n } else{\n return false;\n }\n }\n \n \n }",
"public boolean mo25945i() {\n if (this.f29076c == 0) {\n return true;\n }\n return false;\n }",
"private void findZeros() {\n\t\t\n\t\tif (realFinal == 0) {\n\t\t\thasZeroR = true;\n\t\t} if (imagFinal == 0) {\n\t\t\thasZeroI = true;\n\t\t}\n\t\t\n\t}",
"@Override\r\n\tpublic boolean isEmpty() {\n\t\tboolean bandera=true;\r\n\t\tif(vector.size()>0){\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tbandera=false;\r\n\t\t}\r\n\t\treturn bandera;\r\n\t}",
"public boolean isZero()\r\n\t{\r\n\t\tif(this.get_coefficient()==0)\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"protected boolean isFinished() {\n //boolean onTarget = Math.abs(\n //encoderValue - Math.abs(Robot.arm.getArmEncoderValue())) <= RobotMap.ArmConstants.ARM_ENCODER_BUFFER;\n boolean hasBeenZeroed = Robot.arm.hasButtonBeenPressed();\n boolean onTarget = false;\n if(initialPos < setpoint) {\n onTarget = Math.abs(Robot.arm.getArmEncoderValue()) >= setpoint;\n }else if(initialPos >= setpoint) {\n onTarget = Math.abs(Robot.arm.getArmEncoderValue()) <= setpoint;\n }\n return this.isTimedOut() || !hasBeenZeroed || onTarget;\n }",
"public boolean mo9240ax() {\n return false;\n }",
"public boolean mo17610b() {\n return (this.f2616d == 0 && this.f2617e == 0) ? false : true;\n }",
"public boolean mo17609a() {\n return (this.f2613a == null && this.f2614b == 0) ? false : true;\n }",
"public boolean mo255c() {\n return false;\n }",
"private boolean isReady() {\n for (Rotor rotor : rotors)\n if (rotor == null)\n return false;\n return (stator != null && reflector != null && plugboard != null);\n }",
"private boolean m25425c() {\n return this.f19110l.m6581e().m6512j() != null;\n }",
"public boolean isZero() {return false;}",
"private boolean correctValues() {\n try {\n //TODO: check COM ports\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n return true;\n }",
"public boolean isSilent() {\n for(int iSndGrp = 0, i = 0;\n iSndGrp < XaAdpcmDecoder.ADPCM_SOUND_GROUPS_PER_SECTOR;\n iSndGrp++, i += XaAdpcmDecoder.SIZEOF_SOUND_GROUP)\n {\n // just check if all ADPCM values are 0\n for (int j = 16; j < XaAdpcmDecoder.SIZEOF_SOUND_GROUP; j++) {\n if (getCdSector().readUserDataByte(i+j) != 0)\n return false;\n }\n }\n return true;\n }",
"protected boolean isFinished() {\r\n if (Math.abs(motorWithEncoder.getSetpoint() - motorWithEncoder.getPosition()) < 0.5) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }",
"public boolean hayMovimientos() {\r\n boolean ret = false;\r\n for (int i = 0; i < movimientos.length; i++) {\r\n if (movimientos[i]) {\r\n ret = true;\r\n }\r\n }\r\n return ret;\r\n }",
"public boolean mo7630q() {\n return !this.f4373c.isEmpty() && !this.f4372b.isEmpty();\n }",
"public boolean mo12709a() {\n int size = this.f13677p.size();\n for (int i = 0; i < size; i++) {\n if (!((C5323i) this.f13677p.get(i)).f13721p) {\n return true;\n }\n }\n return false;\n }",
"public boolean isZero() {\r\n Vector3 veucl3 = this.getEuclidVector3();\r\n return (veucl3 == null) ? false : veucl3.isZero();\r\n }",
"private boolean isGoodState() {\n\t resetMask();\n\t checkHorizontal();\n\t checkVertical();\n\n\t for(int i = 0; i < maskArray.length; i++){\n\t for (int j = 0; j < maskArray[i].length; j++){\n\n\t if (maskArray[i][j] == 1){\n\t return false;\n\t }\n\n\t }\n\t }\n\n\t return true;\n }",
"public boolean mo4324N() {\n return this.f3140u.mo5116d() == 0 && this.f3140u.mo5109a() == 0;\n }",
"private boolean isComplete() {\n for (boolean b : bitfield) {\n if (!b) {\n return false;\n }\n }\n return true;\n }",
"public boolean mo881m() {\n return this.f619n.mo829q() && mo853d() != 0;\n }",
"public synchronized boolean mo21889b() {\n return this.f24561c != 0;\n }",
"public boolean empty() {\n\t\treturn input.isEmpty() && output.isEmpty();\n\t}",
"public boolean mo42417p() {\n return this.f12828k != null;\n }",
"private boolean m116916b() {\n return (this.f83728b == null && this.f83729c == 0) ? false : true;\n }",
"public boolean mo9737c() {\n return mo9786y() != 0;\n }",
"public boolean mo42410i() {\n return this.f12824g != null;\n }",
"public boolean mo3774I() {\n if (this.f1490s.f1416c == null || this.f1490s.f1416c.f1416c != this.f1490s) {\n return this.f1492u.f1416c != null && this.f1492u.f1416c.f1416c == this.f1492u;\n }\n return true;\n }",
"public boolean isEmpty(){\n\t\tif(this.mVehicles.size() == 0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"public boolean isZero()\n {\n return Native.fpaIsNumeralZero(getContext().nCtx(), getNativeObject());\n }",
"boolean isZero();",
"public final boolean mo6060a() {\n return this.f10682a.isEmpty();\n }",
"public boolean isEmpty(){\n return mPezCount == 0;\n }",
"public static boolean mo101a() {\n return f335b != 0;\n }",
"public boolean isEmpty() {\n\t\treturn tamano == 0;\n\t}",
"public boolean isEmptyBufferAvailable()\n {\n return circularBuffer.canWrite();\n }",
"public boolean esCompuesto() {\n\t\treturn !this.atributos.isEmpty();\n\t}",
"public boolean containsUMneumonics() {\n\t\tswitch(this) {\n\t\tcase STOP -> \t{return true;}\n\t\tcase RETTR -> \t{return true;}\n\t\tcase MOVSPA -> \t{return true;}\n\t\tcase MOVFLGA -> {return true;}\n\n\t\tdefault -> {return false;}\n\t\t\n\t\t}\n\t}",
"public boolean mo9737c() {\n return mo9775y() != 0;\n }",
"public boolean nearZero() {\n\t\treturn (Math.abs(this.angleDelta) < Constants.Values.Drive.ANGLE_TOLERANCE_STOP && \n\t\t\t\tMath.abs(this.distanceDelta) < Constants.Values.Drive.DISTANCE_TOLERANCE_STOP);\n\t}",
"public Boolean isZERO(Ring ring) {\r\n return (re.isZero(ring) && im.isZero(ring));\r\n }",
"public boolean mo1291g() {\n return !this.f2111i.isEmpty() || !this.f2113k.isEmpty() || !this.f2112j.isEmpty() || !this.f2110h.isEmpty() || !this.f2118p.isEmpty() || !this.f2119q.isEmpty() || !this.f2117o.isEmpty() || !this.f2120r.isEmpty() || !this.f2115m.isEmpty() || !this.f2114l.isEmpty() || !this.f2116n.isEmpty();\n }",
"public boolean mo32341b() {\n return this.f20635d != null;\n }",
"public boolean mo9737c() {\n return mo9762y() != 0;\n }",
"public boolean isSetIsowncar() {\n return __isset_bit_vector.get(__ISOWNCAR_ISSET_ID);\n }",
"public boolean O000000o() {\r\n if (this.O00000o0 == 0) {\r\n this.O00000o0 = O000000o(this.O00000o);\r\n }\r\n return System.currentTimeMillis() - this.O00000o0 >= ((long) this.O00000Oo);\r\n }",
"public boolean isEmpty(){\n\t\tif(attackValue>0)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}",
"protected boolean m9200e() {\n return this.this$0.b._getEtat() != 0;\n }",
"private boolean no_output() {\n\t\treturn _outcaptures.size() > 0 || _outhides.size() > 0;\n\t}",
"public boolean mo20822f() {\n return this.f18933c.isEmpty();\n }",
"public boolean hayPadre() {\n return this.padre != null;\n }",
"public final boolean mo25945i() {\n if (this.f75886e == 0) {\n return true;\n }\n return false;\n }",
"@Override\n public boolean isConnected() {\n for (node_data n : G.getV()) {\n bfs(n.getKey());\n for (node_data node : G.getV()) {\n if (node.getTag() == 0)\n return false;\n }\n }\n return true;\n }"
]
| [
"0.6571653",
"0.6269223",
"0.6256126",
"0.62471837",
"0.61757416",
"0.6146878",
"0.6132159",
"0.61014754",
"0.6074309",
"0.6020034",
"0.599167",
"0.59268415",
"0.59226525",
"0.59158444",
"0.5900933",
"0.58827287",
"0.58505875",
"0.5837114",
"0.5824285",
"0.5821462",
"0.58147633",
"0.5813557",
"0.5811",
"0.5805113",
"0.5791595",
"0.5777882",
"0.5776848",
"0.5753423",
"0.57520807",
"0.57434857",
"0.57084143",
"0.56973904",
"0.5687129",
"0.5673991",
"0.56627244",
"0.56621444",
"0.56532794",
"0.5642877",
"0.56373596",
"0.5624652",
"0.56125623",
"0.56059796",
"0.5602569",
"0.5597937",
"0.5594438",
"0.5584698",
"0.5578319",
"0.5563563",
"0.5544847",
"0.554175",
"0.55410886",
"0.5532537",
"0.5525367",
"0.55221564",
"0.55211455",
"0.5517553",
"0.550954",
"0.55065715",
"0.55008864",
"0.5484485",
"0.5480073",
"0.5478944",
"0.5474303",
"0.5473666",
"0.5465586",
"0.5464532",
"0.545745",
"0.5448906",
"0.5446506",
"0.54452795",
"0.5444243",
"0.54440653",
"0.54421264",
"0.5439569",
"0.5436457",
"0.5435843",
"0.5434936",
"0.54347146",
"0.542587",
"0.5422579",
"0.5418303",
"0.5413711",
"0.54127556",
"0.54122084",
"0.5411209",
"0.54106593",
"0.54042464",
"0.5402164",
"0.5401823",
"0.53912246",
"0.5385046",
"0.5384849",
"0.5377351",
"0.53682107",
"0.5367024",
"0.5359997",
"0.5358592",
"0.53585833",
"0.5355992",
"0.53507733"
]
| 0.7591672 | 0 |
/ Return motor encoder value | int getMotorEncoder( MotorName m ) {
int enc = 0;
if( motor_read_mode_==MotorBulkReadMode.BULK_READ_MANUAL && loop_cnt_!=last_motor_read_loop_id_ ) {
// Important Step 4: If you are using MANUAL mode, you must clear the BulkCache once per control cycle
for( LynxModule module : all_hubs_ ) {
module.clearBulkCache();
}
}
switch ( m ) {
case MOTOR_LF:
enc = motorLF_.getCurrentPosition();
break;
case MOTOR_LB:
enc = motorLB_.getCurrentPosition();
break;
case MOTOR_RF:
enc = motorRF_.getCurrentPosition();
break;
case MOTOR_RB:
enc = motorRB_.getCurrentPosition();
break;
case MOTOR_LEFT_INTAKE:
enc = motor_left_intake_.getCurrentPosition();
break;
case MOTOR_RIGHT_INTAKE:
enc = motor_right_intake_.getCurrentPosition();
break;
case MOTOR_LIFT:
enc = motor_lift_.getCurrentPosition();
break;
default:
break;
}
last_motor_read_loop_id_ = loop_cnt_ ;
return enc;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface EncoderMotor extends Motor {\n double getVelocity();\n double getVelocityRaw();\n double setVelocity(double speed);\n double getDistance();\n void resetDistance();\n @Override\n EncoderMotor setInverted(boolean inverted);\n @Override\n EncoderMotor invert();\n\n void setConfig(EncoderMotorConfig config);\n}",
"public double getEncoderPosition() {\n SmartDashboard.putNumber(\"Raw Encoder Value\", armMotor.getSelectedSensorPosition(0));\n return armMotor.getSelectedSensorPosition(0) * Const.kArmTalon4096Unit2Deg * Const.kArmGearRatioEncoder2Arm;\n }",
"private int getEncoderValue(int channel) {\n\t\tif (tachoMonitorAlive()) {\n\t\t\treturn tachoMonitor.getTachoCount(channel);\n\t\t}\n\t\t// .. otherwise, query the controller to get it\n\t\tgetData(REGISTER_MAP[REG_IDX_ENCODER_CURRENT][channel], buf, 4);\n\t\treturn EndianTools.decodeIntLE(buf, 0);\n\t}",
"public float obtenMotor(){\r\n return this.motor;\r\n }",
"public Encoder getEncoderLeft() {return encoderLeft;}",
"private void testEncoder() {\n\n flMotor.setPower(0.50);\n frMotor.setPower(0.50);\n blMotor.setPower(0.50);\n brMotor.setPower(0.50);\n\n // wait while opmode is active and left motor is busy running to position.\n\n while (opModeIsActive() && flMotor.isBusy()) {\n telemetry.addData(\"encoder-fwd-left\", flMotor.getCurrentPosition() + \" busy=\" + flMotor.isBusy());\n telemetry.addData(\"encoder-fwd-right\", frMotor.getCurrentPosition() + \" busy=\" + frMotor.isBusy());\n telemetry.addData(\"encoder-bck-left\", blMotor.getCurrentPosition() + \" busy=\" + blMotor.isBusy());\n telemetry.addData(\"encoder-bck-right\", brMotor.getCurrentPosition() + \" busy=\" + brMotor.isBusy());\n telemetry.update();\n idle();\n }\n\n // set motor power to zero to turn off motors. The motors stop on their own but\n // power is still applied so we turn off the power.\n\n flMotor.setPower(0.0);\n frMotor.setPower(0.0);\n blMotor.setPower(0.0);\n brMotor.setPower(0.0);\n\n // wait 5 sec to you can observe the final encoder position.\n\n resetStartTime();\n\n while (opModeIsActive() && getRuntime() < 5) {\n telemetry.addData(\"encoder-fwd-left-end\", flMotor.getCurrentPosition());\n telemetry.addData(\"encoder-fwd-right-end\", frMotor.getCurrentPosition());\n telemetry.addData(\"encoder-bck-left-end\", blMotor.getCurrentPosition());\n telemetry.addData(\"encoder-bck-right-end\", brMotor.getCurrentPosition());\n telemetry.update();\n idle();\n }\n\n // From current position back up to starting point. In this example instead of\n // having the motor monitor the encoder we will monitor the encoder ourselves.\n\n flMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n frMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n blMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n brMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n flMotor.setTargetPosition(0);\n frMotor.setTargetPosition(0);\n blMotor.setTargetPosition(0);\n brMotor.setTargetPosition(0);\n\n // Power sign matters again as we are running without encoder.\n flMotor.setPower(-0.50);\n frMotor.setPower(-0.50);\n blMotor.setPower(-0.50);\n brMotor.setPower(-0.50);\n\n while (opModeIsActive() && flMotor.getCurrentPosition() > flMotor.getTargetPosition()) {\n telemetry.addData(\"encoder-back-left\", flMotor.getCurrentPosition());\n telemetry.addData(\"encoder-back-right\", frMotor.getCurrentPosition());\n telemetry.addData(\"encoder-back-left\", blMotor.getCurrentPosition());\n telemetry.addData(\"encoder-back-right\", brMotor.getCurrentPosition());\n telemetry.update();\n idle();\n }\n\n // set motor power to zero to stop motors.\n flMotor.setPower(0.0);\n frMotor.setPower(0.0);\n blMotor.setPower(0.0);\n brMotor.setPower(0.0);\n\n resetStartTime();\n\n while (opModeIsActive() && getRuntime() < 5) {\n telemetry.addData(\"encoder-back-left-end\", flMotor.getCurrentPosition());\n telemetry.addData(\"encoder-back-right-end\", frMotor.getCurrentPosition());\n telemetry.addData(\"encoder-back-left-end\", blMotor.getCurrentPosition());\n telemetry.addData(\"encoder-back-right-end\", brMotor.getCurrentPosition());\n telemetry.update();\n idle();\n }\n }",
"public Encoder getEncoderRight() {\n return encoderRight;\n }",
"public CANEncoder getRightEncoder() {\n return m_rightEncoder;\n }",
"int getInverterCurrentRaw();",
"private String accelConversion() {\n int reading = record[15] & 255;\n double voltage = (reading * 3.33) / 256;\n //return formatter.format(reading);\n return formatter.format((voltage / .290)*9.806);\n }",
"@Override\n protected void execute() {\n SmartDashboard.putNumber(\"Encoder Value: \", encoderMotor.getSelectedSensorPosition());\n }",
"private byte getValue() {\n\t\treturn value;\n\t}",
"private String pedometerConversion() {\n return (record[20] & 255) + \"\";\n }",
"public CNumberEncode get_encode();",
"public IsaacRandom getEncode() {\n\t\treturn encode;\n\t}",
"int getInverterCurrent();",
"public String encodeVal()\n {\n return val;\n }",
"public Byte getAnalogValueByte() {\n return analogValueByte;\n }",
"void turnUsingEncoder(double degrees, double power);",
"int getOutputVoltageRaw();",
"public CANEncoder getLeftEncoder() {\n return m_leftEncoder;\n }",
"public Encoder getRightEnc() {\n return rightEnc;\n }",
"public byte getValue() {\n return value;\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 Integer getAnalogValue() {\n return analogValueByte & 0xff;\n }",
"public byte getSensor() {\r\n\t\tbyte sensor;\r\n\t\tsensor=this.sensor;\r\n\t\treturn sensor;\r\n\t}",
"protected Motor getMotorState() { return motorState; }",
"public String getMotorNo() {\n\t\treturn motorNo;\n\t}",
"public boolean encoderDrive(int encoderDelta, driveStyle drive, double motorPower, double timeout, DcMotor[] motors)\n {\n\n\n switch(drive)\n {\n case FORWARD:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(0, -motorPower, 0)[0]);\n motors[1].setPower(setPower(0, -motorPower, 0)[1]);\n motors[2].setPower(setPower(0, -motorPower, 0)[2]);\n motors[3].setPower(setPower(0, -motorPower, 0)[3]);\n\n while (motors[2].getCurrentPosition() >= (-encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n\n\n }\n\n case BACKWARD:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(0, motorPower, 0)[0]);\n motors[1].setPower(setPower(0, motorPower, 0)[1]);\n motors[2].setPower(setPower(0, motorPower, 0)[2]);\n motors[3].setPower(setPower(0, motorPower, 0)[3]);\n\n while (motors[2].getCurrentPosition() <= (encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case STRAFE_LEFT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n while (motors[2].getCurrentPosition() >= (encoderReadingLB - encoderDelta))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case STRAFE_RIGHT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(motorPower, 0, 0)[3]);\n\n while (motors[2].getCurrentPosition() >= (-encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case FORWARD_LEFT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(-motorPower, -motorPower, 0)[0]);\n motors[1].setPower(setPower(-motorPower, -motorPower, 0)[1]);\n motors[2].setPower(setPower(-motorPower, -motorPower, 0)[2]);\n motors[3].setPower(setPower(-motorPower, -motorPower, 0)[3]);\n\n while (motors[2].getCurrentPosition() <= (encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case FORWARD_RIGHT:\n {\n double encoderReadingRB = motors[1].getCurrentPosition();\n motors[0].setPower(setPower(motorPower, -motorPower, 0)[0]);\n motors[1].setPower(setPower(motorPower, -motorPower, 0)[1]);\n motors[2].setPower(setPower(motorPower, -motorPower, 0)[2]);\n motors[3].setPower(setPower(motorPower, -motorPower, 0)[3]);\n\n while (motors[1].getCurrentPosition() >= (-encoderDelta + encoderReadingRB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case BACKWARD_LEFT:\n {\n double encoderReadingRB = motors[1].getCurrentPosition();\n motors[0].setPower(setPower(-motorPower, motorPower, 0)[0]);\n motors[1].setPower(setPower(-motorPower, motorPower, 0)[1]);\n motors[2].setPower(setPower(-motorPower, motorPower, 0)[2]);\n motors[3].setPower(setPower(-motorPower, motorPower, 0)[3]);\n\n while (motors[1].getCurrentPosition() <= (encoderDelta + encoderReadingRB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case BACKWARD_RIGHT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(motorPower, motorPower, 0)[0]);\n motors[1].setPower(setPower(motorPower, motorPower, 0)[1]);\n motors[2].setPower(setPower(motorPower, motorPower, 0)[2]);\n motors[3].setPower(setPower(motorPower, motorPower, 0)[3]);\n\n while (motors[2].getCurrentPosition() >= (-encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case PIVOT_LEFT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(0, 0, -motorPower)[0]);\n motors[1].setPower(setPower(0, 0, -motorPower)[1]);\n motors[2].setPower(setPower(0, 0, -motorPower)[2]);\n motors[3].setPower(setPower(0, 0, -motorPower)[3]);\n\n while (motors[2].getCurrentPosition() >= (-encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case PIVOT_RIGHT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(0, 0, motorPower)[0]);\n motors[1].setPower(setPower(0, 0, motorPower)[1]);\n motors[2].setPower(setPower(0, 0, motorPower)[2]);\n motors[3].setPower(setPower(0, 0, motorPower)[3]);\n\n while (motors[2].getCurrentPosition() <= (encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n\n }\n\n return true;\n }",
"int cmdMoveA(float distIn, float encoderCntPerIn, double power, DcMotor motor)\n {\n // Solve for encoder count target. (int) needed to cast result as integer\n int target = (int) (distIn * encoderCntPerIn);\n\n // Set motor target and power\n motor.setTargetPosition(target);\n motor.setPower(power);\n\n return target;\n }",
"int getInputVoltageRaw();",
"public byte value() {\n return value;\n }",
"@Override\n public byte[] getValue() {\n return MetricUtils.concat2(topologyId, getTag(), sampleRate).getBytes();\n }",
"public byte getServo(int servo){\r\n return (byte)(getNumServos()-servo-1);\r\n }",
"int getOutputVoltage();",
"public int getDmaValue();",
"protected double returnPIDInput() {\n return RobotMap.elevatorEncoder.get();\n }",
"@Override\n\tpublic int getMotorSpeed() {\n\t\tupdateIR();\n\t\treturn direction*360;\n\t}",
"public String value() {\n // actual gear shift\n return gear;\n }",
"byte toStringValue() {\n return (byte) String.valueOf(value).charAt(0);\n }",
"godot.wire.Wire.Transform getTransformValue();",
"public float getMicGainDb();",
"@Override\n public byte byteValue() {\n return value;\n }",
"public String toString() {\n return \"Motor ID: \" + m_masterMotor.getDeviceID() + \", Motor Inversion: \" + m_masterMotor.getInverted()\n + \", Current Output (percent): \" + m_masterMotor.getMotorOutputPercent()+ \" | Encoder Position: \"+ m_encoder.getQuadraturePosition();\n }",
"byte mo30283c();",
"public int getRightEnc() {\n\t\treturn TalRM.getSelectedSensorPosition(0)-initEncR;\n\t}",
"public double getSpeed() {\n return m_master.getEncoder().getVelocity() / MotorConstants.kNeoRPM;\n }",
"public int getAudioJittcomp();",
"@Override\n public double getPower()\n {\n final String funcName = \"getPower\";\n double power = motor.get();\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%f\", power);\n }\n\n return power;\n }",
"private String BtaOneConversion() {\n int reading = (raw[25] & 0xFF) + ((raw[26] & 0x03) << 8);\n\n Map<String, BigDecimal> variables = new HashMap<String, BigDecimal>();\n variables.put(\"x\", new BigDecimal(reading));\n BigDecimal result = b1Conv.eval(variables);\n return result.setScale(3, RoundingMode.UP) + \"\";\n }",
"godot.wire.Wire.Value getData();",
"public V getValue27();",
"public int mo23280V() {\n return ((Integer) this.f13965a.mo23249a(C7196pb.f13764V)).intValue();\n }",
"godot.wire.Wire.Plane getPlaneValue();",
"public byte[] getValue() {\n return v;\n }",
"public String getEncoderId() {\n return this.mEncoderId;\n }",
"double getPWMRate();",
"public static BinaryMessageEncoder<VehicleInfoAvro> getEncoder() {\n return ENCODER;\n }",
"public String getOutputValue() {\n// System.out.println(\"geting output value from connection\");\n// System.out.println(\"out:\" + ncOutput.getName() + \" in:\" + ncInput.getName() );\n return _output.getOutputValue();\n }",
"int cmdMoveR(float distIn, float encoderCntPerIn, double power, DcMotor motor)\n {\n // Solve for encoder count target. (int) needed to cast result as integer\n int target = ((int) (distIn * encoderCntPerIn));// + motor.getCurrentPosition();\n\n // Set motor target and power\n motor.setPower(power);\n motor.setTargetPosition(target);\n\n return target;\n }",
"public byte[] getValue() {\n return this.value;\n }",
"private Double conversionElectric(Double quant) {\n return quant;\n }",
"public C0058h mo128b() {\n return this.f49t;\n }",
"@Override\n public byte[] getEncodedInstruction() {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n\n // Store a copy of the delay value\n int tempDelayValue = delayValue;\n\n // Loop until there's no delay value left\n while (tempDelayValue > 0) {\n // Write the opcode for the delay instruction\n baos.write(DELAY_INSTRUCTION_OPCODE);\n\n // Is the amount of delay left over too big to fit in a single command?\n if (tempDelayValue > MAX_SINGLE_DELAY) {\n // Yes, write the maximum delay possible\n baos.write(MAX_SINGLE_DELAY);\n } else {\n // No, just write the amount of the delay that's left\n baos.write(tempDelayValue);\n }\n\n // Subtract out the maximum delay. This will give us the delay that is left OR a negative number OR zero\n tempDelayValue -= MAX_SINGLE_DELAY;\n }\n\n // Convert the stream to a byte array and return it\n return baos.toByteArray();\n }",
"Short getValue();",
"public int getEncoderTicks(RobotSide side) {\n\t\tswitch(side) {\n\t\tcase LEFT: return leftEnc.get();\n\t\tcase RIGHT: return rightEnc.get();\n\t\tdefault: // compiler will throw error without a default statement\n\t\t\tthrow new IllegalArgumentException(\"Invalid argument for getEncoderTicks()\");\n\t\t}\n\t}",
"public int getValue()\n\t{\n\t\treturn bitHolder.getValue();\n\t}",
"@Override\n\tpublic double getMotorOutputPercent() {\n\t\treturn super.getAppliedOutput();\n\t}",
"public boolean getGenerateEncodeParam() {\n/* 324 */ return this.generateEncodeParam;\n/* */ }",
"java.lang.String getTxpower();",
"public int getMotorVal(int motorNum){\n\t\tswitch (motorNum){\n\t\t\tcase 0: return robot.motor0.getCurrentPosition();\n\t\t\tcase 1: return robot.motor1.getCurrentPosition();\n\t\t\tcase 2: return robot.motor2.getCurrentPosition();\n\t\t\tcase 3: return robot.motor3.getCurrentPosition();\n\t\t\tdefault: return 0;\n\t\t}\n\t}",
"@Override\n\tpublic double getSelectedSensorVelocity() {\n return encoder.getVelocity();\n\t}",
"public Encoder getLeftEnc() {\n return leftEnc;\n }",
"public int getVoltage ()\n {\n return _voltage;\n }",
"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 void ConfigEncoder() {\n\t\tRobotMap.backLeft.setStatusFramePeriod(StatusFrameEnhanced.Status_2_Feedback0, 1, 1);\n\t\tRobotMap.backLeft.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, 0, 1);\n\t\tRobotMap.backLeft.setSelectedSensorPosition(0, 0, 1);\n\t\tRobotMap.backLeft.setSensorPhase(true);\n\t\tRobotMap.backLeft.setSafetyEnabled(false);\n\t\tRobotMap.frontLeft.setInverted(true);\n\t\tRobotMap.backLeft.setInverted(true);\n\n\t\tRobotMap.frontRight.setStatusFramePeriod(StatusFrameEnhanced.Status_2_Feedback0, 1, 1);\n\t\tRobotMap.frontRight.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, 0, 1);\n\t\tRobotMap.frontRight.setSelectedSensorPosition(0, 0, 1);\n\t\tRobotMap.frontRight.setSensorPhase(true);\n\t\tRobotMap.frontRight.setSafetyEnabled(false);\n\n\t\tRobotMap.frontLeft.setSafetyEnabled(false);\n\t\tRobotMap.backLeft.setSafetyEnabled(false);\n\n\t\tSystem.out.println(\"encoder initialize\");\n\t}",
"public short getValue() {\n return value;\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString getValue() {\n return value_;\n }",
"synchronized byte getCurrentValueHi()\n {\n int cv = getCurrentValue();\n cv >>= 8;\n return (byte)cv;\n }",
"int getMPValue();",
"int getChargerCurrentRaw();",
"byte mo25264b(int i);",
"@Override\r\n\tpublic double getRx() {\n\t\treturn 2 * this.a;\r\n\t}",
"public String getEnryptedString() {\n this.enryptedString= encoderFunc();\n return this.enryptedString;\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString getValue() {\n return value_;\n }",
"int getInputVoltage();",
"private int readAnalog(short channelCommand) {\n short[] data = new short[]{1, channelCommand, 0};\n short[] result;\n try {\n result = spiDevice.write(data);\n } catch (IOException e) {\n return INVALID_VALUE;\n }\n\n // now take 8 and 9 bit from second byte (& with 0b11 and shift) and the whole last byte to form the value\n int analogValue = ((result[1] & 3) << 8) + result[2];\n return analogValue;\n }",
"public static BinaryMessageEncoder<LNDCDC_NCS_TCS_ORDER_TYPES> getEncoder() {\n return ENCODER;\n }",
"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}",
"private String toBinary(byte caracter){\n byte byteDeCaracter = (byte)caracter;\n String binario=\"\";\n for( int i = 7; i>=0; i--){\n binario += ( ( ( byteDeCaracter & ( 1<<i ) ) > 0 ) ? \"1\" : \"0\" ) ;\n }\n return binario;\n }",
"public static BinaryMessageEncoder<LNDCDC_NCS_NCSAR_NCSAR_BUSINESS_UNITS> getEncoder() {\n return ENCODER;\n }",
"public short getValue() {\n return value;\n }",
"String getValue()\n {\n return value.toString();\n }",
"public com.google.protobuf.ByteString getValue() {\n return value_;\n }",
"public com.google.protobuf.ByteString getValue() {\n return value_;\n }",
"public V get27();",
"public double getControlPanelMotor() {\n return controlPanelMotor.getSelectedSensorVelocity();\n }",
"private Encoder() {}",
"public byte obtenerDano(){\n\treturn dano;\n }",
"public com.google.protobuf.ByteString getValue() {\n return value_;\n }"
]
| [
"0.66997236",
"0.65084606",
"0.6447973",
"0.6363463",
"0.6350608",
"0.630096",
"0.62849236",
"0.6158026",
"0.609505",
"0.6062526",
"0.6038672",
"0.60381645",
"0.60143626",
"0.59867144",
"0.5907038",
"0.58986527",
"0.5875822",
"0.585832",
"0.58506066",
"0.57561",
"0.5732597",
"0.57096046",
"0.569206",
"0.5650317",
"0.56316656",
"0.56243926",
"0.56076294",
"0.55915517",
"0.55837804",
"0.55778587",
"0.55469286",
"0.5537745",
"0.5531469",
"0.5513263",
"0.549497",
"0.54803485",
"0.5448368",
"0.54437673",
"0.54353327",
"0.5429623",
"0.5429119",
"0.5393425",
"0.53805876",
"0.53760153",
"0.53712153",
"0.5367529",
"0.5355885",
"0.5353893",
"0.53482634",
"0.533562",
"0.5327743",
"0.5324671",
"0.53193307",
"0.53164804",
"0.53154385",
"0.53026354",
"0.5299887",
"0.52945155",
"0.5286179",
"0.52813905",
"0.52639055",
"0.5262601",
"0.52608633",
"0.5257323",
"0.5253962",
"0.52490544",
"0.5241791",
"0.5241344",
"0.5230275",
"0.5230136",
"0.5223225",
"0.5199829",
"0.5195868",
"0.5194706",
"0.5193844",
"0.5187006",
"0.51794475",
"0.5160271",
"0.5158859",
"0.51558167",
"0.5155347",
"0.5152659",
"0.5144236",
"0.5139602",
"0.51368105",
"0.51343334",
"0.5130192",
"0.51283395",
"0.5128279",
"0.51217824",
"0.5121722",
"0.5121494",
"0.51071304",
"0.5101831",
"0.5101831",
"0.51008946",
"0.5096097",
"0.50952816",
"0.5089786",
"0.5088651"
]
| 0.7494503 | 0 |
/ Return motor velocity value; TBD | double getMotorVelocity( MotorName m ) {
double vol = 0.0;
if( motor_read_mode_==MotorBulkReadMode.BULK_READ_MANUAL && loop_cnt_!=last_motor_read_loop_id_ ) {
// Important Step 4: If you are using MANUAL mode, you must clear the BulkCache once per control cycle
for( LynxModule module : all_hubs_ ) {
module.clearBulkCache();
}
}
switch ( m ) {
case MOTOR_LF:
vol = motorLF_.getVelocity();
break;
case MOTOR_LB:
vol = motorLB_.getVelocity();
break;
case MOTOR_RF:
vol = motorRF_.getVelocity();
break;
case MOTOR_RB:
vol = motorRB_.getVelocity();
break;
case MOTOR_LEFT_INTAKE:
vol = motor_left_intake_.getVelocity();
break;
case MOTOR_RIGHT_INTAKE:
vol = motor_right_intake_.getVelocity();
break;
case MOTOR_LIFT:
vol = motor_lift_.getVelocity();
break;
default:
break;
}
last_motor_read_loop_id_ = loop_cnt_ ;
return vol;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getVelocity() {\n return mV;\n }",
"private double getVelocity() {\n \tif (currentState == DriveState.accelerating) {\n \t\treturn acceleration * timer.get();\n \t}\n \telse if (currentState == DriveState.cruisung) {\n \t\treturn maxVelocity;\n \t}\n \telse if (currentState == DriveState.decelerating) {\n \t\treturn maxVelocity - acceleration * (timer.get());\n \t}\n \t\t\n \treturn 0;\n }",
"public double getVelocity() {\n\t\treturn velocity.getlength();\n\t}",
"public double getVelocity() {\n \treturn this.currentSpeed;\n }",
"@Override\n public double getVelocity()\n {\n final String funcName = \"getVelocity\";\n double velocity = encoder.getVelocity() * encoderSign / 60.0;\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%f\", velocity);\n }\n\n return velocity;\n }",
"public double getVelocity()\n {\n return velocity * FPS;\n }",
"public float getMotor_ang_target_velocity() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readFloat(__io__address + 132);\n\t\t} else {\n\t\t\treturn __io__block.readFloat(__io__address + 124);\n\t\t}\n\t}",
"public Velocity getVelocity() {\r\n return this.vel;\r\n }",
"public double getCurrentVelocity( )\r\n {\r\n return Math.sqrt( this.h_velocity * this.h_velocity + this.v_velocity * this.v_velocity );\r\n }",
"public double getVelocity() {\n return 360000./(projDensity * projRadius);\n }",
"public Velocity getVelocity() {\r\n return this.v.getVelocity();\r\n }",
"public float getMotor_lin_target_velocity() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readFloat(__io__address + 128);\n\t\t} else {\n\t\t\treturn __io__block.readFloat(__io__address + 120);\n\t\t}\n\t}",
"protected void calcVelocity()\n\t{}",
"@Override\n\tpublic double calculateVelocity() {\n\t\tdouble result = distance / time + velocitySame - velocityReverse;\n\t\treturn result;\n\t}",
"public int getVelocity()\n\t{\n\t\treturn logDx;\n\t}",
"@Override\n public Point3D getValue() {\n return velocity;\n }",
"public double getVelocity() {\n return _avTable.getDouble(ATTR_VELOCITY, 0.0);\n }",
"public Point2D.Float getVelocity() {\r\n\t\treturn velocity;\r\n\t}",
"public Velocity getVelocity() {\n return this.v;\n\n }",
"static int getVelocity(){return currentVelocity;}",
"public float getVerticalVelocity( )\r\n {\r\n return this.v_velocity;\r\n }",
"public Vector2D getVelocity()\n\t{\n\t\treturn velocity;\n\t}",
"public Vector3d getVelocity() {\n return getMotion().getVelocity();\n }",
"public float obtenMotor(){\r\n return this.motor;\r\n }",
"public Velocity getVelocity() {\n return this.velocity;\n }",
"public double getVelocity() {\n return spark_encoder.getVelocity();\n }",
"double getVx() { return vel[0]; }",
"public final Vector2D getVelocity() {\n return velocity;\n }",
"public Vector2f getVelocity()\n\t{\n\t\treturn this.vel;\n\t}",
"public double getVelocityRPM();",
"public Vector2D getVelocity ();",
"double getVy() { return vel[1]; }",
"@Basic @Raw\n public double[] getVelocity(){\n \t return this.velocity.getVelocity();\n }",
"public double getControlPanelMotor() {\n return controlPanelMotor.getSelectedSensorVelocity();\n }",
"public Vector2f getVelocity(){\n\t\treturn velocity.copy();\n\t}",
"public org.bukkit.util.Vector getVelocity ( ) {\n\t\treturn invokeSafe ( \"getVelocity\" );\n\t}",
"@Override\n\tpublic double calculateVelocity(Parrot parrot) {\n\t\treturn (parrot.getisNailed()) ? 0 : parrot.getBaseSpeed(parrot.getVoltage());\n\t}",
"public Vector3f getAngularVelocity() {\n return Converter.convert(rBody.getAngularVelocity(tempVec));\n }",
"double getVz() { return vel[2]; }",
"public int[] getCurrentMotorVelocities()\n {\n return finchController.getCurrentMotorVelocities();\n }",
"public double fromVelocityToSpeed() {\n return Math.sqrt(Math.pow(this.getDx(), 2) + Math.pow(this.getDy(), 2));\n }",
"public double getServo() {\n\t\treturn servo.getPosition();\n\t}",
"public double[] getCurrentMotorVelocitiesInCentimetersPerSecond()\n {\n return finchController.getCurrentMotorVelocitiesInCentimetersPerSecond();\n }",
"private void calculateVelocity() {\n\t\tthis.velocity = Math.sqrt((this.roughRange *this.roughRange * this.gravity_Math)\n\t\t\t\t/ ((this.roughRange * Math.sin(2 * angle)) + (2\n\t\t\t\t\t\t* Constant.heroBaseHeight * Math.cos(angle) * Math\n\t\t\t\t\t\t\t.cos(angle))));\n\t\t\n\t}",
"public double getVelocityY() {\n\t\treturn velocity.getY();\n\t}",
"public float getSpeed() {\n\t\tfloat result = (float) Math.sqrt(velocity.x * velocity.x + velocity.y * velocity.y);\n\t\treturn result;\n\t}",
"public Point2D.Float getVelocityPPT() {\n return velocityPPT;\n }",
"public float getAngularVelocity () {\n\t\treturn body.getAngularVelocity();\n\t}",
"@Override\n\tpublic int getMotorSpeed() {\n\t\tupdateIR();\n\t\treturn direction*360;\n\t}",
"public double getSpeed() {\n return m_master.getEncoder().getVelocity() / MotorConstants.kNeoRPM;\n }",
"double motor_y () { return strut.span + DRIVING_FORCE_HEIGHT; }",
"org.auvua.utils.protobuffer.AUVprotocol.AUVCommand.Movement getSpeed();",
"public double getYVel() {\n return this.yVel;\n }",
"@Basic @Raw @Immutable\n public double getMaxVelocity(){\n return this.maxVelocity = SPEED_OF_LIGHT;\n }",
"public double getCurrentSpeed();",
"@Override\n\tpublic float getAngularVelocity() {\n\t\treturn body.getAngularVelocity();\n\t}",
"public int getXVelocity()\r\n {\r\n return xVel;\r\n }",
"public double getV() {\r\n return Math.sqrt(Math.pow(this.dx, 2) + Math.pow(this.dy, 2));\r\n }",
"public float getVerticalSpeed() { return VerticalSpeed; }",
"public float getCurrVelocity() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e3 in method: android.widget.OppoScroller.getCurrVelocity():float, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.widget.OppoScroller.getCurrVelocity():float\");\n }",
"@NativeType(\"ovrVector3f\")\n public OVRVector3f AngularVelocity() { return nAngularVelocity(address()); }",
"public int getVoltage ()\n {\n return _voltage;\n }",
"public float getVehicleSpeed() {\n return vehicleSpeed;\n }",
"public double getSpeed();",
"public double getXVel() {\n return this.xVel;\n }",
"@Override\n\tpublic double getSelectedSensorVelocity() {\n return encoder.getVelocity();\n\t}",
"public double getV() {\r\n\t\treturn v;\t\r\n\t\t}",
"public float getHorizontalVelocity( )\r\n {\r\n return this.h_velocity;\r\n }",
"public double getSpeed() {\n\t\tdouble speed = 0;\n\t\tfor (Motor motor : this) {\n\t\t\tspeed += motor.get();\n\t\t}\n\t\treturn speed / this.size();\n\t}",
"@Override\n public double speed() {\n \tif(Robot.drive.getDistance() > 120) {\n \t\treturn 0.2;\n \t}\n \treturn speed;\n }",
"public double getVoltage() {\n\t\treturn this.voltage;\n\t}",
"public float getSpeed() {\n return this.speedValue;\n }",
"public int getVx() { return vx; }",
"public double calculateVelocity(){\n double storyPoints = 0.0; // number of story points completed in total\n double numWeeks = BoardManager.get().getCurrentBoard().getAge()/7.0;\n LinkedList<Card> allCompletedCards = BoardManager.get().getCurrentBoard().getCardsOf(Role.COMPLETED_WORK);\n for (Card card : allCompletedCards) {\n storyPoints += card.getStoryPoints();\n }\n if (storyPoints == 0.0){\n return 0.0;\n }\n return Math.round(storyPoints/numWeeks * 100D) / 100D;\n }",
"private static double calculateVelocity(double velocity, double deltaT, double acceleration) {\n return velocity + (deltaT * acceleration);\n }",
"public synchronized float getVoltage(){\n\t\t getData(REG_MMXCOMMAND, buf, 1);\n\t\t // 37 is the constant given by Mindsensors support 5/2011 to return millivolts. KPT\n return (37f*(buf[0]&0xff))*.001f;\n\t}",
"public double getVelocityX() {\n\t\treturn velocity.getX();\n\t}",
"public double getCurrentSpeed(){\n return currentSpeed;\n }",
"public double getCurrentSpeed(){\n return currentSpeed;\n }",
"public abstract double getSpeed();",
"public VelocityMetric velocityMetric() {\n _initialize();\n return velocityMetric;\n }",
"@Basic\n\tpublic double getYVelocity(){\n\t\treturn this.yVelocity;\n\t}",
"public Vector2 getSpeed() { return speed; }",
"double getAcceleration ();",
"public final double rpmToVelocity(double rpm) {\n return rpm * GEAR_RATIO * 2 * Math.PI * WHEEL_RADIUS / 60.0;\n }",
"double getSpeed();",
"public void setVelocity(double velocity) {\n m_motor.set(ControlMode.Velocity, toEncoderPulsesPer100ms(velocity));\n }",
"public double getCurrentSpeed(){\r\n return speed;\r\n }",
"public Vector2D getSpeedVector()\n {\n return mSpeedVector;\n }",
"public void setVelocity(double velocity) {\n //set the velocity of the motors\n m_masterMotor.set(ControlMode.Velocity, velocity);\n \n //set our slave motors to follow master\n m_closeSlaveMotor.follow(m_masterMotor, FollowerType.PercentOutput);\n m_farSlaveMotor1.follow(m_masterMotor, FollowerType.PercentOutput);\n m_farSlaveMotor2.follow(m_masterMotor, FollowerType.PercentOutput);\n }",
"public synchronized double get() {\n return m_liftSpeed;\n }",
"@Basic\n\t@Raw\n\t@Immutable\n\tpublic static double getVelocityUpperBound() {\n\t\treturn VELOCITYUPPERBOUND;\n\t}",
"@Override\r\n\tpublic double getSpeed() {\n\t\treturn this.speed;\r\n\t}",
"public float getSpeed (){\n return speed;\n }",
"public float getHorizontalVelocity() {\n return mHorizontalVelocity;\n }",
"public void testVelocityNumerically() {\n // crud, I don't know, how much can we expect velocity and finite differences to agree?\n double bound = dt*dt*velocity*velocity; // sure, let's go with that. Keep in mind this changes with sampling rates, velocity, the order of the function, etc.\n double endtime = racetrack.getPerimeter() / racetrack.getVelocity();\n differentiatePosition(racetrack, 0.0, endtime, dt, bound);\n }",
"int getOutputVoltage();",
"public int getVy() { return vy; }",
"protected float getMovementSpeed() {\r\n\t\tfloat speed = getSpeed();\r\n\t\treturn speed / 17f + (float) Math.pow(Math.sqrt(speed), 1.225f) * 0.985f;\r\n\t}",
"@Override\n\tpublic Vector2 getLinearVelocity() {\n\t\treturn body.getLinearVelocity();\n\t}"
]
| [
"0.8315803",
"0.8267917",
"0.8049826",
"0.80319786",
"0.8019438",
"0.78662384",
"0.77871865",
"0.77586",
"0.77292097",
"0.7710891",
"0.7681434",
"0.7679158",
"0.7674676",
"0.76695734",
"0.76642114",
"0.76638937",
"0.76244247",
"0.7611784",
"0.7597179",
"0.7589497",
"0.75326365",
"0.7518712",
"0.7502811",
"0.74589276",
"0.74464387",
"0.7434524",
"0.74218327",
"0.74204284",
"0.74051607",
"0.73979264",
"0.7353898",
"0.7351663",
"0.7341509",
"0.7329135",
"0.73153573",
"0.73005676",
"0.7271963",
"0.7255461",
"0.72532284",
"0.7153592",
"0.714103",
"0.71372265",
"0.71299136",
"0.7119441",
"0.7077385",
"0.7075093",
"0.70461136",
"0.70303804",
"0.7006127",
"0.69892186",
"0.69566315",
"0.6953224",
"0.6944672",
"0.6933977",
"0.69292766",
"0.6918012",
"0.69126946",
"0.6904319",
"0.6884771",
"0.6852233",
"0.6829714",
"0.68258923",
"0.6792356",
"0.67915833",
"0.67833376",
"0.6763801",
"0.6746508",
"0.6736956",
"0.67313004",
"0.67050165",
"0.67050034",
"0.66995144",
"0.6679211",
"0.6649492",
"0.6646231",
"0.66445315",
"0.66430146",
"0.66289735",
"0.66289735",
"0.66288096",
"0.6625026",
"0.66142994",
"0.66142315",
"0.66015214",
"0.6596641",
"0.6595005",
"0.65906376",
"0.658403",
"0.6572593",
"0.65518475",
"0.6549221",
"0.652953",
"0.65235347",
"0.6522427",
"0.65023553",
"0.6501856",
"0.6486606",
"0.648574",
"0.6483445",
"0.64832777"
]
| 0.83331007 | 0 |
/ Determine wether a reading from a REV 2M range sensor is valid | boolean isValidRangeReading(double dist) {
return ( !Double.isNaN(dist) && dist>MIN_RANGE_DIST && dist<MAX_RANGE_DIST ) ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isRangeValid()\n {\n return isRangeValid(((AnalogInput)m_echoChannel).getVoltage());\n }",
"private boolean isRangeValid() {\n\n\t\tboolean valid = true;\n\n\t\tif (getRange() == null) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\tLong.parseLong(getRange());\n\t\t} catch (NumberFormatException nfe) {\n\t\t\tvalid = false;\n\t\t}\n\n\t\tvalid = valid || getRange().compareToIgnoreCase(CCLConstants.INDIRECT_RANGE_ALL) == 0;\n\n\t\treturn valid;\n\t}",
"public boolean inAValidSequenceRange(PBFTServerMessage m){\n\n long seqn = m.getSequenceNumber();\n long low = getLCWM();\n long high = getHCWM();\n\n return seqn > low && seqn <= high;\n\n }",
"boolean shouldReadValue();",
"public boolean isValid() {\n return (this.S>=0 && this.I>=0 && this.R>=0);\n }",
"public static boolean checkSensors() {\n //Default booleans set to true\n rightLineDetect = true;\n leftLineDetect = true;\n \n //If the left sensor detects the line first\n if (Math.abs(leftRedVal - initialRedValue) > rgbThres) {\n leftMotor.stop(true);\n rightMotor.stop(false);\n //if the right sensor does not detect a line\n if(Math.abs(rightRedVal - initialRedValue) < rgbThres) {\n rightLineDetect = false;\n return false;\n }\n }\n \n //if the right sensor detects the line first\n else if(Math.abs(rightRedVal - initialRedValue) > rgbThres) {\n leftMotor.stop(true);\n rightMotor.stop(false);\n //if the left sensor does not detect a line\n if(Math.abs(leftRedVal - initialRedValue) < rgbThres) {\n leftLineDetect = false;\n return false;\n }\n }\n return true;\n }",
"private boolean checkRange() {\n String notInRange = \"\"; //used for displaying error message\n \n double a = Double.valueOf(ampBox.getText());\n int d = Integer.valueOf(durBox.getText());\n int f = Integer.valueOf(freqBox.getText());\n int ow = Integer.valueOf(owBox.getText());\n \n if(a>8.128 || a<0) notInRange += \"Amplitude not in range [0mA,8.128mA]\\n\";\n if(d>423 || d<0) notInRange += \"Pulse duration not in range [0uS,423uS]\\n\";\n if(f>100 || f<0) notInRange += \"Frequency not in range [0Hz,100Hz]\\n\";\n if(ow>60 || ow<0) notInRange += \"ON-WAVE duration not in range [0sec,60sec]\\n\";\n \n if(notInRange.length()>0) {\n notInRange += \"\\nInput within proper ranges and try again\";\n JOptionPane.showMessageDialog(null, \n notInRange, \n \"Error\", JOptionPane.INFORMATION_MESSAGE);\n return false;\n }\n else {\n return true;\n }\n }",
"public boolean isValid(){\n\t\treturn this.arm.isValid();\n\t}",
"public boolean isRangeUnavailable()\r\n {\r\n return statusObj.value == STATUS_CANDIDATE_RANGE_UNAVAILABLE;\r\n }",
"private static boolean anomalyCheck(double oldtemperature, double temperature2) {\n\t\tif (Math.abs(oldtemperature-temperature2)>=10)\n\t\t\treturn true;\n\t\telse \n\t\t\treturn false;\n\t\t\n\t}",
"public boolean isLevel(){\n return Math.abs(gyro_board.getPitch()) < LEVEL_TOLERANCE && Math.abs(gyro_board.getRoll()) < LEVEL_TOLERANCE;\n }",
"public abstract boolean sensorFound();",
"@Override\n public boolean areValidReadings(\n final List<? extends ReadingLocated<P>> readings) {\n if (readings == null) {\n return false;\n }\n\n checkReadings(readings);\n\n //if enough ranging data is available, we check validity both for ranging and RSSI readings\n return ((!mRssiPositionEnabled && mNumRangingReadings >= getMinRangingReadings() &&\n mNumRssiReadings >= getMinRssiReadings()) ||\n //if not enough ranging data is available, we check validity only for RSSI readings\n (mRssiPositionEnabled && mNumRssiReadings >= getMinRssiReadings()) ||\n //if only position is enabled, then only check for ranging readings\n (!mTransmittedPowerEstimationEnabled && !mPathLossEstimationEnabled &&\n mNumRangingReadings >= getMinRangingReadings())) &&\n //in both upper cases enough general readings must be available\n super.areValidReadings(readings);\n }",
"public static float validate(float min, float max){\n int valid = 0;\n Scanner sc = new Scanner(System.in);\n float temp = sc.nextFloat();\n while (valid != 1){\n if(temp < min || temp > max){\n System.out.println(\"Invalid reading, enter valid reading:\");\n temp = sc.nextFloat();\n }\n else{\n valid = 1;\n }\n }\n return temp;\n }",
"@Override\n public boolean isRead(int index)\n {\n if (index == 3)\n {\n return m_Unit != 0;\n }\n return super.isRead(index);\n }",
"public double getRange(){\r\n\t\t uSensor.ping();\r\n\t\t return uSensor.getRangeInches();\r\n\t\t}",
"public boolean isRange() {\r\n return range;\r\n }",
"public boolean withinRange(double range) {\n running = true;\n while (running) {\n try {\n double distance = ranger.get();\n if (distance < range) {\n notifyObservers(distance);\n return true;\n }\n } catch (IOException ex) {\n return false;\n }\n }\n return false;\n }",
"private boolean correctValues() {\n try {\n //TODO: check COM ports\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n return true;\n }",
"public void validateReading() {\r\n\t\tint i = 0;\r\n\t\tfor (Integer reading : readingList) {\r\n\t\t\tif (reading != null) {\r\n\t\t\t\tif (reading < 0 || reading > Constantes.PLUVIOMETER_MAX_RANGE) {\r\n\t\t\t\t\tControladorContexto\r\n\t\t\t\t\t\t\t.mensajeErrorArg1(\r\n\t\t\t\t\t\t\t\t\t\"formDetalles:repeat:\" + i + \":message\",\r\n\t\t\t\t\t\t\t\t\t\"javax.faces.validator.DoubleRangeValidator.NOT_IN_RANGE\",\r\n\t\t\t\t\t\t\t\t\t\"mensaje\", 0,\r\n\t\t\t\t\t\t\t\t\tConstantes.PLUVIOMETER_MAX_RANGE);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tControladorContexto.mensajeErrorEspecifico(\r\n\t\t\t\t\t\t\"formDetalles:repeat:\" + i + \":message\",\r\n\t\t\t\t\t\t\"message_campo_requerido\", \"mensaje\");\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}",
"protected boolean checkFormat() {\n\t\t// Read the card contents and check that all is ok.\n\t byte[] memory = utils.readMemory();\n\t if (memory == null)\n\t return false;\n\t \n\t // Check the application tag.\n\t for (int i = 1; i < 4; i++)\n\t if (memory[4 * 4 + i] != applicationTag[i])\n\t return false;\n\t \n\t // Check zeros. Ignore page 36 and up because of the safe mode.\n\t for (int i = 5 * 4; i < 36 * 4; i++)\n\t if (memory[i] != 0)\n\t return false;\n\t \n\t // Check that the memory pages 4..39 are not locked.\n\t // Lock 0: Check lock status for pages 4-7\n\t if (memory[2 * 4 + 2] != 0) \n\t return false;\n\t // Lock 1: \n\t if (memory[2 * 4 + 3] != 0)\n\t return false;\n\t // Lock 2:\n\t if (memory[40 * 4] != 0)\n\t \t\treturn false;\n\t // Lock 1:\n\t if (memory[40 * 4 + 1] != 0)\n\t \t\treturn false;\n\t \n\t return true;\n\t}",
"boolean hasGetLatestSensorReadingForUser();",
"@Override\n\tprotected boolean isFinished() {\n\t\treturn Math.abs(Robot.lidar.getRange() - range) < 2.0f;\n\t}",
"public boolean validate() {\n\t\tfor(int i=0; i<sensorData.size(); i++) {\n\t\t\tif(!sensorData.get(i).isValid()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public void tensionRangeCheck(){\n if(motor.get() < 0){\n if(Bottom_Limit_Switch.get() | tenPot.pidGet()> tenPotMAX ){\n motor.set(0.0);\n }\n }else if(motor.get() > 0){\n if(Top_Limit_Switch.get() | tenPot.pidGet()< tenPotMIN){\n motor.set(0.0);\n }\n }\n }",
"@Test(timeout = 4000)\n public void test026() throws Throwable {\n Range range0 = Range.ofLength(0L);\n long long0 = range0.getLength();\n assertEquals(0L, long0);\n \n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n long long1 = range0.getEnd(range_CoordinateSystem0);\n assertEquals(0L, long1);\n }",
"double getRangeDist( RangeName r ) {\n double dis = 0.0;\n double period = 1.0/MAX_RANGE_READ_FREQ ; // dflt 10Hz => one read per 100ms\n last_range_read_failed_ = false;\n switch ( r ) {\n case RGB_RANGE_STONE :\n if( rgb_range_stone_ != null ) {\n if( (last_rgb_range_stone_read_loop_id_ == loop_cnt_) || (last_rgb_range_stone_read_time_>0 && curr_time_-last_rgb_range_stone_read_time_<period) ) {\n dis = rgb_range_stone_dist_;\n } else {\n dis = rgb_range_stone_.getDistance( DistanceUnit.METER );\n if( isValidRangeReading(dis) ) {\n last_rgb_range_stone_read_loop_id_ = loop_cnt_;\n last_rgb_range_stone_read_time_ = curr_time_;\n rgb_range_stone_dist_ = dis;\n last_range_failed_read_time_ = 0.0;\n } else { // invalid reading, use the last value\n dis = rgb_range_stone_dist_;\n last_range_read_failed_ = true;\n last_range_failed_read_time_ = curr_time_;\n }\n }\n }\n break;\n case RANGE_STONE :\n if( range_stone_ != null ) {\n if( (last_range_stone_read_loop_id_ == loop_cnt_) || (last_range_stone_read_time_>0 && curr_time_-last_range_stone_read_time_<period) ) {\n dis = range_stone_dist_;\n } else {\n dis = range_stone_.getDistance( DistanceUnit.METER );\n if( isValidRangeReading(dis) ) {\n last_range_stone_read_loop_id_ = loop_cnt_;\n last_range_stone_read_time_ = curr_time_;\n range_stone_dist_ = dis;\n last_range_failed_read_time_ = 0.0;\n } else { // invalid reading, use the last value\n dis = range_stone_dist_;\n last_range_read_failed_ = true;\n last_range_failed_read_time_ = curr_time_;\n }\n }\n }\n break;\n case RANGE_RIGHT :\n if( range_right_ != null ) {\n if( (last_range_right_read_loop_id_ == loop_cnt_) || (last_range_right_read_time_>0 && curr_time_-last_range_right_read_time_<period) ) {\n dis = range_right_dist_;\n } else {\n dis = range_right_.getDistance( DistanceUnit.METER );\n if( isValidRangeReading(dis) ) {\n last_range_right_read_loop_id_ = loop_cnt_;\n last_range_right_read_time_ = curr_time_;\n range_right_dist_ = dis;\n last_range_failed_read_time_ = 0.0;\n } else { // invalid reading, use the last value\n dis = range_right_dist_ ;\n last_range_read_failed_ = true;\n last_range_failed_read_time_ = curr_time_;\n }\n }\n }\n break;\n case RANGE_LEFT :\n if( range_left_ != null ) {\n if( (last_range_left_read_loop_id_ == loop_cnt_) || (last_range_left_read_time_>0 && curr_time_-last_range_left_read_time_<period) ) {\n dis = range_left_dist_;\n } else {\n dis = range_left_.getDistance( DistanceUnit.METER );\n if( isValidRangeReading(dis) ) {\n last_range_left_read_loop_id_ = loop_cnt_;\n last_range_left_read_time_ = curr_time_;\n range_left_dist_ = dis;\n last_range_failed_read_time_ = 0.0;\n } else { // invalid reading, use the last value\n dis = range_left_dist_ ;\n last_range_read_failed_ = true;\n last_range_failed_read_time_ = curr_time_;\n }\n }\n }\n break;\n default:\n break;\n }\n return dis;\n }",
"protected final boolean rangeTestNeeded() {\n\treturn needRangeTest;\n }",
"public boolean isValidRecord () {\n int sumError = latitudeError +\n longitudeError +\n depthError +\n temperatureMinError +\n temperatureMaxError +\n salinityMinError +\n salinityMaxError +\n oxygenMinError +\n oxygenMaxError +\n nitrateMinError +\n nitrateMaxError +\n phosphateMinError +\n phosphateMaxError +\n silicateMinError +\n silicateMaxError +\n chlorophyllMinError +\n chlorophyllMaxError;\n return (sumError == 0 ? true : false);\n }",
"boolean updateValue() {\n boolean ret;\n\n if (Math.abs(curUtilityValue - nextUtilityValue) < Math.abs(curUtilityValue) * MAX_ERR_PERCENT / 100)\n ret = true;\n else {\n ret = false;\n // System.out.println(\" no match cell: x: \"+x+\" y: \"+y);\n }\n curUtilityValue = nextUtilityValue;\n return ret;\n\n }",
"boolean hasRead();",
"abstract protected boolean read();",
"public Boolean isMSROnline() throws DeviceException;",
"public boolean isValidTemperature() {\n\t\treturn false;\n\t}",
"public boolean mo1531a() {\n if (Math.abs(this.f15728e - 1.0f) < 0.01f) {\n if (Math.abs(this.f15729f - 1.0f) < 0.01f) {\n return false;\n }\n }\n return true;\n }",
"@Test(timeout = 4000)\n public void test045() throws Throwable {\n Range range0 = Range.of((-32768L));\n Range range1 = Range.of((-32768L));\n boolean boolean0 = range0.endsBefore(range1);\n assertFalse(boolean0);\n \n long long0 = range0.getEnd();\n assertEquals((-32768L), long0);\n assertSame(range0, range1);\n }",
"private boolean checkConnection(int x1, int x2) {\n\t\treturn (xStartValue <= x1 && xEndValue >= x1) || (xStartValue <= x2 && xEndValue >= x2) ||\n\t\t\t\t(x1 <= xStartValue && x2 >= xStartValue) || (x1 <= xEndValue && x2 >= xEndValue);\n\t\t\n\t}",
"public boolean matches(Sensor sensor, String limit) throws IllegalArgumentException;",
"public boolean isPowered(){\n\t\tint value = sensor.readRawValue();\n\t\tDiscoveryVehicle.getMonitor().log(\"raw: \"+value);\n//\t\treturn Button.ENTER.isDown();\n\t\treturn (value < Configuration.HYDROGEN_MEASURE_TRIGGER_PRECISION);\n\t}",
"boolean isValidStreamProcessor(int[] buffer) throws RawDataEventException;",
"public boolean isLongRange() {\n\t\treturn this.ordinal() >= 2 && this.ordinal() <= 4;\n\t}",
"protected boolean isValidMeasuredRoomTemperature(byte[] edt) {\n\t\tif(edt == null || !(edt.length == 1)) return false;\n\t\treturn true;\n\t}",
"boolean getRead();",
"protected void validateRxRangeList(cwterm.service.rigctl.xsd.FreqRange[] param) {\n }",
"@Test(timeout = 4000)\n public void test048() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 32740L, 2147483647L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.toString(range_CoordinateSystem1);\n range0.toString();\n Range range1 = Range.parseRange(\"[ 32740 .. 2147483646 ]/0B\", range_CoordinateSystem1);\n range0.isSubRangeOf(range1);\n range1.equals(range0);\n range0.equals(\"[ 32740 .. 2147483646 ]/0B\");\n // Undeclared exception!\n try { \n Range.Comparators.valueOf(\"org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.Comparators.org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }",
"private boolean isValid() {\n // If start is greater or equal to end then it's invalid\n return !(start.compareTo(end) >= 0);\n }",
"private boolean inventoryVerify(int min, int max, int stock) {\r\n\r\n boolean invBetween = true;\r\n\r\n if (stock < min || stock > max) {\r\n invBetween = false;\r\n //LOGICAL ERROR: Inventory value error\r\n errorLabel.setVisible(true);\r\n errorTxtLabel.setText(\"Inventory must be less than Max and greater than Min.\");\r\n errorTxtLabel.setVisible(true);\r\n }\r\n\r\n return invBetween;\r\n }",
"@Test(timeout = 4000)\n public void test042() throws Throwable {\n Range range0 = Range.of((-32768L));\n long long0 = range0.getEnd();\n assertEquals((-32768L), long0);\n \n Long long1 = new Long((-32768L));\n boolean boolean0 = range0.equals(long1);\n assertFalse(boolean0);\n }",
"@Test(timeout = 4000)\n public void test116() throws Throwable {\n Range range0 = Range.ofLength(4294967244L);\n Long long0 = new Long(4294967244L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range.of(4294967244L);\n Range.CoordinateSystem.values();\n Range range1 = Range.parseRange(\"[ 1 .. 4294967244 ]/RB\");\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range2 = Range.parseRange(\"[ 1 .. 4294967244 ]/RB\", range_CoordinateSystem1);\n range2.getEnd();\n range0.equals(range1);\n range2.getBegin();\n Range.CoordinateSystem range_CoordinateSystem2 = Range.CoordinateSystem.RESIDUE_BASED;\n // Undeclared exception!\n try { \n Range.parseRange(\"org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\", range_CoordinateSystem2);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }",
"public boolean takeControl(){\r\n\t\tif(sound.readValue()>40){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public void validateRpd15s2()\n {\n // This guideline cannot be automatically tested.\n }",
"@Override\n\tpublic boolean checkBoundary(float x) {\n\t\tif (!(x >= MINRANGE && x <= MAXRANGE)) {\n\t\t\treturn false;\n\t\t}\n\t\t// if in the range [-512.03, 511.97]\n\t\treturn true;\n\t}",
"public boolean isValid() {\n return (m_Port != 0);\n }",
"public static boolean checkRange(TechnicalData data0, TechnicalData data1, int index0, int index1) {\n\t\tif (data0.timeStamp(index0).equals(data1.timeStamp(index1))) return true;\n\t\treturn false;\n\t}",
"boolean HasRange() {\r\n\t\treturn hasRange;\r\n\t}",
"public boolean isRightKnown() {\n return right != BeaconColor.UNKNOWN;\n }",
"@Override\n public boolean isReady() {\n return areValidReadings(mReadings);\n }",
"public Boolean shouldRead() {\n return this.isComplete();\n }",
"boolean handleInput(float x, float y){\n return r1_.x_ <= x && r2_.x_ >= x && r1_.y_ >= y && r2_.y_ <= y;\n }",
"boolean hasSendReading();",
"private boolean checkRange(int rowIndex, int columnIndex) {\n return rowIndex >= 0 && rowIndex < matrix.length\n && columnIndex >= 0 && columnIndex < matrix[rowIndex].length;\n\n }",
"private boolean checkResolution(double tar_LonDPP) {\n double LonDPP = (this.lrlon - this.ullon) / 256;\n return LonDPP <= tar_LonDPP;\n }",
"@Test(timeout = 4000)\n public void test099() throws Throwable {\n Object object0 = new Object();\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 127L, 127L);\n Range range1 = Range.of(127L);\n boolean boolean0 = range0.equals(range1);\n assertFalse(boolean0);\n \n long long0 = range1.getEnd();\n assertEquals(127L, long0);\n \n long long1 = range1.getBegin(range_CoordinateSystem0);\n assertEquals(128L, long1);\n }",
"public boolean check() {\n return StuffUtils.equal(structure, SpigotUtils.structBetweenTwoLocations(pos1, pos2, material));\n }",
"private boolean partIsValid(){\r\n int min = Integer.parseInt(partMin.getText());\r\n int max = Integer.parseInt(partMax.getText());\r\n int inventory = Integer.parseInt(partInv.getText());\r\n if(max < min || min >= max){\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.setTitle(\"Error: Change Max and Min Values\");\r\n alert.setContentText(\"Change Max value to be greater than min\");\r\n alert.showAndWait();\r\n return false;\r\n } else if(max < inventory || min > inventory){\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.setTitle(\"Error: Invalid Inventory number\");\r\n alert.setContentText(\"Inventory must be less than max and more than min\");\r\n alert.showAndWait();\r\n return false;\r\n }\r\n return true;\r\n }",
"public boolean checkAcross() {\r\n\t\tif (p1[0] + p1[1] + p1[2] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p1[3] + p1[4] + p1[5] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p1[6] + p1[7] + p1[8] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p2[0] + p2[1] + p2[2] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p2[3] + p2[4] + p2[5] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p2[6] + p2[7] + p2[8] == 15)\r\n\t\t\treturn true;\r\n\r\n\t\treturn false;\r\n\t}",
"public boolean hasValidUnitNum() {\n return getTotalUnits() <= 22;\n }",
"private boolean isGettingData(){\n int available;\n long startTime = System.nanoTime();\n int timeout = 100;\n InputStream inStream = null;\n flushStream();\n try {\n if(socket!=null)\n inStream = socket.getInputStream();\n Thread.sleep(100); //The Arduino keeps sending data for 100ms after it is told to stop\n }catch(IOException | InterruptedException e){}\n try {\n while (true) {\n available = inStream.available();\n if (available > 0) {\n return true;\n }\n Thread.sleep(1);\n long estimatedTime = System.nanoTime() - startTime;\n long estimatedMillis = TimeUnit.MILLISECONDS.convert(estimatedTime,\n TimeUnit.NANOSECONDS);\n if (estimatedMillis > timeout){\n return false; //timeout, no data coming\n }\n }\n }catch(IOException | InterruptedException | NullPointerException e){\n Log.d(\"Exception\", \"Exception\");\n }\n return false;\n }",
"public static boolean checkSensorState()\n\t{\n\t\tboolean state = false;\n\t\ttry\n\t\t{\t\n\t\t\t\tfor (SensorData sData : sCollect.getList())\n\t\t\t\t{\n\t\t\t\t\tif (sData.getId().equals(ConnectionManager.getInstance().currentSensor(0).getSerialNumber()))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(sData.getState().equals(Constants.SENSOR_STATE_STOCK))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstate = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t}catch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\t\treturn state;\n\t}",
"boolean isCameraBurstPref();",
"public boolean inRange(){\n //System.out.println(\"inRange\");\n return Math.abs(GameView.instance.player.position.x - creationPoint.x) < GameView.instance.cameraSize * attackRange;\n }",
"public void validateRpd2s9()\n {\n // This guideline cannot be automatically tested.\n }",
"boolean hasForRead();",
"@Override\n public boolean checkSensors() {\n HttpURLConnection conn;\n int tries = -1;\n int response = -1;\n URL url = null;\n try {\n do {\n tries++;\n url = new URL( mHost + \"/timeout/checkSensor\" ); // TODO wrong place for\n // appspecific prefix\n conn = (HttpURLConnection) url.openConnection();\n conn.setReadTimeout( 30000 /* milliseconds */);\n conn.setConnectTimeout( 30000 /* milliseconds */);\n conn.setRequestMethod( \"GET\" );\n conn.setDoInput( true );\n conn.setRequestProperty( \"Cookie\", \"X-SESSION_ID=\" + getXSession() );\n response = conn.getResponseCode();\n Log.d( TAG, \"The response is: \" + response );\n if ( response == 403 ) {\n relogin();\n } else if ( response == 200 ) {\n InputStreamReader reader = new InputStreamReader(\n conn.getInputStream() );\n CharBuffer buffer = CharBuffer.allocate( 256 );\n char[] cbuf = new char[ 256 ];\n StringBuffer body = new StringBuffer( 1024 );\n int read = -1;\n while ( (read = reader.read( buffer )) >= 0 ) {\n buffer.rewind();\n buffer.get( cbuf, 0, read );\n body.append( cbuf, 0, read );\n // body.append( buffer.subSequence( 0, read ) );\n buffer.clear();\n }\n if ( !body.toString().trim().toLowerCase().equals( \"ok\" ) ) {\n Log.e( TAG, \"Response from \" + url\n + \" was 200 but content was not ok\" );\n return false;\n }\n }\n } while ( response == 403 && tries < 3 );\n return true;\n } catch ( IOException e ) {\n Log.e( TAG, \"Something wicked happened while GETting to \" + url );\n e.printStackTrace();\n return false;\n }\n }",
"public boolean isValid()\n {\n return this.address >= 0 && this.slaveId >= 0 && this.xlator != null\n && this.gatewayProtocol != null\n && (this.serialParameters != null\n || (this.gatewayIPAddress != null\n && this.gatewayPort != null));\n }",
"private void validateParameter(){\n\t\tif(hrNum > upperBound){\n\t\t\thrNum = upperBound;\n\t\t}\n\t\telse if(hrNum < lowerBound){\n\t\t\thrNum = lowerBound;\n\t\t}\n\t}",
"private boolean isValid() throws BadInputException {\n try {\n if( ! br.ready() ) \t\t\t\t\t\t//Is the reader ready?\n throw new BadInputException();\t\t//Must be a problem with the file, throw exception\n }\n catch(java.io.IOException e) {\n System.out.println(\"Error validating readability of file: \" + e.toString() );\n }\n\n return true;\n }",
"public boolean canReadData() {\r\n \t\tboolean can = true;\r\n \t\tif (null == dataFile ) {\r\n \t\t\tcan = false;\r\n \t\t}\r\n \t\treturn can;\r\n \t}",
"public abstract void isASRRejection(long ms);",
"public boolean hasValidFromMillis() {\n return fieldSetFlags()[4];\n }",
"protected boolean isFinished() {\n\tif(this.motionMagicEndPoint >0) {\n \tif(Math.abs(RobotMap.motorLeftTwo.get() )< 0.09 && Math.abs(RobotMap.motorRightTwo.get() )> -0.09&& Timer.getFPGATimestamp()-starttime > 10) {\n \t\treturn true;\n \t}\n\t}\n\t\n return false;\n }",
"protected boolean isValidOffTimerReservationSetting(byte[] edt) {\n\t\tif(edt == null || !(edt.length == 1)) return false;\n\t\treturn true;\n\t}",
"protected final boolean rangeTestFailed(int value) {\n\tboolean test1 =\n\t (reqminSet && (reqminClosed? (value < reqmin): (value <= reqmin)))\n\t || (minSet && (minClosed? (value < min): (value <= min)));\n\tboolean test2 =\n\t (reqmaxSet && (reqmaxClosed? (value > reqmax): (value >= reqmax)))\n\t || (maxSet && (maxClosed? (value > max): (value >= max)));\n\treturn (test1 || test2);\n }",
"public boolean takeControl() {\n\t\tif (Squirrel.us.getDistance() <= 30 && Squirrel.notDetected)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"@Test(timeout = 4000)\n public void test108() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, (-32768L), 2147484380L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n Range range1 = Range.of(range_CoordinateSystem1, (-32768L), 2147484380L);\n range1.getEnd();\n boolean boolean0 = range0.equals(range1);\n assertFalse(boolean0);\n \n long long0 = range1.getEnd();\n assertEquals(2147484379L, long0);\n \n Object object0 = new Object();\n range0.getEnd();\n long long1 = range0.getBegin();\n assertEquals((-32769L), long1);\n }",
"boolean isValidFor(TimeGrain grain);",
"@Override\n public boolean detect() {\n QQRobot.checkBoardExists(RGB_MY_SPACE);\n CurrentData.REAL.reset();\n QQRobot.findBoard(RGB_MY_SPACE, CurrentData.REAL.board);\n QQRobot.findAndCleanBoard(CurrentData.REAL.board, CurrentData.REAL.tetromino, CurrentData.REAL.nextBlocks);\n QQRobot.findFutures(RGB_MY_SPACE, CurrentData.REAL.nextBlocks);\n\n if (CurrentData.REAL.tetromino.isValid()) {\n return true;\n } else {\n return false;\n }\n }",
"boolean hasPitch();",
"boolean hasPitch();",
"@Test(timeout = 4000)\n public void test120() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.ofLength(9223372036854775806L);\n range0.getBegin();\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n boolean boolean0 = range0.equals(range_CoordinateSystem0);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n String string0 = range0.toString(range_CoordinateSystem1);\n assertEquals(\"[ 1 .. 9223372036854775806 ]/RB\", string0);\n \n Range range1 = Range.parseRange(\"[ 1 .. 9223372036854775806 ]/RB\");\n boolean boolean1 = range0.equals(range1);\n assertTrue(boolean1 == boolean0);\n assertFalse(range1.equals((Object)range0));\n \n Range.Comparators.values();\n long long0 = range0.getBegin();\n assertEquals(0L, long0);\n }",
"private void checkIfR2D2Found() throws Exception {\n\t\tint tortoiseLocationX = Tortoise.getX();\n\t\tint tortoiseLocationY = Tortoise.getY();\n\n\t\tif (tortoiseLocationX <= 510 && tortoiseLocationX >= 505 && tortoiseLocationY >= 110 && tortoiseLocationY <= 115)\n\t\t\tplayEureka();\n\t}",
"@Override\n public boolean isFinished() {\n double[] positions = drivetrain.getPositions();\n\n return Math.abs(positions[0] - targetDistance) <= allowedError && Math.abs(positions[1] - targetDistance) <= allowedError;\n }",
"public boolean validateNummer() {\n\t\treturn (nummer >= 10000 && nummer <= 99999 && nummer % 2 != 0); //return true==1 oder false==0\n\t}",
"public boolean isValid() {\n return latitudeSouth != INVALID_LAT_LON;\n }",
"boolean isUsedForReading();",
"boolean hasRt();",
"public void validateRpd22s2()\n {\n // This guideline cannot be automatically tested.\n }",
"@Test(timeout = 4000)\n public void test104() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 9223372036854775806L, 9223372036854775806L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n Range.of(range_CoordinateSystem1, 9223372032559808516L, 9223372032559808516L);\n Range range1 = Range.of(9223372036854775806L, 9223372036854775806L);\n range1.split(9223372032559808516L);\n boolean boolean0 = range1.endsBefore(range0);\n assertFalse(boolean0);\n \n boolean boolean1 = range0.equals(range1);\n assertFalse(boolean1);\n }",
"public boolean hitSide()\n {\n if(accel.getAcceleration(ADXL345_I2C.Axes.kX)>0)\n return true;\n else\n return false;\n }",
"@Test(timeout = 4000)\n public void test121() throws Throwable {\n Range range0 = Range.ofLength(0L);\n range0.toString();\n long long0 = range0.getEnd();\n assertEquals((-1L), long0);\n \n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n String string0 = range0.toString(range_CoordinateSystem0);\n assertEquals(\"[ 1 .. 0 ]/RB\", string0);\n \n Object object0 = new Object();\n boolean boolean0 = range0.equals(\"[ 0 .. -1 ]/0B\");\n assertFalse(boolean0);\n \n Range.CoordinateSystem.values();\n Range.CoordinateSystem.values();\n Range range1 = Range.parseRange(\"[ 1 .. 0 ]/RB\");\n boolean boolean1 = range0.equals(range1);\n assertFalse(boolean1);\n \n range0.complement(range1);\n long long1 = range1.getBegin();\n assertFalse(range1.equals((Object)range0));\n assertTrue(range1.isEmpty());\n assertEquals(1L, long1);\n }"
]
| [
"0.6911012",
"0.6320528",
"0.61640865",
"0.60818064",
"0.59708834",
"0.5968603",
"0.5944124",
"0.5802985",
"0.5696367",
"0.5692179",
"0.56637317",
"0.55873567",
"0.55677086",
"0.55557525",
"0.5534938",
"0.5524301",
"0.550979",
"0.5501948",
"0.54913896",
"0.54819405",
"0.54686475",
"0.54625213",
"0.5460765",
"0.5457799",
"0.54576486",
"0.5432299",
"0.5430801",
"0.5406569",
"0.5399774",
"0.5387415",
"0.5382669",
"0.5375459",
"0.536029",
"0.5350715",
"0.53471714",
"0.5344945",
"0.53249896",
"0.5308476",
"0.53045934",
"0.5294568",
"0.5293583",
"0.52788687",
"0.5277975",
"0.5268332",
"0.52624124",
"0.52537024",
"0.5228862",
"0.52195215",
"0.5200698",
"0.52000594",
"0.51983875",
"0.5195544",
"0.51944983",
"0.51895124",
"0.5183307",
"0.5170004",
"0.5166115",
"0.5164206",
"0.51600796",
"0.515965",
"0.5155589",
"0.5151022",
"0.51441664",
"0.51420134",
"0.5136568",
"0.5128615",
"0.51189625",
"0.51153594",
"0.51079434",
"0.5102499",
"0.5099673",
"0.50844604",
"0.5080702",
"0.5058167",
"0.5057636",
"0.50546366",
"0.5053942",
"0.5050603",
"0.5049707",
"0.50473917",
"0.50448793",
"0.50386506",
"0.50385416",
"0.5037112",
"0.5033318",
"0.5029689",
"0.5028792",
"0.5028674",
"0.5028674",
"0.50251806",
"0.502375",
"0.50213754",
"0.5018674",
"0.5016334",
"0.5012939",
"0.50084054",
"0.5008193",
"0.5008173",
"0.5005174",
"0.50019455"
]
| 0.66414714 | 1 |
/ Return reading for a given range sensor in meters | double getRangeDist( RangeName r ) {
double dis = 0.0;
double period = 1.0/MAX_RANGE_READ_FREQ ; // dflt 10Hz => one read per 100ms
last_range_read_failed_ = false;
switch ( r ) {
case RGB_RANGE_STONE :
if( rgb_range_stone_ != null ) {
if( (last_rgb_range_stone_read_loop_id_ == loop_cnt_) || (last_rgb_range_stone_read_time_>0 && curr_time_-last_rgb_range_stone_read_time_<period) ) {
dis = rgb_range_stone_dist_;
} else {
dis = rgb_range_stone_.getDistance( DistanceUnit.METER );
if( isValidRangeReading(dis) ) {
last_rgb_range_stone_read_loop_id_ = loop_cnt_;
last_rgb_range_stone_read_time_ = curr_time_;
rgb_range_stone_dist_ = dis;
last_range_failed_read_time_ = 0.0;
} else { // invalid reading, use the last value
dis = rgb_range_stone_dist_;
last_range_read_failed_ = true;
last_range_failed_read_time_ = curr_time_;
}
}
}
break;
case RANGE_STONE :
if( range_stone_ != null ) {
if( (last_range_stone_read_loop_id_ == loop_cnt_) || (last_range_stone_read_time_>0 && curr_time_-last_range_stone_read_time_<period) ) {
dis = range_stone_dist_;
} else {
dis = range_stone_.getDistance( DistanceUnit.METER );
if( isValidRangeReading(dis) ) {
last_range_stone_read_loop_id_ = loop_cnt_;
last_range_stone_read_time_ = curr_time_;
range_stone_dist_ = dis;
last_range_failed_read_time_ = 0.0;
} else { // invalid reading, use the last value
dis = range_stone_dist_;
last_range_read_failed_ = true;
last_range_failed_read_time_ = curr_time_;
}
}
}
break;
case RANGE_RIGHT :
if( range_right_ != null ) {
if( (last_range_right_read_loop_id_ == loop_cnt_) || (last_range_right_read_time_>0 && curr_time_-last_range_right_read_time_<period) ) {
dis = range_right_dist_;
} else {
dis = range_right_.getDistance( DistanceUnit.METER );
if( isValidRangeReading(dis) ) {
last_range_right_read_loop_id_ = loop_cnt_;
last_range_right_read_time_ = curr_time_;
range_right_dist_ = dis;
last_range_failed_read_time_ = 0.0;
} else { // invalid reading, use the last value
dis = range_right_dist_ ;
last_range_read_failed_ = true;
last_range_failed_read_time_ = curr_time_;
}
}
}
break;
case RANGE_LEFT :
if( range_left_ != null ) {
if( (last_range_left_read_loop_id_ == loop_cnt_) || (last_range_left_read_time_>0 && curr_time_-last_range_left_read_time_<period) ) {
dis = range_left_dist_;
} else {
dis = range_left_.getDistance( DistanceUnit.METER );
if( isValidRangeReading(dis) ) {
last_range_left_read_loop_id_ = loop_cnt_;
last_range_left_read_time_ = curr_time_;
range_left_dist_ = dis;
last_range_failed_read_time_ = 0.0;
} else { // invalid reading, use the last value
dis = range_left_dist_ ;
last_range_read_failed_ = true;
last_range_failed_read_time_ = curr_time_;
}
}
}
break;
default:
break;
}
return dis;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getRange(){\r\n\t\t uSensor.ping();\r\n\t\t return uSensor.getRangeInches();\r\n\t\t}",
"public double getRangeInches(){\r\n\t\t return uSensor.getRangeInches();\r\n\t\t}",
"public double getRangeInches()\n {\n if (isRangeValid())\n {\n\n double currentInches = ((AnalogInput)m_echoChannel).getVoltage() * m_conversionToInches;\n\n m_oldDistance = currentInches;\n }\n\n return m_oldDistance;\n }",
"@Override\r\n\tpublic float getRange() {\r\n\t\tsp.fetchSample(sample, 0);\r\n\r\n\t\treturn sample[0];\r\n\t}",
"public double getRange(){\n\n double range = fuelRemaining * fuelEconomy;\n return range;\n }",
"public int readDistance() {\r\n\t\tint newDistance=0;\r\n\t\tint filterCount = 0;\r\n\t\twhile(filterCount<US_FILTER) {\r\n\t\t\tus.fetchSample(usData, 0); // acquire data\r\n\t\t\tnewDistance=(int) (usData[0] * 100.0);// extract from buffer, cast to int and add to total\r\n\t\t\t\r\n\t\t\tif(newDistance<=distance+US_ERROR && newDistance>=distance-US_ERROR) {\r\n\t\t\t\tfilterCount++;\r\n\t\t\t}else {\r\n\t\t\t\tfilterCount=0;\r\n\t\t\t}\r\n\t\t\tdistance=newDistance;\r\n\t\t}\r\n\t\treturn distance; \r\n\t}",
"double getMagnetic(double reading);",
"public double getRange(){\n\t\treturn range;\n\t}",
"public static int readUsDistance() {\n usSensor.fetchSample(usData, 0);\n // extract from buffer, cast to int, and filter\n return filter((int) (usData[0] * 100.0));\n }",
"public abstract double readLightValue();",
"public double getDistance(){\n return sensor.getVoltage()*100/2.54 - 12;\n }",
"@Override\n\tpublic Number filteredReading() {\t\n\t// Check we have any readings.\n\tif (buffer.size() == 0) return new Double(0.0);\n\n\tSensorReading reading = null;\n\tdouble sum = 0.0;\n\tdouble avge = 0.0;\n\tint index = 0;\n\n\t// Loop over buffered samples.\n\tIterator it = buffer.iterator();\n\twhile (it.hasNext()) {\n\t reading = (SensorReading)it.next();\n\t avge = avge + reading.getContinuousReading();\n\t index++;\n\t}\n\tlogger.log(2, \"Av-Filter\", name, \"filteredReading\",\"Returned: \"+\n\t\t (avge/index)+\" using \"+index+\" samples.\");\n\treturn new Double(avge / index);\n }",
"public double getReading() {\r\n\t\tresult = clicks;\r\n\t\tif(metric) result *= 0.2;\r\n\t\telse result *= 0.01;\r\n\t\treturn result;\r\n\t\t\r\n\t}",
"int range() {\n\t\treturn mpg * fuelcap;\n\t}",
"private int mappingTOArduinoRange(double value) {\n int x = (int) (value * 10); // 0~10 will be 0~100\n double a = 0;\n double b = 100;\n\n double c = 0;\n double d = 200; // actually, is 80. But I want a more smooth throttle\n int mapped = (int) ((x-a)/(b-a) * (d-c) + c);\n\n if(mapped > ARDUINO_PWM_LIMIT){\n // TODO: trigger tilt alert\n mapped = ARDUINO_PWM_LIMIT;\n }\n\n return mapped;\n }",
"public double[] getRange() \n{\n\treturn range;\n}",
"private double measureTemp() {\n try {\n analog0 = blueTooth.sensor(0);\n analog1 = blueTooth.sensor(1);\n return ((analog0 - analog1) * 5 * 100) / 1024.0;\n } catch (TimeoutException ex) {\n Logger.getLogger(TempMeasure.class.getName()).log(Level.SEVERE, null, ex);\n }\n return ((analog0 - analog1) * 5 * 100) / 1024.0;\n }",
"int range(){\n return fuelcap*mpg;\n }",
"double getMinActiveAltitude();",
"public float GetDistance(String sensor_name)\n {\n double distance = 0;\n // TODO List: read the value of the sonor sensor, and convert it to centimeter.\n if (sensor_name == str_sensor_door)\n {\n distance = sensor_door.getDistance(DistanceUnit.CM);\n RobotLog.vv(\"DoorDistanceToGlyph\", \"%4.1f\", distance);\n }\n else if (sensor_name == str_sensor_tray)\n {\n\n distance = sensor_tray.getDistance(DistanceUnit.CM);\n RobotLog.vv(\"TrayDistanceToGlyph\", \"%5.2f\", distance);\n }\n else\n {\n\n distance = sensor_sonar_front.getDistance();\n RobotLog.vv(\"SonarDistanceToGlyph\", \"%5.1f\", distance);\n }\n\n return (float) distance;\n }",
"public float getPitchRange() {\n\treturn range;\n }",
"Sensor getSensor();",
"int getRange();",
"public abstract Range get(int mediaID, Range range );",
"public double[] getRange();",
"public float getmaxWind() {\n Reading minWindReading = null;\n float maxWind = 0;\n if (readings.size() >= 1) {\n maxWind = readings.get(0).windSpeed;\n for (int i = 1; i < readings.size(); i++) {\n if (readings.get(i).windSpeed > maxWind) {\n maxWind = readings.get(i).windSpeed;\n }\n }\n } else {\n maxWind = 0;\n }\n return maxWind;\n }",
"public static double readInRange(String prompt, double min, double max)\n\t {\n\t assert min <= max : \"max must be at least as large as min!\";\n\t double value;\n\t do {\n\t \tout.println(prompt);\n\t\t value = in.nextDouble();\n\t\t if(value < min || value > max) {\n\t\t \tout.println(\"Value must be in range [\" + min + \",\" + max + \"]!\");\n\t\t }\n\t }while(value < min || value > max);\n\t \n\t return value;\n\t }",
"public int rawDistance() {\r\n\t\tus.fetchSample(usData, 0); // acquire data\r\n\t\tdistance=(int) (usData[0] * 100.0);// extract from buffer, cast to int and add to total\r\n\t\t\t\r\n\t\treturn distance; \r\n\t}",
"public double[] getRange(){\n\treturn RANGE;\n }",
"public static double readInRange(String prompt, double min, double max){\n\t\tassert min <= max : \"max must be at least as large as min!\";\n\t\tdouble value;\n\t\tdo{\n\t\t\tSystem.out.print(prompt);\n\t\t\tvalue = in.nextDouble();\n\t\t}while(value < min || value > max);\n\t\treturn value;\n\t}",
"protected abstract void getPotentiometerValue(int value, int channelNo);",
"public float getDistanceData() {\n\t\tultrasonicSample.fetchSample(distanceData, 0);\n\t\tfloat distance = distanceData[0]*100; //change the unit from m to cm\n\t\tfloat distanceToReturn;\n\t\tif (distance >= WALL_DIS + WIDTH && filterControl < FILTER_OUT) {\n\t\t\t// bad value, do not set the distance var, however do increment the\n\t\t\t// filter value\n\t\t\tfilterControl++;\n\t\t\tdistanceToReturn = lastDistance;\n\t\t} else if (distance >= WALL_DIS + WIDTH) {\n\t\t\t// We have repeated large values, so there must actually be nothing\n\t\t\t// there: leave the distance alone\n\t\t\tdistanceToReturn = distance;\n\t\t\tlastDistance = distance;\n\t\t}else {\n\t\t\t// distance too low: reset filter and leave\n\t\t\t// distance alone.\n\t\t\tfilterControl = 0;\n\t\t\tdistanceToReturn = distance;\n\t\t\tlastDistance = distance;\n\t\t}\n\t LCD.drawString(\"D: \" +distanceToReturn, 0, 3);\n\t\treturn distanceToReturn;\n\t}",
"public double get(int min, int max) {\r\n\t\treturn chart[min][max];\r\n\t}",
"public Range getAudioPortsRange();",
"public abstract double getValue(R1Interval interval);",
"public int getRange() {\n return mRange;\n }",
"public double getValue() {\n\t\treturn sensorval;\n\t}",
"private void getTemperature() {\r\n \t\r\n \t//Get the date from the DateService class\r\n \tDate theDate = theDateService.getDate(); \r\n \t\r\n \t//Increment the number of readings\r\n \tlngNumberOfReadings ++;\r\n \tdouble temp = 0.0;\r\n \tString rep = \"\";\r\n \t\r\n \t//Assume that the TMP36 is connected to AIN4\r\n \trep = this.theTemperatureService.readTemperature(\"4\");\r\n \tpl(rep);\r\n \ttemp = this.theTemperatureService.getTheTemperature();\r\n \t\r\n \t//All details necessary to send this reading are present so create a new TemperatureReading object\r\n \tTemperatureReading theReading = new TemperatureReading(temp, theDate, lngNumberOfReadings);\r\n \tthis.send(theReading);\r\n \t\r\n }",
"public interface TargetRange extends Data {\n\n\t/**\n\t * Control setpoint for the value. This values shall be reached by\n\t * actions of an OGEMA application, no action based on this value is\n\t * performed by the framework itself. If no setpoint is given, an estimate\n\t * may be guessed from taking the center point of the {@link #targetRange()},\n\t * the {@link #controlLimits() } or the {@link #alarmLimits() } (in descending\n\t * order of relevance).\n\t * Models inheriting from this prototype must override\n\t * this with a suitable simple resource to define the meaning and the unit\n\t * of measurement.\n\t */\n\tValueResource setpoint();\n\n\t/**\n\t * Range which the sensor value shall lie as a result of control, if possible. The range is considered as soft\n\t * limits, i.e. contrary to the {@link #controlLimits() controlLimits} the so-defined ambient range may be left. If\n\t * not targetRange is given, the {@link #setpoint() setpoint} may indicate where the range lies.\n\t */\n\tRange targetRange();\n\n\t/**\n\t * Limits for the sensor value that shall be used for the control of the relevant device. Usually the controlLimits\n\t * should be held for sure.\n\t */\n\tRange controlLimits();\n\n\t/**\n\t * The resource shall only be used for limits that shall be integrated into an alarm logging and/or alarm handling\n\t * OGEMA application. It is NOT intended for limits that just trigger control signals.<br>\n\t * Note: No alarm events are generated by the OGEMA framework itself.<br>\n\t * For sensors providing information not represented as float, a resource of the relevant range type named\n\t * <code>alarmLimits</code> can be added as decorator.\n\t */\n\tRange alarmLimits();\n}",
"public default double getTargetRange(Entity casterIn){ return RangeType.getRange(casterIn, this); }",
"@Override\n public double between(double min, double max) {\n return super.between(min, max);\n }",
"public double getLow() {return low;}",
"public float getminWind() {\n Reading minWindReading = null;\n float minWind = 0;\n if (readings.size() >= 1) {\n minWind = readings.get(0).windSpeed;\n for (int i = 1; i < readings.size(); i++) {\n if (readings.get(i).windSpeed < minWind) {\n minWind = readings.get(i).windSpeed;\n }\n }\n } else {\n minWind = 0;\n }\n return minWind;\n }",
"float getTemperature();",
"private double readPressureSample() {\n return 6 * randomPressureSampleSimulator.nextDouble() * randomPressureSampleSimulator.nextDouble();\n }",
"public double get_thermal_reading() {\n\t\t\n\t\treturn 0;\n\t}",
"public String getRange() {\n return this.range;\n }",
"@Override\n\tpublic int getRange() {\n\t\treturn range;\n\t}",
"public int getRange()\n\t{\n\t\treturn Range;\n\t}",
"protected abstract D getLower(R range);",
"public double getMinRange() {\n return minRange;\n }",
"public double generateAltitude(Double startRange, Double endRange);",
"@Override\n\tprotected int getSensorData() {\n\t\treturn sensor.getLightValue();\n\t}",
"public interface MAV_DISTANCE_SENSOR {\n /**\n * Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units\n */\n public final static int MAV_DISTANCE_SENSOR_LASER = 0;\n /**\n * Ultrasound rangefinder, e.g. MaxBotix units\n */\n public final static int MAV_DISTANCE_SENSOR_ULTRASOUND = 1;\n /**\n * Infrared rangefinder, e.g. Sharp units\n */\n public final static int MAV_DISTANCE_SENSOR_INFRARED = 2;\n /**\n * Radar type, e.g. uLanding units\n */\n public final static int MAV_DISTANCE_SENSOR_RADAR = 3;\n /**\n * Broken or unknown type, e.g. analog units\n */\n public final static int MAV_DISTANCE_SENSOR_UNKNOWN = 4;\n}",
"protected abstract float getMeasurement();",
"public AddressInfo getRange() {\r\n return range;\r\n }",
"String getSensorDataPoint();",
"org.hl7.fhir.Integer getReadCoverage();",
"public int lightreading() {\n\t\tLSvalue = lightSensor.lightreading(); \t\t\t\t\t\t\t\t\t\n\t\treturn LSvalue;\n\t}",
"GenericFloatSensor sensor();",
"private double getRangeCenter(int lowerBound, int upperBound) {\n return (lowerBound + upperBound) / 2.0;\n }",
"private static Double convertToMeters(Double Ins) {\n double meters;\n meters = Ins / 39.37;\n return meters;\n }",
"public void read(long address, long range, int moteID) {\n\t\ttotalRange = range;\n\t\tstartAddress = address;\n\t\tfocusedAddress = address;\n\t\tfocusedMote = moteID;\n\t\tif(range > ViewerMsg.totalSize_data()) {\n\t\t\tfocusedRange = ViewerMsg.totalSize_data();\n\t\t} else {\n\t\t\tfocusedRange = (int) range;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"0x\" + Long.toHexString(startAddress) + \" to 0x\" + Long.toHexString(startAddress + totalRange));\n\t\tSystem.out.println(\"_________________________________________________\");\n\t\t\n\t\tmote.read(address, focusedRange, focusedMote);\n\t\t\n\t}",
"public double getReading() {\n return this.getDataRef().get();\n }",
"public static RangeInfo obtain(int type, float min, float max, float current) {\n/* 3057 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public void readSensor() {\n try {\n Log.i(TAG, \"trying to read from sensors\");\n distance = this.bufferedReader.readLine();\n // if (distance != null && distance != \"0\") {\n Log.i(TAG, distance);\n\n // MainActivity.distance.setText(distance);\n Log.i(TAG, \"done with sensors\");\n //setBackgroundColor(Integer.parseInt(distance));\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private static double getInRangeDouble (Scanner scan, double min, double max) {\n double value = -9999;\n while (value < min || value > max) {\n System.out.println(\"Must be a double between \" + min + \" and \" + max + \" : \");\n while (!scan.hasNextDouble()) {\n System.out.println(\"Must be a double between \" + min + \" and \" + max + \" : \");\n scan.next();\n }\n value = scan.nextDouble();\n }\n return value;\n }",
"public float getminTemp() {\n Reading minTempReading = null;\n float minTemp = 0;\n if (readings.size() >= 1) {\n minTemp = readings.get(0).temperature;\n for (int i = 1; i < readings.size(); i++) {\n if (readings.get(i).temperature < minTemp) {\n minTemp = readings.get(i).temperature;\n }\n }\n } else {\n minTemp = 0;\n }\n return minTemp;\n }",
"public Reading get_reading () {\n if (!this.on) {\n return null;\n }\n\n Instant instant = Instant.now();\n return new Reading(\n (float) instant.getEpochSecond(),\n this.currentSensorValue,\n this.stationName,\n this.stationLocation\n );\n }",
"int getRadiusUnitsValue();",
"public float getTheDistance(){\n\t\t\n\t\tdistance = sonic.getDistance();\n\t\tSystem.out.println(\"value:\"+ distance);\n\t\t//considering the test results we see after 23 cm we see the +1cm precision and below 23cm we see + 5cm range \n\t\tif (distance<=25){\n\t\treturn (distance-7);\n\t\t}\n\t\telse{return (distance-3);}\n\t}",
"boolean isValidRangeReading(double dist) {\n return ( !Double.isNaN(dist) && dist>MIN_RANGE_DIST && dist<MAX_RANGE_DIST ) ;\n }",
"public double getReadPressure(){\n return this.mFarm.getReadPressure();\n }",
"public static double readingsInRange (ArrayList<Background> list, int min, int max) {\r\n\t\tint currentMin, currentMax;\r\n\t\tdouble totEvents=0;\r\n\t\tfor (Background bc : list) {\r\n\t\t\tcurrentMin = bc.getMin();\r\n\t\t\tcurrentMax = bc.getMax();\r\n\r\n\t\t\tif (currentMin >= min && currentMax <= max) {\r\n\t\t\t\ttotEvents += bc.getEvents();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn totEvents;\r\n\t}",
"@Override \n public double getTemperature() { \n return pin.getValue();\n }",
"void calculateRange() {\n //TODO: See Rules\n }",
"double getPressure();",
"public Uri getRange()\n {\n return range;\n }",
"public abstract double getRangeSize();",
"public static double mapValueFromRangeToRange(\n double value,\n double fromLow,\n double fromHigh,\n double toLow,\n double toHigh) {\n double fromRangeSize = fromHigh - fromLow;\n double toRangeSize = toHigh - toLow;\n double valueScale = (value - fromLow) / fromRangeSize;\n return toLow + (valueScale * toRangeSize);\n }",
"double getMaxActiveAltitude();",
"int getAltitude();",
"public abstract double getMeasurement();",
"public abstract double getMeasurement();",
"private DescriptiveStatistics calculateStatsForRange(List<JsonObject> datapoints, String targetName, Range range) {\n\n return datapoints.stream()\n .filter(js -> targetName.equals(js.getJsonObject(\"t\").getString(\"name\"))\n && range.contains(js.getJsonObject(\"n\").getLong(\"begin\")))\n .map(js -> js.getJsonObject(\"n\").getLong(\"value\"))\n .map(Long::doubleValue)\n .collect(descStatsCollector());\n }",
"double getCompass(double magnetic);",
"@Override\n\tvoid performReading() {\n\t\tthis.humiditySensorMeasurements.setAbsHumidity(this.varibles.get(\"absHumidity\"));\n\t\tthis.humiditySensorMeasurements.setRelHumidity(this.varibles.get(\"relHumidity\"));\n\t\tSensorResults hum = this.humiditySensorMeasurements.measurements();\n\t\n\t/*if (hum == SensorResults.HIGH && temp == SensorResults.HIGH) {\n\t\t\t// System.out.println(\"abnormal temp\");\n\t\t\tthis.creatMessage(\"abnormal hight Humidity\");\n\t\t}\n\t\tif (hum == SensorResults.LOW) {\n\t\t\t// System.out.println(\"abnormal Light\");\n\t\t\tthis.creatMessage(\"abnormal low Humidity\");\n\t\t}/**/\n\t\tmap.put(\"Light\", hum);\n\t\tthis.observer.update();\n\t}",
"int getEnergy();",
"Double getAreaValue();",
"public double getWindChill() {\n float tempC;\n float windSpeed;\n double windChill = 0;\n double windChillr = 0;\n\n\n if (readings.size() > 0) {\n tempC = readings.get(readings.size() - 1).temperature;\n windSpeed = readings.get(readings.size() - 1).windSpeed;\n windChill = 13.12 + (0.6215 * tempC) - (11.37 * Math.pow(windSpeed, 0.16)) + 0.3965 * 6 * Math.pow(2, 0.16);\n windChillr = Math.round(windChill * 10.0) / 10.0;\n } else {\n\n }\n return windChillr;\n }",
"public double readLightLevel()\n {\n return (Math.random() * (200000.0 - 0.0)) + 0.0;\n }",
"public abstract Float getGeonorCapacity(int stationId) throws DataAccessException;",
"public double getAltitude();",
"public RealRange getReferenceRange(RealRange referenceRange);",
"double getElevationWithFlooring();",
"long getAltitude();",
"public float getmaxTemp() {\n Reading maxTempReading = null;\n float maxTemp = 0;\n if (readings.size() >= 1) {\n maxTemp = readings.get(0).temperature;\n for (int i = 1; i < readings.size(); i++) {\n if (readings.get(i).temperature > maxTemp) {\n maxTemp = readings.get(i).temperature;\n }\n }\n } else {\n maxTemp = 0;\n }\n return maxTemp;\n }",
"public int getSensors() {\n return sensors;\n }",
"@Override\r\n\tpublic float[] getRanges() {\r\n\t\tsp.fetchSample(sample, 0);\r\n\r\n\t\treturn sample;\r\n\t}",
"public float getminP() {\n Reading minPressureReading = null;\n float minPressure = 0;\n if (readings.size() >= 1) {\n minPressure = readings.get(0).pressure;\n for (int i = 1; i < readings.size(); i++) {\n if (readings.get(i).pressure < minPressure) {\n minPressure = readings.get(i).pressure;\n }\n }\n } else {\n minPressure = 0;\n }\n return minPressure;\n }"
]
| [
"0.7699395",
"0.68780094",
"0.64465445",
"0.6437907",
"0.6343056",
"0.63048023",
"0.62599176",
"0.6175859",
"0.61083496",
"0.59631294",
"0.59310746",
"0.57749355",
"0.5730967",
"0.57092196",
"0.5693246",
"0.5650654",
"0.56499517",
"0.56245977",
"0.5617294",
"0.5604232",
"0.55834216",
"0.55785626",
"0.55712134",
"0.5545567",
"0.55194116",
"0.551861",
"0.5509786",
"0.5507731",
"0.5491238",
"0.5479199",
"0.54768854",
"0.5471265",
"0.54585016",
"0.54556364",
"0.5449286",
"0.5447578",
"0.5441079",
"0.5438579",
"0.5431951",
"0.54313403",
"0.5420285",
"0.5415379",
"0.5375658",
"0.53658223",
"0.5364887",
"0.536243",
"0.5344247",
"0.53439665",
"0.5343756",
"0.5336153",
"0.5329308",
"0.53235877",
"0.53194296",
"0.53149396",
"0.5307941",
"0.5307357",
"0.5305724",
"0.5304333",
"0.5294152",
"0.5277589",
"0.5270745",
"0.5255316",
"0.525385",
"0.525141",
"0.52419084",
"0.52317244",
"0.5230362",
"0.52294385",
"0.5223792",
"0.5218575",
"0.5184646",
"0.5181492",
"0.517164",
"0.51692253",
"0.5166744",
"0.516423",
"0.5158245",
"0.5156702",
"0.51511157",
"0.5150905",
"0.51467514",
"0.514193",
"0.5139463",
"0.5139463",
"0.5132758",
"0.51304525",
"0.5128117",
"0.5122785",
"0.510996",
"0.5108402",
"0.5102927",
"0.51019484",
"0.5090336",
"0.50800246",
"0.507248",
"0.5066059",
"0.5060388",
"0.5060312",
"0.5057379",
"0.50569576"
]
| 0.6353436 | 4 |
you need to treat n as an unsigned value | public int hammingWeight(int n) {
int answer = 0;
while (n != 0) {
n = n & (n - 1);
answer++;
}
return answer;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static long u(int n)\r\n\t{\r\n\t\tlong result = 0;\r\n\t\tlong current = 1;\r\n\t\tfor (int i = 0; i <= 10; i++)\r\n\t\t{\r\n\t\t\tif (i % 2 == 0)\r\n\t\t\t{\r\n\t\t\t\tresult += current;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tresult -= current;\r\n\t\t\t}\r\n\t\t\tcurrent *= n;\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}",
"private static int setBits(int n) {\r\n int highestBitValue = 1;\r\n int c = 0;\r\n\r\n while (highestBitValue < n) {\r\n highestBitValue = highestBitValue * 2;\r\n }\r\n\r\n \r\n int currentBitValue = highestBitValue;\r\n while (currentBitValue > 0) {\r\n if (currentBitValue <= n) {\r\n\r\n n -= currentBitValue;\r\n c++;\r\n }\r\n currentBitValue = currentBitValue / 2;\r\n }\r\n\r\n return c;\r\n }",
"QuickUnionUF(int n) {\n count = n;\n id = new int[n];\n for (int i = 0; i < id.length; i++) { id[i] = i; }\n }",
"public int nthUglyNumber(int n) {\n TreeSet<Long> set = new TreeSet<>();\n set.add(1L);\n long current = 1;\n for(int i = 0; i < n; i++){\n current = set.pollFirst();\n set.add(current*2);\n set.add(current*3);\n set.add(current*5);\n }\n return (int)current;\n }",
"public QuickUnionUF(int n) {\n nodes = new int[n];\n for(int i = 0; i < n; ++i) {\n nodes[i] = i;\n }\n }",
"private long mask(int n) {\n\t\treturn 1L << n;\n\t}",
"protected int t(int n) {\r\n\t\treturn Math.floorDiv(n * (n - 1), 2);\r\n\t}",
"public static void main(String[] args) {\r\n HugeUInt n1 = new HugeUInt(\"523\");\r\n HugeUInt n2 = new HugeUInt(\"92009\");\r\n HugeUInt n3 = new HugeUInt(n2);\r\n //comparison\r\n if (n1.compareTo(n2) < 0) {}\r\n //assignment\r\n System.out.println(n2 + \" : \" + n3);\r\n //left shift\r\n System.out.print(n1 + \" <- left shift, 5 positions: \");\r\n n3 = n1.shiftLeft(5);\r\n System.out.println(n3);\r\n //right shift\r\n System.out.print(n2 + \" -> right shift, 2 positions: \");\r\n n3 = n2.shiftRight(2);\r\n System.out.println(n3);\r\n //addition\r\n n1 = new HugeUInt(\"1199\");\r\n n2 = new HugeUInt(\"57\");\r\n System.out.print(n1 + \" + \" + n2 + \" = \");\r\n n3 = n1.add(n2);\r\n System.out.println(n3);\r\n //subtraction\r\n n1 = new HugeUInt(\"1199\");\r\n n2 = new HugeUInt(\"1190\");\r\n System.out.print(n1 + \" - \" + n2 + \" = \");\r\n n3 = n1.subtract(n2);\r\n System.out.println(n3);\r\n //multiplication\r\n n1 = new HugeUInt(\"13199\");\r\n n2 = new HugeUInt(\"523447\");\r\n System.out.print(n1 + \" * \" + n2 + \" = \");\r\n n3 = n1.multiply(n2);\r\n System.out.println(n3);\r\n System.out.print(n1 + \" * (int)\" + 15 + \" = \");\r\n n3 = n1.multiply(15);\r\n System.out.println(n3);\r\n\r\n //division\r\n n1 = new HugeUInt(\"42469\");\r\n n2 = new HugeUInt(\"10265\");\r\n System.out.print(n1 + \" / \" + n2 + \" = \");\r\n n3 = n1.divide(n2);\r\n System.out.println(n3);\r\n\r\n n1 = new HugeUInt(\"1200004\");\r\n n2 = new HugeUInt(\"3\");\r\n System.out.print(n1 + \" / \" + n2 + \" = \");\r\n n3 = n1.divide(n2);\r\n System.out.println(n3);\r\n\r\n n1 = new HugeUInt(\"14382\");\r\n n2 = new HugeUInt(\"131\");\r\n System.out.print(n1 + \" / \" + n2 + \" = \");\r\n n3 = n1.divide(n2);\r\n System.out.println(n3);\r\n\r\n n1 = new HugeUInt(\"29356\");\r\n n2 = new HugeUInt(\"1442\");\r\n System.out.print(n1 + \" / \" + n2 + \" = \");\r\n n3 = n1.divide(n2);\r\n System.out.println(n3);\r\n\r\n //modulus\r\n n1 = new HugeUInt(\"7407\");\r\n n2 = new HugeUInt(\"2\");\r\n System.out.print(n1 + \" % \" + n2 + \" = \");\r\n n3 = n1.mod(n2);\r\n System.out.println(n3);\r\n\r\n //random numbers\r\n while (true) {\r\n HugeUInt rnd = RSA.generateRandom(5);\r\n if (RSA.isPrime(rnd)){\r\n System.out.println(rnd + \" is prime: \" + RSA.isPrime(rnd));\r\n break;\r\n }\r\n }\r\n n1 = new HugeUInt(\"8481817445\");\r\n HugeUInt e = new HugeUInt(\"709\");\r\n HugeUInt n = new HugeUInt(\"111723990469193\");\r\n n2 = modPow(n1,e,n);\r\n System.out.println(\"Encrypt: \" + n2);\r\n HugeUInt d = new HugeUInt(\"42704084186509\");\r\n n3 = modPow(n2,d,n);\r\n System.out.println(\"Decrypt: \" + n3);\r\n }",
"static int isolateBit(int n){\n return n & (-n);\n }",
"public void missingNumberEfficient2(int[] array, int n) {\n\t\t\n\t\tint X = 0;\n\t\tint Y = 0;\n\t\t\n\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\tX ^= array[i];\n\t\t}\n\t\t\n\t\tfor(int i = 1; i <= n; i++) {\n\t\t\tY ^= i;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Missing Number is : \" + (X ^ Y));\n\t}",
"int bitRange(int num, int s, int n)\n {\n return (num >> s) & ~(-1 << n);\n }",
"public int reverseBits6(int n) {\n return Integer.reverse(n); \n }",
"private int randomInteger(int n) {\n return (int) (randGen.random() * (n - 1));\n }",
"public final long getUInt(int index) {\r\n return bb.getInt(index) & 0xffff_ffffL;\r\n }",
"public void setInBin(int n) {\n inBin=Translate.decTobinN(n, 4);\n }",
"private byte getIndex(int n) {\r\n\t\tint originalN = n;\r\n\t\tif (n < Constants.DIMENSION - 1) {\r\n\t\t\tdo {\r\n\t\t\t\tn = Constants.getRandom().nextInt(Constants.DIMENSION);\r\n\t\t\t//} while (n > Constants.FIELD_DIMENSION - 1);\r\n\t\t\t//} while ((n < originalN) || (n > Constants.FIELD_DIMENSION - 1));\r\n\t\t\t} while ((n == originalN) || (n > Constants.DIMENSION - 1));\r\n\t\t}\r\n\t\treturn (byte) n;\r\n\t}",
"public static int getBitsNumber(int n) {\r\n\t\treturn (int) (Math.log(n) / Math.log(2.0) + 0.9999);\r\n\t}",
"static int bitLengthForInt(int n) {\n return 32 - Integer.numberOfLeadingZeros(n);\n }",
"public int n_()\r\n/* 429: */ {\r\n/* 430:442 */ return this.a.length + 4;\r\n/* 431: */ }",
"protected void pktsOut(int n) {}",
"private BigInteger getUpper(int n) {\n int len = mag.length;\n\n if (len <= n) {\n return ZERO;\n }\n\n int upperLen = len - n;\n int upperInts[] = new int[upperLen];\n System.arraycopy(mag, 0, upperInts, 0, upperLen);\n\n return new BigInteger(trustedStripLeadingZeroInts(upperInts), 1);\n }",
"public String negBase2(int n) throws Exception {\r\n\t\t String binaryStr=\"\";\r\n\r\n\t\t int minValue = -256;//allowed min decimal\r\n\t\t// donot allow positive numbers and make sure the \r\n\t\t// input number is > allowed min value for 8 bit representation\r\n\t\t if (n>0 || n < minValue) \r\n\t\t\t throw new Exception (\"the input number exceeds the allowable limits\");\r\n\t\t\t \r\n\t\t binaryStr = Integer.toBinaryString((-1)*n);\r\n\t \t\r\n\t \tbinaryStr= String.format(\"%8s\", binaryStr).replace(' ', '0');\r\n\t \tbinaryStr = get2sComplement(binaryStr);\r\n\t\t return binaryStr;\r\n\t }",
"public int reverseBits5(int n) {\n long x = 0;\n for(int i=0;i<32;i++){\n x+= Math.pow(2,31-i)*(n>>i&1);\n }\n return (int)x;\n }",
"public int reverseBits(int n) {\n\n return 1;\n }",
"private static int findMissingNumber( int[] a, int n) {\n int result = 0;\n for(int i=1; i<(n+1)+1; i++) {\n result = result ^ i;\n }\n for(int i=0; i<a.length; i++) {\n result = result ^ a[i];\n }\n return result;\n }",
"public static int ulam(int n) {\n\n List<Integer> list = new ArrayList<>();\n list.add(1);\n list.add(2);\n\n int i = 3;\n while (list.size() < n) {\n\n int count = 0;\n for (int j = 0; j < list.size() - 1; j++) {\n\n for (int k = j + 1; k < list.size(); k++) {\n if (list.get(j) + list.get(k) == i)\n count++;\n if (count > 1)\n break;\n }\n if (count > 1)\n break;\n }\n if (count == 1)\n list.add(i);\n i++;\n }\n return list.get(n - 1);\n }",
"static int countSetBits(int n)\r\n {\r\n int count = 0;\r\n while (n > 0) {\r\n count += n & 1;\r\n n >>= 1;\r\n }\r\n return count;\r\n }",
"private int getInt(int n) {\n if (n < 0)\n return 0;\n if (n >= mag.length)\n return signInt();\n\n int magInt = mag[mag.length-n-1];\n\n return (signum >= 0 ? magInt :\n (n <= firstNonzeroIntNum() ? -magInt : ~magInt));\n }",
"int getN();",
"public int hammingWeight(int n) {\n String unsignedString = Integer.toUnsignedString(n, 2);\n int sum = 0;\n for (int i = 0; i < unsignedString.length(); i++) {\n if (unsignedString.substring(i, i + 1).equals(\"1\"))\n sum++;\n }\n return sum;\n }",
"private long getUnsigned(byte b) {\n\t\tif(b>=0)\n\t\t\treturn b;\n\t\treturn 256+b;\n\t\t\n\t}",
"public long getUInt() { return bb.getInt() & 0xffff_ffffL; }",
"HugeUInt(HugeUInt arg) {\r\n array = new int[arg.array.length];\r\n for (int i = 0; i < arg.array.length; i++) array[i] = arg.array[i];\r\n }",
"public int nthUglyNumber2(int n) {\n Queue<Long> choushu = new PriorityQueue<>();\n if (n == 1)\n return 1;\n choushu.offer((long) 1);\n int[] factor = {2, 3, 5};\n for (int i = 2; i <= n; i++) {\n long num = choushu.poll();\n for (int f : factor) {\n long tmp = f * num;\n if (!choushu.contains(tmp))\n choushu.offer(tmp);\n }\n System.out.println(MessageFormat.format(\"num:{0},list:{1}\", num, printQueue(choushu)));\n }\n return choushu.poll().intValue();\n }",
"public int reverseBits3(int n) {\n int x = 0;\n for(int i=0;i<32;i++){\n x = (x<<1) + (n&1);\n n=n>>1;\n }\n return x;\n }",
"static int getMissingByAvoidingOverflow(int a[], int n)\n\t {\n\t int total = 2;\n\t for (int i = 3; i <= (n + 1); i++)\n\t {\n\t total =total+ i -a[i - 2];\n\t //total =total- a[i - 2];\n\t }\n\t return total;\n\t }",
"public abstract int finalN();",
"public int reverseBits(int n) {\n int a=0;\n for(int i=0;i<=31;i++){\n a=a+((1&(n>>i))<<(31-i));\n }\n return a;\n }",
"HugeUInt(int arg) {\r\n this(Integer.toString(arg));\r\n }",
"public WtQuickUnionUF(int N)\n {\n id = new int[N];\n for ( int i = 0; i < N; i++ ) { id[i] = i; sz[i] = 1; }\n }",
"public static void passoutNum(int n){\n\t\tpassoutNum(0,n);\n\t}",
"public abstract int read_ulong();",
"public int reverseBits(int n) {\n int x = 0;\n for(int i=0;i<32;i++){\n x = x<<1 | (n&1);\n n=n>>1;\n }\n return x;\n }",
"public static int reverseBits(int n) {\n String binary = Integer.toBinaryString(n);\n while (binary.length() < 32) {\n binary = \"0\" + binary;\n }\n\n String reverse = \"\";\n for (int i = binary.length() - 1; i >= 0; i--) {\n reverse += binary.charAt(i);\n }\n\n return (int) Long.parseLong(reverse, 2);\n }",
"public Percolation(int n) {\n // constructor\n count = n;\n uf = new WeightedQuickUnionUF(count * count + 2);\n idOpen = new int[n * n + 2];\n for (int j = 0; j < (n * n + 2); j++) {\n idOpen[j] = 0;\n }\n }",
"public int reverseBits(int n) {\n int r=0;\n for(int i=0;i<32;i++){\n \tr|=((n>>i)&1)<<(31-i);\n }\n return r;\n }",
"private void writeInt(DataOutputStream out, int n) throws IOException {\n int result = ((n & 0xFF) << 24) | ((n & 0xFF00) << 8) | ((n & 0xFF0000) >> 8) | ((n & 0xFF000000) >> 24);\n out.writeInt(result);\n }",
"public int n(){\n return n;\n }",
"private static int nthUglyNumber(int n) {\n if (n == 0) {\n return 1;\n }\n\n int[] dp = new int[n];\n dp[0] = 1;\n int index2 = 0, index3 = 0, index5 = 0;\n for (int i = 1; i < n; i++) {\n dp[i] = Math.min(2 * dp[index2], Math.min(3 * dp[index3], 5 * dp[index5]));\n System.out.println(dp[i]);\n if (dp[i] == 2 * dp[index2]) {\n index2++;\n }\n\n if (dp[i] == 3 * dp[index3]) {\n index3++;\n }\n\n if (dp[i] == 5 * dp[index5]) {\n index5++;\n }\n }\n\n return dp[n - 1];\n }",
"public int reverseBits(int n) {\n int mask = 1;\n int result = 0;\n for (int i = 0; i < 32; i++) {\n result = result << 1;\n if ((n & mask) != 0) {\n result++;\n }\n mask = mask << 1;\n }\n return result;\n }",
"static long flippingBits(long n) {\n\n String strBinary = String.format(\"%32s\", Long.toBinaryString(n)).replace(' ', '0');\n String strBinaryFlip = \"\";\n\n for (int i = 0; i < strBinary.length(); i++) {\n if (strBinary.charAt(i) == '0') {\n strBinaryFlip = strBinaryFlip + '1';\n } else {\n strBinaryFlip = strBinaryFlip + '0';\n }\n }\n\n String result = String.format(\"%32s\", strBinaryFlip).replace(' ', '0');\n long base10 = parseLong(result,2);\n return base10;\n }",
"public abstract int preN();",
"public void setFlagBin(int n) {\n flagBin=Translate.decTobinN(n, 4);\n }",
"public int reverseBits(int n) {\n return Integer.reverse(n);\n }",
"public UnsignedInteger(int i) {\n\t\tvalue = new Integer(i);\n\t}",
"public void sortN(int n, int i) throws IOException{\n if((n&(MASK<<i))==0) //We shift our mask to match the position of interes\n {\n zero.writeInt(n);\n zeroCount++;\n }else{\n onePointer.writeInt(n);\n oneCount++;\n }\n }",
"private long getNthUglyNo(long n) {\n\t\tlong i = 1;\n\n\t\t// ugly number count\n\t\tlong count = 1;\n\n\t\twhile (n > count) {\n\t\t\ti++;\n\t\t\tif (isUgly(i) == 1) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn i;\n\t}",
"public int getN() {\n return n;\n }",
"public int reverseBits2(int n) {\n int x=0;\n for(int i=0;i<32;i++)\n x=x<<1 | (n>>i)&1;\n return x;\n }",
"public int reverseBits(int n) {\n // get all bits & calculate the res\n int res = 0;\n int mask = 1;\n for (int i = 0; i < 32; ++i) {\n res *= 2;\n if (checkBit(mask, n)) {\n ++res;\n }\n mask = mask << 1;\n }\n \n return res;\n }",
"static int toggleBit(int n){\n return n & (n-1);\n }",
"public int reverseBits(int n) {\n int res = 0;\n for (int i = 0; i < 32; i++){\n res = (res << 1) | (n & 1);\n n = (n >> 1);\n }\n\n return res;\n\n }",
"public int reverseBits(int n) {\n int ans = 0;\n for(int i = 0; i < 32; i++){\n ans <<= 1;\n ans += n&1;\n n >>= 1;\n }\n return ans;\n }",
"public int nextInt(int n) {\n return 0;\n }",
"public int nthUglyNumber(int n) {\n\t\tint[] ugly = new int[n + 1];\n\t\tugly[1] = 1;\n\t\tint index1 = 1, index2 = 1, index3 = 1;\n\t\tint factor1 = 2 * ugly[index1], factor2 = 3 * ugly[index2], factor3 = 5 * ugly[index3];\n\t\tfor (int i = 2; i <= n; i++) {\n\t\t\tint min = Math.min(Math.min(factor1, factor2), factor3);\n\t\t\tugly[i] = min;\n\t\t\tif (factor1 == min) {\n\t\t\t\tindex1++;\n\t\t\t\tfactor1 = 2 * ugly[index1];\n\t\t\t}\n\t\t\tif (factor2 == min) {\n\t\t\t\tindex2++;\n\t\t\t\tfactor2 = 3 * ugly[index2];\n\t\t\t}\n\t\t\tif (factor3 == min) {\n\t\t\t\tindex3++;\n\t\t\t\tfactor3 = 5 * ugly[index3];\n\t\t\t}\n\t\t}\n\n\t\treturn ugly[n];\n\t}",
"private int d(final int n) {\r\n Set<Long> set = new Factors(n).getProperDivisors();\r\n long sum = 0;\r\n for (long i : set) {\r\n sum += i;\r\n }\r\n return (int) sum;\r\n }",
"private long nextLong(long n) {\n long bits;\n long val;\n do {\n bits = (rnd.nextLong() << 1) >>> 1;\n val = bits % n;\n } while (bits - val + (n - 1) < 0L);\n return val;\n }",
"private int cap(long n) {\n\t\t\treturn (int) Math.min(RandomAccessDataFile.this.length - this.position, n);\n\t\t}",
"public QuickUnionWeightedUF(int N) {\n\t\tid = new int[N];\n\t\tsz = new int[N];\n\t\tfor (int i=0; i<N; i++) {\n\t\t\tid[i] = i;\n\t\t\tsz[i] = 1;\n\t\t}\n\t}",
"public int nthUglyNumber(int n) {\n int[] ugly = new int[n];\n //maintain three secquences(actually only need one item for each)\n //The sequence is consisted by the 2,3,5 times of ugly secquence \n int index2 = 0, index3 = 0, index5 = 0;\n int item2 = 2, item3 = 3, item5 = 5;\n ugly[0] = 1;\n for(int i = 1; i < n; i++){\n ugly[i] = Math.min(item2,Math.min(item3,item5));\n if(ugly[i]==item2){\n item2 = ugly[++index2] * 2;\n }\n if(ugly[i]==item3){\n item3 = ugly[++index3] * 3;\n }\n if(ugly[i]==item5){\n item5 = ugly[++index5] * 5;\n }\n }\n return ugly[n-1];\n }",
"public static int naslednjiClen(int n) {\n\t\tif(n == 1) {\n\t\t\treturn(1);\n\t\t}else {\n\t\t\tif(n % 2== 0) {\n\t\t\t\treturn(n/2);\n\t\t\t}else {\n\t\t\t\treturn(3*n +1);\n\t\t\t}\n\t\t}\n\t}",
"public int getUnsignedValue() {\n return num & 0xFF;\n }",
"public static int pivotInteger_fast(int n) {\n int total = n * (n + 1) / 2;\n\n double sqrt = Math.sqrt(total);\n\n int x = (int) sqrt;\n\n return sqrt == x ? x : -1;\n }",
"public int reverseBits(int n) {\n int result = 0;\n for (int i = 0; i < 32; i++) {\n if ((n & 1) == 1) {\n result = (result << 1) + 1;\n } else {\n result <<= 1;\n }\n n >>= 1;\n }\n return result;\n }",
"public nonzeronatnum(Inatnum natnum) {\n n = natnum.getVal() + 1;\n prev=natnum;\n }",
"private static int utopianTree( int n )\n\t{\n\t\tint height = 1;\n\t\twhile( n > 0 )\n\t\t{\n\t\t\tif( n > 0 )\n\t\t\t{\n\t\t\t\theight *= 2;\n\t\t\t\tn--;\n\t\t\t}\n\t\t\tif( n > 0 )\n\t\t\t{\n\t\t\t\theight++;\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t\treturn height;\n\t}",
"public int sget2(int n) {\n\t\tint res = get(n);\n\t\tint top = 1 << (n - 1);\n\t\tif ((res & top) != 0) {\n\t\t\tint mask = top - 1;\n\t\t\tif ((res & mask) == 0) {\n\t\t\t\tint res2 = sget2(n);\n\t\t\t\tres = (~mask | res) + 1 + res2;\n\t\t\t} else {\n\t\t\t\tres = ~mask | res;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}",
"public int solve(int n) {\n return n & ~(n - 1);\n }",
"private Binomial(int n) {\n N = n;\n }",
"int ainverse(int z)\n {\n return (65536-z);\n }",
"private void lastN(int n) {\n int len = this.getlength();\n if (n > len) {\n System.out.printf(\"too short to have last %d's\\n\", n);\n } else {\n Node slow = this;\n Node fast = this;\n for (int i = n; i > 0; i--) {\n fast = fast.nextNode;\n }\n while (fast != null) {\n slow = slow.nextNode;\n fast = fast.nextNode;\n }\n System.out.printf(\"last %d element is: %d\\n\", n, slow.value);\n }\n }",
"public abstract int mo12574RN(int i);",
"public QuickFindUF(int N) {\n id = new int[N];\n for (int i = 0; i < N; i++) {\n id[i] = i;\n }\n }",
"public static int querProdukt(int n) {\n\t\t// wandelt die nummer in einen String und diesen in ein Char Array\n\t char[] number = Integer.toString(n).toCharArray();\n\t int ret = 1;\n for (char c : number) {\n \t/* Char nach int gecasted ergibt den ASCII-Wert des Chars.\n \t Die ASII werte der Zahlen 0, 1,...,9 sind auf 48, 49,...,57,\n \t also gilt (ASCIIwertDerZahl)-48=Zahl\n \t */\n ret *= (int)c-48;\n }\n return ret;\n\t}",
"@Override\n\tpublic int remove(int n) {\n\t\treturn 0;\n\t}",
"public static void tinhTongLuyThua(int n) {\n\t\tfloat sum = 0;\n\t\tint luyThua;\n\t\t\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tluyThua = (int) Math.pow(CONST_X, i);\n\t\t\tSystem.out.println(\"x^\" + i + \" = \" + luyThua);\n\t\t\tsum += luyThua;\n\t\t}\n\t\tSystem.out.println(\"S(n) = x + x^1 + x^2 + ... + x^\" + n + \" = \\t\" + sum);\n\t}",
"public int getNtoLastValue(int n){\n\tint nodeValue=0, llSize=0, brojac=1,index;\n\tNode current=head;\n\twhile(current!=null){\n\t\tllSize++;\n\t\tcurrent=current.next;\n\t}\n\tindex=llSize-n;\n\tcurrent=head;\n\twhile(brojac!=index){\n\t\tcurrent=current.next;\n\t\tbrojac++;\n\t}\n\tnodeValue=current.value;\n\treturn nodeValue;\n}",
"public int getN() {\r\n\t\treturn n;\r\n\t}",
"public List<Integer> grayCode(int n) {\n\t\t\n\t\tList<Integer> ret = new ArrayList<Integer>();\n\t\tret.add(0);\n if (n==0){\n \treturn ret;\n }\n //couting loop\n for (int i=0;i<n;i++){\n \tint one = 1<<i;\n \t//picking from the last element \n \tfor (int j=ret.size()-1;j>=0;j--){\n \t\tret.add(ret.get(j)^one);\n \t}\n }\n \n return ret;\n }",
"public long getN() {\n return n;\n }",
"com.google.protobuf.ByteString getN();",
"public static int length(int n)\n {\n int w = n;\n if(w == 1)\n {\n return 1;\n } \n else\n {\n return 1 + length(next(w));\n }\n }",
"private static void showvalue(int n) {\n\t\tSystem.out.println(\"n is\"+ n);\r\n\t}",
"private int nextPowerOf2(int n)\n {\n if (n > 0 && (n & (n - 1)) == 0)\n return n;\n \n int count = 0;\n for (;n != 0; n = n >> 1)\n count += 1;\n \n return 1 << count;\n }",
"public void setOpBin(int n) {\n opBin=Translate.decTobinN(n, 8);\n }",
"UnsignedInt getTotal();",
"public int reverseBits(int n) {\n /*\n StringBuilder ans = new StringBuilder();\n for(int i=0; i<32; i++)\n {\n int temp = n&1;\n ans.append(temp);\n n = n>>>1;\n }\n return Integer.parseInt(ans.toString(), 2);\n */\n \n int result = 0;\n for(int i=0; i<32; i++){\n result <<= 1;\n result += n&1;\n n >>>= 1;\n }\n \n return result;\n \n }",
"public int reverseBits4(int n) {\n int x = 0;\n for(int i=0;i<32;i++){\n int t = n>>i&1;\n x= x | t<<(31-i);\n }\n return x;\n }",
"private double binomeN_I(int n, int i) {\n double ni;\n double a1 = factorial(n);\n double a2 = factorial(i);\n double a3 = factorial(n - i);\n ni = a1 / (a2 * a3);\n return ni;\n }",
"static long nPolyNTime(int[] n) {\n int temp = n.length;\n long sum = 0;\n if(n == null || n.length == 0) return -1;\n for(int i = 0; i < n.length; ++i) {\n while(temp --> 0) {\n for(int j = 0; j < n.length; ++j) {\n sum += n[i] + n[j];\n }\n }\n }\n return sum;\n }",
"public Binary( int n ) {\n\t_decNum = n;\n\t_binNum = decToBin(n);\n }"
]
| [
"0.6894156",
"0.64915156",
"0.6461783",
"0.6457394",
"0.6421934",
"0.6393902",
"0.63731056",
"0.63393265",
"0.6307983",
"0.6253979",
"0.62502784",
"0.6173648",
"0.6166564",
"0.6139457",
"0.6130086",
"0.612781",
"0.6102054",
"0.607891",
"0.60733235",
"0.6046902",
"0.6046623",
"0.6039447",
"0.6032328",
"0.6025285",
"0.6019202",
"0.60054725",
"0.5980872",
"0.5979785",
"0.5974375",
"0.5965943",
"0.59474844",
"0.59210813",
"0.5908576",
"0.590553",
"0.58935773",
"0.5868835",
"0.58638984",
"0.5856637",
"0.5840524",
"0.58338124",
"0.5827606",
"0.5818898",
"0.58064467",
"0.5788971",
"0.57842803",
"0.5782382",
"0.57736325",
"0.57721496",
"0.5768353",
"0.5762541",
"0.5762464",
"0.5756679",
"0.575261",
"0.5746303",
"0.57420206",
"0.5739963",
"0.5735937",
"0.57316595",
"0.5720012",
"0.57196236",
"0.5717353",
"0.57010573",
"0.5696054",
"0.5693568",
"0.5679596",
"0.56719506",
"0.56661206",
"0.56630147",
"0.5658452",
"0.56560695",
"0.5645419",
"0.56396323",
"0.5637063",
"0.5633439",
"0.56247205",
"0.56208485",
"0.5614831",
"0.56143475",
"0.5607464",
"0.5595302",
"0.55931073",
"0.55907625",
"0.55862856",
"0.5580055",
"0.5574249",
"0.5571784",
"0.556284",
"0.55589646",
"0.5558403",
"0.5556905",
"0.5552975",
"0.5549116",
"0.55486107",
"0.5545042",
"0.5541746",
"0.55382943",
"0.5538164",
"0.5537694",
"0.55364144",
"0.55317926",
"0.5527462"
]
| 0.0 | -1 |
This method gets called when home button is pressed and app goes to background. We need to send adobe hits when app goes to background. When home button is pressed system calls this method with ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN and that's when we create Async task to make server call and push all queued tags to file. | @Override
public void onTrimMemory(int level)
{
if (level == ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN)
{
// We're in the Background
Log.d(TAG, "BaseApplication::ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN : App went to background. ");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onTrimMemory(int level) {\n if (level == ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN) {\n// Log.d(TAG, \"APP in BACKGROUND\");\n Timber.i(\"APP in BACKGROUND\");\n status = ApplicationBackgroundStatus.BACKGROUND;\n sendNewStatus();\n }\n }",
"@Override\n public void onLowMemory() {\n \tsuper.onLowMemory();\n \tif(isApplicationBroughtToBackground(getApplicationContext()))\n\t\t{\n\t\t\tfinishAllActivity(); \n finishProgram(); \n\t\t}\n }",
"private void handleAppStart() {\n Trace.traceBegin(8, \"appStart:closeZswapd\");\n removeMessagesToStart();\n curState = 1;\n Message msg = handler.obtainMessage();\n msg.what = 3;\n Slog.i(TAG, \"handle app start, stop zswapd.\");\n closeZswapd();\n handler.sendMessageDelayed(msg, (long) (appStartDelay * 1000));\n Trace.traceEnd(8);\n }",
"@Override\n\tprotected void onResume() {\n\t\tisbackground=0;\n\t\tsuper.onResume();\n\t\t\n\t}",
"void enableBackgroundData();",
"@Override\n protected void onResume() {\n super.onResume();\n if (!isAppInBackground) {\n // app 从后台唤醒,进入前台\n isAppInBackground = false;\n }\n }",
"public void mo10681a() {\n if (MultiPhotoFrameMainActivity.this._handler != null) {\n MultiPhotoFrameMainActivity.this._handler.post(new Runnable() {\n public void run() {\n C2331d.m10114a((Activity) MultiPhotoFrameMainActivity.this, C2328a.WAIT_PROCESSING, (Bundle) null);\n }\n });\n }\n }",
"protected void onBSStop() {\n isFinishing = true;\n mCalled = true;\n }",
"protected void onPreExecute() {\n\t\t\t//Log..d(TAG, \"OnPreExecute'd\");\n\t\t\tif (IS_PAUSING == YES) {\n\t\t\t\tfinish();\n\t\t\t}\n\t\t\tFRAMEBUFFER_IS = BUSY;\n\t\t}",
"@Override\n public void onResume() {\n super.onResume();\n androidcontrolinterfaceVariable = (androidcontrolinterface) getApplication();\n androidcontrolinterfaceVariable.setStandardIsRunning(false);\n androidcontrolinterfaceVariable.setMyoIsRunning(true);\n androidcontrolinterfaceVariable.setIsRunning(true);\n backgroundIntentService = new Intent(this, BackgroundIntentService.class);\n startService(backgroundIntentService);\n myoBackgroundService = new Intent(this, MyoBackgroundService.class);\n startService(myoBackgroundService);\n Log.d(\"Interface\", \"MyoControlActivity onResume\");\n View decorView = getWindow().getDecorView();\n decorView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);\n\n textRcvDataThread();\n }",
"@Override\n protected void onStop() {\n super.onStop();\n if (!isAppInForeground()) {\n //app 进入后台\n isAppInBackground = true ;//记录当前已经进入后台\n }\n }",
"@Override\n// public void onBgProcessResponse(int errorCode, int operation) {\n public void onBgProcessResponse(int errorCode, BackgroundProcessor.MessageBgJob opData) {\n if(errorCode==ErrorCodes.SESSION_TIMEOUT || errorCode==ErrorCodes.NOT_LOGGED_IN) {\n AppCommonUtil.cancelProgressDialog(true);\n DialogFragmentWrapper.createNotification(AppConstants.notLoggedInTitle, AppCommonUtil.getErrorDesc(errorCode), false, true)\n .show(mFragMgr, DIALOG_SESSION_TIMEOUT);\n return;\n }\n\n try {\n switch(opData.requestCode) {\n case MyRetainedFragment.REQUEST_LOGOUT:\n AppCommonUtil.cancelProgressDialog(true);\n AgentUser.reset();\n //Start Login Activity\n if(!mExitAfterLogout) {\n Intent intent = new Intent( this, LoginActivity.class );\n // clear this activity from backstack\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n }\n finish();\n break;\n\n case MyRetainedFragment.REQUEST_CHANGE_PASSWD:\n AppCommonUtil.cancelProgressDialog(true);\n if(errorCode==ErrorCodes.NO_ERROR) {\n DialogFragmentWrapper.createNotification(AppConstants.pwdChangeSuccessTitle, AppConstants.pwdChangeSuccessMsg, false, false)\n .show(mFragMgr, DialogFragmentWrapper.DIALOG_NOTIFICATION);\n logoutAgent();\n } else {\n DialogFragmentWrapper.createNotification(AppConstants.generalFailureTitle, AppCommonUtil.getErrorDesc(errorCode), false, true)\n .show(mFragMgr, DialogFragmentWrapper.DIALOG_NOTIFICATION);\n }\n break;\n\n case MyRetainedFragment.REQUEST_SEARCH_MERCHANT:\n AppCommonUtil.cancelProgressDialog(true);\n if(errorCode==ErrorCodes.NO_ERROR) {\n mWorkFragment.mCurrMerchant = MerchantUser.getInstance().getMerchant();\n startMchntDetailsFragment();\n // show merchant details\n /*\n mWorkFragment.mCurrMerchant = MerchantUser.getInstance().getMerchant();\n MerchantDetailsFragment dialog = new MerchantDetailsFragment();\n dialog.show(getFragmentManager(), DIALOG_MCHNT_DETAILS);*/\n } else {\n DialogFragmentWrapper.createNotification(AppConstants.generalFailureTitle, AppCommonUtil.getErrorDesc(errorCode), false, true)\n .show(mFragMgr, DialogFragmentWrapper.DIALOG_NOTIFICATION);\n }\n break;\n\n case MyRetainedFragment.REQUEST_DISABLE_MERCHANT:\n AppCommonUtil.cancelProgressDialog(true);\n if(errorCode==ErrorCodes.NO_ERROR) {\n DialogFragmentWrapper.createNotification(AppConstants.defaultSuccessTitle, AppConstants.merchantDisableSuccessMsg, false, false)\n .show(mFragMgr, DialogFragmentWrapper.DIALOG_NOTIFICATION);\n } else {\n DialogFragmentWrapper.createNotification(AppConstants.generalFailureTitle, AppCommonUtil.getErrorDesc(errorCode), false, true)\n .show(mFragMgr, DialogFragmentWrapper.DIALOG_NOTIFICATION);\n }\n break;\n\n case MyRetainedFragment.REQUEST_SEARCH_CUSTOMER:\n AppCommonUtil.cancelProgressDialog(true);\n if(errorCode==ErrorCodes.NO_ERROR) {\n mWorkFragment.mCurrCustomer = CustomerUser.getInstance().getCustomer();\n startCustDetailsFragment();\n } else {\n DialogFragmentWrapper.createNotification(AppConstants.generalFailureTitle, AppCommonUtil.getErrorDesc(errorCode), false, true)\n .show(mFragMgr, DialogFragmentWrapper.DIALOG_NOTIFICATION);\n }\n break;\n\n case MyRetainedFragment.REQUEST_DISABLE_CUSTOMER:\n AppCommonUtil.cancelProgressDialog(true);\n if(errorCode==ErrorCodes.NO_ERROR) {\n DialogFragmentWrapper.createNotification(AppConstants.defaultSuccessTitle, AppConstants.customerDisableSuccessMsg, false, false)\n .show(mFragMgr, DialogFragmentWrapper.DIALOG_NOTIFICATION);\n } else {\n DialogFragmentWrapper.createNotification(AppConstants.generalFailureTitle, AppCommonUtil.getErrorDesc(errorCode), false, true)\n .show(mFragMgr, DialogFragmentWrapper.DIALOG_NOTIFICATION);\n }\n break;\n\n case MyRetainedFragment.REQUEST_LIMIT_CUST_ACC:\n AppCommonUtil.cancelProgressDialog(true);\n if(errorCode==ErrorCodes.NO_ERROR) {\n String msg = String.format(AppConstants.customerLimitedSuccessMsg, MyGlobalSettings.getCustAccLimitModeMins());\n DialogFragmentWrapper.createNotification(AppConstants.defaultSuccessTitle, msg, false, false)\n .show(mFragMgr, DialogFragmentWrapper.DIALOG_NOTIFICATION);\n } else {\n DialogFragmentWrapper.createNotification(AppConstants.generalFailureTitle, AppCommonUtil.getErrorDesc(errorCode), false, true)\n .show(mFragMgr, DialogFragmentWrapper.DIALOG_NOTIFICATION);\n }\n break;\n\n /*case MyRetainedFragment.REQUEST_SEARCH_CARD:\n AppCommonUtil.cancelProgressDialog(true);\n if(errorCode==ErrorCodes.NO_ERROR) {\n startCardDetailsFragment();\n } else {\n DialogFragmentWrapper.createNotification(AppConstants.generalFailureTitle, AppCommonUtil.getErrorDesc(errorCode), false, true)\n .show(mFragMgr, DialogFragmentWrapper.DIALOG_NOTIFICATION);\n }\n break;\n\n case MyRetainedFragment.REQUEST_ACTION_CARDS:\n AppCommonUtil.cancelProgressDialog(true);\n if(errorCode==ErrorCodes.NO_ERROR) {\n if(!mWorkFragment.cardNumFetched) {\n mWorkFragment.cardNumFetched = true;\n }\n // null shud work fine - as its expected that the fragment will be still open\n // and it will have 'actio' stored in its arguments\n startCardActionListFrag(null);\n } else {\n DialogFragmentWrapper.createNotification(AppConstants.generalFailureTitle, AppCommonUtil.getErrorDesc(errorCode), false, true)\n .show(mFragMgr, DialogFragmentWrapper.DIALOG_NOTIFICATION);\n }\n break;\n\n case MyRetainedFragment.REQUEST_DISABLE_CUST_CARD:\n AppCommonUtil.cancelProgressDialog(true);\n if(errorCode==ErrorCodes.NO_ERROR) {\n DialogFragmentWrapper.createNotification(AppConstants.defaultSuccessTitle, AppConstants.custCardDisableSuccessMsg, false, false)\n .show(mFragMgr, DialogFragmentWrapper.DIALOG_NOTIFICATION);\n } else {\n DialogFragmentWrapper.createNotification(AppConstants.generalFailureTitle, AppCommonUtil.getErrorDesc(errorCode), false, true)\n .show(mFragMgr, DialogFragmentWrapper.DIALOG_NOTIFICATION);\n }\n break;*/\n\n /*case MyRetainedFragment.REQUEST_SEARCH_MCHNT_ORDER:\n AppCommonUtil.cancelProgressDialog(true);\n if(errorCode==ErrorCodes.NO_ERROR) {\n startMchntOrdersFragment();\n } else {\n DialogFragmentWrapper.createNotification(AppConstants.generalFailureTitle, AppCommonUtil.getErrorDesc(errorCode), false, true)\n .show(mFragMgr, DialogFragmentWrapper.DIALOG_NOTIFICATION);\n }\n break;\n\n case MyRetainedFragment.REQUEST_FETCH_ALLOTTED_CARDS:\n AppCommonUtil.cancelProgressDialog(true);\n if(errorCode==ErrorCodes.NO_ERROR) {\n CardListDialog dialog = new CardListDialog();\n dialog.show(getFragmentManager(), DIALOG_CARD_LIST);\n } else {\n DialogFragmentWrapper.createNotification(AppConstants.generalFailureTitle, AppCommonUtil.getErrorDesc(errorCode), false, true)\n .show(mFragMgr, DialogFragmentWrapper.DIALOG_NOTIFICATION);\n }\n break;\n\n case MyRetainedFragment.REQUEST_CHANGE_ORDER_STATUS:\n AppCommonUtil.cancelProgressDialog(true);\n if(errorCode==ErrorCodes.NO_ERROR) {\n DialogFragmentWrapper.createNotification(AppConstants.defaultSuccessTitle, \"Order Updated Successfully\", false, false)\n .show(mFragMgr, DialogFragmentWrapper.DIALOG_NOTIFICATION);\n } else {\n DialogFragmentWrapper.createNotification(AppConstants.generalFailureTitle, AppCommonUtil.getErrorDesc(errorCode), false, true)\n .show(mFragMgr, DialogFragmentWrapper.DIALOG_NOTIFICATION);\n }\n break;*/\n\n case MyRetainedFragment.REQUEST_DEL_DUMMY_DATA:\n AppCommonUtil.cancelProgressDialog(true);\n if(errorCode==ErrorCodes.NO_ERROR) {\n DialogFragmentWrapper.createNotification(AppConstants.defaultSuccessTitle, \"Dummy Data Deleted Successfully\", false, false)\n .show(mFragMgr, DialogFragmentWrapper.DIALOG_NOTIFICATION);\n } else {\n DialogFragmentWrapper.createNotification(AppConstants.generalFailureTitle, AppCommonUtil.getErrorDesc(errorCode), false, true)\n .show(mFragMgr, DialogFragmentWrapper.DIALOG_NOTIFICATION);\n }\n break;\n }\n } catch (Exception e) {\n AppCommonUtil.cancelProgressDialog(true);\n LogMy.e(TAG, \"Exception in CashbackActivity:onBgProcessResponse: \"+opData.requestCode+\": \"+errorCode, e);\n DialogFragmentWrapper.createNotification(AppConstants.generalFailureTitle, AppCommonUtil.getErrorDesc(ErrorCodes.GENERAL_ERROR), false, true)\n .show(mFragMgr, DialogFragmentWrapper.DIALOG_NOTIFICATION);\n }\n }",
"@Override\n protected void onPause() {\n super.onPause();\n MobclickAgent.onPause(this);\n // JPushInterface.onPause(this);\n isForeground = false;\n\n }",
"@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t\tHomeView.home_pressed = \"wait\";\r\n\t\ttry {\r\n\t\t\tscanLeDevice(false);\r\n\r\n\t\t} catch (IllegalArgumentException 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// mLeDeviceListAdapter.clear();\r\n\r\n\t}",
"public void onBackPresed() {\n\t\t\tandroid.os.Process.killProcess(android.os.Process.myPid());\n\t\t\t\n\n\t}",
"@Override\n public void onCreate() {\n super.onCreate();\n\n //Jpush初始化\n// JPushInterface.stopPush(this);\n\n this.mContext = this;\n this.mMainThreadHandler = new Handler();\n this.mMainThread = Thread.currentThread();\n this.mMainThreadLooper = getMainLooper();\n this.mMainTheadId = android.os.Process.myTid();\n initRequestQueue();\n this.mContext = this;\n this.mMainThreadHandler = new Handler();\n this.mMainThread = Thread.currentThread();\n this.mMainThreadLooper = getMainLooper();\n }",
"@Override\n protected Void doInBackground(String... args) {\n String usrnmed=args[0];\n back(usrnmed);\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n Log.d(\"MAIN\",\"in background!\");\n return null;\n }",
"public void onPause() {\n super.onPause();\n nfcAdapter.disableForegroundDispatch(this);\n }",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\t\n\t\tMyApplication.uiInBackground = true;\n\t\t/*\n\t\t * if (mlocManager!=null) {\n\t\t * \n\t\t * if (networkLocListener!=null) {\n\t\t * mlocManager.removeUpdates(networkLocListener); networkLocListener =\n\t\t * null; } if (gpsLocListener!=null) {\n\t\t * mlocManager.removeUpdates(gpsLocListener); gpsLocListener = null; }\n\t\t * mlocManager = null; }\n\t\t */\n\t}",
"@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t\tisModeSwitch=false;\r\n\t\tif (!TheApp.mApp.clientForeign()) {\r\n\t\t\tUpgradeManager.getInstance().BackStageNetWordCheck();\r\n\t\t}\r\n\t\tif (TheApp.mApp.windowManageView!=null) {\r\n\t\t\tLogCatUtils.showString(\"==removeView=====\");\r\n\t\t\tTheApp.mApp.windowManageView.removeView();\r\n\t\t}\r\n\t\tif (mCManager!=null) {\r\n\t\t\tmCManager.registerCallback(callbackImpl);\r\n\t\t}\r\n\t\tProgressDialog.getInstance().progressShow(R.string.camera_loading);\r\n\t\tProgressDialog.getInstance().enableCanceledOnTouchOutside(true);\r\n\t\tpreviewOverTimeRunTask();\r\n\t\tBundle outparam=new Bundle();\r\n\t\tSyuJniNative.getInstance().syu_jni_command(12, null, outparam);\r\n\t\tif (outparam!=null) {\r\n\t\t\tif (outparam.getInt(\"param0\",-1)==1) {\r\n\t\t\t\tDialog dialog=PublicClass.getInstance().NoCameraWarning(1);\r\n\t\t\t\tdialog.show();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tisonStop=false;\r\n\t\thandler.sendEmptyMessage(0);\r\n\t\thandler.sendEmptyMessageDelayed(3, 500);\r\n\t\tLogCatUtils.showString(\" onStart \" );\r\n\t}",
"@Override\n protected void onPause() {\n super.onPause();\n if (nfcAdapter != null) {\n nfcAdapter.disableForegroundDispatch(this);\n }\n }",
"@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t\t// mNfcReadClient.disableDispatch();\r\n\t\treleaseWakeLock();\r\n\t}",
"@OnLifecycleEvent(Lifecycle.Event.ON_STOP)\n public void onMoveToBackground() {\n Log.i(\"AppLifecycleListener\", \"Background\");\n\n }",
"@Override\n protected void onResume() {\n super.onResume();\n MobclickAgent.onResume(this);\n // JPushInterface.onResume(this);\n isForeground = true;\n\n }",
"@Override\n protected void onPause() {\n if(nfcAdapter != null) {\n nfcReader.stopForegroundDispatch(this, nfcAdapter);\n }\n super.onPause();\n }",
"@Override\r\n\tprotected void onPause() {\n\t\tif (SystemCheckTools.isApplicationSentToBackground(AppStartToMainActivity.this) == true) {\r\n\t\t\tExitApp.getInstance().exit();\r\n\t\t}\r\n\t\tsuper.onPause();\r\n\t}",
"@Override // com.android.systemui.SystemUI\n public void onBootCompleted() {\n this.mHandler.sendEmptyMessage(10001);\n }",
"@Override\n public void onBackPressed() {\n super.onBackPressed();\n myoBackgroundService = new Intent(this, MyoBackgroundService.class);\n stopService(myoBackgroundService);\n backgroundIntentService = new Intent(this, BackgroundIntentService.class);\n stopService(backgroundIntentService);\n isTextRcvData = false;\n moveTaskToBack(true);\n android.os.Process.killProcess(android.os.Process.myPid());\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t//requestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tgetSupportActionBar().hide();\n\t\tif (null == application) {\n\t\t\tapplication = (MainApplication) this.getApplication();\n\t\t}\n\t\tif (null == handler) {\n\t\t\thandler = new Handler(this);\n\t\t\tapplication.setCurrentHandler(handler);\n\t\t}\n//\t\tif (null == PreferencesUtils.getCommunity()) {\n//\t\t\tUtil.saveStatus(application, getSp());\n//\t\t}\n\t\texit = new Exit();\n\t\toptions = new DisplayImageOptions.Builder()\n\t\t\t\t.showImageOnLoading(R.drawable.convenience_store_default_icon)\n\t\t\t\t.showImageForEmptyUri(R.drawable.convenience_store_default_icon)\n\t\t\t\t.showImageOnFail(R.drawable.convenience_store_default_icon)\n\t\t\t\t.cacheInMemory(true).cacheOnDisk(true).considerExifParams(true)\n\t\t\t\t.bitmapConfig(Bitmap.Config.RGB_565).build();\n\t//\tapplication.setCurrentActivity(BaseActivity.this);\n\t\tAppManager.getAppManager().addActivity(this);\n\t\tPushManager.getInstance().initialize(this.getApplicationContext());\n\t\t// PushManager.getInstance().getClientid(this.getApplicationContext());\n\t}",
"private void HandleAysncFromOnCreate(){\n HandleOnCreate create = new HandleOnCreate();\n\n ArrayList<String> GlobalVariables = create.GetGlobalVariables(refact);\n\n for(String variable : GlobalVariables){\n String [] var_list = variable.trim().split(\"\\\\s+\");\n String var = var_list[var_list.length-1];\n cachedGlobalVariables.put(variable, var);\n }\n\n String className = create.GetNameOfAsyncTaskFunction(asyncCached.get(\"extends AsyncTask\"));\n\n //remove any instances associated with async task\n refact = create.HandleInstanceOfAsyncTask(refact, className);\n\n //prompt user\n System.out.println(\"(2) Reformatting the activity onCreate() function\\n\");\n DisplaySleep();\n\n }",
"@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t\tprocessAsync();\t\t\r\n\t}",
"@Override\n\tprotected void onPause() {\n\t\t isbackground=1;\n\t\tsuper.onPause();\n\t\tLog.e(\"AudioDoubt\",\"OnPause called\");\n\t\t\n\t\t\n\t\t////// Code remove////\n\t\t\n\t\t///////Remove this\n\t\t\n\t\n\t\t\n\t\t\n\t}",
"@Override\n public void onTrimMemory(int level) {\n \tsuper.onTrimMemory(level);\n \tif(level==TRIM_MEMORY_COMPLETE)\n\t\t{\n \t\tif(isApplicationBroughtToBackground(getApplicationContext()))\n \t\t{\n \t\t\tfinishAllActivity(); \n finishProgram(); \n \t\t}\n\t\t}\n \n }",
"private void startBackgroundThread() {\n backgroundHandlerThread = new HandlerThread(\"Camera2\");\n backgroundHandlerThread.start();\n backgroundHandler = new Handler(backgroundHandlerThread.getLooper());\n }",
"@Override\n\tprotected void onResume() {\n\n\t\tif (returnToClass != null) {\n\t\t\t// Log.d(\"MainFrame------\",returnToClass+\", \"+this.getClass());\n\t\t\tif (returnToClass != this.getClass() && this.getClass() != IndexActivity.class) {\n\t\t\t\t// 没有回到目标页\n\t\t\t\tfinish();\n\t\t\t} else {\n\t\t\t\tCommonObservable.getInstance().notifyObservers(ReturnToActivityFinishedObserver.class);\n\t\t\t\treturnToClass = null;\n\t\t\t}\n\t\t}\n\t\t// 前台 定位 和获取首页数据\n\t\tif (ActivityUtil.isOnForeground(getApplicationContext())) {\n\n\t\t\tLoc.sendLocControlMessage(true);\n\n\t\t\tif ((Fg114Application.isNeedUpdate || Fg114Application.isTimeToGetMainPage())) {\n\t\t\t\tFg114Application.excuteMainPageInfoPackDTOTask();\n\t\t\t\tFg114Application.isNeedUpdate = false;\n\t\t\t}\n\n\t\t\tif (isOnForeground && !Settings.Is_Push_Notification_to_activity) {\n\t\t\t\tisOnForeground = false;\n\t\t\t\texecutePushMessage();\n\t\t\t}\n\n\t\t}\n\n\t\tsuper.onResume();\n\t\t// --------------\n\t\tcurrentActivity = this;\n\t\tSettings.CURRENT_PAGE = this.getClass().getSimpleName();\n\t\tinitCityIssues();\n\t\tupdateSystemMessage();\n\t\tCommonObservable.getInstance().addObserver(this.getClass().getSimpleName(), messageObserver);\n\t\tCommonObservable.getInstance().addObserver(this.getClass().getSimpleName(), cityChangedObserver);\n\n\t}",
"@Override\n protected void onPreExecute(){\n //do before task doing in background\n }",
"@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t\tLog.d(\"alex\", \"on Pause\");\r\n\t\tHomeView.home_pressed = \"wait\";\r\n\t\t}",
"@Override\n\tprotected void onDestroy() {\n\t\thandler.removeCallbacks(null);\n\t\tMyApplication.Tag = 0;\n\t\tsuper.onDestroy();\n\t}",
"protected void onBSCreate() {\n isResumed = false;\n isFinishing = false;\n dispatchOnHandleIntent = false;\n isBSLock = false;\n isAttached = true;\n mCalled = true;\n }",
"public void onCreate() {\n\t\tmApplication = this;\n\t\t\n\t\tlog.e(\"yunyou --> MyApplication\tonCreate!!!\");\n\t\t\n\t\tlong timeMillis1 = System.currentTimeMillis();\n\t\tmNetworkCenter = NetworkCenterEx.getInstance();\n\t\tlong timeMillis2 = System.currentTimeMillis();\n\t\tlog.e(\"yunyou --> NetworkCenter.getInstance() cost = \" + (timeMillis2 - timeMillis1) + \"!!!\");\n\t\t\n\t\tmUserInfoEx = new GloalType.UserInfoEx();\n\t\t\n\t\tmHandler = new Handler()\n\t\t{\n\n\t\t\t@Override\n\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tswitch(msg.what)\n\t\t\t\t{\n\t\t\t\tcase HANDLER_MSG_REFRESH_UNREADCOUNT:\n\t\t\t\t{\n\t\t\t\t\tif (mTVUnreadMsgCount != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (mUnreadCount > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmTVUnreadMsgCount.setText(\"\" + mUnreadCount);\n\t\t\t\t\t\t\tmTVUnreadMsgCount.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tmTVUnreadMsgCount.setVisibility(View.GONE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\tcase HANDLER_MSG_REFRESHT_EXIT:\n\t\t\t\t{\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t};\n\t\t\n\t\t\n\t\t mHeartBeatManager = HeartBeatManager.getInstance();\t \n\t\t mMsgManager = MsgManager.getInstance();\t\t\t\t \n\t\t mOnlineStatusManager = OnlineStatusManager.getInstance();\n\n\t\t int screenWidth = Utils.getScreenWidth(this);\n\t\t int screenHeight = Utils.getScreenHeight(this);\n\t\t log.e(\"screenWidth = \" + screenWidth + \", screenHeight = \" + screenHeight);\n\t\t \n\t\t\ttry {\n\t\t\t\tMapsInitializer.initialize(this);\n\t\t\t} catch (RemoteException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tTCAgent.init(this);\n\t\t\tTCAgent.setReportUncaughtExceptions(true);\n\t}",
"public void enterBackground();",
"@Override\n\tpublic void onBackPressed() {\n \t//Reference: http://stackoverflow.com/questions/11495188/how-to-put-application-to-background\n \t//; last accessed: 14 April 2015, answer by: JavaCoderEx\n \tIntent i = new Intent(Intent.ACTION_MAIN);\n i.addCategory(Intent.CATEGORY_HOME);\n startActivity(i); \n }",
"private void handleGoLauncher() {\n Trace.traceBegin(8, \"goLauncher:closeZswapd\");\n removeMessagesToStart();\n curState = 1;\n Message msg = handler.obtainMessage();\n msg.what = 5;\n Slog.i(TAG, \"handle launcher start, close zswapd\");\n closeZswapd();\n handler.sendMessageDelayed(msg, (long) (appStartDelay * 1000));\n Trace.traceEnd(8);\n }",
"public void onStartRunning();",
"@Override\n public void onForeground(String packageName) {\n if(packageName!=null) {\n if (flag && packageName.equals(\"com.whatsapp\")) {\n flag = false;\n Intent screenShotActivity = new Intent(getApplicationContext(), ScreenCaptureImageActivity.class);\n screenShotActivity.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n getApplicationContext().startActivity(screenShotActivity);\n new Timer().schedule(new TimerTask() {\n @Override\n public void run() {\n flag = true;\n }\n }, 121000);\n }\n }\n\n //setProgressAsync(new Data.Builder().putString(\"package\", packageName).build());\n\n previousPackageName = packageName;\n ForegroundWorker.this.packageName = packageName;\n try {\n ForegroundWorker.this.outputStreamWriter.write(packageName + '\\n');\n } catch (Exception e) {\n Log.e(\"APP\", \"run: \", e);\n }\n }",
"protected void onBSResume() {\n checkBSActivityRunning();\n mDrawer.addBSParentView(mInitialWaveform, mInitialDithering);// show\n // user UI\n // on back\n // screen\n isResumed = true;\n mCalled = true;\n }",
"@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\t\n\t\tmCache=ACache.get(this);\n\t\t//final int HEAP_SIZE = 16 * 1024* 1024 ; \n\t\t\n\t\tsetContentView(R.layout.appstart);\n\t\t//requestWindowFeature(Window.FEATURE_NO_TITLE);//去掉标题栏\n\t\t//getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,\n // WindowManager.LayoutParams.FLAG_FULLSCREEN); //全屏显示\n\t\t\n//\t\tStrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()\n//\t\t\t.detectDiskReads().detectDiskWrites().detectNetwork()\n//\t\t\t.penaltyLog().build());\n\t\t\n//\t\tStrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()\n//\t\t\t.detectLeakedSqlLiteObjects().penaltyLog().penaltyDeath()\n//\t\t\t.build());\n\t\t\n\t\tAppstartTask task=new AppstartTask();\n\t\tAppstartHandler handler=new AppstartHandler(this,false);\n\t\ttask.connect(handler);\n\t\ttask.execute();\n }",
"private void handleAppStartFinish() {\n if (curState == 1) {\n curReclaimFailCount = 0;\n lastReclaimFailTime = -1;\n handler.removeMessages(3);\n setTargetBuffer();\n curState = 0;\n Slog.i(TAG, \"handle app start finish, reset failCount, targetBuffer:\" + targetBuffer);\n return;\n }\n Slog.e(TAG, \"invalid app start finish msg\");\n }",
"@Override\n public void onPause() {\n writeJSONData();\n super.onPause();\n }",
"@Override\n public void run()\n {\n // Open call tab\n ////////////////////////////////////////////////////////////////////////////////\n List <String> keyPrepareList = new ArrayList<String>();\n keyPrepareList.add(\"[KEY_LGUI][KEY_C]\"); // Open contect\n keyPrepareList.add(\"[KEY_TAB]\"); // Move phone call tab\n keyPrepareList.add(\"[KEY_ENTER]\"); // Select Menu\n\n SendKeysInArray(keyPrepareList);\n\n if (mStopTest == true)\n {\n return ;\n }\n\n ////////////////////////////////////////////////////////////////////////////////\n // Send hidden menu command\n ////////////////////////////////////////////////////////////////////////////////\n List <String> keyInputList = new ArrayList<String>();\n keyInputList.add(\"*#*#4636#*#*\"); // Android common command for hidden menu\n keyInputList.add(\"[KEY_ESC]\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"##7764726\"); // Motoloa command for hidden menu\n keyInputList.add(\"[KEY_ESC]\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"*#*#1234#*#*\"); // HTC command for hidden menu\n keyInputList.add(\"[KEY_ESC]\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"3845#*855#\"); // LG command for hidden menu\n keyInputList.add(\"[KEY_ESC]\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"5689#*990#\"); // LG command for hidden menu\n keyInputList.add(\"[KEY_ESC]\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"319712358\"); // Samsung command for hidden menu (2 Step)\n keyInputList.add(\"774632\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"[KEY_ESC]\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"319712358\"); // Samsung command for hidden menu (2 Step)\n keyInputList.add(\"0821\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"[KEY_ESC]\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"319712358\"); // Samsung command for hidden menu (2 Step)\n keyInputList.add(\"996412\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"[KEY_ESC]\");\n\n SendKeysInArray(keyInputList);\n if (mStopTest == true)\n {\n return ;\n }\n\n ////////////////////////////////////////////////////////////////////////////////\n // Send email to me\n ////////////////////////////////////////////////////////////////////////////////\n List <String> keyEmailList = new ArrayList<String>();\n keyEmailList.add(\"[KEY_LGUI][KEY_E]\"); // Open email\n keyEmailList.add(\"[KEY_TAB]\"); // Move new email tab\n keyEmailList.add(\"[KEY_TAB]\"); // Move new email tab\n keyEmailList.add(\"[KEY_ENTER]\"); // Select Menu\n keyEmailList.add(\"[email protected]\"); // To\n keyEmailList.add(\"[KEY_ENTER]\");\n keyEmailList.add(\"[KEY_TAB]\");\n keyEmailList.add(\"Automatic test is ended\"); // Title\n keyEmailList.add(\"[KEY_ENTER]\");\n keyEmailList.add(\"This email is sent from PowerShock (a.k.a IRON-HID)\"); // Content\n keyEmailList.add(\"[KEY_TAB]\"); // Move to send button\n keyEmailList.add(\"[KEY_TAB]\");\n keyEmailList.add(\"[KEY_ENTER]\");\n keyEmailList.add(\"[KEY_TAB]\"); // Move to OK\n keyEmailList.add(\"[KEY_ENTER]\");\n\n SendKeysInArray(keyEmailList);\n\n AddMsgToKeyView(VIEW_ID_KEY, \"remote> auto test is ended\\n\");\n if (mStopTest == true)\n {\n return ;\n }\n }",
"@Override\n\tprotected void onStop(){\n\t\tsuper.onStop();\n\t\tLog.d(msg, \"HomePageActivity onStop() event\");\n\t}",
"protected void startBackgroundThread() {\n mBackgroundThread = new HandlerThread(\"Camera Background\");\n mBackgroundThread.start();\n mBackgroundHandler = new Handler(mBackgroundThread.getLooper());\n }",
"public void mo1402b() {\n if (CarlifeConfig.m4065a()) {\n LogUtil.d(f2837a, \"onStop: Internal screen capture not send background msg. \");\n return;\n }\n LogUtil.d(f2837a, \"onStop: full screen capture send background msg.\");\n BtHfpProtocolHelper.m3442a(false, false);\n }",
"@Override\n protected void onPause() {\n super.onPause();\n if (isBounded) {\n backgroundService.refresh();\n }\n }",
"@Override\n protected void appStop() {\n }",
"@Override\n public void onPause() {\n Utility.stopForegroundDispatch(this);\n Utility.stopConnectivityCheck();\n super.onPause();\n }",
"@Override\n\tpublic void onMessageBackgroundThread(Object arg0) {\n\t\t\n\t}",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tcontext = this;\n\t\tmLocalBcMgr = LocalBroadcastManager.getInstance(this);\n\t\tTruMobiTimerClass.userInteractedTrigger();\n\t\tnew SharedPreferences(this).edit()\n\t\t\t\t.putBoolean(\"appinBG\", false).commit(); // PIN_SCREEN_ISSUE\n\t}",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\r\n\t\tLog.d(\"tigertiger\", \"AppStart onCreate\");\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.activity_app_start_old);\r\n\r\n\t\tWriteLogToDevice.initConfiguration();// configure the app log default\r\n\t\t\t\t\t\t\t\t\t\t\t\t// set\r\n\t\tenableSDKLog();\r\n\r\n\t\tGlobalApp.getInstance().setAppContext(getApplicationContext());\r\n\t\tLog.d(\"tigertiger\", \"getApplicationContext =\" + getApplicationContext());\r\n\t\tGlobalApp.getInstance().setCurrentApp(AppStartToMainActivity.this);\r\n\t\t// JIRA ICOM-1890 Begin:Delete by zhangyanhu C01012 2015-08-27\r\n\t\t// ExitApp.getInstance().addActivity(this);\r\n\t\t// JIRA ICOM-1890 End:Delete by zhangyanhu C01012 2015-08-27\t\t\t\t\r\n\t\t\r\n\t\tprogressDialog = new ProgressDialog(AppStartToMainActivity.this);\r\n\t\tprogressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\r\n\t\tprogressDialog.setMessage(AppStartToMainActivity.this.getString(R.string.dialog_connecting_to_cam));\r\n\t\tprogressDialog.setCancelable(false);\r\n\t\tprogressDialog.show();\t\t\r\n\t\tif (SDKSession.prepareSession() == false) {\r\n\t\t\tredirectToExit(CONNECT_FAIL);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\t//if (cameraProperties.checkCustomerID(0xD613, 0x0100) == false) {\r\n\t/*\tif (checkCustomerID(0xD613,0x3200) == false) {\r\n\t\t\tredirectToExit(CHECK_CUSID_FAIL);\r\n\t\t\treturn;\r\n\t\t}\r\n\t*/\r\n//\t\tUserMacPermition.initUserMacPermition();\r\n//\t\tif (UserMacPermition.isAllowedMac(getLocalMacAddress()) == false) {\r\n//\t\t\tredirectToExit(CHECK_MAC_FAIL);\r\n//\t\t\treturn;\r\n//\t\t}\r\n\t\r\n\t\t//redirectToExit(CONNECT_FAIL);\r\n\t\tUIDisplayResource.createInstance();\r\n\t\tUIDisplayResource.getinstance().initUIDisplayResource();\r\n\t\tcameraProperties = new CameraProperties();\r\n\t\tif (cameraProperties.hasFuction(0x5011)) {\r\n\t\t\tlong time = System.currentTimeMillis();\r\n\t\t\tDate date = new Date(time);\r\n\t\t\tSimpleDateFormat myFmt = new SimpleDateFormat(\"yyyyMMdd HHmmss\");\r\n\t\t\tString temp = myFmt.format(date);\r\n\t\t\ttemp = temp.replaceAll(\" \", \"T\");\r\n\t\t\ttemp = temp + \".0\";\r\n\t\t\tcameraProperties.setCameraDate(temp);\r\n\t\t}\r\n\r\n\t\ttimer.schedule(task, 1000, 1000);\r\n\r\n\t\t// TimeLapseInterval.getInstance().initTimeLapseInterval();\r\n\t\tLog.d(\"AppStartAppStart\", \"end oncreate\");\r\n\t}",
"@Override\r\n public void onNdefPushComplete(NfcEvent event)\r\n {\r\n mServer.start();\r\n\r\n SendActivity.this.runOnUiThread(new Runnable()\r\n {\r\n public void run()\r\n {\r\n tapImage.setVisibility(View.INVISIBLE);\r\n tapText.setVisibility(View.INVISIBLE);\r\n }\r\n });\r\n mNfcAdapter.setNdefPushMessageCallback(null, this);\r\n }",
"@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\t//mTracker.set(Fields.SCREEN_NAME, \"Home Screen\");\n\t\tmTracker.send(MapBuilder.createAppView().build());\n\t\t//mTracker.send(null);\n\t}",
"@Override\n protected void onResume() {\n super.onResume();\n if (connection.isOnline(this)) new LoadMeetsAsync().execute();\n fab_toolbar.hide();\n }",
"@Override\n\tpublic void OnHomeUpdateFinished() {\n\t\tif (!Frag_Paused) {\n\t\t\t// supportRequestWindowFeature(WindowCompat.FEATURE_ACTION_BAR);\n\t\t\tgetSupportActionBar().show();\n\n\t\t\t\n\n\t\t\t\n\n\t\t\t\n\t\t\tPending_Refresh = false;\n\t\t} else {\n\t\t\tPending_Refresh = true;\n\t\t}\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\ttry {\n\t\t\tif(imageManager != null)\n\t\t\t\timageManager.interrupThread();\n\t\t}catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t\tsuper.onBackPressed();\n\t}",
"public void onUnFinishFetching() {\n\t\t\t\thideLoading();\n\t\t\t\tUiApplication.getUiApplication().invokeLater(new Runnable() {\n\t\t\t\t\t\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\tUiApplication.getUiApplication().pushScreen(new HomeScreen());\n\t\t\t\t\t}\n\t\t\t\t});\t\t\t\t\n\t\t\t}",
"private void startup() {\n Intent intent = getIntent();\n \n // Log intent for debug purposes\n Log.v(\"CadPageActivity.startup()\");\n ContentQuery.dumpIntent(intent);\n \n // We have an occasional problem when an old intent is sent with the\n // intent of restoring the Cadpage display. But has several unfortunate\n // side effects like immediately cancelling the wake lock\n // Solution - when were were started with the intent of displaying a new\n // message, ignore all extraneous intents until we find the one that\n // displays the new page\n int msgId = intent.getIntExtra(EXTRA_MSG_ID, -1);\n if (msgId > 0 && msgId != lockMsgId) {\n Log.v(\"Discarding spurious intent\");\n return;\n }\n lockMsgId = -1;\n\n // See if this request is going to pop up an alert window\n SmsMmsMessage msg;\n boolean force = ManagePreferences.forcePopup();\n if (force) ManagePreferences.setForcePopup(false);\n if (!force &&\n Intent.ACTION_MAIN.equals(intent.getAction()) &&\n intent.hasCategory(Intent.CATEGORY_LAUNCHER)) {\n msg = null;\n } else if (msgId >= 0) {\n msg = SmsMessageQueue.getInstance().getMessage(msgId);\n } else {\n if (!force) force = intent.getBooleanExtra(EXTRA_POPUP, false);\n msg = SmsMessageQueue.getInstance().getDisplayMessage(force);\n }\n\n // If there is no message popup display and we were started by some kind of\n // user interaction, go through the startup special processing checks\n if (msg == null && (intent.getFlags() & Intent.FLAG_FROM_BACKGROUND) == 0) {\n\n // First clear any pending notification\n ClearAllReceiver.clearAll(this);\n\n // The rest of this involves possible interactions with the user, which might conflict\n // with the initial permission checking logic. So rather than do it immediately, we stuff\n // it in a Runnable object to be executed when the initial permission checking is complete\n final boolean init = initializing;\n ManagePreferences.checkInitialPermissions(new Runnable(){\n @Override\n public void run() {\n needSupportApp = SmsPopupUtils.checkMsgSupport(CadPageActivity.this) > 0;\n if (needSupportApp) return;\n\n // If user upgraded to the release that implements improved email account security, and\n // we suspect that really need to give us that email account access, let them know now.\n DonateScreenEvent event;\n if ((event = NeedAcctPermissionUpgradeEvent.instance()).isEnabled()) {\n DonateActivity.launchActivity(CadPageActivity.this, event, null);\n return;\n }\n\n // If Cadpage is not functional with current settings, start up the new user sequence\n if ((event = HelpWelcomeEvent.instance()).isEnabled()) {\n ((HelpWelcomeEvent)event).setIntializing(init);\n DonateActivity.launchActivity(CadPageActivity.this, event, null);\n return;\n }\n\n // If a new Active911 client may be highjacking alerts, warn user\n if ((event = Active911WarnEvent.instance()).isEnabled()) {\n DonateActivity.launchActivity(CadPageActivity.this, event, null);\n return;\n }\n\n // Otherwise, launch the release info dialog if it hasn't already been displayed\n String oldRelease = ManagePreferences.release();\n String release = CadPageApplication.getVersion();\n if (!release.equals(oldRelease)) {\n ManagePreferences.setRelease(release);\n if (!trimRelease(release).equals(trimRelease(oldRelease))) {\n showDialog(RELEASE_DIALOG);\n }\n }\n\n // If not, see if we have discovered a direct page vendor sending us text pages\n else {\n event = VendorEvent.instance(1);\n if (event.isEnabled()) DonateActivity.launchActivity(CadPageActivity.this, event, null);\n }\n }\n });\n }\n \n // Otherwise, if we should automatically display a call, do it now\n else if (msg != null) {\n\n // But first to the initial permission check\n ManagePreferences.checkInitialPermissions(null);\n\n // Before we open the call display window, see if notifications were requested\n // And if they were, see if we should launch the Scanner channel open.\n // We can't do this in the Broadcast Receiver because this window obscures it\n // completely, so their Activity won't launch.\n\n if (intent.getBooleanExtra(EXTRA_NOTIFY, false)) {\n ManageNotification.show(this, msg);\n SmsService.launchScanner(this);\n }\n\n // OK, go ahead and open the call display window\n // Delay by 100 msecs in attempt to avoid a nasty badtokenException.\n final Activity context = this;\n msgId = msg.getMsgId();\n if (!context.isFinishing()) {\n if (Log.DEBUG) Log.v(\"CadPageActivity Auto launch SmsPopup for \" + msgId);\n SmsPopupActivity.launchActivity(context, msgId);\n }\n }\n\n initializing = false;\n }",
"@Override\r\n public void onLowMemory() {\r\n super.onLowMemory();\r\n Glide.get(getApplicationContext()).clearMemory();\r\n Glide.get(getApplicationContext()).trimMemory(TRIM_MEMORY_COMPLETE);\r\n System.gc();\r\n }",
"@Override\n public void run() {\n try{\n for(int n = 0;n < 20; n++){\n //This simulates 1sec of busy activity\n Thread.sleep(1000);\n //now talk to the ain thread\n myHandler.post(foregroundTask);\n }\n }catch (InterruptedException e){\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t\tSystem.out.println(\"Fragments_download_management onPause\");\n\t\talarmQueryRunnable.destroy();\n\t\tledrunnable.destroy();\n\t}",
"@Override\n protected void onPostExecute(String result) {\n if (result != null) {\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setDataAndType(Uri.fromFile(new File(Environment.getExternalStorageDirectory() + \"/\"\n + context.getPackageName() + \"/\" + FILE_NAME)), \"application/vnd.android.package-archive\");\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // without this flag android returned a intent error!\n context.startActivity(intent);\n }\n if (progressDialog.isShowing())\n progressDialog.hide();\n\n mBuilder.setContentText(\"Receiving game Finish.\").setProgress(100,100,false);\n // Issues the notification\n mNotificationManager.notify(Constant.RECEIVE_BLUETOOTH_NOTIFICATION, mBuilder.build());\n\n //Set bluetoothAsyncTaskStarted variable to false. i.e No Bluetooth async task is started\n HomeView.bluetoothAsyncTaskStarted=false;\n }",
"@Override\n public void onDone()\n {\n Log.d(APP_LOG_TAG, \"face gone\");\n }",
"public void backgroundProcess();",
"void backgroundProcess();",
"@Override\n public void onLowMemory() {\n super.onLowMemory();\n Log.w(TAG, \"System is running low on memory\");\n\n// BitmapCache.getInstance().clear();\n }",
"@Override\r\n\t\tprotected void onPause() {\n\t\t\tsuper.onPause();\r\n\t\t\tJPushInterface.onPause(getApplicationContext());\r\n\t\t\tMobclickAgent.onPause(this);\r\n\t\t}",
"@Override\n protected void onResume() {\n super.onResume();\n\n mNfcAdapter.enableForegroundDispatch(this, mPendingIntent, mFilters, null);\n checkPlayServices();\n // Check to see that the Activity started due to an Android Beam\n Log.i(TAG, \"resume\" + getIntent().getAction());\n if (NfcAdapter.ACTION_NDEF_DISCOVERED.equals(getIntent().getAction())) {\n\n processIntent(getIntent());\n }\n }",
"@Override\n protected void onDestroy() {\n\tsuper.onDestroy ();\n\tstartService ( new Intent ( getBaseContext (), BackgroundService.class ) );\n }",
"@Override\n public boolean queueIdle() {\n mThread.getLooper().quit();\n nativeOnLooperStopped(nativeThread);\n return false;\n }",
"public void onPause() {\n MainTask.GetInstance().SetUserCallBack((UserCallBack) null);\n super.onPause();\n Log.d(TAG, \"-----onPause-----\");\n }",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tSystem.gc();\n\t}",
"@Override\n public synchronized void onTrimMemory(int level) {\n if ((level == TRIM_MEMORY_UI_HIDDEN)) {\n status = StatusApp.BACKGROUND;\n }\n super.onTrimMemory(level);\n }",
"public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.sport_module_notification_main);\n setTitleText(R.string.device_module_activity_msg_push);\n setLeftBackTo();\n getTitleBar().setBackgroundColor(RunActivitySkin.Sport_Home_Bg_Color_Bottom);\n boolean isOpen = Util.isMsgNotificationEnabled(this);\n this.setBtn = (Button) findViewById(R.id.notification_btn);\n if (AppConfigUtil.isRussia(this) || AppConfigUtil.isIwownFitPro() || AppConfigUtil.isZeronerHealthPro() || AppConfigUtil.isHealthy(this)) {\n this.setBtn.setVisibility(0);\n } else {\n this.setBtn.setVisibility(8);\n }\n this.setBtn.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n String url;\n if (AppConfigUtil.isRussia(NotificationHintActivity.this)) {\n url = \"https://search.iwown.com/guide/bracelet/bracelet.html#/\";\n } else if (AppConfigUtil.isIwownFitPro()) {\n url = \"https://api4.iwown.com/setting/dist/index.html#/\";\n } else if (AppConfigUtil.isZeronerHealthPro()) {\n url = \"https://api4.iwown.com/setting/dist/index.html#/zhp/app\";\n } else if (AppConfigUtil.isHealthy()) {\n url = \"https://api2.iwown.com/setting/zhushou/index.html#/china/app\";\n } else {\n url = \"\";\n }\n ARouter.getInstance().build(RouteUtils.Activity_my_app_background_Activity).withString(\"url\", url).withString(\"title\", \"Guide\").navigation();\n }\n });\n if (!isOpen) {\n showConfirmDialog();\n }\n }",
"public void afterBackground(OUT out) {\n\n }",
"@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t\tLog.d(\"maintab\", \"maintab_MainActivity------onPause\");\r\n\t}",
"void backgroundRefresh();",
"@Override\n\tprotected void onPause(){\n\t\tsuper.onPause();\n\t\tLog.d(msg, \"HomePageActivity onPause() event\");\n\t}",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.logo_show);\n\t\tnew Thread(new Runnable() { \n @Override\n public void run() {\n // TODO Auto-generated method stub\n try {\n Thread.sleep(2000);\n Intent i = new Intent(ScreenLogo.this, MusicProject.class);\n startActivity(i);\n ScreenLogo.this.finish();\n //handler.sendMessage(handler.obtainMessage(1));\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }).start();\n\t}",
"@Override\n\tprotected void onStart(){\n\t\tsuper.onStart();\n\t\tLog.d(msg, \"HomePageActivity onStart() event\");\n\t}",
"public void appMovedToBackground(final AppForegroundEvent e);",
"@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\t\n\t\tmHandler.removeMessages(0);\n\t\tmHandler.sendEmptyMessageDelayed(0, 100);\n\t}",
"public void home(){\n Intent intent = new Intent(getApplicationContext(), TouchController.class);\n intent.setAction(Constant.ACTION_NOTIFICATION);\n startService(intent);\n }",
"@Override\r\n public void onCreate() {\n intent = new Intent(BROADCAST_ACTION);\r\n startBTService();\r\n// try{\r\n// mConnectedThread.write(\"2\".getBytes());\r\n// }catch(Exception e){\r\n//\r\n// }\r\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 protected void onPause() {\n\t \t NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this);\n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t mBuilder.setContentTitle(\"AKOSOMBO KANEA is still running\");\n\t\t\t\tmBuilder.setContentText(\"Click To Open Home Screen\");\n\t\t\t\tmBuilder.setTicker(\"Still Running... \");\n\t\t\t\tmBuilder.setSmallIcon(R.drawable.ic_launcher);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//create explicit intent for an Activity in the App.\n\t\t\t\tIntent resultIntent = new Intent(this, MainActivity.class);\n\t\t\t\t\n\t\t\t\tTaskStackBuilder taskStackBuilder = TaskStackBuilder.create(this);\n\t\t\t\ttaskStackBuilder.addParentStack(MainActivity.class);\n\t\t\t\t//add the intent to the stack\n\t\t\t\ttaskStackBuilder.addNextIntent(resultIntent);\n\t\t\t\t\n\t\t\t\tPendingIntent resultPendingIntent = taskStackBuilder.getPendingIntent(0, \n\t\t\t\t\t\tPendingIntent.FLAG_UPDATE_CURRENT); \t\n\t\t\t\tmBuilder.setContentIntent(resultPendingIntent);\n\t\t\t\t\n\t\t\t\tnotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\t\t\t\t\n\t\t\t\t// pass notificationID to update the notification\n\t\t\t\tnotificationManager.notify(notificationId, mBuilder.build());\n\t\t\t\t if (adView != null) {\n\t\t\t\t adView.pause();\n\t\t\t\t }\n\t \tsuper.onPause();\n\t \t mSensorManager.unregisterListener(this);\n\t }",
"@Override\n protected void onResume() {\n super.onResume();\n clearScanResults();\n if (mCheckBt) {\n checkEnableBt();\n Log.d(TAG, \"onResume: 搜寻ACTIVITY回到后台!!\");\n }\n }",
"protected void onPreExecute() {\n // Log.i(\"Stephan\",\"PreExecute\");\n // Log.i(\"handler preExecute\", resultBack);\n }",
"@Override\n protected void onPause() {\n closeCamera();\n\n stopBackgroundThread();\n super.onPause();\n }",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t\tHomeView.home_pressed=\"disable\";\r\n\t\r\n\t}",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n//\t\tmanager.dispatchPause(isFinishing());\n\t\tSystem.out.println(\"activity2nd on pause............\");\n\t\tActivity2ndWeightRecordFat.front = false;\n\t}",
"@Override\n\t\tpublic void onPreExecute() {\n\t\t\tmWallpaperPage.showPb(WallpaperManagerActivity.this);\n\t\t\tsuper.onPreExecute();\n\t\t}"
]
| [
"0.6587777",
"0.6334298",
"0.5890152",
"0.58828634",
"0.58302987",
"0.58120084",
"0.58046585",
"0.5754282",
"0.5741867",
"0.5738933",
"0.5732398",
"0.5712446",
"0.57001126",
"0.5674278",
"0.5668966",
"0.56637555",
"0.56593937",
"0.5654182",
"0.56531227",
"0.5629431",
"0.56139594",
"0.56102425",
"0.5595116",
"0.5590752",
"0.5590528",
"0.5569396",
"0.55642134",
"0.5563023",
"0.5557936",
"0.5539285",
"0.5512925",
"0.5506511",
"0.54926854",
"0.5492131",
"0.5479655",
"0.54630125",
"0.5442486",
"0.5424727",
"0.5421033",
"0.5408692",
"0.5402634",
"0.53866",
"0.5385955",
"0.53708315",
"0.536051",
"0.53598136",
"0.5347233",
"0.53311026",
"0.53277844",
"0.53162897",
"0.53098774",
"0.5308699",
"0.5305125",
"0.5303328",
"0.5301107",
"0.5298844",
"0.528869",
"0.52884376",
"0.52873904",
"0.5276961",
"0.52704746",
"0.5265702",
"0.5257935",
"0.52555716",
"0.5254449",
"0.52491206",
"0.5248766",
"0.5245878",
"0.52445394",
"0.5235031",
"0.5230021",
"0.52289355",
"0.52288705",
"0.5225603",
"0.52211",
"0.52120596",
"0.5202331",
"0.52003175",
"0.52002597",
"0.51964784",
"0.5190229",
"0.5183789",
"0.5183496",
"0.51834804",
"0.51819676",
"0.5176743",
"0.5173846",
"0.51720256",
"0.51689637",
"0.51683563",
"0.5157619",
"0.515388",
"0.5150508",
"0.5140503",
"0.5140451",
"0.5139435",
"0.5136218",
"0.5131448",
"0.5131091",
"0.5121926"
]
| 0.6562261 | 1 |
Upload multiple files to s3 | public List<PutObjectResult> upload(MultipartFile[] multipartFiles) {
List<PutObjectResult> putObjectResults = new ArrayList<>();
Arrays.stream(multipartFiles)
.filter(multipartFile -> !StringUtils.isEmpty(multipartFile.getOriginalFilename()))
.forEach(multipartFile -> {
try {
putObjectResults.add(upload(multipartFile, multipartFile.getOriginalFilename()));
} catch (IOException e) {
e.printStackTrace();
}
});
return putObjectResults;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<String> uploadMultipleFilesFromBody(AmazonS3 connection,\n String bucketName,\n String path,\n String body,\n Boolean usingFilePicker,\n Date expiryDateTime)\n throws InterruptedException, AppsmithPluginException {\n\n\n List<MultipartFormDataDTO> multipartFormDataDTOs;\n try {\n multipartFormDataDTOs = Arrays.asList(objectMapper.readValue(\n body,\n MultipartFormDataDTO[].class));\n } catch (IOException e) {\n throw new AppsmithPluginException(\n AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,\n \"Unable to parse content. Expected to receive an object with `data` and `type`\"\n );\n }\n\n ArrayList<String> listOfFiles = new ArrayList<>();\n multipartFormDataDTOs.forEach(multipartFormDataDTO -> {\n final String filePath = path + multipartFormDataDTO.getName();\n byte[] payload;\n if (Boolean.TRUE.equals(usingFilePicker)) {\n\n String encodedPayload = (String) multipartFormDataDTO.getData();\n /*\n * - For files uploaded using Filepicker.xyz.base64, body format is \"<content-type>;base64,<actual-\n * base64-encoded-payload>\".\n * - Strip off the redundant part in the beginning to get actual payload.\n */\n if (encodedPayload.contains(BASE64_DELIMITER)) {\n List<String> bodyArrayList = Arrays.asList(encodedPayload.split(BASE64_DELIMITER));\n encodedPayload = bodyArrayList.get(bodyArrayList.size() - 1);\n }\n\n try {\n payload = Base64.getDecoder().decode(encodedPayload);\n } catch (IllegalArgumentException e) {\n throw new AppsmithPluginException(\n AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,\n \"File content is not base64 encoded. File content needs to be base64 encoded when the \" +\n \"'File Data Type: Base64/Text' field is selected 'Yes'.\"\n );\n }\n } else {\n payload = ((String) multipartFormDataDTO.getData()).getBytes();\n }\n\n InputStream inputStream = new ByteArrayInputStream(payload);\n TransferManager transferManager = TransferManagerBuilder.standard().withS3Client(connection).build();\n final ObjectMetadata objectMetadata = new ObjectMetadata();\n // Only add content type if the user has mentioned it in the body\n if (multipartFormDataDTO.getType() != null) {\n objectMetadata.setContentType(multipartFormDataDTO.getType());\n }\n try {\n transferManager.upload(bucketName, filePath, inputStream, objectMetadata).waitForUploadResult();\n } catch (InterruptedException e) {\n throw new AppsmithPluginException(\n AppsmithPluginError.PLUGIN_ERROR,\n \"File upload interrupted.\"\n );\n }\n\n listOfFiles.add(filePath);\n });\n\n return getSignedUrls(connection, bucketName, listOfFiles, expiryDateTime);\n }",
"@Override\n public void uploadMultipleFiles(ArrayList<File> files, Modpack modpack) {\n uploadStatus = \"Uploading file(s) to server!\";\n modpackUploadRepository.uploadMultipleFiles(files, modpack);\n }",
"S3UploadResponse uploadFileToS3(MultipartFile part, Integer importBelong) throws IOException;",
"private static void multipartUpload(File file, String bucketName) throws IOException {\r\n\t\tlong size = file.length();\r\n\t\ts3 = S3Client.builder().region(region).build();\r\n\t\t// First create a multipart upload and get upload id\r\n\t\tCreateMultipartUploadRequest createMultipartUploadRequest = CreateMultipartUploadRequest.builder()\r\n\t\t\t\t.bucket(bucketName).key(file.getName()).build();\r\n\t\tCreateMultipartUploadResponse response = s3.createMultipartUpload(createMultipartUploadRequest);\r\n\t\tString uploadId = response.uploadId();\r\n\t\tSystem.out.println(uploadId);\r\n\r\n\t\tUploadPartRequest uploadPartRequest1 = UploadPartRequest.builder().bucket(bucketName).key(file.getName())\r\n\t\t\t\t.uploadId(uploadId).partNumber(1).build();\r\n\t\tString etag1 = s3\r\n\t\t\t\t.uploadPart(uploadPartRequest1, RequestBody.fromInputStream(new FileInputStream(file), size / 2))\r\n\t\t\t\t.eTag();\r\n\t\tCompletedPart part1 = CompletedPart.builder().partNumber(1).eTag(etag1).build();\r\n\r\n\t\tUploadPartRequest uploadPartRequest2 = UploadPartRequest.builder().bucket(bucketName).key(file.getName())\r\n\t\t\t\t.uploadId(uploadId).partNumber(2).build();\r\n\t\tString etag2 = s3\r\n\t\t\t\t.uploadPart(uploadPartRequest2, RequestBody.fromInputStream(new FileInputStream(file), size / 2))\r\n\t\t\t\t.eTag();\r\n\t\tCompletedPart part2 = CompletedPart.builder().partNumber(2).eTag(etag2).build();\r\n\r\n\t\t// Finally call completeMultipartUpload operation to tell S3 to merge all\r\n\t\t// uploaded\r\n\t\t// parts and finish the multipart operation.\r\n\t\tCompletedMultipartUpload completedMultipartUpload = CompletedMultipartUpload.builder().parts(part1, part2)\r\n\t\t\t\t.build();\r\n\t\tCompleteMultipartUploadRequest completeMultipartUploadRequest = CompleteMultipartUploadRequest.builder()\r\n\t\t\t\t.bucket(bucketName).key(file.getName()).uploadId(uploadId).multipartUpload(completedMultipartUpload)\r\n\t\t\t\t.build();\r\n\t\ts3.completeMultipartUpload(completeMultipartUploadRequest);\r\n\t}",
"public void s3upload(String bucketName, String fileName, File file) throws IOException {\n\n System.out.println(\"------------- CustomS3Client --------------\");\n System.out.println(\"Inside s3upload bucket Name: \"+bucketName+\" and file Name: \"+ fileName);\n\n s3 = AmazonS3ClientBuilder.standard()\n .withCredentials(new ProfileCredentialsProvider())\n .withRegion(\"us-east-1\")\n .build();\n\n // List current buckets.\n ListMyBuckets(bucketName);\n\n //upload the file\n s3.putObject(bucketName, fileName, file);\n\n System.out.println(\"------------- Success --------------\");\n\n }",
"private void uploadFileTos3bucket(String fileName, File file) {\n s3Client.putObject(new PutObjectRequest(bucketName, fileName, file)\n .withCannedAcl(CannedAccessControlList.PublicRead));\n }",
"List<UploadInfo> simpleUploadAll(List<SimpleFile> files);",
"@PreAuthorize(\"hasRole('ROLE_ROOT')\")\n\tpublic void createFileUploads(List<FileUpload> fileUploads) throws AppException;",
"public List<String> putObject(MultipartRequest request, String id)\n {\n List<String> keyNameList = new ArrayList<String>();\n try\n {\n Map<String, MultipartFile> filesMap = request.getFileMap();\n Set<String> nameSet = filesMap.keySet();\n Iterator<String> it = nameSet.iterator();\n while (it.hasNext())\n {\n MultipartFile file = filesMap.get(it.next());\n ObjectMetadata ObjectMetadata = new ObjectMetadata();\n Map<String, String> userMetadata = new HashMap<String, String>();\n userMetadata.put(\"Name\", file.getOriginalFilename());\n userMetadata.put(\"Content-Type\", file.getContentType());\n String keyName = CommonUtil.getKeyName(bucketName, id, file.getOriginalFilename());\n userMetadata.put(\"key_name\", keyName);\n userMetadata.put(\"user\", id);\n ObjectMetadata.setUserMetadata(userMetadata);\n InputStream in = file.getInputStream();\n s3.putObject(bucketName, keyName, in, ObjectMetadata);\n keyNameList.add(keyName);\n }\n }\n catch (AmazonS3Exception e)\n {\n logger.error(e.getMessage());\n }\n catch (IOException e)\n {\n logger.error(e.getMessage());\n }\n return keyNameList;\n }",
"public List<FileUpload> getFileUploads(int numberOfFileUploads, Long startIndex) throws AppException;",
"@PreAuthorize(\"hasAuthority('file:write')\")\n @PostMapping(\"/fileUpload\")\n public String handleMultiFileUpload(@RequestParam(\"files\") MultipartFile[] files, HttpSession session, RedirectAttributes redirectAttributes) {\n //get directory for saving file\n String currentDirectory = session.getAttribute(\"currentFolderPath\").toString();\n\n //Call the storage service to save files\n System.out.println(files.length);\n storageService.store(currentDirectory, files);\n //send to storage service for saving\n redirectAttributes.addFlashAttribute(\"message\", \"File(s) Uploaded and saved!\");\n\n return \"redirect:/\";\n }",
"@Test\n public void testCreateMultipleFilesFromBodyWithFalseCredentialsAndNonNullDuration() {\n DatasourceConfiguration datasourceConfiguration = createDatasourceConfiguration();\n ExecuteActionDTO executeActionDTO = new ExecuteActionDTO();\n AmazonS3Plugin.S3PluginExecutor pluginExecutor = new AmazonS3Plugin.S3PluginExecutor();\n\n ActionConfiguration actionConfiguration = new ActionConfiguration();\n\n Map<String, Object> configMap = new HashMap<>();\n setDataValueSafelyInFormData(configMap, BODY, \"[{\\\"data\\\": \\\"plain text\\\"}, {\\\"data\\\": \\\"plain text2\\\"}]\");\n setDataValueSafelyInFormData(configMap, PATH, \"path\");\n setDataValueSafelyInFormData(configMap, COMMAND, \"UPLOAD_MULTIPLE_FILES_FROM_BODY\");\n setDataValueSafelyInFormData(configMap, BUCKET, \"bucket_name\");\n setDataValueSafelyInFormData(configMap, CREATE_DATATYPE, \"NO\");\n setDataValueSafelyInFormData(configMap, CREATE_EXPIRY, \"100000\");\n\n actionConfiguration.setFormData(configMap);\n\n AmazonS3 connection = pluginExecutor.datasourceCreate(datasourceConfiguration).block();\n Mono<ActionExecutionResult> resultMono = pluginExecutor.executeParameterized(\n connection,\n executeActionDTO,\n datasourceConfiguration,\n actionConfiguration);\n\n StepVerifier.create(resultMono)\n .assertNext(result -> {\n assertFalse(result.getIsExecutionSuccess());\n String message = (String) result.getBody();\n assertTrue(message.contains(\"The AWS Access Key Id you provided does not exist in \" +\n \"our records\"));\n assertEquals(AppsmithPluginError.PLUGIN_ERROR.getTitle(), result.getTitle());\n })\n .verifyComplete();\n }",
"@Override\n public String upload(String bucket, String key, String file) {\n byte[] data = (file.contains(\",\")) ? Base64.getDecoder().decode(file.substring(file.indexOf(\",\") + 1))\n : Base64.getDecoder().decode(file);\n\n SaveImage.saveImage(\"storage/\", bucket + \"_\" + key, new ByteArrayInputStream(data));\n\n try {\n Regions clientRegion = Regions.fromName(AWSUtil.getValue(\"region\"));\n\n AWSCredentials credentials = new BasicAWSCredentials(AWSUtil.getValue(\"accesskey\"),\n AWSUtil.getValue(\"secretkey\"));\n\n AmazonS3 s3Client = AmazonS3ClientBuilder.standard()\n .withCredentials(new AWSStaticCredentialsProvider(credentials)).withRegion(clientRegion).build();\n\n File arquivo = new File(\"storage/\" + bucket + \"_\" + key);\n s3Client.putObject(bucket, key, arquivo);\n\n arquivo.delete(); // remove o cache local depois do upload\n\n return \"SUCCESS\";\n }\n //\n catch (AmazonServiceException e) {\n err.exception(\"AmazonServiceException\", e);\n }\n //\n catch (SdkClientException e) {\n err.exception(\"SdkClientException\", e);\n }\n\n return \"FAILURE\";\n }",
"@ApiIgnore\n @PostMapping(value = \"/upload\")\n public Object batchUpload(@RequestParam(\"files\") MultipartFile[] files) {\n\n ResultBody resultBody = new ResultBody();\n resultBody.setCode(\"0\");\n\n String uploadedFileName = Arrays.stream(files).map(MultipartFile::getOriginalFilename)\n .filter(x -> !StringUtils.isEmpty(x))\n .collect(Collectors.joining(\"|\"));\n if (StringUtils.isEmpty(uploadedFileName)) {\n resultBody.setMessage(\"上传文件为空!\");\n }\n try {\n saveUploadedFiles(Arrays.asList(files));\n resultBody.setMessage(\"调用成功!\");\n Map<String, Object> map = new HashMap<>();\n map.put(\"filename\", uploadedFileName);\n resultBody.setResult(map);\n\n } catch (IOException e) {\n e.printStackTrace();\n resultBody.setCode(\"500\");\n resultBody.setMessage(e.getMessage());\n }\n return resultBody;\n }",
"public void gettingDataFromS3(AmazonS3 s3, String key) throws IOException {\n try {\n for (int i = 0; i < 1; i++) {\n S3Object object = s3.getObject(new GetObjectRequest(bucketName, key));\n if( object.getKey().equalsIgnoreCase(key)) {\n String contentType = object.getObjectMetadata().getContentType();\n storingTheObjectToDisk1(object.getObjectContent(), key);\n break;\n }\n }\n String eTag = gettingETagOfTheFile(key);\n try {\n File file = new File(\"/home/ubuntu/\" + key + \".etag\");\n BufferedWriter output = new BufferedWriter(new FileWriter(file));\n output.write(eTag);\n output.close();\n } catch ( IOException e ) {\n e.printStackTrace();\n }\n } catch (AmazonServiceException ase) {\n System.out.println(\"Caught an AmazonServiceException, which\" + \" means your request made it \" + \"to Amazon S3, but was rejected with an error response\" +\n \" for some reason.\");\n System.out.println(\"Error Message: \" + ase.getMessage());\n System.out.println(\"HTTP Status Code: \" + ase.getStatusCode());\n System.out.println(\"AWS Error Code: \" + ase.getErrorCode());\n System.out.println(\"Error Type: \" + ase.getErrorType());\n System.out.println(\"Request ID: \" + ase.getRequestId());\n } catch (AmazonClientException ace) {\n System.out.println(\"Caught an AmazonClientException, which means\"+ \" the client encountered \" + \"an internal error while trying to \" + \"communicate with S3, \" + \"such as not being able to access the network.\");\n System.out.println(\"Error Message: \" + ace.getMessage());\n }\n }",
"@RequestMapping(value = \"/upload\", method = RequestMethod.POST)\n @ResponseBody\n public ModelAndView singleFileUpload(@RequestParam(\"file\") MultipartFile file) {\n\n try {\n\n byte[] bytes = file.getBytes();\n String name = file.getOriginalFilename() ;\n\n // Put the file into the bucket.\n s3Client.putObject(bytes, bucketName, name);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n return new ModelAndView(new RedirectView(\"photo\"));\n }",
"public synchronized void startUploadToS3Server() {\n\t\t LogEntry [] logEntrys = null;\n\t\t\ttry {\n if(ReportService.ACTION_UPLOAD_UB_LOG.equals(action)) {\n if (tags == null || times == null || zipEntryNames == null || \n tags.length != times.length || tags.length != zipEntryNames.length || \n zipEntryNames.length != tags.length || !isZipEntryNameAllowed(zipEntryNames)) {\n Log.d(TAG, \"Stop uploading UB log --> tags array or times array or zip entry array isn't allowed.\");\n return;\n }\n if(Common.DEBUG && tags != null && times != null && tags.length == times.length) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"[UB Report] Ready to upload --> \");\n for(int i=0; i<tags.length; i++) {\n sb.append(\"tag: \").append(tags[i]).append(\", time: \").append(times[i]).append(\" \");\n }\n Log.d(TAG,sb.toString());\n }\n logEntrys = new LogEntry[tags.length];\n for(int i=0; i<tags.length; i++)\n logEntrys[i] = new LogEntry(tags[i], times[i], getContext(), key, iv);\n }\n else {\n logEntrys = new LogEntry[1];\n \t\t\t\tif(file != null)\n \t\t\t\t logEntrys[0] = new LogEntry(file, getContext());\n \t\t\t\telse if (fromDropBox)\n \t\t\t\t logEntrys[0] = new LogEntry(tag, time, getContext(), key, iv);\n \t\t\t\tzipEntryNames = new String [1];\n \t\t\t\tzipEntryNames[0] = \"Logfile\";\n }\n \n upload(tag, msg, position, mUniqueMsg, logEntrys, zipEntryNames, triggerType, packageName, processName);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tLog.e(TAG, \"Fail to create LogEntry\", e);\n\t\t\t} finally {\n\t\t\t if(logEntrys != null) {\n for(LogEntry logEntry : logEntrys)\n logEntry.closeEntry();\n\t\t\t }\n\t\t\t}\n\t }",
"public void uploadMultipart() {\n //getting the actual path of the image\n String path = getPath(filePath);\n\n //Uploading code\n try {\n String uploadId = UUID.randomUUID().toString();\n\n //Creating a multi part request\n new MultipartUploadRequest(this, uploadId, \"todo\")\n .addFileToUpload(path, \"image\") //Adding file\n .setNotificationConfig(new UploadNotificationConfig())\n .setMaxRetries(2)\n .startUpload(); //Starting the upload\n\n } catch (Exception exc) {\n Toast.makeText(this, exc.getMessage(), Toast.LENGTH_SHORT).show();\n }\n }",
"@Override\n public void store(MultipartFile file, String path) {\n String filename = StringUtils.cleanPath(file.getOriginalFilename());\n try {\n if (file.isEmpty()) {\n throw new StorageException(\"Failed to store empty file \" + filename);\n }\n if (filename.contains(\"..\")) {\n // This is a security check\n throw new StorageException(\n \"Cannot store file with relative path outside current directory \"\n + filename);\n }\n\n \t\t// upload file to s3\n \t\tString fileName = path + \"/\" + filename;\n\n \t\tthis.s3client.putObject(new PutObjectRequest(this.s3_storage_properties.getBucketName(), fileName,\n \t\t\t\tfile.getInputStream(), new ObjectMetadata())\n .withCannedAcl(CannedAccessControlList.PublicRead));\n Application.logger.info(\"Stored \"+fileName+\" into S3\");\n }\n catch (IOException e) {\n throw new StorageException(\"Failed to store file \" + filename, e);\n }\n }",
"@Test\n public void testUploadToAmazonS3() throws Exception {\n String uploadFileName = \"test_upload.jpg\";\n byte[] uploadFilenameBytes = IOUtils.toByteArray(new ClassPathResource(uploadFileName).getInputStream());\n\n MockMultipartFile file = new MockMultipartFile(\"file\", uploadFileName, null, new ClassPathResource(uploadFileName).getInputStream());\n\n // make request to our server\n byte[] result = mockMvc.perform(fileUpload(\"/api/v1/storage/upload\")\n .file(file).with(user(\"[email protected]\").roles(\"USER\", \"ADMIN\")))\n .andExpect(status().is(201)).andReturn().getResponse().getContentAsByteArray();\n\n StorageDocumentMeta storageDocumentMeta = objectMapper.readValue(result, StorageDocumentMeta.class);\n Assert.assertNotNull(storageDocumentMeta);\n Assert.assertNotNull(storageDocumentMeta.getPublicUrl());\n\n // get real request to aws s3 and assert to content of file in our FS\n Assert.assertEquals(IOUtils.toByteArray(new URL(storageDocumentMeta.getPublicUrl())), uploadFilenameBytes);\n }",
"public void send(List<File> files) {\n SimpleDateFormat sdf = new SimpleDateFormat( \"yyyy-MM-dd HH:mm:ss.SSS\" );\n int numberOfFiles = files.size();\n LOG.info( \"Started uploading \" + numberOfFiles + \" file(s) at \"\n + sdf.format( System.currentTimeMillis() ) );\n ConnectionUtilities connections = new ConnectionUtilities();\n\n for ( File file : files )\n {\n ableToWrite = true;\n totalReceived.set( 0 );\n try ( InputStream is = new FileInputStream( file ) )\n {\n processIndividualFile( file, is, connections );\n } catch ( IOException | ClientWriteException | NumberFormatException e )\n {\n LOG.error( \"Unable to process the file \" + file.getName() + \". \"\n + e.getMessage() );\n try\n { // sleep to allow stale messages to be send before reading next file\n TimeUnit.SECONDS.sleep( 1 );\n } catch ( InterruptedException e0 )\n {\n LOG.error( e0.getMessage() );\n }\n --numberOfFiles;\n } catch ( InterruptedException e )\n {\n LOG.error( e.getMessage() );\n Thread.currentThread().interrupt();\n }\n }\n LOG.info( \"Finished uploading \" + numberOfFiles + \" file(s) at \"\n + sdf.format( System.currentTimeMillis() ) + \"\\n\" );\n connections.setAbleToClear( true );\n connections.closeCachedConnections();\n }",
"public synchronized void upload(){\n\t}",
"String uploadFileFromBody(AmazonS3 connection,\n String bucketName,\n String path,\n String body,\n Boolean usingFilePicker,\n Date expiryDateTime)\n throws InterruptedException, AppsmithPluginException {\n\n byte[] payload;\n MultipartFormDataDTO multipartFormDataDTO;\n try {\n multipartFormDataDTO = objectMapper.readValue(\n body,\n MultipartFormDataDTO.class);\n } catch (IOException e) {\n throw new AppsmithPluginException(\n AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,\n \"Unable to parse content. Expected to receive an object with `data` and `type`\"\n );\n }\n if (multipartFormDataDTO == null) {\n throw new AppsmithPluginException(\n AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,\n \"Could not find any data. Expected to receive an object with `data` and `type`\"\n );\n }\n if (Boolean.TRUE.equals(usingFilePicker)) {\n\n String encodedPayload = (String) multipartFormDataDTO.getData();\n /*\n * - For files uploaded using Filepicker.xyz.base64, body format is \"<content-type>;base64,<actual-\n * base64-encoded-payload>\".\n * - Strip off the redundant part in the beginning to get actual payload.\n */\n if (encodedPayload.contains(BASE64_DELIMITER)) {\n List<String> bodyArrayList = Arrays.asList(encodedPayload.split(BASE64_DELIMITER));\n encodedPayload = bodyArrayList.get(bodyArrayList.size() - 1);\n }\n\n try {\n payload = Base64.getDecoder().decode(encodedPayload);\n } catch (IllegalArgumentException e) {\n throw new AppsmithPluginException(\n AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,\n \"File content is not base64 encoded. File content needs to be base64 encoded when the \" +\n \"'File Data Type: Base64/Text' field is selected 'Yes'.\"\n );\n }\n } else {\n payload = ((String) multipartFormDataDTO.getData()).getBytes();\n }\n\n InputStream inputStream = new ByteArrayInputStream(payload);\n TransferManager transferManager = TransferManagerBuilder.standard().withS3Client(connection).build();\n final ObjectMetadata objectMetadata = new ObjectMetadata();\n // Only add content type if the user has mentioned it in the body\n if (multipartFormDataDTO.getType() != null) {\n objectMetadata.setContentType(multipartFormDataDTO.getType());\n }\n transferManager.upload(bucketName, path, inputStream, objectMetadata).waitForUploadResult();\n\n ArrayList<String> listOfFiles = new ArrayList<>();\n listOfFiles.add(path);\n ArrayList<String> listOfUrls = getSignedUrls(connection, bucketName, listOfFiles, expiryDateTime);\n if (listOfUrls.size() != 1) {\n throw new AppsmithPluginException(\n AppsmithPluginError.PLUGIN_ERROR,\n \"Appsmith has encountered an unexpected error when fetching url from AmazonS3 after file \" +\n \"creation. Please reach out to Appsmith customer support to resolve this.\"\n );\n }\n String signedUrl = listOfUrls.get(0);\n\n return signedUrl;\n }",
"void addContentFiles(List<InputContentFile> contentFilesList) throws ServiceException;",
"public void uploadPictureToParkById(int id, MultipartFile multipartFile, boolean enablePublicReadAccess) {\n Optional<DogPark> dogPark = dogParkRepository.findById(id);\n\n if (dogPark.isPresent()) {\n\n //Create a new image to store the URL of the file that is being created\n Image image = new Image();\n\n //Creating the file\n String fileName = multipartFile.getOriginalFilename();\n\n try {\n //creating the file in the server (temporarily)\n File file = new File(fileName);\n FileOutputStream fos = new FileOutputStream(file);\n fos.write(multipartFile.getBytes());\n fos.close();\n\n for (int i = -1; i < dogPark.get().getImages().size(); i++) {\n\n if (i == dogPark.get().getImages().size() - 1) {\n fileName = dogPark.get().getName() + \"/\" + dogPark.get().getName() + (i + 1) + \".\" + FilenameUtils.getExtension(fileName);\n }\n }\n\n //Set the URL to the new image and connect with the correct dog park and save it to the repository\n image.setUrl(\"https://dogparks.s3.amazonaws.com/\" + fileName);\n image.setDogpark(dogPark.get());\n imageRepository.save(image);\n\n //Add the image to the dog park\n dogPark.get().getImages().add(image);\n\n PutObjectRequest putObjectReqeust = new PutObjectRequest(this.awsS3AudioBucket, fileName, file);\n\n if (enablePublicReadAccess) {\n putObjectReqeust.withCannedAcl(CannedAccessControlList.PublicRead);\n }\n\n this.amazonS3.putObject(putObjectReqeust);\n\n } catch (IOException | AmazonServiceException ex) {\n logger.error(\"error [\" + ex.getMessage() + \"] occurred while uploading [\" + fileName + \"] \");\n }\n }\n else {\n throw new DogParkNotFoundException();\n }\n }",
"public interface AWSClient {\n\n public void putFileinS3(Exchange exchange) throws Exception;\n\n public void putMessageInSQS(Exchange exchange) throws Exception;\n}",
"@Override\n\tpublic synchronized void upload(final List<Uploadable> sources,\n\t\tfinal List<String> locks) throws IOException\n\t{\n\n\t\tsetCommand(\"date -u +%Y%m%d%H%M%S\");\n\t\ttimestamp = readNumber(in);\n\t\tsetTitle(\"Uploading\");\n\n\t\tfinal String uploadFilesCommand = \"scp -p -t -r \" + uploadDir;\n\t\tsetCommand(uploadFilesCommand);\n\t\tif (checkAck(in) != 0) {\n\t\t\tthrow new IOException(\"Failed to set command \" + uploadFilesCommand);\n\t\t}\n\n\t\ttry {\n\t\t\tuploadFiles(sources);\n\t\t}\n\t\tcatch (final UpdateCanceledException cancel) {\n\t\t\tfor (final String lock : locks)\n\t\t\t\tsetCommand(\"rm \" + uploadDir + lock + \".lock\");\n\t\t\tout.close();\n\t\t\tchannel.disconnect();\n\t\t\tthrow cancel;\n\t\t}\n\n\t\t// Unlock process\n\t\tfor (final String lock : locks)\n\t\t\tsetCommand(\"mv -f \" + uploadDir + lock + \".lock \" + uploadDir + lock);\n\n\t\tout.close();\n\t\tdisconnectSession();\n\t}",
"private void addFilesToWriter()\n throws Exception {\n Set<Map.Entry<String, Map.Entry<String, byte[]>>> set = files.entrySet();\n for (Map.Entry<String, Map.Entry<String, byte[]>> me : set) {\n writer.append(\"--\" + boundary).append(LINE_FEED);\n writer.append(\n \"Content-Disposition: form-data; name=\\\"\" + me.getKey()\n + \"\\\"; filename=\\\"\" + me.getValue().getKey() + \"\\\"\")\n .append(LINE_FEED);\n writer.append(\n \"Content-Type: \"\n + URLConnection.guessContentTypeFromName(me.getValue().getKey()))\n .append(LINE_FEED);\n writer.append(LINE_FEED);\n writer.flush();\n\n outputStream.write(me.getValue().getValue(), 0, me.getValue().getValue().length);\n outputStream.flush();\n\n writer.append(LINE_FEED);\n writer.flush();\n }\n }",
"int postFiles(String [] args,int startIndexInArgs) throws IOException {\n int filesPosted = 0;\n for (int j = 1; j < args.length; j++) {\n File srcFile = new File(args[j]);\n final StringWriter sw = new StringWriter();\n \n if (srcFile.canRead()) {\n info(\"POSTing file \" + srcFile.getName());\n postFile(srcFile, sw);\n filesPosted++;\n warnIfNotExpectedResponse(sw.toString(),SOLR_OK_RESPONSE);\n } else {\n warn(\"Cannot read input file: \" + srcFile);\n }\n }\n return filesPosted;\n }",
"@XRayEnabled\npublic interface UploadFileService {\n \n /**\n * copyFileToS3 : copyFileToS3\n * \n * @param fileName : file name\n * @param fileExtension : file extension\n * @param content : content\n * @return String : url file\n */\n public String copyFileToS3(String fileName, String fileExtension, String content);\n\n /**\n * uploadFileToS3 : Upload file to S3 Amz Cloud\n * \n * @param part\n * @param importBelong\n * @return\n * @throws IOException\n */\n S3UploadResponse uploadFileToS3(MultipartFile part, Integer importBelong) throws IOException;\n}",
"List<MovilizerResponse> batchUploadFolderSync(Path folder);",
"public void testUploadTestCases() throws Exception {\r\n FileDataSource dataSource = new FileDataSource(\"test_files/stress.jar\");\r\n DataHandler dataHandler = new DataHandler(dataSource);\r\n\r\n Date startTime = new Date();\r\n for (int i = 0; i < 10; ++i) {\r\n services.uploadTestCases(StressTestHelper.PROJECT_ID, StressTestHelper.USER_ID,\r\n \"testcases.jar\", dataHandler);\r\n }\r\n\r\n Date endTime = new Date();\r\n\r\n System.out.println(\"Executing uploadTestCases for 10 times takes \"\r\n + (endTime.getTime() - startTime.getTime()) + \" milliseconds\");\r\n\r\n // check the result\r\n Upload upload = uploadManager.getCreatedUpload();\r\n\r\n assertEquals(\"Wrong type\", \"Test Case\", upload.getUploadType().getName());\r\n assertEquals(\"Wrong status\", \"Active\", upload.getUploadStatus().getName());\r\n assertEquals(\"Wrong project id\", StressTestHelper.PROJECT_ID, upload.getProject());\r\n assertTrue(\"Wrong file name\", upload.getParameter().startsWith(\"submission\"));\r\n assertTrue(\"Wrong file name\", upload.getParameter().endsWith(\"jar\"));\r\n assertEquals(\"Wrong user id\", String.valueOf(StressTestHelper.USER_ID), uploadManager.getCreatedUploadUserId());\r\n\r\n File uploadedDir = new File(\"test_files/upload/\");\r\n File uploaded = uploadedDir.listFiles()[0];\r\n assertEquals(\"Failed to upload submission\", new File(\"test_files/stress.jar\").length(), uploaded.length());\r\n }",
"public void sendDataToClient(AmazonS3 s3, String file) throws IOException {\n Path path = Paths.get(\"/home/ubuntu/\" + file);\n //first checking if the CDNs are having the file in its disk\n if(Files.notExists(path)){\n // not present in the disk\n if(listingKeysOfAllTheObject(s3, file)){\n gettingDataFromS3(s3, file);\n }\n else {\n System.out.println(\"file is not present in both local CDNs as well as in S3, can't serve you request!\");\n }\n } else if(Files.exists(path)){\n // Checking if the file is current version of S3 file\n if(checkingIfTheFileIsCurrent(s3, file)){\n // the file is current\n } else {\n // the file is not current, getting the latest file from the S3\n gettingDataFromS3(s3, file);\n }\n }\n }",
"public void uploadObject() {\n\n\t}",
"public void uploadFilesToUrl(ArrayList<File> listFiles) {\n\t\tPostMethod filePost = new PostMethod(getHostURL());\n\t\t// Disable USE_EXPECT_CONTINUE for problems with servers not HTTP/1.1\n\t\tfilePost.getParams().setBooleanParameter(HttpMethodParams.USE_EXPECT_CONTINUE, false);\n\n\t\ttry {\n\n\t\t\tint totalFiles = listFiles.size();\n\t\t\tif (totalFiles <= 0) {\n\t\t\t\tlogger.warning(\"Warning not upload files to \" + hostURL + \", list files empty.\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tPart[] parts = new FilePart[totalFiles];\n\t\t\tfor (int idx = 0; idx < totalFiles; idx++) {\n\t\t\t\tFile tgtFile = listFiles.get(idx);\n\t\t\t\tlogger.log(Level.INFO, \"Add File \" + tgtFile.getName() + \" for upload.\");\n\t\t\t\tparts[idx] = new FilePart(\"uploadFile-\" + idx, tgtFile);\n\t\t\t}\n\n\t\t\t// Set multipart content\n\t\t\tfilePost.setRequestEntity(new MultipartRequestEntity(parts, filePost.getParams()));\n\n\t\t\t// Create Http client\n\t\t\tHttpClient client = new HttpClient();\n\t\t\tclient.getHttpConnectionManager().getParams().setConnectionTimeout(5000);\n\n\t\t\t// Upload files and get result\n\t\t\tint status = client.executeMethod(filePost);\n\t\t\tif (status == HttpStatus.SC_OK) {\n\t\t\t\tlogger.info(\"Upload complete, response=\" + filePost.getResponseBodyAsString());\n\t\t\t} else {\n\t\t\t\tlogger.info(\"Upload failed, response=\" + HttpStatus.getStatusText(status));\n\t\t\t\tresultFromPost = HTTP_REQUESTER_ERROR;\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tlogger.log(Level.SEVERE, \"Error uploading files to \" + getHostURL(), ex);\n\t\t\tresultFromPost = HTTP_REQUESTER_ERROR;\n\t\t} finally {\n\t\t\tfilePost.releaseConnection();\n\t\t}\n\t}",
"private void onImageSelected(Uri uri) {\n S3Manager s3Manager = S3Manager.getInstance(getActivity());\n FutureTask<Void> userAuthorized = s3Manager.authUser();\n s3Manager.uploadImage(userAuthorized, uri, new UploadCompleteCallback());\n }",
"List<IbeisImage> uploadImages(List<File> images, File pathToTemporaryZipFile) throws\n UnsupportedImageFileTypeException, IOException, MalformedHttpRequestException, UnsuccessfulHttpRequestException;",
"private void addFilesInRequestEntity(MultipartEntity reqEntity) {\n if (filePath_image != null && filePath_image.length > 0) {\n\n for (int i = 0; i < filePath_image.length; i++) {\n if (filePath_image[i] != null) {\n File file = new File(filePath_image[i]);\n\n FileBody fileBodyVideo = new FileBody(file);\n reqEntity.addPart(keyForUploadFileImage + i, fileBodyVideo);\n System.out.println(keyForUploadFileImage + i + \" RestClient: File \" + file);\n }\n }\n }\n if (filePath_video != null && filePath_video.length() > 0) {\n File file = new File(filePath_video);\n\n FileBody fileBodyVideo = new FileBody(file);\n reqEntity.addPart(keyForUploadFileVideo, fileBodyVideo);\n System.out.println(keyForUploadFileVideo + \" RestClient: File \" + file);\n }\n }",
"public PutObjectResult upload(InputStream inputStream, String uploadKey, ObjectMetadata metadata) {\n PutObjectRequest putObjectRequest = new PutObjectRequest(bucketName, uploadKey, inputStream, metadata);\n\n putObjectRequest.setCannedAcl(CannedAccessControlList.PublicRead);\n\n PutObjectResult putObjectResult = s3Client.putObject(putObjectRequest);\n\n IOUtils.closeQuietly(inputStream);\n\n return putObjectResult;\n }",
"public Result uploadImage() {\n MultipartFormData<File> body = request().body().asMultipartFormData();\n MultipartFormData.FilePart<File> fileInput = body.getFile(\"inputFile\");\n if (fileInput != null) {\n File file = (File) fileInput.getFile();\n String imageUrl = S3Action.putImg(s3, file, UUID.randomUUID().toString());\n return ok(afterPutImg.render(imageUrl));\n } else {\n return badRequest(\"error\");\n }\n }",
"public com.amazon.s3.PutObjectResponse putObject(com.amazon.s3.PutObject putObject);",
"public void store(S3Object s3Object) throws S3Exception {\n\t\t\r\n\t}",
"@Override\r\n\tpublic boolean uploadFiles(InputStream is, String targetLocation, String fileName) throws FileSystemUtilException {\r\n\t\tthrow new FileSystemUtilException(\"000000\", null, Level.ERROR, null);\r\n\r\n\t}",
"private boolean listingKeysOfAllTheObject(AmazonS3 s3, String file) {\n try {\n for (int i = 0; i < 1; i++) {\n ListObjectsRequest listObjectsRequest = new ListObjectsRequest().withBucketName(bucketName);\n ObjectListing objectListing;\n do {\n objectListing = s3.listObjects(listObjectsRequest);\n for (S3ObjectSummary objectSummary : objectListing.getObjectSummaries()) {\n if (objectSummary.getKey().equalsIgnoreCase(file)) {\n return true;\n }\n }\n listObjectsRequest.setMarker(objectListing.getNextMarker());\n } while (objectListing.isTruncated());\n }\n } catch (AmazonServiceException ase) {\n System.out.println(\"Caught an AmazonServiceException, \" +\n \"which means your request made it \" +\n \"to Amazon S3, but was rejected with an error response \" +\n \"for some reason.\");\n System.out.println(\"Error Message: \" + ase.getMessage());\n System.out.println(\"HTTP Status Code: \" + ase.getStatusCode());\n System.out.println(\"AWS Error Code: \" + ase.getErrorCode());\n System.out.println(\"Error Type: \" + ase.getErrorType());\n System.out.println(\"Request ID: \" + ase.getRequestId());\n } catch (AmazonClientException ace) {\n System.out.println(\"Caught an AmazonClientException, \" +\n \"which means the client encountered \" +\n \"an internal error while trying to communicate\" +\n \" with S3, \" +\n \"such as not being able to access the network.\");\n System.out.println(\"Error Message: \" + ace.getMessage());\n }\n return false;\n }",
"private Future<Void> putObjectS3(final String aPath) {\n final Promise<Void> promise = Promise.promise();\n\n try {\n myAmazonS3.putObject(s3Bucket, IMAGE_JPX, new File(aPath));\n promise.complete();\n } catch (final AmazonServiceException details) {\n LOGGER.error(details.getErrorMessage());\n promise.fail(details.getErrorMessage());\n }\n\n return promise.future();\n }",
"@Test\n public void testPutFileMethodValidS3Path() throws GenieException {\n final PutObjectResult putObjectResult = Mockito.mock(PutObjectResult.class);\n Mockito.when(this.s3Client.putObject(Mockito.any(), Mockito.any(), Mockito.any(File.class))).thenReturn(putObjectResult);\n final ArgumentCaptor<String> bucketArgument = ArgumentCaptor.forClass(String.class);\n final ArgumentCaptor<String> keyArgument = ArgumentCaptor.forClass(String.class);\n s3FileTransfer.putFile(S3FileTransferImplUnitTests.LOCAL_PATH, S3FileTransferImplUnitTests.S3_PATH);\n Mockito.verify(this.s3Client).putObject(bucketArgument.capture(), keyArgument.capture(), Mockito.any(File.class));\n Assert.assertEquals(S3FileTransferImplUnitTests.S3_BUCKET, bucketArgument.getValue());\n Assert.assertEquals(S3FileTransferImplUnitTests.S3_KEY, keyArgument.getValue());\n Mockito.verify(this.uploadTimer, Mockito.times(1)).record(Mockito.anyLong(), Mockito.eq(TimeUnit.NANOSECONDS));\n Mockito.verify(this.registry, Mockito.times(1)).timer(Mockito.eq(UPLOAD_TIMER_NAME), this.tagsCaptor.capture());\n Assert.assertEquals(S3FileTransferImplUnitTests.SUCCESS_TAGS, this.tagsCaptor.getValue());\n }",
"public UploadHandle upload(List<File> files) throws Exception {\n \tMetadata md = new Metadata();\n \tfinal FileCollection fcol = new FileCollection(md);\n \tfor(File f: files) {\n \t\tFileMetaData mf = new FileMetaData(f.getName(), f.getLocalName(), \"\", null);\n \t\tmf.setGroups(f.getGroups());\n \t\tmd.md.file.add(mf);\n \t}\n NullOutputStream ostream = new NullOutputStream();\n fcol.tarit(ostream);\n long length = ostream.getLength();\n\n HttpResponse response = client.get(new URI(config.preallocurl()));\n String prealloc_file = this.read_http_entity(response.getEntity());\n String ingestServer = prealloc_file.split(\"\\n\")[0];\n String location = prealloc_file.split(\"\\n\")[1];\n ingestServer = ingestServer.split(\": \")[1];\n location = location.split(\": \")[1];\n \n PipedInputStream in = new PipedInputStream();\n final PipedOutputStream out = new PipedOutputStream(in);\n new Thread(\n new Runnable(){\n @Override\n public void run(){\n try {\n fcol.tarit(out);\n } catch (Exception ex) {\n Logger.getLogger(Connect.class.getName()).log(Level.SEVERE, null, ex);\n \n }\n }\n }\n ).start();\n \n InputStreamEntity entity = new InputStreamEntity(in, length);\n response = client.put(entity, new URI(\"https://\"+ingestServer+location));\n this.read_http_entity(response.getEntity());\n\n response = client.get(new URI(\"https://\"+ingestServer+config.finishurl()+location));\n String status_url = this.read_http_entity(response.getEntity());\n for(String line:status_url.split(\"\\n\")) {\n System.out.println(line);\n if(line.startsWith(\"Status: \"))\n status_url = line.split(\": \")[1];\n }\n System.out.println(status_url+\"/xml\");\n StatusHandler sturl = new StatusHandler();\n sturl.status_url = status_url+\"/xml\";\n sturl.timeout = 30;\n sturl.step = 5;\n UploadHandle ret = sturl;\n return ret;\n }",
"List getFileUploads(HttpServletRequest request) throws ValidationException;",
"@Test\n public void bulkUploadTest() throws IOException {\n\n JsonArray result = searchService.matchAllQuery(getIndexes(), 10);\n assertEquals(6, result.size());\n }",
"List<IbeisImage> uploadImages(List<File> images) throws UnsupportedImageFileTypeException, IOException,\n MalformedHttpRequestException, UnsuccessfulHttpRequestException;",
"public void uploadExamples(String filename,String classKey,String type);",
"private String addMultiPost(String caption, String name, String type, int height, int width) throws IOException {\n String urlString;\n try {\n urlString = uploadToS3(resizeAndCompressImage(name, height, width), type, name);\n } catch (IOException | ImageProcessingException e) {\n e.printStackTrace();\n // if post failed\n // send an email to admins\n bizUtilities.sendPostErrorEmail(userDao.getAdminUsers(), caption);\n return \"\";\n }\n return awsConfig.getBucketUrl() + \"/\" + urlString;\n }",
"public S3_Upload_Image() {super(TAG);}",
"public int fileSaver(MultipartFile[] files) throws IOException {\n\n MultipartFile[] checkedFiles = fileHandler.checkedFiles(files);\n\n int counter = 0;\n\n if (checkedFiles.length > 0) {\n String folder = checkedFiles[0].getOriginalFilename()\n .substring(0, checkedFiles[0].getOriginalFilename()\n .lastIndexOf('/'));\n\n String newFolderName = uploadUtil.createFolderName(folder);\n\n // rethrows IOException for initFolder\n initFolder(newFolderName);\n\n for (MultipartFile m : checkedFiles) {\n\n String filename = StringUtils.cleanPath(m.getOriginalFilename()\n .substring(m.getOriginalFilename().lastIndexOf('/') + 1));\n\n try {\n Files.copy(m.getInputStream(), Paths.get(uploadFolder + \"/\" + newFolderName)\n .resolve(filename));\n counter++;\n } catch (IOException e) {\n return counter;\n }\n }\n\n return counter;\n\n } else {\n return counter;\n }\n\n }",
"@Override\n public void cleanup(Context context) throws IOException {\n System.out.println(\"Features vector length: \" + numOfFeatures);\n bufferedWriter.close();\n File numOfFeaturesFile = new File(\"resource/numOfFeatures.txt\");\n bufferedWriter = new BufferedWriter(new FileWriter(numOfFeaturesFile));\n bufferedWriter.write(numOfFeatures + \"\\n\");\n bufferedWriter.close();\n if (local) {\n Files.copy(new File(\"resource/paths.txt\").toPath(), new File(\"resource/pathsListCopy.txt\").toPath(), REPLACE_EXISTING);\n } else {\n AmazonS3 s3 = new AmazonS3Client();\n Region usEast1 = Region.getRegion(Regions.US_EAST_1);\n s3.setRegion(usEast1);\n try {\n System.out.print(\"Uploading the dependency paths file to S3... \");\n s3.putObject(new PutObjectRequest(BUCKET_NAME, \"resource/paths.txt\", pathsFile));\n System.out.println(\"Done.\");\n System.out.print(\"Uploading num of features file to S3... \");\n s3.putObject(new PutObjectRequest(BUCKET_NAME, \"resource/numOfFeatures.txt\", numOfFeaturesFile));\n System.out.println(\"Done.\");\n } catch (AmazonServiceException ase) {\n System.out.println(\"Caught an AmazonServiceException, which means your request made it \"\n + \"to Amazon S3, but was rejected with an error response for some reason.\");\n System.out.println(\"Error Message: \" + ase.getMessage());\n System.out.println(\"HTTP Status Code: \" + ase.getStatusCode());\n System.out.println(\"AWS Error Code: \" + ase.getErrorCode());\n System.out.println(\"Error Type: \" + ase.getErrorType());\n System.out.println(\"Request ID: \" + ase.getRequestId());\n } catch (AmazonClientException ace) {\n System.out.println(\"Caught an AmazonClientException, which means the client encountered \"\n + \"a serious internal problem while trying to communicate with S3, \"\n + \"such as not being able to access the network.\");\n System.out.println(\"Error Message: \" + ace.getMessage());\n }\n }\n }",
"@PostMapping(value = \"/uploadFiles\", produces = MediaType.APPLICATION_JSON_VALUE)\n\t@ApiOperation(value=\"Upload files\", httpMethod=\"POST\", notes=\"To upload one or multiple files and persist meta-data in system and DB\")\n\tpublic ResponseEntity<?> uploadFiles(@RequestParam(value = \"path\", required = false) String destination,\n\t\t\t@ApiParam(value=\"user Id of the person who is uploading the file\", required=true)\n\t\t\t@RequestParam(value = \"userId\", required = true) String userId,\n\t\t\t@ApiParam(value=\"Description about the file to be uploaded\", required=false)\n\t\t\t@RequestParam(value = \"description\", required = false) String description,\n\t\t\t@ApiParam(value=\"One file or Multiple files to be chosen for upload size less than 200MB\", required=true)\n\t\t\t@RequestParam(value = \"files\", required = true) MultipartFile[] files) {\n\n\t\ttry {\n\n\t\t\tint fileCount = files.length;\n\t\t\tLOGGER.info(\"Total file to be uploaded \" + fileCount);\n\t\t\tif (fileCount == 0) {\n\t\t\t\treturn new ResponseEntity<ApplicationResponse>(\n\t\t\t\t\t\tnew ApplicationResponse(ApplicationResponse.Status.PARAMETER_MISSING.value(),\n\t\t\t\t\t\t\t\t\"No File(s) Selected to be upload.\"),\n\t\t\t\t\t\tHttpStatus.PARTIAL_CONTENT);\n\n\t\t\t}\n\t\t\tint fileSuccessCount = fileManagerService.uploadFiles(destination, userId, files);\n\t\t\n\t\t\treturn new ResponseEntity<>(new ApplicationResponse(ApplicationResponse.Status.CREATED.value(),\n\t\t\t\t\tfileSuccessCount + \" File(s) uploaded successfully. \"), HttpStatus.OK);\n\t\t} catch (ApplicationException e) {\n\t\t\treturn new ResponseEntity<>(new ApplicationResponse(ApplicationResponse.Status.SERVER_ERROR.value(),\n\t\t\t\t\t\"Failed to process the request. \"), HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t}\n\n\t}",
"public static String putObjectToS3(String key, String text) {\n String bucketName = System.getenv(\"BUCKET_NAME\");\n PutObjectRequest putObjectRequest = PutObjectRequest.builder()\n .bucket(bucketName)\n .key(key)\n .build();\n RequestBody body = RequestBody.fromString(text);\n client.putObject(putObjectRequest, body);\n\n return String.format(\"https://%s.s3.amazonaws.com/%s\",\n bucketName, URLEncoder.encode(key, StandardCharsets.UTF_8));\n }",
"@Override\n public List<String> AllFileFromS3Bucket()\n {\n List<Bucket> buckets= amazonS3.listBuckets();\n List<String> keys = new ArrayList<>();\n \n for (Bucket b :buckets) {\n \t System.out.println(\" **** \" + b.getName());\n \t keys.add(b.getName());\n }\n\treturn keys;\n \n }",
"private void loadMusicAssetsFromS3(String fileName) throws Exception {\n MinioClient s3Client = new MinioClient(\"https://s3.amazonaws.com/\", accessid, accesskey);\n InputStream ins = s3Client.getObject(bucket, fileName);\n FileOutputStream fos = new FileOutputStream(new File(\"temp/\" + fileName));\n fos.write(ins.read());\n }",
"public void uploadMultipleFilesWithOneIncorrectData() throws InterruptedException {\n\t\tlog.info(line);\n\t\tAssert.assertTrue(clickAllActionButton.uploadMultipleFiles(),\n\t\t\t\t\"success and error message are displayed for respective files\");\n\t}",
"@Override\n public void put(Collection<? extends ArtifactUpload> artifactUploads, Collection<? extends MetadataUpload> metadataUploads)\n {\n defaultRepositoryConnector.put(artifactUploads, metadataUploads);\n }",
"void uploadingFile(String path);",
"public void storeBucket(Bucket bucket) throws S3Exception {\n\t\t\r\n\t}",
"@Override\n public void uploadPart(RefCountedFSOutputStream file) throws IOException {\n // this is to guarantee that nobody is\n // writing to the file we are uploading.\n checkState(file.isClosed());\n\n final CompletableFuture<PartETag> future = new CompletableFuture<>();\n uploadsInProgress.add(future);\n\n final long partLength = file.getPos();\n currentUploadInfo.registerNewPart(partLength);\n\n file.retain(); // keep the file while the async upload still runs\n uploadThreadPool.execute(new UploadTask(s3AccessHelper, currentUploadInfo, file, future));\n }",
"public static String uploadByHttpClient(String toUrl, File[] files, String[] names) {\r\n//\t\tHttpClient httpclient = new DefaultHttpClient();\r\n//\t\ttry {\r\n// HttpPost httppost = new HttpPost(toUrl);\r\n//\r\n// MultipartEntity reqEntity = new MultipartEntity();\r\n// for (int i = 0; i < files.length; i++)\r\n// \treqEntity.addPart(names[i], new FileBody(files[i]));\r\n//// reqEntity.addPart(\"filename\", new StringBody(file.getName()));\r\n//\r\n// httppost.setEntity(reqEntity);\r\n// System.out.println(\"executing request \" + httppost.getRequestLine());\r\n// HttpResponse response = httpclient.execute(httppost);\r\n// \r\n// //response\r\n// System.out.println(response.getStatusLine());\r\n// HttpEntity resEntity = response.getEntity();\r\n// if (resEntity != null) {\r\n// \t\t\treturn getContent(resEntity.getContent());\r\n// }\r\n// } catch(IOException e){\r\n// \te.printStackTrace();\r\n// } finally {\r\n// // When HttpClient instance is no longer needed,\r\n// // shut down the connection manager to ensure\r\n// // immediate deallocation of all system resources\r\n// httpclient.getConnectionManager().shutdown();\r\n// }\r\n\t\treturn null;\r\n\t}",
"public EvsListMultipartUploadsResponse listAllMulitpartUploads(EvsListMultipartUploadsRequest request) {\r\n\t\tEvsListMultipartUploadsResponse initiateMultipartResponse = new EvsListMultipartUploadsResponse();\r\n\t\treturn invoke(request, initiateMultipartResponse);\r\n\t}",
"public DocumentListEntry upload(String title,String filePath) throws MalformedURLException, IOException, ServiceException;",
"protected String createBatchAndUpload() throws IOException {\n String batchId;\n try (CloseableClientResponse response = getResponse(RequestType.POST, \"upload\")) {\n assertEquals(Status.CREATED.getStatusCode(), response.getStatus());\n JsonNode node = mapper.readTree(response.getEntityInputStream());\n batchId = node.get(\"batchId\").asText();\n assertNotNull(batchId);\n }\n\n // fist file\n \n String data = \"SomeDataExtractedFromNuxeoDBToFeedTensorFlow\";\n String fileSize = String.valueOf(data.getBytes(UTF_8).length);\n Map<String, String> headers = new HashMap<>();\n headers.put(\"Content-Type\", \"text/plain\");\n headers.put(\"X-Upload-Type\", \"normal\");\n headers.put(\"X-File-Name\", \"aidata.bin\");\n headers.put(\"X-File-Size\", fileSize);\n headers.put(\"X-File-Type\", \"application/octet-stream\");\n\n try (CloseableClientResponse response = getResponse(RequestType.POST, \"upload/\" + batchId + \"/0\", data,\n headers)) {\n assertEquals(Status.CREATED.getStatusCode(), response.getStatus());\n JsonNode node = mapper.readTree(response.getEntityInputStream());\n assertEquals(\"true\", node.get(\"uploaded\").asText());\n assertEquals(batchId, node.get(\"batchId\").asText());\n assertEquals(\"0\", node.get(\"fileIdx\").asText());\n assertEquals(\"normal\", node.get(\"uploadType\").asText());\n } \n\n // second file\n data = \"SomeDataExtractedFromNuxeoDBToValidateTensorFlow\";\n fileSize = String.valueOf(data.getBytes(UTF_8).length);\n headers.clear();\n headers.put(\"Content-Type\", \"text/plain\");\n headers.put(\"X-Upload-Type\", \"normal\");\n headers.put(\"X-File-Name\", \"aidatacheck.bin\");\n headers.put(\"X-File-Size\", fileSize);\n headers.put(\"X-File-Type\", \"application/octet-stream\");\n\n try (CloseableClientResponse response = getResponse(RequestType.POST, \"upload/\" + batchId + \"/1\", data,\n headers)) {\n assertEquals(Status.CREATED.getStatusCode(), response.getStatus());\n JsonNode node = mapper.readTree(response.getEntityInputStream());\n assertEquals(\"true\", node.get(\"uploaded\").asText());\n assertEquals(batchId, node.get(\"batchId\").asText());\n assertEquals(\"1\", node.get(\"fileIdx\").asText());\n assertEquals(\"normal\", node.get(\"uploadType\").asText());\n } \n \n return batchId;\n }",
"public void upload(final String S3SubFolder, final String S3ObjectPath, final File fileLocation, final UploadListener uploadListener) {\n\n String S3ObjectPathRandom = null;\n TransferObserver observer;\n\n if (S3ObjectPath == null) {\n S3ObjectPathRandom = System.currentTimeMillis() + fileLocation.getAbsolutePath().substring(fileLocation.getAbsolutePath().lastIndexOf(\".\"));\n observer = transferUtility.upload(Config.BUCKET_NAME + S3SubFolder, S3ObjectPathRandom, fileLocation);\n } else {\n observer = transferUtility.upload(Config.BUCKET_NAME + S3SubFolder, S3ObjectPath, fileLocation);\n\n }\n\n final String fS3ObjectPathRandom = S3ObjectPathRandom;\n observer.setTransferListener(new TransferListener() {\n\n @Override\n public void onStateChanged(int id, TransferState state) {\n\n idOfTransfer = id;\n\n mState = state;\n if (S3ObjectPath == null)\n checkState(id, fileLocation, S3SubFolder, fS3ObjectPathRandom, uploadListener);\n else\n checkState(id, fileLocation, S3SubFolder, S3ObjectPath, uploadListener);\n }\n\n\n @Override\n public void onProgressChanged(int id, long bytesCurrent, long bytesTotal) {\n\n if (idOfTransfer != null) {\n\n idOfTransfer = id;\n }\n\n try {\n\n uploadListener.onProgressChanged(id, bytesCurrent, bytesTotal);\n } catch (IllegalStateException ignored) {\n }\n\n\n }\n\n @Override\n public void onError(int id, Exception ex) {\n\n if (idOfTransfer != null) {\n\n idOfTransfer = id;\n }\n\n uploadListener.onUploadError(id, fileLocation, ex);\n\n\n }\n });\n\n\n }",
"public int addObjects(Collection<? extends LocalAbstractObject> objects) throws BucketStorageException {\n return addObjects(objects.iterator());\n }",
"private void upload(String tag, String message, String position, String unique_msg, LogEntry [] inputLogEntry, String [] zipEntryNames, int triggerType, String packageName, String processName){\n\n if (!S3Policy.canLogToS3(getContext(), tag))\n return;\n if( inputLogEntry == null || zipEntryNames == null) {\n Log.d(TAG, \"inputLogEntry or zipEntryNames is null\");\n return;\n }\n\n if (message==null)\n message=\"\";\n if (position==null)\n position=\"\";\n\n String sn = Utils.getSN();\n //Create a device information properties file\n ByteArrayOutputStream os_deviceinfo = new ByteArrayOutputStream();\n S3DeviceInfoCreator deviceInfoCreator = S3DeviceInfoCreator.getInstance(getContext());\n Properties propReportData = deviceInfoCreator.createDeviceInfoProperties(tag, message, position, unique_msg, triggerType, packageName, processName);\n try {\n propReportData.store(os_deviceinfo, sMessageVersion);\n } catch (IOException e1) {\n e1.printStackTrace();\n } finally {\n try {if(os_deviceinfo != null) os_deviceinfo.close();} catch (IOException e) {e.printStackTrace();}\n }\n\n if(Common.SECURITY_DEBUG) Log.d(TAG, propReportData.toString());\n\n Properties prop = new Properties();\n prop.setProperty(\"TAG\", tag);\n prop.setProperty(\"S/N\", sn);\n // sy_wang, 20140321, Get sense version and change to sense ID which has specific format.\n prop.setProperty(\"SENSE_ID\", changeSenseVerToSenseId(Utils.getSenseVersionByCustomizationManager()));\n\n S3EntryFile entryFile = null;\n FileOutputStream zipos = null;\n DataOutputStream dataStream = null;\n ZipOutputStream zip = null;\n InputStream isInputLog = null;\n try {\n //Create a ZIP\n entryFile = S3LogCacheManager.getInstance().putS3LogToCache(getContext(), prop);\n zipos = entryFile.getFileOutputStream();\n dataStream = new DataOutputStream(zipos);\n dataStream.writeUTF(prop.getProperty(\"TAG\", \"ALL\"));\n dataStream.writeUTF(prop.getProperty(\"S/N\", \"unknown\"));\n zip =new ZipOutputStream(zipos);\n ZipEntry zeProperties = new ZipEntry(\"DeviceInfo.properties\");\n zip.putNextEntry(zeProperties);\n zip.write(os_deviceinfo.toByteArray());\n zip.closeEntry();\n\n for(int i=0; i<inputLogEntry.length ; i++) {\n if(inputLogEntry[i] != null) {\n ZipEntry zeLogfile = new ZipEntry(zipEntryNames[i]);\n zip.putNextEntry(zeLogfile);\n isInputLog = inputLogEntry[i].getInputStream();\n streamCopy(isInputLog,zip);\n if(isInputLog != null) {\n isInputLog.close();\n isInputLog = null;\n }\n zip.closeEntry();\n }\n }\n } catch(Exception e) {\n Log.e(TAG, \"Fail to compress Logfile and DeviceInfo\", e);\n } finally {\n try {if(isInputLog != null) isInputLog.close();} catch (IOException e) {e.printStackTrace();}\n try {if(zip != null) zip.finish();} catch (IOException e) {e.printStackTrace();}\n try {if(dataStream != null) dataStream.close();} catch (IOException e) {e.printStackTrace();}\n try {if(zipos != null) zipos.close();} catch (IOException e) {e.printStackTrace();}\n }\n\n //General upload speed for 3G is 0.3 Mb/s .The max size of file to upload is 2.5MB\n //Time cost for uploading = 66.67x2(safety factor) = 133(s)\n String wakelockName = Common.WAKELOCK_S3;\n int wakelockTime = 133000;\n /*\n [2017.02.21 eric lu]\n For UB, we reduce wakelock to 30(s)to prevent power team issues.\n\n If the wakelock exceed 360(s) in 48 hours, we will need to explain why we need to acquire it.\n Hence, 360(s)/2 = 180(s)/day ,and we will upload 4 times per day\n 180/4 = 45(s)/once\n Actually, uploading time was seldom exceed 5(s), we acquire 30(s) as a trade-off.\n */\n if (Common.STR_HTC_UB.equals(tag)){\n wakelockName = Common.WAKELOCK_S3_UB;\n wakelockTime = 30000;\n }\n\n PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);\n PowerManager.WakeLock wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, wakelockName);\n wakeLock.setReferenceCounted(false);\n wakeLock.acquire(wakelockTime);\n\n try {\n Log.d(TAG, \"Start upload\");\n Log.d(TAG,\"The size of uploaded file is: \"+entryFile.getFileSize()+\"(bytes)\");\n Utils.logDataSizeForWakeLock(wakelockName,entryFile.getFileSize());\n\n for (int i=RETRY_COUNT; i>=0; i--) {\n try {\n if (!Utils.isNetworkAllowed(getContext(), tag, ReflectionUtil.get(\"ro.build.description\"),entryFile.getFileSize())){\n Log.d(TAG,\"[upload] Stop upload due to no proper network\");\n continue;\n }\n Log.d(TAG,\"uploaded file size: \"+entryFile.getFileSize()+\"(bytes)\"); //must showed it at begin,added by Ricky 2012.06.27\n Response response = s3uploader.putReport(entryFile.getFilePointer(), prop, 30000);\n //Compare the header\n\n if (response != null && response.getResponseCode() == HttpURLConnection.HTTP_OK) {\n entryFile.delete();\n Log.v(TAG, \"Upload Done , TAG=\"+tag);\n resumeCachedReport(s3uploader);\n break;\n }\n else \n {\n if (i==0) {\n deleteHtcPowerExpertTempFile(tag, entryFile); //Rex, Delete cache file directly when uploading HTC_POWER_EXPERT log failed, 2013/02/26\n Log.w(TAG, \"fail \");\n // storeReport(prop);do nothing since already stored\n }\n }\n android.os.SystemClock.sleep(1000);\n } catch (Exception e) {\n if (i==0) {\n deleteHtcPowerExpertTempFile(tag, entryFile); //Rex, Delete cache file directly when uploading HTC_POWER_EXPERT log failed, 2013/02/26\n Log.w(TAG, \"Got exception\",e.getMessage());\n //storeReport(prop); do nothing since already stored\n }\n android.os.SystemClock.sleep(1000);\n }\n }\n } catch (Exception e) {\n Log.e(TAG,\"Exception occurs\", e);\n } finally {\n if(wakeLock !=null && wakeLock.isHeld())\n wakeLock.release();\n }\n }",
"public String upload(String bucket, String path, String filename, InputStream is, String contentType)\r\n\t{\r\n\t\t/* Refresh the connection, if necessary. */\r\n\t\tif (isRefreshConnection())\r\n\t\t\tdoRefreshConnection();\r\n\t\t/*\r\n\t\t * The content length HAS to be set because we're not providing a File to the\r\n\t\t * PutObjectRequest but a stream.\r\n\t\t * Uploading stuff to S3 requires the amount of data to be specified before the upload. If\r\n\t\t * that is not done then we'd have to buffer the\r\n\t\t * entire stream (=File) before the upload. Setting the content length circumvents that.\r\n\t\t */\r\n\r\n\t\t/* Proceed with the actual upload. */\r\n\t\ttry\r\n\t\t{\r\n\t\t\tString prefix = FilenameUtils.getBaseName(filename);\r\n\t\t\tString suffix = FilenameUtils.getExtension(filename);\r\n\r\n\t\t\tFile file = File.createTempFile(prefix, suffix);\r\n\t\t\tOutputStream outputStream = new FileOutputStream(file);\r\n\t\t\tIOUtils.copy(is, outputStream);\r\n\t\t\toutputStream.close();\r\n\t\t\tS3Object object = new S3Object(file);\r\n\t\t\tobject.setName(sanitizePath(path) + filename);\r\n\r\n\t\t\tS3Bucket publicBucket = service.getBucket(bucket);\r\n\t\t\tAccessControlList bucketAcl = service.getBucketAcl(publicBucket);\r\n\t\t\tbucketAcl.grantPermission(GroupGrantee.ALL_USERS, Permission.PERMISSION_READ);\r\n\t\t\tpublicBucket.setAcl(bucketAcl);\r\n\t\t\tobject.setAcl(bucketAcl);\r\n\t\t\tservice.putObject(publicBucket, object);\r\n\t\t\tString pathtToFile = \"https://\" + publicBucket.getName() + \".\" + service.getEndpoint() + \"/\" + object.getKey();\r\n\t\t\tSystem.out.println(\"View public object contents here:\" + pathtToFile);\r\n\t\t\treturn pathtToFile;\r\n\t\t}\r\n\t\tcatch (S3ServiceException ase)\r\n\t\t{\r\n\t\t\tase.printStackTrace();\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn \"\";\r\n\t}",
"private void uploadFromDataStorage() {\n }",
"List getFileUploads(HttpServletRequest request, File finalDir) throws ValidationException;",
"private static void listingTheBucket(AmazonS3 s3) {\n for( com.amazonaws.services.s3.model.Bucket bucket : s3.listBuckets()){\n bucketArrayList.add(bucket);\n }\n }",
"@Override\r\n\t@Transactional\r\n\tpublic void saveFile(List<MultipartFile> mpf, Board board) {\n\t\t\r\n\t\tList<File> files = new ArrayList<>();\r\n\t\t\r\n\t\tfor(MultipartFile mf : mpf) {\r\n\t\t\t\r\n\t\t\tString uuid = UUIDCreator.makeUUID();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\tFile file = File\r\n\t\t\t\t\t.builder()\r\n\t\t\t\t\t.originalName(mf.getOriginalFilename())\r\n\t\t\t\t\t.UUID(uuid)\r\n\t\t\t\t\t.path(FileUtil.parseInsertFile(mf, uuid))\r\n\t\t\t\t\t.UUID(uuid)\r\n\t\t\t\t\t.build();\r\n\t\t\t\r\n\t\t\tfiles.add(file);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t// TODO: handle exception\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tList<File> savedFileList = fileRepository.save(files);\r\n\t\t\r\n\t\tfor(File savedFile : savedFileList) {\r\n\t\t\tsaveService.saveSave(savedFile, board);\r\n\t\t\tSystem.out.println(savedFile.getOriginalName());\r\n\t\t}\r\n\t}",
"@Test(expected = GenieBadRequestException.class)\n public void testPutFileMethodInvalidS3Path() throws GenieException {\n final String invalidS3Path = \"filepath\";\n try {\n s3FileTransfer.putFile(S3FileTransferImplUnitTests.LOCAL_PATH, invalidS3Path);\n } finally {\n Mockito.verify(this.uploadTimer, Mockito.times(1)).record(Mockito.anyLong(), Mockito.eq(TimeUnit.NANOSECONDS));\n Mockito.verify(this.registry, Mockito.times(1)).timer(Mockito.eq(UPLOAD_TIMER_NAME), this.tagsCaptor.capture());\n Assert.assertEquals(S3FileTransferImplUnitTests.FAILURE_TAGS, this.tagsCaptor.getValue());\n }\n }",
"@Test\n public void testFileUploadFromBodyWithMissingDuration() {\n DatasourceConfiguration datasourceConfiguration = createDatasourceConfiguration();\n ExecuteActionDTO executeActionDTO = new ExecuteActionDTO();\n AmazonS3Plugin.S3PluginExecutor pluginExecutor = new AmazonS3Plugin.S3PluginExecutor();\n\n ActionConfiguration actionConfiguration = new ActionConfiguration();\n\n Map<String, Object> configMap = new HashMap<>();\n setDataValueSafelyInFormData(configMap, BODY, \"{\\\"data\\\": \\\"\\\"}\");\n setDataValueSafelyInFormData(configMap, PATH, \"path\");\n setDataValueSafelyInFormData(configMap, COMMAND, \"UPLOAD_FILE_FROM_BODY\");\n setDataValueSafelyInFormData(configMap, BUCKET, \"bucket_name\");\n setDataValueSafelyInFormData(configMap, CREATE_DATATYPE, \"NO\");\n\n actionConfiguration.setFormData(configMap);\n\n AmazonS3 connection = pluginExecutor.datasourceCreate(datasourceConfiguration).block();\n Mono<ActionExecutionResult> resultMono = pluginExecutor.executeParameterized(\n connection,\n executeActionDTO,\n datasourceConfiguration,\n actionConfiguration);\n\n StepVerifier.create(resultMono)\n .assertNext(result -> {\n assertFalse(result.getIsExecutionSuccess());\n String message = (String) result.getBody();\n assertTrue(message.contains(\"The AWS Access Key Id you provided does not exist in \" +\n \"our records\"));\n assertEquals(AppsmithPluginError.PLUGIN_ERROR.getTitle(), result.getTitle());\n })\n .verifyComplete();\n }",
"public void upload(){\n put(\"Title\",title);\n put(\"Location\",location);\n put(\"DateMonth\", dateMonth);\n put(\"DateDay\", dateDay);\n put(\"DateYear\",dateYear);\n put(\"StartHour\",startHour);\n put(\"StartMinute\", startMinute);\n put(\"EndHour\", endHour);\n put(\"EndMinute\", endMinute);\n put(\"NumGoing\",numGoing);\n put(\"Description\",description);\n put(\"Category\",category);\n put(\"Author\", author);\n put(\"Contact\", contact);\n put(\"Attending\", attending);\n saveInBackground();\n }",
"@Test\n public final void testS3CollectionStorage(final TestContext aContext) {\n try {\n // Skip this test if we don't have a valid S3 configuration\n assumeTrue(LOGGER.getMessage(MessageCodes.MFS_065), isExecutable);\n } catch (final AssumptionViolatedException details) {\n LOGGER.warn(details.getMessage());\n throw details;\n }\n\n final Vertx vertx = myRunTestOnContextRule.vertx();\n final Async asyncTask = aContext.async();\n final Buffer manifestContent = vertx.fileSystem().readFileBlocking(MANIFEST_PATH);\n final JsonObject manifest = manifestContent.toJsonObject();\n final JsonObject message = new JsonObject();\n final DeliveryOptions options = new DeliveryOptions();\n\n // Create a fake manifest ID/URI with our collection key\n manifest.put(Constants.ID_V2, myCollectionUri.toString());\n\n LOGGER.debug(MessageCodes.MFS_130, manifest.getString(Constants.ID_V2));\n\n message.put(Constants.COLLECTION_NAME, myCollectionID).put(Constants.DATA, manifest);\n options.addHeader(Constants.ACTION, Op.PUT_COLLECTION);\n\n vertx.eventBus().request(S3BucketVerticle.class.getName(), message, options, send -> {\n if (send.succeeded()) {\n final String s3Object;\n\n // When we check the object though we use the key that's used when the object is PUT\n try {\n LOGGER.debug(MessageCodes.MFS_129, myCollectionS3Key);\n\n s3Object = myAmazonS3.getObjectAsString(myS3Bucket, myCollectionS3Key);\n aContext.assertEquals(manifest, new JsonObject(s3Object));\n } catch (final AmazonS3Exception details) {\n aContext.fail(details);\n }\n\n TestUtils.complete(asyncTask);\n } else {\n aContext.fail(send.cause());\n }\n });\n }",
"public static void main(String[] args) throws IOException {\n OSS client = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);\n\n\n// String objectName = \"community/c14deaec-7827-4fb1-bac9-eeba7a5ba59b.png\";\n//\n//// 创建OSSClient实例。\n// OSSClient ossClient = new OSSClient(endpoint, accessKeyId, accessKeySecret);\n//\n//// 删除文件。\n// ossClient.deleteObject(bucketName, objectName);\n//\n//// 关闭OSSClient。\n// ossClient.shutdown();\n\n try {\n /*\n * Batch put objects into the bucket\n */\n final String content = \"Thank you for using Aliyun Object Storage Service\";\n final String keyPrefix = \"MyObjectKey\";\n String objects = \"community/01378488-592b-443c-984f-4cbc12c8cd82.png\" +\n \",community/01394c05-3bc8-41ee-b47f-2caddfbf27f2.png\" +\n \",community/0139e96b-97a7-4270-9bad-3cc25c335184_1080x1430.png\" +\n \",community/013a938c-6486-4abb-bf96-aa5d066472cc.png\" +\n \",community/013b2de1-ef57-4204-92f8-9a2fdf1ab1c0.png\" +\n \",community/013cd7e5-ab1f-4058-a2b6-4e33c283c9b3.png\" +\n \",community/01426305-b2ef-430c-9cfe-8daf4e382b72.png\" +\n \",community/01426539-5fda-44b1-8aca-eb2c744b67ee_1080x1923.png\" +\n \",community/014c400c-e516-4c9e-adf8-a26b63729db5.png\" +\n \",community/014d3126-4b61-499e-b2a4-060d5c565ee3.png\" +\n \",community/014d4e83-9c56-4470-ae54-57387896139b.png\" +\n \",community/02038488-3867-475f-9c05-6e552ca4da70_1080x1439.png\" +\n \",community/0205bd60-49bf-412f-b04a-6c8c00b19f6c.png\" +\n \",community/02084b3b-7acb-4be0-a40c-a1245e805c85_1080x1448.png\" +\n \",community/02099953-c48c-4f22-ab5c-87449d449502_348x464.png\" +\n \",community/020d48bd-9745-4087-8ab5-7298f57a1f30_1080x1563.png\" +\n \",community/0212046c-3167-42a9-850c-788eed176526.png\" +\n \",community/0213caf3-0866-426e-8fea-797c8d533451.png\" +\n \",community/021480ff-4dcd-4b56-95e3-46a094baa742.png\" +\n \",community/01f015d8-1358-48da-bb37-07e270a27667.png\" +\n \",community/01f0a3ca-f0fa-41e5-8126-e0c5e4346d8e.png\" +\n \",community/01f0ed1c-9472-4002-b896-216c95dc214b_720x950.png\" +\n \",community/01f143c2-f8ba-4ee3-8fec-de9b0c106fd2.png\" +\n \",community/01f15f7d-6bee-41e1-9bc9-85409087f5bf.png\" +\n \",community/01f1742c-20b6-4f85-9847-2a4d85801165.png\" +\n \",community/01f32f3f-b0ce-4d9d-aef8-a75be07b655a.png\" +\n \",community/01f42d98-1994-4e3f-b025-d94a849a33a8.png\" +\n \",community/01f7c1e4-5b80-400d-8dd7-0df9a1c88601.png\" +\n \",community/01f8cd29-f527-43c6-a438-d3751663ec37.png\" +\n \",community/01fa914a-66cc-471e-af15-2bd10d34a45e_348x464.png\" +\n \",community/01fad182-2290-4b47-ab3c-ee10dff2fb86.png\" +\n \",community/0201c344-c893-4da6-a564-b4ef70ae38d6_1080x1749.png\" +\n \",community/01d7e8e6-0336-4d18-ae98-2cd2f407c46f.png\" +\n \",community/01d7ecfb-9feb-4db6-8d55-4c87cb050b4d.png\" +\n \",community/01d86f24-8589-4e60-b797-6b4b2f4330b5.png\" +\n \",community/01d96558-4bb2-4763-a7c4-ca2910f73ab1.png\" +\n \",community/01d9f15d-3555-4831-bc18-95cbe4634873_1440x2019.png\" +\n \",community/01daaccc-a3b5-4ef9-a5ce-57dfa803006b_315x420.png\" +\n \",community/01dbcbb8-dd5e-4911-8094-467ae90cf414.png\" +\n \",community/01de101b-e7f0-4d44-8a0c-6b6eb8e86e21.png\" +\n \",community/01e82423-a17b-439b-a804-5e6f898906b2.png\" +\n \",community/01be382c-4447-416c-8905-449a5d2f66a8.png\" +\n \",community/01bfb933-afd3-4529-944d-2e432731b6f8.png\" +\n \",community/01c07f89-8fab-481b-a497-ff5ea1013f5c_1080x1922.png\" +\n \",community/01c965cb-d991-4424-bdec-89634240dd51.png\" +\n \",community/01ca2e7c-f4be-40d7-a05a-7e20a02c14ac.png\" +\n \",community/01ca99ef-c34e-4a8f-a823-82c70eb96f81_720x1025.png\" +\n \",community/01d22b53-b451-4cbe-8555-0c6ea02eb255.png\" +\n \",community/01d40f28-dfdb-4972-869b-75e154817ba4.png\" +\n \",community/01d4d7a4-ffeb-4743-90b5-a4a7d5249d27_1080x1439.png\" +\n \",community/01a8cca4-eb88-4660-9404-ebb7f16d82a6_315x420.png\" +\n \",community/01aaa39a-a562-43de-97cd-d48c7fd28fdd.png\" +\n \",community/01b16c8c-14f3-4357-8c30-2638565141c9.png\" +\n \",community/01b1bc11-09fd-49b0-96ed-ed47e743faf0.png\" +\n \",community/01b35a88-e0c6-4221-8aa5-32d96069fbc3_348x464.png\" +\n \",community/01b634d1-8199-4915-aa47-947a0af5466b.png\" +\n \",community/01b841df-1bb4-44b3-af79-142c4834fd46.png\" +\n \",community/01b9660f-b57f-415c-a619-f10bd76cd860.png\" +\n \",community/01ba2a69-db78-4b4b-ad6b-31a2e715182f.png\" +\n \",community/0190b32e-60be-4a49-8cf7-e0d9ce039997.png\" +\n \",community/0191665a-67c0-4ed8-bf01-7b26f5ba1248_1080x1439.png\" +\n \",community/01972534-37fa-433e-ac22-bcceadd2a3fe.png\" +\n \",community/01981657-5340-4cf9-8c90-176c5d465173_348x464.png\" +\n \",community/019f7fdf-f8b0-4086-b2cc-9cd7d7e199b1.png\" +\n \",community/01a0bcc9-d351-4200-be1a-e9c8f322deb1.png\" +\n \",community/01a2a06d-0b31-419d-8d31-66d6e842b806.png\" +\n \",community/017dfb30-469e-401f-becb-e23c647059f1_315x420.png\" +\n \",community/01834f9a-0596-47e1-80b3-ccfd19d12127.png\" +\n \",community/01856873-80bf-4780-9ead-9968aedd8e15_1080x1563.png\" +\n \",community/0186d337-215d-478f-a657-4c0a04f6d028.png\" +\n \",community/0187db31-4c8f-4689-9f6e-500b5f39f6c3.png\" +\n \",community/018c8d90-35a3-4010-9ecc-c943e72a0745_1080x1657.png\" +\n \",community/018cb9ce-756a-4c23-8a7c-aeb85e393ec8.png\" +\n \",community/016a0bfc-3abf-46e9-b4ee-4b6c73562524.png\" +\n \",community/016be936-bca6-4827-bb7e-84b0c496b7e7_1080x1426.png\" +\n \",community/016c40f3-fb9b-49b7-ad93-bc84f4875d6c.png\" +\n \",community/016c51c6-e3dd-4903-962a-8f24c33e6547_348x464.png\" +\n \",community/016e417e-760b-4e3e-bc9b-7db6fe77d5a2_315x420.png\" +\n \",community/01731219-8bdf-4a10-9982-fe347622d877.png\" +\n \",community/0173e603-5a5f-4c2d-a3e7-f92c1b2fa50c.png\" +\n \",community/0177c179-402f-4ff7-8032-e6e4ae21431f.png\" +\n \",community/01785d9d-d5cc-4e38-b990-395ef92c13c0.png\" +\n \",community/0179b793-b92a-4926-ab88-04dd4f434b15.png\" +\n \",community/017afe9f-02d2-4004-ad9e-8afed066e99c.png\" +\n \",community/017b74df-8b8a-440a-9938-9c8b7e43bb8c_348x464.png\" +\n \",community/017d0cbb-e918-466b-a1e7-633d54c7d5b2.png\" +\n \",community/014e9713-3027-4040-b07a-9d6827e527c1_1080x1439.png\" +\n \",community/014eaafd-0702-47ff-87a1-c3cac9a1769a.png\" +\n \",community/0152e9e6-fcde-404e-9fb6-d75a5b265008.png\" +\n \",community/0154b399-ca4d-4c36-98d3-22aed2e28ed9.png\" +\n \",community/0154f316-3833-4c4b-a406-8f54c01ed121.png\" +\n \",community/01559349-89d4-4010-84da-9f3892f21b27.png\" +\n \",community/01575492-8b54-4729-9be5-ade62bb6be54.png\" +\n \",community/0157e449-b041-404c-b05c-442174c33ca1.png\" +\n \",community/015843a0-d566-42b4-b72c-b51901b4da65.png\" +\n \",community/015a1183-c580-4241-8e03-08b6b7e36703.png\" +\n \",community/015addf7-d725-4a32-bc14-12f6526bf1f6.png\" +\n \",community/015b6646-1359-4ca1-a5a1-914db80285f4.png\" +\n \",community/01641ba3-504f-4dfe-aa33-3e4a689eaa0b.png\" +\n \",community/0166b12a-9e1c-4b4e-a527-8f473faddb43_1080x1774.png\" +\n \",community/0167ec5d-b7c9-4d06-a2c8-819682546723_1080x1563.png\";\n String[] arr = objects.split(\",\");\n List<String> keys = Arrays.asList(arr);\n// for (int i = 0; i < 100; i++) {\n// String key = keyPrefix + i;\n// InputStream instream = new ByteArrayInputStream(content.getBytes());\n// client.putObject(bucketName, key, instream);\n// System.out.println(\"Succeed to put object \" + key);\n// keys.add(key);\n// }\n System.out.println();\n\n /*\n * Delete all objects uploaded recently under the bucket\n */\n System.out.println(\"\\nDeleting all objects:\");\n DeleteObjectsResult deleteObjectsResult = client.deleteObjects(\n new DeleteObjectsRequest(bucketName).withKeys(keys));\n List<String> deletedObjects = deleteObjectsResult.getDeletedObjects();\n for (String object : deletedObjects) {\n System.out.println(\"\\t\" + object);\n }\n System.out.println();\n\n } catch (OSSException oe) {\n System.out.println(\"Caught an OSSException, which means your request made it to OSS, \"\n + \"but was rejected with an error response for some reason.\");\n System.out.println(\"Error Message: \" + oe.getErrorCode());\n System.out.println(\"Error Code: \" + oe.getErrorCode());\n System.out.println(\"Request ID: \" + oe.getRequestId());\n System.out.println(\"Host ID: \" + oe.getHostId());\n } catch (ClientException ce) {\n System.out.println(\"Caught an ClientException, which means the client encountered \"\n + \"a serious internal problem while trying to communicate with OSS, \"\n + \"such as not being able to access the network.\");\n System.out.println(\"Error Message: \" + ce.getMessage());\n } finally {\n /*\n * Do not forget to shut down the client finally to release all allocated resources.\n */\n client.shutdown();\n }\n }",
"public void submit() {\n fileUploadContainer.upload.submit();\n }",
"public interface S3Handler extends S3ObjectStreaming {\n\n /**\n * Called after a new instance has been created.\n * <p>\n * <i>IMPORTANT</i>: Your S3Handler must use this class, the S3HandlerService will call it.\n *\n * @param desc\n * @throws NuxeoException\n * @since 8.2\n */\n public void initialize(S3HandlerDescriptor desc) throws NuxeoException;\n\n /**\n * Called when the S3Handler is removed. Notice that this should not happen very often. Most of the time, if not\n * every time, S3HandlerService creates and initializes the contributed handles at startup and releases them when\n * the server is shut down.\n *\n * @since 8.2\n */\n public void cleanup();\n\n /**\n * The handler uses the bucket as set in the S3HandlerDescriptor at initialization time. But this can be modified\n * dynamically.\n * <p>\n * Notice that an easy way to handle different buckets on the same S3 instance is to contribute different S3Handler\n * in the XML. This way, there is no need to switch buckets, just use the correct handler.\n *\n * @param inBucket\n * @since 8.2\n */\n public void setBucket(String inBucket);\n\n /**\n * @return the AmazonS3 instance created for this handler\n * @since 8.2\n */\n public AmazonS3 getS3();\n\n /**\n * Uploads inFile to S3, using the \"Current bucket\"\n *\n * @param inKey\n * @param inFile\n * @return true if the file could be uploaded with no error\n * @throws NuxeoException\n * @since 8.2\n */\n public boolean sendFile(String inKey, File inFile) throws NuxeoException;\n\n /**\n * Downloads the file from S3 using the \"current bucket\", saving it to inDestFile\n * <p>\n * <code>fileName</code> should be optional (not required by the interface)\n *\n * @param inKey\n * @param inDestFile\n * @return a Blob of the downloaded file\n * @throws NuxeoException\n * @since 8.2\n */\n public Blob downloadFile(String inKey, File inDestFile);\n\n /**\n * Downloads the file from S3 using the \"current bucket\". Should return\n * a temporary blob (becomes permanent if stored in a document)\n *\n * @param inKey\n * @param inFileName\n * @return a Blob of the downloaded file\n * @throws NuxeoException\n * @since 8.2\n */\n public Blob downloadFile(String inKey, String inFileName);\n\n /**\n * Get a SequenceInputStream to the object. The goal of using a SequenceInputStream is to avoid time out while\n * reading large, big objects.\n * <br>\n * pieceSize is the size in bytes for each sequential stream. It set the number of streams created (object size /\n * pieceSize). If 0, a default value is used.\n * Streams are open/close one after the other.\n * <br>\n * The caller can call close() any time, this will close all the streams.\n * <br>\n * See S3ObjectSequentialStream for more info.\n * \n * @param key\n * @param pieceSize\n * @return the SequenceInputStream\n * @throws IOException\n * @since 2021.35\n */\n public static long DEFAULT_PIECE_SIZE = 100 * 1024 * 1024;\n\n /**\n * @see S3ObjectStreaming#getSequenceInputStream(String, long)\n */\n public SequenceInputStream getSequenceInputStream(String key, long pieceSize) throws IOException;\n\n /**\n * @see S3ObjectStreaming#readBytes(String, long, long)\n */\n public byte[] readBytes(String key, long start, long len) throws IOException;\n\n /**\n * Deletes the file from S3 using the \"current bucket\", returns true if succesful\n *\n * @param inKey\n * @return\n * @throws NuxeoException\n * @since 8.2\n */\n public boolean deleteFile(String inKey) throws NuxeoException;\n\n /**\n * Builds a temporary signed URL for the object and returns it.\n * <p>\n * Uses the \"current bucket\"\n * <p>\n * If <code>durationInSeconds</code> is <= 0, the duration set in the XML configuration is used (or the default\n * duration)\n * <p>\n * The interface allows <code>contentType</code> and <code>contentDisposition</code> to be empty. But it is\n * recommended to set them to make sure the is no ambiguity when the URL is used (a key without a file extension for\n * example)\n *\n * @param objectKey\n * @param durationInSeconds\n * @param contentType\n * @param contentDisposition\n * @return the URL to the file on S3\n * @throws NuxeoException\n * @since 8.2\n */\n public String buildPresignedUrl(String inKey, int durationInSeconds, String contentType, String contentDisposition)\n throws NuxeoException;\n\n /**\n * Builds a temporary signed URL for the object and returns it.\n * <p>\n * Uses <code>inBucket</code>. If it is empty, uses the \"current bucket\"\n * <p>\n * If <code>durationInSeconds</code> is <= 0, the duration set in the XML configuration is used (or the default\n * duration)\n * <p>\n * The interface allows <code>contentType</code> and <code>contentDisposition</code> to be empty. But it is\n * recommended to set them to make sure the is no ambiguity when the URL is used (a key without a file extension for\n * example)\n *\n * @param inBucket\n * @param inKey\n * @param durationInSeconds\n * @param contentType\n * @param contentDisposition\n * @return the URL to the file on S3\n * @throws NuxeoException\n * @since 8.2\n */\n public String buildPresignedUrl(String inBucket, String inKey, int durationInSeconds, String contentType,\n String contentDisposition) throws NuxeoException;\n\n /**\n * Returns true if the key exists in the current bucket.\n * <p>\n * <b>IMPORTANT</b>: This method should <i>never</i> uses a CacheForKeyExists, and always requests the key on S3\n *\n * @param inBucket\n * @param inKey\n * @return true if the key exists in the \"current bucket\"\n * @since 8.2\n */\n public boolean existsKeyInS3(String inBucket, String inKey);\n\n /**\n * Returns true if the key exists in the bucket.\n * <p>\n * <b>IMPORTANT</b>: This method should <i>never</i> uses a CacheForKeyExists, and always requests the key on S3\n *\n * @param inKey\n * @return true if the key exists in the bucket\n * @since 8.2\n */\n public boolean existsKeyInS3(String inKey);\n\n /**\n * Returns true if the key exists on S3 (using the \"current bucket\"), and should first check in the\n * CacheForExistsKey (if the configuration allows usage of the cache)\n *\n * @param inKey\n * @return true is the key exists on S3. May use the cache\n * @since 8.2\n */\n public boolean existsKey(String inKey);\n\n /**\n * Returns true if the key exists on S3, in the bucket, and should first check in the CacheForExistsKey (if the\n * Configuration allows usage of the cache)\n *\n * @param bucket\n * @param inKey\n * @return\n * @since 8.2\n */\n public boolean existsKey(String bucket, String inKey);\n\n /**\n * Gets the object metadata without fetching the object itself,\n * as returned by AWS SDK\n * \n * @param inKey\n * @return\n * @since TODO\n */\n public ObjectMetadata getObjectMetadata(String inKey);\n\n /**\n * Gets the object metadata without fetching the object itself.\n * Values returned are whatever is stored as system metadata,\n * such as \"Content-Type\", \"Content-Length\", \"ETag\", ...\n * _plus_ the following properties:\n * <ul>\n * <li>\"bucket\": the bucket name (same as the one defined for the S3Handler)</li>\n * <li>\"objectKey\": the object key (same as the inKey parameter)</li>\n * <li>\"userMetadata\": An object holding the user metadata ({} if no user metadata). All values are String.</li>\n * </ul>\n * If AWS returns a \"not found\" error, the method returns null and adds a WARN to the log. Any other error is thrown\n * \n * @param inKey\n * @return a JsonNode of all the metadata, including userMetadata\n * @throws JsonProcessingException\n * @since 2.0\n */\n public JsonNode getObjectMetadataJson(String inKey) throws JsonProcessingException;\n\n /**\n * Return the current bucket\n *\n * @return the current bucket\n * @since 8.2\n */\n public String getBucket();\n\n /**\n * returns the default duration used to build temp. signed URLs\n *\n * @return the default duration used to build temp. signed URLs\n * @since 8.2\n */\n public int getSignedUrlDuration();\n\n /**\n * Just a convenient method, saving one line of code (getting the service)\n *\n * @param name\n * @return the S3Handler contributed with this name, null if not found\n * @since 8.2\n */\n public static S3Handler getS3Handler(String name) {\n\n S3HandlerService s3HandlerService = Framework.getService(S3HandlerService.class);\n\n if (StringUtils.isBlank(name)) {\n name = Constants.DEFAULT_HANDLER_NAME;\n }\n\n return s3HandlerService.getS3Handler(name);\n\n }\n\n /**\n * Generic method used to build a message when an error is thrown by AWS\n *\n * @param e\n * @return a string describing the error\n * @since 8.2\n */\n public static String buildDetailedMessageFromAWSException(Exception e) {\n\n String message = \"\";\n\n if (e instanceof AmazonServiceException) {\n AmazonServiceException ase = (AmazonServiceException) e;\n message = \"Caught an AmazonServiceException, which \" + \"means your request made it \"\n + \"to Amazon S3, but was rejected with an error response\" + \" for some reason.\";\n message += \"\\nError Message: \" + ase.getMessage();\n message += \"\\nHTTP Status Code: \" + ase.getStatusCode();\n message += \"\\nAWS Error Code: \" + ase.getErrorCode();\n message += \"\\nError Type: \" + ase.getErrorType();\n message += \"\\nRequest ID: \" + ase.getRequestId();\n\n } else if (e instanceof AmazonClientException) {\n AmazonClientException ace = (AmazonClientException) e;\n message = \"Caught an AmazonClientException, which \" + \"means the client encountered \"\n + \"an internal error while trying to \" + \"communicate with S3, \"\n + \"such as not being able to access the network.\";\n message += \"\\nError Message: \" + ace.getMessage();\n\n } else {\n message = e.getMessage();\n }\n\n return message;\n }\n\n /**\n * Generic helper telling the caller if an error catched is a \"Missing Key on S3\" error\n *\n * @param e\n * @return true if the error is \"MIssing Key\" error\n * @since 8.2\n */\n public static boolean errorIsMissingKey(AmazonClientException e) {\n if (e instanceof AmazonServiceException) {\n AmazonServiceException ase = (AmazonServiceException) e;\n return (ase.getStatusCode() == 404) || \"NoSuchKey\".equals(ase.getErrorCode())\n || \"Not Found\".equals(e.getMessage());\n }\n return false;\n }\n\n}",
"@Test\n\tpublic void testGetAndDeleteUploads() throws Exception {\n\t\tList<UploadInfo> uploadInfos = this.storage.listUploads(bucket);\n\n\t\tfor (UploadInfo uploadInfo : uploadInfos) {\n\t\t\tSystem.out.println(uploadInfo.toString());\n\n\t\t\t// delete incomplete upload\n\t\t\tthis.storage.deleteUpload(bucket + uploadInfo.path, uploadInfo.uploadId);\n\t\t}\n\t}",
"public static String upload(String url, Map<String, String> formParameters, Vector<File> files) {\n\t\tString result = null;\n\t\tint bufferSize = 1024;\n\t\tHttpURLConnection httpURLConnection = null;\n\t\tFileInputStream fileInputStream = null;\n\t\tDataOutputStream dataOutputStream = null;\n\t\tBufferedInputStream inputStream = null;\n\t\tByteArrayOutputStream outputStream = null;\n\t\tString contentEncoding;\n\t\tbyte[] buffer = new byte[bufferSize];\n\t\tint index = 0;\n\t\tint readBytes = 0;\n\t\ttry {\n\t\t\thttpURLConnection = (HttpURLConnection) (new URL(url).openConnection());\n\t\t\thttpURLConnection.setConnectTimeout(Constant.CONNECT_TIMEOUT);\n\t\t\thttpURLConnection.setDoInput(true);\n\t\t\thttpURLConnection.setDoOutput(true);\n\t\t\thttpURLConnection.setUseCaches(false);\n\t\t\thttpURLConnection.setRequestMethod(\"POST\");\n\t\t\thttpURLConnection.setRequestProperty(\"Connection\", \"Keep-Alive\");\n\t\t\thttpURLConnection.setRequestProperty(\"Charset\", Constant.ENCODING);\n\t\t\thttpURLConnection.setRequestProperty(\"Content-Type\", new StringBuilder(\"multipart/form-data;boundary=\")\n\t\t\t\t\t.append(Constant.BOUNDARY).toString());\n\t\t\tif (cookie != null) {\n\t\t\t\thttpURLConnection.setRequestProperty(\"Cookie\", cookie);\n\t\t\t}\n\t\t\tdataOutputStream = new DataOutputStream(httpURLConnection.getOutputStream());\n\t\t\t// add form parameter\n\t\t\tif (formParameters != null) {\n\t\t\t\tfor (Map.Entry<String, String> entry : formParameters.entrySet()) {\n\t\t\t\t\tdataOutputStream.writeBytes(new StringBuilder(Constant.TWO_HYPHEN).append(Constant.BOUNDARY)\n\t\t\t\t\t\t\t.append(Constant.CR_LF).toString());\n\t\t\t\t\tdataOutputStream.writeBytes(new StringBuilder(\"Content-Disposition: form-data; name=\\\"\")\n\t\t\t\t\t\t\t.append(String.valueOf(entry.getKey())).append(\"\\\"\").append(Constant.CR_LF).toString());\n\t\t\t\t\tdataOutputStream.writeBytes(Constant.CR_LF);\n\t\t\t\t\tbuffer = String.valueOf(entry.getValue()).getBytes(Constant.ENCODING);\n\t\t\t\t\tdataOutputStream.write(buffer, 0, buffer.length);\n\t\t\t\t\tdataOutputStream.writeBytes(Constant.CR_LF);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// add file\n\t\t\tfor (File file : files) {\n\t\t\t\tif (!file.exists()) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t++index;\n\t\t\t\tdataOutputStream.writeBytes(new StringBuilder(Constant.TWO_HYPHEN).append(Constant.BOUNDARY)\n\t\t\t\t\t\t.append(Constant.CR_LF).toString());\n\t\t\t\tdataOutputStream.writeBytes(new StringBuilder(\"Content-Disposition: form-data; name=\\\"file\")\n\t\t\t\t\t\t.append(index).append(\"\\\";filename=\\\"\").append(file.getName()).append(\"\\\"\")\n\t\t\t\t\t\t.append(Constant.CR_LF).toString());\n\t\t\t\tdataOutputStream.writeBytes(new StringBuilder(\"Content-Type: application/octet-stream\").append(\n\t\t\t\t\t\tConstant.CR_LF).toString());\n\t\t\t\tdataOutputStream.writeBytes(Constant.CR_LF);\n\t\t\t\tfileInputStream = new FileInputStream(file);\n\t\t\t\tbuffer = new byte[bufferSize];\n\t\t\t\twhile ((readBytes = fileInputStream.read(buffer)) > 0) {\n\t\t\t\t\tdataOutputStream.write(buffer, 0, readBytes);\n\t\t\t\t}\n\t\t\t\tdataOutputStream.writeBytes(Constant.CR_LF);\n\t\t\t\tfileInputStream.close();\n\t\t\t}\n\t\t\tdataOutputStream.writeBytes(new StringBuilder(Constant.TWO_HYPHEN).append(Constant.BOUNDARY)\n\t\t\t\t\t.append(Constant.TWO_HYPHEN).append(Constant.CR_LF).toString());\n\t\t\tdataOutputStream.flush();\n\t\t\t// get response\n\t\t\tgetCookie(httpURLConnection);\n\t\t\toutputStream = new ByteArrayOutputStream();\n\t\t\tif (httpURLConnection.getResponseCode() == HttpURLConnection.HTTP_OK) {\n\t\t\t\tinputStream = new BufferedInputStream(httpURLConnection.getInputStream());\n\t\t\t\twhile ((readBytes = inputStream.read(buffer)) > 0) {\n\t\t\t\t\toutputStream.write(buffer, 0, readBytes);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcontentEncoding = httpURLConnection.getContentEncoding();\n\t\t\tif (contentEncoding == null || contentEncoding.trim().endsWith(\"\")) {\n\t\t\t\tcontentEncoding = Constant.ENCODING;\n\t\t\t}\n\t\t\tresult = new String(outputStream.toByteArray(), contentEncoding);\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tLog.e(TAG, ex.getMessage(), ex);\n\t\t}\n\t\tfinally {\n\t\t\tif (inputStream != null) {\n\t\t\t\ttry {\n\t\t\t\t\tinputStream.close();\n\t\t\t\t}\n\t\t\t\tcatch (Exception ex) {}\n\t\t\t}\n\t\t\tif (outputStream != null) {\n\t\t\t\ttry {\n\t\t\t\t\toutputStream.close();\n\t\t\t\t}\n\t\t\t\tcatch (Exception ex) {}\n\t\t\t}\n\t\t\tif (fileInputStream != null) {\n\t\t\t\ttry {\n\t\t\t\t\tfileInputStream.close();\n\t\t\t\t}\n\t\t\t\tcatch (Exception ex) {}\n\t\t\t}\n\t\t\tif (dataOutputStream != null) {\n\t\t\t\ttry {\n\t\t\t\t\tdataOutputStream.close();\n\t\t\t\t}\n\t\t\t\tcatch (Exception ex) {}\n\t\t\t}\n\t\t\tif (httpURLConnection != null) {\n\t\t\t\ttry {\n\t\t\t\t\thttpURLConnection.disconnect();\n\t\t\t\t}\n\t\t\t\tcatch (Exception ex) {}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"@Autowired // Indicates to Spring that this is using dependency injection.\n public FileStore(AmazonS3 s3) {\n this.s3 = s3;\n }",
"@PostMapping(\"/tasks/{id}/images\")\n public RedirectView addImages(@PathVariable UUID id, @RequestParam(value=\"file\")MultipartFile file){\n Task selectedTask = taskRepository.findById(id).get();\n List<String> pic = this.s3Client.uploadFile(file);\n //saving images and thumbImg\n selectedTask.setImages(pic.get(0));\n selectedTask.setThumbImg(pic.get(1));\n\n taskRepository.save(selectedTask);\n return new RedirectView(\"http://taskmaster1.s3-website-us-west-2.amazonaws.com/\");\n }",
"@Test\n public void testInvalidS3Keys() throws GenieException {\n final String[] invalidKeys = new String[]{ \"\", \" \", \"k[ey\" };\n for (final String invalidKey : invalidKeys) {\n final String path = \"s3://bucket/\" + invalidKey;\n Assert.assertFalse((\"Passed validation: \" + path), this.s3FileTransfer.isValid(path));\n boolean genieException = false;\n try {\n this.s3FileTransfer.getS3Uri(path);\n } catch (GenieBadRequestException e) {\n genieException = true;\n } finally {\n Assert.assertTrue((\"Parsed without error: \" + path), genieException);\n }\n }\n }",
"@Test\n public void testImportWithMultipleFiles() throws Exception {\n\n deleteBucket();\n\n try {\n\n String targetAppName = \"import-test-target-\" + RandomStringUtils.randomAlphanumeric(10);\n UUID targetAppId = setup.getMgmtSvc().createApplication(organization.getUuid(), targetAppName).getId();\n\n // create 4 applications each with collection of 10 things, export all to S3\n logger.debug(\"\\n\\nCreating 10 applications with 10 entities each\\n\");\n\n for (int i = 0; i < 10; i++) {\n\n String appName = \"import-test-\" + i + RandomStringUtils.randomAlphanumeric(10);\n UUID appId = setup.getMgmtSvc().createApplication(organization.getUuid(), appName).getId();\n EntityManager emApp = setup.getEmf().getEntityManager(appId);\n\n Map<UUID, Entity> thingsMap = new HashMap<>();\n List<Entity> things = new ArrayList<>();\n createTestEntities(emApp, thingsMap, things, \"thing\");\n\n exportCollection(emApp, \"things\");\n }\n\n // import all those exports from S3 into the default test application\n logger.debug(\"\\n\\nImporting\\n\");\n\n final EntityManager emDefaultApp = setup.getEmf().getEntityManager(targetAppId);\n importCollections(emDefaultApp);\n\n // we should now have 100 Entities in the default app\n\n logger.debug(\"\\n\\nQuery to see if we now have 100 entities\\n\");\n\n Query query = Query.fromQL(\"select *\").withLimit(101);\n\n List<Entity> importedThings = emDefaultApp.getCollection(\n emDefaultApp.getApplicationId(), \"things\", query, Level.ALL_PROPERTIES).getEntities();\n\n assertNotNull(\"importedThings must not be null\", !importedThings.isEmpty());\n assertTrue(\"importedThings must not be empty\", !importedThings.isEmpty());\n assertEquals(\"there must be 100 importedThings\", 100, importedThings.size());\n\n } finally {\n deleteBucket();\n }\n }",
"private static List<GdalS3DataRequest> requestList(String bucketName) \n throws AmazonServiceException, AmazonClientException{\n\n List<GdalS3DataRequest> res = new ArrayList<GdalS3DataRequest>();\n\n AmazonS3 s3Client = new AmazonS3Client(new EnvironmentVariableCredentialsProvider());\n ListObjectsV2Request req = new ListObjectsV2Request().withBucketName(bucketName);\n ListObjectsV2Result result;\n\n do {\n result = s3Client.listObjectsV2(req);\n result.setMaxKeys(20);\n for (S3ObjectSummary objectSummary: result.getObjectSummaries()) {\n GdalS3DataRequest dr = new GdalS3DataRequest(bucketName, \n objectSummary.getKey());\n res.add(dr);\n }\n } while (result.isTruncated() == true);\n\n //return res.subList(0,10); //for testing and cost reduction during dev\n return res;\n }",
"public void pictureUpload(List<Uri> pictures, Uri licensePlate) {\n\n int uploads=0;\n //for loop foreach picture\n for (uploads=0; uploads < pictures.size() && uploads < Violation.MAX_NUM_PICTURES; uploads++){\n //get the uri\n Uri img = pictures.get(uploads);\n //reference to firebase storage\n final StorageReference imagename = imageFolder.child(img.getLastPathSegment());\n //upload the picture\n imagename.putFile(img).addOnSuccessListener(this, new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Log.d(TAG_INFO,\"uploaded\");\n }\n });\n }\n\n //upload the license plate picture\n final StorageReference imagename = imageFolder.child(licensePlate.getLastPathSegment());\n imagename.putFile(licensePlate).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n\n Log.d(TAG_INFO,\"uploaded\");\n } });\n }",
"Path fileToUpload();",
"private static void uploadTSVFiles(String sessionID, File[] annotatedTSVFiles, String tableName, String tableNameSub, File workingDir) throws SQLException, IOException, SessionExpiredException {\n for (File f : annotatedTSVFiles) {\n LOG.info(\"Uploading \" + f.getAbsolutePath() + \"...\");\n VariantManagerUtils.uploadTSVFileToVariantTable(sessionID, f, tableName);\n }\n\n //create sub table dump from the complete table\n LOG.info(\"Dumping variants to file for sub table\");\n File subDump = new File(workingDir, tableName + \"sub.tsv\");\n VariantManagerUtils.variantTableToTSVFile(sessionID, tableName, subDump, null, true, VariantManagerUtils.determineStepForSubset(VariantManager.getInstance().getNumFilteredVariantsHelper(sessionID, tableName, new Condition[][]{})));\n\n //upload to sub table\n LOG.info(\"Loading into subset table: \" + tableNameSub);\n VariantManagerUtils.uploadTSVFileToVariantTable(sessionID, subDump, tableNameSub);\n }",
"public PictureResult upload(byte[] fileBytes,String extName,String orignalName) throws Exception;",
"public String putObject(InputStream in, String fileName, String id)\n {\n File f;\n MimetypesFileTypeMap mimetypesFileTypeMap = new MimetypesFileTypeMap();\n try\n {\n logger.info(\"run in the putObject1 try block\");\n ObjectMetadata ObjectMetadata = new ObjectMetadata();\n Map<String, String> userMetadata = new HashMap<String, String>();\n userMetadata.put(\"Name\", fileName);\n f = new File(fileName);\n userMetadata.put(\"Content-Type\", mimetypesFileTypeMap.getContentType(f));\n String keyName = CommonUtil.getKeyName(bucketName, id, fileName);\n userMetadata.put(\"key_name\", keyName);\n userMetadata.put(\"user\", id);\n ObjectMetadata.setUserMetadata(userMetadata);\n s3.putObject(bucketName, keyName, in, ObjectMetadata);\n return keyName;\n }\n catch (SdkClientException e)\n {\n logger.error(e.getMessage());\n return null;\n }\n }",
"void putFile(String filename, byte[] file) throws FileAlreadyExistsException;",
"public boolean UploadDocuments (ClsNodeDocument[] docs, String transID, String status, String dataFlow, String submitURL, String token, Date submitted, Timestamp submittedTS, String user);",
"@Test\n public void testInvalidS3Buckets() throws GenieException {\n final String[] invalidBuckets = // \"buc..ket\", // Invalid, but current logic does not catch this\n new String[]{ \"\", \" \", \"buc ket\", \"buc[ket\", \"/\" }// \"buc..ket\", // Invalid, but current logic does not catch this\n ;\n for (final String invalidBucket : invalidBuckets) {\n final String path = (\"s3://\" + invalidBucket) + \"/key\";\n Assert.assertFalse((\"Passed validation: \" + path), this.s3FileTransfer.isValid(path));\n boolean genieException = false;\n try {\n this.s3FileTransfer.getS3Uri(path);\n } catch (final GenieBadRequestException e) {\n genieException = true;\n } finally {\n Assert.assertTrue((\"Parsed without error: \" + path), genieException);\n }\n }\n }",
"public void uploadFile() {\n \n InputStream input = null;\n try {\n input = file.getInputStream();\n System.out.println(\"chay qua inpustream\");\n String itemName = file.getSubmittedFileName();\n String filename = itemName.substring(\n itemName.lastIndexOf(\"\\\\\") + 1);\n String dirPath = FacesContext.getCurrentInstance().getExternalContext().getRealPath(\"/upload/images\");\n fileNamed = \"/upload/images/\"+filename;\n File f = new File(dirPath + \"\\\\\" + filename);\n if (!f.exists()) {\n f.createNewFile();\n }\n FileOutputStream output = new FileOutputStream(f);\n byte[] buffer = new byte[1024];\n int length;\n while ((length = input.read(buffer)) > 0) {\n output.write(buffer, 0, length);\n }\n // resize(dirPath + \"\\\\\" + filename, dirPath + \"\\\\\" + filename, 200, 200);\n input.close();\n output.close();\n } catch (IOException ex) {\n System.out.println(\"loi io\");\n Logger.getLogger(ArtistsManagedBean.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }",
"public interface ApiService {\n String BASE_URL = \"http://robika.ir/ultitled/practice/sujeyab/test_multi_upload/\";\n\n @Multipart\n @POST(\"upload.php\")\n Call<ResponseBody> uploadMultiple(\n @Part(\"id_ferestande\") RequestBody id_ferestande,\n @Part(\"onvan\") RequestBody onvan,\n @Part(\"mozo\") RequestBody mozo,\n @Part(\"tozihat\") RequestBody tozihat,\n @Part(\"type\") RequestBody type,\n @Part(\"shenase_rahgiri\") RequestBody shenase_rahgiri,\n @Part(\"id_farakhan\") RequestBody id_farakhan,\n @Part(\"size\") RequestBody size,\n @Part List<MultipartBody.Part> files);\n}"
]
| [
"0.68929493",
"0.6562413",
"0.6423676",
"0.64081854",
"0.6163465",
"0.6144629",
"0.60927224",
"0.60516447",
"0.60450953",
"0.5846973",
"0.58461344",
"0.58410084",
"0.58089256",
"0.57788444",
"0.5778467",
"0.57706517",
"0.56046164",
"0.55965173",
"0.55279666",
"0.54816103",
"0.54628813",
"0.5460465",
"0.5431776",
"0.54313207",
"0.542024",
"0.5366327",
"0.5326447",
"0.53179467",
"0.5304458",
"0.52993214",
"0.5290036",
"0.5288",
"0.5287225",
"0.52857125",
"0.52562624",
"0.52493846",
"0.52400064",
"0.5237129",
"0.52344",
"0.5233288",
"0.5221244",
"0.52177656",
"0.52158356",
"0.5214132",
"0.5214115",
"0.5205263",
"0.5204435",
"0.51978314",
"0.5195081",
"0.519331",
"0.5097943",
"0.5095469",
"0.5081984",
"0.50816476",
"0.5048661",
"0.5003822",
"0.4999858",
"0.4997305",
"0.49957463",
"0.4983699",
"0.49834964",
"0.4968691",
"0.49656022",
"0.49646738",
"0.49610612",
"0.4953761",
"0.4952094",
"0.49516097",
"0.4945768",
"0.49401605",
"0.49348",
"0.49177918",
"0.49074516",
"0.4902904",
"0.48845732",
"0.48814678",
"0.4865522",
"0.48576903",
"0.48505723",
"0.48493224",
"0.48432407",
"0.48399094",
"0.48345217",
"0.4826475",
"0.48258117",
"0.4820276",
"0.48126292",
"0.4808685",
"0.4801616",
"0.4787227",
"0.4784501",
"0.47719052",
"0.476018",
"0.4759244",
"0.47592336",
"0.47546118",
"0.47398722",
"0.47395977",
"0.47208828",
"0.4712243"
]
| 0.6338094 | 4 |
Converts a multipartfile into an input stream for s3 and uploads to s3. Also forms the minimum amount of metadata for the s3 object. | public PutObjectResult upload(MultipartFile multipartFile, String uploadKey) throws IOException {
InputStream inputStream = multipartFile.getInputStream();
ObjectMetadata metadata = new ObjectMetadata();
metadata.setContentLength(multipartFile.getSize());
metadata.setContentType(multipartFile.getContentType());
return upload(inputStream, uploadKey, metadata);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void multipartUpload(File file, String bucketName) throws IOException {\r\n\t\tlong size = file.length();\r\n\t\ts3 = S3Client.builder().region(region).build();\r\n\t\t// First create a multipart upload and get upload id\r\n\t\tCreateMultipartUploadRequest createMultipartUploadRequest = CreateMultipartUploadRequest.builder()\r\n\t\t\t\t.bucket(bucketName).key(file.getName()).build();\r\n\t\tCreateMultipartUploadResponse response = s3.createMultipartUpload(createMultipartUploadRequest);\r\n\t\tString uploadId = response.uploadId();\r\n\t\tSystem.out.println(uploadId);\r\n\r\n\t\tUploadPartRequest uploadPartRequest1 = UploadPartRequest.builder().bucket(bucketName).key(file.getName())\r\n\t\t\t\t.uploadId(uploadId).partNumber(1).build();\r\n\t\tString etag1 = s3\r\n\t\t\t\t.uploadPart(uploadPartRequest1, RequestBody.fromInputStream(new FileInputStream(file), size / 2))\r\n\t\t\t\t.eTag();\r\n\t\tCompletedPart part1 = CompletedPart.builder().partNumber(1).eTag(etag1).build();\r\n\r\n\t\tUploadPartRequest uploadPartRequest2 = UploadPartRequest.builder().bucket(bucketName).key(file.getName())\r\n\t\t\t\t.uploadId(uploadId).partNumber(2).build();\r\n\t\tString etag2 = s3\r\n\t\t\t\t.uploadPart(uploadPartRequest2, RequestBody.fromInputStream(new FileInputStream(file), size / 2))\r\n\t\t\t\t.eTag();\r\n\t\tCompletedPart part2 = CompletedPart.builder().partNumber(2).eTag(etag2).build();\r\n\r\n\t\t// Finally call completeMultipartUpload operation to tell S3 to merge all\r\n\t\t// uploaded\r\n\t\t// parts and finish the multipart operation.\r\n\t\tCompletedMultipartUpload completedMultipartUpload = CompletedMultipartUpload.builder().parts(part1, part2)\r\n\t\t\t\t.build();\r\n\t\tCompleteMultipartUploadRequest completeMultipartUploadRequest = CompleteMultipartUploadRequest.builder()\r\n\t\t\t\t.bucket(bucketName).key(file.getName()).uploadId(uploadId).multipartUpload(completedMultipartUpload)\r\n\t\t\t\t.build();\r\n\t\ts3.completeMultipartUpload(completeMultipartUploadRequest);\r\n\t}",
"public PutObjectResult upload(InputStream inputStream, String uploadKey, ObjectMetadata metadata) {\n PutObjectRequest putObjectRequest = new PutObjectRequest(bucketName, uploadKey, inputStream, metadata);\n\n putObjectRequest.setCannedAcl(CannedAccessControlList.PublicRead);\n\n PutObjectResult putObjectResult = s3Client.putObject(putObjectRequest);\n\n IOUtils.closeQuietly(inputStream);\n\n return putObjectResult;\n }",
"List<String> uploadMultipleFilesFromBody(AmazonS3 connection,\n String bucketName,\n String path,\n String body,\n Boolean usingFilePicker,\n Date expiryDateTime)\n throws InterruptedException, AppsmithPluginException {\n\n\n List<MultipartFormDataDTO> multipartFormDataDTOs;\n try {\n multipartFormDataDTOs = Arrays.asList(objectMapper.readValue(\n body,\n MultipartFormDataDTO[].class));\n } catch (IOException e) {\n throw new AppsmithPluginException(\n AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,\n \"Unable to parse content. Expected to receive an object with `data` and `type`\"\n );\n }\n\n ArrayList<String> listOfFiles = new ArrayList<>();\n multipartFormDataDTOs.forEach(multipartFormDataDTO -> {\n final String filePath = path + multipartFormDataDTO.getName();\n byte[] payload;\n if (Boolean.TRUE.equals(usingFilePicker)) {\n\n String encodedPayload = (String) multipartFormDataDTO.getData();\n /*\n * - For files uploaded using Filepicker.xyz.base64, body format is \"<content-type>;base64,<actual-\n * base64-encoded-payload>\".\n * - Strip off the redundant part in the beginning to get actual payload.\n */\n if (encodedPayload.contains(BASE64_DELIMITER)) {\n List<String> bodyArrayList = Arrays.asList(encodedPayload.split(BASE64_DELIMITER));\n encodedPayload = bodyArrayList.get(bodyArrayList.size() - 1);\n }\n\n try {\n payload = Base64.getDecoder().decode(encodedPayload);\n } catch (IllegalArgumentException e) {\n throw new AppsmithPluginException(\n AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,\n \"File content is not base64 encoded. File content needs to be base64 encoded when the \" +\n \"'File Data Type: Base64/Text' field is selected 'Yes'.\"\n );\n }\n } else {\n payload = ((String) multipartFormDataDTO.getData()).getBytes();\n }\n\n InputStream inputStream = new ByteArrayInputStream(payload);\n TransferManager transferManager = TransferManagerBuilder.standard().withS3Client(connection).build();\n final ObjectMetadata objectMetadata = new ObjectMetadata();\n // Only add content type if the user has mentioned it in the body\n if (multipartFormDataDTO.getType() != null) {\n objectMetadata.setContentType(multipartFormDataDTO.getType());\n }\n try {\n transferManager.upload(bucketName, filePath, inputStream, objectMetadata).waitForUploadResult();\n } catch (InterruptedException e) {\n throw new AppsmithPluginException(\n AppsmithPluginError.PLUGIN_ERROR,\n \"File upload interrupted.\"\n );\n }\n\n listOfFiles.add(filePath);\n });\n\n return getSignedUrls(connection, bucketName, listOfFiles, expiryDateTime);\n }",
"S3UploadResponse uploadFileToS3(MultipartFile part, Integer importBelong) throws IOException;",
"String uploadFileFromBody(AmazonS3 connection,\n String bucketName,\n String path,\n String body,\n Boolean usingFilePicker,\n Date expiryDateTime)\n throws InterruptedException, AppsmithPluginException {\n\n byte[] payload;\n MultipartFormDataDTO multipartFormDataDTO;\n try {\n multipartFormDataDTO = objectMapper.readValue(\n body,\n MultipartFormDataDTO.class);\n } catch (IOException e) {\n throw new AppsmithPluginException(\n AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,\n \"Unable to parse content. Expected to receive an object with `data` and `type`\"\n );\n }\n if (multipartFormDataDTO == null) {\n throw new AppsmithPluginException(\n AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,\n \"Could not find any data. Expected to receive an object with `data` and `type`\"\n );\n }\n if (Boolean.TRUE.equals(usingFilePicker)) {\n\n String encodedPayload = (String) multipartFormDataDTO.getData();\n /*\n * - For files uploaded using Filepicker.xyz.base64, body format is \"<content-type>;base64,<actual-\n * base64-encoded-payload>\".\n * - Strip off the redundant part in the beginning to get actual payload.\n */\n if (encodedPayload.contains(BASE64_DELIMITER)) {\n List<String> bodyArrayList = Arrays.asList(encodedPayload.split(BASE64_DELIMITER));\n encodedPayload = bodyArrayList.get(bodyArrayList.size() - 1);\n }\n\n try {\n payload = Base64.getDecoder().decode(encodedPayload);\n } catch (IllegalArgumentException e) {\n throw new AppsmithPluginException(\n AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,\n \"File content is not base64 encoded. File content needs to be base64 encoded when the \" +\n \"'File Data Type: Base64/Text' field is selected 'Yes'.\"\n );\n }\n } else {\n payload = ((String) multipartFormDataDTO.getData()).getBytes();\n }\n\n InputStream inputStream = new ByteArrayInputStream(payload);\n TransferManager transferManager = TransferManagerBuilder.standard().withS3Client(connection).build();\n final ObjectMetadata objectMetadata = new ObjectMetadata();\n // Only add content type if the user has mentioned it in the body\n if (multipartFormDataDTO.getType() != null) {\n objectMetadata.setContentType(multipartFormDataDTO.getType());\n }\n transferManager.upload(bucketName, path, inputStream, objectMetadata).waitForUploadResult();\n\n ArrayList<String> listOfFiles = new ArrayList<>();\n listOfFiles.add(path);\n ArrayList<String> listOfUrls = getSignedUrls(connection, bucketName, listOfFiles, expiryDateTime);\n if (listOfUrls.size() != 1) {\n throw new AppsmithPluginException(\n AppsmithPluginError.PLUGIN_ERROR,\n \"Appsmith has encountered an unexpected error when fetching url from AmazonS3 after file \" +\n \"creation. Please reach out to Appsmith customer support to resolve this.\"\n );\n }\n String signedUrl = listOfUrls.get(0);\n\n return signedUrl;\n }",
"public JSONObject read(InputStream uploadedInputStream);",
"public String upload(String bucket, String path, String filename, InputStream is, String contentType)\r\n\t{\r\n\t\t/* Refresh the connection, if necessary. */\r\n\t\tif (isRefreshConnection())\r\n\t\t\tdoRefreshConnection();\r\n\t\t/*\r\n\t\t * The content length HAS to be set because we're not providing a File to the\r\n\t\t * PutObjectRequest but a stream.\r\n\t\t * Uploading stuff to S3 requires the amount of data to be specified before the upload. If\r\n\t\t * that is not done then we'd have to buffer the\r\n\t\t * entire stream (=File) before the upload. Setting the content length circumvents that.\r\n\t\t */\r\n\r\n\t\t/* Proceed with the actual upload. */\r\n\t\ttry\r\n\t\t{\r\n\t\t\tString prefix = FilenameUtils.getBaseName(filename);\r\n\t\t\tString suffix = FilenameUtils.getExtension(filename);\r\n\r\n\t\t\tFile file = File.createTempFile(prefix, suffix);\r\n\t\t\tOutputStream outputStream = new FileOutputStream(file);\r\n\t\t\tIOUtils.copy(is, outputStream);\r\n\t\t\toutputStream.close();\r\n\t\t\tS3Object object = new S3Object(file);\r\n\t\t\tobject.setName(sanitizePath(path) + filename);\r\n\r\n\t\t\tS3Bucket publicBucket = service.getBucket(bucket);\r\n\t\t\tAccessControlList bucketAcl = service.getBucketAcl(publicBucket);\r\n\t\t\tbucketAcl.grantPermission(GroupGrantee.ALL_USERS, Permission.PERMISSION_READ);\r\n\t\t\tpublicBucket.setAcl(bucketAcl);\r\n\t\t\tobject.setAcl(bucketAcl);\r\n\t\t\tservice.putObject(publicBucket, object);\r\n\t\t\tString pathtToFile = \"https://\" + publicBucket.getName() + \".\" + service.getEndpoint() + \"/\" + object.getKey();\r\n\t\t\tSystem.out.println(\"View public object contents here:\" + pathtToFile);\r\n\t\t\treturn pathtToFile;\r\n\t\t}\r\n\t\tcatch (S3ServiceException ase)\r\n\t\t{\r\n\t\t\tase.printStackTrace();\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn \"\";\r\n\t}",
"@Override\n public void store(MultipartFile file, String path) {\n String filename = StringUtils.cleanPath(file.getOriginalFilename());\n try {\n if (file.isEmpty()) {\n throw new StorageException(\"Failed to store empty file \" + filename);\n }\n if (filename.contains(\"..\")) {\n // This is a security check\n throw new StorageException(\n \"Cannot store file with relative path outside current directory \"\n + filename);\n }\n\n \t\t// upload file to s3\n \t\tString fileName = path + \"/\" + filename;\n\n \t\tthis.s3client.putObject(new PutObjectRequest(this.s3_storage_properties.getBucketName(), fileName,\n \t\t\t\tfile.getInputStream(), new ObjectMetadata())\n .withCannedAcl(CannedAccessControlList.PublicRead));\n Application.logger.info(\"Stored \"+fileName+\" into S3\");\n }\n catch (IOException e) {\n throw new StorageException(\"Failed to store file \" + filename, e);\n }\n }",
"public String putObject(InputStream in, String fileName, String id)\n {\n File f;\n MimetypesFileTypeMap mimetypesFileTypeMap = new MimetypesFileTypeMap();\n try\n {\n logger.info(\"run in the putObject1 try block\");\n ObjectMetadata ObjectMetadata = new ObjectMetadata();\n Map<String, String> userMetadata = new HashMap<String, String>();\n userMetadata.put(\"Name\", fileName);\n f = new File(fileName);\n userMetadata.put(\"Content-Type\", mimetypesFileTypeMap.getContentType(f));\n String keyName = CommonUtil.getKeyName(bucketName, id, fileName);\n userMetadata.put(\"key_name\", keyName);\n userMetadata.put(\"user\", id);\n ObjectMetadata.setUserMetadata(userMetadata);\n s3.putObject(bucketName, keyName, in, ObjectMetadata);\n return keyName;\n }\n catch (SdkClientException e)\n {\n logger.error(e.getMessage());\n return null;\n }\n }",
"public Long createFileUpload(FileUpload fileUpload, InputStream fileInputStream) throws AppException;",
"@Test\n public void testUploadToAmazonS3() throws Exception {\n String uploadFileName = \"test_upload.jpg\";\n byte[] uploadFilenameBytes = IOUtils.toByteArray(new ClassPathResource(uploadFileName).getInputStream());\n\n MockMultipartFile file = new MockMultipartFile(\"file\", uploadFileName, null, new ClassPathResource(uploadFileName).getInputStream());\n\n // make request to our server\n byte[] result = mockMvc.perform(fileUpload(\"/api/v1/storage/upload\")\n .file(file).with(user(\"[email protected]\").roles(\"USER\", \"ADMIN\")))\n .andExpect(status().is(201)).andReturn().getResponse().getContentAsByteArray();\n\n StorageDocumentMeta storageDocumentMeta = objectMapper.readValue(result, StorageDocumentMeta.class);\n Assert.assertNotNull(storageDocumentMeta);\n Assert.assertNotNull(storageDocumentMeta.getPublicUrl());\n\n // get real request to aws s3 and assert to content of file in our FS\n Assert.assertEquals(IOUtils.toByteArray(new URL(storageDocumentMeta.getPublicUrl())), uploadFilenameBytes);\n }",
"@RequestMapping(value = \"/upload\", method = RequestMethod.POST)\n @ResponseBody\n public ModelAndView singleFileUpload(@RequestParam(\"file\") MultipartFile file) {\n\n try {\n\n byte[] bytes = file.getBytes();\n String name = file.getOriginalFilename() ;\n\n // Put the file into the bucket.\n s3Client.putObject(bytes, bucketName, name);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n return new ModelAndView(new RedirectView(\"photo\"));\n }",
"abstract Function<Multipart.FileInfo, play.libs.streams.Accumulator<ByteString, Http.MultipartFormData.FilePart<A>>> createFilePartHandler();",
"public List<String> putObject(MultipartRequest request, String id)\n {\n List<String> keyNameList = new ArrayList<String>();\n try\n {\n Map<String, MultipartFile> filesMap = request.getFileMap();\n Set<String> nameSet = filesMap.keySet();\n Iterator<String> it = nameSet.iterator();\n while (it.hasNext())\n {\n MultipartFile file = filesMap.get(it.next());\n ObjectMetadata ObjectMetadata = new ObjectMetadata();\n Map<String, String> userMetadata = new HashMap<String, String>();\n userMetadata.put(\"Name\", file.getOriginalFilename());\n userMetadata.put(\"Content-Type\", file.getContentType());\n String keyName = CommonUtil.getKeyName(bucketName, id, file.getOriginalFilename());\n userMetadata.put(\"key_name\", keyName);\n userMetadata.put(\"user\", id);\n ObjectMetadata.setUserMetadata(userMetadata);\n InputStream in = file.getInputStream();\n s3.putObject(bucketName, keyName, in, ObjectMetadata);\n keyNameList.add(keyName);\n }\n }\n catch (AmazonS3Exception e)\n {\n logger.error(e.getMessage());\n }\n catch (IOException e)\n {\n logger.error(e.getMessage());\n }\n return keyNameList;\n }",
"public GenericS3Input create(GenericS3Input genericS3Input) throws BitmovinException {\n try {\n return this.apiClient.create(genericS3Input).getData().getResult();\n } catch (Exception ex) {\n throw buildBitmovinException(ex);\n }\n }",
"public S3_Upload_Image() {super(TAG);}",
"public void s3upload(String bucketName, String fileName, File file) throws IOException {\n\n System.out.println(\"------------- CustomS3Client --------------\");\n System.out.println(\"Inside s3upload bucket Name: \"+bucketName+\" and file Name: \"+ fileName);\n\n s3 = AmazonS3ClientBuilder.standard()\n .withCredentials(new ProfileCredentialsProvider())\n .withRegion(\"us-east-1\")\n .build();\n\n // List current buckets.\n ListMyBuckets(bucketName);\n\n //upload the file\n s3.putObject(bucketName, fileName, file);\n\n System.out.println(\"------------- Success --------------\");\n\n }",
"@Override\n public void uploadPart(RefCountedFSOutputStream file) throws IOException {\n // this is to guarantee that nobody is\n // writing to the file we are uploading.\n checkState(file.isClosed());\n\n final CompletableFuture<PartETag> future = new CompletableFuture<>();\n uploadsInProgress.add(future);\n\n final long partLength = file.getPos();\n currentUploadInfo.registerNewPart(partLength);\n\n file.retain(); // keep the file while the async upload still runs\n uploadThreadPool.execute(new UploadTask(s3AccessHelper, currentUploadInfo, file, future));\n }",
"@Override\n public String upload(String bucket, String key, String file) {\n byte[] data = (file.contains(\",\")) ? Base64.getDecoder().decode(file.substring(file.indexOf(\",\") + 1))\n : Base64.getDecoder().decode(file);\n\n SaveImage.saveImage(\"storage/\", bucket + \"_\" + key, new ByteArrayInputStream(data));\n\n try {\n Regions clientRegion = Regions.fromName(AWSUtil.getValue(\"region\"));\n\n AWSCredentials credentials = new BasicAWSCredentials(AWSUtil.getValue(\"accesskey\"),\n AWSUtil.getValue(\"secretkey\"));\n\n AmazonS3 s3Client = AmazonS3ClientBuilder.standard()\n .withCredentials(new AWSStaticCredentialsProvider(credentials)).withRegion(clientRegion).build();\n\n File arquivo = new File(\"storage/\" + bucket + \"_\" + key);\n s3Client.putObject(bucket, key, arquivo);\n\n arquivo.delete(); // remove o cache local depois do upload\n\n return \"SUCCESS\";\n }\n //\n catch (AmazonServiceException e) {\n err.exception(\"AmazonServiceException\", e);\n }\n //\n catch (SdkClientException e) {\n err.exception(\"SdkClientException\", e);\n }\n\n return \"FAILURE\";\n }",
"private void uploadFileTos3bucket(String fileName, File file) {\n s3Client.putObject(new PutObjectRequest(bucketName, fileName, file)\n .withCannedAcl(CannedAccessControlList.PublicRead));\n }",
"@Test\n public void testFileUploadFromBodyWithMissingDuration() {\n DatasourceConfiguration datasourceConfiguration = createDatasourceConfiguration();\n ExecuteActionDTO executeActionDTO = new ExecuteActionDTO();\n AmazonS3Plugin.S3PluginExecutor pluginExecutor = new AmazonS3Plugin.S3PluginExecutor();\n\n ActionConfiguration actionConfiguration = new ActionConfiguration();\n\n Map<String, Object> configMap = new HashMap<>();\n setDataValueSafelyInFormData(configMap, BODY, \"{\\\"data\\\": \\\"\\\"}\");\n setDataValueSafelyInFormData(configMap, PATH, \"path\");\n setDataValueSafelyInFormData(configMap, COMMAND, \"UPLOAD_FILE_FROM_BODY\");\n setDataValueSafelyInFormData(configMap, BUCKET, \"bucket_name\");\n setDataValueSafelyInFormData(configMap, CREATE_DATATYPE, \"NO\");\n\n actionConfiguration.setFormData(configMap);\n\n AmazonS3 connection = pluginExecutor.datasourceCreate(datasourceConfiguration).block();\n Mono<ActionExecutionResult> resultMono = pluginExecutor.executeParameterized(\n connection,\n executeActionDTO,\n datasourceConfiguration,\n actionConfiguration);\n\n StepVerifier.create(resultMono)\n .assertNext(result -> {\n assertFalse(result.getIsExecutionSuccess());\n String message = (String) result.getBody();\n assertTrue(message.contains(\"The AWS Access Key Id you provided does not exist in \" +\n \"our records\"));\n assertEquals(AppsmithPluginError.PLUGIN_ERROR.getTitle(), result.getTitle());\n })\n .verifyComplete();\n }",
"public MediaPropertiesChunk(DataInputStream f) throws Exception {\n\t\tstreamId = f.readShort();\n\t\tmaxBitrate = f.readInt();\n\t\taverageBitrate = f.readInt();\n\t\tmaxDataPacketSize = f.readInt();\n\t\taverageDataPacketSize = f.readInt();\n\t\tstreamStartInMs = f.readInt();\n\t\tprerollInMs = f.readInt();\n\t\tduration = f.readInt();\n//\t\tbyte Size of stream description string\n\t\tstreamDescription = Utils.readString(f, f.read());\n//\t\tbyte Size of stream mime type string\n\t\tmimeType = Utils.readString(f, f.read());\n\t\t\n\t\tint dataLength = (int)f.readInt();\n\t\tbyte [] b = new byte[dataLength];\n\t\tf.readFully(b);\n\t\t\n\t\tswitch(mimeType) {\n\t\t\tcase \"audio/x-pn-realaudio\" :\n\t\t\t\taudioInfo = new AudioInfo(new DataInputStream(new ByteArrayInputStream(b)));\n\t\t\t\tbreak;\n\t\t\tcase \"logical-fileinfo\":\n\t\t\t\tlogicStreamInfo = new LogicalStreamInfo(new DataInputStream(new ByteArrayInputStream(b)));\n\t\t\t\tbreak;\n\t\t\tcase \"audio/X-MP3-draft-00\": /*dataLength must equals 0. In this case we do not have any codec info */ break;\n\t\t\tcase \"audio/x-ralf-mpeg4\" : \n\t\t\tcase \"audio/x-ralf-mpeg4-generic\" :\n\t\t\t\tlosslessAudioInfo = new LosslessAudioInfo(new DataInputStream(new ByteArrayInputStream(b)));\n\t\t\t\tbreak;\n\t\t\tcase \"audio/x-pn-multirate-realaudio\" : /* ASM-compatible RealAudio stream. Not supported */\t\t\t\t\n\t\t\tdefault: throw new UnsupportedException(\"Unknow mime : \" + mimeType); \n\t\t}\n\t}",
"private void upload(String tag, String message, String position, String unique_msg, LogEntry [] inputLogEntry, String [] zipEntryNames, int triggerType, String packageName, String processName){\n\n if (!S3Policy.canLogToS3(getContext(), tag))\n return;\n if( inputLogEntry == null || zipEntryNames == null) {\n Log.d(TAG, \"inputLogEntry or zipEntryNames is null\");\n return;\n }\n\n if (message==null)\n message=\"\";\n if (position==null)\n position=\"\";\n\n String sn = Utils.getSN();\n //Create a device information properties file\n ByteArrayOutputStream os_deviceinfo = new ByteArrayOutputStream();\n S3DeviceInfoCreator deviceInfoCreator = S3DeviceInfoCreator.getInstance(getContext());\n Properties propReportData = deviceInfoCreator.createDeviceInfoProperties(tag, message, position, unique_msg, triggerType, packageName, processName);\n try {\n propReportData.store(os_deviceinfo, sMessageVersion);\n } catch (IOException e1) {\n e1.printStackTrace();\n } finally {\n try {if(os_deviceinfo != null) os_deviceinfo.close();} catch (IOException e) {e.printStackTrace();}\n }\n\n if(Common.SECURITY_DEBUG) Log.d(TAG, propReportData.toString());\n\n Properties prop = new Properties();\n prop.setProperty(\"TAG\", tag);\n prop.setProperty(\"S/N\", sn);\n // sy_wang, 20140321, Get sense version and change to sense ID which has specific format.\n prop.setProperty(\"SENSE_ID\", changeSenseVerToSenseId(Utils.getSenseVersionByCustomizationManager()));\n\n S3EntryFile entryFile = null;\n FileOutputStream zipos = null;\n DataOutputStream dataStream = null;\n ZipOutputStream zip = null;\n InputStream isInputLog = null;\n try {\n //Create a ZIP\n entryFile = S3LogCacheManager.getInstance().putS3LogToCache(getContext(), prop);\n zipos = entryFile.getFileOutputStream();\n dataStream = new DataOutputStream(zipos);\n dataStream.writeUTF(prop.getProperty(\"TAG\", \"ALL\"));\n dataStream.writeUTF(prop.getProperty(\"S/N\", \"unknown\"));\n zip =new ZipOutputStream(zipos);\n ZipEntry zeProperties = new ZipEntry(\"DeviceInfo.properties\");\n zip.putNextEntry(zeProperties);\n zip.write(os_deviceinfo.toByteArray());\n zip.closeEntry();\n\n for(int i=0; i<inputLogEntry.length ; i++) {\n if(inputLogEntry[i] != null) {\n ZipEntry zeLogfile = new ZipEntry(zipEntryNames[i]);\n zip.putNextEntry(zeLogfile);\n isInputLog = inputLogEntry[i].getInputStream();\n streamCopy(isInputLog,zip);\n if(isInputLog != null) {\n isInputLog.close();\n isInputLog = null;\n }\n zip.closeEntry();\n }\n }\n } catch(Exception e) {\n Log.e(TAG, \"Fail to compress Logfile and DeviceInfo\", e);\n } finally {\n try {if(isInputLog != null) isInputLog.close();} catch (IOException e) {e.printStackTrace();}\n try {if(zip != null) zip.finish();} catch (IOException e) {e.printStackTrace();}\n try {if(dataStream != null) dataStream.close();} catch (IOException e) {e.printStackTrace();}\n try {if(zipos != null) zipos.close();} catch (IOException e) {e.printStackTrace();}\n }\n\n //General upload speed for 3G is 0.3 Mb/s .The max size of file to upload is 2.5MB\n //Time cost for uploading = 66.67x2(safety factor) = 133(s)\n String wakelockName = Common.WAKELOCK_S3;\n int wakelockTime = 133000;\n /*\n [2017.02.21 eric lu]\n For UB, we reduce wakelock to 30(s)to prevent power team issues.\n\n If the wakelock exceed 360(s) in 48 hours, we will need to explain why we need to acquire it.\n Hence, 360(s)/2 = 180(s)/day ,and we will upload 4 times per day\n 180/4 = 45(s)/once\n Actually, uploading time was seldom exceed 5(s), we acquire 30(s) as a trade-off.\n */\n if (Common.STR_HTC_UB.equals(tag)){\n wakelockName = Common.WAKELOCK_S3_UB;\n wakelockTime = 30000;\n }\n\n PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);\n PowerManager.WakeLock wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, wakelockName);\n wakeLock.setReferenceCounted(false);\n wakeLock.acquire(wakelockTime);\n\n try {\n Log.d(TAG, \"Start upload\");\n Log.d(TAG,\"The size of uploaded file is: \"+entryFile.getFileSize()+\"(bytes)\");\n Utils.logDataSizeForWakeLock(wakelockName,entryFile.getFileSize());\n\n for (int i=RETRY_COUNT; i>=0; i--) {\n try {\n if (!Utils.isNetworkAllowed(getContext(), tag, ReflectionUtil.get(\"ro.build.description\"),entryFile.getFileSize())){\n Log.d(TAG,\"[upload] Stop upload due to no proper network\");\n continue;\n }\n Log.d(TAG,\"uploaded file size: \"+entryFile.getFileSize()+\"(bytes)\"); //must showed it at begin,added by Ricky 2012.06.27\n Response response = s3uploader.putReport(entryFile.getFilePointer(), prop, 30000);\n //Compare the header\n\n if (response != null && response.getResponseCode() == HttpURLConnection.HTTP_OK) {\n entryFile.delete();\n Log.v(TAG, \"Upload Done , TAG=\"+tag);\n resumeCachedReport(s3uploader);\n break;\n }\n else \n {\n if (i==0) {\n deleteHtcPowerExpertTempFile(tag, entryFile); //Rex, Delete cache file directly when uploading HTC_POWER_EXPERT log failed, 2013/02/26\n Log.w(TAG, \"fail \");\n // storeReport(prop);do nothing since already stored\n }\n }\n android.os.SystemClock.sleep(1000);\n } catch (Exception e) {\n if (i==0) {\n deleteHtcPowerExpertTempFile(tag, entryFile); //Rex, Delete cache file directly when uploading HTC_POWER_EXPERT log failed, 2013/02/26\n Log.w(TAG, \"Got exception\",e.getMessage());\n //storeReport(prop); do nothing since already stored\n }\n android.os.SystemClock.sleep(1000);\n }\n }\n } catch (Exception e) {\n Log.e(TAG,\"Exception occurs\", e);\n } finally {\n if(wakeLock !=null && wakeLock.isHeld())\n wakeLock.release();\n }\n }",
"public interface S3Handler extends S3ObjectStreaming {\n\n /**\n * Called after a new instance has been created.\n * <p>\n * <i>IMPORTANT</i>: Your S3Handler must use this class, the S3HandlerService will call it.\n *\n * @param desc\n * @throws NuxeoException\n * @since 8.2\n */\n public void initialize(S3HandlerDescriptor desc) throws NuxeoException;\n\n /**\n * Called when the S3Handler is removed. Notice that this should not happen very often. Most of the time, if not\n * every time, S3HandlerService creates and initializes the contributed handles at startup and releases them when\n * the server is shut down.\n *\n * @since 8.2\n */\n public void cleanup();\n\n /**\n * The handler uses the bucket as set in the S3HandlerDescriptor at initialization time. But this can be modified\n * dynamically.\n * <p>\n * Notice that an easy way to handle different buckets on the same S3 instance is to contribute different S3Handler\n * in the XML. This way, there is no need to switch buckets, just use the correct handler.\n *\n * @param inBucket\n * @since 8.2\n */\n public void setBucket(String inBucket);\n\n /**\n * @return the AmazonS3 instance created for this handler\n * @since 8.2\n */\n public AmazonS3 getS3();\n\n /**\n * Uploads inFile to S3, using the \"Current bucket\"\n *\n * @param inKey\n * @param inFile\n * @return true if the file could be uploaded with no error\n * @throws NuxeoException\n * @since 8.2\n */\n public boolean sendFile(String inKey, File inFile) throws NuxeoException;\n\n /**\n * Downloads the file from S3 using the \"current bucket\", saving it to inDestFile\n * <p>\n * <code>fileName</code> should be optional (not required by the interface)\n *\n * @param inKey\n * @param inDestFile\n * @return a Blob of the downloaded file\n * @throws NuxeoException\n * @since 8.2\n */\n public Blob downloadFile(String inKey, File inDestFile);\n\n /**\n * Downloads the file from S3 using the \"current bucket\". Should return\n * a temporary blob (becomes permanent if stored in a document)\n *\n * @param inKey\n * @param inFileName\n * @return a Blob of the downloaded file\n * @throws NuxeoException\n * @since 8.2\n */\n public Blob downloadFile(String inKey, String inFileName);\n\n /**\n * Get a SequenceInputStream to the object. The goal of using a SequenceInputStream is to avoid time out while\n * reading large, big objects.\n * <br>\n * pieceSize is the size in bytes for each sequential stream. It set the number of streams created (object size /\n * pieceSize). If 0, a default value is used.\n * Streams are open/close one after the other.\n * <br>\n * The caller can call close() any time, this will close all the streams.\n * <br>\n * See S3ObjectSequentialStream for more info.\n * \n * @param key\n * @param pieceSize\n * @return the SequenceInputStream\n * @throws IOException\n * @since 2021.35\n */\n public static long DEFAULT_PIECE_SIZE = 100 * 1024 * 1024;\n\n /**\n * @see S3ObjectStreaming#getSequenceInputStream(String, long)\n */\n public SequenceInputStream getSequenceInputStream(String key, long pieceSize) throws IOException;\n\n /**\n * @see S3ObjectStreaming#readBytes(String, long, long)\n */\n public byte[] readBytes(String key, long start, long len) throws IOException;\n\n /**\n * Deletes the file from S3 using the \"current bucket\", returns true if succesful\n *\n * @param inKey\n * @return\n * @throws NuxeoException\n * @since 8.2\n */\n public boolean deleteFile(String inKey) throws NuxeoException;\n\n /**\n * Builds a temporary signed URL for the object and returns it.\n * <p>\n * Uses the \"current bucket\"\n * <p>\n * If <code>durationInSeconds</code> is <= 0, the duration set in the XML configuration is used (or the default\n * duration)\n * <p>\n * The interface allows <code>contentType</code> and <code>contentDisposition</code> to be empty. But it is\n * recommended to set them to make sure the is no ambiguity when the URL is used (a key without a file extension for\n * example)\n *\n * @param objectKey\n * @param durationInSeconds\n * @param contentType\n * @param contentDisposition\n * @return the URL to the file on S3\n * @throws NuxeoException\n * @since 8.2\n */\n public String buildPresignedUrl(String inKey, int durationInSeconds, String contentType, String contentDisposition)\n throws NuxeoException;\n\n /**\n * Builds a temporary signed URL for the object and returns it.\n * <p>\n * Uses <code>inBucket</code>. If it is empty, uses the \"current bucket\"\n * <p>\n * If <code>durationInSeconds</code> is <= 0, the duration set in the XML configuration is used (or the default\n * duration)\n * <p>\n * The interface allows <code>contentType</code> and <code>contentDisposition</code> to be empty. But it is\n * recommended to set them to make sure the is no ambiguity when the URL is used (a key without a file extension for\n * example)\n *\n * @param inBucket\n * @param inKey\n * @param durationInSeconds\n * @param contentType\n * @param contentDisposition\n * @return the URL to the file on S3\n * @throws NuxeoException\n * @since 8.2\n */\n public String buildPresignedUrl(String inBucket, String inKey, int durationInSeconds, String contentType,\n String contentDisposition) throws NuxeoException;\n\n /**\n * Returns true if the key exists in the current bucket.\n * <p>\n * <b>IMPORTANT</b>: This method should <i>never</i> uses a CacheForKeyExists, and always requests the key on S3\n *\n * @param inBucket\n * @param inKey\n * @return true if the key exists in the \"current bucket\"\n * @since 8.2\n */\n public boolean existsKeyInS3(String inBucket, String inKey);\n\n /**\n * Returns true if the key exists in the bucket.\n * <p>\n * <b>IMPORTANT</b>: This method should <i>never</i> uses a CacheForKeyExists, and always requests the key on S3\n *\n * @param inKey\n * @return true if the key exists in the bucket\n * @since 8.2\n */\n public boolean existsKeyInS3(String inKey);\n\n /**\n * Returns true if the key exists on S3 (using the \"current bucket\"), and should first check in the\n * CacheForExistsKey (if the configuration allows usage of the cache)\n *\n * @param inKey\n * @return true is the key exists on S3. May use the cache\n * @since 8.2\n */\n public boolean existsKey(String inKey);\n\n /**\n * Returns true if the key exists on S3, in the bucket, and should first check in the CacheForExistsKey (if the\n * Configuration allows usage of the cache)\n *\n * @param bucket\n * @param inKey\n * @return\n * @since 8.2\n */\n public boolean existsKey(String bucket, String inKey);\n\n /**\n * Gets the object metadata without fetching the object itself,\n * as returned by AWS SDK\n * \n * @param inKey\n * @return\n * @since TODO\n */\n public ObjectMetadata getObjectMetadata(String inKey);\n\n /**\n * Gets the object metadata without fetching the object itself.\n * Values returned are whatever is stored as system metadata,\n * such as \"Content-Type\", \"Content-Length\", \"ETag\", ...\n * _plus_ the following properties:\n * <ul>\n * <li>\"bucket\": the bucket name (same as the one defined for the S3Handler)</li>\n * <li>\"objectKey\": the object key (same as the inKey parameter)</li>\n * <li>\"userMetadata\": An object holding the user metadata ({} if no user metadata). All values are String.</li>\n * </ul>\n * If AWS returns a \"not found\" error, the method returns null and adds a WARN to the log. Any other error is thrown\n * \n * @param inKey\n * @return a JsonNode of all the metadata, including userMetadata\n * @throws JsonProcessingException\n * @since 2.0\n */\n public JsonNode getObjectMetadataJson(String inKey) throws JsonProcessingException;\n\n /**\n * Return the current bucket\n *\n * @return the current bucket\n * @since 8.2\n */\n public String getBucket();\n\n /**\n * returns the default duration used to build temp. signed URLs\n *\n * @return the default duration used to build temp. signed URLs\n * @since 8.2\n */\n public int getSignedUrlDuration();\n\n /**\n * Just a convenient method, saving one line of code (getting the service)\n *\n * @param name\n * @return the S3Handler contributed with this name, null if not found\n * @since 8.2\n */\n public static S3Handler getS3Handler(String name) {\n\n S3HandlerService s3HandlerService = Framework.getService(S3HandlerService.class);\n\n if (StringUtils.isBlank(name)) {\n name = Constants.DEFAULT_HANDLER_NAME;\n }\n\n return s3HandlerService.getS3Handler(name);\n\n }\n\n /**\n * Generic method used to build a message when an error is thrown by AWS\n *\n * @param e\n * @return a string describing the error\n * @since 8.2\n */\n public static String buildDetailedMessageFromAWSException(Exception e) {\n\n String message = \"\";\n\n if (e instanceof AmazonServiceException) {\n AmazonServiceException ase = (AmazonServiceException) e;\n message = \"Caught an AmazonServiceException, which \" + \"means your request made it \"\n + \"to Amazon S3, but was rejected with an error response\" + \" for some reason.\";\n message += \"\\nError Message: \" + ase.getMessage();\n message += \"\\nHTTP Status Code: \" + ase.getStatusCode();\n message += \"\\nAWS Error Code: \" + ase.getErrorCode();\n message += \"\\nError Type: \" + ase.getErrorType();\n message += \"\\nRequest ID: \" + ase.getRequestId();\n\n } else if (e instanceof AmazonClientException) {\n AmazonClientException ace = (AmazonClientException) e;\n message = \"Caught an AmazonClientException, which \" + \"means the client encountered \"\n + \"an internal error while trying to \" + \"communicate with S3, \"\n + \"such as not being able to access the network.\";\n message += \"\\nError Message: \" + ace.getMessage();\n\n } else {\n message = e.getMessage();\n }\n\n return message;\n }\n\n /**\n * Generic helper telling the caller if an error catched is a \"Missing Key on S3\" error\n *\n * @param e\n * @return true if the error is \"MIssing Key\" error\n * @since 8.2\n */\n public static boolean errorIsMissingKey(AmazonClientException e) {\n if (e instanceof AmazonServiceException) {\n AmazonServiceException ase = (AmazonServiceException) e;\n return (ase.getStatusCode() == 404) || \"NoSuchKey\".equals(ase.getErrorCode())\n || \"Not Found\".equals(e.getMessage());\n }\n return false;\n }\n\n}",
"public void upload(final String S3SubFolder, final String S3ObjectPath, final File fileLocation, final UploadListener uploadListener) {\n\n String S3ObjectPathRandom = null;\n TransferObserver observer;\n\n if (S3ObjectPath == null) {\n S3ObjectPathRandom = System.currentTimeMillis() + fileLocation.getAbsolutePath().substring(fileLocation.getAbsolutePath().lastIndexOf(\".\"));\n observer = transferUtility.upload(Config.BUCKET_NAME + S3SubFolder, S3ObjectPathRandom, fileLocation);\n } else {\n observer = transferUtility.upload(Config.BUCKET_NAME + S3SubFolder, S3ObjectPath, fileLocation);\n\n }\n\n final String fS3ObjectPathRandom = S3ObjectPathRandom;\n observer.setTransferListener(new TransferListener() {\n\n @Override\n public void onStateChanged(int id, TransferState state) {\n\n idOfTransfer = id;\n\n mState = state;\n if (S3ObjectPath == null)\n checkState(id, fileLocation, S3SubFolder, fS3ObjectPathRandom, uploadListener);\n else\n checkState(id, fileLocation, S3SubFolder, S3ObjectPath, uploadListener);\n }\n\n\n @Override\n public void onProgressChanged(int id, long bytesCurrent, long bytesTotal) {\n\n if (idOfTransfer != null) {\n\n idOfTransfer = id;\n }\n\n try {\n\n uploadListener.onProgressChanged(id, bytesCurrent, bytesTotal);\n } catch (IllegalStateException ignored) {\n }\n\n\n }\n\n @Override\n public void onError(int id, Exception ex) {\n\n if (idOfTransfer != null) {\n\n idOfTransfer = id;\n }\n\n uploadListener.onUploadError(id, fileLocation, ex);\n\n\n }\n });\n\n\n }",
"ReleaseFile parseWithSignature( InputStream is, InputStream signStream, InputStream keyStream ) throws IOException;",
"public CompleteMultipartUploadRequest() {}",
"public MultiPart(){}",
"public Result uploadImage() {\n MultipartFormData<File> body = request().body().asMultipartFormData();\n MultipartFormData.FilePart<File> fileInput = body.getFile(\"inputFile\");\n if (fileInput != null) {\n File file = (File) fileInput.getFile();\n String imageUrl = S3Action.putImg(s3, file, UUID.randomUUID().toString());\n return ok(afterPutImg.render(imageUrl));\n } else {\n return badRequest(\"error\");\n }\n }",
"public com.amazon.s3.PutObjectResponse putObject(com.amazon.s3.PutObject putObject);",
"private File processMultipartForm() {\n\n File storeDirectory = Configuration\n .getParameterValueAsFile(PENDING_DIR);\n\n int fileSizeLimit = Configuration\n .getParameterValueAsInt(METADATA_MAX_BYTES);\n\n DiskFileItemFactory factory = new DiskFileItemFactory();\n factory.setSizeThreshold(fileSizeLimit);\n\n RestletFileUpload upload = new RestletFileUpload(factory);\n\n List<FileItem> items;\n\n try {\n Request request = getRequest();\n items = upload.parseRequest(request);\n } catch (FileUploadException e) {\n throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST, e\n .getMessage(), e);\n }\n\n for (FileItem fi : items) {\n if (fi.getName() != null) {\n String uuid = UUID.randomUUID().toString();\n File file = new File(storeDirectory, uuid);\n try {\n fi.write(file);\n return file;\n } catch (Exception consumed) {\n }\n }\n }\n\n throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST,\n \"no valid file uploaded\");\n }",
"void uploadStarted(StreamingStartEvent event);",
"@POST\r\n\t@Path(\"/publishimage\")\r\n\t@Consumes({ MediaType.MULTIPART_FORM_DATA })\r\n\tpublic Response uploadImageFile(@FormDataParam(\"file\") InputStream fileInputStream,\r\n\t\t\t@FormDataParam(\"file\") FormDataContentDisposition fileMetaData) throws Exception {\r\n\t\tString TEMP_PATH_ON_MAC = \"/tmp\";\r\n\t\twriteFileToServer(fileInputStream, fileMetaData, TEMP_PATH_ON_MAC);\r\n\t\treturn Response.ok().build();\r\n\t}",
"public void uploadPictureToParkById(int id, MultipartFile multipartFile, boolean enablePublicReadAccess) {\n Optional<DogPark> dogPark = dogParkRepository.findById(id);\n\n if (dogPark.isPresent()) {\n\n //Create a new image to store the URL of the file that is being created\n Image image = new Image();\n\n //Creating the file\n String fileName = multipartFile.getOriginalFilename();\n\n try {\n //creating the file in the server (temporarily)\n File file = new File(fileName);\n FileOutputStream fos = new FileOutputStream(file);\n fos.write(multipartFile.getBytes());\n fos.close();\n\n for (int i = -1; i < dogPark.get().getImages().size(); i++) {\n\n if (i == dogPark.get().getImages().size() - 1) {\n fileName = dogPark.get().getName() + \"/\" + dogPark.get().getName() + (i + 1) + \".\" + FilenameUtils.getExtension(fileName);\n }\n }\n\n //Set the URL to the new image and connect with the correct dog park and save it to the repository\n image.setUrl(\"https://dogparks.s3.amazonaws.com/\" + fileName);\n image.setDogpark(dogPark.get());\n imageRepository.save(image);\n\n //Add the image to the dog park\n dogPark.get().getImages().add(image);\n\n PutObjectRequest putObjectReqeust = new PutObjectRequest(this.awsS3AudioBucket, fileName, file);\n\n if (enablePublicReadAccess) {\n putObjectReqeust.withCannedAcl(CannedAccessControlList.PublicRead);\n }\n\n this.amazonS3.putObject(putObjectReqeust);\n\n } catch (IOException | AmazonServiceException ex) {\n logger.error(\"error [\" + ex.getMessage() + \"] occurred while uploading [\" + fileName + \"] \");\n }\n }\n else {\n throw new DogParkNotFoundException();\n }\n }",
"public void save(String path,\n String fileName,\n Optional<Map<String, String>> optionalMetadata,\n InputStream inputStream) {\n ObjectMetadata metadata = new ObjectMetadata();\n optionalMetadata.ifPresent(map -> {\n if (!map.isEmpty()) {\n map.forEach((key,value)-> metadata.addUserMetadata(key,value));\n }\n });\n try {\n s3.putObject(path, fileName, inputStream, metadata);\n } catch (AmazonServiceException e) {\n throw new IllegalStateException(\"Failed to store file to S3.\", e);\n }\n }",
"UploadInfo simpleUpload(SimpleFile file);",
"void whenUploadFile(MultipartFile file, HttpServletRequest request);",
"public void gettingDataFromS3(AmazonS3 s3, String key) throws IOException {\n try {\n for (int i = 0; i < 1; i++) {\n S3Object object = s3.getObject(new GetObjectRequest(bucketName, key));\n if( object.getKey().equalsIgnoreCase(key)) {\n String contentType = object.getObjectMetadata().getContentType();\n storingTheObjectToDisk1(object.getObjectContent(), key);\n break;\n }\n }\n String eTag = gettingETagOfTheFile(key);\n try {\n File file = new File(\"/home/ubuntu/\" + key + \".etag\");\n BufferedWriter output = new BufferedWriter(new FileWriter(file));\n output.write(eTag);\n output.close();\n } catch ( IOException e ) {\n e.printStackTrace();\n }\n } catch (AmazonServiceException ase) {\n System.out.println(\"Caught an AmazonServiceException, which\" + \" means your request made it \" + \"to Amazon S3, but was rejected with an error response\" +\n \" for some reason.\");\n System.out.println(\"Error Message: \" + ase.getMessage());\n System.out.println(\"HTTP Status Code: \" + ase.getStatusCode());\n System.out.println(\"AWS Error Code: \" + ase.getErrorCode());\n System.out.println(\"Error Type: \" + ase.getErrorType());\n System.out.println(\"Request ID: \" + ase.getRequestId());\n } catch (AmazonClientException ace) {\n System.out.println(\"Caught an AmazonClientException, which means\"+ \" the client encountered \" + \"an internal error while trying to \" + \"communicate with S3, \" + \"such as not being able to access the network.\");\n System.out.println(\"Error Message: \" + ace.getMessage());\n }\n }",
"public void upoadFile(MultipartFile file) {\n\t\t\n\t\ttry\n\t\t{\n\t\t\t\n\t\t if(!Files.isDirectory(path))\n\t\t {\n\t\t\t System.out.println(\"Directory Created\"+path);\n\t\t\t Files.createDirectories(path);\n\t\t }\n\t\t String fileName=file.getOriginalFilename();\n\t\t Files.copy(file.getInputStream(), this.path.resolve(fileName));\n\t\t System.out.println(\"File uploade details \");\n\t }catch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"File uploade error \"+e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"public Builder setS3Bytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n s3_ = value;\n onChanged();\n return this;\n }",
"private S3InputSource s3InputSource(\n @Nullable List<String> uris,\n @Nullable List<String> prefixes,\n @Nullable List<CloudObjectLocation> objects,\n @Nullable String objectGlob\n )\n {\n return s3InputSource(uris, prefixes, objects, objectGlob, null);\n }",
"public void store(S3Object s3Object) throws S3Exception {\n\t\t\r\n\t}",
"@SneakyThrows\n public void writeToBucket(\n final String key,\n final Map<String, String> metadataMap,\n final Object object,\n final String contentType,\n final ObjectMapper mapper) {\n\n // Write the object to AWS\n AmazonS3 s3Client = s3ClientService.s3Client();\n\n if (!s3Client.doesBucketExistV2(bucketConfig.getName())) {\n if (bucketConfig.isCreate()) {\n log.info(\"{} does not exist. Creating it.\", bucketConfig.getName());\n s3Client.createBucket(bucketConfig.getName());\n } else {\n throw new RuntimeException(bucketConfig.getName() + \" does not exist.\");\n }\n }\n\n final String unifiedResult = mapper.writeValueAsString(object);\n log.info(\"Storing unified result {} to AWS S3 {}.\", key, bucketConfig.getName());\n\n // Upload a text string as a new object as input stream with metadata.\n ObjectMetadata metadata = new ObjectMetadata();\n final byte[] contentAsBytes = unifiedResult.getBytes(StandardCharsets.UTF_8);\n metadata.setContentLength(contentAsBytes.length);\n metadata.setContentType(contentType);\n metadataMap.forEach((k, v) -> metadata.addUserMetadata(k, v));\n try (ByteArrayInputStream contentsAsStream = new ByteArrayInputStream(contentAsBytes)) {\n s3Client.putObject(\n new PutObjectRequest(bucketConfig.getName(), key, contentsAsStream, metadata));\n }\n }",
"@Test\n public void testCreateMultipleFilesFromBodyWithFalseCredentialsAndNonNullDuration() {\n DatasourceConfiguration datasourceConfiguration = createDatasourceConfiguration();\n ExecuteActionDTO executeActionDTO = new ExecuteActionDTO();\n AmazonS3Plugin.S3PluginExecutor pluginExecutor = new AmazonS3Plugin.S3PluginExecutor();\n\n ActionConfiguration actionConfiguration = new ActionConfiguration();\n\n Map<String, Object> configMap = new HashMap<>();\n setDataValueSafelyInFormData(configMap, BODY, \"[{\\\"data\\\": \\\"plain text\\\"}, {\\\"data\\\": \\\"plain text2\\\"}]\");\n setDataValueSafelyInFormData(configMap, PATH, \"path\");\n setDataValueSafelyInFormData(configMap, COMMAND, \"UPLOAD_MULTIPLE_FILES_FROM_BODY\");\n setDataValueSafelyInFormData(configMap, BUCKET, \"bucket_name\");\n setDataValueSafelyInFormData(configMap, CREATE_DATATYPE, \"NO\");\n setDataValueSafelyInFormData(configMap, CREATE_EXPIRY, \"100000\");\n\n actionConfiguration.setFormData(configMap);\n\n AmazonS3 connection = pluginExecutor.datasourceCreate(datasourceConfiguration).block();\n Mono<ActionExecutionResult> resultMono = pluginExecutor.executeParameterized(\n connection,\n executeActionDTO,\n datasourceConfiguration,\n actionConfiguration);\n\n StepVerifier.create(resultMono)\n .assertNext(result -> {\n assertFalse(result.getIsExecutionSuccess());\n String message = (String) result.getBody();\n assertTrue(message.contains(\"The AWS Access Key Id you provided does not exist in \" +\n \"our records\"));\n assertEquals(AppsmithPluginError.PLUGIN_ERROR.getTitle(), result.getTitle());\n })\n .verifyComplete();\n }",
"private void signDataStream(InputStream data, String signatureFilename)\n throws CmsCadesException, GeneralSecurityException, IOException {\n CadesSignatureStream cmsSig = new CadesSignatureStream(data, SignedData.EXPLICIT);\n // CadesBESParameters params = new CadesBESParameters();\n CadesTParameters params = new CadesTParameters(\n \"http://tsp.iaik.tugraz.at/tsp/TspRequest\", null, null);\n params.setDigestAlgorithm(\"SHA512\");\n cmsSig.addSignerInfo(privKey_, certChain_, params);\n ByteArrayOutputStream signature = new ByteArrayOutputStream();\n cmsSig.encodeSignature(signature);\n byte[] signatureBytes = signature.toByteArray();\n signature.close();\n FileOutputStream os = new FileOutputStream(signatureFilename);\n os.write(signatureBytes);\n os.flush();\n os.close();\n }",
"public List<PutObjectResult> upload(MultipartFile[] multipartFiles) {\n List<PutObjectResult> putObjectResults = new ArrayList<>();\n\n Arrays.stream(multipartFiles)\n .filter(multipartFile -> !StringUtils.isEmpty(multipartFile.getOriginalFilename()))\n .forEach(multipartFile -> {\n try {\n putObjectResults.add(upload(multipartFile, multipartFile.getOriginalFilename()));\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n\n return putObjectResults;\n }",
"public void sendDataToClient(AmazonS3 s3, String file) throws IOException {\n Path path = Paths.get(\"/home/ubuntu/\" + file);\n //first checking if the CDNs are having the file in its disk\n if(Files.notExists(path)){\n // not present in the disk\n if(listingKeysOfAllTheObject(s3, file)){\n gettingDataFromS3(s3, file);\n }\n else {\n System.out.println(\"file is not present in both local CDNs as well as in S3, can't serve you request!\");\n }\n } else if(Files.exists(path)){\n // Checking if the file is current version of S3 file\n if(checkingIfTheFileIsCurrent(s3, file)){\n // the file is current\n } else {\n // the file is not current, getting the latest file from the S3\n gettingDataFromS3(s3, file);\n }\n }\n }",
"public void uploadMultipart() {\n //getting the actual path of the image\n String path = getPath(filePath);\n\n //Uploading code\n try {\n String uploadId = UUID.randomUUID().toString();\n\n //Creating a multi part request\n new MultipartUploadRequest(this, uploadId, \"todo\")\n .addFileToUpload(path, \"image\") //Adding file\n .setNotificationConfig(new UploadNotificationConfig())\n .setMaxRetries(2)\n .startUpload(); //Starting the upload\n\n } catch (Exception exc) {\n Toast.makeText(this, exc.getMessage(), Toast.LENGTH_SHORT).show();\n }\n }",
"private void loadMusicAssetsFromS3(String fileName) throws Exception {\n MinioClient s3Client = new MinioClient(\"https://s3.amazonaws.com/\", accessid, accesskey);\n InputStream ins = s3Client.getObject(bucket, fileName);\n FileOutputStream fos = new FileOutputStream(new File(\"temp/\" + fileName));\n fos.write(ins.read());\n }",
"private void uploadStreamInternal(String stageName,\n String destPrefix,\n InputStream inputStream,\n String destFileName,\n boolean compressData)\n throws SQLException\n {\n logger.debug(\"upload data from stream: stageName={}\" +\n \", destPrefix={}, destFileName={}\",\n stageName, destPrefix, destFileName);\n\n if (stageName == null)\n throw new SnowflakeSQLException(SqlState.INTERNAL_ERROR,\n ErrorCode.INTERNAL_ERROR.getMessageCode(),\n \"stage name is null\");\n\n if (destFileName == null)\n throw new SnowflakeSQLException(SqlState.INTERNAL_ERROR,\n ErrorCode.INTERNAL_ERROR.getMessageCode(),\n \"stage name is null\");\n\n SnowflakeStatementV1 stmt = new SnowflakeStatementV1(this);\n\n StringBuilder putCommand = new StringBuilder();\n\n // use a placeholder for source file\n putCommand.append(\"put file:///tmp/placeholder \");\n\n // add stage name\n if (!stageName.startsWith(\"@\"))\n putCommand.append(\"@\");\n putCommand.append(stageName);\n\n // add dest prefix\n if (destPrefix != null)\n {\n if (!destPrefix.startsWith(\"/\"))\n putCommand.append(\"/\");\n putCommand.append(destPrefix);\n }\n\n putCommand.append(\" overwrite=true\");\n\n SnowflakeFileTransferAgent transferAgent = null;\n transferAgent = new SnowflakeFileTransferAgent(putCommand.toString(),\n sfSession, stmt.getSfStatement());\n\n transferAgent.setSourceStream(inputStream);\n transferAgent.setDestFileNameForStreamSource(destFileName);\n transferAgent.setCompressSourceFromStream(compressData);\n transferAgent.execute();\n\n stmt.close();\n }",
"UploadResponse uploadDocumentSync(InputStream documentInputStream, String filename,\n long systemId, String password, String documentPool,\n String documentKey, String language, String ackKey);",
"ReleaseFile parseClearSigned( InputStream is, InputStream keyStream ) throws IOException;",
"@XRayEnabled\npublic interface UploadFileService {\n \n /**\n * copyFileToS3 : copyFileToS3\n * \n * @param fileName : file name\n * @param fileExtension : file extension\n * @param content : content\n * @return String : url file\n */\n public String copyFileToS3(String fileName, String fileExtension, String content);\n\n /**\n * uploadFileToS3 : Upload file to S3 Amz Cloud\n * \n * @param part\n * @param importBelong\n * @return\n * @throws IOException\n */\n S3UploadResponse uploadFileToS3(MultipartFile part, Integer importBelong) throws IOException;\n}",
"@Test\n public void testCreateFileFromBodyWithFalseCredentialsAndNonNullDuration() {\n DatasourceConfiguration datasourceConfiguration = createDatasourceConfiguration();\n ExecuteActionDTO executeActionDTO = new ExecuteActionDTO();\n AmazonS3Plugin.S3PluginExecutor pluginExecutor = new AmazonS3Plugin.S3PluginExecutor();\n\n\n ActionConfiguration actionConfiguration = new ActionConfiguration();\n\n Map<String, Object> configMap = new HashMap<>();\n setDataValueSafelyInFormData(configMap, BODY, \"{\\\"data\\\": \\\"\\\"}\");\n setDataValueSafelyInFormData(configMap, PATH, \"path\");\n setDataValueSafelyInFormData(configMap, COMMAND, \"UPLOAD_FILE_FROM_BODY\");\n setDataValueSafelyInFormData(configMap, BUCKET, \"bucket_name\");\n setDataValueSafelyInFormData(configMap, CREATE_DATATYPE, \"NO\");\n setDataValueSafelyInFormData(configMap, CREATE_EXPIRY, \"100000\");\n\n actionConfiguration.setFormData(configMap);\n\n AmazonS3 connection = pluginExecutor.datasourceCreate(datasourceConfiguration).block();\n Mono<ActionExecutionResult> resultMono = pluginExecutor.executeParameterized(\n connection,\n executeActionDTO,\n datasourceConfiguration,\n actionConfiguration);\n\n StepVerifier.create(resultMono)\n .assertNext(result -> {\n assertFalse(result.getIsExecutionSuccess());\n String message = (String) result.getBody();\n assertTrue(message.contains(\"The AWS Access Key Id you provided does not exist in \" +\n \"our records\"));\n assertEquals(AppsmithPluginError.PLUGIN_ERROR.getTitle(), result.getTitle());\n })\n .verifyComplete();\n }",
"public InputStream getInputStream() throws Exception {\r\n if (externalUrl != null) {\r\n AmazonS3URI s3Uri = DirectUtils.getS3Uri(externalUrl);\r\n if (s3Uri != null) {\r\n S3Object s3Object = DirectUtils.getS3Client().getObject(new GetObjectRequest(s3Bucket,\r\n DirectUtils.getS3FileKey(externalUrl)));\r\n return s3Object.getObjectContent();\r\n } else {\r\n DefaultHttpClient httpClient = new DefaultHttpClient();\r\n HttpGet request = new HttpGet(externalUrl);\r\n HttpResponse response = httpClient.execute(request);\r\n // skip status code >=400\r\n if (response.getStatusLine().getStatusCode() >= HttpStatus.SC_BAD_REQUEST) {\r\n throw new HttpResponseException(response.getStatusLine().getStatusCode(), \"Invalid file from external\");\r\n }\r\n\r\n HttpEntity entity = response.getEntity();\r\n if (entity == null) {\r\n throw new HttpResponseException(HttpStatus.SC_BAD_REQUEST, \"Invalid response from external\");\r\n }\r\n return entity.getContent();\r\n }\r\n }\r\n\r\n if (contest.getProjectHeader().getProjectCategory().getId() == ContestType.COPILOT_POSTING.getId()) {\r\n // it's copilot posting, append user handle to each file in the copilot posting submission\r\n Resource[] resources = contest.getResources();\r\n long userId = 0;\r\n for(Resource r : resources) {\r\n if(r.getId() == submission.getUpload().getOwner()) {\r\n userId = Long.parseLong(r.getProperty(\"External Reference ID\"));\r\n break;\r\n }\r\n }\r\n\r\n return prefixHandleToSubmissionFile(uploadedFile, userId);\r\n } else {\r\n return uploadedFile.getInputStream();\r\n }\r\n }",
"public MP3RetaggingInputStream(final InputStream in, byte[] newID3ByteArray) throws IOException {\r\n this.in = new MP3AudioOnlyInputStream(in);\r\n this.tagArray = newID3ByteArray;\r\n }",
"public String copy(MultipartFile file) throws IOException;",
"private AmazonS3 initializeS3Client(Configuration cfg) {\n String endpointLocation = WorkflowRuntimeParameters.getParamValue(IMPORT_CONTENT_OBJECT_STORE_S3_ENDPOINT, cfg);\n if (endpointLocation != null) {\n return new AmazonS3Client(new HadoopBasedS3CredentialsProvider(cfg),\n new ClientConfiguration().withConnectionTimeout(connectionTimeout).withSocketTimeout(readTimeout)\n .withProtocol(Protocol.HTTPS)).withEndpoint(endpointLocation);\n } else {\n return null;\n }\n }",
"@Autowired // Indicates to Spring that this is using dependency injection.\n public FileStore(AmazonS3 s3) {\n this.s3 = s3;\n }",
"public void put(Bitstream bitstream, InputStream in) throws IOException {\n try {\n File file = getFile(bitstream);\n\n // Make the parent dirs if necessary\n File parent = file.getParentFile();\n if (!parent.exists()) {\n parent.mkdirs();\n }\n //Create the corresponding file and open it\n file.createNewFile();\n\n try (\n FileOutputStream fos = new FileOutputStream(file);\n // Read through a digest input stream that will work out the MD5\n DigestInputStream dis = new DigestInputStream(in, MessageDigest.getInstance(CSA));\n ) {\n Utils.bufferedCopy(dis, fos);\n in.close();\n\n bitstream.setSizeBytes(file.length());\n bitstream.setChecksum(Utils.toHex(dis.getMessageDigest().digest()));\n bitstream.setChecksumAlgorithm(CSA);\n } catch (NoSuchAlgorithmException nsae) {\n // Should never happen\n log.warn(\"Caught NoSuchAlgorithmException\", nsae);\n }\n } catch (Exception e) {\n log.error(\"put(\" + bitstream.getInternalId() + \", inputstream)\", e);\n throw new IOException(e);\n }\n }",
"public void uploadFile() {\n \n InputStream input = null;\n try {\n input = file.getInputStream();\n System.out.println(\"chay qua inpustream\");\n String itemName = file.getSubmittedFileName();\n String filename = itemName.substring(\n itemName.lastIndexOf(\"\\\\\") + 1);\n String dirPath = FacesContext.getCurrentInstance().getExternalContext().getRealPath(\"/upload/images\");\n fileNamed = \"/upload/images/\"+filename;\n File f = new File(dirPath + \"\\\\\" + filename);\n if (!f.exists()) {\n f.createNewFile();\n }\n FileOutputStream output = new FileOutputStream(f);\n byte[] buffer = new byte[1024];\n int length;\n while ((length = input.read(buffer)) > 0) {\n output.write(buffer, 0, length);\n }\n // resize(dirPath + \"\\\\\" + filename, dirPath + \"\\\\\" + filename, 200, 200);\n input.close();\n output.close();\n } catch (IOException ex) {\n System.out.println(\"loi io\");\n Logger.getLogger(ArtistsManagedBean.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }",
"public void addFile(MultipartFile multipartFile, String username) throws IOException {\n InputStream fis = multipartFile.getInputStream();\n // create an output buffer\n ByteArrayOutputStream buffer = new ByteArrayOutputStream();\n // write data to the output buffer\n int nRead;\n byte[] data = new byte[1024];\n while ((nRead = fis.read(data, 0, data.length)) != -1) {\n buffer.write(data, 0, nRead);\n }\n buffer.flush();\n\n Integer userID = usersMapper.getUser(username).getUserID();\n String fileName = multipartFile.getOriginalFilename();\n Integer fileID = 0;\n String contentType = multipartFile.getContentType();\n String fileSize = String.valueOf(multipartFile.getSize());\n byte[] fileData = buffer.toByteArray();\n\n Files file = new Files(fileID, fileName, contentType,\n fileSize, userID, fileData);\n filesMapper.insertFile(file);\n }",
"public void processFile() throws IOException {\n\t\tsetContent(file.getBytes());\n\t\tsetMultipartFileContentType(file.getContentType());\n\t}",
"@Test\n public void testPutFileMethodValidS3Path() throws GenieException {\n final PutObjectResult putObjectResult = Mockito.mock(PutObjectResult.class);\n Mockito.when(this.s3Client.putObject(Mockito.any(), Mockito.any(), Mockito.any(File.class))).thenReturn(putObjectResult);\n final ArgumentCaptor<String> bucketArgument = ArgumentCaptor.forClass(String.class);\n final ArgumentCaptor<String> keyArgument = ArgumentCaptor.forClass(String.class);\n s3FileTransfer.putFile(S3FileTransferImplUnitTests.LOCAL_PATH, S3FileTransferImplUnitTests.S3_PATH);\n Mockito.verify(this.s3Client).putObject(bucketArgument.capture(), keyArgument.capture(), Mockito.any(File.class));\n Assert.assertEquals(S3FileTransferImplUnitTests.S3_BUCKET, bucketArgument.getValue());\n Assert.assertEquals(S3FileTransferImplUnitTests.S3_KEY, keyArgument.getValue());\n Mockito.verify(this.uploadTimer, Mockito.times(1)).record(Mockito.anyLong(), Mockito.eq(TimeUnit.NANOSECONDS));\n Mockito.verify(this.registry, Mockito.times(1)).timer(Mockito.eq(UPLOAD_TIMER_NAME), this.tagsCaptor.capture());\n Assert.assertEquals(S3FileTransferImplUnitTests.SUCCESS_TAGS, this.tagsCaptor.getValue());\n }",
"@Override\n public void cleanup(Context context) throws IOException {\n System.out.println(\"Features vector length: \" + numOfFeatures);\n bufferedWriter.close();\n File numOfFeaturesFile = new File(\"resource/numOfFeatures.txt\");\n bufferedWriter = new BufferedWriter(new FileWriter(numOfFeaturesFile));\n bufferedWriter.write(numOfFeatures + \"\\n\");\n bufferedWriter.close();\n if (local) {\n Files.copy(new File(\"resource/paths.txt\").toPath(), new File(\"resource/pathsListCopy.txt\").toPath(), REPLACE_EXISTING);\n } else {\n AmazonS3 s3 = new AmazonS3Client();\n Region usEast1 = Region.getRegion(Regions.US_EAST_1);\n s3.setRegion(usEast1);\n try {\n System.out.print(\"Uploading the dependency paths file to S3... \");\n s3.putObject(new PutObjectRequest(BUCKET_NAME, \"resource/paths.txt\", pathsFile));\n System.out.println(\"Done.\");\n System.out.print(\"Uploading num of features file to S3... \");\n s3.putObject(new PutObjectRequest(BUCKET_NAME, \"resource/numOfFeatures.txt\", numOfFeaturesFile));\n System.out.println(\"Done.\");\n } catch (AmazonServiceException ase) {\n System.out.println(\"Caught an AmazonServiceException, which means your request made it \"\n + \"to Amazon S3, but was rejected with an error response for some reason.\");\n System.out.println(\"Error Message: \" + ase.getMessage());\n System.out.println(\"HTTP Status Code: \" + ase.getStatusCode());\n System.out.println(\"AWS Error Code: \" + ase.getErrorCode());\n System.out.println(\"Error Type: \" + ase.getErrorType());\n System.out.println(\"Request ID: \" + ase.getRequestId());\n } catch (AmazonClientException ace) {\n System.out.println(\"Caught an AmazonClientException, which means the client encountered \"\n + \"a serious internal problem while trying to communicate with S3, \"\n + \"such as not being able to access the network.\");\n System.out.println(\"Error Message: \" + ace.getMessage());\n }\n }\n }",
"public void save(String path, String name, Optional<Map<String,String>> opMetadata, InputStream inputStream){\n ObjectMetadata objectMetadata=new ObjectMetadata();\n opMetadata.ifPresent(map->{\n if(!map.isEmpty()){\n map.forEach(objectMetadata::addUserMetadata);\n }\n });\n try{\n s3.putObject(path,name,inputStream,objectMetadata);\n }catch (AmazonServiceException e){\n }\n }",
"public void uploadStream(String stageName,\n String destPrefix,\n InputStream inputStream,\n String destFileName,\n boolean compressData)\n throws SQLException\n {\n uploadStreamInternal(stageName, destPrefix, inputStream,\n destFileName, compressData);\n }",
"public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {\n attachments = (Map) in.readObject();\n properties = (Map) in.readObject();\n String src = (String) in.readObject();\n if (src != null) {\n content = new StringSource(src);\n }\n securitySubject = (Subject) in.readObject();\n }",
"public S3Object createS3Object(Bucket bucket, String key,\r\n\t\t\tCanonicalUser owner) throws IOException {\n\t\treturn null;\r\n\t}",
"private static void loadData() {\n S3Object pharmaDataObject = null;\n BufferedReader br = null;\n String line = \"\";\n String splitter = \",\";\n\n try {\n\n pharmaDataObject = s3.getObject(S3_BUCKET_NAME, PHARMA_DATA_FILE_KEY);\n\n if (pharmaDataObject != null) {\n\n Table table = dynamoDB.getTable(PHARMA_TABLE_NAME);\n\n br = new BufferedReader(new InputStreamReader(pharmaDataObject.getObjectContent()));\n\n while ((line = br.readLine()) != null) {\n\n String[] pharmaDataAttrValues = line.split(splitter);\n\n try {\n\n if (!pharmaDataAttrValues[0].equals(\"DrugName\")) {\n\n // CSV attributes: DrugName, Usage\n Item item = new Item().withPrimaryKey(\"DrugName\", pharmaDataAttrValues[0])\n .withString(\"Usage\", pharmaDataAttrValues[1]);\n\n table.putItem(item);\n System.out.println(\"Added item to table:\" + line);\n\n }\n } catch (Exception e) {\n System.err.println(\"Failed to create item in table\" + line);\n System.err.println(e.getMessage());\n }\n }\n }\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (br != null) {\n try {\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n System.out.println(\"DynamoDB data upload complete.\");\n }",
"void uploadFinished(StreamingEndEvent event, File uploadedTemporaryFile);",
"public BufferedReader readFromS3(String bucketName, String key) throws IOException {\n S3Object s3object = s3.getObject(new GetObjectRequest(\n bucketName, key));\n System.out.println(s3object.getObjectMetadata().getContentType());\n System.out.println(s3object.getObjectMetadata().getContentLength());\n return new BufferedReader(new InputStreamReader(s3object.getObjectContent()));\n }",
"public String uploadFile(MultipartFile multipartFile) throws Exception {\n String fileUrl = \"\";\n try {\n File file = convertMultiPartToFile(multipartFile);\n String fileName = generateFileName(multipartFile);\n fileUrl = endpointUrl + \"/\" + bucketName + \"/\" + fileName;\n uploadFileTos3bucket(fileName, file);\n file.delete();\n } catch (FileNotFoundException e) {\n throw new FileNotFoundException(e.getMessage());\n } catch (IOException e) {\n throw new IOException(e.getMessage());\n } catch (Exception e) {\n throw new Exception(e.getMessage());\n }\n return fileUrl;\n }",
"public MultipartHolder(Representation representation, Class<E> payloadClass) throws FileUploadException {\n\t\tList<FileItem> files = MultipartHolder.getFiles(representation);\n\t\treceivedFiles = new ArrayList<>();\n\t\tfor (FileItem file : files) {\n\t\t\tif (file.getFieldName().startsWith(MULTIPART_FILE_PART)) {\n\t\t\t\treceivedFiles.add(file);\n\t\t\t} else if (file.getFieldName().equals(MULTIPART_PARAMS_PART)) {\n\t\t\t\tString json = file.getString();\n\t\t\t\tthis.payload = new Gson().fromJson(json, payloadClass);\n\t\t\t}\n\t\t}\n\t}",
"public StripesRequestWrapper(HttpServletRequest request,\n String pathToTempDir,\n int maxTotalPostSize) throws StripesServletException {\n super(request);\n \n try {\n String contentType = request.getContentType();\n \n if (contentType != null && contentType.startsWith(\"multipart/form-data\")) {\n this.multipart = new MultipartRequest(request, pathToTempDir, maxTotalPostSize);\n }\n }\n catch (IOException e) {\n Matcher matcher = exceptionPattern.matcher(e.getMessage());\n \n if (matcher.matches()) {\n throw new FileUploadLimitExceededException(Integer.parseInt(matcher.group(2)),\n Integer.parseInt(matcher.group(1)));\n }\n else {\n throw new StripesServletException(\"Could not construct request wrapper.\", e);\n }\n }\n }",
"@POST\n\t@Path(\"/upload\")\n\t@Consumes(MediaType.MULTIPART_FORM_DATA)\n\tpublic Response uploadFile(\n\t\t\t@FormDataParam(\"file\") InputStream uploadedInputStream,\n\t\t\t@FormDataParam(\"file\") FormDataContentDisposition fileDetail) {\n\t\tString filename = fileDetail.getFileName();\n\t\tFtpsFileList.upload(filename, uploadedInputStream);\n\t\tString output = \"File uploaded to linux success !\" ;\n\t\treturn Response.status(200).entity(output).build();\n\t}",
"void read(final DataInputStream in) throws IOException {\n // This code is tested over in TestHFileReaderV1 where we read an old hfile w/ this new code.\n int pblen = ProtobufUtil.lengthOfPBMagic();\n byte[] pbuf = new byte[pblen];\n if (in.markSupported()) in.mark(pblen);\n int read = in.read(pbuf);\n if (read != pblen) throw new IOException(\"read=\" + read + \", wanted=\" + pblen);\n if (ProtobufUtil.isPBMagicPrefix(pbuf)) {\n parsePB(HFileProtos.FileInfoProto.parseDelimitedFrom(in));\n } else {\n if (in.markSupported()) {\n in.reset();\n parseWritable(in);\n } else {\n // We cannot use BufferedInputStream, it consumes more than we read from the underlying IS\n ByteArrayInputStream bais = new ByteArrayInputStream(pbuf);\n SequenceInputStream sis = new SequenceInputStream(bais, in); // Concatenate input streams\n // TODO: Am I leaking anything here wrapping the passed in stream? We are not calling close on the wrapped\n // streams but they should be let go after we leave this context? I see that we keep a reference to the\n // passed in inputstream but since we no longer have a reference to this after we leave, we should be ok.\n parseWritable(new DataInputStream(sis));\n }\n }\n }",
"public String upload(String path, String filename, InputStream file, String contentType)\r\n\t{\r\n\t\treturn upload(bucket, path, filename, file, contentType);\r\n\t}",
"@Override\n public void initialize(Map<String, Param> params) throws TikaConfigException {\n\n s3Client = AmazonS3ClientBuilder.standard()\n .withRegion(region)\n .withCredentials(new ProfileCredentialsProvider(profile))\n .build();\n }",
"OutputStream receiveUpload(String filename, String mimeType);",
"public CompressionInputStream(InputStream in) {\n super(in);\n }",
"public ECFileCacheInputStream(FileCacheKey cacheKey, Map<Long, Integer> chunkPosAndSize, RedisAccessBase redisAccess,\n List<Integer> redisIds, InputStream stream) {\n this.key = cacheKey.getUuid();\n this.fileSize = (int) cacheKey.getFileSize();\n this.chunkPosAndSize = chunkPosAndSize;\n this.redisAccess = redisAccess;\n this.redisIds = redisIds;\n this.endChunkStream = stream;\n }",
"@Test(priority = 1, description = \"podio {uploadFile} integration test positive case.\")\n public void testUploadFile() throws IOException, JSONException {\n \n esbRequestHeadersMap.put(\"Action\", \"urn:uploadFile\");\n esbRequestHeadersMap.put(\"Authorization\", \"Bearer \" + connectorProperties.getProperty(\"accessToken\"));\n \n String multipartProxyUrl = getProxyServiceURL(\"podio_uploadFile\");\n String requestString = multipartProxyUrl + \"?apiUrl=\" + apiUrl;\n MultipartFormdataProcessor multipartProcessor =\n new MultipartFormdataProcessor(requestString, esbRequestHeadersMap);\n \n File file = new File(pathToResourcesDirectory + connectorProperties.getProperty(\"uploadSourcePath\"));\n multipartProcessor.addFileToRequest(\"source\", file);\n multipartProcessor.addFormDataToRequest(\"filename\", connectorProperties.getProperty(\"uploadSourcePath\"));\n RestResponse<JSONObject> esbRestResponse = multipartProcessor.processForJsonResponse();\n \n String fileId = esbRestResponse.getBody().getString(\"file_id\");\n connectorProperties.put(\"fileId\", fileId);\n \n String apiEndPoint = apiUrl + \"/file/\" + fileId;\n \n RestResponse<JSONObject> apiRestResponse = sendJsonRestRequest(apiEndPoint, \"GET\", apiRequestHeadersMap);\n \n Assert.assertEquals(esbRestResponse.getBody().getJSONObject(\"created_by\").getString(\"name\"), apiRestResponse\n .getBody().getJSONObject(\"created_by\").getString(\"name\"));\n Assert.assertEquals(esbRestResponse.getBody().getString(\"created_on\"),\n apiRestResponse.getBody().getString(\"created_on\"));\n Assert.assertEquals(esbRestResponse.getBody().getJSONObject(\"created_via\").getString(\"name\"), apiRestResponse\n .getBody().getJSONObject(\"created_via\").getString(\"name\"));\n esbRequestHeadersMap.remove(\"Authorization\");\n esbRequestHeadersMap.put(\"Content-Type\", \"application/json\");\n }",
"public TarInputStream(Stream inputStream)\n\t{\n\t\tthis(inputStream, TarBuffer.DefaultBlockFactor);\n\t}",
"public MP3RetaggingInputStream(final File source, byte[] newID3ByteArray) throws IOException {\r\n this(new FileInputStream(source), newID3ByteArray);\r\n }",
"public Builder setS3(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n s3_ = value;\n onChanged();\n return this;\n }",
"public static BoxFileUploadRequestObject uploadFileRequestObject(final String parentId, final String fileName,\n final InputStream inputStream) throws BoxRestException, BoxJSONException {\n try {\n return (new BoxFileUploadRequestObject()).setMultipartMIME(getNewFileMultipartEntity(parentId, inputStream,\n fileName));\n } catch (UnsupportedEncodingException e) {\n throw new BoxRestException(e);\n }\n }",
"public GridFSInputFile createFile(InputStream in) {\n\treturn createFile(in, null);\n }",
"public void uploadObject() {\n\n\t}",
"public com.amazon.s3.PutObjectInlineResponse putObjectInline(com.amazon.s3.PutObjectInline putObjectInline);",
"@Override\r\n\tpublic void putFile(InputStream is, String targetLocation) throws FileSystemUtilException {\r\n\t\tthrow new FileSystemUtilException(\"000000\",null,Level.ERROR,null);\t\r\n\r\n\t}",
"@Test\n public void testGetFileMethodValidS3Path() throws GenieException {\n final ObjectMetadata objectMetadata = Mockito.mock(ObjectMetadata.class);\n Mockito.when(this.s3Client.getObject(Mockito.any(GetObjectRequest.class), Mockito.any(File.class))).thenReturn(objectMetadata);\n final ArgumentCaptor<GetObjectRequest> argument = ArgumentCaptor.forClass(GetObjectRequest.class);\n s3FileTransfer.getFile(S3FileTransferImplUnitTests.S3_PATH, S3FileTransferImplUnitTests.LOCAL_PATH);\n Mockito.verify(this.s3Client).getObject(argument.capture(), Mockito.any());\n Assert.assertEquals(S3FileTransferImplUnitTests.S3_BUCKET, argument.getValue().getBucketName());\n Assert.assertEquals(S3FileTransferImplUnitTests.S3_KEY, argument.getValue().getKey());\n Mockito.verify(this.downloadTimer, Mockito.times(1)).record(Mockito.anyLong(), Mockito.eq(TimeUnit.NANOSECONDS));\n Mockito.verify(this.registry, Mockito.times(1)).timer(Mockito.eq(DOWNLOAD_TIMER_NAME), this.tagsCaptor.capture());\n Assert.assertEquals(S3FileTransferImplUnitTests.SUCCESS_TAGS, this.tagsCaptor.getValue());\n }",
"static Observable<BaseResult> upload(String url, File file) {\n RequestBody requestBody = RequestBody.create(MediaType.parse(\"multipart/form-data\"), file);\n\n MultipartBody.Builder builder = new MultipartBody.Builder().setType(MultipartBody.FORM);\n\n// HashMap<String, String> params = new HashMap<>();\n builder.addFormDataPart(\"file\", file.getName(), requestBody);\n\n// String content = null;\n// builder.addPart(\n// RequestBody.create(MediaType.parse(\"applicaiton/otcet-stream\"), content));\n\n return baseApi.upload(url, builder.build())\n .compose(getComposer())\n .map(new mFunction(new TypeToken<BaseResult>() {\n }));\n }",
"public synchronized void startUploadToS3Server() {\n\t\t LogEntry [] logEntrys = null;\n\t\t\ttry {\n if(ReportService.ACTION_UPLOAD_UB_LOG.equals(action)) {\n if (tags == null || times == null || zipEntryNames == null || \n tags.length != times.length || tags.length != zipEntryNames.length || \n zipEntryNames.length != tags.length || !isZipEntryNameAllowed(zipEntryNames)) {\n Log.d(TAG, \"Stop uploading UB log --> tags array or times array or zip entry array isn't allowed.\");\n return;\n }\n if(Common.DEBUG && tags != null && times != null && tags.length == times.length) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"[UB Report] Ready to upload --> \");\n for(int i=0; i<tags.length; i++) {\n sb.append(\"tag: \").append(tags[i]).append(\", time: \").append(times[i]).append(\" \");\n }\n Log.d(TAG,sb.toString());\n }\n logEntrys = new LogEntry[tags.length];\n for(int i=0; i<tags.length; i++)\n logEntrys[i] = new LogEntry(tags[i], times[i], getContext(), key, iv);\n }\n else {\n logEntrys = new LogEntry[1];\n \t\t\t\tif(file != null)\n \t\t\t\t logEntrys[0] = new LogEntry(file, getContext());\n \t\t\t\telse if (fromDropBox)\n \t\t\t\t logEntrys[0] = new LogEntry(tag, time, getContext(), key, iv);\n \t\t\t\tzipEntryNames = new String [1];\n \t\t\t\tzipEntryNames[0] = \"Logfile\";\n }\n \n upload(tag, msg, position, mUniqueMsg, logEntrys, zipEntryNames, triggerType, packageName, processName);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tLog.e(TAG, \"Fail to create LogEntry\", e);\n\t\t\t} finally {\n\t\t\t if(logEntrys != null) {\n for(LogEntry logEntry : logEntrys)\n logEntry.closeEntry();\n\t\t\t }\n\t\t\t}\n\t }",
"@ApiResponses(value = {@ApiResponse(code = 400, message = \"Invalid file uploaded\")})\n @PostMapping(\"/mcarrington1/portal/1.0.0/upload\")\n public ResponseEntity<?> uploadFile(@RequestParam(\"file\") MultipartFile file) {\n try {\n String imageUrl = amazonS3Service.uploadImageToAmazon(file);\n return ResponseEntity.ok(imageUrl);\n } catch (Exception e) {\n System.out.println(\"Exception occurred :\" + e);\n return new ResponseEntity<>(\"Error Occurred: \" + e, HttpStatus.BAD_REQUEST);\n }\n }",
"@Test\r\n\tpublic void testCompressing() throws ClassNotFoundException,\r\n\t\t\tInstantiationException, IllegalAccessException {\n\r\n\t\tAbstractStream abstractStream = Factory\r\n\t\t\t\t.getStream(\"by.bsu.decorator.bean.FileStream\");\r\n\t\tCompressingStream stream = (CompressingStream) Factory\r\n\t\t\t\t.getStream(\"by.bsu.decorator.bean.CompressingStream\");\r\n\t\tstream.setAbstractStream(abstractStream);\r\n\t\tString str = stream.handleBufferFull();\r\n\r\n\t\tbyte[] b = new byte[10];\r\n\t\tfor (int i = 0; i < 10; i++)\r\n\t\t\tb[i] = (byte) i;\r\n\t\tstream.putByte(b);\r\n\t\tSystem.out.println(str);\r\n\t\tassertEquals(\"Compressing Stream. File Stream. \", str);\r\n\t}",
"private void doMultipartFormDataPostRequest(String token, String url, byte[] fileData, String filename) throws Exception {\n\n\n CloseableHttpClient client = HttpClients.createDefault();\n\n try {\n HttpPost httpPost = new HttpPost(getBaseUrl() + url );\n httpPost.setHeader(\"X-Authentication\", token);\n\n\n MultipartEntityBuilder multipartBuilder = MultipartEntityBuilder.create();\n\n if (fileData == null || fileData.length <= 0) {\n throw new MfilesOperationException(\"The byte array must not be null\");\n }\n\n if (StringUtils.isBlank(filename)) {\n throw new MfilesOperationException( \"Filename must not be blank or null...\" );\n }\n\n File tempDir = FileUtils.getTempDirectory();\n String reversedFilename = StringUtils.reverse(filename);\n //get the first '.'\n int dotIndex = reversedFilename.indexOf('.');\n String extension = reversedFilename.substring(0, (dotIndex + 1));\n extension = StringUtils.reverse(extension);\n\n //Generate a random string to append to the name of the file\n //We do this to prevent a situation whereby multiple users\n //upload files that have the same name and extension.\n String tempFileName = filename.substring(0, filename.length() - extension.length()) + \"_\" + System.currentTimeMillis();\n\n tempFileName += extension;\n\n final File fileToUpload = new File(tempDir + File.separator + tempFileName);\n\n try {\n FileUtils.writeByteArrayToFile(fileToUpload, fileData);\n }catch(Exception ex) {\n LOG.error(\"An exception occurred while writing byte array data to the file for upload\", ex);\n throw new MfilesOperationException(ex.getMessage());\n } finally {\n\n }\n\n final FileBody fileBody = new FileBody(fileToUpload);\n\n multipartBuilder.addPart(\"file\", fileBody);\n\n //OR\n //multipartBuilder.addBinaryBody(\"file\", file, ContentType.APPLICATION_OCTET_STREAM, \"file.ext\");\n\n org.apache.http.HttpEntity multipart = multipartBuilder.build();\n httpPost.setEntity(multipart);\n\n System.out.println(\"executing file upload request \" + httpPost.getRequestLine());\n\n CloseableHttpResponse response = client.execute(httpPost);\n try {\n System.out.println(\"----------------------------------------\");\n System.out.println(\"---------Response from server-----------\");\n System.out.println(response.getStatusLine());\n System.out.println(\"----------------------------------------\");\n\n org.apache.http.HttpEntity resEntity = response.getEntity();\n if (resEntity != null) {\n BufferedReader br = new BufferedReader(new InputStreamReader(resEntity.getContent()));\n String output = null;\n\n while ((output = br.readLine()) != null) {\n System.out.println(output);\n }\n }\n\n EntityUtils.consume(resEntity);\n\n } finally {\n response.close();\n }\n } finally {\n client.close();\n }\n }",
"String saveData(MultipartFile md5File) throws IOException;",
"public Builder clearS3() {\n bitField0_ = (bitField0_ & ~0x00000004);\n s3_ = getDefaultInstance().getS3();\n onChanged();\n return this;\n }",
"public String StoreFile(MultipartFile file) {\n \t \t\n // Normalize file name\n String fileName = StringUtils.cleanPath(file.getOriginalFilename());\n \n // Get any exiting versions of the file\n String[] fileNames = GetAllFileNames(fileName);\n int iNextIndex = fileNames.length + 1;\n \n // Increment the version of the file. All files start with 1.\n String fileNameIndexed = Integer.toString(iNextIndex) + \"_\" + fileName;\n \n try \n {\n // Check if the file's name contains invalid characters. ('_' if not valid because it's used to track version.)\n if(fileName.contains(\"..\") || fileName.contains(\"_\")) {\n throw new FileStorageException(\"Sorry! Filename contains invalid path sequence \" + fileName);\n }\n\n // Copy file to the target location (Replacing existing file with the same name)\n Path targetLocation = this.fileStorageLocation.resolve(fileNameIndexed);\n Files.copy(file.getInputStream(), targetLocation, StandardCopyOption.REPLACE_EXISTING);\n\n return fileName;\n } \n catch (IOException ex) \n {\n throw new FileStorageException(\"Could not store file \" + fileName + \". Please try again!\", ex);\n }\n }"
]
| [
"0.63553864",
"0.62337786",
"0.6097805",
"0.6094613",
"0.5967084",
"0.5574816",
"0.55452204",
"0.55143666",
"0.534648",
"0.5344876",
"0.53184634",
"0.5285713",
"0.5187639",
"0.5154498",
"0.51164365",
"0.50472194",
"0.50179183",
"0.4979639",
"0.49488342",
"0.49210122",
"0.49110714",
"0.49028206",
"0.48853707",
"0.48837727",
"0.48116624",
"0.47858846",
"0.47834074",
"0.47770458",
"0.47631273",
"0.47251448",
"0.4697551",
"0.4696392",
"0.46677896",
"0.4667059",
"0.46579492",
"0.46574092",
"0.46377134",
"0.46295202",
"0.46014988",
"0.45885196",
"0.4560708",
"0.45453298",
"0.45138445",
"0.44951096",
"0.4492847",
"0.4486292",
"0.4470055",
"0.4463907",
"0.4462355",
"0.44592398",
"0.445889",
"0.4448511",
"0.44419754",
"0.44355732",
"0.44347015",
"0.4434343",
"0.4434007",
"0.44327274",
"0.44295394",
"0.442485",
"0.4422197",
"0.44219354",
"0.44214264",
"0.44195187",
"0.44122204",
"0.44109023",
"0.43961954",
"0.4395151",
"0.4369763",
"0.4358936",
"0.43492493",
"0.43467358",
"0.43423238",
"0.4339616",
"0.43339348",
"0.43305418",
"0.43212458",
"0.43121558",
"0.4309457",
"0.43061748",
"0.4302767",
"0.4295896",
"0.42892274",
"0.42725673",
"0.42724147",
"0.42579716",
"0.42497644",
"0.42469355",
"0.42324066",
"0.4223113",
"0.42132288",
"0.4211159",
"0.4210447",
"0.4207147",
"0.4205207",
"0.4202247",
"0.42014483",
"0.4194265",
"0.41936103",
"0.41899776"
]
| 0.5894997 | 5 |
Takes an input stream, upload key, and object metadata to upload an object to s3. | public PutObjectResult upload(InputStream inputStream, String uploadKey, ObjectMetadata metadata) {
PutObjectRequest putObjectRequest = new PutObjectRequest(bucketName, uploadKey, inputStream, metadata);
putObjectRequest.setCannedAcl(CannedAccessControlList.PublicRead);
PutObjectResult putObjectResult = s3Client.putObject(putObjectRequest);
IOUtils.closeQuietly(inputStream);
return putObjectResult;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String putObject(InputStream in, String fileName, String id)\n {\n File f;\n MimetypesFileTypeMap mimetypesFileTypeMap = new MimetypesFileTypeMap();\n try\n {\n logger.info(\"run in the putObject1 try block\");\n ObjectMetadata ObjectMetadata = new ObjectMetadata();\n Map<String, String> userMetadata = new HashMap<String, String>();\n userMetadata.put(\"Name\", fileName);\n f = new File(fileName);\n userMetadata.put(\"Content-Type\", mimetypesFileTypeMap.getContentType(f));\n String keyName = CommonUtil.getKeyName(bucketName, id, fileName);\n userMetadata.put(\"key_name\", keyName);\n userMetadata.put(\"user\", id);\n ObjectMetadata.setUserMetadata(userMetadata);\n s3.putObject(bucketName, keyName, in, ObjectMetadata);\n return keyName;\n }\n catch (SdkClientException e)\n {\n logger.error(e.getMessage());\n return null;\n }\n }",
"public com.amazon.s3.PutObjectResponse putObject(com.amazon.s3.PutObject putObject);",
"public String upload(String bucket, String path, String filename, InputStream is, String contentType)\r\n\t{\r\n\t\t/* Refresh the connection, if necessary. */\r\n\t\tif (isRefreshConnection())\r\n\t\t\tdoRefreshConnection();\r\n\t\t/*\r\n\t\t * The content length HAS to be set because we're not providing a File to the\r\n\t\t * PutObjectRequest but a stream.\r\n\t\t * Uploading stuff to S3 requires the amount of data to be specified before the upload. If\r\n\t\t * that is not done then we'd have to buffer the\r\n\t\t * entire stream (=File) before the upload. Setting the content length circumvents that.\r\n\t\t */\r\n\r\n\t\t/* Proceed with the actual upload. */\r\n\t\ttry\r\n\t\t{\r\n\t\t\tString prefix = FilenameUtils.getBaseName(filename);\r\n\t\t\tString suffix = FilenameUtils.getExtension(filename);\r\n\r\n\t\t\tFile file = File.createTempFile(prefix, suffix);\r\n\t\t\tOutputStream outputStream = new FileOutputStream(file);\r\n\t\t\tIOUtils.copy(is, outputStream);\r\n\t\t\toutputStream.close();\r\n\t\t\tS3Object object = new S3Object(file);\r\n\t\t\tobject.setName(sanitizePath(path) + filename);\r\n\r\n\t\t\tS3Bucket publicBucket = service.getBucket(bucket);\r\n\t\t\tAccessControlList bucketAcl = service.getBucketAcl(publicBucket);\r\n\t\t\tbucketAcl.grantPermission(GroupGrantee.ALL_USERS, Permission.PERMISSION_READ);\r\n\t\t\tpublicBucket.setAcl(bucketAcl);\r\n\t\t\tobject.setAcl(bucketAcl);\r\n\t\t\tservice.putObject(publicBucket, object);\r\n\t\t\tString pathtToFile = \"https://\" + publicBucket.getName() + \".\" + service.getEndpoint() + \"/\" + object.getKey();\r\n\t\t\tSystem.out.println(\"View public object contents here:\" + pathtToFile);\r\n\t\t\treturn pathtToFile;\r\n\t\t}\r\n\t\tcatch (S3ServiceException ase)\r\n\t\t{\r\n\t\t\tase.printStackTrace();\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn \"\";\r\n\t}",
"public void store(S3Object s3Object) throws S3Exception {\n\t\t\r\n\t}",
"@SneakyThrows\n public void writeToBucket(\n final String key,\n final Map<String, String> metadataMap,\n final Object object,\n final String contentType,\n final ObjectMapper mapper) {\n\n // Write the object to AWS\n AmazonS3 s3Client = s3ClientService.s3Client();\n\n if (!s3Client.doesBucketExistV2(bucketConfig.getName())) {\n if (bucketConfig.isCreate()) {\n log.info(\"{} does not exist. Creating it.\", bucketConfig.getName());\n s3Client.createBucket(bucketConfig.getName());\n } else {\n throw new RuntimeException(bucketConfig.getName() + \" does not exist.\");\n }\n }\n\n final String unifiedResult = mapper.writeValueAsString(object);\n log.info(\"Storing unified result {} to AWS S3 {}.\", key, bucketConfig.getName());\n\n // Upload a text string as a new object as input stream with metadata.\n ObjectMetadata metadata = new ObjectMetadata();\n final byte[] contentAsBytes = unifiedResult.getBytes(StandardCharsets.UTF_8);\n metadata.setContentLength(contentAsBytes.length);\n metadata.setContentType(contentType);\n metadataMap.forEach((k, v) -> metadata.addUserMetadata(k, v));\n try (ByteArrayInputStream contentsAsStream = new ByteArrayInputStream(contentAsBytes)) {\n s3Client.putObject(\n new PutObjectRequest(bucketConfig.getName(), key, contentsAsStream, metadata));\n }\n }",
"public void save(String path, String name, Optional<Map<String,String>> opMetadata, InputStream inputStream){\n ObjectMetadata objectMetadata=new ObjectMetadata();\n opMetadata.ifPresent(map->{\n if(!map.isEmpty()){\n map.forEach(objectMetadata::addUserMetadata);\n }\n });\n try{\n s3.putObject(path,name,inputStream,objectMetadata);\n }catch (AmazonServiceException e){\n }\n }",
"S3UploadResponse uploadFileToS3(MultipartFile part, Integer importBelong) throws IOException;",
"public void put(String key, InputStream stream, String name) {\n put(key, stream, name, null);\n }",
"public void put(String key, InputStream stream) {\n put(key, stream, null);\n }",
"public static String putObjectToS3(String key, String text) {\n String bucketName = System.getenv(\"BUCKET_NAME\");\n PutObjectRequest putObjectRequest = PutObjectRequest.builder()\n .bucket(bucketName)\n .key(key)\n .build();\n RequestBody body = RequestBody.fromString(text);\n client.putObject(putObjectRequest, body);\n\n return String.format(\"https://%s.s3.amazonaws.com/%s\",\n bucketName, URLEncoder.encode(key, StandardCharsets.UTF_8));\n }",
"public void put(String key, InputStream stream, String name, String contentType) {\n if (key != null && stream != null) {\n mStreamParams.put(key, new StreamWrapper(stream, name, contentType));\n }\n }",
"@Override\n public String upload(String bucket, String key, String file) {\n byte[] data = (file.contains(\",\")) ? Base64.getDecoder().decode(file.substring(file.indexOf(\",\") + 1))\n : Base64.getDecoder().decode(file);\n\n SaveImage.saveImage(\"storage/\", bucket + \"_\" + key, new ByteArrayInputStream(data));\n\n try {\n Regions clientRegion = Regions.fromName(AWSUtil.getValue(\"region\"));\n\n AWSCredentials credentials = new BasicAWSCredentials(AWSUtil.getValue(\"accesskey\"),\n AWSUtil.getValue(\"secretkey\"));\n\n AmazonS3 s3Client = AmazonS3ClientBuilder.standard()\n .withCredentials(new AWSStaticCredentialsProvider(credentials)).withRegion(clientRegion).build();\n\n File arquivo = new File(\"storage/\" + bucket + \"_\" + key);\n s3Client.putObject(bucket, key, arquivo);\n\n arquivo.delete(); // remove o cache local depois do upload\n\n return \"SUCCESS\";\n }\n //\n catch (AmazonServiceException e) {\n err.exception(\"AmazonServiceException\", e);\n }\n //\n catch (SdkClientException e) {\n err.exception(\"SdkClientException\", e);\n }\n\n return \"FAILURE\";\n }",
"String uploadFileFromBody(AmazonS3 connection,\n String bucketName,\n String path,\n String body,\n Boolean usingFilePicker,\n Date expiryDateTime)\n throws InterruptedException, AppsmithPluginException {\n\n byte[] payload;\n MultipartFormDataDTO multipartFormDataDTO;\n try {\n multipartFormDataDTO = objectMapper.readValue(\n body,\n MultipartFormDataDTO.class);\n } catch (IOException e) {\n throw new AppsmithPluginException(\n AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,\n \"Unable to parse content. Expected to receive an object with `data` and `type`\"\n );\n }\n if (multipartFormDataDTO == null) {\n throw new AppsmithPluginException(\n AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,\n \"Could not find any data. Expected to receive an object with `data` and `type`\"\n );\n }\n if (Boolean.TRUE.equals(usingFilePicker)) {\n\n String encodedPayload = (String) multipartFormDataDTO.getData();\n /*\n * - For files uploaded using Filepicker.xyz.base64, body format is \"<content-type>;base64,<actual-\n * base64-encoded-payload>\".\n * - Strip off the redundant part in the beginning to get actual payload.\n */\n if (encodedPayload.contains(BASE64_DELIMITER)) {\n List<String> bodyArrayList = Arrays.asList(encodedPayload.split(BASE64_DELIMITER));\n encodedPayload = bodyArrayList.get(bodyArrayList.size() - 1);\n }\n\n try {\n payload = Base64.getDecoder().decode(encodedPayload);\n } catch (IllegalArgumentException e) {\n throw new AppsmithPluginException(\n AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,\n \"File content is not base64 encoded. File content needs to be base64 encoded when the \" +\n \"'File Data Type: Base64/Text' field is selected 'Yes'.\"\n );\n }\n } else {\n payload = ((String) multipartFormDataDTO.getData()).getBytes();\n }\n\n InputStream inputStream = new ByteArrayInputStream(payload);\n TransferManager transferManager = TransferManagerBuilder.standard().withS3Client(connection).build();\n final ObjectMetadata objectMetadata = new ObjectMetadata();\n // Only add content type if the user has mentioned it in the body\n if (multipartFormDataDTO.getType() != null) {\n objectMetadata.setContentType(multipartFormDataDTO.getType());\n }\n transferManager.upload(bucketName, path, inputStream, objectMetadata).waitForUploadResult();\n\n ArrayList<String> listOfFiles = new ArrayList<>();\n listOfFiles.add(path);\n ArrayList<String> listOfUrls = getSignedUrls(connection, bucketName, listOfFiles, expiryDateTime);\n if (listOfUrls.size() != 1) {\n throw new AppsmithPluginException(\n AppsmithPluginError.PLUGIN_ERROR,\n \"Appsmith has encountered an unexpected error when fetching url from AmazonS3 after file \" +\n \"creation. Please reach out to Appsmith customer support to resolve this.\"\n );\n }\n String signedUrl = listOfUrls.get(0);\n\n return signedUrl;\n }",
"void saveFrom(String key, InputStream stream);",
"public void save(String path,\n String fileName,\n Optional<Map<String, String>> optionalMetadata,\n InputStream inputStream) {\n ObjectMetadata metadata = new ObjectMetadata();\n optionalMetadata.ifPresent(map -> {\n if (!map.isEmpty()) {\n map.forEach((key,value)-> metadata.addUserMetadata(key,value));\n }\n });\n try {\n s3.putObject(path, fileName, inputStream, metadata);\n } catch (AmazonServiceException e) {\n throw new IllegalStateException(\"Failed to store file to S3.\", e);\n }\n }",
"private static void storingTheObjectToDisk1(InputStream objectContent, String key) {\n FileOutputStream fos = null;\n BufferedOutputStream bos = null;\n byte[] buff = new byte[50*1024];\n int count;\n try {\n bos = new BufferedOutputStream(new FileOutputStream(\"/home/ubuntu/\" + key));\n while( (count = objectContent.read(buff)) != -1)\n {\n bos.write(buff, 0, count);\n }\n bos.close();\n objectContent.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public S3_Upload_Image() {super(TAG);}",
"@Test\n public void testUploadToAmazonS3() throws Exception {\n String uploadFileName = \"test_upload.jpg\";\n byte[] uploadFilenameBytes = IOUtils.toByteArray(new ClassPathResource(uploadFileName).getInputStream());\n\n MockMultipartFile file = new MockMultipartFile(\"file\", uploadFileName, null, new ClassPathResource(uploadFileName).getInputStream());\n\n // make request to our server\n byte[] result = mockMvc.perform(fileUpload(\"/api/v1/storage/upload\")\n .file(file).with(user(\"[email protected]\").roles(\"USER\", \"ADMIN\")))\n .andExpect(status().is(201)).andReturn().getResponse().getContentAsByteArray();\n\n StorageDocumentMeta storageDocumentMeta = objectMapper.readValue(result, StorageDocumentMeta.class);\n Assert.assertNotNull(storageDocumentMeta);\n Assert.assertNotNull(storageDocumentMeta.getPublicUrl());\n\n // get real request to aws s3 and assert to content of file in our FS\n Assert.assertEquals(IOUtils.toByteArray(new URL(storageDocumentMeta.getPublicUrl())), uploadFilenameBytes);\n }",
"private Future<Void> putObjectS3(final String aPath) {\n final Promise<Void> promise = Promise.promise();\n\n try {\n myAmazonS3.putObject(s3Bucket, IMAGE_JPX, new File(aPath));\n promise.complete();\n } catch (final AmazonServiceException details) {\n LOGGER.error(details.getErrorMessage());\n promise.fail(details.getErrorMessage());\n }\n\n return promise.future();\n }",
"public GenericS3Input create(GenericS3Input genericS3Input) throws BitmovinException {\n try {\n return this.apiClient.create(genericS3Input).getData().getResult();\n } catch (Exception ex) {\n throw buildBitmovinException(ex);\n }\n }",
"public interface S3Handler extends S3ObjectStreaming {\n\n /**\n * Called after a new instance has been created.\n * <p>\n * <i>IMPORTANT</i>: Your S3Handler must use this class, the S3HandlerService will call it.\n *\n * @param desc\n * @throws NuxeoException\n * @since 8.2\n */\n public void initialize(S3HandlerDescriptor desc) throws NuxeoException;\n\n /**\n * Called when the S3Handler is removed. Notice that this should not happen very often. Most of the time, if not\n * every time, S3HandlerService creates and initializes the contributed handles at startup and releases them when\n * the server is shut down.\n *\n * @since 8.2\n */\n public void cleanup();\n\n /**\n * The handler uses the bucket as set in the S3HandlerDescriptor at initialization time. But this can be modified\n * dynamically.\n * <p>\n * Notice that an easy way to handle different buckets on the same S3 instance is to contribute different S3Handler\n * in the XML. This way, there is no need to switch buckets, just use the correct handler.\n *\n * @param inBucket\n * @since 8.2\n */\n public void setBucket(String inBucket);\n\n /**\n * @return the AmazonS3 instance created for this handler\n * @since 8.2\n */\n public AmazonS3 getS3();\n\n /**\n * Uploads inFile to S3, using the \"Current bucket\"\n *\n * @param inKey\n * @param inFile\n * @return true if the file could be uploaded with no error\n * @throws NuxeoException\n * @since 8.2\n */\n public boolean sendFile(String inKey, File inFile) throws NuxeoException;\n\n /**\n * Downloads the file from S3 using the \"current bucket\", saving it to inDestFile\n * <p>\n * <code>fileName</code> should be optional (not required by the interface)\n *\n * @param inKey\n * @param inDestFile\n * @return a Blob of the downloaded file\n * @throws NuxeoException\n * @since 8.2\n */\n public Blob downloadFile(String inKey, File inDestFile);\n\n /**\n * Downloads the file from S3 using the \"current bucket\". Should return\n * a temporary blob (becomes permanent if stored in a document)\n *\n * @param inKey\n * @param inFileName\n * @return a Blob of the downloaded file\n * @throws NuxeoException\n * @since 8.2\n */\n public Blob downloadFile(String inKey, String inFileName);\n\n /**\n * Get a SequenceInputStream to the object. The goal of using a SequenceInputStream is to avoid time out while\n * reading large, big objects.\n * <br>\n * pieceSize is the size in bytes for each sequential stream. It set the number of streams created (object size /\n * pieceSize). If 0, a default value is used.\n * Streams are open/close one after the other.\n * <br>\n * The caller can call close() any time, this will close all the streams.\n * <br>\n * See S3ObjectSequentialStream for more info.\n * \n * @param key\n * @param pieceSize\n * @return the SequenceInputStream\n * @throws IOException\n * @since 2021.35\n */\n public static long DEFAULT_PIECE_SIZE = 100 * 1024 * 1024;\n\n /**\n * @see S3ObjectStreaming#getSequenceInputStream(String, long)\n */\n public SequenceInputStream getSequenceInputStream(String key, long pieceSize) throws IOException;\n\n /**\n * @see S3ObjectStreaming#readBytes(String, long, long)\n */\n public byte[] readBytes(String key, long start, long len) throws IOException;\n\n /**\n * Deletes the file from S3 using the \"current bucket\", returns true if succesful\n *\n * @param inKey\n * @return\n * @throws NuxeoException\n * @since 8.2\n */\n public boolean deleteFile(String inKey) throws NuxeoException;\n\n /**\n * Builds a temporary signed URL for the object and returns it.\n * <p>\n * Uses the \"current bucket\"\n * <p>\n * If <code>durationInSeconds</code> is <= 0, the duration set in the XML configuration is used (or the default\n * duration)\n * <p>\n * The interface allows <code>contentType</code> and <code>contentDisposition</code> to be empty. But it is\n * recommended to set them to make sure the is no ambiguity when the URL is used (a key without a file extension for\n * example)\n *\n * @param objectKey\n * @param durationInSeconds\n * @param contentType\n * @param contentDisposition\n * @return the URL to the file on S3\n * @throws NuxeoException\n * @since 8.2\n */\n public String buildPresignedUrl(String inKey, int durationInSeconds, String contentType, String contentDisposition)\n throws NuxeoException;\n\n /**\n * Builds a temporary signed URL for the object and returns it.\n * <p>\n * Uses <code>inBucket</code>. If it is empty, uses the \"current bucket\"\n * <p>\n * If <code>durationInSeconds</code> is <= 0, the duration set in the XML configuration is used (or the default\n * duration)\n * <p>\n * The interface allows <code>contentType</code> and <code>contentDisposition</code> to be empty. But it is\n * recommended to set them to make sure the is no ambiguity when the URL is used (a key without a file extension for\n * example)\n *\n * @param inBucket\n * @param inKey\n * @param durationInSeconds\n * @param contentType\n * @param contentDisposition\n * @return the URL to the file on S3\n * @throws NuxeoException\n * @since 8.2\n */\n public String buildPresignedUrl(String inBucket, String inKey, int durationInSeconds, String contentType,\n String contentDisposition) throws NuxeoException;\n\n /**\n * Returns true if the key exists in the current bucket.\n * <p>\n * <b>IMPORTANT</b>: This method should <i>never</i> uses a CacheForKeyExists, and always requests the key on S3\n *\n * @param inBucket\n * @param inKey\n * @return true if the key exists in the \"current bucket\"\n * @since 8.2\n */\n public boolean existsKeyInS3(String inBucket, String inKey);\n\n /**\n * Returns true if the key exists in the bucket.\n * <p>\n * <b>IMPORTANT</b>: This method should <i>never</i> uses a CacheForKeyExists, and always requests the key on S3\n *\n * @param inKey\n * @return true if the key exists in the bucket\n * @since 8.2\n */\n public boolean existsKeyInS3(String inKey);\n\n /**\n * Returns true if the key exists on S3 (using the \"current bucket\"), and should first check in the\n * CacheForExistsKey (if the configuration allows usage of the cache)\n *\n * @param inKey\n * @return true is the key exists on S3. May use the cache\n * @since 8.2\n */\n public boolean existsKey(String inKey);\n\n /**\n * Returns true if the key exists on S3, in the bucket, and should first check in the CacheForExistsKey (if the\n * Configuration allows usage of the cache)\n *\n * @param bucket\n * @param inKey\n * @return\n * @since 8.2\n */\n public boolean existsKey(String bucket, String inKey);\n\n /**\n * Gets the object metadata without fetching the object itself,\n * as returned by AWS SDK\n * \n * @param inKey\n * @return\n * @since TODO\n */\n public ObjectMetadata getObjectMetadata(String inKey);\n\n /**\n * Gets the object metadata without fetching the object itself.\n * Values returned are whatever is stored as system metadata,\n * such as \"Content-Type\", \"Content-Length\", \"ETag\", ...\n * _plus_ the following properties:\n * <ul>\n * <li>\"bucket\": the bucket name (same as the one defined for the S3Handler)</li>\n * <li>\"objectKey\": the object key (same as the inKey parameter)</li>\n * <li>\"userMetadata\": An object holding the user metadata ({} if no user metadata). All values are String.</li>\n * </ul>\n * If AWS returns a \"not found\" error, the method returns null and adds a WARN to the log. Any other error is thrown\n * \n * @param inKey\n * @return a JsonNode of all the metadata, including userMetadata\n * @throws JsonProcessingException\n * @since 2.0\n */\n public JsonNode getObjectMetadataJson(String inKey) throws JsonProcessingException;\n\n /**\n * Return the current bucket\n *\n * @return the current bucket\n * @since 8.2\n */\n public String getBucket();\n\n /**\n * returns the default duration used to build temp. signed URLs\n *\n * @return the default duration used to build temp. signed URLs\n * @since 8.2\n */\n public int getSignedUrlDuration();\n\n /**\n * Just a convenient method, saving one line of code (getting the service)\n *\n * @param name\n * @return the S3Handler contributed with this name, null if not found\n * @since 8.2\n */\n public static S3Handler getS3Handler(String name) {\n\n S3HandlerService s3HandlerService = Framework.getService(S3HandlerService.class);\n\n if (StringUtils.isBlank(name)) {\n name = Constants.DEFAULT_HANDLER_NAME;\n }\n\n return s3HandlerService.getS3Handler(name);\n\n }\n\n /**\n * Generic method used to build a message when an error is thrown by AWS\n *\n * @param e\n * @return a string describing the error\n * @since 8.2\n */\n public static String buildDetailedMessageFromAWSException(Exception e) {\n\n String message = \"\";\n\n if (e instanceof AmazonServiceException) {\n AmazonServiceException ase = (AmazonServiceException) e;\n message = \"Caught an AmazonServiceException, which \" + \"means your request made it \"\n + \"to Amazon S3, but was rejected with an error response\" + \" for some reason.\";\n message += \"\\nError Message: \" + ase.getMessage();\n message += \"\\nHTTP Status Code: \" + ase.getStatusCode();\n message += \"\\nAWS Error Code: \" + ase.getErrorCode();\n message += \"\\nError Type: \" + ase.getErrorType();\n message += \"\\nRequest ID: \" + ase.getRequestId();\n\n } else if (e instanceof AmazonClientException) {\n AmazonClientException ace = (AmazonClientException) e;\n message = \"Caught an AmazonClientException, which \" + \"means the client encountered \"\n + \"an internal error while trying to \" + \"communicate with S3, \"\n + \"such as not being able to access the network.\";\n message += \"\\nError Message: \" + ace.getMessage();\n\n } else {\n message = e.getMessage();\n }\n\n return message;\n }\n\n /**\n * Generic helper telling the caller if an error catched is a \"Missing Key on S3\" error\n *\n * @param e\n * @return true if the error is \"MIssing Key\" error\n * @since 8.2\n */\n public static boolean errorIsMissingKey(AmazonClientException e) {\n if (e instanceof AmazonServiceException) {\n AmazonServiceException ase = (AmazonServiceException) e;\n return (ase.getStatusCode() == 404) || \"NoSuchKey\".equals(ase.getErrorCode())\n || \"Not Found\".equals(e.getMessage());\n }\n return false;\n }\n\n}",
"public JSONObject read(InputStream uploadedInputStream);",
"public S3Object createS3Object(Bucket bucket, String key,\r\n\t\t\tCanonicalUser owner) throws IOException {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic CCSPutObjectResponse putObject(String bucketName, String ccsObjectPath, byte[] bytes) {\n\t\treturn null;\n\t}",
"public void s3upload(String bucketName, String fileName, File file) throws IOException {\n\n System.out.println(\"------------- CustomS3Client --------------\");\n System.out.println(\"Inside s3upload bucket Name: \"+bucketName+\" and file Name: \"+ fileName);\n\n s3 = AmazonS3ClientBuilder.standard()\n .withCredentials(new ProfileCredentialsProvider())\n .withRegion(\"us-east-1\")\n .build();\n\n // List current buckets.\n ListMyBuckets(bucketName);\n\n //upload the file\n s3.putObject(bucketName, fileName, file);\n\n System.out.println(\"------------- Success --------------\");\n\n }",
"public PutObjectResult upload(MultipartFile multipartFile, String uploadKey) throws IOException {\n InputStream inputStream = multipartFile.getInputStream();\n\n ObjectMetadata metadata = new ObjectMetadata();\n metadata.setContentLength(multipartFile.getSize());\n metadata.setContentType(multipartFile.getContentType());\n\n return upload(inputStream, uploadKey, metadata);\n }",
"public com.amazon.s3.PutObjectInlineResponse putObjectInline(com.amazon.s3.PutObjectInline putObjectInline);",
"public abstract void addObject(LocalAbstractObject object) throws BucketStorageException;",
"public List<String> putObject(MultipartRequest request, String id)\n {\n List<String> keyNameList = new ArrayList<String>();\n try\n {\n Map<String, MultipartFile> filesMap = request.getFileMap();\n Set<String> nameSet = filesMap.keySet();\n Iterator<String> it = nameSet.iterator();\n while (it.hasNext())\n {\n MultipartFile file = filesMap.get(it.next());\n ObjectMetadata ObjectMetadata = new ObjectMetadata();\n Map<String, String> userMetadata = new HashMap<String, String>();\n userMetadata.put(\"Name\", file.getOriginalFilename());\n userMetadata.put(\"Content-Type\", file.getContentType());\n String keyName = CommonUtil.getKeyName(bucketName, id, file.getOriginalFilename());\n userMetadata.put(\"key_name\", keyName);\n userMetadata.put(\"user\", id);\n ObjectMetadata.setUserMetadata(userMetadata);\n InputStream in = file.getInputStream();\n s3.putObject(bucketName, keyName, in, ObjectMetadata);\n keyNameList.add(keyName);\n }\n }\n catch (AmazonS3Exception e)\n {\n logger.error(e.getMessage());\n }\n catch (IOException e)\n {\n logger.error(e.getMessage());\n }\n return keyNameList;\n }",
"public void uploadObject() {\n\n\t}",
"List<String> uploadMultipleFilesFromBody(AmazonS3 connection,\n String bucketName,\n String path,\n String body,\n Boolean usingFilePicker,\n Date expiryDateTime)\n throws InterruptedException, AppsmithPluginException {\n\n\n List<MultipartFormDataDTO> multipartFormDataDTOs;\n try {\n multipartFormDataDTOs = Arrays.asList(objectMapper.readValue(\n body,\n MultipartFormDataDTO[].class));\n } catch (IOException e) {\n throw new AppsmithPluginException(\n AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,\n \"Unable to parse content. Expected to receive an object with `data` and `type`\"\n );\n }\n\n ArrayList<String> listOfFiles = new ArrayList<>();\n multipartFormDataDTOs.forEach(multipartFormDataDTO -> {\n final String filePath = path + multipartFormDataDTO.getName();\n byte[] payload;\n if (Boolean.TRUE.equals(usingFilePicker)) {\n\n String encodedPayload = (String) multipartFormDataDTO.getData();\n /*\n * - For files uploaded using Filepicker.xyz.base64, body format is \"<content-type>;base64,<actual-\n * base64-encoded-payload>\".\n * - Strip off the redundant part in the beginning to get actual payload.\n */\n if (encodedPayload.contains(BASE64_DELIMITER)) {\n List<String> bodyArrayList = Arrays.asList(encodedPayload.split(BASE64_DELIMITER));\n encodedPayload = bodyArrayList.get(bodyArrayList.size() - 1);\n }\n\n try {\n payload = Base64.getDecoder().decode(encodedPayload);\n } catch (IllegalArgumentException e) {\n throw new AppsmithPluginException(\n AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,\n \"File content is not base64 encoded. File content needs to be base64 encoded when the \" +\n \"'File Data Type: Base64/Text' field is selected 'Yes'.\"\n );\n }\n } else {\n payload = ((String) multipartFormDataDTO.getData()).getBytes();\n }\n\n InputStream inputStream = new ByteArrayInputStream(payload);\n TransferManager transferManager = TransferManagerBuilder.standard().withS3Client(connection).build();\n final ObjectMetadata objectMetadata = new ObjectMetadata();\n // Only add content type if the user has mentioned it in the body\n if (multipartFormDataDTO.getType() != null) {\n objectMetadata.setContentType(multipartFormDataDTO.getType());\n }\n try {\n transferManager.upload(bucketName, filePath, inputStream, objectMetadata).waitForUploadResult();\n } catch (InterruptedException e) {\n throw new AppsmithPluginException(\n AppsmithPluginError.PLUGIN_ERROR,\n \"File upload interrupted.\"\n );\n }\n\n listOfFiles.add(filePath);\n });\n\n return getSignedUrls(connection, bucketName, listOfFiles, expiryDateTime);\n }",
"public void upload(final String S3SubFolder, final String S3ObjectPath, final File fileLocation, final UploadListener uploadListener) {\n\n String S3ObjectPathRandom = null;\n TransferObserver observer;\n\n if (S3ObjectPath == null) {\n S3ObjectPathRandom = System.currentTimeMillis() + fileLocation.getAbsolutePath().substring(fileLocation.getAbsolutePath().lastIndexOf(\".\"));\n observer = transferUtility.upload(Config.BUCKET_NAME + S3SubFolder, S3ObjectPathRandom, fileLocation);\n } else {\n observer = transferUtility.upload(Config.BUCKET_NAME + S3SubFolder, S3ObjectPath, fileLocation);\n\n }\n\n final String fS3ObjectPathRandom = S3ObjectPathRandom;\n observer.setTransferListener(new TransferListener() {\n\n @Override\n public void onStateChanged(int id, TransferState state) {\n\n idOfTransfer = id;\n\n mState = state;\n if (S3ObjectPath == null)\n checkState(id, fileLocation, S3SubFolder, fS3ObjectPathRandom, uploadListener);\n else\n checkState(id, fileLocation, S3SubFolder, S3ObjectPath, uploadListener);\n }\n\n\n @Override\n public void onProgressChanged(int id, long bytesCurrent, long bytesTotal) {\n\n if (idOfTransfer != null) {\n\n idOfTransfer = id;\n }\n\n try {\n\n uploadListener.onProgressChanged(id, bytesCurrent, bytesTotal);\n } catch (IllegalStateException ignored) {\n }\n\n\n }\n\n @Override\n public void onError(int id, Exception ex) {\n\n if (idOfTransfer != null) {\n\n idOfTransfer = id;\n }\n\n uploadListener.onUploadError(id, fileLocation, ex);\n\n\n }\n });\n\n\n }",
"@Test\n public void testPutFileMethodValidS3Path() throws GenieException {\n final PutObjectResult putObjectResult = Mockito.mock(PutObjectResult.class);\n Mockito.when(this.s3Client.putObject(Mockito.any(), Mockito.any(), Mockito.any(File.class))).thenReturn(putObjectResult);\n final ArgumentCaptor<String> bucketArgument = ArgumentCaptor.forClass(String.class);\n final ArgumentCaptor<String> keyArgument = ArgumentCaptor.forClass(String.class);\n s3FileTransfer.putFile(S3FileTransferImplUnitTests.LOCAL_PATH, S3FileTransferImplUnitTests.S3_PATH);\n Mockito.verify(this.s3Client).putObject(bucketArgument.capture(), keyArgument.capture(), Mockito.any(File.class));\n Assert.assertEquals(S3FileTransferImplUnitTests.S3_BUCKET, bucketArgument.getValue());\n Assert.assertEquals(S3FileTransferImplUnitTests.S3_KEY, keyArgument.getValue());\n Mockito.verify(this.uploadTimer, Mockito.times(1)).record(Mockito.anyLong(), Mockito.eq(TimeUnit.NANOSECONDS));\n Mockito.verify(this.registry, Mockito.times(1)).timer(Mockito.eq(UPLOAD_TIMER_NAME), this.tagsCaptor.capture());\n Assert.assertEquals(S3FileTransferImplUnitTests.SUCCESS_TAGS, this.tagsCaptor.getValue());\n }",
"private void uploadStreamInternal(String stageName,\n String destPrefix,\n InputStream inputStream,\n String destFileName,\n boolean compressData)\n throws SQLException\n {\n logger.debug(\"upload data from stream: stageName={}\" +\n \", destPrefix={}, destFileName={}\",\n stageName, destPrefix, destFileName);\n\n if (stageName == null)\n throw new SnowflakeSQLException(SqlState.INTERNAL_ERROR,\n ErrorCode.INTERNAL_ERROR.getMessageCode(),\n \"stage name is null\");\n\n if (destFileName == null)\n throw new SnowflakeSQLException(SqlState.INTERNAL_ERROR,\n ErrorCode.INTERNAL_ERROR.getMessageCode(),\n \"stage name is null\");\n\n SnowflakeStatementV1 stmt = new SnowflakeStatementV1(this);\n\n StringBuilder putCommand = new StringBuilder();\n\n // use a placeholder for source file\n putCommand.append(\"put file:///tmp/placeholder \");\n\n // add stage name\n if (!stageName.startsWith(\"@\"))\n putCommand.append(\"@\");\n putCommand.append(stageName);\n\n // add dest prefix\n if (destPrefix != null)\n {\n if (!destPrefix.startsWith(\"/\"))\n putCommand.append(\"/\");\n putCommand.append(destPrefix);\n }\n\n putCommand.append(\" overwrite=true\");\n\n SnowflakeFileTransferAgent transferAgent = null;\n transferAgent = new SnowflakeFileTransferAgent(putCommand.toString(),\n sfSession, stmt.getSfStatement());\n\n transferAgent.setSourceStream(inputStream);\n transferAgent.setDestFileNameForStreamSource(destFileName);\n transferAgent.setCompressSourceFromStream(compressData);\n transferAgent.execute();\n\n stmt.close();\n }",
"public void uploadStream(String stageName,\n String destPrefix,\n InputStream inputStream,\n String destFileName,\n boolean compressData)\n throws SQLException\n {\n uploadStreamInternal(stageName, destPrefix, inputStream,\n destFileName, compressData);\n }",
"ISObject put(String key, ISObject stuff) throws UnexpectedIOException;",
"public Long createFileUpload(FileUpload fileUpload, InputStream fileInputStream) throws AppException;",
"private void uploadFileTos3bucket(String fileName, File file) {\n s3Client.putObject(new PutObjectRequest(bucketName, fileName, file)\n .withCannedAcl(CannedAccessControlList.PublicRead));\n }",
"public void writeToBucket(\n final String key,\n final Map<String, String> metadataMap,\n final Object object,\n final String contentType) {\n writeToBucket(key, metadataMap, object, contentType, JacksonConfig.createMapper());\n }",
"@Override\n\tpublic void store(InputStream inputStream, long contentLength, String contentType, String keyName) {\n\n\t}",
"private void upload(String tag, String message, String position, String unique_msg, LogEntry [] inputLogEntry, String [] zipEntryNames, int triggerType, String packageName, String processName){\n\n if (!S3Policy.canLogToS3(getContext(), tag))\n return;\n if( inputLogEntry == null || zipEntryNames == null) {\n Log.d(TAG, \"inputLogEntry or zipEntryNames is null\");\n return;\n }\n\n if (message==null)\n message=\"\";\n if (position==null)\n position=\"\";\n\n String sn = Utils.getSN();\n //Create a device information properties file\n ByteArrayOutputStream os_deviceinfo = new ByteArrayOutputStream();\n S3DeviceInfoCreator deviceInfoCreator = S3DeviceInfoCreator.getInstance(getContext());\n Properties propReportData = deviceInfoCreator.createDeviceInfoProperties(tag, message, position, unique_msg, triggerType, packageName, processName);\n try {\n propReportData.store(os_deviceinfo, sMessageVersion);\n } catch (IOException e1) {\n e1.printStackTrace();\n } finally {\n try {if(os_deviceinfo != null) os_deviceinfo.close();} catch (IOException e) {e.printStackTrace();}\n }\n\n if(Common.SECURITY_DEBUG) Log.d(TAG, propReportData.toString());\n\n Properties prop = new Properties();\n prop.setProperty(\"TAG\", tag);\n prop.setProperty(\"S/N\", sn);\n // sy_wang, 20140321, Get sense version and change to sense ID which has specific format.\n prop.setProperty(\"SENSE_ID\", changeSenseVerToSenseId(Utils.getSenseVersionByCustomizationManager()));\n\n S3EntryFile entryFile = null;\n FileOutputStream zipos = null;\n DataOutputStream dataStream = null;\n ZipOutputStream zip = null;\n InputStream isInputLog = null;\n try {\n //Create a ZIP\n entryFile = S3LogCacheManager.getInstance().putS3LogToCache(getContext(), prop);\n zipos = entryFile.getFileOutputStream();\n dataStream = new DataOutputStream(zipos);\n dataStream.writeUTF(prop.getProperty(\"TAG\", \"ALL\"));\n dataStream.writeUTF(prop.getProperty(\"S/N\", \"unknown\"));\n zip =new ZipOutputStream(zipos);\n ZipEntry zeProperties = new ZipEntry(\"DeviceInfo.properties\");\n zip.putNextEntry(zeProperties);\n zip.write(os_deviceinfo.toByteArray());\n zip.closeEntry();\n\n for(int i=0; i<inputLogEntry.length ; i++) {\n if(inputLogEntry[i] != null) {\n ZipEntry zeLogfile = new ZipEntry(zipEntryNames[i]);\n zip.putNextEntry(zeLogfile);\n isInputLog = inputLogEntry[i].getInputStream();\n streamCopy(isInputLog,zip);\n if(isInputLog != null) {\n isInputLog.close();\n isInputLog = null;\n }\n zip.closeEntry();\n }\n }\n } catch(Exception e) {\n Log.e(TAG, \"Fail to compress Logfile and DeviceInfo\", e);\n } finally {\n try {if(isInputLog != null) isInputLog.close();} catch (IOException e) {e.printStackTrace();}\n try {if(zip != null) zip.finish();} catch (IOException e) {e.printStackTrace();}\n try {if(dataStream != null) dataStream.close();} catch (IOException e) {e.printStackTrace();}\n try {if(zipos != null) zipos.close();} catch (IOException e) {e.printStackTrace();}\n }\n\n //General upload speed for 3G is 0.3 Mb/s .The max size of file to upload is 2.5MB\n //Time cost for uploading = 66.67x2(safety factor) = 133(s)\n String wakelockName = Common.WAKELOCK_S3;\n int wakelockTime = 133000;\n /*\n [2017.02.21 eric lu]\n For UB, we reduce wakelock to 30(s)to prevent power team issues.\n\n If the wakelock exceed 360(s) in 48 hours, we will need to explain why we need to acquire it.\n Hence, 360(s)/2 = 180(s)/day ,and we will upload 4 times per day\n 180/4 = 45(s)/once\n Actually, uploading time was seldom exceed 5(s), we acquire 30(s) as a trade-off.\n */\n if (Common.STR_HTC_UB.equals(tag)){\n wakelockName = Common.WAKELOCK_S3_UB;\n wakelockTime = 30000;\n }\n\n PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);\n PowerManager.WakeLock wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, wakelockName);\n wakeLock.setReferenceCounted(false);\n wakeLock.acquire(wakelockTime);\n\n try {\n Log.d(TAG, \"Start upload\");\n Log.d(TAG,\"The size of uploaded file is: \"+entryFile.getFileSize()+\"(bytes)\");\n Utils.logDataSizeForWakeLock(wakelockName,entryFile.getFileSize());\n\n for (int i=RETRY_COUNT; i>=0; i--) {\n try {\n if (!Utils.isNetworkAllowed(getContext(), tag, ReflectionUtil.get(\"ro.build.description\"),entryFile.getFileSize())){\n Log.d(TAG,\"[upload] Stop upload due to no proper network\");\n continue;\n }\n Log.d(TAG,\"uploaded file size: \"+entryFile.getFileSize()+\"(bytes)\"); //must showed it at begin,added by Ricky 2012.06.27\n Response response = s3uploader.putReport(entryFile.getFilePointer(), prop, 30000);\n //Compare the header\n\n if (response != null && response.getResponseCode() == HttpURLConnection.HTTP_OK) {\n entryFile.delete();\n Log.v(TAG, \"Upload Done , TAG=\"+tag);\n resumeCachedReport(s3uploader);\n break;\n }\n else \n {\n if (i==0) {\n deleteHtcPowerExpertTempFile(tag, entryFile); //Rex, Delete cache file directly when uploading HTC_POWER_EXPERT log failed, 2013/02/26\n Log.w(TAG, \"fail \");\n // storeReport(prop);do nothing since already stored\n }\n }\n android.os.SystemClock.sleep(1000);\n } catch (Exception e) {\n if (i==0) {\n deleteHtcPowerExpertTempFile(tag, entryFile); //Rex, Delete cache file directly when uploading HTC_POWER_EXPERT log failed, 2013/02/26\n Log.w(TAG, \"Got exception\",e.getMessage());\n //storeReport(prop); do nothing since already stored\n }\n android.os.SystemClock.sleep(1000);\n }\n }\n } catch (Exception e) {\n Log.e(TAG,\"Exception occurs\", e);\n } finally {\n if(wakeLock !=null && wakeLock.isHeld())\n wakeLock.release();\n }\n }",
"UploadResponse uploadDocumentSync(InputStream documentInputStream, String filename,\n long systemId, String password, String documentPool,\n String documentKey, String language, String ackKey);",
"private void write(S3CheckpointData data) throws IgniteCheckedException, AmazonClientException {\n assert data != null;\n\n if (log.isDebugEnabled())\n log.debug(\"Writing data to S3 [bucket=\" + bucketName + \", key=\" + data.getKey() + ']');\n\n byte[] buf = data.toBytes();\n\n ObjectMetadata meta = new ObjectMetadata();\n\n meta.setContentLength(buf.length);\n\n if (!F.isEmpty(sseAlg))\n meta.setSSEAlgorithm(sseAlg);\n\n s3.putObject(bucketName, data.getKey(), new ByteArrayInputStream(buf), meta);\n }",
"@Test\n public void testFileUploadFromBodyWithMissingDuration() {\n DatasourceConfiguration datasourceConfiguration = createDatasourceConfiguration();\n ExecuteActionDTO executeActionDTO = new ExecuteActionDTO();\n AmazonS3Plugin.S3PluginExecutor pluginExecutor = new AmazonS3Plugin.S3PluginExecutor();\n\n ActionConfiguration actionConfiguration = new ActionConfiguration();\n\n Map<String, Object> configMap = new HashMap<>();\n setDataValueSafelyInFormData(configMap, BODY, \"{\\\"data\\\": \\\"\\\"}\");\n setDataValueSafelyInFormData(configMap, PATH, \"path\");\n setDataValueSafelyInFormData(configMap, COMMAND, \"UPLOAD_FILE_FROM_BODY\");\n setDataValueSafelyInFormData(configMap, BUCKET, \"bucket_name\");\n setDataValueSafelyInFormData(configMap, CREATE_DATATYPE, \"NO\");\n\n actionConfiguration.setFormData(configMap);\n\n AmazonS3 connection = pluginExecutor.datasourceCreate(datasourceConfiguration).block();\n Mono<ActionExecutionResult> resultMono = pluginExecutor.executeParameterized(\n connection,\n executeActionDTO,\n datasourceConfiguration,\n actionConfiguration);\n\n StepVerifier.create(resultMono)\n .assertNext(result -> {\n assertFalse(result.getIsExecutionSuccess());\n String message = (String) result.getBody();\n assertTrue(message.contains(\"The AWS Access Key Id you provided does not exist in \" +\n \"our records\"));\n assertEquals(AppsmithPluginError.PLUGIN_ERROR.getTitle(), result.getTitle());\n })\n .verifyComplete();\n }",
"private static void multipartUpload(File file, String bucketName) throws IOException {\r\n\t\tlong size = file.length();\r\n\t\ts3 = S3Client.builder().region(region).build();\r\n\t\t// First create a multipart upload and get upload id\r\n\t\tCreateMultipartUploadRequest createMultipartUploadRequest = CreateMultipartUploadRequest.builder()\r\n\t\t\t\t.bucket(bucketName).key(file.getName()).build();\r\n\t\tCreateMultipartUploadResponse response = s3.createMultipartUpload(createMultipartUploadRequest);\r\n\t\tString uploadId = response.uploadId();\r\n\t\tSystem.out.println(uploadId);\r\n\r\n\t\tUploadPartRequest uploadPartRequest1 = UploadPartRequest.builder().bucket(bucketName).key(file.getName())\r\n\t\t\t\t.uploadId(uploadId).partNumber(1).build();\r\n\t\tString etag1 = s3\r\n\t\t\t\t.uploadPart(uploadPartRequest1, RequestBody.fromInputStream(new FileInputStream(file), size / 2))\r\n\t\t\t\t.eTag();\r\n\t\tCompletedPart part1 = CompletedPart.builder().partNumber(1).eTag(etag1).build();\r\n\r\n\t\tUploadPartRequest uploadPartRequest2 = UploadPartRequest.builder().bucket(bucketName).key(file.getName())\r\n\t\t\t\t.uploadId(uploadId).partNumber(2).build();\r\n\t\tString etag2 = s3\r\n\t\t\t\t.uploadPart(uploadPartRequest2, RequestBody.fromInputStream(new FileInputStream(file), size / 2))\r\n\t\t\t\t.eTag();\r\n\t\tCompletedPart part2 = CompletedPart.builder().partNumber(2).eTag(etag2).build();\r\n\r\n\t\t// Finally call completeMultipartUpload operation to tell S3 to merge all\r\n\t\t// uploaded\r\n\t\t// parts and finish the multipart operation.\r\n\t\tCompletedMultipartUpload completedMultipartUpload = CompletedMultipartUpload.builder().parts(part1, part2)\r\n\t\t\t\t.build();\r\n\t\tCompleteMultipartUploadRequest completeMultipartUploadRequest = CompleteMultipartUploadRequest.builder()\r\n\t\t\t\t.bucket(bucketName).key(file.getName()).uploadId(uploadId).multipartUpload(completedMultipartUpload)\r\n\t\t\t\t.build();\r\n\t\ts3.completeMultipartUpload(completeMultipartUploadRequest);\r\n\t}",
"public void gettingDataFromS3(AmazonS3 s3, String key) throws IOException {\n try {\n for (int i = 0; i < 1; i++) {\n S3Object object = s3.getObject(new GetObjectRequest(bucketName, key));\n if( object.getKey().equalsIgnoreCase(key)) {\n String contentType = object.getObjectMetadata().getContentType();\n storingTheObjectToDisk1(object.getObjectContent(), key);\n break;\n }\n }\n String eTag = gettingETagOfTheFile(key);\n try {\n File file = new File(\"/home/ubuntu/\" + key + \".etag\");\n BufferedWriter output = new BufferedWriter(new FileWriter(file));\n output.write(eTag);\n output.close();\n } catch ( IOException e ) {\n e.printStackTrace();\n }\n } catch (AmazonServiceException ase) {\n System.out.println(\"Caught an AmazonServiceException, which\" + \" means your request made it \" + \"to Amazon S3, but was rejected with an error response\" +\n \" for some reason.\");\n System.out.println(\"Error Message: \" + ase.getMessage());\n System.out.println(\"HTTP Status Code: \" + ase.getStatusCode());\n System.out.println(\"AWS Error Code: \" + ase.getErrorCode());\n System.out.println(\"Error Type: \" + ase.getErrorType());\n System.out.println(\"Request ID: \" + ase.getRequestId());\n } catch (AmazonClientException ace) {\n System.out.println(\"Caught an AmazonClientException, which means\"+ \" the client encountered \" + \"an internal error while trying to \" + \"communicate with S3, \" + \"such as not being able to access the network.\");\n System.out.println(\"Error Message: \" + ace.getMessage());\n }\n }",
"@Override\n public void store(MultipartFile file, String path) {\n String filename = StringUtils.cleanPath(file.getOriginalFilename());\n try {\n if (file.isEmpty()) {\n throw new StorageException(\"Failed to store empty file \" + filename);\n }\n if (filename.contains(\"..\")) {\n // This is a security check\n throw new StorageException(\n \"Cannot store file with relative path outside current directory \"\n + filename);\n }\n\n \t\t// upload file to s3\n \t\tString fileName = path + \"/\" + filename;\n\n \t\tthis.s3client.putObject(new PutObjectRequest(this.s3_storage_properties.getBucketName(), fileName,\n \t\t\t\tfile.getInputStream(), new ObjectMetadata())\n .withCannedAcl(CannedAccessControlList.PublicRead));\n Application.logger.info(\"Stored \"+fileName+\" into S3\");\n }\n catch (IOException e) {\n throw new StorageException(\"Failed to store file \" + filename, e);\n }\n }",
"private S3InputSource s3InputSource(\n @Nullable List<String> uris,\n @Nullable List<String> prefixes,\n @Nullable List<CloudObjectLocation> objects,\n @Nullable String objectGlob\n )\n {\n return s3InputSource(uris, prefixes, objects, objectGlob, null);\n }",
"public interface AWSClient {\n\n public void putFileinS3(Exchange exchange) throws Exception;\n\n public void putMessageInSQS(Exchange exchange) throws Exception;\n}",
"ObjectInputStream newObjectInputStream(InputStream in) throws Exception;",
"void uploadStarted(StreamingStartEvent event);",
"@XRayEnabled\npublic interface UploadFileService {\n \n /**\n * copyFileToS3 : copyFileToS3\n * \n * @param fileName : file name\n * @param fileExtension : file extension\n * @param content : content\n * @return String : url file\n */\n public String copyFileToS3(String fileName, String fileExtension, String content);\n\n /**\n * uploadFileToS3 : Upload file to S3 Amz Cloud\n * \n * @param part\n * @param importBelong\n * @return\n * @throws IOException\n */\n S3UploadResponse uploadFileToS3(MultipartFile part, Integer importBelong) throws IOException;\n}",
"private void executePut() throws NetworkException, IOException,\n StreamException {\n StreamClientMetrics.begin(session);\n try {\n putMethod = new PutMethod(session.getURI());\n try {\n utils.setHeaders(putMethod, session.getHeaders());\n putMethod.setRequestEntity(this);\n switch (utils.execute(putMethod)) {\n case 200:\n break;\n case 400:\n final StreamErrorResponse errorResponse = utils.readErrorResponse(putMethod);\n throw new StreamException(errorResponse.isRecoverable(),\n \"Could not upload stream. {0}:{1}{2}{3}\",\n putMethod.getStatusCode(),\n putMethod.getStatusLine(), \"\\n\\t\",\n putMethod.getStatusText());\n case 503: // service unavailable\n utils.wait(utils.getRetryAfter(putMethod));\n case 500: // internal server error\n case 504: // gateway timeout\n utils.writeError(putMethod);\n throw new StreamException(Boolean.TRUE,\n \"Could not upload stream. {0}:{1}{2}{3}\",\n putMethod.getStatusCode(),\n putMethod.getStatusLine(), \"\\n\\t\",\n putMethod.getStatusText());\n default:\n utils.writeError(putMethod);\n throw new StreamException(\n \"Could not upload stream. {0}:{1}{2}{3}\",\n putMethod.getStatusCode(),\n putMethod.getStatusLine(), \"\\n\\t\",\n putMethod.getStatusText());\n }\n } catch (final UnknownHostException uhx) {\n utils.writeError(putMethod);\n throw new NetworkException(uhx);\n } catch (final SocketException sx) {\n utils.writeError(putMethod);\n throw new NetworkException(sx);\n } catch (final SocketTimeoutException stx) {\n utils.writeError(putMethod);\n throw new NetworkException(stx);\n } catch (final HttpException hx) {\n utils.writeError(putMethod);\n throw new NetworkException(hx);\n } catch (final IOException iox) {\n /* an io exception can be thrown with a network exception cause\n * by the stream's http connection object; and since we want to\n * differentiate between network and local io errors we examine\n * the causality */\n utils.writeError(putMethod);\n if (isNetworkException(iox.getCause())) {\n throw (NetworkException) iox.getCause();\n } else {\n throw iox;\n }\n } finally {\n putMethod.releaseConnection();\n }\n } finally {\n StreamClientMetrics.end(\"PUT\", session);\n }\n }",
"public void storeBucket(Bucket bucket) throws S3Exception {\n\t\t\r\n\t}",
"UploadResponse uploadDocumentSync(InputStream documentInputStream, String filename,\n long systemId, String password, String documentPool,\n String documentKey, String language, String ackKey,\n Integer connectionTimeoutInMillis);",
"public boolean existsKeyInS3(String inKey);",
"boolean upload(\n InputStream source, String remoteFileName);",
"public boolean existsKeyInS3(String inBucket, String inKey);",
"public void put(Bitstream bitstream, InputStream in) throws IOException {\n try {\n File file = getFile(bitstream);\n\n // Make the parent dirs if necessary\n File parent = file.getParentFile();\n if (!parent.exists()) {\n parent.mkdirs();\n }\n //Create the corresponding file and open it\n file.createNewFile();\n\n try (\n FileOutputStream fos = new FileOutputStream(file);\n // Read through a digest input stream that will work out the MD5\n DigestInputStream dis = new DigestInputStream(in, MessageDigest.getInstance(CSA));\n ) {\n Utils.bufferedCopy(dis, fos);\n in.close();\n\n bitstream.setSizeBytes(file.length());\n bitstream.setChecksum(Utils.toHex(dis.getMessageDigest().digest()));\n bitstream.setChecksumAlgorithm(CSA);\n } catch (NoSuchAlgorithmException nsae) {\n // Should never happen\n log.warn(\"Caught NoSuchAlgorithmException\", nsae);\n }\n } catch (Exception e) {\n log.error(\"put(\" + bitstream.getInternalId() + \", inputstream)\", e);\n throw new IOException(e);\n }\n }",
"CompletableFuture<UploadResponse> uploadDocument(InputStream documentInputStream,\n String filename, long systemId,\n String password, String documentPool,\n String documentKey, String language,\n String ackKey);",
"public String upload(String path, String filename, InputStream file, String contentType)\r\n\t{\r\n\t\treturn upload(bucket, path, filename, file, contentType);\r\n\t}",
"public Builder setS3Bytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n s3_ = value;\n onChanged();\n return this;\n }",
"@POST\r\n\t@Path(\"/publishimage\")\r\n\t@Consumes({ MediaType.MULTIPART_FORM_DATA })\r\n\tpublic Response uploadImageFile(@FormDataParam(\"file\") InputStream fileInputStream,\r\n\t\t\t@FormDataParam(\"file\") FormDataContentDisposition fileMetaData) throws Exception {\r\n\t\tString TEMP_PATH_ON_MAC = \"/tmp\";\r\n\t\twriteFileToServer(fileInputStream, fileMetaData, TEMP_PATH_ON_MAC);\r\n\t\treturn Response.ok().build();\r\n\t}",
"public Result uploadImage() {\n MultipartFormData<File> body = request().body().asMultipartFormData();\n MultipartFormData.FilePart<File> fileInput = body.getFile(\"inputFile\");\n if (fileInput != null) {\n File file = (File) fileInput.getFile();\n String imageUrl = S3Action.putImg(s3, file, UUID.randomUUID().toString());\n return ok(afterPutImg.render(imageUrl));\n } else {\n return badRequest(\"error\");\n }\n }",
"ReleaseFile parseWithSignature( InputStream is, InputStream signStream, InputStream keyStream ) throws IOException;",
"public Builder setS3(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n s3_ = value;\n onChanged();\n return this;\n }",
"public ECFileCacheInputStream(FileCacheKey cacheKey, Map<Long, Integer> chunkPosAndSize, RedisAccessBase redisAccess,\n List<Integer> redisIds, InputStream stream) {\n this.key = cacheKey.getUuid();\n this.fileSize = (int) cacheKey.getFileSize();\n this.chunkPosAndSize = chunkPosAndSize;\n this.redisAccess = redisAccess;\n this.redisIds = redisIds;\n this.endChunkStream = stream;\n }",
"public boolean put( KEY key, OBJECT object );",
"@Override\n public void onProgress(PutObjectRequest request, long currentSize, long totalSize) {\n }",
"public static void main(String[] args) throws IOException {\n OSS client = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);\n\n\n// String objectName = \"community/c14deaec-7827-4fb1-bac9-eeba7a5ba59b.png\";\n//\n//// 创建OSSClient实例。\n// OSSClient ossClient = new OSSClient(endpoint, accessKeyId, accessKeySecret);\n//\n//// 删除文件。\n// ossClient.deleteObject(bucketName, objectName);\n//\n//// 关闭OSSClient。\n// ossClient.shutdown();\n\n try {\n /*\n * Batch put objects into the bucket\n */\n final String content = \"Thank you for using Aliyun Object Storage Service\";\n final String keyPrefix = \"MyObjectKey\";\n String objects = \"community/01378488-592b-443c-984f-4cbc12c8cd82.png\" +\n \",community/01394c05-3bc8-41ee-b47f-2caddfbf27f2.png\" +\n \",community/0139e96b-97a7-4270-9bad-3cc25c335184_1080x1430.png\" +\n \",community/013a938c-6486-4abb-bf96-aa5d066472cc.png\" +\n \",community/013b2de1-ef57-4204-92f8-9a2fdf1ab1c0.png\" +\n \",community/013cd7e5-ab1f-4058-a2b6-4e33c283c9b3.png\" +\n \",community/01426305-b2ef-430c-9cfe-8daf4e382b72.png\" +\n \",community/01426539-5fda-44b1-8aca-eb2c744b67ee_1080x1923.png\" +\n \",community/014c400c-e516-4c9e-adf8-a26b63729db5.png\" +\n \",community/014d3126-4b61-499e-b2a4-060d5c565ee3.png\" +\n \",community/014d4e83-9c56-4470-ae54-57387896139b.png\" +\n \",community/02038488-3867-475f-9c05-6e552ca4da70_1080x1439.png\" +\n \",community/0205bd60-49bf-412f-b04a-6c8c00b19f6c.png\" +\n \",community/02084b3b-7acb-4be0-a40c-a1245e805c85_1080x1448.png\" +\n \",community/02099953-c48c-4f22-ab5c-87449d449502_348x464.png\" +\n \",community/020d48bd-9745-4087-8ab5-7298f57a1f30_1080x1563.png\" +\n \",community/0212046c-3167-42a9-850c-788eed176526.png\" +\n \",community/0213caf3-0866-426e-8fea-797c8d533451.png\" +\n \",community/021480ff-4dcd-4b56-95e3-46a094baa742.png\" +\n \",community/01f015d8-1358-48da-bb37-07e270a27667.png\" +\n \",community/01f0a3ca-f0fa-41e5-8126-e0c5e4346d8e.png\" +\n \",community/01f0ed1c-9472-4002-b896-216c95dc214b_720x950.png\" +\n \",community/01f143c2-f8ba-4ee3-8fec-de9b0c106fd2.png\" +\n \",community/01f15f7d-6bee-41e1-9bc9-85409087f5bf.png\" +\n \",community/01f1742c-20b6-4f85-9847-2a4d85801165.png\" +\n \",community/01f32f3f-b0ce-4d9d-aef8-a75be07b655a.png\" +\n \",community/01f42d98-1994-4e3f-b025-d94a849a33a8.png\" +\n \",community/01f7c1e4-5b80-400d-8dd7-0df9a1c88601.png\" +\n \",community/01f8cd29-f527-43c6-a438-d3751663ec37.png\" +\n \",community/01fa914a-66cc-471e-af15-2bd10d34a45e_348x464.png\" +\n \",community/01fad182-2290-4b47-ab3c-ee10dff2fb86.png\" +\n \",community/0201c344-c893-4da6-a564-b4ef70ae38d6_1080x1749.png\" +\n \",community/01d7e8e6-0336-4d18-ae98-2cd2f407c46f.png\" +\n \",community/01d7ecfb-9feb-4db6-8d55-4c87cb050b4d.png\" +\n \",community/01d86f24-8589-4e60-b797-6b4b2f4330b5.png\" +\n \",community/01d96558-4bb2-4763-a7c4-ca2910f73ab1.png\" +\n \",community/01d9f15d-3555-4831-bc18-95cbe4634873_1440x2019.png\" +\n \",community/01daaccc-a3b5-4ef9-a5ce-57dfa803006b_315x420.png\" +\n \",community/01dbcbb8-dd5e-4911-8094-467ae90cf414.png\" +\n \",community/01de101b-e7f0-4d44-8a0c-6b6eb8e86e21.png\" +\n \",community/01e82423-a17b-439b-a804-5e6f898906b2.png\" +\n \",community/01be382c-4447-416c-8905-449a5d2f66a8.png\" +\n \",community/01bfb933-afd3-4529-944d-2e432731b6f8.png\" +\n \",community/01c07f89-8fab-481b-a497-ff5ea1013f5c_1080x1922.png\" +\n \",community/01c965cb-d991-4424-bdec-89634240dd51.png\" +\n \",community/01ca2e7c-f4be-40d7-a05a-7e20a02c14ac.png\" +\n \",community/01ca99ef-c34e-4a8f-a823-82c70eb96f81_720x1025.png\" +\n \",community/01d22b53-b451-4cbe-8555-0c6ea02eb255.png\" +\n \",community/01d40f28-dfdb-4972-869b-75e154817ba4.png\" +\n \",community/01d4d7a4-ffeb-4743-90b5-a4a7d5249d27_1080x1439.png\" +\n \",community/01a8cca4-eb88-4660-9404-ebb7f16d82a6_315x420.png\" +\n \",community/01aaa39a-a562-43de-97cd-d48c7fd28fdd.png\" +\n \",community/01b16c8c-14f3-4357-8c30-2638565141c9.png\" +\n \",community/01b1bc11-09fd-49b0-96ed-ed47e743faf0.png\" +\n \",community/01b35a88-e0c6-4221-8aa5-32d96069fbc3_348x464.png\" +\n \",community/01b634d1-8199-4915-aa47-947a0af5466b.png\" +\n \",community/01b841df-1bb4-44b3-af79-142c4834fd46.png\" +\n \",community/01b9660f-b57f-415c-a619-f10bd76cd860.png\" +\n \",community/01ba2a69-db78-4b4b-ad6b-31a2e715182f.png\" +\n \",community/0190b32e-60be-4a49-8cf7-e0d9ce039997.png\" +\n \",community/0191665a-67c0-4ed8-bf01-7b26f5ba1248_1080x1439.png\" +\n \",community/01972534-37fa-433e-ac22-bcceadd2a3fe.png\" +\n \",community/01981657-5340-4cf9-8c90-176c5d465173_348x464.png\" +\n \",community/019f7fdf-f8b0-4086-b2cc-9cd7d7e199b1.png\" +\n \",community/01a0bcc9-d351-4200-be1a-e9c8f322deb1.png\" +\n \",community/01a2a06d-0b31-419d-8d31-66d6e842b806.png\" +\n \",community/017dfb30-469e-401f-becb-e23c647059f1_315x420.png\" +\n \",community/01834f9a-0596-47e1-80b3-ccfd19d12127.png\" +\n \",community/01856873-80bf-4780-9ead-9968aedd8e15_1080x1563.png\" +\n \",community/0186d337-215d-478f-a657-4c0a04f6d028.png\" +\n \",community/0187db31-4c8f-4689-9f6e-500b5f39f6c3.png\" +\n \",community/018c8d90-35a3-4010-9ecc-c943e72a0745_1080x1657.png\" +\n \",community/018cb9ce-756a-4c23-8a7c-aeb85e393ec8.png\" +\n \",community/016a0bfc-3abf-46e9-b4ee-4b6c73562524.png\" +\n \",community/016be936-bca6-4827-bb7e-84b0c496b7e7_1080x1426.png\" +\n \",community/016c40f3-fb9b-49b7-ad93-bc84f4875d6c.png\" +\n \",community/016c51c6-e3dd-4903-962a-8f24c33e6547_348x464.png\" +\n \",community/016e417e-760b-4e3e-bc9b-7db6fe77d5a2_315x420.png\" +\n \",community/01731219-8bdf-4a10-9982-fe347622d877.png\" +\n \",community/0173e603-5a5f-4c2d-a3e7-f92c1b2fa50c.png\" +\n \",community/0177c179-402f-4ff7-8032-e6e4ae21431f.png\" +\n \",community/01785d9d-d5cc-4e38-b990-395ef92c13c0.png\" +\n \",community/0179b793-b92a-4926-ab88-04dd4f434b15.png\" +\n \",community/017afe9f-02d2-4004-ad9e-8afed066e99c.png\" +\n \",community/017b74df-8b8a-440a-9938-9c8b7e43bb8c_348x464.png\" +\n \",community/017d0cbb-e918-466b-a1e7-633d54c7d5b2.png\" +\n \",community/014e9713-3027-4040-b07a-9d6827e527c1_1080x1439.png\" +\n \",community/014eaafd-0702-47ff-87a1-c3cac9a1769a.png\" +\n \",community/0152e9e6-fcde-404e-9fb6-d75a5b265008.png\" +\n \",community/0154b399-ca4d-4c36-98d3-22aed2e28ed9.png\" +\n \",community/0154f316-3833-4c4b-a406-8f54c01ed121.png\" +\n \",community/01559349-89d4-4010-84da-9f3892f21b27.png\" +\n \",community/01575492-8b54-4729-9be5-ade62bb6be54.png\" +\n \",community/0157e449-b041-404c-b05c-442174c33ca1.png\" +\n \",community/015843a0-d566-42b4-b72c-b51901b4da65.png\" +\n \",community/015a1183-c580-4241-8e03-08b6b7e36703.png\" +\n \",community/015addf7-d725-4a32-bc14-12f6526bf1f6.png\" +\n \",community/015b6646-1359-4ca1-a5a1-914db80285f4.png\" +\n \",community/01641ba3-504f-4dfe-aa33-3e4a689eaa0b.png\" +\n \",community/0166b12a-9e1c-4b4e-a527-8f473faddb43_1080x1774.png\" +\n \",community/0167ec5d-b7c9-4d06-a2c8-819682546723_1080x1563.png\";\n String[] arr = objects.split(\",\");\n List<String> keys = Arrays.asList(arr);\n// for (int i = 0; i < 100; i++) {\n// String key = keyPrefix + i;\n// InputStream instream = new ByteArrayInputStream(content.getBytes());\n// client.putObject(bucketName, key, instream);\n// System.out.println(\"Succeed to put object \" + key);\n// keys.add(key);\n// }\n System.out.println();\n\n /*\n * Delete all objects uploaded recently under the bucket\n */\n System.out.println(\"\\nDeleting all objects:\");\n DeleteObjectsResult deleteObjectsResult = client.deleteObjects(\n new DeleteObjectsRequest(bucketName).withKeys(keys));\n List<String> deletedObjects = deleteObjectsResult.getDeletedObjects();\n for (String object : deletedObjects) {\n System.out.println(\"\\t\" + object);\n }\n System.out.println();\n\n } catch (OSSException oe) {\n System.out.println(\"Caught an OSSException, which means your request made it to OSS, \"\n + \"but was rejected with an error response for some reason.\");\n System.out.println(\"Error Message: \" + oe.getErrorCode());\n System.out.println(\"Error Code: \" + oe.getErrorCode());\n System.out.println(\"Request ID: \" + oe.getRequestId());\n System.out.println(\"Host ID: \" + oe.getHostId());\n } catch (ClientException ce) {\n System.out.println(\"Caught an ClientException, which means the client encountered \"\n + \"a serious internal problem while trying to communicate with OSS, \"\n + \"such as not being able to access the network.\");\n System.out.println(\"Error Message: \" + ce.getMessage());\n } finally {\n /*\n * Do not forget to shut down the client finally to release all allocated resources.\n */\n client.shutdown();\n }\n }",
"String store(InputStream is, String name, Properties meta) throws AlreadyExistentException, IOException;",
"@Override\n\tpublic void moveObject(String sourceBucketName, String sourceObjectPath, String destinationBucketName,\n\t\t\tString destinationObjectPath) {\n\t\t\n\t}",
"@Override\r\n\tpublic void putFile(InputStream is, String targetLocation) throws FileSystemUtilException {\r\n\t\tthrow new FileSystemUtilException(\"000000\",null,Level.ERROR,null);\t\r\n\r\n\t}",
"public HMACInputStream(String digest, byte[] key, InputStream in){\n _HMACInputStream(digest,key,in);\n }",
"public void upload(final String uri, final Map<String, String> creds, final InputStream in) throws Exception {\n\t\ttry {\n\t\t\tClient c = getHttpClient();\n\t\t\tWebResource r = c.resource(url + \"/file\");\n\t\t\tcom.sun.jersey.api.client.WebResource.Builder b = r.header(HTTP_HEADER_KEY, key).header(HTTP_HEADER_URI, uri).type(MediaType.APPLICATION_OCTET_STREAM);\n\t\t\tif (allowRedirects) b.header(HTTP_HEADER_REDIRECT, \"yes\");\n\t\t\taddMapAsHttpHeader(b, creds);\n\t\t\tb.post(InputStream.class, in);\n\t\t\tin.close();\n\t\t} catch (UniformInterfaceException e) {\n\t\t\tthrow new Exception(e.getMessage() + \" (\" + e.getResponse().getEntity(String.class) + \")\");\n\t\t} catch (Throwable e) {\n\t\t\tthrow new Exception(e);\n\t\t}\n\t}",
"@Deprecated\n public void uploadStream(String stageName,\n String destPrefix,\n InputStream inputStream,\n String destFileName,\n long streamSize)\n throws SQLException\n {\n uploadStreamInternal(stageName, destPrefix, inputStream,\n destFileName, false);\n }",
"@RequestMapping(value = \"/upload\", method = RequestMethod.POST)\n @ResponseBody\n public ModelAndView singleFileUpload(@RequestParam(\"file\") MultipartFile file) {\n\n try {\n\n byte[] bytes = file.getBytes();\n String name = file.getOriginalFilename() ;\n\n // Put the file into the bucket.\n s3Client.putObject(bytes, bucketName, name);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n return new ModelAndView(new RedirectView(\"photo\"));\n }",
"public void remove(S3Object s3Object) throws S3Exception {\n\t\t\r\n\t}",
"public TarInputStream(Stream inputStream)\n\t{\n\t\tthis(inputStream, TarBuffer.DefaultBlockFactor);\n\t}",
"@Override\n protected void upload(X x) {\n }",
"public void uploadPictureToParkById(int id, MultipartFile multipartFile, boolean enablePublicReadAccess) {\n Optional<DogPark> dogPark = dogParkRepository.findById(id);\n\n if (dogPark.isPresent()) {\n\n //Create a new image to store the URL of the file that is being created\n Image image = new Image();\n\n //Creating the file\n String fileName = multipartFile.getOriginalFilename();\n\n try {\n //creating the file in the server (temporarily)\n File file = new File(fileName);\n FileOutputStream fos = new FileOutputStream(file);\n fos.write(multipartFile.getBytes());\n fos.close();\n\n for (int i = -1; i < dogPark.get().getImages().size(); i++) {\n\n if (i == dogPark.get().getImages().size() - 1) {\n fileName = dogPark.get().getName() + \"/\" + dogPark.get().getName() + (i + 1) + \".\" + FilenameUtils.getExtension(fileName);\n }\n }\n\n //Set the URL to the new image and connect with the correct dog park and save it to the repository\n image.setUrl(\"https://dogparks.s3.amazonaws.com/\" + fileName);\n image.setDogpark(dogPark.get());\n imageRepository.save(image);\n\n //Add the image to the dog park\n dogPark.get().getImages().add(image);\n\n PutObjectRequest putObjectReqeust = new PutObjectRequest(this.awsS3AudioBucket, fileName, file);\n\n if (enablePublicReadAccess) {\n putObjectReqeust.withCannedAcl(CannedAccessControlList.PublicRead);\n }\n\n this.amazonS3.putObject(putObjectReqeust);\n\n } catch (IOException | AmazonServiceException ex) {\n logger.error(\"error [\" + ex.getMessage() + \"] occurred while uploading [\" + fileName + \"] \");\n }\n }\n else {\n throw new DogParkNotFoundException();\n }\n }",
"@Autowired\n public S3StorageService(\n StorageProperties properties, S3StorageProperties s3_properties\n ) {\n this.storage_properties = properties;\n this.s3_storage_properties = s3_properties;\n\n AWSCredentials credentials = new BasicAWSCredentials(\n this.s3_storage_properties.getKey(),\n this.s3_storage_properties.getPrivateKey());\n\n // create a client connection based on credentials\n this.s3client = new AmazonS3Client(credentials);\n }",
"@Override\n public void uploadPart(RefCountedFSOutputStream file) throws IOException {\n // this is to guarantee that nobody is\n // writing to the file we are uploading.\n checkState(file.isClosed());\n\n final CompletableFuture<PartETag> future = new CompletableFuture<>();\n uploadsInProgress.add(future);\n\n final long partLength = file.getPos();\n currentUploadInfo.registerNewPart(partLength);\n\n file.retain(); // keep the file while the async upload still runs\n uploadThreadPool.execute(new UploadTask(s3AccessHelper, currentUploadInfo, file, future));\n }",
"@Test\n public void testCreateFileFromBodyWithFalseCredentialsAndNonNullDuration() {\n DatasourceConfiguration datasourceConfiguration = createDatasourceConfiguration();\n ExecuteActionDTO executeActionDTO = new ExecuteActionDTO();\n AmazonS3Plugin.S3PluginExecutor pluginExecutor = new AmazonS3Plugin.S3PluginExecutor();\n\n\n ActionConfiguration actionConfiguration = new ActionConfiguration();\n\n Map<String, Object> configMap = new HashMap<>();\n setDataValueSafelyInFormData(configMap, BODY, \"{\\\"data\\\": \\\"\\\"}\");\n setDataValueSafelyInFormData(configMap, PATH, \"path\");\n setDataValueSafelyInFormData(configMap, COMMAND, \"UPLOAD_FILE_FROM_BODY\");\n setDataValueSafelyInFormData(configMap, BUCKET, \"bucket_name\");\n setDataValueSafelyInFormData(configMap, CREATE_DATATYPE, \"NO\");\n setDataValueSafelyInFormData(configMap, CREATE_EXPIRY, \"100000\");\n\n actionConfiguration.setFormData(configMap);\n\n AmazonS3 connection = pluginExecutor.datasourceCreate(datasourceConfiguration).block();\n Mono<ActionExecutionResult> resultMono = pluginExecutor.executeParameterized(\n connection,\n executeActionDTO,\n datasourceConfiguration,\n actionConfiguration);\n\n StepVerifier.create(resultMono)\n .assertNext(result -> {\n assertFalse(result.getIsExecutionSuccess());\n String message = (String) result.getBody();\n assertTrue(message.contains(\"The AWS Access Key Id you provided does not exist in \" +\n \"our records\"));\n assertEquals(AppsmithPluginError.PLUGIN_ERROR.getTitle(), result.getTitle());\n })\n .verifyComplete();\n }",
"private void validateOwnership(ExternalS3StorageLocationSetting externalS3StorageLocationSetting, UserProfile userProfile)\n\t\t\tthrows IOException, NotFoundException {\n\t\tString bucket = externalS3StorageLocationSetting.getBucket();\n\t\tString key = (externalS3StorageLocationSetting.getBaseKey() == null ? \"\" : externalS3StorageLocationSetting.getBaseKey())\n\t\t\t\t+ OWNER_MARKER;\n\n\t\tS3Object s3object;\n\t\ttry {\n\t\t\ts3object = s3client.getObject(bucket, key);\n\t\t} catch (AmazonServiceException e) {\n\t\t\tif (AmazonErrorCodes.S3_BUCKET_NOT_FOUND.equals(e.getErrorCode())) {\n\t\t\t\tthrow new IllegalArgumentException(\"Did not find S3 bucket \" + bucket + \". \" + getExplanation(userProfile, bucket, key));\n\t\t\t} else if (AmazonErrorCodes.S3_NOT_FOUND.equals(e.getErrorCode()) || AmazonErrorCodes.S3_KEY_NOT_FOUND.equals(e.getErrorCode())) {\n\t\t\t\tif (key.equals(OWNER_MARKER)) {\n\t\t\t\t\tthrow new IllegalArgumentException(\"Did not find S3 object at key \" + key + \" from bucket \" + bucket + \". \"\n\t\t\t\t\t\t\t+ getExplanation(userProfile, bucket, key));\n\t\t\t\t} else {\n\t\t\t\t\tthrow new IllegalArgumentException(\"Did not find S3 object at key \" + key + \" from bucket \" + bucket + \". If the S3 object is in a folder, please make sure you specify a trailing '/' in the base key. \" + getExplanation(userProfile, bucket, key));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new IllegalArgumentException(\"Could not read S3 object at key \" + key + \" from bucket \" + bucket + \": \"\n\t\t\t\t\t\t+ e.getMessage() + \". \" + getExplanation(userProfile, bucket, key));\n\t\t\t}\n\t\t}\n\n\t\tString userName;\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(s3object.getObjectContent()));\n\t\ttry {\n\t\t\tuserName = reader.readLine();\n\t\t} catch (IOException e) {\n\t\t\tthrow new IllegalArgumentException(\"Could not read username from key \" + key + \" from bucket \" + bucket + \". \"\n\t\t\t\t\t+ getExplanation(userProfile, bucket, key));\n\t\t} finally {\n\t\t\treader.close();\n\t\t}\n\n\t\tif (StringUtils.isBlank(userName)) {\n\t\t\tthrow new IllegalArgumentException(\"No username found under key \" + key + \" from bucket \" + bucket + \". \"\n\t\t\t\t\t+ getExplanation(userProfile, bucket, key));\n\t\t}\n\n\t\tif (!checkForCorrectName(userProfile, userName)) {\n\t\t\tthrow new IllegalArgumentException(\"The username \" + userName + \" found under key \" + key + \" from bucket \" + bucket\n\t\t\t\t\t+ \" is not what was expected. \" + getExplanation(userProfile, bucket, key));\n\t\t}\n\t}",
"private void readObject(ObjectInputStream inStream) \r\n\t\t\tthrows IOException, ClassNotFoundException {\r\n\t\tmPublicKey = (String)inStream.readObject();\r\n\t\tmIssuer = (String)inStream.readObject();\r\n\t\tmSubject = (String)inStream.readObject();\r\n\t}",
"@Autowired // Indicates to Spring that this is using dependency injection.\n public FileStore(AmazonS3 s3) {\n this.s3 = s3;\n }",
"@NotNull\n RecordId writeStream(@NotNull InputStream stream) throws IOException;",
"CompletableFuture<UploadResponse> uploadDocument(InputStream documentInputStream,\n String filename, long systemId,\n String password, String documentPool,\n String documentKey, String language,\n String ackKey,\n Integer connectionTimeoutInMillis);",
"public UploadFunctionResult uploadFunction(UploadFunctionRequest uploadFunctionRequest) {\n ExecutionContext executionContext = createExecutionContext(uploadFunctionRequest);\n AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();\n awsRequestMetrics.startEvent(Field.ClientExecuteTime);\n Request<UploadFunctionRequest> request = null;\n Response<UploadFunctionResult> response = null;\n \n final InputStream isOrig = uploadFunctionRequest.getFunctionZip();\n \n try {\n awsRequestMetrics.startEvent(Field.RequestMarshallTime);\n try {\n request = new UploadFunctionRequestMarshaller().marshall(super.beforeMarshalling(uploadFunctionRequest));\n // Binds the request metrics to the current request.\n request.setAWSRequestMetrics(awsRequestMetrics);\n } finally {\n awsRequestMetrics.endEvent(Field.RequestMarshallTime);\n }\n\n Unmarshaller<UploadFunctionResult, JsonUnmarshallerContext> unmarshaller =\n new UploadFunctionResultJsonUnmarshaller();\n JsonResponseHandler<UploadFunctionResult> responseHandler =\n new JsonResponseHandler<UploadFunctionResult>(unmarshaller);\n\n response = invoke(request, responseHandler, executionContext);\n\n return response.getAwsResponse();\n } finally {\n \n // Restore the original input stream, so that the caller\n // (who is responsible) can close it\n uploadFunctionRequest.setFunctionZip(isOrig);\n \n endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);\n }\n }",
"public StorableInput(InputStream stream) {\n Reader r = new BufferedReader(new InputStreamReader(stream));\n fTokenizer = new StreamTokenizer(r);\n fMap = new Vector();\n }",
"public void setS3UploadURL(String S3UploadURL)\r\n\t{\r\n\t\tm_S3UploadURL = S3UploadURL;\r\n\t}",
"@Deprecated\n public void compressAndUploadStream(String stageName,\n String destPrefix,\n InputStream inputStream,\n String destFileName)\n throws SQLException\n {\n uploadStreamInternal(stageName, destPrefix, inputStream,\n destFileName, true);\n }",
"public JsonObject readStream(HashMap<String,String> meta, String name, InputStream stream, long length, StringBuilder errors) {\n try{\n javax.json.JsonReader rdr = Json.createReader(stream);\n return rdr.readObject();}\n catch(Exception ex) {errors.append(ex.toString());}\n return null;}",
"@Test(expected = GenieBadRequestException.class)\n public void testPutFileMethodInvalidS3Path() throws GenieException {\n final String invalidS3Path = \"filepath\";\n try {\n s3FileTransfer.putFile(S3FileTransferImplUnitTests.LOCAL_PATH, invalidS3Path);\n } finally {\n Mockito.verify(this.uploadTimer, Mockito.times(1)).record(Mockito.anyLong(), Mockito.eq(TimeUnit.NANOSECONDS));\n Mockito.verify(this.registry, Mockito.times(1)).timer(Mockito.eq(UPLOAD_TIMER_NAME), this.tagsCaptor.capture());\n Assert.assertEquals(S3FileTransferImplUnitTests.FAILURE_TAGS, this.tagsCaptor.getValue());\n }\n }",
"BlobInfo putBlob(byte[] data);",
"protected void addFileUploadRequestParameter(SlingHttpServletRequest request,\n String key, InputStream stream, long size, String filename) throws IOException {\n RequestParameter param = createMock(RequestParameter.class);\n expect(param.getSize()).andReturn(size).anyTimes();\n expect(param.isFormField()).andReturn(false).anyTimes();\n expect(param.getFileName()).andReturn(filename).anyTimes();\n expect(param.getInputStream()).andReturn(stream).anyTimes();\n expect(request.getRequestParameter(key)).andReturn(param).anyTimes();\n }",
"public interface OssFileService {\n Result putFile(String fileName, InputStream inputStream, String key, String token);\n}",
"void readObject(InputSerializer in) throws java.io.IOException;",
"public ObjectContent getObject(String keyName)\n {\n ObjectContent oc = new ObjectContent();\n try\n {\n S3Object o = s3.getObject(bucketName, keyName);\n Map<String, String> userMEtadata = o.getObjectMetadata().getUserMetadata();\n oc.setFileName(userMEtadata.get(\"name\"));\n InputStream in = o.getObjectContent();\n int len;\n byte[] b = new byte[1024];\n StringBuilder sb = new StringBuilder();\n while ((len = in.read(b)) != -1)\n {\n sb.append(new String(b, 0, len, Charset.forName(\"utf-8\")));\n }\n logger.info(\">>>>>>>>>> the inputStream content is : \" + sb.toString());\n oc.setInputStream(o.getObjectContent());\n oc.setCreateUser(userMEtadata.get(\"user\"));\n return oc;\n }\n catch (AmazonS3Exception e)\n {\n logger.error(e.getMessage());\n return null;\n }\n catch (IOException e)\n {\n\n logger.error(e.getMessage());\n return null;\n }\n }"
]
| [
"0.67306197",
"0.6688462",
"0.6555802",
"0.6284709",
"0.6239124",
"0.6093423",
"0.6082729",
"0.60605055",
"0.6054409",
"0.5986647",
"0.59125113",
"0.5844135",
"0.5834481",
"0.5803336",
"0.57518786",
"0.5745306",
"0.5742776",
"0.5742252",
"0.57325125",
"0.5719234",
"0.57015747",
"0.5700989",
"0.5691313",
"0.5690919",
"0.56727666",
"0.5663525",
"0.5649875",
"0.55646485",
"0.5538649",
"0.5537254",
"0.54886764",
"0.54872453",
"0.5446808",
"0.5441165",
"0.53997946",
"0.5399195",
"0.53976154",
"0.5392515",
"0.537772",
"0.53719515",
"0.536723",
"0.53565985",
"0.53446287",
"0.5300875",
"0.52917105",
"0.5199519",
"0.51975846",
"0.5183854",
"0.51710707",
"0.5095951",
"0.5078676",
"0.50704145",
"0.5065586",
"0.5064359",
"0.5062716",
"0.5047208",
"0.5030189",
"0.5008162",
"0.50067145",
"0.50042856",
"0.50022894",
"0.4989324",
"0.49828935",
"0.49717405",
"0.4938475",
"0.49258074",
"0.49120474",
"0.49093074",
"0.49084762",
"0.49063",
"0.49032265",
"0.48962146",
"0.4888199",
"0.48657185",
"0.4836837",
"0.4824544",
"0.4812558",
"0.48088533",
"0.47910058",
"0.47748423",
"0.47743478",
"0.47600043",
"0.4758378",
"0.4748273",
"0.47412017",
"0.474104",
"0.47294644",
"0.4722528",
"0.47100088",
"0.47056532",
"0.4698328",
"0.4697291",
"0.46963352",
"0.46757448",
"0.46663478",
"0.4659116",
"0.46589962",
"0.46572942",
"0.46547458",
"0.46478823"
]
| 0.7905324 | 0 |
Download an s3 image by key | public ResponseEntity<byte[]> download(String key) throws IOException {
GetObjectRequest getObjectRequest = new GetObjectRequest(bucketName, key);
S3Object s3Object = s3Client.getObject(getObjectRequest);
S3ObjectInputStream objectInputStream = s3Object.getObjectContent();
byte[] bytes = IOUtils.toByteArray(objectInputStream);
String fileName = URLEncoder.encode(key, "UTF-8").replaceAll("\\+", "%20");
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.setContentType(MediaType.APPLICATION_OCTET_STREAM);
httpHeaders.setContentLength(bytes.length);
httpHeaders.setContentDispositionFormData("attachment", fileName);
return new ResponseEntity<>(bytes, httpHeaders, HttpStatus.OK);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public byte[] download(String path,String key) {\n try{\n S3Object object= s3.getObject(path,key);\n S3ObjectInputStream inputStream=object.getObjectContent();\n return IOUtils.toByteArray(inputStream);\n }catch(AmazonServiceException |IOException e){\n throw new IllegalStateException(\"Failed to download file from s3 \"+e);\n\n }\n\n\n }",
"public void downloadObject(String keyName, HttpServletResponse response)\n {\n response.reset();\n OutputStream out;\n try\n {\n out = new BufferedOutputStream(response.getOutputStream());\n S3Object o = s3.getObject(bucketName, keyName);\n String fileName = o.getObjectMetadata().getUserMetadata().get(\"name\");\n InputStream in = o.getObjectContent();\n response.setHeader(\"Content-Disposition\", \"attachment; filename=\\\"\" + fileName + \"\\\"\");\n FileCopyUtils.copy(in, out);\n out.close();\n in.close();\n }\n catch (IOException e)\n {\n logger.error(e.getMessage());\n }\n catch (AmazonS3Exception e)\n {\n logger.error(e.getMessage());\n }\n }",
"public Blob downloadFile(String inKey, String inFileName);",
"public Blob downloadFile(String inKey, File inDestFile);",
"public void downloadAndSaveObject(String key,String directoryToSaveFIlesPath) throws AmazonServiceException,AmazonClientException,IOException,Exceptions.CannotSaveException{\n\t\tSystem.out.println(\"Downloading an object\");\n\n\n\n\t\t//This is where the downloaded file will be saved\n\t\tFile localFile = new File(directoryToSaveFIlesPath+\"/\"+key);\n\n\t\t//This returns an ObjectMetadata file but you don't have to use this if you don't want \n\t\ts3.getObject(new GetObjectRequest(bucketName, key), localFile);\n\n\t\t//Now your file will have your image saved \n\t\tif (!(localFile.exists() && localFile.canRead())) {\n\t\t\tthrow new Exceptions.CannotSaveException(\"Errore durante il salvataggio\");\n\t\t}\n\n\n\n\t}",
"public byte[] s3download(String bucketName, String fileName) throws IOException {\n\n byte[] content = null;\n System.out.println(\"------------- CustomS3Client --------------\");\n System.out.println(\"Inside s3download() bucket Name: \"+bucketName+\" and file Name: \"+ fileName);\n\n s3 = AmazonS3ClientBuilder.standard()\n .withCredentials(new ProfileCredentialsProvider())\n .withRegion(\"us-east-1\")\n .build();\n\n // List current buckets.\n ListMyBuckets(bucketName);\n\n final S3Object s3Object = s3.getObject(bucketName, fileName);\n S3ObjectInputStream objectInputStream = s3Object.getObjectContent();\n\n System.out.println(\"------------- CustomS3Client --------------\");\n System.out.println(\"------------- Success --------------\");\n return IOUtils.toByteArray(objectInputStream);\n }",
"public void gettingDataFromS3(AmazonS3 s3, String key) throws IOException {\n try {\n for (int i = 0; i < 1; i++) {\n S3Object object = s3.getObject(new GetObjectRequest(bucketName, key));\n if( object.getKey().equalsIgnoreCase(key)) {\n String contentType = object.getObjectMetadata().getContentType();\n storingTheObjectToDisk1(object.getObjectContent(), key);\n break;\n }\n }\n String eTag = gettingETagOfTheFile(key);\n try {\n File file = new File(\"/home/ubuntu/\" + key + \".etag\");\n BufferedWriter output = new BufferedWriter(new FileWriter(file));\n output.write(eTag);\n output.close();\n } catch ( IOException e ) {\n e.printStackTrace();\n }\n } catch (AmazonServiceException ase) {\n System.out.println(\"Caught an AmazonServiceException, which\" + \" means your request made it \" + \"to Amazon S3, but was rejected with an error response\" +\n \" for some reason.\");\n System.out.println(\"Error Message: \" + ase.getMessage());\n System.out.println(\"HTTP Status Code: \" + ase.getStatusCode());\n System.out.println(\"AWS Error Code: \" + ase.getErrorCode());\n System.out.println(\"Error Type: \" + ase.getErrorType());\n System.out.println(\"Request ID: \" + ase.getRequestId());\n } catch (AmazonClientException ace) {\n System.out.println(\"Caught an AmazonClientException, which means\"+ \" the client encountered \" + \"an internal error while trying to \" + \"communicate with S3, \" + \"such as not being able to access the network.\");\n System.out.println(\"Error Message: \" + ace.getMessage());\n }\n }",
"public ObjectContent getObject(String keyName)\n {\n ObjectContent oc = new ObjectContent();\n try\n {\n S3Object o = s3.getObject(bucketName, keyName);\n Map<String, String> userMEtadata = o.getObjectMetadata().getUserMetadata();\n oc.setFileName(userMEtadata.get(\"name\"));\n InputStream in = o.getObjectContent();\n int len;\n byte[] b = new byte[1024];\n StringBuilder sb = new StringBuilder();\n while ((len = in.read(b)) != -1)\n {\n sb.append(new String(b, 0, len, Charset.forName(\"utf-8\")));\n }\n logger.info(\">>>>>>>>>> the inputStream content is : \" + sb.toString());\n oc.setInputStream(o.getObjectContent());\n oc.setCreateUser(userMEtadata.get(\"user\"));\n return oc;\n }\n catch (AmazonS3Exception e)\n {\n logger.error(e.getMessage());\n return null;\n }\n catch (IOException e)\n {\n\n logger.error(e.getMessage());\n return null;\n }\n }",
"public com.amazon.s3.GetObjectResponse getObject(com.amazon.s3.GetObject getObject);",
"java.lang.String getS3();",
"public BufferedReader readFromS3(String bucketName, String key) throws IOException {\n S3Object s3object = s3.getObject(new GetObjectRequest(\n bucketName, key));\n System.out.println(s3object.getObjectMetadata().getContentType());\n System.out.println(s3object.getObjectMetadata().getContentLength());\n return new BufferedReader(new InputStreamReader(s3object.getObjectContent()));\n }",
"public void downloadBucket(String bucketName) {\n\t\t\n\t\tSystem.out.println(\"download bucket\"+bucketName);\n\t\t\n\t\tObjectListing listing = s3client.listObjects(bucketName);\n\t\tList<S3ObjectSummary> summaries = listing.getObjectSummaries();\n\n\t\twhile (listing.isTruncated()) {\n\t\t listing = s3client.listNextBatchOfObjects (listing);\n\t\t summaries.addAll (listing.getObjectSummaries());\n\t\t}\n\t\tSystem.out.println(summaries.get(0));\n\t\t\n\t\ts3client.getObject(new GetObjectRequest(bucketName, \"aws.xlsx\"), new File(\"D:\\\\aws.xlsx\"));\n\n\t}",
"public boolean existsKeyInS3(String inKey);",
"byte[] load(String bucket, String file) throws IOException;",
"public S3Object load(String bucket, String key) throws S3Exception {\n\t\treturn null;\r\n\t}",
"public void doGet(HttpServletRequest req, HttpServletResponse resp, String filepath) throws IOException {\n\t\tStorage storage = StorageOptions.getDefaultInstance().getService();\t\n\t\tBlob blob = storage.get(BlobId.of(BUCKET, filepath));\n\t\t//Download object to the output stream.\n\t\tServletOutputStream output = resp.getOutputStream();\n\t blob.downloadTo(output);\n\t output.close();\n\t}",
"@RequestMapping(path = \"/memdownload\", method = RequestMethod.GET)\n public ResponseEntity<Resource> download(@RequestParam(\"image\") String image) throws IOException {\n File file = new ClassPathResource(SERVER_LOCATION + File.separator + image).getFile();\n\n HttpHeaders header = new HttpHeaders();\n header.add(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=img.jpg\");\n header.add(\"Cache-Control\", \"no-cache, no-store, must-revalidate\");\n header.add(\"Pragma\", \"no-cache\");\n header.add(\"Expires\", \"0\");\n\n Path path = Paths.get(file.getAbsolutePath());\n ByteArrayResource resource = new ByteArrayResource(Files.readAllBytes(path));\n\n return ResponseEntity.ok()\n .headers(header)\n .contentLength(file.length())\n .contentType(MediaType.parseMediaType(\"application/octet-stream\"))\n .body(resource);\n\n }",
"abstract public String getImageKey();",
"String getUrl(String key);",
"public boolean existsKeyInS3(String inBucket, String inKey);",
"public S3Object createS3Object(Bucket bucket, String key,\r\n\t\t\tCanonicalUser owner) throws IOException {\n\t\treturn null;\r\n\t}",
"public void getObject(String url) throws UrlCacheException {\n\n\t\tHost host = new Host(url);\n\n\t\tboolean fileExists = checkCatalogForFile(url);\n\n\t\tbeginDownloadStream(host.getHostName(), host.getPort(), host.getConcatPath(), host.getFileName(), fileExists);\n\t}",
"public static String putObjectToS3(String key, String text) {\n String bucketName = System.getenv(\"BUCKET_NAME\");\n PutObjectRequest putObjectRequest = PutObjectRequest.builder()\n .bucket(bucketName)\n .key(key)\n .build();\n RequestBody body = RequestBody.fromString(text);\n client.putObject(putObjectRequest, body);\n\n return String.format(\"https://%s.s3.amazonaws.com/%s\",\n bucketName, URLEncoder.encode(key, StandardCharsets.UTF_8));\n }",
"ByteSequence getByteSequence(Key key) throws IOException;",
"private static ByteString readImageBytes(BlobKey blobKey) throws IOException {\n BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService();\n BlobInfo blobInfo = new BlobInfoFactory().loadBlobInfo(blobKey);\n long blobSize = blobInfo.getSize();\n\n ByteArrayOutputStream outputBytes = new ByteArrayOutputStream();\n int fetchSize = BlobstoreService.MAX_BLOB_FETCH_SIZE;\n long currentByteIndex = 0;\n\n // Fetch all the bytes from the blob in fragments of the maximum fetch size.\n while (currentByteIndex < blobSize) {\n // End index is inclusive, so subtract 1 to get fetchSize bytes.\n // Get data starting at currentByteIndex until either the fetch size or\n // the end of the blob is reached.\n byte[] bytes =\n blobstoreService.fetchData(blobKey, currentByteIndex, currentByteIndex + fetchSize - 1);\n outputBytes.write(bytes);\n\n currentByteIndex += fetchSize;\n }\n\n return ByteString.copyFrom(outputBytes.toByteArray());\n }",
"public void DownloadFromUrl(String imageURL, String fileName) {\n\t\tfinal String PATH = \"/data/data/org.draijer.nvkf/\";\n\t\t\n\t\ttry {\n\t\t\tURL url = new URL(imageURL); //you can write here any link\n\t\t\tFile file = new File(PATH+fileName);\n\t\t \n\t\t\tlong startTime = System.currentTimeMillis();\n\t\t\tLog.d(\"ImageManager\", \"download begining\");\n\t\t\tLog.d(\"ImageManager\", \"download url:\" + url);\n\t\t\tLog.d(\"ImageManager\", \"downloaded file name:\" + fileName);\n\t\t\n\t\t\t/* Open a connection to that URL. */\n\t\t\tURLConnection ucon = url.openConnection();\n\t\t \n\t\t\t/*\n\t\t\t * Define InputStreams to read from the URLConnection.\n\t\t\t */\n\t\t\tBufferedInputStream bis = null;\n\t\t\ttry {\n\t\t\t\tInputStream is = ucon.getInputStream();\n\t\t\t\tbis = new BufferedInputStream(is);\n\t\t\t} catch (Exception e) {\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t\tLog.d(\"ImageManager\", \"Error: \" + e);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t/*\n\t\t\t * Read bytes to the Buffer until there is nothing more to read(-1).\n\t\t\t */\n\t\t\tByteArrayBuffer baf = new ByteArrayBuffer(50);\n\t\t\ttry {\n\t\t\t\tint current = 0;\n\t\t\t\twhile ((current = bis.read()) != -1) {\n\t\t\t\t baf.append((byte) current);\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t\tLog.d(\"ImageManager\", \"Error: \" + e);\n\t\t\t}\n\t\t\t\n\t\t\t/* Convert the Bytes read to a String. */\n\t\t\tFileOutputStream fos = new FileOutputStream(file);\n\t\t\tfos.write(baf.toByteArray());\n\t\t\tfos.close();\n\t\t\tLog.d(\"ImageManager\", \"download ready in \"+ ((System.currentTimeMillis() - startTime) / 1000) + \" sec\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tLog.d(\"ImageManager\", \"Error: \" + e);\n\t\t}\n\t}",
"boolean hasS3();",
"public native String getImageAttribute(String key) throws MagickException;",
"com.google.protobuf.ByteString\n getS3Bytes();",
"@Override\n public String upload(String bucket, String key, String file) {\n byte[] data = (file.contains(\",\")) ? Base64.getDecoder().decode(file.substring(file.indexOf(\",\") + 1))\n : Base64.getDecoder().decode(file);\n\n SaveImage.saveImage(\"storage/\", bucket + \"_\" + key, new ByteArrayInputStream(data));\n\n try {\n Regions clientRegion = Regions.fromName(AWSUtil.getValue(\"region\"));\n\n AWSCredentials credentials = new BasicAWSCredentials(AWSUtil.getValue(\"accesskey\"),\n AWSUtil.getValue(\"secretkey\"));\n\n AmazonS3 s3Client = AmazonS3ClientBuilder.standard()\n .withCredentials(new AWSStaticCredentialsProvider(credentials)).withRegion(clientRegion).build();\n\n File arquivo = new File(\"storage/\" + bucket + \"_\" + key);\n s3Client.putObject(bucket, key, arquivo);\n\n arquivo.delete(); // remove o cache local depois do upload\n\n return \"SUCCESS\";\n }\n //\n catch (AmazonServiceException e) {\n err.exception(\"AmazonServiceException\", e);\n }\n //\n catch (SdkClientException e) {\n err.exception(\"SdkClientException\", e);\n }\n\n return \"FAILURE\";\n }",
"public com.google.protobuf.ByteString\n getS3Bytes() {\n java.lang.Object ref = s3_;\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 s3_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public S3Service getS3Service(VariableSpace space) throws S3ServiceException { Try to connect to S3 first\n\t\t//\n\t\tString accessKey = space.environmentSubstitute(awsAccessKey);\n\t\tString secretKey = space.environmentSubstitute(awsSecretKey);\n\t\tAWSCredentials awsCredentials = new AWSCredentials(accessKey, secretKey);\n\n\t\tS3Service s3service = new RestS3Service(awsCredentials);\n\t\treturn s3service;\n\t}",
"public File download(String pKey) throws IOException, InvalidKeyException\r\n {\r\n File tempFile = null;\r\n\r\n HttpResponse response = sendRequest(pKey);\r\n String respStatus = response.getFirstHeader(\"status\").getValue();\r\n\r\n if (response != null && respStatus.equalsIgnoreCase(\"success\")) {\r\n tempFile = getResponseFile(response);\r\n } else if (!respStatus.equalsIgnoreCase(\"success\")) { throw new InvalidKeyException(\r\n \"Invalid blok-key \" + pKey); }\r\n\r\n return tempFile;\r\n }",
"@GetMapping(\"/retrive/{fileId}\")\r\n public ResponseEntity<ByteArrayResource> downloadFile(@PathVariable Integer fileId) {\n Optional<Image> image;\r\n image = imgrepo.findById(fileId);\r\n Image ima=null;\r\n if(image.isPresent()) {\r\n ima = image.get();\r\n }\r\n return ResponseEntity.ok()\r\n .contentType(MediaType.parseMediaType(ima.getFileType()))\r\n .header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\\\"\" + ima.getFileName() + \"\\\"\")\r\n .body(new ByteArrayResource(ima.getData()));\r\n\t\r\n\t\r\n }",
"@Test\n public void testGetS3KeyPrefix() throws Exception\n {\n uploadAndRegisterTestDataParents(downloaderWebClient);\n\n // Upload and register the initial version if of the test business object data.\n uploadTestDataFilesToS3(S3_TEST_PATH_V0);\n final UploaderInputManifestDto uploaderInputManifestDto = getTestUploaderInputManifestDto();\n\n executeWithoutLogging(DataBridgeWebClient.class, new Command()\n {\n @Override\n public void execute() throws Exception\n {\n downloaderWebClient.registerBusinessObjectData(uploaderInputManifestDto, getTestS3FileTransferRequestParamsDto(S3_TEST_PATH_V0 + \"/\"),\n StorageEntity.MANAGED_STORAGE, false);\n }\n });\n\n // Get S3 key prefix.\n BusinessObjectData businessObjectData = toBusinessObjectData(uploaderInputManifestDto);\n S3KeyPrefixInformation resultS3KeyPrefixInformation = downloaderWebClient.getS3KeyPrefix(businessObjectData);\n\n // Validate the results.\n assertNotNull(resultS3KeyPrefixInformation);\n assertEquals(S3_SIMPLE_TEST_PATH, resultS3KeyPrefixInformation.getS3KeyPrefix());\n }",
"public void sendDataToClient(AmazonS3 s3, String file) throws IOException {\n Path path = Paths.get(\"/home/ubuntu/\" + file);\n //first checking if the CDNs are having the file in its disk\n if(Files.notExists(path)){\n // not present in the disk\n if(listingKeysOfAllTheObject(s3, file)){\n gettingDataFromS3(s3, file);\n }\n else {\n System.out.println(\"file is not present in both local CDNs as well as in S3, can't serve you request!\");\n }\n } else if(Files.exists(path)){\n // Checking if the file is current version of S3 file\n if(checkingIfTheFileIsCurrent(s3, file)){\n // the file is current\n } else {\n // the file is not current, getting the latest file from the S3\n gettingDataFromS3(s3, file);\n }\n }\n }",
"@Override\n public Object get(String key) {\n final String fileName = Util.MD5(key);\n CacheModel model = container.get(fileName);\n if (model == null) {\n String name = Util.formatFileName(fileName, \"\");\n mWriter.deleteFileStartWith(name);\n return null;\n }\n if (model.data instanceof byte[]) {\n return model.data;\n }\n File file = (File) model.data;\n if (!file.exists()) {\n return null;\n }\n for (CachePolicy p : policies) {\n if (!p.modelCheck(model, container)) {\n file.delete();\n return null;\n }\n }\n model.accessUpdate();\n file.setLastModified(model.lastAccessTime);\n return file2ByteArray(file);\n }",
"public com.google.protobuf.ByteString\n getS3Bytes() {\n java.lang.Object ref = s3_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n s3_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"private boolean listingKeysOfAllTheObject(AmazonS3 s3, String file) {\n try {\n for (int i = 0; i < 1; i++) {\n ListObjectsRequest listObjectsRequest = new ListObjectsRequest().withBucketName(bucketName);\n ObjectListing objectListing;\n do {\n objectListing = s3.listObjects(listObjectsRequest);\n for (S3ObjectSummary objectSummary : objectListing.getObjectSummaries()) {\n if (objectSummary.getKey().equalsIgnoreCase(file)) {\n return true;\n }\n }\n listObjectsRequest.setMarker(objectListing.getNextMarker());\n } while (objectListing.isTruncated());\n }\n } catch (AmazonServiceException ase) {\n System.out.println(\"Caught an AmazonServiceException, \" +\n \"which means your request made it \" +\n \"to Amazon S3, but was rejected with an error response \" +\n \"for some reason.\");\n System.out.println(\"Error Message: \" + ase.getMessage());\n System.out.println(\"HTTP Status Code: \" + ase.getStatusCode());\n System.out.println(\"AWS Error Code: \" + ase.getErrorCode());\n System.out.println(\"Error Type: \" + ase.getErrorType());\n System.out.println(\"Request ID: \" + ase.getRequestId());\n } catch (AmazonClientException ace) {\n System.out.println(\"Caught an AmazonClientException, \" +\n \"which means the client encountered \" +\n \"an internal error while trying to communicate\" +\n \" with S3, \" +\n \"such as not being able to access the network.\");\n System.out.println(\"Error Message: \" + ace.getMessage());\n }\n return false;\n }",
"public Image getImage(String key)\n {\n return imageRegistry.get(key);\n }",
"@Override\n public Resource load(String filename, String path) {\n S3Object s3_file = this.s3client.getObject(\n this.s3_storage_properties.getBucketName(), path + \"/\" + filename\n );\n S3ObjectInputStream file_stream = s3_file.getObjectContent();\n\n Resource resource = new InputStreamResource(file_stream);\n if (resource.exists() || resource.isReadable()) {\n Application.logger.info(\"Loaded \"+path + \"/\" + filename+\" into S3\");\n return resource;\n }\n else {\n throw new StorageFileNotFoundException(\n \"Could not read file: \" + filename);\n }\n }",
"public S3_Upload_Image() {super(TAG);}",
"public String GetJWKS(String stsDiscoveryEndpoint, String jwksUrlKey) {\n HttpClient client = new HttpClient();\n String res = \"\";\n String jwks_uri = \"\";\n GetMethod getMethod = new GetMethod(stsDiscoveryEndpoint);\n try {\n int code = client.executeMethod(getMethod);\n if (code == 200) {\n res = getMethod.getResponseBodyAsString();\n System.out.println(res);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (StringUtils.isNotEmpty(res)) {\n JSONObject jsonObject = JSONObject.parseObject(res);\n jwks_uri = String.valueOf(jsonObject.get(jwksUrlKey));\n }\n return jwks_uri;\n }",
"private void loadMusicAssetsFromS3(String fileName) throws Exception {\n MinioClient s3Client = new MinioClient(\"https://s3.amazonaws.com/\", accessid, accesskey);\n InputStream ins = s3Client.getObject(bucket, fileName);\n FileOutputStream fos = new FileOutputStream(new File(\"temp/\" + fileName));\n fos.write(ins.read());\n }",
"private static List<GdalS3DataRequest> requestList(String bucketName) \n throws AmazonServiceException, AmazonClientException{\n\n List<GdalS3DataRequest> res = new ArrayList<GdalS3DataRequest>();\n\n AmazonS3 s3Client = new AmazonS3Client(new EnvironmentVariableCredentialsProvider());\n ListObjectsV2Request req = new ListObjectsV2Request().withBucketName(bucketName);\n ListObjectsV2Result result;\n\n do {\n result = s3Client.listObjectsV2(req);\n result.setMaxKeys(20);\n for (S3ObjectSummary objectSummary: result.getObjectSummaries()) {\n GdalS3DataRequest dr = new GdalS3DataRequest(bucketName, \n objectSummary.getKey());\n res.add(dr);\n }\n } while (result.isTruncated() == true);\n\n //return res.subList(0,10); //for testing and cost reduction during dev\n return res;\n }",
"@GET(\"/resource/example.zip\")\n Call<ResponseBody> downloadFileWithFixedUrl();",
"@LoginRequired\n\t@RequestMapping(value={\"/user/key/download\",\"/admin/user/key/download\"}, method=RequestMethod.GET)\n\tpublic @ResponseBody void downloadKey(@RequestParam(\"keyid\") Integer keyId, \n\t\t\t\tHttpServletResponse response, HttpSession session) throws Exception {\n\t\tUser user = (User) session.getAttribute(\"user\"); //retrieve logged in user\n\t\tApiKey apiKey = this.userMgtService.getApiKeyById(keyId);\n\t\t//only download key if user in session matches keyid user\n\t\tif (apiKey.getUserId()==user.getUserId())\t{\n\t\t\tString downloadFileName= \"rmap.key\";\n\t\t\tString key = apiKey.getAccessKey() + \":\" + apiKey.getSecret();\n\t\t\tOutputStream out = response.getOutputStream();\n\t\t\tresponse.setContentType(\"text/plain; charset=utf-8\");\n\t\t\tresponse.addHeader(\"Content-Disposition\",\"attachment; filename=\\\"\" + downloadFileName + \"\\\"\");\n\t\t\tout.write(key.getBytes(Charset.forName(\"UTF-8\")));\n\t\t\tout.flush();\n\t\t\tout.close();\n\t\t}\n\n\t}",
"public File downloadImage(String path2repository, String path2save) {\t\n\t\tFile imgfile = new File(path2save);\n\t\t\n\t\tValueCollection payload = new ValueCollection();\n\t\tpayload.put(\"path\", new StringPrimitive(path2repository));\n\t\t\n\t\ttry {\n\t\t\tInfoTable info = client.invokeService(ThingworxEntityTypes.Things, \"SmartDoorRepository\", \"LoadImage\", payload, 5000);\n\t\t\tImagePrimitive bin = (ImagePrimitive) info.getLastRow().getPrimitive(\"Content\");\n\t\t\tBufferedImage img = ImageIO.read(new ByteArrayInputStream(bin.getValue()));\t\t\n\t\t\timgfile.getParentFile().mkdirs();\n\t\t\timgfile.createNewFile();\n\t\t\tImageIO.write(img, \"jpg\", new File(path2save));\n\t\t\tLOG.info(\"Image {} was downloaded to {}.\",path2repository, path2save);\n\t\t} catch (Exception e) {\n\t\t\tLOG.error(\"Image couldn't be uploaded. Error: {}\",e);\n\t\t}\n\t\treturn imgfile;\n\t}",
"String download(String path) throws IOException;",
"public static AmazonS3Client getS3Client(){\n if(s3Client == null){\n s3Client = new AmazonS3Client( new BasicAWSCredentials( _ACCESS_KEY_ID, _SECRET_KEY ) );\n }\n return s3Client;\n }",
"public File getFile(String url){\n String filename=String.valueOf(url.hashCode());\n //Another possible solution (thanks to grantland)\n //String filename = URLEncoder.encode(url);\n File f = new File(cacheDir, filename);\n return f;\n \n }",
"private Future<Void> putObjectS3(final String aPath) {\n final Promise<Void> promise = Promise.promise();\n\n try {\n myAmazonS3.putObject(s3Bucket, IMAGE_JPX, new File(aPath));\n promise.complete();\n } catch (final AmazonServiceException details) {\n LOGGER.error(details.getErrorMessage());\n promise.fail(details.getErrorMessage());\n }\n\n return promise.future();\n }",
"@Test\n public void testGetFileMethodValidS3Path() throws GenieException {\n final ObjectMetadata objectMetadata = Mockito.mock(ObjectMetadata.class);\n Mockito.when(this.s3Client.getObject(Mockito.any(GetObjectRequest.class), Mockito.any(File.class))).thenReturn(objectMetadata);\n final ArgumentCaptor<GetObjectRequest> argument = ArgumentCaptor.forClass(GetObjectRequest.class);\n s3FileTransfer.getFile(S3FileTransferImplUnitTests.S3_PATH, S3FileTransferImplUnitTests.LOCAL_PATH);\n Mockito.verify(this.s3Client).getObject(argument.capture(), Mockito.any());\n Assert.assertEquals(S3FileTransferImplUnitTests.S3_BUCKET, argument.getValue().getBucketName());\n Assert.assertEquals(S3FileTransferImplUnitTests.S3_KEY, argument.getValue().getKey());\n Mockito.verify(this.downloadTimer, Mockito.times(1)).record(Mockito.anyLong(), Mockito.eq(TimeUnit.NANOSECONDS));\n Mockito.verify(this.registry, Mockito.times(1)).timer(Mockito.eq(DOWNLOAD_TIMER_NAME), this.tagsCaptor.capture());\n Assert.assertEquals(S3FileTransferImplUnitTests.SUCCESS_TAGS, this.tagsCaptor.getValue());\n }",
"public String getArtifactS3Location() {\n return this.artifactS3Location;\n }",
"@RequestMapping(value = \"/download/compressed/{downloadKey:.+}\", method = RequestMethod.GET)\n public void downloadCompressed(@PathVariable String downloadKey, HttpServletResponse response) {\n download(downloadKey, response, true);\n }",
"private void downloadImage(String url, int version) {\n ContextWrapper cw = new ContextWrapper(getApplicationContext());\n // path to /data/data/yourapp/app_data/imageDir\n File directory = cw.getDir(\"imageDir\", Context.MODE_PRIVATE);\n // Create imageDir\n File myPath = new File(directory, \"profile.jpg\");\n try {\n URL downloadURL = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) downloadURL.openConnection();\n int responseCode = conn.getResponseCode();\n if (responseCode != 200) {\n throw new Exception(\"Error in connection\");\n }\n InputStream is = conn.getInputStream();\n FileOutputStream os = new FileOutputStream(myPath);\n byte[] buffer = new byte[1024];\n int byteCount;\n while ((byteCount = is.read(buffer)) != -1) {\n os.write(buffer, 0, byteCount);\n }\n os.close();\n is.close();\n if (version > -1) {\n PrefManager.saveInt(DownloadService.this, \"VERSION\", version);\n }\n Log.d(\"com.ajs.glidetest\", \"download complete \" + version);\n PrefManager.saveBoolean(DownloadService.this, \"DOWNLOAD_OK\", true);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public Object getObject(String key);",
"ContentInputStream get(int key) throws ContentStoreException;",
"public java.lang.String getS3() {\n java.lang.Object ref = s3_;\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 s3_ = s;\n }\n return s;\n }\n }",
"ListenableFuture<Acl> getObjectAcl(String bucketName, String objectKey);",
"public byte[] getImage(String imageUrl) {\n\t\treturn restTemplate.getForObject(imageUrl, byte[].class);\n\t}",
"void downloadImage(String imageURL, ImageView imageView);",
"public java.lang.String getS3() {\n java.lang.Object ref = s3_;\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 s3_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"CreateS3VolumeRequestBuilder setSecretKey(String secretKey);",
"@Override\n\tpublic Object getObject(String key) {\n\t\tif (mInternalCache.contains(key)) {\n\t\t\ttry {\n\t\t\t\treturn Base64.fromString(mInternalCache.getString(key, null));\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.e(TAG, \"Failed to get the object from cache !\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"@RequestMapping(value = \"/downloadphoto\", method = RequestMethod.GET)\n void buildDynamicReportDownload(HttpServletRequest request, HttpServletResponse response) {\n try {\n\n // Get the form id from the submitted form.\n String photoKey = request.getParameter(\"photoKey\");\n byte[] photoBytes = s3Client.getObjectBytes(bucketName, photoKey) ;\n InputStream is = new ByteArrayInputStream(photoBytes);\n\n // Define the required information here.\n response.setContentType(\"image/png\");\n response.setHeader(\"Content-disposition\", \"attachment; filename=\"+photoKey);\n org.apache.commons.io.IOUtils.copy(is, response.getOutputStream());\n response.flushBuffer();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private String bucketName(@NonNull String s3Url) {\n return s3UrlMatcher(s3Url).group(1);\n }",
"public AmazonS3 getS3CLient() {\n AmazonS3 s3Client = new AmazonS3Client(new ProfileCredentialsProvider());\n System.out.println(\"S3 Client setup done\");\n return s3Client;\n }",
"@Override\n public List<String> AllFileFromS3Bucket()\n {\n List<Bucket> buckets= amazonS3.listBuckets();\n List<String> keys = new ArrayList<>();\n \n for (Bucket b :buckets) {\n \t System.out.println(\" **** \" + b.getName());\n \t keys.add(b.getName());\n }\n\treturn keys;\n \n }",
"CreateS3VolumeRequestBuilder setAccessKey(String accessKey);",
"@Bean\n public AmazonS3 amazonS3Client()\n {\n return new AmazonS3Client(new DefaultAWSCredentialsProviderChain());\n }",
"String get(int partitionID, String key);",
"@ApiMethod(name = \"imageDownload\")\n public SerializedProto imageDownload(User user, EncodedImageRef ref)\n throws InvalidProtocolBufferException {\n ImageRef imageRef = ImageRef.newBuilder()\n .mergeFrom(BaseEncoding.base64().decode(ref.getRefEncoded()))\n .build();\n Logger.getGlobal().info(\"Getting downloadUrl for: \" + imageRef.toString());\n\n try {\n ImageDownloadRef downloadRef = ImageDownloadRef.newBuilder()\n .setImage(imageRef)\n .setUrl(ImageStore.getDownloadUrl(imageRef))\n .build();\n return SerializedProto.fromProto(downloadRef);\n } catch (Exception ex) {\n Logger.getGlobal().log(Level.WARNING, \"Unhandled exception:\", ex);\n throw ex;\n }\n }",
"public static void main(String[] args) throws IOException {\n OSS client = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);\n\n\n// String objectName = \"community/c14deaec-7827-4fb1-bac9-eeba7a5ba59b.png\";\n//\n//// 创建OSSClient实例。\n// OSSClient ossClient = new OSSClient(endpoint, accessKeyId, accessKeySecret);\n//\n//// 删除文件。\n// ossClient.deleteObject(bucketName, objectName);\n//\n//// 关闭OSSClient。\n// ossClient.shutdown();\n\n try {\n /*\n * Batch put objects into the bucket\n */\n final String content = \"Thank you for using Aliyun Object Storage Service\";\n final String keyPrefix = \"MyObjectKey\";\n String objects = \"community/01378488-592b-443c-984f-4cbc12c8cd82.png\" +\n \",community/01394c05-3bc8-41ee-b47f-2caddfbf27f2.png\" +\n \",community/0139e96b-97a7-4270-9bad-3cc25c335184_1080x1430.png\" +\n \",community/013a938c-6486-4abb-bf96-aa5d066472cc.png\" +\n \",community/013b2de1-ef57-4204-92f8-9a2fdf1ab1c0.png\" +\n \",community/013cd7e5-ab1f-4058-a2b6-4e33c283c9b3.png\" +\n \",community/01426305-b2ef-430c-9cfe-8daf4e382b72.png\" +\n \",community/01426539-5fda-44b1-8aca-eb2c744b67ee_1080x1923.png\" +\n \",community/014c400c-e516-4c9e-adf8-a26b63729db5.png\" +\n \",community/014d3126-4b61-499e-b2a4-060d5c565ee3.png\" +\n \",community/014d4e83-9c56-4470-ae54-57387896139b.png\" +\n \",community/02038488-3867-475f-9c05-6e552ca4da70_1080x1439.png\" +\n \",community/0205bd60-49bf-412f-b04a-6c8c00b19f6c.png\" +\n \",community/02084b3b-7acb-4be0-a40c-a1245e805c85_1080x1448.png\" +\n \",community/02099953-c48c-4f22-ab5c-87449d449502_348x464.png\" +\n \",community/020d48bd-9745-4087-8ab5-7298f57a1f30_1080x1563.png\" +\n \",community/0212046c-3167-42a9-850c-788eed176526.png\" +\n \",community/0213caf3-0866-426e-8fea-797c8d533451.png\" +\n \",community/021480ff-4dcd-4b56-95e3-46a094baa742.png\" +\n \",community/01f015d8-1358-48da-bb37-07e270a27667.png\" +\n \",community/01f0a3ca-f0fa-41e5-8126-e0c5e4346d8e.png\" +\n \",community/01f0ed1c-9472-4002-b896-216c95dc214b_720x950.png\" +\n \",community/01f143c2-f8ba-4ee3-8fec-de9b0c106fd2.png\" +\n \",community/01f15f7d-6bee-41e1-9bc9-85409087f5bf.png\" +\n \",community/01f1742c-20b6-4f85-9847-2a4d85801165.png\" +\n \",community/01f32f3f-b0ce-4d9d-aef8-a75be07b655a.png\" +\n \",community/01f42d98-1994-4e3f-b025-d94a849a33a8.png\" +\n \",community/01f7c1e4-5b80-400d-8dd7-0df9a1c88601.png\" +\n \",community/01f8cd29-f527-43c6-a438-d3751663ec37.png\" +\n \",community/01fa914a-66cc-471e-af15-2bd10d34a45e_348x464.png\" +\n \",community/01fad182-2290-4b47-ab3c-ee10dff2fb86.png\" +\n \",community/0201c344-c893-4da6-a564-b4ef70ae38d6_1080x1749.png\" +\n \",community/01d7e8e6-0336-4d18-ae98-2cd2f407c46f.png\" +\n \",community/01d7ecfb-9feb-4db6-8d55-4c87cb050b4d.png\" +\n \",community/01d86f24-8589-4e60-b797-6b4b2f4330b5.png\" +\n \",community/01d96558-4bb2-4763-a7c4-ca2910f73ab1.png\" +\n \",community/01d9f15d-3555-4831-bc18-95cbe4634873_1440x2019.png\" +\n \",community/01daaccc-a3b5-4ef9-a5ce-57dfa803006b_315x420.png\" +\n \",community/01dbcbb8-dd5e-4911-8094-467ae90cf414.png\" +\n \",community/01de101b-e7f0-4d44-8a0c-6b6eb8e86e21.png\" +\n \",community/01e82423-a17b-439b-a804-5e6f898906b2.png\" +\n \",community/01be382c-4447-416c-8905-449a5d2f66a8.png\" +\n \",community/01bfb933-afd3-4529-944d-2e432731b6f8.png\" +\n \",community/01c07f89-8fab-481b-a497-ff5ea1013f5c_1080x1922.png\" +\n \",community/01c965cb-d991-4424-bdec-89634240dd51.png\" +\n \",community/01ca2e7c-f4be-40d7-a05a-7e20a02c14ac.png\" +\n \",community/01ca99ef-c34e-4a8f-a823-82c70eb96f81_720x1025.png\" +\n \",community/01d22b53-b451-4cbe-8555-0c6ea02eb255.png\" +\n \",community/01d40f28-dfdb-4972-869b-75e154817ba4.png\" +\n \",community/01d4d7a4-ffeb-4743-90b5-a4a7d5249d27_1080x1439.png\" +\n \",community/01a8cca4-eb88-4660-9404-ebb7f16d82a6_315x420.png\" +\n \",community/01aaa39a-a562-43de-97cd-d48c7fd28fdd.png\" +\n \",community/01b16c8c-14f3-4357-8c30-2638565141c9.png\" +\n \",community/01b1bc11-09fd-49b0-96ed-ed47e743faf0.png\" +\n \",community/01b35a88-e0c6-4221-8aa5-32d96069fbc3_348x464.png\" +\n \",community/01b634d1-8199-4915-aa47-947a0af5466b.png\" +\n \",community/01b841df-1bb4-44b3-af79-142c4834fd46.png\" +\n \",community/01b9660f-b57f-415c-a619-f10bd76cd860.png\" +\n \",community/01ba2a69-db78-4b4b-ad6b-31a2e715182f.png\" +\n \",community/0190b32e-60be-4a49-8cf7-e0d9ce039997.png\" +\n \",community/0191665a-67c0-4ed8-bf01-7b26f5ba1248_1080x1439.png\" +\n \",community/01972534-37fa-433e-ac22-bcceadd2a3fe.png\" +\n \",community/01981657-5340-4cf9-8c90-176c5d465173_348x464.png\" +\n \",community/019f7fdf-f8b0-4086-b2cc-9cd7d7e199b1.png\" +\n \",community/01a0bcc9-d351-4200-be1a-e9c8f322deb1.png\" +\n \",community/01a2a06d-0b31-419d-8d31-66d6e842b806.png\" +\n \",community/017dfb30-469e-401f-becb-e23c647059f1_315x420.png\" +\n \",community/01834f9a-0596-47e1-80b3-ccfd19d12127.png\" +\n \",community/01856873-80bf-4780-9ead-9968aedd8e15_1080x1563.png\" +\n \",community/0186d337-215d-478f-a657-4c0a04f6d028.png\" +\n \",community/0187db31-4c8f-4689-9f6e-500b5f39f6c3.png\" +\n \",community/018c8d90-35a3-4010-9ecc-c943e72a0745_1080x1657.png\" +\n \",community/018cb9ce-756a-4c23-8a7c-aeb85e393ec8.png\" +\n \",community/016a0bfc-3abf-46e9-b4ee-4b6c73562524.png\" +\n \",community/016be936-bca6-4827-bb7e-84b0c496b7e7_1080x1426.png\" +\n \",community/016c40f3-fb9b-49b7-ad93-bc84f4875d6c.png\" +\n \",community/016c51c6-e3dd-4903-962a-8f24c33e6547_348x464.png\" +\n \",community/016e417e-760b-4e3e-bc9b-7db6fe77d5a2_315x420.png\" +\n \",community/01731219-8bdf-4a10-9982-fe347622d877.png\" +\n \",community/0173e603-5a5f-4c2d-a3e7-f92c1b2fa50c.png\" +\n \",community/0177c179-402f-4ff7-8032-e6e4ae21431f.png\" +\n \",community/01785d9d-d5cc-4e38-b990-395ef92c13c0.png\" +\n \",community/0179b793-b92a-4926-ab88-04dd4f434b15.png\" +\n \",community/017afe9f-02d2-4004-ad9e-8afed066e99c.png\" +\n \",community/017b74df-8b8a-440a-9938-9c8b7e43bb8c_348x464.png\" +\n \",community/017d0cbb-e918-466b-a1e7-633d54c7d5b2.png\" +\n \",community/014e9713-3027-4040-b07a-9d6827e527c1_1080x1439.png\" +\n \",community/014eaafd-0702-47ff-87a1-c3cac9a1769a.png\" +\n \",community/0152e9e6-fcde-404e-9fb6-d75a5b265008.png\" +\n \",community/0154b399-ca4d-4c36-98d3-22aed2e28ed9.png\" +\n \",community/0154f316-3833-4c4b-a406-8f54c01ed121.png\" +\n \",community/01559349-89d4-4010-84da-9f3892f21b27.png\" +\n \",community/01575492-8b54-4729-9be5-ade62bb6be54.png\" +\n \",community/0157e449-b041-404c-b05c-442174c33ca1.png\" +\n \",community/015843a0-d566-42b4-b72c-b51901b4da65.png\" +\n \",community/015a1183-c580-4241-8e03-08b6b7e36703.png\" +\n \",community/015addf7-d725-4a32-bc14-12f6526bf1f6.png\" +\n \",community/015b6646-1359-4ca1-a5a1-914db80285f4.png\" +\n \",community/01641ba3-504f-4dfe-aa33-3e4a689eaa0b.png\" +\n \",community/0166b12a-9e1c-4b4e-a527-8f473faddb43_1080x1774.png\" +\n \",community/0167ec5d-b7c9-4d06-a2c8-819682546723_1080x1563.png\";\n String[] arr = objects.split(\",\");\n List<String> keys = Arrays.asList(arr);\n// for (int i = 0; i < 100; i++) {\n// String key = keyPrefix + i;\n// InputStream instream = new ByteArrayInputStream(content.getBytes());\n// client.putObject(bucketName, key, instream);\n// System.out.println(\"Succeed to put object \" + key);\n// keys.add(key);\n// }\n System.out.println();\n\n /*\n * Delete all objects uploaded recently under the bucket\n */\n System.out.println(\"\\nDeleting all objects:\");\n DeleteObjectsResult deleteObjectsResult = client.deleteObjects(\n new DeleteObjectsRequest(bucketName).withKeys(keys));\n List<String> deletedObjects = deleteObjectsResult.getDeletedObjects();\n for (String object : deletedObjects) {\n System.out.println(\"\\t\" + object);\n }\n System.out.println();\n\n } catch (OSSException oe) {\n System.out.println(\"Caught an OSSException, which means your request made it to OSS, \"\n + \"but was rejected with an error response for some reason.\");\n System.out.println(\"Error Message: \" + oe.getErrorCode());\n System.out.println(\"Error Code: \" + oe.getErrorCode());\n System.out.println(\"Request ID: \" + oe.getRequestId());\n System.out.println(\"Host ID: \" + oe.getHostId());\n } catch (ClientException ce) {\n System.out.println(\"Caught an ClientException, which means the client encountered \"\n + \"a serious internal problem while trying to communicate with OSS, \"\n + \"such as not being able to access the network.\");\n System.out.println(\"Error Message: \" + ce.getMessage());\n } finally {\n /*\n * Do not forget to shut down the client finally to release all allocated resources.\n */\n client.shutdown();\n }\n }",
"@Test\n public void downloadTest() throws ApiException {\n Integer devid = null;\n String path = null;\n File response = api.download(devid, path);\n\n // TODO: test validations\n }",
"public String getContentType(String keyName)\n {\n S3Object o = s3.getObject(bucketName, keyName);\n return o.getObjectMetadata().getContentType();\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByHandlerOrBuilder();",
"public void s3delete(String bucketName, String fileName) throws IOException {\n\n System.out.println(\"------------- CustomS3Client --------------\");\n System.out.println(\"Inside s3delete bucket Name: \"+bucketName+\" and file Name: \"+ fileName);\n\n s3 = AmazonS3ClientBuilder.standard()\n .withCredentials(new ProfileCredentialsProvider())\n .withRegion(\"us-east-1\")\n .build();\n\n // List current buckets.\n ListMyBuckets(bucketName);\n\n //upload the file\n s3.deleteObject(bucketName, fileName);\n\n System.out.println(\"------------- Success --------------\");\n\n }",
"public String deleteFileFromS3Bucket(String fileUrl) throws Exception {\n try {\n String fileName = fileUrl.substring(fileUrl.lastIndexOf(\"/\") + 1);\n if(s3Client.doesObjectExist(bucketName, fileName)){\n s3Client.deleteObject(bucketName,fileName);\n return \"Successfully deleted\";\n }\n throw new FileNotFoundException(\"File url dont matches with any object in the bucket\");\n } catch (SdkClientException e) {\n throw new SdkClientException(e.getMessage());\n } catch (AmazonClientException e) {\n throw new AmazonClientException(e.getMessage());\n } catch (Exception e) {\n throw new Exception(e.getMessage());\n }\n\n }",
"@Override\n public Blob getBlob(String bucketName, String objectPath) {\n Blob result = storageProvider.get().get(bucketName, objectPath);\n if (result == null) {\n throw new NotFoundException(String.format(\"Bucket %s, Object %s\", bucketName, objectPath));\n }\n return result;\n }",
"public byte[] get(byte[] key);",
"public String upload(String bucket, String path, String filename, InputStream is, String contentType)\r\n\t{\r\n\t\t/* Refresh the connection, if necessary. */\r\n\t\tif (isRefreshConnection())\r\n\t\t\tdoRefreshConnection();\r\n\t\t/*\r\n\t\t * The content length HAS to be set because we're not providing a File to the\r\n\t\t * PutObjectRequest but a stream.\r\n\t\t * Uploading stuff to S3 requires the amount of data to be specified before the upload. If\r\n\t\t * that is not done then we'd have to buffer the\r\n\t\t * entire stream (=File) before the upload. Setting the content length circumvents that.\r\n\t\t */\r\n\r\n\t\t/* Proceed with the actual upload. */\r\n\t\ttry\r\n\t\t{\r\n\t\t\tString prefix = FilenameUtils.getBaseName(filename);\r\n\t\t\tString suffix = FilenameUtils.getExtension(filename);\r\n\r\n\t\t\tFile file = File.createTempFile(prefix, suffix);\r\n\t\t\tOutputStream outputStream = new FileOutputStream(file);\r\n\t\t\tIOUtils.copy(is, outputStream);\r\n\t\t\toutputStream.close();\r\n\t\t\tS3Object object = new S3Object(file);\r\n\t\t\tobject.setName(sanitizePath(path) + filename);\r\n\r\n\t\t\tS3Bucket publicBucket = service.getBucket(bucket);\r\n\t\t\tAccessControlList bucketAcl = service.getBucketAcl(publicBucket);\r\n\t\t\tbucketAcl.grantPermission(GroupGrantee.ALL_USERS, Permission.PERMISSION_READ);\r\n\t\t\tpublicBucket.setAcl(bucketAcl);\r\n\t\t\tobject.setAcl(bucketAcl);\r\n\t\t\tservice.putObject(publicBucket, object);\r\n\t\t\tString pathtToFile = \"https://\" + publicBucket.getName() + \".\" + service.getEndpoint() + \"/\" + object.getKey();\r\n\t\t\tSystem.out.println(\"View public object contents here:\" + pathtToFile);\r\n\t\t\treturn pathtToFile;\r\n\t\t}\r\n\t\tcatch (S3ServiceException ase)\r\n\t\t{\r\n\t\t\tase.printStackTrace();\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn \"\";\r\n\t}",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByHandler();",
"public static String download(String url) {\n String[] command = { \"curl\", \"-L\", \"-X\", \"GET\", url };\n\n ProcessBuilder process = new ProcessBuilder(command);\n Process p;\n try {\n p = process.start();\n BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));\n StringBuilder builder = new StringBuilder();\n String line = null;\n while ((line = reader.readLine()) != null) {\n builder.append(line);\n builder.append(System.getProperty(\"line.separator\"));\n }\n String result = builder.toString();\n //System.out.print(result);\n return result;\n\n } catch (IOException e) {\n System.out.print(\"error\");\n logger.error(\"Error downloading metadata.json\");\n return null;\n }\n }",
"public Bitmap download(String url){\n \tSystem.out.println(url);\n \t//url = \"http://140.115.113.164:8080/wardrobe/wardrobedata/pic/15b0cfe6f85d45b9b09d6cc4f8d139b749f1c58c4c8e4ec6982d843116b70aca-R.PNG\";\n \tBitmap bitmap = null;\n \tbitmap = downloadBitmap(url);\n \tif(bitmap == null)\n \tSystem.out.print(\"bitmap is null!!\");\n \taddBitmapToCache(url, bitmap);\n \treturn bitmap;\n }",
"private Map<String, S3ObjectSummary> fetchSummary(String s3Url) {\n val map = new LinkedHashMap<String, S3ObjectSummary>();\n\n try {\n s3Client.listObjects(bucketName(s3Url), bucketPath(s3Url))\n .getObjectSummaries()\n .stream()\n .sorted(Comparator.comparing(S3ObjectSummary::getKey))\n .forEach(summary -> {\n val url = S3_URL_PREFIX + summary.getBucketName() + \"/\" + summary.getKey();\n map.put(url, summary);\n });\n } catch (AmazonS3Exception e) {\n if (e.getStatusCode() == 404) {\n warnOrThrowOnMissingConfigLocation(s3Url);\n log.debug(\"{} non-existing s3 bucket path: {}: {}\", this, s3Url, e.getMessage());\n } else {\n throw Tsc4jException.of(\"Error fetching summary for %s: %%s\", e, s3Url);\n }\n } catch (Exception e) {\n throw Tsc4jException.of(\"Error fetching summary for %s: %%s\", e, s3Url);\n }\n\n if (log.isDebugEnabled()) {\n if (map.isEmpty()) {\n log.debug(\"{} empty fetch summary for: {}\", this, s3Url);\n } else {\n val sb = new StringBuilder();\n map.forEach((k, v) -> sb.append(\" \" + k + \" -> \" + v + \"\\n\"));\n log.debug(\"{} fetch summary for {}:\\n {}\", this, s3Url, sb.toString().trim());\n }\n }\n\n return map;\n }",
"T get(String key) throws IOException;",
"private void createAWSImageBucket() {\n\t\tLOGGER.info(\"creating aws image bucket\");\n\t\tAmazonS3 amazonS3 = getAmazonS3Client();\n\t\tif (!amazonS3.doesBucketExist(awsImageBucketName)) {\n\t\t\ttry {\n\t\t\t\tamazonS3.createBucket(awsImageBucketName);\n\t\t\t} catch (AmazonServiceException amazonServiceException) {\n\t\t\t\tLOGGER.error(\"An exception has been occured while creating bucket {} with exception message {} \",\n\t\t\t\t\t\tawsImageBucketName, amazonServiceException.getErrorMessage());\n\t\t\t}\n\t\t}\n\t}",
"private AmazonS3 s3Client() {\n return this.s3Client;\n }",
"public ImageIcon getImage(String key) throws IOException\n\t{\n\t\tif(map == null)\n\t\t{\n\t\t\tcreateHash();\n\t\t}\n\t\t\n\t\treturn(map.get(key));\n\t}",
"boolean getInto(String key, OutputStream stream);",
"byte[] getFile(String sha) throws Exception;",
"private void getUserImage(){\r\n \t//setProgressBarIndeterminateVisibility(true);\r\n \t\r\n \tusername=null;\r\n \tfor(int i=0; i<senderList.size(); i++) {\t// kovetkezo felhasznalo kepe\r\n \t\tString str=senderList.get(i);\r\n \t\tif (!userImage.containsKey(str)) {\r\n \t\t\tusername=str;\r\n \t\t\tbreak;\r\n \t\t}\r\n \t}\r\n \t\r\n \tif (username==null) return;\r\n \t\r\n\t String url = \"ImageDownload?size=medium&username=\" + username +\r\n\t \t\t\t\t\t\t \"&ssid=\" + UserInfo.getSSID();\r\n\t downloadUserImage = new HttpGetByteConnection(url, mHandler, TASK_GETUSERIMAGE);\r\n\t downloadUserImage.start();\r\n }",
"public Object attachment(Object key);",
"@RequestMapping(path = \"/download\", method = RequestMethod.GET)\n public StreamingResponseBody downloadFile(HttpServletResponse response, @RequestParam(\"image\") String image) throws IOException {\n final int BUFFER_SIZE = 100;\n File file = new ClassPathResource(SERVER_LOCATION + File.separator + image).getFile();\n Path path = file.toPath();\n String mimeType = Files.probeContentType(path);\n logger.info(\"mimeType for \" + path + \" is \" + mimeType);\n\n\n response.setContentType(mimeType);\n response.setHeader(HttpHeaders.CONTENT_DISPOSITION, \"attachment;filename=\\\"\" + file.getName());\n\n return outputStream -> {\n int bytesRead;\n byte[] buffer = new byte[BUFFER_SIZE];\n InputStream inputStream = new FileInputStream(file);\n while ((bytesRead = inputStream.read(buffer)) != -1) {\n outputStream.write(buffer, 0, bytesRead);\n }\n };\n }",
"@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/images/{name}\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Image> readImage(\n @Path(\"name\") String name);",
"@Test\n public void testInvalidS3Keys() throws GenieException {\n final String[] invalidKeys = new String[]{ \"\", \" \", \"k[ey\" };\n for (final String invalidKey : invalidKeys) {\n final String path = \"s3://bucket/\" + invalidKey;\n Assert.assertFalse((\"Passed validation: \" + path), this.s3FileTransfer.isValid(path));\n boolean genieException = false;\n try {\n this.s3FileTransfer.getS3Uri(path);\n } catch (GenieBadRequestException e) {\n genieException = true;\n } finally {\n Assert.assertTrue((\"Parsed without error: \" + path), genieException);\n }\n }\n }",
"static public boolean downloadImage(String imageFile, String dataPath, DbxClientV2 client) throws Exception\n\t{ \n \ttry (OutputStream fos = new FileOutputStream(new File(dataPath + \"/\" + imageFile)))\n \t{\n FileMetadata metadata = client.files().downloadBuilder(\"/Photos/\" + imageFile).download(fos);\n fos.close();\n client.files().delete(\"/Photos/\" + imageFile); \n \t}\n\t catch (DbxException exception)\n\t\t{\n\t\t\t//System.out.println(imageFile + \" does not exist\");\n\t\t\treturn true;\n\t\t}\n \t\n \treturn false;\n\t}",
"public Builder setS3(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n s3_ = value;\n onChanged();\n return this;\n }",
"com.google.protobuf.ByteString\n getImageBytes();"
]
| [
"0.7524742",
"0.7005817",
"0.7005064",
"0.66591626",
"0.64015484",
"0.624499",
"0.61612874",
"0.60408455",
"0.6016892",
"0.5977459",
"0.5817764",
"0.5683877",
"0.5577554",
"0.55450165",
"0.55345714",
"0.5512936",
"0.54805374",
"0.54563445",
"0.5367819",
"0.534913",
"0.53317964",
"0.53287923",
"0.52932143",
"0.5261714",
"0.5250734",
"0.52141345",
"0.520419",
"0.5197339",
"0.51814365",
"0.51683533",
"0.5147354",
"0.51415294",
"0.51349354",
"0.5131264",
"0.51266915",
"0.51249796",
"0.5118948",
"0.5117074",
"0.5084807",
"0.50431615",
"0.50421023",
"0.5026879",
"0.5018805",
"0.5011172",
"0.5006863",
"0.5004761",
"0.50032365",
"0.5003232",
"0.4975735",
"0.49750152",
"0.49728847",
"0.49628985",
"0.49387333",
"0.49357623",
"0.49342328",
"0.49308854",
"0.4923623",
"0.4915583",
"0.48995137",
"0.4887168",
"0.48818102",
"0.48752484",
"0.48690084",
"0.48586035",
"0.48414904",
"0.48412752",
"0.4840759",
"0.48295557",
"0.4821388",
"0.4819111",
"0.48120496",
"0.48059335",
"0.48022416",
"0.47966802",
"0.47889796",
"0.4782416",
"0.4751417",
"0.47409123",
"0.4740778",
"0.47244075",
"0.47231036",
"0.47201934",
"0.47098055",
"0.47097483",
"0.47013378",
"0.46972007",
"0.468781",
"0.46856308",
"0.46853852",
"0.46674082",
"0.46601993",
"0.4653253",
"0.4650075",
"0.4638513",
"0.46351224",
"0.46312124",
"0.4620127",
"0.46095163",
"0.46083647",
"0.46017238"
]
| 0.7472201 | 1 |
Lists the contents for a bucket | public List<S3ObjectSummary> list() {
ObjectListing objectListing = s3Client.listObjects(new ListObjectsRequest().withBucketName(bucketName));
return objectListing.getObjectSummaries();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void ListMyBuckets(String bucketName) {\n List<Bucket> buckets = s3.listBuckets();\n System.out.println(\"------------- CustomS3Client --------------\");\n System.out.println(\"Bucket \"+bucketName+\" contents are as below:\");\n\n for (Bucket b : buckets) {\n System.out.println(b.getName());\n ListObjectsV2Result result = s3.listObjectsV2(b.getName());\n List<S3ObjectSummary> objects = result.getObjectSummaries();\n for (S3ObjectSummary os : objects) {\n System.out.println(\"** \" + os.getKey());\n }\n }\n System.out.println(\"------------- All bucket contents listed successfully --------------\");\n }",
"@Override\n public List<String> AllFileFromS3Bucket()\n {\n List<Bucket> buckets= amazonS3.listBuckets();\n List<String> keys = new ArrayList<>();\n \n for (Bucket b :buckets) {\n \t System.out.println(\" **** \" + b.getName());\n \t keys.add(b.getName());\n }\n\treturn keys;\n \n }",
"private static void listingTheBucket(AmazonS3 s3) {\n for( com.amazonaws.services.s3.model.Bucket bucket : s3.listBuckets()){\n bucketArrayList.add(bucket);\n }\n }",
"public com.amazon.s3.ListBucketResponse listBucket(com.amazon.s3.ListBucket listBucket);",
"@Override\n List<? extends Bucket> getBuckets();",
"public String getBucket();",
"private static List<GdalS3DataRequest> requestList(String bucketName) \n throws AmazonServiceException, AmazonClientException{\n\n List<GdalS3DataRequest> res = new ArrayList<GdalS3DataRequest>();\n\n AmazonS3 s3Client = new AmazonS3Client(new EnvironmentVariableCredentialsProvider());\n ListObjectsV2Request req = new ListObjectsV2Request().withBucketName(bucketName);\n ListObjectsV2Result result;\n\n do {\n result = s3Client.listObjectsV2(req);\n result.setMaxKeys(20);\n for (S3ObjectSummary objectSummary: result.getObjectSummaries()) {\n GdalS3DataRequest dr = new GdalS3DataRequest(bucketName, \n objectSummary.getKey());\n res.add(dr);\n }\n } while (result.isTruncated() == true);\n\n //return res.subList(0,10); //for testing and cost reduction during dev\n return res;\n }",
"public List<String> listBuckets() {\n\t\tList<String> list = new ArrayList<String>();\n\t\tfor (Bucket bucket : s3client.listBuckets()) {\n\t\t\tlist.add(bucket.getName());\n\t\t\t// System.out.println(\" - \" + bucket.getName());\n\t\t}\n\n\t\treturn list;\n\t}",
"@Override\n protected List<S3ObjectSummary> doInBackground(Void... params) {\n Log.i(TAG, \"Getting items\");\n return mClient.listObjects(Constants.BUCKET_NAME.toLowerCase(Locale.US),\n Util.getPrefix(mContext)).getObjectSummaries();\n }",
"public List<ObjectContent> getAllObjects(String id)\n {\n List<ObjectContent> objectContentList = new ArrayList<ObjectContent>();\n try\n {\n ObjectListing objectListing = s3.listObjects(new ListObjectsRequest().withBucketName(bucketName).withPrefix(id));\n List<S3ObjectSummary> s3ObjectSummary = objectListing.getObjectSummaries();\n for (S3ObjectSummary summary : s3ObjectSummary)\n {\n objectContentList.add(getObject(summary.getKey()));\n }\n return objectContentList;\n }\n catch (AmazonS3Exception e)\n {\n logger.error(e.getMessage());\n return objectContentList;\n }\n }",
"public PaginationResponse<GenericS3Input> list() throws BitmovinException {\n try {\n return this.apiClient.list(new HashMap<String, Object>()).getData().getResult();\n } catch (Exception ex) {\n throw buildBitmovinException(ex);\n }\n }",
"public void deleteBucketAndContent()\n {\n ObjectListing objectListing = client.listObjects(bucketKey);\n for (Iterator<?> iterator = objectListing.getObjectSummaries().iterator(); iterator.hasNext();) {\n S3ObjectSummary objectSummary = (S3ObjectSummary)iterator.next();\n LOG.info(\"Deleting an object: {}\", objectSummary.getKey());\n client.deleteObject(bucketKey, objectSummary.getKey());\n }\n client.deleteBucket(bucketKey);\n }",
"ArrayList<String> listAllFilesInBucket(AmazonS3 connection,\n String bucketName,\n String prefix) throws AppsmithPluginException {\n if (connection == null) {\n throw new AppsmithPluginException(\n AppsmithPluginError.PLUGIN_ERROR,\n \"Appsmith server has encountered an unexpected error when establishing \" +\n \"connection with AWS S3 server. Please reach out to Appsmith customer support to resolve this.\"\n );\n }\n\n if (bucketName == null) {\n /*\n * - bucketName is NOT expected to be null at this program point. A null check has been added in the\n * execute function already.\n */\n throw new AppsmithPluginException(\n AppsmithPluginError.PLUGIN_ERROR,\n \"Appsmith has encountered an unexpected error when getting bucket name. Please reach out to \" +\n \"Appsmith customer support to resolve this.\"\n );\n }\n\n if (prefix == null) {\n /*\n * - prefix is NOT expected to be null at this program point. A null check has been added in the\n * execute function already.\n */\n throw new AppsmithPluginException(\n AppsmithPluginError.PLUGIN_ERROR,\n \"Appsmith has encountered an unexpected error when getting path prefix. Please reach out to \" +\n \"Appsmith customer support to resolve this.\"\n );\n }\n\n ObjectListing result = connection.listObjects(bucketName, prefix);\n ArrayList<String> fileList = new ArrayList<>(getFilenamesFromObjectListing(result));\n\n while (result.isTruncated()) {\n result = connection.listNextBatchOfObjects(result);\n fileList.addAll(getFilenamesFromObjectListing(result));\n }\n\n return fileList;\n }",
"public void downloadBucket(String bucketName) {\n\t\t\n\t\tSystem.out.println(\"download bucket\"+bucketName);\n\t\t\n\t\tObjectListing listing = s3client.listObjects(bucketName);\n\t\tList<S3ObjectSummary> summaries = listing.getObjectSummaries();\n\n\t\twhile (listing.isTruncated()) {\n\t\t listing = s3client.listNextBatchOfObjects (listing);\n\t\t summaries.addAll (listing.getObjectSummaries());\n\t\t}\n\t\tSystem.out.println(summaries.get(0));\n\t\t\n\t\ts3client.getObject(new GetObjectRequest(bucketName, \"aws.xlsx\"), new File(\"D:\\\\aws.xlsx\"));\n\n\t}",
"public String getBucket() {\n return bucket;\n }",
"@GetMapping(\"/buckets\")\n @Timed\n public ResponseEntity<List<BucketDTO>> getAllBuckets(@ApiParam Pageable pageable) {\n log.debug(\"REST request to get a page of Buckets\");\n Page<BucketDTO> page = bucketService.findAll(pageable);\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/buckets\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }",
"public com.amazon.s3.ListAllMyBucketsResponse listAllMyBuckets(com.amazon.s3.ListAllMyBuckets listAllMyBuckets);",
"@GetMapping(\"/_search/buckets\")\n @Timed\n public ResponseEntity<List<BucketDTO>> searchBuckets(@RequestParam String query, @ApiParam Pageable pageable) {\n log.debug(\"REST request to search for a page of Buckets for query {}\", query);\n Page<BucketDTO> page = bucketService.search(query, pageable);\n HttpHeaders headers = PaginationUtil.generateSearchPaginationHttpHeaders(query, page, \"/api/_search/buckets\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }",
"public interface Bucket {\n String getUid();\n\n String getName();\n\n Uri getImageUri();\n\n List<Selection> getSelections();\n\n void addSelection(Selection s);\n\n void removeSelection(Selection s);\n}",
"public void deleteBucketAndContent()\n {\n ObjectListing objectListing = client.listObjects(testMeta.bucketKey);\n for ( Iterator<?> iterator = objectListing.getObjectSummaries().iterator(); iterator.hasNext(); ) {\n S3ObjectSummary objectSummary = (S3ObjectSummary)iterator.next();\n LOG.info(\"Deleting an object: {}\",objectSummary.getKey());\n client.deleteObject(testMeta.bucketKey, objectSummary.getKey());\n }\n client.deleteBucket(testMeta.bucketKey);\n }",
"@RequestLine(\"GET /show\")\n List<Bucket> getAllEmployeesList();",
"java.util.List<java.lang.String> getContentsList();",
"ListenableFuture<Acl> getObjectAcl(String bucketName, String objectKey);",
"B getBucket();",
"public String getBucketName(){\n return bucketName;\n }",
"public void getListObjectKeys(String bucketName, List<String> files) {\n final ListObjectsV2Request req = new ListObjectsV2Request().withBucketName(bucketName).withMaxKeys(1);\n ListObjectsV2Result result;\n do {\n result = s3.listObjectsV2(req);\n for (S3ObjectSummary objectSummary\n : result.getObjectSummaries()) {\n files.add(objectSummary.getKey());\n }\n req.setContinuationToken(result.getNextContinuationToken());\n } while (result.isTruncated() == true);\n }",
"public void printBucket(int bucket) throws IndexOutOfBoundsException{\n if (bucket < 0 || bucket >= Table.size()) {\n \tthrow new IndexOutOfBoundsException(\"printBucket(): \"\n \t\t+ \"bucket is outside bounds of the table\");\n }\n System.out.println(\"\\nPrinting bucket # \" + bucket + \":\\n\");\n List<T> bucketList = Table.get(bucket);\n bucketList.placeIterator();\n while (!bucketList.offEnd()) {\n \tSystem.out.print(bucketList.getIterator() + \"\\n\\n\");\n \tbucketList.advanceIterator(); \t\n }\n }",
"@Override\n\tpublic GetContentResponse listContents() {\n\t\tLOGGER.debug(\"LIST ALL CONTENTS\");\n\t\t\n\t\tClientConfig clientConfig = new ClientConfig();\n\t\t \n\t HttpAuthenticationFeature feature = HttpAuthenticationFeature.basic(env.getProperty(\"liferay.user.id\"), env.getProperty(\"liferay.user.key\"));\n\t clientConfig.register( feature) ;\n\t \n\t clientConfig.register(JacksonFeature.class);\n\t\t\n\t\tClient client = ClientBuilder.newClient(clientConfig);\n\t\tWebTarget webTarget = client.target(env.getProperty(\"liferay.api.rootpath\")).path(\"article-id/0/content-type/tagtest\");\n\t\t \n\t\tInvocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);\n\t\n\t\tResponse response = invocationBuilder.get();\n\t\t \n\t\tGetContentResponse content = response.readEntity(GetContentResponse.class);\n\t\t\n\t\t\n\t\n\t\t \n\t\tLOGGER.info(\"status::\"+response.getStatus());\n\t\t\n\t\t\n\t\t\n\t\tcontent.setStatusCode(200);\n\t\tcontent.setStatusMessage(\"Content List\");\n\t\n\t\treturn content;\n\t}",
"public Map<String, String> getDesignDocList(String bucket) {\n String placeHolder = this.urlRestConsole + \"default/buckets/%s/ddocs\";\n String serviceRestToCall = String.format(placeHolder, bucket);\n Logger.debug(\"Url du Service Rest pour obtenir la liste des designdoc : \" + serviceRestToCall);\n Logger.debug(callJerseyRestService(serviceRestToCall).toString());\n\n return null;\n }",
"byte[] load(String bucket, String file) throws IOException;",
"public List<Bucket> findBuckets(String username) throws IOException {\n\t\treturn null;\r\n\t}",
"public Bucket() {\n// this.bucketPath = bucketPath;\n keys = new Vector<>();\n }",
"@Nonnull\n Map<Object, T> fetchBucket(int bucketIdx) throws Exception;",
"List<AbstractExternalData> bundleBuckets(Iterable<DatasetListWithTotal> buckets)\n {\n long total = 0;\n\n List<AbstractExternalData> result = new LinkedList<AbstractExternalData>();\n\n for (DatasetListWithTotal bucket : buckets)\n {\n long bucketSize = bucket.getCumulatedSize();\n if (total + bucketSize < maxArchiveSize)\n {\n result.addAll(bucket.getList());\n total += bucketSize;\n }\n }\n if (total >= minArchiveSize)\n {\n return result;\n }\n else\n {\n return null;\n }\n }",
"public String getBucketName()\n {\n return bucketName;\n }",
"@GetMapping(\"/buckets/{id}\")\n @Timed\n public ResponseEntity<BucketDTO> getBucket(@PathVariable Long id) {\n log.debug(\"REST request to get Bucket : {}\", id);\n BucketDTO bucketDTO = bucketService.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(bucketDTO));\n }",
"public static ListObjectsRequest listObjectsRequest(String bucket, String prefix) {\n return argThat(new ListObjectsRequestMatcher(bucket, prefix));\n }",
"public BufferedReader readFromS3(String bucketName, String key) throws IOException {\n S3Object s3object = s3.getObject(new GetObjectRequest(\n bucketName, key));\n System.out.println(s3object.getObjectMetadata().getContentType());\n System.out.println(s3object.getObjectMetadata().getContentLength());\n return new BufferedReader(new InputStreamReader(s3object.getObjectContent()));\n }",
"public Bucket() {\n\t\t\te = new ArrayList<Entry<K, V>>();\n\t\t}",
"public String getBucketName() {\n return bucketName;\n }",
"public String getBucketName() {\n return bucketName;\n }",
"public void setBucket(String inBucket);",
"public List<String> getAllObjectsKey()\n {\n List<String> keyNameList = new ArrayList<String>();\n try\n {\n ObjectListing ol = s3.listObjects(bucketName);\n List<S3ObjectSummary> objects = ol.getObjectSummaries();\n for (S3ObjectSummary os : objects)\n {\n keyNameList.add(os.getKey());\n }\n }\n catch (AmazonS3Exception e)\n {\n logger.error(e.getMessage());\n }\n return keyNameList;\n\n }",
"@Override\n @GET\n @Path(\"/storages\")\n @Produces(\"application/json\")\n public Response getStorages() {\n String json = String.format(\"Provider %d cluster %d storages.\", provider.getProviderId(), cluster.getClusterId());\n return Response.ok(json).build();\n }",
"public void doGet(HttpServletRequest req, HttpServletResponse resp, String filepath) throws IOException {\n\t\tStorage storage = StorageOptions.getDefaultInstance().getService();\t\n\t\tBlob blob = storage.get(BlobId.of(BUCKET, filepath));\n\t\t//Download object to the output stream.\n\t\tServletOutputStream output = resp.getOutputStream();\n\t blob.downloadTo(output);\n\t output.close();\n\t}",
"private boolean listingKeysOfAllTheObject(AmazonS3 s3, String file) {\n try {\n for (int i = 0; i < 1; i++) {\n ListObjectsRequest listObjectsRequest = new ListObjectsRequest().withBucketName(bucketName);\n ObjectListing objectListing;\n do {\n objectListing = s3.listObjects(listObjectsRequest);\n for (S3ObjectSummary objectSummary : objectListing.getObjectSummaries()) {\n if (objectSummary.getKey().equalsIgnoreCase(file)) {\n return true;\n }\n }\n listObjectsRequest.setMarker(objectListing.getNextMarker());\n } while (objectListing.isTruncated());\n }\n } catch (AmazonServiceException ase) {\n System.out.println(\"Caught an AmazonServiceException, \" +\n \"which means your request made it \" +\n \"to Amazon S3, but was rejected with an error response \" +\n \"for some reason.\");\n System.out.println(\"Error Message: \" + ase.getMessage());\n System.out.println(\"HTTP Status Code: \" + ase.getStatusCode());\n System.out.println(\"AWS Error Code: \" + ase.getErrorCode());\n System.out.println(\"Error Type: \" + ase.getErrorType());\n System.out.println(\"Request ID: \" + ase.getRequestId());\n } catch (AmazonClientException ace) {\n System.out.println(\"Caught an AmazonClientException, \" +\n \"which means the client encountered \" +\n \"an internal error while trying to communicate\" +\n \" with S3, \" +\n \"such as not being able to access the network.\");\n System.out.println(\"Error Message: \" + ace.getMessage());\n }\n return false;\n }",
"public List getAll() throws FileNotFoundException, IOException;",
"@Test\n public void bucketBasics() throws Exception {\n testInfo(this.getClass().getSimpleName() + \" - bucketBasics\");\n\n try {\n print(account + \": Listing all buckets\");\n List<Bucket> bucketList = s3.listBuckets();\n assertTrue(\"Invalid or empty bucket list\", bucketList != null && !bucketList.isEmpty());\n boolean found = false;\n for (Bucket buck : bucketList) {\n if (buck.getName().equals(bucketName)) {\n found = true;\n break;\n }\n }\n assertTrue(\"Expected newly created bucket to be listed in the buckets but did not\", found);\n\n print(account + \": Checking if the bucket \" + bucketName + \" exists\");\n assertTrue(\"Expected to find \" + bucketName + \", but the bucket was not found\", s3.doesBucketExist(bucketName));\n\n print(account + \": Fetching bucket location for \" + bucketName);\n String location = s3.getBucketLocation(bucketName);\n assertTrue(\"Invalid result for bucket location, expected a string\", location != null && !location.isEmpty());\n\n print(account + \": Fetching bucket logging configuration for \" + bucketName);\n BucketLoggingConfiguration loggingConfig = s3.getBucketLoggingConfiguration(bucketName);\n assertTrue(\"Invalid result for bucket logging configuration\", loggingConfig != null);\n assertTrue(\"Expected bucket logging to be disabled, but got enabled\", !loggingConfig.isLoggingEnabled());\n assertTrue(\"Expected destination bucket to be null, but got \" + loggingConfig.getDestinationBucketName(),\n loggingConfig.getDestinationBucketName() == null);\n assertTrue(\"Expected log file prefix to be null, but got \" + loggingConfig.getLogFilePrefix(), loggingConfig.getLogFilePrefix() == null);\n\n print(account + \": Fetching bucket versioning configuration for \" + bucketName);\n BucketVersioningConfiguration versioning = s3.getBucketVersioningConfiguration(bucketName);\n assertTrue(\"Invalid result for bucket versioning configuration\", versioning != null);\n assertTrue(\"Expected bucket versioning configuration to be OFF, but found it to be \" + versioning.getStatus(),\n versioning.getStatus().equals(BucketVersioningConfiguration.OFF));\n } catch (AmazonServiceException ase) {\n printException(ase);\n assertThat(false, \"Failed to run bucketBasics\");\n }\n }",
"@GetMapping(\"/buckets/customer/{id}\")\n @Timed\n public ResponseEntity<List<BucketDTO>> getAllBucketsWithCustomer(@PathVariable Long id, @ApiParam Pageable pageable) {\n log.debug(\"REST request to get a page of Products\", id);\n List<BucketDTO> list = bucketService.findAllBucketsWithCustomer(id);\n // HttpHeaders headers = PaginationUtil.generateSearchPaginationHttpHeaders( \"/api/products/category/{id}\");\n return new ResponseEntity<>(list, HttpStatus.OK);\n }",
"protected Collection getNewBucket()\n {\n return new ArrayList();\n }",
"public PaginationResponse<GenericS3Input> list(GenericS3InputListQueryParams queryParams) throws BitmovinException {\n try {\n return this.apiClient.list(queryParams).getData().getResult();\n } catch (Exception ex) {\n throw buildBitmovinException(ex);\n }\n }",
"@GetAction(\"/list\")\n public void list(String q) {\n Iterable<Account> accounts = accountDao.findAll();\n render(accounts);\n }",
"@Override\n\tpublic List<? extends MyHashMap.Bucket<K, V>> getBuckets() {\n\t\treturn (ArrayList<? extends MyHashMap.Bucket<K, V>>) b;\n\t}",
"public List<Content> getAllContents() {\n return contentRepo.findAll();\n }",
"public String getBucketName() {\n\treturn _bucketName;\n }",
"public ArrayList<Bucket> oneFileOneBucket(String directoryName) {\n\t try {\n\t File directory = new File(directoryName);\n\t String[] allFileName = directory.list();\n\t int length = allFileName.length;\n\n\t // chaque callstack est un unique bucket\n\t ArrayList<Bucket> allBuckets = new ArrayList<Bucket>(length);\n\n\t for (int i = 0; i < length; i++) {\n\t CallStack cs = read(directoryName + \"/\" + allFileName[i]);\n\t Bucket bucket = new Bucket();\n\t bucket.addCallStack(cs);\n\n\t allBuckets.add(bucket);\n\n\t }\n\n\t return allBuckets;\n\t } catch (NullPointerException e) {\n\t System.err.println(\"Repertoire destination inexistant.\");\n\t return null;\n\t }\n\n\n\t}",
"public abstract List<String> getContent( );",
"@Test\n\tpublic void testList() throws Exception {\n\t\tFileInfo[] fileInfos = this.storage.list(bucket, Storage.ListMode.VERSIONED_LATEST);\n\t\tString[] prefixedFileInfos = this.prefixedStorage.list(\"\");\n\t\tMap<String, String> fileMap = this.storage.listHashes(bucket);\n\n\t\tfor (FileInfo fileInfo : fileInfos) {\n\t\t\tSystem.out.println(fileInfo.toString());\n\t\t}\n\n\t\tint size = fileInfos.length;\n\t\tif (size == prefixedFileInfos.length) {\n\t\t\tfor (int i = 0; i < size; ++i) {\n\t\t\t\tString path = fileInfos[i].path;\n\t\t\t\tAssert.assertEquals(path, prefixedFileInfos[i]);\n\t\t\t\tAssert.assertEquals(fileInfos[i].hash, fileMap.get(path));\n\t\t\t}\n\t\t} else {\n\t\t\t// the two file lists are different\n\t\t\tAssert.fail();\n\t\t}\n\t}",
"@Override\n protected void onPostExecute(Bucket bucket) {\n if(bucket != null) {\n adapter.prepend(Collections.singletonList(bucket));\n }else {\n Snackbar.make(getView(), \"Error!\", Snackbar.LENGTH_LONG).show();\n }\n }",
"@GET(\"dev/gig/my_gigs/\")\n Call<List<GigListResp>> getMyGigsList(@Header(\"authorization\") String auth);",
"public String getBucketName() {\n return getProperty(BUCKET_NAME);\n }",
"List<CatalogItem> getAllCatalogItems();",
"@Updatable\n @Required\n public BucketResource getBucket() {\n return bucket;\n }",
"public interface StorageService {\n\n /**\n * List all the {@link Bucket}s in a given {@link com.google.openbidder.ui.entity.Project}.\n */\n List<Bucket> listAllBuckets(ProjectUser projectUser);\n\n /**\n * List all the objects in a given {@link Bucket}.\n */\n BucketContents listAllObjectsInBucket(ProjectUser projectUser, String bucketName);\n\n /**\n * List all objects in a given {@link Bucket} with a prefix.\n */\n BucketContents listAllObjectsInBucket(\n ProjectUser projectUser,\n String bucketName,\n String objectPrefix);\n\n /**\n * Remove the specified object.\n */\n void deleteObject(ProjectUser projectUser, String bucketName, String objectName);\n}",
"public void gettingDataFromS3(AmazonS3 s3, String key) throws IOException {\n try {\n for (int i = 0; i < 1; i++) {\n S3Object object = s3.getObject(new GetObjectRequest(bucketName, key));\n if( object.getKey().equalsIgnoreCase(key)) {\n String contentType = object.getObjectMetadata().getContentType();\n storingTheObjectToDisk1(object.getObjectContent(), key);\n break;\n }\n }\n String eTag = gettingETagOfTheFile(key);\n try {\n File file = new File(\"/home/ubuntu/\" + key + \".etag\");\n BufferedWriter output = new BufferedWriter(new FileWriter(file));\n output.write(eTag);\n output.close();\n } catch ( IOException e ) {\n e.printStackTrace();\n }\n } catch (AmazonServiceException ase) {\n System.out.println(\"Caught an AmazonServiceException, which\" + \" means your request made it \" + \"to Amazon S3, but was rejected with an error response\" +\n \" for some reason.\");\n System.out.println(\"Error Message: \" + ase.getMessage());\n System.out.println(\"HTTP Status Code: \" + ase.getStatusCode());\n System.out.println(\"AWS Error Code: \" + ase.getErrorCode());\n System.out.println(\"Error Type: \" + ase.getErrorType());\n System.out.println(\"Request ID: \" + ase.getRequestId());\n } catch (AmazonClientException ace) {\n System.out.println(\"Caught an AmazonClientException, which means\"+ \" the client encountered \" + \"an internal error while trying to \" + \"communicate with S3, \" + \"such as not being able to access the network.\");\n System.out.println(\"Error Message: \" + ace.getMessage());\n }\n }",
"@Override\n public List<StoredObject> listObjects(URI storageArea)\n {\n return Ordering.from(new Comparator<StoredObject>()\n {\n @Override\n public int compare(StoredObject o1, StoredObject o2)\n {\n return o1.getLocation().compareTo(o2.getLocation());\n }\n }).immutableSortedCopy(objects.getUnchecked(storageArea));\n }",
"private static void displayBucketCount3() throws IOException {\n\t\tString str=\"\";\n\t\t\n\t\t//bucket count\n\t\tfor(int i:bucketCountT.keySet()){\n\t\t\tstr+=String.valueOf(i)+ \" \" + String.valueOf(bucketCountT.get(i))+\"\\n\";\n\t\t}\n\t\tstr+=\"\\n\";\n\t\twriter3.write(str);\n\t\t\n\t}",
"public String listKeys(Bucket bucket, String prefix, String marker,\r\n\t\t\tString delimiter, int maxKeys) throws S3Exception {\n\t\treturn null;\r\n\t}",
"@Override\n public Vector<CloudFile> list() {\n if (!this.directoryExists) {\n fileList.removeAllElements();\n return fileList;\n }\n\n if (!directoryHasChanged) {\n return fileList;\n }\n\n final Integer listingComplete = new Integer(0);\n fileList.removeAllElements();\n\n System.out.println(\"GOOGLE DRIVE ls <\" + currentDirectory + \">\");\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n List<com.google.api.services.drive.model.File> res = new ArrayList<File>();\n Drive.Files.List request = drive.files().list();\n System.out.println(\"~~~Listing\");\n\n do {\n try {\n FileList files = request.setQ(\"'\" + currentFolderID + \"' in parents and trashed=false\").execute();\n\n res.addAll(files.getItems());\n request.setPageToken(files.getNextPageToken());\n } catch (HttpResponseException e) {\n\n if (e.getStatusCode() == 401) { // Credentials have been revoked.\n System.err.println(\"Google Drive API credentials have been revoked\");\n authenticate();\n }\n } catch (IOException e) {\n System.err.println(\"An error occurred: \" + e);\n request.setPageToken(null);\n\n }\n\n } while (request.getPageToken() != null &&\n request.getPageToken().length() > 0);\n\n //add shared with me directory when listing home\n if (currentDirectory.equals( getHomeDirectory() )) {\n FileList files = request.setQ(\"sharedWithMe\").execute();\n res.addAll(files.getItems());\n }\n\n for (com.google.api.services.drive.model.File f : res) {\n fileList.add(new GoogleCloudFile(drive, f));\n }\n\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n System.out.println(\"~~~Listed\");\n //notify parent function that listing has completed\n synchronized (listingComplete) {\n listingComplete.notify();\n }\n }\n });\n\n //start the file listing thread\n thread.start();\n //wait for it to complete listing\n System.out.println(\"Waiting ls\");\n synchronized (listingComplete) {\n try {\n listingComplete.wait();\n } catch (InterruptedException e) {\n }\n }\n System.out.println(\"Ls complete\");\n\n return fileList;\n }",
"@Override\n\t\tpublic List<InJarResourceImpl> getContents(InJarResourceImpl serializationArtefact) {\n\t\t\treturn serializationArtefact.getContents(false);\n\t\t}",
"public abstract List<File> listFiles() throws AccessException;",
"public List<Volume> list() {\n List<Volume> volumes = new ArrayList<Volume>();\n\n try {\n\n HttpResponse<Volume[]> jsonResponse = Unirest.get(rootUrl + ENDPOINT_DATASET_LIST)\n .basicAuth(auth.getUsername(),auth.getPassword())\n .header(\"accept\", \"application/json\")\n .asObject(Volume[].class);\n //System.out.print(jsonResponse.getBody());\n\n if (jsonResponse.getStatus() == HttpStatus.SC_OK) {\n Volume [] body = jsonResponse.getBody();\n System.out.println(body);\n\n for (Volume b: body){\n volumes.add(b);\n }\n }\n\n } catch (UnirestException e) {\n e.printStackTrace();\n }\n\n return volumes;\n }",
"@Required\n @Updatable\n public BucketResource getBucket() {\n return bucket;\n }",
"public void listBooks() {\n for (int g = 0; g < books.length; g++) {\n books[g].toString();\n }\n// List all books in Bookstore\n }",
"@Override\n public Blob getBlob(String bucketName, String objectPath) {\n Blob result = storageProvider.get().get(bucketName, objectPath);\n if (result == null) {\n throw new NotFoundException(String.format(\"Bucket %s, Object %s\", bucketName, objectPath));\n }\n return result;\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString getGcsBucketBytes() {\n java.lang.Object ref = gcsBucket_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n gcsBucket_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"private void handleListOperation() {\n\n Client client = ClientBuilder.newBuilder().build();\n WebTarget webTarget = client.target(\"http://localhost:8080/pa165/rest/bricks/\");\n webTarget.register(auth);\n Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);\n Response response = invocationBuilder.get();\n\n if (response.getStatus() == Response.Status.OK.getStatusCode()) {\n List<BrickDto> brickDtoList = response.readEntity(new GenericType<List<BrickDto>>() {\n });\n System.out.println(\"Number of bricks returned: \" + brickDtoList.size());\n\n for (BrickDto b : brickDtoList) {\n System.out.println(b);\n }\n } else {\n System.out.println(\"Error code:\" + response.getStatus());\n }\n }",
"interface Bucket extends MultiBucketsAggregation.Bucket {}",
"public com.google.protobuf.ByteString getGcsBucketBytes() {\n java.lang.Object ref = gcsBucket_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n gcsBucket_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public CacheStatus[] getCacheStatuses(String populateBucketsKey)\nthrows MediaAlbumException;",
"public String printBucket() {\n\t\t\tString result = this.toString() + \" \";\n\t\t\tif (this.getNext() != null)\n\t\t\t\tresult += this.getNext().printBucket();\n\t\t\treturn result;\n\t\t}",
"@GET(\"/dev/gig/\")\n Call<List<GigListResp>> getGigList(@Header(\"authorization\") String auth);",
"public abstract int deleteAllObjects() throws BucketStorageException;",
"public static void main(String... args) {\n Cluster cluster = Cluster.connect(\"127.0.0.1\", \"Administrator\", \"password\");\n\n /*\n * Open a bucket with the bucket name.\n */\n Bucket bucket = cluster.bucket(\"beer-sample\");\n\n /*\n * Performs the view query\n */\n ViewResult result = bucket.viewQuery(\"beer\", \"brewery_beers\", viewOptions().limit(2));\n\n /*\n * Prints metadata like the total number of rows.\n */\n System.err.println(result.metaData());\n\n /*\n * Iterates the rows and prints the information from each row\n */\n result.rows().forEach(r -> {\n System.out.println(\"-- Row --\");\n System.out.println(\"ToString(): \" + r);\n System.out.println(\"ID: \" + r.id());\n System.out.println(\"Key: \" + r.keyAs(JsonArray.class));\n System.out.println(\"Value: \" + r.valueAs(JsonObject.class));\n });\n }",
"BucketName(String bucketName) {\n this.bucketName = bucketName;\n }",
"List<Content> getContentListForApproval();",
"private void list() throws JSONException, InterruptedException {\r\n\t /**Database Manager Object used to access mlab.com*/\r\n db.setDataBaseDestination(cDatabase, null, true);\r\n db.accessDatabase();\r\n MongoCollection<Document> col = db.getEntireDatabaseResults();\r\n \r\n // iterator to go through clubs in database\r\n Iterable<Document> iter;\r\n iter = col.find();\r\n \r\n // ArrayList of clubs names \r\n ArrayList<String> clubs = new ArrayList<>();\r\n \r\n // add names to list\r\n for (Document doc : iter) {\r\n JSONObject profile = new JSONObject(doc);\r\n clubs.add(profile.get(cName).toString());\r\n }\r\n \r\n Collections.sort(clubs);\r\n \r\n for (String name : clubs)\r\n \t logger.log(Level.INFO, name);\r\n \r\n displayOpen();\r\n }",
"@Override\n\tpublic ArrayList<FileSystemItem> getContent() {\n\t\treturn this.content;\n\t}",
"public boolean checkReadPermission(final String bucket_path) {\r\n\t\t\treturn checkReadPermission(BeanTemplateUtils.build(DataBucketBean.class).with(DataBucketBean::full_name, bucket_path).done().get());\r\n\t\t}",
"private static void deleteBucketsWithPrefix() {\n\n logger.debug(\"\\n\\nDelete buckets with prefix {}\\n\", bucketPrefix );\n\n String accessId = System.getProperty(SDKGlobalConfiguration.ACCESS_KEY_ENV_VAR);\n String secretKey = System.getProperty(SDKGlobalConfiguration.SECRET_KEY_ENV_VAR);\n\n Properties overrides = new Properties();\n overrides.setProperty(\"s3\" + \".identity\", accessId);\n overrides.setProperty(\"s3\" + \".credential\", secretKey);\n\n final Iterable<? extends Module> MODULES = ImmutableSet\n .of(new JavaUrlHttpCommandExecutorServiceModule(),\n new Log4JLoggingModule(),\n new NettyPayloadModule());\n\n BlobStoreContext context =\n ContextBuilder.newBuilder(\"s3\").credentials(accessId, secretKey).modules(MODULES)\n .overrides(overrides).buildView(BlobStoreContext.class);\n\n BlobStore blobStore = context.getBlobStore();\n final PageSet<? extends StorageMetadata> blobStoreList = blobStore.list();\n\n for ( Object o : blobStoreList.toArray() ) {\n StorageMetadata s = (StorageMetadata)o;\n\n if ( s.getName().startsWith( bucketPrefix )) {\n try {\n blobStore.deleteContainer(s.getName());\n } catch ( ContainerNotFoundException cnfe ) {\n logger.warn(\"Attempted to delete bucket {} but it is already deleted\", cnfe );\n }\n logger.debug(\"Deleted bucket {}\", s.getName());\n }\n }\n }",
"public void setBucketName(String bucketName)\n {\n this.bucketName = bucketName;\n }",
"public void getListAt( final String name, StorageLister lister ) throws TJSException;",
"@Override\n public Iterable<File> list(File storageDirectory) {\n\treturn null;\n }",
"public static String getPublicReadPolicy(String bucket_name) {\r\n Policy bucket_policy = new Policy().withStatements(\r\n new Statement(Statement.Effect.Allow)\r\n .withPrincipals(Principal.AllUsers)\r\n .withActions(S3Actions.GetObject)\r\n .withResources(new Resource(\r\n \"arn:aws:s3:::\" + bucket_name + \"/*\")));\r\n return bucket_policy.toJson();\r\n }",
"public List getList() throws HibException;",
"List<String> getFileSystemEntries(String path) throws IOException;",
"public VFSNode[] ls(VRL vrl) throws VRLSyntaxException,\n InterruptedException, ExecutionException, CloudRequestTimeout, VlException {\n VFSNode[] nodesArry = null;\n try {\n String[] containerAndPath = getContainerAndPath(vrl);\n\n\n PageSet<? extends StorageMetadata> list;\n if (containerAndPath.length <= 1\n || StringUtil.isEmpty(containerAndPath[1])) {\n\n logger.debugPrintf(\"list(%s).\\n \", containerAndPath[0]);\n\n list = getBlobstore().list(containerAndPath[0]);\n\n } else {\n logger.debugPrintf(\"list(%s/%s).\\n \", containerAndPath[0],\n containerAndPath[1]);\n list = getBlobstore().list(containerAndPath[0],\n Builder.inDirectory(containerAndPath[1]));\n\n }\n\n ArrayList<VFSNode> nodes = new ArrayList<VFSNode>();\n\n for (StorageMetadata s : list) {\n VRL nodeVRL = vrl.append(s.getName());\n VFSNode node = getResourceType(s.getType(), nodeVRL);\n nodes.add(node);\n getCache().put(nodeVRL, new CloudMetadataWrapper(s));\n }\n\n nodesArry = new VFSNode[nodes.size()];\n nodesArry = nodes.toArray(nodesArry);\n } finally {\n //blobContext.close();\n }\n return nodesArry;\n }",
"public List<IDoc> getDocs();",
"public List<IDoc> getDocs();",
"public ContentList filterContentList(ContentDatabaseFilter filter) throws DatabaseException;"
]
| [
"0.7611348",
"0.70719635",
"0.7018117",
"0.7006049",
"0.68136543",
"0.6765361",
"0.656247",
"0.6546688",
"0.62479055",
"0.618286",
"0.61707824",
"0.61442536",
"0.61308235",
"0.611786",
"0.61135274",
"0.6111344",
"0.6032075",
"0.59918314",
"0.5968005",
"0.59616053",
"0.59521145",
"0.59369135",
"0.58530456",
"0.5837196",
"0.5827446",
"0.5788048",
"0.57803535",
"0.5749476",
"0.572916",
"0.56703687",
"0.5606034",
"0.5603396",
"0.55817765",
"0.5562119",
"0.5494172",
"0.54575825",
"0.5438188",
"0.54004717",
"0.5363119",
"0.53524154",
"0.53524154",
"0.5351481",
"0.5329501",
"0.5298853",
"0.5258561",
"0.52427626",
"0.5228691",
"0.5217844",
"0.52050453",
"0.5204169",
"0.52023",
"0.52010715",
"0.5175006",
"0.5158434",
"0.5158411",
"0.5141916",
"0.5130542",
"0.5128969",
"0.51117396",
"0.51009303",
"0.5091087",
"0.5074583",
"0.5073848",
"0.5058259",
"0.50376284",
"0.503711",
"0.5032782",
"0.5025075",
"0.5018468",
"0.50120443",
"0.50117886",
"0.5008343",
"0.5008096",
"0.5003003",
"0.4982007",
"0.49661097",
"0.49587443",
"0.49487454",
"0.49474522",
"0.4944424",
"0.49417758",
"0.49415416",
"0.48991424",
"0.4875349",
"0.48752198",
"0.4874469",
"0.48744527",
"0.48606026",
"0.48597145",
"0.48558202",
"0.485344",
"0.4839182",
"0.4835819",
"0.48350343",
"0.4834615",
"0.4814665",
"0.4814545",
"0.48137504",
"0.48137504",
"0.48122743"
]
| 0.6228581 | 9 |
Delete an object from s3 | public void delete(String bucketName, String s3key) {
s3Client.deleteObject(bucketName, s3key);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void remove(S3Object s3Object) throws S3Exception {\n\t\t\r\n\t}",
"public com.amazon.s3.DeleteObjectResponse deleteObject(com.amazon.s3.DeleteObject deleteObject);",
"void deleteObject(ProjectUser projectUser, String bucketName, String objectName);",
"public void s3delete(String bucketName, String fileName) throws IOException {\n\n System.out.println(\"------------- CustomS3Client --------------\");\n System.out.println(\"Inside s3delete bucket Name: \"+bucketName+\" and file Name: \"+ fileName);\n\n s3 = AmazonS3ClientBuilder.standard()\n .withCredentials(new ProfileCredentialsProvider())\n .withRegion(\"us-east-1\")\n .build();\n\n // List current buckets.\n ListMyBuckets(bucketName);\n\n //upload the file\n s3.deleteObject(bucketName, fileName);\n\n System.out.println(\"------------- Success --------------\");\n\n }",
"public abstract LocalAbstractObject deleteObject(UniqueID objectID) throws NoSuchElementException, BucketStorageException;",
"public void deleteBucketAndContent()\n {\n ObjectListing objectListing = client.listObjects(bucketKey);\n for (Iterator<?> iterator = objectListing.getObjectSummaries().iterator(); iterator.hasNext();) {\n S3ObjectSummary objectSummary = (S3ObjectSummary)iterator.next();\n LOG.info(\"Deleting an object: {}\", objectSummary.getKey());\n client.deleteObject(bucketKey, objectSummary.getKey());\n }\n client.deleteBucket(bucketKey);\n }",
"public boolean deleteObject(String keyName)\n {\n try\n {\n s3.deleteObject(bucketName, keyName);\n }\n catch (AmazonS3Exception e)\n {\n logger.error(e.getMessage());\n return false;\n }\n return true;\n }",
"public void deleteBucketAndContent()\n {\n ObjectListing objectListing = client.listObjects(testMeta.bucketKey);\n for ( Iterator<?> iterator = objectListing.getObjectSummaries().iterator(); iterator.hasNext(); ) {\n S3ObjectSummary objectSummary = (S3ObjectSummary)iterator.next();\n LOG.info(\"Deleting an object: {}\",objectSummary.getKey());\n client.deleteObject(testMeta.bucketKey, objectSummary.getKey());\n }\n client.deleteBucket(testMeta.bucketKey);\n }",
"public void deleteBucket() {\n\n logger.debug(\"\\n\\nDelete bucket\\n\");\n\n String accessId = System.getProperty(SDKGlobalConfiguration.ACCESS_KEY_ENV_VAR);\n String secretKey = System.getProperty(SDKGlobalConfiguration.SECRET_KEY_ENV_VAR);\n\n Properties overrides = new Properties();\n overrides.setProperty(\"s3\" + \".identity\", accessId);\n overrides.setProperty(\"s3\" + \".credential\", secretKey);\n\n final Iterable<? extends Module> MODULES = ImmutableSet\n .of(new JavaUrlHttpCommandExecutorServiceModule(),\n new Log4JLoggingModule(),\n new NettyPayloadModule());\n\n BlobStoreContext context =\n ContextBuilder.newBuilder(\"s3\").credentials(accessId, secretKey).modules(MODULES)\n .overrides(overrides).buildView(BlobStoreContext.class);\n\n BlobStore blobStore = context.getBlobStore();\n blobStore.deleteContainer( bucketName );\n }",
"public String deleteFileFromS3Bucket(String fileUrl) throws Exception {\n try {\n String fileName = fileUrl.substring(fileUrl.lastIndexOf(\"/\") + 1);\n if(s3Client.doesObjectExist(bucketName, fileName)){\n s3Client.deleteObject(bucketName,fileName);\n return \"Successfully deleted\";\n }\n throw new FileNotFoundException(\"File url dont matches with any object in the bucket\");\n } catch (SdkClientException e) {\n throw new SdkClientException(e.getMessage());\n } catch (AmazonClientException e) {\n throw new AmazonClientException(e.getMessage());\n } catch (Exception e) {\n throw new Exception(e.getMessage());\n }\n\n }",
"public boolean delete(Object obj) throws Exception;",
"public boolean delete(String bucket, String pathAndFilename)\r\n\t{\r\n\t\t/* Refresh the connection, if necessary */\r\n\t\tif (isRefreshConnection())\r\n\t\t\tdoRefreshConnection();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tservice.deleteObject(bucket, pathAndFilename);\r\n\t\t}\r\n\t\tcatch (ServiceException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic void delete(Object object) {\n\t\t\r\n\t}",
"public abstract int deleteAllObjects() throws BucketStorageException;",
"public void deleteBucket(Bucket bucket) throws IOException {\n\t\t\r\n\t}",
"public GenericS3Input delete(String inputId) throws BitmovinException {\n try {\n return this.apiClient.delete(inputId).getData().getResult();\n } catch (Exception ex) {\n throw buildBitmovinException(ex);\n }\n }",
"@Override\n\tpublic void delete(T obj) throws Exception {\n\t\t\n\t}",
"public abstract boolean delete(Object obj) ;",
"public void doDelete(HttpServletRequest req, HttpServletResponse resp, String filepath) throws IOException {\n\t\tStorage storage = StorageOptions.getDefaultInstance().getService();\n\t storage.delete(BUCKET, filepath);\n\t}",
"public boolean delete(String pathAndFilename)\r\n\t{\r\n\r\n\t\t/* Refresh the connection, if necessary. */\r\n\r\n\t\tif (isRefreshConnection())\r\n\t\t\tdoRefreshConnection();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tservice.deleteObject(bucket, pathAndFilename);\r\n\t\t}\r\n\t\tcatch (ServiceException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}",
"public void deleteObject() {\n\n\t}",
"public void deleteObject(String id) {\n\t\t\n\t}",
"@Override\n public void deleteController(String objectId) throws ServiceException {\n UuidUtils.checkUuid(objectId);\n RestfulResponse response = getMssProxy().deleteResource(bucketName, resourceTypeName, objectId);\n ResponseUtils.checkResonseAndThrowException(response);\n\n }",
"void delete(T obj) throws PersistException;",
"void deleteBucket(int bucketIdx) throws IOException;",
"@Override\n\tpublic int delete(Object object) {\n\t\treturn 0;\n\t}",
"void delete(M object) throws DataAccessException;",
"public com.amazon.s3.DeleteBucketResponse deleteBucket(com.amazon.s3.DeleteBucket deleteBucket);",
"@Override\r\n\tpublic void delete(ObjectWithId objectToDelete) {\n\r\n\t}",
"public void delete(Object object)\n{\n\t// remove the object\n\tobjects.remove(object);\n}",
"public void delete(Object obj) throws SQLException {\n\r\n\t}",
"@Override\n\tpublic int delete(Object ob) {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic int delete(Object ob) {\n\t\treturn 0;\n\t}",
"@Override\n public void delete(ClientAuditTrailHolder oldObj_) throws Exception\n {\n\n }",
"protected void delete(Object object) {\n EntityManager em = getEntityManager();\n em.getTransaction().begin();\n try {\n em.remove(object);\n em.getTransaction().commit();\n } catch (Exception e) {\n LOG.error(\"Could not delete Object\", e);\n em.getTransaction().rollback();\n } finally {\n em.close();\n }\n }",
"void delete(Object aObject);",
"@Override\n\tpublic void delete(Object o) {\n\t}",
"@DeleteMapping(\"/deleteFile\")\n public String deleteFile(@RequestPart(value = \"url\") String fileUrl) {\n return this.amazonClient.deleteFileFromS3Bucket(fileUrl);\n }",
"private static void deleteBucketsWithPrefix() {\n\n logger.debug(\"\\n\\nDelete buckets with prefix {}\\n\", bucketPrefix );\n\n String accessId = System.getProperty(SDKGlobalConfiguration.ACCESS_KEY_ENV_VAR);\n String secretKey = System.getProperty(SDKGlobalConfiguration.SECRET_KEY_ENV_VAR);\n\n Properties overrides = new Properties();\n overrides.setProperty(\"s3\" + \".identity\", accessId);\n overrides.setProperty(\"s3\" + \".credential\", secretKey);\n\n final Iterable<? extends Module> MODULES = ImmutableSet\n .of(new JavaUrlHttpCommandExecutorServiceModule(),\n new Log4JLoggingModule(),\n new NettyPayloadModule());\n\n BlobStoreContext context =\n ContextBuilder.newBuilder(\"s3\").credentials(accessId, secretKey).modules(MODULES)\n .overrides(overrides).buildView(BlobStoreContext.class);\n\n BlobStore blobStore = context.getBlobStore();\n final PageSet<? extends StorageMetadata> blobStoreList = blobStore.list();\n\n for ( Object o : blobStoreList.toArray() ) {\n StorageMetadata s = (StorageMetadata)o;\n\n if ( s.getName().startsWith( bucketPrefix )) {\n try {\n blobStore.deleteContainer(s.getName());\n } catch ( ContainerNotFoundException cnfe ) {\n logger.warn(\"Attempted to delete bucket {} but it is already deleted\", cnfe );\n }\n logger.debug(\"Deleted bucket {}\", s.getName());\n }\n }\n }",
"public void store(S3Object s3Object) throws S3Exception {\n\t\t\r\n\t}",
"@Override\n public void destroyObject(MongoTemplate obj) throws Exception {\n }",
"void delete(int metaTagId);",
"boolean beforeDelete(T resource, boolean sendDataToAmazon);",
"@Override\n\tpublic void delete(URI uri) throws StorageSecuirtyException,\n\t\t\tResourceAccessException {\n\t\t\n\t}",
"public void doDelete(T objectToDelete) throws SQLException;",
"public void delete()\n\t{\n\t\tif(object.onDelete())\n\t\t{\n\t\t\tremoveFromRegion();\n\t\t}\n\t}",
"@Override\n\tpublic void delete(Serializable id) {\n\t\t\n\t}",
"void doDelete(SnapshotMetadata metadata) throws Exception;",
"@Override\n\tpublic boolean delete(Etape obj) {\n\t\treturn false;\n\t}",
"@DeleteMapping(\"/buckets/{id}\")\n @Timed\n public ResponseEntity<Void> deleteBucket(@PathVariable Long id) {\n log.debug(\"REST request to delete Bucket : {}\", id);\n bucketService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"@Override\r\n\tpublic boolean delete(Moteur obj) {\n\t\treturn false;\r\n\t}",
"@Override\n\tpublic void delete(Client obj) {\n\t\t\n\t}",
"public static String DeleteEntityDemoMethod(String entityType, String itemId) {\n try {\n HashMap<String, String> awsCreds = getApiResponse();\n\n //Create client\n URL url = new URL(BaseConnectionString + entityType + \"/\" + itemId);\n AWS4SignerForAuthorizationHeader auth = new AWS4SignerForAuthorizationHeader(url, \"DELETE\", \"execute-api\", \"us-east-1\");\n Map<String, String> headers = new HashMap<>();\n headers.put(\"content-type\", \"application/json\");\n headers.put(\"x-amz-security-token\", awsCreds.get(\"sessionToken\"));\n headers.put(\"x-api-key\", ConfigSetup.getCredentials().get(\"xApiKey\"));\n\n\n String authorization = auth.computeSignature(headers, new HashMap<>(), AWS4SignerBase.EMPTY_BODY_SHA256, awsCreds.get(\"accessKey\"), awsCreds.get(\"secretKey\"));\n client = (HttpURLConnection) url.openConnection();\n\n headers.put(\"Authorization\", authorization);\n client.setRequestMethod(\"DELETE\");\n\n client.connect();\n String response = HttpUtils.invokeHttpRequest(url, \"DELETE\", headers, null);\n return response;\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n } finally {\n if (client != null) {\n client.disconnect();\n }\n }\n }",
"public com.amazon.s3.PutObjectResponse putObject(com.amazon.s3.PutObject putObject);",
"@Override\n\tpublic void delete(Unidade obj) {\n\n\t}",
"void delete(Object entity);",
"@Override\n\tpublic void delete(String arg0) {\n\t\t\n\t}",
"public void delete(String so_cd);",
"@Override\n\tpublic void delete(Serializable id) {\n\n\t}",
"void delete(String identifier) throws IOException;",
"public void delete(K id);",
"@Override\n\tpublic int deleteObject(Evaluate entity) {\n\t\treturn evaluateMapper.deleteObject(entity);\n\t}",
"@Override\n\tpublic void delete(String id) throws Exception {\n\n\t}",
"public void delete( T obj) {\n\t\tSession session = this.sessionFactory.getCurrentSession();\n\t\t\n\t\tsession.delete(obj);\n\t}",
"void deleteRecipe(RecipeObject recipe);",
"<T> void delete(T persistentObject);",
"public void delete();",
"public void delete();",
"public void delete();",
"public void delete();",
"public void delete();",
"public void delete();",
"void delete(T obj);",
"@Override\r\n public void delete(Copiable obj) {\r\n if (locate(obj) != -1) {\r\n try {\r\n deleteAt(locate(obj));\r\n } catch (IndexRangeException ex) {\r\n //Shouldn't happen\r\n }\r\n }\r\n }",
"@Override\r\n\tpublic Ngo delete(Ngo obj) {\n\t\treturn null;\r\n\t}",
"public Response delete(String path) throws IOException {\n return delete(cluster, path);\n }",
"@Override\n\tpublic void deleteItem(Object toDelete) {}",
"public void delById(Serializable id) ;",
"private void deleteResource() {\n }",
"@Override\r\n\tpublic void deleteBySSO(String sso) {\n\t\t\r\n\t}",
"void delete(T persistentObject);",
"public int delete(o dto);",
"public boolean delete(ModelObject obj);",
"private void deleteFun() throws IOException {\n String jsonObject = \"{\\\"age\\\":10,\\\"dateOfBirth\\\":1471455886564,\\\"fullName\\\":\\\"Johan Doe\\\"}\";\n IndexRequest indexRequest = new IndexRequest(\"people\");\n indexRequest.source(jsonObject, XContentType.JSON);\n\n IndexResponse response = client.index(indexRequest, RequestOptions.DEFAULT);\n String id = response.getId();\n\t System.out.println(\"id = \" + id);\n\n GetRequest getRequest = new GetRequest(\"people\");\n getRequest.id(id);\n\n GetResponse getResponse = client.get(getRequest, RequestOptions.DEFAULT);\n System.out.println(getResponse.getSourceAsString());\n\n DeleteRequest deleteRequest = new DeleteRequest(\"people\");\n deleteRequest.id(id);\n\n DeleteResponse deleteResponse = client.delete(deleteRequest, RequestOptions.DEFAULT);\n\t System.out.println(\"deleteResponse = \" + deleteResponse.toString());\n }",
"@Test\n public void removesAsset() throws Exception {\n try (\n final MkContainer container = new MkGrizzlyContainer().next(\n new MkAnswer.Simple(HttpURLConnection.HTTP_NO_CONTENT, \"\")\n ).start(this.resource.port());\n ) {\n final RtReleaseAsset asset = new RtReleaseAsset(\n new ApacheRequest(container.home()),\n release(),\n 3\n );\n asset.remove();\n final MkQuery query = container.take();\n MatcherAssert.assertThat(\n query.method(),\n Matchers.equalTo(Request.DELETE)\n );\n container.stop();\n }\n }",
"void delete(K id);",
"void delete(K id);",
"@Override\n\tpublic void delete(String keyName) {\n\n\t}",
"int deleteByExample(TbSerdeParamsExample example);",
"@Override\n\tpublic void delete(ThumbnailDTO dto) throws Exception {\n\t\tsession.selectOne(namespace+\".thumbnailDataDelete\",dto);\n\t}",
"@Override\n\tpublic void delete(Object object) {\n\t\tSession session = HibernateSessionFactory.getSession();\n\t\tTransaction ts = session.beginTransaction();\n\t\tsession.delete(object);\n\t\tts.commit();\n\t\tsession.close();\n\t}",
"ResponseEntity deleteById(UUID id);",
"@Override\n\tprotected void doDelete(School object) throws Exception {\n\t\tdeleteDocument(object.getCompanyId(), object.getSchoolId() );\n\n\t}",
"int deleteByExample(TagDataExample example);",
"public void delete(){\r\n\r\n }",
"@Transactional(isolation=Isolation.READ_COMMITTED, \n\t\t\tpropagation=Propagation.REQUIRED,\n\t\t\trollbackFor=Exception.class)\n\tpublic void delete(Object object) {\n\t\tsessionFactory.getCurrentSession().delete(object);\n\t}",
"int deleteByExample(AccessKeyRecordEntityExample example);",
"@Override\n\tpublic void deleteById(String id) throws Exception {\n\t\t\n\t}",
"public com.amazon.s3.GetObjectResponse getObject(com.amazon.s3.GetObject getObject);",
"@Override\n\tpublic boolean delete(Object obj) throws SQLException {\n\t\treturn false;\n\t}"
]
| [
"0.799243",
"0.78376853",
"0.7475522",
"0.7402168",
"0.70680565",
"0.6946029",
"0.6923326",
"0.6905439",
"0.6640443",
"0.65961456",
"0.6565584",
"0.6511293",
"0.6472653",
"0.64671844",
"0.64152163",
"0.6367721",
"0.6344265",
"0.62799555",
"0.6268047",
"0.6266962",
"0.6230561",
"0.6162707",
"0.6158226",
"0.6127339",
"0.6099744",
"0.60886735",
"0.6079094",
"0.5982911",
"0.5960858",
"0.595035",
"0.59223175",
"0.5916215",
"0.5916215",
"0.58912134",
"0.588975",
"0.5879811",
"0.5869127",
"0.58587986",
"0.5851945",
"0.5841446",
"0.5841064",
"0.5830269",
"0.5825844",
"0.58215815",
"0.5818018",
"0.58119994",
"0.58116615",
"0.58101755",
"0.57890415",
"0.578811",
"0.5771504",
"0.57661676",
"0.5766078",
"0.5764801",
"0.5756516",
"0.5754175",
"0.57498604",
"0.5746482",
"0.57177263",
"0.5713899",
"0.5693182",
"0.5685164",
"0.56825244",
"0.56759745",
"0.5657659",
"0.56535107",
"0.5647206",
"0.5647206",
"0.5647206",
"0.5647206",
"0.5647206",
"0.5647206",
"0.5645634",
"0.56344175",
"0.5630259",
"0.5629625",
"0.56258565",
"0.5612211",
"0.56119007",
"0.55977136",
"0.55953354",
"0.5589291",
"0.5579475",
"0.55774224",
"0.557279",
"0.55638087",
"0.55638087",
"0.55578125",
"0.55565655",
"0.5556055",
"0.5550179",
"0.55282784",
"0.5527811",
"0.55260354",
"0.5522208",
"0.5509271",
"0.5506139",
"0.550519",
"0.5501152",
"0.5499891"
]
| 0.6785935 | 8 |
Get byte array of exception message in standard character set encoding format | private byte[] getExceptionMessageByte(String message) {
return message.getBytes(StandardCharsets.UTF_8);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public byte[] errorMessageAsBytes()\n {\n final int len = errorStringLength();\n final byte[] bytes = new byte[len];\n\n buffer().getBytes(errorMessageOffset(), bytes, 0, len);\n\n return bytes;\n }",
"public String[] getEncoding() throws PDFNetException {\n/* 771 */ return GetEncoding(this.a);\n/* */ }",
"public byte[] getEncoded() throws CRLException {\n if (encoding == null) {\n encoding = crl.getEncoded();\n }\n byte[] result = new byte[encoding.length];\n System.arraycopy(encoding, 0, result, 0, encoding.length);\n return result;\n }",
"com.google.protobuf.ByteString\n getErrmsgBytes();",
"com.google.protobuf.ByteString\n getErrorBytes();",
"com.google.protobuf.ByteString\n getErrorBytes();",
"com.google.protobuf.ByteString\n getErrorBytes();",
"public String getEncoding() throws MessagingException {\n/* 80 */ return this.encoding;\n/* */ }",
"com.google.protobuf.ByteString\n getErrBytes();",
"byte[] getEByteArray();",
"static byte[] readMessage() {\n byte[] msg = new byte[0];\n try {\n msg = Hex.decodeHex(\n \"000600000003000000017d010000\" +\n \"bb931fd17f85fb26e8209eb7af5747258163df29a7dd8f87fa7617963fcfa1aa\" +\n \"b0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe0400\"\n );\n } catch (DecoderException e) {\n e.printStackTrace();\n }\n return msg;\n }",
"public abstract byte[] getEncoded() throws CRLException;",
"com.google.protobuf.ByteString\n getErrorMessageBytes();",
"com.google.protobuf.ByteString\n getErrorMessageBytes();",
"com.google.protobuf.ByteString\n getErrorMessageBytes();",
"com.google.protobuf.ByteString\n getErrorMessageBytes();",
"com.google.protobuf.ByteString\n getErrorMessageBytes();",
"com.google.protobuf.ByteString\n getErrorMessageBytes();",
"com.google.protobuf.ByteString\n getErrorMessageBytes();",
"com.google.protobuf.ByteString\n getErrorMessageBytes();",
"com.google.protobuf.ByteString\n getErrorMessageBytes();",
"com.google.protobuf.ByteString\n getErrorMessageBytes();",
"com.google.protobuf.ByteString\n getErrorMessageBytes();",
"com.google.protobuf.ByteString\n getErrorMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"public byte[] getTextBytes();",
"public abstract byte[] toBytes() throws Exception;",
"public byte[] toByteArray() throws Exception {\n int size = getSize();\n if (size == 0) {\n return null;\n }\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n CCompatibleOutputStream os = new CCompatibleOutputStream(byteStream);\n write(os);\n return byteStream.toByteArray();\n }",
"private byte[] getUTF8Bytes(String input) {\n\t\treturn input.getBytes(StandardCharsets.UTF_8);\n\t}",
"public byte[] getBytes(){\n\t\treturn message;\n\t}",
"String getContentEncoding();",
"public String byteToChar(byte b[], String encoding);",
"public com.google.protobuf.ByteString\n getErrmsgBytes() {\n java.lang.Object ref = errmsg_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n errmsg_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"private static byte[] getLsfileaeMessage100() throws HeaderPartException, HostMessageFormatException {\r\n Map < String, Object > map = new HashMap < String, Object >();\r\n map.put(Constants.CICS_PROGRAM_NAME_KEY, \"LSFILEAE\");\r\n map.put(Constants.CICS_LENGTH_KEY, \"79\");\r\n map.put(Constants.CICS_DATALEN_KEY, \"6\");\r\n \r\n LegStarMessage legstarMessage = new LegStarMessage();\r\n legstarMessage.setHeaderPart(new LegStarHeaderPart(map, 0));\r\n legstarMessage.addDataPart(new CommareaPart(\r\n HostData.toByteArray(LsfileaeCases.getHostBytesHexRequest100())));\r\n return legstarMessage.toByteArray();\r\n\r\n }",
"com.google.protobuf.ByteString getE();",
"@Test\n public void test084() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n // Undeclared exception!\n try {\n String string0 = errorPage0.encode(\"%k8|vhOy\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }",
"public com.google.protobuf.ByteString\n getExceptionsBytes(int index) {\n return exceptions_.getByteString(index);\n }",
"com.google.protobuf.ByteString\n getExceptionsBytes(int index);",
"public com.google.protobuf.ByteString\n getErrBytes() {\n java.lang.Object ref = err_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n err_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"java.lang.String getEncoded();",
"public abstract byte[] getEncoded();",
"public com.google.protobuf.ByteString\n getErrmsgBytes() {\n java.lang.Object ref = errmsg_;\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 errmsg_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public ByteBuffer getBytesForMessage(StompFrame msg) throws CharacterCodingException {\n StringBuilder sb = new StringBuilder(msg.getWholeSTOMPMessage());\n sb.append(this._messageSeparator);\n ByteBuffer bb = this._encoder.encode(CharBuffer.wrap(sb));\n return bb;\n }",
"public String readMessage() {\r\n return new String(readMessageAsByte());\r\n }",
"public com.google.protobuf.ByteString\n getExceptionsBytes(int index) {\n return exceptions_.getByteString(index);\n }",
"public com.google.protobuf.ByteString\n getErrBytes() {\n java.lang.Object ref = err_;\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 err_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"com.google.protobuf.ByteString\n getErrorInfoBytes();",
"com.google.protobuf.ByteString\n getErrorInfoBytes();",
"com.google.protobuf.ByteString\n getErrorInfoBytes();",
"com.google.protobuf.ByteString\n getErrorInfoBytes();",
"public static byte[] encode (final String message) throws MalformedMessageException {\n\t\tfinal byte[] encodedBytes;\n\t\ttry {\n\t\t\tif (StrUtils.hasChars(message, Boolean.TRUE)) {\n\t\t\t\tfinal char [] chars = message.toCharArray();\n\t\t\t\t\n\t\t\t\tByteBuffer byteBuffer = null;\n\t\t\t\tfinal CharBuffer charBuffer = CharBuffer.wrap(chars);\n\t\t\t\ttry {\n\t\t\t\t\tencoderLock.lock();\n\t\t\t\t\tbyteBuffer = encoder.encode(charBuffer);\n\t\t\t\t} finally {\n\t\t\t\t\tencoderLock.unlock();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tencodedBytes = BufferUtils.readFromBuffer(byteBuffer, Boolean.FALSE);\n\t\t\t} else {\n\t\t\t\tencodedBytes = ArrayUtils.EMPTY_BYTE_ARRAY;\n\t\t\t}\n\t\t} catch (Throwable t) {\n\t\t\tfinal MalformedMessageException e = new MalformedMessageException(\n\t\t\t\tCommErrorType.ENCODE, PrintUtils.format(\"Error al codificar mensaje '%s'\", message), t\n\t\t\t);\n\t\t\te.addArgument(\"Message\", message);\n\t\t\tthrow e;\n\t\t}\n\t\treturn encodedBytes;\n\t}",
"byte[] decodeBytes();",
"protected abstract byte[] getCANMessage();",
"com.google.protobuf.ByteString\n getEncodedBytes();",
"com.google.protobuf.ByteString\n getField1252Bytes();",
"protected byte[] stringToByte_8859_1(String str) throws SaslException {\n char[] buffer = str.toCharArray();\n try {\n if (useUTF8) {\n for (int i = 0; i < buffer.length; i++) {\n if (buffer[i] > 'ÿ') {\n return str.getBytes(\"UTF8\");\n }\n }\n }\n return str.getBytes(\"8859_1\");\n } catch (UnsupportedEncodingException e) {\n throw new SaslException(\"cannot encode string in UTF8 or 8859-1 (Latin-1)\", e);\n }\n }",
"private byte[] randomByteArray() throws UnsupportedEncodingException {\n int len = sr.nextInt(maxlen);\n @StringBuilder@ sb = new @StringBuilder@(len);\n\n for (int i = 0; i < len; i++)\n sb.append((char) sr.nextInt(128));\n return sb.toString().getBytes(\"UTF-8\");\n }",
"public byte [] readMessageAsByte() {\r\n byte [] data = new byte[256];\r\n int length;\r\n\r\n try {\r\n length = in.readInt();\r\n if (length > 0) {\r\n data = new byte[length];\r\n in.readFully(data, 0, data.length);\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return data;\r\n }",
"byte[] getStructuredData(String messageData);",
"public byte[] getEncoded() \n {\n try\n {\n return super.getEncoded();\n }\n catch (IOException e)\n {\n return null;\n }\n }",
"public byte[] getUTF8Bytes(String str) {\n\t try { return str.getBytes(\"UTF-8\"); } catch (Exception ex) { return null; }\n\t }",
"public String getMessage() {\n String message = super.getMessage();\n\n if (message == null) {\n message = \"\";\n }\n\n if (buffer != null) {\n return message + ((message.length() > 0) ? \" \" : \"\")\n + \"(Hexdump: \" + ByteBuffers.getHexdump(buffer) + ')';\n } else {\n return message;\n }\n }",
"public byte[] EncodeToBytes() throws CoseException {\n return EncodeToCBORObject().EncodeToBytes();\n }",
"public byte[] readRawString() throws IOException {\n int length = in.readInt();\n byte[] bytes = new byte[5 + length];\n bytes[0] = (byte) Type.STRING.code;\n bytes[1] = (byte) (0xff & (length >> 24));\n bytes[2] = (byte) (0xff & (length >> 16));\n bytes[3] = (byte) (0xff & (length >> 8));\n bytes[4] = (byte) (0xff & length);\n in.readFully(bytes, 5, length);\n return bytes;\n }",
"char[] getCharContent() throws IOException;",
"@Test\n public void stringFromBytesArray() {\n byte[] input = new byte[]{\n 12,\n -68,\n 102,\n 17,\n -11,\n 84,\n 11,\n -48,\n -128,\n -102,\n 56,\n -115,\n -55,\n 90,\n 97,\n 91\n };\n\n assertEquals(\n \"0cbc6611f5540bd0809a388dc95a615b\",\n JdkHashTools.getStringFromByteArray(input)\n );\n }",
"private static String guessAppropriateEncoding(CharSequence contents) {\n\t\tfor (int i = 0; i < contents.length(); i++) {\n\t\t\tif (contents.charAt(i) > 0xFF) {\n\t\t\t\treturn \"UTF-8\";\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"private static String guessAppropriateEncoding(CharSequence contents) {\n\t\tfor (int i = 0; i < contents.length(); i++) {\n\t\t\tif (contents.charAt(i) > 0xFF) {\n\t\t\t\treturn \"UTF-8\";\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"@Override\n\tpublic byte[] toByteArray() throws OpException {\n\t\ttry\n\t\t{\n\t\t\treturn serialize();\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tOpException eop = new OpException(e.getMessage());\n\t\t\teop.setStackTrace(e.getStackTrace());\n\t\t\tthrow eop;\n\t\t}\n\t}",
"public byte[] toByteArray() {\n final byte[] data = new byte[maxIndex];\n for (Map.Entry<Integer, String> entry : addr2str.entrySet()) {\n final String str = entry.getValue();\n final int addr = entry.getKey();\n for (int k = 0; k < str.length(); k++) {\n data[addr + k] = (byte) str.charAt(k);\n }\n }\n return data;\n }",
"com.google.protobuf.ByteString\n getLogMessageBytes();",
"public static String guessAppropriateEncoding(CharSequence contents) {\n for (int i = 0; i < contents.length(); i++) {\n if (contents.charAt(i) > 0xFF) {\n return \"UTF-8\";\n }\n }\n return null;\n }",
"public byte[] readRawBytes() throws IOException {\n return readRawBytes(Type.BYTES.code);\n }",
"byte[] getBytes();",
"byte[] getBytes();",
"public byte[] getEncoded() throws java.security.cert.CertificateEncodingException {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.security.keystore.DelegatingX509Certificate.getEncoded():byte[], dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.security.keystore.DelegatingX509Certificate.getEncoded():byte[]\");\n }",
"public com.google.protobuf.ByteString\n getEBytes() {\n java.lang.Object ref = e_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n e_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public static byte[] ECP_to_byte(ECP ecp){\n byte[] temp = new byte[65];\n ecp.toBytes(temp, false);\n return temp;\n }",
"public com.google.protobuf.ByteString\n getErrorBytes() {\n java.lang.Object ref = error_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n error_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public static byte[] encode(CharSequence string) {\r\n try {\r\n return CHARSET.newEncoder().encode(CharBuffer.wrap(string)).array();\r\n } catch (CharacterCodingException e) {\r\n throw new IllegalArgumentException(\"Encoding failed\", e);\r\n }\r\n }",
"public byte[] encodeAsBytes() {\n StringBuffer encoding = new StringBuffer();\n ListIterator it = this.headers.listIterator();\n \n while (it.hasNext()) {\n SIPHeader siphdr = (SIPHeader) it.next();\n if (! (siphdr instanceof ContentLength) )\n encoding.append(siphdr.encode());\n \n }\n \tencoding.append(contentLengthHeader.encode()).append(NEWLINE);\n \n byte[] retval = null;\n byte[] content = this.getRawContent();\n if (content != null) {\n // encoding.append(SIPHeaderNames.CONTENT_LENGTH +\n // COLON +\n // SP + content.length + NEWLINE);\n // encoding.append(NEWLINE);\n // Append the content\n \n byte[] msgarray = null;\n try {\n msgarray = encoding.toString().getBytes(\"UTF-8\");\n } catch (UnsupportedEncodingException ex) {\n InternalErrorHandler.handleException(ex);\n }\n \n retval = new byte[msgarray.length + content.length];\n System.arraycopy(msgarray,0,retval,0,msgarray.length);\n System.arraycopy(content,0,retval,msgarray.\n length,content.length);\n } else {\n // Message content does not exist.\n // encoding.append(SIPHeaderNames.CONTENT_LENGTH +\n // COLON + SP + '0' + NEWLINE);\n //encoding.append(NEWLINE);\n \n try {\n retval = encoding.toString().getBytes(\"UTF-8\");\n } catch (UnsupportedEncodingException ex) {\n InternalErrorHandler.handleException(ex);\n }\n }\n return retval;\n }",
"public byte[] charToByte(String text, String encoding);"
]
| [
"0.6837976",
"0.6215173",
"0.61990726",
"0.6171405",
"0.6112117",
"0.6112117",
"0.61107993",
"0.60949045",
"0.6093534",
"0.60464793",
"0.59640175",
"0.5855667",
"0.5814543",
"0.5814543",
"0.5814543",
"0.5814543",
"0.5814543",
"0.5814543",
"0.5814543",
"0.5814543",
"0.5814543",
"0.5814543",
"0.5814261",
"0.5814261",
"0.5811514",
"0.5811514",
"0.5811514",
"0.5811514",
"0.5811514",
"0.5811514",
"0.5811514",
"0.5811514",
"0.5811514",
"0.57838696",
"0.57838696",
"0.57838696",
"0.57838696",
"0.57838696",
"0.57838696",
"0.57838696",
"0.57838696",
"0.57838696",
"0.57838696",
"0.57105666",
"0.57088083",
"0.56663966",
"0.5649613",
"0.55860585",
"0.55639267",
"0.5563126",
"0.5552475",
"0.55460465",
"0.5530241",
"0.5524329",
"0.5522252",
"0.55196965",
"0.5518977",
"0.55126745",
"0.550401",
"0.54976565",
"0.54862773",
"0.5483757",
"0.5481818",
"0.5468813",
"0.5467164",
"0.5467164",
"0.5467164",
"0.5467164",
"0.54618144",
"0.5458675",
"0.54442763",
"0.54327744",
"0.5427673",
"0.54199886",
"0.54074055",
"0.5405238",
"0.54047",
"0.5403428",
"0.53995764",
"0.5398477",
"0.53903943",
"0.53898865",
"0.53637004",
"0.53465796",
"0.53463715",
"0.53463715",
"0.5341459",
"0.5339059",
"0.53361243",
"0.53233",
"0.531261",
"0.5307984",
"0.5307984",
"0.53043395",
"0.5298322",
"0.52938396",
"0.5289657",
"0.527839",
"0.5271876",
"0.52677554"
]
| 0.8052352 | 0 |
Costruttore di ManagerSistema, chiama il costruttore della superclasse Utente | public ManagerSistema(String codiceFiscale, String nome, String cognome, String indirizzo,
Date dataNascita, String telefono, String email, String password, Sbu sbu ){
super(codiceFiscale, nome, cognome, indirizzo, dataNascita,
telefono, email, password);
sbu.setManager(this);
this.sbuGestito = sbu;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Sistema(){\r\n\t\t\r\n\t}",
"@Override\n public GenericManager<Societe, Long> getManager() {\n return manager;\n }",
"@Override\r\n public GenericManager<TraitSalaire, Long> getManager() {\r\n return manager;\r\n }",
"public interface Manager {\n\n}",
"public interface AvanceSalaireManager\r\n extends GenericManager<AvanceSalaire, Long>\r\n{\r\n\r\n public final static String SERVICE_NAME = \"AvanceSalaireManager\";\r\n \r\n public AvanceSalaire generereglement(AvanceSalaire entity);\r\n \r\n public AvanceSalaire confirme(AvanceSalaire entity);\r\n \r\n public AvanceSalaire annule(AvanceSalaire entity);\r\n\r\n}",
"public interface CompteManager\r\n extends GenericManager<Compte, Long>\r\n{\r\n\r\n public final static String SERVICE_NAME = \"CompteManager\";\r\n\r\n}",
"@Override\r\n public GenericManager<ViewListeEleve, Long> getManager() {\r\n return manager;\r\n }",
"public void buscarGestor(){\r\n\t\t\r\n\t}",
"public UsuarioControlador() {\r\n\t\tsuper(Usuario.class);\r\n\t}",
"public abstract void instalar(SistemaOperativo SO);",
"private RepositorioOrdemServicoHBM() {\n\n\t}",
"@Override\n\tpublic void setMgr(Integer mgr) {\n\t\tsuper.setMgr(mgr);\n\t}",
"public interface SMSCALLManager\r\n extends GenericManager<SMSCALL, Long>\r\n{\r\n\r\n public final static String SERVICE_NAME = \"SMSCALLManager\";\r\n\r\n}",
"public abstract Setusuario buscarUsuario(String nomUsuario);",
"public void setManager(String manager) {\n this.manager = manager;\n }",
"public ISegSistemaDAO getSegSistemaDAO() {\r\n return new SegSistemaDAO();\r\n }",
"public ingresar_Sistema() {\n initComponents();\n }",
"public EmpleadoService() {\n super();\n emf = Persistence.createEntityManagerFactory(\"up_h2\");\n empDAO = new EmpleadoDAO(emf);\n }",
"public Manager() {\n\t\tthis(\"Nom par defaut\", \"Prenom par defaut\", 0);\n\t}",
"public PanelAdministrarMarcas() {\n initComponents();\n cargarTabla();\n }",
"public GestorAhorcadoManagedBean() {\r\n ahorcado = new Ahorcado();\r\n }",
"public OmsUsuario() {\n\t}",
"public UserManager() {\n types = new ArrayList<>(2);\n types.add(Account.AccountType.Administrateur.toString());\n types.add(Account.AccountType.Superviseur.toString());\n }",
"public interface ConditionPaiementManager\r\n extends GenericManager<ConditionPaiement, Long>\r\n{\r\n\r\n public final static String SERVICE_NAME = \"ConditionPaiementManager\";\r\n\r\n}",
"@Size(max=4)\n\t@Override\n\tpublic Integer getMgr() {\n\t\treturn super.getMgr();\n\t}",
"public ModeloMenuBase() {\n\t\tinicializar();\n\t}",
"public MenuUsuario(ControladorUsuario1 controladorUsuario) {\n initComponents();\n controladorU=controladorUsuario;\n }",
"@Override\n public GenericManager<TraitementCourrier, Long> getManager() {\n return manager;\n }",
"UmType getUserManager();",
"public DataManage() {\r\n\t\tsuper();\r\n\t}",
"public String getManager() {\n\n return this.manager;\n }",
"public abstract void registrarSubproducto(EntityManager sesion, Subproducto subproducto);",
"public String getManager() {\n return manager;\n }",
"public ManagedRegistroSolicitudMateriales() {\n }",
"public interface SeguimientoManager extends Serializable {\n\n public boolean insertSeguimiento(Seguimiento seguimiento);\n public boolean updateSeguimiento(Seguimiento seguimiento);\n public List<Seguimiento> getAll();\n public List<Seguimiento> getSeguimiento(int idProspecto);\n}",
"public MultaDAO() {\r\n super(MultaDAO.class);\r\n }",
"public nomina()\n {\n deducidoClase = new deducido();\n devengadoClase = new devengado();\n }",
"public interface IArticuloLeyMercadoGestor {\n\n\t/**\n\t * M\\u00E9todo que permite registrar un art\\u00EDculo con estado CODIFICADO seg\\u00FAn la Ley Org\\u00E1nica de Regulaci\\u00F3n y Control del Poder de Mercado\n\t * @author mgranda\n\t * @param codigoCompania\n\t * @param codigoArticulo\n\t * @param userId\n\t * @throws SICException\n\t */\n\tvoid codificarArticuloLeyMercado(Integer codigoCompania, String codigoArticulo, String userId) throws SICException;\n\t\n\t/**\n\t * M\\u00E9todo que permite registrar un art\\u00EDculo con estado DESCODIFICADO seg\\u00FAn la Ley Org\\u00E1nica de Regulaci\\u00F3n y Control del Poder de Mercado\n\t * @author mgranda\n\t * @param codigoCompania\n\t * @param codigoArticulo\n\t * @param userId\n\t * @param codigoCausal\n\t * @param valorCausal\n\t * @throws SICException\n\t */\n\tvoid descodificarArticuloLeyMercado(Integer codigoCompania, String codigoArticulo, String userId, Integer codigoCausal, String valorCausal) throws SICException;\n\n\t/**\n\t * M\\u00E9todo que permite registrar un art\\u00EDculo con estado REACTIVADO seg\\u00FAn la Ley Org\\u00E1nica de Regulaci\\u00F3n y Control del Poder de Mercado\n\t * @author mgranda\n\t * @param codigoCompania\n\t * @param codigoArticulo\n\t * @param userId\n\t * @throws SICException\n\t */\n\tvoid reactivarArticuloLeyMercado(Integer codigoCompania, String codigoArticulo, String userId) throws SICException;\n\t\n\t/**\n\t * M\\u00E9todo que permite registrar un art\\u00EDculo con estado CODIFICADO seg\\u00FAn la Ley Org\\u00E1nica de Regulaci\\u00F3n y Control del Poder de Mercado\n\t * @author mgranda\n\t * @param articuloLeyMercadoDTO entidad que representa la informacion de Ley Org\\u00E1nica de Regulaci\\u00F3n y Control del Poder de Mercado del articulo\n\t * @throws SICException\n\t */\n\tvoid codificarArticuloLeyMercado(ArticuloLeyMercadoDTO articuloLeyMercadoDTO) throws SICException;\t\n\n\t/**\n\t * M\\u00E9todo que permite registrar un art\\u00EDculo con estado DESCODIFICADO seg\\u00FAn la Ley Org\\u00E1nica de Regulaci\\u00F3n y Control del Poder de Mercado\n\t * @author mgranda\n\t * @param articuloLeyMercadoDTO entidad que representa la informacion de Ley Org\\u00E1nica de Regulaci\\u00F3n y Control del Poder de Mercado del articulo\n\t * @throws SICException\n\t */\n\tvoid descodificarArticuloLeyMercado(ArticuloLeyMercadoDTO articuloLeyMercadoDTO) throws SICException;\n\t\n\t/**\n\t * Metodo que permite obtener la informacion actual de Ley Org\\u00E1nica de Regulaci\\u00F3n y Control del Poder de Mercado del articulo\n\t * @author mgranda\n\t * @param codigoCompania\n\t * @param codigoArticulo\n\t * @return\n\t * @throws SICException\n\t */\n\tArticuloLeyMercadoDTO obtenerArticuloLeyMercado(Integer codigoCompania, String codigoArticulo) throws SICException;\n\n\t/**\n\t * Metodo que permite obtener la informacion historica de estados del articulo segun la Ley Org\\u00E1nica de Regulaci\\u00F3n y Control del Poder de Mercado\n\t * @author mgranda\n\t * @param first\n\t * @param pageSize\n\t * @param sortField\n\t * @param filters\n\t * @return\n\t * @throws SICException\n\t */\n\tList<ArticuloBitacoraLeyMercadoDTO> obtenerHistoricoLeyMercado(int first, int pageSize, String sortField, Map<String, String> filters) throws SICException;\n\t\n\t/**\n\t * Metodo que permite obtener el total de la informacion historica de estados del articulo segun la Ley Org\\u00E1nica de Regulaci\\u00F3n y Control del Poder de Mercado\n\t * @param codigoCompania\n\t * @param codigoArticulo\n\t * @return\n\t * @throws SICException\n\t */\n\tLong obtenerTotalHistoricoLeyMercado(Integer codigoCompania, String codigoArticulo) throws SICException;\n}",
"public ControladorUsuario() {\n }",
"public ServicoDoSistemaView() {\n initComponents();\n this.removidos = new ArrayList<ServicoDoSistema>();\n try {\n this.c = new ServicoDoSistemaController();\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(this, \"Houve erros: \"\n + ex.getMessage());\n }\n }",
"public BOEmpresa() {\r\n\t\tdaoEmpresa = new DAOEmpresaJPA();\r\n\t}",
"protected void setManusia(T Manusia){\r\n this.Manusia = Manusia;\r\n }",
"private AdminEntity() {\n \tsuper();\n\n this.emf = Persistence.createEntityManagerFactory(\"entityManager\");\n\tthis.em = this.emf.createEntityManager();\n\tthis.tx = this.em.getTransaction();\n }",
"public interface RappelManager\r\n extends GenericManager<Rappel, Long>\r\n{\r\n\r\n public final static String SERVICE_NAME = \"RappelManager\";\r\n\r\n}",
"public AtendimentoServicoDao() {\r\n super(AtendimentoServico.class);\r\n }",
"public empresaDAO(){\r\n \r\n }",
"protected T getManusia(){\r\n return Manusia;\r\n }",
"protected void accionUsuario() {\n\t\t\r\n\t}",
"public ISegUsuarioDAO getSegUsuarioDAO() {\r\n return new SegUsuarioDAO();\r\n }",
"public Manager getManager() {\n return this.manager;\n }",
"public LgSistema() {\n initComponents();\n }",
"public XMLSystemManager(){\n\t\tthis(\"data\");\n\t}",
"public void setManager(String manager)\r\n {\r\n m_manager = manager;\r\n }",
"public String getmanager() {\n\t\treturn _manager;\n\t}",
"public void setManagerID(int managerID) { this.managerID = managerID; }",
"@Override\r\n public GenericManager<LigneReponseDP, Long> getManager() {\r\n return manager;\r\n }",
"public SistemaEstaciones() {\n initComponents();\n }",
"public interface InterfaceSistemaDeControle {\r\n\t\r\n\t/** Este método adiciona um pedido.\r\n\t * \r\n\t * @param p Recebe um objeto do tipo Pedido.\r\n\t */\r\n\t\r\n\tpublic void adicionaPedido (Pedido p);\r\n\t\r\n\t/** Este método pesquisa pedidos utilizando o código do produto.\r\n\t * \r\n\t * @param codProduto Recebe um objeto do tipo String que representa o código do produto.\r\n\t * @return Este método retorna uma Lista do tipo Pedido contendo todos os produtos que têm o código \r\n\t * igual ao passado no parametro.\r\n\t */\r\n\t\r\n\tpublic List<Pedido> pesquisaIncluindoProduto (String codProduto);\r\n\t\r\n\t/** Este método remove um pedido.\r\n\t * \r\n\t * @param numPedido Este método do tipo long recebe o número do pedido que será removido.\r\n\t */\r\n\tpublic void removePedido (long numPedido);\r\n\t\r\n}",
"public interface RetardManager\r\n extends GenericManager<Retard, Long>\r\n{\r\n\r\n public final static String SERVICE_NAME = \"RetardManager\";\r\n \r\n /**\r\n * Justification d'un retard\r\n * @param entity\r\n * @return\r\n */\r\n public Retard justifie(Retard entity);\r\n \r\n /**\r\n * \r\n * @param entity\r\n * @return\r\n */\r\n public Retard nonjustifie(Retard entity);\r\n\r\n}",
"public Utilisateur() {\n\t\tsuper();\n\t}",
"public ControladorUsuario(UsuarioDAO usuarioDAO) {\n\n this.usuarioDAO = usuarioDAO;\n \n }",
"public ControladorCatalogoServicios() {\r\n }",
"public abstract co.com.telefonica.atiempo.ejb.eb.UsuarioLocal getUsuario();",
"private static void iniciarAmbienteDeUsuario() {\r\n\r\n\t\tnew AmbienteParaUsuarioEscolherGerenciamento(user);\r\n\r\n\t}",
"private MenuServicios(){\n super(\"Gym Manager Servicios a Socios\");\n setBackground(Color.WHITE);\n\tgetContentPane().setLayout(null);\n setResizable(false);\n\tsetDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n pack();\n\tsetSize(942,592);\n\tsetLocationRelativeTo(null);\n image_path = \"jar:\" + getClass().getProtectionDomain().getCodeSource().\n getLocation().toString() + \"!/imagenes/\";\n \n jdpFondo = new JDesktopPane();\n jdpFondo.setBackground(Color.WHITE);\n jtpcContenedor = new JXTaskPaneContainer();\n jtpPanel = new JXTaskPane();\n jtpPanel2 = new JXTaskPane();\n jpnlPanelPrincilal = new JPanel();\n jpnlPanelPrincilal.setBackground(Color.WHITE);\n jtpcContenedor.setBackground(Color.LIGHT_GRAY);\n \n paginaInicio();\n crearComponentes();\n addToPanel();\n accionComponentes();\n \n }",
"public int getManagerID() { return managerID; }",
"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 SPManager() {\n \tmyCon = new DBManager();\n }",
"public ControllerAdministrarTrabajadores() {\r\n }",
"public interface CalendrierIntervenantManager\r\n extends GenericManager<CalendrierIntervenant, Long>\r\n{\r\n\r\n public final static String SERVICE_NAME = \"CalendrierIntervenantManager\";\r\n\r\n}",
"public AdministratorDAO() {\n super();\n DAOClassType = Administrator.class;\n }",
"public Administrador() {\n //título da tela Administrador\n setTitle(\"Administrador\");\n //Inicializa os componentes da tela\n initComponents();\n //Inicializa o combo box contendo os instrutores cadastrados\n initComboBox();\n //inicia tela no centro\n this.setLocationRelativeTo(null);\n }",
"public ISegRolUsuarioDAO getSegRolUsuarioDAO() {\r\n return new SegRolUsuarioDAO();\r\n }",
"public FrmMain(Usuario pUsuario) {\n initComponents();\n this.setUsuario(pUsuario);\n this.setIconImage(new ImageIcon(getClass().getResource(\"/image/solar-panel1.png\")).getImage());\n this.setIconsMenus();\n this.HabilitaMenusItensDeAcordoComPerfilDoUsuario();\n }",
"public MorteSubita() {\n }",
"public interface ImportBaseManager {\n @Transactional\n void readFile(File file);\n\n void addUnitUser(Map<String, User> userMap, Map<String, Unit> unitMap);\n\n @Transactional\n Map<String,User> addUser(List<ImportBaseVO> vos, Map<String, Corp> unitCorpMap);\n\n @Transactional\n void addCostomerInfo(List<ImportBaseVO> vos, Map<String, Corp> customerMap, Map<String, Unit> unitMap);\n\n @Transactional\n Map<String,Corp> addCorp(List<ImportBaseVO> vos);\n\n @Transactional\n Map<String, Unit> addUnit(List<ImportBaseVO> vos, Map<String, Corp> customerMap,\n Map<String, City> provinceMap, Map<String, City> cityMap);\n\n // 保存客户公司\n Map<String,Corp> addCustomer(List<ImportBaseVO> vos);\n}",
"public TbAdminMenuDAOImpl() {\n super();\n }",
"protected Manager(String name, String password){\r\n super(name);\r\n this.password = password;\r\n }",
"private UnitManager() {\r\n\t\tUM = new UnitMap(); // create an object\r\n\t}",
"public AbstractCommandeService() {\r\n\t\t\r\n\t\tsuper();\r\n\t\t\r\n\t\tthis.valideur = new ValideurCommande();\r\n\t\t\r\n\t}",
"public UsuarioDao(EntityManager entityManager){\r\n\t\tsuper(entityManager);\r\n\t}",
"public ISegSistemaCiaDAO getSegSistemaCiaDAO() {\r\n return new SegSistemaCiaDAO();\r\n }",
"public void setTableMgr(TableMgr tablMgr);",
"public void setGeneralManagerName(String generalManagerName);",
"public LocalResidenciaColaborador() {\n //ORM\n }",
"public UnidadDAO() {\n this.setCon(cs.getConection());\n \n }",
"protected EmpleadoPlantilla(com.matisse.reflect.MtClass mtCls) {\n super(mtCls);\n }",
"public interface ManagerDAO {\n\n public int createManager (Manager manager);\n public int deleteManager (Manager manager);\n public int updateManager (Manager manager);\n\n public Manager getManagerById (int managerId);\n public Manager getManagerByName (String managerName);\n\n public ArrayList<Manager> getManagersByTeam (Team team);\n public ArrayList<Manager> getAllManagers ();\n}",
"public manager() {\n initComponents();\n autoID();\n table_update();\n }",
"protected MedicoDao() {\n super(Medico.class);\n }",
"public adminUsuarios() {\n initComponents();\n showUsuarios();\n }",
"Manager getManager() {\n return Manager.getInstance();\n }",
"Manager getManager() {\n return Manager.getInstance();\n }",
"Manager getManager() {\n return Manager.getInstance();\n }",
"public interface IMensagemGrupo {\n\n\t/** Retorna o Tipo de Envio. */\n\tTipoEnvio getTipoEnvio();\n\t\n\t/** Define o Tipo de Envio. */\n\tvoid setTipoEnvio(TipoEnvio tipoEnvio);\n\t\n\t/** Retorna o Grupo. */\n\tGrupo getGrupo();\n\t\n\t/** Define o Grupo. */\n\tvoid setGrupo(Grupo grupoUsuario);\n\t\n}",
"private void sceltapannelli(String utilizzatore){\n\n if(utilizzatore.equals(\"Registrazione\")){\n\n sez_managerview.setSezA(new Sez_AView().getIntermedio0());\n sez_managerview.setSezB(new Sez_BView().getIntermedio0());\n sez_managerview.setSezC(new Sez_CView().getIntermedio0());\n\n }\n\n }",
"public ISegPermisoDAO getSegPermisoDAO() {\r\n return new SegPermisoDAO();\r\n }",
"public interface ShopAdminMng {\n\tpublic ShopAdmin getByUserId(Long userId, Long webId);\n\t\n\tpublic ShopAdmin getByUsername(String username);\n\t\n\tpublic ShopAdmin register(String username, String password,Boolean viewonlyAdmin, String email,\n\t\t\tString ip, boolean disabled, Long webId, \n\t\t\tShopAdmin shopAdmin);\n\n\tpublic Pagination getPage(Long webId, int pageNo, int pageSize);\n\n\tpublic ShopAdmin findById(Long id);\n\n\tpublic ShopAdmin save(ShopAdmin bean);\n\n\tpublic ShopAdmin update(ShopAdmin bean, String password, Boolean disabled,\n\t\t\tString email,Boolean viewonlyAdmin);\n\n\tpublic ShopAdmin deleteById(Long id);\n\n\tpublic ShopAdmin[] deleteByIds(Long[] ids);\n\t\n\tpublic ShopAdmin findByName(String name);\n}",
"public abstract void setEntityManager(EntityManager em);",
"@Local\r\npublic interface MatiereDltManagerLocal\r\n extends MatiereDltManager\r\n{\r\n\r\n\r\n}"
]
| [
"0.6975711",
"0.69054323",
"0.65142924",
"0.6409977",
"0.62668246",
"0.6259077",
"0.62399644",
"0.61906606",
"0.61505467",
"0.60995185",
"0.6086694",
"0.60562485",
"0.6030426",
"0.5995495",
"0.59314865",
"0.5927859",
"0.5924195",
"0.5917739",
"0.59074086",
"0.5904429",
"0.5884291",
"0.58830565",
"0.5862086",
"0.5859911",
"0.58502644",
"0.5835562",
"0.58278996",
"0.5813077",
"0.580166",
"0.5791515",
"0.577268",
"0.57639027",
"0.5750495",
"0.57484657",
"0.5747153",
"0.574608",
"0.57452947",
"0.5733847",
"0.57329905",
"0.5730701",
"0.57299614",
"0.5712425",
"0.5694776",
"0.5689821",
"0.5678093",
"0.56750435",
"0.5673163",
"0.56693435",
"0.5667843",
"0.5663745",
"0.5662818",
"0.56602937",
"0.5660237",
"0.56552005",
"0.56545794",
"0.56528145",
"0.5649879",
"0.5644176",
"0.5637885",
"0.56346345",
"0.5632708",
"0.56314784",
"0.5626627",
"0.56255007",
"0.5623533",
"0.56233025",
"0.5612905",
"0.55958223",
"0.5592301",
"0.5590456",
"0.55898637",
"0.5588231",
"0.5584676",
"0.55753493",
"0.5555876",
"0.5549521",
"0.5548282",
"0.55481863",
"0.5538779",
"0.5536616",
"0.5536229",
"0.55359465",
"0.5534469",
"0.553445",
"0.5533947",
"0.5529638",
"0.55187553",
"0.5515566",
"0.5514425",
"0.55104977",
"0.5491136",
"0.54901725",
"0.54901725",
"0.54901725",
"0.5474431",
"0.5473892",
"0.54719096",
"0.5471058",
"0.54691285",
"0.54668397"
]
| 0.6667602 | 2 |
Once table is done being cleaned, can be ready again. | public void IsReady() {
System.out.println("Table now ready for customers.");
table.setState(table.GetReady());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void DoesNeedCleaning() {\n\t\tSystem.out.println(\"Table is being cleaned right now.\");\n\t}",
"@Override\n\tpublic void cleanUp() {\n\t\t table = null;\n colFam = null;\n currentEvent = null;\n\t}",
"public void clean() {\r\n\t\t\r\n\t\tlogger.trace(\"Enter clean\");\r\n\t\t\r\n\t\tdata.clear();\r\n\t\tfireTableDataChanged();\r\n\t\t\r\n\t\tlogger.trace(\"Exit clean\");\r\n\t}",
"public void IsBeingCleaned() {\n\t\tSystem.out.println(\"Table already being cleaned.\");\n\t}",
"public void clearTable(){\n\t\tloaderImage.loadingStart();\n\t\tfullBackup.clear();\n\t\tlist.clear();\n\t\toracle.clear();\n\t\tselectionModel.clear();\n\t\tdataProvider.flush();\n\t\tdataProvider.refresh();\n\t}",
"private void repopulateTableForDelete()\n {\n clearTable();\n populateTable(null);\n }",
"void cleanupTable(TableName tablename) throws Exception {\n if (tbl != null) {\n tbl.close();\n tbl = null;\n }\n\n ((ClusterConnection) connection).clearRegionCache();\n deleteTable(TEST_UTIL, tablename);\n }",
"@Override\n\tpublic void emptyTable() {\n\t\tresTable.deleteAll();\n\t}",
"public void resetTable() {\n\t\tif (table != null) {\n\t\t\ttable.removeAll();\n\t\t}\n\t}",
"private void cleanUp() {\n if (rehash()) {\n // If we rehashed, we needn't clean up (clean up happens as\n // a side effect).\n return;\n }\n\n if (size == 0) {\n // No live entries == nothing to clean.\n return;\n }\n\n // Clean log(table.length) entries picking up where we left off\n // last time.\n int index = clean;\n Object[] table = this.table;\n for (int counter = table.length; counter > 0; counter >>= 1,\n index = next(index)) {\n Object k = table[index];\n\n if (k == TOMBSTONE || k == null) {\n continue; // on to next entry\n }\n\n // The table can only contain null, tombstones and references.\n @SuppressWarnings(\"unchecked\")\n Reference<ThreadLocal<?>> reference\n = (Reference<ThreadLocal<?>>) k;\n if (reference.get() == null) {\n // This thread local was reclaimed by the garbage collector.\n table[index] = TOMBSTONE;\n table[index + 1] = null;\n tombstones++;\n size--;\n }\n }\n\n // Point cursor to next index.\n clean = index;\n }",
"public void wipeTable() {\n SqlStorage.wipeTable(db, TABLE_NAME);\n }",
"public void emptyTable()\r\n {\r\n final int lastRow = table.getRowCount();\r\n if (lastRow != 0)\r\n {\r\n ((JarModel) table.getModel()).fireTableRowsDeleted(0, lastRow - 1);\r\n }\r\n }",
"private void clearTable() {\n fieldTable.removeAllRows();\n populateTableHeader();\n }",
"public void cleanTable() throws ClassicDatabaseException;",
"public void clear() {\r\n\t\tfor (int i = 0; i < table.length; i++) {\r\n\t\t\ttable[i] = null;\r\n\t\t}\r\n\r\n\t\tmodificationCount++;\r\n\t\tsize = 0;\r\n\t}",
"private void clearTable()\n {\n TableLayout table = (TableLayout) findViewById(R.id.lossesTable);\n table.removeViews(1, table.getChildCount() - 1);\n }",
"public void clearTable() {\n\t\tfor (int i = modelCondTable.getRowCount() - 1; i >= 0; i--) {\n\t\t\tmodelCondTable.removeRow(i);\n\t\t}\n\t}",
"public void forceTableCleanup() throws IOException\n {\n ssProxy.forceTableCleanup();\n }",
"public void clear() {\n tableCache.invalidateAll();\n }",
"public void doEmptyTableList() {\n tableList.deleteList();\n }",
"@Override\n public void clearTable() {\n final var query = \"TRUNCATE TABLE piano_project.pianos\";\n try(final var statement = connection.createStatement()) {\n statement.executeUpdate(query);\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n }",
"public void IsInUse() {\n\t\tSystem.out.println(\"Table being cleaned, cannot be used.\");\n\t}",
"public void clearAllTable() {\n\t\tint rowCount = dmodel.getRowCount();\n\t\tfor (int i = rowCount - 1; i >= 0; i--) {\n\t\t\tdmodel.removeRow(i);\n\t\t}\n\t}",
"private void dealToTable()\r\n\t{\r\n\t\tthis.onTable.clear();\r\n\t\tif(this.deck.size() >= Config.TableCards)\r\n\t\t{\r\n\t\t\tthis.onTable.addAll(this.deck.subList(0, Config.TableCards));\r\n\t\t\tthis.deck = this.deck.subList(Config.TableCards, this.deck.size());\r\n\t\t}\r\n\t}",
"private void clearTableData() {\n DefaultTableModel model = (DefaultTableModel) remindersTable.getModel();\n model.setRowCount(0);\n }",
"public void clear() {\n\t\tfor (int i = 0; i < table.size(); i++) {\n\t\t\ttable.get(i).clear();\n\t\t}\n\t}",
"public void clearTable() {\n reportTable.getColumns().clear();\n }",
"public void cleanupData() {\n\t}",
"public final void clearTable() {\n while (this.getRowCount() > 0) {\n this.removeRow(0);\n }\n\n // Notify observers\n this.fireTableDataChanged();\n }",
"private void clearTable() {\n\t\tcards.clear();\n\t\ttopCard = new Card();\n\t}",
"public synchronized void clear() {\n Entry tab[] = table;\n for (int index = tab.length; --index >= 0; ) {\n tab[index] = null;\n }\n count = 0;\n }",
"private void clearTable(DefaultTableModel table){\n\t\t\n\t\tfor(int i = 0; i < table.getRowCount(); i++){\n\t\t\ttable.removeRow(i);\n\t\t}\n\t}",
"public void unsetWholeTbl()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(WHOLETBL$2, 0);\n }\n }",
"@Override\n public void cleanUsersTable() {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n session.createQuery(\"delete from User\").executeUpdate();\n tx.commit();\n System.out.println(\"HibCleaning users table\");\n session.close();\n\n }",
"public static void resetTable() {\n tableModel.resetDefault();\n updateSummaryTable();\n }",
"protected void clearTable() {\n\ttable.setModel(new javax.swing.table.AbstractTableModel() {\n\t public int getRowCount() { return 0; }\n\t public int getColumnCount() { return 0; }\n\t public Object getValueAt(int row, int column) { return \"\"; }\n\t});\n }",
"public boolean dropTemporaryTableAfterUse() {\n \t\treturn true;\n \t}",
"@Override\r\n\tpublic void cleanup() {\n\t\t\r\n\t}",
"public void cleanUp() {\r\n\t\tsuper.cleanUp() ;\r\n\t}",
"@Override\n public void cleanup() {\n \n }",
"@Override\n public void cleanup() {\n \n }",
"@Override\n public void cleanUp() {\n }",
"protected void cleaningUp() {\n\t}",
"protected void finalize() throws Throwable {\n\t\tsuper.finalize();\r\n\t\tthis.globalStaticDataMap.clear();\r\n\t\trowSet = null;\r\n\t}",
"private void clearData() throws SQLException {\n//Lay chi so dong cuoi cung\n int n = tableModel.getRowCount() - 1;\n for (int i = n; i >= 0; i--) {\n tableModel.removeRow(i);//Remove tung dong\n }\n }",
"static void emptyTable () {\n Session session = null;\n Transaction transaction = null;\n try {\n session = sessionFactory.openSession();\n transaction = session.beginTransaction();\n Query query = session.createQuery(\"DELETE from ReservationsEntity \");\n query.executeUpdate();\n Query query2 = session.createQuery(\"DELETE from OrdersEntity \");\n query2.executeUpdate();\n\n Query query3 = session.createQuery(\"DELETE from TablesEntity \");\n query3.executeUpdate();\n transaction.commit();\n }\n catch (Exception e)\n {\n if (transaction != null) {\n transaction.rollback();\n }\n throw e;\n } finally {\n if (session != null) {\n session.close();\n }\n }\n }",
"public void cleanUp();",
"public void cleanUp();",
"public void cleanup() {\r\n }",
"public static boolean testTableClear() {\r\n table.clear();\r\n if (table.size() != 0)\r\n return false;\r\n return true;\r\n }",
"private void repopulateTableForAdd()\n {\n clearTable();\n populateTable(null);\n }",
"public void cleanResult() throws Exception {\n\t\tStatement statement = connect.createStatement();\n\t\ttry {\n\t\t\tstatement.executeUpdate(\"TRUNCATE TABLE search_result\");\n\n\t\t\tSystem.out.println(\"Successfully clean original data\");\n\n\t\t} catch (SQLException e) {\n\n\t\t}\n\t}",
"public void clear() {\n table = new Handle[defaultSize];\n logicalSize = 0;\n }",
"@Override\n public void clear() {\n for (LinkedList<Entry<K,V>> list : table) {\n list = null;\n }\n }",
"public void cleanup() {\n\t}",
"public void dispose() {\r\n _isdisposed=true;\r\n try {\r\n _tables.dispose(); _tables=null;\r\n finalize();\r\n DataSet _current=this;\r\n _current=null; System.gc();\r\n }\r\n catch (Throwable ex) {\r\n throw new RuntimeException(ex.getMessage());\r\n }\r\n }",
"void cleanUp();",
"void cleanUp();",
"void cleanUp();",
"public void clear()\n {\n if (resultSet != null)\n {\n try\n {\n resultSet.close();\n } catch (SQLException ex)\n {\n edu.ku.brc.af.core.UsageTracker.incrSQLUsageCount();\n edu.ku.brc.exceptions.ExceptionTracker.getInstance().capture(ResultSetTableModelDirect.class, ex);\n log.error(ex);\n }\n resultSet = null;\n }\n\n metaData = null;\n classNames.clear();\n\n currentRow = 0;\n numRows = 0;\n }",
"public void cleanup() {\n this.index = new TreeMap<String, PostingsList>();\n this.count = 0;\n }",
"public void clearUserTable() {\n\t\tSQLDelete deleteStatament = new SQLDelete();\n\t\tdeleteStatament.clearUserTable();\n\t}",
"public void clearTable() {\n this.lstDaqHware.clear();\n this.mapDevPBar.clear();\n this.mapDevMotion.clear();\n }",
"public void cleanup() {\n }",
"@Override\r\n public boolean deleteAll(String strTable)\r\n { try\r\n { String strSQL = \"DELETE * FROM \" + strTable;\r\n status(strSQL);\r\n dbCmdText.executeUpdate(strSQL);\r\n\r\n // dbRecordset.close();\r\n } catch (SQLException e)\r\n {\r\n e.printStackTrace();\r\n }\r\n return false;\r\n }",
"@Override\n\tpublic void cleanup() {\n\t\t\n\t}",
"@Override\n\tpublic void cleanup() {\n\t\t\n\t}",
"@Override\n\tpublic void cleanup() {\n\t\t\n\t}",
"public void clearHashTable()\n {\n int index;\n\n for(index = 0; index < tableSize; index++)\n {\n tableArray[index] = null;\n }\n }",
"void clearAllItemsTable();",
"@Override\r\n public void cleanup() {\n }",
"@Override\n\tpublic void cleanup() {\n\n\t}",
"@Override\n\tpublic void cleanup() {\n\n\t}",
"public void refreshTable() {\n\t\tmyTable.refreshTable();\n\t}",
"protected void tearDown() {\r\n instance = null;\r\n columnNames = null;\r\n }",
"private void deletes() {\n \tDBPeer.fetchTableRows();\n DBPeer.fetchTableIndexes();\n \n for (Delete delete: deletes) {\n \tdelete.init();\n }\n \n //DBPeer.updateTableIndexes(); //Set min max of indexes not implemented yet\n }",
"@Override\n public void cleanup() {\n }",
"public void clearData(){\n\t\t\n\t\tclearTable(conditionTableModel);\n\t\tclearTable(faultTableModel);\n\t}",
"@After\n public void cleanDatabase() {\n\n databaseInstance.setTaxpayersArrayList(new ArrayList<Taxpayer>());\n }",
"@Override\n protected void onPause() {\n super.onPause();\n table.setAdapter(null);\n table = null;\n myToast = null;\n }",
"private void reinit() {\n \tthis.showRowCount = false;\n this.tableCount = 0;\n this.nullString = \"\";\n\t}",
"protected void truncate() {\n doQuery(\"TRUNCATE TABLE feedentryqueue\");\n }",
"@After\n public void cleanDatabaseTablesAfterTest() {\n databaseCleaner.clean();\n }",
"private void UpdateTable() {\n\t\t\t\t\n\t\t\t}",
"private void refreshTable(){\n DefaultTableModel dm = (DefaultTableModel)table.getModel();\r\n dm.getDataVector().removeAllElements();\r\n System.out.println(\"Refresh Table\");\r\n\r\n //calling method addRows\r\n addRows();\r\n }",
"@After\n public void deleteAfterwards() {\n DBhandlerTest db = null;\n try {\n db = new DBhandlerTest();\n } catch (Exception e) {\n e.printStackTrace();\n }\n db.deleteTable();\n }",
"void clearDeletedItemsTable();",
"@Override\n public void clear() {\n hashtableBean = null;\n\n hashtableBean = new HashTableBean[5];\n position = 0;\n }",
"public void flushAllTables() {\n\t}",
"private void limparTabela() {\n while (tmLivro.getRowCount() > 0) {\n tmLivro.removeRow(0);\n }\n }",
"private void limparTabela() { \n while (tmLivro.getRowCount() > 0) { \n tmLivro.removeRow(0);\n }\n }",
"@Override\npublic void cleanUp() {\n\t\n}",
"@Override\n public void clearDB() throws Exception {\n hBaseOperation.deleteTable(this.dataTableNameString);\n hBaseOperation.createTable(this.dataTableNameString, this.columnFamily, numRegion);\n }",
"private void refreshTable() {\n data = getTableData();\n updateTable();\n }",
"@Override\n protected void performCleanup() {\n }",
"private void clearTable(String tableName) throws SQLException {\n Connection conn = getConnection();\n String setStatement = \"DELETE FROM \" + tableName;\n Statement stm = conn.createStatement();\n stm.execute(setStatement);\n }",
"private void clearData() {\n em.createQuery(\"delete from ViajeroEntity\").executeUpdate();\n }",
"public void clearTables() {\n\t _database.delete(XREF_TABLE, null, null);\n\t _database.delete(ORDER_RECORDS_TABLE, null, null); \n\t}",
"@Override\n public void reset() {\n setActive(false);\n if (tablePane != null) {\n tablePane.removeAll();\n }\n table = null;\n tablePane = null;\n }",
"public void loadingTable() {\n this.setRowCount(1, true);\r\n this.setVisibleRangeAndClearData(this.getVisibleRange(), true);\r\n }",
"public void clearTables() {\r\n // your code here\r\n\t\ttry {\r\n\t\t\tdeleteReservationStatement.executeUpdate();\r\n\t\t\tdeleteBookingStatement.executeUpdate();\r\n\t\t\tdeleteUserStatement.executeUpdate();\r\n\t\t} catch (SQLException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n }"
]
| [
"0.80918455",
"0.7913601",
"0.7767223",
"0.7444153",
"0.73300064",
"0.7286408",
"0.725714",
"0.72171116",
"0.710915",
"0.71028006",
"0.70824414",
"0.70801324",
"0.7018833",
"0.70097226",
"0.69002736",
"0.68767935",
"0.6867742",
"0.68044955",
"0.67845166",
"0.67599833",
"0.67524534",
"0.6707062",
"0.66993934",
"0.6671063",
"0.6664517",
"0.6633353",
"0.6625991",
"0.66027623",
"0.65854806",
"0.6584943",
"0.65649927",
"0.65602684",
"0.655565",
"0.65518755",
"0.6521853",
"0.6519367",
"0.6505051",
"0.65031374",
"0.64924",
"0.6491445",
"0.6491445",
"0.6489787",
"0.64881426",
"0.6483287",
"0.6477837",
"0.6476659",
"0.6462461",
"0.6462461",
"0.64512",
"0.64477116",
"0.64466715",
"0.6443082",
"0.64136297",
"0.63920206",
"0.6374255",
"0.636556",
"0.6352245",
"0.6352245",
"0.6352245",
"0.6328911",
"0.63151234",
"0.6313087",
"0.6307679",
"0.6307481",
"0.62971693",
"0.6285697",
"0.6285697",
"0.6285697",
"0.6281819",
"0.62807757",
"0.6275284",
"0.62692636",
"0.62692636",
"0.62648886",
"0.6253682",
"0.6251593",
"0.6246017",
"0.62429327",
"0.622792",
"0.6224852",
"0.6223745",
"0.621922",
"0.62129897",
"0.62067246",
"0.62030405",
"0.6194054",
"0.61901826",
"0.6187377",
"0.6186098",
"0.6177569",
"0.6173363",
"0.61702",
"0.616997",
"0.61615604",
"0.6149329",
"0.61435646",
"0.6140429",
"0.6138922",
"0.6138048",
"0.6131127",
"0.6122491"
]
| 0.0 | -1 |
Does nothing, table can't be in use if being cleaned | public void IsInUse() {
System.out.println("Table being cleaned, cannot be used.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void DoesNeedCleaning() {\n\t\tSystem.out.println(\"Table is being cleaned right now.\");\n\t}",
"public void IsBeingCleaned() {\n\t\tSystem.out.println(\"Table already being cleaned.\");\n\t}",
"public void cleanTable() throws ClassicDatabaseException;",
"public void clean() {\r\n\t\t\r\n\t\tlogger.trace(\"Enter clean\");\r\n\t\t\r\n\t\tdata.clear();\r\n\t\tfireTableDataChanged();\r\n\t\t\r\n\t\tlogger.trace(\"Exit clean\");\r\n\t}",
"private void repopulateTableForDelete()\n {\n clearTable();\n populateTable(null);\n }",
"public static boolean testTableClear() {\r\n table.clear();\r\n if (table.size() != 0)\r\n return false;\r\n return true;\r\n }",
"@Override\n\tpublic void emptyTable() {\n\t\tresTable.deleteAll();\n\t}",
"public void doEmptyTableList() {\n tableList.deleteList();\n }",
"private void cleanUp() {\n if (rehash()) {\n // If we rehashed, we needn't clean up (clean up happens as\n // a side effect).\n return;\n }\n\n if (size == 0) {\n // No live entries == nothing to clean.\n return;\n }\n\n // Clean log(table.length) entries picking up where we left off\n // last time.\n int index = clean;\n Object[] table = this.table;\n for (int counter = table.length; counter > 0; counter >>= 1,\n index = next(index)) {\n Object k = table[index];\n\n if (k == TOMBSTONE || k == null) {\n continue; // on to next entry\n }\n\n // The table can only contain null, tombstones and references.\n @SuppressWarnings(\"unchecked\")\n Reference<ThreadLocal<?>> reference\n = (Reference<ThreadLocal<?>>) k;\n if (reference.get() == null) {\n // This thread local was reclaimed by the garbage collector.\n table[index] = TOMBSTONE;\n table[index + 1] = null;\n tombstones++;\n size--;\n }\n }\n\n // Point cursor to next index.\n clean = index;\n }",
"@Override\n\tpublic void cleanUp() {\n\t\t table = null;\n colFam = null;\n currentEvent = null;\n\t}",
"public void wipeTable() {\n SqlStorage.wipeTable(db, TABLE_NAME);\n }",
"public boolean dropTemporaryTableAfterUse() {\n \t\treturn true;\n \t}",
"public void emptyTable()\r\n {\r\n final int lastRow = table.getRowCount();\r\n if (lastRow != 0)\r\n {\r\n ((JarModel) table.getModel()).fireTableRowsDeleted(0, lastRow - 1);\r\n }\r\n }",
"public void resetTable() {\n\t\tif (table != null) {\n\t\t\ttable.removeAll();\n\t\t}\n\t}",
"public void makeEmpty() {\r\n for (int i = 0; i < tableSize; i++) {\r\n table[i] = new DList<Entry<K, V>>();\r\n }\r\n }",
"public void clear() {\r\n\t\tfor (int i = 0; i < table.length; i++) {\r\n\t\t\ttable[i] = null;\r\n\t\t}\r\n\r\n\t\tmodificationCount++;\r\n\t\tsize = 0;\r\n\t}",
"@Test (timeout=180000)\n public void testHBaseFsckClean() throws Exception {\n assertNoErrors(doFsck(conf, false));\n TableName table = TableName.valueOf(\"tableClean\");\n try {\n HBaseFsck hbck = doFsck(conf, false);\n assertNoErrors(hbck);\n\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // We created 1 table, should be fine\n hbck = doFsck(conf, false);\n assertNoErrors(hbck);\n assertEquals(0, hbck.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n } finally {\n cleanupTable(table);\n }\n }",
"public void clearTable(){\n\t\tloaderImage.loadingStart();\n\t\tfullBackup.clear();\n\t\tlist.clear();\n\t\toracle.clear();\n\t\tselectionModel.clear();\n\t\tdataProvider.flush();\n\t\tdataProvider.refresh();\n\t}",
"private void repopulateTableForAdd()\n {\n clearTable();\n populateTable(null);\n }",
"public void clearTable() {\n\t\tfor (int i = modelCondTable.getRowCount() - 1; i >= 0; i--) {\n\t\t\tmodelCondTable.removeRow(i);\n\t\t}\n\t}",
"private void clearTable() {\n fieldTable.removeAllRows();\n populateTableHeader();\n }",
"private void dealToTable()\r\n\t{\r\n\t\tthis.onTable.clear();\r\n\t\tif(this.deck.size() >= Config.TableCards)\r\n\t\t{\r\n\t\t\tthis.onTable.addAll(this.deck.subList(0, Config.TableCards));\r\n\t\t\tthis.deck = this.deck.subList(Config.TableCards, this.deck.size());\r\n\t\t}\r\n\t}",
"public void fixupDatabase() {\n long count = 0;\n count = countBySearch(HierarchyNodeMetaData.class, new Search(\"isDisabled\",\"\", Restriction.NULL) );\n if (count > 0) {\n int counter = 0;\n counter += getHibernateTemplate().bulkUpdate(\"update HierarchyNodeMetaData nm set nm.isDisabled = false where nm.isDisabled is null\");\n log.info(\"Updated \" + counter + \" HierarchyNodeMetaData.isDisabled fields from null to boolean false\");\n }\n }",
"@Override\r\n\tpublic boolean dropTable() {\n\t\treturn false;\r\n\t}",
"void cleanupTable(TableName tablename) throws Exception {\n if (tbl != null) {\n tbl.close();\n tbl = null;\n }\n\n ((ClusterConnection) connection).clearRegionCache();\n deleteTable(TEST_UTIL, tablename);\n }",
"public void forceTableCleanup() throws IOException\n {\n ssProxy.forceTableCleanup();\n }",
"@Override\n public void cleanUsersTable() {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n session.createQuery(\"delete from User\").executeUpdate();\n tx.commit();\n System.out.println(\"HibCleaning users table\");\n session.close();\n\n }",
"private void clearTable()\n {\n TableLayout table = (TableLayout) findViewById(R.id.lossesTable);\n table.removeViews(1, table.getChildCount() - 1);\n }",
"public void clear() {\n tableCache.invalidateAll();\n }",
"private boolean limpiarTablaDocs(Table t)\n\t{\n\t\tt.removeAll(); //borra todo?\n\t\treturn true;\n\t}",
"@Override\n public SqlDatabaseTable ensureUnique(SqlDatabaseTable table) {\n return table;\n }",
"public void optimiseForDb() {\n \tif (CollectionUtils.isNotEmpty(this.allocation)) {\n\t \tList<Allocation> alloc = Lists.newArrayList(this.allocation)\n\t \t\t\t.stream()\n\t \t\t\t.filter(a -> a.account != null && a.getPercentage() != 0.0)\n\t \t\t\t.collect(Collectors.toList());\n\t \tif (alloc.size() != this.allocation.size()) {\n\t \t\tLOG.info(\"{} optimised\", this); //$NON-NLS-1$\n\t \t\tthis.allocation.clear();\n\t \t\tthis.allocation.addAll(alloc);\n\t \t}\n\t \tif (CollectionUtils.isEmpty(alloc)) {\n\t \t\tLOG.info(\"{} empty, cleared\", this); //$NON-NLS-1$\n\t \t\t// de-allocate any empty list. They are a waste of space in the database\n\t \t\tthis.allocation = null;\n\t \t}\n \t} else {\n \t\t// de-allocate any empty list. They are a waste of space in the database\n \t\tthis.allocation = null;\n \t}\n }",
"public void unsetWholeTbl()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(WHOLETBL$2, 0);\n }\n }",
"public void clear() {\n table = new Handle[defaultSize];\n logicalSize = 0;\n }",
"private void removeRedundantGreyTable()\r\n \t{\r\n \t\tdeleteNodes(XPath.GREY_TABLE.query);\r\n \t}",
"public static void emptyTable(Connection con, String tableName) throws SQLException\r\n\t{\r\n\t Statement st = null;\r\n\t\r\n String createStr = \"CREATE TABLE \" + tableName + \" (userId INTEGER, firstName VARCHAR(30), lastName VARCHAR(30), countryCode VARCHAR(10), primary key(userID))\";\r\n \tString dropStr = \"DROP TABLE \" + tableName;\r\n \t\r\n DatabaseMetaData dbm = con.getMetaData();\r\n ResultSet tables = dbm.getTables(null, null, tableName, null);\r\n \r\n st = con.createStatement(); \r\n\r\n if (tables != null && tables.next()) {\r\n // Table exists\r\n \tst.executeUpdate(dropStr); \r\n \tSystem.out.println(\"Got rid of old table\");\r\n }\r\n\r\n st.executeUpdate(createStr);\r\n\t\r\n\t}",
"static void emptyTable () {\n Session session = null;\n Transaction transaction = null;\n try {\n session = sessionFactory.openSession();\n transaction = session.beginTransaction();\n Query query = session.createQuery(\"DELETE from ReservationsEntity \");\n query.executeUpdate();\n Query query2 = session.createQuery(\"DELETE from OrdersEntity \");\n query2.executeUpdate();\n\n Query query3 = session.createQuery(\"DELETE from TablesEntity \");\n query3.executeUpdate();\n transaction.commit();\n }\n catch (Exception e)\n {\n if (transaction != null) {\n transaction.rollback();\n }\n throw e;\n } finally {\n if (session != null) {\n session.close();\n }\n }\n }",
"@Override\n public void clearTable() {\n final var query = \"TRUNCATE TABLE piano_project.pianos\";\n try(final var statement = connection.createStatement()) {\n statement.executeUpdate(query);\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n }",
"private void validateCreateTable(ConnectorTableMetadata meta)\n {\n validateColumns(meta);\n validateLocalityGroups(meta);\n if (!AccumuloTableProperties.isExternal(meta.getProperties())) {\n validateInternalTable(meta);\n }\n }",
"public boolean checkEmptyTable(String table) {\n // Select query\n String selectQuery = \"SELECT count(*) FROM \" + table;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n if (cursor != null) { cursor.moveToFirst(); }\n\n int countRows = cursor.getInt(0);\n\n return !(countRows > 0);\n }",
"private void reallocateIfOverfilled() {\r\n\t\tif ((size * 1.0 / table.length) > MAX_FULLNESS_PERCENTAGE) {\r\n\t\t\treallocateArray();\r\n\t\t}\r\n\t}",
"void clearDeletedItemsTable();",
"private boolean isValid() {\n\t\treturn proposalTable != null && !proposalTable.isDisposed();\n\t}",
"public void ensureEmptied() {\n }",
"private void clearTable(DefaultTableModel table){\n\t\t\n\t\tfor(int i = 0; i < table.getRowCount(); i++){\n\t\t\ttable.removeRow(i);\n\t\t}\n\t}",
"private void cleanDB() {\n // the database will contain a maximum of MAX_DB_SIZE wallpapers (default N=50)\n // when the db gets bigger then N, the oldest wallpapers are deleted from the database\n // the user will set if he wants to delete also the wallpaper or the database entry only\n if (maxDbSize != -1 && getOldWallpapersID().size() > maxDbSize) {\n try (ResultSet rs = db.executeQuery(\"SELECT wp FROM WALLPAPERS ORDER BY date FETCH FIRST 20 PERCENT ROWS ONLY\")) {\n while (!keepWallpapers && rs.next()) {\n Wallpaper wp = (Wallpaper) rs.getObject(\"wp\");\n log.log(Level.FINEST, wp::toString);\n log.log(Level.FINE, () -> \"Cleaning of DB, removing \" + wp.getID());\n\n new File(wp.getPath()).delete();\n }\n db.executeUpdate(\"DELETE FROM WALLPAPERS WHERE id IN (SELECT id FROM WALLPAPERS ORDER BY date fetch FIRST 20 PERCENT rows only)\");\n\n } catch (SQLException throwables) {\n log.log(Level.WARNING, \"Query Error in cleanDB()\");\n log.log(Level.FINEST, throwables.getMessage());\n }\n }\n }",
"public synchronized void updateHistoTable(final boolean forceClean) {\r\n\t\tGDE.display.asyncExec(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tif (DataExplorer.this.histoTableTabItem != null && !DataExplorer.this.histoTableTabItem.isDisposed() && DataExplorer.this.histoTableTabItem.isVisible()) {\r\n\t\t\t\t\tif (forceClean || !DataExplorer.this.histoTableTabItem.isRowTextAndTrailValid() || !DataExplorer.this.histoTableTabItem.isHeaderTextValid()) {\r\n\t\t\t\t\t\tDataExplorer.this.histoTableTabItem.setHeader();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tTrailRecordSet trailRecordSet = DataExplorer.this.histoSet.getTrailRecordSet();\r\n\t\t\t\t\tif (trailRecordSet != null) DataExplorer.this.histoTableTabItem.setRowCount(trailRecordSet.getVisibleAndDisplayableRecordsForTable().size() + trailRecordSet.getActiveDisplayTags().size());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t//\t\t\tif (activeRecordSet == null || requestingRecordSetName.isEmpty()) {\r\n\t\tif (false) { //todo is there any requirement to clean the table ???\r\n\t\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\t\tif (this.histoTableTabItem != null) {\r\n\t\t\t\t\tthis.histoTableTabItem.cleanTable();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tGDE.display.asyncExec(new Runnable() {\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tif (DataExplorer.this.histoTableTabItem != null) {\r\n\t\t\t\t\t\t\tDataExplorer.this.histoTableTabItem.cleanTable();\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}",
"public void makeEmpty() { \r\n for (int i = 0; i < hash_table.length; i++) {\r\n if (hash_table[i] != null) {\r\n hash_table[i] = null;\r\n }\r\n }\r\n size = 0;\r\n }",
"public static void resetTable() {\n tableModel.resetDefault();\n updateSummaryTable();\n }",
"public static boolean emptyTempTables() {\n ArrayList temp_tables = new ArrayList();\n // Since the mrblock depends on mrfile it actually\n // could be skipped but this way the program will also\n // check if the tables exist and give an error back if any doesn't.\n temp_tables.add( \"mrfile\" );\n temp_tables.add( \"mrblock\" );\n boolean status = sql_epiII.emptyTables( temp_tables, false );\n return status;\n }",
"protected void clearTable() {\n\ttable.setModel(new javax.swing.table.AbstractTableModel() {\n\t public int getRowCount() { return 0; }\n\t public int getColumnCount() { return 0; }\n\t public Object getValueAt(int row, int column) { return \"\"; }\n\t});\n }",
"@Override\r\n public boolean deleteAll(String strTable)\r\n { try\r\n { String strSQL = \"DELETE * FROM \" + strTable;\r\n status(strSQL);\r\n dbCmdText.executeUpdate(strSQL);\r\n\r\n // dbRecordset.close();\r\n } catch (SQLException e)\r\n {\r\n e.printStackTrace();\r\n }\r\n return false;\r\n }",
"public void removeAllRecords(String tableName)\r\n {\r\n try {\r\n stmt = con.createStatement();\r\n stmt.execute(\"DELETE FROM \"+tableName);\r\n } \r\n catch (SQLException ex) \r\n {\r\n JOptionPane.showMessageDialog(null,\"Invalid Entry\\n(\" + ex + \")\");\r\n }\r\n }",
"public synchronized boolean ffree( FileTableEntry e )\n {\n\n if(table.removeElement(e))\n {\n e.inode.count--;\n e.inode.toDisk(e.iNumber);\n e = null;\n return true;\n\n } else return false;\n }",
"public void cleanResult() throws Exception {\n\t\tStatement statement = connect.createStatement();\n\t\ttry {\n\t\t\tstatement.executeUpdate(\"TRUNCATE TABLE search_result\");\n\n\t\t\tSystem.out.println(\"Successfully clean original data\");\n\n\t\t} catch (SQLException e) {\n\n\t\t}\n\t}",
"private EstabelecimentoTable() {\n\t\t\t}",
"@Test\n public void readOnlyUnrepairedTest() throws Throwable\n {\n createTable(\"create table %s (id int, id2 int, t text, t2 text, primary key (id, id2)) with gc_grace_seconds=0 and compaction = {'class':'SizeTieredCompactionStrategy', 'only_purge_repaired_tombstones':true}\");\n for (int i = 10; i < 20; i++)\n {\n execute(\"update %s set t2=null where id=? and id2=?\", 123, i);\n }\n flush();\n\n // allow gcgrace to properly expire:\n Thread.sleep(1000);\n verifyIncludingPurgeable();\n verify2IncludingPurgeable(123);\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJTableUtils.clearTable(allowStressTable);\r\n\t\t\t}",
"public synchronized void clear() {\n Entry tab[] = table;\n for (int index = tab.length; --index >= 0; ) {\n tab[index] = null;\n }\n count = 0;\n }",
"public abstract void clean();",
"public abstract void clean();",
"public abstract void clean();",
"public void dropTable() {\n }",
"public void cleanStatistics() {\n\t\thasChildStopNominator = HashBasedTable.create();\n\t\thasChildStopDenominator = HashBasedTable.create();\n\t\tnoChildStopNominator = HashBasedTable.create();\n\t\tnoChildStopDenominator = HashBasedTable.create();\n\t\tleftAttachNominator = HashBasedTable.create();\n\t\tleftAttachDenominator = HashBasedTable.create();\n\t\trightAttachNominator = HashBasedTable.create();\n\t\trightAttachDenominator = HashBasedTable.create();\n\t}",
"boolean dropTable();",
"@Override\n public void clear() {\n for (LinkedList<Entry<K,V>> list : table) {\n list = null;\n }\n }",
"private void maybeResize() {\n\t\tif ( this.size <= this.table.length / 2) return;\r\n\t\t\r\n\t\t//store the current entries\r\n\t\tList<Entry<K,V>> temp = new ArrayList<>();\r\n\t\tfor (Entry<K,V> entry : this.entrySet())\r\n\t\t\ttemp.add(temp.size(), entry);\r\n\t\t\r\n\t\t//create new table\r\n\t\tthis.createTable(this.table.length * 2);\r\n\t\t\r\n\t\t//reinsert the old entries (since the capacity has changed, indices will be different)\r\n\t\tfor (Entry<K,V> entry : temp ) \r\n\t\t\tthis.put(entry.getKey(), entry.getValue());\r\n\t\t\r\n\t}",
"private void clearTableData() {\n DefaultTableModel model = (DefaultTableModel) remindersTable.getModel();\n model.setRowCount(0);\n }",
"public boolean truncateTable(String tableName) {\r\n\tboolean result = false;\r\n\r\n\tStatement st = null;\r\n\ttry {\r\n\t st = conn.createStatement();\r\n\r\n\t st.execute(\"delete from \" + tableName + \";\");\r\n\r\n\t result = true;\r\n\t} catch (Exception e) {\r\n\t // nothing todo here\r\n\t} finally {\r\n\t Cleanup(st);\r\n\t}\r\n\r\n\treturn result;\r\n }",
"@Override\n public void testTruncateTable() {\n }",
"public void clean();",
"public void doDropTable();",
"private void UpdateTable() {\n\t\t\t\t\n\t\t\t}",
"private void clearData() throws SQLException {\n//Lay chi so dong cuoi cung\n int n = tableModel.getRowCount() - 1;\n for (int i = n; i >= 0; i--) {\n tableModel.removeRow(i);//Remove tung dong\n }\n }",
"public void clearTable() {\n reportTable.getColumns().clear();\n }",
"@Override\n public void clean() {\n\n }",
"protected void createTable() {\n table = (MapEntry<K, V>[]) new MapEntry[capacity]; // safe cast\n }",
"void prepareEntryMemTableFlush();",
"public boolean needsAllocArrays() {\n return this.table == null;\n }",
"public void removeAll()\r\n {\n db = this.getWritableDatabase(); // helper is object extends SQLiteOpenHelper\r\n db.execSQL(\"drop table \"+\"campaing\");\r\n db.execSQL(\"drop table \"+\"cafe\");\r\n db.execSQL(\"drop table \"+\"points\");\r\n\r\n db.close ();\r\n }",
"@Test (timeout=180000)\n public void testTableWithNoRegions() throws Exception {\n TableName table =\n TableName.valueOf(name.getMethodName());\n try {\n // create table with one region\n HTableDescriptor desc = new HTableDescriptor(table);\n HColumnDescriptor hcd = new HColumnDescriptor(Bytes.toString(FAM));\n desc.addFamily(hcd); // If a table has no CF's it doesn't get checked\n createTable(TEST_UTIL, desc, null);\n tbl = (HTable) connection.getTable(table, tableExecutorService);\n\n // Mess it up by leaving a hole in the assignment, meta, and hdfs data\n deleteRegion(conf, tbl.getTableDescriptor(), HConstants.EMPTY_START_ROW,\n HConstants.EMPTY_END_ROW, false, false, true);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] { ERROR_CODE.NOT_IN_HDFS });\n\n doFsck(conf, true);\n\n // fix hole\n doFsck(conf, true);\n\n // check that hole fixed\n assertNoErrors(doFsck(conf, false));\n } finally {\n cleanupTable(table);\n }\n\n }",
"public void clear() {\n\t\tfor (int i = 0; i < table.size(); i++) {\n\t\t\ttable.get(i).clear();\n\t\t}\n\t}",
"public void clean();",
"public void clean();",
"public void clean();",
"public void clean();",
"public void makeEmpty() {\n defTable = new DList[sizeBucket];\n for(int i=0; i<sizeBucket; i++) {\n defTable[i] = new DList();\n }\n size = 0;\n }",
"public void clearAllTable() {\n\t\tint rowCount = dmodel.getRowCount();\n\t\tfor (int i = rowCount - 1; i >= 0; i--) {\n\t\t\tdmodel.removeRow(i);\n\t\t}\n\t}",
"@Override\r\n public void dropTable() {\n if(tableIsExist(TABLE_NAME)){\r\n String sql = \"drop table \" + TABLE_NAME;\r\n database.execSQL(sql);\r\n }\r\n }",
"public synchronized boolean fempty() {\n return table.isEmpty( ); // return if table is empty\n }",
"void clearAllItemsTable();",
"public void prepareDeleteAll() {\n setCallFromStatement();\n // The statement is no longer require so can be released.\n clearStatement();\n\n super.prepareDeleteAll();\n }",
"void removeAllData() throws DatabaseNotAccessibleException;",
"public void clearData(){\n\t\t\n\t\tclearTable(conditionTableModel);\n\t\tclearTable(faultTableModel);\n\t}",
"private void clearTable() {\n\t\tcards.clear();\n\t\ttopCard = new Card();\n\t}",
"@Override\n\tpublic void prepare() throws Exception {\n\n\t\tsuper.prepare();\n\t\tmaintainDBService.truncateTables();\n\t}",
"@Test\n public void testProcessor () {\n getOrphanTables(1L);\n updateConstraints();\n deleteConstraints(1L);\n\n }",
"public void cleanProposition();",
"void prepareTables();",
"public void cleanupData() {\n\t}"
]
| [
"0.79036516",
"0.6951331",
"0.69013995",
"0.66975856",
"0.65399283",
"0.6465537",
"0.6454295",
"0.644326",
"0.6436119",
"0.6398127",
"0.631666",
"0.629799",
"0.6255274",
"0.62355727",
"0.6229365",
"0.620801",
"0.6139047",
"0.6079714",
"0.60723346",
"0.60721624",
"0.6044304",
"0.60360503",
"0.6016667",
"0.5987333",
"0.59761775",
"0.59760106",
"0.5974089",
"0.59330106",
"0.5910084",
"0.59008735",
"0.58650154",
"0.5864974",
"0.5862156",
"0.5858322",
"0.58142084",
"0.5801501",
"0.58012176",
"0.5790661",
"0.57828027",
"0.57744986",
"0.57518137",
"0.574368",
"0.5742167",
"0.57392067",
"0.5735192",
"0.57319295",
"0.5726619",
"0.57234424",
"0.5722981",
"0.57111275",
"0.57096803",
"0.56968975",
"0.5696608",
"0.5692968",
"0.5692005",
"0.56858456",
"0.5659836",
"0.56584316",
"0.5646489",
"0.56438893",
"0.56438893",
"0.56438893",
"0.564075",
"0.56401587",
"0.5630369",
"0.5625677",
"0.56253064",
"0.56218666",
"0.5616344",
"0.5615258",
"0.5608008",
"0.5597805",
"0.5594918",
"0.5581593",
"0.5576476",
"0.5575493",
"0.5574743",
"0.55663574",
"0.5556317",
"0.55520195",
"0.5548761",
"0.55446965",
"0.5539656",
"0.5539656",
"0.5539656",
"0.5539656",
"0.5537284",
"0.55361617",
"0.55331534",
"0.5518493",
"0.550909",
"0.5507922",
"0.55026656",
"0.5490624",
"0.5488211",
"0.5487852",
"0.5479253",
"0.547415",
"0.5471982",
"0.54717857"
]
| 0.74058557 | 1 |
Does nothing, table already being cleaned. | public void DoesNeedCleaning() {
System.out.println("Table is being cleaned right now.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void clean() {\r\n\t\t\r\n\t\tlogger.trace(\"Enter clean\");\r\n\t\t\r\n\t\tdata.clear();\r\n\t\tfireTableDataChanged();\r\n\t\t\r\n\t\tlogger.trace(\"Exit clean\");\r\n\t}",
"public void cleanTable() throws ClassicDatabaseException;",
"@Override\n\tpublic void emptyTable() {\n\t\tresTable.deleteAll();\n\t}",
"public void IsBeingCleaned() {\n\t\tSystem.out.println(\"Table already being cleaned.\");\n\t}",
"@Override\n\tpublic void cleanUp() {\n\t\t table = null;\n colFam = null;\n currentEvent = null;\n\t}",
"private void repopulateTableForDelete()\n {\n clearTable();\n populateTable(null);\n }",
"private void clearTable() {\n fieldTable.removeAllRows();\n populateTableHeader();\n }",
"public void emptyTable()\r\n {\r\n final int lastRow = table.getRowCount();\r\n if (lastRow != 0)\r\n {\r\n ((JarModel) table.getModel()).fireTableRowsDeleted(0, lastRow - 1);\r\n }\r\n }",
"public void clearTable() {\n\t\tfor (int i = modelCondTable.getRowCount() - 1; i >= 0; i--) {\n\t\t\tmodelCondTable.removeRow(i);\n\t\t}\n\t}",
"public void wipeTable() {\n SqlStorage.wipeTable(db, TABLE_NAME);\n }",
"public void clearTable(){\n\t\tloaderImage.loadingStart();\n\t\tfullBackup.clear();\n\t\tlist.clear();\n\t\toracle.clear();\n\t\tselectionModel.clear();\n\t\tdataProvider.flush();\n\t\tdataProvider.refresh();\n\t}",
"public void clear() {\r\n\t\tfor (int i = 0; i < table.length; i++) {\r\n\t\t\ttable[i] = null;\r\n\t\t}\r\n\r\n\t\tmodificationCount++;\r\n\t\tsize = 0;\r\n\t}",
"public void resetTable() {\n\t\tif (table != null) {\n\t\t\ttable.removeAll();\n\t\t}\n\t}",
"public void doEmptyTableList() {\n tableList.deleteList();\n }",
"@Override\n public void clearTable() {\n final var query = \"TRUNCATE TABLE piano_project.pianos\";\n try(final var statement = connection.createStatement()) {\n statement.executeUpdate(query);\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n }",
"private void cleanUp() {\n if (rehash()) {\n // If we rehashed, we needn't clean up (clean up happens as\n // a side effect).\n return;\n }\n\n if (size == 0) {\n // No live entries == nothing to clean.\n return;\n }\n\n // Clean log(table.length) entries picking up where we left off\n // last time.\n int index = clean;\n Object[] table = this.table;\n for (int counter = table.length; counter > 0; counter >>= 1,\n index = next(index)) {\n Object k = table[index];\n\n if (k == TOMBSTONE || k == null) {\n continue; // on to next entry\n }\n\n // The table can only contain null, tombstones and references.\n @SuppressWarnings(\"unchecked\")\n Reference<ThreadLocal<?>> reference\n = (Reference<ThreadLocal<?>>) k;\n if (reference.get() == null) {\n // This thread local was reclaimed by the garbage collector.\n table[index] = TOMBSTONE;\n table[index + 1] = null;\n tombstones++;\n size--;\n }\n }\n\n // Point cursor to next index.\n clean = index;\n }",
"public void clear() {\n tableCache.invalidateAll();\n }",
"protected void clearTable() {\n\ttable.setModel(new javax.swing.table.AbstractTableModel() {\n\t public int getRowCount() { return 0; }\n\t public int getColumnCount() { return 0; }\n\t public Object getValueAt(int row, int column) { return \"\"; }\n\t});\n }",
"public void clearAllTable() {\n\t\tint rowCount = dmodel.getRowCount();\n\t\tfor (int i = rowCount - 1; i >= 0; i--) {\n\t\t\tdmodel.removeRow(i);\n\t\t}\n\t}",
"public void IsInUse() {\n\t\tSystem.out.println(\"Table being cleaned, cannot be used.\");\n\t}",
"public void clearTable() {\n reportTable.getColumns().clear();\n }",
"public void clear() {\n\t\tfor (int i = 0; i < table.size(); i++) {\n\t\t\ttable.get(i).clear();\n\t\t}\n\t}",
"private void clearTable()\n {\n TableLayout table = (TableLayout) findViewById(R.id.lossesTable);\n table.removeViews(1, table.getChildCount() - 1);\n }",
"public static boolean testTableClear() {\r\n table.clear();\r\n if (table.size() != 0)\r\n return false;\r\n return true;\r\n }",
"public final void clearTable() {\n while (this.getRowCount() > 0) {\n this.removeRow(0);\n }\n\n // Notify observers\n this.fireTableDataChanged();\n }",
"private void clearTable(DefaultTableModel table){\n\t\t\n\t\tfor(int i = 0; i < table.getRowCount(); i++){\n\t\t\ttable.removeRow(i);\n\t\t}\n\t}",
"void clearAllItemsTable();",
"private void repopulateTableForAdd()\n {\n clearTable();\n populateTable(null);\n }",
"@Override\n public void cleanUsersTable() {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n session.createQuery(\"delete from User\").executeUpdate();\n tx.commit();\n System.out.println(\"HibCleaning users table\");\n session.close();\n\n }",
"public static void resetTable() {\n tableModel.resetDefault();\n updateSummaryTable();\n }",
"public synchronized void clear() {\n Entry tab[] = table;\n for (int index = tab.length; --index >= 0; ) {\n tab[index] = null;\n }\n count = 0;\n }",
"void clearDeletedItemsTable();",
"public void makeEmpty() {\r\n for (int i = 0; i < tableSize; i++) {\r\n table[i] = new DList<Entry<K, V>>();\r\n }\r\n }",
"private void clearTableData() {\n DefaultTableModel model = (DefaultTableModel) remindersTable.getModel();\n model.setRowCount(0);\n }",
"@Override\n public void clear() {\n for (LinkedList<Entry<K,V>> list : table) {\n list = null;\n }\n }",
"public void forceTableCleanup() throws IOException\n {\n ssProxy.forceTableCleanup();\n }",
"private void dealToTable()\r\n\t{\r\n\t\tthis.onTable.clear();\r\n\t\tif(this.deck.size() >= Config.TableCards)\r\n\t\t{\r\n\t\t\tthis.onTable.addAll(this.deck.subList(0, Config.TableCards));\r\n\t\t\tthis.deck = this.deck.subList(Config.TableCards, this.deck.size());\r\n\t\t}\r\n\t}",
"public void unsetWholeTbl()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(WHOLETBL$2, 0);\n }\n }",
"public void clear() {\n table = new Handle[defaultSize];\n logicalSize = 0;\n }",
"void cleanupTable(TableName tablename) throws Exception {\n if (tbl != null) {\n tbl.close();\n tbl = null;\n }\n\n ((ClusterConnection) connection).clearRegionCache();\n deleteTable(TEST_UTIL, tablename);\n }",
"public void dropTable() {\n }",
"public void clearData(){\n\t\t\n\t\tclearTable(conditionTableModel);\n\t\tclearTable(faultTableModel);\n\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJTableUtils.clearTable(allowStressTable);\r\n\t\t\t}",
"public void clearUserTable() {\n\t\tSQLDelete deleteStatament = new SQLDelete();\n\t\tdeleteStatament.clearUserTable();\n\t}",
"static void emptyTable () {\n Session session = null;\n Transaction transaction = null;\n try {\n session = sessionFactory.openSession();\n transaction = session.beginTransaction();\n Query query = session.createQuery(\"DELETE from ReservationsEntity \");\n query.executeUpdate();\n Query query2 = session.createQuery(\"DELETE from OrdersEntity \");\n query2.executeUpdate();\n\n Query query3 = session.createQuery(\"DELETE from TablesEntity \");\n query3.executeUpdate();\n transaction.commit();\n }\n catch (Exception e)\n {\n if (transaction != null) {\n transaction.rollback();\n }\n throw e;\n } finally {\n if (session != null) {\n session.close();\n }\n }\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic void clear( )\r\n\t{\r\n\t\tfor (int i =0; i< this.tableSize; i++)\r\n\t\t\t{ ((LinkedArrays<T>) table[i]).clear(); }\r\n\t\tthis.size = 0; \r\n\t\t\r\n\t}",
"public void cleanResult() throws Exception {\n\t\tStatement statement = connect.createStatement();\n\t\ttry {\n\t\t\tstatement.executeUpdate(\"TRUNCATE TABLE search_result\");\n\n\t\t\tSystem.out.println(\"Successfully clean original data\");\n\n\t\t} catch (SQLException e) {\n\n\t\t}\n\t}",
"public void doDropTable();",
"@Override\r\n public boolean deleteAll(String strTable)\r\n { try\r\n { String strSQL = \"DELETE * FROM \" + strTable;\r\n status(strSQL);\r\n dbCmdText.executeUpdate(strSQL);\r\n\r\n // dbRecordset.close();\r\n } catch (SQLException e)\r\n {\r\n e.printStackTrace();\r\n }\r\n return false;\r\n }",
"private void clearTable() {\n\t\tcards.clear();\n\t\ttopCard = new Card();\n\t}",
"private void clearData() throws SQLException {\n//Lay chi so dong cuoi cung\n int n = tableModel.getRowCount() - 1;\n for (int i = n; i >= 0; i--) {\n tableModel.removeRow(i);//Remove tung dong\n }\n }",
"public void clean();",
"public void clear (){\n\t\tfor (int i = 0; i < table.length; i++)\n\t\t\ttable[i] = null;\n\n\t\t// we have modified the hash table, and it has\n\t\t// no entries\n\t\tmodCount++;\n\t\thashTableSize = 0;\n\t}",
"public void clean();",
"public void clean();",
"public void clean();",
"public void clean();",
"private void clearTable(String tableName) throws SQLException {\n Connection conn = getConnection();\n String setStatement = \"DELETE FROM \" + tableName;\n Statement stm = conn.createStatement();\n stm.execute(setStatement);\n }",
"public void dropTable();",
"public void clearTable() {\n this.lstDaqHware.clear();\n this.mapDevPBar.clear();\n this.mapDevMotion.clear();\n }",
"@Override\n public void clearDB() throws Exception {\n hBaseOperation.deleteTable(this.dataTableNameString);\n hBaseOperation.createTable(this.dataTableNameString, this.columnFamily, numRegion);\n }",
"public void clear()\n {\n if (resultSet != null)\n {\n try\n {\n resultSet.close();\n } catch (SQLException ex)\n {\n edu.ku.brc.af.core.UsageTracker.incrSQLUsageCount();\n edu.ku.brc.exceptions.ExceptionTracker.getInstance().capture(ResultSetTableModelDirect.class, ex);\n log.error(ex);\n }\n resultSet = null;\n }\n\n metaData = null;\n classNames.clear();\n\n currentRow = 0;\n numRows = 0;\n }",
"public void clearTables()\n\t{\n\t\ttry {\n\t\t\tclearStatement.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\tif (DEBUG) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public abstract void clean();",
"public abstract void clean();",
"public abstract void clean();",
"@Override\r\n\tpublic boolean dropTable() {\n\t\treturn false;\r\n\t}",
"private void removeRedundantGreyTable()\r\n \t{\r\n \t\tdeleteNodes(XPath.GREY_TABLE.query);\r\n \t}",
"public boolean dropTemporaryTableAfterUse() {\n \t\treturn true;\n \t}",
"public void removeAll()\r\n {\n db = this.getWritableDatabase(); // helper is object extends SQLiteOpenHelper\r\n db.execSQL(\"drop table \"+\"campaing\");\r\n db.execSQL(\"drop table \"+\"cafe\");\r\n db.execSQL(\"drop table \"+\"points\");\r\n\r\n db.close ();\r\n }",
"public void clearTable() {\n topLeft = new Item(0, \"blank\");\n topCenter = new Item(0, \"blank\");\n topRight = new Item(0, \"blank\");\n left = new Item(0, \"blank\");\n center = new Item(0, \"blank\");\n right = new Item(0, \"blank\");\n bottomLeft = new Item(0, \"blank\");\n bottomCenter = new Item(0, \"blank\");\n bottomRight = new Item(0, \"blank\");\n result = new Item(0, \"blank\");\n index = 0;\n }",
"@Override\r\n public void dropTable() {\n if(tableIsExist(TABLE_NAME)){\r\n String sql = \"drop table \" + TABLE_NAME;\r\n database.execSQL(sql);\r\n }\r\n }",
"public void reset() {\n\t\tdroppedFiles.clear();\n\t\tSwingUtilities.invokeLater(new Runnable() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t((DefaultTableModel) table.getModel()).setRowCount(0);\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t}",
"@Override\n public void clean() {\n\n }",
"public void deleteTableRecords()\n {\n coronaRepository.deleteAll();\n }",
"public void removeAllRecords(String tableName)\r\n {\r\n try {\r\n stmt = con.createStatement();\r\n stmt.execute(\"DELETE FROM \"+tableName);\r\n } \r\n catch (SQLException ex) \r\n {\r\n JOptionPane.showMessageDialog(null,\"Invalid Entry\\n(\" + ex + \")\");\r\n }\r\n }",
"public void cleanUp();",
"public void cleanUp();",
"public Builder clearBaseTable() {\n\n baseTable_ = getDefaultInstance().getBaseTable();\n onChanged();\n return this;\n }",
"public static void clear() \r\n\t{\r\n\t\tEntry\ttab[] = m_table;\r\n\t\tint\t\tindex;\r\n\t\r\n\t\tif (tab != null) {\r\n\t\t\tfor (index = tab.length; --index >= 0; ) {\r\n\t\t\t\ttab[index] = null;\r\n\t\t}\t}\r\n\t\tm_count = 0;\r\n\t\tclearElisionCache();\r\n }",
"protected void truncate() {\n doQuery(\"TRUNCATE TABLE feedentryqueue\");\n }",
"public void clearHashTable()\n {\n int index;\n\n for(index = 0; index < tableSize; index++)\n {\n tableArray[index] = null;\n }\n }",
"public void clearTables() {\n\t _database.delete(XREF_TABLE, null, null);\n\t _database.delete(ORDER_RECORDS_TABLE, null, null); \n\t}",
"private void limparTabela() {\n while (tmLivro.getRowCount() > 0) {\n tmLivro.removeRow(0);\n }\n }",
"private void limparTabela() { \n while (tmLivro.getRowCount() > 0) { \n tmLivro.removeRow(0);\n }\n }",
"public void clear() {\n\trows.removeAllElements();\n\tfireTableDataChanged();\n}",
"public static void emptyTable(Connection con, String tableName) throws SQLException\r\n\t{\r\n\t Statement st = null;\r\n\t\r\n String createStr = \"CREATE TABLE \" + tableName + \" (userId INTEGER, firstName VARCHAR(30), lastName VARCHAR(30), countryCode VARCHAR(10), primary key(userID))\";\r\n \tString dropStr = \"DROP TABLE \" + tableName;\r\n \t\r\n DatabaseMetaData dbm = con.getMetaData();\r\n ResultSet tables = dbm.getTables(null, null, tableName, null);\r\n \r\n st = con.createStatement(); \r\n\r\n if (tables != null && tables.next()) {\r\n // Table exists\r\n \tst.executeUpdate(dropStr); \r\n \tSystem.out.println(\"Got rid of old table\");\r\n }\r\n\r\n st.executeUpdate(createStr);\r\n\t\r\n\t}",
"boolean dropTable();",
"void cleanUp();",
"void cleanUp();",
"void cleanUp();",
"public void clearTable(String tableName) throws Exception {\n DefaultDataSet dataset = new DefaultDataSet();\n dataset.addTable(new DefaultTable(tableName));\n DatabaseOperation.DELETE_ALL.execute(conn, dataset);\n }",
"@Test (timeout=180000)\n public void testHBaseFsckClean() throws Exception {\n assertNoErrors(doFsck(conf, false));\n TableName table = TableName.valueOf(\"tableClean\");\n try {\n HBaseFsck hbck = doFsck(conf, false);\n assertNoErrors(hbck);\n\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // We created 1 table, should be fine\n hbck = doFsck(conf, false);\n assertNoErrors(hbck);\n assertEquals(0, hbck.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n } finally {\n cleanupTable(table);\n }\n }",
"public synchronized void updateHistoTable(final boolean forceClean) {\r\n\t\tGDE.display.asyncExec(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tif (DataExplorer.this.histoTableTabItem != null && !DataExplorer.this.histoTableTabItem.isDisposed() && DataExplorer.this.histoTableTabItem.isVisible()) {\r\n\t\t\t\t\tif (forceClean || !DataExplorer.this.histoTableTabItem.isRowTextAndTrailValid() || !DataExplorer.this.histoTableTabItem.isHeaderTextValid()) {\r\n\t\t\t\t\t\tDataExplorer.this.histoTableTabItem.setHeader();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tTrailRecordSet trailRecordSet = DataExplorer.this.histoSet.getTrailRecordSet();\r\n\t\t\t\t\tif (trailRecordSet != null) DataExplorer.this.histoTableTabItem.setRowCount(trailRecordSet.getVisibleAndDisplayableRecordsForTable().size() + trailRecordSet.getActiveDisplayTags().size());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t//\t\t\tif (activeRecordSet == null || requestingRecordSetName.isEmpty()) {\r\n\t\tif (false) { //todo is there any requirement to clean the table ???\r\n\t\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\t\tif (this.histoTableTabItem != null) {\r\n\t\t\t\t\tthis.histoTableTabItem.cleanTable();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tGDE.display.asyncExec(new Runnable() {\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tif (DataExplorer.this.histoTableTabItem != null) {\r\n\t\t\t\t\t\t\tDataExplorer.this.histoTableTabItem.cleanTable();\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}",
"public void vaciarTabla() {\n\n DefaultTableModel modelo = (DefaultTableModel) table1Calificaciones.getModel();\n int total = table1Calificaciones.getRowCount();\n for (int i = 0; i < total; i++) {\n modelo.removeRow(0);\n }\n\n }",
"public void clear() {\n\t\tLog.i(TAG, \"clear table \" + TABLE_USER);\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tdb.delete(TABLE_USER, null, null);\n\t}",
"@Override\r\n\tpublic void clearDatabase() {\n\t\t\r\n\t}",
"private boolean limpiarTablaDocs(Table t)\n\t{\n\t\tt.removeAll(); //borra todo?\n\t\treturn true;\n\t}",
"public void flushAllTables() {\n\t}",
"@Override\n public void clearRowsWithChanges() {\n }"
]
| [
"0.7450564",
"0.7442357",
"0.74261236",
"0.7287264",
"0.7218668",
"0.72111017",
"0.7178828",
"0.7139042",
"0.70488447",
"0.70182806",
"0.7014537",
"0.7009022",
"0.7007474",
"0.69839156",
"0.6920092",
"0.6884191",
"0.68804395",
"0.68117464",
"0.68071157",
"0.67947525",
"0.67925704",
"0.67373824",
"0.6717236",
"0.66910607",
"0.6625711",
"0.662388",
"0.66026044",
"0.6597208",
"0.6573924",
"0.6519954",
"0.6515828",
"0.6515443",
"0.64999336",
"0.6487158",
"0.64756066",
"0.6471549",
"0.6464134",
"0.6457056",
"0.64314187",
"0.6397694",
"0.6393185",
"0.63755333",
"0.6370309",
"0.6356436",
"0.6349052",
"0.63475525",
"0.634682",
"0.63255566",
"0.6325507",
"0.6298411",
"0.6298197",
"0.6251582",
"0.62486815",
"0.624816",
"0.624816",
"0.624816",
"0.624816",
"0.62228125",
"0.6221665",
"0.62021846",
"0.619913",
"0.6180356",
"0.6178369",
"0.6175643",
"0.6175643",
"0.6175643",
"0.61746174",
"0.6174333",
"0.6171376",
"0.6167644",
"0.6161427",
"0.61432326",
"0.6138147",
"0.61256194",
"0.61061484",
"0.6101971",
"0.60982734",
"0.60982734",
"0.6096677",
"0.6095176",
"0.60847443",
"0.6080683",
"0.6078618",
"0.6069931",
"0.6066035",
"0.6064731",
"0.6062849",
"0.6056104",
"0.6055557",
"0.6055557",
"0.6055557",
"0.60540104",
"0.6051604",
"0.60462064",
"0.60369575",
"0.6026912",
"0.6016301",
"0.60036045",
"0.5996961",
"0.598735"
]
| 0.8102467 | 0 |
Does nothing, table already being cleaned. | public void IsBeingCleaned() {
System.out.println("Table already being cleaned.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void DoesNeedCleaning() {\n\t\tSystem.out.println(\"Table is being cleaned right now.\");\n\t}",
"public void clean() {\r\n\t\t\r\n\t\tlogger.trace(\"Enter clean\");\r\n\t\t\r\n\t\tdata.clear();\r\n\t\tfireTableDataChanged();\r\n\t\t\r\n\t\tlogger.trace(\"Exit clean\");\r\n\t}",
"public void cleanTable() throws ClassicDatabaseException;",
"@Override\n\tpublic void emptyTable() {\n\t\tresTable.deleteAll();\n\t}",
"@Override\n\tpublic void cleanUp() {\n\t\t table = null;\n colFam = null;\n currentEvent = null;\n\t}",
"private void repopulateTableForDelete()\n {\n clearTable();\n populateTable(null);\n }",
"private void clearTable() {\n fieldTable.removeAllRows();\n populateTableHeader();\n }",
"public void emptyTable()\r\n {\r\n final int lastRow = table.getRowCount();\r\n if (lastRow != 0)\r\n {\r\n ((JarModel) table.getModel()).fireTableRowsDeleted(0, lastRow - 1);\r\n }\r\n }",
"public void clearTable() {\n\t\tfor (int i = modelCondTable.getRowCount() - 1; i >= 0; i--) {\n\t\t\tmodelCondTable.removeRow(i);\n\t\t}\n\t}",
"public void wipeTable() {\n SqlStorage.wipeTable(db, TABLE_NAME);\n }",
"public void clearTable(){\n\t\tloaderImage.loadingStart();\n\t\tfullBackup.clear();\n\t\tlist.clear();\n\t\toracle.clear();\n\t\tselectionModel.clear();\n\t\tdataProvider.flush();\n\t\tdataProvider.refresh();\n\t}",
"public void clear() {\r\n\t\tfor (int i = 0; i < table.length; i++) {\r\n\t\t\ttable[i] = null;\r\n\t\t}\r\n\r\n\t\tmodificationCount++;\r\n\t\tsize = 0;\r\n\t}",
"public void resetTable() {\n\t\tif (table != null) {\n\t\t\ttable.removeAll();\n\t\t}\n\t}",
"public void doEmptyTableList() {\n tableList.deleteList();\n }",
"@Override\n public void clearTable() {\n final var query = \"TRUNCATE TABLE piano_project.pianos\";\n try(final var statement = connection.createStatement()) {\n statement.executeUpdate(query);\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n }",
"private void cleanUp() {\n if (rehash()) {\n // If we rehashed, we needn't clean up (clean up happens as\n // a side effect).\n return;\n }\n\n if (size == 0) {\n // No live entries == nothing to clean.\n return;\n }\n\n // Clean log(table.length) entries picking up where we left off\n // last time.\n int index = clean;\n Object[] table = this.table;\n for (int counter = table.length; counter > 0; counter >>= 1,\n index = next(index)) {\n Object k = table[index];\n\n if (k == TOMBSTONE || k == null) {\n continue; // on to next entry\n }\n\n // The table can only contain null, tombstones and references.\n @SuppressWarnings(\"unchecked\")\n Reference<ThreadLocal<?>> reference\n = (Reference<ThreadLocal<?>>) k;\n if (reference.get() == null) {\n // This thread local was reclaimed by the garbage collector.\n table[index] = TOMBSTONE;\n table[index + 1] = null;\n tombstones++;\n size--;\n }\n }\n\n // Point cursor to next index.\n clean = index;\n }",
"public void clear() {\n tableCache.invalidateAll();\n }",
"protected void clearTable() {\n\ttable.setModel(new javax.swing.table.AbstractTableModel() {\n\t public int getRowCount() { return 0; }\n\t public int getColumnCount() { return 0; }\n\t public Object getValueAt(int row, int column) { return \"\"; }\n\t});\n }",
"public void clearAllTable() {\n\t\tint rowCount = dmodel.getRowCount();\n\t\tfor (int i = rowCount - 1; i >= 0; i--) {\n\t\t\tdmodel.removeRow(i);\n\t\t}\n\t}",
"public void IsInUse() {\n\t\tSystem.out.println(\"Table being cleaned, cannot be used.\");\n\t}",
"public void clearTable() {\n reportTable.getColumns().clear();\n }",
"public void clear() {\n\t\tfor (int i = 0; i < table.size(); i++) {\n\t\t\ttable.get(i).clear();\n\t\t}\n\t}",
"private void clearTable()\n {\n TableLayout table = (TableLayout) findViewById(R.id.lossesTable);\n table.removeViews(1, table.getChildCount() - 1);\n }",
"public static boolean testTableClear() {\r\n table.clear();\r\n if (table.size() != 0)\r\n return false;\r\n return true;\r\n }",
"public final void clearTable() {\n while (this.getRowCount() > 0) {\n this.removeRow(0);\n }\n\n // Notify observers\n this.fireTableDataChanged();\n }",
"private void clearTable(DefaultTableModel table){\n\t\t\n\t\tfor(int i = 0; i < table.getRowCount(); i++){\n\t\t\ttable.removeRow(i);\n\t\t}\n\t}",
"void clearAllItemsTable();",
"private void repopulateTableForAdd()\n {\n clearTable();\n populateTable(null);\n }",
"@Override\n public void cleanUsersTable() {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n session.createQuery(\"delete from User\").executeUpdate();\n tx.commit();\n System.out.println(\"HibCleaning users table\");\n session.close();\n\n }",
"public static void resetTable() {\n tableModel.resetDefault();\n updateSummaryTable();\n }",
"public synchronized void clear() {\n Entry tab[] = table;\n for (int index = tab.length; --index >= 0; ) {\n tab[index] = null;\n }\n count = 0;\n }",
"void clearDeletedItemsTable();",
"public void makeEmpty() {\r\n for (int i = 0; i < tableSize; i++) {\r\n table[i] = new DList<Entry<K, V>>();\r\n }\r\n }",
"private void clearTableData() {\n DefaultTableModel model = (DefaultTableModel) remindersTable.getModel();\n model.setRowCount(0);\n }",
"@Override\n public void clear() {\n for (LinkedList<Entry<K,V>> list : table) {\n list = null;\n }\n }",
"public void forceTableCleanup() throws IOException\n {\n ssProxy.forceTableCleanup();\n }",
"private void dealToTable()\r\n\t{\r\n\t\tthis.onTable.clear();\r\n\t\tif(this.deck.size() >= Config.TableCards)\r\n\t\t{\r\n\t\t\tthis.onTable.addAll(this.deck.subList(0, Config.TableCards));\r\n\t\t\tthis.deck = this.deck.subList(Config.TableCards, this.deck.size());\r\n\t\t}\r\n\t}",
"public void unsetWholeTbl()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(WHOLETBL$2, 0);\n }\n }",
"public void clear() {\n table = new Handle[defaultSize];\n logicalSize = 0;\n }",
"void cleanupTable(TableName tablename) throws Exception {\n if (tbl != null) {\n tbl.close();\n tbl = null;\n }\n\n ((ClusterConnection) connection).clearRegionCache();\n deleteTable(TEST_UTIL, tablename);\n }",
"public void dropTable() {\n }",
"public void clearData(){\n\t\t\n\t\tclearTable(conditionTableModel);\n\t\tclearTable(faultTableModel);\n\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJTableUtils.clearTable(allowStressTable);\r\n\t\t\t}",
"public void clearUserTable() {\n\t\tSQLDelete deleteStatament = new SQLDelete();\n\t\tdeleteStatament.clearUserTable();\n\t}",
"static void emptyTable () {\n Session session = null;\n Transaction transaction = null;\n try {\n session = sessionFactory.openSession();\n transaction = session.beginTransaction();\n Query query = session.createQuery(\"DELETE from ReservationsEntity \");\n query.executeUpdate();\n Query query2 = session.createQuery(\"DELETE from OrdersEntity \");\n query2.executeUpdate();\n\n Query query3 = session.createQuery(\"DELETE from TablesEntity \");\n query3.executeUpdate();\n transaction.commit();\n }\n catch (Exception e)\n {\n if (transaction != null) {\n transaction.rollback();\n }\n throw e;\n } finally {\n if (session != null) {\n session.close();\n }\n }\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic void clear( )\r\n\t{\r\n\t\tfor (int i =0; i< this.tableSize; i++)\r\n\t\t\t{ ((LinkedArrays<T>) table[i]).clear(); }\r\n\t\tthis.size = 0; \r\n\t\t\r\n\t}",
"public void cleanResult() throws Exception {\n\t\tStatement statement = connect.createStatement();\n\t\ttry {\n\t\t\tstatement.executeUpdate(\"TRUNCATE TABLE search_result\");\n\n\t\t\tSystem.out.println(\"Successfully clean original data\");\n\n\t\t} catch (SQLException e) {\n\n\t\t}\n\t}",
"public void doDropTable();",
"@Override\r\n public boolean deleteAll(String strTable)\r\n { try\r\n { String strSQL = \"DELETE * FROM \" + strTable;\r\n status(strSQL);\r\n dbCmdText.executeUpdate(strSQL);\r\n\r\n // dbRecordset.close();\r\n } catch (SQLException e)\r\n {\r\n e.printStackTrace();\r\n }\r\n return false;\r\n }",
"private void clearTable() {\n\t\tcards.clear();\n\t\ttopCard = new Card();\n\t}",
"private void clearData() throws SQLException {\n//Lay chi so dong cuoi cung\n int n = tableModel.getRowCount() - 1;\n for (int i = n; i >= 0; i--) {\n tableModel.removeRow(i);//Remove tung dong\n }\n }",
"public void clean();",
"public void clear (){\n\t\tfor (int i = 0; i < table.length; i++)\n\t\t\ttable[i] = null;\n\n\t\t// we have modified the hash table, and it has\n\t\t// no entries\n\t\tmodCount++;\n\t\thashTableSize = 0;\n\t}",
"public void clean();",
"public void clean();",
"public void clean();",
"public void clean();",
"private void clearTable(String tableName) throws SQLException {\n Connection conn = getConnection();\n String setStatement = \"DELETE FROM \" + tableName;\n Statement stm = conn.createStatement();\n stm.execute(setStatement);\n }",
"public void dropTable();",
"public void clearTable() {\n this.lstDaqHware.clear();\n this.mapDevPBar.clear();\n this.mapDevMotion.clear();\n }",
"@Override\n public void clearDB() throws Exception {\n hBaseOperation.deleteTable(this.dataTableNameString);\n hBaseOperation.createTable(this.dataTableNameString, this.columnFamily, numRegion);\n }",
"public void clear()\n {\n if (resultSet != null)\n {\n try\n {\n resultSet.close();\n } catch (SQLException ex)\n {\n edu.ku.brc.af.core.UsageTracker.incrSQLUsageCount();\n edu.ku.brc.exceptions.ExceptionTracker.getInstance().capture(ResultSetTableModelDirect.class, ex);\n log.error(ex);\n }\n resultSet = null;\n }\n\n metaData = null;\n classNames.clear();\n\n currentRow = 0;\n numRows = 0;\n }",
"public void clearTables()\n\t{\n\t\ttry {\n\t\t\tclearStatement.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\tif (DEBUG) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public abstract void clean();",
"public abstract void clean();",
"public abstract void clean();",
"@Override\r\n\tpublic boolean dropTable() {\n\t\treturn false;\r\n\t}",
"private void removeRedundantGreyTable()\r\n \t{\r\n \t\tdeleteNodes(XPath.GREY_TABLE.query);\r\n \t}",
"public boolean dropTemporaryTableAfterUse() {\n \t\treturn true;\n \t}",
"public void removeAll()\r\n {\n db = this.getWritableDatabase(); // helper is object extends SQLiteOpenHelper\r\n db.execSQL(\"drop table \"+\"campaing\");\r\n db.execSQL(\"drop table \"+\"cafe\");\r\n db.execSQL(\"drop table \"+\"points\");\r\n\r\n db.close ();\r\n }",
"public void clearTable() {\n topLeft = new Item(0, \"blank\");\n topCenter = new Item(0, \"blank\");\n topRight = new Item(0, \"blank\");\n left = new Item(0, \"blank\");\n center = new Item(0, \"blank\");\n right = new Item(0, \"blank\");\n bottomLeft = new Item(0, \"blank\");\n bottomCenter = new Item(0, \"blank\");\n bottomRight = new Item(0, \"blank\");\n result = new Item(0, \"blank\");\n index = 0;\n }",
"@Override\r\n public void dropTable() {\n if(tableIsExist(TABLE_NAME)){\r\n String sql = \"drop table \" + TABLE_NAME;\r\n database.execSQL(sql);\r\n }\r\n }",
"public void reset() {\n\t\tdroppedFiles.clear();\n\t\tSwingUtilities.invokeLater(new Runnable() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t((DefaultTableModel) table.getModel()).setRowCount(0);\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t}",
"@Override\n public void clean() {\n\n }",
"public void deleteTableRecords()\n {\n coronaRepository.deleteAll();\n }",
"public void removeAllRecords(String tableName)\r\n {\r\n try {\r\n stmt = con.createStatement();\r\n stmt.execute(\"DELETE FROM \"+tableName);\r\n } \r\n catch (SQLException ex) \r\n {\r\n JOptionPane.showMessageDialog(null,\"Invalid Entry\\n(\" + ex + \")\");\r\n }\r\n }",
"public void cleanUp();",
"public void cleanUp();",
"public Builder clearBaseTable() {\n\n baseTable_ = getDefaultInstance().getBaseTable();\n onChanged();\n return this;\n }",
"public static void clear() \r\n\t{\r\n\t\tEntry\ttab[] = m_table;\r\n\t\tint\t\tindex;\r\n\t\r\n\t\tif (tab != null) {\r\n\t\t\tfor (index = tab.length; --index >= 0; ) {\r\n\t\t\t\ttab[index] = null;\r\n\t\t}\t}\r\n\t\tm_count = 0;\r\n\t\tclearElisionCache();\r\n }",
"protected void truncate() {\n doQuery(\"TRUNCATE TABLE feedentryqueue\");\n }",
"public void clearHashTable()\n {\n int index;\n\n for(index = 0; index < tableSize; index++)\n {\n tableArray[index] = null;\n }\n }",
"public void clearTables() {\n\t _database.delete(XREF_TABLE, null, null);\n\t _database.delete(ORDER_RECORDS_TABLE, null, null); \n\t}",
"private void limparTabela() {\n while (tmLivro.getRowCount() > 0) {\n tmLivro.removeRow(0);\n }\n }",
"private void limparTabela() { \n while (tmLivro.getRowCount() > 0) { \n tmLivro.removeRow(0);\n }\n }",
"public void clear() {\n\trows.removeAllElements();\n\tfireTableDataChanged();\n}",
"public static void emptyTable(Connection con, String tableName) throws SQLException\r\n\t{\r\n\t Statement st = null;\r\n\t\r\n String createStr = \"CREATE TABLE \" + tableName + \" (userId INTEGER, firstName VARCHAR(30), lastName VARCHAR(30), countryCode VARCHAR(10), primary key(userID))\";\r\n \tString dropStr = \"DROP TABLE \" + tableName;\r\n \t\r\n DatabaseMetaData dbm = con.getMetaData();\r\n ResultSet tables = dbm.getTables(null, null, tableName, null);\r\n \r\n st = con.createStatement(); \r\n\r\n if (tables != null && tables.next()) {\r\n // Table exists\r\n \tst.executeUpdate(dropStr); \r\n \tSystem.out.println(\"Got rid of old table\");\r\n }\r\n\r\n st.executeUpdate(createStr);\r\n\t\r\n\t}",
"boolean dropTable();",
"void cleanUp();",
"void cleanUp();",
"void cleanUp();",
"public void clearTable(String tableName) throws Exception {\n DefaultDataSet dataset = new DefaultDataSet();\n dataset.addTable(new DefaultTable(tableName));\n DatabaseOperation.DELETE_ALL.execute(conn, dataset);\n }",
"@Test (timeout=180000)\n public void testHBaseFsckClean() throws Exception {\n assertNoErrors(doFsck(conf, false));\n TableName table = TableName.valueOf(\"tableClean\");\n try {\n HBaseFsck hbck = doFsck(conf, false);\n assertNoErrors(hbck);\n\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // We created 1 table, should be fine\n hbck = doFsck(conf, false);\n assertNoErrors(hbck);\n assertEquals(0, hbck.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n } finally {\n cleanupTable(table);\n }\n }",
"public synchronized void updateHistoTable(final boolean forceClean) {\r\n\t\tGDE.display.asyncExec(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tif (DataExplorer.this.histoTableTabItem != null && !DataExplorer.this.histoTableTabItem.isDisposed() && DataExplorer.this.histoTableTabItem.isVisible()) {\r\n\t\t\t\t\tif (forceClean || !DataExplorer.this.histoTableTabItem.isRowTextAndTrailValid() || !DataExplorer.this.histoTableTabItem.isHeaderTextValid()) {\r\n\t\t\t\t\t\tDataExplorer.this.histoTableTabItem.setHeader();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tTrailRecordSet trailRecordSet = DataExplorer.this.histoSet.getTrailRecordSet();\r\n\t\t\t\t\tif (trailRecordSet != null) DataExplorer.this.histoTableTabItem.setRowCount(trailRecordSet.getVisibleAndDisplayableRecordsForTable().size() + trailRecordSet.getActiveDisplayTags().size());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t//\t\t\tif (activeRecordSet == null || requestingRecordSetName.isEmpty()) {\r\n\t\tif (false) { //todo is there any requirement to clean the table ???\r\n\t\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\t\tif (this.histoTableTabItem != null) {\r\n\t\t\t\t\tthis.histoTableTabItem.cleanTable();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tGDE.display.asyncExec(new Runnable() {\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tif (DataExplorer.this.histoTableTabItem != null) {\r\n\t\t\t\t\t\t\tDataExplorer.this.histoTableTabItem.cleanTable();\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}",
"public void vaciarTabla() {\n\n DefaultTableModel modelo = (DefaultTableModel) table1Calificaciones.getModel();\n int total = table1Calificaciones.getRowCount();\n for (int i = 0; i < total; i++) {\n modelo.removeRow(0);\n }\n\n }",
"public void clear() {\n\t\tLog.i(TAG, \"clear table \" + TABLE_USER);\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tdb.delete(TABLE_USER, null, null);\n\t}",
"@Override\r\n\tpublic void clearDatabase() {\n\t\t\r\n\t}",
"private boolean limpiarTablaDocs(Table t)\n\t{\n\t\tt.removeAll(); //borra todo?\n\t\treturn true;\n\t}",
"public void flushAllTables() {\n\t}",
"@Override\n public void clearRowsWithChanges() {\n }"
]
| [
"0.8102467",
"0.7450564",
"0.7442357",
"0.74261236",
"0.7218668",
"0.72111017",
"0.7178828",
"0.7139042",
"0.70488447",
"0.70182806",
"0.7014537",
"0.7009022",
"0.7007474",
"0.69839156",
"0.6920092",
"0.6884191",
"0.68804395",
"0.68117464",
"0.68071157",
"0.67947525",
"0.67925704",
"0.67373824",
"0.6717236",
"0.66910607",
"0.6625711",
"0.662388",
"0.66026044",
"0.6597208",
"0.6573924",
"0.6519954",
"0.6515828",
"0.6515443",
"0.64999336",
"0.6487158",
"0.64756066",
"0.6471549",
"0.6464134",
"0.6457056",
"0.64314187",
"0.6397694",
"0.6393185",
"0.63755333",
"0.6370309",
"0.6356436",
"0.6349052",
"0.63475525",
"0.634682",
"0.63255566",
"0.6325507",
"0.6298411",
"0.6298197",
"0.6251582",
"0.62486815",
"0.624816",
"0.624816",
"0.624816",
"0.624816",
"0.62228125",
"0.6221665",
"0.62021846",
"0.619913",
"0.6180356",
"0.6178369",
"0.6175643",
"0.6175643",
"0.6175643",
"0.61746174",
"0.6174333",
"0.6171376",
"0.6167644",
"0.6161427",
"0.61432326",
"0.6138147",
"0.61256194",
"0.61061484",
"0.6101971",
"0.60982734",
"0.60982734",
"0.6096677",
"0.6095176",
"0.60847443",
"0.6080683",
"0.6078618",
"0.6069931",
"0.6066035",
"0.6064731",
"0.6062849",
"0.6056104",
"0.6055557",
"0.6055557",
"0.6055557",
"0.60540104",
"0.6051604",
"0.60462064",
"0.60369575",
"0.6026912",
"0.6016301",
"0.60036045",
"0.5996961",
"0.598735"
]
| 0.7287264 | 4 |
Created by Galaxy on 2018/5/10. | public interface CatagoryApiService {
@GET("product/getCatagory")
Observable<CatagoryBean> getCatagory();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\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}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n public void init() {\n\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"private void poetries() {\n\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n public void init() {\n }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"public void mo38117a() {\n }",
"@Override\n void init() {\n }",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\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\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"private void init() {\n\n\t}",
"@Override\n public void init() {}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n\tpublic void jugar() {\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\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n protected void init() {\n }",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {}",
"private void m50366E() {\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 }",
"public void mo55254a() {\n }",
"@Override\n public void memoria() {\n \n }",
"@Override\n protected void getExras() {\n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\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\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"private void kk12() {\n\n\t}",
"public void mo6081a() {\n }",
"@Override\n public void initialize() { \n }",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"private TMCourse() {\n\t}",
"Petunia() {\r\n\t\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"private MetallicityUtils() {\n\t\t\n\t}",
"private Singletion3() {}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"protected boolean func_70814_o() { return true; }",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"Consumable() {\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"protected void mo6255a() {\n }",
"@Override\n public void initialize() {\n \n }",
"@Override\n\tprotected void initialize() {\n\t}"
]
| [
"0.6063219",
"0.5932152",
"0.5819805",
"0.57389456",
"0.57375443",
"0.5705483",
"0.5698441",
"0.5698441",
"0.5585669",
"0.558176",
"0.5567788",
"0.55595255",
"0.55492735",
"0.5548538",
"0.5530581",
"0.55138195",
"0.55138195",
"0.55138195",
"0.55138195",
"0.55138195",
"0.55138195",
"0.5508888",
"0.550882",
"0.55033225",
"0.55022",
"0.5500868",
"0.5494518",
"0.5489989",
"0.5488062",
"0.5480479",
"0.5462817",
"0.5448189",
"0.54448307",
"0.54448307",
"0.54448307",
"0.54448307",
"0.54448307",
"0.54399675",
"0.54339874",
"0.5433423",
"0.5427289",
"0.542666",
"0.54192525",
"0.5418545",
"0.5413787",
"0.5407581",
"0.54049826",
"0.54049826",
"0.5393511",
"0.5393511",
"0.53855056",
"0.5382535",
"0.53800225",
"0.53781545",
"0.53770465",
"0.53716",
"0.53716",
"0.53716",
"0.53716",
"0.53716",
"0.53716",
"0.53716",
"0.5369282",
"0.53582126",
"0.53564805",
"0.53564805",
"0.53383595",
"0.5337474",
"0.5337474",
"0.5337474",
"0.5323309",
"0.53218997",
"0.53218997",
"0.53218997",
"0.53198683",
"0.5319272",
"0.5307046",
"0.5294694",
"0.5294694",
"0.5294694",
"0.5290651",
"0.52905273",
"0.52857107",
"0.5284915",
"0.5279803",
"0.5279803",
"0.5279803",
"0.5272867",
"0.5271642",
"0.52713335",
"0.52638227",
"0.52633756",
"0.5260357",
"0.5241346",
"0.5236095",
"0.5231565",
"0.5229401",
"0.5226624",
"0.52199906",
"0.52192825",
"0.52185905"
]
| 0.0 | -1 |
This repository extends JpaRepository in which custom methods are declared depending upon our requirements | public interface MailRepository extends JpaRepository<Mail,Long>
{
List<Mail> findByToAddressAndType(String to,String type);
List<Mail> findByFromAddressAndType(String from, String type);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface PersonRepository extends JpaRepository<Person, Long>, PersonRepositoryQuery {\n}",
"public interface TypeRepositoryCustom extends JpaRepository<Type, Long> {\n\n}",
"@Repository\npublic interface UserRepository extends JpaRepository<User,Integer> {\n //implementation will be provided to run time\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface DsColumnTypesRepository extends JpaRepository<DsColumnTypes, Long>, JpaSpecificationExecutor<DsColumnTypes> {\n\n}",
"public interface FeedBackRepositoryCustom extends JpaRepository<FeedBack, Long> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface PartnerTypeRepository extends JpaRepository<PartnerType, Long> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface OrdOrderItemRepository extends JpaRepository<OrdOrderItem, Long>, JpaSpecificationExecutor<OrdOrderItem> {}",
"public interface OrderRepository extends JpaRepository<Order, String> {\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface MatchRelationRepository extends JpaRepository<MatchRelation, Long> {\n}",
"@Repository\npublic interface ProductRepository extends JpaRepository<Product, Long> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface PRoulRepository extends JpaRepository<PRoul, Long> {\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface ClassDurationRepository extends JpaRepository<ClassDuration, Long> {\n\n}",
"public interface EmployeeRepository extends JpaRepository<Employee, Integer> {\r\n\r\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface SaleRepository extends JpaRepository<Sale, Long> {}",
"public interface UserRepository extends PagingAndSortingRepository<User, String>, JpaSpecificationExecutor<User> {\n}",
"interface ItemRepository extends JpaRepository<Item, Long> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface ChapitreRepository extends JpaRepository<Chapitre, Long>, JpaSpecificationExecutor<Chapitre> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface FestivalAllowancePaymentDtlRepository extends JpaRepository<FestivalAllowancePaymentDtl, Long>, JpaSpecificationExecutor<FestivalAllowancePaymentDtl> {\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface BalanceCalculationRepository extends JpaRepository<BalanceCalculation, Long> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface DishRepository extends JpaRepository<Dish, Long>, JpaSpecificationExecutor<Dish> {}",
"public interface UserRepository extends JpaRepository<User, Integer>, JpaSpecificationExecutor<User> {\n User findByLogin(String login);\n\n User findByPhoneNumber(String phoneNumber);\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface MGuildRoulettePrizeRepository extends JpaRepository<MGuildRoulettePrize, Long>, JpaSpecificationExecutor<MGuildRoulettePrize> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface OrderConsigneeRepository extends JpaRepository<OrderConsignee, Long>, JpaSpecificationExecutor<OrderConsignee> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface MedicalRepository extends JpaRepository<Medical, Long> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface PurchaseOrderRepository extends JpaRepository<PurchaseOrder, Long> {\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface EventTimesRepository extends JpaRepository<EventTimes, Long>, JpaSpecificationExecutor<EventTimes> {\n}",
"@Repository\npublic interface IOrderRepository extends JpaRepository<Order, Long> {\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface DisabilityTypeRepository extends JpaRepository<DisabilityType, Long>, JpaSpecificationExecutor<DisabilityType> {\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface InvoiceHistoryRepository extends JpaRepository<InvoiceHistory, Long> {\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface TipoEventoRepository extends JpaRepository<TipoEvento, Long>, JpaSpecificationExecutor<TipoEvento> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface NonConformanceTypeRepository extends JpaRepository<NonConformanceType, Long> {\n\n}",
"public interface MediaTypeRepository extends JpaRepository<MediaType, Long> {\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface DirectMessageRepository extends JpaRepository<DirectMessage, Long>, JpaSpecificationExecutor<DirectMessage> {\n\n}",
"@Repository\npublic interface WheelRepository extends JpaRepository<Wheel, Long>, JpaSpecificationExecutor<Wheel>{\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface ShipmentActivityRepository extends JpaRepository<ShipmentActivity, Long> {}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface EventLanguageRepository extends JpaRepository<EventLanguage, Long> {\n\t\n}",
"@Repository\npublic interface PersonRepository extends JpaRepository<Person, Long> {\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface ContractDocumentEntryRowRepository extends JpaRepository<ContractDocumentEntryRow, Long> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface EventLoggingRepository extends JpaRepository<EventLogging, Long> {\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface AllergyRepository extends JpaRepository<Allergy, Long> {\n\n}",
"@Repository\npublic interface ItemRepository extends JpaRepository<Item, Long>{\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface DefAnswerRepository extends JpaRepository<DefAnswer, Long> {\n\n}",
"public interface ItemRepository extends JpaRepository<Item, Integer>,\n JpaSpecificationExecutor<Item> {\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface ListingMailRepository extends JpaRepository<ListingMail, Long> {}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface DDbRepository extends JpaRepository<DDb, Long>, JpaSpecificationExecutor<DDb> {}",
"public interface SandboxRepository extends JpaRepository<SandboxEntity, Long> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface PointsRepository extends JpaRepository<Points,Long> {\n \n}",
"@Repository\npublic interface BaseUserRepository extends JpaRepository<BaseUser,String> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface CommunityMediaRepository extends JpaRepository<CommunityMedia, Long> {\n\n}",
"@Repository\r\npublic interface CustomerRepository extends JpaRepository<Customer, Long> {\r\n\r\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface LevelRepository extends JpaRepository<Level,Long> {\n \n}",
"public interface CarsRepository extends JpaRepository<Car, Long> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface VisiteurRepository extends JpaRepository<Visiteur, Long> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface PricingRepository extends JpaRepository<Pricing, Long> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface FormulaireConsentementRepository extends JpaRepository<FormulaireConsentement, Long> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface SysPostRepository extends JpaRepository<SysPost, Long> {\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface ProvaRepository extends JpaRepository<Prova, Long>, JpaSpecificationExecutor<Prova> {\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface BusinessAccountRepository extends JpaRepository<BusinessAccount, Long> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface WaPersonalAddressRepository extends JpaRepository<WaPersonalAddress, Long> {\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface HorarioDisponivelRepository extends JpaRepository<HorarioDisponivel, Long> {\n\n}",
"public interface AuditRepository extends PagingAndSortingRepository<Audit, Long>, JpaSpecificationExecutor<Audit> {\n}",
"public interface ISingleMenuRepository extends JpaRepository<SingleMenu, Long>, JpaSpecificationExecutor<SingleMenu> {\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface ReceiptItemRepository extends JpaRepository<ReceiptItem, Long> {\n\n}",
"@Repository\npublic interface BookRepository extends JpaRepository<Book, Long> {\n\n}",
"public interface UserRepository extends JpaRepository<User, Long>{\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface CarerClientRelationRepository extends JpaRepository<CarerClientRelation, Long>, JpaSpecificationExecutor<CarerClientRelation> {\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface LeLegalEntityTypesRepository extends JpaRepository<LeLegalEntityTypes, Long> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface CardysqRepository extends JpaRepository<Cardysq, Long>, JpaSpecificationExecutor<Cardysq> {}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface SchemeRepository extends JpaRepository<Scheme,Long> {\n\n List<Scheme> findSchemeByDriver(Driver driver);\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface PaymentFournisseurRepository extends JpaRepository<PaymentFournisseur, Long> {\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface OrganizationalUnitRepository extends JpaRepository<OrganizationalUnit, Long> {\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface ProjectHistoryRepository extends JpaRepository<ProjectHistory, Long> {\n\n}",
"public interface UserRepository extends JpaRepository<UserEntity, Long> {\n\n UserEntity findByUsername(String username);\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface ApplicantPersonalInfoRepository extends JpaRepository<ApplicantPersonalInfo, Long>, JpaSpecificationExecutor<ApplicantPersonalInfo> {\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface CommunicationRepository extends JpaRepository<Communication, Long>, JpaSpecificationExecutor<Communication> {\n}",
"public interface ProductPricingRepository extends JpaRepository<ProductPricing, Long> {\n}",
"@SuppressWarnings(\"unused\")\npublic interface EventTypeRepository extends JpaRepository<EventType,Long> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface HelpFullRepository extends JpaRepository<HelpFull, Long> {\n \n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface PettyCashRepository extends JpaRepository<PettyCash, Long> {\n\n}",
"public interface AssignmentRepository extends JpaRepository<Assignment, Integer>, JpaSpecificationExecutor<Assignment> {\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface SGOffTheTeeRepository extends JpaRepository<SGOffTheTee, Long> {\n\n}",
"public interface PresupuestosExpedRepository\nextends CrudRepository<PresupuestosExped, PresupuestosExpedPK>, PresupuestosExpedRepositoryCustom {\n\t/**\n\t * UMESCI-713 Find PresupuestosExped by the parameters\n\t *\n\t * @param numExp\n\t * @param tipMovValue\n\t * @param billStatusActive\n\t * @return\n\t */\n\tPresupuestosExped findPresupuestosExpedByIdNumExpAndTipMovAndEstado(String numExp, String tipMovValue,\n\t\t\tString billStatusActive);\n\n\n}",
"public interface CustomerRepository extends JpaRepository<Customer,Long> {\r\n public Customer findByNumberID(String numberID);\r\n public List<Customer> findByLastName(String lastName);\r\n public List<Customer> findByRegion(Region region);\r\n}",
"public interface AuditingRepository extends CrudRepository<AuditingEntity, Long>, JpaSpecificationExecutor<AuditingEntity> {\n}",
"public interface SpringDataJpaOperatorStatusRepository extends OperatorStatusRepository, Repository<OperatorStatus, Integer> {\n}",
"public interface UserRepository extends JpaRepository<User , Long>{\n\n User findByEmail(final String email);\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface SettingTestimonialRepository extends JpaRepository<SettingTestimonial, Long> {\n\n}",
"public interface QueryContactRepository extends JpaBaseRepository<QueryContact,Integer>\n{\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface GamerRepository extends JpaRepository<Gamer, Long> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface MCardPlayableAssetsRepository extends JpaRepository<MCardPlayableAssets, Long>, JpaSpecificationExecutor<MCardPlayableAssets> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface ServiceGroupRepository extends JpaRepository<ServiceGroup, Long>, JpaSpecificationExecutor<ServiceGroup> {\n\n}",
"@Repository\npublic interface EmployeeRepository extends JpaRepository<Employee, Integer> {\n}",
"public interface ContactRepository extends JpaRepository<Contact, Long> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface RespostaRepository extends JpaRepository<Resposta, Long> {\n}",
"public interface UserRepository extends JpaRepository<User, Long> {\n List<User> findByFirstName(String firstName);\n User findByUserId(String userId);\n User findByEmail(String email);\n User save(User user);\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface SocialContactRepository extends JpaRepository<SocialContact, Long> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface RiderRepository extends JpaRepository<Rider, Long> {\n\n}",
"public interface CompanyRepository extends JpaRepository<Company, String> {\n Company findByName(String name);\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface MyParameterRepository extends JpaRepository<MyParameter, Long> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface QuestionRepository extends JpaRepository<Question, Long> {\n\n}",
"public interface UserRepository extends JpaRepository<User, String> {\n User findByUsername(String username);\n}"
]
| [
"0.7723051",
"0.7663435",
"0.76127166",
"0.7567485",
"0.7551307",
"0.7546734",
"0.75288373",
"0.74666846",
"0.74663436",
"0.7459811",
"0.7458546",
"0.7447868",
"0.7436165",
"0.7433882",
"0.742965",
"0.7423049",
"0.7419182",
"0.7419091",
"0.7415033",
"0.7406766",
"0.7402544",
"0.73964417",
"0.73956263",
"0.739549",
"0.7394063",
"0.7386032",
"0.7385141",
"0.7384387",
"0.7380066",
"0.7378886",
"0.73741245",
"0.73726994",
"0.737221",
"0.7370049",
"0.7368126",
"0.7364288",
"0.73621213",
"0.735841",
"0.7357339",
"0.73561066",
"0.7351696",
"0.7351232",
"0.7349595",
"0.734796",
"0.73467803",
"0.7345536",
"0.73433936",
"0.7340105",
"0.73362905",
"0.7335995",
"0.7334576",
"0.7333051",
"0.7331995",
"0.732856",
"0.7328044",
"0.73263514",
"0.73249596",
"0.7324953",
"0.73245347",
"0.7322697",
"0.73194367",
"0.73174715",
"0.73167294",
"0.73154366",
"0.7314651",
"0.7313432",
"0.73102754",
"0.73101896",
"0.73095167",
"0.73086107",
"0.7306812",
"0.73061186",
"0.7301513",
"0.730053",
"0.7298257",
"0.72938854",
"0.7293441",
"0.7292873",
"0.729122",
"0.72878164",
"0.7286874",
"0.7286105",
"0.7285952",
"0.7281985",
"0.72766703",
"0.72765577",
"0.72765523",
"0.72748053",
"0.72731096",
"0.7272256",
"0.72712463",
"0.72695994",
"0.72687227",
"0.7268284",
"0.7268112",
"0.7267853",
"0.72662055",
"0.7263749",
"0.72631586",
"0.7261517",
"0.7260453"
]
| 0.0 | -1 |
Check path (without adding source prefix and with filename). Path example: src\main\java\com\samsungsds\Test.java | boolean haveToSkip(String path); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasSrcPath();",
"java.lang.String getSrcPath();",
"private static boolean isJava8File(Path path) {\n var name = Paths.name(path);\n return !path.startsWith(\".bach\") // ignore all files in `.bach` directory\n && name.endsWith(\".java\")\n && !name.equals(\"module-info.java\") // ignore module declaration compilation units\n && Files.isRegularFile(path);\n }",
"@Test\n\tpublic void test(){\n\t\tFile srcFile = new File(\"E:\\\\Workspaces\\\\MyPro\\\\ssh\\\\WebRoot\\\\products\\\\2\\\\男鞋\");\n//\t\tSystem.out.println(ss);\n\t\tthis.getAllJavaFilePaths(srcFile);\n\t}",
"@Test\n\tpublic void bookExists() throws Exception {\n\t\tString directory = System.getProperty(\"user.dir\");\n\t\tFile file = new File(directory + \"\\\\src\\\\main\\\\java\\\\com\\\\mylib\\\\library\\\\Book.java\");\n\t\tassertTrue(file.exists());\n\t}",
"public static void main(String[] args) {\n\t\tPath path = Paths.get(\"F:\\\\AccentureMayBatch\\\\JSTLProject\");\r\n\r\n\t\r\n\r\n\t\tSystem.out.format(\"toString: %s%n\", path.toString());\r\n\t\tSystem.out.format(\"getFileName: %s%n\", path.getFileName());\r\n\t\tSystem.out.format(\"getName(0): %s%n\", path.getName(0));\r\n\t\tSystem.out.format(\"getNameCount: %d%n\", path.getNameCount());\r\n\t\tSystem.out.format(\"subpath(0,2): %s%n\", path.subpath(0,2));\r\n\t\tSystem.out.format(\"getParent: %s%n\", path.getParent());\r\n\t\tSystem.out.format(\"getRoot: %s%n\", path.getRoot());\r\n\t\t\r\n\t\ttry {\r\n\t\t\tFiles.list(new File(\".\").toPath())\r\n\t\t\t .forEach(System.out::println);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tFiles.walk(new File(\".\").toPath())\r\n\t\t .filter(p -> !p.getFileName()\r\n\t\t .toString().startsWith(\".\"))\r\n\t\t .forEach(System.out::println);\r\n\t\t\t\r\n\t\t\tFiles.lines(new File(\"./src/com/polaris/utility/PathDemo.java\").toPath())\r\n\t\t .map(s -> s.trim())\r\n\t\t .filter(s -> !s.isEmpty())\r\n\t\t .forEach(System.out::println);\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//finding path and sub path into string\r\n\t\t Path start = Paths.get(\".\");\r\n\t\t int maxDepth = 5;\r\n\t\t try (Stream<Path> stream = Files.find(start, maxDepth, (path2, attr) -> String.valueOf(path2).endsWith(\".java\"))) \r\n\t\t {\r\n\t\t String joined = stream\r\n\t\t .sorted()\r\n\t\t .map(String::valueOf)\r\n\t\t .collect(Collectors.joining(\"; \"));\r\n\t\t System.out.println(\"Found: \" + joined);\r\n\t\t } catch (IOException 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\t\r\n\t\tPath source = Paths.get(\"./src/com/polaris/utility/PathDemo.java\");\r\n\t\tPath target = Paths.get(\"F:/yatrabakup\");\r\n\t\t\r\n/*\r\n\t\ttry {\r\n\t\t // Files.copy(source, target);\r\n\t\t} catch(FileAlreadyExistsException fae) {\r\n\t\t fae.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t // something else went wrong\r\n\t\t e.printStackTrace();\r\n\t\t}\r\n\t\t*/\r\n\t\ttry (BufferedReader reader = Files.newBufferedReader(Paths.get(\"f:\\\\yatrabakup\\\\EmployeeData.csv\"))) {\r\n\t\t reader.lines().map(String::toLowerCase).forEach(System.out::println);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public static void main(String[] args) throws IOException {\n\t\tPath testFilePath = Paths.get(\"/home/ilmir/Dropbox/Aliya_Ilmir/2дебила\");\n\t\tSystem.out.println(\"Path: \"+testFilePath);\n\t\tline();\n\n\t\t// retrieve basic information about path\n\t\tSystem.out.println(\"Printing file information: \");\n\t\tSystem.out.println(\"\\t getFileName(): \\t\" + testFilePath.getFileName());\n\t\tSystem.out.println(\"\\t getRoot(): \\t\\t\" + testFilePath.getRoot());\n\t\tSystem.out.println(\"\\t getParent(): \\t\\t\" + testFilePath.getParent());\n\t\tline();\n\n\t\t// print path elements\n\t\tSystem.out.println(\"Printing elements of the path: \");\n\t\tfor(Path element : testFilePath) {\n\t\t\tSystem.out.println(\"\\t path element: \" + element);\n\t\t}\n\t\tline();\n\n\t\t//get a path object with relative path\n\t\tPath path = Paths.get(\"./src\");\n\t\tSystem.out.println(\"Path: \"+path);\n\t\tSystem.out.println(\"1) getFileName(): \" + path.getFileName());\n\t\tSystem.out.println(\"2) toUri(): \" + path.toUri());\n\t\tSystem.out.println(\"3) toAbsolutePath(): \" + path.toAbsolutePath());\n\t\tSystem.out.println(\"4) normalize(): \" + path.normalize());\n\n\t\t// get another path object with normalized relative path\n\t\tPath testPathNormalized = Paths.get(path.normalize().toString());\n\t\tSystem.out.println(\"Path normalized: \"+testPathNormalized);\n\t\tSystem.out.println(\"5) normalized absolute path is: \" +\n\t\t\t\ttestPathNormalized.toAbsolutePath());\n\t\tSystem.out.println(\"6) normalized real path is: \" +\n\t\t\t\tpath.toRealPath (LinkOption.NOFOLLOW_LINKS));\n\n\t\tline();\n\n\t\tPath dir = Paths.get(\"/home/ilmir/Dropbox/Aliya_Ilmir\");\n\t\tPath resolvedPath = dir.resolve(\"2дебила\");\n\t\tSystem.out.println(\"Resolved path: \"+resolvedPath);\n\t}",
"private static void checkPath(String path) {\n Objects.requireNonNull(path);\n Path file = new File(path).toPath();\n boolean exists = Files.exists(file); // Check if the file exists\n boolean isDirectory = Files.isDirectory(file); // Check if it's a directory\n if (!exists || !isDirectory)\n throw new IllegalArgumentException(path + \" must be exist and a directory\");\n }",
"private String checkPath(String p, Integer line, Integer col, String msg, String source, Integer errorCode)\n\t{\n\t\tboolean result = !this.source.getNameForReporting().equals(p) &&\n\t\t\t\t\t\t !this.source.isIncludedFile(p);\n\t\t\t\t\t\t // !this.source.getCompilationUnit().getAssets().exists(p);\n\t\t\n\t\tif (result)\n\t\t{\n\t\t\treturn (new StringBuilder(\" [\")\n\t\t\t\t.append(new GeneratedCodeMarker().getMessage())).append(\": \")\n\t\t\t\t.append(new PathInfo(p).getMessage()).append(\", \")\n\t\t\t\t.append(new LineInfo(line == null ? 0 : line.intValue()).getMessage()).append(\", \")\n\t\t\t\t.append(new ColumnInfo(col == null ? 0 : col.intValue()).getMessage()).append(\"]\")\n\t\t\t\t.toString();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}",
"static void ex4() {\n\t\tSystem.out.println(\"subPath\");\n\t\t/*\n\t\t * this is a path within a path\n\t\t */\n\t\tString parent=\"C:/Users/noelf/OneDrive/JavaProgrammer2019-20/WorkSpace2/F9.2InteractingWithPathAndFiles\";\n\t\tString child=\"src/com/android/Examples.java\";\n\t\tPath fullPath=Paths.get(parent,child);\n\t\tSystem.out.println(fullPath);\n\t\tSystem.out.println(\"is this an absolute path \"+fullPath.isAbsolute());\n\t\t/*C:\\Users\\noelf\\OneDrive\\JavaProgrammer2019-20\\WorkSpace2\\F9.2InteractingWithPathAndFiles\n\t\t\\src\\com\\android\\Examples.java\n\t\t*/\n\t\t//this path has 10 elements, 9 folders and one file\n\t\t//the elements use array numbering, so these elements go from 0 to 9\n\t\tSystem.out.println(\"there are \"+fullPath.getNameCount()+\" elements in the path\");\n\t\t/*\n\t\t * subpath returns any relative subpath within the abseloute path\n\t\t * there are 10 elements in this path\n\t\t * so this path goes from index postion 0, up to index positiion 5, but DOES NOT include\n\t\t * index position 5, operates exact same way as the subString() method of the String\n\t\t * this creates the relative path\n\t\t * Users\\noelf\\OneDrive\\JavaProgrammer2019-20\\WorkSpace2\n\t\t * subpath returns a relative path\n\t\t */\n\t\tSystem.out.println(\"subpath from 0 to 5 but not including 5 \"+fullPath.subpath(0, 5));\n\t\t/*\n\t\t * this starts at index position 3, which is the folder \"JavaProgrammer2019-20\"\n\t\t * and up to index position 7, but not including position 7, which will be the folder \"src\"\n\t\t */\n\t\tPath relPath=fullPath.subpath(3, 7);\n\t\t//prints off\n\t\t/*\n\t\t * JavaProgrammer2019-20\\->index postion 3\n\t\t * WorkSpace2\\ -> index position 4\n\t\t * F9.2InteractingWithPathAndFiles -> index position 5\n\t\t * \\src -> index position 6\n\t\t * index position 7 is NOT included\n\t\t */\n\t\tSystem.out.println(relPath);\n\t\tSystem.out.println(relPath.isAbsolute());//false as it's a relative path\n\t\t/*\n\t\t * this will print\n\t\t * C:\\Users\\noelf\\OneDrive\\JavaProgrammer2019-20\\WorkSpace2\\F9.2InteractingWithPathAndFiles\\\n\t\t * JavaProgrammer2019-20\\WorkSpace2\\F9.2InteractingWithPathAndFiles\\src\n\t\t */\n\t\tSystem.out.println(relPath.toAbsolutePath());\n\t\ttry {\n\t\t\t/*\n\t\t\t * if you attempt to access an element in a path by subpath that does not exist\n\t\t\t * you will get an IllegalArguementException\n\t\t\t */\n\t\t\tSystem.out.println(\"subpath from 0 to 10 \"+fullPath.subpath(0, 10));//this wil compile, no exception\n\t\t\t//this will give us an illegalArugmenmt exception as this is out of bounds as only\n\t\t\t//10 elements in our path, so only goes UP TO 10, but numbering is 0 t0 9\n\t\t//\tSystem.out.println(\"subpath from 0 to 11 \"+fullPath.subpath(0, 11));\n\t\t\t/*\n\t\t\t * can't have an empty path or subpath, this is a empty path, so this will throw an\n\t\t\t * IllegalArguement exception as well\n\t\t\t */\n\t\t\tSystem.out.println(\"subpath from 2 to 2 \"+fullPath.subpath(2, 2));\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"exception is \"+e);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}",
"@Test\n public void AppFileError() {\n try{\n App.main(new String[]{TEST_PATH + \"asdfghjkl-nice.dot\",\"1\"});\n }catch(RuntimeException re){\n assertEquals(re.getMessage(),\"Input file does not exist\");\n }\n }",
"@Test\n\tpublic void validFileTest() {\n\t\t// Test valid file with full file path\n\t\tworkDir = new File(workingDir);\n\t\texpected = validFile.getAbsolutePath();\n\t\tactual = Helper.isValidFile(workDir, validFile.getAbsolutePath());\n\t\tassertEquals(expected, actual.getAbsolutePath());\n\n\t\t// Test valid file with only file name\n\t\texpected = workDir.getAbsolutePath() + pathSep + fileName; // Bugs: OS\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// compatible \\\\\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// changed to /\n\t\tactual = Helper.isValidFile(workDir, fileName);\n\t\tassertEquals(expected, actual.getAbsolutePath());\n\t}",
"boolean hasSourceFile();",
"public void doCheckProjectPath(StaplerRequest req, StaplerResponse rsp, @QueryParameter final String value) throws IOException, ServletException {\n new FormFieldValidator(req,rsp,null) {\n /**\n * The real check goes here. In the end, depending on which\n * method you call, the browser shows text differently.\n */\n protected void check() throws IOException, ServletException {\n if(value.length()==0)\n error(\"please set the path to the Rhapsody Project !\");\n else\n if(value.length()<4)\n warning(\"isn't the path too short?\");\n else {\n \tFile file = new File(value);\n \tif (file.isDirectory()) {\n \t\terror(\"you entered a directory please select the *.rpy file !\");\n \t} else \n \t\t//TODO add more checks\n \t\tok();\n }\n\n }\n }.process();\n }",
"public void testGetFileForLocation() {\n \t\tIWorkspaceRoot root = getWorkspace().getRoot();\n \t\tassertTrue(\"1.0\", root.getFileForLocation(root.getLocation()) == null);\n \t}",
"private boolean isSourceDirectory(Project project, String sourceDirectory) {\r\n\t\tboolean result=false;\r\n\t\tif(sourceDirectory!=null&&(!sourceDirectory.equals(\"gen\"))){\r\n\t\t\tresult=true;\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public abstract boolean isPath();",
"@Test\n public void filePathTest() {\n // TODO: test filePath\n }",
"@Test\n void findSourceJar() {\n Class<?> klass = org.apache.commons.io.FileUtils.class;\n var codeSource = klass.getProtectionDomain().getCodeSource();\n if (codeSource != null) {\n System.out.println(codeSource.getLocation());\n }\n }",
"public static void checkFile(Path path) {\n\n if (!path.isAbsolute()) {\n System.out.format(\"%s must be an absolute path to a file.\", path);\n System.exit(0);\n } else if (!Files.exists(path)) {\n System.out.format(\"%s does not exist.\", path);\n System.exit(0);\n }\n\n // Verify that the path references a file\n try {\n BasicFileAttributes attr = Files.readAttributes(path, BasicFileAttributes.class);\n if (!attr.isRegularFile()) {\n System.out.format(\"%s is not a file.\", path);\n System.exit(0);\n }\n } catch (IOException e) {\n System.err.println(\"I/O error: \" + e);\n e.printStackTrace();\n System.exit(1);\n }\n }",
"@Test\n\tpublic void testIsTest() {\n\t\t// Setup\n\t\tString added = \"6\";\n\t\tString removed = \"7\";\n\t\tString file = \"test/dank.java\";\n\t\tLine line = new Line(added, removed, file);\n\t\tList<String> types = new ArrayList<String>();\n\t\ttypes.add(\"java\");\n\n\t\t// Exercise\n\t\tboolean src = line.isSource(types);\n\n\t\t// Verify\n\t\tassertFalse(src);\n\t}",
"void path(String path);",
"void path(String path);",
"private void check() {\n Path pathroot = getPath();\n // check the path is file or directory\n checkFileOrDirectory(pathroot);\n }",
"public static void main(String[] args) {\n CheckPath path = new CheckPath();\n // checking the path\n path.check();\n }",
"@SuppressWarnings(\"unused\")\n private String checkPathFull(String p, Integer line, Integer col, String msg, String source, Integer errorCode)\n\t{\n\t\tboolean result = !this.source.getNameForReporting().equals(p) &&\n\t\t\t\t\t\t !this.source.isIncludedFile(p);\n\t\t\t\t\t\t // !this.source.getCompilationUnit().getAssets().exists(p);\n\n\t\tif (result)\n\t\t{\n\t\t\tStringWriter misrouteInfo = new StringWriter();\n\t\t\tPrintWriter pw = new PrintWriter(misrouteInfo, true);\n\t\t\tpw.println(new ErrMsgBug().getMessage());\n\t\t\tpw.println(new PathInfo(p).getMessage());\n\t\t\tif (line != null)\n\t\t\t{\n\t\t\t\tpw.println(new LineInfo(line.intValue()).getMessage());\n\t\t\t}\n\t\t\tif (col != null)\n\t\t\t{\n\t\t\t\tpw.println(new ColumnInfo(col.intValue()).getMessage());\n\t\t\t}\n\t\t\tif (msg != null)\n\t\t\t{\n\t\t\t\tpw.println(new MessageInfo(msg).getMessage());\n\t\t\t}\n\t\t\tif (source != null)\n\t\t\t{\n\t\t\t\tpw.println(new SourceInfo(source).getMessage());\n\t\t\t}\n\t\t\tif (errorCode != null)\n\t\t\t{\n\t\t\t\tpw.println(new ErrorCodeInfo(errorCode.intValue()).getMessage());\n\t\t\t}\n\t\t\tnew Exception(new StackTraceInfo().getMessage()).printStackTrace(pw);\n\t\t\treturn misrouteInfo.toString();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}",
"private void validate(Path path) {\n }",
"boolean haveToSkip(String path, boolean addSrcPrefix);",
"static boolean sourceInProjectDirectories(LocationContext context) {\n return context.getImportRoots().containsWorkspacePath(context.workspacePath);\n }",
"public void source(String path) throws Exception;",
"public static boolean isValid(String src)\n {\n if (!src.startsWith(SEPARATOR)) {\n return false;\n }\n\n // Check for \"..\" \".\" \":\" \"/\"\n StringTokenizer tokens = new StringTokenizer(src, SEPARATOR);\n while(tokens.hasMoreTokens()) {\n String element = tokens.nextToken();\n if (element.equals(\"..\") ||\n element.equals(\".\") ||\n (element.indexOf(\":\") >= 0) ||\n (element.indexOf(\"/\") >= 0)) {\n return false;\n }\n }\n \n return true; \n }",
"private boolean allSourcePathsExist(List<String> sourcePath) {\n\t\tfor (Iterator<String> ii = sourcePath.iterator(); ii.hasNext();) {\n\t\t\tString dirName = ii.next();\n\t\t\tFile dir = new File(getDirectory().getAbsolutePath() + \"/\"\n\t\t\t\t\t+ dirName);\n\t\t\tif (!dir.exists())\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"static String checkJavaScriptFile(String path) throws IOException {\n\t\tProcess process = new ProcessBuilder(\"lib/jsl/jsl.exe\", \"-process\",\n\t\t\t\tpath).start();\n\n\t\t// get output from JSL\n\t\tString title = \"Checking JavaScriptFile: \" + path + \"\\n\";\n\t\tBufferedReader input = new BufferedReader(new InputStreamReader(\n\t\t\t\tprocess.getInputStream()));\n\n\t\tString lines = \"\";\n\t\tString line;\n\t\twhile ((line = input.readLine()) != null) {\n\t\t\tlines += line + \"\\n\";\n\t\t}\n\t\tinput.close();\n\n\t\treturn title + lines;\n\t}",
"private static void findPath()\r\n {\r\n String temp_path = System.getProperty(\"user.dir\");\r\n char last = temp_path.charAt(temp_path.length() - 1);\r\n if(last == 'g')\r\n {\r\n path = \".\";\r\n }\r\n else\r\n {\r\n path = \"./bag\";\r\n }\r\n \r\n }",
"Path getHasPath();",
"@Test\n\tpublic void testIsTestCaseSensitive() {\n\t\t// Setup\n\t\tString added = \"6\";\n\t\tString removed = \"7\";\n\t\tString file = \"Test/dank.java\";\n\t\tLine line = new Line(added, removed, file);\n\t\tList<String> types = new ArrayList<String>();\n\t\ttypes.add(\"java\");\n\n\t\t// Exercise\n\t\tboolean src = line.isSource(types);\n\n\t\t// Verify\n\t\tassertFalse(src);\n\t}",
"private boolean isValidPath(String path) {\n File file = new File(path);\n return file.exists() && file.isDirectory();\n }",
"@Test\n public void testFileInDirectoryFileDoesNotExists() {\n\n assertFalse(parent.fileInDirectory(\"file1\"));\n }",
"boolean hasFilePath();",
"private boolean validateFile(String path) {\n return !path.equals(AppStrings.NO_FILE_PATH);\n }",
"protected void check() throws IOException, ServletException {\n if(value.length()==0)\n error(\"please set the path to the Rhapsody Project !\");\n else\n if(value.length()<4)\n warning(\"isn't the path too short?\");\n else {\n \tFile file = new File(value);\n \tif (file.isDirectory()) {\n \t\terror(\"you entered a directory please select the *.rpy file !\");\n \t} else \n \t\t//TODO add more checks\n \t\tok();\n }\n\n }",
"public static void main(String[] args) { String dirname = \"/home/diego/IdeaProjects/JAVAStuff/src/tmp/dirTest.txt\";\n// File d = new File(dirname);\n// d.mkdirs();\n//\n File file = null;\n String[] paths;\n\n try {\n file = new File(\"/home/diego/IdeaProjects/JAVAStuff/src\");\n paths = file.list();\n\n for(String s: paths) {\n System.out.println(s);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n }",
"@Test\r\n\tpublic void testRelativePath() {\r\n\t\t// Expected return from Cd\r\n\t\texpectedCd = null;\r\n\t\t// Expected current working directory\r\n\t\texpectedPath = \"/users\";\r\n\t\t// Actual return from Cd\r\n\t\tactualCd = cd.run(fs, \"users\".split(\" \"), \"cd users \", false);\r\n\t\t// Returns the current working directory\r\n\t\tactualPath = fs.getCurrentPath();\r\n\t\t// Checks if the values are equal or not\r\n\t\tassertTrue(actualCd == expectedCd && actualPath.equals(expectedPath));\r\n\t}",
"String getPath();",
"String getPath();",
"String getPath();",
"String getPath();",
"String getPath();",
"java.lang.String getSourceFile();",
"SourceFilePath getFilePath();",
"@Test\n\tpublic void executeInvalidFileForSlash() {\n\t\tassertEquals(null, Helper.isValidFile(\n\t\t\t\tnew File(System.getProperty(\"user.dir\")), \"\\\\/\"));\n\t\tassertEquals(null, Helper.isValidFile(\n\t\t\t\tnew File(System.getProperty(\"user.dir\")), \"\\\\\"));\n\t\tassertEquals(null, Helper.isValidFile(\n\t\t\t\tnew File(System.getProperty(\"user.dir\")), \"//\"));\n\t\tassertEquals(null, Helper.isValidFile(\n\t\t\t\tnew File(System.getProperty(\"user.dir\")), \"/\"));\n\t}",
"private boolean isOnSourcePath(String sourceFile, List<String> sourcePath) {\n\t\tfor (Iterator<String> j = sourcePath.iterator(); j.hasNext();) {\n\t\t\tString srcPathEntry = j.next();\n\t\t\tif (sourceFile.startsWith(srcPathEntry))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private boolean sourceExists(File fileToCheck) {\n\t\tif (fileToCheck.exists()) {\n\t\t\tSystem.out.println(\"Source file \"+fileToCheck.getName()+ \" exists.\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\tSystem.out.println(\"Source file \"+fileToCheck.getName()+ \" DOESN'T exist.\");\n\t\t\treturn false;\n\t\t}\n\t}",
"public String getClassPath();",
"private void checkFileOrDirectory(Path pathroot) {\n if (Files.notExists(pathroot)) { // Checking path is valid path or the path is exist\n System.out.println(\"Not a valid Path \" + pathroot);\n } else if (Files.isDirectory(pathroot)) {// checking path contains file if contain file display message\n System.out.println(\"It is Directory\");\n } else {\n System.out.println(\"This is File\"); // printing the path is directory\n }\n }",
"@Test\n\tpublic void testIsSrcNoTestFile() {\n\t\t// Setup\n\t\tString added = \"6\";\n\t\tString removed = \"4\";\n\t\tString file = \"test/dank.tt\";\n\t\tLine line = new Line(added, removed, file);\n\t\tList<String> types = new ArrayList<String>();\n\t\ttypes.add(\"tt\");\n\n\t\t// Exercise\n\t\tboolean src = line.isSource(types);\n\n\t\t// Verify\n\t\tassertFalse(src);\n\t}",
"public void testGetClassPath() {\n assertEquals(mb.getClassPath(), System.getProperty(\"java.class.path\"));\n }",
"boolean haveToSkip(String path, boolean addSrcPrefix, boolean withoutFilename);",
"public void checkFile() {\n\t\tFile file = new File(\"src/Project11Problem1Alternative/names.txt\");\n\t\tSystem.out.println(file.exists() ? \"Exists!\" : \"Doesn't exist!\");\n\t\tSystem.out.println(file.canRead() ? \"Can read!\" : \"Can't read!\");\n\t\tSystem.out.println(file.canWrite() ? \"Can write!\" : \"Can't write!\");\n\t\tSystem.out.println(\"Name: \" + file.getName());\n\t\tSystem.out.println(\"Path: \" + file.getPath());\n\t\tSystem.out.println(\"Size: \" + file.length() + \" bytes\");\n\t}",
"public String getPath () throws java.io.IOException, com.linar.jintegra.AutomationException;",
"private void validateSource(SourcePointer.FileSource src) {\n File f = src.path.toFile();\n if (!f.exists() || !f.canRead()) {\n throw new SolrException(\n ErrorCode.BAD_REQUEST,\n String.format(\n Locale.US, \"File at %s either does not exist or cannot be read.\", src.path));\n }\n }",
"static boolean m1(Path path) {\n\t\tif (Files.exists(path))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"@Test\n public void shouldListActivatorsInSourceCode() throws Exception {\n initializeOSGiProjectWithBundlesInSourceCode();\n resetOutput();\n getShell().execute(\"osgi activators\");\n String mod1Expected = \"/main/src/module1/br/ufrgs/rmpestano/activator/Activator.java\";\n String mod2Expected = \"/main/src/module2/br/ufrgs/rmpestano/activator/Activator.java\";\n String mod3Expected = \"/main/src/module3/src/br/ufrgs/rmpestano/activator/Activator.java\";\n if(OSUtils.isWindows()){\n mod1Expected = mod1Expected.replaceAll(\"/\", File.separator + File.separator);\n mod2Expected = mod2Expected.replaceAll(\"/\", File.separator + File.separator);\n mod3Expected = mod3Expected.replaceAll(\"/\", File.separator + File.separator);\n }\n getOutput().contains(mod1Expected);\n getOutput().contains(mod2Expected);\n getOutput().contains(mod3Expected);\n\n\n }",
"private void assertPathCorrect(String expectedFileNamePrefix, File expectedDirectory, File actualFile)\r\n {\r\n File expectedPath = new File(expectedDirectory, expectedFileNamePrefix);\r\n if (!actualFile.getAbsolutePath().startsWith(expectedPath.getAbsolutePath()))\r\n {\r\n String failureMsg = \"File path \" + actualFile.getAbsolutePath() +\r\n \" does not start as expected: \" + expectedPath.getAbsolutePath();\r\n Assert.fail(failureMsg);\r\n }\r\n }",
"protected abstract String getResourcePath();",
"@Test\n\tpublic void testisValidNoNotAJavaFile() {\n\t\t// Setup\n\t\tString added = \"3\";\n\t\tString removed = \"5\";\n\t\tLine line = new Line(added, removed, \"dank.tt\");\n\t\tList<String> types = new ArrayList<String>();\n\t\ttypes.add(\"java\");\n\n\t\t// Exercise\n\t\tboolean valid = line.isValid(types);\n\n\t\t// Verify\n\t\tassertFalse(valid);\n\t}",
"public static boolean isJavaSourceFile(String f) {\n\t\tString ext = FilenameUtils.getExtension(f);\n\t\tif (ext.endsWith(\"java\")) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean accept(java.io.File pathName, String fileName)\r\n {\r\n\r\n boolean valid = false;\r\n java.io.File testFile = new java.io.File(pathName, fileName);\r\n\r\n valid = (testFile.isFile() && fileName != null && fileName.startsWith(name));\r\n\r\n return valid;\r\n\r\n }",
"public String getResourcePath();",
"@Override\n public boolean accept(Path path) {\n return path.getName().startsWith(partFilePrefix);\n }",
"public String resolvePath();",
"String getFilepath();",
"private void testPathRelative(String rootdir, String basefilename, String filename, String filename_check) {\r\n\t\tString result;\r\n\t\tString base_filename = rootdir + File.separator + basefilename;\r\n\t\tString base_dir = FileUtils.baseDir(base_filename);\r\n\t\tString file_name = rootdir + File.separator + filename;\r\n\t\t\r\n\t\tresult = FileUtils.pathRelativeFile(base_filename, file_name).replaceAll(\"\\\\\\\\\", \"/\");\r\n\t\tassertEquals(result, filename_check);\r\n\t\t\r\n\t\tresult = FileUtils.pathRelative(base_dir, file_name).replaceAll(\"\\\\\\\\\", \"/\");\r\n\t\tassertEquals(result, filename_check);\r\n\t}",
"public void testProjectRootFolderOfTestProjectType() throws Exception {\n TestArtifactSearchScopes scopes = loadMultiProjectAndGetTestScopesForModule(\"module4\");\n\n VirtualFile module4Root = createFileIfNotExists(\"module4\");\n VirtualFile module4Source = createFileIfNotExists(\"module4/src/main/java/Test.java\");\n\n assertFalse(scopes.isUnitTestSource(module4Root));\n assertFalse(scopes.isUnitTestSource(module4Source));\n\n assertTrue(scopes.isAndroidTestSource(module4Root));\n assertTrue(scopes.isAndroidTestSource(module4Source));\n }",
"@Override\r\n\tpublic boolean isFile(String path) {\n\t\treturn false;\r\n\t}",
"private static void validPaths(String args[]){\n if(args.length!=2){\r\n System.out.println(\"First argument required is path, Second argument required is output directory\");\r\n System.exit(-1);\r\n }\r\n File json = new File(args[0]);\r\n File csv = new File (args[1]);\r\n if(json.exists() == false || csv.exists() == false){\r\n if(json.exists()==false){\r\n System.out.println(\"Path: \" + args[0] + \" does not exist\");\r\n }\r\n if(csv.exists()==false){\r\n System.out.println(\"Path: \" + args[1] + \" does not exist\");\r\n }\r\n System.exit(-1);\r\n }\r\n }",
"public void testPathWithSpace () throws Throwable {\n final Path base = selected.resolve(getName());\n try {\n Files.createDirectory(base);\n\n final Path file1 = base.resolve(\" file1\");\n Files.createFile(file1);\n assertTrue(Files.isRegularFile(file1));\n\n final Path file2 = base.resolve(\"file2 \");\n Files.createFile(file2);\n assertTrue(Files.isRegularFile(file2));\n\n final Path file3 = base.resolve(\" file3 \");\n Files.createFile(file3);\n assertTrue(Files.isRegularFile(file3));\n }\n finally {\n Files.walkFileTree(base, Utils.DELETE_FILE_VISITOR);\n }\n }",
"private boolean isJavaFile(File file){\n\t\tif(file.isFile())\n\t\t\treturn file.getName().toLowerCase().endsWith(\".java\");\n\t\treturn false;\n\t}",
"private File getFile(String path, String name)\r\n {\r\n File file = null;\r\n boolean found = false;\r\n String ext = \"\";\r\n\r\n for (int i = 0; i < name.length(); i++)\r\n ext += \"\" + ( (name.charAt(i) == '.') ? '\\\\' : name.charAt(i));\r\n\r\n while(ext.length() > 0 && !found)\r\n {\r\n file = new File(path + \"\\\\\" + ext + \".java\");\r\n found = file != null && file.exists() && file.isFile();\r\n ext = ext.substring(0, Math.max(0, ext.lastIndexOf('\\\\')));\r\n }\r\n\r\n return (found)?file:null;\r\n }",
"public static void main(String[] args) {\n File file = new File(\".\", \"subdir\" + File.separator + \"hello.txt\");\r\n System.out.println(\"Does it exist? \" + file.exists());\r\n System.out.println(\"Can it be read? \" + file.canRead());\r\n System.out.println(\"Can it be written? \" + file.canWrite());\r\n System.out.println(\"Is it a directory? \" + file.isDirectory());\r\n System.out.println(\"Is it a file? \" + file.isFile());\r\n //Prints false\r\n System.out.println(\"Is it absolute? \" + file.isAbsolute());\r\n System.out.println(\"Is it hidden? \" + file.isHidden());\r\n\r\n //Shows redundant .'s in the path.\r\n System.out.println(\"What is its absolute path? \" +\r\n file.getAbsolutePath());\r\n\r\n //Like absolute path without redundant .'s.\r\n try {\r\n System.out.println(\"What is its canonical path? \" +\r\n file.getCanonicalPath());\r\n }\r\n catch (IOException ex) { }\r\n\r\n System.out.println(\"What is its name? \" + file.getName());\r\n //Prints the path as defined during instantiation of the File class.\r\n System.out.println(\"What is its path? \" + file.getPath());\r\n\r\n //lastModified() returns a long value representing the date and time\r\n // when the file was last modified. The value is in milliseconds\r\n // measured from 1/1/1970 to last modified date/time.\r\n System.out.println(\"When was it last modified? \" +\r\n new Date(file.lastModified()));\r\n\r\n // Character representation of the path-list separator that's used\r\n // when multiple file paths are given in said path-list.\r\n System.out.println(\"What is the path separator? \" +\r\n File.pathSeparatorChar);\r\n\r\n // Character representation of the separator used in a given\r\n // file path.\r\n System.out.println(\"What is the name separator? \" +\r\n File.separatorChar);\r\n }",
"public boolean openSource(String link) {\n final String str = \" PC=\";\n final int pcPos = link.indexOf(str);\n String classAndMethods = link.substring(0, pcPos);\n int dotIndex = classAndMethods.lastIndexOf('.');\n final String className = classAndMethods.substring(0, dotIndex);\n final String methodName = classAndMethods.substring(dotIndex + 1);\n int pc;\n try {\n pc = Integer.parseInt(link.substring(pcPos + str.length()));\n } catch (NumberFormatException e) {\n return false;\n }\n String[] ps = _classPath.split(java.io.File.pathSeparator);\n ArrayList<String> list = new ArrayList<String>();\n for (String s : ps) {\n list.add(s);\n }\n ps = System.getProperty(\"sun.boot.class.path\").split(java.io.File.pathSeparator);\n for (String s : ps) {\n list.add(s);\n }\n ClassFileTools.ClassLocation cl = null;\n try {\n cl = ClassFileTools.findClassFile(className, list);\n if (cl == null) {\n return false;\n }\n SourceFileAttributeInfo sf = (SourceFileAttributeInfo) cl.getClassFile().getAttribute(SourceFileAttributeInfo.getAttributeName());\n String fileName = sf.getSourceFileName().toString();\n String packageName = cl.getClassFile().getThisClassName();\n dotIndex = packageName.lastIndexOf('.');\n if (dotIndex >= 0) {\n packageName = packageName.substring(0, dotIndex).replace('.', File.separatorChar);\n fileName = packageName + File.separatorChar + fileName;\n } else {\n packageName = \"\";\n }\n String[] paths = _sourcePath.split(File.pathSeparator);\n File sourceFile = null;\n for (String s : paths) {\n File f = new File(s, fileName);\n if (f.exists()) {\n sourceFile = f;\n break;\n }\n }\n if (sourceFile == null) {\n return false;\n }\n int lineNo = -1;\n for (MethodInfo mi : cl.getClassFile().getMethods()) {\n if ((mi.getName().toString() + mi.getDescriptor().toString()).equals(methodName)) {\n for (AAttributeInfo ai : mi.getCodeAttributeInfo().getAttributes()) {\n if (ai.getName().toString().equals(LineNumberTableAttributeInfo.getAttributeName())) {\n LineNumberTableAttributeInfo lntai = (LineNumberTableAttributeInfo) ai;\n LineNumberTableAttributeInfo.LineNumberRecord[] lns = lntai.getLineNumbers();\n for (LineNumberTableAttributeInfo.LineNumberRecord l : lns) {\n if (l.startPC >= pc) {\n lineNo = l.lineNo;\n break;\n }\n }\n }\n if (lineNo >= 0) {\n break;\n }\n }\n }\n if (lineNo >= 0) {\n break;\n }\n }\n if (lineNo == -1) {\n return false;\n }\n try {\n Process p = ExecJVM.runJVM(\"edu.rice.cs.drjava.DrJava\", new String[] { sourceFile.toString() + File.pathSeparator + lineNo }, _drJavaJarFile.getAbsolutePath() + File.pathSeparator + System.getProperty(\"java.class.path\"), new String[] {}, new File(\".\"));\n return (p != null);\n } catch (IOException ioe) {\n return false;\n }\n } finally {\n try {\n if (cl != null) {\n cl.close();\n }\n } catch (IOException e) {\n return false;\n }\n }\n }",
"@Test\n public void testGetFileName() {\n System.out.println(\"getFileName\");\n String file = \"adriano.pdb\";\n String expResult = \"adriano\";\n String result = Util.getFileName(file);\n assertEquals(expResult, result);\n }",
"public void test() {\n\t\tFile file = new File(\"/home/students/\");\r\n\t\t\r\n\t\tString[] list = file.list(new FilenameFilter() {\r\n\t\t\tpublic boolean accept(File dir, String name) {\r\n\t\t\t\tif (name.toLowerCase().endsWith(\".py\")) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tfor (String f : list) {\r\n\t\t\tSystem.out.println(f);\r\n\t\t}\r\n\t}",
"protected String setPathToResourcesIfNotProvided(String[] args) {\n if (args.length == 0) {\n args = new String[1];\n args[0] = \"./src/main/resources/Code Test\";\n }\n return args[0];\n }",
"public static void searchFile(String path){\n try {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Enter the File Name You need to Find:\");\n String name = scanner.next();\n File file = new File(path + \"/\" + name);\n if (file.isFile()) {\n file.getName();\n System.out.println(\"File Exists\");\n }\n else{\n System.out.println(\"File Not Found\");\n\n }\n\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }",
"@Test\n public void testRelativePathInSubdirectory() {\n workspace.createFile(new WorkspacePath(\"java/com/google/BUILD\"));\n BuildFile referencedFile =\n createBuildFile(\n new WorkspacePath(\"java/com/google/nonPackageSubdirectory/skylark.bzl\"),\n \"def function(): return\");\n BuildFile file =\n createBuildFile(\n new WorkspacePath(\"java/com/google/nonPackageSubdirectory/other.bzl\"),\n \"load(\" + \" ':nonPackageSubdirectory/skylark.bzl',\",\n \" 'function',\",\n \")\",\n \"function()\");\n\n FunctionStatement function = referencedFile.firstChildOfClass(FunctionStatement.class);\n FuncallExpression funcall = file.firstChildOfClass(FuncallExpression.class);\n\n assertThat(function).isNotNull();\n assertThat(funcall.getReferencedElement()).isEqualTo(function);\n }",
"boolean isPattern(String path);",
"@Test\n public void testCreateFilePath() {\n System.out.println(\"createFilePath with realistic path\");\n String path = System.getProperty(\"user.dir\")+fSeparator+\"MyDiaryBook\"\n +fSeparator+\"Users\"+fSeparator+\"Panagiwtis Georgiadis\"+fSeparator+\"Entries\"\n +fSeparator+\"Test1\";\n FilesDao instance = new FilesDao();\n boolean expResult = true;\n boolean result = instance.createFilePath(path);\n assertEquals(\"Some message\",expResult, result);\n }",
"boolean hasFileLocation();",
"public boolean isFile(String path);",
"Path getPath();",
"private static void isFileExistOrCreatIt(String fileName) {\n if (!fileName.endsWith(\".json\")){\n throw new IllegalArgumentException(\"Invalid file name\");\n }\n File file = new File(\"src//main//resources\"+\"//\"+fileName);\n if(!file.exists()){\n try{\n file.createNewFile();\n }catch (IOException e){\n e.printStackTrace();\n }\n\n }\n }",
"boolean isFile(FsPath path);",
"CtPath getPath();",
"private static String getResourcePath(String resPath) {\n URL resource = XmlReaderUtils.class.getClassLoader().getResource(resPath);\n Assert.assertNotNull(\"Could not open the resource \" + resPath, resource);\n return resource.getFile();\n }",
"private static boolean isIgnorePath(String aPath)\n {\n if (aPath.startsWith(\"/sun\")) return true;\n if (aPath.startsWith(\"/apple\")) return true;\n if (aPath.startsWith(\"/com/sun\")) return true;\n if (aPath.startsWith(\"/com/apple\")) return true;\n if (aPath.startsWith(\"/com/oracle\")) return true;\n if (aPath.startsWith(\"/java/applet\")) return true;\n if (aPath.startsWith(\"/java/awt/dnd\")) return true;\n if (aPath.startsWith(\"/java/awt/im\")) return true;\n if (aPath.startsWith(\"/java/awt/peer\")) return true;\n if (aPath.startsWith(\"/java/beans\")) return true;\n if (aPath.startsWith(\"/java/lang/model\")) return true;\n if (aPath.startsWith(\"/java/nio/channels\")) return true;\n if (aPath.startsWith(\"/java/security\")) return true;\n if (aPath.startsWith(\"/java/util/concurrent\")) return true;\n if (aPath.startsWith(\"/java/util/Spliterators\")) return true;\n if (aPath.startsWith(\"/javax/crypto\")) return true;\n if (aPath.startsWith(\"/javax/net\")) return true;\n if (aPath.startsWith(\"/javax/security\")) return true;\n if (aPath.startsWith(\"/javax/accessibility\")) return true;\n if (aPath.startsWith(\"/javax/imageio\")) return true;\n if (aPath.startsWith(\"/javax/print\")) return true;\n if (aPath.startsWith(\"/javax/sound\")) return true;\n if (aPath.startsWith(\"/javax/swing/b\")) return true;\n if (aPath.startsWith(\"/javax/swing/colorchooser\")) return true;\n if (aPath.startsWith(\"/javax/swing/event\")) return true;\n if (aPath.startsWith(\"/javax/swing/filechooser\")) return true;\n if (aPath.startsWith(\"/javax/swing/plaf\")) return true;\n if (aPath.startsWith(\"/javax/swing/text\")) return true;\n if (aPath.startsWith(\"/javax/swing/tree\")) return true;\n if (aPath.startsWith(\"/javax/swing/undo\")) return true;\n if (aPath.startsWith(\"/jdk\")) return true;\n if (aPath.startsWith(\"/org/omg\")) return true;\n if (aPath.startsWith(\"/org/w3c\")) return true;\n if (aPath.startsWith(\"/META-INF\")) return true;\n\n // If inner class, return false\n if (aPath.contains(\"$\"))\n return true;\n\n // Return true\n return false;\n }",
"@Test\n\tpublic void test_Directory_typeFinder_wildcardImport() {\n\t\tString directory = _TestSuite.TYPE_FINDER_TEST_DIR.concat(\"wildcardImport/\");\n\t\ttestOutput(directory);\n\t}",
"public static boolean isValidCarbideProjectPathSegment(String pathSegment) {\r\n\t\tIWorkspace workspace = ResourcesPlugin.getWorkspace();\r\n\t\tint typeMask = IResource.FILE | IResource.FOLDER;\r\n\t\tboolean valid = pathSegment.length() == 0 || \r\n\t\t\tworkspace.validateName(pathSegment, typeMask).isOK();\r\n\t\tif (valid) {\r\n\t\t\tfor (int i = 0; i < pathSegment.length(); i++) {\r\n\t\t\t\tchar c = pathSegment.charAt(i);\r\n\t\t\t\tvalid = Character.isLetterOrDigit(c) || (c == '-') || (c == '_') || (c == '.');\r\n\t\t\t\tif (!valid)\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn valid;\r\n\t}",
"public void testGetPath() throws Exception {\n Object[] test_values = {\n new String[]{\"\", \"\"},\n new String[]{\"/\", \"\"},\n new String[]{\"/foo.bar\", \"\"},\n new String[]{\"foo/bar\", \"foo\"},\n new String[]{\"/foo/bar\", \"/foo\"}\n };\n for (int i = 0; i < test_values.length; i++) {\n String tests[] = (String[]) test_values[i];\n String test = tests[0];\n String expected = tests[1];\n\n String result = NetUtils.getPath(test);\n String message = \"Test \" + \"'\" + test + \"'\";\n assertEquals(message, expected, result);\n }\n }",
"static FormValidation doCheckPath(@QueryParameter String value) {\n if (StringUtils.isBlank(value)) {\n return FormValidation.ok();\n }\n try {\n final FilePath filePath = new FilePath(new File(value));\n filePath.exists();\n } catch (Exception e) {\n return FormValidation.error(\"The specified value is not a valid path\");\n }\n return FormValidation.ok();\n }",
"public void testGetAbsolutePath_1()\n\t\tthrows Exception {\n\t\tFiles fixture = new Files();\n\t\tfixture.setAbsolutePath(\"\");\n\t\tfixture.setType(\"\");\n\t\tfixture.setReadable(\"\");\n\t\tfixture.setSize(\"\");\n\t\tfixture.setWritable(\"\");\n\t\tfixture.setExecutable(\"\");\n\t\tfixture.setMtime(\"\");\n\n\t\tString result = fixture.getAbsolutePath();\n\n\t\t\n\t\tassertEquals(\"\", result);\n\t}"
]
| [
"0.65950245",
"0.62231565",
"0.6211565",
"0.6174249",
"0.59620845",
"0.5957535",
"0.59339774",
"0.59036523",
"0.5742492",
"0.5741215",
"0.5741129",
"0.5733809",
"0.5712452",
"0.56858844",
"0.5664457",
"0.56529856",
"0.5627831",
"0.5619623",
"0.56187826",
"0.55969656",
"0.55892336",
"0.55706483",
"0.55706483",
"0.5551537",
"0.55460566",
"0.5538977",
"0.5522158",
"0.5520733",
"0.5511527",
"0.5499907",
"0.5472345",
"0.5466005",
"0.54341054",
"0.5433927",
"0.54318106",
"0.5422663",
"0.54106003",
"0.539448",
"0.5393052",
"0.5381335",
"0.53758377",
"0.5367154",
"0.5351989",
"0.534358",
"0.534358",
"0.534358",
"0.534358",
"0.534358",
"0.53370804",
"0.5336138",
"0.5327419",
"0.5325349",
"0.53205067",
"0.5304514",
"0.5300466",
"0.52976316",
"0.52965957",
"0.5294643",
"0.5292377",
"0.52833927",
"0.5261767",
"0.52539533",
"0.5251465",
"0.5250125",
"0.5249031",
"0.5248828",
"0.52445596",
"0.5229357",
"0.52234924",
"0.5208417",
"0.5208104",
"0.5192469",
"0.5182405",
"0.517925",
"0.5175732",
"0.51733",
"0.51566505",
"0.51541746",
"0.51533633",
"0.5141887",
"0.5139355",
"0.5137317",
"0.51285875",
"0.51257783",
"0.5118807",
"0.510803",
"0.51010674",
"0.5091567",
"0.50888443",
"0.5082501",
"0.50777954",
"0.5072299",
"0.50697577",
"0.5059435",
"0.50491166",
"0.5045119",
"0.5042055",
"0.50348717",
"0.5029429",
"0.5027776",
"0.50198674"
]
| 0.0 | -1 |
Check path including specifying whether to add source prefix (with filename). Path example (w/ addSrcPrefix is true) : com\samsungsds\Test.java | boolean haveToSkip(String path, boolean addSrcPrefix); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasSrcPath();",
"boolean haveToSkip(String path, boolean addSrcPrefix, boolean withoutFilename);",
"public boolean startsWith(FilePath prefix) {\n return startsWith(prefix.path);\n }",
"private boolean isOnSourcePath(String sourceFile, List<String> sourcePath) {\n\t\tfor (Iterator<String> j = sourcePath.iterator(); j.hasNext();) {\n\t\t\tString srcPathEntry = j.next();\n\t\t\tif (sourceFile.startsWith(srcPathEntry))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"java.lang.String getSrcPath();",
"public boolean startsWith(String prefix) {\n return path.startsWith(prefix);\n }",
"private boolean isSourceDirectory(Project project, String sourceDirectory) {\r\n\t\tboolean result=false;\r\n\t\tif(sourceDirectory!=null&&(!sourceDirectory.equals(\"gen\"))){\r\n\t\t\tresult=true;\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public static boolean filePathStartsWith(List<String> prefixList, String path) {\n for (String match : prefixList) {\n if (path.equals(match) || path.startsWith(match + Symbol.SLASH)) {\n return true;\n }\n }\n return false;\n }",
"private static boolean startsWith(final String source, final String prefix) {\n return prefix.length() <= source.length() && source.regionMatches(true, 0, prefix, 0, prefix.length());\n }",
"boolean hasSourceFile();",
"public String getPathForPrefix(String prefix) {\r\n String ns = this.getNamespaceURI(prefix);\r\n if (ns != null) {\r\n for (Import imp : getDefinitions().getImports()) {\r\n if (ns.equals(imp.getNamespace())) {\r\n // TODO: Also check that imp.getType() is BPMN\r\n return imp.getLocation();\r\n }\r\n }\r\n }\r\n return \"\";\r\n }",
"@Override\n public boolean accept(Path path) {\n return path.getName().startsWith(partFilePrefix);\n }",
"private boolean allSourcePathsExist(List<String> sourcePath) {\n\t\tfor (Iterator<String> ii = sourcePath.iterator(); ii.hasNext();) {\n\t\t\tString dirName = ii.next();\n\t\t\tFile dir = new File(getDirectory().getAbsolutePath() + \"/\"\n\t\t\t\t\t+ dirName);\n\t\t\tif (!dir.exists())\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public GeneratedSourceFile transformPrependPath(final String prefix) {\n\t\treturn new GeneratedSourceFile(prefix + m_filePath, m_sourceCode, m_customCodeSections);\n\t}",
"public static boolean fileStartsWith(final String fileName, final String prefix) {\n\n return FileSystem.getInstance(fileName).fileStartsWith(fileName, prefix);\n }",
"private void assertPathCorrect(String expectedFileNamePrefix, File expectedDirectory, File actualFile)\r\n {\r\n File expectedPath = new File(expectedDirectory, expectedFileNamePrefix);\r\n if (!actualFile.getAbsolutePath().startsWith(expectedPath.getAbsolutePath()))\r\n {\r\n String failureMsg = \"File path \" + actualFile.getAbsolutePath() +\r\n \" does not start as expected: \" + expectedPath.getAbsolutePath();\r\n Assert.fail(failureMsg);\r\n }\r\n }",
"public boolean startsWith(Path path) {\n if (path == null) {\n return true;\n } else if (parts.length < path.parts.length) {\n return false;\n }\n for (int i = 0; i < path.parts.length; i++) {\n if (!parts[i].equals(path.parts[i])) {\n return false;\n }\n }\n if (parts.length == path.parts.length) {\n return index == path.index;\n } else {\n return path.index;\n }\n }",
"private boolean sourceExists(File fileToCheck) {\n\t\tif (fileToCheck.exists()) {\n\t\t\tSystem.out.println(\"Source file \"+fileToCheck.getName()+ \" exists.\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\tSystem.out.println(\"Source file \"+fileToCheck.getName()+ \" DOESN'T exist.\");\n\t\t\treturn false;\n\t\t}\n\t}",
"public static boolean isValid(String src)\n {\n if (!src.startsWith(SEPARATOR)) {\n return false;\n }\n\n // Check for \"..\" \".\" \":\" \"/\"\n StringTokenizer tokens = new StringTokenizer(src, SEPARATOR);\n while(tokens.hasMoreTokens()) {\n String element = tokens.nextToken();\n if (element.equals(\"..\") ||\n element.equals(\".\") ||\n (element.indexOf(\":\") >= 0) ||\n (element.indexOf(\"/\") >= 0)) {\n return false;\n }\n }\n \n return true; \n }",
"private String checkPath(String p, Integer line, Integer col, String msg, String source, Integer errorCode)\n\t{\n\t\tboolean result = !this.source.getNameForReporting().equals(p) &&\n\t\t\t\t\t\t !this.source.isIncludedFile(p);\n\t\t\t\t\t\t // !this.source.getCompilationUnit().getAssets().exists(p);\n\t\t\n\t\tif (result)\n\t\t{\n\t\t\treturn (new StringBuilder(\" [\")\n\t\t\t\t.append(new GeneratedCodeMarker().getMessage())).append(\": \")\n\t\t\t\t.append(new PathInfo(p).getMessage()).append(\", \")\n\t\t\t\t.append(new LineInfo(line == null ? 0 : line.intValue()).getMessage()).append(\", \")\n\t\t\t\t.append(new ColumnInfo(col == null ? 0 : col.intValue()).getMessage()).append(\"]\")\n\t\t\t\t.toString();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}",
"public static String cleanUpPathPrefix(String prefix) {\n if (UtilValidate.isEmpty(prefix)) {\n return \"\";\n }\n\n StringBuilder cppBuff = new StringBuilder(prefix.replace('\\\\', '/'));\n\n if (cppBuff.charAt(0) != '/') {\n cppBuff.insert(0, '/');\n }\n if (cppBuff.charAt(cppBuff.length() - 1) == '/') {\n cppBuff.deleteCharAt(cppBuff.length() - 1);\n }\n return cppBuff.toString();\n }",
"java.lang.String getSourceFile();",
"boolean matchStart(String pattern, String path);",
"public Builder setSrcPath(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n srcPath_ = value;\n onChanged();\n return this;\n }",
"public boolean startsWith(\n Path prefix\n ) {\n return prefix.size <= this.size && prefix.equals(getPrefix(prefix.size));\n }",
"boolean hasVersionNamePrefix();",
"public boolean startsWith(String prefix) {\r\n return tree.startWith(prefix);\r\n }",
"public boolean startsWith(String prefix) {\n/* 333 */ return this.m_str.startsWith(prefix);\n/* */ }",
"public boolean hasSrcPath() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean hasSrcPath() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"boolean hasFilePath();",
"private void validateSource(SourcePointer.FileSource src) {\n File f = src.path.toFile();\n if (!f.exists() || !f.canRead()) {\n throw new SolrException(\n ErrorCode.BAD_REQUEST,\n String.format(\n Locale.US, \"File at %s either does not exist or cannot be read.\", src.path));\n }\n }",
"public boolean startsWith(String prefix) {\n char[] chs = prefix.toCharArray();\n TreeNode cur = root;\n for (int i = 0; i < chs.length; i++) {\n int ind = chs[i] - 'a';\n if (cur.map[ind] == null) {\n return false;\n }\n cur = cur.map[ind];\n }\n return true;\n }",
"public boolean startsWith(String prefix) {\n return this.root.startWith(prefix);\n \n }",
"private boolean isPrefixFound(String line) {\n\t\tif (notab) {\n\t\t\treturn line.startsWith(prefix);\n\t\t} else {\n\t\t\treturn line.contains(prefix);\n\t\t}\n\t}",
"private String cutPrefixFromFilePath(String path) {\n return path.replace(mainFolder, \"\");\n }",
"public boolean startsWith(String prefix) {\n return searchPrefix(prefix)!=null;\n }",
"public boolean startsWith(String prefix) {\n return (walkTo(prefix) != null);\n }",
"public boolean startsWith(String prefix) {\n\t\tcur = root;\n\t\tfor (char c : prefix.toCharArray()) {\n\t\t\tif (cur == null)\n\t\t\t\treturn false;\n\t\t\tcur = cur.children[c - 'a'];\n\t\t}\n\t\treturn cur != null;\n\t}",
"boolean shouldAllowMissingSourceDir() {\n return allowMissingSourceDir;\n }",
"public boolean startsWith(XMLString prefix) {\n/* 353 */ return this.m_str.startsWith(prefix.toString());\n/* */ }",
"static boolean sourceInProjectDirectories(LocationContext context) {\n return context.getImportRoots().containsWorkspacePath(context.workspacePath);\n }",
"private boolean isPrefix(String filename, String[] array)\n\t{\n\t\tfor (String temp : array)\n\t\t{\n\t\t\tif (temp.startsWith(filename) == true)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean startsWith(String prefix) {\n TrieTree point = root;\n for(int i = 0; i < prefix.length(); i++){\n char ch = prefix.charAt(i);\n if(point.getChild(ch - 'a') == null) return false;\n point = point.getChild(ch - 'a');\n }\n return true;\n }",
"public boolean startsWith(String prefix) {\n var node = searchPrefix(prefix);\n return node != null;\n }",
"public boolean startsWith(String prefix) {\n return getNode(prefix) != null;\n }",
"public boolean startsWith(String prefix) {\n\t\t\treturn searchPrefix(prefix) != null;\n\t\t}",
"public boolean startsWith(String prefix) {\n Entry lastNodeOfSearch = getLastNodeOfSearch(prefix, 0, root);\n return lastNodeOfSearch!=null;\n }",
"@Test\n public void shouldListActivatorsInSourceCode() throws Exception {\n initializeOSGiProjectWithBundlesInSourceCode();\n resetOutput();\n getShell().execute(\"osgi activators\");\n String mod1Expected = \"/main/src/module1/br/ufrgs/rmpestano/activator/Activator.java\";\n String mod2Expected = \"/main/src/module2/br/ufrgs/rmpestano/activator/Activator.java\";\n String mod3Expected = \"/main/src/module3/src/br/ufrgs/rmpestano/activator/Activator.java\";\n if(OSUtils.isWindows()){\n mod1Expected = mod1Expected.replaceAll(\"/\", File.separator + File.separator);\n mod2Expected = mod2Expected.replaceAll(\"/\", File.separator + File.separator);\n mod3Expected = mod3Expected.replaceAll(\"/\", File.separator + File.separator);\n }\n getOutput().contains(mod1Expected);\n getOutput().contains(mod2Expected);\n getOutput().contains(mod3Expected);\n\n\n }",
"public boolean startsWith(String prefix) {\n Node curr = root;\n for (int i = 0; i < prefix.length(); i++) {\n char c = prefix.charAt(i);\n Node subNode = curr.subNodes[c - 'a'];\n if (subNode == null) {\n return false;\n }\n curr = subNode;\n }\n return true;\n }",
"public boolean startsWith(String prefix) {\n if(searchWordNodePos(prefix) == null){\n return false;\n } else return true;\n }",
"SourceFilePath getFilePath();",
"private static boolean isJava8File(Path path) {\n var name = Paths.name(path);\n return !path.startsWith(\".bach\") // ignore all files in `.bach` directory\n && name.endsWith(\".java\")\n && !name.equals(\"module-info.java\") // ignore module declaration compilation units\n && Files.isRegularFile(path);\n }",
"@Test\n\tpublic void test(){\n\t\tFile srcFile = new File(\"E:\\\\Workspaces\\\\MyPro\\\\ssh\\\\WebRoot\\\\products\\\\2\\\\男鞋\");\n//\t\tSystem.out.println(ss);\n\t\tthis.getAllJavaFilePaths(srcFile);\n\t}",
"public java.lang.String getSrcPath() {\n java.lang.Object ref = srcPath_;\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 srcPath_ = s;\n }\n return s;\n }\n }",
"private static boolean isIgnorePath(String aPath)\n {\n if (aPath.startsWith(\"/sun\")) return true;\n if (aPath.startsWith(\"/apple\")) return true;\n if (aPath.startsWith(\"/com/sun\")) return true;\n if (aPath.startsWith(\"/com/apple\")) return true;\n if (aPath.startsWith(\"/com/oracle\")) return true;\n if (aPath.startsWith(\"/java/applet\")) return true;\n if (aPath.startsWith(\"/java/awt/dnd\")) return true;\n if (aPath.startsWith(\"/java/awt/im\")) return true;\n if (aPath.startsWith(\"/java/awt/peer\")) return true;\n if (aPath.startsWith(\"/java/beans\")) return true;\n if (aPath.startsWith(\"/java/lang/model\")) return true;\n if (aPath.startsWith(\"/java/nio/channels\")) return true;\n if (aPath.startsWith(\"/java/security\")) return true;\n if (aPath.startsWith(\"/java/util/concurrent\")) return true;\n if (aPath.startsWith(\"/java/util/Spliterators\")) return true;\n if (aPath.startsWith(\"/javax/crypto\")) return true;\n if (aPath.startsWith(\"/javax/net\")) return true;\n if (aPath.startsWith(\"/javax/security\")) return true;\n if (aPath.startsWith(\"/javax/accessibility\")) return true;\n if (aPath.startsWith(\"/javax/imageio\")) return true;\n if (aPath.startsWith(\"/javax/print\")) return true;\n if (aPath.startsWith(\"/javax/sound\")) return true;\n if (aPath.startsWith(\"/javax/swing/b\")) return true;\n if (aPath.startsWith(\"/javax/swing/colorchooser\")) return true;\n if (aPath.startsWith(\"/javax/swing/event\")) return true;\n if (aPath.startsWith(\"/javax/swing/filechooser\")) return true;\n if (aPath.startsWith(\"/javax/swing/plaf\")) return true;\n if (aPath.startsWith(\"/javax/swing/text\")) return true;\n if (aPath.startsWith(\"/javax/swing/tree\")) return true;\n if (aPath.startsWith(\"/javax/swing/undo\")) return true;\n if (aPath.startsWith(\"/jdk\")) return true;\n if (aPath.startsWith(\"/org/omg\")) return true;\n if (aPath.startsWith(\"/org/w3c\")) return true;\n if (aPath.startsWith(\"/META-INF\")) return true;\n\n // If inner class, return false\n if (aPath.contains(\"$\"))\n return true;\n\n // Return true\n return false;\n }",
"com.google.protobuf.ByteString\n getSrcPathBytes();",
"public static String toPath(String srcPath, boolean nodeModelSource) {\n\t\t\n\t\tif(nodeModelSource) {\n\t\t\tStringBuilder builder = new StringBuilder();\n\t\t\t\n\t\t\tif(srcPath.startsWith(\"/\") && srcPath.length() > 0) {\n\t\t\t\tsrcPath = srcPath.substring(1);\n\t\t\t}\n\t\t\t\n\t\t\tString[] tokens = srcPath.split(\"/\");\n\t\t\tbuilder.append(\".vars[\\\"\").append(tokens[0]).append(\"\\\"]\");\n\t\t\tif(tokens.length > 1) {\n\t\t\t\tbuilder.append(\"[\\\"\");\n\t\t\t\tfor(int i = 1; i < tokens.length; i++) {\n\t\t\t\t\tif(i > 1) {\n\t\t\t\t\t\tbuilder.append(\"/\");\n\t\t\t\t\t}\n\t\t\t\t\tbuilder.append(tokens[i]);\n\t\t\t\t}\n\t\t\t\tbuilder.append(\"\\\"][0]!\");\n\t\t\t}\n\t\t\t\n\t\t\treturn builder.toString();\n\t\t} else {\n\t\t\treturn srcPath;\n\t\t}\n\t}",
"@SuppressWarnings(\"unused\")\n private String checkPathFull(String p, Integer line, Integer col, String msg, String source, Integer errorCode)\n\t{\n\t\tboolean result = !this.source.getNameForReporting().equals(p) &&\n\t\t\t\t\t\t !this.source.isIncludedFile(p);\n\t\t\t\t\t\t // !this.source.getCompilationUnit().getAssets().exists(p);\n\n\t\tif (result)\n\t\t{\n\t\t\tStringWriter misrouteInfo = new StringWriter();\n\t\t\tPrintWriter pw = new PrintWriter(misrouteInfo, true);\n\t\t\tpw.println(new ErrMsgBug().getMessage());\n\t\t\tpw.println(new PathInfo(p).getMessage());\n\t\t\tif (line != null)\n\t\t\t{\n\t\t\t\tpw.println(new LineInfo(line.intValue()).getMessage());\n\t\t\t}\n\t\t\tif (col != null)\n\t\t\t{\n\t\t\t\tpw.println(new ColumnInfo(col.intValue()).getMessage());\n\t\t\t}\n\t\t\tif (msg != null)\n\t\t\t{\n\t\t\t\tpw.println(new MessageInfo(msg).getMessage());\n\t\t\t}\n\t\t\tif (source != null)\n\t\t\t{\n\t\t\t\tpw.println(new SourceInfo(source).getMessage());\n\t\t\t}\n\t\t\tif (errorCode != null)\n\t\t\t{\n\t\t\t\tpw.println(new ErrorCodeInfo(errorCode.intValue()).getMessage());\n\t\t\t}\n\t\t\tnew Exception(new StackTraceInfo().getMessage()).printStackTrace(pw);\n\t\t\treturn misrouteInfo.toString();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}",
"@Test\n\tpublic void test_Directory_typeFinder_wildcardImport() {\n\t\tString directory = _TestSuite.TYPE_FINDER_TEST_DIR.concat(\"wildcardImport/\");\n\t\ttestOutput(directory);\n\t}",
"@Test\n\tpublic void testIsSrcNoTestFile() {\n\t\t// Setup\n\t\tString added = \"6\";\n\t\tString removed = \"4\";\n\t\tString file = \"test/dank.tt\";\n\t\tLine line = new Line(added, removed, file);\n\t\tList<String> types = new ArrayList<String>();\n\t\ttypes.add(\"tt\");\n\n\t\t// Exercise\n\t\tboolean src = line.isSource(types);\n\n\t\t// Verify\n\t\tassertFalse(src);\n\t}",
"private void testPathRelative(String rootdir, String basefilename, String filename, String filename_check) {\r\n\t\tString result;\r\n\t\tString base_filename = rootdir + File.separator + basefilename;\r\n\t\tString base_dir = FileUtils.baseDir(base_filename);\r\n\t\tString file_name = rootdir + File.separator + filename;\r\n\t\t\r\n\t\tresult = FileUtils.pathRelativeFile(base_filename, file_name).replaceAll(\"\\\\\\\\\", \"/\");\r\n\t\tassertEquals(result, filename_check);\r\n\t\t\r\n\t\tresult = FileUtils.pathRelative(base_dir, file_name).replaceAll(\"\\\\\\\\\", \"/\");\r\n\t\tassertEquals(result, filename_check);\r\n\t}",
"private static boolean isTestSourceSet(SourceSet sourceSet) {\n return TEST_DIR_REGEX.matcher(sourceSet.getName()).find();\n }",
"public boolean openSource(String link) {\n final String str = \" PC=\";\n final int pcPos = link.indexOf(str);\n String classAndMethods = link.substring(0, pcPos);\n int dotIndex = classAndMethods.lastIndexOf('.');\n final String className = classAndMethods.substring(0, dotIndex);\n final String methodName = classAndMethods.substring(dotIndex + 1);\n int pc;\n try {\n pc = Integer.parseInt(link.substring(pcPos + str.length()));\n } catch (NumberFormatException e) {\n return false;\n }\n String[] ps = _classPath.split(java.io.File.pathSeparator);\n ArrayList<String> list = new ArrayList<String>();\n for (String s : ps) {\n list.add(s);\n }\n ps = System.getProperty(\"sun.boot.class.path\").split(java.io.File.pathSeparator);\n for (String s : ps) {\n list.add(s);\n }\n ClassFileTools.ClassLocation cl = null;\n try {\n cl = ClassFileTools.findClassFile(className, list);\n if (cl == null) {\n return false;\n }\n SourceFileAttributeInfo sf = (SourceFileAttributeInfo) cl.getClassFile().getAttribute(SourceFileAttributeInfo.getAttributeName());\n String fileName = sf.getSourceFileName().toString();\n String packageName = cl.getClassFile().getThisClassName();\n dotIndex = packageName.lastIndexOf('.');\n if (dotIndex >= 0) {\n packageName = packageName.substring(0, dotIndex).replace('.', File.separatorChar);\n fileName = packageName + File.separatorChar + fileName;\n } else {\n packageName = \"\";\n }\n String[] paths = _sourcePath.split(File.pathSeparator);\n File sourceFile = null;\n for (String s : paths) {\n File f = new File(s, fileName);\n if (f.exists()) {\n sourceFile = f;\n break;\n }\n }\n if (sourceFile == null) {\n return false;\n }\n int lineNo = -1;\n for (MethodInfo mi : cl.getClassFile().getMethods()) {\n if ((mi.getName().toString() + mi.getDescriptor().toString()).equals(methodName)) {\n for (AAttributeInfo ai : mi.getCodeAttributeInfo().getAttributes()) {\n if (ai.getName().toString().equals(LineNumberTableAttributeInfo.getAttributeName())) {\n LineNumberTableAttributeInfo lntai = (LineNumberTableAttributeInfo) ai;\n LineNumberTableAttributeInfo.LineNumberRecord[] lns = lntai.getLineNumbers();\n for (LineNumberTableAttributeInfo.LineNumberRecord l : lns) {\n if (l.startPC >= pc) {\n lineNo = l.lineNo;\n break;\n }\n }\n }\n if (lineNo >= 0) {\n break;\n }\n }\n }\n if (lineNo >= 0) {\n break;\n }\n }\n if (lineNo == -1) {\n return false;\n }\n try {\n Process p = ExecJVM.runJVM(\"edu.rice.cs.drjava.DrJava\", new String[] { sourceFile.toString() + File.pathSeparator + lineNo }, _drJavaJarFile.getAbsolutePath() + File.pathSeparator + System.getProperty(\"java.class.path\"), new String[] {}, new File(\".\"));\n return (p != null);\n } catch (IOException ioe) {\n return false;\n }\n } finally {\n try {\n if (cl != null) {\n cl.close();\n }\n } catch (IOException e) {\n return false;\n }\n }\n }",
"public void setSourcePath(String sourcePath) {\n this.sourcePath = sourcePath;\n }",
"public boolean startsWith(String prefix) {\n return searchWord(prefix, false);\n }",
"public java.lang.String getSrcPath() {\n java.lang.Object ref = srcPath_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n srcPath_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"Path getHasPath();",
"@Test\n\tpublic void testIsTestCaseSensitive() {\n\t\t// Setup\n\t\tString added = \"6\";\n\t\tString removed = \"7\";\n\t\tString file = \"Test/dank.java\";\n\t\tLine line = new Line(added, removed, file);\n\t\tList<String> types = new ArrayList<String>();\n\t\ttypes.add(\"java\");\n\n\t\t// Exercise\n\t\tboolean src = line.isSource(types);\n\n\t\t// Verify\n\t\tassertFalse(src);\n\t}",
"public boolean startsWith(String prefix) {\n TrieNode ptr = root;\n for(int i = 0;i < prefix.length();i++) {\n char c = prefix.charAt(i);\n if(ptr.child[c - 'a'] == null) {\n return false;\n }\n ptr = ptr.child[c - 'a'];\n }\n return true;\n }",
"public static String determineFileName(List<String> inputPathPrefixes, String inputFileName) {\n for (final String prefix : inputPathPrefixes) {\n final Path prefPath = Paths.get(prefix).toAbsolutePath();\n final String prefPathString = prefPath.toString();\n\n if (inputFileName.startsWith(prefPathString)) {\n if (prefPath.toFile().isDirectory()) {\n return trimAnyPathSep(inputFileName.substring(prefPathString.length()));\n } else {\n if (inputFileName.indexOf(File.separatorChar) == -1) {\n return inputFileName;\n }\n return trimAnyPathSep(inputFileName.substring(prefPathString.lastIndexOf(File.separatorChar)));\n }\n }\n }\n\n return inputFileName;\n }",
"public boolean startsWith(String prefix) {\n TrieNode p = searchNode(prefix);\n if (p == null) {\n return false;\n } else {\n return true;\n }\n }",
"public boolean startsWith(String prefix) {\n TrieNode tail = match(root, prefix.toCharArray(), 0);\n return tail != null;\n }",
"public boolean startsWith(String prefix) {\n Node current = root;\n for (int i = 0; i < prefix.length(); i++) {\n int c = prefix.charAt(i) - 'a';\n if (current.children[c] == null) return false;\n current = current.children[c];\n }\n return true;\n }",
"@Override\n public boolean startsWith(final String prefix) {\n final TrieNode p = searchNode(prefix);\n return p != null;\n }",
"boolean hasFileLocation();",
"@Test\n\tpublic void testIsTest() {\n\t\t// Setup\n\t\tString added = \"6\";\n\t\tString removed = \"7\";\n\t\tString file = \"test/dank.java\";\n\t\tLine line = new Line(added, removed, file);\n\t\tList<String> types = new ArrayList<String>();\n\t\ttypes.add(\"java\");\n\n\t\t// Exercise\n\t\tboolean src = line.isSource(types);\n\n\t\t// Verify\n\t\tassertFalse(src);\n\t}",
"public boolean startsWith(String prefix) {\n TrieNode n = root;\n for(char c : prefix.toCharArray()) {\n if(n.children[c]==null)\n return false;\n n = n.children[c];\n }\n return true;\n }",
"public boolean startsWith(String prefix) {\n char [] words=prefix.toCharArray();\n CharTree t=root;\n for (char c : words) {\n t=t.next[c-97];\n if(t==null)return false;\n }\n return true;\n }",
"private String checkName(String filename,int start_off){\n String name=FilenameUtil.setForwardSlash(filename);\n\n // check that it is a possibility\n if(name==null || name.length()<=0) return null;\n if(name.indexOf(matchname)<0) \n if( name.indexOf( matchname1) < 0) return null;\n if(! name.endsWith(\".class\") ) return null;\n if(name.indexOf(\"$\")>name.lastIndexOf(\"/\")) return null;\n \n // chop off the class part\n name=name.substring(start_off,name.length()-6);\n name=name.replace('/','.');\n \n return name;\n }",
"public boolean startsWith(String prefix, int toffset) {\n/* 289 */ return this.m_str.startsWith(prefix, toffset);\n/* */ }",
"public boolean startsWith(XMLString prefix, int toffset) {\n/* 313 */ return this.m_str.startsWith(prefix.toString(), toffset);\n/* */ }",
"private boolean isSourceType(String extension) {\n return srcFileName.toLowerCase().endsWith(extension);\n }",
"public boolean startsWith(String prefix) {\n char[] chars = prefix.toCharArray();\n Node theNode = root;\n for (char c : chars) {\n if (theNode.children.containsKey(c)) {\n theNode = theNode.children.get(c);\n } else {\n return false;\n }\n }\n return true;\n }",
"public boolean startsWith(String prefix) {\n char[] chars = prefix.toCharArray();\n Node node = root;\n for (char c: chars) {\n int idx = c - 'a';\n Node next = node.children[idx];\n if (next == null) return false;\n node = next;\n }\n return true;\n }",
"GetPrefix fileContent();",
"@Test\n public void testStartsWith() {\n chkInt(\"startsWith('a')\", false);\n chkLong(\"startsWith('a')\", false);\n chkNumber(\"startsWith('a')\", false);\n chkBoolean(\"startsWith('a')\", false);\n chkString(\"startsWith('aaZ')\", true, \"'aaZb'\");\n chkDate(\"startsWith('a')\", false);\n chkList(\"startsWith('a')\", false, \"[]\");\n chkEnum(\"startsWith('a')\", false);\n }",
"public boolean startsWith(String prefix) {\n TrieNode node = search(root, prefix, 0);\n\t\treturn hasKey(node);\n }",
"public boolean startsWith(String prefix) {\n TrieNode cur = root;\n for (int i = 0 ; i < prefix.length(); i ++) {\n char ch = prefix.charAt(i);\n if (! cur.children.containsKey(ch)) {\n // does not match\n return false;\n }\n else {\n cur = cur.children.get(ch);\n }\n }\n return true;\n }",
"public static void main(String[] args) {\n\t\tPath path = Paths.get(\"F:\\\\AccentureMayBatch\\\\JSTLProject\");\r\n\r\n\t\r\n\r\n\t\tSystem.out.format(\"toString: %s%n\", path.toString());\r\n\t\tSystem.out.format(\"getFileName: %s%n\", path.getFileName());\r\n\t\tSystem.out.format(\"getName(0): %s%n\", path.getName(0));\r\n\t\tSystem.out.format(\"getNameCount: %d%n\", path.getNameCount());\r\n\t\tSystem.out.format(\"subpath(0,2): %s%n\", path.subpath(0,2));\r\n\t\tSystem.out.format(\"getParent: %s%n\", path.getParent());\r\n\t\tSystem.out.format(\"getRoot: %s%n\", path.getRoot());\r\n\t\t\r\n\t\ttry {\r\n\t\t\tFiles.list(new File(\".\").toPath())\r\n\t\t\t .forEach(System.out::println);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tFiles.walk(new File(\".\").toPath())\r\n\t\t .filter(p -> !p.getFileName()\r\n\t\t .toString().startsWith(\".\"))\r\n\t\t .forEach(System.out::println);\r\n\t\t\t\r\n\t\t\tFiles.lines(new File(\"./src/com/polaris/utility/PathDemo.java\").toPath())\r\n\t\t .map(s -> s.trim())\r\n\t\t .filter(s -> !s.isEmpty())\r\n\t\t .forEach(System.out::println);\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//finding path and sub path into string\r\n\t\t Path start = Paths.get(\".\");\r\n\t\t int maxDepth = 5;\r\n\t\t try (Stream<Path> stream = Files.find(start, maxDepth, (path2, attr) -> String.valueOf(path2).endsWith(\".java\"))) \r\n\t\t {\r\n\t\t String joined = stream\r\n\t\t .sorted()\r\n\t\t .map(String::valueOf)\r\n\t\t .collect(Collectors.joining(\"; \"));\r\n\t\t System.out.println(\"Found: \" + joined);\r\n\t\t } catch (IOException 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\t\r\n\t\tPath source = Paths.get(\"./src/com/polaris/utility/PathDemo.java\");\r\n\t\tPath target = Paths.get(\"F:/yatrabakup\");\r\n\t\t\r\n/*\r\n\t\ttry {\r\n\t\t // Files.copy(source, target);\r\n\t\t} catch(FileAlreadyExistsException fae) {\r\n\t\t fae.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t // something else went wrong\r\n\t\t e.printStackTrace();\r\n\t\t}\r\n\t\t*/\r\n\t\ttry (BufferedReader reader = Files.newBufferedReader(Paths.get(\"f:\\\\yatrabakup\\\\EmployeeData.csv\"))) {\r\n\t\t reader.lines().map(String::toLowerCase).forEach(System.out::println);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public boolean startsWith(String prefix) \n\t {\n\t \tTrieNode p = root;\n\t for(int i=0; i<prefix.length(); ++i)\n\t {\n\t \tchar c = prefix.charAt(i);\n\t \tp = p.children[c-'a'];\n\t \tif(p==null)\n\t \t\treturn false;\n\t }\n\t return true;\n\t }",
"public IAstSourceFile findIncludeFile(String string);",
"public boolean startsWith(String prefix) {\n return searchTrie(prefix)!=null;\n }",
"boolean hasFileName();",
"boolean hasFileName();",
"private static boolean stringStartsWith(String string, String prefix){\n for(int i=0; i < prefix.length(); i++){\n if(string.charAt(i) != prefix.charAt(i)){\n return false;\n }\n }\n return true;\n }",
"public Builder addSourcepath(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureSourcepathIsMutable();\n sourcepath_.add(value);\n onChanged();\n return this;\n }",
"boolean haveToSkip(String path);",
"public static boolean isJavaSourceFile(String f) {\n\t\tString ext = FilenameUtils.getExtension(f);\n\t\tif (ext.endsWith(\"java\")) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public abstract boolean isPath();"
]
| [
"0.69345814",
"0.6725618",
"0.6377191",
"0.6370975",
"0.62491465",
"0.6219092",
"0.60398465",
"0.59361917",
"0.5925745",
"0.5915313",
"0.58631164",
"0.5847386",
"0.58310395",
"0.58092904",
"0.5720646",
"0.56531405",
"0.5556754",
"0.5486565",
"0.5470812",
"0.5470305",
"0.54504365",
"0.53893554",
"0.5384527",
"0.5377138",
"0.53675646",
"0.5359269",
"0.53238916",
"0.53070605",
"0.52848256",
"0.5281545",
"0.52656233",
"0.52523047",
"0.52439207",
"0.5242812",
"0.5224922",
"0.5209953",
"0.5208525",
"0.51983446",
"0.5193061",
"0.51927346",
"0.51878697",
"0.5171038",
"0.5169517",
"0.5149067",
"0.5147996",
"0.51450783",
"0.51285887",
"0.5128504",
"0.5127443",
"0.51148933",
"0.51144415",
"0.511263",
"0.51072896",
"0.5100166",
"0.5092726",
"0.5084151",
"0.50820863",
"0.5077224",
"0.5074411",
"0.50646484",
"0.5059095",
"0.5055076",
"0.5050963",
"0.5036831",
"0.5032448",
"0.50322014",
"0.5007",
"0.5004216",
"0.49960372",
"0.49932837",
"0.49847114",
"0.4967947",
"0.49678287",
"0.49596912",
"0.49578005",
"0.4956118",
"0.4955091",
"0.49543694",
"0.49385017",
"0.4938034",
"0.493603",
"0.49348208",
"0.49296913",
"0.49249655",
"0.49240482",
"0.49146444",
"0.49098825",
"0.49090216",
"0.49080437",
"0.49066722",
"0.48955283",
"0.48952988",
"0.48895392",
"0.48843345",
"0.48843345",
"0.48818263",
"0.48796877",
"0.4874124",
"0.4873243",
"0.48690543"
]
| 0.71196616 | 0 |
Check path including specifying whether to add source prefix and whether to have filename. When checked, "/.java" is added on the matching pattern. Path example (w/ addSrcPrefix is true and w/o filename) : com\samsungsds\.java | boolean haveToSkip(String path, boolean addSrcPrefix, boolean withoutFilename); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean haveToSkip(String path, boolean addSrcPrefix);",
"boolean hasSrcPath();",
"boolean matchStart(String pattern, String path);",
"private boolean isOnSourcePath(String sourceFile, List<String> sourcePath) {\n\t\tfor (Iterator<String> j = sourcePath.iterator(); j.hasNext();) {\n\t\t\tString srcPathEntry = j.next();\n\t\t\tif (sourceFile.startsWith(srcPathEntry))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"boolean isPattern(String path);",
"boolean match(String pattern, String path);",
"public boolean startsWith(FilePath prefix) {\n return startsWith(prefix.path);\n }",
"@Override\n public boolean accept(Path path) {\n return path.getName().startsWith(partFilePrefix);\n }",
"public static boolean filePathStartsWith(List<String> prefixList, String path) {\n for (String match : prefixList) {\n if (path.equals(match) || path.startsWith(match + Symbol.SLASH)) {\n return true;\n }\n }\n return false;\n }",
"private boolean isSourceDirectory(Project project, String sourceDirectory) {\r\n\t\tboolean result=false;\r\n\t\tif(sourceDirectory!=null&&(!sourceDirectory.equals(\"gen\"))){\r\n\t\t\tresult=true;\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"boolean hasSourceFile();",
"public boolean startsWith(String prefix) {\n return path.startsWith(prefix);\n }",
"java.lang.String getSrcPath();",
"protected static boolean matchPath( String pattern, String str, boolean isCaseSensitive )\n {\n // When str starts with a File.separator, pattern has to start with a\n // File.separator.\n // When pattern starts with a File.separator, str has to start with a\n // File.separator.\n if( str.startsWith( File.separator ) !=\n pattern.startsWith( File.separator ) )\n {\n return false;\n }\n\n ArrayList patDirs = new ArrayList();\n StringTokenizer st = new StringTokenizer( pattern, File.separator );\n while( st.hasMoreTokens() )\n {\n patDirs.add( st.nextToken() );\n }\n\n ArrayList strDirs = new ArrayList();\n st = new StringTokenizer( str, File.separator );\n while( st.hasMoreTokens() )\n {\n strDirs.add( st.nextToken() );\n }\n\n int patIdxStart = 0;\n int patIdxEnd = patDirs.size() - 1;\n int strIdxStart = 0;\n int strIdxEnd = strDirs.size() - 1;\n\n // up to first '**'\n while( patIdxStart <= patIdxEnd && strIdxStart <= strIdxEnd )\n {\n String patDir = (String)patDirs.get( patIdxStart );\n if( patDir.equals( \"**\" ) )\n {\n break;\n }\n if( !match( patDir, (String)strDirs.get( strIdxStart ), isCaseSensitive ) )\n {\n return false;\n }\n patIdxStart++;\n strIdxStart++;\n }\n if( strIdxStart > strIdxEnd )\n {\n // String is exhausted\n for( int i = patIdxStart; i <= patIdxEnd; i++ )\n {\n if( !patDirs.get( i ).equals( \"**\" ) )\n {\n return false;\n }\n }\n return true;\n }\n else\n {\n if( patIdxStart > patIdxEnd )\n {\n // String not exhausted, but pattern is. Failure.\n return false;\n }\n }\n\n // up to last '**'\n while( patIdxStart <= patIdxEnd && strIdxStart <= strIdxEnd )\n {\n String patDir = (String)patDirs.get( patIdxEnd );\n if( patDir.equals( \"**\" ) )\n {\n break;\n }\n if( !match( patDir, (String)strDirs.get( strIdxEnd ), isCaseSensitive ) )\n {\n return false;\n }\n patIdxEnd--;\n strIdxEnd--;\n }\n if( strIdxStart > strIdxEnd )\n {\n // String is exhausted\n for( int i = patIdxStart; i <= patIdxEnd; i++ )\n {\n if( !patDirs.get( i ).equals( \"**\" ) )\n {\n return false;\n }\n }\n return true;\n }\n\n while( patIdxStart != patIdxEnd && strIdxStart <= strIdxEnd )\n {\n int patIdxTmp = -1;\n for( int i = patIdxStart + 1; i <= patIdxEnd; i++ )\n {\n if( patDirs.get( i ).equals( \"**\" ) )\n {\n patIdxTmp = i;\n break;\n }\n }\n if( patIdxTmp == patIdxStart + 1 )\n {\n // '**/**' situation, so skip one\n patIdxStart++;\n continue;\n }\n // Find the pattern between padIdxStart & padIdxTmp in str between\n // strIdxStart & strIdxEnd\n int patLength = ( patIdxTmp - patIdxStart - 1 );\n int strLength = ( strIdxEnd - strIdxStart + 1 );\n int foundIdx = -1;\n strLoop :\n for( int i = 0; i <= strLength - patLength; i++ )\n {\n for( int j = 0; j < patLength; j++ )\n {\n String subPat = (String)patDirs.get( patIdxStart + j + 1 );\n String subStr = (String)strDirs.get( strIdxStart + i + j );\n if( !match( subPat, subStr, isCaseSensitive ) )\n {\n continue strLoop;\n }\n }\n\n foundIdx = strIdxStart + i;\n break;\n }\n\n if( foundIdx == -1 )\n {\n return false;\n }\n\n patIdxStart = patIdxTmp;\n strIdxStart = foundIdx + patLength;\n }\n\n for( int i = patIdxStart; i <= patIdxEnd; i++ )\n {\n if( !patDirs.get( i ).equals( \"**\" ) )\n {\n return false;\n }\n }\n\n return true;\n }",
"private boolean allSourcePathsExist(List<String> sourcePath) {\n\t\tfor (Iterator<String> ii = sourcePath.iterator(); ii.hasNext();) {\n\t\t\tString dirName = ii.next();\n\t\t\tFile dir = new File(getDirectory().getAbsolutePath() + \"/\"\n\t\t\t\t\t+ dirName);\n\t\t\tif (!dir.exists())\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public static boolean isValid(String src)\n {\n if (!src.startsWith(SEPARATOR)) {\n return false;\n }\n\n // Check for \"..\" \".\" \":\" \"/\"\n StringTokenizer tokens = new StringTokenizer(src, SEPARATOR);\n while(tokens.hasMoreTokens()) {\n String element = tokens.nextToken();\n if (element.equals(\"..\") ||\n element.equals(\".\") ||\n (element.indexOf(\":\") >= 0) ||\n (element.indexOf(\"/\") >= 0)) {\n return false;\n }\n }\n \n return true; \n }",
"private static boolean startsWith(final String source, final String prefix) {\n return prefix.length() <= source.length() && source.regionMatches(true, 0, prefix, 0, prefix.length());\n }",
"protected boolean matchRegExpr(String input, GlobFilenameFilter pattern) {\n File file = new File(input);\n String path = file.toString();\n \n // On systems with a '\\' as pathseparator convert it to a forward slash '/'\n // That makes patterns platform independent\n if (File.separatorChar == '\\\\') {\n path = path.replace('\\\\', '/');\n }\n \n return pattern.accept(file, path);\n }",
"private static boolean isJava8File(Path path) {\n var name = Paths.name(path);\n return !path.startsWith(\".bach\") // ignore all files in `.bach` directory\n && name.endsWith(\".java\")\n && !name.equals(\"module-info.java\") // ignore module declaration compilation units\n && Files.isRegularFile(path);\n }",
"protected static boolean matchPatternStart( String pattern, String str,\n boolean isCaseSensitive )\n {\n // When str starts with a File.separator, pattern has to start with a\n // File.separator.\n // When pattern starts with a File.separator, str has to start with a\n // File.separator.\n if( str.startsWith( File.separator ) !=\n pattern.startsWith( File.separator ) )\n {\n return false;\n }\n\n ArrayList patDirs = new ArrayList();\n StringTokenizer st = new StringTokenizer( pattern, File.separator );\n while( st.hasMoreTokens() )\n {\n patDirs.add( st.nextToken() );\n }\n\n ArrayList strDirs = new ArrayList();\n st = new StringTokenizer( str, File.separator );\n while( st.hasMoreTokens() )\n {\n strDirs.add( st.nextToken() );\n }\n\n int patIdxStart = 0;\n int patIdxEnd = patDirs.size() - 1;\n int strIdxStart = 0;\n int strIdxEnd = strDirs.size() - 1;\n\n // up to first '**'\n while( patIdxStart <= patIdxEnd && strIdxStart <= strIdxEnd )\n {\n String patDir = (String)patDirs.get( patIdxStart );\n if( patDir.equals( \"**\" ) )\n {\n break;\n }\n if( !match( patDir, (String)strDirs.get( strIdxStart ), isCaseSensitive ) )\n {\n return false;\n }\n patIdxStart++;\n strIdxStart++;\n }\n\n if( strIdxStart > strIdxEnd )\n {\n // String is exhausted\n return true;\n }\n else if( patIdxStart > patIdxEnd )\n {\n // String not exhausted, but pattern is. Failure.\n return false;\n }\n else\n {\n // pattern now holds ** while string is not exhausted\n // this will generate false positives but we can live with that.\n return true;\n }\n }",
"private boolean isFileNameAndModuleAndCheckNameMatching(TreeWalkerAuditEvent event) {\n return event.getFileName() != null\n && (fileRegexp == null || fileRegexp.matcher(event.getFileName()).find())\n && event.getLocalizedMessage() != null\n && (moduleId == null || moduleId.equals(event.getModuleId()))\n && (checkRegexp == null || checkRegexp.matcher(event.getSourceName()).find());\n }",
"@Override\r\n\t\tpublic boolean accept(Path path) {\n\t\t\tboolean flag = path.toString().matches(regex);\r\n\t\t\treturn flag;\r\n\t\t}",
"boolean getPathPatternSupported();",
"private String checkPath(String p, Integer line, Integer col, String msg, String source, Integer errorCode)\n\t{\n\t\tboolean result = !this.source.getNameForReporting().equals(p) &&\n\t\t\t\t\t\t !this.source.isIncludedFile(p);\n\t\t\t\t\t\t // !this.source.getCompilationUnit().getAssets().exists(p);\n\t\t\n\t\tif (result)\n\t\t{\n\t\t\treturn (new StringBuilder(\" [\")\n\t\t\t\t.append(new GeneratedCodeMarker().getMessage())).append(\": \")\n\t\t\t\t.append(new PathInfo(p).getMessage()).append(\", \")\n\t\t\t\t.append(new LineInfo(line == null ? 0 : line.intValue()).getMessage()).append(\", \")\n\t\t\t\t.append(new ColumnInfo(col == null ? 0 : col.intValue()).getMessage()).append(\"]\")\n\t\t\t\t.toString();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}",
"public boolean startsWith(Path path) {\n if (path == null) {\n return true;\n } else if (parts.length < path.parts.length) {\n return false;\n }\n for (int i = 0; i < path.parts.length; i++) {\n if (!parts[i].equals(path.parts[i])) {\n return false;\n }\n }\n if (parts.length == path.parts.length) {\n return index == path.index;\n } else {\n return path.index;\n }\n }",
"protected static boolean matchPath( String pattern, String str )\n {\n return matchPath( pattern, str, true );\n }",
"private static boolean isIgnorePath(String aPath)\n {\n if (aPath.startsWith(\"/sun\")) return true;\n if (aPath.startsWith(\"/apple\")) return true;\n if (aPath.startsWith(\"/com/sun\")) return true;\n if (aPath.startsWith(\"/com/apple\")) return true;\n if (aPath.startsWith(\"/com/oracle\")) return true;\n if (aPath.startsWith(\"/java/applet\")) return true;\n if (aPath.startsWith(\"/java/awt/dnd\")) return true;\n if (aPath.startsWith(\"/java/awt/im\")) return true;\n if (aPath.startsWith(\"/java/awt/peer\")) return true;\n if (aPath.startsWith(\"/java/beans\")) return true;\n if (aPath.startsWith(\"/java/lang/model\")) return true;\n if (aPath.startsWith(\"/java/nio/channels\")) return true;\n if (aPath.startsWith(\"/java/security\")) return true;\n if (aPath.startsWith(\"/java/util/concurrent\")) return true;\n if (aPath.startsWith(\"/java/util/Spliterators\")) return true;\n if (aPath.startsWith(\"/javax/crypto\")) return true;\n if (aPath.startsWith(\"/javax/net\")) return true;\n if (aPath.startsWith(\"/javax/security\")) return true;\n if (aPath.startsWith(\"/javax/accessibility\")) return true;\n if (aPath.startsWith(\"/javax/imageio\")) return true;\n if (aPath.startsWith(\"/javax/print\")) return true;\n if (aPath.startsWith(\"/javax/sound\")) return true;\n if (aPath.startsWith(\"/javax/swing/b\")) return true;\n if (aPath.startsWith(\"/javax/swing/colorchooser\")) return true;\n if (aPath.startsWith(\"/javax/swing/event\")) return true;\n if (aPath.startsWith(\"/javax/swing/filechooser\")) return true;\n if (aPath.startsWith(\"/javax/swing/plaf\")) return true;\n if (aPath.startsWith(\"/javax/swing/text\")) return true;\n if (aPath.startsWith(\"/javax/swing/tree\")) return true;\n if (aPath.startsWith(\"/javax/swing/undo\")) return true;\n if (aPath.startsWith(\"/jdk\")) return true;\n if (aPath.startsWith(\"/org/omg\")) return true;\n if (aPath.startsWith(\"/org/w3c\")) return true;\n if (aPath.startsWith(\"/META-INF\")) return true;\n\n // If inner class, return false\n if (aPath.contains(\"$\"))\n return true;\n\n // Return true\n return false;\n }",
"private String checkName(String filename,int start_off){\n String name=FilenameUtil.setForwardSlash(filename);\n\n // check that it is a possibility\n if(name==null || name.length()<=0) return null;\n if(name.indexOf(matchname)<0) \n if( name.indexOf( matchname1) < 0) return null;\n if(! name.endsWith(\".class\") ) return null;\n if(name.indexOf(\"$\")>name.lastIndexOf(\"/\")) return null;\n \n // chop off the class part\n name=name.substring(start_off,name.length()-6);\n name=name.replace('/','.');\n \n return name;\n }",
"@Override\r\n\t\tpublic boolean accept(Path path) {\n\t\t\tboolean flag = path.toString().matches(regex);\r\n\t\t\treturn !flag;\r\n\t\t}",
"@Test\n\tpublic void test_Directory_typeFinder_wildcardImport() {\n\t\tString directory = _TestSuite.TYPE_FINDER_TEST_DIR.concat(\"wildcardImport/\");\n\t\ttestOutput(directory);\n\t}",
"boolean hasFilePath();",
"public static boolean fileStartsWith(final String fileName, final String prefix) {\n\n return FileSystem.getInstance(fileName).fileStartsWith(fileName, prefix);\n }",
"public Pattern getCompiledPath();",
"public boolean accept(File dir, String name) {\n/* 120 */ return this.pattern.matcher(name).matches();\n/* */ }",
"@Override\n public final boolean accept(File dir, String name) {\n return pattern.matcher(name).find();\n }",
"public static boolean isJavaSourceFile(String f) {\n\t\tString ext = FilenameUtils.getExtension(f);\n\t\tif (ext.endsWith(\"java\")) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"private boolean isSourceType(String extension) {\n return srcFileName.toLowerCase().endsWith(extension);\n }",
"public boolean accept(java.io.File pathName, String fileName)\r\n {\r\n\r\n boolean valid = false;\r\n java.io.File testFile = new java.io.File(pathName, fileName);\r\n\r\n valid = (testFile.isFile() && fileName != null && fileName.startsWith(name));\r\n\r\n return valid;\r\n\r\n }",
"public boolean match(String name) {\n\t\tboolean result = false;\n\n\t\tif (this.entries != null) {\n\t\t\tname = name.replace('/', '.');\n\t\t\tname = name.replaceFirst(\"^[.]+\", \"\");\n\t\t\tname = name.replaceAll(\"\\\\$.*$\", \"\");\n\n\t\t\tfor (Entry entry : this.entries) {\n\t\t\t\tif (entry != null) {\n\t\t\t\t\tif (entry.partial) {\n\t\t\t\t\t\tif (name.startsWith(entry.classpath)) {\n\t\t\t\t\t\t\tresult = entry.result;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (name.equals(entry.classpath)) {\n\t\t\t\t\t\t\tresult = entry.result;\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}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"private boolean isSourceExcluded(IClasspathEntry entry) {\n IPath[] exclusionPatterns = entry.getExclusionPatterns();\n if (exclusionPatterns != null) {\n for (IPath exclusionPattern : exclusionPatterns) {\n if (\"**\".equals(exclusionPattern.toString())) {\n return true;\n }\n }\n }\n return false;\n }",
"private Pattern fileNameMatch(final String name) {\n final StringBuilder sb = new StringBuilder(name.length());\n for (int i = 0; i < name.length(); i++) {\n final char c = name.charAt(i);\n if (c == '.') {\n sb.append('\\\\').append('.');\n } else if (c == '?') {\n sb.append('.');\n } else if (c == '*') {\n sb.append('.').append('*').append('?');\n } else {\n sb.append(c);\n }\n }\n return Pattern.compile(sb.toString(), Pattern.CASE_INSENSITIVE);\n }",
"public GeneratedSourceFile transformPrependPath(final String prefix) {\n\t\treturn new GeneratedSourceFile(prefix + m_filePath, m_sourceCode, m_customCodeSections);\n\t}",
"protected boolean matchPathAndExtension(String file1, String file2) {\n\n\t\tboolean match = false;\n\n\t\tString path1 = null;\n\t\tint lastSlashPos = file1.lastIndexOf(\"/\");\n\n\t\tif (lastSlashPos > 0) {\n\t\t\tpath1 = file1.substring(0, lastSlashPos);\n\t\t}\n\n\t\tString path2 = null;\n\t\tlastSlashPos = file2.lastIndexOf(\"/\");\n\n\t\tif (lastSlashPos > 0) {\n\t\t\tpath2 = file2.substring(0, lastSlashPos);\n\t\t}\n\n\t\tif (((path1 == null) && (path2 == null)) || ((path1 != null) && (path2 != null) && path1.equals(path2))) {\n\n\t\t\tString ext1 = null;\n\t\t\tint lastDotPos = file1.indexOf(\".\");\n\n\t\t\tif (lastDotPos > 0) {\n\t\t\t\text1 = file1.substring(lastDotPos);\n\t\t\t}\n\n\t\t\tString ext2 = null;\n\t\t\tlastDotPos = file2.indexOf(\".\");\n\n\t\t\tif (lastDotPos > 0) {\n\t\t\t\text2 = file2.substring(lastDotPos);\n\t\t\t}\n\n\t\t\tif (((ext1 == null) && (ext2 == null)) || ((ext1 != null) && (ext2 != null) && ext1.equals(ext2))) {\n\t\t\t\tmatch = true;\n\t\t\t}\n\t\t}\n\n\t\treturn match;\n\t}",
"private void assertPathCorrect(String expectedFileNamePrefix, File expectedDirectory, File actualFile)\r\n {\r\n File expectedPath = new File(expectedDirectory, expectedFileNamePrefix);\r\n if (!actualFile.getAbsolutePath().startsWith(expectedPath.getAbsolutePath()))\r\n {\r\n String failureMsg = \"File path \" + actualFile.getAbsolutePath() +\r\n \" does not start as expected: \" + expectedPath.getAbsolutePath();\r\n Assert.fail(failureMsg);\r\n }\r\n }",
"public static String cleanUpPathPrefix(String prefix) {\n if (UtilValidate.isEmpty(prefix)) {\n return \"\";\n }\n\n StringBuilder cppBuff = new StringBuilder(prefix.replace('\\\\', '/'));\n\n if (cppBuff.charAt(0) != '/') {\n cppBuff.insert(0, '/');\n }\n if (cppBuff.charAt(cppBuff.length() - 1) == '/') {\n cppBuff.deleteCharAt(cppBuff.length() - 1);\n }\n return cppBuff.toString();\n }",
"@SuppressLint(\"DefaultLocale\")\n\t\t@Override\n\t\tpublic boolean accept(File dir, String filename) {\n\t\t return filename.toLowerCase().endsWith(ext.toLowerCase());\n\t\t}",
"String extractPathWithinPattern(String pattern, String path);",
"public Builder setSrcPath(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n srcPath_ = value;\n onChanged();\n return this;\n }",
"java.lang.String getSourceFile();",
"@SuppressWarnings(\"unused\")\n private String checkPathFull(String p, Integer line, Integer col, String msg, String source, Integer errorCode)\n\t{\n\t\tboolean result = !this.source.getNameForReporting().equals(p) &&\n\t\t\t\t\t\t !this.source.isIncludedFile(p);\n\t\t\t\t\t\t // !this.source.getCompilationUnit().getAssets().exists(p);\n\n\t\tif (result)\n\t\t{\n\t\t\tStringWriter misrouteInfo = new StringWriter();\n\t\t\tPrintWriter pw = new PrintWriter(misrouteInfo, true);\n\t\t\tpw.println(new ErrMsgBug().getMessage());\n\t\t\tpw.println(new PathInfo(p).getMessage());\n\t\t\tif (line != null)\n\t\t\t{\n\t\t\t\tpw.println(new LineInfo(line.intValue()).getMessage());\n\t\t\t}\n\t\t\tif (col != null)\n\t\t\t{\n\t\t\t\tpw.println(new ColumnInfo(col.intValue()).getMessage());\n\t\t\t}\n\t\t\tif (msg != null)\n\t\t\t{\n\t\t\t\tpw.println(new MessageInfo(msg).getMessage());\n\t\t\t}\n\t\t\tif (source != null)\n\t\t\t{\n\t\t\t\tpw.println(new SourceInfo(source).getMessage());\n\t\t\t}\n\t\t\tif (errorCode != null)\n\t\t\t{\n\t\t\t\tpw.println(new ErrorCodeInfo(errorCode.intValue()).getMessage());\n\t\t\t}\n\t\t\tnew Exception(new StackTraceInfo().getMessage()).printStackTrace(pw);\n\t\t\treturn misrouteInfo.toString();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}",
"boolean hasVersionNamePrefix();",
"public boolean hasSrcPath() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"private boolean sourceExists(File fileToCheck) {\n\t\tif (fileToCheck.exists()) {\n\t\t\tSystem.out.println(\"Source file \"+fileToCheck.getName()+ \" exists.\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\tSystem.out.println(\"Source file \"+fileToCheck.getName()+ \" DOESN'T exist.\");\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean hasSrcPath() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public void doCheckProjectPath(StaplerRequest req, StaplerResponse rsp, @QueryParameter final String value) throws IOException, ServletException {\n new FormFieldValidator(req,rsp,null) {\n /**\n * The real check goes here. In the end, depending on which\n * method you call, the browser shows text differently.\n */\n protected void check() throws IOException, ServletException {\n if(value.length()==0)\n error(\"please set the path to the Rhapsody Project !\");\n else\n if(value.length()<4)\n warning(\"isn't the path too short?\");\n else {\n \tFile file = new File(value);\n \tif (file.isDirectory()) {\n \t\terror(\"you entered a directory please select the *.rpy file !\");\n \t} else \n \t\t//TODO add more checks\n \t\tok();\n }\n\n }\n }.process();\n }",
"private String entryName(String name) {\n name = name.replace(File.separatorChar, '/');\n String matchPath = \"\";\n /* Need to add code to consolidate paths\n for (String path : paths) {\n if (name.startsWith(path)\n && (path.length() > matchPath.length())) {\n matchPath = path;\n }\n }\n */\n name = name.substring(matchPath.length());\n \n if (name.startsWith(\"/\")) {\n name = name.substring(1);\n } else if (name.startsWith(\"./\")) {\n name = name.substring(2);\n }\n return name;\n }",
"private static boolean isPrefix_r(String text, String pattern)\n {\n /*\n System.out.printf(\"text...: %s\\n\", text);\n System.out.printf(\"pattern: %s\\n\", pattern);\n System.out.println(\"---------------------------------\");\n */\n\n if (pattern.length() == 0)\n return true;\n else if (text.length() < pattern.length())\n return false;\n else if (text.charAt(0) != pattern.charAt(0))\n return false;\n else\n return isPrefix_r(text.substring(1), pattern.substring(1));\n }",
"private boolean checkFile(String name) {\n return name.endsWith(extension);\n }",
"@Test\n public void testMatchesAny() {\n\n Set<PathMatcher> patterns = new HashSet<PathMatcher>() {\n {\n add(FileUtil.matcherForGlobExpression(\"/notADir1\"));\n add(FileUtil.matcherForGlobExpression(\"/notADir2\"));\n }\n };\n\n Assertions.assertThat(FileUtil.matchesAny(FOLDER, patterns)).isFalse();\n\n patterns.add(FileUtil.matcherForGlobExpression(FOLDER.toString()));\n\n Assertions.assertThat(FileUtil.matchesAny(FOLDER, patterns)).isTrue();\n }",
"boolean hasFileName();",
"boolean hasFileName();",
"@Test\n public void testMatches() {\n\n PathMatcher result = FileUtil.matcherForGlobExpression(FOLDER.toString());\n Assertions.assertThat(FileUtil.matches(FOLDER, result)).isTrue();\n\n result = FileUtil.matcherForGlobExpression(\"/temp\");\n Assertions.assertThat(FileUtil.matches(FOLDER, result)).isFalse();\n }",
"private void validateSource(SourcePointer.FileSource src) {\n File f = src.path.toFile();\n if (!f.exists() || !f.canRead()) {\n throw new SolrException(\n ErrorCode.BAD_REQUEST,\n String.format(\n Locale.US, \"File at %s either does not exist or cannot be read.\", src.path));\n }\n }",
"@Test\n public void testMatcherForGlobExpressionTrue() {\n\n PathMatcher result = FileUtil.matcherForGlobExpression(FOLDER.toFile().getPath());\n Assertions.assertThat(FileUtil.matches(FOLDER, result)).isTrue();\n }",
"private Predicate<String> paths() {\r\n\t\t// Match all paths except /error\r\n\t\treturn Predicates.and(PathSelectors.regex(\"/.*\"), Predicates.not(PathSelectors.regex(\"/error.*\")));\r\n\t}",
"@Override\n\t\t\t\t\tpublic boolean accept(File f) {\n\t\t\t\t\t\tif (f.isDirectory()) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tString filename = f.getName().toLowerCase();\n\t\t\t\t\t\t\treturn filename.endsWith(\".pr1\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"public static String determineFileName(List<String> inputPathPrefixes, String inputFileName) {\n for (final String prefix : inputPathPrefixes) {\n final Path prefPath = Paths.get(prefix).toAbsolutePath();\n final String prefPathString = prefPath.toString();\n\n if (inputFileName.startsWith(prefPathString)) {\n if (prefPath.toFile().isDirectory()) {\n return trimAnyPathSep(inputFileName.substring(prefPathString.length()));\n } else {\n if (inputFileName.indexOf(File.separatorChar) == -1) {\n return inputFileName;\n }\n return trimAnyPathSep(inputFileName.substring(prefPathString.lastIndexOf(File.separatorChar)));\n }\n }\n }\n\n return inputFileName;\n }",
"@Test\n\tpublic void testIsTestCaseSensitive() {\n\t\t// Setup\n\t\tString added = \"6\";\n\t\tString removed = \"7\";\n\t\tString file = \"Test/dank.java\";\n\t\tLine line = new Line(added, removed, file);\n\t\tList<String> types = new ArrayList<String>();\n\t\ttypes.add(\"java\");\n\n\t\t// Exercise\n\t\tboolean src = line.isSource(types);\n\n\t\t// Verify\n\t\tassertFalse(src);\n\t}",
"boolean shouldAllowMissingSourceDir() {\n return allowMissingSourceDir;\n }",
"public String getPathForPrefix(String prefix) {\r\n String ns = this.getNamespaceURI(prefix);\r\n if (ns != null) {\r\n for (Import imp : getDefinitions().getImports()) {\r\n if (ns.equals(imp.getNamespace())) {\r\n // TODO: Also check that imp.getType() is BPMN\r\n return imp.getLocation();\r\n }\r\n }\r\n }\r\n return \"\";\r\n }",
"public boolean startsWith(String prefix) {\n/* 333 */ return this.m_str.startsWith(prefix);\n/* */ }",
"public void getSourceJavaFilesForOneRepository(File dir, FilenameFilter searchSuffix, ArrayList<File> al) {\n\n\t\tFile[] files = dir.listFiles();\t\t\n\t\tfor(File f : files) {\n\t\t\tString lowercaseName = f.getName().toLowerCase();\n\t\t\tif(lowercaseName.indexOf(\"test\")!=-1)\n\t\t\t{\n\t\t\t\t/* we do not consider test files in our study */\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t if(f.isDirectory()){\n\t\t\t\t /* iterate over every directory */\n\t\t\t\t getSourceJavaFilesForOneRepository(f, searchSuffix, al);\t\t\n\t\t\t } else {\n\t\t\t\t /* returns the desired java files */\n\t\t\t\t if(searchSuffix.accept(dir, f.getName())){\n\t\t\t\t\t al.add(f);\n\t\t\t\t }\n\t\t\t }\n\t\t\t}\n\t\t}\n\t}",
"@Test\n\tpublic void test(){\n\t\tFile srcFile = new File(\"E:\\\\Workspaces\\\\MyPro\\\\ssh\\\\WebRoot\\\\products\\\\2\\\\男鞋\");\n//\t\tSystem.out.println(ss);\n\t\tthis.getAllJavaFilePaths(srcFile);\n\t}",
"private static boolean isTestSourceSet(SourceSet sourceSet) {\n return TEST_DIR_REGEX.matcher(sourceSet.getName()).find();\n }",
"private static String globToRegex(final String glob) {\n return \"^\" + glob.replace(\".\", \"\\\\.\").replace(\"*\", \".*\") + \"$\";\n }",
"public static void main(String[] args) {\n\t\tPath path = Paths.get(\"F:\\\\AccentureMayBatch\\\\JSTLProject\");\r\n\r\n\t\r\n\r\n\t\tSystem.out.format(\"toString: %s%n\", path.toString());\r\n\t\tSystem.out.format(\"getFileName: %s%n\", path.getFileName());\r\n\t\tSystem.out.format(\"getName(0): %s%n\", path.getName(0));\r\n\t\tSystem.out.format(\"getNameCount: %d%n\", path.getNameCount());\r\n\t\tSystem.out.format(\"subpath(0,2): %s%n\", path.subpath(0,2));\r\n\t\tSystem.out.format(\"getParent: %s%n\", path.getParent());\r\n\t\tSystem.out.format(\"getRoot: %s%n\", path.getRoot());\r\n\t\t\r\n\t\ttry {\r\n\t\t\tFiles.list(new File(\".\").toPath())\r\n\t\t\t .forEach(System.out::println);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tFiles.walk(new File(\".\").toPath())\r\n\t\t .filter(p -> !p.getFileName()\r\n\t\t .toString().startsWith(\".\"))\r\n\t\t .forEach(System.out::println);\r\n\t\t\t\r\n\t\t\tFiles.lines(new File(\"./src/com/polaris/utility/PathDemo.java\").toPath())\r\n\t\t .map(s -> s.trim())\r\n\t\t .filter(s -> !s.isEmpty())\r\n\t\t .forEach(System.out::println);\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//finding path and sub path into string\r\n\t\t Path start = Paths.get(\".\");\r\n\t\t int maxDepth = 5;\r\n\t\t try (Stream<Path> stream = Files.find(start, maxDepth, (path2, attr) -> String.valueOf(path2).endsWith(\".java\"))) \r\n\t\t {\r\n\t\t String joined = stream\r\n\t\t .sorted()\r\n\t\t .map(String::valueOf)\r\n\t\t .collect(Collectors.joining(\"; \"));\r\n\t\t System.out.println(\"Found: \" + joined);\r\n\t\t } catch (IOException 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\t\r\n\t\tPath source = Paths.get(\"./src/com/polaris/utility/PathDemo.java\");\r\n\t\tPath target = Paths.get(\"F:/yatrabakup\");\r\n\t\t\r\n/*\r\n\t\ttry {\r\n\t\t // Files.copy(source, target);\r\n\t\t} catch(FileAlreadyExistsException fae) {\r\n\t\t fae.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t // something else went wrong\r\n\t\t e.printStackTrace();\r\n\t\t}\r\n\t\t*/\r\n\t\ttry (BufferedReader reader = Files.newBufferedReader(Paths.get(\"f:\\\\yatrabakup\\\\EmployeeData.csv\"))) {\r\n\t\t reader.lines().map(String::toLowerCase).forEach(System.out::println);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public boolean startsWith(\n Path prefix\n ) {\n return prefix.size <= this.size && prefix.equals(getPrefix(prefix.size));\n }",
"@Override\n\tpublic boolean accept(File p1)\n\t{\n\t\treturn p1.isDirectory()&&!p1.getName().startsWith(\".\");\n\t}",
"private boolean isPrefix(String filename, String[] array)\n\t{\n\t\tfor (String temp : array)\n\t\t{\n\t\t\tif (temp.startsWith(filename) == true)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private boolean containsWildcard(final String min) {\n return min.contains(\"*\")\r\n || min.contains(\"+\")\r\n || min.contains(\"%\")\r\n || min.contains(\"_\");\r\n }",
"public void addExcludedSourceFilePattern(String pattern) {\n\t\ttry {\n\t\t\tPattern regex = Pattern.compile(pattern);\n\t\t\texcludedSourceFileList.add(regex);\n\t\t} catch (PatternSyntaxException e) {\n\t\t\tgetLog().warn(\n\t\t\t\t\t\"Could not compile source file exclusion pattern \"\n\t\t\t\t\t\t\t+ pattern, e);\n\t\t}\n\t}",
"public abstract boolean isPath();",
"@Test\n\tpublic void testIsSrcNoTestFile() {\n\t\t// Setup\n\t\tString added = \"6\";\n\t\tString removed = \"4\";\n\t\tString file = \"test/dank.tt\";\n\t\tLine line = new Line(added, removed, file);\n\t\tList<String> types = new ArrayList<String>();\n\t\ttypes.add(\"tt\");\n\n\t\t// Exercise\n\t\tboolean src = line.isSource(types);\n\n\t\t// Verify\n\t\tassertFalse(src);\n\t}",
"public boolean openSource(String link) {\n final String str = \" PC=\";\n final int pcPos = link.indexOf(str);\n String classAndMethods = link.substring(0, pcPos);\n int dotIndex = classAndMethods.lastIndexOf('.');\n final String className = classAndMethods.substring(0, dotIndex);\n final String methodName = classAndMethods.substring(dotIndex + 1);\n int pc;\n try {\n pc = Integer.parseInt(link.substring(pcPos + str.length()));\n } catch (NumberFormatException e) {\n return false;\n }\n String[] ps = _classPath.split(java.io.File.pathSeparator);\n ArrayList<String> list = new ArrayList<String>();\n for (String s : ps) {\n list.add(s);\n }\n ps = System.getProperty(\"sun.boot.class.path\").split(java.io.File.pathSeparator);\n for (String s : ps) {\n list.add(s);\n }\n ClassFileTools.ClassLocation cl = null;\n try {\n cl = ClassFileTools.findClassFile(className, list);\n if (cl == null) {\n return false;\n }\n SourceFileAttributeInfo sf = (SourceFileAttributeInfo) cl.getClassFile().getAttribute(SourceFileAttributeInfo.getAttributeName());\n String fileName = sf.getSourceFileName().toString();\n String packageName = cl.getClassFile().getThisClassName();\n dotIndex = packageName.lastIndexOf('.');\n if (dotIndex >= 0) {\n packageName = packageName.substring(0, dotIndex).replace('.', File.separatorChar);\n fileName = packageName + File.separatorChar + fileName;\n } else {\n packageName = \"\";\n }\n String[] paths = _sourcePath.split(File.pathSeparator);\n File sourceFile = null;\n for (String s : paths) {\n File f = new File(s, fileName);\n if (f.exists()) {\n sourceFile = f;\n break;\n }\n }\n if (sourceFile == null) {\n return false;\n }\n int lineNo = -1;\n for (MethodInfo mi : cl.getClassFile().getMethods()) {\n if ((mi.getName().toString() + mi.getDescriptor().toString()).equals(methodName)) {\n for (AAttributeInfo ai : mi.getCodeAttributeInfo().getAttributes()) {\n if (ai.getName().toString().equals(LineNumberTableAttributeInfo.getAttributeName())) {\n LineNumberTableAttributeInfo lntai = (LineNumberTableAttributeInfo) ai;\n LineNumberTableAttributeInfo.LineNumberRecord[] lns = lntai.getLineNumbers();\n for (LineNumberTableAttributeInfo.LineNumberRecord l : lns) {\n if (l.startPC >= pc) {\n lineNo = l.lineNo;\n break;\n }\n }\n }\n if (lineNo >= 0) {\n break;\n }\n }\n }\n if (lineNo >= 0) {\n break;\n }\n }\n if (lineNo == -1) {\n return false;\n }\n try {\n Process p = ExecJVM.runJVM(\"edu.rice.cs.drjava.DrJava\", new String[] { sourceFile.toString() + File.pathSeparator + lineNo }, _drJavaJarFile.getAbsolutePath() + File.pathSeparator + System.getProperty(\"java.class.path\"), new String[] {}, new File(\".\"));\n return (p != null);\n } catch (IOException ioe) {\n return false;\n }\n } finally {\n try {\n if (cl != null) {\n cl.close();\n }\n } catch (IOException e) {\n return false;\n }\n }\n }",
"public static boolean isValidCarbideProjectPathSegment(String pathSegment) {\r\n\t\tIWorkspace workspace = ResourcesPlugin.getWorkspace();\r\n\t\tint typeMask = IResource.FILE | IResource.FOLDER;\r\n\t\tboolean valid = pathSegment.length() == 0 || \r\n\t\t\tworkspace.validateName(pathSegment, typeMask).isOK();\r\n\t\tif (valid) {\r\n\t\t\tfor (int i = 0; i < pathSegment.length(); i++) {\r\n\t\t\t\tchar c = pathSegment.charAt(i);\r\n\t\t\t\tvalid = Character.isLetterOrDigit(c) || (c == '-') || (c == '_') || (c == '.');\r\n\t\t\t\tif (!valid)\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn valid;\r\n\t}",
"private String cutPrefixFromFilePath(String path) {\n return path.replace(mainFolder, \"\");\n }",
"public boolean accept(File dir, String name) {\n return pattern.matcher(new File(name).getName()).matches();\n }",
"public boolean startsWith(String prefix) {\n char[] chs = prefix.toCharArray();\n TreeNode cur = root;\n for (int i = 0; i < chs.length; i++) {\n int ind = chs[i] - 'a';\n if (cur.map[ind] == null) {\n return false;\n }\n cur = cur.map[ind];\n }\n return true;\n }",
"boolean haveToSkip(String path);",
"private boolean examineName(String name) {\r\n resourceName = null;\r\n resourceIsClass = false;\r\n\r\n if (name.endsWith(\".java\")) {\r\n return false;\r\n }\r\n\r\n if (name.endsWith(\".class\")) {\r\n name = name.substring(0, name.length() - 6);\r\n if (classMap.containsKey(name)) {\r\n return false;\r\n }\r\n resourceIsClass = true;\r\n } else {\r\n if (resourceMap.containsKey(name)) {\r\n return false;\r\n }\r\n }\r\n\r\n resourceName = name;\r\n return true;\r\n }",
"public IAstSourceFile findIncludeFile(String string);",
"private boolean isPrefixFound(String line) {\n\t\tif (notab) {\n\t\t\treturn line.startsWith(prefix);\n\t\t} else {\n\t\t\treturn line.contains(prefix);\n\t\t}\n\t}",
"@Test\n public void testStartsWith() {\n chkInt(\"startsWith('a')\", false);\n chkLong(\"startsWith('a')\", false);\n chkNumber(\"startsWith('a')\", false);\n chkBoolean(\"startsWith('a')\", false);\n chkString(\"startsWith('aaZ')\", true, \"'aaZb'\");\n chkDate(\"startsWith('a')\", false);\n chkList(\"startsWith('a')\", false, \"[]\");\n chkEnum(\"startsWith('a')\", false);\n }",
"@Override\n public boolean accept(File file) {\n if (file.isDirectory()\n || file.getName().toLowerCase().endsWith(\".gpx\")) {\n return true;\n }\n return false;\n }",
"public static void main(String[] args)\r\n\t{\n\t\tPathMatcher urlMatcher = new AntPathMatcher();\r\n\t\tif (urlMatcher.match(\"/view/**\",\"/view/main\")) {\r\n\t\t\tSystem.out.println(\"true\");\r\n\t\t}else{\r\n\t\t\tSystem.out.println(\"false\");\r\n\t\t}\r\n\t}",
"@Override\n\t\t\tpublic boolean accept(File f) {\n\t\t\t\tif (f.isDirectory()) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\tString filename = f.getName().toLowerCase();\n\t\t\t\t\treturn filename.endsWith(\".pr1\");\n\t\t\t\t}\n\t\t\t}",
"private String analyseScanPath() {\n\t\t//1. get main module from init params\n\t\tString mainModule = Mvcs.servletConfig.getInitParameter(\"mainModule\");\n\t\tClass<?> cl = ClassUtil.getClass(mainModule);\n\t\tif(cl.isAnnotationPresent(ScanPackage.class)){\n\t\t\tScanPackage ann = cl.getAnnotation(ScanPackage.class);\n\t\t\t//get annotation path value\n\t\t\treturn ann.path();\n\t\t}\n\t\t//default return null\n\t\treturn null;\n\t}",
"private String checkPath(String pathToCheck, String extention) {\r\n\t\tString[] tokens = null;\r\n\t\tStringBuilder retval = new StringBuilder();\r\n\r\n\t\t// ako primljena eksenzija ima tocku na pocetku ona se brise\r\n\t\tif (extention.substring(0, 1).equals(\".\")) {\r\n\t\t\textention = extention.substring(1);\r\n\t\t}\r\n\r\n\t\t// ako je primljena \"ekstenzija\" all documents path se ne mijenja\r\n\t\tif (extention.equals(\"all\")) {\r\n\t\t\treturn pathToCheck;\r\n\t\t} else {\r\n\r\n\t\t\ttokens = pathToCheck.split(\"\\\\.\");\r\n\r\n\t\t\tif (tokens == null) {\r\n\t\t\t\treturn pathToCheck + \".\" + extention;\r\n\t\t\t} else {\r\n\t\t\t\t// ako primljeni path zavrsava sa dobrom ekstenzijom nista se ne\r\n\t\t\t\t// dodaje\r\n\t\t\t\tif (tokens[tokens.length - 1].equals(extention)) {\r\n\t\t\t\t\treturn pathToCheck;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// u suprotnome na primljeni path se ljepi ekstenzija\r\n\t\t\t\t\tfor (String token : tokens) {\r\n\t\t\t\t\t\tretval.append(token + \".\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn (retval.append(extention).toString());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}",
"public boolean startsWith(String prefix) {\n\t\tcur = root;\n\t\tfor (char c : prefix.toCharArray()) {\n\t\t\tif (cur == null)\n\t\t\t\treturn false;\n\t\t\tcur = cur.children[c - 'a'];\n\t\t}\n\t\treturn cur != null;\n\t}",
"public boolean fileCheck(String fileName) {\n ArrayList<String> includes = new ArrayList(Arrays.asList(\".mp4\", \".mkv\", \".avi\"));\n ArrayList<String> excludes = new ArrayList(Arrays.asList(\".jpg\"));\n boolean check = false;\n\n for (String hasThis : includes) { //check for one of the key file formats\n if (fileName.contains(hasThis)) {\n check = true;\n break;\n }\n }\n\n for (String doesntHave : excludes) { // if it has any of these, void the original assesment and return false\n if (fileName.contains(doesntHave)) {\n return false;\n }\n }\n\n return check;\n }"
]
| [
"0.67475474",
"0.65094227",
"0.6169538",
"0.6119068",
"0.59838367",
"0.58225477",
"0.57495654",
"0.5741806",
"0.56921166",
"0.5620204",
"0.560377",
"0.5585356",
"0.5575052",
"0.5558078",
"0.5527827",
"0.5485589",
"0.5476652",
"0.5399457",
"0.52938104",
"0.52682257",
"0.5253583",
"0.5235833",
"0.52311385",
"0.52276725",
"0.5216704",
"0.5205928",
"0.5189058",
"0.5175313",
"0.51534426",
"0.5142675",
"0.51413757",
"0.51291144",
"0.51257116",
"0.51172584",
"0.50933516",
"0.50874704",
"0.5047353",
"0.5047108",
"0.503215",
"0.5021925",
"0.49823135",
"0.49641457",
"0.49618602",
"0.49608117",
"0.4956061",
"0.49344653",
"0.49205816",
"0.49116075",
"0.49071202",
"0.49030522",
"0.48959875",
"0.48886696",
"0.48812932",
"0.48649442",
"0.48564938",
"0.48563525",
"0.48465547",
"0.48332214",
"0.48298672",
"0.48250479",
"0.48250479",
"0.48179936",
"0.48175538",
"0.48158088",
"0.47918707",
"0.47829378",
"0.47720575",
"0.47702742",
"0.47702295",
"0.47690853",
"0.47615322",
"0.4747204",
"0.47458535",
"0.47432563",
"0.47236875",
"0.47211552",
"0.47138867",
"0.4701765",
"0.47001156",
"0.46978128",
"0.4692748",
"0.46902326",
"0.46740416",
"0.46701023",
"0.46680817",
"0.46621022",
"0.4656357",
"0.46561792",
"0.46549702",
"0.46467006",
"0.46396968",
"0.46393892",
"0.4630036",
"0.46266267",
"0.46259305",
"0.46181896",
"0.46115592",
"0.46099445",
"0.46045747",
"0.4604115"
]
| 0.6524453 | 1 |
Creates new form CadastroClientes | public CadastroClientes() {
initComponents();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void makeClient() {\n try {\n clienteFacade.create(cliente);\n FacesContext.getCurrentInstance().addMessage(\"messages\", new FacesMessage(FacesMessage.SEVERITY_INFO, \"Cliente creado exitosamente\", null));\n } catch (Exception e) {\n System.err.println(\"Error en la creacion del usuario: \" + e.getMessage());\n FacesContext.getCurrentInstance().addMessage(\"messages\", new FacesMessage(FacesMessage.SEVERITY_FATAL, e.getMessage(), null));\n }\n }",
"public void carregarCadastro() {\n\n try {\n\n if (codigo != null) {\n\n ClienteDao fdao = new ClienteDao();\n\n cliente = fdao.buscarCodigo(codigo);\n\n } else {\n cliente = new Cliente();\n\n }\n } catch (RuntimeException e) {\n JSFUtil.AdicionarMensagemErro(\"ex.getMessage()\");\n e.printStackTrace();\n }\n\n }",
"@GetMapping(\"/cliente/new\")\n\tpublic String newCliente(Model model) {\n\t\tmodel.addAttribute(\"cliente\", new Cliente());\n\t\tControllerHelper.setEditMode(model, false);\n\t\t\n\t\t\n\t\treturn \"cadastro-cliente\";\n\t\t\n\t}",
"@FXML\n\tpublic void createClient(ActionEvent event) {\n\t\tString empty = \"\";\n\t\tString names = txtClientNames.getText();\n\t\tString surnames = txtClientSurnames.getText();\n\t\tString id = txtClientId.getText();\n\t\tString adress = txtClientAdress.getText();\n\t\tString phone = txtClientPhone.getText();\n\t\tString observations = txtClientObservations.getText();\n\n\t\tif (!names.equals(empty) && !surnames.equals(empty) && !id.equals(empty) && !adress.equals(empty)\n\t\t\t\t&& !phone.equals(empty) && !observations.equals(empty)) {\n\t\t\tcreateClient(names, surnames, id, adress, phone, observations, 1);\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.setContentText(\"Todos los campos de texto deben ser llenados\");\n\t\t\tdialog.show();\n\t\t}\n\t}",
"public ViewCreatePagamento() {\n initComponents();\n clientesDAO cDAO = DaoFactory.createClientesDao(); \n matriculaDAO mDAO = DaoFactory.createMatriculaDao();\n \n cmbIDClientes.addItem(null);\n cDAO.findAll().forEach((p) -> {\n cmbIDClientes.addItem(p.getNome());\n });\n \n \n txtDataAtual.setText(DateFormat.getDateInstance().format(new Date()));\n }",
"public FormularioCliente() {\n initComponents();\n }",
"public TelaPesquisarClientes() {\n initComponents();\n }",
"public ClienteModel(String nome,\n String email,\n String cpf,\n String sexo,\n String nascimento,\n String estadoCivil,\n String celular,\n String telefone,\n String endereco) {\n\n clientesCadastrados++;\n this.id = clientesCadastrados;\n this.nome = nome;\n this.email = email;\n this.cpf = cpf;\n this.nascimento = nascimento;\n this.sexo = sexo;\n this.estadoCivil = estadoCivil;\n this.celular = celular;\n this.telefone = telefone;\n this.endereco = endereco;\n }",
"public CadastroCliente() {\n initComponents();\n }",
"public void salvaCliente() {\n \n \n \n \n String nome = view.getjTextNome().getText(); //Tive que criar getter e setter pra poder acessar os campos da view\n String telefone = view.getjTextTelefone().getText();\n String cpf = view.getjTextCpf().getText();\n String endereco = view.getjTextEndereco().getText();\n\n \n Cliente client = new Cliente( nome, telefone, cpf, endereco);\n \n \n \n try {\n Connection conexao = new Conexao().getConnection();\n ClienteDAO clientedao = new ClienteDAO(conexao);\n clientedao.insert(client);\n \n JOptionPane.showMessageDialog(null, \"Cliente Cadastrado!\");\n \n } catch (SQLException ex) {\n //Logger.getLogger(CadCliente.class.getName()).log(Level.SEVERE, null, ex);\n JOptionPane.showMessageDialog(null, \"Erro ao cadastrar!\"+ex);\n }\n }",
"public frmCliente() {\n initComponents();\n CargarProvinciasRes();\n CargarProvinciasTra();\n ManejadorCliente objCli = new ManejadorCliente();\n }",
"@Override\n void create(Cliente cliente);",
"public Cliente(){\r\n this.nome = \"\";\r\n this.email = \"\";\r\n this.endereco = \"\";\r\n this.id = -1;\r\n }",
"public JF_CadastroCliente(Cliente_Bean c) {\n initComponents();\n iniciaFrm();\n testarCliente(c);\n }",
"public ClientesAgregar() {\n initComponents();\n }",
"public String crea() {\n c.setId(0);\n clienteDAO.crea(c); \n //Post-Redirect-Get\n return \"visualiza?faces-redirect=true&id=\"+c.getId();\n }",
"public ManterCliente() {\n try {\n initComponents();\n BloquearCampos();\n bt_salvar.setEnabled(false);\n bt_editar.setEnabled(false);\n txt_codigo.setEditable(true);\n mascaraCNPJ = new MaskFormatter(\"###.###.###/####-##\");\n mascaraCPF = new MaskFormatter(\"###.###.###-##\");\n } catch (ParseException ex) {\n JOptionPane.showMessageDialog(null, \"Erro ao carregar formulário. Contate o suporte.\");\n }\n }",
"public void carregarCliente() {\n\t\tgetConnection();\n\t\ttry {\n\t\t\tString sql = \"SELECT CLIENTE FROM CLIENTE ORDER BY CLIENTE\";\n\t\t\tst = con.createStatement();\n\t\t\trs = st.executeQuery(sql);\n\t\t\twhile(rs.next()) {\n\t\t\t\tcbCliente.addItem(rs.getString(\"CLIENTE\"));\n\t\t\t}\n\t\t}catch(SQLException e) {\n\t\t\tSystem.out.println(\"ERRO\" + e.toString());\n\t\t}\n\t}",
"public ClienteVO getFormCliente() {\n try {\n String nome = cadastroView.getTxtNome().getText();\n String cpf = cadastroView.getTxtCPF().getText().trim().replaceAll(\"\\\\.\", \"\").replaceAll(\"-\", \"\");\n String rg = cadastroView.getTxtRG().getText().trim();\n String email = cadastroView.getTxtEmail().getText().trim();\n String fone = cadastroView.getTxtTelefone().getText().trim().replace(\"(\", \"\").replace(\")\", \"\");\n return new ClienteVO(nome, cpf, rg, email, fone);\n } catch (Exception e) {\n System.out.println(e.getMessage());\n e.printStackTrace();\n }\n return null;\n }",
"public TelaCadastroCliente() {\n initComponents();\n }",
"public TelaCadastroCliente() {\n initComponents();\n }",
"private Client createClient() {\n\t\tClient client = null;\n\t\tvar clientsList = clientDAO.getClients();\n\t\tvar name = txtName.getText();\n\t\tvar surnames = txtSurnames.getText();\n\t\tvar dni = txtDni.getText();\n\t\tvar telephone = txtTelephone.getText();\n\n\t\tif (txtDni.getText().isBlank() || txtName.getText().isBlank() || txtSurnames.getText().isBlank()\n\t\t\t\t|| txtTelephone.getText().isBlank()) {\n\t\t\tJOptionPane.showMessageDialog(frame, \"Error, los campos no pueden estar vacios, ni contener solo espacios\",\n\t\t\t\t\t\"Warning!\", JOptionPane.ERROR_MESSAGE);\n\t\t} else {\n\t\t\t// Comprobar si el cliente ya existe\n\t\t\tvar exist = false;\n\t\t\tfor (int i = 0; i < clientsList.size(); ++i) {\n\t\t\t\tif (dni.equalsIgnoreCase(clientsList.get(i).getDni())) {\n\t\t\t\t\texist = true;\n\t\t\t\t\tJOptionPane.showMessageDialog(frame, \"Error, ya existe el DNI introducido\", \"Warning!\",\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!exist) {\n\t\t\t\tclient = new Client(dni, name, surnames, telephone);\n\t\t\t}\n\t\t}\n\n\t\treturn client;\n\t}",
"public AreaClientes() {\n initComponents();\n cargarTabla();\n editarCliente(false);\n \n }",
"public frmClienteIncobrable() {\n initComponents();\n \n //CARGAR PROVINCIAS\n ArrayList<clsComboBox> dataProvincia = objProvincia.consultarTipoIncobrable(); \n for(int i=0;i<dataProvincia.size();i=i+1)\n {\n clsComboBox oItem = new clsComboBox(dataProvincia.get(i).getCodigo(), dataProvincia.get(i).getDescripcion());\n cmbTipoIncobrable.addItem(oItem); \n } \n \n \n //CARGAR AUTOCOMPLETAR\n List<String> dataCedula = objCliente.consultarCedulas(); \n SelectAllUtils.install(txtCedula);\n ListDataIntelliHints intellihints = new ListDataIntelliHints(txtCedula, dataCedula); \n intellihints.setCaseSensitive(false);\n \n Date fechaActual = new Date();\n txtFecha.setDate(fechaActual);\n }",
"private void criaContaCliente (String cpf) {\n this.contasClientes.put(cpf, new Conta(cpf));\n }",
"public void selecionarCliente() {\n int cod = tabCliente.getSelectionModel().getSelectedItem().getCodigo();\n cli = cli.buscar(cod);\n\n cxCPF.setText(cli.getCpf());\n cxNome.setText(cli.getNome());\n cxRua.setText(cli.getRua());\n cxNumero.setText(Integer.toString(cli.getNumero()));\n cxBairro.setText(cli.getBairro());\n cxComplemento.setText(cli.getComplemento());\n cxTelefone1.setText(cli.getTelefone1());\n cxTelefone2.setText(cli.getTelefone2());\n cxEmail.setText(cli.getEmail());\n btnSalvar.setText(\"Novo\");\n bloquear(false);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n tfNombre = new javax.swing.JTextField();\n cbClientes = new javax.swing.JComboBox();\n jSeparator1 = new javax.swing.JSeparator();\n btnGuardarCliente = new javax.swing.JButton();\n jSeparator3 = new javax.swing.JSeparator();\n jLabel4 = new javax.swing.JLabel();\n tfDNI = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n tfCalle = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n tfNumero = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n tfPiso = new javax.swing.JTextField();\n jLabel8 = new javax.swing.JLabel();\n tfTelefono = new javax.swing.JTextField();\n jLabel9 = new javax.swing.JLabel();\n tfMail = new javax.swing.JTextField();\n jLabel10 = new javax.swing.JLabel();\n tfLetra = new javax.swing.JTextField();\n jLabel11 = new javax.swing.JLabel();\n tfCP = new javax.swing.JTextField();\n jLabel12 = new javax.swing.JLabel();\n tfProvincia = new javax.swing.JTextField();\n jPanel2 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n btnContinuar = new javax.swing.JButton();\n jMenuBar1 = new javax.swing.JMenuBar();\n mArchivo = new javax.swing.JMenu();\n mAjustes = new javax.swing.JMenu();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setMaximumSize(new java.awt.Dimension(600, 430));\n setMinimumSize(new java.awt.Dimension(600, 430));\n\n jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n jPanel1.setMaximumSize(new java.awt.Dimension(500, 300));\n jPanel1.setMinimumSize(new java.awt.Dimension(500, 300));\n jPanel1.setPreferredSize(new java.awt.Dimension(500, 300));\n jPanel1.setRequestFocusEnabled(false);\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel2.setText(\"Cliente:\");\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel3.setText(\"Nombre: \");\n\n cbClientes.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n btnGuardarCliente.setText(\"Guardar cliente nuevo\");\n btnGuardarCliente.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n btnGuardarCliente.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnGuardarClienteActionPerformed(evt);\n }\n });\n\n jSeparator3.setOrientation(javax.swing.SwingConstants.VERTICAL);\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel4.setText(\"DNI:\");\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel5.setText(\"Calle:\");\n\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel6.setText(\"Número:\");\n\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel7.setText(\"Piso:\");\n\n jLabel8.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel8.setText(\"Teléfono:\");\n\n jLabel9.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel9.setText(\"E-Mail:\");\n\n jLabel10.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel10.setText(\"Letra:\");\n\n jLabel11.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel11.setText(\"Código Postal:\");\n\n jLabel12.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel12.setText(\"Provincia:\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(33, 33, 33)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(cbClientes, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel3)\n .addComponent(jLabel4)\n .addComponent(jLabel8)\n .addComponent(jLabel9))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(87, 87, 87)\n .addComponent(btnGuardarCliente)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(tfNombre)\n .addComponent(tfDNI)\n .addComponent(tfTelefono)\n .addComponent(tfMail, javax.swing.GroupLayout.DEFAULT_SIZE, 136, Short.MAX_VALUE))\n .addGap(21, 21, 21)\n .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel5)\n .addComponent(jLabel7)\n .addComponent(jLabel6))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(tfCalle)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(tfPiso, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel10)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(tfLetra, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(tfNumero, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(0, 0, Short.MAX_VALUE))))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel11)\n .addGap(18, 18, 18)\n .addComponent(tfCP, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel12)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(tfProvincia)))\n .addGap(0, 34, Short.MAX_VALUE))))))))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 450, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(12, 12, 12))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(30, 30, 30)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(cbClientes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(5, 5, 5)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(tfNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(tfDNI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel8)\n .addComponent(tfTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel9)\n .addComponent(tfMail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(tfCalle, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(tfNumero, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(tfPiso, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel10)\n .addComponent(tfLetra, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel11)\n .addComponent(tfCP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(26, 26, 26)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel12)\n .addComponent(tfProvincia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 30, Short.MAX_VALUE)\n .addComponent(btnGuardarCliente)\n .addContainerGap(40, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 201, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())))\n );\n\n jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel1.setText(\"TIENDA DE MÚSICA\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(32, 32, 32)\n .addComponent(jLabel1)\n .addContainerGap(35, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n btnContinuar.setText(\"Continuar\");\n\n mArchivo.setText(\"Archivo\");\n jMenuBar1.add(mArchivo);\n\n mAjustes.setText(\"Ajustes\");\n jMenuBar1.add(mAjustes);\n\n setJMenuBar(jMenuBar1);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(186, Short.MAX_VALUE)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(183, 183, 183))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(47, 47, 47)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 516, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(259, 259, 259)\n .addComponent(btnContinuar)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(7, 7, 7)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 346, Short.MAX_VALUE)\n .addGap(18, 18, 18)\n .addComponent(btnContinuar)\n .addContainerGap())\n );\n\n pack();\n }",
"public JFAgregarCliente() {\n initComponents();\n inicializarCombos();\n }",
"public JPanelCreateClient() {\r\n\t\tsuper(new BorderLayout());\r\n\t\tthis.title = new CustomLabel(ConstantView.TITLE_CREATE_CLIENT, null, Color.decode(\"#2E5569\"));\r\n\t\tthis.okButton = new JButton(\"REGISTRAR CLIENTE\");\r\n\t\tthis.returnButton = new JButton(ConstantView.BUTTON_RETURN_SIGNIN);\r\n\t\tthis.jPanelFormClient = new JPanelFormClient();\r\n\t\tControlClient.getInstance().setjPanelCreateClient(this);\r\n\t\tthis.init();\r\n\t}",
"public CrearPedidos() {\n initComponents();\n }",
"public creacionempresa() {\n initComponents();\n mostrardatos();\n }",
"public String ajouterClient(){\n\t\tClient cAjout=cliService.ajouterClient(client);\r\n\t\t\r\n\t\tif(cAjout.getIdClient()!=0){\r\n\t\r\n\t\r\n\t\t\t\r\n\t\t\treturn \"accueilClient\";\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\t\tnew FacesMessage(\"L'ajout a échoué\"));\r\n\t\t\treturn \"creationClient\";\r\n\t\t}\r\n\t}",
"public CadastrarCliente() {\n initComponents();\n initComponents();\n FormatCamp();\n setLocation(110, 0);\n }",
"Cliente(){}",
"public GerenciarCliente() {\n initComponents();\n }",
"@FXML\n void agregarCliente(ActionEvent event) {\n try {\n if (txtNombreAC.getText().equals(\"\") || txtCedulaAC.getText().equals(\"\")\n || txtCodigoClienteAC.getText().equals(\"\") || txtTelefonoAC.getText().equals(\"\")\n || txtDireccionAC.equals(\"\") || txtApellidoAC.getText().equals(\"\"))\n throw new TypoException();\n Cliente n = new Cliente(Long.parseLong(txtCodigoClienteAC.getText()), Long.parseLong(txtCedulaAC.getText()),\n txtNombreAC.getText(), txtApellidoAC.getText(), txtDireccionAC.getText(),\n Long.parseLong(txtTelefonoAC.getText()));\n BotonesCliente.cGaleria.addCliente(n);\n txtCodigoClienteAC.clear();\n txtNombreAC.clear();\n txtApellidoAC.clear();\n txtCedulaAC.clear();\n txtTelefonoAC.clear();\n txtDireccionAC.clear();\n } catch (Exception e) {\n this.createNewStageError(e);\n }\n }",
"public Interfaz_RegistroClientes() {\n initComponents();\n limpiar();\n }",
"public TelaCliente() {\n \n CadCli = new Dao_CadastroCliente();\n initComponents();\n BtPesquisarConsulta.setEnabled(false);\n BtSalvarCli.setEnabled(false);\n BtAlterarCli.setEnabled(false);\n TipodeViaCli.setEnabled(false);\n TxEstadoCli.setEnabled(false);\n BtBuscarCli.setEnabled(false);\n BtLimparCli.setEnabled(false);\n TxTipoPessoa.setEnabled(false);\n PnlPj.setVisible(false);\n PnlPf.setVisible(false);\n centralizarComponente();\n\n }",
"public void agregarDatosCliente(Integer codCliente){\n try{\n ClienteDao clienteDao = new ClienteDaoImp();\n //obtenemos la instancia de Cliente en Base a su codigo\n this.cliente = clienteDao.obtenerClientePorCodigo(codCliente);\n //Mensaje de confirmacion de exito de la operacion\n FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO,\"Correcto\", \"Cliente agregado correctamente!\");\n FacesContext.getCurrentInstance().addMessage(null, message);\n }catch(Exception e){\n e.printStackTrace();\n }\n \n }",
"public CadastroProdutoNew() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n lbltitulo = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n lblrazonsocial = new javax.swing.JLabel();\n lbldireccion = new javax.swing.JLabel();\n lblciudad = new javax.swing.JLabel();\n lblcomuna = new javax.swing.JLabel();\n txtrut = new javax.swing.JTextField();\n txtverificador = new javax.swing.JTextField();\n txtseparador = new javax.swing.JLabel();\n txtrazonsocial = new javax.swing.JTextField();\n txtdireccion = new javax.swing.JTextField();\n txtciudad = new javax.swing.JTextField();\n txtcomuna = new javax.swing.JTextField();\n btnguardar = new javax.swing.JButton();\n btncancelar = new javax.swing.JButton();\n\n lbltitulo.setText(\"Nuevo Cliente :\");\n\n jLabel2.setText(\"Rut\");\n\n lblrazonsocial.setText(\"Razon Social\");\n\n lbldireccion.setText(\"Direccion\");\n\n lblciudad.setText(\"Ciudad\");\n\n lblcomuna.setText(\"Comuna\");\n\n txtseparador.setText(\" -\");\n\n btnguardar.setText(\"Guardar\");\n\n btncancelar.setText(\"Cancelar\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(lbltitulo))\n .addGroup(layout.createSequentialGroup()\n .addGap(27, 27, 27)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lblrazonsocial)\n .addComponent(jLabel2)\n .addComponent(lbldireccion)\n .addComponent(lblciudad)\n .addComponent(lblcomuna))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(txtrut, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtseparador, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(4, 4, 4)\n .addComponent(txtverificador, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(txtrazonsocial)\n .addComponent(txtdireccion)\n .addComponent(txtciudad)\n .addComponent(txtcomuna))))\n .addContainerGap(98, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGap(52, 52, 52)\n .addComponent(btnguardar, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btncancelar, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(71, 71, 71))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(23, 23, 23)\n .addComponent(lbltitulo)\n .addGap(22, 22, 22)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(txtrut, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtverificador, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtseparador))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblrazonsocial)\n .addComponent(txtrazonsocial, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lbldireccion)\n .addComponent(txtdireccion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lblciudad)\n .addComponent(txtciudad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lblcomuna)\n .addComponent(txtcomuna, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 30, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnguardar)\n .addComponent(btncancelar))\n .addContainerGap())\n );\n\n pack();\n }",
"public JFNuevoCliente() {\n initComponents();\n \n }",
"public MostraVenta(String idtrasp, Object[][] clienteM1, Object[][] vendedorM1, String idmarc, String responsable,ListaTraspaso panel)\n{\n this.padre = panel;\n this.clienteM = clienteM1;\n this.vendedorM = vendedorM1;\n this.idtraspaso= idtrasp;\n this.idmarca=idmarc;\n//this.tipoenvioM = new String[]{\"INGRESO\", \"TRASPASO\"};\n String tituloTabla =\"Detalle Venta\";\n // padre=panel;\n String nombreBoton1 = \"Registrar\";\n String nombreBoton2 = \"Cancelar\";\n // String nombreBoton3 = \"Eliminar Empresa\";\n\n setId(\"win-NuevaEmpresaForm1\");\n setTitle(tituloTabla);\n setWidth(400);\n setMinWidth(ANCHO);\n setHeight(250);\n setLayout(new FitLayout());\n setPaddings(WINDOW_PADDING);\n setButtonAlign(Position.CENTER);\n setCloseAction(Window.CLOSE);\n setPlain(true);\n\n but_aceptar = new Button(nombreBoton1);\n but_cancelar = new Button(nombreBoton2);\n // addButton(but_aceptarv);\n addButton(but_aceptar);\n addButton(but_cancelar);\n\n formPanelCliente = new FormPanel();\n formPanelCliente.setBaseCls(\"x-plain\");\n //formPanelCliente.setLabelWidth(130);\n formPanelCliente.setUrl(\"save-form.php\");\n formPanelCliente.setWidth(ANCHO);\n formPanelCliente.setHeight(ALTO);\n formPanelCliente.setLabelAlign(Position.LEFT);\n\n formPanelCliente.setAutoWidth(true);\n\n\ndat_fecha1 = new DateField(\"Fecha\", \"d-m-Y\");\n fechahoy = new Date();\n dat_fecha1.setValue(fechahoy);\n dat_fecha1.setReadOnly(true);\n\ncom_vendedor = new ComboBox(\"Vendedor al que enviamos\", \"idempleado\");\ncom_cliente = new ComboBox(\"Clientes\", \"idcliente\");\n//com_tipo = new ComboBox(\"Tipo Envio\", \"idtipo\");\n initValues1();\n\n\n\n formPanelCliente.add(dat_fecha1);\n// formPanelCliente.add(com_tipo);\n// formPanelCliente.add(tex_nombreC);\n// formPanelCliente.add(tex_codigoBarra);\n // formPanelCliente.add(tex_codigoC);\nformPanelCliente.add(com_vendedor);\n formPanelCliente.add(com_cliente);\n add(formPanelCliente);\nanadirListenersTexfield();\n addListeners();\n\n }",
"public ClienteModel(int id,\n String nome,\n String email,\n String cpf,\n String sexo,\n String nascimento,\n String estadoCivil,\n String celular,\n String telefone,\n String endereco) {\n\n this.id = id;\n this.nome = nome;\n this.email = email;\n this.cpf = cpf;\n this.nascimento = nascimento;\n this.sexo = sexo;\n this.estadoCivil = estadoCivil;\n this.celular = celular;\n this.telefone = telefone;\n this.endereco = endereco;\n }",
"public ClientView(Client client) {\n initComponents();\n this.setLocationRelativeTo(null);\n this.client = client;\n \n if(client != null){\n lblAction.setText(\"Alterar Cliente\");\n txtCpf.setEditable(false);\n btnAction.setText(\"Alterar\");\n \n try {\n client = new ClientDAO().search(client);\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(this, \"Erro de SQL: \\n\" + ex.getMessage(), \"Erro\", 0);\n } catch (ClassNotFoundException ex) {\n JOptionPane.showMessageDialog(this, \"Erro de Classe: \\n\" + ex.getMessage(), \"Erro\", 0);\n }\n \n txtCpf.setText(client.getCpf());\n txtName.setText(client.getName());\n cbCateg.setSelectedIndex(client.getCateg());\n }\n }",
"@PostMapping(\"/agregarCliente\")\r\n public @ResponseBody\r\n Map<String, Object> agregarCliente(\r\n @RequestParam(\"tipoDocumento\") String tipoDocumento,\r\n @RequestParam(\"documento\") String documento,\r\n @RequestParam(\"nombre\") String nombre,\r\n @RequestParam(\"pais\") String pais,\r\n @RequestParam(\"ciudad\") String ciudad,\r\n @RequestParam(\"direccion\") String direccion,\r\n @RequestParam(\"telefono\") String telefono,\r\n @RequestParam(\"correo\") String correo) {\r\n try {\r\n\r\n Cliente CL = new Cliente();\r\n\r\n CL.setTipoDocumento(tipoDocumento);\r\n CL.setDocumento(documento);\r\n CL.setNombre(nombre);\r\n CL.setPais(pais);\r\n CL.setCiudad(ciudad);\r\n CL.setDireccion(direccion);\r\n CL.setTelefono(telefono);\r\n CL.setCorreo(correo.toLowerCase());\r\n CL.setUser(usuario());\r\n\r\n clienteRepository.save(CL);\r\n\r\n return ResponseUtil.mapOK(CL);\r\n } catch (Exception e) {\r\n return ResponseUtil.mapError(\"Error en el proceso \" + e);\r\n }\r\n }",
"public ClientEditPage createNewClient() throws Exception {\n if (isNotAt()) {\n goTo();\n }\n newClientButton.click();\n Thread.sleep(Browser.getDelayAfterNewItemClick());\n return Pages.getClientEditPage();\n }",
"public viewAgregarClientes(Directorio directorio) {\n initComponents();\n this.directorio=directorio;\n }",
"public CarritoComprasView(Cliente cliente, CentroComercialView centroComercialView) {\n this.setResizable(false);\n \n this.cliente = cliente;\n this.centroComercialView = centroComercialView;\n\n initComponents();\n this.setLocationRelativeTo(null);\n\n //Inicialización de los elementos de la vista.\n eliminarArticuloButton.setEnabled(false);\n eliminarPaqueteButton.setEnabled(false);\n\n mostrarCantidadProductos();\n mostrarTotalAPagar();\n mostrarArticulos();\n mostrarPaquetes();\n\n }",
"private void iniciaFrm() {\n statusLbls(false);\n statusBtnInicial();\n try {\n clientes = new Cliente_DAO().findAll();\n } catch (Exception ex) {\n Logger.getLogger(JF_CadastroCliente.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public ClientesCadastrados() {\n initComponents();\n tabelaClientes();\n Tabela.setRowSelectionAllowed(false);\n Tabela.getTableHeader().setReorderingAllowed(false);\n setIcone();\n }",
"public PrincipalClienteView() {\n \n initComponents();\n \n try {\n // TODO add your handling code here:\n ClienteCtl ctl = new ClienteCtl();\n String nombre = txtNombre.getText();\n ArrayList list = ctl.listCliente(nombre);\n //JOptionPane.showMessageDialog(rootPane, \"A punto de mostrar los datos...\");\n modelo2 = showDatos(list);\n } catch (Exception ex) {\n Logger.getLogger(PrincipalClienteView.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n txtRUT = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n txtRazonSocial = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n txtDIRECCION = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n txtCIUDAD = new javax.swing.JComboBox<>();\n txtComuna = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n btnsalir = new javax.swing.JButton();\n\n jLabel1.setFont(new java.awt.Font(\"sansserif\", 0, 18)); // NOI18N\n jLabel1.setText(\"Nuevo Cliente\");\n\n jLabel2.setFont(new java.awt.Font(\"sansserif\", 0, 14)); // NOI18N\n jLabel2.setText(\"RUT\");\n\n txtRUT.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtRUTActionPerformed(evt);\n }\n });\n\n jLabel3.setFont(new java.awt.Font(\"sansserif\", 0, 24)); // NOI18N\n jLabel3.setText(\"-\");\n\n jLabel4.setFont(new java.awt.Font(\"sansserif\", 0, 14)); // NOI18N\n jLabel4.setText(\"RAZON SOCIAL\");\n\n jLabel5.setFont(new java.awt.Font(\"sansserif\", 0, 14)); // NOI18N\n jLabel5.setText(\"DIRECCIÓN\");\n\n jLabel6.setFont(new java.awt.Font(\"sansserif\", 0, 14)); // NOI18N\n jLabel6.setText(\"CIUDAD\");\n\n txtCIUDAD.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Coquimbo\", \"Serena\", \"GranSantiago\", \" Gran Valparaíso\", \" Gran Concepción\", \" Antofagasta\", \" Temuco\", \" Puerto Montt\", \" Iquique\", \" Talca\", \" Valdivia\", \"Rancagua\" }));\n txtCIUDAD.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtCIUDADActionPerformed(evt);\n }\n });\n\n txtComuna.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtComunaActionPerformed(evt);\n }\n });\n\n jLabel7.setFont(new java.awt.Font(\"sansserif\", 0, 14)); // NOI18N\n jLabel7.setText(\"COMUNA\");\n\n jButton1.setText(\"Guardar\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n btnsalir.setText(\"Salir\");\n btnsalir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnsalirActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(113, 113, 113)\n .addComponent(jLabel1)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addComponent(jLabel5)\n .addComponent(jLabel6)\n .addComponent(jLabel7))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtComuna)\n .addComponent(txtRazonSocial)\n .addComponent(txtDIRECCION)\n .addComponent(txtCIUDAD, javax.swing.GroupLayout.PREFERRED_SIZE, 265, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(63, 63, 63)\n .addComponent(txtRUT, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(138, 138, 138)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(btnsalir, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel7)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel2)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(8, 8, 8)\n .addComponent(txtRUT, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(txtRazonSocial, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(txtDIRECCION, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(txtCIUDAD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(txtComuna, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnsalir, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n pack();\n }",
"public ListaCliente() {\n initComponents();\n carregarTabela();\n }",
"public TelaCliente() {\n initComponents();\n }",
"public TelaCliente() {\n initComponents();\n }",
"private JComboBox<Cliente> crearComboClientes() {\n\n JComboBox<Cliente> combo = new JComboBox<>(new Vector<>(almacen.getClientes()));\n combo.setMaximumSize(new Dimension(500, 40));\n\n combo.setRenderer(new DefaultListCellRenderer() {\n @Override\n public Component getListCellRendererComponent(JList<? extends Object> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {\n\n Component resultado = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);\n\n Cliente cliente = (Cliente) value;\n this.setText(cliente != null ? cliente.getNombre() : \"No existen clientes\");\n\n return resultado;\n }\n });\n\n return combo;\n }",
"public ControladorClientes(Vista vistaCliente) {\r\n\t\tthis.vistaCliente = vistaCliente;\r\n\t\tthis.clienteDao = new ClienteDAO();\r\n\t}",
"public de_gestionar_contrato_añadir() {\n initComponents();\n lbl_error_nombre_cliente.setVisible(false);\n lbl_error_numero_contrato.setVisible(false);\n lbl_error_fecha_inicio.setVisible(false);\n lbl.setVisible(false);\n lbl_fecha_expira_contrato.setVisible(false);\n\n // detectar cambio en jdateChoser (fecha de inicio en agregar contrato)\n fecha_inicio_contrato.getDateEditor().addPropertyChangeListener(\n new PropertyChangeListener() {\n @Override\n public void propertyChange(PropertyChangeEvent e) {\n if (\"date\".equals(e.getPropertyName())) {\n System.out.println(e.getPropertyName()\n + \": \" + (Date) e.getNewValue());\n if(fecha_inicio_contrato.getDate()!=null){\n lbl_fecha_expira_contrato.setText(toma_fecha(fecha_inicio_contrato).substring(0,6)+String.valueOf(Integer.parseInt(toma_fecha(fecha_inicio_contrato).substring(6))+1));\n lbl.setVisible(true);\n lbl_fecha_expira_contrato.setVisible(true);\n }\n }else{\n lbl_fecha_expira_contrato.setText(\"\");\n lbl_error_fecha_inicio.setVisible(false);\n lbl.setVisible(false);\n lbl_fecha_expira_contrato.setVisible(false);\n }\n }\n });\n this.add(fecha_inicio_contrato);\n \n deshabilitarPegar();\n }",
"public clientesBean() {\n this.clie = new Clientes();\n }",
"public ClienteConsultas() {\n listadeClientes = new ArrayList<>();\n clienteSeleccionado = new ArrayList<>();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jtfDni = new javax.swing.JTextField();\n jtfNombre = new javax.swing.JTextField();\n jtfApellido = new javax.swing.JTextField();\n jtfDomicilio = new javax.swing.JTextField();\n jtfTelefono = new javax.swing.JTextField();\n jButtonNuevo = new javax.swing.JButton();\n jButtonGuardar = new javax.swing.JButton();\n jButtonSalir = new javax.swing.JButton();\n jtfCiudad = new javax.swing.JTextField();\n\n setClosable(true);\n setIconifiable(true);\n setMaximizable(true);\n\n jLabel1.setText(\"Agregar Cliente\");\n\n jLabel2.setText(\"DNI\");\n\n jLabel3.setText(\"Nombre\");\n\n jLabel4.setText(\"Apellido\");\n\n jLabel5.setText(\"Ciudad\");\n\n jLabel6.setText(\"Domicilio\");\n\n jLabel7.setText(\"Telefono\");\n\n jButtonNuevo.setText(\"Nuevo\");\n jButtonNuevo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonNuevoActionPerformed(evt);\n }\n });\n\n jButtonGuardar.setText(\"Guardar\");\n jButtonGuardar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonGuardarActionPerformed(evt);\n }\n });\n\n jButtonSalir.setText(\"Salir\");\n jButtonSalir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonSalirActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButtonNuevo)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED))\n .addGroup(layout.createSequentialGroup()\n .addGap(49, 49, 49)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel3)\n .addComponent(jLabel2)\n .addComponent(jLabel4)\n .addComponent(jLabel5)\n .addComponent(jLabel6)\n .addComponent(jLabel7))\n .addGap(47, 47, 47)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jtfTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jtfCiudad, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 53, Short.MAX_VALUE)\n .addComponent(jtfDomicilio, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jtfApellido, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jtfDni, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jtfNombre, javax.swing.GroupLayout.Alignment.LEADING)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addComponent(jButtonGuardar)\n .addGap(26, 26, 26)\n .addComponent(jButtonSalir)\n .addGap(39, 39, 39))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(jtfDni, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jtfNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(10, 10, 10)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jtfApellido, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jtfCiudad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(7, 7, 7)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(jtfDomicilio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(jtfTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 30, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButtonNuevo)\n .addComponent(jButtonGuardar)\n .addComponent(jButtonSalir))\n .addGap(35, 35, 35))\n );\n\n pack();\n }",
"public void agregarDatosClienteText(){\n try{\n \n if(codigoCliente== null){\n return; //para que nos mantenga siempre en el imput\n } \n \n ClienteDao clienteDao = new ClienteDaoImp();\n //obtenemos la instancia de Cliente en Base a su codigo\n this.cliente = clienteDao.obtenerClientePorCodigo(codigoCliente);\n \n if(cliente != null){\n codigoCliente = null;\n RequestContext.getCurrentInstance().update(\"frmFactura:inputCodCliente\");\n //Mensaje de confirmacion de exito de la operacion \n FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO,\"Correcto\", \"Cliente agregado correctamente!\");\n FacesContext.getCurrentInstance().addMessage(null, message); \n }else{\n codigoCliente = null;\n RequestContext.getCurrentInstance().update(\"frmFactura:inputCodCliente\");\n FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR,\"Error\", \"Cliente No encontrado con ese codigo\");\n FacesContext.getCurrentInstance().addMessage(null, message); \n }\n \n //codigoCliente = null; \n }catch(Exception e){\n e.printStackTrace();\n } \n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n txtID = new javax.swing.JTextField();\n txtNome = new javax.swing.JTextField();\n txtDDD = new javax.swing.JTextField();\n txtTelefone = new javax.swing.JTextField();\n txtEmail = new javax.swing.JTextField();\n txtCPF = new javax.swing.JTextField();\n txtRG = new javax.swing.JTextField();\n txtDtnascimento = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n btSalvar = new javax.swing.JButton();\n btCancelar = new javax.swing.JButton();\n jPanel1 = new javax.swing.JPanel();\n jLabel8 = new javax.swing.JLabel();\n\n setClosable(true);\n setForeground(java.awt.Color.white);\n setIconifiable(true);\n setMaximizable(true);\n setResizable(true);\n setTitle(\"Cadastrar Cliente\");\n setToolTipText(\"\");\n\n txtNome.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtNomeActionPerformed(evt);\n }\n });\n\n txtDDD.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtDDDActionPerformed(evt);\n }\n });\n\n txtEmail.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtEmailActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n jLabel1.setText(\"ID:\");\n\n jLabel2.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n jLabel2.setText(\"Nome:\");\n\n jLabel3.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n jLabel3.setText(\"Telefone:\");\n\n jLabel4.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n jLabel4.setText(\"Email:\");\n\n jLabel5.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n jLabel5.setText(\"CPF:\");\n\n jLabel6.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n jLabel6.setText(\"RG:\");\n\n jLabel7.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n jLabel7.setText(\"Data de Nascimento:\");\n\n btSalvar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Icones/icons8-salvar-32.png\"))); // NOI18N\n btSalvar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btSalvarActionPerformed(evt);\n }\n });\n\n btCancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Icones/icons8-cancelar-32.png\"))); // NOI18N\n btCancelar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btCancelarActionPerformed(evt);\n }\n });\n\n jPanel1.setBackground(new java.awt.Color(204, 204, 204));\n jPanel1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));\n\n jLabel8.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n jLabel8.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Icones/icons8-adicionar-usuário-masculino-32.png\"))); // NOI18N\n jLabel8.setText(\"CADASTRAR CLIENTES\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(99, 99, 99)\n .addComponent(jLabel8)\n .addContainerGap(126, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel8)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtID, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtNome, javax.swing.GroupLayout.PREFERRED_SIZE, 236, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtDDD, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtTelefone, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtEmail, javax.swing.GroupLayout.PREFERRED_SIZE, 236, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(txtRG, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtCPF, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel7)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(btSalvar)\n .addComponent(txtDtnascimento, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(btCancelar)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(txtID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(txtNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(txtDDD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtTelefone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(txtEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(txtCPF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(txtRG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(txtDtnascimento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 16, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btCancelar)\n .addComponent(btSalvar))\n .addGap(31, 31, 31))\n );\n\n pack();\n }",
"public void crearInsertCliente() {\n\t\tgetContentPane().setLayout(new BorderLayout());\n\t\t\n\t\tJPanel p0 = new JPanel();\n\t\tp1 = new JPanel();\n\t\tp2 = new JPanel();\n\t\t\t\t\n\t\t// Grid Layout # rows, # columns\n\t\tp0.setLayout(new GridLayout(8,1));\n\t\tp1.setLayout(new GridLayout(8,2));\n\t\tp2.setLayout(new GridLayout(1,2));\n\t\t\n\t\t/*\n\t\t * Creating Textfields, adding them to list of \n\t\t * textfields textos to be able to get them in \n\t\t * the Controller + adding textfields to panel\n\t\t */\n\t\tfor (int i=0; i<8; i++) {\n\t\t\ttf = new JTextField();\n textos.add(tf);\n\t\t\tp1.add(tf);\n\t\t}\n\t\t\n\t\t// Creating Labels + Buttons\n\n\t\tJLabel labelRUT = new JLabel(\"RUT : \");\t\t\n\t\tJLabel labelNombre = new JLabel(\"Nombre : \");\n\t\tJLabel labelOcup = new JLabel(\"Ocupacion : \");\n\t\tJLabel labelCorreo = new JLabel(\"Correo : \");\n\t\tJLabel labelTel = new JLabel(\"Telefono : \");\n\t\tJLabel labelNbUsuario = new JLabel(\"Nombre de Usuario : \");\n\t\tJLabel labelContr = new JLabel(\"Contraseña : \");\n\t\tJLabel labelMoros = new JLabel(\"Morosidad (false/ true) : \");\n\t\t\n\t\tJButton buttonRegresar = new JButton(\"Regresar\");\n\t\tbotones.add(buttonRegresar);\n buttonRegresar.setPreferredSize(new Dimension(110,110));\n\n\t\tJButton buttonContinuar = new JButton(\"Continuar\");\n\t\tbotones.add(buttonContinuar);\n\t\tbuttonContinuar.setPreferredSize(new Dimension(110,110));\n\t\t\n\t\t// Adding components to Panel\n\t\t// TODO : REFACTOR with for loop?!\n\t\t\n\t\tp0.add(labelRUT);\n\t\tp0.add(labelNombre);\n\t\tp0.add(labelOcup);\n\t\tp0.add(labelCorreo);\n\t\tp0.add(labelTel);\n\t\tp0.add(labelNbUsuario);\n\t\tp0.add(labelContr);\n\t\tp0.add(labelMoros);\n\t\t\n\t\tp2.add(buttonRegresar);\n\t\tp2.add(buttonContinuar);\n\t\t\n\t\t// Add panels to general Layouts\n\t\tadd(p0, BorderLayout.WEST);\n\t\tadd(p1, BorderLayout.CENTER);\n\t add(p2, BorderLayout.SOUTH);\n\t}",
"public clientesagregarclass() {\n initComponents();\n }",
"public Cliente(String nome, String telefone, String cpf) {\r\n\t\tthis.nome = nome;\r\n\t\tthis.telefone = telefone;\r\n\t\tthis.cpf = cpf;\r\n\t}",
"public ListaCliente() {\n\t\tClienteRepositorio repositorio = FabricaPersistencia.fabricarCliente();\n\t\tList<Cliente> clientes = null;\n\t\ttry {\n\t\t\tclientes = repositorio.getClientes();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tclientes = new ArrayList<Cliente>();\n\t\t}\n\t\tObject[][] grid = new Object[clientes.size()][3];\n\t\tfor (int ct = 0; ct < clientes.size(); ct++) {\n\t\t\tgrid[ct] = new Object[] {clientes.get(ct).getNome(),\n\t\t\t\t\tclientes.get(ct).getEmail()};\n\t\t}\n\t\tJTable table= new JTable(grid, new String[] {\"NOME\", \"EMAIL\"});\n\t\tJScrollPane scroll = new JScrollPane(table);\n\t\tgetContentPane().add(scroll, BorderLayout.CENTER);\n\t\tsetTitle(\"Clientes Cadastrados\");\n\t\tsetSize(600,400);\n\t\tsetDefaultCloseOperation(DISPOSE_ON_CLOSE);\n\t\tsetLocationRelativeTo(null);\n\t}",
"public Cliente() {\n setUndecorated(true);\n initComponents();\n jLabel7.setText(\"Usted Cuenta con: \"+ connecion.dinero);\n llenarTablaReservaciones(jTableMostrarReserva,\"FK_Usuario\");\n// jTableMostrarReserva.removeColumn(jTableMostrarReserva.getColumn(\"Id\"));\n// jTableMostrarReserva.removeColumn(jTableMostrarReserva.getColumn(\"Id\"));\n connecion.MostarTEsta(\"ID_Estado\", \"1\");\n this.setSize(848, 512);\n this.setLocationRelativeTo(null);\n \n }",
"@SuppressWarnings(\"unchecked\")\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\r\n private void initComponents() {\r\n\r\n jLabel1 = new javax.swing.JLabel();\r\n txtId = new javax.swing.JTextField();\r\n jLabel2 = new javax.swing.JLabel();\r\n cbTipo = new javax.swing.JComboBox<>();\r\n jLabel3 = new javax.swing.JLabel();\r\n txtDataEmissao = new javax.swing.JFormattedTextField();\r\n jLabel4 = new javax.swing.JLabel();\r\n txtDiasEntrega = new javax.swing.JFormattedTextField();\r\n jLabel5 = new javax.swing.JLabel();\r\n txtPedido = new javax.swing.JTextField();\r\n jLabel6 = new javax.swing.JLabel();\r\n cbClientes = new javax.swing.JComboBox<>();\r\n jLabel7 = new javax.swing.JLabel();\r\n txtUsuario = new javax.swing.JTextField();\r\n btnBuscaPedido = new javax.swing.JButton();\r\n btnCadastrar = new javax.swing.JButton();\r\n btnExcluir = new javax.swing.JButton();\r\n btnAlterar = new javax.swing.JButton();\r\n btnConfirmar = new javax.swing.JButton();\r\n btnCancelar = new javax.swing.JButton();\r\n jLabel8 = new javax.swing.JLabel();\r\n cbOrcamento = new javax.swing.JComboBox<>();\r\n btnVoltar1 = new javax.swing.JButton();\r\n jLabel9 = new javax.swing.JLabel();\r\n\r\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\r\n setTitle(\"Cadastra pedidos\");\r\n setResizable(false);\r\n\r\n jLabel1.setText(\"Id\");\r\n\r\n txtId.setEnabled(false);\r\n\r\n jLabel2.setText(\"Tipo\");\r\n\r\n cbTipo.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Proprio\", \"Terceiro\" }));\r\n cbTipo.setEnabled(false);\r\n\r\n jLabel3.setText(\"Data de emissão\");\r\n\r\n txtDataEmissao.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.DateFormatter()));\r\n txtDataEmissao.setText(\"dd/MM/yyyy\");\r\n txtDataEmissao.setEnabled(false);\r\n\r\n jLabel4.setText(\"Entrega em\");\r\n\r\n txtDiasEntrega.setEnabled(false);\r\n\r\n jLabel5.setText(\"Nº do pedido\");\r\n\r\n txtPedido.setEnabled(false);\r\n\r\n jLabel6.setText(\"Cliente\");\r\n\r\n cbClientes.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\r\n cbClientes.setEnabled(false);\r\n\r\n jLabel7.setText(\"Usuario\");\r\n\r\n txtUsuario.setEnabled(false);\r\n\r\n btnBuscaPedido.setText(\"Busca de pedidos\");\r\n btnBuscaPedido.setEnabled(false);\r\n btnBuscaPedido.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnBuscaPedidoActionPerformed(evt);\r\n }\r\n });\r\n\r\n btnCadastrar.setText(\"Cadastrar\");\r\n btnCadastrar.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnCadastrarActionPerformed(evt);\r\n }\r\n });\r\n\r\n btnExcluir.setText(\"Excluir\");\r\n btnExcluir.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnExcluirActionPerformed(evt);\r\n }\r\n });\r\n\r\n btnAlterar.setText(\"Alterar\");\r\n btnAlterar.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnAlterarActionPerformed(evt);\r\n }\r\n });\r\n\r\n btnConfirmar.setText(\"Confirmar\");\r\n btnConfirmar.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnConfirmarActionPerformed(evt);\r\n }\r\n });\r\n\r\n btnCancelar.setText(\"Fechar\");\r\n btnCancelar.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnCancelarActionPerformed(evt);\r\n }\r\n });\r\n\r\n jLabel8.setText(\"Orçamento\");\r\n\r\n cbOrcamento.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\r\n cbOrcamento.setEnabled(false);\r\n\r\n btnVoltar1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagens/undo.png\"))); // NOI18N\r\n btnVoltar1.setText(\"Voltar\");\r\n btnVoltar1.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnVoltar1ActionPerformed(evt);\r\n }\r\n });\r\n\r\n jLabel9.setText(\"dias\");\r\n\r\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\r\n getContentPane().setLayout(layout);\r\n layout.setHorizontalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel1)\r\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGroup(layout.createSequentialGroup()\r\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGap(48, 48, 48)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\r\n .addComponent(txtPedido)\r\n .addComponent(txtUsuario, javax.swing.GroupLayout.DEFAULT_SIZE, 110, Short.MAX_VALUE)\r\n .addComponent(txtId, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(cbTipo, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\r\n .addGap(18, 18, 18)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel4)\r\n .addComponent(jLabel3)\r\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(23, 23, 23)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(cbOrcamento, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(cbClientes, javax.swing.GroupLayout.Alignment.TRAILING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(txtDataEmissao, javax.swing.GroupLayout.DEFAULT_SIZE, 187, Short.MAX_VALUE)\r\n .addGroup(layout.createSequentialGroup()\r\n .addComponent(txtDiasEntrega, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addComponent(jLabel9)\r\n .addGap(0, 0, Short.MAX_VALUE))))\r\n .addGroup(layout.createSequentialGroup()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\r\n .addComponent(btnCadastrar, javax.swing.GroupLayout.DEFAULT_SIZE, 131, Short.MAX_VALUE)\r\n .addComponent(btnExcluir, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 21, Short.MAX_VALUE)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\r\n .addComponent(btnBuscaPedido, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(btnAlterar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n .addGap(18, 18, 18)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(btnVoltar1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(btnConfirmar, javax.swing.GroupLayout.DEFAULT_SIZE, 103, Short.MAX_VALUE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addComponent(btnCancelar, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGap(1, 1, 1)))\r\n .addContainerGap())\r\n );\r\n layout.setVerticalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel1)\r\n .addComponent(txtId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel3)\r\n .addComponent(txtDataEmissao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(16, 16, 16)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel2)\r\n .addComponent(cbTipo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel4)\r\n .addComponent(txtDiasEntrega, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel9))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel5)\r\n .addComponent(txtPedido, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel6)\r\n .addComponent(cbClientes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel7)\r\n .addComponent(txtUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel8)\r\n .addComponent(cbOrcamento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 23, Short.MAX_VALUE)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(btnCadastrar)\r\n .addComponent(btnConfirmar)\r\n .addComponent(btnAlterar))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(btnCancelar)\r\n .addComponent(btnVoltar1)\r\n .addComponent(btnExcluir)\r\n .addComponent(btnBuscaPedido))\r\n .addContainerGap())\r\n );\r\n\r\n pack();\r\n }",
"public Cliente(String nome) {\n super(nome);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLAgregarClientes = new javax.swing.JLabel();\n jLDni = new javax.swing.JLabel();\n jLNombre = new javax.swing.JLabel();\n jLApellido = new javax.swing.JLabel();\n jLCiudad = new javax.swing.JLabel();\n jLDomicilio = new javax.swing.JLabel();\n jLTelefono = new javax.swing.JLabel();\n jTDni = new javax.swing.JTextField();\n jTNombre = new javax.swing.JTextField();\n jTApellido = new javax.swing.JTextField();\n jTCiudad = new javax.swing.JTextField();\n jTDomicilio = new javax.swing.JTextField();\n jTTelefono = new javax.swing.JTextField();\n jBNuevo = new javax.swing.JButton();\n jBGuardar = new javax.swing.JButton();\n jBSalir = new javax.swing.JButton();\n\n jLAgregarClientes.setFont(new java.awt.Font(\"Dialog\", 2, 18)); // NOI18N\n jLAgregarClientes.setForeground(new java.awt.Color(0, 153, 153));\n jLAgregarClientes.setText(\"Agregar Clientes\");\n\n jLDni.setForeground(new java.awt.Color(0, 153, 153));\n jLDni.setText(\"DNI:\");\n\n jLNombre.setForeground(new java.awt.Color(0, 153, 153));\n jLNombre.setText(\"NOMBRE:\");\n\n jLApellido.setForeground(new java.awt.Color(0, 153, 153));\n jLApellido.setText(\"APELLIDO:\");\n\n jLCiudad.setForeground(new java.awt.Color(0, 153, 153));\n jLCiudad.setText(\"CIUDAD:\");\n\n jLDomicilio.setForeground(new java.awt.Color(0, 153, 153));\n jLDomicilio.setText(\"DOMICIL...\");\n\n jLTelefono.setForeground(new java.awt.Color(0, 153, 153));\n jLTelefono.setText(\"TELEFONO:\");\n\n jTDni.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTDniActionPerformed(evt);\n }\n });\n jTDni.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n jTDniKeyTyped(evt);\n }\n });\n\n jTNombre.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n jTNombreKeyTyped(evt);\n }\n });\n\n jTApellido.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n jTApellidoKeyTyped(evt);\n }\n });\n\n jTTelefono.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTTelefonoActionPerformed(evt);\n }\n });\n jTTelefono.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n jTTelefonoKeyTyped(evt);\n }\n });\n\n jBNuevo.setForeground(new java.awt.Color(0, 153, 153));\n jBNuevo.setText(\"Nuevo\");\n jBNuevo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBNuevoActionPerformed(evt);\n }\n });\n\n jBGuardar.setForeground(new java.awt.Color(0, 153, 153));\n jBGuardar.setText(\"Guardar\");\n jBGuardar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBGuardarActionPerformed(evt);\n }\n });\n\n jBSalir.setForeground(new java.awt.Color(0, 153, 153));\n jBSalir.setText(\"Salir\");\n jBSalir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBSalirActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLAgregarClientes)\n .addGap(148, 148, 148))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLTelefono)\n .addGap(18, 18, 18)\n .addComponent(jTTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGap(48, 48, 48)\n .addComponent(jBNuevo)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jBGuardar, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(jLDomicilio)\n .addGap(18, 18, 18)\n .addComponent(jTDomicilio))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLApellido)\n .addComponent(jLCiudad))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTApellido)\n .addComponent(jTCiudad)))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLNombre)\n .addComponent(jLDni))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTDni, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGap(61, 61, 61)\n .addComponent(jBSalir, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(89, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLAgregarClientes)\n .addGap(26, 26, 26)\n .addComponent(jLDni)\n .addGap(18, 18, 18)\n .addComponent(jLNombre))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jTDni, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jTNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(18, 18, 18)\n .addComponent(jLApellido))\n .addComponent(jTApellido, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jLCiudad))\n .addComponent(jTCiudad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jLDomicilio))\n .addComponent(jTDomicilio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(37, 37, 37)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLTelefono))\n .addGap(28, 28, 28)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jBSalir, javax.swing.GroupLayout.PREFERRED_SIZE, 24, Short.MAX_VALUE)\n .addComponent(jBNuevo, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\n .addComponent(jBGuardar, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))\n .addGap(46, 46, 46))\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n btGravar = new javax.swing.JButton();\n btSair = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n tfNome = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n tfApelido = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n tfTelefone = new javax.swing.JTextField();\n tfCelular = new javax.swing.JTextField();\n tfPlaca = new javax.swing.JTextField();\n jScrollPane1 = new javax.swing.JScrollPane();\n taObservacoes = new javax.swing.JTextArea();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Registro de Cliente\");\n\n btGravar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/br/com/pedidogm/img/gravar_16x16.png\"))); // NOI18N\n btGravar.setMnemonic('G');\n btGravar.setText(\"Gravar\");\n btGravar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btGravarActionPerformed(evt);\n }\n });\n\n btSair.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/br/com/pedidogm/img/sair_16x16.png\"))); // NOI18N\n btSair.setMnemonic('S');\n btSair.setText(\"Sair\");\n btSair.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btSairActionPerformed(evt);\n }\n });\n\n jLabel1.setText(\"Nome:\");\n\n jLabel2.setText(\"Apelido:\");\n\n jLabel3.setText(\"Telefone:\");\n\n jLabel4.setText(\"Celular:\");\n\n jLabel6.setText(\"Placa:\");\n\n jLabel7.setText(\"Observações:\");\n\n taObservacoes.setColumns(20);\n taObservacoes.setRows(5);\n jScrollPane1.setViewportView(taObservacoes);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(btGravar)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(btSair))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel2)\n .addComponent(jLabel1)\n .addComponent(jLabel3)\n .addComponent(jLabel4)\n .addComponent(jLabel7))\n .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.TRAILING))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(tfPlaca, javax.swing.GroupLayout.PREFERRED_SIZE, 240, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(tfApelido, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 461, Short.MAX_VALUE)\n .addComponent(tfCelular, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 240, Short.MAX_VALUE)\n .addComponent(tfTelefone, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(tfNome)))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(tfNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(tfApelido, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(tfPlaca, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(11, 11, 11)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(tfTelefone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(tfCelular, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel7)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btGravar)\n .addComponent(btSair))\n .addContainerGap())\n );\n\n pack();\n setLocationRelativeTo(null);\n }",
"public void novo() {\n cliente = new Cliente();\n }",
"public FrmCadastro() {\n initComponents();\n \n lblNumeroConta.setText(\"Número da conta: \" + Agencia.getProximaConta());\n \n List<Integer> agencias = Principal.banco.retornarNumeroAgencias();\n for(int i : agencias){\n cmbAgencias.addItem(\"Agência \" + i);\n }\n }",
"public Cliente ddCliente(String modo){\n ClienteDAO cd = new ClienteDAO();\n Cliente c = null;\n String rz = txtCliRz.getText()+\"\";\n String nFantasia = txtCliNFant.getText()+\"\";\n String DDDTel = txtCliDDD.getText()+\"\";\n String tel = txtCliTel.getText()+\"\";\n String DDDCel = txtCliDDDTel2.getText()+\"\";\n String cel = txtCliTel2.getText()+\"\";\n String rsp = txtCliResp.getText()+\"\"; \n String cnpj = txtCliCNPJ.getText()+\"\";\n c = new Cliente();\n \n if(modo.equalsIgnoreCase(\"a\")){ \n int cod = Integer.parseInt(txtCliCod.getText());\n c.setId(cod);\n } \n \n c.setCNPJ(cnpj);\n c.setRSocial(rz);\n c.setNFantasia(nFantasia);\n c.setDDDCel(DDDCel);\n c.setTel2(cel);\n c.setRsp(rsp);\n c.setDDDTel(DDDTel);\n c.setTel(tel);\n \n return c;\n }",
"public TelaAlterarCliente() {\n\t\tinitComponents();\n\t}",
"private void onCadastrarCliente() {\n prepFieldsNovoCliente();\n mainCliente = null;\n }",
"private void buscarCliente(String id) {\r\n\t\ttry {\r\n\t\t\tif(txtNif.getText().equals(\"\")){\r\n\t\t\t\tString mensaje = \"Por favor, introduce el nif\";\r\n\t\t\t\tJOptionPane.showMessageDialog(this, mensaje, \"ERROR\", JOptionPane.ERROR_MESSAGE);\t\t\r\n\t\t\t\ttxtNif.setBorder(BorderFactory.createLineBorder(Color.RED));\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tCliente cliente = new Cliente();\r\n\t\t\t\tcliente=manager.getClienteById(id);\r\n\t\t\t\tmodel.removeAllElements();\r\n\t\t\t\tif(cliente.getNif().equals(null)) {\r\n\t\t\t\t\tString mensaje = \"No existe ese cliente\";\r\n\t\t\t\t\tJOptionPane.showMessageDialog(this, mensaje, \"NO EXISTE ESE CLIENTE\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\ttxtNif.setBorder(BorderFactory.createLineBorder(Color.RED));\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\tmodel.addElement(cliente);\t\t\t\t\r\n\t\t\t\tcliente.toString();\r\n\t\t\t\ttxtNif.setText(\"\");\r\n\t\t\t\ttxtNif.setBorder(BorderFactory.createLineBorder(Color.BLACK));\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} catch (Exception e) {\r\n\t\t\tString mensaje = \"No existe ese cliente\";\r\n\t\t\tJOptionPane.showMessageDialog(this, mensaje, \"ERROR\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\t}\t\t\r\n\t}",
"@RequestMapping(value = \"clientes\", method = RequestMethod.POST)\n\t\n\tpublic ResponseEntity<List<InfoUIA>> agregaCliente(@RequestBody InfoUIA newCliente){\n\t\tSystem.out.println(\"Saludos desde agregaCliente()\");\n\t\tif(clientes.agregaCatalogo(newCliente) == null)\n\t\t{\n\t\t\tSystem.out.println(\"Error en agregaCliente()\");\n\t\t}\n\t\treturn ResponseEntity.ok(clientes.getListaProveedores(misParametros));\n\t}",
"public CCuenta()\n {\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n JPanelClienteTitulo = new javax.swing.JPanel();\n JPanelClienteCadastro = new javax.swing.JPanel();\n lblNome = new javax.swing.JLabel();\n lblEnd = new javax.swing.JLabel();\n lblRG = new javax.swing.JLabel();\n lblNascimento = new javax.swing.JLabel();\n lblEmail = new javax.swing.JLabel();\n lblCpf = new javax.swing.JLabel();\n tftCPF = new javax.swing.JFormattedTextField();\n tftEmail = new javax.swing.JFormattedTextField();\n tftNascimento = new javax.swing.JFormattedTextField();\n tctNome = new javax.swing.JTextField();\n tftRG = new javax.swing.JFormattedTextField();\n tctEndereco = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n lblTelaNomesTitulo = new javax.swing.JLabel();\n JPanelClienteBotoes = new javax.swing.JPanel();\n btnSalvarCliente = new javax.swing.JButton();\n btnLimparCliente = new javax.swing.JButton();\n btnSairCliente = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n javax.swing.GroupLayout JPanelClienteTituloLayout = new javax.swing.GroupLayout(JPanelClienteTitulo);\n JPanelClienteTitulo.setLayout(JPanelClienteTituloLayout);\n JPanelClienteTituloLayout.setHorizontalGroup(\n JPanelClienteTituloLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 189, Short.MAX_VALUE)\n );\n JPanelClienteTituloLayout.setVerticalGroup(\n JPanelClienteTituloLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 44, Short.MAX_VALUE)\n );\n\n lblNome.setFont(new java.awt.Font(\"Times New Roman\", 1, 14)); // NOI18N\n lblNome.setText(\"Nome:\");\n\n lblEnd.setFont(new java.awt.Font(\"Times New Roman\", 1, 14)); // NOI18N\n lblEnd.setText(\"Endereço:\");\n\n lblRG.setFont(new java.awt.Font(\"Times New Roman\", 1, 14)); // NOI18N\n lblRG.setText(\"RG:\");\n\n lblNascimento.setFont(new java.awt.Font(\"Times New Roman\", 1, 14)); // NOI18N\n lblNascimento.setText(\"Nascimento:\");\n\n lblEmail.setFont(new java.awt.Font(\"Times New Roman\", 1, 14)); // NOI18N\n lblEmail.setText(\"Email:\");\n\n lblCpf.setFont(new java.awt.Font(\"Times New Roman\", 1, 14)); // NOI18N\n lblCpf.setText(\"CPF:\");\n\n try {\n tftCPF.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter(\"###.###.###-##\")));\n } catch (java.text.ParseException ex) {\n ex.printStackTrace();\n }\n tftCPF.setFont(new java.awt.Font(\"Arial\", 0, 14)); // NOI18N\n\n tftEmail.setFont(new java.awt.Font(\"Arial\", 0, 14)); // NOI18N\n\n tftNascimento.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.DateFormatter()));\n tftNascimento.setFont(new java.awt.Font(\"Arial\", 0, 14)); // NOI18N\n\n tctNome.setFont(new java.awt.Font(\"Arial\", 0, 14)); // NOI18N\n\n try {\n tftRG.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter(\"###.###.###-A\")));\n } catch (java.text.ParseException ex) {\n ex.printStackTrace();\n }\n tftRG.setFont(new java.awt.Font(\"Arial\", 0, 14)); // NOI18N\n\n tctEndereco.setFont(new java.awt.Font(\"Arial\", 0, 14)); // NOI18N\n\n javax.swing.GroupLayout JPanelClienteCadastroLayout = new javax.swing.GroupLayout(JPanelClienteCadastro);\n JPanelClienteCadastro.setLayout(JPanelClienteCadastroLayout);\n JPanelClienteCadastroLayout.setHorizontalGroup(\n JPanelClienteCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(JPanelClienteCadastroLayout.createSequentialGroup()\n .addGroup(JPanelClienteCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(JPanelClienteCadastroLayout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addGroup(JPanelClienteCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lblEnd, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(lblRG, javax.swing.GroupLayout.Alignment.TRAILING))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(JPanelClienteCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(JPanelClienteCadastroLayout.createSequentialGroup()\n .addComponent(tctEndereco)\n .addGap(46, 46, 46)\n .addComponent(lblEmail))\n .addGroup(JPanelClienteCadastroLayout.createSequentialGroup()\n .addComponent(tftRG, javax.swing.GroupLayout.PREFERRED_SIZE, 267, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(lblCpf))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, JPanelClienteCadastroLayout.createSequentialGroup()\n .addGap(52, 52, 52)\n .addComponent(lblNome)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(tctNome)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(lblNascimento)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(JPanelClienteCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(tftCPF, javax.swing.GroupLayout.DEFAULT_SIZE, 177, Short.MAX_VALUE)\n .addComponent(tftEmail)\n .addComponent(tftNascimento))\n .addGap(53, 53, 53))\n );\n JPanelClienteCadastroLayout.setVerticalGroup(\n JPanelClienteCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(JPanelClienteCadastroLayout.createSequentialGroup()\n .addGap(66, 66, 66)\n .addGroup(JPanelClienteCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblNome)\n .addComponent(lblNascimento)\n .addComponent(tftNascimento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(tctNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(30, 30, 30)\n .addGroup(JPanelClienteCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblEnd)\n .addComponent(lblEmail)\n .addComponent(tftEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(tctEndereco, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 32, Short.MAX_VALUE)\n .addGroup(JPanelClienteCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblRG)\n .addComponent(lblCpf)\n .addComponent(tftCPF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(tftRG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(23, 23, 23))\n );\n\n jLabel1.setFont(new java.awt.Font(\"Times New Roman\", 1, 24)); // NOI18N\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"Novo Cliente\");\n\n lblTelaNomesTitulo.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Icones/pessoaFisica.jpeg\"))); // NOI18N\n\n btnSalvarCliente.setBackground(new java.awt.Color(204, 204, 204));\n btnSalvarCliente.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n btnSalvarCliente.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Icones/ticarGreen_1.png\"))); // NOI18N\n btnSalvarCliente.setText(\"Salvar\");\n btnSalvarCliente.setToolTipText(\"Salvar Alterações\");\n btnSalvarCliente.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);\n btnSalvarCliente.setIconTextGap(2);\n btnSalvarCliente.setMargin(new java.awt.Insets(2, 2, 2, 14));\n btnSalvarCliente.setPreferredSize(new java.awt.Dimension(100, 50));\n btnSalvarCliente.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSalvarClienteActionPerformed(evt);\n }\n });\n\n btnLimparCliente.setBackground(new java.awt.Color(204, 204, 204));\n btnLimparCliente.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n btnLimparCliente.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Icones/limpar.png\"))); // NOI18N\n btnLimparCliente.setText(\"Limpar\");\n btnLimparCliente.setMargin(new java.awt.Insets(2, 2, 2, 14));\n btnLimparCliente.setPreferredSize(new java.awt.Dimension(100, 50));\n btnLimparCliente.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnLimparClienteActionPerformed(evt);\n }\n });\n\n btnSairCliente.setBackground(new java.awt.Color(204, 204, 204));\n btnSairCliente.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n btnSairCliente.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Icones/saidaDireitaRed.png\"))); // NOI18N\n btnSairCliente.setText(\"Voltar\");\n btnSairCliente.setMargin(new java.awt.Insets(2, 2, 2, 14));\n btnSairCliente.setPreferredSize(new java.awt.Dimension(100, 50));\n btnSairCliente.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSairClienteActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout JPanelClienteBotoesLayout = new javax.swing.GroupLayout(JPanelClienteBotoes);\n JPanelClienteBotoes.setLayout(JPanelClienteBotoesLayout);\n JPanelClienteBotoesLayout.setHorizontalGroup(\n JPanelClienteBotoesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(JPanelClienteBotoesLayout.createSequentialGroup()\n .addGap(37, 37, 37)\n .addComponent(btnSalvarCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(62, 62, 62)\n .addComponent(btnLimparCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnSairCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(52, 52, 52))\n );\n JPanelClienteBotoesLayout.setVerticalGroup(\n JPanelClienteBotoesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, JPanelClienteBotoesLayout.createSequentialGroup()\n .addContainerGap(47, Short.MAX_VALUE)\n .addGroup(JPanelClienteBotoesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnSalvarCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnLimparCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnSairCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(23, 23, 23))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(JPanelClienteBotoes, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(JPanelClienteTitulo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(lblTelaNomesTitulo, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(260, 260, 260))\n .addComponent(JPanelClienteCadastro, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(JPanelClienteTitulo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(lblTelaNomesTitulo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(1, 1, 1)\n .addComponent(JPanelClienteCadastro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(JPanelClienteBotoes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(19, 19, 19))\n );\n\n pack();\n }",
"public void CadastrarCliente(Cliente cliente) throws SQLException {\r\n String query = \"INSERT INTO cliente(nome ,cpf,data_nascimento, sexo,cep,rua,numero,bairro,cidade,estado,telefone_residencial,celular,email,senha) \"\r\n + \"VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)\";\r\n insert(query, cliente.getNome(), cliente.getCpf(), cliente.getData_nascimento(), cliente.getSexo(), cliente.getCep(), cliente.getRua(), cliente.getNumero(), cliente.getBairro(), cliente.getCidade(), cliente.getEstado(), cliente.getTelefone_residencial(), cliente.getCelular(), cliente.getEmail(), cliente.getSenha());\r\n }",
"public TelaCliente() {\n\n try {\n Handler console = new ConsoleHandler();\n Handler file = new FileHandler(\"/tmp/roquerou.log\");\n console.setLevel(Level.ALL);\n file.setLevel(Level.ALL);\n file.setFormatter(new SimpleFormatter());\n LOG.addHandler(file);\n LOG.addHandler(console);\n LOG.setUseParentHandlers(false);\n } catch (IOException io) {\n LOG.warning(\"O ficheiro hellologgin.xml não pode ser criado\");\n }\n\n initComponents();\n NivelDAO nd = new NivelDAO();\n if (nd.buscar() == 3) {\n botaoNovoCliente.setEnabled(false);\n buscarcli.setEnabled(false);\n tabelaCliente.setEnabled(false);\n popularCombo();\n setarLabels();\n\n LOG.info(\"Abertura da Tela de Clientes\");\n } else {\n popularCombo();\n setarLabels();\n\n LOG.info(\"Abertura da Tela de Clientes\");\n }\n }",
"public Clientes() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel10 = new javax.swing.JLabel();\n btnRegresar = new javax.swing.JButton();\n jPanel2 = new javax.swing.JPanel();\n jLabel11 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n txtCorreo = new javax.swing.JTextField();\n txtTelefono = new javax.swing.JTextField();\n txtDireccion = new javax.swing.JTextField();\n txtNombre = new javax.swing.JTextField();\n txtIdCliente = new javax.swing.JTextField();\n jLabel8 = new javax.swing.JLabel();\n txtNumCuenta = new javax.swing.JTextField();\n btnAgregar1 = new javax.swing.JButton();\n btnCancelar = new javax.swing.JButton();\n btnEditar = new javax.swing.JButton();\n btnEliminar = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n clientes = new javax.swing.JTable();\n jLabel6 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n jLabel13 = new javax.swing.JLabel();\n jLabel14 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jPanel1.setBackground(new java.awt.Color(22, 160, 133));\n jPanel1.setForeground(new java.awt.Color(22, 160, 133));\n\n jLabel10.setBackground(new java.awt.Color(0, 102, 102));\n jLabel10.setFont(new java.awt.Font(\"Dialog\", 1, 24)); // NOI18N\n jLabel10.setForeground(new java.awt.Color(255, 255, 255));\n jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel10.setText(\"Clientes\");\n\n btnRegresar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imágenes/icons8-izquierda-en-círculo-2-35.png\"))); // NOI18N\n btnRegresar.setBorder(null);\n btnRegresar.setBorderPainted(false);\n btnRegresar.setContentAreaFilled(false);\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(64, 64, 64)\n .addComponent(btnRegresar)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 377, Short.MAX_VALUE)\n .addComponent(jLabel10)\n .addGap(491, 491, 491))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(26, 26, 26)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(btnRegresar)\n .addComponent(jLabel10))\n .addContainerGap(29, Short.MAX_VALUE))\n );\n\n getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1060, 90));\n\n jPanel2.setBackground(new java.awt.Color(255, 255, 255));\n\n jLabel11.setBackground(new java.awt.Color(0, 0, 51));\n jLabel11.setFont(new java.awt.Font(\"Yu Gothic UI Light\", 0, 18)); // NOI18N\n jLabel11.setForeground(new java.awt.Color(0, 0, 51));\n jLabel11.setText(\"Id_cliente:\");\n\n jLabel3.setBackground(new java.awt.Color(0, 0, 51));\n jLabel3.setFont(new java.awt.Font(\"Yu Gothic UI Light\", 0, 18)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(0, 0, 51));\n jLabel3.setText(\"Nombre:\");\n\n jLabel4.setBackground(new java.awt.Color(0, 0, 51));\n jLabel4.setFont(new java.awt.Font(\"Yu Gothic UI Light\", 0, 18)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(0, 0, 51));\n jLabel4.setText(\"Dirección:\");\n\n jLabel5.setBackground(new java.awt.Color(0, 0, 51));\n jLabel5.setFont(new java.awt.Font(\"Yu Gothic UI Light\", 0, 18)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(0, 0, 51));\n jLabel5.setText(\"Teléfono:\");\n\n jLabel7.setBackground(new java.awt.Color(0, 0, 51));\n jLabel7.setFont(new java.awt.Font(\"Yu Gothic UI Light\", 0, 18)); // NOI18N\n jLabel7.setForeground(new java.awt.Color(0, 0, 51));\n jLabel7.setText(\"Correo:\");\n\n txtCorreo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtCorreoActionPerformed(evt);\n }\n });\n\n txtTelefono.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtTelefonoActionPerformed(evt);\n }\n });\n\n txtDireccion.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtDireccionActionPerformed(evt);\n }\n });\n\n txtNombre.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtNombreActionPerformed(evt);\n }\n });\n\n jLabel8.setBackground(new java.awt.Color(0, 0, 51));\n jLabel8.setFont(new java.awt.Font(\"Yu Gothic UI Light\", 0, 18)); // NOI18N\n jLabel8.setForeground(new java.awt.Color(0, 0, 51));\n jLabel8.setText(\"Número de cuenta:\");\n\n txtNumCuenta.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtNumCuentaActionPerformed(evt);\n }\n });\n\n btnAgregar1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imágenes/icons8-más-35.png\"))); // NOI18N\n btnAgregar1.setBorder(null);\n btnAgregar1.setBorderPainted(false);\n btnAgregar1.setContentAreaFilled(false);\n\n btnCancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imágenes/icons8-cancelar-35.png\"))); // NOI18N\n btnCancelar.setBorder(null);\n btnCancelar.setBorderPainted(false);\n btnCancelar.setContentAreaFilled(false);\n\n btnEditar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imágenes/icons8-lápiz-35.png\"))); // NOI18N\n btnEditar.setBorder(null);\n btnEditar.setBorderPainted(false);\n btnEditar.setContentAreaFilled(false);\n\n btnEliminar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imágenes/icons8-basura-35.png\"))); // NOI18N\n btnEliminar.setBorder(null);\n btnEliminar.setBorderPainted(false);\n btnEliminar.setContentAreaFilled(false);\n\n clientes.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"ID\", \"Nombre\", \"Dirección\", \"Teléfono\", \"Correo\", \"Número de cuenta\", \"Puntos\"\n }\n ));\n clientes.setSurrendersFocusOnKeystroke(true);\n clientes.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n clientesMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(clientes);\n\n jLabel6.setBackground(new java.awt.Color(0, 102, 102));\n jLabel6.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(22, 160, 133));\n jLabel6.setText(\"Agregar\");\n\n jLabel12.setBackground(new java.awt.Color(0, 102, 102));\n jLabel12.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel12.setForeground(new java.awt.Color(22, 160, 133));\n jLabel12.setText(\"Editar\");\n\n jLabel13.setBackground(new java.awt.Color(0, 102, 102));\n jLabel13.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel13.setForeground(new java.awt.Color(22, 160, 133));\n jLabel13.setText(\"Eliminar\");\n\n jLabel14.setBackground(new java.awt.Color(0, 102, 102));\n jLabel14.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel14.setForeground(new java.awt.Color(22, 160, 133));\n jLabel14.setText(\"Cancelar\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(244, 244, 244)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(90, 90, 90)\n .addComponent(jLabel7)\n .addGap(14, 14, 14)\n .addComponent(txtCorreo, javax.swing.GroupLayout.PREFERRED_SIZE, 350, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel8)\n .addGap(13, 13, 13)\n .addComponent(txtNumCuenta, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(50, 50, 50)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(btnEliminar)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel13))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(btnCancelar)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel14))))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(70, 70, 70)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel11)\n .addGap(16, 16, 16)\n .addComponent(txtIdCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addGap(20, 20, 20)\n .addComponent(txtTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, 350, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(50, 50, 50)\n .addComponent(btnEditar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(jLabel4))\n .addGap(15, 15, 15)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 350, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, 350, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(50, 50, 50)\n .addComponent(btnAgregar1)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel6)\n .addComponent(jLabel12))))))\n .addGap(0, 19, Short.MAX_VALUE))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 740, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(114, 114, 114))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap(13, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel11)\n .addComponent(txtIdCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(5, 5, 5)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addGap(5, 5, 5)\n .addComponent(jLabel4))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(txtNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(txtDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(8, 8, 8)\n .addComponent(jLabel6)))\n .addGap(5, 5, 5)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(txtTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(btnEditar)\n .addComponent(jLabel12))\n .addGap(10, 10, 10)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel7)\n .addComponent(txtCorreo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnEliminar)))\n .addComponent(btnAgregar1)\n .addComponent(jLabel13, javax.swing.GroupLayout.Alignment.TRAILING))\n .addGap(5, 5, 5)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel8)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(txtNumCuenta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(14, 14, 14)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel14)\n .addComponent(btnCancelar))))\n .addGap(53, 53, 53)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n getContentPane().add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 90, 1050, 460));\n\n pack();\n }",
"public FrmCadCentroCusto() {\r\n initComponents();\r\n carregarCombo();\r\n }",
"private void listaClient() {\n\t\t\r\n\t\tthis.listaClient.add(cliente);\r\n\t}",
"@Override\r\n\tpublic void aggiornaUI() {\r\n\t\tString valore = input_ricerca_cliente.getText();\r\n\t\tthis.clienti.setAll(AppFacadeController.getInstance().getGestisciClientiController().cercaCliente(valore));\r\n\t}",
"public Ingresos_cliente() {\n initComponents();\n limpiar();\n this.setLocationRelativeTo(null);\n }",
"private void confirmar(){\n\n cliente = new Cliente();\n\n if (validaCampos() == false){\n\n cliente.idade = Integer.parseInt(edtIdade.getText().toString());\n try {\n\n clienteRepositorio.inserir(cliente);\n AlertDialog.Builder dlg = new AlertDialog.Builder(this);\n finish();\n dlg.setTitle(\"Sucess\");\n dlg.setMessage(\"Cadastro realizado com sucesso\");\n dlg.setNeutralButton(\"OK\",null);\n dlg.show();\n\n }catch (SQLException ex){\n AlertDialog.Builder dlg = new AlertDialog.Builder(this);\n dlg.setTitle(\"Error\");\n dlg.setMessage(ex.getMessage());\n dlg.setNeutralButton(\"OK\",null);\n dlg.show();\n }\n }\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jTextField2 = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n JtClientes = new javax.swing.JTable();\n jLabel3 = new javax.swing.JLabel();\n jTextField3 = new javax.swing.JTextField();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jTextField4 = new javax.swing.JTextField();\n jTextField5 = new javax.swing.JTextField();\n jTextField6 = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n\n setClosable(true);\n\n jLabel1.setText(\"ID cliente\");\n\n jLabel2.setText(\"Nome\");\n\n jTextField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField1ActionPerformed(evt);\n }\n });\n\n jTextField2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField2ActionPerformed(evt);\n }\n });\n\n jButton1.setText(\"Pesquisar\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n JtClientes.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"ID\", \"NOME\", \"CPF\", \"EMIAL\", \"N° PARA CONTATO\", \"ENDEREÇO\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false, false, false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n jScrollPane1.setViewportView(JtClientes);\n\n jLabel3.setText(\"CPF\");\n\n jButton2.setText(\"Editar\");\n\n jButton3.setText(\"Excluir\");\n\n jTextField5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField5ActionPerformed(evt);\n }\n });\n\n jTextField6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField6ActionPerformed(evt);\n }\n });\n\n jLabel5.setText(\"N° para contato\");\n\n jLabel6.setText(\"Endereço\");\n\n jLabel7.setText(\"Email\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 680, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jButton1)\n .addGap(18, 18, 18)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jTextField1))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel7)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jLabel3)\n .addComponent(jLabel6)\n .addComponent(jLabel7))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2)\n .addComponent(jButton3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 283, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(27, Short.MAX_VALUE))\n );\n\n pack();\n }",
"public AgregarClientes(Directorio directorio) {\n initComponents();\n this.directorio=directorio;\n \n \n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel6 = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n btnCliAdicionar = new javax.swing.JButton();\n btnCliAlterar = new javax.swing.JButton();\n btnCliRemover = new javax.swing.JButton();\n txtCliNome = new javax.swing.JTextField();\n txtCliEmail = new javax.swing.JTextField();\n txtCliEndereco = new javax.swing.JTextField();\n txtCliFone = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n txtCliPesquisar = new javax.swing.JTextField();\n jScrollPane1 = new javax.swing.JScrollPane();\n tblClientes = new javax.swing.JTable();\n jLabel7 = new javax.swing.JLabel();\n txtCliId = new javax.swing.JTextField();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n\n jLabel6.setText(\"jLabel6\");\n\n setClosable(true);\n setIconifiable(true);\n setMaximizable(true);\n setTitle(\"Clientes\");\n setPreferredSize(new java.awt.Dimension(707, 471));\n\n jLabel1.setText(\"Nome\");\n\n jLabel2.setText(\"E-Mail\");\n\n jLabel3.setText(\"Endereço\");\n\n jLabel4.setText(\"Telefone\");\n\n btnCliAdicionar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/br/com/infox/icones/add.png\"))); // NOI18N\n btnCliAdicionar.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n btnCliAdicionar.setPreferredSize(new java.awt.Dimension(85, 65));\n btnCliAdicionar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCliAdicionarActionPerformed(evt);\n }\n });\n\n btnCliAlterar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/br/com/infox/icones/refresh.png\"))); // NOI18N\n btnCliAlterar.setPreferredSize(new java.awt.Dimension(85, 65));\n btnCliAlterar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCliAlterarActionPerformed(evt);\n }\n });\n\n btnCliRemover.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/br/com/infox/icones/delete.png\"))); // NOI18N\n btnCliRemover.setPreferredSize(new java.awt.Dimension(85, 65));\n btnCliRemover.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCliRemoverActionPerformed(evt);\n }\n });\n\n jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/br/com/infox/icones/panda.png\"))); // NOI18N\n\n txtCliPesquisar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtCliPesquisarActionPerformed(evt);\n }\n });\n txtCliPesquisar.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n txtCliPesquisarKeyReleased(evt);\n }\n });\n\n tblClientes.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n tblClientes.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tblClientesMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(tblClientes);\n\n txtCliId.setEnabled(false);\n txtCliId.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtCliIdActionPerformed(evt);\n }\n });\n\n jLabel8.setText(\"ID Cliente\");\n\n jLabel9.setFont(new java.awt.Font(\"Arial\", 3, 36)); // NOI18N\n jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel9.setText(\"CLIENTELA\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel1)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(146, 146, 146)\n .addComponent(jLabel7))\n .addGroup(layout.createSequentialGroup()\n .addGap(101, 101, 101)\n .addComponent(jLabel3)))\n .addGroup(layout.createSequentialGroup()\n .addGap(118, 118, 118)\n .addComponent(jLabel2))\n .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtCliId, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtCliEndereco)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 499, Short.MAX_VALUE)\n .addComponent(txtCliPesquisar)\n .addComponent(txtCliNome)\n .addComponent(txtCliEmail)\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 440, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(txtCliFone, javax.swing.GroupLayout.PREFERRED_SIZE, 252, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addGap(36, 36, 36)\n .addComponent(btnCliAdicionar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnCliAlterar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(55, 55, 55)\n .addComponent(btnCliRemover, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(28, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addComponent(jLabel5)\n .addGap(27, 27, 27)\n .addComponent(jLabel8)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtCliId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(1, 1, 1)\n .addComponent(jLabel7))\n .addGroup(layout.createSequentialGroup()\n .addGap(28, 28, 28)\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtCliPesquisar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtCliNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))\n .addGap(13, 13, 13)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(txtCliEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(txtCliEndereco, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(txtCliFone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnCliAdicionar, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnCliAlterar, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(btnCliRemover, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(38, Short.MAX_VALUE))\n );\n\n setBounds(0, 0, 707, 471);\n }",
"public FrmClienteEsc() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n nome = new javax.swing.JTextField();\n idade = new javax.swing.JTextField();\n cpf = new javax.swing.JTextField();\n endereco = new javax.swing.JTextField();\n telefone = new javax.swing.JTextField();\n cadastrarButton = new javax.swing.JButton();\n voltarButton = new javax.swing.JButton();\n jLabel7 = new javax.swing.JLabel();\n profissao = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setResizable(false);\n\n jLabel1.setText(\"Cadastro do Cliente\");\n\n jLabel2.setText(\"Nome\");\n\n jLabel3.setText(\"Idade\");\n\n jLabel4.setText(\"CPF\");\n\n jLabel5.setText(\"Endereço\");\n\n jLabel6.setText(\"Telefone\");\n\n cadastrarButton.setText(\"Cadastrar\");\n cadastrarButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cadastrarButtonActionPerformed(evt);\n }\n });\n\n voltarButton.setText(\"Voltar\");\n voltarButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n voltarButtonActionPerformed(evt);\n }\n });\n\n jLabel7.setText(\"Profissao\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel8)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(telefone, javax.swing.GroupLayout.PREFERRED_SIZE, 190, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addComponent(jLabel7)\n .addComponent(jLabel3)\n .addComponent(jLabel2)\n .addComponent(jLabel4))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(nome, javax.swing.GroupLayout.DEFAULT_SIZE, 190, Short.MAX_VALUE)\n .addComponent(idade)\n .addComponent(endereco)\n .addComponent(profissao)\n .addComponent(cpf)))\n .addGroup(layout.createSequentialGroup()\n .addComponent(voltarButton, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, Short.MAX_VALUE)\n .addComponent(cadastrarButton, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE)))))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addGap(18, 18, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addComponent(jLabel2))\n .addComponent(nome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addComponent(jLabel3))\n .addComponent(idade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addComponent(jLabel4))\n .addComponent(cpf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addComponent(jLabel7))\n .addComponent(profissao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addComponent(jLabel5))\n .addComponent(endereco, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel8)\n .addGroup(layout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addComponent(jLabel6))\n .addComponent(telefone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(voltarButton)\n .addComponent(cadastrarButton))\n .addContainerGap())\n );\n\n pack();\n }",
"public void recupera() {\n Cliente clienteActual;\n clienteActual=clienteDAO.buscaId(c.getId());\n if (clienteActual!=null) {\n c=clienteActual;\n } else {\n c=new Cliente();\n }\n }",
"public SalidaCajaForm() {\n\t\tinicializarComponentes();\n }",
"private static void menuCadastroCliente() throws Exception {\r\n String nome, email, cpf;\r\n int id;\r\n boolean erro = false;\r\n System.out.println(\"\\n\\t*** Cadastro ***\\n\");\r\n System.out.print(\"Nome completo: \");\r\n nome = read.nextLine();\r\n System.out.print(\"Email: \");\r\n email = read.next();\r\n do {\r\n System.out.print(\"CPF: \");\r\n cpf = read.next().replace(\".\", \"\").replace(\"-\", \"\");\r\n System.out.println(cpf);\r\n if (cpf.length() != 11) {\r\n System.out.println(\"CPF inválido!\\nDigite novamente!\");\r\n erro = true;\r\n }\r\n } while (erro);\r\n if (getCliente(email) == null) {\r\n\r\n id = arqClientes.inserir(new Cliente(nome, email, cpf));\r\n System.out.println(\"Guarde seu email, pois é através dele que você efetua o login em nossa plataforma\");\r\n System.out.println(\"Cadastro efetuado!\");\r\n gerenciadorSistema();\r\n } else {\r\n System.out.println(\"\\nJá existe Usuario com esse email!\\nCadastro cancelado!\");\r\n }\r\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n campoId = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n campoNome = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n campoRG = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n campoTel = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n btSalvar = new javax.swing.JButton();\n campoSexo = new javax.swing.JComboBox<>();\n btNovo = new javax.swing.JButton();\n btExcuir = new javax.swing.JButton();\n btSair = new javax.swing.JButton();\n jLabel7 = new javax.swing.JLabel();\n campoPesquisar = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabel1.setText(\"Cliente\");\n\n jLabel2.setText(\"ID\");\n\n campoId.setEditable(false);\n\n jLabel3.setText(\"Nome\");\n\n jLabel4.setText(\"RG\");\n\n jLabel5.setText(\"Telefone\");\n\n jLabel6.setText(\"Sexo\");\n\n btSalvar.setText(\"Salvar\");\n btSalvar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btSalvarActionPerformed(evt);\n }\n });\n\n campoSexo.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Feminino\", \"Masculino\" }));\n\n btNovo.setText(\"Novo\");\n btNovo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btNovoActionPerformed(evt);\n }\n });\n\n btExcuir.setText(\"Excluir\");\n btExcuir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btExcuirActionPerformed(evt);\n }\n });\n\n btSair.setText(\"Sair\");\n btSair.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btSairActionPerformed(evt);\n }\n });\n\n jLabel7.setText(\"Buscar Cliente\");\n\n jButton1.setText(\"Buscar\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(153, 153, 153)\n .addComponent(jLabel1))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel4))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel5))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel6)\n .addGap(18, 18, 18)\n .addComponent(campoSexo, 0, 106, Short.MAX_VALUE))\n .addComponent(campoTel, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(campoRG, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(campoNome, javax.swing.GroupLayout.Alignment.LEADING))))\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(btNovo)\n .addGap(39, 39, 39)\n .addComponent(btSalvar)\n .addGap(46, 46, 46)\n .addComponent(btExcuir)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 61, Short.MAX_VALUE)\n .addComponent(btSair))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(campoId, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(189, 189, 189)\n .addComponent(campoPesquisar))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1)))))\n .addContainerGap())\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel7)\n .addGap(70, 70, 70))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jLabel7))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(campoId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(campoPesquisar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jLabel3))\n .addComponent(jButton1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(campoNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(campoRG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(campoTel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(campoSexo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 36, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btSalvar)\n .addComponent(btNovo)\n .addComponent(btExcuir)\n .addComponent(btSair))\n .addGap(37, 37, 37))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }"
]
| [
"0.7275531",
"0.7266275",
"0.718576",
"0.6924039",
"0.6886174",
"0.6885299",
"0.68845433",
"0.68797",
"0.68699944",
"0.6851693",
"0.6818975",
"0.68183494",
"0.6790712",
"0.6733143",
"0.6732026",
"0.6700387",
"0.66907334",
"0.666779",
"0.6654046",
"0.6645837",
"0.6645837",
"0.6643427",
"0.6635393",
"0.66314584",
"0.6590433",
"0.6578082",
"0.6552519",
"0.6546025",
"0.6513543",
"0.651325",
"0.65084",
"0.65030205",
"0.6498349",
"0.6494286",
"0.64907753",
"0.6489119",
"0.64741826",
"0.64484817",
"0.64312327",
"0.63982445",
"0.6383109",
"0.6369383",
"0.63314116",
"0.6330161",
"0.6326645",
"0.6314219",
"0.6313871",
"0.6312897",
"0.63121337",
"0.63037324",
"0.630203",
"0.6296635",
"0.6284086",
"0.6272065",
"0.6267411",
"0.6267411",
"0.62287724",
"0.621506",
"0.62080956",
"0.62065595",
"0.62047654",
"0.6194837",
"0.61911243",
"0.61870605",
"0.6185899",
"0.61790425",
"0.6174246",
"0.61738384",
"0.61660147",
"0.61561257",
"0.6146663",
"0.61424583",
"0.61363614",
"0.61262304",
"0.61254895",
"0.612033",
"0.6119844",
"0.6113775",
"0.6113111",
"0.6111962",
"0.6109732",
"0.61025345",
"0.609514",
"0.6089199",
"0.6082101",
"0.60781956",
"0.6064268",
"0.60640156",
"0.6047639",
"0.6046293",
"0.60419095",
"0.6041373",
"0.6040429",
"0.60383856",
"0.60372",
"0.60321414",
"0.6028497",
"0.60223365",
"0.601586",
"0.60070825"
]
| 0.7230605 | 2 |
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() {
jPanel7 = new javax.swing.JPanel();
Cadastros01_campo_senha = new javax.swing.JLabel();
Cadastros01_txtcampo_senha = new javax.swing.JTextField();
Cadastros01_campo_data_admissao = new javax.swing.JLabel();
Cadastros01_campo_data_demissao = new javax.swing.JLabel();
Cadastros01_txtcampo_data_admissao = new javax.swing.JFormattedTextField();
jFormattedTextField3 = new javax.swing.JFormattedTextField();
jPanel4 = new javax.swing.JPanel();
Cadastros01_txtcampo_profissao = new javax.swing.JTextField();
Cadastros01_campo_profissao = new javax.swing.JLabel();
Cadastros01_txtcampo_numero_socio = new javax.swing.JTextField();
Cadastros01_campo_numero_socio = new javax.swing.JLabel();
Cadastros01_txtcampo_CPF = new javax.swing.JTextField();
Cadastros01_txtcampo_email = new javax.swing.JTextField();
Cadastros01_campo_CPF = new javax.swing.JLabel();
Cadastros01_txtcampo_idade = new javax.swing.JTextField();
Cadastros01_campo_idade = new javax.swing.JLabel();
Cadastros01_campo_telefone = new javax.swing.JLabel();
Cadastros01_campo_estado_civil = new javax.swing.JComboBox();
Cadastros01_campo_sexo = new javax.swing.JComboBox();
Cadastros01_campo_email = new javax.swing.JLabel();
Cadastros01_campo_nome = new javax.swing.JLabel();
Cadastros01_txtcampo_nome = new javax.swing.JTextField();
Cadastros01_campo_especificacao_do_socio = new javax.swing.JLabel();
Cadastros01_txtcampo_especificacao_do_socio = new javax.swing.JTextField();
Cadastros01_txtcampo_telefone = new javax.swing.JFormattedTextField();
Cadastros01_campo_botao_limpar = new javax.swing.JButton();
Cadastros01_campo_botao_finalizar_cadastro = new javax.swing.JButton();
jPanel3 = new javax.swing.JPanel();
Cadastros01_campo_cidade = new javax.swing.JLabel();
Cadastros01_campo_bairro = new javax.swing.JLabel();
Cadastros01_campo_estados_brasileiros = new javax.swing.JComboBox();
Cadastros01_campo_rua = new javax.swing.JLabel();
Cadastros01_txtcampo_cidade = new javax.swing.JTextField();
Cadastros01_txtcampo_bairro = new javax.swing.JTextField();
Cadastros01_txtcampo_rua = new javax.swing.JTextField();
Cadastros01_campo_CEP = new javax.swing.JLabel();
Cadastros01_txtcampo_CEP = new javax.swing.JFormattedTextField();
Cadastros01_campo_botao_sair = new javax.swing.JButton();
Cadastros01_campo_confirmação = new javax.swing.JLabel();
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jLabel2 = new javax.swing.JLabel();
jTextField2 = new javax.swing.JTextField();
jLabel3 = new javax.swing.JLabel();
Cadastros01_txtcampo_telefone1 = new javax.swing.JFormattedTextField();
jLabel4 = new javax.swing.JLabel();
jTextField3 = new javax.swing.JTextField();
jLabel5 = new javax.swing.JLabel();
jTextField4 = new javax.swing.JTextField();
jLabel6 = new javax.swing.JLabel();
jTextField5 = new javax.swing.JTextField();
jComboBox1 = new javax.swing.JComboBox();
jLabel7 = new javax.swing.JLabel();
jFormattedTextField1 = new javax.swing.JFormattedTextField();
jLabel14 = new javax.swing.JLabel();
jComboBox3 = new javax.swing.JComboBox();
jPanel2 = new javax.swing.JPanel();
jLabel8 = new javax.swing.JLabel();
jTextField6 = new javax.swing.JTextField();
Cadastros01_campo_estados_brasileiros1 = new javax.swing.JComboBox();
Cadastros01_txtcampo_CEP1 = new javax.swing.JFormattedTextField();
Cadastros01_txtcampo_bairro1 = new javax.swing.JTextField();
Cadastros01_campo_CEP1 = new javax.swing.JLabel();
Cadastros01_txtcampo_rua1 = new javax.swing.JTextField();
Cadastros01_campo_bairro1 = new javax.swing.JLabel();
Cadastros01_campo_rua1 = new javax.swing.JLabel();
jLabel9 = new javax.swing.JLabel();
jTextField7 = new javax.swing.JTextField();
jPanel5 = new javax.swing.JPanel();
jLabel10 = new javax.swing.JLabel();
jTextField8 = new javax.swing.JTextField();
jLabel11 = new javax.swing.JLabel();
jTextField9 = new javax.swing.JTextField();
jLabel12 = new javax.swing.JLabel();
jTextField10 = new javax.swing.JTextField();
jLabel13 = new javax.swing.JLabel();
jComboBox2 = new javax.swing.JComboBox();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
jButton4 = new javax.swing.JButton();
jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder("Associado"));
Cadastros01_campo_senha.setText("Senha:");
Cadastros01_campo_data_admissao.setText("Data de emissão:");
Cadastros01_campo_data_demissao.setText("Data de demissão:");
try {
Cadastros01_txtcampo_data_admissao.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##/##/####")));
} catch (java.text.ParseException ex) {
ex.printStackTrace();
}
try {
jFormattedTextField3.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##/##/####")));
} catch (java.text.ParseException ex) {
ex.printStackTrace();
}
javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
jPanel7.setLayout(jPanel7Layout);
jPanel7Layout.setHorizontalGroup(
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel7Layout.createSequentialGroup()
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel7Layout.createSequentialGroup()
.addComponent(Cadastros01_campo_senha)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(Cadastros01_txtcampo_senha, javax.swing.GroupLayout.PREFERRED_SIZE, 226, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel7Layout.createSequentialGroup()
.addComponent(Cadastros01_campo_data_admissao)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(Cadastros01_txtcampo_data_admissao))
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel7Layout.createSequentialGroup()
.addComponent(Cadastros01_campo_data_demissao)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jFormattedTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel7Layout.setVerticalGroup(
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel7Layout.createSequentialGroup()
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(Cadastros01_campo_senha)
.addComponent(Cadastros01_txtcampo_senha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(9, 9, 9)
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(Cadastros01_campo_data_admissao)
.addComponent(Cadastros01_txtcampo_data_admissao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(Cadastros01_campo_data_demissao)
.addComponent(jFormattedTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(0, 17, Short.MAX_VALUE))
);
jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("Informações pessoais"));
Cadastros01_txtcampo_profissao.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
Cadastros01_txtcampo_profissaoActionPerformed(evt);
}
});
Cadastros01_campo_profissao.setText("Profissão:");
Cadastros01_txtcampo_numero_socio.setBackground(new java.awt.Color(204, 204, 204));
Cadastros01_campo_numero_socio.setText("N° socio:");
Cadastros01_campo_CPF.setText("CPF:");
Cadastros01_txtcampo_idade.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
Cadastros01_txtcampo_idadeActionPerformed(evt);
}
});
Cadastros01_campo_idade.setText("Idade:");
Cadastros01_campo_telefone.setText("Telefone:");
Cadastros01_campo_estado_civil.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Estado Civil", "Solteiro", "Casado" }));
Cadastros01_campo_sexo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Sexo", "Feminino", "Masculino" }));
Cadastros01_campo_email.setText("Email:");
Cadastros01_campo_nome.setText("Nome:");
Cadastros01_campo_especificacao_do_socio.setText("Especificação do sócio:");
try {
Cadastros01_txtcampo_telefone.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(##)####-####")));
} catch (java.text.ParseException ex) {
ex.printStackTrace();
}
javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
jPanel4.setLayout(jPanel4Layout);
jPanel4Layout.setHorizontalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(Cadastros01_campo_especificacao_do_socio)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(Cadastros01_txtcampo_especificacao_do_socio))
.addGroup(jPanel4Layout.createSequentialGroup()
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(Cadastros01_campo_profissao)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(Cadastros01_txtcampo_profissao))
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(Cadastros01_campo_email)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(Cadastros01_txtcampo_email))
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(Cadastros01_campo_telefone)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(Cadastros01_txtcampo_telefone, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(Cadastros01_campo_CPF)
.addGap(3, 3, 3)
.addComponent(Cadastros01_txtcampo_CPF, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(jPanel4Layout.createSequentialGroup()
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(Cadastros01_campo_nome)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(Cadastros01_txtcampo_nome, javax.swing.GroupLayout.PREFERRED_SIZE, 204, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(Cadastros01_campo_numero_socio)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(Cadastros01_txtcampo_numero_socio, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(Cadastros01_campo_idade)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(Cadastros01_txtcampo_idade, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(Cadastros01_campo_estado_civil, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(Cadastros01_campo_sexo, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addGap(0, 0, Short.MAX_VALUE)))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(Cadastros01_txtcampo_nome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(Cadastros01_campo_nome, javax.swing.GroupLayout.Alignment.TRAILING))
.addGap(11, 11, 11)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(Cadastros01_campo_idade)
.addComponent(Cadastros01_txtcampo_idade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(Cadastros01_campo_numero_socio)
.addComponent(Cadastros01_txtcampo_numero_socio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(Cadastros01_campo_sexo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(11, 11, 11)
.addComponent(Cadastros01_campo_estado_civil, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(Cadastros01_campo_telefone)
.addComponent(Cadastros01_campo_CPF)
.addComponent(Cadastros01_txtcampo_CPF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(Cadastros01_txtcampo_telefone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(Cadastros01_campo_profissao)
.addComponent(Cadastros01_txtcampo_profissao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(Cadastros01_txtcampo_email, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(Cadastros01_campo_email))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(Cadastros01_campo_especificacao_do_socio)
.addComponent(Cadastros01_txtcampo_especificacao_do_socio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
Cadastros01_campo_botao_limpar.setText("Limpar");
Cadastros01_campo_botao_limpar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
Cadastros01_campo_botao_limparActionPerformed(evt);
}
});
Cadastros01_campo_botao_finalizar_cadastro.setText("Finalizar Cadastro");
Cadastros01_campo_botao_finalizar_cadastro.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
Cadastros01_campo_botao_finalizar_cadastroActionPerformed(evt);
}
});
jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Endereço"));
Cadastros01_campo_cidade.setText("Cidade:");
Cadastros01_campo_bairro.setText("Bairro:");
Cadastros01_campo_estados_brasileiros.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Estados Brasileiros", "AC- Acre ", "AL- Alagoas ", "AP- Amapá \t", "AM- Amazonas \t", "BA- Bahia\t", "CE- Ceará \t", "DF- Distrito Federal \t", "ES- Espírito Santo ", "GO- Goiás ", "MA- Maranhão \t", "MT-Mato Grosso \t", "MS- Mato Grosso do Sul \t \t", "MG- Minas Gerais \t", "PR- Paraná ", "PA- Pará \t", "PE- Pernambuco", "PI- Piauí \t", "RJ- Rio de Janeiro \t", "RN- Rio Grande do Norte \t", "RS- Rio Grande do Sul \t", "RO- Rondonia \t", "RR- Roraima \t", "SC- Santa Catarina \t", "SE- Sergipe \t", "SP- São Paulo \t", "TO- Tocantins \t", " " }));
Cadastros01_campo_rua.setText("Rua:");
Cadastros01_campo_CEP.setText("CEP:");
try {
Cadastros01_txtcampo_CEP.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("###.###.###-##")));
} catch (java.text.ParseException ex) {
ex.printStackTrace();
}
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(Cadastros01_campo_cidade)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(Cadastros01_txtcampo_cidade, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(Cadastros01_campo_rua)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(Cadastros01_txtcampo_rua)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(Cadastros01_campo_estados_brasileiros, javax.swing.GroupLayout.PREFERRED_SIZE, 175, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(Cadastros01_campo_CEP)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(Cadastros01_txtcampo_CEP)))
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(Cadastros01_campo_bairro)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(Cadastros01_txtcampo_bairro))
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(Cadastros01_campo_cidade)
.addComponent(Cadastros01_txtcampo_cidade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(Cadastros01_campo_estados_brasileiros, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(Cadastros01_campo_rua)
.addComponent(Cadastros01_txtcampo_rua, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(Cadastros01_campo_CEP)
.addComponent(Cadastros01_txtcampo_CEP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(Cadastros01_campo_bairro)
.addComponent(Cadastros01_txtcampo_bairro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
Cadastros01_campo_botao_sair.setText("Sair");
Cadastros01_campo_botao_sair.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
Cadastros01_campo_botao_sairActionPerformed(evt);
}
});
Cadastros01_campo_confirmação.setForeground(new java.awt.Color(255, 0, 0));
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Dados pessoais"));
jLabel1.setText("Nome:");
jLabel2.setText("Idade:");
jTextField2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField2ActionPerformed(evt);
}
});
jLabel3.setText("Telefone:");
try {
Cadastros01_txtcampo_telefone1.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(##)####-####")));
} catch (java.text.ParseException ex) {
ex.printStackTrace();
}
jLabel4.setText("CPF:");
jLabel5.setText("Registo geral:");
jTextField4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField4ActionPerformed(evt);
}
});
jLabel6.setText("Código");
jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Sexo", "Masculino", "Feminino" }));
jLabel7.setText("Data de nascimento:");
try {
jFormattedTextField1.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##/##/####")));
} catch (java.text.ParseException ex) {
ex.printStackTrace();
}
jLabel14.setText("Status:");
jComboBox3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Ativo", "Desativo" }));
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jTextField1))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addComponent(jLabel4)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 228, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(10, 10, 10)
.addComponent(jLabel6)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel5)
.addComponent(jComboBox1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jLabel7)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jFormattedTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel14)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jComboBox3, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 190, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel3)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(Cadastros01_txtcampo_telefone1, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)))))
.addContainerGap(25, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel1)
.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(4, 4, 4)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel4)
.addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel6)
.addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel2)
.addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(3, 3, 3)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel5)
.addComponent(jLabel3)
.addComponent(Cadastros01_txtcampo_telefone1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel7)
.addComponent(jFormattedTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel14)
.addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Endereço"));
jLabel8.setText("Cidade:");
Cadastros01_campo_estados_brasileiros1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Estados Brasileiros", "AC- Acre ", "AL- Alagoas ", "AP- Amapá \t", "AM- Amazonas \t", "BA- Bahia\t", "CE- Ceará \t", "DF- Distrito Federal \t", "ES- Espírito Santo ", "GO- Goiás ", "MA- Maranhão \t", "MT-Mato Grosso \t", "MS- Mato Grosso do Sul \t \t", "MG- Minas Gerais \t", "PR- Paraná ", "PA- Pará \t", "PE- Pernambuco", "PI- Piauí \t", "RJ- Rio de Janeiro \t", "RN- Rio Grande do Norte \t", "RS- Rio Grande do Sul \t", "RO- Rondonia \t", "RR- Roraima \t", "SC- Santa Catarina \t", "SE- Sergipe \t", "SP- São Paulo \t", "TO- Tocantins \t", " " }));
try {
Cadastros01_txtcampo_CEP1.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("###.###.###-##")));
} catch (java.text.ParseException ex) {
ex.printStackTrace();
}
Cadastros01_campo_CEP1.setText("CEP:");
Cadastros01_campo_bairro1.setText("Bairro:");
Cadastros01_campo_rua1.setText("Rua:");
jLabel9.setText("Logradouro:");
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jLabel9)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jTextField7))
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(Cadastros01_campo_CEP1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(Cadastros01_txtcampo_CEP1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(Cadastros01_campo_bairro1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(Cadastros01_txtcampo_bairro1, javax.swing.GroupLayout.PREFERRED_SIZE, 263, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jLabel8)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(Cadastros01_campo_estados_brasileiros1, javax.swing.GroupLayout.PREFERRED_SIZE, 231, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(Cadastros01_campo_rua1)
.addGap(18, 18, 18)
.addComponent(Cadastros01_txtcampo_rua1)))
.addGap(29, 29, 29))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel8)
.addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(Cadastros01_campo_estados_brasileiros1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(Cadastros01_campo_rua1)
.addComponent(Cadastros01_txtcampo_rua1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(Cadastros01_campo_CEP1)
.addComponent(Cadastros01_txtcampo_CEP1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(Cadastros01_campo_bairro1)
.addComponent(Cadastros01_txtcampo_bairro1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel9)
.addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder("Fisico"));
jLabel10.setText("Altura:");
jLabel11.setText("Peso:");
jLabel12.setText("Modalidade:");
jLabel13.setText("Professor:");
jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Masculino", "Feminino" }));
javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
jPanel5.setLayout(jPanel5Layout);
jPanel5Layout.setHorizontalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addComponent(jLabel10)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel5Layout.createSequentialGroup()
.addComponent(jLabel11)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(jPanel5Layout.createSequentialGroup()
.addComponent(jLabel12)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jTextField10, javax.swing.GroupLayout.PREFERRED_SIZE, 251, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel5Layout.createSequentialGroup()
.addComponent(jLabel13)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jComboBox2, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel5Layout.setVerticalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel10)
.addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel12))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel11)
.addComponent(jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel13)
.addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jButton1.setText("Confirmar");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButton2.setText("Alterar");
jButton3.setText("Sair");
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});
jButton4.setText("Deletar");
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addComponent(jButton1)
.addGap(18, 18, 18)
.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton1)
.addComponent(jButton2)
.addComponent(jButton3)
.addComponent(jButton4))
.addContainerGap(20, Short.MAX_VALUE))
);
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 |
return the fake first and last name | public static String getRandomName() {
Faker faker = new Faker();
return faker.name().fullName();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getFirstName();",
"java.lang.String getFirstName();",
"public java.lang.String getFirstName();",
"String getFirstName();",
"String getFirstName();",
"String getFirstName();",
"public void getFirstAndLastName( String name ){//\r\n String nameNew = name.trim();\r\n String[] arr = nameNew.split(\"\\\\s\");\r\n firstName = arr[0];\r\n lastName = arr[1];\r\n }",
"public static String getFirstName() {\n String firstName = \"George\";\n String lastName = \"Washington\";\n return lastName;\n }",
"java.lang.String getSurname();",
"public String getFirstName();",
"String getSurname();",
"@AutoEscape\n\tpublic String getFirstName();",
"public String firstName() { return firstName; }",
"String getLastName();",
"String getLastName();",
"private String fullName(){\n\t\tFullName=firstName+\" \"+lastName;\n\t\treturn (initial.toUpperCase()+\".\"+\" \"+firstName.toUpperCase()+\" \"+lastName.toUpperCase());\n\t}",
"public String getName (){\r\n return firstName + \" \" + lastName;\r\n }",
"public String getName() {\n return lastname + \", \" + firstname;\n }",
"public java.lang.CharSequence getFirstName() {\n return first_name;\n }",
"public String getLastName();",
"@Override\r\n\tpublic String getFistName() {\n\t\treturn first_name;\r\n\t}",
"public String getFirstname() {\n return (String) get(\"firstname\");\n }",
"public String getName(){\n\t\treturn this.firstName + \" \" + this.surname;\r\n\t}",
"public java.lang.CharSequence getFirstName() {\n return first_name;\n }",
"@Override\n public String getFullName() {\n return firstName + \" \" + lastName;\n }",
"String fullName();",
"java.lang.String getLastName();",
"java.lang.String getLastName();",
"public String getFirst_name() {\n return first_name;\n }",
"public String getFirstName() {\n return fName;\n }",
"public String getFirstName(){\r\n\t\treturn firstName;\r\n\t}",
"public void getFirstName() {\n\n\t}",
"public static String getFirstName() {\r\n\t\treturn firstName;\r\n\t}",
"public String returnFirstName() {\n\t\treturn this.registration_firstname.getAttribute(\"value\");\t\t\r\n\t}",
"public String getFirstName()\r\n {\r\n return firstName;\r\n }",
"public String getFirstname() {\r\n\t\treturn firstname;\r\n\t}",
"public String getFirstName()\r\n {\r\n return firstName;\r\n }",
"public String getFirstName()\r\n {\r\n return firstName;\r\n }",
"public String getFirstName()\r\n {\r\n return firstName;\r\n }",
"public String getFirstName()\r\n {\r\n return firstName;\r\n }",
"public String returnLastName() {\n\t\treturn this.registration_lastname.getAttribute(\"value\");\r\n\t}",
"public String getFullName() {\n return getFirstName()+\" \"+getLastName();\n }",
"private String getFirstName() {\n System.out.println(\"Enter Your Last Name Of First Letter In Capital \");\n return sc.next();\n }",
"public String getFirstName()\r\n\t{\r\n\t\treturn firstName;\r\n\t}",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName(){\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\r\n return insertMode ? \"\" : stringValue(CONTACTS_FIRST_NAME);\r\n }",
"public String getFirstName() \r\n {\r\n return firstName;\r\n }",
"public String getFirstName() {\r\n return firstName;\r\n }",
"public String getFirstName() {\r\n return firstName;\r\n }",
"public String getFirstName() {\r\n return firstName;\r\n }",
"public String getFirstName() {\n\t\t System.out.println(\"method getFirstName() called.\");\n\t\t return firstName;\n\t\t}",
"public String getFullName()\n {\n return firstName + \" \" + lastName;\n }",
"public String getFirstName() { return firstName; }",
"public String getFirstName() {\n return firstNameField.getText();\n }",
"public java.lang.String getFirst_name() {\n return first_name;\n }",
"public String getFirstName()\r\n\t{\r\n\t\treturn firstName.getModelObjectAsString();\r\n\t}",
"public String getFirstName()\n\t{\n\t\t//local consants\n\n\t\t//local variables\n\n\t\t/*******************************************************************************/\n\n\t\t//Return the firstName.\n\t\treturn firstName;\n\n\t}",
"public String getFullName() {\n if (!Strings.isNullOrEmpty(givenName)) {\n if (!Strings.isNullOrEmpty(surname)) {\n return givenName + \" \" + surname;\n } else {\n return givenName;\n }\n }\n\n return Strings.nullToEmpty(surname);\n }",
"public java.lang.String getLastName();",
"public void updateFirstNameAndlastName() {\r\n\t\tprint(\"Update First name and last name\");\r\n\t\tDateFormat txt = new SimpleDateFormat(\"yyyyMMddHHmmss\");\r\n\t\tDate date = new Date();\r\n\t\tString fNamePostFix = \"Vivek\" + txt.format(date);\r\n\t\tString lNamePostFix = \"Sharma\" + txt.format(date);\r\n\t\tsendKeys(Locator.MyTrader.First_Name.value, fNamePostFix);\r\n\t\tsendKeys(Locator.MyTrader.Last_Name.value, lNamePostFix);\r\n\t}",
"public String getFirstname() {\n\t\treturn firstname;\n\t}",
"@java.lang.Override\n public java.lang.String getFirstName() {\n java.lang.Object ref = firstName_;\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 firstName_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getFirstName() {\n java.lang.Object ref = firstName_;\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 firstName_ = s;\n return s;\n }\n }",
"private String getRandName() {\n int firstName = (int)(Math.random() * listFirstNames.length);\n String fName = listFirstNames[firstName].trim();\n int lastName = (int)(Math.random() * listLastNames.length);\n String lName = listLastNames[lastName].trim();\n return ( fName + \" \" + lName ); \n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName()\n {\n return firstName;\n }",
"public String getFirstName()\n {\n return firstName;\n }",
"public String getFirstName() {\r\n // Bouml preserved body begin 00040B02\r\n\t System.out.println(firstName);\r\n\t return firstName;\r\n // Bouml preserved body end 00040B02\r\n }",
"public String getFirstName()\n {\n return firstName;\n }",
"public final String getFirstName() {\r\n\t\treturn firstName;\r\n\t}",
"@Test\n\t void testLastName() {\n\t\tString expected=\"Faizan\";\n\t\tString actual=user.getLastName();\n\t\tassertEquals(expected, actual);\n\t}",
"public void name(String first, String last) {\r\n String display = first + \" \" + last;\r\n textName.setText(display);\r\n }",
"public String getFirstName(){\r\n return firstname;\r\n }",
"static String getFirstName() {\n\t\tScanner s = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter first name: \");\n\t\tString fn = s.nextLine();\n\t\treturn fn;\n\t}"
]
| [
"0.7863742",
"0.7863742",
"0.75288975",
"0.7366979",
"0.7366979",
"0.7366979",
"0.7311014",
"0.7239343",
"0.71181947",
"0.70883083",
"0.7085426",
"0.7036164",
"0.7016397",
"0.7003103",
"0.7003103",
"0.6999311",
"0.69915074",
"0.6939218",
"0.69373643",
"0.69161516",
"0.6909301",
"0.6902529",
"0.68967485",
"0.6872842",
"0.6833523",
"0.6829092",
"0.68233085",
"0.68233085",
"0.6813244",
"0.6795362",
"0.6785348",
"0.67711973",
"0.67573",
"0.6756193",
"0.67525434",
"0.67489815",
"0.67473525",
"0.67473525",
"0.67473525",
"0.6744935",
"0.67430794",
"0.6740835",
"0.67272365",
"0.6724306",
"0.67209053",
"0.67209053",
"0.67174906",
"0.6716439",
"0.671545",
"0.6707409",
"0.6707409",
"0.6707409",
"0.6701697",
"0.66985506",
"0.66948056",
"0.6684485",
"0.66788024",
"0.66727316",
"0.6671207",
"0.6656875",
"0.66564476",
"0.6641404",
"0.6639309",
"0.66381156",
"0.66381156",
"0.66320664",
"0.6631726",
"0.6631726",
"0.6631726",
"0.6631726",
"0.6631726",
"0.6631726",
"0.6631726",
"0.6631726",
"0.6631726",
"0.6631726",
"0.6631726",
"0.6631726",
"0.6631726",
"0.6631726",
"0.6631726",
"0.6631726",
"0.6631726",
"0.6631726",
"0.6631726",
"0.6631726",
"0.6631726",
"0.6631726",
"0.6631726",
"0.6631726",
"0.6631726",
"0.6631726",
"0.66271716",
"0.66271716",
"0.6617924",
"0.66132754",
"0.66120505",
"0.66110206",
"0.6605093",
"0.66031843",
"0.6601454"
]
| 0.0 | -1 |
return the random string. kasfdhjashkdfa | public static String getRandomString() {
return RandomStringUtils.random(20, true, false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private final String getRandomString() {\n StringBuffer sbRan = new StringBuffer(11);\n String alphaNum = \"1234567890abcdefghijklmnopqrstuvwxyz\";\n int num;\n for (int i = 0; i < 11; i++) {\n num = (int) (Math.random() * (alphaNum.length() - 1));\n sbRan.append(alphaNum.charAt(num));\n }\n return sbRan.toString();\n }",
"public static String rndString() {\r\n char[] c = RBytes.rndCharArray();\r\n return new String(c);\r\n\r\n }",
"public static String getRandomString() {\n \tif (random == null)\n \t\trandom = new Random();\n \treturn new BigInteger(1000, random).toString(32);\n }",
"public static String randomeString() {\n\t\t\tString generatedString = RandomStringUtils.randomAlphabetic(8);\n\t\t\tSystem.out.println(generatedString);\n\t\t\treturn generatedString;\n\t\t\t\n\t\t}",
"private static String getRandString() {\r\n return DigestUtils.md5Hex(UUID.randomUUID().toString());\r\n }",
"private String getRandomString() {\n\t\tStringBuilder salt = new StringBuilder();\n\t\tRandom rnd = new Random();\n\t\twhile (salt.length() <= 5) {\n\t\t\tint index = (int) (rnd.nextFloat() * SALTCHARS.length());\n\t\t\tsalt.append(SALTCHARS.charAt(index));\n\t\t}\n\t\tString saltStr = salt.toString();\n\t\treturn saltStr;\n\t}",
"private String getRandomName(){\n return rndString.nextString();\n }",
"public String randomString() {\n return new BigInteger(130, random).toString(32);\n }",
"public static String randomString() {\n\t\tfinal long value = RANDOMIZER.nextLong();\n\t\treturn String.valueOf(value < 0 ? value * -1 : value);\n\t}",
"public String generateRandomString(){\n \n StringBuffer randStr = new StringBuffer();\n for(int i=0; i<RANDOM_STRING_LENGTH; i++){\n int number = getRandomNumber();\n char ch = CHAR_LIST.charAt(number);\n randStr.append(ch);\n }\n return randStr.toString();\n }",
"static public int getHobgoblinStr(){\n str = rand.nextInt(3) + 3;\n return str;\n }",
"public static String randomString() {\n\t\tint leftLimit = 97; // letter 'a'\n\t\tint rightLimit = 122; // letter 'z'\n\t\tint targetStringLength = 10;\n\t\tRandom random = new Random();\n\n\t\treturn random.ints(leftLimit, rightLimit + 1).limit(targetStringLength)\n\t\t\t\t.collect(StringBuilder::new, StringBuilder::appendCodePoint, StringBuilder::append).toString();\n\t}",
"@Override\r\n\tpublic String randString(int n) {\n\t\tString base=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\r\n\t\treturn randString(n, base);\r\n\t}",
"String getNewRandomTag() {\n\t\tbyte t[] = new byte[tagLength];\n\t\tfor (int i = 0; i < tagLength; i++) {\n\t\t\tt[i] = (byte) rand('a', 'z');\n\t\t}\n\t\treturn new String(t);\n\t}",
"private static String genString(){\n final String ALPHA_NUMERIC_STRING =\n \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n int pwLength = 14; //The longer the password, the more likely the user is to change it.\n StringBuilder pw = new StringBuilder();\n while (pwLength-- != 0) {\n int character = (int)(Math.random()*ALPHA_NUMERIC_STRING.length());\n pw.append(ALPHA_NUMERIC_STRING.charAt(character));\n }\n return pw.toString(); //\n }",
"public static String randomString() {\n return PodamUtil.manufacture(String.class);\n }",
"private String generateRandomWord()\n {\t\n\tRandom randomNb = new Random(System.currentTimeMillis());\n\tchar [] word = new char[randomNb.nextInt(3)+5];\n\tfor(int i=0; i<word.length; i++)\n\t word[i] = letters[randomNb.nextInt(letters.length)];\n\treturn new String(word);\n }",
"public static String rndLetterString() {\r\n int spLen = RBytes.rndInt(10, 20);\r\n char[] c = RBytes.rndCharArray('a', 'z');\r\n char[] C = RBytes.rndCharArray('A', 'Z');\r\n char[] d = RBytes.rndCharArray('0', '9');\r\n String special = \"\";\r\n for (int s = 0; s < spLen; s++) {\r\n special += \"!@#$%^&*()-_~`=+:;.,\";\r\n }\r\n String s1 = new String(c) + new String(d) + new String(C) + special;\r\n return shaffleString(s1);\r\n }",
"public String getRandomString(String template){\n reporter.info(\"Get random string for template: \"+ template);\n return RandomDataGenerator.getRandomField(template,RandomDataGenerator.DEFAULT_SEPARATOR);\n //return DataGenerator.getString(template);\n }",
"public String generate() {\r\n String result = RandomStringUtils.random(8,true,true);\r\n return result;\r\n }",
"private String generateRandomString(Random r, final int len) {\n byte[] bytes = new byte[len];\n for (int i = 0; i < len; i++) {\n bytes[i] = (byte)(r.nextInt(92) + 32);\n }\n return new String(bytes);\n }",
"public String generateString() {\n\t\tint maxLength = 9;\n\t\tRandom random = new Random();\n\t\tStringBuilder builder = new StringBuilder(maxLength);\n\n\t\t// Looping 9 times, one for each char\n\t\tfor (int i = 0; i < maxLength; i++) {\n\t\t\tbuilder.append(ALPHABET.charAt(random.nextInt(ALPHABET.length())));\n\t\t}\n\t\t// Generates a random ID that has may have a quintillion different combinations\n\t\t// (1/64^9)\n\t\treturn builder.toString();\n\t}",
"public java.lang.String getRnd () {\r\n\t\treturn rnd;\r\n\t}",
"public static String randInt(){\n return String.valueOf(rand.nextInt(10));\n }",
"@Override\r\n\tpublic String randString(int n, String base) {\n\t\tint bLength = base.length();\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tRandom r = new Random();\r\n\t\tint index;\r\n\t\tfor(int i=0; i<n; i++)\r\n\t\t{\r\n\t\t\tindex = r.nextInt(bLength);\r\n\t\t\tsb.append(base.charAt(index));\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}",
"private static String smsCode() {\n\t\t\tString random=new Random().nextInt(1000000)+\"\";\r\n\t\t\treturn random;\r\n\t\t}",
"private String creatNewText() {\n\t\tRandom rnd = new Random();\n\t\treturn \"Some NEW teXt U9\" + Integer.toString(rnd.nextInt(999999));\n\t}",
"public String getRandom() {\n\t return word.get(new Random().nextInt(word.size()));}",
"public static String getRandomString(int length)\r\n {\r\n if (length <= 0) length = 8;\r\n byte[] bytes = new byte[length];\r\n random.nextBytes(bytes);\r\n StringBuffer sb = new StringBuffer(length);\r\n for (int i = 0; i < length; i++)\r\n {\r\n sb.append(m_alphanumeric[Math.abs(bytes[i]%36)]);\r\n }\r\n return sb.toString();\r\n }",
"private String generateRandomHexString(){\n return Long.toHexString(Double.doubleToLongBits(Math.random()));\n }",
"private static String randomString(int length) {\n\t\tStringBuilder builder = new StringBuilder();\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tint index = randInt(0, ALPHA_NUMERIC_STRING.length() - 1);\n\t\t\tbuilder.append(ALPHA_NUMERIC_STRING.charAt(index));\n\t\t}\n\t\treturn builder.toString();\n\t}",
"public static String getRandomString(int len){\n\n String pool =\"\";\n for(int i='0';i<='9';i++)\n pool+=(char)i;\n for(int i='A'; i<= 'Z'; i++){\n pool+=(char)i;\n }\n for(int i='a'; i<='z'; i++){\n pool+=(char)i;\n }\n char[] cs = new char[len];\n for(int i=0;i<len;i++){\n cs[i] = pool.charAt( (int)(Math.random()*(pool.length())));\n }\n return new String(cs);\n\n }",
"public static final String getRandomId() {\r\n return (\"\" + Math.random()).substring(2);\r\n }",
"public static String rndString(int length) {\r\n char[] c = RBytes.rndCharArray(length);\r\n return new String(c);\r\n\r\n }",
"protected String random(String value) {\n \t\treturn value + new Random().nextInt(100);\n \t}",
"private static String generateRandomString(int size) {\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < size / 2; i++) sb.append((char) (64 + r.nextInt(26)));\n return sb.toString();\n }",
"public static String randomString(int lo, int hi){ \r\n int n = rand(lo, hi); \r\n byte b[] = new byte[n]; \r\n for (int i = 0; i < n; i++) \r\n b[i] = (byte)rand('a', 'z'); \r\n return new String(b, 0); \r\n\t}",
"@Override\r\n\tpublic String rollString() {\r\n\t\treturn \"\"+Randomizer.getRandomNumber(possibleValues);\r\n\t}",
"public static String buildTestString(int length, Random random) {\n char[] chars = new char[length];\n for (int i = 0; i < length; i++) {\n chars[i] = (char) random.nextInt();\n }\n return new String(chars);\n }",
"public static String randomStringGenerator(int len)\n {\n \t int lLimit = 97; \n \t int rLimit = 122; \n \t int targetStringLength =len;\n \t Random random = new Random();\n String generatedString = random.ints(lLimit, rLimit + 1)\n \t .limit(targetStringLength)\n \t .collect(StringBuilder::new, StringBuilder::appendCodePoint, StringBuilder::append)\n \t .toString();\n return generatedString;\n }",
"private String generateRandomString(int length) {\n\n StringBuilder stringBuilder = new StringBuilder(length);\n int index = -1;\n while (stringBuilder.length() < length) {\n index = mRandom.nextInt(TEST_CHAR_SET_AS_STRING.length());\n stringBuilder.append(TEST_CHAR_SET_AS_STRING.charAt(index));\n }\n return stringBuilder.toString();\n }",
"public String randomGenertateContent(){\n\t\tString []temp = {\"This\",\"Is\",\"Random\",\"Randomize\",\"Content\",\"Random\",\"Randomize\",\"Random\",\"Randomly\",\"Random Text\"};\n\t\tRandom random = new Random();\n\t\tint numOfWord = (int) (random.nextInt(20 - 1 + 1) + 1);\n\t\tString output = \"\";\n\t\tfor(int i=0;i<numOfWord;i++){\n\t\t\tint index = (int) (random.nextInt(temp.length - 2 + 1));\n\t\t\toutput+= temp[index] + \" \";\n\t\t}\n\t\treturn output;\n\t}",
"static String getRandomString(int n){\n StringBuilder sb = new StringBuilder(n); \r\n \r\n for (int i = 0; i < n; i++) { \r\n \r\n // generate a random number between \r\n // 0 to AlphaNumericString variable length \r\n int index = (int)(alphabet.length() * Math.random()); \r\n \r\n // add Character one by one in end of sb \r\n sb.append(alphabet.charAt(index)); \r\n } \r\n \r\n return sb.toString(); \r\n }",
"public String getRandomCharecter(){\n\n\tif (!dataprepared){\n\t prepareData();\n\t}\n\t\n\tAssert.pre(table!=null,\"data must be prepared\");\n\n\treturn (String)table.get(r.nextInt(total));\n\n\t\n }",
"static String getSaltString() {\n String SALTCHARS = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\";\n StringBuilder salt = new StringBuilder();\n Random rnd = new Random();\n while (salt.length() < 18) { // length of the random string.\n int index = (int) (rnd.nextFloat() * SALTCHARS.length());\n salt.append(SALTCHARS.charAt(index));\n }\n String saltStr = salt.toString();\n return saltStr;\n }",
"protected static String generateString(int length) {\n String characters = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n Random rnd = new Random(System.nanoTime());\n char[] text = new char[length];\n for (int i = 0; i < length; i++) {\n text[i] = characters.charAt(rnd.nextInt(characters.length()));\n }\n return new String(text);\n }",
"public static String stringGen(int seed) {\n String word = \"\"; // holds random string\r\n String letters = \"abdefghilmnoprstuwxy\"; // usable letters\r\n char letter; // holds current letter that is added to (string)word\r\n \r\n Random randomGen = new Random();\r\n \r\n for(int x = 0; x<50; x++){ // Create a random string of 50 characters\r\n int randomInt = randomGen.nextInt(20);\r\n letter = letters.charAt(randomInt);\r\n word = word + letter;\r\n }\r\n return word; // Finalized random string\r\n }",
"protected String generateKey(){\n Random bi= new Random();\n String returnable= \"\";\n for(int i =0;i<20;i++)\n returnable += bi.nextInt(10);\n return returnable;\n }",
"public synchronized static final String generateRandomString(int n) {\n\t\tchar[] chars = \"abcdefghijklmnopqrstuvwxyz1234567890\".toCharArray();\n\t\tSecureRandom random = new SecureRandom();\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tsb.append(chars[random.nextInt(chars.length)]);\n\t\t}\n\t\treturn sb.toString();\n\t}",
"private String createRandCode() {\n final String ALPHA_STRING = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\n StringBuilder builder = new StringBuilder();\n int cnt = CODE_LEN;\n while (cnt-- != 0) {\n int charPos = (int) (Math.random()*ALPHA_STRING.length());\n builder.append(ALPHA_STRING.charAt(charPos));\n }\n Log.i(\"GameCode\", \"createRandCode: \" + builder.toString());\n return builder.toString();\n }",
"private static String createRandomString(int minLen, int maxLen, Random random) {\n int len = (minLen == maxLen) ? minLen : (random.nextInt(maxLen - minLen) + minLen);\n StringBuilder sb = new StringBuilder(len);\n while (sb.length() < len) {\n sb.append(CHARACTERS[random.nextInt(CHARACTERS.length)]);\n }\n return sb.toString();\n }",
"public static String rndString(String type) {\r\n char min = ' ';\r\n char max = ' ';\r\n if (type.trim().equals(LATIN_LARGE)) {\r\n min = 'A';\r\n max = 'Z';\r\n } else if (type.trim().equals(LATIN_SMALL)) {\r\n min = 'a';\r\n max = 'z';\r\n } else if (type.trim().equals(DIGITS)) {\r\n min = '0';\r\n max = '9';\r\n }\r\n char[] c = RBytes.rndCharArray(min, max);\r\n return new String(c);\r\n\r\n }",
"public static String randChar(int l) {\n char [] replacement = {'&','#','%','!','@','?'};\n String out=\"\";\n var r=new Random();\n for(int i = 0; i <l;i++) {\n out+= replacement[r.nextInt(replacement.length)];\n }\n return out;\n }",
"private String randomNonEmptyString() {\n while (true) {\n final String s = TestUtil.randomUnicodeString(random()).trim();\n if (s.length() != 0 && s.indexOf('\\u0000') == -1) {\n return s;\n }\n }\n }",
"public static synchronized String getRandomPassword() {\n\t\t StringBuilder password = new StringBuilder();\n\t\t int j = 0;\n\t\t for (int i = 0; i < MINLENGTHOFPASSWORD; i++) {\n\t\t \t//System.out.println(\"J is \"+j);\n\t\t password.append(getRandomPasswordCharacters(j));\n\t\t j++;\n\t\t \n\t\t if (j == 4) {\n\t\t j = 0;\n\t\t }\n\t\t }\n\t\t return password.toString();\n\t\t}",
"public String nextString()\n {\n for (int index = 0; index < buf.length; ++index)\n {\n buf[index] = symbols[random.nextInt(symbols.length)];\n }\n return new String(buf);\n }",
"public String getRandomName() {\n\t\t\n\t\tRandom r = new Random();\n\t\t\n\t\t//pick a firstname and surname based on length of array\n\t\tString fname = firstName[r.nextInt(firstName.length)];\n\t\tString sname = surName[r.nextInt(surName.length)];\n\t\t\n\t\treturn ( fname + \" \" + sname);\n\t\t\n\t}",
"public static String getRandomString(int length, boolean easyReadOnly)\r\n {\r\n if (easyReadOnly)\r\n {\r\n if (length <= 0) length = 8;\r\n byte[] bytes = new byte[length];\r\n random.nextBytes(bytes);\r\n StringBuffer sb = new StringBuffer(length);\r\n for (int i = 0; i < length; i++)\r\n {\r\n sb.append(m_alphanumeric3[Math.abs(bytes[i]%m_alphanumeric3.length)]);\r\n }\r\n return sb.toString();\r\n }\r\n else\r\n return getRandomString(length); \r\n }",
"public static String randomString(Random r, int len) {\n char[] C = new char[len];\n for (int i = 0; i < len; i++)\n C[i] = (char) (r.nextInt(26) + 'a');\n return new String(C);\n }",
"public String randomName() {\n return RandomStringUtils.randomAlphabetic( 10 );\n }",
"public String nextString() {\n\t\tfor (int idx = 0; idx < this.buf.length; ++idx)\n\t\t\tthis.buf[idx] = this.symbols[this.random.nextInt(this.symbols.length)];\n\t\treturn new String(this.buf);\n\t}",
"private String RandomGoal() {\n\t\tList<String> list = Arrays.asList(\"m\", \"m\", \"m\", \"m\", \"m\", \"m\", \"m\", \"m\", \"t\", \"t\");\n\t\tRandom rand = new Random();\n\t\tString randomgoal = list.get(rand.nextInt(list.size()));\n\n\t\treturn randomgoal;\n\t}",
"public static String generatePatientName(){\n\n\t\tString retName = \"\";\t// return this string\n\n\t\t// Seed random generator\n\t\tRandom generator = new Random();\n\n\t\tint length = getRandomBetween(5,6);\n\n\t\t// CVCCVC or VCCVCV\n\t\tif(getRandomBetween(1,2) < 2)\n\t\t{\n\t\t\tretName += getRandomConsonant();\n\t\t\tretName = retName.toUpperCase();\n\t\t\tretName += getRandomVowel();\n\t\t\tretName += getRandomConsonant();\n\t\t\tretName += getRandomConsonant();\n\t\t\tif (length >= 5) { retName += getRandomVowel(); }\n\t\t\tif (length >= 6) { retName += getRandomConsonant(); }\n\t\t}\n\t\telse\n\t\t{\n\t\t\tretName += getRandomVowel();\n\t\t\tretName = retName.toUpperCase();\n\t\t\tretName += getRandomConsonant();\n\t\t\tretName += getRandomConsonant();\n\t\t\tretName += getRandomVowel();\n\t\t\tif (length >= 5) { retName += getRandomConsonant(); }\n\t\t\tif (length >= 6) { retName += getRandomVowel(); }\n\t\t}\n\n\t\treturn retName;\n\t}",
"public String generateRandomEmail() {\n return generateLocalPart() + \"@test\" + getRandNumber() + \".com\";\n }",
"String selectRandomSecretWord();",
"public static String randomNumberString() {\n\r\n Random random = new Random();\r\n int i = random.nextInt(999999);\r\n\r\n\r\n return String.format(\"%06d\", i);\r\n }",
"public static String generateRandomUsername() {\n final String randomFirst = Long.toHexString(Double.doubleToLongBits(Math\n .random()));\n final String randomSecond = Long.toHexString(Double.doubleToLongBits(Math\n .random()));\n final String randomThird = Long.toHexString(Double.doubleToLongBits(Math\n .random()));\n String userName = randomFirst + randomSecond + randomThird;\n\n userName = userName.substring(0, 10) + \"@ngetestmail.com\";\n\n return userName;\n }",
"public static String getRandomString2(int length)\r\n {\r\n if (length <= 0) length = 8;\r\n byte[] bytes = new byte[length];\r\n random.nextBytes(bytes);\r\n StringBuffer sb = new StringBuffer(length);\r\n for (int i = 0; i < length; i++)\r\n {\r\n sb.append(m_alphanumeric2[Math.abs(bytes[i] % m_alphanumeric2.length)]);\r\n }\r\n return sb.toString();\r\n }",
"public String generateGUID() {\n Random randomGenerator = new Random();\n String hash = DigestUtils.shaHex(HASH_FORMAT.format(new Date())\n + randomGenerator.nextInt());\n return hash.substring(0, GUID_LEN);\n }",
"public static String randomIdentifier() {\r\n\t\tfinal String lexicon = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\r\n\t\tfinal java.util.Random rand = new java.util.Random();\r\n\t\t// consider using a Map<String,Boolean> to say whether the identifier is\r\n\t\t// being used or not\r\n\t\tfinal Set<String> identifiers = new HashSet<String>();\r\n\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\twhile (builder.toString().length() == 0) {\r\n\t\t\tint length = rand.nextInt(5) + 5;\r\n\t\t\tfor (int i = 0; i < length; i++)\r\n\t\t\t\tbuilder.append(lexicon.charAt(rand.nextInt(lexicon.length())));\r\n\t\t\tif (identifiers.contains(builder.toString()))\r\n\t\t\t\tbuilder = new StringBuilder();\r\n\t\t}\r\n\t\treturn builder.toString();\r\n\t}",
"private String getRandomSeed() {\n long newSeed = 0;\n Random randBoolean = new Random(randomSeed);\n for (int i = 0; i < 48; i++) {\n if (randBoolean.nextBoolean()) {\n newSeed += 1 << i;\n }\n }\n if (newSeed < 0) {\n newSeed = Math.abs(newSeed);\n }\n\n String s = \"\";\n if (newSeed == 0) {\n s += \"0\";\n } else {\n while (newSeed != 0) {\n long num = (newSeed & (0xF));\n if (num < 10) {\n s = num + s;\n } else {\n s = ((char) (num + 55)) + s;\n }\n newSeed = newSeed >> 4;\n }\n }\n return s;\n }",
"private String randomName() {\n\n String name = this.names.get(intRandom(names.size() - 1));\n return name;\n }",
"public String generateMP() {\n\t\t\tString characters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789~`!@#$%^&*()-_=+[{]}\\\\|;:\\'\\\",<.>/?\";\n\t\t\tString pwd = RandomStringUtils.random(15, 0, 0, false, false, characters.toCharArray(), new SecureRandom());\n\t\t\treturn pwd;\n\t\t}",
"private String generateRandomId(){\n\n //creates a new Random object\n Random rnd = new Random();\n\n //creates a char array that is made of all the alphabet (lower key + upper key) plus all the digits.\n char[] characters = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\".toCharArray();\n\n //creates the initial, empty id string\n String id = \"\";\n\n /*Do this 20 times:\n * randomize a number from 0 to the length of the char array, characters\n * add the id string the character from the index of the randomized number*/\n for (int i = 0; i < 20; i++){\n id += characters[rnd.nextInt(characters.length)];\n }\n\n //return the 20 random chars long string\n return id;\n\n }",
"public String generate(final int count){\n return RandomStringUtils.random(count, true, true);\n }",
"private String getRandName() {\n int firstName = (int)(Math.random() * listFirstNames.length);\n String fName = listFirstNames[firstName].trim();\n int lastName = (int)(Math.random() * listLastNames.length);\n String lName = listLastNames[lastName].trim();\n return ( fName + \" \" + lName ); \n }",
"public static String getRandomString(int length) {\n\t\tString ALPHABET = \"abcdefghijklmnopqrstuvwxyz\";\n\t\tfinal SecureRandom RANDOM = new SecureRandom();\n\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0; i < length; ++i) {\n\t\t\tsb.append(ALPHABET.charAt(RANDOM.nextInt(ALPHABET.length())));\n\t\t}\n\t\treturn sb.toString();\n\t}",
"public static String getRandomString(int length) {\r\n\t\tRandom rand = new Random();\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tfor (int i = 0; i < length; i++) {\r\n\t\t\tint pos = rand.nextInt(charset.length());\r\n\t\t\tsb.append(charset.charAt(pos));\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}",
"public static String random(final int count) {\r\n\t\treturn org.apache.commons.lang3.RandomStringUtils.randomAlphanumeric(count);\r\n\t}",
"public static String rndString(int length, char min, char max) {\r\n char[] c = RBytes.rndCharArray(length, min, max);\r\n return new String(c);\r\n }",
"public static String getRandomString(int n) \r\n {\n String AlphaNumericString = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\r\n + \"0123456789\"\r\n + \"abcdefghijklmnopqrstuvxyz\"; \r\n \r\n // create StringBuffer size of AlphaNumericString \r\n StringBuilder sb = new StringBuilder(n); \r\n \r\n for (int i = 0; i < n; i++) { \r\n \r\n // generate a random number between \r\n // 0 to AlphaNumericString variable length \r\n int index \r\n = (int)(AlphaNumericString.length() \r\n * Math.random()); \r\n \r\n // add Character one by one in end of sb \r\n sb.append(AlphaNumericString \r\n .charAt(index)); \r\n } \r\n \r\n return sb.toString(); \r\n }",
"public static String randomString(int length) {\n\t\tif (length < 1) {\n\t\t\treturn null;\n\t\t}\n\t\t// Create a char buffer to put random letters and numbers in.\n\t\tchar[] randBuffer = new char[length];\n\t\tfor (int i = 0; i < randBuffer.length; i++) {\n\t\t\trandBuffer[i] = numbersAndLetters[new Random().nextInt(71)];\n\t\t}\n\t\treturn new String(randBuffer);\n\t}",
"public static String generateString(int count) {\r\n String ALPHA_NUMERIC_STRING = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\r\n StringBuilder builder = new StringBuilder();\r\n while (count-- != 0) {\r\n int character = (int) (Math.random() * ALPHA_NUMERIC_STRING.length());\r\n builder.append(ALPHA_NUMERIC_STRING.charAt(character));\r\n }\r\n return builder.toString();\r\n }",
"public static String generateRandomString(int length) {\n\t\tfinal SecureRandom secureRandom = new SecureRandom();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0; i < length; ++i) {\n\t\t\tsb.append(ALPHABET.charAt(secureRandom.nextInt(ALPHABET.length())));\n\t\t}\n\t\treturn sb.toString();\n\t}",
"public static String generateRandomNonce() {\n Random r = new Random();\n StringBuffer n = new StringBuffer();\n for (int i = 0; i < r.nextInt(8) + 2; i++) {\n n.append(r.nextInt(26) + 'a');\n }\n return n.toString();\n }",
"public static String rndString(char min, char max) {\r\n char[] c = RBytes.rndCharArray(min, max);\r\n return new String(c);\r\n\r\n }",
"public static String generateRandomString(int length) {\n String CHAR = \"ABCDEF\";\n String NUMBER = \"0123456789\";\n\n String DATA_FOR_RANDOM_STRING = CHAR + NUMBER;\n SecureRandom random = new SecureRandom();\n\n if (length < 1) throw new IllegalArgumentException();\n\n StringBuilder sb = new StringBuilder(length);\n\n for (int i = 0; i < length; i++) {\n // 0-62 (exclusive), random returns 0-61\n int rndCharAt = random.nextInt(DATA_FOR_RANDOM_STRING.length());\n char rndChar = DATA_FOR_RANDOM_STRING.charAt(rndCharAt);\n\n sb.append(rndChar);\n }\n\n return sb.toString();\n }",
"public static String randomString(int length,boolean flag) {\n\t\tString alpha=\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\r\n\t\tString num=\"0123456789\";\r\n\t\tchar[] characterSet;\r\n\t\tif(flag) // flag alpha is set both alphabets and numbers are considered.\r\n\t\tcharacterSet = (num+alpha).toCharArray();\r\n\t\telse // flag alpha is not set only numbers are considered.\r\n\t\tcharacterSet = (num).toCharArray();\r\n\t Random random = new SecureRandom();\r\n\t char[] result = new char[length];\r\n\t for (int i = 0; i < result.length; i++) {\r\n\t // picks a random index out of character set > random character\r\n\t int randomCharIndex = random.nextInt(characterSet.length);\r\n\t result[i] = characterSet[randomCharIndex]; //generates ramdomnumber\r\n\t }\r\n\t return new String(result);\r\n\t}",
"private String generateToken () {\n SecureRandom secureRandom = new SecureRandom();\n long longToken;\n String token = \"\";\n for ( int i = 0; i < 3; i++ ) {\n longToken = Math.abs( secureRandom.nextLong() );\n token = token.concat( Long.toString( longToken, 34 + i ) );//max value of radix is 36\n }\n return token;\n }",
"public static int getRandomNumberString() {\n // It will generate 6 digit random Number.\n // from 0 to 999999\n Random rnd = new Random();\n int number = rnd.nextInt(999999);\n\n // this will convert any number sequence into 6 character.\n return number;\n }",
"public void testRandomStrings() throws Exception {\n checkRandomData(random(), a, 200 * RANDOM_MULTIPLIER);\n }",
"public static String captcha(){\n\t\tString captcha=\"\";\n\t\tfor(int i=0; i<8; i+=2){\n\t\t\tcaptcha+=(char)(65+Math.random()*26)+\" \";\n\t\t\tcaptcha+=(char)(97+Math.random()*26);\n\t\t}\n\t\treturn captcha;\n\n\t}",
"private String newPassword() {\n\t\tchar[] vet = new char[10];\n\t\tfor(int i=0; i<10; i++) {\n\t\t\tvet[i] = randomChar();\n\t\t}\n\t\treturn new String(vet);\n\t}",
"public String randomString(int Length, String s) {\n\t\t\t\t\tRandom rand = new Random();\n\t\t\t\t\tStringBuilder sb = new StringBuilder(Length);\n\t\t\t\t\tfor (int i = 0; i < Length; i++) { sb.append(s.charAt(rand.nextInt(s.length()))); }\n\t\t\t\t\treturn sb.toString();\n\t\t\t\t}",
"protected static String generateSaltString() {\n Random rng = new Random();\n byte[] saltBytes = new byte[32];\n rng.nextBytes(saltBytes);\n return bytesToString(saltBytes);\n }",
"public static String randomEmail() {\n\t\tRandom randomGenerator = new Random(); \n\t\tint randomInt = randomGenerator.nextInt(10000); \n\t\treturn \"username\"+ randomInt +\"@yopmail.com\"; \n\t}",
"private String getID()\n {\n String chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()_+{}|:<>?/.,';][=-`~\";\n String id = \"\";\n int max = new Random().nextInt((16 - 12) + 1)+12;\n for(int i=0;i<16;i++)\n {\n int r = new Random().nextInt((chars.length()-1 - 0) + 1)+0;\n id+=chars.charAt(r);\n }\n return id;\n }",
"public static String getRandomName() {\n Faker faker = new Faker();\n return faker.name().fullName();\n }",
"public static String generateRandomString(int length) {\n\t\tStringBuilder builder = new StringBuilder();\n\t\twhile (length-- != 0) {\n\t\t\tint character = (int) (Math.random() * ALPHA_NUMERIC_STRING.length());\n\t\t\tbuilder.append(ALPHA_NUMERIC_STRING.charAt(character));\n\t\t}\n\t\treturn builder.toString();\n\t}",
"public static String generateCoupon() {\n \t\t// choose a Character random from this String\n\t\tString availableCharacters = \"ABCDEFGHIJKLMNPQRSTUVWXYZ\" + \"123456789\";\n\t\t// create StringBuffer \n\t\tStringBuilder sb = new StringBuilder(5);\n\t\tfor (int i = 0; i < 15; i++) {\n\t\t\t// generate a random number\n\t\t\tdouble indexDouble = availableCharacters.length() * Math.random();\n\t\t\tint index = (int)Math.round(indexDouble);\n\t\t\tif(index > 0 && index < 33) {\n\t\t\t\tsb.append(availableCharacters.charAt(index));\n\t\t\t}\n\t\t}\n\t\treturn sb.toString().substring(0,10);\t\t\n\t}"
]
| [
"0.8431612",
"0.840824",
"0.82443154",
"0.82423484",
"0.81162655",
"0.80148476",
"0.7936699",
"0.79353774",
"0.79129034",
"0.7756246",
"0.7703269",
"0.7604436",
"0.7597746",
"0.7586239",
"0.75827205",
"0.75714654",
"0.7562352",
"0.75211585",
"0.7488371",
"0.74769074",
"0.7461429",
"0.7411678",
"0.7374512",
"0.73674726",
"0.73654705",
"0.7355654",
"0.7339266",
"0.7322731",
"0.72885543",
"0.7286013",
"0.72549015",
"0.72498703",
"0.72389686",
"0.72335774",
"0.72294736",
"0.72194827",
"0.71950245",
"0.7187136",
"0.71825224",
"0.7134331",
"0.71288246",
"0.7098848",
"0.7086657",
"0.7063031",
"0.7059531",
"0.70572186",
"0.7042112",
"0.7039253",
"0.7028162",
"0.70269984",
"0.7008101",
"0.6985958",
"0.6983664",
"0.69740593",
"0.69735646",
"0.69606525",
"0.69597304",
"0.6958359",
"0.69479674",
"0.6945618",
"0.69308233",
"0.69240975",
"0.6921624",
"0.6918038",
"0.6907888",
"0.69041187",
"0.69007796",
"0.6897945",
"0.6872893",
"0.6861643",
"0.6852741",
"0.68343484",
"0.68290794",
"0.68154705",
"0.68151206",
"0.6805155",
"0.6800417",
"0.6793544",
"0.67783564",
"0.6772294",
"0.6758713",
"0.67534345",
"0.67511547",
"0.6750496",
"0.6747478",
"0.67449605",
"0.6744285",
"0.67428243",
"0.67417413",
"0.6733255",
"0.6731798",
"0.67292124",
"0.670473",
"0.6703721",
"0.67028403",
"0.66990477",
"0.6697792",
"0.6688823",
"0.66788757",
"0.66725665"
]
| 0.7893983 | 9 |
. Constructor CompositePersonne qu'inisialise | public CompositePersonne() {
this.nomGroupe = " ";
this.personnel = new ArrayList<InterfacePersonne>();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Composite() {\n\n\t}",
"public CompositeData()\r\n {\r\n }",
"private Composite() {\n }",
"@Test\r\n public void testComposite() {\r\n \r\n Leaf pers1 = new Leaf(\"Tracy\");\r\n Leaf pers2 = new Leaf(\"JR\");\r\n Leaf pers3 = new Leaf(\"Simon\");\r\n \r\n Composite comp1 = new Composite();\r\n comp1.add(pers1);\r\n comp1.add(pers2);\r\n comp1.add(pers3);\r\n \r\n //Assert.assertEquals(pers1.sayHello(), \"Tracy person says hello\");\r\n Assert.assertNotNull(comp1);\r\n \r\n \r\n }",
"public PersonaFisica() {}",
"public Persona(){\n \n }",
"public Persona(){\n \n }",
"public Persona() {\n\t}",
"public Candidatura (){\n \n }",
"public Persona() {\n\t\t// TODO Auto-generated constructor stub\n\t}",
"public Persona() {\n \t\n }",
"public Persona() {\n }",
"public Commune() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}",
"public Person(){\r\n\t\tsuper();\r\n\t}",
"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 AntComposite(Composite pComposite, AntProject pProject) {\r\n\t\tsuper(pComposite, pProject);\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 Employe () {\n this ( NOM_BIDON, null );\n }",
"public Persona(String nombre) {\n this.nombre = nombre;\n }",
"public Persona(int idPersona){\n this.idPersona = idPersona;\n }",
"public Personaje(Juego juego,Celda c) {\r\n\t\tsuper(juego,c);\r\n\t}",
"public Person1() {\n\t\tsuper();\n\t}",
"Compleja createCompleja();",
"public Competence() {\r\n\t\tsuper();\r\n\t}",
"public Composante() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\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 Person(String vorname, String nachname) {\n\n\t}",
"public CompositeEquipment(String name) {\n super(name);\n this.equipments = new ArrayList();\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 }",
"public PNJ(int identifiant, String nom, int age, int sexe, int argent, Comportement comportement,\r\n\t\t\tRepliques repliques, Joueur joueur, MaitreDuJeu maitreDuJeu) {\r\n\t\tsetIdentifiant(identifiant);\r\n\t\tsetNom(nom);\r\n\t\tsetAge(age);\r\n\t\tsetSexe(sexe);\r\n\t\tsetArgent(argent);\r\n\t\tsetComportement(comportement);\r\n\t\tsetRepliques(repliques);\r\n\t\tsetJoueur(joueur);\r\n\t\tsetMaitreDuJeu(maitreDuJeu);\r\n\t}",
"private TypicalPersons() {}",
"private TypicalPersons() {}",
"public Laboratorio() {}",
"public CarteCaisseCommunaute() {\n super();\n }",
"public Person() {\n\t\t\n\t}",
"public static Composition createComposition(Patient patient, Practitioner practitioner, String date,\n ArrayList<Immunization> ArrayListYellowFever,\n ArrayList<Immunization> ArrayListStandardVaccinations,\n ArrayList<Immunization> ArrayListOtherVaccinations,\n ArrayList<Immunization> ArrayListInfluenza,\n ArrayList<Immunization> ArrayListTuberculosis,\n ArrayList<Observation> ArrayListTuberculinTests,\n ArrayList<Observation> ArrayListAntibodyAssays,\n ArrayList<Observation> ArrayListHepatitisB,\n ArrayList<Observation> ArrayListRubella,\n ArrayList<Immunization> ArrayListPassiveImmunizations,\n ArrayList<Immunization> ArrayListSerumInjection,\n ArrayList<Condition> ArrayListCondition,\n ArrayList<Observation> ArrayListBlood){\n // Create a new Composition object\n Composition composition = new Composition();\n\n // Set Identifier of the composition object\n composition.setIdentifier(new Identifier()\n .setSystem(\"http://www.kh-uzl.de/fhir/composition\")\n .setValue(UUID.randomUUID().toString()));\n\n // Set status of composition\n composition.setStatus(Composition.CompositionStatus.FINAL);\n\n // Set kind of composition\n composition.setType(new CodeableConcept()\n .addCoding(new Coding()\n .setCode(\"11369-6\")\n .setSystem(\"http://loinc.org\")\n .setDisplay(\"History of Immunization Narrative\")));\n\n // Set reference to a patient, all the data in the composition belongs to\n composition.setSubject(new Reference()\n .setIdentifier(patient.getIdentifierFirstRep())\n .setReference(patient.fhirType() + \"/\" + patient.getId()));\n\n // Set composition editing time\n composition.setDateElement(new DateTimeType(date));\n\n // Set author of the composition\n composition.addAuthor(new Reference()\n .setIdentifier(practitioner.getIdentifierFirstRep())\n .setReference(practitioner.fhirType() + \"/\" + practitioner.getId()));\n\n // Set title of the composition\n composition.setTitle(\"Internationale Bescheinigungen über Impfungen und Impfbuch\");\n\n\n // Section for the owner of the certificate of vaccinations\n composition.addSection(new Composition.SectionComponent()\n .setTitle(\"Impfausweisinhaber\")\n .addEntry(new Reference()\n .setIdentifier(patient.getIdentifierFirstRep())\n .setReference(patient.fhirType() + \"/\" + patient.getId())));\n\n\n // Section for yellow fever\n composition.addSection(new Composition.SectionComponent()\n .setTitle(\"Gelbfieber\")\n .setText(new Narrative()\n .setStatus(Narrative.NarrativeStatus.ADDITIONAL)\n .setDiv(new XhtmlNode().setValue(\"Internationale Bescheinigung über Impfung oder Wiederimpfung gegen Gelbfieber\"))));\n\n for(int i = 0; i < ArrayListYellowFever.size(); i++){\n composition.getSection().get(1).addEntry(new Reference()\n .setIdentifier(ArrayListYellowFever.get(i).getIdentifierFirstRep())\n .setReference(ArrayListYellowFever.get(i).fhirType() + \"/\" + ArrayListYellowFever.get(i).getId()));\n }\n\n\n // Section for standard vaccinations\n composition.addSection(new Composition.SectionComponent()\n .setTitle(\"Standardimpfungen\")\n .setText(new Narrative()\n .setStatus(Narrative.NarrativeStatus.ADDITIONAL)\n .setDiv(new XhtmlNode().setValue(\"Bescheinigung über Satndardimpfungen\"))));\n\n for(int i = 0; i < ArrayListStandardVaccinations.size(); i++){\n composition.getSection().get(2).addEntry(new Reference()\n .setIdentifier(ArrayListStandardVaccinations.get(i).getIdentifierFirstRep())\n .setReference(ArrayListStandardVaccinations.get(i).fhirType() + \"/\" + ArrayListStandardVaccinations.get(i).getId()));\n }\n\n\n // Section for other vaccinations\n composition.addSection(new Composition.SectionComponent()\n .setTitle(\"Sonstige Schutzimpfungen\")\n .setText(new Narrative()\n .setStatus(Narrative.NarrativeStatus.ADDITIONAL)\n .setDiv(new XhtmlNode().setValue(\"Sonstige Schutzimpfungen, z.B. gegen Cholera, FSME, Hepatits A, Meningokokken, Pneumokokken, Typhus, Varizellen\"))));\n\n for(int i = 0; i < ArrayListOtherVaccinations.size(); i++){\n composition.getSection().get(3).addEntry(new Reference()\n .setIdentifier(ArrayListOtherVaccinations.get(i).getIdentifierFirstRep())\n .setReference(ArrayListOtherVaccinations.get(i).fhirType() + \"/\" + ArrayListOtherVaccinations.get(i).getId()));\n }\n\n\n // Section for vaccinations against influenza\n composition.addSection(new Composition.SectionComponent()\n .setTitle(\"Schutzimpfungen gegen Influenza\")\n .setText(new Narrative()\n .setStatus(Narrative.NarrativeStatus.ADDITIONAL)\n .setDiv(new XhtmlNode().setValue(\"Schutzimpfungen gegen Influenza (Virusgrippe)\"))));\n\n for(int i = 0; i < ArrayListInfluenza.size(); i++){\n composition.getSection().get(4).addEntry(new Reference()\n .setIdentifier(ArrayListInfluenza.get(i).getIdentifierFirstRep())\n .setReference(ArrayListInfluenza.get(i).fhirType() + \"/\" + ArrayListInfluenza.get(i).getId()));\n }\n\n\n // Section for vaccinations against tuberculosis\n composition.addSection(new Composition.SectionComponent()\n .setTitle(\"Bescheinigung über Tuberkulose-Schutzimpfungen (BCG)\")\n .setText(new Narrative()\n .setStatus(Narrative.NarrativeStatus.ADDITIONAL)\n .setDiv(new XhtmlNode().setValue(\"Bescheinigung über Tuberkulose-Schutzimpfungen (BCG)\"))));\n\n for(int i = 0; i < ArrayListTuberculosis.size(); i++){\n composition.getSection().get(5).addEntry(new Reference()\n .setIdentifier(ArrayListTuberculosis.get(i).getIdentifierFirstRep())\n .setReference(ArrayListTuberculosis.get(i).fhirType() + \"/\" + ArrayListTuberculosis.get(i).getId()));\n }\n\n\n // Section for Tuberculin-tests\n composition.addSection(new Composition.SectionComponent()\n .setTitle(\"Ergebnis von Tuberkulinproben\")\n .setText(new Narrative()\n .setStatus(Narrative.NarrativeStatus.ADDITIONAL)\n .setDiv(new XhtmlNode().setValue(\"Ergebnis von Tuberkulinproben\"))));\n\n for(int i = 0; i < ArrayListTuberculinTests.size(); i++){\n composition.getSection().get(6).addEntry(new Reference()\n .setIdentifier(ArrayListTuberculinTests.get(i).getIdentifierFirstRep())\n .setReference(ArrayListTuberculinTests.get(i).fhirType() + \"/\" + ArrayListTuberculinTests.get(i).getId()));\n }\n\n\n // Section for antibody assays\n composition.addSection(new Composition.SectionComponent()\n .setTitle(\"Ergebnisse von Antikörperuntersuchungen\")\n .setText(new Narrative()\n .setStatus(Narrative.NarrativeStatus.ADDITIONAL)\n .setDiv(new XhtmlNode().setValue(\"Ergebnisse von Antikörperuntersuchungen, z.B. Tatanus, Virushepatitis A u. a.\"))));\n\n for(int i = 0; i < ArrayListAntibodyAssays.size(); i++){\n composition.getSection().get(7).addEntry(new Reference()\n .setIdentifier(ArrayListAntibodyAssays.get(i).getIdentifierFirstRep())\n .setReference(ArrayListAntibodyAssays.get(i).fhirType() + \"/\" + ArrayListAntibodyAssays.get(i).getId()));\n }\n\n\n // Section for Hepatitis B\n composition.addSection(new Composition.SectionComponent()\n .setTitle(\"Virushepatitis B\")\n .setText(new Narrative()\n .setStatus(Narrative.NarrativeStatus.ADDITIONAL)\n .setDiv(new XhtmlNode().setValue(\"Virushepatitis B: Ergebnis von Antikörper-Untersuchungen (Anti-HBs)\"))));\n\n for(int i = 0; i < ArrayListHepatitisB.size(); i++){\n composition.getSection().get(8).addEntry(new Reference()\n .setIdentifier(ArrayListHepatitisB.get(i).getIdentifierFirstRep())\n .setReference(ArrayListHepatitisB.get(i).fhirType() + \"/\" + ArrayListHepatitisB.get(i).getId()));\n }\n\n\n // Section for Rubella antibody assays\n composition.addSection(new Composition.SectionComponent()\n .setTitle(\"Röteln-Antikörper-Bestimmungen\")\n .setText(new Narrative()\n .setStatus(Narrative.NarrativeStatus.ADDITIONAL)\n .setDiv(new XhtmlNode().setValue(\"Röteln-Antikörper-Bestimmungen\"))));\n\n for(int i = 0; i < ArrayListRubella.size(); i++){\n composition.getSection().get(9).addEntry(new Reference()\n .setIdentifier(ArrayListRubella.get(i).getIdentifierFirstRep())\n .setReference(ArrayListRubella.get(i).fhirType() + \"/\" + ArrayListRubella.get(i).getId()));\n }\n\n\n // Section for Passive immunizations with human immunoglobulins\n composition.addSection(new Composition.SectionComponent()\n .setTitle(\"Passive Immunisierungen mit humanen Immunoglobulinen\")\n .setText(new Narrative()\n .setStatus(Narrative.NarrativeStatus.ADDITIONAL)\n .setDiv(new XhtmlNode().setValue(\"Passive Immunisierungen mit humanen Immunoglobulinen (z.B Standard-Immunoglobulin, Tetanus- oder andere spezielle Immunoglobuline)\"))));\n\n for(int i = 0; i < ArrayListPassiveImmunizations.size(); i++){\n composition.getSection().get(10).addEntry(new Reference()\n .setIdentifier(ArrayListPassiveImmunizations.get(i).getIdentifierFirstRep())\n .setReference(ArrayListPassiveImmunizations.get(i).fhirType() + \"/\" + ArrayListPassiveImmunizations.get(i).getId()));\n }\n\n\n // Section for serum injections\n composition.addSection(new Composition.SectionComponent()\n .setTitle(\"Serum-Injektion\")\n .setText(new Narrative()\n .setStatus(Narrative.NarrativeStatus.ADDITIONAL)\n .setDiv(new XhtmlNode().setValue(\"Serum-Injektion: Heterologe Sera (z.B. vom Pferd)\"))));\n\n for(int i = 0; i < ArrayListSerumInjection.size(); i++){\n composition.getSection().get(11).addEntry(new Reference()\n .setIdentifier(ArrayListSerumInjection.get(i).getIdentifierFirstRep())\n .setReference(ArrayListSerumInjection.get(i).fhirType() + \"/\" + ArrayListSerumInjection.get(i).getId()));\n }\n\n\n // Section for medical comments on risk factors concerning vaccinations\n composition.addSection(new Composition.SectionComponent()\n .setTitle(\"Ärztliche Vermerke über medizinische Risikofaktoren bei Impfungen\")\n .setText(new Narrative()\n .setStatus(Narrative.NarrativeStatus.ADDITIONAL)\n .setDiv(new XhtmlNode().setValue(\"Ärztliche Vermerke über medizinische Risikofaktoren bei Impfungen\"))));\n\n for(int i = 0; i < ArrayListCondition.size(); i++){\n composition.getSection().get(12).addEntry(new Reference()\n .setIdentifier(ArrayListCondition.get(i).getIdentifierFirstRep())\n .setReference(ArrayListCondition.get(i).fhirType() + \"/\" + ArrayListCondition.get(i).getId()));\n }\n\n\n // Section for blood group and rhesus factor\n composition.addSection(new Composition.SectionComponent()\n .setTitle(\"Blutgruppe und Rh-Faktor\")\n .setText(new Narrative()\n .setStatus(Narrative.NarrativeStatus.ADDITIONAL)\n .setDiv(new XhtmlNode().setValue(\"Blutgruppe und Rh-Faktor\"))));\n\n for(int i = 0; i < ArrayListBlood.size(); i++){\n composition.getSection().get(13).addEntry(new Reference()\n .setIdentifier(ArrayListBlood.get(i).getIdentifierFirstRep())\n .setReference(ArrayListBlood.get(i).fhirType() + \"/\" + ArrayListBlood.get(i).getId()));\n }\n\n\n return composition;\n }",
"protected Persona (String nombre,String apellido, String fechaNac){\r\n this.nombre = nombre;\r\n this.apellido = apellido;\r\n this.fechaNac = fechaNac;\r\n }",
"public Person(String first, String last) {\n\t\tthis(first, last, -1);\n\t}",
"public Competition(Integer CompetitionID, String Name, String StartDate, String FinishDate, Integer Level, String Supervision, String Address)\n {\n this.CompetitionID = new SimpleIntegerProperty(CompetitionID);\n this.Name = new SimpleStringProperty(Name);\n this.StartDate = new SimpleStringProperty(StartDate);\n this.FinishDate = new SimpleStringProperty(FinishDate);\n this.Level = new SimpleIntegerProperty(Level);\n this.Supervision = new SimpleStringProperty(Supervision);\n this.Address = new SimpleStringProperty(Address);\n\n }",
"public Partage() {\n }",
"public Person(Name name, Phone phone, Email email, Address address, Salary salary, Username username,\n Password password, Set<Project> projects) {\n this(name, phone, email, address, salary, username, password, projects, new PermissionSet());\n }",
"public Counselor(String first, String last, String password, String p1, String p2, String p3, String p4, \n String p5, String p6, String p7, String p8)\n {\n super(first, last, password, p1, p2, p3, p4, p5, p6, p7, p8);\n students = new ArrayList<Student>();\n }",
"public Participante(String nombreCompleto, String dni, String telefono, Date fechaDeNacimiento, String direccion,\n\t\t\tString codigoPostal, String municipio, String provincia, boolean erte, String situacionLaboral,\n\t\t\tString situacionAdministrativa, String titulacion) {\n\t\tthis();\n\t\tthis.nombreCompleto = nombreCompleto;\n\t\tthis.dni = dni;\n\t\tthis.telefono = telefono;\n\t\tthis.fechaDeNacimiento = fechaDeNacimiento;\n\t\tthis.direccion = direccion;\n\t\tthis.codigoPostal = codigoPostal;\n\t\tthis.municipio = municipio;\n\t\tthis.provincia = provincia;\n\t\tthis.erte = erte;\n\t\tthis.situacionLaboral = situacionLaboral;\n\t\tthis.situacionAdministrativa = situacionAdministrativa;\n\t\tthis.titulacion = titulacion;\n\t}",
"public Resume(Person p){\n this.p = p;\n ed = new ArrayList<>();\n ex = new ArrayList<>();}",
"public PersonSummary() {}",
"public Person(String name, ArrayList<String> pnArray) {\n\n\t}",
"public Personnage(String nom, Equipe e, int x, int y) {\r\n\t\tthis();\r\n\t\tthis.nom = nom;\r\n\r\n\t\tif (e.getID() == 1 || e.getID() == 2) {\r\n\t\t\tthis.equipe = e;\r\n\t\t}\r\n\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t}",
"@Override\n\tpublic void createConseille(Conseille c) {\n\t\t\n\t}",
"protected CompositeTypeImpl getRecursivePersonComposite(boolean isCollection) {\n CompositeTypeImpl toReturn = new CompositeTypeImpl(null, \"tPerson\", null, isCollection);\n CompositeTypeImpl tPersonList = new CompositeTypeImpl(null, \"tPersonList\", null, true, new HashMap<>(), toReturn, null);\n\n toReturn.addField(\"name\", new SimpleTypeImpl(null, SIMPLE_TYPE_NAME, null));\n toReturn.addField(\"parent\", toReturn);\n toReturn.addField(\"ancestors\", tPersonList);\n\n tPersonList.addField(\"name\", new SimpleTypeImpl(null, SIMPLE_TYPE_NAME, null));\n tPersonList.addField(\"parent\", toReturn);\n tPersonList.addField(\"ancestors\", tPersonList);\n\n return toReturn;\n }",
"private TIPO_REPORTE(String nombre)\r\n/* 55: */ {\r\n/* 56: 58 */ this.nombre = nombre;\r\n/* 57: */ }",
"public Individual()\r\n\t{\r\n\t}",
"Compuesta createCompuesta();",
"public Comprador() {\n // initialise instance variables\n super(1,\"\",\"\",\"\",\"\",\"\"); //super(email, nome, password, dataNascimento, morada)\n favoritos = new ArrayList<String>();\n }",
"public Student(Person person) {\r\n\t\tsuper(person);\r\n\t}",
"public TdRuspHijo( TdRuspHijoPK idComposite, java.util.Date fecModifico, java.lang.String trhRfcUnico, java.lang.String usuario, java.lang.String trhNombre, java.lang.String trhPrimer, java.lang.String trhSegundo) {\n this.idComposite = idComposite;\n this.fecModifico = fecModifico;\n this.trhRfcUnico = trhRfcUnico;\n this.usuario = usuario;\n this.trhNombre = trhNombre;\n this.trhPrimer = trhPrimer;\n this.trhSegundo = trhSegundo;\n }",
"public Community()\r\n {\r\n //\r\n }",
"public Perro() {\n// super(\"No define\", \"NN\", 0); en caso el constructor de animal tenga parametros\n this.pelaje = \"corto\";\n }",
"public Persona( \n\t\t\t@JsonProperty(value=\"id\")Long id, \n\t\t\t@JsonProperty(value=\"nombre\")String nombre , \n\t\t\t@JsonProperty( value=\"apellido\")String apellido , \n\t\t\t@JsonProperty(value=\"tipo\")String tipo,\n\t\t\t@JsonProperty(value=\"papel\") String papel,\n\t\t\t@JsonProperty(value=\"multa\") Integer multa ) { \n\t\t\n\t\t\n\t\tthis.id = id;\n\t\tthis.nombre = nombre;\n\t\tthis.apellido = apellido;\n\t\tthis.tipo = tipo;\n\t\tthis.papel = papel;\n\t\tthis.multa = multa;\n\t\t\n\t}",
"public TCubico(){}",
"@SuppressWarnings(\"static-access\")\n\tpersonaje(int vida, int ataque, int personajes_creados)\n\t{\n\t\t// estableciendo parametros iguales a las variables\n\t\tthis.vida = vida;\n\t\tthis.ataque = ataque;\n\t\tthis.personajes_creados = personajes_creados;\n\t\t\n\t}",
"StudenteImpl(String nome, String cognome, Cdl corso, int annoCorso, String matricola) {\n super(nome, cognome);\n initialize(corso, annoCorso, matricola);\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 Employe() {\r\n this(NOM_BIDON, null);\r\n }",
"public LUISCompositeEntity(JSONObject JSONcompositeEntity) {\n parentType = JSONcompositeEntity.optString(\"parentType\");\n value = JSONcompositeEntity.optString(\"value\");\n children = new ArrayList<>();\n\n JSONArray JSONcompositeEntityChildren = JSONcompositeEntity.optJSONArray(\"children\");\n for (int i = 0; JSONcompositeEntityChildren != null\n && i < JSONcompositeEntityChildren.length(); i++) {\n JSONObject JSONcompositeEntityChild = JSONcompositeEntityChildren.optJSONObject(i);\n if (JSONcompositeEntityChild != null) {\n LUISCompositeEntityChild compositeEntityChild =\n new LUISCompositeEntityChild(JSONcompositeEntityChild);\n children.add(compositeEntityChild);\n }\n }\n }",
"public Cohete() {\n\n\t}",
"void crearNuevaPersona(Persona persona);",
"public PersonaVO() {\n }",
"public Clase04(Clase04 o){\r\n numPersonas++;\r\n numero= o.numero;\r\n nombre= o.nombre;\r\n }",
"public SalesPerson(String firstName, String lastName, String ppsNumber){\r\n //pulls the constructor with parameters from the superclass SalesEmployee\r\n super(firstName, lastName, ppsNumber);\r\n }",
"public CartaPersonaggi(int money,String nome,String effettoImmed,String effettoPerman,int period,int costo){\n super(period,costo);\n costoMonete = money;\n this.nome = nome;\n effettoImm = effettoImmed;\n effettoPer = effettoPerman;\n }",
"public Comprador(String e, String n, String p, String d, String m) {\n // initialise instance variables\n super(1,e,n,p,d,m);\n favoritos = new ArrayList<String>();\n }",
"public Laboratorio(String nombre) {\r\n\t\tsuper();\r\n\t\tthis.nombre = nombre;\r\n\t}",
"public Person() {}",
"public Person(String first, String middle, String last) {\n this.firstNames = first+ \" \" +middle;\n this.lastName = last;\n }",
"public Persona(String n,String a, byte e,String d){\n this.nombre=n;\n this.apellido=a;\n this.edad=e;\n this.dni=d;\n }",
"public Candidato(String nome, List<String> skills) {\n\t\tsuper(nome);\n\t\tthis.skills = skills;\n\t}",
"public Persona(String nombre) {\n\t\tthis.nombre = nombre;\n\t}",
"public Comprador(Integer sysPK, String nombre, String correo, String telefono, String telefonoAuxiliar, String areaDepartamento, Integer clienteFK) {\n\t\tthis.sysPK = new SimpleObjectProperty<Integer>(sysPK);\n\t\tthis.nombre = new SimpleStringProperty(nombre);\n\t\tthis.correo = new SimpleStringProperty(correo);\n\t\tthis.telefono = new SimpleStringProperty(telefono);\n\t\tthis.telefonoAuxiliar = new SimpleStringProperty(telefonoAuxiliar);\n\t\tthis.areaDepartamento = new SimpleStringProperty(areaDepartamento);\n\t\tthis.clienteFK = new SimpleObjectProperty<Integer>(clienteFK);\n\t}",
"public MCAMultiport(final CompositeEntity container, final String name) throws NameDuplicationException,\r\n IllegalActionException {\r\n super(container, name);\r\n\r\n // output = PortFactory.getInstance().createOutputPort(this,\"output\");\r\n\r\n nbChannelsParam = new StringParameter(this, \"Nb Channels\");\r\n nbChannelsParam.setExpression(\"0\");\r\n\r\n integrationTimeParam = new StringParameter(this, \"Integration Time\");\r\n integrationTimeParam.setExpression(\"0.0\");\r\n\r\n roi = new Object[40];\r\n\r\n roi1Param = new StringParameter(this, \"Roi1 start,end (sep by commas)\");\r\n roi1Param.setExpression(\"0,0\");\r\n\r\n roi2Param = new StringParameter(this, \"Roi2 start,end (sep by commas)\");\r\n roi2Param.setExpression(\"0,0\");\r\n\r\n roi3Param = new StringParameter(this, \"Roi3 start,end (sep by commas)\");\r\n roi3Param.setExpression(\"0,0\");\r\n\r\n roi4Param = new StringParameter(this, \"Roi4 start,end (sep by commas)\");\r\n roi4Param.setExpression(\"0,0\");\r\n\r\n roi5Param = new StringParameter(this, \"Roi5 start,end (sep by commas)\");\r\n roi5Param.setExpression(\"0,0\");\r\n\r\n roi6Param = new StringParameter(this, \"Roi6 start,end (sep by commas)\");\r\n roi6Param.setExpression(\"0,0\");\r\n\r\n roi7Param = new StringParameter(this, \"Roi7 start,end (sep by commas)\");\r\n roi7Param.setExpression(\"0,0\");\r\n\r\n roi8Param = new StringParameter(this, \"Roi8 start,end (sep by commas)\");\r\n roi8Param.setExpression(\"0,0\");\r\n\r\n roi9Param = new StringParameter(this, \"Roi9 start,end (sep by commas)\");\r\n roi9Param.setExpression(\"0,0\");\r\n\r\n roi10Param = new StringParameter(this, \"Roi10 start,end (sep by commas)\");\r\n roi10Param.setExpression(\"0,0\");\r\n\r\n roi11Param = new StringParameter(this, \"Roi11 start,end (sep by commas)\");\r\n roi11Param.setExpression(\"0,0\");\r\n\r\n roi12Param = new StringParameter(this, \"Roi12 start,end (sep by commas)\");\r\n roi12Param.setExpression(\"0,0\");\r\n\r\n roi13Param = new StringParameter(this, \"Roi13 start,end (sep by commas)\");\r\n roi13Param.setExpression(\"0,0\");\r\n\r\n roi14Param = new StringParameter(this, \"Roi14 start,end (sep by commas)\");\r\n roi14Param.setExpression(\"0,0\");\r\n\r\n roi15Param = new StringParameter(this, \"Roi15 start,end (sep by commas)\");\r\n roi15Param.setExpression(\"0,0\");\r\n\r\n roi16Param = new StringParameter(this, \"Roi16 start,end (sep by commas)\");\r\n roi16Param.setExpression(\"0,0\");\r\n\r\n roi17Param = new StringParameter(this, \"Roi17 start,end (sep by commas)\");\r\n roi17Param.setExpression(\"0,0\");\r\n\r\n roi18Param = new StringParameter(this, \"Roi18 start,end (sep by commas)\");\r\n roi18Param.setExpression(\"0,0\");\r\n\r\n roi19Param = new StringParameter(this, \"Roi19 start,end (sep by commas)\");\r\n roi19Param.setExpression(\"0,0\");\r\n\r\n roi20Param = new StringParameter(this, \"Roi20 start,end (sep by commas)\");\r\n roi20Param.setExpression(\"0,0\");\r\n }",
"public AntrianPasien() {\r\n\r\n }",
"public Cgg_jur_anticipo(){}",
"public Chauffeur() {\r\n\t}",
"public Comida(String nombre){\n super(nombre);\n this.calorias = 10;\n }",
"private PrivatePerson(String name, int age) {\n super(name, age);\n }",
"public ChoixEntreprise() {\n\n }",
"public Persona(String dni, String nombre, String apellido1) {\n\t\tthis.dni = dni;\n\t\tthis.nombre = nombre;\n\t\tthis.apellido1 = apellido1;\n\t}",
"public Person2(String fname, String lname) {\n this.fname = fname;\n this.lname = lname;\n }",
"public abstract Anuncio creaAnuncioIndividualizado();",
"public PersonaBean() {\n domicilio = new Domicilio();\n telefono = new Telefono();\n correoElectronico = new CorreoElectronico();\n persona = new Persona();\n this.tipoOperacion = \"Alta\";\n\n }",
"Community() {}",
"public Person() {\n }",
"public Person() {\n }",
"public Person() {\n }",
"public Person() {\n }",
"public CadastroComplemento() {\n initComponents();\n \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 CambioComplementariosDTO() { }",
"public Pasien() {\r\n }",
"public UserImplPart1(int studentId, String yourName, int yourAge,int yourSchoolYear, String yourNationality){\n this.studentId = studentId;\n this.name= yourName;\n this.age = yourAge; \n this.schoolYear= yourSchoolYear;\n this.nationality= yourNationality;\n}"
]
| [
"0.6692495",
"0.6684572",
"0.6360449",
"0.6305765",
"0.61825323",
"0.61706245",
"0.61706245",
"0.6074302",
"0.60505486",
"0.60414183",
"0.5999988",
"0.5977437",
"0.59508",
"0.5942393",
"0.5911422",
"0.59063864",
"0.5889531",
"0.5883638",
"0.5827642",
"0.5820994",
"0.5813224",
"0.5785312",
"0.57803154",
"0.5752833",
"0.5721712",
"0.571082",
"0.5708659",
"0.5705449",
"0.56891406",
"0.5684554",
"0.5673251",
"0.56709087",
"0.56709087",
"0.56674176",
"0.56635505",
"0.565696",
"0.5650435",
"0.56455255",
"0.56206644",
"0.5614127",
"0.5597428",
"0.5594502",
"0.5586369",
"0.55584425",
"0.5552784",
"0.5552219",
"0.5543686",
"0.5528947",
"0.552784",
"0.5521319",
"0.5509161",
"0.55047816",
"0.5500683",
"0.5489561",
"0.54720235",
"0.5467648",
"0.5463942",
"0.5463813",
"0.5460879",
"0.54585385",
"0.54537445",
"0.54485095",
"0.544608",
"0.544578",
"0.5438213",
"0.54361707",
"0.54309905",
"0.5410868",
"0.5408304",
"0.5403329",
"0.5403157",
"0.5387961",
"0.53799725",
"0.5377466",
"0.5376274",
"0.5364108",
"0.53616816",
"0.5360375",
"0.5359872",
"0.5356881",
"0.53518504",
"0.5351169",
"0.5350942",
"0.53484005",
"0.53410786",
"0.53401357",
"0.5337797",
"0.53373134",
"0.5336717",
"0.5334776",
"0.5334674",
"0.5330593",
"0.5330593",
"0.5330593",
"0.5330593",
"0.5320912",
"0.53178453",
"0.53166705",
"0.5307502",
"0.5304454"
]
| 0.83206946 | 0 |
Permet d'affiche le nom de groupe , ainsi que la liste des personnels. | public final void print() {
System.out.println("Le nom du groupe est : " + this.nomGroupe);
for (InterfacePersonne per : personnel) {
per.print(); // Delegation
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getListaGrupos () {\n String nomesGruposList = \"\";\n if(this.conversas != null && this.conversas.size() > 0){\n for(int i = 0; i < this.conversas.size(); i++){\n //nomesGruposList += conversas.get(i).nomeGrupo + \" \";\n }\n }\n return nomesGruposList;\n }",
"public String getPantallasToString(){\n\t\tif(null == grupos){\n\t\t\treturn \"\";\n\t\t}else{\n\t\t\tStringBuilder grupos = new StringBuilder();\n\t\t\tfor (int i = 0; i < this.grupos.size(); i++) {\n\t\t\t\tif(i == (this.grupos.size()-1)){\n\t\t\t\t\tgrupos.append(this.grupos.get(i).pantallasToString());\n\t\t\t\t}else{\n\t\t\t\t\tgrupos.append(this.grupos.get(i).pantallasToString()).append(\", \");\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn grupos.toString();\n\t\t}\n\t}",
"public final String getNomGroupe() {\n\t\treturn this.nomGroupe;\n\t}",
"public String getGroupe() {\r\n return groupe;\r\n }",
"public String getGruposToString(){\n\t\tif(null == grupos){\n\t\t\treturn \"\";\n\t\t}else{\n\t\t\tStringBuilder grupos = new StringBuilder();\n\t\t\tfor (int i = 0; i < this.grupos.size(); i++) {\n\t\t\t\tif(i == (this.grupos.size()-1)){\n\t\t\t\t\tgrupos.append(this.grupos.get(i).getNombreGrupo());\n\t\t\t\t}else{\n\t\t\t\t\tgrupos.append(this.grupos.get(i).getNombreGrupo()).append(\", \");\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn grupos.toString();\n\t\t}\n\t}",
"@Override\n\tpublic List<ContactGroup> listGroupe() {\n\t\ttry {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"************************* je suis dans Liste des groupes *********************************\");\n\n\t\t\tsession = HibernateUtil.getSessionFactory().openSession();\n\t\t\ttx = session.beginTransaction();\n\n\t\t\tQuery query = session.createQuery(\"from ContactGroup\");\n\n\t\t\tSystem.out.println(\"\\n\");\n\t\t\tSystem.out.println(\"******************list de groupes:\" + String.valueOf(query.list()));\n\n\t\t\tList<ContactGroup> lg = (List<ContactGroup>) query.list();\n\t\t\ttx.commit();\n\t\t\tsession.close();\n\n\t\t\treturn lg;\n\n\t\t} catch (HibernateException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}",
"public String getGroupName();",
"public String pantallasToString(){\n\t\tif(null == this.pantallas){\n\t\t\treturn \"\";\n\t\t}else{\n\t\t\tfinal StringBuilder grupos = new StringBuilder();\n\t\t\tfor (int i = 0; i < this.pantallas.size(); i++) {\n\t\t\t\tif(i == (this.pantallas.size()-1)){\n\t\t\t\t\tgrupos.append(this.pantallas.get(i).getNombrePantalla());\n\t\t\t\t}else{\n\t\t\t\t\tgrupos.append(this.pantallas.get(i).getNombrePantalla()).append(\", \");\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn grupos.toString();\n\t\t}\n\t}",
"public String getNombreGrupo() {\n\t\treturn nombreGrupo;\n\t}",
"public String getGroupNamesAsString() {\n return String.format(\"%s\", StringUtils.join(getGroupNames(), \", \"));\n }",
"public ArrayList<String> getGroupNames() {\n ArrayList<String> temp = new ArrayList<String>();\n\n for (Map.Entry<String, Integer[]> entry : tutLabGroups.entrySet()) {\n if (entry.getKey().equals(\"_LEC\")) {\n continue;\n }\n\n temp.add(entry.getKey());\n }\n\n return temp;\n }",
"java.lang.String getGroup();",
"public String getGroup();",
"@Override\r\n\tpublic List<Groupe> getGroupes() {\n\t\treturn dao.getGroupes();\r\n\t}",
"public void setGroupe(String groupe) {\r\n this.groupe = groupe;\r\n }",
"public List<String> getGroupNamesList() {\n q = em.createQuery(\"SELECT g.groupName FROM Groups g\");\n setGroupNamesList(q.getResultList());\n return groupNamesList;\n }",
"public String getGroupname()\n {\n return group2d;\n }",
"public ArrayList <String>GroupePers(Personne p1) throws SQLException{\n\t\t\tArrayList <String> groupe = new ArrayList<String>();\n\t\t\tString req =\"Select NomGroupe from Groupe where NomComptePers= ?\";\n\t\t\tPreparedStatement ps=DBConfig.getInstance().getConn().prepareStatement(req);\n\t\t\tps.setString(1,p1.getNomComptePers());\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\t\n\t\t\t\tgroupe.add(rs.getString(1));\n\t\t\t}\n\t\t\treturn groupe;\n\t\t\t\n\t\t}",
"public String getGroupName(){\r\n return Validator.unescapeJava(this.groupName);\r\n }",
"public NavigableSet<Groupe> getGroupes();",
"private JPanel getPAbmGrupos() {\r\n if (pAbmGrupos == null) {\r\n lInfo = new JLabel();\r\n lInfo.setBounds(new Rectangle(0, 240, 370, 30));\r\n lInfo.setHorizontalAlignment(SwingConstants.CENTER);\r\n lInfo.setHorizontalTextPosition(SwingConstants.CENTER);\r\n \r\n lInfo.setText(\"\");\r\n lId = new JLabel();\r\n lId.setBounds(new Rectangle(10, 20, 90, 20));\r\n lId.setText(\"Id Grupo\");\r\n lNombre = new JLabel();\r\n lNombre.setBounds(new Rectangle(10, 45, 90, 20));\r\n lNombre.setText(\"Nombre\");\r\n pAbmGrupos = new JPanel();\r\n pAbmGrupos.setLayout(null);\r\n pAbmGrupos.add(lNombre);\r\n pAbmGrupos.add(getTNombre());\r\n pAbmGrupos.add(getBGuardar());\r\n pAbmGrupos.add(getBCancelar());\r\n pAbmGrupos.add(getBEliminar());\r\n pAbmGrupos.add(getPGrupos());\r\n pAbmGrupos.add(getTBuscar());\r\n pAbmGrupos.add(getBBuscar());\r\n pAbmGrupos.add(getBNuevo(), null);\r\n pAbmGrupos.add(lId, null);\r\n pAbmGrupos.add(getTId(), null);\r\n pAbmGrupos.add(lInfo, null);\r\n \r\n }\r\n return pAbmGrupos;\r\n }",
"@Override\n\tpublic String getGroup() {\n\t\treturn \"Group_\"+SliceName(stdClass);\n\t}",
"public NavigableSet<Groupe> getGroupes(Utilisateur utilisateur);",
"@Override\n public String getGroupName(int group) {\n assert 0 <= group && group < groupNames.length;\n \n return groupNames[group];\n }",
"private String agrupar(Grupo grupo) throws CeldaEnemigaException, NoTransitablebleException, FueraDeMapaException {\n grupo.setTipo(Juego.TGRUPO);\n for (Personaje p : this.getPersonajes()) {\n grupo.anhadirPersonaje(p);\n p.setGrupo(grupo);\n }\n // Una vez añadidos, restauro la lista de personajes de la celda y añado el grupo\n this.restartPersonajes();\n this.anhadePersonaje(grupo);\n this.setTipo();\n\n String s = \"Se ha creado el \" + grupo.getNombre() + \" de la civilización \" + Juego.getCivilizacionActiva() + \"\\n\" + grupo;\n return s;\n }",
"public static ArrayList<String> getReglesNoms() throws IOException{\n return ctrl_Persistencia.llistaFitxers(\"@../../Dades\",\"regles\");\n }",
"private String getGroupDisplayName() {\n Logger.d(TAG, \"getGroupDisplayName() entry\");\n if (null != mChatMap) {\n Object obj = mChatMap.get(ChatListFragment.NUMBER);\n Logger.d(TAG, \"getGroupDisplayName() the obj is \" + obj);\n if (obj instanceof List) {\n List<String> numbers = (List<String>) obj;\n String displayName = ChatFragment\n .getParticipantsName(numbers.toArray(new String[1]));\n Logger.d(TAG, \"getGroupDisplayName() the display name is \"\n + displayName);\n return displayName;\n } else {\n Logger.e(TAG, \"getGroupDisplayName() obj is not a List\");\n return null;\n }\n } else {\n Logger.e(TAG, \"getGroupDisplayName() mChatMap is null\");\n return null;\n }\n }",
"Groepen maakGroepsindeling(Groepen aanwezigheidsGroepen);",
"public String getGroupName() {\n return groupName;\n }",
"public String getGroupName() {\n return this.GroupName;\n }",
"public void buscarGrado() {\n \tGrado grado = new Grado();\n \tgrado.setDescripcionSeccion(\"Primaria\");\n \tgrado.setNumGrado(4);\n \tgrado.setDescripcionUltimoGrado(\"NO\");\n \tString respuesta = negocio.buscarGrado(\"\", grado);\n \tSystem.out.println(respuesta);\n }",
"public Grupo getnomGrupo(String nomGrupo) {\n\t\tList<Grupo> grupos = gRepository.getNomGrupo(nomGrupo);\n\n\t\tGrupo grupo = new Grupo();\n\t\tgrupo = null;\n\n\t\tfor (Grupo grupo1 : grupos) {\n\n\t\t\tif (grupos.size() == 1) {\n\n\t\t\t\tgrupo = grupo1;\n\t\t\t}\n\n\t\t}\n\n\t\treturn grupo;\n\t}",
"public String getGroupName()\n {\n return groupName;\n }",
"private static String extractGroupName(FloodyGroup floodyGroup) {\n return isBlank(floodyGroup.name())\n ? (\"FloodyGroup-\"\n +\n // append random long number to ensure unique group name\n new Random().nextLong())\n : floodyGroup.name();\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"Group \" + groupName + \" (\" + shapes.size() + \") \";\n\t}",
"@Override\r\n\tpublic synchronized String toString(){\r\n\r\n\t\tString result = String.valueOf(numberOfSplittedGroups);\r\n\r\n\t\tif(!hierarchy.isEmpty()){\r\n\t\t\tresult = result + Constants.A3_SEPARATOR + hierarchy.get(0);\r\n\t\t\tfor(int i = 1; i < hierarchy.size(); i ++){\r\n\t\t\t\tresult = result + Constants.A3_SEPARATOR + hierarchy.get(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public NavigableSet<Utilisateur> getUtilisateurs(Groupe groupe);",
"public String getGroupName() {\r\n return groupName;\r\n }",
"private void setUpGroupBy(){\n\t\tEPPropiedad pro = new EPPropiedad();\n\t\tpro.setNombre(\"a1.p2\");\n\t\tpro.setPseudonombre(\"\");\n\t\texpresionesGroupBy.add(pro);\n\t\tpro = new EPPropiedad();\n\t\tpro.setNombre(\"a1.p3\");\n\t\tpro.setPseudonombre(\"\");\n\t\texpresionesGroupBy.add(pro);\n\t}",
"public String getGroupName() {\n return groupName;\n }",
"public String agrupar() throws ParametroIncorrectoException, NoAgrupableException, CeldaEnemigaException, NoTransitablebleException, FueraDeMapaException {\n if(this.getEdificio() != null){\n throw new NoAgrupableException(\"Dentro de un edificio no se puede agrupar\");\n }\n if (this.getPersonajes().size() <= 1) {\n throw new NoAgrupableException(\"No hay personajes suficientes para agrupar\");\n }\n // Crea e inicializa el grupo\n Grupo grupo = new Grupo();\n grupo.inicializaNombre(Juego.getCivilizacionActiva());\n Juego.getCivilizacionActiva().anhadeGrupo(grupo);\n return agrupar(grupo);\n }",
"public List<Grupo> obtenerTodosLosGrupos() {\n return this.grupoFacade.findAll();\n }",
"Gruppo getGruppo();",
"public java.lang.String getGroupname() {\n\treturn groupname;\n}",
"Relations getGroupOfRelations();",
"public String getGroupName() {\n return groupName;\n }",
"public String getGroupName() {\n return groupName;\n }",
"@Nullable\n // Safe as we want to provide all getters being public for POJOs\n @SuppressWarnings({\"unused\", \"WeakerAccess\"})\n public final String getGroupName() {\n return groupName;\n }",
"private static String formatGroup(GroupCard gc) {\n\t\tString res = \"\";\n\n\t\tGroupHeadGuest ghg = gc.getCapoGruppo();\n\t\tres += GroupHeadGuest.CODICE;\n\t\tres += DateUtils.format(gc.getDate());\n\t\tres += String.format(\"%02d\", gc.getPermanenza());\n\t\tres += padRight(ghg.getSurname().trim().toUpperCase(),50);\n\t\tres += padRight(ghg.getName().trim().toUpperCase(),30);\n\t\tres += ghg.getSex().equals(\"M\") ? 1 : 2;\n\t\tres += DateUtils.format(ghg.getBirthDate());\n\n\t\t//Setting luogo et other balles is a bit more 'na rottura\n\t\tres += formatPlaceOfBirth(ghg.getPlaceOfBirth());\n\n\t\tPlace cita = ghg.getCittadinanza(); //banana, box\n\t\tres += cita.getId();\n\n\t\tres += ghg.getDocumento().getDocType().getCode();\n\t\tres += padRight(ghg.getDocumento().getCodice(),20);\n\t\tres += ghg.getDocumento().getLuogoRilascio().getId();\n\t\t//Assert.assertEquals(168,res.length()); //if string lenght is 168 we are ok\n\t\tres += \"\\r\\n\";\n\n\t\tfor (GroupMemberGuest gmg : gc.getAltri()){\n\t\t\tres += formatGroupMember(gmg, gc.getDate(), gc.getPermanenza());\n\t\t\t//res += \"\\r\\n\";\n\t\t}\n\t\treturn res;\n\t}",
"public void afficher() {\n\t\tfor(int i=0;i<this.taille;i++) {\n\t\t\tfor (int j=0;j<this.taille;j++) {\n\t\t\t\tSystem.out.print(grille.get(i).get(j).getTypeOccupation()+\"\");\n\t\t\t}\n\t\t\tSystem.out.println(\" \");\n\t\t}\n\t}",
"public String getGroupName(String beID) throws AuditTrailTrackingException\n {\n return GroupMappingHelper.getInstance().getGroupMapping(beID, getDAO());\n }",
"public Collection<String> getGroupNames() {\n getGroupCache();\n if (groupNames == null) return null;\n return new ArrayList<String>(groupNames);\n }",
"public String defineNameGroups(int[] idGroups) {\n int counter = 0;\n String result = \"\";\n for (Group group : listGroups) {\n for (int id : idGroups) {\n if (id == group.getId()) {\n result += counter + \") \" + group.getName() + \"\\n\";\n counter++;\n }\n }\n }\n return result;\n }",
"public String getName()\n {\n return groupService.getName(this);\n }",
"@Override\n\tpublic List<Grupo> obtenerGrupos() {\n\t\tSystem.out.println(\"Grupo Service\");\n\t\ttry {\n\t\t\t \n\t\t\t\tList<Grupo> tmp=this.grupoDao.obtenerGrupos();\n\t\t\t\tSystem.out.println(\"Lista de Grupos\"+tmp.size());\n\t\t\t\t\treturn tmp;\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"public abstract String getDefaultGroup();",
"public CompositePersonne() {\n\t\tthis.nomGroupe = \" \";\n\t\tthis.personnel = new ArrayList<InterfacePersonne>();\n\n\t}",
"public ArrayList<Casella> getGrup()\n\t{\n\t\treturn grup;\n\t}",
"public String getIdGrupo() {\n\t\treturn idGrupo;\n\t}",
"public String nombreHabitacionMasPopular(){\n return this.habitacionPopular;\n }",
"protected String getGroupNameLabel(){\n\t\treturn Messages.common_measure;\n\t}",
"@Override\n\tpublic List<Group> getByName() throws ServiceException {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getTreeDisplayName() {\n\t\treturn getFirstName()+\" \"+getLastName();\n\t}",
"public String getGroup ()\n {\n return group;\n }",
"public String getGroup ()\n {\n return group;\n }",
"public abstract Collection getGroups();",
"public List<BeanGrupo> getGrupos() {\n\t\treturn grupos;\n\t}",
"public List<Etudiant> getEtudiantParGroupe(String gr) {\n\t\treturn null;\n\t}",
"public String getNomeGiocatore(int i) {\n return null;\r\n }",
"public String obtenerGrupo(String id) {\n\n\t\tif (id != null && \"\".compareTo(id) != 0) {\n\t\t\ttry {\n\t\t\t\tthis.dto = this.bean.obtenerUserGroups(id);\n\t\t\t} catch (Exception e) {\n\t\t\t\tthis.log.error(\"Error al bean.obtenerPersonas(\" + this.dto.getId() + \"):\" + e);\n\t\t\t\te.printStackTrace();\n\t\t\t\tString msg = TablaValores.getValor(TABLA_PARAMETROS, \"msgCrearEditar\", \"nokObtener\");\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, msg, e.getMessage()));\n\t\t\t}\n\t\t}\n\t\treturn \"actualiza\";\n\t}",
"public String getPrintableFormat() {\n String output = new String(\"Articoli del gruppo \" + groupName + \":\\n\");\n for (int i = 0; i < list.size(); i++) {\n Article article = list.get(i);\n output += String.format(\"%2d %s\\n\",i,article.getPrintableFormat());\n }\n return output;\n }",
"List<Group> getGroups();",
"java.lang.String getGroupId();",
"java.lang.String getGroupId();",
"public void afficherListeNoms(){\r\n\t\tfor (String nom: noms){\r\n\t\t\tSystem.out.println(nom);\r\n\t\t}\r\n\t}",
"public static String listFather() {\n\t\tString s = \"\";\n\t\tString i1 = \" \";\n\t\tfor (Entry<String, TreeMap<String, Set<String>>> en:getFatherMap().entrySet()) {\n\t\t\ts = s + en.getKey() + \":\\n\";\n\t\t\tTreeMap<String, Set<String>> fathers = en.getValue();\n\t\t\tfor (Entry<String, Set<String>> father:fathers.entrySet()) {\n\t\t\t\ts = s + i1 + father.getKey() + \" ( \";\n\t\t\t\tfor (String root:father.getValue()) {\n\t\t\t\t\ts = s + root + \" \";\n\t\t\t\t}\n\t\t\t\ts = s + \")\\n\";\n\t\t\t}\n\t\t}\n\t\treturn s;\n\t}",
"@Override\n\tpublic String toString()\n\t{\n\t\treturn belong+\"-\"+name;\n\t}",
"public java.lang.String getGroupName() {\n return groupName;\n }",
"default String getGroup() {\n return null;\n }",
"private String formulerMonNom() {\n\t return \"Je m'appelle \" + this.nom; // appel de la propriété nom\n\t }",
"public String getGroupInput() {\r\n String result = null;\r\n boolean creation = this.getGroupController().getIsCreation();\r\n\r\n if (creation) {\r\n result = \"creation\";\r\n } else {\r\n // else we are in modification\r\n result = \"modification\";\r\n }\r\n\r\n return result;\r\n }",
"public List <String> getGroups ()\n {\n return groups;\n }",
"private static String formatGroupMember(GroupMemberGuest gmg, Date arrivo, int permanenza) {\n\t\tString res = \"\";\n\n\t\tres += GroupMemberGuest.CODICE;\n\t\tres += DateUtils.format(arrivo);\n\t\tres += String.format(\"%02d\", permanenza);\n\t\tres += padRight(gmg.getSurname().trim().toUpperCase(),50);\n\t\tres += padRight(gmg.getName().trim().toUpperCase(),30);\n\t\tres += gmg.getSex().equals(\"M\") ? 1 : 2;\n\t\tres += DateUtils.format(gmg.getBirthDate());\n\n\t\t//Setting luogo et other balles is a bit more 'na rottura\n\t\tres += formatPlaceOfBirth(gmg.getPlaceOfBirth());\n\n\t\tPlace cita = gmg.getCittadinanza(); //banana, box\n\t\tres += cita.getId();\n\t\tres += padRight(\"\", 34);\n\t\t//Assert.assertEquals(168,res.length()); //if string lenght is 168 we are ok\n\t\tres += \"\\r\\n\";\n\n\t\treturn res;\n\t}",
"public String getGroup() {\n return groupName;\n }",
"public void tampilgrup(){\n txtgrup.removeAllItems();\n try{\n java.sql.Statement statement = (java.sql.Statement)conek.GetConnection().createStatement();\n ResultSet res = statement.executeQuery(\"SELECT DISTINCT nama_grup FROM tblaktivitas\");\n \n while(res.next()){\n String name = res.getString(\"nama_grup\");\n txtgrup.addItem(name);\n }\n res.last();\n }catch (Exception e){\n }\n \n }",
"@Override\n public String toString() {\n return nome + placa;\n }",
"private String formatGroupName (String groupName) {\n\t\treturn groupName;\n\t}",
"public String getParticipationName(Integer pk, int pkType)\n { \n Connection con = null;\n PreparedStatement ps = null;\n ResultSet rs = null;\n String name = null;\n \n try {\n \n con = DBUtil.getConnection();\n\n //determine which query to execute \n switch (pkType) {\n case ParticipationGroupData.PK_GROUP:\n ps = con.prepareStatement(SQL_SELECT_GROUP_NAME);\n ps.setInt(1, pk.intValue());\n break;\n case ParticipationGroupData.PK_TYPE:\n ps = con.prepareStatement(SQL_SELECT_TYPE_NAME);\n ps.setInt(1, pk.intValue());\n break;\n case ParticipationGroupData.PK_DETAIL:\n ps = con.prepareStatement(SQL_SELECT_DETAIL_NAME);\n ps.setInt(1, pk.intValue());\n break;\n default:\n // should never happen...\n break;\n } \n\n //retrieve the participation name\n rs = ps.executeQuery();\n if (rs.next()) \n name = rs.getString(1);\n\n } catch (SQLException e) {\n throw new EJBException(\"Error determining the name in MaintainParticipationGroupsBean.getParticipationName()\", e);\n } finally {\n DBUtil.cleanup(con, ps, rs);\n }\n \n //return the name\n return name;\n }",
"@Override\n public String toString() {\n \treturn \"내 이름은\" + name + \", \" + \"내 학번은\" + number + \", \" + \"나는 \" + gender + \"자야\";\n }",
"public String getNamePrefix() {\n if ( group==null )\n return super.getNamePrefix();\n else\n return group.getNamePrefix();\n }",
"@SuppressWarnings(\"serial\")\n\tpublic ArrayList<String> getGroups() throws Exception{\n\t\treturn new ArrayList<String>(){{\n\t\t\tUserRegistry ur = UserRegistry.findOrCreate(doc);\n\t\t\tGroups groups = Groups.findOrCreate(ur);\n\t\t\tfor(Group g:Group.list(groups))\n\t\t\t\tadd(g.getAttribute(\"name\"));\n\t\t}};\n\t}",
"public void printAllGroups() throws IllegalCourseTypeException {\n if (courseType == CourseType.LEC) {\n throw new IllegalCourseTypeException(\n \"Oops, it appears that \" + courseName + \" doesn't have any groups.\"\n );\n }\n\n System.out.println();\n System.out.println(\"+-----------------------------------------------+\");\n System.out.println(\"| Groups in \" + courseName + \" |\");\n System.out.println(\"+----------------+-------------+----------------+\");\n System.out.println(\"| Group Name | Vacancy | Total Size |\");\n System.out.println(\"+----------------+-------------+----------------+\");\n \n for (Map.Entry<String, Integer[]> entry : tutLabGroups.entrySet()) {\n if (entry.getKey().equals(\"_LEC\")) {\n continue;\n }\n System.out.print(\"| \" + entry.getKey() + \" | \");\n System.out.printf(\"%2s\", entry.getValue()[0]);\n System.out.print(\" | \");\n System.out.printf(\"%2s\", entry.getValue()[1]);\n System.out.println(\" |\");\n }\n\n System.out.println(\"+----------------+-------------+----------------+\");\n System.out.println();\n }",
"public ArrayList<ArrayList<String>> getMember(int idGroupe) throws RemoteException {\r\n\t\t\t\r\n\t\t\tArrayList<ArrayList<String>> list = new ArrayList<ArrayList<String>>();\r\n\t\t\t\r\n\t\t String requete = \"Select e_id, e_nom, e_prenom from etudiant, groupeassoc Where ga_idGroupe = \" + idGroupe +\r\n\t\t \t\t\t\t \" and ga_idetudiant = e_id\";\r\n\t\t System.out.println(\"requete : \" + requete);\r\n\t\t \r\n\t\t DataSet data = database.executeQuery(requete);\r\n\t\t \r\n\t\t String[] line = null;\r\n\r\n\t\t while (data.hasMoreElements()) {\r\n\t\t \tArrayList <String> etud = new ArrayList <String>();\r\n\t\t \t\r\n\t\t \tString concat;\r\n\t\t \tline = data.nextElement();\r\n\t\t \tetud.add(line[1]);\r\n\t\t \tconcat = line[2] + \" \" + line[3];\r\n\t\t \tetud.add(concat);\r\n\t\t \tlist.add(etud);\r\n\t\t }\r\n\t\t \r\n\t\t return list;\r\n\t\t}",
"@Override\n\tpublic Object getGroup(int sectionPosition) {\n\t\treturn sections.get(sectionPosition).getTitle();\n\t}",
"private ArrayList<String> getNames(int numOfSub, String type) {\n ArrayList<String> subNames = new ArrayList<String>();\n for (int i = 1; i <= numOfSub; i++) {\n if (type.equals(\"Class\")) {\n System.out.println(\"Name of Sub-Class \" + i + \" (eg. CPSC 210 202 Sub-Class Name would be 202)\");\n } else if (type.equals(\"Lab\")) {\n System.out.println(\"Name of Lab \" + i + \" (eg. CPSC 210 L2A Lab Name would be L2A)\");\n } else {\n System.out.println(\"Name of Tutorial \" + i + \" (eg. CPSC 210 T2A Tutorial Name would be T2A)\");\n }\n subNames.add(scanner.nextLine());\n }\n return subNames;\n }",
"public String getGroupName() {\n\t\treturn groupName;\n\t}",
"@Query(\"SELECT a.correo from Alumno a left join a.grupos grupo where grupo.name =:name\")\n\t//select a.correo from alumno a inner join alumno_has_grupo pha on pha.alumno_idalumno = a.id inner join grupo g on g.id = pha.grupo_idgrupo where g.name =:name\n\tArrayList<String> findByGroupByNameCorreo(@Param(\"name\") String name);",
"public String agrupar(String nombreGrupo, Civilizacion civ) throws NoAgrupableException, ParametroIncorrectoException, CeldaEnemigaException, NoTransitablebleException, FueraDeMapaException {\n if(this.getEdificio() != null){\n throw new NoAgrupableException(\"Dentro de un edificio no se puede agrupar\");\n }\n if (this.getPersonajes().size() <= 1) {\n throw new NoAgrupableException(\"No hay personajes suficientes para agrupar\");\n }\n // Crea e inicializa el grupo\n Grupo grupo = new Grupo();\n grupo.inicializaNombre(civ);\n grupo.setNombre(nombreGrupo);\n civ.anhadeGrupo(grupo);\n return agrupar(grupo);\n }",
"@Override\n\t\t\tpublic String toString() {\n\t\t\t\treturn nome;\n\t\t\t}",
"@Override\r\n\tpublic String falar() {\r\n\t\treturn \"[ \"+getNome()+\" ] Sou Um Professor\";\r\n\t}"
]
| [
"0.6940802",
"0.6795439",
"0.678634",
"0.6702712",
"0.6628862",
"0.6540683",
"0.6522523",
"0.6432106",
"0.62828404",
"0.6265367",
"0.6258177",
"0.6222148",
"0.620926",
"0.6195825",
"0.6193027",
"0.6164861",
"0.6128947",
"0.6105427",
"0.6063183",
"0.60406655",
"0.6010792",
"0.60096306",
"0.59942466",
"0.598241",
"0.5969941",
"0.59493184",
"0.5937455",
"0.5926985",
"0.5916214",
"0.58900243",
"0.58758616",
"0.5868998",
"0.58587897",
"0.5834685",
"0.5803049",
"0.5758239",
"0.57445896",
"0.5732971",
"0.57314044",
"0.57229316",
"0.57222027",
"0.5692504",
"0.5686517",
"0.5682972",
"0.56788576",
"0.5667808",
"0.5667808",
"0.566622",
"0.5654154",
"0.56214255",
"0.561592",
"0.561451",
"0.560253",
"0.55848664",
"0.5581264",
"0.55798006",
"0.5577535",
"0.5573393",
"0.55718005",
"0.55709624",
"0.5570218",
"0.5548638",
"0.5548442",
"0.5548419",
"0.5548419",
"0.55433244",
"0.55398715",
"0.5537199",
"0.5530382",
"0.55216235",
"0.5520176",
"0.5519472",
"0.55095446",
"0.55095446",
"0.55014324",
"0.5499538",
"0.5494305",
"0.5483794",
"0.5470181",
"0.5465563",
"0.54532653",
"0.545261",
"0.5450675",
"0.54485685",
"0.54390824",
"0.5434559",
"0.54339343",
"0.54235065",
"0.54214114",
"0.5419817",
"0.54193807",
"0.5415812",
"0.54146415",
"0.5408262",
"0.5396864",
"0.5396435",
"0.5394646",
"0.53938",
"0.5380914",
"0.53647333"
]
| 0.6276884 | 9 |
Elle ajoute un personnel per dans la liste des personnels. | public final void add(final InterfacePersonne per) {
System.out.println(this.personnel.contains(per));
personnel.add(per);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 void add(Person person) {\n\t\tteilnehmerListe.add(person);\n\t}",
"public void addPerson(String name){\n Person newPerson = new Person(name,this.x1,this.x2);\n for(Person p : personList){\n if(p.equals(newPerson)){\n System.out.println(\"Error! The person already exists.\");\n }\n }\n personList.add(newPerson);\n }",
"@Override\r\n\tpublic PersonneDTO addPersonne(Personne personne) {\n\t\treturn daoPersonne.addPersonne(personne);\r\n\t}",
"public void addPerson(Person thePerson) {\r\n staff.add(thePerson);\r\n }",
"void setLsPersonne(ArrayList<Personne> l) {\n this.lsPersonne = l;\n }",
"public void insererEnTeteDeListe(Personne personne) {\n\t\tElement ancienPremier= premier;\n\t\tpremier= new Element(personne,ancienPremier);\n\t\t nbElt ++;\n\t}",
"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 }",
"public void ajoutVitesse(Perso p, ArrayList<Perso> groupie){\r\n\t\tif(groupie.isEmpty()){//array vide => ajout simple\r\n\t\t\tgroupie.add(p);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tint cpt =0;\r\n\t\t\twhile(groupie.get(cpt).getSpeed()>p.getSpeed() && cpt<groupie.size()){\r\n\t\t\t\tcpt++;//trouver la position de de l'element\r\n\t\t\t}\r\n\t\t\tif (cpt<groupie.size()){//si ce n'est pas le dernier\r\n\t\t\t\tgroupie.add(cpt,p);\r\n\t\t\t}\r\n\t\t\telse{//si c'est le dernier on l'ajoute a la fin (exception si cpt=size())\r\n\t\t\t\tgroupie.add(p);\r\n\t\t\t}\r\n\t\t}\t\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}",
"private void addPerson(){\r\n\t\tpeople.add(new Person(this));\r\n\t\t// fire the listeners so the screen updates\r\n\t\t// when addPerson is called (by the button click)\r\n\t\tpersonTableModel.fireTableRowsInserted(0,0);\r\n\t}",
"public void addPerson(Person per) {\r\n\t\tthis.persons.put(per.getPersonID(), per);\r\n\t}",
"public CompositePersonne() {\n\t\tthis.nomGroupe = \" \";\n\t\tthis.personnel = new ArrayList<InterfacePersonne>();\n\n\t}",
"void addPerson(Person person) throws UniquePersonList.DuplicatePersonException;",
"void addPersonListener(PersonListener personListener, Person... persons) {\n for (Person c : persons) {\n HashSet<PersonListener> listeners;\n if (!personListeners.containsKey(c)) {\n listeners = new HashSet<PersonListener>();\n listeners.add(personListener);\n personListeners.put(c, listeners);\n } else {\n listeners = personListeners.get(c);\n listeners.add(personListener);\n }\n }\n }",
"private void reposicionarPersonajes() {\n // TODO implement here\n }",
"public void ajouter() {\n position = graph.edges.ajouterElement(this);\n origine.successeurs.inserer(destination);\n destination.predecesseurs.inserer(origine);\n origine.aretes_sortantes.inserer(this);\n destination.aretes_entrantes.inserer(this);\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\n\n\t\t\t\t\tString nomSaisi = txtNomPersonnel.getText();\n\t\t\t\t\tString motDePasseSaisi = txtMotDePassePersonnel.getText();\n\t\t\t\t\tString roleChoisi = comboRoles.getSelectedItem().toString();\n\n\t\t\t\t\tif (!nomSaisi.isEmpty() && !motDePasseSaisi.isEmpty() && !roleChoisi.isEmpty()) {\n\t\t\t\t\t\t//ajout d'un nouveau personnel dans la bdd\n\t\t\t\t\t\tPersonnelMger.getInstance().addPersonnel(nomSaisi, motDePasseSaisi, roleChoisi);\n\t\t\t\t\t\t//fermer la boite de dialogue\n\t\t\t\t\t\tNewPersonnelDialog.this.setVisible(false);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\talert.showMessageDialog(null, \"Cet identifiant existe déjà !\", \"Erreur\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\n\t\t\t}",
"@Override\n\tpublic void addPerson(User pUser) {\n\t\t\n\t}",
"public void addPerson(Person p);",
"public void add(Person person) {\n\t\tlistOfPeople.add(person);\n\t\t\n\t}",
"@Override\r\n\tpublic void ajouterPersonne(Personne p) {\r\n\t\tem.persist(p);\r\n\t}",
"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\", \"[email protected]\", \"M\", \"http://\", simpleDateFormat.parse(\"06/12/1965\"));\n \tPerson p2 = new Person(\"durand\", \"gerard\", \"[email protected]\", \"F\", \"http://\", simpleDateFormat.parse(\"06/04/1965\"));\n \tPerson p3 = new Person(\"Pierre\", \"martin\", \"[email protected]\", \"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}",
"protected void addPerson(Person person) {\n this.getPersonsInPool().add(person);\n this.setAvailablePersons(this.getPersonsInPool().size());\n this.setTotalPersons(this.getPersonsInPool().size());\n }",
"public List<Person> addPeople(List<Person> personList) {\t\t\n\t\tList<Person> ret = new ArrayList<>();\n\t\t\n\t\tPerson temp = null;\t\t\n\t\tfor(Person p : personList) {\n\t\t\tif(pRepo.existsByPersonLOD(p.getPersonLOD())) {\n\t\t\t\ttemp = pRepo.findByPersonLOD(p.getPersonLOD());\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//Enforces default gender\n\t\t\t\tif(p.getGender() == null) {\n\t\t\t\t\tp.setGender('U');\n\t\t\t\t}\n\t\t\t\ttemp = pRepo.save(p);\n\t\t\t}\n\t\t\t//We just want to know if it is in the database\n\t\t\tret.add(temp);\n\t\t}\n\t\t\n\t\treturn ret;\n\t}",
"public void addCommitteeMember(Professor p) {\r\n committee.add(p);\r\n }",
"public void addPerson(Person object)\n\t{\n\t\tthis.peopleList.add(object);\n\t}",
"@Override\n public void onPersonSelected(Person person) {\n gameFriendsAdapter.addItem(person);\n }",
"public List <Person> addUser(List <Person> listOfPerson) {\n\t\tdo {\n\t\t\tPerson person = new Person();\n\n\t\t\tSystem.out.println(\"Enter the First Name: \");\n\t\t\tperson.setFname(Utility.inputString());\n\t\t\tSystem.out.println(\"Enter the Last Name: \");\n\t\t\tperson.setLname(Utility.inputString());\n\t\t\tSystem.out.println(\"Enter the Address: \");\n\t\t\tperson.setAddress(Utility.inputString());\n\t\t\tSystem.out.println(\"Enter the City: \");\n\t\t\tperson.setCity(Utility.inputString());\n\t\t\tSystem.out.println(\"Enter the State: \");\n\t\t\tperson.setState(Utility.inputString());\n\t\t\tSystem.out.println(\"Enter the Zip Code: \");\n\t\t\tperson.setZip(Utility.inputInteger());\n\t\t\tSystem.out.println(\"Enter the Phone Number: \");\n\t\t\tperson.setPhn(Utility.inputLong());\n //Adding the details given in person to the listOfPerson\n\t\t\tlistOfPerson.add(person);\n\t\t\tSystem.out.println(\"Person added successfully\");\n\t\t\tSystem.out.println(\"To add more person type true\");\n\t\t\treturn listOfPerson;\n\t\t} while (Utility.inputBoolean());\n\t}",
"public boolean equals(Personnel p){\nreturn numPers.equals(p.numPers);\n}",
"public void dodajPodsjetnik(Podsjetnik podsjetnik) {\r\n\t\tlista.add(podsjetnik);\r\n\r\n\t}",
"public void addUtilisateurToGroupe(Utilisateur utilisateur, Groupe groupe);",
"public void addPersonality(Personality pObjectName)\n {\n pList.add(pObjectName);\n }",
"public void ajoutPoubelle(Poubelle unePoubelle){\r\n\t\tthis.lesPoubelles.add(unePoubelle);\r\n\t}",
"public void addPerson(T people) {\r\n\t Node tempNode = new Node(people); // the node added by the user \r\n\t \r\n\t if (isEmpty()) { \r\n\t firstNode = tempNode; // if empty set first node to 1, aka the first node \r\n\t currentNode = firstNode; // the current node will also be the first nod e\r\n\t } else {\r\n\t currentNode.next = tempNode; // if its not empty , current node is equal to the node ( of the people ) ; \r\n\t }\r\n\t \r\n\t tempNode.next = firstNode; // this way tempNode.next will always be equal to 1, aka the first Node \r\n\t lastNode = tempNode; // this will make the last node in the list equal to the most current/ last node added \r\n\t skip(); // resetting current node to 1, aka the first node \r\n\t nodeCount++; // adding to the node count \r\n\t }",
"private void seePerso() {\n\t\tfor (int i = 0; i < persoList.size(); i++) {\n\t\t\tPersonnage perso = persoList.get(i);\n\t\t\tSystem.out.println(\"id : \" + i);\n\t\t\tSystem.out.println(perso);\n\t\t}\n\n\t\tSystem.out.println(\"souhaitez vous modifier un personnage ? o/n\");\n\t\tif (sc.nextLine().toLowerCase().contentEquals(\"o\")) {\n\t\t\tSystem.out.println(\"Lequel ? id\");\n\t\t\tint id = sc.nextInt();\n\t\t\tsc.nextLine();\n\t\t\tchangePerso(id);\n\t\t}\n\t}",
"public interface ComportementAjout {\n\n\n void ajouterEtudiant(Etudiant e, Promotion p, List<Groupe> l);\n\n}",
"public void ajouterParticipation(Participer uneParticipation)\n\t{\n\t\tthis.lesParticipations.add(uneParticipation);\n\t}",
"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}",
"private void addCardsToCommunalPile() {\n for (int i = 0; i < playersInGame.size(); i++) {\n Player playerToPopCard = playersInGame.get(i);\n communalPile.add(playerToPopCard.popCard());\n }\n }",
"@Override\npublic int compareTo(Personnel p){\nreturn numPers.compareTo(((Personnel)p).numPers);\n}",
"private void carregarPacienteAtivoList() {\n\t\tthis.setPacienteList(new ArrayList<Paciente>());\n\t\tthis.getPacienteList().addAll(this.getPacienteDAO().getPacienteAtivoList());\n\t}",
"public void addParticipant (Participant participantAAjouter){\n if (participantAAjouter != null){\n for (Participant participant :lesParticipants){\n if (participant.getIdParticipant()==participantAAjouter.getIdParticipant()){\n return;\n } \n }\n lesParticipants.add(participantAAjouter);\n }\n }",
"private void ajouterPion(Pion unPion, Position unePosition) {\n\t\tmesPions.put(unePosition, unPion); \n }",
"public PreferenceBean setPersonnelBean(PreferenceBean pObject,PersonnelBean pObjectToBeSet)\n {\n pObject.setRegbyid(pObjectToBeSet.getPersonnelid());\n return pObject;\n }",
"public void addListener(PersonneAdapterListener aListener) {\n mListListener.add(aListener);\n }",
"public void addRegisseur( Person regisseur ) {\n\t\tthis.listRegisseure.add( regisseur );\n\t}",
"public void AddReliquias(){\n DLList reliquias = new DLList();\n reliquias.insertarInicio(NombreReliquia); \n }",
"private void addPayeeToCollection() {\n\t\tif (getForm().getType() != TRANSFER) {\n\t\t\tPayee payee = new Payee(getForm().getPayFrom());\n\n\t\t\tif (payee.getIdentifier().length() != 0) {\n\t\t\t\tgetPayees().add(payee);\n\t\t\t\tgetForm().getPayFromChooser().displayElements();\n\t\t\t}\n\t\t}\n\t}",
"public ModificationEmploye() {\n initComponents();\n \n Employe e = GestionSociete.personnel.get(GestionSociete.rowID);\n \n \n nom.setText(e.getNom());\n prenom.setText(e.getPrenom());\n dateEntree.setText(e.getDateEntree());\n \n DefaultTableModel model = (DefaultTableModel) jTable1.getModel();\n model.setRowCount(0);\n \n for (Map.Entry<String, Competence> entry : GestionSociete.competences.entrySet()){\n model.addRow(new Object[] {entry.getValue().getId(),entry.getValue().getNomFr(),\n entry.getValue().getNomEn(),e.possedeCompetence(entry.getValue())});\n }\n \n }",
"public void addPersonPickedUp(Person newPerson)\n\t{\n\t\tpeoplePickedUp.add(newPerson);\n\t}",
"public void add(LDCEstudante estudante){\n lista.add(estudante);\n }",
"public void CreatePerson(Person p){\n\t\tWeddingConnectionPoolManager con = new WeddingConnectionPoolManager(); \n\t\t Person p1 = new Person(p.getId(), p.getFirstName(), p.getLastName(), p.getRelationship(),\n\t\t\t\t p.getAddress(), p.getPhone(), p.getEmail(), p.getComment(), user.getId());\n\t\t System.out.println(\"p1 : \" + p1);\n\t\t System.out.println(\"p : \" + p);\n\t\t// TODO - should to iterate on the results that returns when calling to \"getpersons\" method.\n\t\tPersonDBManager.getInstance().CreateNewPerson(con.getConnectionFromPool(), p1);\t\n\t}",
"public void addCastCrew() {\n ResultSet result = null;\n try {\n result = server.executeStatement(\"SELECT * FROM castandcrew INNER JOIN Person ON castandcrew.personID = person.personID WHERE castandcrew.prodID = \" + \"'\" + getId() + \"'\" + \";\");\n while(result.next()) {\n String name = result.getString(\"primaryName\");\n String id = result.getString(\"personID\");\n String jobID = result.getString(\"jobID\");\n String characterPlayed = result.getString(\"characterPlayed\");\n String jobTitle = result.getString(\"jobTitle\");\n int birthYear = result.getInt(\"birthYear\");\n int deathYear = result.getInt(\"deathYear\");\n PersonResult newResult = new PersonResult(id, \"Person\", name, jobTitle, characterPlayed, jobID, birthYear, deathYear, server);\n castCrew.add(newResult);\n }\n } catch (SQLException e) {\n\n }\n }",
"public <T> void addPerson(Person p) {\n\t\tsession.save(p);\n\t}",
"@Override\r\n public void adicionarFilme(Filme filme) {\r\n listaFilme.add(filme);\r\n }",
"public void populerListView() {\n Turnering valgtTurnering;\n valgtTurnering = fp_kombo_turnering.getSelectionModel().getSelectedItem();\n valgtTurnering.hentParti();\n for (Parti p: valgtTurnering.hentParti()) {\n fp_liste_parti.getItems().add(p);\n }\n this.partierLastet = true;\n this.fp_knapp_velg_parti.setDisable(false);\n this.fp_knapp_søk_parti.setDisable(false);\n }",
"public gesPers() {\n initComponents();\n typePersonnel = TypePersonnel.EMPLOYE;\n \n TreeMap<String, Personnel> tmap = new TreeMap<>();\n try {\n AccesBDOracle.getInstance().charger(tmap);\n } catch (SQLException ex) {\n showMessageDialog(this, \"Problème de chargement de la base de données\", \"Erreur\", ERROR_MESSAGE);\n Logger.getLogger(gesPers.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n cont = new Conteneur<>(tmap);\n cont.dernier();\n \n labelNbObjets.setText(\"0\");\n \n this.addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(java.awt.event.WindowEvent windowEvent) {\n if(modif)\n switch(showConfirmDialog(gesPers.this, \"Voulez-vous sauvegarder votre travail ?\", \"Quitter ...\", YES_NO_CANCEL_OPTION))\n {\n case YES_OPTION :\n gesPers.this.sauvegarder();\n case NO_OPTION :\n System.exit(0); \n }\n else\n System.exit(0);\n }\n });\n \n this.modeAffichage();\n this.afficher();\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}",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Personnel)) {\n return false;\n }\n Personnel other = (Personnel) object;\n if ((this.iDPersonnel == null && other.iDPersonnel != null) || (this.iDPersonnel != null && !this.iDPersonnel.equals(other.iDPersonnel))) {\n return false;\n }\n return true;\n }",
"public void restartPersonajes() {\n this.listaPersonajes = new ArrayList<Personaje>();\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Personnel)) {\n return false;\n }\n Personnel other = (Personnel) object;\n if ((this.personnelId == null && other.personnelId != null) || (this.personnelId != null && !this.personnelId.equals(other.personnelId))) {\n return false;\n }\n return true;\n }",
"public void addMember(Person person) {\n\t\tmembers.add(person);\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 EnregistrerEmploye(String nom, String prenom, String couriel, String adresse,\n\t\t\tString numero, int heuresTravaille, int leTauxHoraire,int unSalaire){\n\t\t\n\t\tEmploye exploite = new Employe(nom,prenom,couriel,adresse,numero,heuresTravaille,leTauxHoraire,unSalaire);\n\t\tGestion.addEmploye(exploite);\n\t}",
"public void addRecipient(){\n //mRATable.insert();\n }",
"public void addVehicule(Vehicule vehicule) { listeVehicule.add(vehicule); }",
"public boolean ajoutPolygone(Polygone p) {\n if(this.list.contains(p)){\n return false;\n }\n else {\n return this.list.add(p);\n }\n }",
"public Professionnel chercherProfessionnel(String nom, String prenom) {\r\n Professionnel p = null;\r\n for (int i = 0; i < listePro.getListePro().size(); i++) {\r\n if (listePro.getListePro().get(i).getNom().equals(nom) && listePro.getListePro().get(i).getPrenom().equals(prenom)) {\r\n p = listePro.getListePro().get(i);\r\n }\r\n }\r\n return p;\r\n }",
"public void setPersonnelType(Integer personnelType) {\n this.personnelType = personnelType;\n }",
"public void autoAdd()\n {\n switch (this.getGameType())\n {\n case 1:\n for(int i = 0; i < this.participantNum; i++)\n {\n games.get(count - 1).addParticipant(swimmers.get(i).getId(),swimmers.get(i).compete(),swimmers.get(i).getPoints());\n }\n break;\n case 2:\n for(int i = 0; i < this.participantNum; i++)\n {\n games.get(count - 1).addParticipant(runners.get(i).getId(),runners.get(i).compete(),runners.get(i).getPoints());\n }\n break;\n case 3:\n for(int i = 0; i < this.participantNum; i++)\n {\n games.get(count - 1).addParticipant(cyclists.get(i).getId(),cyclists.get(i).compete(),cyclists.get(i).getPoints());\n }\n break;\n }\n\n }",
"public Professionnel chercherProfessionnel(String id) {\r\n Professionnel p = null;\r\n int i=0;\r\n boolean stop=false;\r\n while( i < listePro.getListePro().size()&&(!stop)) {\r\n \r\n if (listePro.getListePro().get(i).getId_pro().equals(id)) {\r\n p = listePro.getListePro().get(i);\r\n stop=true;\r\n }\r\n i++;\r\n }\r\n return p;\r\n }",
"@Override\n\tpublic void ajouterEmploye(Employe em) {\n\t\ttreeMap.put(em.getId(), em);\n//\t\tSystem.out.println(em);\n//\t\tSystem.out.println(\"Guardado\");\n\t\tSystem.out.println(\"****RAAAA \"+treeMap.size()+\" :: \"+treeMap.values());\n\t}",
"@Override\n\tpublic void Insert(PersonelContract entity) {\n\n\t}",
"@Override\r\n\tpublic void addEmployeToGroupe(Long codeEmp, Long codeGroup) {\n dao.addEmployeToGroupe(codeEmp, codeGroup);\r\n\t}",
"public Person addPerson(Person person) {\n \tqueryExecutor.insertPerson(person);\n \t//personMap.put(person.getName(), person);\n return person;\n }",
"public void addPerson(int floorId, IPerson p) {\n \tgetFloor(floorId).addPerson(p);\n }",
"public void domicilioAgregar() {\r\n\t\tlog.info(\"Domicilio agregar \" + nuevoDomici.getDomicilio());\r\n\t\tboolean verifica = false;\r\n\t\tmensaje = null;\r\n\t\tnuevoDomici.setTbTipoCasa(objTipoCasaService.findTipoCasa(Tipocasanuevo));\r\n\t\tnuevoDomici.setDomicilio(domicilio);\r\n\t\tnuevoDomici.setReferencia(referencia);\r\n\t\tnuevoDomici.setTbUbigeo(objUbigeoService.findUbigeo(idUbigeo));\r\n\t\tlog.info(\"TIPO-CASA-NUEVO--->\"+nuevoDomici.getTbTipoCasa().getIdtipocasa());\r\n\t\tnuevoDomici.setNuevoD(1);\r\n\t\t//aqui ponfo el ID-Domicilio a la lista Domicilio temporalmente.\r\n\t\tnuevoDomici.setIddomiciliopersona(0);\r\n\t\tnuevoDomici.setTbEstadoGeneral(objEstadoGeneralService.findEstadogeneral(15));\r\n\t\t\r\n\t\tfor (int i = 0; i < DomicilioPersonaList.size(); i++) {\r\n\t\t\tlog.info(\" \"+ DomicilioPersonaList.get(i).getDomicilio() + \" \" + nuevoDomici.getDomicilio());\r\n\t\t\tif (DomicilioPersonaList.get(i).getDomicilio().equals(nuevoDomici.getDomicilio())) {\r\n\t\t\t\tverifica = false;\r\n\t\t\t\tmensaje = \"el Domicilio ya se encuentra registrado en la lista de domiclio cliente\";\r\n\t\t\t\tbreak;\r\n\t\t\t}else {\r\n\t\t\t\tverifica = true;\r\n\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\tif (DomicilioPersonaList.size() == 0) {\r\n\t\t\t\tverifica = true;\r\n\t\t\t\t}\r\n\t\t\tif (verifica) {\r\n\t\t\t\tnuevoDomici.setItem(\"Por Agregar\");\r\n\t\t\t\tDomicilioPersonaList.add(nuevoDomici);\r\n\t\t\t\tlog.info(\"se agrego \"+ nuevoDomici.getDomicilio());\r\n\t\t\t\t}\r\n\t\t\tif (mensaje != null) {\r\n\t\t\t\tmsg = new FacesMessage(FacesMessage.SEVERITY_FATAL,\r\n\t\t\t\tConstants.MESSAGE_ERROR_FATAL_TITULO, mensaje);\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\r\n\t\t\t\t}\r\n\t\t\tnuevoDomici = new DomicilioPersonaSie();\r\n\t\t}",
"@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 }",
"@Override\r\n\tpublic void guardarTripulanteEncontrado(Tripulante tripulante) {\r\n\t\tlistadoAuxiliar.add(tripulante);\r\n\t}",
"void addPerson(Player player);",
"@Override\n\tpublic List<Personne> findAllPErsonne() {\n\t\treturn dao.findAllPErsonne();\n\t}",
"private void ajouterParametre() {\n FenetreAjouterParametre fenetreAjouterParametre = new FenetreAjouterParametre();\n fenetreAjouterParametre.showAndWait();\n if (fenetreAjouterParametre.getParametre() == null) return;\n parametreListView.getItems().add(fenetreAjouterParametre.getParametre());\n }",
"public void AfficherListProspect() throws Exception{\n laListeProspeect = Prospect_Db_Connect.tousLesProspects();\n laListeProspeect.forEach((p) -> {\n modelProspect.addRow(new Object[]{ p.getIdent(),\n p.getRaison(),\n p.getTypeSo(),\n p.getDomaine(),\n p.getAdresse(),\n p.getTel(),\n p.getCa(),\n p.getComment(),\n p.getNbrEmp(),\n p.getDateProspetc(),\n p.getInteretPropspect()});\n });\n }",
"public void chargeListe(){\n jCbListeEtablissement.removeAllItems();\n String sReq = \"From Etablissement\";\n Query q = jfPrincipal.getSession().createQuery(sReq);\n Iterator eta = q.iterate();\n while(eta.hasNext())\n {\n Etablissement unEtablissement = (Etablissement) eta.next();\n jCbListeEtablissement.addItem(unEtablissement.getEtaNom());\n }\n bChargeListe = true;\n }",
"private void addDefaultPerson() {\n personNames.add(\"you\");\n personIds.add(STConstants.PERSON_NULL_ID);\n personPhotos.add(null);\n personSelections.add(new HashSet<Integer>()); \n }",
"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 Oglas addPonuda(Ponuda p, Long id) {\n\t\tOglas oglas = repository.findOne(id);\n\t\toglas.getPonudeZaOglas().add(p);\n\t\treturn repository.save(oglas);\n\t}",
"public void addInvolvedPerson( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), INVOLVEDPERSON, value);\r\n\t}",
"public void add(Person person) {\n\t\t\t\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\t\n\t\tsession.save(person);\n\t}",
"@Override\n\tpublic int modifierPersonne(Personne p) {\n\t\treturn dao.modifierPersonne(p);\n\t}",
"@Override\n\tpublic Personne affichagePersonne(int id) {\n\t\treturn dao.affichagePersonne(id);\n\t}",
"public void add(Person p) {\r\n\t\tq.add(p);\r\n\t\tif(q.size() > maxQ)\r\n\t\t\tmaxQ = q.size();\r\n\t}",
"public ArrayList<Personne> getListPersonne() {\n\t\treturn listPersonne;\n\t}",
"public void ajouterSenateur(Senateur s) {\n\t\tsenateurs.add(s);\n\t}",
"public void addPersonDroppedOff(Person newPerson)\n\t{\n\t\tpeopleDroppedOff.add(newPerson);\n\t}",
"void crearNuevaPersona(Persona persona);",
"public interface IPersonagem {\n void PopulaPersonagens(ArrayList<ModelPersonagem> arrayPersonagens);\n\n}",
"@Override\n public void addToModel() {\n for (final Person person : team.observableTeamMembers()) {\n person.setTeam(team);\n }\n\n // Add team to project\n organisation.getTeams().add(team);\n }",
"public void addperson(Person p, int floorNum) {\n\r\n\r\n }"
]
| [
"0.68407375",
"0.6644866",
"0.6561706",
"0.6442365",
"0.6403332",
"0.6320113",
"0.62359244",
"0.614474",
"0.61091524",
"0.6102655",
"0.60908407",
"0.6086864",
"0.6046274",
"0.5987418",
"0.5986418",
"0.59406585",
"0.58483416",
"0.5842382",
"0.58339405",
"0.5816637",
"0.5816161",
"0.5801039",
"0.5745293",
"0.5706071",
"0.56988984",
"0.567916",
"0.5661808",
"0.56515616",
"0.5647153",
"0.5640744",
"0.56279063",
"0.5625434",
"0.56214964",
"0.55977297",
"0.5593564",
"0.5583987",
"0.5582705",
"0.5549287",
"0.554287",
"0.55377984",
"0.5525364",
"0.55232173",
"0.55170476",
"0.55067205",
"0.549999",
"0.5490074",
"0.54771334",
"0.5474432",
"0.5465807",
"0.5462257",
"0.54493177",
"0.54473907",
"0.5436076",
"0.5432702",
"0.54271984",
"0.5425364",
"0.5423682",
"0.5422733",
"0.5395296",
"0.5385452",
"0.5384765",
"0.53589576",
"0.5358074",
"0.53540975",
"0.53513163",
"0.5345249",
"0.53441",
"0.5341879",
"0.5339297",
"0.532798",
"0.53143615",
"0.53133094",
"0.53041565",
"0.5300502",
"0.5277933",
"0.52769226",
"0.5274297",
"0.52652603",
"0.5263101",
"0.5251103",
"0.5250427",
"0.52500755",
"0.5249882",
"0.5246129",
"0.5244956",
"0.5244948",
"0.52382034",
"0.52332044",
"0.5230721",
"0.52205217",
"0.52190685",
"0.52141875",
"0.5209948",
"0.5196463",
"0.51963204",
"0.5189669",
"0.5186021",
"0.51820505",
"0.51744926",
"0.51706785"
]
| 0.7075983 | 0 |
Retourne le nom de groupe. | public final String getNomGroupe() {
return this.nomGroupe;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getGroupe() {\r\n return groupe;\r\n }",
"public String getGroupName(){\r\n return Validator.unescapeJava(this.groupName);\r\n }",
"public String getGroupName() {\n GitLabGroupInfo groupInfo = getGroupInfo();\n return (groupInfo != null) ? groupInfo.getName() : \"<could not fetch group information>\";\n }",
"java.lang.String getGroup();",
"public String getName()\n {\n return groupService.getName(this);\n }",
"private static String extractGroupName(FloodyGroup floodyGroup) {\n return isBlank(floodyGroup.name())\n ? (\"FloodyGroup-\"\n +\n // append random long number to ensure unique group name\n new Random().nextLong())\n : floodyGroup.name();\n }",
"public java.lang.String getGroupname() {\n\treturn groupname;\n}",
"public String getNombreGrupo() {\n\t\treturn nombreGrupo;\n\t}",
"public String getGroupName();",
"public String getGroupname()\n {\n return group2d;\n }",
"public String getGroup();",
"public String getFullName() {\n return group + \".\" + name;\n }",
"@Override\n public String getGroupName(int group) {\n assert 0 <= group && group < groupNames.length;\n \n return groupNames[group];\n }",
"public String getGroupName(String beID) throws AuditTrailTrackingException\n {\n return GroupMappingHelper.getInstance().getGroupMapping(beID, getDAO());\n }",
"public String getGroupName() {\n return this.GroupName;\n }",
"public String getGroupName()\n {\n return groupName;\n }",
"public String getVechicleGroupNamePlaceholder() {\r\n\t\tString VechicleGroupNamePlaceholderText = safeGetAttribute(vehicleNameField.replace(\"vehicle_name\", \"group_name\"), \"placeholder\", SHORTWAIT);\r\n\t\tlog.info(\"get Vechicle Group Name placeholder \");\r\n\t\treturn VechicleGroupNamePlaceholderText;\r\n\t}",
"public java.lang.String getGroupName() {\n return groupName;\n }",
"public String getNamePrefix() {\n if ( group==null )\n return super.getNamePrefix();\n else\n return group.getNamePrefix();\n }",
"public String getGroupName() {\r\n return groupName;\r\n }",
"public String getGroupName() {\n return groupName;\n }",
"public String getGroupName() {\n return groupName;\n }",
"public String getGroupName() {\n return groupName;\n }",
"public String getGroupName() {\n return groupName;\n }",
"public String getGroup() {\n return groupName;\n }",
"public String getName(){\n \treturn this.name().replace(\"_\", \" \");\n }",
"@Nullable\n // Safe as we want to provide all getters being public for POJOs\n @SuppressWarnings({\"unused\", \"WeakerAccess\"})\n public final String getGroupName() {\n return groupName;\n }",
"public static String inputName() {\n return GolferScoresTree.inputString(\"Golfer name: \");\n }",
"java.lang.String getGameName();",
"java.lang.String getGameName();",
"public String getGroupName() {\n\t\treturn groupName;\n\t}",
"public String getSGroupName() {\n return sGroupName;\n }",
"default String getGroup() {\n return null;\n }",
"public String getNomeGiocatore(int i) {\n return null;\r\n }",
"public String getSeGrpName() {\n return seGrpName;\n }",
"public String getGroup ()\n {\n return group;\n }",
"public String getGroup ()\n {\n return group;\n }",
"public String getOriginalName() {\n return group.getName();\n }",
"public String getGroupNamesAsString() {\n return String.format(\"%s\", StringUtils.join(getGroupNames(), \", \"));\n }",
"public String getGroupName() {\n\t\t\treturn groupName;\n\t\t}",
"private String getGroupDisplayName() {\n Logger.d(TAG, \"getGroupDisplayName() entry\");\n if (null != mChatMap) {\n Object obj = mChatMap.get(ChatListFragment.NUMBER);\n Logger.d(TAG, \"getGroupDisplayName() the obj is \" + obj);\n if (obj instanceof List) {\n List<String> numbers = (List<String>) obj;\n String displayName = ChatFragment\n .getParticipantsName(numbers.toArray(new String[1]));\n Logger.d(TAG, \"getGroupDisplayName() the display name is \"\n + displayName);\n return displayName;\n } else {\n Logger.e(TAG, \"getGroupDisplayName() obj is not a List\");\n return null;\n }\n } else {\n Logger.e(TAG, \"getGroupDisplayName() mChatMap is null\");\n return null;\n }\n }",
"public String getGroupInput() {\r\n String result = null;\r\n boolean creation = this.getGroupController().getIsCreation();\r\n\r\n if (creation) {\r\n result = \"creation\";\r\n } else {\r\n // else we are in modification\r\n result = \"modification\";\r\n }\r\n\r\n return result;\r\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 String getName(){\n\t\treturn girlName;\r\n\t}",
"@Override\n\tpublic String getGroup() {\n\t\treturn \"Group_\"+SliceName(stdClass);\n\t}",
"public String getName() {\n return String.format(\"%s %s\", getFirst(), getLast());\n }",
"@Override\n\tpublic java.lang.String getName() {\n\t\treturn _lineaGastoCategoria.getName();\n\t}",
"public String getCognomeNome() {\n\t\treturn this.cognome + \" \" + this.nome;\n\t}",
"public void setGroupe(String groupe) {\r\n this.groupe = groupe;\r\n }"
]
| [
"0.7384916",
"0.729788",
"0.7280023",
"0.7025132",
"0.69408154",
"0.69115466",
"0.68826",
"0.6877626",
"0.68440276",
"0.6830132",
"0.6757942",
"0.6728543",
"0.66639614",
"0.65962094",
"0.6584448",
"0.65798014",
"0.6579214",
"0.6547547",
"0.6492394",
"0.6455253",
"0.6454711",
"0.6453639",
"0.64523625",
"0.64523625",
"0.6427494",
"0.63912755",
"0.63878524",
"0.6372506",
"0.6362571",
"0.6362571",
"0.6360983",
"0.6338187",
"0.63370264",
"0.6335601",
"0.6326963",
"0.63191617",
"0.63191617",
"0.6316282",
"0.63145566",
"0.6304269",
"0.628256",
"0.62786496",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6236846",
"0.6227723",
"0.6224863",
"0.6202651",
"0.6179651",
"0.61607164",
"0.61500615"
]
| 0.810852 | 0 |
. Elle supperimme un personnel passer en parametre perso si | public final void remove(final Personnel perso) {
if (this.personnel.contains(perso)) {
System.out.println(this.personnel.contains(perso));
this.personnel.remove(perso);
} else {
System.out.println(this.personnel.contains(perso));
throw new InExistArgumentException();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void elaboraParametri() {\n super.elaboraParametri();\n titoloPagina = TITOLO_PAGINA;\n }",
"public Final_parametre() {\r\n\t}",
"public void damePersonaje(String personaje){\n this.personaje=personaje;\n\n\n\n }",
"public void param(int direccionValorParam, int numeroParam){\n String valorParam = \"\";\n //traduce casos de direccionamiento indirecto\n direccionValorParam = traduceDirIndirecto(direccionValorParam);\n // obtener la direccion de la variable parametrizada en el procedimiento llamado\n int dirParamRegistro = this.directorioProcedimientos.\n obtenerProcedimientoPorId(this.pilaEras.peek().\n getIdentificadorProcedimiento()).getDireccionParametros().get(numeroParam);\n\n if (ManejadorMemoria.isGlobal(direccionValorParam)){\n // obtener el valor del parametro enviado\n valorParam = this.registroGlobal.getValor(direccionValorParam);\n\n } else if (ManejadorMemoria.isConstante(direccionValorParam)){\n // REVISAR QUE NO SEA UN PARAMETRO POR REFERENCIA\n if (this.directorioProcedimientos.\n obtenerProcedimientoPorId(this.pilaEras.peek().\n getIdentificadorProcedimiento()).getIndicadorPorReferencia().get(numeroParam)){\n // ERROR\n throw new IllegalArgumentException();\n }\n // obtener el valor del parametro enviado\n valorParam = this.directorioProcedimientos.getConstantes().get(direccionValorParam).getValorConstante();\n\n } else { // VARIABLE LOCAL\n // obtener el valor del parametro enviado\n valorParam = this.pilaRegistros.peek().getValor(direccionValorParam);\n }\n // asignar el valor del parametro a su variable correspondiente\n this.pilaEras.peek().guardaValor(dirParamRegistro, valorParam);\n }",
"private void modifierParametre() {\n if (getSelectedParamatre() == null) return;\n FenetreModifierParametre fenetreModifierParametre = new FenetreModifierParametre(getSelectedParamatre());\n fenetreModifierParametre.showAndWait();\n if (fenetreModifierParametre.getParametre() == null) return;\n Parametre temp = fenetreModifierParametre.getParametre();\n getSelectedParamatre().setNom(temp.getNom());\n getSelectedParamatre().setType(temp.getType());\n parametreListView.refresh();\n }",
"@Override\n\tpublic void pausaParaComer() {\n\n\t}",
"public ParametroPorParametroPK(Integer idpadre, Integer idhijo) {\r\n\t\tparametroIdParametroPadre = idpadre;\r\n\t\tparametroIdParametroHijo = idhijo;\r\n\t}",
"public void limpiarProcesoBusqueda() {\r\n parametroEstado = 1;\r\n parametroNombre = null;\r\n parametroApellido = null;\r\n parametroDocumento = null;\r\n parametroTipoDocumento = null;\r\n parametroCorreo = null;\r\n parametroUsuario = null;\r\n parametroEstado = 1;\r\n parametroGenero = 1;\r\n listaTrabajadores = null;\r\n inicializarFiltros();\r\n }",
"public void setMotivoRechazo(biz.belcorp.www.canonico.ffvv.vender.TMotivoRechazo param){\n \n this.localMotivoRechazo=param;\n \n\n }",
"public void setOrigen(java.lang.String param){\n \n this.localOrigen=param;\n \n\n }",
"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 }",
"private void ajouterParametre() {\n FenetreAjouterParametre fenetreAjouterParametre = new FenetreAjouterParametre();\n fenetreAjouterParametre.showAndWait();\n if (fenetreAjouterParametre.getParametre() == null) return;\n parametreListView.getItems().add(fenetreAjouterParametre.getParametre());\n }",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"id_pelanggan\", id_pelanggan);\n params.put(\"isi_pengaduan\", isi);\n return params;\n }",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"pasien\", pasien);\n\n return params;\n }",
"public void setValues(RutaParams params){\n this.costo = params.costo;\n this.tiempoVuelo = params.tiempoVuelo;\n this.piloto =encriptar(params.piloto);\n }",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"nosambungan\", nosambungan);\n return params;\n }",
"@Override\r\n public void parar(Conexion conexion){\n }",
"public void tutki(Suunta suunta);",
"public ifrmParametros(EntityManagerFactory factory,frmMain frm,BglTbUsuario user) {\n initComponents();\n PropertyConfigurator.configure(\"log4j.properties\");\n this.factory=factory;\n this.main=frm;\n this.usuario=user;\n \n llenarDatos();\n \n }",
"public Joueur(int id, int pa)\r\n/* */ {\r\n/* 34 */ this.id_joueur = id;\r\n/* 35 */ this.points_action = pa;\r\n/* */ }",
"public void setObservacion(java.lang.String param){\n \n this.localObservacion=param;\n \n\n }",
"private void updateParametre(Parametre p, Composite parent){\r\n\t\ttry {\r\n\t\t\tt_parametre.setNomP(p.getNomP());\r\n\t\t\tt_parametre.setTypeP(p.getTypeP());\r\n\t\t\tt_parametre.setSousTypeP(p.getSousTypeP());\r\n\t\t\tt_parametre.setValeurP(p.getValeurP());\r\n\r\n\t\t} catch (MainApplicationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tMessageBox dialog = new MessageBox(parent.getShell(), SWT.ICON_ERROR | SWT.OK);\r\n\t\t\tdialog.equals(\"\");\r\n\r\n\t\t\tdialog.setText(\"Attention\");\r\n\t\t\tdialog.setMessage(\"Erreur sur le sous type.\");\r\n\r\n\t\t\t// open dialog and await user selection\r\n\t\t\tdialog.open(); \r\n\r\n\t\t}\r\n\t}",
"public void restablecerParametro(String parametro, int ntp, Map<String, String> h) {\n \n if (parametro.compareTo(\"placa\") == 0) {\n \n // Reportes que necesitan placa\n int rpt_placa[] = {1,2,3,4,5,6,17};\n boolean rpt_con_placa = false;\n \n for (int rpt : rpt_placa) {\n if (rpt == ntp) {\n rpt_con_placa = true;\n break;\n }\n }\n \n if (!rpt_con_placa) {\n h.put(\"placa\", \"\");\n }\n } \n }",
"public void turno(Personaje opp);",
"public void setPedidoDetalle(biz.belcorp.www.canonico.ffvv.vender.TPedidoDetalle[] param){\n \n validatePedidoDetalle(param);\n\n \n this.localPedidoDetalle=param;\n }",
"public Tipo visitParameter(DECAFParser.ParameterContext ctx){\r\n\t\tVarDec var =new VarDec(ctx.ID().getText(),tablaSimbolos.searchTipo(ctx.parameterType().getText()),0,position);\r\n\t\tfirmaA.addParam(var);\r\n\t\taddComment(\"paramname: \"+var.getNombre()+\"-position: \"+position);\r\n\t\tposition+=var.getByteSize();\r\n\t\treturn tablaSimbolos.correct();\r\n\t}",
"public void remplireListeParam(){\r\n bddParam.add(\"id\");\r\n bddParam.add(\"site\");\r\n bddParam.add(\"smtp_serv\");\r\n bddParam.add(\"smtp_port\");\r\n bddParam.add(\"smtp_user\");\r\n bddParam.add(\"smtp_mail\");\r\n bddParam.add(\"smtp_pass\");\r\n bddParam.add(\"mail_envoie\");\r\n bddParam.add(\"licence\");\r\n bddParam.add(\"pop_up\");\r\n bddParam.add(\"mail_rapport\");\r\n bddParam.add(\"archives\");\r\n bddParam.add(\"mail\");\r\n bddParam.add(\"dbext_adress\");\r\n bddParam.add(\"dbext_port\");\r\n bddParam.add(\"dbext_user\");\r\n bddParam.add(\"dbext_pass\");\r\n bddParam.add(\"dbext_delais\");\r\n bddParam.add(\"dbext_name\");\r\n bddParam.add(\"dbext\");\r\n bddParam.add(\"dbext_purge\");\r\n bddParam.add(\"dbext_perte\");\r\n bddParam.add(\"langue\");\r\n \r\n }",
"@Override\n public void asignaParametros() {\n paso = request.getParameter(\"pasoSig\")!=null?request.getParameter(\"pasoSig\"):\"0\";\n String paginaSig = \"\";\n HashMap param = new HashMap();\n Documento doc = new Documento();\n switch (Integer.parseInt(paso)){\n case 0:\n //paso inicial: obtener la vista de los parametros\n datos.clear();\n String vista = request.getParameter(\"vista\")!=null?request.getParameter(\"vista\"):\"\";\n String idoperacion = request.getParameter(\"operacion\")!=null?request.getParameter(\"operacion\"):\"\";\n //cargar los parametros al hash de datos\n datos.put(\"idoperacion\", idoperacion);\n sesion.setPaginaSiguiente(vista);\n break;\n case 1: case 6: case 50: case 51: case 52: case 53: case 97: case 98: case 99:\n paginaSig = request.getParameter(\"paginaSig\")!=null?request.getParameter(\"paginaSig\"):\"\";\n sesion.setPaginaSiguiente(paginaSig);\n break;\n case 3: case 5: case 7:\n //editar documento(3) || baja de documentos(5) || activar documento(7)\n doc.setId(Integer.parseInt(request.getParameter(\"idDoc\")));\n datos.put(\"documento\", doc);\n datos.put(\"varios\", request.getParameter(\"varios\"));\n paginaSig = request.getParameter(\"paginaSig\")!=null?request.getParameter(\"paginaSig\"):\"\";\n sesion.setPaginaSiguiente(paginaSig);\n break;\n case 8:\n //imprimir los docs seleccionados\n datos.put(\"reporte\", application.getRealPath(\"WEB-INF/Reportes/Nomina/Personal/documentosemple.jasper\"));\n //parametros\n param = new HashMap();\n param.put(\"LOGO\", application.getRealPath(\"/Imagenes/\"+datos.get(\"logo\").toString()));\n param.put(\"RUTAIMGS\", application.getRealPath(\"/Imagenes/Personal/Documentos\"));\n Empleado empl = (Empleado)datos.get(\"empleado\");\n param.put(\"EMPLEADO\", new Integer(empl.getNumempleado()));\n param.put(\"DOCS\", request.getParameter(\"dato1\"));\n datos.put(\"parametros\", param);\n break;\n }\n datos.put(\"paso\", paso);\n }",
"public void setBloqueado(java.lang.String param){\n \n this.localBloqueado=param;\n \n\n }",
"public void setParametr(double p) {\n parametr = p; // додано 26.12.2011\n timeServ = parametr; // 20.11.2012\n\n }",
"private void valider() {\n\n\t\t/**\n\t\t * Renvoie un tableau de caractères qui sera transformé en chaine de caractère\n\t\t **/\n\n\t\tString passewordTraduit = new String(passeword.getPassword());\n\n\t\t/**\n\t\t * login.getText() récupère le contenu de la barre de saisie\n\t\t **/\n\t\t\n\t\tString user = login.getText();\n\t\tString passwd = passewordTraduit;\n\t\t/**\n\t\t *Permettra de savoir si la connexion à la BDD SQL c'est bien passée.\n\t\t */\n\t\tboolean reussite;\n\t\t/**\n\t\t * On va créer la BDD si elle n'existe pas\n\t\t */\n\t\t\n\t\treussite = Initialisation.getInstance().creerBDD(user, passwd);\n\t\t/**\n\t\t * On set le password et l'utilisateur pour que les paramètres de connexion soient les bons\n\t\t */\n\t\tInitialisation.getInstance().setPasswd(passwd);\n\t\tInitialisation.getInstance().setUser(user);\n\t\tModification.getInstance().setPasswd(passwd);\n\t\tModification.getInstance().setUser(user);\n\t\tif(reussite) {\n\t\t\t/**\n\t\t\t *Si tout c'est bien passé on regarde si l'utilisateur existe dans le fichier et dans le cas contraire on le crée.\n\t\t\t */\n\t\t\tif(personnesDejaInscrite.getInstance().getMaListDePersonneInscrite().get(user) == null) {\n\t\t\t\tpersonnesDejaInscrite.getInstance().getMaListDePersonneInscrite().put(user, new CompteAdministrateur(passwd));\n\t\t\t\tpersonnesDejaInscrite.getInstance().sauvegarder();\n\t\t\t}\n\t\t\tFenetreLogin.getInstance().dispose();\n\t\t\tFenetreFond.getInstance().changerFenetre(login.getText());\n\t\t\t/**\n\t\t\t *On remet les champs à nul pour que quand on se déconnecte on est pas le login et le mot de passe de l'utilisateur précédent.\n\t\t\t */\n\t\t\tlogin.setText(\"\");\n\t\t\tpasseword.setText(\"\");\n\t\t}\n\t\n\t}",
"public ParametroPorParametroPK() {\r\n\t}",
"private void agregarFiltrosAdicionales() {\r\n if ((Utilidades.validarNulo(parametroUsuario) == true) && (!parametroUsuario.isEmpty())) {\r\n filtros.put(\"parametroUsuario\", parametroUsuario);\r\n }\r\n if ((Utilidades.validarNulo(parametroNombre) == true) && (!parametroNombre.isEmpty())) {\r\n filtros.put(\"parametroNombre\", parametroNombre);\r\n }\r\n if ((Utilidades.validarNulo(parametroApellido) == true) && (!parametroApellido.isEmpty())) {\r\n filtros.put(\"parametroApellido\", parametroApellido);\r\n }\r\n if ((Utilidades.validarNulo(parametroDocumento) == true) && (!parametroDocumento.isEmpty())) {\r\n filtros.put(\"parametroDocumento\", parametroDocumento);\r\n }\r\n if ((Utilidades.validarNulo(parametroCorreo) == true) && (!parametroCorreo.isEmpty())) {\r\n filtros.put(\"parametroCorreo\", parametroCorreo);\r\n }\r\n if (1 == parametroEstado) {\r\n filtros.put(\"parametroEstado\", \"true\");\r\n } else {\r\n if (parametroEstado == 2) {\r\n filtros.put(\"parametroEstado\", \"false\");\r\n }\r\n }\r\n if (1 == parametroGenero) {\r\n filtros.put(\"parametroGenero\", \"M\");\r\n } else {\r\n if (parametroGenero == 2) {\r\n filtros.put(\"parametroGenero\", \"F\");\r\n }\r\n }\r\n if (!\"TODOS\".equalsIgnoreCase(parametroTipoDocumento)) {\r\n filtros.put(\"parametroTipoDocumento\", parametroTipoDocumento);\r\n }\r\n }",
"protected int checkParam(Object o, String name)\n {\n if (o == null) {\n System.err.println(format(\"Parameter %s is not set\", name));\n return 1;\n }\n return 0;\n }",
"public void verificaNulo(Object parametro, String mensagem) {\n if (parametro == null) {\n throw new NullPointerException(this.msgGeral + mensagem);\n }\n }",
"public void setEstado(biz.belcorp.www.canonico.ffvv.vender.TEstadoPedido param){\n \n this.localEstado=param;\n \n\n }",
"private Map<String,Object> getParams(String nombre , int id){\n\t\t\tMap <String,Object> mapa;\n\t\t\tmapa = new HashMap<String,Object>();\n\t\t\t//Pasar parametros en de JasperReport\n\t\t\tmapa.put(\"alumnoNombre\", nombre);\n\t\t\tmapa.put(\"alumnoId\", id);\n\t\t\t\n\t\t\treturn mapa;\n\t\t\t\n\t\t}",
"private void seePerso() {\n\t\tfor (int i = 0; i < persoList.size(); i++) {\n\t\t\tPersonnage perso = persoList.get(i);\n\t\t\tSystem.out.println(\"id : \" + i);\n\t\t\tSystem.out.println(perso);\n\t\t}\n\n\t\tSystem.out.println(\"souhaitez vous modifier un personnage ? o/n\");\n\t\tif (sc.nextLine().toLowerCase().contentEquals(\"o\")) {\n\t\t\tSystem.out.println(\"Lequel ? id\");\n\t\t\tint id = sc.nextInt();\n\t\t\tsc.nextLine();\n\t\t\tchangePerso(id);\n\t\t}\n\t}",
"public final void nonRedefinissableParEnfant(){\n\n }",
"void pasarALista();",
"public void setParam(String chave, Object valor) {\n //se contem a chave, entao eh removido e adicionado novamente\n if (paramSis.containsKey(chave)) {\n paramSis.remove(chave);\n paramSis.put(chave, valor);\n } else {\n //senao o valor eh adicionado\n paramSis.put(chave, valor);\n }\n }",
"@Override \n\t\tprotected int getNumParam() {\n\t\t\treturn 1;\n\t\t}",
"private void recogerParametros(HttpServletRequest request) {\r\n\t\tif (request.getParameter(\"op\") != null) {\r\n\t\t\top = Integer.parseInt(request.getParameter(\"op\"));\r\n\t\t} else {\r\n\t\t\top = 0;\r\n\t\t}\r\n\t\t\r\n\t\tsearch = (request.getParameter(\"search\") != null) ? request.getParameter(\"search\") : \"\";\r\n\r\n\t\tif (request.getParameter(\"id\") != null) {\r\n\t\t\tid = Integer.parseInt(request.getParameter(\"id\"));\r\n\t\t} else {\r\n\t\t\tid = -1;\r\n\t\t}\r\n\r\n\t\tif (request.getParameter(\"nombre\") != null) {\r\n\t\t\t\r\n\t\t\tnombre = request.getParameter(\"nombre\");\r\n\t\t\tnombre = Utilidades.limpiarEspacios(nombre);\r\n\t\t\tnombre = nombre.substring(0, Math.min(nombre.length(), 44));\r\n\t\t} else {\r\n\t\t\tnombre = \"\";\r\n\t\t}\r\n\r\n\t\tif (request.getParameter(\"precio\") != null) {\r\n\t\t\ttry{\r\n\t\t\t\tprecio = Float.parseFloat(request.getParameter(\"precio\"));\r\n\t\t\t}\r\n\t\t\tcatch( Exception e){\r\n\t\t\t\tprecio=PRECIO_EN_LETRA;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t} else {\r\n\t\t\tprecio = 0;\r\n\t\t}\r\n\t\tif(request.getParameter(\"id_usuario\")!=null) {\r\n\t\t\tusuario=daoUsuario.getById(Integer.parseInt(request.getParameter(\"id_usuario\")));\r\n\t\t}\r\n\t\telse {\r\n\t\t\tusuario=new Usuario();\r\n\t\t}\r\n\t\tif(request.getParameter(\"id_usuario_cambio\")!=null) {\r\n\t\t\tusuario=daoUsuario.getById(Integer.parseInt(request.getParameter(\"id_usuario_cambio\")));\r\n\t\t}\r\n\t\telse {\r\n\t\t\tusuario=new Usuario();\r\n\t\t}\r\n\t}",
"protected void validateParameter(String... param) throws NavigationException {\r\n\t\tif (param.length > 0){\r\n\t\t\tfor(int i = 0; i < param.length; i++){\r\n\t\t\t\tif (param[i] != null && param[i].isEmpty()) {\r\n\t\t\t\t\tthrow new NavigationException(\"parametro no enviado\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void transmetDonnee() {\n\n\t}",
"private void vorgangParameterUebernehmen(\n String autorEmail,\n Vorgang vorgang,\n String typ,\n Long kategorie,\n String positionWGS84,\n String oviWkt,\n String adresse,\n String beschreibung,\n Boolean fotowunsch,\n String bild,\n Boolean verlaufErgaenzen\n ) throws BackendControllerException {\n\n if (verlaufErgaenzen == null) {\n verlaufErgaenzen = false;\n }\n\n if (typ != null) {\n EnumVorgangTyp evt = EnumVorgangTyp.valueOf(typ);\n if (verlaufErgaenzen && !vorgang.getTyp().equals(evt)) {\n verlaufDao.persist(verlaufDao.addVerlaufToVorgang(vorgang, EnumVerlaufTyp.typ,\n vorgang.getTyp().getText(), evt.getText(), autorEmail));\n }\n vorgang.setTyp(evt);\n if (vorgang.getTyp() == null) {\n throw new BackendControllerException(2, \"[typ] nicht korrekt\", \"Der Typ ist nicht korrekt.\");\n }\n }\n\n if (kategorie != null) {\n Kategorie newKat = kategorieDao.findKategorie(kategorie);\n\n if (verlaufErgaenzen && !vorgang.getKategorie().getId().equals(newKat.getId())) {\n verlaufDao.persist(verlaufDao.addVerlaufToVorgang(vorgang, EnumVerlaufTyp.kategorie,\n vorgang.getKategorie().getParent().getName() + \" / \" + vorgang.getKategorie().getName(),\n newKat.getParent().getName() + \" / \" + newKat.getName(), autorEmail));\n }\n vorgang.setKategorie(newKat);\n if (vorgang.getKategorie() == null\n || vorgang.getKategorie().getParent() == null\n || vorgang.getKategorie().getParent().getTyp() != vorgang.getTyp()) {\n throw new BackendControllerException(4, \"[kategorie] nicht korrekt\", \"Die Kategorie ist nicht gültig.\");\n }\n }\n\n if (positionWGS84 != null) {\n try {\n vorgang.setPositionWGS84(positionWGS84);\n } catch (Exception e) {\n throw new BackendControllerException(12, \"[positionWGS84] nicht korrekt\", \"Die Ortsangabe ist nicht korrekt.\", e);\n }\n }\n\n if (oviWkt != null) {\n try {\n vorgang.setOviWkt(oviWkt);\n } catch (Exception e) {\n throw new BackendControllerException(6, \"[oviWkt] nicht korrekt\", \"Die Ortsangabe ist nicht korrekt.\");\n }\n }\n\n if (vorgang.getOviWkt() == null) {\n throw new BackendControllerException(5, \"[position] nicht korrekt\", \"Keine gültige Ortsangabe.\");\n }\n\n if (!vorgang.getOvi().within(grenzenDao.getStadtgrenze().getGrenze())) {\n throw new BackendControllerException(13, \"[position] außerhalb\", \"Die neue Meldung befindet sich außerhalb des gültigen Bereichs.\");\n }\n\n if (adresse != null) {\n vorgang.setAdresse(adresse);\n } else {\n String neueAdresse = \"nicht zuordenbar\";\n if (oviWkt != null) {\n Point point = pointWktToPoint(oviWkt);\n neueAdresse = geoService.calculateAddress(point);\n } else if (positionWGS84 != null) {\n try {\n Point point = transformPosition(pointWktToPoint(positionWGS84), wgs84Projection, internalProjection);\n neueAdresse = geoService.calculateAddress(point);\n } catch (FactoryException | MismatchedDimensionException | TransformException e) {\n logger.error(e);\n }\n }\n vorgang.setAdresse(neueAdresse);\n }\n\n if (beschreibung != null) {\n if (verlaufErgaenzen && (vorgang.getBeschreibung() == null || !vorgang.getBeschreibung().equals(beschreibung))) {\n verlaufDao.persist(verlaufDao.addVerlaufToVorgang(vorgang, EnumVerlaufTyp.beschreibung, vorgang.getBeschreibung(), beschreibung, autorEmail));\n }\n vorgang.setBeschreibung(beschreibung);\n }\n\n if (fotowunsch != null) {\n if (verlaufErgaenzen && !Objects.equals(vorgang.getFotowunsch(), fotowunsch)) {\n verlaufDao.persist(verlaufDao.addVerlaufToVorgang(vorgang, EnumVerlaufTyp.fotowunsch,\n vorgang.getFotowunsch() ? \"aktiv\" : \"inaktiv\", vorgang.getFotowunsch() ? \"inaktiv\" : \"aktiv\", autorEmail));\n }\n vorgang.setFotowunsch(fotowunsch);\n }\n\n if (bild != null && bild.getBytes().length > 0) {\n vorgangDao.persist(vorgang);\n try {\n imageService.setImageForVorgang(Base64.decode(bild.getBytes()), vorgang);\n vorgang.setFotoFreigabeStatus(EnumFreigabeStatus.intern);\n vorgang.setFotowunsch(false);\n } catch (Exception e) {\n throw new BackendControllerException(11, \"[bild] nicht korrekt\", \"Das Bild ist fehlerhaft und kann nicht verarbeitet werden.\", e);\n }\n }\n }",
"public void setParameters(Map<String, String> param) {\n\n // check the occurrence of required parameters\n if(!(param.containsKey(\"Indri:mu\") && param.containsKey(\"Indri:lambda\"))){\n throw new IllegalArgumentException\n (\"Required parameters for IndriExpansion model were missing from the parameter file.\");\n }\n\n this.mu = Double.parseDouble(param.get(\"Indri:mu\"));\n if(this.mu < 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"Indri:mu\") + \", mu is a real number >= 0\");\n\n this.lambda = Double.parseDouble(param.get(\"Indri:lambda\"));\n if(this.lambda < 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"Indri:lambda\") + \", lambda is a real number between 0.0 and 1.0\");\n\n if((param.containsKey(\"fb\") && param.get(\"fb\").equals(\"true\"))) {\n this.fb = \"true\";\n\n this.fbDocs = Integer.parseInt(param.get(\"fbDocs\"));\n if (this.fbDocs <= 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"fbDocs\") + \", fbDocs is an integer > 0\");\n\n this.fbTerms = Integer.parseInt(param.get(\"fbTerms\"));\n if (this.fbTerms <= 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"fbTerms\") + \", fbTerms is an integer > 0\");\n\n this.fbMu = Integer.parseInt(param.get(\"fbMu\"));\n if (this.fbMu < 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"fbMu\") + \", fbMu is an integer >= 0\");\n\n this.fbOrigWeight = Double.parseDouble(param.get(\"fbOrigWeight\"));\n if (this.fbOrigWeight < 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"fbOrigWeight\") + \", fbOrigWeight is a real number between 0.0 and 1.0\");\n\n if (param.containsKey(\"fbInitialRankingFile\") && param.get(\"fbInitialRankingFile\") != \"\") {\n this.fbInitialRankingFile = param.get(\"fbInitialRankingFile\");\n try{\n this.initialRanking = readRanking();\n }\n catch (Exception e){\n e.printStackTrace();\n }\n }\n\n if (param.containsKey(\"fbExpansionQueryFile\") && param.get(\"fbExpansionQueryFile\") != \"\")\n this.fbExpansionQueryFile = param.get(\"fbExpansionQueryFile\");\n }\n }",
"@Override\n protected void eventoUscitaCampo(Campo campo) {\n\n try { // prova ad eseguire il codice\n\n if (campo.getNomeInterno().equals(nomeConto)) {\n this.setCodConto((Integer)campo.getValore());\n this.regolaCamera();\n }// fine del blocco if\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }",
"private void enviarRequisicaoPalpite() {\n if (servidor.verificarPalpitar(nomeJogador)) {\n String palpite = NomeDialogo.nomeDialogo(null, \"Informe o seu palpite\", \"Digite o seu palpite:\", false);\n if (palpite != null && !servidor.palpitar(nomeJogador, Integer.parseInt(palpite))) {\n JanelaAlerta.janelaAlerta(null, \"Este palpite já foi dado!\", null);\n }\n }\n }",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n\n // Adding All values to Params.\n params.put(\"huruf\", huruf);\n params.put(\"derajat_lengan_x\", drajatX);\n params.put(\"derajat lengan_y\", drajatY);\n params.put(\"gambar\", gambar);\n\n return params;\n }",
"@Override\n\tpublic boolean isParam() {\n\t\treturn false;\n\t}",
"public void limpiarListaParametro() throws Exception;",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n // jika id kosong maka simpan, jika id ada nilainya maka update\n params.put(\"nama\", Nama);\n params.put(\"email\", Email);\n params.put(\"keluhan\", Keluhan);\n return params;\n }",
"private void teletransportar(Personaje p, Celda destino) {\n // TODO implement here\n }",
"public void addPedidoDetalle(biz.belcorp.www.canonico.ffvv.vender.TPedidoDetalle param){\n if (localPedidoDetalle == null){\n localPedidoDetalle = new biz.belcorp.www.canonico.ffvv.vender.TPedidoDetalle[]{};\n }\n\n \n\n java.util.List list =\n org.apache.axis2.databinding.utils.ConverterUtil.toList(localPedidoDetalle);\n list.add(param);\n this.localPedidoDetalle =\n (biz.belcorp.www.canonico.ffvv.vender.TPedidoDetalle[])list.toArray(\n new biz.belcorp.www.canonico.ffvv.vender.TPedidoDetalle[list.size()]);\n\n }",
"@Override\n\tprotected void initParams() {\n\t\t\n\t}",
"void setParameters() {\n\t\t\n\t}",
"protected void initParametros ( int numParametros ) {\n if ( numParametros > 0 )\n parametros = new Parametro[ numParametros ];\n }",
"@Override\r\n public void setParameter(String parameters) {\r\n // dummy\r\n }",
"public void setMontoSolicitado(double param){\n \n this.localMontoSolicitado=param;\n \n\n }",
"public void ValidandoPerfil()\r\n\t{\n\t\t\r\n\t}",
"@SuppressWarnings(\"static-access\")\n\tpersonaje(int vida, int ataque, int personajes_creados)\n\t{\n\t\t// estableciendo parametros iguales a las variables\n\t\tthis.vida = vida;\n\t\tthis.ataque = ataque;\n\t\tthis.personajes_creados = personajes_creados;\n\t\t\n\t}",
"public void setParametrosEntrada(NewUsuario parametrosEntrada) {\r\n\t\tthis.parametrosEntrada = parametrosEntrada;\r\n\t}",
"@Override\r\n\tpublic <T> EktParam creatParam(T t) {\n\t\todo = (ODO) t;\r\n\t\todo.setEktSql(null);\r\n\t\tif (EKTIO.getInstance().ektSwitch()) {\r\n\t\t\t\r\n\t\t\tReg reg = ektParam.getReg();\r\n\t\t\tPat pat = ektParam.getPat();\r\n\t\t\t\r\n\t\t\tTParm orderOldParm = ektParam.getOrderOldParm();\r\n\t\t\tTParm orderParm = ektParam.getOrderParm();\r\n\r\n\t\t\tif (odo == null) {\r\n\t\t\t\todoMainControl.messageBox(\"E0115\");\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tektParam.setOpType(\"\");\r\n\t\t\t\r\n\t\t\tTParm unParm = new TParm();\r\n\t\t\tif (orderOldParm == null) {\r\n\t\t\t\todoMainControl.messageBox(\"没有需要操作的医嘱\");\r\n\t\t\t\tektParam.setOpType(\"5\");\r\n\t\t\t\treturn ektParam;\r\n\t\t\t}\r\n\t\t\tif(orderParm.getValue(\"OP_FLG\").length()>0 && orderParm.getInt(\"OP_FLG\")==5){\r\n\t\t\t\todoMainControl.messageBox(\"没有需要操作的医嘱\");\r\n\t\t\t\tektParam.setOpType(\"5\");\r\n\t\t\t\treturn ektParam;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tTParm updateParm=orderParm.getParm(\"updateParm\");\r\n\t\t\t//TODO\r\n\t\t\tboolean unFlg = odoMainControl.updateOrderParm(updateParm, orderOldParm, unParm);\r\n\t\t\tTParm parm = new TParm();\r\n\t\t\t isDelOrder = false;// 执行删除医嘱\r\n\t\t\t//boolean exeDelOrder = false;// 执行删除医嘱\r\n\t\t\tString delFlg=orderParm.getValue(\"DEL_FLG\");\r\n\t\t\t// 如果出现所有医嘱删除也会出现IS_NEW = false 状态 所有需要在执行方法时先查询当前所有医嘱\r\n\t\t\t// 校验是否发送删除检验检查接口\r\n\t\t\tif(delFlg.equals(\"Y\")){\r\n\t\t\t\tisDelOrder = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\torderParm.setData(\"BUSINESS_TYPE\", \"ODO\");\r\n\t\t\tparm.setData(\"CASE_NO\",reg.caseNo());\r\n\t\t\torderParm.setData(\"REGION_CODE\", Operator.getRegion());\r\n\t\t\torderParm.setData(\"MR_NO\", pat.getMrNo());\r\n\t\t\torderParm.setData(\"NAME\", pat.getName());\r\n\t\t\torderParm.setData(\"IDNO\", pat.getIdNo());\r\n\t\t\torderParm.setData(\"SEX\", pat.getSexCode() != null\r\n\t\t\t\t\t&& pat.getSexCode().equals(\"1\") ? \"男\" : \"女\");\r\n\t\t\t// 送医疗卡,返回医疗卡的回传值\r\n\t\t\torderParm.setData(\"INS_FLG\", \"N\");// 医保卡操作\r\n\t\t\torderParm.setData(\"UN_FLG\", unFlg ? \"Y\" : \"N\");// 医生修改的医嘱超过医疗卡金额执行的操作\r\n\t\t\torderParm.setData(\"unParm\", unParm.getData());// 获得执行修改的医嘱\r\n\t\t\tif (null != orderOldParm.getValue(\"OPBEKTFEE_FLG\")\r\n\t\t\t\t\t&& orderOldParm.getValue(\"OPBEKTFEE_FLG\").equals(\"Y\")) {\r\n\t\t\t\torderParm.setData(\"OPBEKTFEE_FLG\", \"Y\");\r\n\t\t\t}\r\n\t\t\t//直接收费操作如果有修改的收费医嘱 不能执行取消操作\r\n\t\t\tif(null == orderOldParm.getValue(\"OPBEKTFEE_FLG\")\r\n\t\t\t\t\t|| orderOldParm.getValue(\"OPBEKTFEE_FLG\").length()<=0){\r\n\t\t\t\tif(unFlg)\r\n\t\t\t\t\torderParm.setData(\"OPBEKTFEE_FLG\", \"Y\");\r\n\t\t\t}\r\n\t\t\tif (odoMainControl.resultData.getCount(\"CASE_NO\")>0) {//====pangben 2014-1-20 建行卡校验\r\n\t\t\t\todoMainControl.messageBox(\"P0001\");\r\n//\t\t\t\tparm.setData(\"OP_TYPE\", 5);\r\n\t\t\t\tektParam.setOpType(\"5\");\r\n\t\t\t\treturn ektParam;\r\n\t\t\t}else{\r\n\t\t\t\todoMainControl.ektReadParm = EKTIO.getInstance().TXreadEKT();\r\n\t\t\t\tif (null == odoMainControl.ektReadParm || odoMainControl.ektReadParm.getErrCode() < 0\r\n\t\t\t\t\t\t|| null == odoMainControl.ektReadParm.getValue(\"MR_NO\")) {\r\n\t\t\t\t\todoMainControl.messageBox(\"医疗卡读卡有误。\");\r\n\t\t\t\t\todoMainControl.setValue(\"LBL_EKT_MESSAGE\", \"未读卡\");//====pangben 2013-5-3添加读卡\r\n\t\t\t\t\todoMainControl.ekt_lable.setForeground(red);//======yanjing 2013-06-14设置读卡颜色\r\n\t\t\t\t\tektParam.setOpType(\"5\");\r\n\t\t\t\t\treturn ektParam;\r\n\t\t\t\t}else{\r\n\t\t\t\t\todoMainControl.setValue(\"LBL_EKT_MESSAGE\", \"已读卡\");//====pangben 2013-5-3添加读卡\r\n\t\t\t\t\todoMainControl.ekt_lable.setForeground(green);//======yanjing 2013-06-14设置读卡颜色\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!odoMainControl.ektReadParm.getValue(\"MR_NO\").equals(odoMainControl.getValue(\"MR_NO\"))) {\r\n\t\t\t\todoMainControl.messageBox(\"病患信息不符,此医疗卡病患名称为:\"\r\n\t\t\t\t\t\t+ odoMainControl.ektReadParm.getValue(\"PAT_NAME\"));\r\n\t\t\t\todoMainControl.ektReadParm = null;\r\n\t\t\t\tektParam.setOpType(\"5\");\r\n\t\t\t\treturn ektParam;\r\n\t\t\t}\r\n\t\t\tint type=0;\r\n\t\t\t//parm.setData(\"BILL_FLG\", \"Y\");\r\n\t\t\torderParm.setData(\"ektParm\", odoMainControl.ektReadParm.getData()); // 医疗卡数据\r\n\t\t\t\r\n\t\t\t\tboolean isNull = true;\r\n\t\t\t\tOpdOrder opdOrder = odo.getOpdOrder();\r\n\t\t\t\tString lastFilter = opdOrder.getFilter();\r\n\t\t\t\topdOrder.setFilter(\"\");\r\n\t\t\t\topdOrder.filter();\r\n\t\t\t\tfor (int i = 0; i < opdOrder.rowCount(); i++) {\r\n\t\t\t\t\tif(opdOrder.getItemString(i, \"ORDER_CODE\").length() > 0){\r\n\t\t\t\t\t\tisNull = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\topdOrder.setFilter(lastFilter);\r\n\t\t\t\topdOrder.filter();\r\n\t\t\t\r\n\t\t\tektParam.setNull(isNull);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t} else {\r\n\t\t\todoMainControl.messageBox_(\"医疗卡接口未开启\");\r\n\t\t\treturn null;\r\n\t\t\t\r\n\r\n\t\t}\r\n\t\r\n\t\t\r\n\t\treturn ektParam;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"public void setPercepcion(double param){\n \n this.localPercepcion=param;\n \n\n }",
"public ReformaTributariaOutput getComporConv(boolean comportamiento, ReformaTributariaInput reformaTributaria)throws Exception {\n Connection conn = null;\n CallableStatement call = null;\n int inComportamiento=0; \n int inTipoConvenio=0;\n int inEmbargo=0;\n int inPyme=0;\n String ContextoAmbienteParam = null;\n ReformaTributariaOutput reformaTributariaOut = new ReformaTributariaOutput();\n try {\n\n conn = this.getConnection();\n String beneficio = this.getBeneficio();\n \n System.out.println(\"Estoy adentro con parametro beneficio---------------------->\"+beneficio);\n \n if (beneficio.equalsIgnoreCase(\"S\")){\n\t if (reformaTributaria.getContextoAmbienteParam().endsWith(\"CNV_INTRA\")){\n\t \t ContextoAmbienteParam=\"CNV_INTRA\";\n\t }else{\n\t \t ContextoAmbienteParam=\"CNV_BENEFICIO_INTER\";\n\t }\n }else{\n \t ContextoAmbienteParam=reformaTributaria.getContextoAmbienteParam(); \n }\n //Deudas que forman parte de la propuesta, pero no son propias del contribuyente\n /*\n --------------------------------------------------------------\n ------- Las variables determinantes --------------------\n ------- para condiciones de convenios --------------------\n --------------------------------------------------------------\n ------- v_tipo_valor\n ------- v_tipo_convenio\n ------- v_comportamiento\n ------- v_embargo\n ------- v_canal\n --------------------------------------------------------------\n -------------------------------------------------------------- \n */\n if (comportamiento){\n \t inComportamiento=1;\n }else{\n \t inComportamiento=2;\n }\n \n //String parametros=reformaTributaria.pagoTotalConvenio()+\";\"+reformaTributaria.comportamiento()+\";\"+reformaTributaria.garantia()+\";\"+reformaTributaria.canal();\n String parametros=reformaTributaria.pagoTotalConvenio()+\";\"+reformaTributaria.comportamiento()+\";\"+reformaTributaria.garantia();\n \n //System.out.println(\"tipo reforma condonacion--->\"+reformaTributaria.getCodConvenios());\n //System.out.println(\"***************************estoy en comportamiento****************************************\");\n //System.out.println(\"reformaTributaria.garantia()--->\"+reformaTributaria.garantia());\n //System.out.println(\"param getComporConv---> \"+parametros);\n //call = conn.prepareCall(\"{call PKG_REFORMA_TRIBUTARIA.consulta_tabla_valores_conv(?,?,?,?,?,?)}\");\n call = conn.prepareCall(\"{call PKG_REFORMA_TRIBUTARIA.consulta_tabla_valores_conv(?,?,?,?,?,?,?,?)}\");\n call.setLong(1,inComportamiento);/*tipo comporamiento � condonaci�n */\n call.setString(2,parametros);/*tipo convenio */\n call.registerOutParameter(3, OracleTypes.INTEGER);/*max_cuotas*/\n call.registerOutParameter(4, OracleTypes.INTEGER);/*min_pie*/\n call.registerOutParameter(5, OracleTypes.INTEGER);/*por_condonacion*/ \n call.registerOutParameter(6, OracleTypes.INTEGER);/*error*/ \n /*se agrega nueva forma de servicio*/\n if (reformaTributaria.getCodConvenios()!=null){//si no es nulo quiere decir que es transitoria\n \t call.setLong(7,reformaTributaria.getCodConvenios().intValue());/*codigo condonacion si es transitoria*/\n }else{//si es null quiere decir que es convenio permanente\n \t call.setNull(7, OracleTypes.INTEGER);\n }\n //call.setString(8,reformaTributaria.getContextoAmbienteParam());/*ambiente Intranet � internet*/ \n System.out.println(\"ContextoAmbienteParam---> \"+ContextoAmbienteParam);\n call.setString(8,ContextoAmbienteParam);/*ambiente Intranet � internet*/\n call.execute();\n \n int maxCuotas = Integer.parseInt(call.getObject(3).toString());\n int minCuotaContado = Integer.parseInt(call.getObject(4).toString());\n \n\n int codError = Integer.parseInt(call.getObject(6).toString());\n \n reformaTributariaOut.setCodError(new Integer(codError));\n reformaTributariaOut.setMaxCuota(new Integer(maxCuotas));\n reformaTributariaOut.setMinCuotaContado(new Integer(minCuotaContado));\n call.close(); \n \n }catch (Exception e) {\n \te.printStackTrace();\n \t//throw new RemoteException(\"No tiene valor de comportamiento convenios:\" + e.getMessage());\n }\n finally{\n this.closeConnection();\n }\n\t\treturn reformaTributariaOut;\n }",
"private void remplirUtiliseData() {\n\t}",
"public void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tif (e.getActionCommand().equals(\"Parametres\")) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tHistorique.ecrire(\"Ouverture de : \"+e);\r\n\t\t\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tnew FEN_Param();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}",
"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 }",
"@Override\n public boolean equals(Object obj) {\n if (obj == null) {\n return false;\n }\n if (getClass() != obj.getClass()) {\n return false;\n }\n final Parametro other = (Parametro) obj;\n if ((this.nombre == null) ? (other.nombre != null) : !this.nombre.equals(other.nombre)) {\n return false;\n }\n if ((this.unidad == null) ? (other.unidad != null) : !this.unidad.equals(other.unidad)) {\n return false;\n }\n return true;\n }",
"private void registroProcesado(InterfazParams interfazParams) {\n\t\tLong registrosProcesados = (Long) interfazParams.getQueryParams().get(\n\t\t\t\t\"registrosProcesados\");\n\t\tregistrosProcesados = new Long(registrosProcesados.longValue() + 1);\n\t\tinterfazParams.getQueryParams().put(\"registrosProcesados\",\n\t\t\t\tregistrosProcesados);\n\t}",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"id\", idb);\n params.put(\"correo\", correob);\n return params;\n }",
"public Integer solo_guardarPaPersona(PaPersona paPersona) throws Exception;",
"private TIPO_REPORTE(String nombre)\r\n/* 55: */ {\r\n/* 56: 58 */ this.nombre = nombre;\r\n/* 57: */ }",
"@Override\n\tpublic void setParametri(Grafica grafica, GameStateDTO gameStateDTO) {\n\t\tgrafica.mostraMessaggio(\"Hai vinto un bonus tessera permesso!\\nScegli una tessera permesso\\n\");\n\n\t\tTesseraPermessoDTO tesseraPermessoDTO = grafica.scegliTesseraPermessoUsataONonUsata(\n\t\t\t\tgameStateDTO.getGiocatoreDTO().getTesserePermesso(),\n\t\t\t\tgameStateDTO.getGiocatoreDTO().getTesserePermessoUsate());\n\t\tbonusTesseraAcquistataNDTO.setTesseraPermesso(tesseraPermessoDTO);\n\t}",
"@Override\n public void paso0() {\n n = graph.getNodeIndices().indexOf(actual);\n nodo = graph.getNodes().get(n);\n nodo.setEstado(Node.State.CURRENT);\n nodo.pintarNodo(g);\n // comprueba si es objetivo\n if (nodo.getEsObjetivo()) {\n // establece el objetivo encontrado\n miObjetivo = nodo.toString();\n // termina con exito\n Step = 4;\n } else {\n // se prepara para explorar los sucesores\n m = nodo.maxSucesores();\n j = 0;\n // siguiente paso\n Step = 1;\n }\n }",
"public abstract void actualiserLettre(char lettre, boolean valide, String message) throws RemoteException;",
"public void validerSaisie();",
"public static void main(String p, String nom, String groupe) {\n\t\tint nbTours = Constantes.NB_TOURS_PERSONNAGE_DEFAUT;\n\t\t\n\t\t// init des arguments\n\t\tint port = Constantes.PORT_DEFAUT;\n\t\tString ipArene = Constantes.IP_DEFAUT;\n\t\t\n\t\t\n\t\t// creation du logger\n\t\tLoggerProjet logger = null;\t\t\n\t\t\n\t\ttry {\n\t\t\tlogger = new LoggerProjet(true, \"personnage_\" + nom + groupe);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(ErreurLancement.suivant);\n\t\t}\n\t\t\n\t\t// lancement du serveur\n\t\ttry {\n\t\t\tString ipConsole = InetAddress.getLocalHost().getHostAddress();\n\t\t\t\n\t\t\tlogger.info(\"Lanceur\", \"Creation du personnage...\");\n\t\t\t\n\t\t\t// caracteristiques du personnage\n\t\t\tHashMap<Caracteristique, Integer> caracts = new HashMap<Caracteristique, Integer>();\n\t\t\t// seule la force n'a pas sa valeur par defaut (exemple)\n\t\t\tif (p==\"Crevard\"){\n\t\t\t\tcaracts.put(Caracteristique.FORCE, 5);\n\t\t\t} /*else \n\t\t\tcaracts.put(Caracteristique.FORCE, \n\t\t\t\t\tCalculs.valeurCaracAleatoire(Caracteristique.FORCE)); */\n\t\t\t\n\t\t\tPoint position = Calculs.positionAleatoireArene();\n\t\t\t\n\t\t\tswitch (p){\n\t\t\tcase \"Pochtron\":\n\t\t\t\tnew Pochtron(ipArene, port, ipConsole, nom, groupe, caracts, nbTours, position, logger);\n\t\t\t\tbreak;\n\t\t\tcase \"Crevard\":\n\t\t\t\tnew Crevard(ipArene, port, ipConsole, nom, groupe, caracts, nbTours, position, logger);\n\t\t\t\tbreak;\n\t\t\tcase \"Intello\":\n\t\t\t\tnew Intello(ipArene, port, ipConsole, nom, groupe, caracts, nbTours, position, logger);\n\t\t\t\tbreak;\n\t\t\tcase \"Kamikaze\":\n\t\t\t\tnew Kamikaze(ipArene, port, ipConsole, nom, groupe, caracts, nbTours, position, logger);\n\t\t\t\tbreak;\n\t\t\tcase \"Fuyard\":\n\t\t\t\tnew Fuyard(ipArene, port, ipConsole, nom, groupe, caracts, nbTours, position, logger);\n\t\t\t\tbreak;\n\t\t\tcase \"Soigneur\":\n\t\t\t\tnew Soigneur(ipArene, port, ipConsole, nom, groupe, caracts, nbTours, position, logger);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tlogger.info(\"Lanceur\", \"Creation du personnage reussie\");\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tlogger.severe(\"Lanceur\", \"Erreur lancement :\\n\" + e.getCause());\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(ErreurLancement.suivant);\n\t\t}\n\t}",
"public boolean set(String parametro, String dato) throws Exception {\n\t\tboolean correcto = false;\n\t\ttry {\n\t\t\tswitch (parametro) {\n\t\t\tcase \"nombre\":\n\t\t\t\tif (entradaValida(parametro, dato)) {\n\t\t\t\t\tsetNombre(dato);\n\t\t\t\t\tcorrecto = true;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Exception(parametro + \" incorrecto!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"apellido\":\n\t\t\t\tif (entradaValida(parametro, dato)) {\n\t\t\t\t\tsetApellido(dato);\n\t\t\t\t\tcorrecto = true;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Exception(parametro + \" incorrecto!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"dni\":\n\t\t\t\tif (entradaValida(parametro, dato) || entradaValida(\"nie\", dato)) {\n\t\t\t\t\tsetDni(dato);\n\t\t\t\t\tcorrecto = true;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Exception(parametro + \" incorrecto!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"edad\":\n\t\t\t\tif (entradaValida(parametro, dato)) {\n\t\t\t\t\tsetEdad(dato);\n\t\t\t\t\tcorrecto = true;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Exception(parametro + \" incorrecto!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"telefono\":\n\t\t\t\tif (entradaValida(parametro, dato)) {\n\t\t\t\t\tsetTelefono(dato);\n\t\t\t\t\tcorrecto = true;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Exception(parametro + \" incorrecto!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"domicilio\":\n\t\t\t\tsetDomicilio(dato);\n\t\t\t\tcorrecto = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(e.getMessage());\n\t\t}\n\t\treturn correcto;\n\t}",
"public void parler() {\n\t System.out.println(this.formulerMonNom()); // appel d'une méthode de l'objet\n\t System.out.println(\"Je suis un animal et j'ai \" + this.nombreDePatte + \" pattes\");\n\t }",
"public void faites(Langage param) {\n if (param.equals(Langage.JAVA)) {\n System.out.println(\"Faites à la façon n°1\");\n } else {\n System.out.println(\"Faites à la façon n°2\");\n }\n }",
"public void setParams(Properties lparams, int indice) throws WSException {\n\t\tTxParams consulta = new TxParams();\r\n\t\t//Crea la lista de parametros de entrada\r\n\t\t// El offset permite a los parametros de salida poseer un indice que comience donde se acaban los parametros de entrada\r\n\t\tint offset = 1;\r\n\t\ttry {\r\n\t\t\tnInparams = (String[])nparamsIn.get(indice);\r\n\t\t\tif (nInparams != null) {\r\n\t\t\t\tinParams = new Properties();\r\n\t\t\t\tfor (int i = 0; i < this.nInparams.length; i++) {\r\n\t\t\t\t\t//Se coloca como llave el indice para asi poder registrar en forma correcta los parametros\r\n\t\t\t\t\tConsSQLparams aux = (ConsSQLparams) lparams.get(nInparams[i]);\r\n\t\t\t\t\tif (aux == null)\r\n\t\t\t\t\t\tthrow new WSException(\"No se encontro el parametro \" + nInparams[i] + \" Revisar los parametros en el XML\");\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tConsParamsX parm = new ConsParamsX(aux.nomparam,aux.typeparam);\r\n\t\t\t\t\t\tinParams.put(new Integer(i + 1), parm);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Solo si hay parametros de entrada se suma el valor del ultimo indice\r\n\t\t\t\toffset = this.nInparams.length + 1;\r\n\t\t\t}\r\n\t\t\tnOutparams = (String[])nparamsOut.get(indice);\r\n\t\t\tif (nOutparams != null) {\r\n\t\t\t\toutParams = new Properties();\r\n\t\t\t\t//Crea la lista de parametros de salida\r\n\t\t\t\tfor (int i = 0; i < nOutparams.length; i++) {\r\n\t\t\t\t\t//Se coloca como llave el indice para asi poder registrar en forma correcta los parametros\r\n\t\t\t\t\t// Ojo que aca se suma el offset\r\n\t\t\t\t\toutParams.put(new Integer(i + offset), lparams.get(nOutparams[i]));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//Coloco los parametros de entrada y salida (sin valores todavia) de esta consulta en su respectiva clase\r\n\t\t\tconsulta.getParams().entrada = inParams;\r\n\t\t\tconsulta.getParams().salida = outParams;\r\n\t\t\t//Agrego la consulta a la lista contenida en esta transaccion\r\n\t\t\ttodo.add(consulta);\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tthrow new WSException(\"Clase: ConsultaTX Error: Error al cargar los objetos de parametros de entrada y de salida Msg: \" + e.getMessage());\r\n\t\t}\r\n\t}",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Parametres)) {\n return false;\n }\n Parametres other = (Parametres) object;\n if ((this.paraId == null && other.paraId != null) || (this.paraId != null && !this.paraId.equals(other.paraId))) {\n return false;\n }\n return true;\n }",
"@Override\n\tprotected void prepare() {\n\t\tfor(ProcessInfoParameter parameter :getParameter()){\n\t\t\tString name = parameter.getParameterName();\n\t\t\tif(parameter.getParameter() == null){\n\t\t\t\t;\n\t\t\t}else if(name.equals(\"XX_TipoRetencion\")){\n\t\t\t\tp_TypeRetention = (String) parameter.getParameter();\n\t\t\t}\n\t\t\telse if(name.equals(\"C_Invoice_From_ID\"))\n\t\t\t\tp_Invoice_From = parameter.getParameterAsInt();\t\n\t\t\telse if(name.equals(\"C_Invoice_To_ID\"))\n\t\t\t\tp_Invoice_To = parameter.getParameterAsInt();\t\n\t\t\telse if(name.equals(\"DateDoc\"))\n\t\t\t\tp_DateDoc = (Timestamp) parameter.getParameter();\t\t\n\t\t}\n\t}",
"public void checkParameters() {\n }",
"public Setparam() {\r\n super();\r\n }",
"public void Ordenamiento() {\n\n\t}",
"@Override\n\tprotected void setParameterValues() {\n\t}",
"public void salvarProdutos(Produto produto){\n }",
"@Override\n\tprotected void prepare() {\n\t\t\n\t\t\n\t\tProcessInfoParameter[] para = getParameter();\n\t\tfor (int i = 0; i < para.length; i++)\n\t\t{\n\t\t\tString name = para[i].getParameterName();\n\t\t\tif (para[i].getParameter() == null);\n\t\t\t\n\t\t\telse if(name.equals(\"AD_Client_ID\"))\n\t\t\t\tp_AD_Client_ID = (int)para[i].getParameterAsInt();\n\t\t\t\n\t\t\telse if(name.equals(\"AD_Org_ID\"))\n\t\t\t\tp_AD_Org_ID = (int)para[i].getParameterAsInt();\n\t\t\t\n\t\t\telse if(name.equals(\"n_param01\"))\n\t\t\t\tparam_01 = (int)para[i].getParameterAsInt();\n\t\t\t\n\t\t\telse if(name.equals(\"n_param02\"))\n\t\t\t\tparam_02 = (int)para[i].getParameterAsInt();\n\t\t\t\n\t\t\telse if(name.equals(\"n_param03\"))\n\t\t\t\tparam_03 = (String)para[i].getParameterAsString();\n\t\t\t\n\t\t\telse if(name.equals(\"n_param04\"))\n\t\t\t\tparam_04 = (String)para[i].getParameterAsString();\n\t\t\t\n\t\t\telse if(name.equals(\"n_param05\"))\n\t\t\t\tparam_05 = (Timestamp)para[i].getParameterAsTimestamp();\n\t\t\t\n\t\t\telse if(name.equals(\"n_param06\"))\n\t\t\t\tparam_06 = (Timestamp)para[i].getParameterAsTimestamp();\n\t\t\t\n\t\t\telse if(name.equals(\"AD_User_ID\"))\n\t\t\t\tp_AD_User_ID = (int)para[i].getParameterAsInt();\n\t\t\t\n\t\t\telse if(name.equals(\"Report\"))\n\t\t\t\tp_Report = (int)para[i].getParameterAsInt();\n\t\t\telse\n\t\t\t\tlog.log(Level.SEVERE, \"Unknown Parameter: \" + name);\n\t\t}\n\t\t\n\t\t\n\t}",
"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 Editor(Par<?, Tipo> valor) {\n _par = valor;\n }",
"@Override\n protected Map<String, String> getParams() {\n int noofstudent = 2*Integer.parseInt(noofconflicts);\n String checkconflicts = \"jbscjas\";//send anything part\n String uid = AppController.getString(WingForm.this,\"Student_id\");\n Map<String, String> params = new LinkedHashMap<String, String>();\n //using LinkedHashmap because backend does not check key value and sees order of variables\n params.put(\"checkconflicts\", checkconflicts);\n params.put(\"noofstudent\", String.valueOf(noofstudent));\n for(int m=0;m<noofstudent;m++){\n params.put(\"sid[\"+m+\"]\",sid[m]);\n }\n\n\n return params;\n }",
"public void updateEditParameter(){\r\n \tMap<String,String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();\r\n\t\tint paramId = Integer.parseInt(params.get(\"parameterId\"));\r\n\t\tthis.getLog().info(\"parameterId:\" + paramId);\r\n\t\t\r\n\t\tif(paramId == 0){\r\n\t\t\teditParameter = new AdditionalParametersDTO();\r\n\t\t}else{\r\n\t\t\tfor (AdditionalParametersDTO p : this.getParameterList()) {\r\n\t\t\t\tif(p.getId() == paramId){\r\n\t\t\t\t\teditParameter = p;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void muestraInfo() {\n\t\tSystem.out.println(\"Adivina un número par: Es un juego en el que el jugador\" +\n\t\t\t\t\" deberá acertar un número PAR comprendido entre el 0 y el 10 mediante un número limitado de intentos(vidas)\");\n\t}",
"private void remplirPrestaraireData() {\n\t}",
"static public void verificaParametros()\r\n \r\n {\r\n SynthesizerModeDesc synthesizerModeDescTemp = (SynthesizerModeDesc)synthesizer.getEngineModeDesc();\r\n System.out.println(\"Nome do engine utilizado: \"+synthesizerModeDescTemp.getEngineName());\r\n System.out.println(\"Nome do modo de funcionamento utilizado: \"+synthesizerModeDescTemp.getModeName());\r\n \tSystem.out.println(\"Nome da localidade utilizada: \"+synthesizerModeDescTemp.getLocale().toString());\r\n \t\t//verifica a flag de controle\r\n if(synthesizerModeDescTemp.getRunning()!=null)\r\n if(synthesizerModeDescTemp.getRunning().booleanValue())\r\n System.out.println(\"Engine rodando.\");\r\n else\r\n System.out.println(\"Engine parado.\");\r\n else\r\n System.out.println(\"A flag de controle não foi setada e tem valor nulo.\");\r\n \t\t//mostra as vozes suportadas\r\n Voice[] VoiceTemp = synthesizerModeDescTemp.getVoices();\r\n for(int i=0;i<VoiceTemp.length;i++)\r\n {\r\n System.out.println(\"Voz numero \"+(i+1)+\" : \"+VoiceTemp[i].getName());\r\n }\r\n }",
"private void limpiarDatos() {\n\t\t\n\t}",
"public void pedirValoresCabecera(){\n \r\n \r\n \r\n \r\n }",
"@Override\n\tpublic void preparar() {\n\t\tSystem.out.println(\"massa, presunto, queijo, calabreza e cebola\");\n\t\t\n\t}"
]
| [
"0.6838597",
"0.6729251",
"0.6411208",
"0.63459677",
"0.6199326",
"0.6137418",
"0.61340153",
"0.6086495",
"0.6071371",
"0.60188663",
"0.60047007",
"0.6001099",
"0.59976655",
"0.5907585",
"0.58802515",
"0.58468926",
"0.58398104",
"0.58358675",
"0.5832343",
"0.58180207",
"0.5809533",
"0.5802878",
"0.5801499",
"0.5792986",
"0.5792519",
"0.57857686",
"0.57714385",
"0.57625717",
"0.5757993",
"0.5732636",
"0.5722839",
"0.57058424",
"0.56870615",
"0.5686677",
"0.5681028",
"0.56742543",
"0.56552356",
"0.5649883",
"0.5644144",
"0.56421125",
"0.5641243",
"0.56409925",
"0.5639782",
"0.56394637",
"0.56387615",
"0.5638526",
"0.5625191",
"0.5624332",
"0.5611181",
"0.5607051",
"0.5592823",
"0.55902207",
"0.55827063",
"0.55796635",
"0.5578717",
"0.55763286",
"0.5573563",
"0.556844",
"0.55680263",
"0.5566327",
"0.55657035",
"0.5563939",
"0.55584234",
"0.5558065",
"0.5555031",
"0.5549816",
"0.5548034",
"0.5545265",
"0.5542223",
"0.5536119",
"0.5531253",
"0.5529553",
"0.5529093",
"0.55233973",
"0.5518284",
"0.5507405",
"0.5504202",
"0.54942256",
"0.5491427",
"0.5481208",
"0.54811424",
"0.5476637",
"0.54742527",
"0.54740167",
"0.5473182",
"0.54716945",
"0.54713243",
"0.54690164",
"0.5468463",
"0.5466801",
"0.546675",
"0.5465699",
"0.546411",
"0.54625666",
"0.5461777",
"0.54609746",
"0.5457871",
"0.5456675",
"0.545466",
"0.5445597",
"0.5444869"
]
| 0.0 | -1 |
Creates a new scanner | public smaliFlexLexer(Reader in, int apiLevel) {
this.apiLevel = apiLevel;
this.zzReader = in;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Scanner createScanner(File file) {\n Scanner scanner;\n try {\n scanner = new Scanner(file);\n\n } catch (FileNotFoundException e) {\n scanner = null;\n }\n return scanner;\n }",
"private ConsoleScanner() {}",
"public Parser(Scanner scanner) {\n this.scanner = scanner;\n scan();\n }",
"public parser(java_cup.runtime.Scanner s) {super(s);}",
"public parser(java_cup.runtime.Scanner s) {super(s);}",
"public parser(java_cup.runtime.Scanner s) {super(s);}",
"public parser(java_cup.runtime.Scanner s) {super(s);}",
"public parser(java_cup.runtime.Scanner s) {super(s);}",
"public parser(java_cup.runtime.Scanner s) {super(s);}",
"public parser(java_cup.runtime.Scanner s) {super(s);}",
"public parser(java_cup.runtime.Scanner s) {super(s);}",
"public Scanner(String source) {\n // The source code read in from stdin is stored here as a char array\n // TODO: if source is empty in Sc.java do something??\n this.source = source.toCharArray();\n this.position = 0;\n this.size = source.length();\n this.comments = false;\n this.depth = 0;\n this.called = false;\n }",
"public Parser(java_cup.runtime.Scanner s) {super(s);}",
"public Parser(java_cup.runtime.Scanner s) {super(s);}",
"public Parser(java_cup.runtime.Scanner s) {super(s);}",
"public Parser(java_cup.runtime.Scanner s) {super(s);}",
"public Parser(java_cup.runtime.Scanner s) {super(s);}",
"public Parser(java_cup.runtime.Scanner s) {super(s);}",
"public CoolParser(java_cup.runtime.Scanner s) {super(s);}",
"private static Scanner createScanner(File inputFile)\n\t{\n\t\t/// create Scanner to read from file and also check if the file exists\n\t Scanner in = null; // closes before the end of readDataFile\n\t try \n\t {\n\t \tin=new Scanner(inputFile);\n\t }\n\t catch(FileNotFoundException e) \n\t {\n\t \tSystem.out.println(\"The file \"+ inputFile.getName() + \" can not be found!\");\n\t \tSystem.exit(0);\n\t }\n\t \n\t return in;\n\t}",
"protected Scanner getTagScanner() {\n \tif(scanner == null)\n \t scanner = new Scanner();\n \treturn scanner;\n }",
"public Scanner(String program) {\n\t\tthis.program=program;\n\t\tpos=0;\n\t\ttoken=null;\n\t\tinitWhitespace(whitespace);\n\t\tinitDigits(digits);\n\t\tinitLetters(letters);\n\t\tinitLegits(legits);\n\t\tinitKeywords(keywords);\n\t\tinitOperators(operators);\n }",
"public parserCapas(java_cup.runtime.Scanner s) {super(s);}",
"public static void init() {\n\t\tscanner = new Scanner(System.in);\n\t\treturn;\n\t}",
"public Scanner(java.io.InputStream in) {\r\n this(new java.io.InputStreamReader(in));\r\n }",
"public parser(Scanner s) {super(s);}",
"private Scanner getScanner(String fixedString) throws IOException {\n\t\tURLConnection connection = new URL(SUPERVALU_URL_START +fixedString).openConnection();\n\t\treturn new Scanner(connection.getInputStream());\n\t}",
"public A4Parser(java_cup.runtime.Scanner s) {super(s);}",
"public A4Parser(java_cup.runtime.Scanner s) {super(s);}",
"public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }",
"public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }",
"public static void setScanner(Scanner s) {\n scanner = s;\n }",
"public MyInput() {\r\n\t\tthis.scanner = new Scanner(System.in);\r\n\t}",
"public static QRScanner newInstance() {\n QRScanner fragment = new QRScanner();\n return fragment;\n }",
"public Scanner(InputStream inStream)\n {\n in = new BufferedReader(new InputStreamReader(inStream));\n eof = false;\n getNextChar();\n }",
"private void prepareScanner() {\r\n\t\tbcLocator = new BCLocator();\r\n\t\tbcGenerator = new BCGenerator();\r\n\t}",
"public PasitoScanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }",
"public CompParser(java_cup.runtime.Scanner s) {super(s);}",
"void scanner() {\r\n\t\tSystem.out.println(\"---------- Scanner\" + ++exampleNumber\r\n\t\t\t\t+ \"----------\");\r\n\r\n\t\tString source = \"asdqw easd casa\";\r\n\t\tScanner s1 = new Scanner(source);\r\n\t\t// hasNext() - testuje wartosc kolejnego tokena, ale go nie pobiera\r\n\t\t// next() - pobiera kolejny token\r\n\t\t// domyslnie bialy znak jest delimiterem\r\n\t\twhile (s1.hasNext()) {\r\n\t\t\tSystem.out.println(s1.next());\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"---------- Scanner\" + ++exampleNumber\r\n\t\t\t\t+ \"----------\");\r\n\r\n\t\t// hasNextXxx() - dla wszystkich primitives oprocz chara\r\n\t\t// nextXxx() - pobiera kolejny prymitywny token\r\n\t\tScanner s2 = new Scanner(\"1 true 34 hi\");\r\n\t\tboolean b;\r\n\t\twhile (b = s2.hasNext()) {\r\n\t\t\tif (s2.hasNextInt()) {\r\n\t\t\t\tint i = s2.nextInt();\r\n\t\t\t\tSystem.out.println(\"integer token: \" + i);\r\n\t\t\t} else if (s2.hasNextBoolean()) {\r\n\t\t\t\tboolean b2 = s2.nextBoolean();\r\n\t\t\t\tSystem.out.println(\"boolean token: \" + b2);\r\n\t\t\t} else {\r\n\t\t\t\tString str = s2.next();\r\n\t\t\t\tSystem.out.println(\"String token: \" + str);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"---------- Scanner\" + ++exampleNumber\r\n\t\t\t\t+ \"----------\");\r\n\r\n\t\t// useDelimiter(delimiter) - ustawienie delimitera (wyrazenia regularnego) wg ktorego bedzie przetwarzany strumien\r\n\t\t// domyslnym delimiterem jest spacja, tabulator, ogolnie bialy znak lub znaki\r\n\t\tScanner s3 = new Scanner(\"Test1 true 34 hi\");\r\n\t\ts3.useDelimiter(\"\\\\d\"); // delimiterem jest cyfra\r\n\t\twhile (s3.hasNext()) {\r\n\t\t\tSystem.out.println(s3.next());\r\n\t\t}\r\n\t}",
"public Scanner getScanner(){\n\t\t\n\t\tString filename = \"\";\n\t\tfor(int i = 0; i<argList.size(); i++ ){\n\t\t\tif(argList.get(i).equals(\"-f\")){\n\t\t\t\tfilename = argList.get(i+1);\n\t\t\t\t//DIFFERENT FROM OTHER INIT FILE!\n\t\t\t\tfilename = filename.trim().replace(\".s230\", \".S230\");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(System.getProperty(\"user.dir\") + \" ... \" + filename);\n\t\tString dirName = System.getProperty(\"user.dir\");\n\t\tdirName = dirName.replace(\"\\\\Program_Files\\\\source\",\"\\\\\").trim();\n\t\tdirName = dirName.replace(\"\\\\Program_Files\\\\classes\",\"\\\\\").trim();\n\t\tdirName = dirName.concat(\"\\\\InputOutputFolder\\\\\");\n\t\tSystem.out.println(dirName+filename);\n\t\tFile file = new File(dirName, filename);\n\t\tScanner toReturn = null;\n\t\ttry {\n\t\t\ttoReturn = new Scanner(file);\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn toReturn;\n\t}",
"public Scanner(String inString)\n {\n in = new BufferedReader(new StringReader(inString));\n eof = false;\n getNextChar();\n }",
"public static void init()throws IOException{if(fileIO){f=new FastScanner(\"\");}else{f=new FastScanner(System.in);}}",
"public Menu() {\n scanner = new Scanner(System.in);\n }",
"public Ui() {\n this.scanner = new Scanner(System.in);\n }",
"public Ui() {\n this.scanner = new Scanner(System.in);\n }",
"public Scanner getScanner(){\n\t\t\n\t\tboolean hasFile = false;\n\t\tString filename = \"\";\n\t\tfor(int i = 0; i<argList.size(); i++ ){\n\t\t\tif(argList.get(i).equals(\"-f\")){\n\t\t\t\thasFile = true;\n\t\t\t\tfilename = argList.get(i+1);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(System.getProperty(\"user.dir\") + \" ... \" + filename);\n\t\tFile file = new File(System.getProperty(\"user.dir\")+\"\\\\ARM230Compiler\\\\InputOutputFolder\\\\\", filename);\n\t\tScanner toReturn = null;\n\t\ttry {\n\t\t\ttoReturn = new Scanner(file);\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn toReturn;\n\t}",
"private Parser makeParser(String input) throws LexicalException {\r\n\t\tshow(input); //Display the input \r\n\t\tScanner scanner = new Scanner(input).scan(); //Create a Scanner and initialize it\r\n\t\tshow(scanner); //Display the Scanner\r\n\t\tParser parser = new Parser(scanner);\r\n\t\treturn parser;\r\n\t}",
"public MetadataScanner()\n {\n this(\"\");\n }",
"public static void setInputScanner(InputScanner scanner){\n inputScanner = scanner;\n }",
"public Scanner(java.io.Reader in) {\n this.zzReader = in;\n }",
"public Scanner(java.io.Reader in) {\n this.zzReader = in;\n }",
"public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}",
"public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}",
"public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}",
"public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}",
"public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}",
"public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}",
"public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}",
"public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}",
"public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}",
"public FractalParser(java_cup.runtime.Scanner s) {super(s);}",
"public Scanner(java.io.Reader in) {\r\n this.zzReader = in;\r\n }",
"public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}",
"public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}",
"public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}",
"public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}",
"public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}",
"public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}",
"public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}",
"private Scanner getInput(String name) {\n try {\n return new Scanner(new File(name));\n } catch (IOException excp) {\n throw error(\"could not open %s\", name);\n }\n }",
"public Scanner( String filename ) throws IOException\n {\n sourceFile = new PushbackInputStream(new FileInputStream(filename));\n \n nextToken = null;\n }",
"public static Scanner getScanner(File file) {\n Scanner scanner = null;\n try {\n scanner = new Scanner(file);\n } catch (IOException e) {\n System.err.println(\"input error\");\n }\n return scanner;\n }",
"public ContentScanner getScanner(\n )\n {return scanner;}",
"CreateScanFilterResponse createScanFilter(CreateScanFilterRequest request);",
"public Sintactico(java_cup.runtime.Scanner s) {super(s);}",
"public PasitoScanner(java.io.Reader in) {\n this.yy_reader = in;\n }",
"public parser(Scanner s, SymbolFactory sf) {super(s,sf);}",
"public void setScan(InputStream inStream){\t\t\n\t\tthis.scan = new Scanner (inStream);\t\t\t\t\t\n\t}",
"public CoolParser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}",
"public LuaGrammarCup(java_cup.runtime.Scanner s) {super(s);}",
"public static synchronized void Initialize() throws FileNotFoundException, UnsupportedEncodingException {\n fileReaderInit(fLocation);\n \n pbr = new PushbackReader(reader, 5);\n \n \n File currentDirFile = new File(\".\");\n String helper = currentDirFile.getAbsolutePath();\n outLocation = \"src/parser_resources/\" + outFile;\n /*scan.nextLine();*/\n \n File f = new File(outLocation);\n\n if (f.exists() && !f.isDirectory()) {\n fWriter = new PrintWriter(outLocation, \"Ascii\");\n System.out.println(\"\\nOutput file initialized for Scanner\");\n System.out.println(\"Scanning output to: \" + helper + \"/\" + outLocation);\n } else {\n System.out.println(\"Error: output file missing please \\\"touch\"\n + \"scanner.out\\\" in parser_resources directory.\");\n }\n }",
"public MJParser(java_cup.runtime.Scanner s) {super(s);}",
"public PCLParser(java_cup.runtime.Scanner s) {super(s);}",
"public Scanner(Configuration config) {\r\n\t\tthis.conf = config;\r\n\t\tfileCacheList = new LinkedList<FileObj>();\r\n\r\n\t}",
"static InputScanner getInputScanner() {\n return inputScanner;\n }",
"private static void scan() {\n\t\tt = la;\n\t\tla = Scanner.next();\n\t\tla.toString();\n\t\tsym = la.kind;\n\t}",
"public static Gate scan( Scanner sc ) {\n\t\tif (outputList.isEmpty()) {\n\t\t\tSimulator.schedule(\n\t\t\t\t1,\n\t\t\t\t(float time) -> displayHeaders( time )\n\t\t\t);\n\t\t}\n\n\t\t// now do the scan as for any other gate\n\t\tOutput g = new Output();\n\t\tg.scan( sc, inputs );\n\t\tif (g.name == null) g = null;\n\n\t\t// and finally, remember this in the output list\n\t\tif (g != null) outputList.add( g );\n\t\treturn g;\n\t}",
"public Ch12Ex1to9()\n {\n scan = new Scanner( System.in );\n }",
"public Asintactico(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}",
"public LexicalScanner() throws IOException {\n this.codesMap = new CodesMap();\n this.keyWords = loadKeywords();\n this.specialCharacters = loadSpecialCharacters();\n this.identifierAutomata = new FA(IDENTIFIER_AUTOMATA_FILE);\n this.constantAutomata = new FA(CONSTANT_AUTOMATA_FILE);\n }",
"public XPathParser(java_cup.runtime.Scanner s) {super(s);}",
"public HumanPlayer(Scanner scanner) {\n this.scanner = scanner;\n }",
"public ContentScanner(\n IContentContext contentContext\n )\n {this(contentContext.getContents());}",
"public TokenScanner(final File f) throws FileNotFoundException {\n\t\tfileScanner = new Scanner(file = f);\n\t}",
"public TerminalGame()\n \t{\n \t\tsuper();\n \t\tbuilder = new StringBuilder();\n \t\tscanner = new Scanner(System.in);\n \t}",
"public void openScanner(){\n Intent intent = new Intent(ReturningTaskActivity.this, BarcodeScannerActivity.class);\n startActivityForResult(intent, 0);\n }",
"public InputReader() {\n reader = new Scanner(System.in);\n }",
"void makeDeck(Scanner scanner) \n\t\t\tthrows IOException {\n\t\tCardNode cn = null;\n\t\tif (scanner.hasNextInt()) {\n\t\t\tcn = new CardNode();\n\t\t\tcn.cardValue = scanner.nextInt();\n\t\t\tcn.next = cn;\n\t\t\tdeckRear = cn;\n\t\t}\n\t\twhile (scanner.hasNextInt()) {\n\t\t\tcn = new CardNode();\n\t\t\tcn.cardValue = scanner.nextInt();\n\t\t\tcn.next = deckRear.next;\n\t\t\tdeckRear.next = cn;\n\t\t\tdeckRear = cn;\n\t\t}\n\t}",
"public WrongInputDataInScanner() {\n\tsuper();\n\t\n}",
"public java_cup.runtime.Symbol scan()\n throws java.lang.Exception\n {\n return new Symbol (sym.EOF); \n }",
"public java_cup.runtime.Symbol scan()\n throws java.lang.Exception\n {\n return getScanner().next_token(); \n }"
]
| [
"0.70184577",
"0.6995181",
"0.6993494",
"0.66455257",
"0.66455257",
"0.66455257",
"0.66455257",
"0.66455257",
"0.66455257",
"0.66455257",
"0.66455257",
"0.6599448",
"0.6569486",
"0.6569486",
"0.6569486",
"0.6569486",
"0.6569486",
"0.6569486",
"0.6510001",
"0.6377581",
"0.6369186",
"0.6338234",
"0.6288102",
"0.62420654",
"0.6238479",
"0.62367743",
"0.6234265",
"0.6223293",
"0.6223293",
"0.6179389",
"0.6179389",
"0.6151572",
"0.6143058",
"0.61248904",
"0.6123854",
"0.61232376",
"0.60844225",
"0.6062503",
"0.6048141",
"0.60417837",
"0.6027999",
"0.6019498",
"0.59948283",
"0.5971439",
"0.5971439",
"0.5959572",
"0.59595394",
"0.595831",
"0.5948784",
"0.59298563",
"0.59298563",
"0.5923914",
"0.5923914",
"0.5923914",
"0.5923914",
"0.5923914",
"0.5923914",
"0.5923914",
"0.5923914",
"0.5923914",
"0.5922065",
"0.59072775",
"0.5901725",
"0.5901725",
"0.5901725",
"0.5901725",
"0.5901725",
"0.5901725",
"0.5901725",
"0.5893243",
"0.5875552",
"0.586246",
"0.5862297",
"0.58445174",
"0.58377695",
"0.5829068",
"0.58266336",
"0.5806441",
"0.5771194",
"0.5767364",
"0.5751365",
"0.573949",
"0.5731958",
"0.5713767",
"0.57056075",
"0.57006305",
"0.5695496",
"0.5679925",
"0.567098",
"0.5666009",
"0.5636769",
"0.563668",
"0.56134176",
"0.5611127",
"0.56032014",
"0.5564176",
"0.5563071",
"0.55623186",
"0.55513155",
"0.5540127",
"0.55275434"
]
| 0.0 | -1 |
Unpacks the compressed character translation table. | private static char [] zzUnpackCMap(String packed) {
char [] map = new char[0x110000];
int i = 0; /* index in packed string */
int j = 0; /* index in unpacked array */
while (i < 258) {
int count = packed.charAt(i++);
char value = packed.charAt(i++);
do map[j++] = value; while (--count > 0);
}
return map;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static int yy_unpack(String packed, int offset, int [] trans) {\n int i = 0; /* index in packed string */\n int j = offset; /* index in unpacked array */\n int l = packed.length();\n while (i < l) {\n int count = packed.charAt(i++);\n int value = packed.charAt(i++);\n value--;\n do trans[j++] = value; while (--count > 0);\n }\n return j;\n }",
"private static int yy_unpack(String packed, int offset, int [] trans) {\n int i = 0; /* index in packed string */\n int j = offset; /* index in unpacked array */\n int l = packed.length();\n while (i < l) {\n int count = packed.charAt(i++);\n int value = packed.charAt(i++);\n value--;\n do trans[j++] = value; while (--count > 0);\n }\n return j;\n }",
"private static char [] zzUnpackCMap(String packed) {\r\n char [] map = new char[0x10000];\r\n int i = 0; /* index in packed string */\r\n int j = 0; /* index in unpacked array */\r\n while (i < 2224) {\r\n int count = packed.charAt(i++);\r\n char value = packed.charAt(i++);\r\n do map[j++] = value; while (--count > 0);\r\n }\r\n return map;\r\n }",
"private static char [] zzUnpackCMap(String packed) {\r\n char [] map = new char[0x110000];\r\n int i = 0; /* index in packed string */\r\n int j = 0; /* index in unpacked array */\r\n while (i < 172) {\r\n int count = packed.charAt(i++);\r\n char value = packed.charAt(i++);\r\n do map[j++] = value; while (--count > 0);\r\n }\r\n return map;\r\n }",
"private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x10000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 128) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x10000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 182) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\r\n char [] map = new char[0x10000];\r\n int i = 0; /* index in packed string */\r\n int j = 0; /* index in unpacked array */\r\n while (i < 166) {\r\n int count = packed.charAt(i++);\r\n char value = packed.charAt(i++);\r\n do map[j++] = value; while (--count > 0);\r\n }\r\n return map;\r\n }",
"private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 1182) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 228) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 228) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char[] zzUnpackCMap(String packed) {\n char[] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 2808) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 178) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 2928) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\r\n char [] map = new char[0x10000];\r\n int i = 0; /* index in packed string */\r\n int j = 0; /* index in unpacked array */\r\n while (i < 152) {\r\n int count = packed.charAt(i++);\r\n char value = packed.charAt(i++);\r\n do map[j++] = value; while (--count > 0);\r\n }\r\n return map;\r\n }",
"private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x10000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 2266) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 210) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x10000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 2106) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 2820) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 2244) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x10000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 1348) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 2894) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 164) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 166) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x10000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 86) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 366) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\n int size = 0;\n for (int i = 0, length = packed.length(); i < length; i += 2) {\n size += packed.charAt(i);\n }\n char[] map = new char[size];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < packed.length()) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\n int size = 0;\n for (int i = 0, length = packed.length(); i < length; i += 2) {\n size += packed.charAt(i);\n }\n char[] map = new char[size];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < packed.length()) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\n int size = 0;\n for (int i = 0, length = packed.length(); i < length; i += 2) {\n size += packed.charAt(i);\n }\n char[] map = new char[size];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < packed.length()) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\n int size = 0;\n for (int i = 0, length = packed.length(); i < length; i += 2) {\n size += packed.charAt(i);\n }\n char[] map = new char[size];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < packed.length()) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\n int size = 0;\n for (int i = 0, length = packed.length(); i < length; i += 2) {\n size += packed.charAt(i);\n }\n char[] map = new char[size];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < packed.length()) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\n int size = 0;\n for (int i = 0, length = packed.length(); i < length; i += 2) {\n size += packed.charAt(i);\n }\n char[] map = new char[size];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < packed.length()) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\n int size = 0;\n for (int i = 0, length = packed.length(); i < length; i += 2) {\n size += packed.charAt(i);\n }\n char[] map = new char[size];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < packed.length()) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\n int size = 0;\n for (int i = 0, length = packed.length(); i < length; i += 2) {\n size += packed.charAt(i);\n }\n char[] map = new char[size];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < packed.length()) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\n int size = 0;\n for (int i = 0, length = packed.length(); i < length; i += 2) {\n size += packed.charAt(i);\n }\n char[] map = new char[size];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < packed.length()) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x10000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 174) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 174) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 2480) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x10000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 1690) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static int [] yy_unpack() {\n int [] trans = new int[8174];\n int offset = 0;\n offset = yy_unpack(yy_packed0, offset, trans);\n return trans;\n }",
"private static char [] zzUnpackCMap(String packed) {\n\t\tchar [] map = new char[0x10000];\n\t\tint i = 0; /* index in packed string */\n\t\tint j = 0; /* index in unpacked array */\n\t\twhile (i < 2312) {\n\t\t\tint count = packed.charAt(i++);\n\t\t\tchar value = packed.charAt(i++);\n\t\t\tdo map[j++] = value; while (--count > 0);\n\t\t}\n\t\treturn map;\n\t}",
"private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x10000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 1774) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private static int [] yy_unpack() {\n int [] trans = new int[5476];\n int offset = 0;\n offset = yy_unpack(yy_packed0, offset, trans);\n return trans;\n }",
"private static char [] yy_unpack_cmap(String packed) {\n char [] map = new char[0x10000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 1742) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }",
"private void unpack() {\n if (!isInPackedState)\n return;\n try {\n ByteArrayInputStream bs = new ByteArrayInputStream(data);\n DataInputStream dis = new DataInputStream(bs);\n line_number_table_length = (dis.readUnsignedShort());\n line_number_table = new LineNumber[line_number_table_length];\n for (int i = 0; i < line_number_table_length; i++) line_number_table[i] = new LineNumber(dis);\n dis.close();\n // throw it away now\n data = null;\n } catch (IOException e) {\n throw new RuntimeException(\"Unpacking of LineNumberTable attribute failed\");\n }\n isInPackedState = false;\n }",
"public String decompress() {\r\n \tString decompressed = \"\";\r\n \tString cursor = \"\";\r\n \tfor (int i = 0; i < compressedText.length(); i++) {\r\n \t\tcursor += compressedText.charAt(i);\r\n \t\tif (codeToChar.containsKey(cursor)) {\r\n \t\t\tdecompressed += codeToChar.get(cursor);\r\n \t\t\tcursor = \"\";\r\n \t\t}\r\n \t}\r\n return decompressed;\r\n }",
"private void initTables()\n {\n if ( vc == null )\n {\n // statics are not initialised yet\n vc = new char[ 64 ];\n cv = new int[ 256 ];\n // build translate valueToChar table only once.\n // 0..25 -> 'A'..'Z'\n for ( int i = 0; i <= 25; i++ )\n {\n vc[ i ] = ( char ) ( 'A' + i );\n }\n // 26..51 -> 'a'..'z'\n for ( int i = 0; i <= 25; i++ )\n {\n vc[ i + 26 ] = ( char ) ( 'a' + i );\n }\n // 52..61 -> '0'..'9'\n for ( int i = 0; i <= 9; i++ )\n {\n vc[ i + 52 ] = ( char ) ( '0' + i );\n }\n vc[ 62 ] = spec1;\n vc[ 63 ] = spec2;\n // build translate charToValue table only once.\n for ( int i = 0; i < 256; i++ )\n {\n cv[ i ] = IGNORE;// default is to ignore\n }\n for ( int i = 0; i < 64; i++ )\n {\n cv[ vc[ i ] ] = i;\n }\n cv[ spec3 ] = PAD;\n }\n valueToChar = vc;\n charToValue = cv;\n }",
"public static int decompose(char[] paramArrayOfChar1, int paramInt1, int paramInt2, char[] paramArrayOfChar2, int paramInt3, int paramInt4, boolean paramBoolean, int[] paramArrayOfInt, UnicodeSet paramUnicodeSet)\n/* */ {\n/* 932 */ char[] arrayOfChar1 = new char[3];\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 941 */ int i7 = paramInt3;\n/* 942 */ int i8 = paramInt1;\n/* 943 */ int i2; int k; if (!paramBoolean) {\n/* 944 */ i2 = (char)indexes[8];\n/* 945 */ k = 4;\n/* */ } else {\n/* 947 */ i2 = (char)indexes[9];\n/* 948 */ k = 8;\n/* */ }\n/* */ \n/* */ \n/* 952 */ int j = 0xFF00 | k;\n/* 953 */ int m = 0;\n/* 954 */ int i4 = 0;\n/* 955 */ long l = 0L;\n/* 956 */ int i1 = 0;\n/* 957 */ int i6 = 0;\n/* */ int i5;\n/* 959 */ int i3 = i5 = -1;\n/* */ \n/* */ \n/* */ \n/* */ for (;;)\n/* */ {\n/* 965 */ int i = i8;\n/* */ \n/* 967 */ while ((i8 != paramInt2) && (((i1 = paramArrayOfChar1[i8]) < i2) || \n/* 968 */ (((l = getNorm32(i1)) & j) == 0L))) {\n/* 969 */ i4 = 0;\n/* 970 */ i8++;\n/* */ }\n/* */ \n/* */ int n;\n/* 974 */ if (i8 != i) {\n/* 975 */ n = i8 - i;\n/* 976 */ if (i7 + n <= paramInt4) {\n/* 977 */ System.arraycopy(paramArrayOfChar1, i, paramArrayOfChar2, i7, n);\n/* */ }\n/* */ \n/* 980 */ i7 += n;\n/* 981 */ m = i7;\n/* */ }\n/* */ \n/* */ \n/* 985 */ if (i8 == paramInt2) {\n/* */ break;\n/* */ }\n/* */ \n/* */ \n/* 990 */ i8++;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ char c2;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ char[] arrayOfChar2;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ char c1;\n/* */ \n/* */ \n/* */ \n/* 1009 */ if (isNorm32HangulOrJamo(l)) {\n/* 1010 */ if (nx_contains(paramUnicodeSet, i1)) {\n/* 1011 */ c2 = '\\000';\n/* 1012 */ arrayOfChar2 = null;\n/* 1013 */ n = 1;\n/* */ }\n/* */ else {\n/* 1016 */ arrayOfChar2 = arrayOfChar1;\n/* 1017 */ i6 = 0;\n/* 1018 */ i3 = i5 = 0;\n/* */ \n/* 1020 */ c1 = (char)(i1 - 44032);\n/* */ \n/* 1022 */ c2 = (char)(c1 % '\\034');\n/* 1023 */ c1 = (char)(c1 / '\\034');\n/* 1024 */ if (c2 > 0) {\n/* 1025 */ arrayOfChar1[2] = ((char)('ᆧ' + c2));\n/* 1026 */ n = 3;\n/* */ } else {\n/* 1028 */ n = 2;\n/* */ }\n/* */ \n/* 1031 */ arrayOfChar1[1] = ((char)(4449 + c1 % '\\025'));\n/* 1032 */ arrayOfChar1[0] = ((char)(4352 + c1 / '\\025'));\n/* */ }\n/* */ } else {\n/* 1035 */ if (isNorm32Regular(l)) {\n/* 1036 */ c2 = '\\000';\n/* 1037 */ n = 1;\n/* */ \n/* */ }\n/* 1040 */ else if ((i8 != paramInt2) && \n/* 1041 */ (UTF16.isTrailSurrogate(c2 = paramArrayOfChar1[i8]))) {\n/* 1042 */ i8++;\n/* 1043 */ n = 2;\n/* 1044 */ l = getNorm32FromSurrogatePair(l, c2);\n/* */ } else {\n/* 1046 */ c2 = '\\000';\n/* 1047 */ n = 1;\n/* 1048 */ l = 0L;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 1053 */ if (nx_contains(paramUnicodeSet, c1, c2))\n/* */ {\n/* 1055 */ i3 = i5 = 0;\n/* 1056 */ arrayOfChar2 = null;\n/* 1057 */ } else if ((l & k) == 0L)\n/* */ {\n/* 1059 */ i3 = i5 = (int)(0xFF & l >> 8);\n/* 1060 */ arrayOfChar2 = null;\n/* 1061 */ i6 = -1;\n/* */ } else {\n/* 1063 */ DecomposeArgs localDecomposeArgs = new DecomposeArgs(null);\n/* */ \n/* */ \n/* */ \n/* 1067 */ i6 = decompose(l, k, localDecomposeArgs);\n/* 1068 */ arrayOfChar2 = extraData;\n/* 1069 */ n = localDecomposeArgs.length;\n/* 1070 */ i3 = localDecomposeArgs.cc;\n/* 1071 */ i5 = localDecomposeArgs.trailCC;\n/* 1072 */ if (n == 1)\n/* */ {\n/* 1074 */ c1 = arrayOfChar2[i6];\n/* 1075 */ c2 = '\\000';\n/* 1076 */ arrayOfChar2 = null;\n/* 1077 */ i6 = -1;\n/* */ }\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 1085 */ if (i7 + n <= paramInt4) {\n/* 1086 */ int i9 = i7;\n/* 1087 */ if (arrayOfChar2 == null)\n/* */ {\n/* 1089 */ if ((i3 != 0) && (i3 < i4))\n/* */ {\n/* */ \n/* */ \n/* 1093 */ i7 += n;\n/* 1094 */ i5 = insertOrdered(paramArrayOfChar2, m, i9, i7, c1, c2, i3);\n/* */ }\n/* */ else\n/* */ {\n/* 1098 */ paramArrayOfChar2[(i7++)] = c1;\n/* 1099 */ if (c2 != 0) {\n/* 1100 */ paramArrayOfChar2[(i7++)] = c2;\n/* */ }\n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ }\n/* 1107 */ else if ((i3 != 0) && (i3 < i4))\n/* */ {\n/* */ \n/* */ \n/* 1111 */ i7 += n;\n/* 1112 */ i5 = mergeOrdered(paramArrayOfChar2, m, i9, arrayOfChar2, i6, i6 + n);\n/* */ }\n/* */ else\n/* */ {\n/* */ do {\n/* 1117 */ paramArrayOfChar2[(i7++)] = arrayOfChar2[(i6++)];\n/* 1118 */ n--; } while (n > 0);\n/* */ }\n/* */ \n/* */ }\n/* */ else\n/* */ {\n/* 1124 */ i7 += n;\n/* */ }\n/* */ \n/* 1127 */ i4 = i5;\n/* 1128 */ if (i4 == 0) {\n/* 1129 */ m = i7;\n/* */ }\n/* */ }\n/* */ \n/* 1133 */ paramArrayOfInt[0] = i4;\n/* */ \n/* 1135 */ return i7 - paramInt3;\n/* */ }",
"public static void decompress(PfssCompressed _src, PfssDecompressed _dest)\n\t{\n\t\tif (!_src.isLoaded())\n\t\t\treturn;\n\n\t\tif (_dest.isDataAssigned())\n\t\t\treturn;\n\t\t\n\t\ttry (InputStream is = new ByteArrayInputStream(UnRar.unrarData(_src).toByteArray()))\n\t\t{\n\t\t\tFits fits = new Fits(is, false);\n\t\t\tBasicHDU hdus[] = fits.read();\n\t\t\tBinaryTableHDU bhdu = (BinaryTableHDU) hdus[1];\n\n\t\t\tfloat b0 = bhdu.getHeader().getFloatValue(\"B0\");\n\t\t\tfloat l0 = bhdu.getHeader().getFloatValue(\"L0\");\n\t\t\tfloat Q1 = bhdu.getHeader().getFloatValue(\"Q1\");\n\t\t\tfloat Q2 = bhdu.getHeader().getFloatValue(\"Q2\");\n\t\t\tfloat Q3 = bhdu.getHeader().getFloatValue(\"Q3\");\n\n\t\t\tbyte[] line_length = ((byte[][]) bhdu.getColumn(\"LEN\"))[0];\n\t\t\tbyte[] xRaw = ((byte[][]) bhdu.getColumn(\"X\"))[0];\n\t\t\tbyte[] yRaw = ((byte[][]) bhdu.getColumn(\"Y\"))[0];\n\t\t\tbyte[] zRaw = ((byte[][]) bhdu.getColumn(\"Z\"))[0];\n\n\t\t\tint[] lengths = ByteDecoder.decodeAdaptiveUnsigned(line_length);\n\t\t\tint[] xInt = ByteDecoder.decodeAdaptive(xRaw);\n\t\t\tint[] yInt = ByteDecoder.decodeAdaptive(yRaw);\n\t\t\tint[] zInt = ByteDecoder.decodeAdaptive(zRaw);\n\n\t\t\tIntermediateLineData[] lines = IntermediateLineData.splitToLines(lengths, xInt, yInt, zInt);\n\t\t\tfor (IntermediateLineData l : lines)\n\t\t\t\tl.decodePrediction(Q1, Q2, Q3);\n\n\t\t\tArrayList<DecompressedLine> decompressedLines = new ArrayList<>(lines.length);\n\t\t\tfor (IntermediateLineData line : lines)\n\t\t\t\tdecompressedLines.add(new DecompressedLine(line));\n\n\t\t\tconvertToBuffers(decompressedLines, l0, b0, _dest);\n\t\t}\n\t\tcatch (FitsException | IOException e)\n\t\t{\n\t\t\tTelemetry.trackException(e);\n\t\t}\n\t}",
"public static void decode () {\n // read the input\n int firstThing = BinaryStdIn.readInt();\n s = BinaryStdIn.readString();\n char[] t = s.toCharArray();\n char[] firstColumn = new char[t.length];\n int [] next = new int[t.length];\n \n // copy array and sort\n for (int i = 0; i < t.length; i++) {\n firstColumn[i] = t[i];\n }\n Arrays.sort(firstColumn);\n \n // decode\n int N = t.length;\n int [] count = new int[256];\n \n // counts frequency of each letter\n for (int i = 0; i < N; i++) {\n count[t[i]]++;\n }\n \n int m = 0, j = 0;\n \n // fills the next[] array with appropriate values\n while (m < N) {\n int _count = count[firstColumn[m]];\n while (_count > 0) {\n if (t[j] == firstColumn[m]) {\n next[m++] = j;\n _count--;\n }\n j++;\n }\n j = 0;\n }\n \n // decode the String\n int _next = next.length;\n int _i = firstThing;\n for (int i = 0; i < _next; i++) {\n _i = next[_i];\n System.out.print(t[_i]);\n } \n System.out.println();\n }",
"private void ReadDecompression(String aux) {\n StringBuilder calidadS = new StringBuilder();\n while (i < 8) {\n calidadS.append(aux.charAt(i));\n ++i;\n }\n quality = Integer.parseInt(calidadS.toString(), 2);\n StringBuilder widthS = new StringBuilder();\n while (i < 24) {\n widthS.append(aux.charAt(i));\n ++i;\n }\n width = Integer.parseInt(widthS.toString(), 2);\n StringBuilder heightS = new StringBuilder();\n while (i < 40) {\n heightS.append(aux.charAt(i));\n ++i;\n }\n height = Integer.parseInt(heightS.toString(), 2);\n StringBuilder sizeYS = new StringBuilder();\n while (i < 72) {\n sizeYS.append(aux.charAt(i));\n ++i;\n }\n sizeY = Integer.parseInt(sizeYS.toString(), 2);\n StringBuilder sizeCBS = new StringBuilder();\n while (i < 104) {\n sizeCBS.append(aux.charAt(i));\n ++i;\n }\n sizeCB = Integer.parseInt(sizeCBS.toString(), 2);\n StringBuilder sizeCRS = new StringBuilder();\n while (i < 136) {\n sizeCRS.append(aux.charAt(i));\n ++i;\n }\n sizeCR = Integer.parseInt(sizeCRS.toString(), 2);\n StringBuilder sizeYcS = new StringBuilder();\n while (i < 168) {\n sizeYcS.append(aux.charAt(i));\n ++i;\n }\n sizeYc = Integer.parseInt(sizeYcS.toString(), 2);\n StringBuilder sizeCBcS = new StringBuilder();\n while (i < 200) {\n sizeCBcS.append(aux.charAt(i));\n ++i;\n }\n sizeCBc = Integer.parseInt(sizeCBcS.toString(), 2);\n StringBuilder sizeCRcS = new StringBuilder();\n while (i < 232) {\n sizeCRcS.append(aux.charAt(i));\n ++i;\n }\n sizeCRc = Integer.parseInt(sizeCRcS.toString(), 2);\n }",
"public void translate() {\n\t\twhile (!inputBuffer.endOfBuffer()) {\n\t\t\tMsgChar get = inputBuffer.getChar();\n\t\t\tif (get == null) continue;\n\t\t\tif (inputBuffer.isEndOfSentence()) {\n\t\t\t\toutputBuffer.markEndOfSentence();\n\t\t\t} else if (inputBuffer.isEndOfWord()) {\n\t\t\t\toutputBuffer.markEndOfWord();\n\t\t\t} else {\n\t\t\t\toutputBuffer.putChar(get.convert());\n\t\t\t}\n\t\t}\n\t\tinputBuffer.getReader().close();\n\t\toutputBuffer.close();\n\t}",
"private void CreateDecompression() {\n int iteradorY = 0;\n int iteradorarray = 0;\n int fila = 0;\n int columna = 0;\n while (iteradorY < width / 8 * height / 8) {\n int u = 1;\n int k = 1;\n double[][] Y = new double[8][8];\n double[][] CB = new double[8][8];\n double[][] CR = new double[8][8];\n for (int element = 0; element < 64; ++element) {\n Y[u - 1][k - 1] = (double) Ydes.get(iteradorarray);\n CB[u - 1][k - 1] = (double) CBdes.get(iteradorarray);\n CR[u - 1][k - 1] = (double) CRdes.get(iteradorarray);\n if ((k + u) % 2 != 0) {\n if (k < 8)\n k++;\n else\n u += 2;\n if (u > 1)\n u--;\n } else {\n if (u < 8)\n u++;\n else\n k += 2;\n if (k > 1)\n k--;\n }\n iteradorarray++;\n }\n ++iteradorY;\n //DESQUANTIZAMOS\n for (int m = 0; m < 8; ++m) {\n for (int n = 0; n < 8; ++n) {\n Y[m][n] = Y[m][n] * QtablesLuminance[quality][m][n];\n CB[m][n] = CB[m][n] * QtablesChrominance[quality][m][n];\n CR[m][n] = CR[m][n] * QtablesChrominance[quality][m][n];\n }\n }\n //INVERSA DE LA DCT2\n double[][] Ydct = dct3(Y);\n double[][] CBdct = dct3(CB);\n double[][] CRdct = dct3(CR);\n\n //SUMAR 128\n for (int m = 0; m < 8; ++m) {\n for (int n = 0; n < 8; ++n) {\n Ydct[m][n] = Ydct[m][n] + 128;\n CBdct[m][n] = CBdct[m][n] + 128;\n CRdct[m][n] = CRdct[m][n] + 128;\n int[] YCbCr = {(int) Ydct[m][n], (int) CBdct[m][n], (int) CRdct[m][n]};\n int[] RGB = YCbCrtoRGB(YCbCr);\n if (fila + m < height & columna + n < width) {\n FinalR[fila + m][columna + n] = RGB[0];\n FinalG[fila + m][columna + n] = RGB[1];\n FinalB[fila + m][columna + n] = RGB[2];\n }\n }\n }\n if (columna + 8 < width) columna = columna + 8;\n else {\n fila = fila + 8;\n columna = 0;\n }\n }\n }",
"public int uncompress(InputStream in, OutputStream out) throws IOException { \n int codeCount = 0;\n int code = 0;\n BitInputStream bitIn = new BitInputStream(in);\n StringBuilder codeString = new StringBuilder(0);\n\n\n // *** Bellow for building array of encoded values ****\n // ****************************************************\n // If the first character in the file is not a space, cannot decompress file\n codeCount = in.read();\n if(codeCount != 32){\n bitIn.close();\n return -1;\n }\n // Read in length of the code, then read the codes number of bits into the code array\n for (int i = 0; i < decodeArr.length; i++) {\n //read in number of bits (length of character code) \n codeCount = bitIn.read();\n \n // Create the code string (reads the number of bits found above)\n for (int j = 0; j < codeCount ; j++) {\n codeString.append(bitIn.readBits(1));\n }\n // Add the code string to the code array\n decodeArr[i] = codeString.toString();\n codeString = new StringBuilder(0);\n }\n // If the character has no code, make it null in array\n for (int i = 0; i < decodeArr.length; i++) {\n if(decodeArr[i].equals(\"0\")){decodeArr[i] = null;}\n }\n // ****************************************************\n // ****************************************************\n\n\n // ********** Bellow is the decoding process **********\n // ****************************************************\n // Slowly build a sting of binary comparing it to the codes in the map\n // Once a match is found, output the character associated with it.\n try{\n codeString = new StringBuilder(0);\n while (true) { \n // Read in one bit\n code = bitIn.readBits(1);\n // If -1 is returned, reached the end of file\n if(code == -1){break;}\n // Search the code array, writing the character of the code when found\n codeString.append(String.valueOf(code));\n for (int i = 0; i < decodeArr.length; i++) {\n if(decodeArr[i] != null){ // null means 0 count for a character\n // If the building code string matches a code in the map, write the associated character\n if(decodeArr[i].equals(codeString.toString())){\n out.write(i);\n // vv make ready for next code input\n codeString = new StringBuilder(0);\n }\n }\n }\n }\n }catch (IOException e){\n bitIn.close();\n throw e;\n }\n // ****************************************************\n // ****************************************************\n bitIn.close();\n return 0;\n }",
"protected void buildFastLatinTable(android.icu.impl.coll.CollationData r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00ef in method: android.icu.impl.coll.CollationDataBuilder.buildFastLatinTable(android.icu.impl.coll.CollationData):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.icu.impl.coll.CollationDataBuilder.buildFastLatinTable(android.icu.impl.coll.CollationData):void\");\n }",
"public static void decompress(String inFile) throws Exception{\n\tIO.Decompressor io = new IO.Decompressor(inFile);\n HashMap<Integer, String> dictionary = new HashMap<Integer, String>();\n int count = 1;\n dictionary.put(new Integer(0), new String() );\n String output = \"\";\n Integer index;\n char character = 1;\n while( character != 0 ) {\n \t IO.Pair next = io.decode();\n index = new Integer(next.getIndex());\n character = next.getCharacter();\n \n output = dictionary.get(index);\n if (character == 0) io.append(output);\n else output = output + character;\n \t io.append(output);\n dictionary.put(new Integer(count), output);\n count++;\n }\n \n \n /* Close all relevant files */\n io.done();\n\n\n\n }",
"public PDFDecompressorFlate(Hashtable attrs, byte[] data) {\r\n this.attrs = attrs;\r\n this.data = data;\r\n this.in = new InflaterInputStream(new ByteArrayInputStream(data));\r\n this.out = new ByteArrayOutputStream();\r\n }",
"public static void main(String[] args) {\n\t\tDecompress d = new Decompress(args[0]);\n\t\tif(d.data.loadFailure()) {\n\t\t\treturn;\n\t\t}\n\n\t\t//Attempt to read the header and rebuild the original Huffman tree\n\t\td.rebuildTree(d.readHeader());\n\n\t\t//Convert all codes back to their original bitstrings\n\t\td.decode(args[0]);\n\t}",
"UnescapeTransliterator(String ID, char[] spec)\n/* */ {\n/* 131 */ super(ID, null);\n/* 132 */ this.spec = spec;\n/* */ }",
"public void popTranslationTable() {\n m_translateTable = (int[])m_translateTableStack.pop();\n }",
"public static void inverseTransform() {\n int first = BinaryStdIn.readInt();\n List<Integer> chars = new ArrayList<>();\n Map<Integer, Queue<Integer>> charPosition = new HashMap<>();\n int currentIndex = 0;\n\n while (!BinaryStdIn.isEmpty()) {\n int i = BinaryStdIn.readInt(8);\n chars.add(i);\n Queue<Integer> position = charPosition.get(i);\n\n if (position == null) {\n position = new Queue<>();\n charPosition.put(i, position);\n }\n\n position.enqueue(currentIndex);\n currentIndex += 1;\n }\n\n int N = chars.size();\n int R = 256;\n int[] count = new int[R + 1];\n\n for (int i = 0; i < N; i++) {\n count[chars.get(i) + 1]++;\n }\n\n for (int r = 0; r < R; r++) {\n count[r + 1] += count[r];\n }\n\n int[] h = new int[N];\n\n for (int i = 0; i < N; i++) {\n h[count[chars.get(i)]++] = chars.get(i);\n }\n\n int[] next = new int[N];\n\n for (int i = 0; i < N; i++) {\n int index = charPosition.get(h[i]).dequeue();\n next[i] = index;\n }\n\n int current = first;\n\n for (int i = 0; i < N; i++) {\n BinaryStdOut.write(h[current], 8);\n current = next[current];\n }\n\n BinaryStdOut.flush();\n }",
"private void translate()\r\n {\r\n for(int x = 0;x<14;x++)\r\n {\r\n pack.add(new Card(sPack.get(x)));\r\n }\r\n \r\n }",
"private static char recompose(RecomposeArgs paramRecomposeArgs, int paramInt, UnicodeSet paramUnicodeSet)\n/* */ {\n/* 1315 */ int i3 = 0;int i4 = 0;\n/* */ \n/* */ \n/* */ \n/* 1319 */ int[] arrayOfInt = new int[2];\n/* 1320 */ int i7 = -1;\n/* 1321 */ int n = 0;\n/* 1322 */ int i6 = 0;\n/* 1323 */ int i5 = 0;\n/* */ \n/* 1325 */ NextCombiningArgs localNextCombiningArgs = new NextCombiningArgs(null);\n/* 1326 */ localNextCombiningArgs.source = paramRecomposeArgs.source;\n/* */ \n/* 1328 */ localNextCombiningArgs.cc = '\\000';\n/* 1329 */ localNextCombiningArgs.c2 = '\\000';\n/* */ for (;;)\n/* */ {\n/* 1332 */ localNextCombiningArgs.start = paramRecomposeArgs.start;\n/* 1333 */ int m = getNextCombining(localNextCombiningArgs, paramRecomposeArgs.limit, paramUnicodeSet);\n/* 1334 */ int i1 = localNextCombiningArgs.combiningIndex;\n/* 1335 */ paramRecomposeArgs.start = localNextCombiningArgs.start;\n/* */ \n/* 1337 */ if (((m & 0x80) != 0) && (i7 != -1)) { int i;\n/* 1338 */ int j; int k; if ((i1 & 0x8000) != 0)\n/* */ {\n/* */ \n/* */ \n/* */ \n/* 1343 */ if (((paramInt & 0x100) != 0) || (i5 == 0)) {\n/* 1344 */ i = -1;\n/* 1345 */ m = 0;\n/* 1346 */ localNextCombiningArgs.c2 = paramRecomposeArgs.source[i7];\n/* 1347 */ if (i1 == 65522)\n/* */ {\n/* */ \n/* */ \n/* 1351 */ localNextCombiningArgs.c2 = ((char)(localNextCombiningArgs.c2 - 'ᄀ'));\n/* 1352 */ if (localNextCombiningArgs.c2 < '\\023') {\n/* 1353 */ i = paramRecomposeArgs.start - 1;\n/* 1354 */ localNextCombiningArgs.c = ((char)(44032 + (localNextCombiningArgs.c2 * '\\025' + (localNextCombiningArgs.c - 'ᅡ')) * 28));\n/* */ \n/* 1356 */ if ((paramRecomposeArgs.start != paramRecomposeArgs.limit) && ((localNextCombiningArgs.c2 = (char)(paramRecomposeArgs.source[paramRecomposeArgs.start] - 'ᆧ')) < '\\034'))\n/* */ {\n/* */ \n/* 1359 */ paramRecomposeArgs.start += 1; NextCombiningArgs \n/* 1360 */ tmp261_259 = localNextCombiningArgs;tmp261_259.c = ((char)(tmp261_259.c + localNextCombiningArgs.c2));\n/* */ }\n/* */ else {\n/* 1363 */ m = 64;\n/* */ }\n/* 1365 */ if (!nx_contains(paramUnicodeSet, localNextCombiningArgs.c)) {\n/* 1366 */ paramRecomposeArgs.source[i7] = localNextCombiningArgs.c;\n/* */ }\n/* */ else {\n/* 1369 */ if (!isHangulWithoutJamoT(localNextCombiningArgs.c)) {\n/* 1370 */ paramRecomposeArgs.start -= 1;\n/* */ }\n/* */ \n/* 1373 */ i = paramRecomposeArgs.start;\n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ }\n/* 1388 */ else if (isHangulWithoutJamoT(localNextCombiningArgs.c2)) {\n/* 1389 */ NextCombiningArgs tmp351_349 = localNextCombiningArgs;tmp351_349.c2 = ((char)(tmp351_349.c2 + (localNextCombiningArgs.c - 'ᆧ')));\n/* 1390 */ if (!nx_contains(paramUnicodeSet, localNextCombiningArgs.c2)) {\n/* 1391 */ i = paramRecomposeArgs.start - 1;\n/* 1392 */ paramRecomposeArgs.source[i7] = localNextCombiningArgs.c2;\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* 1397 */ if (i != -1)\n/* */ {\n/* 1399 */ j = i;\n/* 1400 */ k = paramRecomposeArgs.start;\n/* 1401 */ while (k < paramRecomposeArgs.limit) {\n/* 1402 */ paramRecomposeArgs.source[(j++)] = paramRecomposeArgs.source[(k++)];\n/* */ }\n/* 1404 */ paramRecomposeArgs.start = i;\n/* 1405 */ paramRecomposeArgs.limit = j;\n/* */ }\n/* */ \n/* 1408 */ localNextCombiningArgs.c2 = '\\000';\n/* */ \n/* 1410 */ if (m != 0)\n/* */ {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1417 */ if (paramRecomposeArgs.start == paramRecomposeArgs.limit) {\n/* 1418 */ return (char)i5;\n/* */ }\n/* */ \n/* */ \n/* 1422 */ n = 65520;\n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ }\n/* 1438 */ else if (((n & 0x8000) == 0) && ((paramInt & 0x100) != 0 ? (i5 == localNextCombiningArgs.cc) || (i5 != 0) : (i5 < localNextCombiningArgs.cc) || (i5 == 0)))\n/* */ {\n/* */ int i2;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1446 */ if (0 != (i2 = combine(combiningTable, n, i1, arrayOfInt)))\n/* */ {\n/* */ \n/* 1449 */ if (!nx_contains(paramUnicodeSet, (char)i3, (char)i4))\n/* */ {\n/* 1451 */ i3 = arrayOfInt[0];\n/* 1452 */ i4 = arrayOfInt[1];\n/* */ \n/* */ \n/* */ \n/* 1456 */ i = localNextCombiningArgs.c2 == 0 ? paramRecomposeArgs.start - 1 : paramRecomposeArgs.start - 2;\n/* */ \n/* */ \n/* 1459 */ paramRecomposeArgs.source[i7] = ((char)i3);\n/* 1460 */ if (i6 != 0) {\n/* 1461 */ if (i4 != 0)\n/* */ {\n/* 1463 */ paramRecomposeArgs.source[(i7 + 1)] = ((char)i4);\n/* */ }\n/* */ else\n/* */ {\n/* 1467 */ i6 = 0;\n/* 1468 */ j = i7 + 1;\n/* 1469 */ k = j + 1;\n/* 1470 */ while (k < i) {\n/* 1471 */ paramRecomposeArgs.source[(j++)] = paramRecomposeArgs.source[(k++)];\n/* */ }\n/* 1473 */ i--;\n/* */ }\n/* 1475 */ } else if (i4 != 0) {\n/* 1476 */ i6 = 1;\n/* 1477 */ paramRecomposeArgs.source[(i7 + 1)] = ((char)i4);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 1483 */ if (i < paramRecomposeArgs.start) {\n/* 1484 */ j = i;\n/* 1485 */ k = paramRecomposeArgs.start;\n/* 1486 */ while (k < paramRecomposeArgs.limit) {\n/* 1487 */ paramRecomposeArgs.source[(j++)] = paramRecomposeArgs.source[(k++)];\n/* */ }\n/* 1489 */ paramRecomposeArgs.start = i;\n/* 1490 */ paramRecomposeArgs.limit = j;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 1496 */ if (paramRecomposeArgs.start == paramRecomposeArgs.limit) {\n/* 1497 */ return (char)i5;\n/* */ }\n/* */ \n/* */ \n/* 1501 */ if (i2 > 1) {\n/* 1502 */ n = getCombiningIndexFromStarter((char)i3, (char)i4); continue;\n/* */ }\n/* */ \n/* 1505 */ i7 = -1;\n/* */ \n/* */ \n/* */ \n/* 1509 */ continue;\n/* */ }\n/* */ }\n/* */ }\n/* */ }\n/* 1514 */ i5 = localNextCombiningArgs.cc;\n/* 1515 */ if (paramRecomposeArgs.start == paramRecomposeArgs.limit) {\n/* 1516 */ return (char)i5;\n/* */ }\n/* */ \n/* */ \n/* 1520 */ if (localNextCombiningArgs.cc == 0)\n/* */ {\n/* 1522 */ if ((m & 0x40) != 0)\n/* */ {\n/* 1524 */ if (localNextCombiningArgs.c2 == 0) {\n/* 1525 */ i6 = 0;\n/* 1526 */ i7 = paramRecomposeArgs.start - 1;\n/* */ } else {\n/* 1528 */ i6 = 0;\n/* 1529 */ i7 = paramRecomposeArgs.start - 2;\n/* */ }\n/* 1531 */ n = i1;\n/* */ }\n/* */ else {\n/* 1534 */ i7 = -1;\n/* */ }\n/* 1536 */ } else if ((paramInt & 0x2000) != 0)\n/* */ {\n/* 1538 */ i7 = -1;\n/* */ }\n/* */ }\n/* */ }",
"public static void decode()\n {\n \n \n int a = BinaryStdIn.readInt();\n String t = BinaryStdIn.readString();\n int len = t.length();\n \n //variables for generating next[] array\n int[] next = new int[len];\n char[] original = t.toCharArray();\n char[] temp = t.toCharArray();\n boolean[] flag = new boolean[len];\n for(int i = 0 ; i < len; i++)\n {\n flag[i] = true;\n }\n \n //sort the encoded string\n decodeSort(temp);\n \n //generating next[] array\n for(int i = 0 ; i < len; i++)\n {\n for(int j = 0 ; j < len; j++)\n {\n if(flag[j])\n { \n if(original[j]==temp[i])\n {\n next[i] = j;\n flag[j]=false;\n break;\n }\n }\n }\n \n }\n \n // decode procedure\n int key = a;\n for (int count = 0; count < len; count++) {\n key = next[key];\n BinaryStdOut.write(t.charAt(key));\n }\n BinaryStdOut.close();\n }",
"public static void decode() {\n int first = BinaryStdIn.readInt();\n String t = BinaryStdIn.readString();\n int n = t.length();\n int[] count = new int[256 + 1];\n int[] next = new int[n];\n int i = 0;\n while (i < n) {\n count[t.charAt(i) + 1]++;\n i++;\n }\n i = 1;\n while (i < 256 + 1) {\n count[i] += count[i - 1];\n i++;\n }\n i = 0;\n while (i < n) {\n next[count[t.charAt(i)]++] = i;\n i++;\n }\n i = next[first];\n int c = 0;\n while (c < n){\n BinaryStdOut.write(t.charAt(i));\n i = next[i];\n c++;\n }\n BinaryStdOut.close();\n }",
"private void nocompressedUnPack()throws UnpackException,ZipEndException{\n skipByte();\n //get the len\n long LEN = 0x00;\n byte byte0 = getByte();\n byte byte1 = getByte();\n byte byte2 = getByte();\n byte byte3 = getByte();\n LEN |= byte1;\n LEN |= (byte0 << 8);\n LEN &= 0X0000ffff;\n// LEN |= (byte2<<24);\n// LEN |= (byte3<<16);\n int l = 0;\n try{\n for (long num = 0; num < LEN ; num ++){\n outputStoredByte(getByte());\n }\n }catch (IOException e){\n e.printStackTrace();\n }\n }",
"int externalToUnicode(byte[] src, final int srcOff, final int srcLen,\n char[] dst, final int dstOff, final int dstLen,\n IntPtr srcReadPtr, IntPtr dstWrotePtr, IntPtr dstCharsPtr,\n ArrayList charToBytes) {\n final boolean debug = false;\n final boolean debug_decode_loop = debug && false;\n int result = TCL.OK;\n\n if (encoding == null) {\n // This should never happen\n throw new TclRuntimeError(\"externalToUnicode called with null encoding\");\n }\n\n if (debug) {\n System.out.println(\"externalToUnicode( \" + srcLen + \" \" + dstLen + \" )\");\n }\n\n // If decoder was flushed already then return 0.\n\n if ((srcLen == 0) && !encodingEnd) {\n if (debug) {\n System.out.println(\"srcLen is zero and encodingEnd is false\");\n }\n\n srcReadPtr.i = 0;\n if (dstWrotePtr != null)\n dstWrotePtr.i = 0;\n if (dstCharsPtr != null)\n dstCharsPtr.i = 0;\n return 0;\n }\n\n // Convert bytes from src into unicode chars and store them in dst.\n\n if (debug) {\n System.out.println(\"now to decode byte array of length \" + srcLen);\n System.out.println(\"srcOff is \" + srcOff);\n for (int i=srcOff ; i < (srcOff+srcLen); i++) {\n System.out.println(\"(byte) '\" + ((char) src[i]) + \"'\" +\n \" (int) \" + ((int) src[i]) +\n \" (hex) 0x\" + Integer.toHexString(src[i]) );\n }\n System.out.println(\"encoded as \" + encoding);\n System.out.println(\"encodingStart is \" + encodingStart);\n System.out.println(\"eofCond is \" + eofCond);\n }\n\n // FIXME: In the cases where we know that we don't actually want\n // to copy the data, we could pass a flag so that we could\n // take advantage of encodings that had a one to one mapping\n // from bytes to chars (now need to copy then to find bytes used).\n\n if (csd == null) {\n // Note that UnsupportedCharsetException should never be raised\n // here since EncodingCmd.isSupported() should have already\n // returned true for this encoding.\n\n Charset chrset = Charset.forName(encoding);\n csd = chrset.newDecoder();\n }\n if (encodingStart) {\n csd.reset();\n }\n\n // Note that the default action on bad encoded\n // input is to stop and and report the error.\n\n // Implement byte -> char decoding loop. The\n // Java charset APIs provide no way to save\n // a decoder state or determine how many bytes\n // were consumed when a char is decoded. Since\n // we can't keep a copy of all data ever read,\n // this module has to make sure that only\n // one decode operation is done for input bytes\n // and that the number of bytes consumed for\n // each char is saved.\n\n int bytes_read = 0;\n int chars_written = 0;\n int dstOffI = dstOff;\n\n ByteBuffer srcb = ByteBuffer.wrap(src, srcOff, srcLen);\n CharBuffer oneChar = CharBuffer.allocate(1);\n\n while ((srcb.remaining() > 0) && (dstOffI < dstLen)) {\n if (debug_decode_loop) {\n System.out.println(\"char decode loop \" + (chars_written + 1));\n System.out.println(\"srcb.position() is \" + srcb.position());\n System.out.println(\"srcb.remaining() is \" + srcb.remaining());\n byte b = srcb.get(srcb.position()); // Get byte without moving position\n System.out.println(\"current byte is '\" + ((char) b) + \"' \" +\n \"0x\" + Integer.toHexString(b) );\n }\n\n int srcbStartPos = srcb.position();\n oneChar.rewind();\n\n // srcb is never empty when this method is invoked\n\n CoderResult cresult = csd.decode(srcb, oneChar, false);\n\n if (cresult == CoderResult.UNDERFLOW) {\n // An UNDERFLOW could mean that srcb is now\n // empty. It could also mean that a valid char\n // char could not be decoded from srcb bytes.\n\n if (debug_decode_loop) {\n System.out.println(\"UNDERFLOW detected\");\n }\n\n if ((oneChar.position() == 0) && (srcb.remaining() > 0)) {\n if (debug) {\n System.out.println(\"TCL_CONVERT_MULTIBYTE set\");\n }\n result = TCL_CONVERT_MULTIBYTE;\n break;\n } else {\n // Some bytes were decoded into 1 char.\n\n if (debug_decode_loop) {\n System.out.println(\"some bytes decoded\");\n }\n }\n } else if (cresult == CoderResult.OVERFLOW) {\n // Bytes from src have been decoded into 1 char.\n\n if (debug_decode_loop) {\n System.out.println(\"OVERFLOW detected\");\n }\n } else {\n // Some unexpected result, like an invalid character\n result = TCL_CONVERT_MULTIBYTE;\n break;\n }\n\n int bytes_this_char = srcb.position() - srcbStartPos;\n\n if (oneChar.position() != 1) {\n throw new TclRuntimeError(\"expected 1 char to be decoded, got \" + oneChar.position());\n }\n\n char c = oneChar.get(0);\n dst[dstOffI++] = c;\n\n if (charToBytes != null) {\n Integer iobj;\n if (bytes_this_char == 1) {\n iobj = oneInteger;\n } else if (bytes_this_char == 2) {\n iobj = twoInteger;\n } else if (bytes_this_char == 3) {\n iobj = threeInteger;\n } else {\n iobj = new Integer(bytes_this_char);\n }\n charToBytes.add( iobj );\n }\n\n bytes_read += bytes_this_char;\n chars_written++;\n\n if (debug_decode_loop) {\n System.out.println(\"char '\" + c + \"' \" +\n \"0x\" + Integer.toHexString(c) +\n \" decoded from \" +\n bytes_this_char + \" bytes\");\n }\n }\n\n if (debug) {\n System.out.println(\"decoded \" + chars_written + \" chars from \" +\n bytes_read + \" bytes\");\n\n for (int i=0 ; i < chars_written; i++) {\n int ind = dstOff + i;\n System.out.println(\"(char) '\" + dst[ind] + \"'\" +\n \" (int) \" + ((int) dst[ind]) +\n \" (hex) 0x\" + Integer.toHexString(dst[ind]) );\n\n if (charToBytes != null) {\n Integer iobj = (Integer) charToBytes.get(i);\n System.out.println(\"char was decoded from \" + iobj.intValue() + \" bytes\");\n }\n }\n }\n\n if (!(dstOffI < dstLen) && (srcb.remaining() > 0)) {\n // The dst buffer is full but bytes remain\n // in srcb. This could happen when this\n // method is invoked with a small buffer\n // so that the number of consumed bytes\n // can be determined.\n\n if (debug) {\n System.out.println(\"TCL_CONVERT_NOSPACE detected\");\n }\n\n result = TCL_CONVERT_NOSPACE;\n }\n\n boolean atEOF = (eofCond && encodingEnd);\n\n if (atEOF && !(dstOffI < dstLen)) {\n result = TCL_CONVERT_NOSPACE;\n }\n\n if (atEOF && (result == TCL.OK)) {\n // EOF flag must be passed to the decoder before\n // it can be flushed. This can only be done after\n // EOF was read from the input. If there was an\n // error, then don't pass EOF or flush the decoder.\n\n ByteBuffer emptyBytes = ByteBuffer.allocate(0);\n CharBuffer dstb = CharBuffer.wrap(dst, dstOffI, dstLen - dstOffI);\n\n int dstbStartPos = dstb.position();\n\n CoderResult cresult1 = csd.decode(emptyBytes, dstb, true);\n CoderResult cresult2 = csd.flush(dstb);\n\n if (cresult2 == CoderResult.OVERFLOW) {\n result = TCL_CONVERT_NOSPACE;\n } else {\n encodingEnd = false;\n }\n\n int chars_flushed = dstb.position() - chars_written;\n chars_written += chars_flushed;\n\n if (debug) {\n System.out.println(\"flushed \" + chars_flushed + \" chars at EOF\");\n }\n }\n\n srcReadPtr.i = bytes_read;\n if (dstWrotePtr != null)\n dstWrotePtr.i = chars_written;\n if (dstCharsPtr != null)\n dstCharsPtr.i = chars_written;\n\n return result;\n }",
"@Override\n\tpublic void Decompress() {\n\t\t\n\t}",
"protected abstract ByteBuf decompress(ByteBuf compressed, int originalLength) throws Exception;",
"private CoderResult decodeArrayLoop(ByteBuffer src, CharBuffer dst) {\n byte[] srcArray = src.array();\n int srcPosition = src.arrayOffset() + src.position();\n int srcLength = src.arrayOffset() + src.limit();\n\n char[] destArray = dst.array();\n int destPosition = dst.arrayOffset() + dst.position();\n int destLength = dst.arrayOffset() + dst.limit();\n int destLengthASCII = destPosition + Math.min(srcLength - srcPosition, destLength - destPosition);\n\n // ASCII only loop\n while (destPosition < destLengthASCII && srcArray[srcPosition] >= 0) {\n destArray[destPosition++] = (char) srcArray[srcPosition++];\n }\n\n while (srcPosition < srcLength) {\n int b1 = srcArray[srcPosition];\n if (b1 >= 0) {\n // 1 byte, 7 bits: 0xxxxxxx\n if (destPosition >= destLength) {\n return xflow(src, srcPosition, srcLength, dst, destPosition, 1);\n }\n destArray[destPosition++] = (char) b1;\n srcPosition++;\n } else if ((b1 >> 5) == -2) {\n // 2 bytes, 11 bits: 110xxxxx 10xxxxxx\n if (srcLength - srcPosition < 2 || destPosition >= destLength) {\n return xflow(src, srcPosition, srcLength, dst, destPosition, 2);\n }\n int b2 = srcArray[srcPosition + 1];\n if (isMalformed2(b1, b2)) {\n return malformed(src, srcPosition, dst, destPosition, 2);\n }\n destArray[destPosition++] = (char) (((b1 << 6) ^ b2) ^ 0x0f80);\n srcPosition += 2;\n } else if ((b1 >> 4) == -2) {\n // 3 bytes, 16 bits: 1110xxxx 10xxxxxx 10xxxxxx\n if (srcLength - srcPosition < 3 || destPosition >= destLength) {\n return xflow(src, srcPosition, srcLength, dst, destPosition, 3);\n }\n int b2 = srcArray[srcPosition + 1];\n int b3 = srcArray[srcPosition + 2];\n if (isMalformed3(b1, b2, b3)) {\n return malformed(src, srcPosition, dst, destPosition, 3);\n }\n destArray[destPosition++] = (char) (((b1 << 12) ^ (b2 << 6) ^ b3) ^ 0x1f80);\n srcPosition += 3;\n } else if ((b1 >> 3) == -2) {\n // 4 bytes, 21 bits: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx\n if (srcLength - srcPosition < 4 || destLength - destPosition < 2) {\n return xflow(src, srcPosition, srcLength, dst, destPosition, 4);\n }\n int b2 = srcArray[srcPosition + 1];\n int b3 = srcArray[srcPosition + 2];\n int b4 = srcArray[srcPosition + 3];\n int uc = ((b1 & 0x07) << 18) | ((b2 & 0x3f) << 12) | ((b3 & 0x3f) << 06) | (b4 & 0x3f);\n if (isMalformed4(b2, b3, b4) || !((uc >= 0x10000) && (uc <= 1114111))) {\n return malformed(src, srcPosition, dst, destPosition, 4);\n }\n destArray[destPosition++] = (char) (0xd800 | (((uc - 0x10000) >> 10) & 0x3ff));\n destArray[destPosition++] = (char) (0xdc00 | ((uc - 0x10000) & 0x3ff));\n srcPosition += 4;\n } else {\n return malformed(src, srcPosition, dst, destPosition, 1);\n }\n }\n return xflow(src, srcPosition, srcLength, dst, destPosition, 0);\n }",
"private String[][] decompose(MinorBoard[][] superBoard) {\n\t\tString[][] fullDecomp = new String[27][3];\n\t\tint decompNext = 0;\n\t\t\n\t\tMinorBoard[] tempSup = superBoard[2];\n\t\t//Switches the top and bottom minorBoards to print in the right order\n\t\t//(Top boards need to be printed first)\n\t\tsuperBoard[2] = superBoard[0];\n\t\tsuperBoard[0] = tempSup;\n\t\t\n\t\t//Unpack the superBoard into a nested array of strings\n\t\tfor (MinorBoard[] superRow : superBoard) {\n\t\t\tfor (MinorBoard minorBoard : superRow) {\n\t\t\t\tString[][] minDecomp = minorBoard.getBoard();\n\t\t\t\t//Switches the top and bottom row of each minorBoard in prep for printing\n\t\t\t\tString[] temp = minDecomp[2];\n\t\t\t\tminDecomp[2] = minDecomp[0];\n\t\t\t\tminDecomp[0] = temp;\n\t\t\t\tfor (String[] row : minDecomp) {\n\t\t\t\t\tfullDecomp[decompNext] = row;\n\t\t\t\t\tdecompNext++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tString[][] organisedDecomp = new String[27][3];\n\t\tint current = 0;\n\t\tint[] order = {0,3,6};\n\t\tint target = 0;\n\t\t//Reorganises the nested strings so that they represent the superBoard from left to right\n\t\tfor (int supLayer = 0; supLayer < 3; supLayer++) {\n\t\t\tfor (int minorLayer = 0; minorLayer < 3; minorLayer++) {\n\t\t\t\tfor (int cycle = 0; cycle < 3; cycle++) {\n\t\t\t\t\ttarget = order[cycle] + minorLayer + supLayer*9;\n\t\t\t\t\torganisedDecomp[current] = fullDecomp[target];\n\t\t\t\t\tcurrent ++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn organisedDecomp;\n\t}",
"private StandardDeCompressors() {}",
"public static void decode() {\r\n int[] index = new int[R + 1];\r\n char[] charAtIndex = new char[R + 1];\r\n for (int i = 0; i < R + 1; i++) { \r\n index[i] = i; \r\n charAtIndex[i] = (char) i;\r\n }\r\n while (!BinaryStdIn.isEmpty()) {\r\n int c = BinaryStdIn.readChar();\r\n char t = charAtIndex[c];\r\n BinaryStdOut.write(t);\r\n for (int i = c - 1; i >= 0; i--) {\r\n char temp = charAtIndex[i];\r\n int tempIndex = ++index[temp];\r\n charAtIndex[tempIndex] = temp;\r\n }\r\n charAtIndex[0] = t;\r\n index[t] = 0;\r\n }\r\n BinaryStdOut.close(); \r\n }",
"public void unpack(MAVLinkPayload payload) {\n\t\tpayload.resetIndex();\n\t\tthis.propeller1 = payload.getFloat();\n\t\tthis.propeller2 = payload.getFloat();\n\t\tthis.propeller3 = payload.getFloat();\n\t\tthis.propeller4 = payload.getFloat();\n\n\t}",
"public ProtocolObject unpack(GameTransportPacket packet) {\n ProtocolObject gamePacket;\r\n gamePacket = styxDecoder.unpack(ByteBuffer.wrap(packet.gamedata));\r\n return gamePacket;\r\n }",
"private static int decompose(long paramLong, DecomposeArgs paramDecomposeArgs)\n/* */ {\n/* 456 */ int i = getExtraDataIndex(paramLong);\n/* 457 */ paramDecomposeArgs.length = extraData[(i++)];\n/* */ \n/* 459 */ if ((paramDecomposeArgs.length & 0x80) > 0)\n/* */ {\n/* 461 */ int j = extraData[(i++)];\n/* 462 */ paramDecomposeArgs.cc = (0xFF & j >> 8);\n/* 463 */ paramDecomposeArgs.trailCC = (0xFF & j);\n/* */ }\n/* */ else {\n/* 466 */ paramDecomposeArgs.cc = (paramDecomposeArgs.trailCC = 0);\n/* */ }\n/* */ \n/* 469 */ paramDecomposeArgs.length &= 0x7F;\n/* 470 */ return i;\n/* */ }",
"Object unpack(Info vi, Buffer opb) {\n\t\tInfoMapping0 info = new InfoMapping0();\n\n\t\tif (opb.read(1) != 0) {\n\t\t\tinfo.submaps = opb.read(4) + 1;\n\t\t} else {\n\t\t\tinfo.submaps = 1;\n\t\t}\n\n\t\tif (opb.read(1) != 0) {\n\t\t\tinfo.coupling_steps = opb.read(8) + 1;\n\n\t\t\tfor (int i = 0; i < info.coupling_steps; i++) {\n\t\t\t\tint testM = info.coupling_mag[i] = opb.read(Util\n\t\t\t\t\t\t.ilog2(vi.channels));\n\t\t\t\tint testA = info.coupling_ang[i] = opb.read(Util\n\t\t\t\t\t\t.ilog2(vi.channels));\n\n\t\t\t\tif (testM < 0 || testA < 0 || testM == testA\n\t\t\t\t\t\t|| testM >= vi.channels || testA >= vi.channels) {\n\t\t\t\t\t// goto err_out;\n\t\t\t\t\tinfo.free();\n\t\t\t\t\treturn (null);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (opb.read(2) > 0) { /* 2,3:reserved */\n\t\t\tinfo.free();\n\t\t\treturn (null);\n\t\t}\n\n\t\tif (info.submaps > 1) {\n\t\t\tfor (int i = 0; i < vi.channels; i++) {\n\t\t\t\tinfo.chmuxlist[i] = opb.read(4);\n\t\t\t\tif (info.chmuxlist[i] >= info.submaps) {\n\t\t\t\t\tinfo.free();\n\t\t\t\t\treturn (null);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < info.submaps; i++) {\n\t\t\tinfo.timesubmap[i] = opb.read(8);\n\t\t\tif (info.timesubmap[i] >= vi.times) {\n\t\t\t\tinfo.free();\n\t\t\t\treturn (null);\n\t\t\t}\n\t\t\tinfo.floorsubmap[i] = opb.read(8);\n\t\t\tif (info.floorsubmap[i] >= vi.floors) {\n\t\t\t\tinfo.free();\n\t\t\t\treturn (null);\n\t\t\t}\n\t\t\tinfo.residuesubmap[i] = opb.read(8);\n\t\t\tif (info.residuesubmap[i] >= vi.residues) {\n\t\t\t\tinfo.free();\n\t\t\t\treturn (null);\n\t\t\t}\n\t\t}\n\t\treturn info;\n\t}",
"String[][] packData();",
"public static void main(String[] args) {\n List<String> res = CompressStringToi18n.compress(\"careercup\");\n for(String str : res) {\n System.out.println(str);\n }\n }",
"protected void decodeIndexEntry(IEntryResult entryResult) {\n\tchar[] word = entryResult.getWord();\n\tint tagLength = currentTag.length;\n\tint nameLength = CharOperation.indexOf(SEPARATOR, word, tagLength);\n\tif (this.simpleName == null)\n\t\t// Optimization, eg. type reference is 'org.eclipse.jdt.core.*'\n\t\tthis.decodedSegment = CharOperation.subarray(word, tagLength, nameLength);\n\telse\n\t\tthis.decodedSimpleName = CharOperation.subarray(word, tagLength, nameLength);\n}",
"public void decode() throws Exception {\n decodeFat();\n decodeDat();\n }",
"public static void decode() {\n char[] symbols = initializeSymbols();\n int position;\n while (!BinaryStdIn.isEmpty()) {\n position = BinaryStdIn.readChar();\n char symbol = symbols[position];\n BinaryStdOut.write(symbol, BITS_PER_BYTE);\n System.arraycopy(symbols, 0, symbols, 1, position);\n symbols[0] = symbol;\n }\n BinaryStdOut.close();\n }",
"private TranslatedString deBuffer(GtfsRealtime.TranslatedString buffered) {\n TranslatedString result = new TranslatedString();\n for (Translation translation : buffered.getTranslationList()) {\n String language = translation.getLanguage();\n String string = translation.getText();\n result.addTranslation(language, string);\n }\n return result;\n }",
"private void decoding(String cipherText)\n\t{\n\t\ttextLength = cipherText.length();\n\n\t\tdo\n\t\t{\n\t\t\tStringBuffer sb = new StringBuffer(textLength);\n\t\t\tchar currentLetter[] = cipherText.toCharArray();\n\n\t\t\tfor(int i = ZERO; i < textLength; i++)\n\t\t\t{\n\t\t\t\tif(i % TWO ==0)\n\t\t\t\tsb.append(currentLetter[i]);\n\t\t\t} // Ending bracket of for loop\n\n\t\t\tfor(int i = ZERO; i < textLength; i++)\n\t\t\t{\n\t\t\t\tif(i % TWO != ZERO)\n\t\t\t\tsb.append(currentLetter[i]);\n\t\t\t} // Ending bracket of for loop\n\n\t\t\tdecodedText = sb.toString();\n\t\t\tcipherText = decodedText;\n\t\t\tloopIntDecode++;\n\t\t}while(loopIntDecode < shiftAmount);\n\t}",
"private void _testSimple(ChunkDecoder decoder) throws IOException\n {\n byte[] orig = \"Another trivial test\".getBytes(\"UTF-8\");\n byte[] compressed = compress(orig);\n byte[] result = decoder.decode(compressed);\n Assert.assertEquals(result, orig);\n\n // also, ensure that offset, length are passed\n byte[] compressed2 = new byte[compressed.length + 4];\n System.arraycopy(compressed, 0, compressed2, 2, compressed.length);\n\n result = decoder.decode(compressed2, 2, compressed.length);\n Assert.assertEquals(result, orig);\n\n // two ways to do that as well:\n result = LZFDecoder.decode(compressed2, 2, compressed.length);\n Assert.assertEquals(result, orig);\n }",
"public static void inverseTransform() {\r\n \tint start = BinaryStdIn.readInt();\r\n \tString str = BinaryStdIn.readString();;\r\n \tchar[] lastCol = str.toCharArray();\r\n \tint[] count = new int[256];\r\n \tfor (char c : lastCol) {\r\n \t\tcount[c]++;\r\n \t}\r\n \tfor (int i = 1; i < count.length; i++) {\r\n \t\tcount[i] += count[i - 1];\r\n \t}\r\n \tint[] next = new int[lastCol.length];\r\n \tchar[] firstCol = new char[lastCol.length];\r\n \tfor (int i = lastCol.length - 1; i >= 0; i--) {\r\n \t\tint index = --count[lastCol[i]];\r\n \t\tfirstCol[index] = lastCol[i];\r\n \t\tnext[index] = i;\r\n \t}\r\n \tint sum = 0;\r\n \twhile (sum < lastCol.length) {\r\n \t\tBinaryStdOut.write(firstCol[start]);\r\n \t\tstart = next[start];\r\n \t\tsum++;\r\n \t}\r\n \tBinaryStdOut.close();\r\n }",
"public void decode(byte[] in_buf, int in_off, int in_len,\r\n char[] out_buf, int out_off, int out_len, int[] result)\r\n throws CharConversionException;",
"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 }",
"private void ReadHuffman(String aux) {\n\n Huffman DY = new Huffman();\n Huffman DCB = new Huffman();\n Huffman DCR = new Huffman();\n DY.setFrequencies(FreqY);\n DCB.setFrequencies(FreqCB);\n DCR.setFrequencies(FreqCR);\n\n StringBuilder encoding = new StringBuilder();\n int iteradorMatrix = aux.length() - sizeYc - sizeCBc - sizeCRc;\n for (int x = 0; x < sizeYc; ++x) {\n encoding.append(aux.charAt(iteradorMatrix));\n ++iteradorMatrix;\n }\n Ydes = DY.decompressHuffman(encoding.toString());\n encoding = new StringBuilder();\n for (int x = 0; x < sizeCBc; ++x) {\n encoding.append(aux.charAt(iteradorMatrix));\n ++iteradorMatrix;\n }\n CBdes = DCB.decompressHuffman(encoding.toString());\n encoding = new StringBuilder();\n for (int x = 0; x < sizeCRc; ++x) {\n encoding.append(aux.charAt(iteradorMatrix));\n ++iteradorMatrix;\n }\n CRdes = DCR.decompressHuffman(encoding.toString());\n }",
"Hashtable<String, String> unpack_cursor(Cursor cursor)\n {\n \tHashtable<String, String> result = null;\n \tif(cursor == null) return null;\n \telse if(cursor.getCount() == 0) return null;\n \telse\n \t{\n \t\tresult= new Hashtable<String, String>();\n\t \tcursor.moveToFirst(); \n\t \tint keyIndex = cursor.getColumnIndex(KEY_FIELD);\n\t\t\tint valueIndex = cursor.getColumnIndex(VALUE_FIELD);\n\t\t\tresult.put(cursor.getString(keyIndex), cursor.getString(valueIndex));\n\t\t\twhile (cursor.moveToNext()) \n\t \t{\n\t \t\tresult.put(cursor.getString(keyIndex), cursor.getString(valueIndex));\n\t \t}\n \t}\n \treturn result;\n }",
"private static String loadConvert(String str) {\n\t\tint off = 0;\n\t\tint len = str.length();\n\t\tchar[] in = str.toCharArray();\n\t\tchar[] convtBuf = new char[1024];\n\t\tif (convtBuf.length < len) {\n\t\t\tint newLen = len * 2;\n\t\t\tif (newLen < 0) {\n\t\t\t\tnewLen = Integer.MAX_VALUE;\n\t\t\t}\n\t\t\tconvtBuf = new char[newLen];\n\t\t}\n\t\tchar aChar;\n\t\tchar[] out = convtBuf;\n\t\tint outLen = 0;\n\t\tint end = off + len;\n\n\t\twhile (off < end) {\n\t\t\taChar = in[off++];\n\t\t\tif (aChar == '\\\\') {\n\t\t\t\taChar = in[off++];\n\t\t\t\tif (aChar == 'u') {\n\t\t\t\t\t// Read the xxxx\n\t\t\t\t\tint value = 0;\n\t\t\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\t\t\taChar = in[off++];\n\t\t\t\t\t\tswitch (aChar) {\n\t\t\t\t\t\tcase '0':\n\t\t\t\t\t\tcase '1':\n\t\t\t\t\t\tcase '2':\n\t\t\t\t\t\tcase '3':\n\t\t\t\t\t\tcase '4':\n\t\t\t\t\t\tcase '5':\n\t\t\t\t\t\tcase '6':\n\t\t\t\t\t\tcase '7':\n\t\t\t\t\t\tcase '8':\n\t\t\t\t\t\tcase '9':\n\t\t\t\t\t\t\tvalue = (value << 4) + aChar - '0';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'a':\n\t\t\t\t\t\tcase 'b':\n\t\t\t\t\t\tcase 'c':\n\t\t\t\t\t\tcase 'd':\n\t\t\t\t\t\tcase 'e':\n\t\t\t\t\t\tcase 'f':\n\t\t\t\t\t\t\tvalue = (value << 4) + 10 + aChar - 'a';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'A':\n\t\t\t\t\t\tcase 'B':\n\t\t\t\t\t\tcase 'C':\n\t\t\t\t\t\tcase 'D':\n\t\t\t\t\t\tcase 'E':\n\t\t\t\t\t\tcase 'F':\n\t\t\t\t\t\t\tvalue = (value << 4) + 10 + aChar - 'A';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tthrow new IllegalArgumentException(\"Malformed \\\\uxxxx encoding.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tout[outLen++] = (char) value;\n\t\t\t\t} else {\n\t\t\t\t\tif (aChar == 't')\n\t\t\t\t\t\taChar = '\\t';\n\t\t\t\t\telse if (aChar == 'r')\n\t\t\t\t\t\taChar = '\\r';\n\t\t\t\t\telse if (aChar == 'n')\n\t\t\t\t\t\taChar = '\\n';\n\t\t\t\t\telse if (aChar == 'f')\n\t\t\t\t\t\taChar = '\\f';\n\t\t\t\t\tout[outLen++] = aChar;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tout[outLen++] = aChar;\n\t\t\t}\n\t\t}\n\t\treturn new String(out, 0, outLen);\n\t}",
"Hashtable<String, String> unpack_cursor(Cursor cursor,Hashtable<String, String> result)\n {\n \tif(cursor == null) return null;\n \tcursor.moveToFirst(); \n \tif(result == null)\n \tresult = new Hashtable<String, String>();\n \t\n \tint keyIndex = cursor.getColumnIndex(KEY_FIELD);\n\t\tint valueIndex = cursor.getColumnIndex(VALUE_FIELD);\n\t\twhile (cursor.moveToNext()) \n \t{\n \t\tresult.put(cursor.getString(keyIndex), cursor.getString(valueIndex));\n \t}\n \treturn result;\n }",
"public void decode()\n {\n if (null == escherRecords || 0 == escherRecords.size()){\n byte[] rawData = getRawData();\n convertToEscherRecords(0, rawData.length, rawData );\n }\n }",
"private void unCompress()\n\t{\n\t\ttry\n\t\t{\n\t\t\tbyte[] buffer = new byte[4096];\n\t\t\tint bytesIn;\n\t\t\tZipFile rfoFile = new ZipFile(path + fileName);\n\t\t\tEnumeration<? extends ZipEntry> allFiles = rfoFile.entries();\n\t\t\twhile(allFiles.hasMoreElements())\n\t\t\t{\n\t\t\t\tZipEntry ze = (ZipEntry)allFiles.nextElement();\n\t\t\t\tInputStream is = rfoFile.getInputStream(ze);\n\t\t\t\tString fName = processSeparators(ze.getName());\n\t\t\t\tFile element = new File(tempDir + fName);\n\t\t\t\torg.reprap.Main.ftd.add(element);\n\t\t\t\tFileOutputStream os = new FileOutputStream(element);\n\t\t\t\twhile((bytesIn = is.read(buffer)) != -1) \n\t\t\t\t\tos.write(buffer, 0, bytesIn);\n\t\t\t\tos.close();\n\t\t\t}\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.unCompress(): \" + e);\n\t\t}\n\t}",
"AstroArg unpack(Astro litChars);",
"public void compress() {\r\n fCharBuffer.compress();\r\n fStyleBuffer.compress();\r\n fParagraphBuffer.compress();\r\n }",
"@Test\n public void Test4179686() throws Exception {\n RuleBasedCollator en_us = (RuleBasedCollator) Collator.getInstance(Locale.US);\n // Create a collator with a few expanding character sequences in it....\n RuleBasedCollator coll = new RuleBasedCollator(en_us.getRules()\n + \" & ae ; \\u00e4 & AE ; \\u00c4\"\n + \" & oe ; \\u00f6 & OE ; \\u00d6\"\n + \" & ue ; \\u00fc & UE ; \\u00dc\");\n\n String text = \"T\\u00f6ne\"; // o-umlaut\n\n CollationElementIterator iter = coll.getCollationElementIterator(text);\n List elements = new ArrayList();\n int elem;\n\n // Iterate forward and collect all of the elements into a Vector\n while ((elem = iter.next()) != CollationElementIterator.NULLORDER) {\n elements.add(new Integer(elem));\n }\n\n // Now iterate backward and make sure they're the same\n iter.reset();\n int index = elements.size() - 1;\n while ((elem = iter.previous()) != CollationElementIterator.NULLORDER) {\n int expect = ((Integer)elements.get(index)).intValue();\n\n if (elem != expect) {\n errln(\"Mismatch at index \" + index\n + \": got \" + Integer.toString(elem,16)\n + \", expected \" + Integer.toString(expect,16));\n }\n index--;\n }\n }",
"public static void inverseTransform()\r\n {\r\n \tint first = BinaryStdIn.readInt();\r\n \tString s = BinaryStdIn.readString();\r\n \tBinaryStdIn.close();\r\n \t\r\n \tchar[] t = s.toCharArray();\r\n \r\n \tchar[] firstCharacters = t.clone();\r\n \tArrays.sort(firstCharacters);\r\n \t\r\n \t// Construction next[] using t[] and first\r\n \tint[] next = constructNext(t, firstCharacters, first);\r\n \t\r\n \t// Writing original string to StdOut using next[] and first\r\n \tint index = first;\r\n \tfor (int i = 0; i < t.length; i++)\r\n \t{\r\n \t\tBinaryStdOut.write(firstCharacters[index]);\r\n \t\tindex = next[index];\r\n \t}\r\n \tBinaryStdOut.close();\r\n }",
"private static void decodeStage()\n\t{\n\t\tif (isValidSource)\n\t\t{\n\t\t\tif (latches.containsKey(\"F\") && !latches.get(\"F\").isNOP())\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tlatches.put(\"F\", getSRCFromRegister(latches.get(\"F\")));\n\t\t\t\t} catch (Exception e)\n\t\t\t\t{\n\t\t\t\t\tSystem.err.println(\"Error while reading values from Registers in Decode function\");\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tmoveInstruction(\"D\", \"F\");\n\t\t} else\n\t\t{\n\t\t\tlatches.put(\"D\", new Instruction());\n\t\t}\n\t}",
"public static String decompress(final String treeString, final String message) {\n\n BinaryNodeInterface<Character> rootNode = new BinaryNode<Character>();\n generateTree(rootNode, treeString);\n String result = message;\n\n if (result.length() == 0) {\n return result;\n }\n\n while (result.charAt(0) == '0' || result.charAt(0) == '1') {\n result = traverse(rootNode, result);\n result = result.substring(1);\n }\n\n return result;\n }",
"public void decodeIndexEntry(IEntryResult entryResult){\n char[] word = entryResult.getWord();\n int size = word.length;\n int tagLength = REF.length;\n int nameLength = CharOperation.indexOf(SEPARATOR, word, tagLength);\n if (nameLength < 0) nameLength = size;\n this.decodedSegment = CharOperation.subarray(word, tagLength, nameLength); }"
]
| [
"0.6268001",
"0.6268001",
"0.61182714",
"0.61120105",
"0.6109145",
"0.61077017",
"0.61047965",
"0.6102622",
"0.6101135",
"0.6101135",
"0.6099395",
"0.6099287",
"0.60950166",
"0.6091184",
"0.60895145",
"0.6088585",
"0.6087667",
"0.6081806",
"0.6081659",
"0.608088",
"0.60797596",
"0.607945",
"0.6078492",
"0.6077767",
"0.60681206",
"0.6063578",
"0.6063578",
"0.6063578",
"0.6063578",
"0.6063578",
"0.6063578",
"0.6063578",
"0.6063578",
"0.6063578",
"0.6062162",
"0.6061311",
"0.6056702",
"0.60558355",
"0.6027869",
"0.601372",
"0.6000014",
"0.59228766",
"0.5792289",
"0.57722557",
"0.5517124",
"0.52203",
"0.5081227",
"0.49558756",
"0.48912176",
"0.48590815",
"0.48259026",
"0.48154795",
"0.47990102",
"0.4791696",
"0.47755128",
"0.47698048",
"0.4726163",
"0.4722224",
"0.47109056",
"0.46978635",
"0.46956375",
"0.46888226",
"0.4673841",
"0.4670231",
"0.45796022",
"0.45529643",
"0.44856596",
"0.4483551",
"0.44100836",
"0.44029015",
"0.4371485",
"0.43562996",
"0.43432754",
"0.4325777",
"0.4318725",
"0.4317079",
"0.42956215",
"0.42846423",
"0.42820877",
"0.42812386",
"0.42748225",
"0.42645377",
"0.42547935",
"0.42538556",
"0.42104402",
"0.42029488",
"0.41978905",
"0.41891858",
"0.4188225",
"0.41879666",
"0.4184414",
"0.4182444",
"0.41710442",
"0.41633636",
"0.41560036",
"0.41556725",
"0.41533595",
"0.41471255",
"0.41449147",
"0.41442305"
]
| 0.6066226 | 25 |
Closes the input stream. | public final void yyclose() throws IOException {
zzAtEOF = true; /* indicate end of file */
zzEndRead = zzStartRead; /* invalidate buffer */
if (zzReader != null)
zzReader.close();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void close() throws IOException {\n input.close();\n }",
"public void closeStream() {\n output.close();\n input.close();\n }",
"public void close() {\n\t\ttry {\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void close() throws IOException\n {\n in.close();\n }",
"public static void close(){\n\t\tin.close();\n\t}",
"@Override\n public void close() throws IOException\n {\n InputStream in = _inputSource;\n\n if (in != null) {\n _inputSource = null;\n if (_autoClose) {\n in.close();\n }\n }\n freeBuffers();\n }",
"public synchronized void close() {\n try {\n audioInputStream.close();\n } catch (IOException ioe) {\n System.err.println(\"Problem while closing the audioInputSteam\");\n }\n\n }",
"@Override\n\t public synchronized void close() throws IOException {\n\t\tin.close();\n\t\topen = false;\n\t }",
"@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 public void close() throws IOException\n {\n try\n {\n fAVMRemote.closeInputHandle(fTicketHolder.getTicket(), fHandle);\n }\n catch (Exception e)\n {\n throw new IOException(\"Remote Error closing input stream.\");\n }\n }",
"public void close() throws IOException {\n\t\tin.close();\n \n\t\t// Release the buffer\n\t\tdataIn = null;\n\t\tbuffer = null;\n\t\tif(readRecordsCounter != null) {\n\t\t readRecordsCounter.increment(numRecordsRead);\n\t\t}\n\n\t\t// Return the decompressor\n\t\tif (decompressor != null) {\n\t\t decompressor.reset();\n\t\t CodecPool.returnDecompressor(decompressor);\n\t\t decompressor = null;\n\t\t}\n\t }",
"public void close() throws IOException {\n open = false;\n stream.close();\n }",
"protected void closeStream ()\n {\n stream.close ();\n }",
"private void closeStream() throws IOException {\n if (originalInputStream != inputStream) {\n // Close the byte input stream or file input stream, if either is the current one\n inputStream.close();\n }\n\n if (closeOriginalStreamOnClose) {\n originalInputStream.close();\n }\n }",
"public static void closeIO()\r\n\t{\n\t\ttry\r\n\t\t{\r\n\t\t\tinStream.close();\r\n\t\t\toutStream.close();\r\n\t\t}\r\n\t\tcatch(IOException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void close() throws FormatException, IOException {\n if (in != null) in.close();\n in = null;\n currentId = null;\n }",
"public void close() throws IOException {\n\t\tistream.close();\n\t\tostream.close();\n\t\tsocket.close();\n\t}",
"public synchronized void close() throws IOException {\n\t\t\tfinish();\n\t\t\tout.close();\n\t\t}",
"protected void close() {\r\n\t\ttry {\r\n\t\t\t_asciiIn.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"Error ocurred while closing file \" + _directory + _filename + _filetype + \":\" + e.getMessage());\r\n\t\t} // catch\r\n\t}",
"public void close() throws IOException\n {\n try\n {\n flush();\n }\n catch (IOException ignored)\n {\n // ignore\n }\n getStream().close();\n }",
"public void closeStream() {\n\t\ttry {\n\t\t\tisReaderStatusClosed = true;\n\t\t\tif(buffReader != null) {\n\t\t\t\tbuffReader.close();\n\t\t\t}\n\t\t} catch(Exception e) { }\n\t}",
"public void close()\n throws IOException\n {\n outstream.close();\n }",
"public void close()\r\n\t{\r\n\t if (isOpen()) try {\r\n\t \tfd.close();\r\n\t } catch (IOException ex) {\r\n\t \t/* do nothing */\r\n\t } finally {\r\n\t\t thisc = EOF;\r\n\t\t holdc = EOF;\r\n\t\t fd = null;\r\n\t }\r\n\t}",
"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}",
"public static void close( InputStream ins )\n {\n if ( ins != null )\n {\n try\n {\n ins.close();\n }\n catch ( IOException e )\n {\n log.error( \"Error closing input stream.\", e );\n }\n }\n }",
"public void close() throws IOException {\n\t\tthis.finish();\n\t\tthis.buffer.close();\n\t\t}",
"public void close() {\n try { out.flush(); } catch (Exception e) {}; // just to be sure\n \n cleanup();\n }",
"protected void close() {\n\t\tif(sOutput != null) {\n\t\t\ttry {\n\t\t\t\tsOutput.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"error closing output stream\");\n\t\t\t}\n\t\t\t\n\t\t\tsOutput = null;\n\t\t}\n\t}",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public void \n close() \n throws PipeException \n {\n in = -1;\n closedByReader = true;\n }",
"public void close() throws IOException {\n if (!closed) {\n // Android-changed: Unconditionally close external inflaters (b/26462400)\n //if (usesDefaultInflater)\n inf.end();\n in.close();\n closed = true;\n }\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; // indicate end of file\n zzEndRead = zzStartRead; // invalidate buffer\n\n if (zzReader != null) {\n zzReader.close();\n }\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; // indicate end of file\n zzEndRead = zzStartRead; // invalidate buffer\n\n if (zzReader != null) {\n zzReader.close();\n }\n }",
"public void close() {\n if (numDigits > 0)\n flush();\n try {\n output.close();\n } catch (IOException e) {\n throw new RuntimeException(e.toString());\n }\n }",
"public final void yyclose() throws java.io.IOException {\r\n zzAtEOF = true; /* indicate end of file */\r\n zzEndRead = zzStartRead; /* invalidate buffer */\r\n\r\n if (zzReader != null)\r\n zzReader.close();\r\n }",
"public final void yyclose() throws java.io.IOException {\r\n zzAtEOF = true; /* indicate end of file */\r\n zzEndRead = zzStartRead; /* invalidate buffer */\r\n\r\n if (zzReader != null)\r\n zzReader.close();\r\n }",
"public final void yyclose() throws java.io.IOException {\r\n zzAtEOF = true; /* indicate end of file */\r\n zzEndRead = zzStartRead; /* invalidate buffer */\r\n\r\n if (zzReader != null)\r\n zzReader.close();\r\n }",
"public final void yyclose() throws java.io.IOException {\r\n zzAtEOF = true; /* indicate end of file */\r\n zzEndRead = zzStartRead; /* invalidate buffer */\r\n\r\n if (zzReader != null)\r\n zzReader.close();\r\n }",
"public final void yyclose() throws java.io.IOException {\r\n zzAtEOF = true; /* indicate end of file */\r\n zzEndRead = zzStartRead; /* invalidate buffer */\r\n\r\n if (zzReader != null)\r\n zzReader.close();\r\n }",
"public void closeFile(){\n\t\t\n\t\ttry{\n\n\t\t\tbufferedInput.close();\n\t\t}\n\t\tcatch(IOException ex) {\n \t\tSystem.err.println(\"Error: Some problem while closing file\");; \n\t\t\tSystem.exit(1); \n \t}\n\t}",
"public final void yyclose() throws java.io.IOException {\n\t\tzzAtEOF = true; /* indicate end of file */\n\t\tzzEndRead = zzStartRead; /* invalidate buffer */\n\n\t\tif (zzReader != null)\n\t\t\tzzReader.close();\n\t}",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public void close() throws IOException {\n source.close();\n }",
"public static void closeFile() {\n\t\tif (input != null)\n\t\t\tinput.close();\n\t\t\n\t}",
"final public void yyclose() throws java.io.IOException {\n yy_atEOF = true; /* indicate end of file */\n yy_endRead = yy_startRead; /* invalidate buffer */\n\n if (yy_reader != null)\n yy_reader.close();\n }",
"final public void yyclose() throws java.io.IOException {\n yy_atEOF = true; /* indicate end of file */\n yy_endRead = yy_startRead; /* invalidate buffer */\n\n if (yy_reader != null)\n yy_reader.close();\n }",
"private void closeInputFile() {\n try {\n fileInputStream.close();\n } catch (IOException ioException) {\n Log.d(LOG_TAG, \"closeInputFile (165): Error while closing input file.\");\n ioException.printStackTrace();\n this.finishedEncoding = true;\n }\n }",
"@Override\n\t public synchronized void close() throws IOException {\n\t\tout.close();\n\t\topen = false;\n\t }",
"public void close() throws IOException;",
"public void close() throws IOException;",
"public void close() throws IOException;",
"public void close() throws IOException;",
"public void close() throws IOException;",
"public void close() throws IOException;",
"public void close() throws IOException;",
"public void close() throws IOException;",
"public void close() {\n this.output.flush();\n this.output.close();\n }",
"public void close() throws IOException {\n\t\tif (keyClass != null) {\n\t\t keySerializer.close();\n\t\t valueSerializer.close();\n\t\t}\n\n\t\t// Write EOF_MARKER for key/value length\n\t\tWritableUtils.writeVInt(out, EOF_MARKER);\n\t\tWritableUtils.writeVInt(out, EOF_MARKER);\n\t\tdecompressedBytesWritten += 2 * WritableUtils.getVIntSize(EOF_MARKER);\n \n\t\t//Flush the stream\n\t\tout.flush();\n \n\t\tif (compressOutput) {\n\t\t // Flush\n\t\t compressedOut.finish();\n\t\t compressedOut.resetState();\n\t\t}\n \n\t\t// Close the underlying stream iff we own it...\n\t\tif (ownOutputStream) {\n\t\t out.close();\n\t\t}\n\t\telse {\n\t\t // Write the checksum\n\t\t checksumOut.finish();\n\t\t}\n\n\t\tcompressedBytesWritten = rawOut.getPos() - start;\n\n\t\tif (compressOutput) {\n\t\t // Return back the compressor\n\t\t CodecPool.returnCompressor(compressor);\n\t\t compressor = null;\n\t\t}\n\n\t\tout = null;\n\t\tif(writtenRecordsCounter != null) {\n\t\t writtenRecordsCounter.increment(numRecordsWritten);\n\t\t}\n\t }",
"private void close() {\n try {\n if (reader != null) {\n this.reader.close();\n }\n if (writer != null) {\n this.writer.close();\n }\n }\n catch (IOException e) {\n log.error(e);\n log.debug(Constants.STREAM_IS_CLOSED);\n }\n }",
"public void close() {\r\n\t\tflush();\r\n\t\ttry {\r\n\t\t\tdos.close();\r\n\t\t\ts.close();\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\r\n\t}",
"public void close ()\n {\n StreamHelper.flush (this);\n StreamHelper.close (m_aOS);\n m_aOS = null;\n }",
"@Override\n public void close() {\n backingIterator.close();\n outputBuffer.close();\n isClosed = true;\n }",
"protected void close()\n {\n out.close();\n }",
"public static void closeFile() throws IOException {\n\t\ttry {\n\t\t\tinput.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Could not close input file. Make sure it isn't open elsewhere.\");\n\t\t\tthrow e;\n\t\t}\t\t\n\t}",
"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 close() throws IOException {\n\t\tm_reader.close();\n\t}",
"@Override\n public void close() throws IOException {\n inputMessageStream.close();\n outputMessageStream.close();\n socket.close();\n }",
"public void close() throws IOException {\n reader.close();\n }",
"public void close(InputStream inputStream) {\n inputStream.close();\n }",
"@Override\n public void close() throws IOException\n {\n _out.close();\n }",
"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}",
"@Override\n public void close() throws IOException {\n isClosed = true;\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 protected void doClose() {\n FileUtil.closeSilent(this.in);\n this.recordFactory = null;\n this.geometryFactory = null;\n this.in = null;\n this.recordDefinition = null;\n this.resource = null;\n }",
"private void CloseInputAndOutputStreams() {\n if (mOut != null)\n mOut.close();\n\n if (mIn != null)\n try {\n mIn.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }",
"public void close(){\n\t\ttry {\n\t\t\tout.close();\n\t\t\tout = null;\n\t\t}\n\t\tcatch (IOException e){\n\t\t\tSystem.out.println(\"Problem closing file.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"public void close() throws IOException {\n\t\tout.flush();\n\t\tout.close();\n\t}",
"@Override\n\t\tpublic void close() throws IOException {\n\t\t\tout.close();\n\t\t}"
]
| [
"0.7759348",
"0.7442554",
"0.7431424",
"0.73467964",
"0.7202436",
"0.71076065",
"0.69819653",
"0.6875819",
"0.6849541",
"0.6823288",
"0.67786884",
"0.67334956",
"0.6719289",
"0.66913164",
"0.66824675",
"0.65635204",
"0.656225",
"0.65205383",
"0.6506908",
"0.6488402",
"0.64391965",
"0.6427573",
"0.6374822",
"0.636991",
"0.6355696",
"0.63488257",
"0.6332873",
"0.63288236",
"0.63178",
"0.63178",
"0.63178",
"0.63178",
"0.63178",
"0.63178",
"0.63178",
"0.63178",
"0.63178",
"0.63178",
"0.63178",
"0.63178",
"0.63178",
"0.63178",
"0.63178",
"0.63178",
"0.63178",
"0.63178",
"0.63178",
"0.63178",
"0.63178",
"0.63178",
"0.63178",
"0.63106686",
"0.63089395",
"0.6298559",
"0.6298559",
"0.62830967",
"0.62770796",
"0.62770796",
"0.62770796",
"0.62770796",
"0.62770796",
"0.62733686",
"0.62675434",
"0.6255954",
"0.6252387",
"0.62475795",
"0.6227085",
"0.6227085",
"0.6224305",
"0.6212209",
"0.62118995",
"0.62118995",
"0.62118995",
"0.62118995",
"0.62118995",
"0.62118995",
"0.62118995",
"0.62118995",
"0.61893886",
"0.61851287",
"0.61685884",
"0.6154595",
"0.61541855",
"0.61511856",
"0.6140531",
"0.6137095",
"0.6133407",
"0.6129735",
"0.61291736",
"0.6128519",
"0.61258763",
"0.6122652",
"0.61225355",
"0.61138636",
"0.61135393",
"0.60934144",
"0.6091656",
"0.6071652",
"0.60704255",
"0.6063343"
]
| 0.631258 | 51 |
Resets the scanner to read from a new input stream. Does not close the old reader. All internal variables are reset, the old input stream cannot be reused (internal buffer is discarded and lost). Lexical state is set to ZZ_INITIAL. Internal scan buffer is resized down to its initial length, if it has grown. | public final void yyreset(Reader reader) {
zzReader = reader;
zzAtBOL = true;
zzAtEOF = false;
zzEOFDone = false;
zzEndRead = zzStartRead = 0;
zzCurrentPos = zzMarkedPos = 0;
zzFinalHighSurrogate = 0;
yyline = yychar = yycolumn = 0;
zzLexicalState = YYINITIAL;
if (zzBuffer.length > ZZ_BUFFERSIZE)
zzBuffer = new char[ZZ_BUFFERSIZE];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n zzFinalHighSurrogate = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n if (zzBuffer.length > ZZ_BUFFERSIZE)\n zzBuffer = new char[ZZ_BUFFERSIZE];\n }",
"public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n zzFinalHighSurrogate = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n if (zzBuffer.length > ZZ_BUFFERSIZE)\n zzBuffer = new char[ZZ_BUFFERSIZE];\n }",
"public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n zzFinalHighSurrogate = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n if (zzBuffer.length > ZZ_BUFFERSIZE)\n zzBuffer = new char[ZZ_BUFFERSIZE];\n }",
"public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n zzFinalHighSurrogate = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n if (zzBuffer.length > ZZ_BUFFERSIZE)\n zzBuffer = new char[ZZ_BUFFERSIZE];\n }",
"public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n zzFinalHighSurrogate = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n if (zzBuffer.length > ZZ_BUFFERSIZE)\n zzBuffer = new char[ZZ_BUFFERSIZE];\n }",
"public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n zzFinalHighSurrogate = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n if (zzBuffer.length > ZZ_BUFFERSIZE)\n zzBuffer = new char[ZZ_BUFFERSIZE];\n }",
"public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n zzFinalHighSurrogate = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n if (zzBuffer.length > ZZ_BUFFERSIZE)\n zzBuffer = new char[ZZ_BUFFERSIZE];\n }",
"public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n zzFinalHighSurrogate = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n if (zzBuffer.length > ZZ_BUFFERSIZE)\n zzBuffer = new char[ZZ_BUFFERSIZE];\n }",
"public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n zzFinalHighSurrogate = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n if (zzBuffer.length > ZZ_BUFFERSIZE)\n zzBuffer = new char[ZZ_BUFFERSIZE];\n }",
"public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n zzFinalHighSurrogate = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n if (zzBuffer.length > ZZ_BUFFERSIZE)\n zzBuffer = new char[ZZ_BUFFERSIZE];\n }",
"public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n zzFinalHighSurrogate = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n if (zzBuffer.length > ZZ_BUFFERSIZE)\n zzBuffer = new char[ZZ_BUFFERSIZE];\n }",
"public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n zzFinalHighSurrogate = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n if (zzBuffer.length > ZZ_BUFFERSIZE)\n zzBuffer = new char[ZZ_BUFFERSIZE];\n }",
"public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n zzFinalHighSurrogate = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n if (zzBuffer.length > ZZ_BUFFERSIZE)\n zzBuffer = new char[ZZ_BUFFERSIZE];\n }",
"public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n zzFinalHighSurrogate = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n if (zzBuffer.length > ZZ_BUFFERSIZE)\n zzBuffer = new char[ZZ_BUFFERSIZE];\n }",
"public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n zzFinalHighSurrogate = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n if (zzBuffer.length > ZZ_BUFFERSIZE)\n zzBuffer = new char[ZZ_BUFFERSIZE];\n }",
"public final void yyreset(java.io.Reader reader) {\r\n zzReader = reader;\r\n zzAtBOL = true;\r\n zzAtEOF = false;\r\n zzEOFDone = false;\r\n zzEndRead = zzStartRead = 0;\r\n zzCurrentPos = zzMarkedPos = 0;\r\n zzFinalHighSurrogate = 0;\r\n yyline = yychar = yycolumn = 0;\r\n zzLexicalState = YYINITIAL;\r\n if (zzBuffer.length > ZZ_BUFFERSIZE)\r\n zzBuffer = new char[ZZ_BUFFERSIZE];\r\n }",
"public final void yyreset(java.io.Reader reader) {\r\n zzReader = reader;\r\n zzAtBOL = true;\r\n zzAtEOF = false;\r\n zzEOFDone = false;\r\n zzEndRead = zzStartRead = 0;\r\n zzCurrentPos = zzMarkedPos = 0;\r\n zzFinalHighSurrogate = 0;\r\n yyline = yychar = yycolumn = 0;\r\n zzLexicalState = YYINITIAL;\r\n if (zzBuffer.length > ZZ_BUFFERSIZE)\r\n zzBuffer = new char[ZZ_BUFFERSIZE];\r\n }",
"public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n zzFinalHighSurrogate = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n if (zzBuffer.length > ZZ_BUFFERSIZE)\n zzBuffer = new char[ZZ_BUFFERSIZE];\n }",
"private void resetScanner(SourcePosition start) {\n lastSourcePosition = start;\n scanner.setPosition(lastSourcePosition);\n }",
"public void reset(Reader input) {\n this.buffer.dispose();\n this.buffer = new ReaderBuffer(input);\n this.previousToken = null;\n this.lastMatch.clear();\n }",
"public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = zzPushbackPos = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n }",
"public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = zzPushbackPos = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n }",
"public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n }",
"public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n }",
"public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n }",
"public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n }",
"public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n }",
"public final void yyreset(java.io.Reader reader) {\r\n zzReader = reader;\r\n zzAtBOL = true;\r\n zzAtEOF = false;\r\n zzEOFDone = false;\r\n zzEndRead = zzStartRead = 0;\r\n zzCurrentPos = zzMarkedPos = 0;\r\n yyline = yychar = yycolumn = 0;\r\n zzLexicalState = YYINITIAL;\r\n }",
"public final void yyreset(java.io.Reader reader) {\r\n zzReader = reader;\r\n zzAtBOL = true;\r\n zzAtEOF = false;\r\n zzEOFDone = false;\r\n zzEndRead = zzStartRead = 0;\r\n zzCurrentPos = zzMarkedPos = 0;\r\n yyline = yychar = yycolumn = 0;\r\n zzLexicalState = YYINITIAL;\r\n }",
"public final void yyreset(java.io.Reader reader) {\r\n\t\t// 's' has been updated.\r\n\t\tzzBuffer = s.array;\r\n\t\t/*\r\n\t\t * We replaced the line below with the two below it because zzRefill\r\n\t\t * no longer \"refills\" the buffer (since the way we do it, it's always\r\n\t\t * \"full\" the first time through, since it points to the segment's\r\n\t\t * array). So, we assign zzEndRead here.\r\n\t\t */\r\n\t\t//zzStartRead = zzEndRead = s.offset;\r\n\t\tzzStartRead = s.offset;\r\n\t\tzzEndRead = zzStartRead + s.count - 1;\r\n\t\tzzCurrentPos = zzMarkedPos = s.offset;\r\n\t\tzzLexicalState = YYINITIAL;\r\n\t\tzzReader = reader;\r\n\t\tzzAtEOF = false;\r\n\t}",
"private final void yyResetPosition() {\n zzAtBOL = true;\n zzAtEOF = false;\n zzCurrentPos = 0;\n zzMarkedPos = 0;\n zzStartRead = 0;\n zzEndRead = 0;\n zzFinalHighSurrogate = 0;\n yyline = 0;\n yycolumn = 0;\n yychar = 0L;\n }",
"final public void yyreset(java.io.Reader reader) throws java.io.IOException {\n yyclose();\n yy_reader = reader;\n yy_atBOL = true;\n yy_atEOF = false;\n yy_endRead = yy_startRead = 0;\n yy_currentPos = yy_markedPos = yy_pushbackPos = 0;\n yyline = yychar = yycolumn = 0;\n yy_lexical_state = YYINITIAL;\n }",
"final public void yyreset(java.io.Reader reader) throws java.io.IOException {\n yyclose();\n yy_reader = reader;\n yy_atBOL = true;\n yy_atEOF = false;\n yy_endRead = yy_startRead = 0;\n yy_currentPos = yy_markedPos = yy_pushbackPos = 0;\n yyline = yychar = yycolumn = 0;\n yy_lexical_state = YYINITIAL;\n }",
"private final void yyResetPosition() {\n zzAtBOL = true;\n zzAtEOF = false;\n zzCurrentPos = 0;\n zzMarkedPos = 0;\n zzStartRead = 0;\n zzEndRead = 0;\n zzFinalHighSurrogate = 0;\n yyline = 0;\n yycolumn = 0;\n yychar = 0L;\n }",
"public final void yyreset(Reader reader) {\n\t\t// 's' has been updated.\n\t\tzzBuffer = s.array;\n\t\t/*\n\t\t * We replaced the line below with the two below it because zzRefill\n\t\t * no longer \"refills\" the buffer (since the way we do it, it's always\n\t\t * \"full\" the first time through, since it points to the segment's\n\t\t * array). So, we assign zzEndRead here.\n\t\t */\n\t\t//zzStartRead = zzEndRead = s.offset;\n\t\tzzStartRead = s.offset;\n\t\tzzEndRead = zzStartRead + s.count - 1;\n\t\tzzCurrentPos = zzMarkedPos = s.offset;\n\t\tzzLexicalState = YYINITIAL;\n\t\tzzReader = reader;\n\t\tzzAtBOL = true;\n\t\tzzAtEOF = false;\n\t}",
"public final void yyreset(Reader reader) {\n\t\t// 's' has been updated.\n\t\tzzBuffer = s.array;\n\t\t/*\n\t\t * We replaced the line below with the two below it because zzRefill\n\t\t * no longer \"refills\" the buffer (since the way we do it, it's always\n\t\t * \"full\" the first time through, since it points to the segment's\n\t\t * array). So, we assign zzEndRead here.\n\t\t */\n\t\t//zzStartRead = zzEndRead = s.offset;\n\t\tzzStartRead = s.offset;\n\t\tzzEndRead = zzStartRead + s.count - 1;\n\t\tzzCurrentPos = zzMarkedPos = s.offset;\n\t\tzzLexicalState = YYINITIAL;\n\t\tzzReader = reader;\n\t\tzzAtEOF = false;\n\t}",
"public void reset() {\r\n\t\tnextTokenPos = 0;\r\n\t}",
"public void reset() {\n try {\n is.reset();\n }catch(IOException ioe) {\n }\n }",
"public synchronized void reset() throws IOException {\n\t\t\tdata.seek(firstPosition);\n\t\t}",
"@Override\n public void reset() throws IOException {\n setPosition(startPosition);\n }",
"public synchronized void resetInputStream()\r\n\t{\r\n\t\tthis.inputStream = new BodyReusableServletInputStream(this.bodyBytes);\r\n\t\tthis.bufferedReader = new BufferedReader(new InputStreamReader(this.inputStream)); \r\n\t}",
"public static void init() {\n\t\tscanner = new Scanner(System.in);\n\t\treturn;\n\t}",
"public void rewind() throws IOException {\n if (closed) {\n throw new IOException(\"Stream is already closed\");\n }\n\n if (storeOutputStream != null) {\n storeOutputStream.close();\n storeOutputStream = null;\n }\n\n // Close the byte input stream or file input stream\n if (inputStream != originalInputStream) {\n inputStream.close();\n }\n\n bufferHighWaterMark = Math.max(bufferPointer, bufferHighWaterMark);\n bufferPointer = bufferHighWaterMark;\n\n if (bufferHighWaterMark > 0) {\n // If we have a buffer, then we'll read from it\n if (byteBuffer != null) {\n readingFromBuffer = true;\n inputStream = new UnsynchronizedByteArrayInputStream(byteBuffer, 0, bufferHighWaterMark);\n } else {\n // No buffer, which means we've switched to a file\n inputStream = new BufferedInputStream(new FileInputStream(storeFile));\n }\n } else {\n inputStream = originalInputStream;\n }\n }",
"public void reset() {\n\n operator.reset(); // reset Scan Operator\n }",
"void seekReset() {\n discardQueued(false);\n eofCond = false;\n stickyEofCond = false;\n blocked = false;\n sawCR = false;\n // FIXME: Change needed in Tcl\n //needNL = false;\n }",
"synchronized protected void rewind() {\n\t\ttry {\n\t\t\tais.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new CCSoundException(\"JSPCMAudioRecordingStream::rewind - Error closing the stream before reload\", e);\n\t\t}\n\t\tais = CCSoundIO.getAudioInputStream(meta.fileName());\n\t}",
"protected void fill() throws IOException {\n ensureOpen();\n len = in.read(buf, 0, buf.length);\n if (len == -1) {\n throw new EOFException(\"Unexpected end of ZLIB input stream\");\n }\n inf.setInput(buf, 0, len);\n }",
"@Override\n public void reset() {\n isDone = false;\n if (content.markSupported()) {\n try {\n content.reset();\n } catch (IOException ioe) {\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(\"Unable to reset the input stream: {}\", ioe.getMessage());\n }\n }\n\n content.mark(0);\n }\n super.reset();\n }",
"public Scanner(java.io.Reader in) {\r\n this.zzReader = in;\r\n }",
"public void reset () {\n input = 0;\n }",
"private void scan() {\n token = nextToken;\n nextToken = scanner.next();\n }",
"RmsLexer(java.io.Reader in) {\n this.zzReader = in;\n }",
"public Scanner(java.io.Reader in) {\n this.zzReader = in;\n }",
"public Scanner(java.io.Reader in) {\n this.zzReader = in;\n }",
"public synchronized void reset() {\n java.util.Arrays.fill(buffer, (byte) 0);\n writeHead = 0;\n cumulativeWritten = 0;\n synchronized (allReaders) {\n for (Reader reader : allReaders) {\n reader.reset();\n }\n }\n }",
"@Test(timeout = 4000)\n public void test137() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null);\n PipedInputStream pipedInputStream0 = new PipedInputStream();\n javaCharStream0.ReInit((InputStream) pipedInputStream0, 122, 122);\n assertEquals((-1), javaCharStream0.bufpos);\n }",
"public void reset() {\n bytes.reset();\n bytes.readVariableLengthInt();\n }",
"protected final void resetBuffer() {\n buffer.reset();\n }",
"void seekReset() {\n\t\tcancelEof();\n\t\tsawEofChar = false;\n\t}",
"public void resetBuffer(){\n bufferSet = false;\n init();\n }",
"public Scanner(InputStream inStream)\n {\n in = new BufferedReader(new InputStreamReader(inStream));\n eof = false;\n getNextChar();\n }",
"@Override\n\tpublic void reset() {\n\t\tthis.buffer = new String();\n\t}",
"public void reset() {\r\n\t\tcursor = mark;\r\n\t}",
"public void resetBuffer() {\n\n\t}",
"protected void resetIO()\r\n {\r\n // Clear out all the stream history stuff\r\n tcIn = null;\r\n tcOut = null;\r\n tcInBuf = null;\r\n\r\n // Make sure these are history-wrapped\r\n SystemIOUtilities.out().clearHistory();\r\n SystemIOUtilities.err().clearHistory();\r\n SystemIOUtilities.restoreSystemIn();\r\n }",
"public void reset()\n {\n currentPosition = 0;\n }",
"public void reset()\n {\n myOffset = 0;\n amIInsideDoubleQuotes = false;\n amIInsideSingleQuotes = false;\n myCurrLexeme = null;\n }",
"public void setScan(InputStream inStream){\t\t\n\t\tthis.scan = new Scanner (inStream);\t\t\t\t\t\n\t}",
"private void rewind() {\n currentPos = markPos;\n }",
"public void reset()\n {\n current = 0;\n highWaterMark = 0;\n lowWaterMark = 0;\n super.reset();\n }",
"private void resetIterator() {\n\t\titerator = head;\n\t}",
"public void reset () {\n\t\topen();\n\t\ttry {\n\t\t\tcontainer.setLength(0);\n\t\t\treservedBitMap.setLength(0);\n\t\t\tupdatedBitMap.setLength(0);\n\t\t\tfreeList.setLength(0);\n\t\t\tsize = 0;\n\t\t}\n\t\tcatch (IOException ie) {\n\t\t\tthrow new WrappingRuntimeException(ie);\n\t\t}\n\t}",
"public synchronized void reset() throws IOException {\n super.reset();\n if(!iMaxSet) {\n iMaximum = available();\n }\n iRemainder = iMaximum;\n }",
"Lexer(java.io.Reader in) {\n this.zzReader = in;\n }",
"Lexer(java.io.Reader in) {\n this.zzReader = in;\n }",
"public Lexer(java.io.Reader in) {\r\n this.zzReader = in;\r\n }",
"private void resetBuffer() {\n baos.reset();\n }",
"private void reset() throws IOException {\n }",
"@Override\n\tpublic synchronized void reset() {\n\t\tiOBuffer.reset();\n\t}",
"private void resetToHtmlInitial() {\n int i = 0;\n for (i = 0; i < zzEndRead; i++) {\n if (!Character.isWhitespace(zzBuffer.charAt(i))) break;\n }\n reset(zzBuffer, i, zzEndRead, HTML_INITIAL);\n }",
"@Test\n public void testReset() throws IOException {\n String output = singleLineFileInit(file, Charsets.UTF_8);\n\n PositionTracker tracker = new DurablePositionTracker(meta, file.getPath());\n ResettableInputStream in = new ResettableFileInputStream(file, tracker);\n\n String result1 = readLine(in, output.length());\n assertEquals(output, result1);\n\n in.reset();\n String result2 = readLine(in, output.length());\n assertEquals(output, result2);\n\n String result3 = readLine(in, output.length());\n assertNull(\"Should be null: \" + result3, result3);\n\n in.close();\n }",
"public void restart_lookahead() throws Exception {\r\n for (int i = 1; i < error_sync_size(); i++) {\r\n Symbol[] symbolArr = this.lookahead;\r\n symbolArr[i - 1] = symbolArr[i];\r\n }\r\n this.cur_token = scan();\r\n this.lookahead[error_sync_size() - 1] = this.cur_token;\r\n this.lookahead_pos = 0;\r\n }",
"void reset() throws IOException;",
"void reset() throws IOException;",
"public void reset(){\n this.context.msr.setReadyForInput(false);\n emptyAllInputBuffers();\n emptyAllOutputBuffers();\n emptyEngineersConsoleBuffer();\n }",
"private static void scan() {\n\t\tt = la;\n\t\tla = Scanner.next();\n\t\tla.toString();\n\t\tsym = la.kind;\n\t}",
"public void reset() {\n this.index = this.startIndex;\n }",
"public void reset() {\n started = false;\n flushing = false;\n moreText = true;\n headerCount = 0;\n actualLen = 0;\n }",
"@Test(timeout = 4000)\n public void test131() throws Throwable {\n StringReader stringReader0 = new StringReader(\"QXw?YE]We2j)\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 754, 5, 5);\n javaCharStream0.ReInit((Reader) stringReader0, 754, 754);\n assertEquals((-1), javaCharStream0.bufpos);\n }",
"public void init() throws IOException {\n restart(scan.getStartRow());\n }",
"private void reset() {\n // Reset to the inital state.\n command = null;\n headers = new DefaultHeaders();\n body = null;\n currentDecodedByteCount = 0;\n totalDecodedByteCount = 0;\n }",
"public final void rewind() {\n branch = 0;\n }",
"public void resetDFA() {\n currentState = State.START;\n }",
"public final void resetDataBuffer() {\n dataBuffer_.resetReaderIndex();\n lastValidBytePosition_ = 0;\n currentRowPosition_ = 0;\n nextRowPosition_ = 0;\n setAllRowsReceivedFromServer(false);\n }",
"public _RestFlexLexer(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }",
"public void reset() {\n\t\tinit(0, 0, 1, false);\n\t}",
"public synchronized void reset() {\n }",
"public Scanner(String inString)\n {\n in = new BufferedReader(new StringReader(inString));\n eof = false;\n getNextChar();\n }",
"@Override\r\n\tpublic void reset() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t\tthis.guessHistory.clear();\r\n\t}",
"private void syncPerlLexer() {\n myPerlLexer.setTokenEnd(getTokenEnd());\n }"
]
| [
"0.6719508",
"0.6719508",
"0.6719508",
"0.6719508",
"0.6719508",
"0.6719508",
"0.6719508",
"0.6719508",
"0.6719508",
"0.6719508",
"0.6719508",
"0.6719508",
"0.6719508",
"0.6719508",
"0.6719508",
"0.6696548",
"0.6696548",
"0.6693055",
"0.65405834",
"0.6492",
"0.6352284",
"0.6352284",
"0.63502705",
"0.63502705",
"0.63502705",
"0.63502705",
"0.63502705",
"0.6330631",
"0.6330631",
"0.6078845",
"0.60675645",
"0.60655695",
"0.60655695",
"0.6060627",
"0.605474",
"0.6019814",
"0.6017105",
"0.59406084",
"0.5858823",
"0.58478564",
"0.5817534",
"0.5807654",
"0.5781623",
"0.5776643",
"0.57419205",
"0.5708019",
"0.5636905",
"0.5630969",
"0.5588594",
"0.55840236",
"0.5581717",
"0.55798453",
"0.5574687",
"0.5574687",
"0.5556669",
"0.5539419",
"0.5534277",
"0.5506902",
"0.5504529",
"0.54784334",
"0.54491186",
"0.54346806",
"0.5392015",
"0.5368245",
"0.5361062",
"0.53255004",
"0.5312277",
"0.5301255",
"0.5287428",
"0.52845573",
"0.5278195",
"0.5259845",
"0.525741",
"0.5252521",
"0.5252521",
"0.5247282",
"0.52395284",
"0.5217136",
"0.5193209",
"0.5181731",
"0.5139013",
"0.5137978",
"0.5126708",
"0.5126708",
"0.51163447",
"0.51130605",
"0.5110731",
"0.5101448",
"0.5095614",
"0.50790197",
"0.5066214",
"0.5065663",
"0.506423",
"0.50554144",
"0.50353146",
"0.5011371",
"0.50016826",
"0.5001134",
"0.4993574",
"0.49868765"
]
| 0.66856056 | 18 |
Returns the current lexical state. | public final int yystate() {
return zzLexicalState;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public LexerState getState() {\n\t\treturn state;\n\t}",
"public String getCurrentState() {\n\t\treturn currentState;\n\t}",
"public TSLexerState getState() {\r\n \t\treturn state;\r\n \t}",
"final public int yystate() {\n return yy_lexical_state;\n }",
"final public int yystate() {\n return yy_lexical_state;\n }",
"public TurtleState getCurrentState() {\n\t\treturn states.peek();\n\t}",
"public interface LexicalStates\n{\n\t/** lexical states */\n\tpublic static final int LEX_NORMAL =\t\t10; /* normal code (ie not within \"...\") */\n\tpublic static final int LEX_INTERPNORMAL = 9; /* code within a string, eg \"$foo[$x+1]\" */\n\tpublic static final int LEX_INTERPCASEMOD = 8; /* expecting a \\U, \\Q or \\E etc */\n\tpublic static final int LEX_INTERPPUSH =\t 7; /* starting a new sublex parse level */\n\tpublic static final int LEX_INTERPSTART\t= \t 6; /* expecting the start of a $var */\n\n\t/* at end of code, eg \"$x\" followed by: */\n\tpublic static final int LEX_INTERPEND = \t 5; /* ... eg not one of [, { or -> */\n\tpublic static final int LEX_INTERPENDMAYBE = 4; /* ... eg one of [, { or -> */\n\n\tpublic static final int LEX_INTERPCONCAT =\t 3; /* expecting anything, eg at start of\n\t\t\t\t\tstring or after \\E, $foo, etc */\n\tpublic static final int LEX_INTERPCONST =\t 2; /* NOT USED */\n\tpublic static final int LEX_FORMLINE =\t\t 1; /* expecting a format line */\n\tpublic static final int LEX_KNOWNEXT =\t\t 0; /* next token known; just return it */\n\n}",
"public java.lang.String getState () {\n\t\treturn state;\n\t}",
"public final int yystate() {\r\n return zzLexicalState;\r\n }",
"public final int yystate() {\r\n return zzLexicalState;\r\n }",
"public final int yystate() {\r\n return zzLexicalState;\r\n }",
"public final int yystate() {\r\n return zzLexicalState;\r\n }",
"public final int yystate() {\r\n return zzLexicalState;\r\n }",
"public S getCurrentState();",
"public final int yystate() {\n return zzLexicalState;\n }",
"public java.lang.CharSequence getState() {\n return state;\n }",
"public final int yystate() {\n\t\treturn zzLexicalState;\n\t}",
"public int getState()\r\n\t{\r\n\t\treturn currentstate;\r\n\t}",
"public java.lang.CharSequence getState() {\n return state;\n }",
"String getCurrentState() {\n return context.getString(allStates[currentIdx]);\n }",
"public State getCurrentState() {\n \t\treturn currentState;\n \t}",
"public State getCurrentState() {\n\t\treturn currentState;\n\t}",
"public State getCurrentState() {\n\t\treturn currentState;\n\t}",
"public java.lang.String getState() {\r\n return state;\r\n }",
"public S getState() {\r\n\t\treturn state;\r\n\t}",
"public java.lang.String getState() {\n return state;\n }",
"public java.lang.String getState() {\n return state;\n }",
"public String getStateToken() {\n\t\treturn stateToken;\n\t}",
"public java.lang.String getState() {\n return State;\n }",
"public final char getState() {\n\t\treturn _state;\n\t}",
"public String getState() {\n\t\treturn state;\n\t}",
"public State getCurrentState() {\n return currentState;\n }",
"public String getState()\n\t{\n\t\treturn state;\n\t}",
"java.lang.String getState();",
"public String getState() \n\t{\n\t\treturn state;\n\t}",
"public S getState() {\n return currentState;\n }",
"public String getState() {\r\n\t\treturn state;\r\n\t}",
"public String getState() {\r\n\t\treturn state;\r\n\t}",
"public String getState() {\r\n\t\treturn state;\r\n\t}",
"@AutoEscape\n\tpublic String getState();",
"public String getState()\r\n\t{\r\n\t\treturn state;\r\n\t}",
"public String getState()\r\n\t{\r\n\t\treturn state;\r\n\t}",
"public STATE getState() {\n\t\n\t\treturn state;\n\t}",
"public State getState() {\n\t\treturn state;\n\t}",
"public State getState() {\n\t\treturn state;\n\t}",
"public String getState() {\r\n\t\treturn state;\t\t\r\n\t}",
"String getState();",
"String getState();",
"String getState();",
"public static States getState() {\r\n\t\treturn currentState;\r\n\t}",
"public int getCurrentState() {\n return myState;\n }",
"public String state() {\n return this.state;\n }",
"public String state() {\n return this.state;\n }",
"public String getState() {\n\t\treturn state.toString();\n\t}",
"public String getState()\n {\n \treturn state;\n }",
"public String getState() {\n\t\treturn State;\n\t}",
"public String getState()\n\t{\n\t\treturn State;\n\t\t\n\t}",
"public State getState();",
"public State getState();",
"public String getState() {\n return state;\n }",
"public String getState() {\n return state;\n }",
"public String getState() {\n return state;\n }"
]
| [
"0.777735",
"0.7045248",
"0.69731486",
"0.69486177",
"0.69486177",
"0.6926388",
"0.68727165",
"0.6855888",
"0.6828191",
"0.6828191",
"0.6828191",
"0.6828191",
"0.6828191",
"0.68169594",
"0.6794179",
"0.6780457",
"0.67754173",
"0.6752172",
"0.6720868",
"0.66741174",
"0.65927356",
"0.6583865",
"0.6583865",
"0.6559515",
"0.65509236",
"0.6549206",
"0.6549206",
"0.6487395",
"0.6481853",
"0.64811754",
"0.6453403",
"0.6452989",
"0.6444753",
"0.6442819",
"0.64422286",
"0.64322335",
"0.642815",
"0.642815",
"0.642815",
"0.64205277",
"0.64189065",
"0.64189065",
"0.6395655",
"0.63911563",
"0.63911563",
"0.6385675",
"0.6378763",
"0.6378763",
"0.6378763",
"0.6362729",
"0.6356979",
"0.63490087",
"0.63490087",
"0.6346223",
"0.6332672",
"0.6329203",
"0.6322009",
"0.6307191",
"0.6307191",
"0.62789536",
"0.62789536",
"0.62789536"
]
| 0.68280005 | 43 |
Enters a new lexical state | public final void yybegin(int newState) {
zzLexicalState = newState;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final void yybegin(int newState) {\r\n zzLexicalState = newState;\r\n }",
"public final void yybegin(int newState) {\r\n zzLexicalState = newState;\r\n }",
"public final void yybegin(int newState) {\r\n zzLexicalState = newState;\r\n }",
"public final void yybegin(int newState) {\r\n zzLexicalState = newState;\r\n }",
"public final void yybegin(int newState) {\r\n zzLexicalState = newState;\r\n }",
"public final void yybegin(int newState) {\n zzLexicalState = newState;\n }",
"final public void yybegin(int newState) {\n yy_lexical_state = newState;\n }",
"final public void yybegin(int newState) {\n yy_lexical_state = newState;\n }",
"public final void yybegin(int newState) {\n\t\tzzLexicalState = newState;\n\t}",
"public void SwitchTo(int lexState)\n{\n if (lexState >= 1 || lexState < 0)\n throw new TokenMgrError(\"Error: Ignoring invalid lexical state : \" + lexState + \". State unchanged.\", TokenMgrError.INVALID_LEXICAL_STATE);\n else\n curLexState = lexState;\n}",
"public void SwitchTo(int lexState)\n{\n if (lexState >= 4 || lexState < 0)\n throw new TokenMgrError(\"Error: Ignoring invalid lexical state : \" + lexState + \". State unchanged.\", TokenMgrError.INVALID_LEXICAL_STATE);\n else\n curLexState = lexState;\n}",
"static public void SwitchTo(int lexState)\n{\n if (lexState >= 2 || lexState < 0)\n throw new TokenMgrError(\"Error: Ignoring invalid lexical state : \" + lexState + \". State unchanged.\", TokenMgrError.INVALID_LEXICAL_STATE);\n else\n curLexState = lexState;\n}",
"static public void SwitchTo(int lexState)\n {\n if (lexState >= 3 || lexState < 0)\n throw new TokenMgrError(\"Error: Ignoring invalid lexical state : \" + lexState + \". State unchanged.\", TokenMgrError.INVALID_LEXICAL_STATE);\n else\n curLexState = lexState;\n }",
"private void start() {\n getDispenser().advance();\n if (getDispenser().tokenIsNumber()) setState(State.NUMBER); \n else if (getDispenser().tokenIsLeftParen()) setState(State.LEFT_PAREN);\n else syntaxError(NUM_OR_LEFT_PAREN);\n }",
"public void SwitchTo(int lexState)\n {\n if (lexState >= 4 || lexState < 0)\n throw new TokenMgrError(\"Error: Ignoring invalid lexical state : \" + lexState + \". State unchanged.\", TokenMgrError.INVALID_LEXICAL_STATE);\n else\n curLexState = lexState;\n }",
"static public void SwitchTo(int lexState) {\n if (lexState >= 2 || lexState < 0)\n throw new TokenMgrError(\"Error: Ignoring invalid lexical state : \" + lexState + \". State unchanged.\", TokenMgrError.INVALID_LEXICAL_STATE);\n else\n curLexState = lexState;\n }",
"public SLR1_automat.State next_state(String symbol) throws Exception;",
"public interface LexicalStates\n{\n\t/** lexical states */\n\tpublic static final int LEX_NORMAL =\t\t10; /* normal code (ie not within \"...\") */\n\tpublic static final int LEX_INTERPNORMAL = 9; /* code within a string, eg \"$foo[$x+1]\" */\n\tpublic static final int LEX_INTERPCASEMOD = 8; /* expecting a \\U, \\Q or \\E etc */\n\tpublic static final int LEX_INTERPPUSH =\t 7; /* starting a new sublex parse level */\n\tpublic static final int LEX_INTERPSTART\t= \t 6; /* expecting the start of a $var */\n\n\t/* at end of code, eg \"$x\" followed by: */\n\tpublic static final int LEX_INTERPEND = \t 5; /* ... eg not one of [, { or -> */\n\tpublic static final int LEX_INTERPENDMAYBE = 4; /* ... eg one of [, { or -> */\n\n\tpublic static final int LEX_INTERPCONCAT =\t 3; /* expecting anything, eg at start of\n\t\t\t\t\tstring or after \\E, $foo, etc */\n\tpublic static final int LEX_INTERPCONST =\t 2; /* NOT USED */\n\tpublic static final int LEX_FORMLINE =\t\t 1; /* expecting a format line */\n\tpublic static final int LEX_KNOWNEXT =\t\t 0; /* next token known; just return it */\n\n}",
"static void EnterScope(){\r\n\t\tcurLevel++;\r\n\t\tScope scope = new Scope(curLevel);\r\n\t\t//scope.nextAdr = 3;\r\n\t\ttopScope.ant = scope;\r\n\t\tscope.sig = topScope; \r\n\t\ttopScope = scope;\r\n }",
"public void enterScope(){\n\t\tscope.add(0, new ArrayList<SymbolEntry>());\n\t\t++scopeLevel;\n\t}",
"public void enterBlock(CymbolParser.BlockContext ctx) {\n currentScope = new LocalScope(currentScope);\n saveScope(ctx, currentScope);\n }",
"public void add_switch(String symbol, SLR1_automat.State state) throws Exception;",
"public void pushState( TurtleState state ) {\n\t\tstates.push( state );\n\t}",
"@Override\r\n\tpublic void addState(String nextToken) {\r\n\t\tNFAState s = checkIfExists(nextToken);\r\n\t\tif (s == null) {\r\n\t\t\tstates.add(new NFAState(nextToken));\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Error: this state already exists.\");\r\n\t\t}\r\n\t}",
"public void enterNormalState() {\n\n\t}",
"public void enterHatchingState() {\n\n\t}",
"@Override\n\tpublic void addStartState(String name) {\n\t\tNFAState s = checkIfExists(name);\n\t\tif(s == null){\n\t\t\ts = new NFAState(name);\n\t\t\taddState(s);\n\t\t} else {\n\t\t\tSystem.out.println(\"WARNING: A state with name \" + name + \" already exists in the NFA\");\n\t\t}\n\t\tstart = s;\n\t\t\n\t}",
"public ATNState newState(GrammarAST node) {\n ATNState n = new BasicState();\n if (currentRule != null) {\n n.setRuleIndex(currentRule.index);\n }\n atn.addState(n);\n return n;\n }",
"public void applyNewState() {\n this.setAlive(this.newState);\n }",
"void nextState();",
"@Override\n\tpublic void enterStart(AplusplusParser.StartContext ctx) {\n\t\tglobalScope = new GlobalScope();\n\t\tcurrentScope = globalScope;\n\t\tsaveScope(ctx, currentScope);\n\t}",
"private InterpreterState(final String statename) {\n name = statename;\n }",
"public abstract ALRState<I> goTo(Symbol symbol);",
"State(Main aMain) {\n\tmain = aMain;\n\tback = Integer.parseInt(main.myProps.getProperty(\"yesterdays\"));\n\tfront = Integer.parseInt(main.myProps.getProperty(\"tomorrows\"));\n\tmaps = new Hashtable();\n availWeath = new Hashtable();\n\n main.myFrw.listen(new MapListener(), ScaledMap.TYPE, null);\n main.myFrw.announce(this);\n stateDoc = Framework.parse(main.myPath + \"state.xml\", \"state\");\n availWeath = loadFromDoc();\n }",
"public void storeState(StateInfo stateInfo) {\n \n// Thread.dumpStack();\n super.storeState(stateInfo); \n \n JJStateInfo info = (JJStateInfo) stateInfo;\n info.setSubStates(lexan.getStateInfo());\n \n if (DEBUG) debug.println(\"Storing state [\"+ offset + \",\" + tokenOffset + \"]: \" + info + \"@\" + stopOffset); // NOI18N\n \n }",
"public void setState(LexerState state) {\n\t\tif (state == null) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tthis.state = state;\n\t}",
"public void setState(LexerState state) {\n\t\tif (state == null) {\n\t\t\tthrow new IllegalArgumentException(\"State cannot be \" + state);\n\t\t}\n\t\tthis.state = state;\n\t}",
"protected void sequence_State(ISerializationContext context, State semanticObject) {\r\n\t\tif (errorAcceptor != null) {\r\n\t\t\tif (transientValues.isValueTransient(semanticObject, TP1_EMPackage.Literals.STATE__NAME) == ValueTransient.YES)\r\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TP1_EMPackage.Literals.STATE__NAME));\r\n\t\t}\r\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\r\n\t\tfeeder.accept(grammarAccess.getStateAccess().getNameEStringParserRuleCall_2_0(), semanticObject.getName());\r\n\t\tfeeder.finish();\r\n\t}",
"public State(String name) {\n\t\tthis.name = name;\n\t\tif (name.endsWith(\"a\")) {\n\t\t\tsetAccepting();\n\t\t} else if (name.endsWith(\"d\")) {\n\t\t\tsetDeclining();\n\t\t} else if (name.endsWith(\"f\")) {\n\t\t\tsetFinal(true);\n\t\t}\n\t}",
"protected void enter() {\n \tresult.setForeground(red);\n \tif (entered == true) {\n \t\tshow(current);\n \t}\n \tentered = true;\n \tstack.add(current);\n \tcurrent = 0;\n }",
"public static void parse()\r\n {\r\n int initial;\r\n initial=expression();\r\n stateList.get(0).setNext1(initial);\r\n stateList.get(0).setNext2(initial);\r\n if(index<=expression.length()-1)\r\n {\r\n error();\r\n }\r\n else\r\n {\r\n state st=new state(state,\"END\",-1,-1);\r\n stateList.add(st);\r\n }\r\n }",
"public void getState();",
"private LRState createStartState(final Grammar grammar) {\n final Production production = grammar.getStartProduction();\n final HashSet<Symbol> terminalSymbols = new HashSet<>();\n terminalSymbols.add(END_SYMBOL);\n final LRItem startItem = new LRItem(production, 0, terminalSymbols);\n return new LRState(Arrays.asList(new LRItem[] { startItem }), 0);\n }",
"public void enter();",
"synchronized void advanceState()\n {\n state = state.advance();\n notifyAll();\n }",
"public LexerState getState() {\n\t\treturn state;\n\t}",
"LabState state();",
"public void setState(int synstate){\n\tsynState = synstate;\n }",
"public void FSMProcess(String currentInput) throws BadInputException{\n if (contentsMap.containsKey(currentState + currentInput)) {\n System.out.print(contentsMap.get(currentState + currentInput).getOutputSymbol());\n this.currentState = contentsMap.get(currentState + currentInput).getNextState();\n }\n else throw new BadInputException();\n }",
"public DFAState(String name) {\n this.name = name;\n this.hashCode = name.hashCode();\n }",
"public State next () { return nextState(); }",
"public void setState (int philosphoer, String state){\n currentState[philosphoer] = state;\n }",
"private void enterRules()\n {\n String ruleString = ruleTextField.getText();\n transition.buildRulesFromString(ruleString);\n ruleString = transition.buildStringFromRules();\n ruleTextField.setText(ruleString);\n optionsPanel.getWorkspacePanel().requestFocusInWindow();\n optionsPanel.getWorkspacePanel().repaint();\n // Daniel didn't like this automatic switching any more.\n // optionsPanel.getWorkspacePanel().setTool(LMWorkspacePanel.SELECT_TOOL);\n }",
"@Override\n\tpublic void addState(String name) {\n\t\tNFAState s = checkIfExists(name);\n\t\tif( s == null){\n\t\t\ts = new NFAState(name);\n\t\t\taddState(s);\n\t\t} else {\n\t\t\tSystem.out.println(\"WARNING: A state with name \" + name + \" already exists in the NFA\");\n\t\t}\n\t\t\n\t}",
"void enter();",
"public void setCameFrom(State n)\r\n\t{\r\n\t\tthis.previousState = new State(n);\r\n\t}",
"@Override\n public void setState(String s)\n {\n state = s;\n nbChanges++;\n }",
"public void Activate() {\n state.Activate();\n }",
"public void next()\r\n\t{\r\n\t\tif(state<3)\r\n\t\t\tstate++;\r\n\t\telse\r\n\t\t\tstate=1;\r\n\t}",
"public ExecuteState() {\r\n PrevPC = 0;\r\n ChangedLoc = -1;\r\n OldInst = new CodeBlueInstruction();\r\n }",
"@Override\r\n\tpublic void enter() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void nextState() {\n\t\t\r\n\t}"
]
| [
"0.73873174",
"0.73873174",
"0.73873174",
"0.73873174",
"0.73873174",
"0.72941506",
"0.7226648",
"0.7226648",
"0.71508276",
"0.67628527",
"0.675286",
"0.66516984",
"0.62365973",
"0.6181515",
"0.61330837",
"0.6028637",
"0.6020987",
"0.59391516",
"0.59199816",
"0.5890798",
"0.5875512",
"0.58046514",
"0.57238895",
"0.57177275",
"0.5656443",
"0.5620161",
"0.5614717",
"0.5598218",
"0.5589737",
"0.5581988",
"0.5566714",
"0.5546274",
"0.55406994",
"0.5533377",
"0.552367",
"0.550816",
"0.5502893",
"0.55012566",
"0.5456661",
"0.5451478",
"0.5435046",
"0.5416135",
"0.54146284",
"0.5400702",
"0.53828895",
"0.53801304",
"0.5365147",
"0.5350195",
"0.5311098",
"0.5308529",
"0.52941406",
"0.52824825",
"0.5277627",
"0.52679616",
"0.5262274",
"0.5258218",
"0.5254931",
"0.52547026",
"0.5254015",
"0.52511466",
"0.5245394",
"0.52409154"
]
| 0.734593 | 42 |
Returns the text matched by the current regular expression. | public final String yytext() {
return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getRegularExpression() {\n\t\treturn enteredText;\n\t}",
"java.lang.String getRegex();",
"java.lang.String getRegex();",
"@Override\r\n\tpublic String getMatch() {\n\t\treturn match;\r\n\t}",
"public String getRegex();",
"public String getRegEx();",
"public String getMatched() {\r\n\t\treturn matched;\r\n\t}",
"public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }",
"public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }",
"public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }",
"public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }",
"public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }",
"public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }",
"public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }",
"public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }",
"public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }",
"public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }",
"public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }",
"public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }",
"public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }",
"public String getMatchRegex() {\n return matchRegex;\n }",
"public String apply(TregexMatcher tregexMatcher)\n/* */ {\n/* 275 */ return this.result;\n/* */ }",
"public static String getAfterRegex(String text, String regex) {\n\t\tMatcher textMatcher = Pattern.compile(regex).matcher(text);\n\t\ttextMatcher.find();\n\t\tint foundI = textMatcher.end();\n\t\tif (sb == null) {\n\t\t\tsb = new StringBuilder();\n\t\t}\n\t\tchar[] chars = text.toCharArray();\n\t\tfor (int i=foundI; i<chars.length; i++) {\n\t\t\tsb.append(chars[i]);\n\t\t}\n\t\tString tokens = sb.toString();\n\t\tsb.setLength(0);\n\t\treturn tokens;\n\t}",
"public final String getRegex() {\n\t\treturn JsUtils.getNativePropertyString(this, \"regex\");\n\t}",
"public String getRegEx() {\r\n return regex;\r\n }",
"public final String yytext() {\n\t\treturn new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );\n\t}",
"public java.lang.String getRegex() {\n java.lang.Object ref = regex_;\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 regex_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getRegex() {\n java.lang.Object ref = regex_;\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 regex_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.Short getRegexMatch() {\r\n return regexMatch;\r\n }",
"public final String yytext() {\n return new String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead);\n }",
"public java.lang.String getGet() {\n java.lang.String ref = \"\";\n if (patternCase_ == 2) {\n ref = (java.lang.String) pattern_;\n }\n return ref;\n }",
"public final String yytext() {\r\n return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );\r\n }",
"public final String yytext() {\r\n return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );\r\n }",
"public final String yytext() {\r\n return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );\r\n }",
"public final String yytext() {\r\n return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );\r\n }",
"public final String yytext() {\r\n return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );\r\n }",
"public final String yytext() {\n return new String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead);\n }",
"public P getText() {\n return this.slp.getProduction(text);\n }",
"public final String yytext() {\n return new String(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead);\n }",
"final public String yytext() {\n return new String( yy_buffer, yy_startRead, yy_markedPos-yy_startRead );\n }",
"final public String yytext() {\n return new String( yy_buffer, yy_startRead, yy_markedPos-yy_startRead );\n }",
"public String getSourceText() {\n\t\treturn getSource().replaceAll(\"<a.*>(.*)</a>\", \"$1\");\n\t}",
"public String getTextInCurrentElement() throws ParseException {\n int lessThan = html.lastIndexOf(\"<\", position);\n if (lessThan == -1) {\n throw new ParseException(\"Cannot find text in current element\", position);\n }\n position = lessThan;\n String tag = findCurrentTag(html, position);\n return getTextInNextElement(tag);\n }",
"private ReaderWorld() {\r\n pattern = Pattern.compile(regularExpression);\r\n matcher = pattern.matcher(getText());\r\n }",
"public String returnRegex() {\n\t\tString chosenRegex;\n\t\tSystem.out.println(\"selectedRegex value is: \" + selectedRegex);\n\t\tswitch (selectedRegex) {\n\t\tcase 1:\n\t\t\tchosenRegex = \"(\\\\&?\\\\??t=\\\\d*?[h]?\\\\d*[m]?\\\\d*[s]|\\\\&t=\\\\d*)\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tchosenRegex = \"(\\\\&list=[a-zA-Z 0-9 -]+\\\\&?index=?\\\\d+?)\";\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tchosenRegex = \"(\\\\&feature=youtu.be)\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tchosenRegex = \"\\\\?t.*|\\\\&t.*|\\\\&l.*|\\\\&f.*\"; // alternative:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// (\\\\&?\\\\??t=\\\\d*?[h]?\\\\d*[m]?\\\\d*[s]|\\\\&t=\\\\d*|\\\\&list=[a-zA-Z\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 0-9 -]*)\n\t\t\tbreak;\n\t\t}\n\t\tSystem.out.println(chosenRegex);\n\t\treturn chosenRegex;\n\t}",
"public String getText() {\n return text.getText();\n }",
"public String getText() {\n\t\treturn new XWPFWordExtractor(document).getText();\n\t}",
"@java.lang.Override\n public java.lang.String getRegex() {\n java.lang.Object ref = regex_;\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 regex_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getRegex() {\n java.lang.Object ref = regex_;\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 regex_ = s;\n return s;\n }\n }",
"public java.lang.String getRegexStr() {\r\n return regexStr;\r\n }",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"private String getStringMatching(final String input, final String regex) {\n\t\tLOGGER.debug(\"trying to locate a pattern {} in the input {}\", regex, input);\n\t\tPattern pattern = Pattern.compile(regex);\n\t\tString match = null;\n\t\tMatcher m = pattern.matcher(input);\n\t\twhile (m.find()) {\n\t\t\tfinal String matchingGroup = m.group().trim();\n\t\t\tif (matchingGroup.length() > 0) {\n\t\t\t\tmatch = matchingGroup;\n\t\t\t}\n\t\t}\n\t\treturn match;\n\t}",
"String getText();",
"String getText();",
"String getText();",
"String getText();",
"String getText();",
"String getText();",
"String getText();",
"public final String yytext() {\n return input.readText().toString();\n }",
"public String getTextOnPage()\n {\n return mainText.getText();\n }",
"Match getResultMatch();",
"@Nullable\n String getMatch() {\n if (getAnchorType() == STRING_LITERAL || getAnchorType() == CHAR_LITERAL) {\n // Remove quotes inserted by parboiled for completion suggestions\n String fullToken = _anchor.getLabel();\n if (fullToken.length() >= 2) { // remove surrounding quotes\n fullToken = fullToken.substring(1, fullToken.length() - 1);\n }\n return fullToken;\n }\n return null;\n }",
"public String getText()\n {\n return (this.text);\n }",
"protected abstract Regex pattern();",
"public String getPattern() {\r\n return this.currPattern;\r\n }",
"public String getSearchResultsText() {\n System.out.println(\"[step] getSearchResultsText\");\n return page.findElement(signSearch).getText();\n }",
"public MatchResult getResult() {\n return result;\n }",
"String text();",
"public String toString() {\n StringBuffer buffer = new StringBuffer();\n\n buffer.append(stringDfaMatcher);\n buffer.append(nfaMatcher);\n buffer.append(regExpMatcher);\n return buffer.toString();\n }",
"public String previewNextToken() {\r\n matcher.find();\r\n String nextOne = matcher.group();\r\n updateMatcher(); // Return matcher to its previous state\r\n return nextOne;\r\n }"
]
| [
"0.70918065",
"0.6484353",
"0.6484353",
"0.6231338",
"0.6081341",
"0.6011239",
"0.59774715",
"0.5966505",
"0.5966505",
"0.5966505",
"0.5966505",
"0.5966505",
"0.5966505",
"0.5966505",
"0.5966505",
"0.5966505",
"0.5966505",
"0.5966505",
"0.5966505",
"0.5966505",
"0.594106",
"0.58467793",
"0.57840997",
"0.5781989",
"0.5691061",
"0.56247616",
"0.56243914",
"0.562349",
"0.56010646",
"0.5586059",
"0.5563483",
"0.55582124",
"0.55582124",
"0.55582124",
"0.55582124",
"0.55582124",
"0.5550914",
"0.5549363",
"0.55393475",
"0.5517683",
"0.5517683",
"0.55167186",
"0.5508398",
"0.5448301",
"0.5437464",
"0.54361844",
"0.54159194",
"0.54098195",
"0.5408319",
"0.5388305",
"0.5375658",
"0.5375658",
"0.5375658",
"0.5375658",
"0.5375658",
"0.5375658",
"0.5375658",
"0.5375658",
"0.53742635",
"0.536935",
"0.536935",
"0.536935",
"0.536935",
"0.536935",
"0.536935",
"0.536935",
"0.53546596",
"0.5341025",
"0.5332981",
"0.5329512",
"0.5320878",
"0.53195256",
"0.5273523",
"0.5272645",
"0.52618897",
"0.5260471",
"0.5256495",
"0.5250461"
]
| 0.5595711 | 51 |
Returns the character at position pos from the matched text. It is equivalent to yytext().charAt(pos), but faster | public final char yycharat(int pos) {
return zzBuffer[zzStartRead+pos];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final char yycharat(int pos) {\n return input.readText().charAt(pos);\n }",
"public final char yycharat(int pos) {\n return zzBuffer.charAt(zzStartRead+pos);\n }",
"public final char yycharat(int pos) {\n return zzBuffer.charAt(zzStartRead+pos);\n }",
"public final char yycharat(int pos) {\n return zzBuffer.charAt(zzStartRead+pos);\n }",
"public final char yycharat(int pos) {\n return zzBuffer.charAt(zzStartRead+pos);\n }",
"public final char yycharat(int pos) {\n return zzBuffer.charAt(zzStartRead+pos);\n }",
"public final char yycharat(int pos) {\n return zzBuffer.charAt(zzStartRead+pos);\n }",
"public final char yycharat(int pos) {\n return zzBuffer.charAt(zzStartRead+pos);\n }",
"public final char yycharat(int pos) {\n return zzBuffer.charAt(zzStartRead+pos);\n }",
"public final char yycharat(int pos) {\r\n return zzBuffer[zzStartRead+pos];\r\n }",
"public final char yycharat(int pos) {\r\n return zzBuffer[zzStartRead+pos];\r\n }",
"public final char yycharat(int pos) {\r\n return zzBuffer[zzStartRead+pos];\r\n }",
"public final char yycharat(int pos) {\r\n return zzBuffer[zzStartRead+pos];\r\n }",
"public final char yycharat(int pos) {\r\n return zzBuffer[zzStartRead+pos];\r\n }",
"public char charAt(int pos) {\n return content.charAt(pos);\n }",
"final public char yycharat(int pos) {\n return yy_buffer[yy_startRead+pos];\n }",
"final public char yycharat(int pos) {\n return yy_buffer[yy_startRead+pos];\n }",
"public final char yycharat(int pos) {\n return zzBufferArray != null ? zzBufferArray[zzStartRead+pos]:zzBuffer.charAt(zzStartRead+pos);\n }",
"public final char yycharat(int pos) {\n return zzBufferArray != null ? zzBufferArray[zzStartRead+pos]:zzBuffer.charAt(zzStartRead+pos);\n }",
"public final char yycharat(int pos) {\n return zzBuffer[zzStartRead + pos];\n }",
"public char charAt(int index);",
"public final char yycharat(int pos) {\n\t\treturn zzBuffer[zzStartRead+pos];\n\t}",
"public char charAt(int charOffset);",
"public char charAt(int index)\r\n/* 31: */ {\r\n/* 32: 44 */ if (index > this.pos) {\r\n/* 33: 45 */ throw new IndexOutOfBoundsException();\r\n/* 34: */ }\r\n/* 35: 47 */ return this.chars[index];\r\n/* 36: */ }",
"@Override\n public final char charAt(final int index) {\n return text.charAt(index);\n }",
"public char charAt(int index) {\n/* 121 */ return this.m_str.charAt(index);\n/* */ }",
"public char at(int pos) {\r\n return fCharBuffer.at(pos);\r\n }",
"public char get_char(int k) throws Exception {\r\n\t\tif (k < 0 || k >= text.length())\r\n\t\t\tthrow new IndexOutOfBoundsException(\"Invalid index: \" + k);\r\n\t\telse\r\n\t\t\treturn text.charAt(k);\r\n\t}",
"public char charAt(int anIndex)\n {\n return _xstr.charAt(_start + anIndex);\n }",
"@Override\r\n\tpublic char charAt(int index) {\n\t\treturn chars[index];\r\n\t}",
"private String getCharacter(final int index) {\n String s = null;\n try {\n s = document.getText(index, 1);\n } catch (final BadLocationException e) {\n }\n return s;\n }",
"public char charAt(int index)\n\t{\n\t\tif (index < 0 || index > (length - 1))\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\tCNode character = getCNodeAt(index, firstC);\n\t\treturn character.data;\n\t}",
"public char charAt(int index) throws stackException\n {\n char ans;\n if(index >= 0 && index < numNodes)\n {\n Node n = this.get(index);\n ans = n.item;\n return ans;\n }\n else\n {\n throw new stackException(\"Index Is Out Of Bounds\");\n }\n }",
"public static int getAtChar(){\r\n\t\treturn atChar;\r\n\t}",
"@Override\n\tpublic char charAt(int index) {\n\t\tif (index >= this.size()) throw new IndexOutOfBoundsException(\"out of bounds gah\");\n\t\tif (index<0) throw new IndexOutOfBoundsException(\"invalid index\");\n\n\t\tif (index<myIndex) {\n\t\t\tmyIndex = 0;\n\t\t\tmyLocalIndex=0;\n\t\t\tmyCurrent = myFirst;\n\t\t}\n\t\twhile (myIndex != index) {\n\n\t\t\tmyIndex++;\n\t\t\tmyLocalIndex++;\n\t\t\t\n\t\t\tif (myLocalIndex >= myCurrent.info.length()) {\n\t\t\t\tmyLocalIndex = 0;\n\t\t\t\t\n\t\t\t\tif (myCurrent.next.info == null) throw new IndexOutOfBoundsException(\"out of nodes\");\n\t\t\t\tmyCurrent = myCurrent.next;\n\t\t\t\t\n\t\t\t}\n\t\t}\n return myCurrent.info.charAt(myLocalIndex);\n }",
"int getStartCharIndex();",
"public int getCharPos(){\n return charPos;\n }",
"public char getChar(int pos)\n {\n if (pos < 0) {\n if(this.post_comma_digits >= -pos)\n return this.raw_value[this.pre_comma()-1-pos];\n else return '0';\n } else {\n if(pos < this.pre_comma())\n return this.raw_value[this.pre_comma()-1-pos];\n else return '0';\n }\n }",
"public char getChar(int index) throws ArrayIndexOutOfBoundsException\n\t{\n\t\treturn (char) bytes[index];\n\t}",
"public Character charAt(int i) {\n\t\t\treturn null;\n\t\t}",
"public Character charAt(int i) {\n\t\t\treturn null;\n\t\t}",
"char getChar () { \n return m_pos < m_len ? m_buffer.charAt (m_pos) : '\\0';\n }",
"char getChar(int offset) throws BadLocationException;",
"char toChar(int index) {\n return _chars.charAt(index);\n }",
"private static int charAt(String data) {\n\t\treturn 0;\n\t}",
"@Override\n public final char setIndex(final int position) {\n ArgumentChecks.ensureBetween(\"position\", lower, upper, position);\n return ((index = position) != upper) ? text.charAt(position) : DONE;\n }",
"public char charAt(String str, int index) {\n char charAt = ' ';\n\n try {\n charAt = str.charAt(index);\n } catch (IndexOutOfBoundsException e) {\n System.err.print(\"Index out of bounds exception: \" + e.getMessage());\n }\n\n return charAt;\n }",
"public char getLetter(int index) {\n\t\treturn _objMyStringBuilder.getCharAt(index);\n\t}",
"public char peek() {\n try {\n return this.input.charAt(this.index);\n } catch (StringIndexOutOfBoundsException e) {\n throw this.buildException(\"truncated input\");\n }\n }",
"char toChar(int index) {\n if (index >= 0 && index < size()) {\n return _chars[index];\n } else {\n throw new EnigmaException(\"Index out of bounds.\");\n }\n }",
"public char getChar();",
"public char givenIndex(String str, int index)\r\n {\r\n char a= str.charAt(index);\r\n return a;\r\n }",
"static int getIdx(char ch)\n {\n return (ch - 'a');\n }",
"private int readCharBackward() {\r\n \t\tif (--index < 0 || \r\n \t\t\t\tdocumentContent == null ||\r\n \t\t\t\tdocumentContent.length() <= index)\r\n \t\t\treturn -1;\r\n \r\n \t\ttry {\r\n \t\t\treturn documentContent.charAt(index);\r\n \t\t} catch (StringIndexOutOfBoundsException e) {\r\n \t\t\treturn -1;\r\n \t\t}\r\n \t}",
"int getEndCharIndex();",
"@Override\n public final char current() {\n return (index != upper) ? text.charAt(index) : DONE;\n }",
"public static void showChar(String s, int pos)\n {\n char chAtPos = s.charAt (pos);\n System.out.println(\"Character at position \" + pos +\n \" is \" + chAtPos);\n }",
"public char getChar(int index)\r\n/* 191: */ {\r\n/* 192:208 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 193:209 */ return super.getChar(index);\r\n/* 194: */ }",
"public abstract char getStarterChar();",
"public final int getContinuationCharacter(int index) {\n return this.continuationCharacters[index];\n }",
"char toChar(int index) {\n return _letters.charAt(index);\n }",
"public char currentChar() throws Exception {\n // first line?\n if (currentPos == -2) {\n readLine();\n return nextChar();\n }\n\n // at end of file?\n if (line == null) {\n return PascalToken.EOF_CHAR;\n }\n\n // at end of line?\n if (currentPos == -1 || currentPos == line.length()) {\n return PascalToken.EOL_CHAR;\n }\n\n // Need to read next line?\n if (currentPos > line.length()) {\n readLine();\n return nextChar();\n }\n // return char at current pos\n return line.charAt(currentPos);\n }",
"public int getCharStart() {\n\t\treturn -1;\n\t}",
"public static char toChar(String str) {\n/* 173 */ if (StringUtils.isEmpty(str)) {\n/* 174 */ throw new IllegalArgumentException(\"The String must not be empty\");\n/* */ }\n/* 176 */ return str.charAt(0);\n/* */ }",
"private char peek(){\r\n \r\n assert iMessage!=null;\r\n assert iIndex>=0;\r\n assert iIndex<=iMessage.length();\r\n\r\n if (iIndex>=iMessage.length()) return NONE;//return no character if beyond end of the message\r\n return iMessage.charAt(iIndex);//return current character\r\n \r\n }",
"public char getChar()\n throws IOException\n {\n return (char) lineNumberReader.read();\n }",
"private int getChar() {\n\n\t\ttry {\n\t\t\treturn stream.read();\n\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.print(e.getMessage());\n\t\t\tSystem.err.println(\"IOException occured in Lexer::getChar()\");\n\t\t\treturn -1;\n\t\t}\n\n\t}",
"CharacterInfo getCharacter();",
"public char getChar(int wordIndex, int charIndex) {\n return this.words.get(wordIndex).charAt(charIndex);\n }",
"public String getWordAt(int pos){\n\t\treturn sentence.get(pos).getWord();\n\t}",
"public char getChar(String name) {\n Enumeration enumer = CHARS.elements();\n while(enumer.hasMoreElements()) {\n SimpleMessageObjectCharItem item = (SimpleMessageObjectCharItem) enumer.nextElement();\n if(item.getName().compareTo(name) == 0) {\n return item.getValue();\n }\n }\n return (char)-1;\n }",
"public static char getChar() throws IOException {\n\t\nString s = getString();\nreturn s.charAt(0);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Returns the first letter of the string, to help idiot proof it.\n\n}",
"public static char getLetter(String s){\n //A variable used in the helper method\n int i = 0;\n return getLetter(codeTree, s, i);\n }",
"@Test\n public void testCharAt() {\n LOGGER.info(\"testCharAt\");\n final AtomString atomString1 = new AtomString(\"Hello\");\n final char expected = 'e';\n final char actual = atomString1.charAt(1);\n assertEquals(expected, actual);\n }",
"public int getIndex() {\r\n return textIndex;\r\n }",
"public static String getWord(JTextComponent c, int offset)\n throws BadLocationException {\n int[] blk = getIdentifierBlock(c, offset);\n Document doc = c.getDocument();\n return (blk != null) ? doc.getText(blk[0], blk[1] - blk[0]) : null;\n }",
"public char getChar() throws IOException {\r\n\t\treturn (char)lineReader.read();\r\n\t}",
"public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }"
]
| [
"0.7900187",
"0.7561526",
"0.7561526",
"0.7561526",
"0.7561526",
"0.7561526",
"0.7561526",
"0.7561526",
"0.7561526",
"0.748312",
"0.748312",
"0.748312",
"0.748312",
"0.748312",
"0.74619186",
"0.74293286",
"0.74293286",
"0.7388772",
"0.7388772",
"0.7382884",
"0.73818666",
"0.7314771",
"0.72882056",
"0.7260724",
"0.7226168",
"0.7090126",
"0.7061067",
"0.66851234",
"0.6665791",
"0.6629837",
"0.66126984",
"0.6607655",
"0.65283144",
"0.6339936",
"0.6320309",
"0.6184764",
"0.61020404",
"0.6081052",
"0.60488445",
"0.6013159",
"0.6013159",
"0.5977513",
"0.5947803",
"0.59386224",
"0.5936809",
"0.592352",
"0.588829",
"0.5885189",
"0.58424",
"0.5823513",
"0.57952315",
"0.5793181",
"0.57873595",
"0.5783358",
"0.5758183",
"0.57459",
"0.5742706",
"0.5704689",
"0.57024395",
"0.5692235",
"0.5669131",
"0.5668871",
"0.5652602",
"0.5643147",
"0.5630027",
"0.5625885",
"0.5593914",
"0.5585963",
"0.5579707",
"0.55684793",
"0.5523465",
"0.5521164",
"0.5516455",
"0.55044866",
"0.55037344",
"0.548579",
"0.5474012",
"0.545504"
]
| 0.75123805 | 29 |
Returns the length of the matched text region. | public final int yylength() {
return zzMarkedPos-zzStartRead;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getTextLength();",
"public int length() {\r\n\t\treturn text.length();\r\n\t}",
"public int getTextLength();",
"public int getLength() {\n\t\t\treturn this.text.length();\n\t}",
"@Override\r\n \tpublic final int getLength() {\r\n \t\tAssert.isTrue(hasSourceRangeInfo());\r\n \t\treturn getEndPos() - getStartPos();\r\n \t}",
"public int getTextLength() {\r\n return text.length();\r\n }",
"public int numMatches();",
"public int getMinMatchLength() {\n int[] allele = {getAllele(0), getAllele(1)};\n byte[][] alt = {getAlt(allele[0]).getSequence(), getAlt(allele[1]).getSequence()};\n byte[] ref = getReference();\n\n int[] matchLength = {0, 0};\n for (int i = 0; i < 2; i++) {\n for (int j = 0; j < Math.min(ref.length, alt[i].length); j++) {\n if (alt[i][j] == ref[j]) {\n matchLength[i]++;\n } else {\n break;\n }\n }\n }\n return Math.min(matchLength[0], matchLength[1]);\n }",
"int getSearchLength();",
"int getGrammarMatchCount();",
"int computeNumberOfLines(String text);",
"public int size() {\n return text.size();\n }",
"public int getLength ()\r\n {\r\n return glyph.getBounds().width;\r\n }",
"public double length(){\n return end.distance(getStart());\n }",
"protected int length() { return FormatTools.getRasterLength(lengths); }",
"public final int termLength() {\n initTermBuffer();\n return termLength;\n }",
"public int rectangleCount() {\n return this.root.rectangleCount();\n }",
"public float getWidth() {\n\t\t\n\t\tfloat width= 0;\n\t\tfor(int i = 0; i < text.length(); i++) {\n\t\t\twidth += font.getChar(text.charAt(i)).X_ADVANCE * size;\n\t\t}\n\t\t\n\t\treturn width;\n\t}",
"public int matchLength() {\n /*\n // Can't load method instructions: Load method exception: null in method: android.icu.text.TimeZoneNames.MatchInfo.matchLength():int, dex: in method: android.icu.text.TimeZoneNames.MatchInfo.matchLength():int, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.icu.text.TimeZoneNames.MatchInfo.matchLength():int\");\n }",
"public double length() {\n\t\treturn startPoint.distance(endPoint);\n\t}",
"public int height()\n throws Exception\n {\n return this.text.height();\n }",
"public final int yylength() {\n return zzMarkedPos - zzStartRead;\n }",
"int getLinesCount();",
"public final int yylength() {\n return zzMarkedPos - zzStartRead;\n }",
"int getNumberOfLines(int offset, int length) throws BadLocationException;",
"public final int yylength() {\r\n return zzMarkedPos-zzStartRead;\r\n }",
"public final int yylength() {\r\n return zzMarkedPos-zzStartRead;\r\n }",
"public final int yylength() {\r\n return zzMarkedPos-zzStartRead;\r\n }",
"public final int yylength() {\r\n return zzMarkedPos-zzStartRead;\r\n }",
"public final int yylength() {\r\n return zzMarkedPos-zzStartRead;\r\n }",
"private int getOffsetLength(final String message, final ResourceText text,\n\t\t\tfinal int offset) {\n\t\tint length = 1;\n\t\tif (isUnunsedVariable(message) //\n\t\t\t\t|| isUnunsedMacro(message) //\n\t\t\t\t|| isLowerCase(message)) {\n\t\t\tfinal int start = message.indexOf(QUOTE_CHAR);\n\t\t\tfinal int end = message.indexOf(QUOTE_CHAR, start + 1);\n\t\t\tif (start != -1 && end != -1) {\n\t\t\t\tlength = end - start - 1;\n\t\t\t}\n\t\t} else if (isNoSpace(message)) {\n\t\t\tint end = offset;\n\t\t\tfinal byte[] content = text.getContent();\n\t\t\twhile (isWhitespace(content, end)) {\n\t\t\t\tend++;\n\t\t\t}\n\t\t\tlength = end - offset;\n\t\t} else if (isOneSpace(message) || isEndLineSpace(message)) {\n\t\t\tint end = offset + 1;\n\t\t\tfinal byte[] content = text.getContent();\n\t\t\twhile (isWhitespace(content, end)) {\n\t\t\t\tend++;\n\t\t\t}\n\t\t\tlength = end - offset;\n\t\t}\n\n\t\treturn Math.max(length, 1);\n\t}",
"public int getStringWidth(String text);",
"public int getGrammarMatchCount() {\n if (grammarMatchBuilder_ == null) {\n return grammarMatch_.size();\n } else {\n return grammarMatchBuilder_.getCount();\n }\n }",
"public int length() { return _end - _start; }",
"public final int yylength() {\n\t\treturn zzMarkedPos-zzStartRead;\n\t}",
"public float getHeight() {\n\t\t\n\t\tfloat height = 0;\n\t\tfor(int i = 0; i < text.length(); i++) {\n\t\t\tFontChar c = font.getChar(text.charAt(i));\n\t\t\tfloat h = (c.T_HEIGHT + c.Y_OFFSET) * size;\n\t\t\t\n\t\t\tif(h > height)\n\t\t\t\theight = h;\n\t\t}\n\t\t\n\t\treturn height;\n\t}",
"public int getLength() {\n if (data instanceof String) {\n String string = (String) data;\n return string.length();\n } else if (data instanceof StringReference) {\n StringReference stref = (StringReference) data;\n return stref.getLength();\n } else if (data instanceof Value) {\n Value val = (Value) data;\n return val.getString().length();\n } else {\n return data.toString().length();\n }\n }",
"public int getWordLength();",
"public int length();",
"public int length();",
"public int length();",
"public int length();",
"public int length();",
"@Override\n public int height()\n {\n return textCent.height();\n }",
"public int get_length();",
"private static int numLines() {\n\t\tif(subway != null)\n\t\t\treturn subway[0].length;\n\t\treturn 0;\n\t}",
"public int length() {\n \t\tif (-1 == n_points) setupForDisplay();\n \t\treturn n_points;\n \t}",
"public double getLength() {\n return VectorXZ.distance(p1, p2);\n }",
"public int getMazeWidth() {\n\t\tint result = 0;\n\t\t\n\t\tfor (String line : this.mMazeChars) {\n\t\t\tif (result < line.length()) \n\t\t\t\tresult = line.length();\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"public int length() {\n return nextindex - startIndex;\n }",
"@Override\n public int computeLength()\n {\n if ( matchingRule != null )\n {\n matchingRuleBytes = Strings.getBytesUtf8( matchingRule );\n extensibleMatchLength = 1 + TLV.getNbBytes( matchingRuleBytes.length ) + matchingRuleBytes.length;\n }\n\n if ( type != null )\n {\n typeBytes = Strings.getBytesUtf8( type );\n extensibleMatchLength += 1 + TLV.getNbBytes( typeBytes.length ) + typeBytes.length;\n }\n\n if ( matchValue != null )\n {\n int bytesLength = matchValue.getBytes().length;\n extensibleMatchLength += 1 + TLV.getNbBytes( bytesLength ) + bytesLength;\n }\n\n if ( dnAttributes )\n {\n extensibleMatchLength += 1 + 1 + 1;\n }\n\n return 1 + TLV.getNbBytes( extensibleMatchLength ) + extensibleMatchLength;\n }",
"public int length()\r\n/* 26: */ {\r\n/* 27: 39 */ return this.pos;\r\n/* 28: */ }",
"@java.lang.Override\n public int getGrammarMatchCount() {\n return grammarMatch_.size();\n }",
"public int getWidth(CharSequence text) {\r\n\t\tint width = 0, lineWidth = 0;\r\n\t\t\r\n\t\tfor (int i = 0; i < text.length(); i++) {\r\n\t\t\tchar character = text.charAt(i);\r\n\t\t\t\r\n\t\t\tif (character == '\\n') { // New line\r\n\t\t\t\twidth = Math.max(width, lineWidth);\r\n\t\t\t\tlineWidth = 0;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Ignore carriage returns\r\n\t\t\tif (character == '\\r') continue;\r\n\t\t\t\r\n\t\t\tGlyph glyph = glyphs.get(character);\r\n\t\t\tif (glyph == null) continue;\r\n\t\t\t\r\n\t\t\tlineWidth += glyph.getWidth();\r\n\t\t}\r\n\t\t\r\n\t\twidth = Math.max(width, lineWidth);\r\n\t\treturn width;\r\n\t}",
"int getNumberOfLines();",
"int getLineLength(int line) throws BadLocationException;",
"public long getNumberOfPatternOccurrences() {\n if(!hasFinished()) {\n throw new IllegalArgumentException(\"the recompression is not jet ready.\");\n }\n\n S terminal = slp.get(getPattern().getLeft(), 1);\n return getPatternOccurrence(terminal).get(getText());\n }",
"public int getCount() {\n return m_stringOffsets != null ?\n m_stringOffsets.length :\n 0;\n }",
"public int length() {\n\treturn tokens.length;\n}",
"int getLength();",
"int getLength();",
"int getLength();",
"int getLength();",
"int getLength();"
]
| [
"0.6528484",
"0.6524071",
"0.636394",
"0.6363093",
"0.61599505",
"0.6144468",
"0.60899585",
"0.6083994",
"0.607981",
"0.6014312",
"0.6012768",
"0.60009634",
"0.59647894",
"0.5935444",
"0.5883292",
"0.5819961",
"0.5805488",
"0.57757026",
"0.5772788",
"0.5771723",
"0.57381433",
"0.5736751",
"0.57170707",
"0.5708871",
"0.5691757",
"0.5684845",
"0.5684845",
"0.5684845",
"0.5684845",
"0.5684845",
"0.56836575",
"0.56816185",
"0.56722504",
"0.5664663",
"0.5642051",
"0.56175935",
"0.5615893",
"0.56133527",
"0.5610425",
"0.5610425",
"0.5610425",
"0.5610425",
"0.5610425",
"0.5598322",
"0.5596918",
"0.5592805",
"0.55829555",
"0.55432",
"0.5530951",
"0.5523193",
"0.55159557",
"0.55140084",
"0.5510568",
"0.5509233",
"0.5494084",
"0.5489734",
"0.5485191",
"0.5483054",
"0.54786164",
"0.54784447",
"0.54784447",
"0.54784447",
"0.54784447",
"0.54784447"
]
| 0.5758411 | 51 |
Reports an error that occured while scanning. In a wellformed scanner (no or only correct usage of yypushback(int) and a matchall fallback rule) this method will only be called with things that "Can't Possibly Happen". If this method is called, something is seriously wrong (e.g. a JFlex bug producing a faulty scanner etc.). Usual syntax/scanner level error handling should be done in error fallback rules. | private void zzScanError(int errorCode) {
String message;
try {
message = ZZ_ERROR_MSG[errorCode];
}
catch (ArrayIndexOutOfBoundsException e) {
message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
}
throw new Error(message);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void yy_ScanError(int errorCode) {\n String message;\n try {\n message = YY_ERROR_MSG[errorCode];\n }\n catch (ArrayIndexOutOfBoundsException e) {\n message = YY_ERROR_MSG[YY_UNKNOWN_ERROR];\n }\n\n throw new Error(message);\n }",
"private void yy_ScanError(int errorCode) {\n String message;\n try {\n message = YY_ERROR_MSG[errorCode];\n }\n catch (ArrayIndexOutOfBoundsException e) {\n message = YY_ERROR_MSG[YY_UNKNOWN_ERROR];\n }\n\n throw new Error(message);\n }",
"private void parseError() {\r\n System.out.print(\"Parse Error on:\");\r\n tokens.get(position).print();\r\n }",
"public void syntax_error(Symbol current_token){}",
"@Override\n public final void syntaxError(Recognizer<?, ?> recognizer,\n Object offendingSymbol, int line, int charPositionInLine,\n String msg, RecognitionException e) {\n ResolveToken offendingToken = (ResolveToken) offendingSymbol;\n String input;\n if (recognizer == null) {\n input = offendingToken.getTokenSource().getInputStream().toString();\n }\n else {\n CommonTokenStream src =\n (CommonTokenStream) recognizer.getInputStream();\n input = src.getTokenSource().getInputStream().toString();\n }\n String[] lines = input.split(\"\\n\");\n String errorLine = lines[line - 1].replaceAll(\"\\t\", \" \");\n\n // Obtain the location from the token if it is not null\n Location location = null;\n if (offendingToken != null) {\n location = offendingToken.getLocation();\n }\n\n String errorMsg = buildErrorMsg(charPositionInLine, errorLine, msg);\n myStatusHandler.error(location, errorMsg);\n }",
"public static void scannerError(String fmt, Object... varArgs) throws Exception\r\n\t{\r\n\t\tString diagnosticTxt = String.format(fmt, varArgs);\r\n\t\tthrow new ScannerException((Scanner.iSourceLineNr + 1), diagnosticTxt);\r\n\t}",
"private void error(@Nonnull Token pptok, boolean is_error)\r\n throws IOException,\r\n LexerException {\r\n StringBuilder buf = new StringBuilder();\r\n buf.append('#').append(pptok.getText()).append(' ');\r\n /* Peculiar construction to ditch first whitespace. */\r\n Token tok = source_token_nonwhite();\r\n ERROR:\r\n for (;;) {\r\n switch (tok.getType()) {\r\n case NL:\r\n case EOF:\r\n break ERROR;\r\n default:\r\n buf.append(tok.getText());\r\n break;\r\n }\r\n tok = source_token();\r\n }\r\n if (is_error)\r\n error(pptok, buf.toString());\r\n else\r\n warning(pptok, buf.toString());\r\n }",
"@Override\n protected void reportUnwantedToken(Parser recognizer) {\n super.reportUnwantedToken(recognizer);\n System.exit(SYNTAX_ERROR_CODE);\n }",
"@Override\n protected void visit(final SpreadsheetErrorParserToken token) {\n this.add(\n Expression.value(\n token.value()\n .kind()\n .toError()\n ),\n token\n );\n }",
"int yyparse()\n {\n boolean doaction;\n init_stacks();\n yynerrs = 0;\n yyerrflag = 0;\n yychar = -1; //impossible char forces a read\n yystate=0; //initial state\n state_push(yystate); //save it\n val_push(yylval); //save empty value\n while (true) //until parsing is done, either correctly, or w/error\n {\n doaction=true;\n if (yydebug) debug(\"loop\");\n //#### NEXT ACTION (from reduction table)\n for (yyn=yydefred[yystate];yyn==0;yyn=yydefred[yystate])\n {\n if (yydebug) debug(\"yyn:\"+yyn+\" state:\"+yystate+\" yychar:\"+yychar);\n if (yychar < 0) //we want a char?\n {\n yychar = yylex(); //get next token\n if (yydebug) debug(\" next yychar:\"+yychar);\n //#### ERROR CHECK ####\n if (yychar < 0) //it it didn't work/error\n {\n yychar = 0; //change it to default string (no -1!)\n if (yydebug)\n yylexdebug(yystate,yychar);\n }\n }//yychar<0\n yyn = yysindex[yystate]; //get amount to shift by (shift index)\n if ((yyn != 0) && (yyn += yychar) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == yychar)\n {\n if (yydebug)\n debug(\"state \"+yystate+\", shifting to state \"+yytable[yyn]);\n //#### NEXT STATE ####\n yystate = yytable[yyn];//we are in a new state\n state_push(yystate); //save it\n val_push(yylval); //push our lval as the input for next rule\n yychar = -1; //since we have 'eaten' a token, say we need another\n if (yyerrflag > 0) //have we recovered an error?\n --yyerrflag; //give ourselves credit\n doaction=false; //but don't process yet\n break; //quit the yyn=0 loop\n }\n\n yyn = yyrindex[yystate]; //reduce\n if ((yyn !=0 ) && (yyn += yychar) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == yychar)\n { //we reduced!\n if (yydebug) debug(\"reduce\");\n yyn = yytable[yyn];\n doaction=true; //get ready to execute\n break; //drop down to actions\n }\n else //ERROR RECOVERY\n {\n if (yyerrflag==0)\n {\n yyerror(\"syntax error\");\n yynerrs++;\n }\n if (yyerrflag < 3) //low error count?\n {\n yyerrflag = 3;\n while (true) //do until break\n {\n if (stateptr<0) //check for under & overflow here\n {\n yyerror(\"stack underflow. aborting...\"); //note lower case 's'\n return 1;\n }\n yyn = yysindex[state_peek(0)];\n if ((yyn != 0) && (yyn += YYERRCODE) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)\n {\n if (yydebug)\n debug(\"state \"+state_peek(0)+\", error recovery shifting to state \"+yytable[yyn]+\" \");\n yystate = yytable[yyn];\n state_push(yystate);\n val_push(yylval);\n doaction=false;\n break;\n }\n else\n {\n if (yydebug)\n debug(\"error recovery discarding state \"+state_peek(0)+\" \");\n if (stateptr<0) //check for under & overflow here\n {\n yyerror(\"Stack underflow. aborting...\"); //capital 'S'\n return 1;\n }\n state_pop();\n val_pop();\n }\n }\n }\n else //discard this token\n {\n if (yychar == 0)\n return 1; //yyabort\n if (yydebug)\n {\n yys = null;\n if (yychar <= YYMAXTOKEN) yys = yyname[yychar];\n if (yys == null) yys = \"illegal-symbol\";\n debug(\"state \"+yystate+\", error recovery discards token \"+yychar+\" (\"+yys+\")\");\n }\n yychar = -1; //read another\n }\n }//end error recovery\n }//yyn=0 loop\n if (!doaction) //any reason not to proceed?\n continue; //skip action\n yym = yylen[yyn]; //get count of terminals on rhs\n if (yydebug)\n debug(\"state \"+yystate+\", reducing \"+yym+\" by rule \"+yyn+\" (\"+yyrule[yyn]+\")\");\n if (yym>0) //if count of rhs not 'nil'\n yyval = val_peek(yym-1); //get current semantic value\n yyval = dup_yyval(yyval); //duplicate yyval if ParserVal is used as semantic value\n switch(yyn)\n {\n//########## USER-SUPPLIED ACTIONS ##########\n case 1:\n//#line 25 \"GramaticaGrupo8.y\"\n {}\n break;\n case 2:\n//#line 26 \"GramaticaGrupo8.y\"\n {yyerror(\"No hay sentencia\");}\n break;\n case 3:\n//#line 27 \"GramaticaGrupo8.y\"\n {yyerror(\"No hay sentencia\");}\n break;\n case 4:\n//#line 27 \"GramaticaGrupo8.y\"\n {}\n break;\n case 5:\n//#line 30 \"GramaticaGrupo8.y\"\n {}\n break;\n case 6:\n//#line 31 \"GramaticaGrupo8.y\"\n {}\n break;\n case 7:\n//#line 34 \"GramaticaGrupo8.y\"\n {}\n break;\n case 8:\n//#line 35 \"GramaticaGrupo8.y\"\n {}\n break;\n case 9:\n//#line 38 \"GramaticaGrupo8.y\"\n {\n Vector<ParserVal> vectorTokens = (Vector<ParserVal>)(val_peek(1).obj);\n String tipo = (val_peek(2).sval);/* para que esto ande tocar la regla del no terminal tipo*/\n tipo = tipo.toLowerCase();\n for(int i=0; i< vectorTokens.size();i++){\n ParserVal token = vectorTokens.elementAt(i);\n Symbol simbolo =(Symbol) token.obj;\n if (!simbolo.isUsada()){\n simbolo.setUsada(true);\n simbolo.setEsMutable(true);\n simbolo.setTipoVar(val_peek(2).sval);}\n else\n yyerror(\"Se esta intentado redeclarar la variable \"+simbolo.getLexema(),token.getFila(),token.getColumna());\n }\n\n }\n break;\n case 10:\n//#line 54 \"GramaticaGrupo8.y\"\n {yyerror(\"Declaracion mal definida \");}\n break;\n case 11:\n//#line 57 \"GramaticaGrupo8.y\"\n {/* id.add( ((Symbol)($1.obj)).getLexema() );*/\n Vector<ParserVal> vect = new Vector<ParserVal>();/*$1 es el parser val con el symbolo de ese ID*/\n vect.add(val_peek(0));/*ver si anda, hay que castear a Symbol?*/\n yyval.obj = vect; }\n break;\n case 12:\n//#line 61 \"GramaticaGrupo8.y\"\n {\t((Symbol)(val_peek(0).obj)).setEspuntero(true); /*reconoce puntero*/\n /*id.add(((Symbol)($2.obj)).getLexema());//} //agrega a lista de identificadores reconocidos*/\n Vector<ParserVal> vect = new Vector<ParserVal>();/*$2 es el parser val con el symbolo de ese ID*/\n vect.add(val_peek(0));/*ver si anda, hay que castear a Symbol? .obj*/\n yyval.obj = vect;\n }\n break;\n case 13:\n//#line 68 \"GramaticaGrupo8.y\"\n {/*id.add(((Symbol)($1.obj)).getLexema());*/\n Vector<ParserVal> vect = (Vector<ParserVal>)(val_peek(0).obj); /*$3 me trae el vector original primero y desp aumenta*/\n vect.add(val_peek(2));/*ver si anda, hay que castear a Symbol? .obj*/\n yyval.obj = vect;\n }\n break;\n case 14:\n//#line 73 \"GramaticaGrupo8.y\"\n {/*id.add(((Symbol)($2.obj)).getLexema());*/\n ((Symbol)(val_peek(2).obj)).setEspuntero(true); /*reconoce puntero*/\n Vector<ParserVal> vect = (Vector<ParserVal>)(val_peek(0).obj); /*$4 me trae el vector original primero y desp aumenta*/\n vect.add(val_peek(2));/*ver si anda, hay que castear a Symbol? .obj*/\n yyval.obj = vect;\n }\n break;\n case 15:\n//#line 79 \"GramaticaGrupo8.y\"\n {yyerror(\"Se esperaba ';' \",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n case 16:\n//#line 82 \"GramaticaGrupo8.y\"\n {yyval.sval=\"integer\";}\n break;\n case 17:\n//#line 83 \"GramaticaGrupo8.y\"\n {yyval.sval=\"single\";}\n break;\n case 18:\n//#line 84 \"GramaticaGrupo8.y\"\n {yyerror(\"Tipo indefinido\",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n case 19:\n//#line 87 \"GramaticaGrupo8.y\"\n {}\n break;\n case 20:\n//#line 88 \"GramaticaGrupo8.y\"\n {}\n break;\n case 21:\n//#line 91 \"GramaticaGrupo8.y\"\n {}\n break;\n case 22:\n//#line 92 \"GramaticaGrupo8.y\"\n {/*#######Solo llego aca si termino un if o un loop*/\n Integer i = p.pop();\n if (listaTercetos.get(i).getOperador() == \"BI\")\n {\n listaTercetos.get(i).setOperando1(contadorTerceto);\n\n }\n if (listaTercetos.get(i).getOperador() == \"BF\")\n {\tlistaTercetos.get(i).setOperando2(contadorTerceto);\n }\n if (intLoop == 0){\n Terceto t = new T_Fin(contadorTerceto,\"FIN_DE_SALTO\",\"trampita\",\"trampita\",st);\n contadorTerceto ++;\n listaTercetos.add(t);\n }\n else\n { ((T_BF)listaTercetos.get(i)).invertFlags();\n listaTercetos.get(i).setOperando2(intLoop);\n intLoop=0;\n }\n /*podriamos hacer un terceto fin aca que sea a donde apunte el salto, este terceto no haria nada solo funcionaria de label del salto*/\n }\n break;\n case 23:\n//#line 104 \"GramaticaGrupo8.y\"\n {}\n break;\n case 24:\n//#line 107 \"GramaticaGrupo8.y\"\n {\n Terceto t = new T_Suma_Resta(contadorTerceto,\"+\",val_peek(2).obj,val_peek(0).obj,st);\n /*st es la tabla de simbolos, paso lexema porque lo uso para buscar en la tabla de simbolos*/\n t.setVariableAux(contadorVarAux);\n contadorVarAux++;\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\n }\n break;\n case 25:\n//#line 121 \"GramaticaGrupo8.y\"\n {\n Terceto t = new T_Suma_Resta(contadorTerceto,\"-\",val_peek(2).obj,val_peek(0).obj,st);\n /*st es la tabla de simbolos, paso lexema porque lo uso para buscar en la tabla de simbolos*/\n t.setVariableAux(contadorVarAux);\n contadorVarAux++;\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\n }\n break;\n case 26:\n//#line 135 \"GramaticaGrupo8.y\"\n {yyval=val_peek(0);\n yyval.obj=val_peek(0).obj; /*creo que es necesario para que no se pierdan los lexemas, si quieren reveanlo*/\n }\n break;\n case 27:\n//#line 141 \"GramaticaGrupo8.y\"\n {\n Terceto t = new T_Mult_Div(contadorTerceto,\"/\",val_peek(2).obj,val_peek(0).obj,st);\n t.setVariableAux(contadorVarAux);\n contadorVarAux++;\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\n\n }\n break;\n case 28:\n//#line 155 \"GramaticaGrupo8.y\"\n {\n Terceto t = new T_Mult_Div(contadorTerceto,\"*\",val_peek(2).obj,val_peek(0).obj,st);\n t.setVariableAux(contadorVarAux);\n contadorVarAux++;\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\n }\n break;\n case 29:\n//#line 168 \"GramaticaGrupo8.y\"\n {yyval=val_peek(0);\n /* terceto*/\n yyval.obj=val_peek(0).obj;\n }\n break;\n case 30:\n//#line 175 \"GramaticaGrupo8.y\"\n {yyval=val_peek(0);}\n break;\n case 31:\n//#line 176 \"GramaticaGrupo8.y\"\n {yyval=val_peek(0);}\n break;\n case 32:\n//#line 177 \"GramaticaGrupo8.y\"\n {if(!((Symbol)(val_peek(0).obj)).isUsada()){\n /*error*/\n yyerror(\"variable no declarada\",val_peek(0).getFila(),val_peek(0).getColumna());\n }\n yyval=val_peek(0);\n }\n break;\n case 33:\n//#line 183 \"GramaticaGrupo8.y\"\n { /** Revisar sino pierdo el puntero al elemento qe necesito **/\n yyval=val_peek(0);\n /*Symbol aux = st.getSymbol(lex.lastSymbol);*/\n st.addcambiarSigno(((Symbol)(val_peek(0).obj))); /*((Symbol))($2.obj))*/\n }\n break;\n case 34:\n//#line 188 \"GramaticaGrupo8.y\"\n {\t\t\t/** Revisar sino pierdo el puntero al elemento qe necesito **/\n yyval=val_peek(0);\n /* Antes qedaban atributos sin setear*/\n /* Symbol aux = st.getSymbol(lex.lastSymbol);*/\n st.addcambiarSigno(((Symbol)(val_peek(0).obj))); /*((Symbol))($2.obj))*/\n }\n break;\n case 35:\n//#line 196 \"GramaticaGrupo8.y\"\n {\t\t/*necesito el tipo de la expresion*/\n if (!((Symbol)(val_peek(2).obj)).isUsada()){\n yyerror(\"La variable no esta definida \",val_peek(2).getFila(),val_peek(2).getColumna());\n }else{if (!((Symbol)(val_peek(2).obj)).getEsMutable()){\n yyerror(\"La variable no es mutable \",val_peek(2).getFila(),val_peek(2).getColumna());\n }}\n Terceto t = new T_Asignacion(contadorTerceto,\":=\",val_peek(2).obj,val_peek(0).obj,st);\n t.setVariableAux(contadorVarAux);//casi seguro que si hay que crearla aca*\n contadorVarAux++;//*/\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\n estructuras.add(\"Asignacion \"+\" fila \"+val_peek(2).getFila()+\" columna \"+val_peek(2).getColumna());}\n break;\n case 36:\n//#line 215 \"GramaticaGrupo8.y\"\n { /* Estoy definiendo una variable*/\n if (((Symbol)(val_peek(3).obj)).isUsada()){\n yyerror(\"La variable ya esta definida \",val_peek(6).getFila(),val_peek(6).getColumna());\n }else{\n Symbol s = ((Symbol)(val_peek(3).obj));\n s.setUsada(true);\n s.setEsMutable(false);\n s.setEspuntero(true);\n s.setTipoVar(val_peek(5).sval);\n /* faltaria mutabilidad de lo apuntado*/\n }\n if (!((Symbol)(val_peek(0).obj)).isUsada()){\n yyerror(\"La variable no esta definida, &ID \",val_peek(6).getFila(),val_peek(6).getColumna());\n }else{\n Symbol s = ((Symbol)(val_peek(0).obj));\n Symbol sy = ((Symbol)(val_peek(3).obj));\n if (s.isEsPuntero())\n yyerror(\"No se permiten punteros multiples \",val_peek(6).getFila(),val_peek(6).getColumna());\n }\n Terceto t = new T_Asignacion(contadorTerceto,\"&\",val_peek(3).obj,val_peek(0).obj,st);\n t.setVariableAux(contadorVarAux);\n contadorVarAux++;\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(6).getFila(),val_peek(6).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(6);\n yyval.obj = t;\n estructuras.add(\"Asignacion de puntero \"+\" fila \"+val_peek(6).getFila()+\" columna \"+val_peek(6).getColumna());}\n break;\n case 37:\n//#line 246 \"GramaticaGrupo8.y\"\n {/*Estoy definiendo una variable*/\n if (((Symbol)(val_peek(2).obj)).isUsada()){\n yyerror(\"La variable ya esta definida \",val_peek(4).getFila(),val_peek(4).getColumna());\n }else{\n Symbol s = ((Symbol)(val_peek(2).obj));\n s.setUsada(true);\n s.setEsMutable(false);\n s.setEspuntero(false);\n s.setTipoVar(val_peek(3).sval);\n /* faltaria mutabilidad de lo apuntado }*/\n Terceto t = new T_Asignacion(contadorTerceto,\":=\",val_peek(2).obj,val_peek(0).obj,st);\n t.setVariableAux(contadorVarAux);\n contadorVarAux++;\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(4).getFila(),val_peek(4).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(4);\n yyval.obj = t;\n }\n estructuras.add(\"Asignacion \"+\" fila \"+val_peek(4).getFila()+\" columna \"+val_peek(4).getColumna());}\n break;\n case 38:\n//#line 269 \"GramaticaGrupo8.y\"\n {yyerror(\"Falta elemento de asignacion y palabra reservada 'let'\",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n case 39:\n//#line 270 \"GramaticaGrupo8.y\"\n {yyerror(\"Falta elemento de asignacion \",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n case 40:\n//#line 271 \"GramaticaGrupo8.y\"\n {yyerror(\"no se encontro ':=' \",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n case 41:\n//#line 274 \"GramaticaGrupo8.y\"\n {estructuras.add(\"Expresion print \"+\" fila \"+val_peek(3).getFila()+\" columna \"+val_peek(3).getColumna());\n Terceto t = new T_Print(contadorTerceto,\"PRINT\",val_peek(1).obj,\"\",st);\n // t.setVariableAux(contadorVarAux); //un print no tiene resultado por ende no tiene tipo*/\n //contadorVarAux++; // creo que para los print no es necesario porque los aux son para el resultado*/\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(3).getFila(),val_peek(3).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(3);\n yyval.obj = t;\n }\n break;\n case 42:\n//#line 287 \"GramaticaGrupo8.y\"\n {yyerror(\"Linea Error en la construccion del print\",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n case 43:\n//#line 290 \"GramaticaGrupo8.y\"\n {}\n break;\n case 44:\n//#line 291 \"GramaticaGrupo8.y\"\n {}\n break;\n case 45:\n//#line 295 \"GramaticaGrupo8.y\"\n {estructuras.add(\"Sentencia IF Else\" +\" fila \"+val_peek(5).getFila()+\" columna \"+val_peek(5).getColumna());\n\n /*Terceto t = new T_Fin(contadorTerceto,\"FIN_DE_SALTO\",\"trampita\",\"trampita\",st);\n contadorTerceto ++;\n listaTercetos.add(t);*/\n }\n break;\n case 46:\n//#line 296 \"GramaticaGrupo8.y\"\n {estructuras.add(\"Sentencia IF \" +\" fila \"+val_peek(3).getFila()+\" columna \"+val_peek(3).getColumna());}\n break;\n case 47:\n//#line 297 \"GramaticaGrupo8.y\"\n {yyerror(\" falta la palabra reservada IF\",val_peek(3).getFila(),val_peek(3).getColumna());}\n break;\n case 48:\n//#line 298 \"GramaticaGrupo8.y\"\n {yyerror(\" Error en la construccion de la sentencia IF \",val_peek(2).getFila(),val_peek(2).getColumna());}\n break;\n case 49:\n//#line 299 \"GramaticaGrupo8.y\"\n {yyerror(\" Falta la palabra reservada ELSE \",val_peek(3).getFila(),val_peek(3).getColumna());}\n break;\n case 50:\n//#line 302 \"GramaticaGrupo8.y\"\n {estructuras.add(\"Sentencia Loop \" +\" fila \"+val_peek(3).getFila()+\" columna \"+val_peek(3).getColumna());}\n break;\n case 51:\n//#line 303 \"GramaticaGrupo8.y\"\n {yyerror(\"Linea Falta palabra reservada UNTIL\",val_peek(2).getFila(),val_peek(2).getColumna());}\n break;\n case 52:\n//#line 306 \"GramaticaGrupo8.y\"\n {}\n break;\n case 53:\n//#line 307 \"GramaticaGrupo8.y\"\n {}\n break;\n case 54:\n//#line 308 \"GramaticaGrupo8.y\"\n {yyerror(\"LInea Omision de la palabra reservada '{' \",val_peek(2).getFila(),val_peek(2).getColumna());}\n break;\n case 55:\n//#line 311 \"GramaticaGrupo8.y\"\n {/*#### unica forma de marcar donde comienza el loop y ver donde salto (no diferenciamos bloque de loop)*/\n p.push(contadorTerceto);\n intLoop = contadorTerceto;\n Terceto t = new T_Fin(contadorTerceto,\"FIN_DE_SALTO\",\"trampita\",\"trampita\",st);\n\n listaTercetos.add(t);\n contadorTerceto ++;\n }\n break;\n case 56:\n//#line 316 \"GramaticaGrupo8.y\"\n {/*#### aca hacemos el salto incondicional, debimos inventar este no terminal porque no diferenciamos bloque else de bloque if*/\n /*aca ya hicimos el pop cuando termino el cuerpo del if*/\n Terceto t = new T_BI(contadorTerceto,\"BI\",\"trampita\",\"trampita\",st);\n contadorTerceto ++;\n listaTercetos.add(t);\n Integer i = p.pop();\n if (listaTercetos.get(i).getOperador() == \"BF\")\n listaTercetos.get(i).setOperando2(contadorTerceto);\n else\n listaTercetos.get(i).setOperando1(contadorTerceto);\n p.push(contadorTerceto-1);\n /*podriamos hacer un terceto fin aca que sea a donde apunte el salto, este terceto no haria nada solo funcionaria de label del salto*/\n System.out.println(t.toString());\n yyval=val_peek(0);\n yyval.obj = t;\n }\n break;\n case 57:\n//#line 334 \"GramaticaGrupo8.y\"\n { /*#### aca hacemos lo del salto para no repetirlo en todas las condiciones*/\n p.push(contadorTerceto);\n Terceto t = new T_BF(contadorTerceto,\"BF\",val_peek(1).obj,\"trampita\",st);/*##use trampita por las dudas, ya por deporte, no parece que sea necesario*/\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\n\n }\n break;\n case 58:\n//#line 345 \"GramaticaGrupo8.y\"\n {\n Terceto t = new T_Comparador(contadorTerceto,\">\",val_peek(2).obj,val_peek(0).obj,st);\n /* t.setVariableAux(contadorVarAux);//revisar, creo que aca no va*/\n /* contadorVarAux++;//osea una comparacion SI TIENE RESULTADO, pero no necesito el tipo del resultado?, nose*/\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\n }\n break;\n case 59:\n//#line 358 \"GramaticaGrupo8.y\"\n {\n Terceto t = new T_Comparador(contadorTerceto,\"<\",val_peek(2).obj,val_peek(0).obj,st);\n /* t.setVariableAux(contadorVarAux);//revisar, creo que aca no va*/\n /* contadorVarAux++;//osea una comparacion SI TIENE RESULTADO, pero no necesito el tipo del resultado?, nose*/\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\t\t\t\t\t\t\t\t\t\t}\n break;\n case 60:\n//#line 370 \"GramaticaGrupo8.y\"\n { Terceto t = new T_Comparador(contadorTerceto,\"=\",val_peek(2).obj,val_peek(0).obj,st);\n /* t.setVariableAux(contadorVarAux);//revisar, creo que aca no va*/\n /* contadorVarAux++;//osea una comparacion SI TIENE RESULTADO, pero no necesito el tipo del resultado?, nose*/\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\t\t\t\t\t\t\t\t\t\t}\n break;\n case 61:\n//#line 381 \"GramaticaGrupo8.y\"\n {\n Terceto t = new T_Comparador(contadorTerceto,\"!=\",val_peek(2).obj,val_peek(0).obj,st);\n /* t.setVariableAux(contadorVarAux);//revisar, creo que aca no va*/\n /* contadorVarAux++;//osea una comparacion SI TIENE RESULTADO, pero no necesito el tipo del resultado?, nose*/\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\t\t\t\t\t\t\t\t\t\t}\n break;\n case 62:\n//#line 393 \"GramaticaGrupo8.y\"\n {\n Terceto t = new T_Comparador(contadorTerceto,\">=\",val_peek(2).obj,val_peek(0).obj,st);\n /* t.setVariableAux(contadorVarAux);//revisar, creo que aca no va*/\n /* contadorVarAux++;//osea una comparacion SI TIENE RESULTADO, pero no necesito el tipo del resultado?, nose*/\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\t\t\t\t\t\t\t\t\t\t}\n break;\n case 63:\n//#line 405 \"GramaticaGrupo8.y\"\n {\n Terceto t = new T_Comparador(contadorTerceto,\"<=\",val_peek(2).obj,val_peek(0).obj,st);\n /* t.setVariableAux(contadorVarAux);//revisar, creo que aca no va*/\n /* contadorVarAux++;//osea una comparacion SI TIENE RESULTADO, pero no necesito el tipo del resultado?, nose*/\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\t\t\t\t\t\t\t\t\t\t}\n break;\n case 64:\n//#line 417 \"GramaticaGrupo8.y\"\n {yyerror(\"Linea se esperaba una expresion y se encontro '>'\",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n case 65:\n//#line 418 \"GramaticaGrupo8.y\"\n {yyerror(\"Linea se esperaba una expresion y se encontro '<'\",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n case 66:\n//#line 419 \"GramaticaGrupo8.y\"\n {yyerror(\"Linea se esperaba una expresion y se encontro '>='\",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n case 67:\n//#line 420 \"GramaticaGrupo8.y\"\n {yyerror(\"Linea se esperaba una expresion y se encontro '<='\",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n//#line 1102 \"Parser.java\"\n//########## END OF USER-SUPPLIED ACTIONS ##########\n }//switch\n //#### Now let's reduce... ####\n if (yydebug) debug(\"reduce\");\n state_drop(yym); //we just reduced yylen states\n yystate = state_peek(0); //get new state\n val_drop(yym); //corresponding value drop\n yym = yylhs[yyn]; //select next TERMINAL(on lhs)\n if (yystate == 0 && yym == 0)//done? 'rest' state and at first TERMINAL\n {\n if (yydebug) debug(\"After reduction, shifting from state 0 to state \"+YYFINAL+\"\");\n yystate = YYFINAL; //explicitly say we're done\n state_push(YYFINAL); //and save it\n val_push(yyval); //also save the semantic value of parsing\n if (yychar < 0) //we want another character?\n {\n yychar = yylex(); //get next character\n if (yychar<0) yychar=0; //clean, if necessary\n if (yydebug)\n yylexdebug(yystate,yychar);\n }\n if (yychar == 0) //Good exit (if lex returns 0 ;-)\n break; //quit the loop--all DONE\n }//if yystate\n else //else not done yet\n { //get next state and push, for next yydefred[]\n yyn = yygindex[yym]; //find out where to go\n if ((yyn != 0) && (yyn += yystate) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == yystate)\n yystate = yytable[yyn]; //get new state\n else\n yystate = yydgoto[yym]; //else go to new defred\n if (yydebug) debug(\"after reduction, shifting from state \"+state_peek(0)+\" to state \"+yystate+\"\");\n state_push(yystate); //going again, so push state & val...\n val_push(yyval); //for next action\n }\n }//main loop\n return 0;//yyaccept!!\n }",
"@Test(timeout = 4000)\n public void test010() throws Throwable {\n StringReader stringReader0 = new StringReader(\"pZhZ$;yY23j:\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 121, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n // Undeclared exception!\n try { \n javaParserTokenManager0.SwitchTo((-1));\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Error: Ignoring invalid lexical state : -1. State unchanged.\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\n }",
"private static void fail(String filename, String errMsg, Module_itemContext itemCon)\n\t\t\tthrows UnsupportedGrammerException {\n\n\t\tInterval int1 = itemCon.getSourceInterval(); // get token interval\n\n\t\tToken firstToken = tokenStream.get(int1.a);\n\n\t\tint lineNum = firstToken.getLine(); // get line of first token\n\n\t\t// Determining j, first token in int1 which occurs at a different line\n\n\t\tint j;\n\n\t\tfor (j = int1.a; j < int1.b; j++) {\n\n\t\t\tif (tokenStream.get(j).getLine() != lineNum)\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// form a string from tokens 1 through j-1\n\n\t\tString tokenStr = tokenStream.getText(new Interval(int1.a, j));\n\n\t\tSystem.err.printf(\"Parser error (%s:%d): %s\\n\", filename, lineNum, tokenStr);\n\n\t\tfail(errMsg);\n\n\t}",
"private void zzScanError(int errorCode) {\n\t\tString message;\n\t\ttry {\n\t\t\tmessage = ZZ_ERROR_MSG[errorCode];\n\t\t}\n\t\tcatch (ArrayIndexOutOfBoundsException e) {\n\t\t\tmessage = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];\n\t\t}\n\n\t\tthrow new Error(message);\n\t}",
"protected static void reportParseError(int expectedToken, int otherExpectedToken, int anotherExpectedToken, int actualToken, String actualTokenValue) throws MailcapParseException {\n/* 533 */ if (LogSupport.isLoggable()) {\n/* 534 */ LogSupport.log(\"PARSE ERROR: Encountered a \" + MailcapTokenizer.nameForToken(actualToken) + \" token (\" + actualTokenValue + \") while expecting a \" + MailcapTokenizer.nameForToken(expectedToken) + \", a \" + MailcapTokenizer.nameForToken(otherExpectedToken) + \", or a \" + MailcapTokenizer.nameForToken(anotherExpectedToken) + \" token.\");\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 540 */ throw new MailcapParseException(\"Encountered a \" + MailcapTokenizer.nameForToken(actualToken) + \" token (\" + actualTokenValue + \") while expecting a \" + MailcapTokenizer.nameForToken(expectedToken) + \", a \" + MailcapTokenizer.nameForToken(otherExpectedToken) + \", or a \" + MailcapTokenizer.nameForToken(anotherExpectedToken) + \" token.\");\n/* */ }",
"int yyparse()\n{\nboolean doaction;\n init_stacks();\n yynerrs = 0;\n yyerrflag = 0;\n yychar = -1; //impossible char forces a read\n yystate=0; //initial state\n state_push(yystate); //save it\n val_push(yylval); //save empty value\n while (true) //until parsing is done, either correctly, or w/error\n {\n doaction=true;\n if (yydebug) debug(\"loop\"); \n //#### NEXT ACTION (from reduction table)\n for (yyn=yydefred[yystate];yyn==0;yyn=yydefred[yystate])\n {\n if (yydebug) debug(\"yyn:\"+yyn+\" state:\"+yystate+\" yychar:\"+yychar);\n if (yychar < 0) //we want a char?\n {\n yychar = yylex(); //get next token\n if (yydebug) debug(\" next yychar:\"+yychar);\n //#### ERROR CHECK ####\n if (yychar < 0) //it it didn't work/error\n {\n yychar = 0; //change it to default string (no -1!)\n if (yydebug)\n yylexdebug(yystate,yychar);\n }\n }//yychar<0\n yyn = yysindex[yystate]; //get amount to shift by (shift index)\n if ((yyn != 0) && (yyn += yychar) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == yychar)\n {\n if (yydebug)\n debug(\"state \"+yystate+\", shifting to state \"+yytable[yyn]);\n //#### NEXT STATE ####\n yystate = yytable[yyn];//we are in a new state\n state_push(yystate); //save it\n val_push(yylval); //push our lval as the input for next rule\n yychar = -1; //since we have 'eaten' a token, say we need another\n if (yyerrflag > 0) //have we recovered an error?\n --yyerrflag; //give ourselves credit\n doaction=false; //but don't process yet\n break; //quit the yyn=0 loop\n }\n\n yyn = yyrindex[yystate]; //reduce\n if ((yyn !=0 ) && (yyn += yychar) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == yychar)\n { //we reduced!\n if (yydebug) debug(\"reduce\");\n yyn = yytable[yyn];\n doaction=true; //get ready to execute\n break; //drop down to actions\n }\n else //ERROR RECOVERY\n {\n if (yyerrflag==0)\n {\n yyerror(\"syntax error\");\n yynerrs++;\n }\n if (yyerrflag < 3) //low error count?\n {\n yyerrflag = 3;\n while (true) //do until break\n {\n if (stateptr<0) //check for under & overflow here\n {\n yyerror(\"stack underflow. aborting...\"); //note lower case 's'\n return 1;\n }\n yyn = yysindex[state_peek(0)];\n if ((yyn != 0) && (yyn += YYERRCODE) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)\n {\n if (yydebug)\n debug(\"state \"+state_peek(0)+\", error recovery shifting to state \"+yytable[yyn]+\" \");\n yystate = yytable[yyn];\n state_push(yystate);\n val_push(yylval);\n doaction=false;\n break;\n }\n else\n {\n if (yydebug)\n debug(\"error recovery discarding state \"+state_peek(0)+\" \");\n if (stateptr<0) //check for under & overflow here\n {\n yyerror(\"Stack underflow. aborting...\"); //capital 'S'\n return 1;\n }\n state_pop();\n val_pop();\n }\n }\n }\n else //discard this token\n {\n if (yychar == 0)\n return 1; //yyabort\n if (yydebug)\n {\n yys = null;\n if (yychar <= YYMAXTOKEN) yys = yyname[yychar];\n if (yys == null) yys = \"illegal-symbol\";\n debug(\"state \"+yystate+\", error recovery discards token \"+yychar+\" (\"+yys+\")\");\n }\n yychar = -1; //read another\n }\n }//end error recovery\n }//yyn=0 loop\n if (!doaction) //any reason not to proceed?\n continue; //skip action\n yym = yylen[yyn]; //get count of terminals on rhs\n if (yydebug)\n debug(\"state \"+yystate+\", reducing \"+yym+\" by rule \"+yyn+\" (\"+yyrule[yyn]+\")\");\n if (yym>0) //if count of rhs not 'nil'\n yyval = val_peek(yym-1); //get current semantic value\n yyval = dup_yyval(yyval); //duplicate yyval if ParserVal is used as semantic value\n switch(yyn)\n {\n//########## USER-SUPPLIED ACTIONS ##########\ncase 1:\n//#line 63 \"./sinj.y\"\n{ this.ast = new Program (lexico.getLine(), lexico.getColumn(), (List<Sentence>)val_peek(1), (List<Definition>)val_peek(8),(List<VariableDefinition>)val_peek(2) ); }\nbreak;\ncase 2:\n//#line 66 \"./sinj.y\"\n{ yyval = new ArrayList<Definition>(); }\nbreak;\ncase 3:\n//#line 67 \"./sinj.y\"\n{ \n\t\t\t\t\t\t\t\t\t\t\tyyval = val_peek(1);\n\t\t\t\t\t\t\t\t\t\t\t((ArrayList<Definition> )yyval).addAll((ArrayList<Definition>)val_peek(0));\n\t\t\t\t\t\t\t\t\t\t\t}\nbreak;\ncase 6:\n//#line 78 \"./sinj.y\"\n{ \n\t\t\t\t\t\t\t\t\t\t\t\tTypeFunction type = new TypeFunction ((Type)val_peek(8), (ArrayList<VariableDefinition>) val_peek(5));\n\t\t\t\t\t\t\t\t\t\t\t\tList<Sentence> body = new ArrayList<Sentence> ();\n\t\t\t\t\t\t\t\t\t\t\t\tbody.addAll((List<Sentence>)val_peek(2));\n\t\t\t\t\t\t\t\t\t\t\t\tbody.addAll((List<Sentence>)val_peek(1));\n\t\t\t\t\t\t\t\t\t\t\t\tDefinition def = new FunctionDefinition (lexico.getLine(), lexico.getColumn(), type, (String) val_peek(7), body);\n\t\t\t\t\t\t\t\t\t\t\t\tList<Definition> xx = new ArrayList<Definition> ();\n\t\t\t\t\t\t\t\t\t\t\t\txx.add(def);\n\t\t\t\t\t\t\t\t\t\t\t\tyyval = xx;\n }\nbreak;\ncase 7:\n//#line 89 \"./sinj.y\"\n{ yyval = new ArrayList<VariableDefinition> (); }\nbreak;\ncase 9:\n//#line 93 \"./sinj.y\"\n{ \n\t\t\t\t\t\tyyval = new ArrayList<VariableDefinition>();\n\t\t\t\t\t\tVariable v = new Variable (lexico.getLine(), lexico.getColumn(), val_peek(0).toString());\n\t\t\t\t\t\t((ArrayList<Definition>)yyval).add(new VariableDefinition(lexico.getLine(), lexico.getColumn(), v, (Type)val_peek(1)));\n\t\t\t\t\t}\nbreak;\ncase 10:\n//#line 98 \"./sinj.y\"\n{\n\t\t\t\t\t\t\t\t\t\tyyval = val_peek(3);\n\t\t\t\t\t\t\t\t\t\tVariable v = new Variable (lexico.getLine(), lexico.getColumn(), val_peek(0).toString());\n\t\t\t\t\t\t\t\t\t\tVariableDefinition vd = new VariableDefinition(lexico.getLine(), lexico.getColumn(), v, (Type)val_peek(1));\n\t\t\t\t\t\t\t\t\t\tif (!((ArrayList<VariableDefinition>)yyval).contains (vd))\n\t\t\t\t\t\t\t\t\t\t\t((ArrayList<Definition>) yyval).add(vd);\n\t\t\t\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\t\t\t\tthrow new RuntimeException (\"One param is duplicate\");\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\nbreak;\ncase 11:\n//#line 111 \"./sinj.y\"\n{ \n\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<VariableDefinition> xx = new ArrayList<VariableDefinition>();\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor (Variable v: (ArrayList<Variable>)val_peek(1)) \n\t\t\t\t\t\t\t\t\t\t\t\t\t \txx.add(new VariableDefinition(lexico.getLine(), lexico.getColumn(), v, (Type)val_peek(2))); \n\t\t\t\t\t\t\t\t\t\t\t\t\tyyval = xx; \n\t\t\t\t\t\t\t\t\t\t\t\t\t }\nbreak;\ncase 12:\n//#line 123 \"./sinj.y\"\n{ \n\t\t\t\t\t\t\t\tList<Variable> xx = new ArrayList<Variable>(); \n\t\t\t\t\t\t\t\txx.add(new Variable (lexico.getLine(), lexico.getColumn(), (String) val_peek(0))); \n\t\t\t\t\t\t\t\tyyval = xx; \n\t\t\t\t\t\t\t\t}\nbreak;\ncase 13:\n//#line 128 \"./sinj.y\"\n{ \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tyyval = val_peek(2); \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tVariable v = new Variable (lexico.getLine(), lexico.getColumn(), (String)val_peek(0));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!((ArrayList<Variable>)yyval).contains(v))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t((ArrayList<Variable>)yyval).add(v); \n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthrow new RuntimeException (\"One variable is duplicate\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\nbreak;\ncase 14:\n//#line 144 \"./sinj.y\"\n{ yyval = new ArrayList<VariableDefinition> ();}\nbreak;\ncase 15:\n//#line 145 \"./sinj.y\"\n{ \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tyyval = val_peek(1); \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (VariableDefinition vd: (ArrayList<VariableDefinition>)val_peek(0)) \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(!((ArrayList<VariableDefinition>)yyval).contains(vd))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t((ArrayList<VariableDefinition>)yyval).add(vd); \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthrow new RuntimeException(\"One field struct is duplicate\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\nbreak;\ncase 16:\n//#line 156 \"./sinj.y\"\n{yyval = new ArrayList<Sentence> (); }\nbreak;\ncase 17:\n//#line 157 \"./sinj.y\"\n{ \n\t\t\t\t\t\t\t\t\t\t\t\tyyval = val_peek(1);\n\t\t\t\t\t\t\t\t\t\t\t\t((ArrayList<Sentence>)yyval).add((Sentence)val_peek(0)); \n\t\t\t\t\t\t\t\t\t\t\t\t }\nbreak;\ncase 18:\n//#line 163 \"./sinj.y\"\n{ \n\t\t\t\t\t\t\tyyval = new ArrayList<Expression>();\n\t\t\t\t\t\t\t((ArrayList<Expression>)yyval).add((Expression)val_peek(0)); \n\t\t\t\t\t\t\t}\nbreak;\ncase 19:\n//#line 167 \"./sinj.y\"\n{\n\t\t\t\t\t \t\t\t\t\t\t\tyyval = val_peek(2);\n\t\t\t\t\t\t\t\t\t\t\t\t((ArrayList<Expression>)yyval).add((Expression)val_peek(0)); \n\t\t\t\t\t\t\t\t\t\t\t\t}\nbreak;\ncase 20:\n//#line 174 \"./sinj.y\"\n{ yyval = new ArrayList<Expression> (); }\nbreak;\ncase 29:\n//#line 187 \"./sinj.y\"\n{yyval = new Write(lexico.getLine(), lexico.getColumn(), (List<Expression>)val_peek(1)); }\nbreak;\ncase 30:\n//#line 188 \"./sinj.y\"\n{ yyval = new Read(lexico.getLine(), lexico.getColumn(), (List<Expression>)val_peek(1)); }\nbreak;\ncase 31:\n//#line 189 \"./sinj.y\"\n{ yyval = new Assign(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(3), (Expression)val_peek(1)); }\nbreak;\ncase 32:\n//#line 190 \"./sinj.y\"\n{ yyval = new Invocation (lexico.getLine(), lexico.getColumn(), (String) val_peek(4), (List<Expression>)val_peek(2)); }\nbreak;\ncase 33:\n//#line 191 \"./sinj.y\"\n{ yyval = new Return (lexico.getLine(), lexico.getColumn(), (Expression) val_peek(1)); }\nbreak;\ncase 34:\n//#line 192 \"./sinj.y\"\n{ yyval = new While (lexico.getLine(), lexico.getColumn(), (Expression) val_peek(4), (List<Sentence>) val_peek(1)); }\nbreak;\ncase 35:\n//#line 195 \"./sinj.y\"\n{ \n\t\t\t\t\t\t\t\t\tList<Sentence> ifBody = new ArrayList<Sentence> ();\n\t\t\t\t\t\t\t\t\tifBody.add((Sentence) val_peek(0));\n\t\t\t\t\t\t\t\t\tyyval = new If(lexico.getLine(), lexico.getColumn(), (Expression) val_peek(2), ifBody, new ArrayList<Sentence>());\n\t\t\t\t\t\t\t\t\t}\nbreak;\ncase 36:\n//#line 200 \"./sinj.y\"\n{\n\t\t\t\t\t\t\t\t\t\t\t\t\tList<Sentence> ifBody = new ArrayList<Sentence> ();\n\t\t\t\t\t\t\t\t\t\t\t\t\tList<Sentence> elseBody = new ArrayList<Sentence> ();\n\t\t\t\t\t\t\t\t\t\t\t\t\tifBody.add((Sentence) val_peek(2));\n\t\t\t\t\t\t\t\t\t\t\t\t\telseBody.add((Sentence)val_peek(0));\n\t\t\t\t\t\t\t\t\t\t\t\t\tyyval = new If(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(4), ifBody, elseBody);\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\nbreak;\ncase 37:\n//#line 207 \"./sinj.y\"\n{\n\t\t\t\t\t\t\t\t\t\t\t\t\tList<Sentence> ifBody = new ArrayList<Sentence> ();\n\t\t\t\t\t\t\t\t\t\t\t\t\tList<Sentence> elseBody = new ArrayList<Sentence> ();\n\t\t\t\t\t\t\t\t\t\t\t\t\tifBody.addAll((List<Sentence>) val_peek(4));\n\t\t\t\t\t\t\t\t\t\t\t\t\telseBody.add((Sentence)val_peek(2));\n\t\t\t\t\t\t\t\t\t\t\t\t\tyyval = new If(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(6), ifBody, elseBody);\n\t\t\t\t\t\t\t\t\t\t\t\t\t }\nbreak;\ncase 38:\n//#line 215 \"./sinj.y\"\n{\n\t\t\t\t\t\t\t\t\t\t\t\t\tList<Sentence> ifBody = new ArrayList<Sentence> ();\n\t\t\t\t\t\t\t\t\t\t\t\t\tList<Sentence> elseBody = new ArrayList<Sentence> ();\n\t\t\t\t\t\t\t\t\t\t\t\t\tifBody.addAll((List<Sentence>) val_peek(6));\n\t\t\t\t\t\t\t\t\t\t\t\t\telseBody.addAll((List<Sentence>)val_peek(4));\n\t\t\t\t\t\t\t\t\t\t\t\t\tyyval = new If(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(8), ifBody, elseBody);\n\t\t\t\t\t\t\t\t\t\t\t\t\t }\nbreak;\ncase 39:\n//#line 223 \"./sinj.y\"\n{\n\t\t\t\t\t\t\t\t\t\t\t\t\tList<Sentence> ifBody = new ArrayList<Sentence> ();\n\t\t\t\t\t\t\t\t\t\t\t\t\tList<Sentence> elseBody = new ArrayList<Sentence> ();\n\t\t\t\t\t\t\t\t\t\t\t\t\tifBody.addAll((List<Sentence>) val_peek(2));\n\t\t\t\t\t\t\t\t\t\t\t\t\tyyval = new If(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(4), ifBody, elseBody);\n\t}\nbreak;\ncase 40:\n//#line 234 \"./sinj.y\"\n{ yyval = new TypeInteger(); }\nbreak;\ncase 41:\n//#line 235 \"./sinj.y\"\n{ yyval = new TypeDouble(); }\nbreak;\ncase 42:\n//#line 236 \"./sinj.y\"\n{ yyval = new TypeChar(); }\nbreak;\ncase 43:\n//#line 237 \"./sinj.y\"\n{ yyval = createArray((Type)val_peek(3), Integer.parseInt(String.valueOf((val_peek(1)))));/*$$ = new TypeArray((Type)$1, Integer.parseInt(String.valueOf(($3))));*/ }\nbreak;\ncase 44:\n//#line 238 \"./sinj.y\"\n{ yyval = new TypeVoid (); }\nbreak;\ncase 45:\n//#line 239 \"./sinj.y\"\n{ \n\t\t\t\t\t\t\tList <VariableDefinition> variables = (ArrayList<VariableDefinition>) val_peek(1);\n\t\t\t\t\t\t\tList <FieldDefinition> fieldsStruct = new ArrayList<FieldDefinition> ();\n\t\t\t\t\t\t\tfor (VariableDefinition vd : variables) {\n\t\t\t\t\t\t\t\tFieldDefinition field = new FieldDefinition (vd.getLine(), vd.getColumn(), vd.getType(), vd.getVariable());\n\t\t\t\t\t\t\t\tfieldsStruct.add(field);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tyyval = new TypeStruct (fieldsStruct);\n\t\t\t\t\t\t\t}\nbreak;\ncase 46:\n//#line 253 \"./sinj.y\"\n{ yyval= new Arithmetic(lexico.getLine(), lexico.getColumn(), (Expression) val_peek(2), (String)val_peek(1) , (Expression)val_peek(0)); }\nbreak;\ncase 47:\n//#line 254 \"./sinj.y\"\n{ yyval= new Arithmetic(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(2), (String)val_peek(1) , (Expression)val_peek(0)); }\nbreak;\ncase 48:\n//#line 255 \"./sinj.y\"\n{ yyval= new Arithmetic(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(2), (String)val_peek(1) , (Expression)val_peek(0)); }\nbreak;\ncase 49:\n//#line 256 \"./sinj.y\"\n{ yyval= new Arithmetic(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(2), (String)val_peek(1) , (Expression)val_peek(0)); }\nbreak;\ncase 50:\n//#line 257 \"./sinj.y\"\n{ yyval= new Arithmetic(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(2), (String)val_peek(1) , (Expression)val_peek(0)); }\nbreak;\ncase 51:\n//#line 258 \"./sinj.y\"\n{ yyval= new AccesoArray(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(3), (Expression)val_peek(1)); }\nbreak;\ncase 52:\n//#line 259 \"./sinj.y\"\n{ yyval = new Comparation(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(2), (String)val_peek(1) , (Expression)val_peek(0)); }\nbreak;\ncase 53:\n//#line 260 \"./sinj.y\"\n{ yyval = new Comparation(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(2), (String)val_peek(1) , (Expression)val_peek(0)); }\nbreak;\ncase 54:\n//#line 261 \"./sinj.y\"\n{ yyval = new Comparation(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(2), (String)val_peek(1) , (Expression)val_peek(0)); }\nbreak;\ncase 55:\n//#line 262 \"./sinj.y\"\n{ yyval = new Comparation(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(2), (String)val_peek(1) , (Expression)val_peek(0)); }\nbreak;\ncase 56:\n//#line 263 \"./sinj.y\"\n{ yyval = new Comparation(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(2), (String)val_peek(1) , (Expression)val_peek(0)); }\nbreak;\ncase 57:\n//#line 264 \"./sinj.y\"\n{ yyval = new Comparation(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(2), (String)val_peek(1) , (Expression)val_peek(0)); }\nbreak;\ncase 58:\n//#line 265 \"./sinj.y\"\n{ yyval = new Logic(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(2), (String)val_peek(1) , (Expression)val_peek(0)); }\nbreak;\ncase 59:\n//#line 266 \"./sinj.y\"\n{ yyval = new Logic(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(2), (String)val_peek(1) , (Expression)val_peek(0)); }\nbreak;\ncase 60:\n//#line 267 \"./sinj.y\"\n{ yyval= new UnaryNegation (lexico.getLine(), lexico.getColumn(), (Expression)val_peek(0)); }\nbreak;\ncase 61:\n//#line 268 \"./sinj.y\"\n{ yyval= new Literal (lexico.getLine(), lexico.getColumn(), (Integer) val_peek(0)); }\nbreak;\ncase 62:\n//#line 269 \"./sinj.y\"\n{ yyval = new Variable (lexico.getLine(), lexico.getColumn(), val_peek(0).toString()); }\nbreak;\ncase 63:\n//#line 270 \"./sinj.y\"\n{ yyval= new RealNumber (lexico.getLine(), lexico.getColumn(), (Double) val_peek(0)); }\nbreak;\ncase 64:\n//#line 271 \"./sinj.y\"\n{ yyval= val_peek(1);}\nbreak;\ncase 65:\n//#line 272 \"./sinj.y\"\n{ yyval = new FieldAccess (lexico.getLine(), lexico.getColumn(), (Expression) val_peek(2), new Variable (lexico.getLine(), lexico.getColumn(), val_peek(0).toString()));}\nbreak;\ncase 66:\n//#line 273 \"./sinj.y\"\n{ yyval = new FunctionInvocation (lexico.getLine(), lexico.getColumn(), (String) val_peek(3), (List<Expression>)val_peek(1)); }\nbreak;\ncase 67:\n//#line 274 \"./sinj.y\"\n{ yyval = new Cast (lexico.getLine(), lexico.getColumn(), (Type) val_peek(2), (Expression) val_peek(0)); }\nbreak;\ncase 68:\n//#line 275 \"./sinj.y\"\n{ yyval = new LogicalNegation (lexico.getLine(), lexico.getColumn(), (Expression)val_peek(0)); }\nbreak;\ncase 69:\n//#line 276 \"./sinj.y\"\n{ yyval = new Char (lexico.getLine(), lexico.getColumn(), val_peek(0).toString()); }\nbreak;\n//#line 1070 \"Parser.java\"\n//########## END OF USER-SUPPLIED ACTIONS ##########\n }//switch\n //#### Now let's reduce... ####\n if (yydebug) debug(\"reduce\");\n state_drop(yym); //we just reduced yylen states\n yystate = state_peek(0); //get new state\n val_drop(yym); //corresponding value drop\n yym = yylhs[yyn]; //select next TERMINAL(on lhs)\n if (yystate == 0 && yym == 0)//done? 'rest' state and at first TERMINAL\n {\n if (yydebug) debug(\"After reduction, shifting from state 0 to state \"+YYFINAL+\"\");\n yystate = YYFINAL; //explicitly say we're done\n state_push(YYFINAL); //and save it\n val_push(yyval); //also save the semantic value of parsing\n if (yychar < 0) //we want another character?\n {\n yychar = yylex(); //get next character\n if (yychar<0) yychar=0; //clean, if necessary\n if (yydebug)\n yylexdebug(yystate,yychar);\n }\n if (yychar == 0) //Good exit (if lex returns 0 ;-)\n break; //quit the loop--all DONE\n }//if yystate\n else //else not done yet\n { //get next state and push, for next yydefred[]\n yyn = yygindex[yym]; //find out where to go\n if ((yyn != 0) && (yyn += yystate) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == yystate)\n yystate = yytable[yyn]; //get new state\n else\n yystate = yydgoto[yym]; //else go to new defred\n if (yydebug) debug(\"after reduction, shifting from state \"+state_peek(0)+\" to state \"+yystate+\"\");\n state_push(yystate); //going again, so push state & val...\n val_push(yyval); //for next action\n }\n }//main loop\n return 0;//yyaccept!!\n}",
"int yyparse()\n{\nboolean doaction;\n init_stacks();\n yynerrs = 0;\n yyerrflag = 0;\n yychar = -1; //impossible char forces a read\n yystate=0; //initial state\n state_push(yystate); //save it\n val_push(yylval); //save empty value\n while (true) //until parsing is done, either correctly, or w/error\n {\n doaction=true;\n if (yydebug) debug(\"loop\"); \n //#### NEXT ACTION (from reduction table)\n for (yyn=yydefred[yystate];yyn==0;yyn=yydefred[yystate])\n {\n if (yydebug) debug(\"yyn:\"+yyn+\" state:\"+yystate+\" yychar:\"+yychar);\n if (yychar < 0) //we want a char?\n {\n yychar = yylex(); //get next token\n if (yydebug) debug(\" next yychar:\"+yychar);\n //#### ERROR CHECK ####\n if (yychar < 0) //it it didn't work/error\n {\n yychar = 0; //change it to default string (no -1!)\n if (yydebug)\n yylexdebug(yystate,yychar);\n }\n }//yychar<0\n yyn = yysindex[yystate]; //get amount to shift by (shift index)\n if ((yyn != 0) && (yyn += yychar) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == yychar)\n {\n if (yydebug)\n debug(\"state \"+yystate+\", shifting to state \"+yytable[yyn]);\n //#### NEXT STATE ####\n yystate = yytable[yyn];//we are in a new state\n state_push(yystate); //save it\n val_push(yylval); //push our lval as the input for next rule\n yychar = -1; //since we have 'eaten' a token, say we need another\n if (yyerrflag > 0) //have we recovered an error?\n --yyerrflag; //give ourselves credit\n doaction=false; //but don't process yet\n break; //quit the yyn=0 loop\n }\n\n yyn = yyrindex[yystate]; //reduce\n if ((yyn !=0 ) && (yyn += yychar) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == yychar)\n { //we reduced!\n if (yydebug) debug(\"reduce\");\n yyn = yytable[yyn];\n doaction=true; //get ready to execute\n break; //drop down to actions\n }\n else //ERROR RECOVERY\n {\n if (yyerrflag==0)\n {\n yyerror(\"syntax error\");\n yynerrs++;\n }\n if (yyerrflag < 3) //low error count?\n {\n yyerrflag = 3;\n while (true) //do until break\n {\n if (stateptr<0) //check for under & overflow here\n {\n yyerror(\"stack underflow. aborting...\"); //note lower case 's'\n return 1;\n }\n yyn = yysindex[state_peek(0)];\n if ((yyn != 0) && (yyn += YYERRCODE) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)\n {\n if (yydebug)\n debug(\"state \"+state_peek(0)+\", error recovery shifting to state \"+yytable[yyn]+\" \");\n yystate = yytable[yyn];\n state_push(yystate);\n val_push(yylval);\n doaction=false;\n break;\n }\n else\n {\n if (yydebug)\n debug(\"error recovery discarding state \"+state_peek(0)+\" \");\n if (stateptr<0) //check for under & overflow here\n {\n yyerror(\"Stack underflow. aborting...\"); //capital 'S'\n return 1;\n }\n state_pop();\n val_pop();\n }\n }\n }\n else //discard this token\n {\n if (yychar == 0)\n return 1; //yyabort\n if (yydebug)\n {\n yys = null;\n if (yychar <= YYMAXTOKEN) yys = yyname[yychar];\n if (yys == null) yys = \"illegal-symbol\";\n debug(\"state \"+yystate+\", error recovery discards token \"+yychar+\" (\"+yys+\")\");\n }\n yychar = -1; //read another\n }\n }//end error recovery\n }//yyn=0 loop\n if (!doaction) //any reason not to proceed?\n continue; //skip action\n yym = yylen[yyn]; //get count of terminals on rhs\n if (yydebug)\n debug(\"state \"+yystate+\", reducing \"+yym+\" by rule \"+yyn+\" (\"+yyrule[yyn]+\")\");\n if (yym>0) //if count of rhs not 'nil'\n yyval = val_peek(yym-1); //get current semantic value\n switch(yyn)\n {\n//########## USER-SUPPLIED ACTIONS ##########\ncase 1:\n//#line 36 \"src/parsers/AdvConditionParser.y\"\n{\r\n\ttopAdvCondition=(AdvCondition)val_peek(0).obj;\r\n\tSystem.out.println(\"AdvConditionParser work completed. \"); \r\n}\nbreak;\ncase 2:\n//#line 42 \"src/parsers/AdvConditionParser.y\"\n{Expression e=new tokens.Number(val_peek(0).ival);yyval=new AdvConditionParserVal(e);}\nbreak;\ncase 3:\n//#line 43 \"src/parsers/AdvConditionParser.y\"\n{Expression e=new Variable(getStringValue(val_peek(0)));yyval=new AdvConditionParserVal(e);}\nbreak;\ncase 4:\n//#line 45 \"src/parsers/AdvConditionParser.y\"\n{\r\n \tExpression e=new CompositeExpression((Expression)val_peek(2).obj,(Expression)val_peek(0).obj,CompositeExpression.TYPE_PLUS);\r\n \tyyval=new AdvConditionParserVal(e);\r\n }\nbreak;\ncase 5:\n//#line 50 \"src/parsers/AdvConditionParser.y\"\n{\r\n \tExpression e=new CompositeExpression((Expression)val_peek(2).obj,(Expression)val_peek(0).obj,CompositeExpression.TYPE_MINUS);\r\n \tyyval=new AdvConditionParserVal(e);\r\n }\nbreak;\ncase 6:\n//#line 55 \"src/parsers/AdvConditionParser.y\"\n{\r\n \tExpression e=new CompositeExpression((Expression)val_peek(2).obj,(Expression)val_peek(0).obj,CompositeExpression.TYPE_MULTIPLY);\r\n \tyyval=new AdvConditionParserVal(e);\r\n }\nbreak;\ncase 7:\n//#line 61 \"src/parsers/AdvConditionParser.y\"\n{\r\n \tExpression e=new NegativeExpression((Expression)val_peek(0).obj);\r\n \tyyval=new AdvConditionParserVal(e);\r\n }\nbreak;\ncase 8:\n//#line 67 \"src/parsers/AdvConditionParser.y\"\n{\r\n \tyyval=val_peek(1);\r\n }\nbreak;\ncase 9:\n//#line 72 \"src/parsers/AdvConditionParser.y\"\n{yyval=new AdvConditionParserVal(new AdvCondition((Condition)val_peek(0).obj));}\nbreak;\ncase 10:\n//#line 74 \"src/parsers/AdvConditionParser.y\"\n{\r\n yyval=new AdvConditionParserVal(new AdvCondition((AdvCondition)val_peek(3).obj,(AdvCondition)val_peek(0).obj,AdvCondition.Type_AND)); \r\n}\nbreak;\ncase 11:\n//#line 79 \"src/parsers/AdvConditionParser.y\"\n{\r\n yyval=new AdvConditionParserVal(new AdvCondition((AdvCondition)val_peek(3).obj,(AdvCondition)val_peek(0).obj,AdvCondition.Type_OR));\r\n}\nbreak;\ncase 12:\n//#line 84 \"src/parsers/AdvConditionParser.y\"\n{yyval=val_peek(1);}\nbreak;\ncase 13:\n//#line 88 \"src/parsers/AdvConditionParser.y\"\n{yyval=val_peek(0);((AdvCondition)yyval.obj).negateSelf();}\nbreak;\ncase 14:\n//#line 91 \"src/parsers/AdvConditionParser.y\"\n{\r\n \tCondition c=new Condition((Expression)val_peek(3).obj,(Expression)val_peek(0).obj,ConType.equal);\r\n \tyyval=new AdvConditionParserVal(c);\r\n }\nbreak;\ncase 15:\n//#line 96 \"src/parsers/AdvConditionParser.y\"\n{\r\n \tCondition c=new Condition((Expression)val_peek(3).obj,(Expression)val_peek(0).obj,ConType.notequal);\r\n \tyyval=new AdvConditionParserVal(c);\r\n }\nbreak;\ncase 16:\n//#line 101 \"src/parsers/AdvConditionParser.y\"\n{\r\n \tCondition c=new Condition((Expression)val_peek(3).obj,(Expression)val_peek(0).obj,ConType.equalsmaller);\r\n \tyyval=new AdvConditionParserVal(c);\r\n }\nbreak;\ncase 17:\n//#line 106 \"src/parsers/AdvConditionParser.y\"\n{\r\n \tCondition c=new Condition((Expression)val_peek(3).obj,(Expression)val_peek(0).obj,ConType.equallarger);\r\n \tyyval=new AdvConditionParserVal(c);\r\n }\nbreak;\ncase 18:\n//#line 111 \"src/parsers/AdvConditionParser.y\"\n{\r\n \tCondition c=new Condition((Expression)val_peek(2).obj,(Expression)val_peek(0).obj,ConType.smaller);\r\n \tyyval=new AdvConditionParserVal(c);\r\n }\nbreak;\ncase 19:\n//#line 116 \"src/parsers/AdvConditionParser.y\"\n{\r\n \tCondition c=new Condition((Expression)val_peek(2).obj,(Expression)val_peek(0).obj,ConType.larger);\r\n \tyyval=new AdvConditionParserVal(c);\r\n }\nbreak;\n//#line 689 \"AdvConditionParser.java\"\n//########## END OF USER-SUPPLIED ACTIONS ##########\n }//switch\n //#### Now let's reduce... ####\n if (yydebug) debug(\"reduce\");\n state_drop(yym); //we just reduced yylen states\n yystate = state_peek(0); //get new state\n val_drop(yym); //corresponding value drop\n yym = yylhs[yyn]; //select next TERMINAL(on lhs)\n if (yystate == 0 && yym == 0)//done? 'rest' state and at first TERMINAL\n {\n if (yydebug) debug(\"After reduction, shifting from state 0 to state \"+YYFINAL+\"\");\n yystate = YYFINAL; //explicitly say we're done\n state_push(YYFINAL); //and save it\n val_push(yyval); //also save the semantic value of parsing\n if (yychar < 0) //we want another character?\n {\n yychar = yylex(); //get next character\n if (yychar<0) yychar=0; //clean, if necessary\n if (yydebug)\n yylexdebug(yystate,yychar);\n }\n if (yychar == 0) //Good exit (if lex returns 0 ;-)\n break; //quit the loop--all DONE\n }//if yystate\n else //else not done yet\n { //get next state and push, for next yydefred[]\n yyn = yygindex[yym]; //find out where to go\n if ((yyn != 0) && (yyn += yystate) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == yystate)\n yystate = yytable[yyn]; //get new state\n else\n yystate = yydgoto[yym]; //else go to new defred\n if (yydebug) debug(\"after reduction, shifting from state \"+state_peek(0)+\" to state \"+yystate+\"\");\n state_push(yystate); //going again, so push state & val...\n val_push(yyval); //for next action\n }\n }//main loop\n return 0;//yyaccept!!\n}",
"private void zzScanError(int errorCode) {\r\n String message;\r\n try {\r\n message = ZZ_ERROR_MSG[errorCode];\r\n }\r\n catch (ArrayIndexOutOfBoundsException e) {\r\n message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];\r\n }\r\n\r\n throw new Error(message);\r\n }",
"private void zzScanError(int errorCode) {\r\n String message;\r\n try {\r\n message = ZZ_ERROR_MSG[errorCode];\r\n }\r\n catch (ArrayIndexOutOfBoundsException e) {\r\n message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];\r\n }\r\n\r\n throw new Error(message);\r\n }",
"private void zzScanError(int errorCode) {\r\n String message;\r\n try {\r\n message = ZZ_ERROR_MSG[errorCode];\r\n }\r\n catch (ArrayIndexOutOfBoundsException e) {\r\n message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];\r\n }\r\n\r\n throw new Error(message);\r\n }",
"private void zzScanError(int errorCode) {\r\n String message;\r\n try {\r\n message = ZZ_ERROR_MSG[errorCode];\r\n }\r\n catch (ArrayIndexOutOfBoundsException e) {\r\n message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];\r\n }\r\n\r\n throw new Error(message);\r\n }",
"private void zzScanError(int errorCode) {\r\n String message;\r\n try {\r\n message = ZZ_ERROR_MSG[errorCode];\r\n }\r\n catch (ArrayIndexOutOfBoundsException e) {\r\n message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];\r\n }\r\n\r\n throw new Error(message);\r\n }",
"int yyparse()\n{\nboolean doaction;\n init_stacks();\n yynerrs = 0;\n yyerrflag = 0;\n yychar = -1; //impossible char forces a read\n yystate=0; //initial state\n state_push(yystate); //save it\n while (true) //until parsing is done, either correctly, or w/error\n {\n doaction=true;\n //if (yydebug) debug(\"loop\"); \n //#### NEXT ACTION (from reduction table)\n for (yyn=yydefred[yystate];yyn==0;yyn=yydefred[yystate])\n {\n //if (yydebug) debug(\"yyn:\"+yyn+\" state:\"+yystate+\" yychar:\"+yychar);\n if (yychar < 0) //we want a char?\n {\n yychar = yylex(); //get next token\n //if (yydebug) debug(\" next yychar:\"+yychar);\n //#### ERROR CHECK ####\n //if (yychar < 0) //it it didn't work/error\n // {\n // yychar = 0; //change it to default string (no -1!)\n //if (yydebug)\n // yylexdebug(yystate,yychar);\n // }\n }//yychar<0\n yyn = yysindex[yystate]; //get amount to shift by (shift index)\n if ((yyn != 0) && (yyn += yychar) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == yychar)\n {\n //if (yydebug)\n //debug(\"state \"+yystate+\", shifting to state \"+yytable[yyn]);\n //#### NEXT STATE ####\n yystate = yytable[yyn];//we are in a new state\n state_push(yystate); //save it\n val_push(yylval); //push our lval as the input for next rule\n yychar = -1; //since we have 'eaten' a token, say we need another\n if (yyerrflag > 0) //have we recovered an error?\n --yyerrflag; //give ourselves credit\n doaction=false; //but don't process yet\n break; //quit the yyn=0 loop\n }\n\n yyn = yyrindex[yystate]; //reduce\n if ((yyn !=0 ) && (yyn += yychar) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == yychar)\n { //we reduced!\n //if (yydebug) debug(\"reduce\");\n yyn = yytable[yyn];\n doaction=true; //get ready to execute\n break; //drop down to actions\n }\n else //ERROR RECOVERY\n {\n if (yyerrflag==0)\n {\n yyerror(\"syntax error\");\n yynerrs++;\n }\n if (yyerrflag < 3) //low error count?\n {\n yyerrflag = 3;\n while (true) //do until break\n {\n if (stateptr<0 || valptr<0) //check for under & overflow here\n {\n return 1;\n }\n yyn = yysindex[state_peek(0)];\n if ((yyn != 0) && (yyn += YYERRCODE) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)\n {\n //if (yydebug)\n //debug(\"state \"+state_peek(0)+\", error recovery shifting to state \"+yytable[yyn]+\" \");\n yystate = yytable[yyn];\n state_push(yystate);\n val_push(yylval);\n doaction=false;\n break;\n }\n else\n {\n //if (yydebug)\n //debug(\"error recovery discarding state \"+state_peek(0)+\" \");\n if (stateptr<0 || valptr<0) //check for under & overflow here\n {\n return 1;\n }\n state_pop();\n val_pop();\n }\n }\n }\n else //discard this token\n {\n if (yychar == 0)\n return 1; //yyabort\n //if (yydebug)\n //{\n //yys = null;\n //if (yychar <= YYMAXTOKEN) yys = yyname[yychar];\n //if (yys == null) yys = \"illegal-symbol\";\n //debug(\"state \"+yystate+\", error recovery discards token \"+yychar+\" (\"+yys+\")\");\n //}\n yychar = -1; //read another\n }\n }//end error recovery\n }//yyn=0 loop\n if (!doaction) //any reason not to proceed?\n continue; //skip action\n yym = yylen[yyn]; //get count of terminals on rhs\n //if (yydebug)\n //debug(\"state \"+yystate+\", reducing \"+yym+\" by rule \"+yyn+\" (\"+yyrule[yyn]+\")\");\n if (yym>0) //if count of rhs not 'nil'\n yyval = val_peek(yym-1); //get current semantic value\n if (reduceListener == null || reduceListener.onReduce(yyrule[yyn])) // if intercepted!\n switch(yyn)\n {\n//########## USER-SUPPLIED ACTIONS ##########\ncase 1:\n//#line 61 \"Parser.y\"\n{\n\t\t\t\t\t\ttree = new Tree.TopLevel(val_peek(0).clist, val_peek(0).loc);\n\t\t\t\t\t}\nbreak;\ncase 2:\n//#line 67 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.clist.add(val_peek(0).cdef);\n\t\t\t\t\t}\nbreak;\ncase 3:\n//#line 71 \"Parser.y\"\n{\n \t\tyyval.clist = new ArrayList<Tree.ClassDef>();\n \t\tyyval.clist.add(val_peek(0).cdef);\n \t}\nbreak;\ncase 5:\n//#line 81 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.vdef = new Tree.VarDef(val_peek(0).ident, val_peek(1).type, val_peek(0).loc);\n\t\t\t\t\t}\nbreak;\ncase 6:\n//#line 87 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.type = new Tree.TypeIdent(Tree.INT, val_peek(0).loc);\n\t\t\t\t\t}\nbreak;\ncase 7:\n//#line 91 \"Parser.y\"\n{\n \t\tyyval.type = new Tree.TypeIdent(Tree.VOID, val_peek(0).loc);\n \t}\nbreak;\ncase 8:\n//#line 95 \"Parser.y\"\n{\n \t\tyyval.type = new Tree.TypeIdent(Tree.BOOL, val_peek(0).loc);\n \t}\nbreak;\ncase 9:\n//#line 99 \"Parser.y\"\n{\n \t\tyyval.type = new Tree.TypeIdent(Tree.STRING, val_peek(0).loc);\n \t}\nbreak;\ncase 10:\n//#line 103 \"Parser.y\"\n{\n \t\tyyval.type = new Tree.TypeClass(val_peek(0).ident, val_peek(1).loc);\n \t}\nbreak;\ncase 11:\n//#line 107 \"Parser.y\"\n{\n \t\tyyval.type = new Tree.TypeArray(val_peek(2).type, val_peek(2).loc);\n \t}\nbreak;\ncase 12:\n//#line 113 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.cdef = new Tree.ClassDef(val_peek(4).ident, val_peek(3).ident, val_peek(1).flist, val_peek(5).loc,false);\n\t\t\t\t\t}\nbreak;\ncase 13:\n//#line 117 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.cdef = new Tree.ClassDef(val_peek(4).ident, val_peek(3).ident, val_peek(1).flist, val_peek(5).loc,true);\n\t\t\t\t\t}\nbreak;\ncase 14:\n//#line 123 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.ident = val_peek(0).ident;\n\t\t\t\t\t}\nbreak;\ncase 15:\n//#line 127 \"Parser.y\"\n{\n \t\tyyval = new SemValue();\n \t}\nbreak;\ncase 16:\n//#line 133 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.flist.add(val_peek(0).vdef);\n\t\t\t\t\t}\nbreak;\ncase 17:\n//#line 137 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.flist.add(val_peek(0).fdef);\n\t\t\t\t\t}\nbreak;\ncase 18:\n//#line 141 \"Parser.y\"\n{\n \t\tyyval = new SemValue();\n \t\tyyval.flist = new ArrayList<Tree>();\n \t}\nbreak;\ncase 20:\n//#line 149 \"Parser.y\"\n{\n \t\tyyval = new SemValue();\n \t\tyyval.vlist = new ArrayList<Tree.VarDef>(); \n \t}\nbreak;\ncase 21:\n//#line 156 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.vlist.add(val_peek(0).vdef);\n\t\t\t\t\t}\nbreak;\ncase 22:\n//#line 160 \"Parser.y\"\n{\n \t\tyyval.vlist = new ArrayList<Tree.VarDef>();\n\t\t\t\t\t\tyyval.vlist.add(val_peek(0).vdef);\n \t}\nbreak;\ncase 23:\n//#line 167 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.fdef = new MethodDef(true, val_peek(4).ident, val_peek(5).type, val_peek(2).vlist, (Block) val_peek(0).stmt, val_peek(4).loc);\n\t\t\t\t\t}\nbreak;\ncase 24:\n//#line 171 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.fdef = new MethodDef(false, val_peek(4).ident, val_peek(5).type, val_peek(2).vlist, (Block) val_peek(0).stmt, val_peek(4).loc);\n\t\t\t\t\t}\nbreak;\ncase 25:\n//#line 177 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.stmt = new Block(val_peek(1).slist, val_peek(2).loc);\n\t\t\t\t\t}\nbreak;\ncase 26:\n//#line 183 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.slist.add(val_peek(0).stmt);\n\t\t\t\t\t}\nbreak;\ncase 27:\n//#line 187 \"Parser.y\"\n{\n \t\tyyval = new SemValue();\n \t\tyyval.slist = new ArrayList<Tree>();\n \t}\nbreak;\ncase 28:\n//#line 194 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.stmt = val_peek(0).vdef;\n\t\t\t\t\t}\nbreak;\ncase 29:\n//#line 199 \"Parser.y\"\n{\n \t\tif (yyval.stmt == null) {\n \t\t\tyyval.stmt = new Tree.Skip(val_peek(0).loc);\n \t\t}\n \t}\nbreak;\ncase 40:\n//#line 217 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.stmt = new Tree.Foreach(val_peek(6).bvar,val_peek(4).expr,val_peek(2).expr,val_peek(0).stmt, val_peek(6).loc);\n\t\t\t\t\t}\nbreak;\ncase 41:\n//#line 221 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.stmt = new Tree.Foreach(val_peek(4).bvar,val_peek(2).expr,val_peek(0).stmt, val_peek(4).loc);\n\t\t\t\t\t}\nbreak;\ncase 42:\n//#line 227 \"Parser.y\"\n{\n\t\t\t\t\tyyval.bvar = new Tree.BoundVariable(val_peek(0).ident, val_peek(0).loc);\n\t\t\t\t\t}\nbreak;\ncase 43:\n//#line 231 \"Parser.y\"\n{\n\t\t\t\t\tyyval.bvar = new Tree.BoundVariable(val_peek(1).type,val_peek(0).ident, val_peek(0).loc);\n\t\t\t\t\t}\nbreak;\ncase 44:\n//#line 236 \"Parser.y\"\n{\n\t\t\t\t\tyyval.stmt = new Tree.GuardedStmt(val_peek(1).elist, val_peek(1).loc);\n\t\t\t\t}\nbreak;\ncase 45:\n//#line 241 \"Parser.y\"\n{\n\t\t\t\t\tyyval.elist.add(val_peek(0).expr);\n\t\t\t\t}\nbreak;\ncase 46:\n//#line 246 \"Parser.y\"\n{\n yyval = new SemValue();\n yyval.elist = new ArrayList<Expr> ();\n yyval.elist.add(val_peek(0).expr);\n }\nbreak;\ncase 47:\n//#line 252 \"Parser.y\"\n{\n \t\tyyval = new SemValue();\n \t}\nbreak;\ncase 48:\n//#line 258 \"Parser.y\"\n{\n\t\t\t\t\tyyval.expr = new Tree.IfBranch(val_peek(2).expr, val_peek(0).stmt, val_peek(2).loc);\t\t\t\t\n\t\t\t\t}\nbreak;\ncase 49:\n//#line 263 \"Parser.y\"\n{\n\t\t\t\t\tyyval.stmt = new Scopy(val_peek(3).ident,val_peek(1).expr,val_peek(5).loc);\t\n\t\t\t\t}\nbreak;\ncase 50:\n//#line 269 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.stmt = new Tree.Assign(val_peek(2).lvalue, val_peek(0).expr, val_peek(1).loc);\n\t\t\t\t\t}\nbreak;\ncase 51:\n//#line 273 \"Parser.y\"\n{\n \t\tyyval.stmt = new Tree.Exec(val_peek(0).expr, val_peek(0).loc);\n \t}\nbreak;\ncase 52:\n//#line 277 \"Parser.y\"\n{\n \t\tyyval = new SemValue();\n \t}\nbreak;\ncase 54:\n//#line 284 \"Parser.y\"\n{\n \t\tyyval = new SemValue();\n \t}\nbreak;\ncase 55:\n//#line 290 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.lvalue = new Tree.Ident(val_peek(1).expr, val_peek(0).ident, val_peek(0).loc);\n\t\t\t\t\t\tif (val_peek(1).loc == null) {\n\t\t\t\t\t\t\tyyval.loc = val_peek(0).loc;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\nbreak;\ncase 56:\n//#line 297 \"Parser.y\"\n{\n \t\tyyval.lvalue = new Tree.Indexed(val_peek(3).expr, val_peek(1).expr, val_peek(3).loc);\n \t}\nbreak;\ncase 58:\n//#line 304 \"Parser.y\"\n{\n \tyyval.lvalue = new Tree.Var(val_peek(1).expr, val_peek(0).ident, val_peek(0).loc);\n\t\t\t\t\t\tif (val_peek(1).loc == null) {\n\t\t\t\t\t\t\tyyval.loc = val_peek(0).loc;\n\t\t\t\t\t\t}\n }\nbreak;\ncase 59:\n//#line 313 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.expr = new Tree.CallExpr(val_peek(4).expr, val_peek(3).ident, val_peek(1).elist, val_peek(3).loc);\n\t\t\t\t\t\tif (val_peek(4).loc == null) {\n\t\t\t\t\t\t\tyyval.loc = val_peek(3).loc;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\nbreak;\ncase 60:\n//#line 322 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.expr = val_peek(0).lvalue;\n\t\t\t\t\t}\nbreak;\ncase 63:\n//#line 328 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Binary(Tree.PLUS, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 64:\n//#line 332 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Binary(Tree.MINUS, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 65:\n//#line 336 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Binary(Tree.MUL, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 66:\n//#line 340 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Binary(Tree.DIV, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 67:\n//#line 344 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Binary(Tree.MOD, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 68:\n//#line 348 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Binary(Tree.EQ, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 69:\n//#line 352 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Binary(Tree.NE, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 70:\n//#line 356 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Binary(Tree.LT, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 71:\n//#line 360 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Binary(Tree.GT, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 72:\n//#line 364 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Binary(Tree.LE, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 73:\n//#line 368 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Binary(Tree.GE, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 74:\n//#line 372 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Binary(Tree.AND, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 75:\n//#line 376 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Binary(Tree.OR, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 76:\n//#line 380 \"Parser.y\"\n{\n \t\tyyval = val_peek(1);\n \t}\nbreak;\ncase 77:\n//#line 384 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Unary(Tree.NEG, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 78:\n//#line 388 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Unary(Tree.NOT, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 79:\n//#line 392 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.ReadIntExpr(val_peek(2).loc);\n \t}\nbreak;\ncase 80:\n//#line 396 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.ReadLineExpr(val_peek(2).loc);\n \t}\nbreak;\ncase 81:\n//#line 400 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.ThisExpr(val_peek(0).loc);\n \t}\nbreak;\ncase 82:\n//#line 404 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.NewClass(val_peek(2).ident, val_peek(3).loc);\n \t}\nbreak;\ncase 83:\n//#line 408 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.NewArray(val_peek(3).type, val_peek(1).expr, val_peek(4).loc);\n \t}\nbreak;\ncase 84:\n//#line 412 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.TypeTest(val_peek(3).expr, val_peek(1).ident, val_peek(5).loc);\n \t}\nbreak;\ncase 85:\n//#line 416 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.TypeCast(val_peek(2).ident, val_peek(0).expr, val_peek(0).loc);\n \t}\nbreak;\ncase 86:\n//#line 420 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.ArrayRepeat(val_peek(2).expr, val_peek(0).expr, val_peek(2).loc);\n \t}\nbreak;\ncase 87:\n//#line 424 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.ArrayAdd(val_peek(2).expr, val_peek(0).expr, val_peek(2).loc);\n\t }\nbreak;\ncase 88:\n//#line 428 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.subArray(val_peek(5).expr, val_peek(3).expr,val_peek(1).expr,val_peek(5).loc);\n\t \t}\nbreak;\ncase 89:\n//#line 432 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.ArrayDefault(val_peek(5).expr, val_peek(3).expr,val_peek(0).expr,val_peek(5).loc);\n\t \t}\nbreak;\ncase 90:\n//#line 436 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.ArrayPython(val_peek(5).expr, val_peek(3).ident,val_peek(1).expr,val_peek(5).loc);\n\t \t}\nbreak;\ncase 91:\n//#line 440 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.ArrayPython(val_peek(7).expr, val_peek(5).ident,val_peek(3).expr,val_peek(1).expr,val_peek(7).loc);\n\t \t}\nbreak;\ncase 92:\n//#line 446 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.expr = new Tree.Literal(val_peek(0).typeTag, val_peek(0).literal, val_peek(0).loc);\n\t\t\t\t\t}\nbreak;\ncase 93:\n//#line 450 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.expr = new Null(val_peek(0).loc);\n\t\t\t\t\t}\nbreak;\ncase 94:\n//#line 454 \"Parser.y\"\n{\n\t\t\t\t\n\t\t\t\t\t\tyyval.expr = new Tree.ListConst(val_peek(1).elist, val_peek(1).loc);\n\t\t\t\t}\nbreak;\ncase 95:\n//#line 461 \"Parser.y\"\n{\n\t\t\t\t\tyyval = new SemValue();\n yyval.elist = new ArrayList<Expr> ();\n yyval.elist.add(val_peek(0).expr);\n\t\t\t\t}\nbreak;\ncase 96:\n//#line 467 \"Parser.y\"\n{\n\t\t\t\t\tyyval.elist.add(val_peek(0).expr);\n\t\t\t\t}\nbreak;\ncase 97:\n//#line 471 \"Parser.y\"\n{\n\t\t\t\t\tyyval = new SemValue();\n\t\t\t\t}\nbreak;\ncase 99:\n//#line 479 \"Parser.y\"\n{\n \t\tyyval = new SemValue();\n \t\tyyval.elist = new ArrayList<Tree.Expr>();\n \t}\nbreak;\ncase 100:\n//#line 486 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.elist.add(val_peek(0).expr);\n\t\t\t\t\t}\nbreak;\ncase 101:\n//#line 490 \"Parser.y\"\n{\n \t\tyyval.elist = new ArrayList<Tree.Expr>();\n\t\t\t\t\t\tyyval.elist.add(val_peek(0).expr);\n \t}\nbreak;\ncase 102:\n//#line 497 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.stmt = new Tree.WhileLoop(val_peek(2).expr, val_peek(0).stmt, val_peek(4).loc);\n\t\t\t\t\t}\nbreak;\ncase 103:\n//#line 503 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.stmt = new Tree.ForLoop(val_peek(6).stmt, val_peek(4).expr, val_peek(2).stmt, val_peek(0).stmt, val_peek(8).loc);\n\t\t\t\t\t}\nbreak;\ncase 104:\n//#line 509 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.stmt = new Tree.Break(val_peek(0).loc);\n\t\t\t\t\t}\nbreak;\ncase 105:\n//#line 515 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.stmt = new Tree.If(val_peek(3).expr, val_peek(1).stmt, val_peek(0).stmt, val_peek(5).loc);\n\t\t\t\t\t}\nbreak;\ncase 106:\n//#line 521 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.stmt = val_peek(0).stmt;\n\t\t\t\t\t}\nbreak;\ncase 107:\n//#line 525 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval = new SemValue();\n\t\t\t\t\t}\nbreak;\ncase 108:\n//#line 531 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.stmt = new Tree.Return(val_peek(0).expr, val_peek(1).loc);\n\t\t\t\t\t}\nbreak;\ncase 109:\n//#line 535 \"Parser.y\"\n{\n \t\tyyval.stmt = new Tree.Return(null, val_peek(0).loc);\n \t}\nbreak;\ncase 110:\n//#line 541 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.stmt = new Print(val_peek(1).elist, val_peek(3).loc);\n\t\t\t\t\t}\nbreak;\n//#line 1539 \"Parser.java\"\n//########## END OF USER-SUPPLIED ACTIONS ##########\n }//switch\n //#### Now let's reduce... ####\n //if (yydebug) debug(\"reduce\");\n state_drop(yym); //we just reduced yylen states\n yystate = state_peek(0); //get new state\n val_drop(yym); //corresponding value drop\n yym = yylhs[yyn]; //select next TERMINAL(on lhs)\n if (yystate == 0 && yym == 0)//done? 'rest' state and at first TERMINAL\n {\n //if (yydebug) debug(\"After reduction, shifting from state 0 to state \"+YYFINAL+\"\");\n yystate = YYFINAL; //explicitly say we're done\n state_push(YYFINAL); //and save it\n val_push(yyval); //also save the semantic value of parsing\n if (yychar < 0) //we want another character?\n {\n yychar = yylex(); //get next character\n //if (yychar<0) yychar=0; //clean, if necessary\n //if (yydebug)\n //yylexdebug(yystate,yychar);\n }\n if (yychar == 0) //Good exit (if lex returns 0 ;-)\n break; //quit the loop--all DONE\n }//if yystate\n else //else not done yet\n { //get next state and push, for next yydefred[]\n yyn = yygindex[yym]; //find out where to go\n if ((yyn != 0) && (yyn += yystate) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == yystate)\n yystate = yytable[yyn]; //get new state\n else\n yystate = yydgoto[yym]; //else go to new defred\n //if (yydebug) debug(\"after reduction, shifting from state \"+state_peek(0)+\" to state \"+yystate+\"\");\n state_push(yystate); //going again, so push state & val...\n val_push(yyval); //for next action\n }\n }//main loop\n return 0;//yyaccept!!\n}",
"protected void error(int line, int column, @Nonnull String msg)\r\n throws LexerException {\r\n if (listener != null)\r\n listener.handleError(source, line, column, msg);\r\n //else\r\n // throw new LexerException(\"Error at \" + line + \":\" + column + \": \" + msg);\r\n }",
"void cannotRecognize(Term token);",
"void yylexdebug(int state,int ch)\r\n{\r\nString s=null;\r\n if (ch < 0) ch=0;\r\n if (ch <= YYMAXTOKEN) //check index bounds\r\n s = yyname[ch]; //now get it\r\n if (s==null)\r\n s = \"illegal-symbol\";\r\n debug(\"state \"+state+\", reading \"+ch+\" (\"+s+\")\");\r\n}",
"@FormatMethod\n private void reportError(ParseTree parseTree, @FormatString String message, Object... arguments) {\n if (parseTree == null) {\n reportError(message, arguments);\n } else {\n errorReporter.reportError(parseTree.location.start, message, arguments);\n }\n }",
"int yyparse()\r\n{\r\nboolean doaction;\r\n init_stacks();\r\n yynerrs = 0;\r\n yyerrflag = 0;\r\n yychar = -1; //impossible char forces a read\r\n yystate=0; //initial state\r\n state_push(yystate); //save it\r\n while (true) //until parsing is done, either correctly, or w/error\r\n {\r\n doaction=true;\r\n //if (yydebug) debug(\"loop\"); \r\n //#### NEXT ACTION (from reduction table)\r\n for (yyn=yydefred[yystate];yyn==0;yyn=yydefred[yystate])\r\n {\r\n //if (yydebug) debug(\"yyn:\"+yyn+\" state:\"+yystate+\" yychar:\"+yychar);\r\n if (yychar < 0) //we want a char?\r\n {\r\n yychar = yylex(); //get next token\r\n //if (yydebug) debug(\" next yychar:\"+yychar);\r\n //#### ERROR CHECK ####\r\n //if (yychar < 0) //it it didn't work/error\r\n // {\r\n // yychar = 0; //change it to default string (no -1!)\r\n //if (yydebug)\r\n // yylexdebug(yystate,yychar);\r\n // }\r\n }//yychar<0\r\n yyn = yysindex[yystate]; //get amount to shift by (shift index)\r\n if ((yyn != 0) && (yyn += yychar) >= 0 &&\r\n yyn <= YYTABLESIZE && yycheck[yyn] == yychar)\r\n {\r\n //if (yydebug)\r\n //debug(\"state \"+yystate+\", shifting to state \"+yytable[yyn]);\r\n //#### NEXT STATE ####\r\n yystate = yytable[yyn];//we are in a new state\r\n state_push(yystate); //save it\r\n val_push(yylval); //push our lval as the input for next rule\r\n yychar = -1; //since we have 'eaten' a token, say we need another\r\n if (yyerrflag > 0) //have we recovered an error?\r\n --yyerrflag; //give ourselves credit\r\n doaction=false; //but don't process yet\r\n break; //quit the yyn=0 loop\r\n }\r\n\r\n yyn = yyrindex[yystate]; //reduce\r\n if ((yyn !=0 ) && (yyn += yychar) >= 0 &&\r\n yyn <= YYTABLESIZE && yycheck[yyn] == yychar)\r\n { //we reduced!\r\n //if (yydebug) debug(\"reduce\");\r\n yyn = yytable[yyn];\r\n doaction=true; //get ready to execute\r\n break; //drop down to actions\r\n }\r\n else //ERROR RECOVERY\r\n {\r\n if (yyerrflag==0)\r\n {\r\n yyerror(\"syntax error\");\r\n yynerrs++;\r\n }\r\n if (yyerrflag < 3) //low error count?\r\n {\r\n yyerrflag = 3;\r\n while (true) //do until break\r\n {\r\n if (stateptr<0 || valptr<0) //check for under & overflow here\r\n {\r\n return 1;\r\n }\r\n yyn = yysindex[state_peek(0)];\r\n if ((yyn != 0) && (yyn += YYERRCODE) >= 0 &&\r\n yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)\r\n {\r\n //if (yydebug)\r\n //debug(\"state \"+state_peek(0)+\", error recovery shifting to state \"+yytable[yyn]+\" \");\r\n yystate = yytable[yyn];\r\n state_push(yystate);\r\n val_push(yylval);\r\n doaction=false;\r\n break;\r\n }\r\n else\r\n {\r\n //if (yydebug)\r\n //debug(\"error recovery discarding state \"+state_peek(0)+\" \");\r\n if (stateptr<0 || valptr<0) //check for under & overflow here\r\n {\r\n return 1;\r\n }\r\n state_pop();\r\n val_pop();\r\n }\r\n }\r\n }\r\n else //discard this token\r\n {\r\n if (yychar == 0)\r\n return 1; //yyabort\r\n //if (yydebug)\r\n //{\r\n //yys = null;\r\n //if (yychar <= YYMAXTOKEN) yys = yyname[yychar];\r\n //if (yys == null) yys = \"illegal-symbol\";\r\n //debug(\"state \"+yystate+\", error recovery discards token \"+yychar+\" (\"+yys+\")\");\r\n //}\r\n yychar = -1; //read another\r\n }\r\n }//end error recovery\r\n }//yyn=0 loop\r\n if (!doaction) //any reason not to proceed?\r\n continue; //skip action\r\n yym = yylen[yyn]; //get count of terminals on rhs\r\n //if (yydebug)\r\n //debug(\"state \"+yystate+\", reducing \"+yym+\" by rule \"+yyn+\" (\"+yyrule[yyn]+\")\");\r\n if (yym>0) //if count of rhs not 'nil'\r\n yyval = val_peek(yym-1); //get current semantic value\r\n if (reduceListener == null || reduceListener.onReduce(yyrule[yyn])) // if intercepted!\r\n switch(yyn)\r\n {\r\n//########## USER-SUPPLIED ACTIONS ##########\r\ncase 1:\r\n//#line 59 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\ttree = new Tree.TopLevel(val_peek(0).clist, val_peek(0).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 2:\r\n//#line 65 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.clist.add(val_peek(0).cdef);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 3:\r\n//#line 69 \"Parser.y\"\r\n{\r\n \t\tyyval.clist = new ArrayList<Tree.ClassDef>();\r\n \t\tyyval.clist.add(val_peek(0).cdef);\r\n \t}\r\nbreak;\r\ncase 5:\r\n//#line 79 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.vdef = new Tree.VarDef(val_peek(0).ident, val_peek(1).type, val_peek(0).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 6:\r\n//#line 85 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.type = new Tree.TypeIdent(Tree.INT, val_peek(0).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 7:\r\n//#line 89 \"Parser.y\"\r\n{\r\n \t\tyyval.type = new Tree.TypeIdent(Tree.VOID, val_peek(0).loc);\r\n \t}\r\nbreak;\r\ncase 8:\r\n//#line 93 \"Parser.y\"\r\n{\r\n \t\tyyval.type = new Tree.TypeIdent(Tree.BOOL, val_peek(0).loc);\r\n \t}\r\nbreak;\r\ncase 9:\r\n//#line 97 \"Parser.y\"\r\n{\r\n \t\tyyval.type = new Tree.TypeIdent(Tree.STRING, val_peek(0).loc);\r\n \t}\r\nbreak;\r\ncase 10:\r\n//#line 101 \"Parser.y\"\r\n{\r\n \t\tyyval.type = new Tree.TypeClass(val_peek(0).ident, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 11:\r\n//#line 105 \"Parser.y\"\r\n{\r\n \t\tyyval.type = new Tree.TypeArray(val_peek(2).type, val_peek(2).loc);\r\n \t}\r\nbreak;\r\ncase 12:\r\n//#line 111 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.cdef = new Tree.ClassDef(val_peek(4).ident, val_peek(3).ident, val_peek(1).flist, val_peek(5).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 13:\r\n//#line 117 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.ident = val_peek(0).ident;\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 14:\r\n//#line 121 \"Parser.y\"\r\n{\r\n \t\tyyval = new SemValue();\r\n \t}\r\nbreak;\r\ncase 15:\r\n//#line 127 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.flist.add(val_peek(0).vdef);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 16:\r\n//#line 131 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.flist.add(val_peek(0).fdef);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 17:\r\n//#line 135 \"Parser.y\"\r\n{\r\n \t\tyyval = new SemValue();\r\n \t\tyyval.flist = new ArrayList<Tree>();\r\n \t}\r\nbreak;\r\ncase 19:\r\n//#line 143 \"Parser.y\"\r\n{\r\n \t\tyyval = new SemValue();\r\n \t\tyyval.vlist = new ArrayList<Tree.VarDef>(); \r\n \t}\r\nbreak;\r\ncase 20:\r\n//#line 150 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.vlist.add(val_peek(0).vdef);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 21:\r\n//#line 154 \"Parser.y\"\r\n{\r\n \t\tyyval.vlist = new ArrayList<Tree.VarDef>();\r\n\t\t\t\t\t\tyyval.vlist.add(val_peek(0).vdef);\r\n \t}\r\nbreak;\r\ncase 22:\r\n//#line 161 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.fdef = new MethodDef(true, val_peek(4).ident, val_peek(5).type, val_peek(2).vlist, (Block) val_peek(0).stmt, val_peek(4).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 23:\r\n//#line 165 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.fdef = new MethodDef(false, val_peek(4).ident, val_peek(5).type, val_peek(2).vlist, (Block) val_peek(0).stmt, val_peek(4).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 24:\r\n//#line 171 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = new Block(val_peek(1).slist, val_peek(2).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 25:\r\n//#line 177 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.slist.add(val_peek(0).stmt);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 26:\r\n//#line 181 \"Parser.y\"\r\n{\r\n \t\tyyval = new SemValue();\r\n \t\tyyval.slist = new ArrayList<Tree>();\r\n \t}\r\nbreak;\r\ncase 27:\r\n//#line 188 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = val_peek(0).vdef;\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 28:\r\n//#line 193 \"Parser.y\"\r\n{\r\n \t\tif (yyval.stmt == null) {\r\n \t\t\tyyval.stmt = new Tree.Skip(val_peek(0).loc);\r\n \t\t}\r\n \t}\r\nbreak;\r\ncase 39:\r\n//#line 211 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = new Tree.Assign(val_peek(2).lvalue, val_peek(0).expr, val_peek(1).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 40:\r\n//#line 215 \"Parser.y\"\r\n{\r\n \t\tyyval.stmt = new Tree.Exec(val_peek(0).expr, val_peek(0).loc);\r\n \t}\r\nbreak;\r\ncase 41:\r\n//#line 219 \"Parser.y\"\r\n{\r\n \t\tyyval = new SemValue();\r\n \t}\r\nbreak;\r\ncase 43:\r\n//#line 226 \"Parser.y\"\r\n{\r\n \t\tyyval = new SemValue();\r\n \t}\r\nbreak;\r\ncase 44:\r\n//#line 232 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.lvalue = new Tree.Ident(val_peek(1).expr, val_peek(0).ident, val_peek(0).loc);\r\n\t\t\t\t\t\tif (val_peek(1).loc == null) {\r\n\t\t\t\t\t\t\tyyval.loc = val_peek(0).loc;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 45:\r\n//#line 239 \"Parser.y\"\r\n{\r\n \t\tyyval.lvalue = new Tree.Indexed(val_peek(3).expr, val_peek(1).expr, val_peek(3).loc);\r\n \t}\r\nbreak;\r\ncase 46:\r\n//#line 245 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.expr = new Tree.CallExpr(val_peek(4).expr, val_peek(3).ident, val_peek(1).elist, val_peek(3).loc);\r\n\t\t\t\t\t\tif (val_peek(4).loc == null) {\r\n\t\t\t\t\t\t\tyyval.loc = val_peek(3).loc;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 47:\r\n//#line 254 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.expr = val_peek(0).lvalue;\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 50:\r\n//#line 260 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Binary(Tree.PLUS, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 51:\r\n//#line 264 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Binary(Tree.MINUS, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 52:\r\n//#line 268 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Binary(Tree.MUL, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 53:\r\n//#line 272 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Binary(Tree.DIV, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 54:\r\n//#line 276 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Binary(Tree.MOD, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 55:\r\n//#line 280 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Binary(Tree.EQ, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 56:\r\n//#line 284 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Binary(Tree.NE, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 57:\r\n//#line 288 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Binary(Tree.LT, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 58:\r\n//#line 292 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Binary(Tree.GT, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 59:\r\n//#line 296 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Binary(Tree.LE, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 60:\r\n//#line 300 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Binary(Tree.GE, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 61:\r\n//#line 304 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Binary(Tree.AND, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 62:\r\n//#line 308 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Binary(Tree.OR, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 63:\r\n//#line 312 \"Parser.y\"\r\n{\r\n \t\tyyval = val_peek(1);\r\n \t}\r\nbreak;\r\ncase 64:\r\n//#line 316 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Unary(Tree.NEG, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 65:\r\n//#line 320 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Unary(Tree.NOT, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 66:\r\n//#line 324 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.ReadIntExpr(val_peek(2).loc);\r\n \t}\r\nbreak;\r\ncase 67:\r\n//#line 328 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.ReadLineExpr(val_peek(2).loc);\r\n \t}\r\nbreak;\r\ncase 68:\r\n//#line 332 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.ThisExpr(val_peek(0).loc);\r\n \t}\r\nbreak;\r\ncase 69:\r\n//#line 336 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.NewClass(val_peek(2).ident, val_peek(3).loc);\r\n \t}\r\nbreak;\r\ncase 70:\r\n//#line 340 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.NewArray(val_peek(3).type, val_peek(1).expr, val_peek(4).loc);\r\n \t}\r\nbreak;\r\ncase 71:\r\n//#line 344 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.TypeTest(val_peek(3).expr, val_peek(1).ident, val_peek(5).loc);\r\n \t}\r\nbreak;\r\ncase 72:\r\n//#line 348 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.TypeCast(val_peek(2).ident, val_peek(0).expr, val_peek(0).loc);\r\n \t}\r\nbreak;\r\ncase 73:\r\n//#line 352 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Ternary(Tree.COND, val_peek(4).expr, val_peek(2).expr, val_peek(0).expr, val_peek(4).loc);\r\n \t}\r\nbreak;\r\ncase 74:\r\n//#line 356 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Binary(Tree.PCLONE, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 75:\r\n//#line 362 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.expr = new Tree.Literal(val_peek(0).typeTag, val_peek(0).literal, val_peek(0).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 76:\r\n//#line 366 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.expr = new Null(val_peek(0).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 78:\r\n//#line 373 \"Parser.y\"\r\n{\r\n \t\tyyval = new SemValue();\r\n \t\tyyval.elist = new ArrayList<Tree.Expr>();\r\n \t}\r\nbreak;\r\ncase 79:\r\n//#line 380 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.elist.add(val_peek(0).expr);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 80:\r\n//#line 384 \"Parser.y\"\r\n{\r\n \t\tyyval.elist = new ArrayList<Tree.Expr>();\r\n\t\t\t\t\t\tyyval.elist.add(val_peek(0).expr);\r\n \t}\r\nbreak;\r\ncase 81:\r\n//#line 391 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = new Tree.WhileLoop(val_peek(2).expr, val_peek(0).stmt, val_peek(4).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 82:\r\n//#line 397 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = new Tree.Repeat(val_peek(4).stmt, val_peek(1).expr, val_peek(5).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 83:\r\n//#line 403 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = new Tree.ForLoop(val_peek(6).stmt, val_peek(4).expr, val_peek(2).stmt, val_peek(0).stmt, val_peek(8).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 84:\r\n//#line 409 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = new Tree.Break(val_peek(0).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 85:\r\n//#line 415 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = new Tree.If(val_peek(3).expr, val_peek(1).stmt, val_peek(0).stmt, val_peek(5).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 86:\r\n//#line 421 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = val_peek(0).stmt;\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 87:\r\n//#line 425 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval = new SemValue();\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 88:\r\n//#line 431 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = new Tree.Return(val_peek(0).expr, val_peek(1).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 89:\r\n//#line 435 \"Parser.y\"\r\n{\r\n \t\tyyval.stmt = new Tree.Return(null, val_peek(0).loc);\r\n \t}\r\nbreak;\r\ncase 90:\r\n//#line 441 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = new Print(val_peek(1).elist, val_peek(3).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 91:\r\n//#line 447 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = new Tree.Switch(val_peek(5).expr, val_peek(2).slist, val_peek(1).stmt, val_peek(7).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 92:\r\n//#line 453 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.slist.add(val_peek(0).stmt);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 93:\r\n//#line 457 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval = new SemValue();\r\n \t\tyyval.slist = new ArrayList<Tree>();\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 94:\r\n//#line 464 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = new Tree.Case(val_peek(2).expr, val_peek(0).slist, val_peek(3).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 95:\r\n//#line 470 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = new Tree.Default(val_peek(0).slist, val_peek(2).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 96:\r\n//#line 474 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval = new SemValue();\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 97:\r\n//#line 480 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = new Tree.Continue(val_peek(0).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\n//#line 1319 \"Parser.java\"\r\n//########## END OF USER-SUPPLIED ACTIONS ##########\r\n }//switch\r\n //#### Now let's reduce... ####\r\n //if (yydebug) debug(\"reduce\");\r\n state_drop(yym); //we just reduced yylen states\r\n yystate = state_peek(0); //get new state\r\n val_drop(yym); //corresponding value drop\r\n yym = yylhs[yyn]; //select next TERMINAL(on lhs)\r\n if (yystate == 0 && yym == 0)//done? 'rest' state and at first TERMINAL\r\n {\r\n //if (yydebug) debug(\"After reduction, shifting from state 0 to state \"+YYFINAL+\"\");\r\n yystate = YYFINAL; //explicitly say we're done\r\n state_push(YYFINAL); //and save it\r\n val_push(yyval); //also save the semantic value of parsing\r\n if (yychar < 0) //we want another character?\r\n {\r\n yychar = yylex(); //get next character\r\n //if (yychar<0) yychar=0; //clean, if necessary\r\n //if (yydebug)\r\n //yylexdebug(yystate,yychar);\r\n }\r\n if (yychar == 0) //Good exit (if lex returns 0 ;-)\r\n break; //quit the loop--all DONE\r\n }//if yystate\r\n else //else not done yet\r\n { //get next state and push, for next yydefred[]\r\n yyn = yygindex[yym]; //find out where to go\r\n if ((yyn != 0) && (yyn += yystate) >= 0 &&\r\n yyn <= YYTABLESIZE && yycheck[yyn] == yystate)\r\n yystate = yytable[yyn]; //get new state\r\n else\r\n yystate = yydgoto[yym]; //else go to new defred\r\n //if (yydebug) debug(\"after reduction, shifting from state \"+state_peek(0)+\" to state \"+yystate+\"\");\r\n state_push(yystate); //going again, so push state & val...\r\n val_push(yyval); //for next action\r\n }\r\n }//main loop\r\n return 0;//yyaccept!!\r\n}",
"@Test(timeout = 4000)\n public void test009() throws Throwable {\n StringReader stringReader0 = new StringReader(\"~:}LC@A$L'2q+~$ja\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n // Undeclared exception!\n try { \n javaParserTokenManager0.SwitchTo(91);\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Error: Ignoring invalid lexical state : 91. State unchanged.\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\n }",
"private void parseErrorUnlessPermittedSlash() throws SAXException,\n IOException {\n if (endTag) {\n err(\"Stray \\u201C/\\u201D in an end tag.\");\n return;\n }\n char c = read();\n if (c == '>') {\n if (!currentIsVoid() && !html4) {\n if (html4) {\n err(\"Stray \\u201C/\\u201D in tag. The \\u201C/>\\u201D syntax is not permitted in HTML4.\");\n } else {\n err(\"Stray \\u201C/\\u201D in tag. The \\u201C/>\\u201D syntax is only permitted on void elements.\");\n }\n } else if (html4) {\n err(\"Stray \\u201C/\\u201D in tag. The \\u201C/>\\u201D syntax is not permitted in HTML4. (HTML4-only error)\");\n }\n } else {\n err(\"Stray \\u201C/\\u201D in tag.\");\n }\n unread(c);\n }",
"public java_cup.runtime.Symbol scan()\n throws java.lang.Exception\n {\n return lexer.nextToken(); \n }",
"@Test(timeout = 4000)\n public void test000() throws Throwable {\n StringReader stringReader0 = new StringReader(\"WA.W2e9@MV5G\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n // Undeclared exception!\n try { \n javaParserTokenManager0.SwitchTo(4);\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Error: Ignoring invalid lexical state : 4. State unchanged.\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test040() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"com.werken.saxpath.XPathLexer\");\n xPathLexer0.consume((-796));\n // Undeclared exception!\n try { \n xPathLexer0.number();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }",
"private void zzScanError(int errorCode) {\n String message;\n try {\n message = ZZ_ERROR_MSG[errorCode];\n } catch (ArrayIndexOutOfBoundsException e) {\n message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];\n }\n\n throw new Error(message);\n }",
"static void parse() {\r\n i = 0;\r\n j = 0;\r\n k = 0;\r\n varList.add(\"0\");\r\n\r\n // Find the first lexeme\r\n lex();\r\n\r\n // Check if the tokens form a statement\r\n if(checkStatement()) {\r\n System.out.println(\"\\nGRAMMAR IS CORRECT!\");\r\n //System.out.println(grammar);\r\n }\r\n else\r\n System.out.println(\"\\nERROR - UNEXPECTED LEXEME: \\\"\" + lexeme + \"\\\"\");\r\n\r\n i = 0;\r\n j = 0;\r\n k = 0;\r\n index = 0;\r\n lex();\r\n translate();\r\n }",
"void yylexdebug(int state,int ch)\n{\nString s=null;\n if (ch < 0) ch=0;\n if (ch <= YYMAXTOKEN) //check index bounds\n s = yyname[ch]; //now get it\n if (s==null)\n s = \"illegal-symbol\";\n debug(\"state \"+state+\", reading \"+ch+\" (\"+s+\")\");\n}",
"void yylexdebug(int state,int ch)\n{\nString s=null;\n if (ch < 0) ch=0;\n if (ch <= YYMAXTOKEN) //check index bounds\n s = yyname[ch]; //now get it\n if (s==null)\n s = \"illegal-symbol\";\n debug(\"state \"+state+\", reading \"+ch+\" (\"+s+\")\");\n}",
"public void unrecovered_syntax_error(Symbol s) throws java.lang.Exception\n { \n String lexema = s.value.toString();\n int fila = s.right;\n int columna = s.left;\n \n System.out.println(\"!!!!!!! Error Sintactico, Panic Mode !!!!!!! \");\n System.out.println(\"\\t\\tLexema: \"+lexema);\n System.out.println(\"\\t\\tFila: \"+fila);\n System.out.println(\"\\t\\tColumna: \"+columna);\n\n /*AcepErr datos =new AcepErr(lexema, \"ERROR SINTACTICO\" ,fila,columna,\"Simbolo no esperado Error Fatal\");\n TablaErr.add(datos);\n */\n //lista_errores.add(new ErrorT(lexema, fila, columna,\"sintactico\" ,\"Simbolo no esperado, Panic Mode\"));\n }",
"protected static void reportParseError(int expectedToken, int actualToken, String actualTokenValue) throws MailcapParseException {\n/* 514 */ throw new MailcapParseException(\"Encountered a \" + MailcapTokenizer.nameForToken(actualToken) + \" token (\" + actualTokenValue + \") while expecting a \" + MailcapTokenizer.nameForToken(expectedToken) + \" token.\");\n/* */ }",
"private void errorCheck( Token token, String kind ) {\n if( ! token.isKind( kind ) ) {\n System.out.println(\"Error: expected \" + token + \" to be of kind \" + kind );\n System.exit(1);\n }\n }",
"public void reportError(final int category, final ErrorMsg error) {\n switch (category) {\n case Constants.INTERNAL:\n // Unexpected internal errors, such as null-ptr exceptions, etc.\n // Immediately terminates compilation, no translet produced\n _errors.add(error);\n break;\n case Constants.UNSUPPORTED:\n // XSLT elements that are not implemented and unsupported ext.\n // Immediately terminates compilation, no translet produced\n _errors.add(error);\n break;\n case Constants.FATAL:\n // Fatal error in the stylesheet input (parsing or content)\n // Immediately terminates compilation, no translet produced\n _errors.add(error);\n break;\n case Constants.ERROR:\n // Other error in the stylesheet input (parsing or content)\n // Does not terminate compilation, no translet produced\n _errors.add(error);\n break;\n case Constants.WARNING:\n // Other error in the stylesheet input (content errors only)\n // Does not terminate compilation, a translet is produced\n _warnings.add(error);\n break;\n }\n }",
"@Test(timeout = 4000)\n public void test150() throws Throwable {\n StringReader stringReader0 = new StringReader(\"'L+XUG}\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 2292, 16, 18);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n // Undeclared exception!\n try { \n javaParserTokenManager0.getNextToken();\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Lexical error at line 2292, column 18. Encountered: \\\"+\\\" (43), after : \\\"\\\\'L\\\"\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\n }",
"public Vector collectParseErrors() {\n \n \t\tNode n = null;\n \t\tDatum d = null;\n \t\tVector parseErrors = new Vector();\n \t\tString dependenciesErrors = null;\n \t\tString actionErrors = null;\n \t\tString answerChoicesErrors = null;\n \t\tString readbackErrors = null;\n \t\tVector nodeParseErrors = null;\n \t\tVector nodeNamingErrors = null;\n \t\tboolean hasErrors = false;\n \t\t\n \t\tparser.resetErrorCount();\n \n \t\tfor (int i=0;i<size();++i) {\n \t\t\tn = nodes.getNode(i);\n \t\t\tif (n == null)\n \t\t\t\tcontinue;\n \n \t\t\thasErrors = false;\n \t\t\tdependenciesErrors = null;\n \t\t\tactionErrors = null;\n \t\t\tanswerChoicesErrors = null;\n \t\t\treadbackErrors = null;\n \t\t\tnodeParseErrors = null;\n \t\t\tnodeNamingErrors = null;\n \n \t\t\tparser.booleanVal(evidence, n.getDependencies());\n \n \t\t\tif (parser.hasErrors()) {\n \t\t\t\thasErrors = true;\n \t\t\t\tdependenciesErrors = parser.getErrors();\n \t\t\t}\n \n \t\t\tint actionType = n.getQuestionOrEvalType();\n \t\t\tString s = n.getQuestionOrEval();\n \n \t\t\t/* Check questionOrEval for syntax errors */\n \t\t\tif (s != null) {\n \t\t\t\tif (actionType == Node.QUESTION) {\n \t\t\t\t\tparser.parseJSP(evidence, s);\n \t\t\t\t}\n \t\t\t\telse if (actionType == Node.EVAL) {\n \t\t\t\t\tparser.stringVal(evidence, s);\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t/* Check min & max range delimiters for syntax errors */\n \t\t\ts = n.getMinStr();\n \t\t\tif (s != null) {\n \t\t\t\tparser.stringVal(evidence, s);\n \t\t\t}\n \t\t\ts = n.getMaxStr();\n \t\t\tif (s != null) {\n \t\t\t\tparser.stringVal(evidence, s);\n \t\t\t}\n \t\t\t\n \t\t\tif (parser.hasErrors()) {\n \t\t\t\thasErrors = true;\n \t\t\t\tactionErrors = parser.getErrors();\n \t\t\t}\n \t\t\t\n \t\t\tVector v = n.getAnswerChoices();\n \t\t\tif (v != null) {\n \t\t\t\tfor (int j=0;j<v.size();++j) {\n \t\t\t\t\tAnswerChoice ac = (AnswerChoice) v.elementAt(j);\n \t\t\t\t\tif (ac != null)\n \t\t\t\t\t\tac.parse(parser, evidence);\t// any errors will be associated with the parser, not the node (although this is misleading)\n \t\t\t\t}\n \t\t\t}\n \n \t\t\tif (parser.hasErrors()) {\n \t\t\t\thasErrors = true;\n \t\t\t\tanswerChoicesErrors = parser.getErrors();\n \t\t\t}\n \n \t\t\tif (n.hasParseErrors()) {\n \t\t\t\thasErrors = true;\n \t\t\t\tnodeParseErrors = n.getParseErrors();\n \t\t\t}\n \t\t\tif (n.hasNamingErrors()) {\n \t\t\t\thasErrors = true;\n \t\t\t\tnodeNamingErrors = n.getNamingErrors();\n \t\t\t}\n \t\t\t\n \t\t\tif (n.getReadback() != null) {\n \t\t\t\tparser.parseJSP(evidence,n.getReadback());\n \t\t\t}\n \t\t\tif (parser.hasErrors()) {\n \t\t\t\thasErrors = true;\n \t\t\t\treadbackErrors = parser.getErrors();\n \t\t\t}\n \n \t\t\tif (hasErrors) {\n \t\t\t\tparseErrors.addElement(new ParseError(n, dependenciesErrors, actionErrors, answerChoicesErrors, readbackErrors, nodeParseErrors, nodeNamingErrors));\n \t\t\t}\n \t\t}\n \t\treturn parseErrors;\n \t}",
"@Test(timeout = 4000)\n public void test005() throws Throwable {\n StringReader stringReader0 = new StringReader(\"}y5+{SPClS&QvLb0Qm\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n // Undeclared exception!\n try { \n javaParserTokenManager0.jjFillToken();\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }",
"public void unrecovered_syntax_error(Symbol s) throws java.lang.Exception\n { \n String lexema = s.value.toString();\n int fila = s.right;\n int columna = s.left;\n \n System.out.println(\"!!!!!!! Error Sintactico, Panic Mode !!!!!!! \");\n System.out.println(\"\\t\\tLexema: \"+lexema);\n System.out.println(\"\\t\\tFila: \"+fila);\n System.out.println(\"\\t\\tColumna: \"+columna);\n \n lista_errores.add(new ErrorT(lexema, fila, columna,\"sintactico\" ,\"Simbolo no esperado, Panic Mode\"));\n }",
"@Test(timeout = 4000)\n public void test015() throws Throwable {\n StringReader stringReader0 = new StringReader(\" 6PR~\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0, 2);\n // Undeclared exception!\n try { \n javaParserTokenManager0.getNextToken();\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Lexical error at line 1, column 2. Encountered: \\\"6\\\" (54), after : \\\"\\\"\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test120() throws Throwable {\n StringReader stringReader0 = new StringReader(\"NXMnbm>`7-o(jz g3N\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-439), 1101);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n // Undeclared exception!\n try { \n javaParserTokenManager0.getNextToken();\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Lexical error at line -439, column 1108. Encountered: \\\"`\\\" (96), after : \\\"\\\"\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\n }",
"public void correctErrors();",
"@Test(timeout = 4000)\n public void test045() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"hN!SM~8ux(wB\");\n xPathLexer0.consume((-1));\n // Undeclared exception!\n try { \n xPathLexer0.literal();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }",
"@Test(timeout = 4000)\n public void test041() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"com.werken.saxpath.XPathLexer\");\n xPathLexer0.consume((-2521));\n // Undeclared exception!\n try { \n xPathLexer0.nextToken();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }",
"public static void registerError() {\r\n errorCount++;\r\n }",
"@FormatMethod\n private void reportError(Token token, @FormatString String message, Object... arguments) {\n if (token == null) {\n reportError(message, arguments);\n } else {\n errorReporter.reportError(token.getStart(), message, arguments);\n }\n }",
"@Test(timeout = 4000)\n public void test019() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\\\"}tH?N[RLAs'&]u\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 128, 29);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n // Undeclared exception!\n try { \n javaParserTokenManager0.getNextToken();\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Lexical error at line 128, column 44. Encountered: <EOF> after : \\\"\\\\\\\"}tH?N[RLAs\\\\'&]u\\\"\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\n }",
"@Override\n public void warning(SAXParseException sAXParseException) throws SAXException {\n ErrorListener errorListener = this.m_transformer.getErrorListener();\n if (errorListener instanceof ErrorHandler) {\n ((ErrorHandler)((Object)errorListener)).warning(sAXParseException);\n return;\n }\n try {\n TransformerException transformerException = new TransformerException(sAXParseException);\n errorListener.warning(transformerException);\n return;\n }\n catch (TransformerException transformerException) {\n throw sAXParseException;\n }\n }",
"private static void fail(Scanner scanner, String message) throws RuntimeException {\n String msg = message + \"\\n @ ...\";\n for (int i = 0; i < 10 && scanner.hasNext(); i++) {\n msg += \" \" + scanner.next();\n }\n throw new RuntimeException(msg + \"...\");\n }",
"@Test(timeout = 4000)\n public void test153() throws Throwable {\n StringReader stringReader0 = new StringReader(\"#crIx\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 2897, 32);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n // Undeclared exception!\n try { \n javaParserTokenManager0.getNextToken();\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Lexical error at line 2897, column 32. Encountered: \\\"#\\\" (35), after : \\\"\\\"\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\n }",
"protected void errorSyntaxis(){\n\t\tchar[] fun = (this.getText()).toCharArray();\n\t\tint pos = fun.length;\n\t\tfor(int i = pos; i > 0;i--)\n\t\t\tvalidSyntaxis(Arrays.copyOfRange(fun,0,i));\n\t}",
"@Test(timeout = 4000)\n public void test021() throws Throwable {\n byte[] byteArray0 = new byte[1];\n byteArray0[0] = (byte) (-25);\n ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0);\n JavaCharStream javaCharStream0 = new JavaCharStream(byteArrayInputStream0, 119, (-820), 29);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n // Undeclared exception!\n try { \n javaParserTokenManager0.getNextToken();\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Lexical error at line 119, column -819. Encountered: <EOF> after : \\\"\\\"\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\n }",
"public static void errorRecovery (CD19Parser p) throws Exception {\n\n int nextComma = p.nextTokenOccursAt(Token.TCOMA);\n\n int nextMinViableTokenBesidesComma = -1;\n int nextSemiComma = p.nextTokenOccursAt(Token.TSEMI);\n int nextLeftParanthesis = p.nextTokenOccursAt(Token.TLPAR);\n if (nextSemiComma != -1) {\n nextMinViableTokenBesidesComma = nextSemiComma;\n }\n if (nextLeftParanthesis != -1 && nextLeftParanthesis < nextMinViableTokenBesidesComma) {\n nextMinViableTokenBesidesComma = nextLeftParanthesis;\n }\n\n // if there is no necessary token for\n // NREPT or NFOR then just fail anyway\n // as it will fail NREPT or NFOR ultimately\n if (nextMinViableTokenBesidesComma == -1) {\n throw new Exception(\"Unable to recover.\");\n }\n\n // there is no next comma\n // i.e. we have to jump the parser\n // the next sensible section\n if (nextComma == -1) {\n // there is a next comma but it doesn't occur\n // in the <initlist>. thus we can only attempt to jump\n // the parser to the next sensisble section\n if (nextMinViableTokenBesidesComma != -1) {\n p.tokensJumpTo(nextMinViableTokenBesidesComma);\n } else {\n throw new Exception(\"Unable to recover\");\n }\n return;\n }\n\n // if next comma occurs before the next ';' or ')'\n // jump there\n if (nextComma < nextMinViableTokenBesidesComma) {\n p.tokensJumpTo(nextComma);\n return;\n }\n\n\n throw new Exception(\"Unable to recover\");\n }",
"@Test(timeout = 4000)\n public void test166() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\\\">>=\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n // Undeclared exception!\n try { \n javaParserTokenManager0.ReInit(javaCharStream0, (-378));\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Error: Ignoring invalid lexical state : -378. State unchanged.\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\n }",
"public ParseResult failure (Object input) {\n return failure(input, 1);\n }",
"@Test(timeout = 4000)\n public void test008() throws Throwable {\n StringReader stringReader0 = new StringReader(\"interface\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaCharStream0.nextCharInd = (-1232);\n // Undeclared exception!\n try { \n javaParserTokenManager0.getNextToken();\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }",
"protected static void reportParseError(int expectedToken, int otherExpectedToken, int actualToken, String actualTokenValue) throws MailcapParseException {\n/* 523 */ throw new MailcapParseException(\"Encountered a \" + MailcapTokenizer.nameForToken(actualToken) + \" token (\" + actualTokenValue + \") while expecting a \" + MailcapTokenizer.nameForToken(expectedToken) + \" or a \" + MailcapTokenizer.nameForToken(otherExpectedToken) + \" token.\");\n/* */ }",
"@Test(timeout = 4000)\n public void test024() throws Throwable {\n StringReader stringReader0 = new StringReader(\";{\\\"9n/s(2C'#tQX*\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char[] charArray0 = new char[9];\n stringReader0.read(charArray0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n // Undeclared exception!\n try { \n javaParserTokenManager0.getNextToken();\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Lexical error at line 1, column 3. Encountered: \\\"t\\\" (116), after : \\\"\\\\'#\\\"\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test037() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"[Sdf yy*X>HdSr %<}\");\n xPathLexer0.consume((-1189));\n // Undeclared exception!\n try { \n xPathLexer0.or();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }"
]
| [
"0.61943",
"0.61943",
"0.61849064",
"0.57066524",
"0.5631599",
"0.5553546",
"0.55417734",
"0.54892784",
"0.54857516",
"0.54709727",
"0.5428538",
"0.5340998",
"0.5310531",
"0.53092",
"0.53019166",
"0.53019166",
"0.5287291",
"0.5287291",
"0.5287291",
"0.5287291",
"0.5287291",
"0.5286368",
"0.5272022",
"0.52470094",
"0.524569",
"0.5232868",
"0.5232671",
"0.5219622",
"0.5209688",
"0.52081025",
"0.5201635",
"0.5197233",
"0.51911545",
"0.5185233",
"0.5182374",
"0.5182374",
"0.5176715",
"0.5167432",
"0.51117784",
"0.50986296",
"0.5095797",
"0.50848687",
"0.50712156",
"0.5068859",
"0.50652075",
"0.5051004",
"0.5044718",
"0.5036193",
"0.5025709",
"0.5025346",
"0.5014864",
"0.5012776",
"0.50106466",
"0.49995318",
"0.499553",
"0.4988933",
"0.4982175",
"0.49792233",
"0.49726766",
"0.49711415",
"0.4951675",
"0.4945719",
"0.49452716",
"0.49404183"
]
| 0.5259722 | 55 |
Pushes the specified amount of characters back into the input stream. They will be read again by then next call of the scanning method | public void yypushback(int number) {
if ( number > yylength() )
zzScanError(ZZ_PUSHBACK_2BIG);
zzMarkedPos -= number;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void pushBack() throws IOException {\n iis.seek(iis.getStreamPosition()-bufAvail);\n bufAvail = 0;\n bufPtr = 0;\n }",
"public void finish() {\n charScanner.pushBack(currentCharToken);\n }",
"@Override\n public void mark(final int readlimit) {\n input.mark();\n }",
"private void trim() {\n read(0);\n }",
"protected void readAhead() {\n if (! reader.hasNext()) {\n this.nextLine = null;\n } else {\n this.nextLine = reader.next();\n while (this.nextLine != null && this.nextLine.isEmpty() && reader.hasNext())\n this.nextLine = reader.next();\n }\n }",
"private int _readMore(InputStream in, byte[] readBuffer, int inputPtr, int inputEnd, int maxRead)\n/* */ throws IOException\n/* */ {\n/* 1580 */ int i = 0;\n/* 1581 */ while (inputPtr < inputEnd) {\n/* 1582 */ readBuffer[(i++)] = readBuffer[(inputPtr++)];\n/* */ }\n/* 1584 */ inputPtr = 0;\n/* 1585 */ inputEnd = i;\n/* 1586 */ maxRead = Math.min(maxRead, readBuffer.length);\n/* */ do\n/* */ {\n/* 1589 */ int length = maxRead - inputEnd;\n/* 1590 */ if (length == 0) {\n/* */ break;\n/* */ }\n/* 1593 */ int count = in.read(readBuffer, inputEnd, length);\n/* 1594 */ if (count < 0) {\n/* 1595 */ return inputEnd;\n/* */ }\n/* 1597 */ inputEnd += count;\n/* 1598 */ } while (inputEnd < 3);\n/* 1599 */ return inputEnd;\n/* */ }",
"private void fillBuf(int need) throws IOException {\n\n\t\tif (count > pos) {\n\t\t\tSystem.arraycopy(buf, pos, buf, 0, count - pos);\n\t\t\tcount -= pos;\n\t\t\tneed -= count;\n\t\t\tpos = 0;\n\t\t} else {\n\t\t\tcount = 0;\n\t\t\tpos = 0;\n\t\t}\n\n\t\twhile (need > 0) {\n\n\t\t\tint len = in.read(buf, count, buf.length - count);\n\t\t\tif (len <= 0) {\n\t\t\t\tthrow new EOFException();\n\t\t\t}\n\t\t\tcount += len;\n\t\t\tneed -= len;\n\t\t}\n\n\t}",
"public static void main(String[] args) throws IOException {\n\n String s = scanner.nextLine();\n\n String t = scanner.nextLine();\n\n int k = scanner.nextInt();\n scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n\n String result = appendAndDelete(s, t, k);\n System.out.println(result);\n\n// bufferedWriter.write(result);\n// bufferedWriter.newLine();\n//\n// bufferedWriter.close();\n\n scanner.close();\n }",
"public synchronized void readInput() throws InterruptedException, IOException \n\t{\n\t\twhile (getDataSourceEOFlag())\n\t\t{\n\t\t\tcontent.set(incomingPipe.take());\n\t\t\t\n\t\t\t// Ensure thread-timing uniformity (a speed-limiter)\n\t\t\t//Thread.sleep(100);\n\t\t\t\n\t\t\tprocess();\n\t\t\t// Discard the text to free up memory.\n\t\t\tcontent.set(null);\n\t\t}\n\t}",
"private void unread(char c) {\n unreadBuffer = c;\n }",
"@Test(timeout = 4000)\n public void test015() throws Throwable {\n StringReader stringReader0 = new StringReader(\"s\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.FillBuff();\n assertEquals((-1), javaCharStream0.bufpos);\n }",
"private void scan() {\n token = nextToken;\n nextToken = scanner.next();\n }",
"private int getNextChar() throws IOException{\n\t\tpos++;\n\t\tsourceReader.mark(20);\n\t\treturn sourceReader.read();\n\t}",
"@Override\n public void flush() throws IOException\n {\n for(;;) {\n int index = indexOneOf(builder, '\\r', '\\n');\n if(index == -1) {\n break;\n }\n // ignore false returned by offer when queue is full\n queue.offer(builder.substring(0, index));\n\n if(builder.charAt(index) == '\\r') {\n ++index;\n }\n if(builder.charAt(index) != '\\n') {\n throw new IllegalStateException();\n }\n ++index;\n builder.delete(0, index);\n }\n }",
"private final int bufferedInputBytesRemaining() {\n return reading ? (buffer.remaining() + (ungotc != -1 ? 1 : 0)) : 0;\n }",
"void setCharacterStream(int index, Reader reader, int count)\n throws SQLException;",
"void peekAhead(GetsState gs) {\n ChannelBuffer buf;\n //Tcl_DriverBlockModeProc *blockModeProc;\n int bytesLeft;\n boolean goto_cleanup = false; // Set to true when jumping to the\n // cleanup label, used to simulate a goto.\n\n buf = gs.buf;\n\n // If there's any more raw input that's still buffered, we'll peek into\n // that. Otherwise, only get more data from the channel driver if it\n // looks like there might actually be more data. The assumption is that\n // if the channel buffer is filled right up to the end, then there\n // might be more data to read.\n\n cleanup:{\n //blockModeProc = NULL;\n if (buf.next == null) {\n bytesLeft = buf.nextAdded - (buf.nextRemoved + gs.rawRead.i);\n if (bytesLeft == 0) {\n if (buf.nextAdded < buf.bufLength) {\n // Don't peek ahead if last read was short read.\n goto_cleanup = true;\n break cleanup;\n }\n // FIXME: This non-blocking check is currently disabled, non-blocking\n // is not currently supported and it is not clean why we would\n // need to depend on non-blocking IO when peeking anyway.\n if (blocking) {\n //blockModeProc = Tcl_ChannelBlockModeProc(chanPtr->typePtr);\n if (false /*blockModeProc == NULL*/) {\n // Don't peek ahead if cannot set non-blocking mode.\n goto_cleanup = true;\n break cleanup;\n }\n //StackSetBlockMode(chanPtr, TCL_MODE_NONBLOCKING);\n }\n }\n }\n filterBytes(gs);\n //if (blockModeProc != NULL) {\n // StackSetBlockMode(chanPtr, TCL_MODE_BLOCKING);\n //}\n }\n\n if (goto_cleanup) {\n buf.nextRemoved += gs.rawRead.i;\n gs.rawRead.i = 0;\n gs.totalChars += gs.charsWrote.i;\n //gs.bytesWrote.i = 0;\n gs.charsWrote.i = 0;\n }\n }",
"private void flushChars() throws SAXException, IOException {\n if (cstart != -1) {\n if (pos > cstart) {\n int currCol = col;\n int currLine = line;\n col = colPrev;\n line = linePrev;\n try {\n tokenHandler.characters(buf, cstart, pos - cstart);\n } finally {\n col = currCol;\n line = currLine;\n }\n }\n }\n cstart = -1;\n }",
"public FastCharStream(final Reader reader) {\n\t\tinput = reader;\n\t}",
"private char peekFurther(int distance) {\n if (current + distance >= source.length()) {\n return '\\0';\n }\n\n return source.charAt(current + distance);\n }",
"private synchronized void read(byte[] dest, int amt) throws IOException {\n\t\tread(in, dest, amt);\n\t}",
"public void run() {\n try {\n byte b[] = new byte[100];\n for (;;) {\n int n = in.read(b);\n String str;\n if (n < 0) {\n break;\n }\n str = new String(b, 0, n);\n buffer.append(str);\n System.out.print(str);\n }\n } catch (IOException ioe) { /* skip */ }\n }",
"private static String readUntil(InputStreamReader r, char limit)\n\t\t\tthrows IOException {\n\t\tStringBuilder builder = new StringBuilder();\n\t\tfor (int i = r.read(); i != -1; i = r.read()) {\n\t\t\tchar c = (char) i;\n\t\t\tbuilder.append(c);\n\t\t\tif (c == limit) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn builder.toString();\n\t}",
"public void unreadToken(SQLToken c) {\n synchronized (lock) {\n if (tokensBufferPosition == 0) {\n throw new SQLParserException(\"Pushback buffer overflow\");\n }\n tokensBuffer[--tokensBufferPosition] = c;\n }\n }",
"public void advance() {\r\n this.command = in.nextLine();\r\n }",
"void readNextChar() throws ReaderException;",
"private int readChar(boolean movePointer) throws Exception {\n if (_bi >= _blen) {\n _blen = _reader.read(_buf, 0, 2048);\n if (log) {\n StringBuffer sbBuffer = new StringBuffer();\n for (int i = 0; i < 300; i++) {\n sbBuffer.append(_buf[i]);\n }\n }\n log = false;\n\n _bi = 0;\n if (_blen < 0)\n return -1;\n }\n char ret = _buf[_bi];\n if (movePointer)\n _bi++;\n return ret;\n }",
"@Test(timeout = 4000)\n public void test137() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null);\n PipedInputStream pipedInputStream0 = new PipedInputStream();\n javaCharStream0.ReInit((InputStream) pipedInputStream0, 122, 122);\n assertEquals((-1), javaCharStream0.bufpos);\n }",
"public LengthLimitedInputStream(InputStream in, int limit) {\n\tsuper(in);\n\tleft = limit;\n }",
"private String readFixedString(int size, DataInput in) throws IOException\n { \n var b = new StringBuilder(size);\n int i = 0;\n var done = false;\n while (!done && i < size)\n { \n char ch = in.readChar();\n i++;\n if (ch == 0) {\n done = true;\n }\n else {\n b.append(ch);\n }\n }\n \n in.skipBytes(2 * (size - i));\n return b.toString();\n }",
"public void feedAndCut() throws IOException {\n feed();\n cut();\n writer.flush();\n }",
"public int cscan () throws IOException {\n\n\t\t\tif (curChar >= numChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\tnumChars = stream.read (buf);\n\n\t\t\t\t//if (numChars <= 0) return -1;\n\t\t\t}\n\n\t\t\treturn buf[curChar++];\n\t\t}",
"public synchronized long skip(long charsToSkip) throws IOException {\n\t\tlong processed = 0;\n\n\t\t// first disregard what's in our small queue:\n\t\twhile (charsToSkip > 0 && m_queueLength > 0) {\n\t\t\tnext(false);\n\t\t\tcharsToSkip--;\n\t\t\tprocessed++;\n\t\t}\n\n\t\t// the efficient way to skip:\n\t\twhile (charsToSkip > 0) {\n\t\t\tlong skipped = m_reader.skip(charsToSkip);\n\t\t\tif (skipped == 0) {\n\t\t\t\treturn processed;\n\t\t\t}\n\t\t\tcharsToSkip -= skipped;\n\t\t\tprocessed += skipped;\n\t\t\tm_read += skipped;\n\t\t}\n\n\t\tpopulateQueue();\n\n\t\treturn processed;\n\t}",
"@Test(timeout = 4000)\n public void test017() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.backup(1);\n javaCharStream0.getLine();\n assertEquals(4094, javaCharStream0.bufpos);\n }",
"void seekReset() {\n\t\tcancelEof();\n\t\tsawEofChar = false;\n\t}",
"private void getNextChar() \n {\n try\n {\n int temp = in.read();\n if (temp == -1)\n eof = true;\n currentChar = (char)temp;\n }\n catch (IOException e)\n {\n System.err.println(\"Catastrophic File IO error.\\n\" + e);\n System.exit(1); \n //exit with nonzero exit code to indicate catastrophic error\n }\n }",
"@Override\n\tpublic void consume(Scan scan) {\n\n\t}",
"private boolean loadMore(int available) throws IOException\n {\n _byteCount += (_inputEnd - available);\n\n // Bytes that need to be moved to the beginning of buffer?\n if (available > 0) {\n if (_inputPtr > 0) {\n if (!canModifyBuffer()) {\n // 15-Aug-2022, tatu: Occurs (only) if we have half-decoded UTF-8\n // characters; uncovered by:\n //\n // https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50036\n //\n // and need to be reported as IOException\n if (_inputSource == null) {\n throw new IOException(String.format(\n\"End-of-input after first %d byte(s) of a UTF-8 character: needed at least one more\",\navailable));\n }\n }\n for (int i = 0; i < available; ++i) {\n _inputBuffer[i] = _inputBuffer[_inputPtr+i];\n }\n _inputPtr = 0;\n _inputEnd = available;\n }\n } else {\n // Ok; here we can actually reasonably expect an EOF, so let's do a separate read right away:\n int count = readBytes();\n if (count < 1) {\n freeBuffers(); // to help GC?\n if (count < 0) { // -1\n return false;\n }\n // 0 count is no good; let's err out\n reportStrangeStream();\n }\n }\n\n // We now have at least one byte... and that allows us to\n // calculate exactly how many bytes we need!\n @SuppressWarnings(\"cast\")\n int c = (int) _inputBuffer[_inputPtr];\n if (c >= 0) { // single byte (ascii) char... cool, can return\n return true;\n }\n\n // Ok, a multi-byte char, let's check how many bytes we'll need:\n int needed;\n if ((c & 0xE0) == 0xC0) { // 2 bytes (0x0080 - 0x07FF)\n needed = 2;\n } else if ((c & 0xF0) == 0xE0) { // 3 bytes (0x0800 - 0xFFFF)\n needed = 3;\n } else if ((c & 0xF8) == 0xF0) {\n // 4 bytes; double-char BS, with surrogates and all...\n needed = 4;\n } else {\n // 25-Aug-2016, tatu: As per [dataformat-csv#132], let's not throw\n // exception from here but let caller handle\n return true;\n }\n\n // And then we'll just need to load up to that many bytes;\n // if an EOF is hit, that'll be an error. But we need not do\n // actual decoding here, just load enough bytes.\n while ((_inputPtr + needed) > _inputEnd) {\n int count = readBytesAt(_inputEnd);\n if (count < 1) {\n if (count < 0) { // -1, EOF... no good!\n freeBuffers();\n reportUnexpectedEOF(_inputEnd, needed);\n }\n // 0 count is no good; let's err out\n reportStrangeStream();\n }\n }\n return true;\n }",
"private String _read(InputStream in, String enc) throws IOException\n {\n int ptr = 0;\n int count;\n \n while ((count = in.read(_readBuffer, ptr, _readBuffer.length - ptr)) > 0) {\n ptr += count;\n // buffer full? Need to realloc\n if (ptr == _readBuffer.length) {\n _readBuffer = Arrays.copyOf(_readBuffer, ptr + ptr);\n }\n }\n \n return new String(_readBuffer, 0, ptr, enc);\n }",
"private boolean fill() throws IOException {\n if (in == null)\n return false;\n if (bufEnd == buf.length) {\n Tokenizer.movePosition(buf, posOff, bufStart, pos);\n /* The last read was complete. */\n int keep = bufEnd - bufStart;\n if (keep == 0)\n\tbufEnd = 0;\n else if (keep + READSIZE <= buf.length) {\n\t/*\n\t * There is space in the buffer for at least READSIZE bytes.\n\t * Choose bufEnd so that it is the least non-negative integer\n\t * greater than or equal to <code>keep</code>, such\n\t * <code>bufLength - keep</code> is a multiple of READSIZE.\n\t */\n\tbufEnd = buf.length - (((buf.length - keep)/READSIZE) * READSIZE);\n\tfor (int i = 0; i < keep; i++)\n\t buf[bufEnd - keep + i] = buf[bufStart + i];\n }\n else {\n\tchar newBuf[] = new char[buf.length << 1];\n\tbufEnd = buf.length;\n\tSystem.arraycopy(buf, bufStart, newBuf, bufEnd - keep, keep);\n\tbuf = newBuf;\n }\n bufStart = bufEnd - keep;\n posOff = bufStart;\n }\n int nChars = in.read(buf, bufEnd, buf.length - bufEnd);\n if (nChars < 0) {\n in.close();\n in = null;\n return false;\n }\n bufEnd += nChars;\n bufEndStreamOffset += nChars;\n return true;\n }",
"public void read() throws IOException {\n\t\twhile (this.in.getReadBytes() != size) {\n\t\t\tString chunkID;\n\t\t\ttry {\n\t\t\t\tchunkID = readString(4);\n\t\t\t} catch (EmptyReadException e) {\n\t\t\t\t/**\n\t\t\t\t * T4L bug 15259: Some encoders must write a byte \"0\" to signify\n\t\t\t\t * EOF?\n\t\t\t\t */\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlong chunkSize = readLong(4);\n\t\t\treadChunk(chunkID, chunkSize);\n\t\t}\n\t}",
"private static StringBuilder receiveInputStream(InputStream input) throws IOException{\r\n\t\tStringBuilder response = new StringBuilder();\r\n\t\tint i;\r\n\t\twhile((i = input.read())!= -1){//stock the inputstream\r\n\t\t\tresponse.append((char)i); \r\n\t\t}\r\n\t\treturn response;\r\n\t}",
"public void next() {\n\t\tif ((position == 0) && (pause != 3)) {\n\t\t\tpause++;\n\t\t} else {\n\t\t\tposition++;\n\t\t\tpause = 0;\n\t\t\tif (position == (origionalMessage.length() + 10)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\t\t}\n\n\t}",
"protected int filterBytes()\n throws IOException {\n\n if (headerPending) {\n parseHeader();\n }\n\n //System.out.println(\"nEncoded: \" + nEncoded);\n //System.out.println(\"Current: \" + current);\n \n if (nEncoded <= current) {\n int br = readEncodedBytes();\n System.out.println(\"reb: \" + br);\n if (br < 0) {\n return -1;\n }\n }\n\n // bytes decoding loop\n int inserted = 0;\n while (current < nEncoded) {\n \t\n if (current < firstQuantum) {\n if (decode(current) == 0) {\n // this is the end of the encoded data\n parseTrailer();\n return inserted;\n }\n\n // store the expected number of raw bytes encoded in the line\n remaining = decode(current);\n current = firstQuantum;\n\n }\n\n if (encoded[current] == '\\n' && encoded[current + 1] != '\\n') {\n \t \n \t \n \t System.out.println(\"Cur rEad\");\n \t \n \t \n if (remaining != 0) {\n throw new IOException(\"encoded length inconsistent with encoded data\");\n }\n\n //System.out.println(\"Remaning: \" + remaining);\n \n // update state for next line\n firstQuantum = current + 2;\n\n } else if (encoded[current] == '\\n') {\n \t System.out.println(\"CurrEad\");\n \t current = current + 1;\n } else {\n // this is an encoded data byte\n int fByte;\n \n // combine the various 6-bits bytes to produce 8-bits bytes\n switch ((current - firstQuantum) % 4) {\n case 0:\n // nothing to do\n break;\n case 1:\n fByte = ((decode(current - 1) & 0x3F) << 2)\n | ((decode(current) & 0x30) >> 4);\n if (remaining > 0) {\n putFilteredByte(fByte);\n ++inserted;\n --remaining;\n } else if (fByte != 0) {\n throw new IOException(\"unexpected non null bytes after encoded line\");\n }\n break;\n case 2:\n fByte = ((decode(current - 1) & 0x0F) << 4)\n | ((decode(current) & 0x3C) >> 2);\n if (remaining > 0) {\n putFilteredByte(fByte);\n ++inserted;\n --remaining;\n } else if (fByte != 0) {\n throw new IOException(\"unexpected non null bytes after encoded line\");\n }\n break;\n default:\n fByte = ((decode(current - 1) & 0x03) << 6)\n | (decode(current) & 0x3F);\n if (remaining > 0) {\n putFilteredByte(fByte);\n ++inserted;\n --remaining;\n } else if (fByte != 0) {\n throw new IOException(\"unexpected non null bytes after encoded line\");\n }\n \n }\n }\n\n ++current;\n\n }\n \n //System.out.println(inserted);\n\n // preserve current quantum for next round\n int start = current - ((current - firstQuantum) % 4);\n \n //System.out.println(\"FQ: \" + firstQuantum + \"S: \" + (char)encoded[current - 1]);\n \n //System.out.println(\"start: \" + start + \" nEenc-stsrt: \" + (nEncoded - start));\n \n if (firstQuantum < start) {\n System.arraycopy(encoded, start, encoded, 0, nEncoded - start);\n nEncoded -= start;\n current -= start;\n firstQuantum -= start;\n } else {\n \tnEncoded = 0;\n \tcurrent = 0;\n \tfirstQuantum = 0;\n }\n \n //System.out.println(\"out!\");\n //System.out.println (\"inserted == \" + inserted);\n \n return inserted;\n \n }",
"private void readMoreBytesFromStream() throws IOException {\n if (!innerStreamHasMoreData) {\n return;\n }\n\n int bufferSpaceAvailable = buffer.length - bytesInBuffer;\n if (bufferSpaceAvailable <= 0) {\n return;\n }\n\n int bytesRead =\n stream.read(buffer, bytesInBuffer, bufferSpaceAvailable);\n\n if (bytesRead == -1) {\n innerStreamHasMoreData = false;\n } else {\n bytesInBuffer += bytesRead;\n }\n }",
"protected LookAheadReader(Reader reader, int queueSize) throws IOException {\n\t\tthis.m_queue = new char[queueSize];\n\t\tthis.m_reader = reader;\n\t\tpopulateQueue();\n\t}",
"private void advanceToNextReader(){\r\n\t\tcurrentReader = null;\r\n\t\treaderQueueIndex++;\r\n\t}",
"private char advance() {\n current++;\n return source.charAt(current - 1);\n }",
"@Override\n\t\tpublic void characters(char[] ch, int start, int length)\n\t\t\t\tthrows SAXException {\n\t\t\tbuffer.append(ch);\n\t\t}",
"void onInput(Terminal terminal, int numChars, String current);",
"public void reset(Reader input) {\n this.buffer.dispose();\n this.buffer = new ReaderBuffer(input);\n this.previousToken = null;\n this.lastMatch.clear();\n }",
"@Override\n protected List<CharSequence> getNextInput() {\n if (!mInputIterator.hasNext())\n // No more input, so we're done.\n return null;\n else {\n // Start a new cycle.\n incrementCycle();\n\n // Return a list containing character sequences to search.\n return mInputIterator.next();\n }\n }",
"public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException {\n currentPreparedStatement.setNCharacterStream(parameterIndex, value, length);\n\n }",
"private void compactIfNeeded() {\n\n // if the scan point is more than 25% into the buffer, compact...\n if( buffer.position() >= (buffer.capacity() >> 2 ) ) {\n int newLimit = buffer.limit() - buffer.position();\n buffer.compact();\n buffer.position( 0 );\n buffer.limit( newLimit );\n }\n }",
"@Override\r\n public Integer numberOfCharacters(InputStream ins) throws Exception {\n return null;\r\n }",
"private void updateToken() throws IOException\n\t{\n\t\ttheCurrentToken = theNextToken;\n\t\ttheNextToken = theScanner.GetToken();\n\t}",
"void skip(int bytes) throws IOException {\n this.input.skip(bytes);\n }",
"@Override\n\tpublic void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException {\n\t\t\n\t}",
"public char read() {\n char ch = this.peek();\n this.index++;\n return ch;\n }",
"char getPreviousReadChar();",
"private String next(int i) throws IOException {\r\n\t\tif(buffer!=null) {\r\n\t\t\tString s=buffer;\r\n\t\t\tbuffer=null;\r\n\t\t\treturn s;\r\n\t\t}\r\n\t\tif (i==0) {\r\n\t\t\treturn in.readLine();\r\n\t\t} else return in2.readLine();\r\n\t}",
"private void advanceUntilNL() throws BufferEndedException {\twhile (reader.getLastDelimiter()!='\\n') reader.nextToken();}",
"public Scanner(InputStream inStream)\n {\n in = new BufferedReader(new InputStreamReader(inStream));\n eof = false;\n getNextChar();\n }",
"void newconsume() {\n\t\tfor (;;) {\n\t\t\tif (printnewline > newinfo.maxLine)\n\t\t\t\tbreak; /* end of file */\n\t\t\tif (newinfo.other[printnewline] < 0)\n\t\t\t\tshowinsert();\n\t\t\telse showmove();\n\t\t}\n\t}",
"void oldconsume() {\n\t\tfor (;;) {\n\t\t\tif (printoldline > oldinfo.maxLine)\n\t\t\t\tbreak; /* end of file */\n\t\t\tprintnewline = oldinfo.other[printoldline];\n\t\t\tif (printnewline < 0)\n\t\t\t\tshowdelete();\n\t\t\telse if (blocklen[printoldline] < 0)\n\t\t\t\tskipold();\n\t\t\telse showmove();\n\t\t}\n\t}",
"@Override\n\tpublic void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException {\n\t\t\n\t}",
"synchronized void receive(int preknownDataLength) throws EOFException, IOException {\n byte[] buffer = new byte[preknownDataLength];\n dataInput.readFully(buffer);\n pipedOutputStream.write(buffer);\n }",
"@Override\n public ByteBuffer readInput(int minBytes) throws IOException {\n if (minBytes <= byteBuffer.remaining())\n return byteBuffer;\n else\n throw new EOFException(\"Cannot read more bytes - end of buffer reached\");\n }",
"public byte[] getNextInput(byte[] buffer) throws IOException {\r\n // byte[] buffer = new byte[8192];\r\n file.seek(currOffset);\r\n file.read(buffer);\r\n currOffset += buffer.length;\r\n return buffer;\r\n }",
"@Test(timeout = 4000)\n public void test131() throws Throwable {\n StringReader stringReader0 = new StringReader(\"QXw?YE]We2j)\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 754, 5, 5);\n javaCharStream0.ReInit((Reader) stringReader0, 754, 754);\n assertEquals((-1), javaCharStream0.bufpos);\n }",
"@Override\n \tpublic void characters(final char inbuf[], final int offset, final int len)\n \t\t\tthrows SAXException {\n \t\tif (curAtom != null || !isParsing(eIsParsing.NONE)) {\n \t\t\tfinal String tmpString = new String(inbuf, offset, len);\n \t\t\tbuf += tmpString;\n \t\t}\n \t}",
"public void advance() {\n // Get the next instruction\n instruction = fileStream.next();\n removeWhitespace();\n // Split instruction apart\n instructionChunks = instruction.split(\" \");\n }",
"int filterBytes(GetsState gs) {\n ChannelBuffer buf;\n byte[] raw;\n int rawStart, rawEnd;\n char[] dst;\n int offset, toRead, /*dstNeeded,*/ spaceLeft, result, rawLen, length;\n TclObject obj;\n final int ENCODING_LINESIZE = 20; // Lower bound on how many bytes\n // to convert at a time. Since we\n // don't know a priori how many\n // bytes of storage this many\n // source bytes will use, we\n // actually need at least\n // ENCODING_LINESIZE bytes of room.\n\n boolean goto_read = false; // Set to true when jumping to the read\n // label, used to simulate a goto.\n\n final boolean debug = false;\n\n obj = gs.obj;\n\n // Subtract the number of bytes that were removed from channel buffer\n // during last call.\n\n buf = gs.buf;\n if (buf != null) {\n buf.nextRemoved += gs.rawRead.i;\n if (buf.nextRemoved >= buf.nextAdded) {\n buf = buf.next;\n }\n }\n gs.totalChars += gs.charsWrote.i;\n\n read: while (true) {\n if (goto_read || (buf == null) || (buf.nextAdded == buf.BUFFER_PADDING)) {\n // All channel buffers were exhausted and the caller still hasn't\n // seen EOL. Need to read more bytes from the channel device.\n // Side effect is to allocate another channel buffer.\n\n //read:\n if (blocked) {\n if (!blocking) {\n gs.charsWrote.i = 0;\n gs.rawRead.i = 0;\n return -1;\n }\n blocked = false;\n }\n if (getInput() != 0) {\n gs.charsWrote.i = 0;\n gs.rawRead.i = 0;\n return -1;\n }\n buf = inQueueTail;\n gs.buf = buf;\n }\n\n // Convert some of the bytes from the channel buffer to characters.\n // Space in obj's string rep is used to hold the characters.\n\n rawStart = buf.nextRemoved;\n raw = buf.buf;\n rawEnd = buf.nextAdded;\n rawLen = rawEnd - rawStart;\n\n toRead = ENCODING_LINESIZE;\n if (toRead > rawLen) {\n toRead = rawLen;\n }\n dst = new char[toRead];\n result = externalToUnicode(raw, rawStart, rawLen,\n dst, 0, toRead,\n gs.rawRead, /*gs.bytesWrote*/ null, gs.charsWrote,\n gs.charToBytes);\n TclString.append(gs.obj, dst, 0, gs.charsWrote.i);\n\n if (debug) {\n System.out.println(\"filterBytes chars\");\n\n String srep = gs.obj.toString();\n int len = srep.length();\n\n for (int i=0; i < len; i++) {\n char c = srep.charAt(i);\n String prep;\n if (c == '\\r') {\n prep = \"\\\\r\";\n } else if (c == '\\n') {\n prep = \"\\\\n\";\n } else {\n prep = \"\" + c;\n }\n\n System.out.println(\"filtered[\" + i + \"] = '\" +\n prep +\n \"' (int) \" + ((int) srep.charAt(i)) +\n \" 0x\" + Integer.toHexString((int) srep.charAt(i)));\n }\n }\n\n // Make sure that if we go through 'gets', that we reset the\n // TCL_ENCODING_START flag still. [Bug #523988]\n\n encodingStart = false;\n\n if (result == TCL_CONVERT_MULTIBYTE) {\n // The last few bytes in this channel buffer were the start of a\n // multibyte sequence. If this buffer was full, then move them to\n // the next buffer so the bytes will be contiguous. \n\n if (debug) {\n System.out.println(\"TCL_CONVERT_MULTIBYTE decode result found\");\n }\n\n ChannelBuffer next;\n int extra;\n\n next = buf.next;\n if (buf.nextAdded < buf.bufLength) {\n if (gs.rawRead.i > 0) {\n // Some raw bytes were converted to UTF-8. Fall through,\n // returning those UTF-8 characters because a EOL might be\n // present in them.\n } else if (eofCond) {\n // There was a partial character followed by EOF on the\n // device. Fall through, returning that nothing was found.\n\n buf.nextRemoved = buf.nextAdded;\n } else {\n // There are no more cached raw bytes left. See if we can\n // get some more.\n\n goto_read = true;\n continue read; //goto read;\n }\n } else {\n if (next == null) {\n next = new ChannelBuffer(bufSize);\n buf.next = next;\n inQueueTail = next;\n }\n extra = rawLen - gs.rawRead.i;\n System.arraycopy(raw, rawStart + gs.rawRead.i,\n next.buf, buf.BUFFER_PADDING - extra, extra);\n next.nextRemoved -= extra;\n buf.nextAdded -= extra;\n\n if (debug) {\n System.out.println(\"copied \" + extra + \" bytes to \" +\n \"next ChannelBuffer\");\n }\n }\n }\n\n break read; // End loop in the normal case\n } // End read labeled while loop\n\n gs.buf = buf;\n return 0;\n }",
"public static void maxTokens(Scanner in) {\n }",
"private void goBack() throws IOException{\n\t\tif(\"\\n\".equals(currentChar)){\n\t\t\tline--;\n\t\t}\n\t\tpos--;\n\t\tsourceReader.reset();\n\t}",
"private int fillBuffer(InputStream is) throws IOException {\n int len = buffer.length;\n int pos = 0;\n while (pos < buffer.length) {\n int read = is.read(buffer, pos, len);\n if (read == -1)\n return pos;\n pos += read;\n len -= read;\n }\n return pos;\n }",
"void setReadPosition(int minus) {\n/* 159 */ this.pos -= minus;\n/* 160 */ this.readerIndex = getReadPosition(this.pos);\n/* 161 */ this.buffer.readerIndex(this.readerIndex);\n/* */ }",
"private static char[] growBuffer(char[] dest, int index, int size) {\n char[] copy = new char[size];\n if (index > 0) {\n System.arraycopy(dest, 0, copy, 0, index);\n }\n return copy;\n }",
"private void scanOnceMore() {\n\n barcodeReaderFragment = new BarcodeReaderFragment();\n barcodeReaderFragment.setListener(ScannerFragment.this);\n FragmentTransaction fragmentTransaction = getChildFragmentManager().beginTransaction();\n if (isScanning.get()) fragmentTransaction.remove(barcodeReaderFragment);\n else fragmentTransaction.replace(R.id.scannerFragment, barcodeReaderFragment);\n isScanning.set(!isScanning.get());\n fragmentTransaction.commit();\n }",
"public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException {\n\n updateCharacterStream(columnIndex, x, (long) length);\n }",
"public Scanner(String inString)\n {\n in = new BufferedReader(new StringReader(inString));\n eof = false;\n getNextChar();\n }",
"@Override\n public Token nextToken(\n PushbackReader r, int cin, Tokenizer t)\n throws IOException {\n\n int i = 0;\n charbuf[i++] = (char) cin;\n int c;\n do {\n c = r.read();\n if (c < 0) {\n c = cin;\n }\n checkBufLength(i);\n charbuf[i++] = (char) c;\n } while (c != cin);\n\n String sval = copyValueOf(charbuf, 0, i);\n return new Token(TT_QUOTED, sval, 0);\n }",
"private void skipBytes(int count) throws IOException {\n long currentPosition = archive.position();\n long newPosition = currentPosition + count;\n if (newPosition > archive.size()) {\n throw new EOFException();\n }\n archive.position(newPosition);\n }",
"private void releaseChar() {\r\n \t\tif (index < documentContent.length())\r\n \t\t\tindex++;\r\n \t}",
"public static void inputFlush() {\n int dummy;\n int bAvail;\n\n try {\n while ((System.in.available()) != 0)\n dummy = System.in.read();\n } catch (java.io.IOException e) {\n System.out.println(\"Input error\");\n }\n }",
"public void updateNCharacterStream(String columnName, Reader x) throws SQLException {\n\n updateNCharacterStream(columnName, x, -1);\n }",
"public void flush() throws IOException {\n\t\tif ((buffer.length - cursor) > 50000) {\n\t\t\tSystem.out.println(\"WASTED: \" + (buffer.length - cursor));\n\t\t}\n\t}",
"public void updateCharacterStream(String columnName, Reader x, int length) throws SQLException {\n\n updateCharacterStream(columnName, x, (long) length);\n }",
"public void updateNCharacterStream(int columnIndex, Reader x) throws SQLException {\n\n updateNCharacterStream(columnIndex, x, -1);\n }",
"protected void fill() throws IOException {\n ensureOpen();\n len = in.read(buf, 0, buf.length);\n if (len == -1) {\n throw new EOFException(\"Unexpected end of ZLIB input stream\");\n }\n inf.setInput(buf, 0, len);\n }",
"private String readNextLine() {\n StringBuilder sb = new StringBuilder();\n\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(stream));\n sb.append(br.readLine());\n } catch (IOException e) {\n e.fillInStackTrace();\n }\n\n return sb.toString();\n }",
"void mark(@Nonnegative int readLimit);",
"@Override\n public int read() throws IOException {\n if (pos >= count) {\n fill();\n if (pos >= count) {\n return -1;\n }\n }\n checkIfClosed();\n return buf[pos++] & 0xFF;\n }",
"public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException {\n currentPreparedStatement.setCharacterStream(parameterIndex, reader, length);\n }",
"protected int populateBuffer()\n {\n interlock.beginReading();\n // System.out.println(\"populateBuffer: 2\");\n return byteBuffer.limit();\n }",
"protected void readNextChar() throws IOException {\n nextChar = inputReader.read();\n switch (nextChar) {\n case -1: // EOF\n if (char_num == 0) {\n char_num = -1;\n break;\n }\n nextChar = '\\n';\n // fall thru\n case '\\n':\n line_num++;\n char_num = 0;\n break;\n default:\n line.append((char) nextChar);\n char_num++;\n return;\n }\n line.setLength(0);\n }",
"public Scanner(java.io.Reader in) {\n this.zzReader = in;\n }",
"public Scanner(java.io.Reader in) {\n this.zzReader = in;\n }",
"@Override\n public void consume(ParsableByteArray data) {\n checkStateNotNull(sampleReader);\n checkStateNotNull(output);\n int offset = data.getPosition();\n int limit = data.limit();\n byte[] dataArray = data.getData();\n\n // Append the data to the buffer.\n totalBytesWritten += data.bytesLeft();\n output.sampleData(data, data.bytesLeft());\n\n while (true) {\n int startCodeOffset = NalUnitUtil.findNalUnit(dataArray, offset, limit, prefixFlags);\n\n if (startCodeOffset == limit) {\n // We've scanned to the end of the data without finding another start code.\n if (!hasOutputFormat) {\n csdBuffer.onData(dataArray, offset, limit);\n }\n sampleReader.onData(dataArray, offset, limit);\n if (userData != null) {\n userData.appendToNalUnit(dataArray, offset, limit);\n }\n return;\n }\n\n // We've found a start code with the following value.\n int startCodeValue = data.getData()[startCodeOffset + 3] & 0xFF;\n // This is the number of bytes from the current offset to the start of the next start\n // code. It may be negative if the start code started in the previously consumed data.\n int lengthToStartCode = startCodeOffset - offset;\n\n if (!hasOutputFormat) {\n if (lengthToStartCode > 0) {\n csdBuffer.onData(dataArray, offset, /* limit= */ startCodeOffset);\n }\n // This is the number of bytes belonging to the next start code that have already been\n // passed to csdBuffer.\n int bytesAlreadyPassed = lengthToStartCode < 0 ? -lengthToStartCode : 0;\n if (csdBuffer.onStartCode(startCodeValue, bytesAlreadyPassed)) {\n // The csd data is complete, so we can decode and output the media format.\n output.format(\n parseCsdBuffer(csdBuffer, csdBuffer.volStartPosition, checkNotNull(formatId)));\n hasOutputFormat = true;\n }\n }\n\n sampleReader.onData(dataArray, offset, /* limit= */ startCodeOffset);\n\n if (userData != null) {\n int bytesAlreadyPassed = 0;\n if (lengthToStartCode > 0) {\n userData.appendToNalUnit(dataArray, offset, /* limit= */ startCodeOffset);\n } else {\n bytesAlreadyPassed = -lengthToStartCode;\n }\n\n if (userData.endNalUnit(bytesAlreadyPassed)) {\n int unescapedLength = NalUnitUtil.unescapeStream(userData.nalData, userData.nalLength);\n castNonNull(userDataParsable).reset(userData.nalData, unescapedLength);\n castNonNull(userDataReader).consume(pesTimeUs, userDataParsable);\n }\n\n if (startCodeValue == START_CODE_VALUE_USER_DATA\n && data.getData()[startCodeOffset + 2] == 0x1) {\n userData.startNalUnit(startCodeValue);\n }\n }\n\n int bytesWrittenPastPosition = limit - startCodeOffset;\n long absolutePosition = totalBytesWritten - bytesWrittenPastPosition;\n sampleReader.onDataEnd(absolutePosition, bytesWrittenPastPosition, hasOutputFormat);\n // Indicate the start of the next chunk.\n sampleReader.onStartCode(startCodeValue, pesTimeUs);\n // Continue scanning the data.\n offset = startCodeOffset + 3;\n }\n }",
"@Override\n protected int update(byte[] array, int off, int count) throws IOException {\n int mark = (int)limit;\n \n if(count >= limit) {\n append(array, off, mark);\n finished = true;\n limit = 0;\n return count - mark;\n } \n if(count > 0) {\n append(array, off, count);\n limit -= count; \n }\n return 0;\n }",
"@Test(timeout = 4000)\n public void test056() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.backup(416);\n javaCharStream0.BeginToken();\n javaCharStream0.adjustBeginLineColumn(416, 416);\n assertEquals(3680, javaCharStream0.bufpos);\n }"
]
| [
"0.5734373",
"0.5665254",
"0.5241355",
"0.51768184",
"0.51327187",
"0.5131074",
"0.5105206",
"0.50397587",
"0.5017513",
"0.5015112",
"0.50047463",
"0.5002526",
"0.4988889",
"0.49811333",
"0.49780416",
"0.4958394",
"0.49544096",
"0.49515522",
"0.49430543",
"0.4930276",
"0.49261603",
"0.49245235",
"0.49081114",
"0.49017903",
"0.49016368",
"0.48913535",
"0.48874757",
"0.48717552",
"0.48690906",
"0.4860119",
"0.48552942",
"0.48427564",
"0.4842053",
"0.48418704",
"0.48295897",
"0.48258418",
"0.48189366",
"0.48143363",
"0.48077172",
"0.47881815",
"0.47785193",
"0.47713566",
"0.476946",
"0.47663042",
"0.47373992",
"0.47283247",
"0.47221482",
"0.47185782",
"0.4709512",
"0.4709448",
"0.47086275",
"0.47084367",
"0.4701634",
"0.46817577",
"0.46798983",
"0.4679302",
"0.46775493",
"0.4676594",
"0.46739542",
"0.4664531",
"0.4660529",
"0.46595377",
"0.46520278",
"0.46435937",
"0.4642011",
"0.463956",
"0.46331757",
"0.46306297",
"0.4629568",
"0.46185416",
"0.46147895",
"0.46048346",
"0.45948723",
"0.45942605",
"0.458835",
"0.4573183",
"0.45729852",
"0.45725936",
"0.4571613",
"0.45698684",
"0.45696315",
"0.45613676",
"0.45578134",
"0.45516792",
"0.4546144",
"0.45399347",
"0.45359406",
"0.45323843",
"0.45316595",
"0.45293",
"0.4528854",
"0.4518873",
"0.45187035",
"0.45139736",
"0.44986498",
"0.4495486",
"0.4494879",
"0.4494879",
"0.44941503",
"0.448969",
"0.44879186"
]
| 0.0 | -1 |
Helper method to create a toolbar item | private static ToolItem createItemHelper(ToolBar toolbar, Image image,
String text) {
ToolItem item = new ToolItem(toolbar, SWT.PUSH);
if (image == null) {
item.setText(text);
} else {
item.setImage(image);
item.setToolTipText(text);
}
return item;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Component createNewToolItem() {\r\n Button button = new Button();\r\n gwtToolbarItem.addClasses(button);\r\n button.addStyleName(\"action-bar-tool-item\");\r\n return button;\r\n }",
"public ToolItem (ToolBar parent, int style) {\r\n\tthis(parent, style, parent.getItemCount ());\r\n}",
"public ToolItem (ToolBar parent, int style, int index) {\r\n\tsuper (parent, checkStyle (style));\r\n\tthis.parent = parent;\r\n\tparent.createItem (this, index);\r\n}",
"public JMTToolBar createToolbar() {\r\n \t\tJMTToolBar toolbar = new JMTToolBar(JMTImageLoader.getImageLoader());\r\n \t\t// Builds an array with all actions to be put in the toolbar\r\n \t\tAbstractJmodelAction[] actions = new AbstractJmodelAction[] { newModel, openModel, saveModel, null,\r\n \t\t\t\t// editUndo, editRedo, null,\r\n \t\t\t\tactionCut, actionCopy, actionPaste, null, editUserClasses, editMeasures, editSimParams, editPAParams, null, switchToExactSolver,\r\n \t\t\t\tnull, simulate, pauseSimulation, stopSimulation, showResults, null, editDefaults, openHelp };\r\n \t\ttoolbar.populateToolbar(actions);\r\n \t\treturn toolbar;\r\n \t}",
"public MainToolbar createToolbar()\r\n {\n WbSwingUtilities.invoke(this::_createToolbar);\r\n return toolbar;\r\n }",
"private void createToolbar() {\r\n // the visible toolbar is actually a toolbar next to a combobox.\r\n // That is why we need this extra composite, layout and numColums = 2.\r\n final Composite parent = new Composite(SHELL, SWT.FILL);\r\n final GridLayout layout = new GridLayout();\r\n layout.numColumns = 2;\r\n parent.setLayout(layout);\r\n\r\n final ToolBar bar = new ToolBar(parent, SWT.NONE);\r\n final GridData data = new GridData();\r\n data.heightHint = 55;\r\n data.grabExcessVerticalSpace = false;\r\n bar.setLayoutData(data);\r\n bar.setLayout(new GridLayout());\r\n\r\n createOpenButton(bar);\r\n\r\n createGenerateButton(bar);\r\n\r\n createSaveButton(bar);\r\n\r\n createSolveButton(bar);\r\n\r\n createAboutButton(bar);\r\n\r\n algorithmCombo = new AlgorithmCombo(parent);\r\n }",
"private void CreateToolBars(){\n toolBar = new ToolBar();\n btoolBar = new ToolBar();\n login=new Button(\"Login\");\n simulate=new Button(\"Simulate\");\n scoreBoardButton=new Button(\"ScoreBoard\");\n viewBracket= new Button(\"view Bracket\");\n clearButton=new Button(\"Clear\");\n resetButton=new Button(\"Reset\");\n finalizeButton=new Button(\"Finalize\");\n toolBar.getItems().addAll(\n createSpacer(),\n login,\n simulate,\n scoreBoardButton,\n viewBracket,\n createSpacer()\n );\n btoolBar.getItems().addAll(\n createSpacer(),\n clearButton,\n resetButton,\n finalizeButton,\n createSpacer()\n );\n }",
"private JToolBar getToolsToolBar() {\r\n\t\tif (toolsToolBar == null) {\r\n\t\t\ttoolsToolBar = new JToolBar();\r\n\t\t\ttoolsToolBar.setPreferredSize(new Dimension(87, 24));\r\n\t\t\tif(flag){\r\n\t\t\t\ttoolsToolBar.add(getOpenButton());\r\n\t\t\t\ttoolsToolBar.add(getSaveButton());\r\n\t\t\t}\r\n\t\t\ttoolsToolBar.add(getColorButton());\r\n\t\t\ttoolsToolBar.add(getLinkButton());\r\n\t\t\ttoolsToolBar.add(getIcoButton());\r\n\t\t}\r\n\t\treturn toolsToolBar;\r\n\t}",
"private void create_toolbar() {\n setSupportActionBar(toolbar);\n getSupportActionBar().setTitle(\"Event Planner\");//this will set the title of our application\n\n }",
"private Component buildToolBar() {\r\n DToolBar toolBar = new DToolBar();\r\n// toolBar.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);\r\n toolBar.setFloatable(true);\r\n toolBar.putClientProperty(\"JToolBar.isRollover\", Boolean.TRUE);\r\n // Swing\r\n toolBar.putClientProperty(\r\n Options.HEADER_STYLE_KEY,\r\n settings.getToolBarHeaderStyle());\r\n toolBar.putClientProperty(\r\n PlasticLookAndFeel.BORDER_STYLE_KEY,\r\n settings.getToolBarPlasticBorderStyle());\r\n toolBar.putClientProperty(\r\n WindowsLookAndFeel.BORDER_STYLE_KEY,\r\n settings.getToolBarWindowsBorderStyle());\r\n toolBar.putClientProperty(\r\n PlasticLookAndFeel.IS_3D_KEY,\r\n settings.getToolBar3DHint());\r\n\r\n AbstractButton button;\r\n/*\r\n toolBar.add(createToolBarButton(\"backward.gif\", \"Back\"));\r\n button = createToolBarButton(\"forward.gif\", \"Next\");\r\n button.setEnabled(false);\r\n toolBar.add(button);*/\r\n \r\n button = createToolBarButton(\"home.gif\", ResourceUtil.getString(\"HOME\"));\r\n toolBar.add(button);\r\n button.addActionListener(this);\r\n button.setActionCommand(\"home\");\r\n// toolBar.addSeparator();\r\n \r\n button = createToolBarButton(\"preference16.gif\", ResourceUtil.getString(\"PREFERENCES\"));\r\n toolBar.add(button);\r\n button.setRolloverIcon(readImageIcon(\"preference16_over.gif\"));\r\n button.addActionListener(this);\r\n button.setActionCommand(\"Preferences\");\r\n toolBar.addSeparator();\r\n\r\n button = createToolBarButton(\"new16.gif\", ResourceUtil.getString(\"NEW\"));\r\n button.setActionCommand(\"new\");\r\n button.addActionListener(this);\r\n toolBar.add(button);\r\n \r\n button = createToolBarButton(\"save_edit.gif\", ResourceUtil.getString(\"SAVE\"));\r\n button.setActionCommand(\"save\");\r\n button.addActionListener(this);\r\n toolBar.add(button);\r\n \r\n button = createToolBarButton(\"delete16.gif\", ResourceUtil.getString(\"DELETE\"));\r\n button.setActionCommand(\"delete\");\r\n button.addActionListener(this);\r\n toolBar.add(button);\r\n \r\n button = createToolBarButton(\"print.gif\", ResourceUtil.getString(\"PRINT\"));\r\n button.setActionCommand(\"print\");\r\n button.addActionListener(this);\r\n toolBar.add(button);\r\n/* \r\n toolBar.add(createToolBarButton(\"print.gif\", \"Print\"));\r\n toolBar.add(createToolBarButton(\"refresh.gif\", \"Update\"));\r\n toolBar.addSeparator();\r\n\r\n ButtonGroup group = new ButtonGroup();\r\n button = createToolBarRadioButton(\"pie_mode.png\", \"Pie Chart\");\r\n button.setSelectedIcon(readImageIcon(\"pie_mode_selected.gif\"));\r\n group.add(button);\r\n button.setSelected(true);\r\n toolBar.add(button);\r\n\r\n button = createToolBarRadioButton(\"bar_mode.png\", \"Bar Chart\");\r\n button.setSelectedIcon(readImageIcon(\"bar_mode_selected.gif\"));\r\n group.add(button);\r\n toolBar.add(button);\r\n\r\n button = createToolBarRadioButton(\"table_mode.png\", \"Table\");\r\n button.setSelectedIcon(readImageIcon(\"table_mode_selected.gif\"));\r\n group.add(button);\r\n toolBar.add(button);\r\n toolBar.addSeparator();\r\n\r\n button = createToolBarButton(\"help.gif\", \"Open Help\");\r\n button.addActionListener(createHelpActionListener());\r\n toolBar.add(button);*/\r\n\r\n return toolBar;\r\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 createToolBar() {\r\n toolbar = new JToolBar();\r\n inbox = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.INBOX_ICON)), \"Maintain Inbox\", \"Maintain Inbox\");\r\n awards = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.AWARDS_ICON)), \"Maintain Awards\", \"Maintain Awards\");\r\n proposal = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.PROPOSAL_ICON)), \"Maintain InstituteProposals\", \"Maintain Institute Proposals\");\r\n proposalDevelopment = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.PROPOSAL_DEVELOPMENT_ICON)), \"Maintain ProposalDevelopment\", \"Maintain Proposal Development\");\r\n rolodex = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.ROLODEX_ICON)), \"Maintain Rolodex\", \"Maintain Rolodex\");\r\n sponsor = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.SPONSOR_ICON)), \"Maintain Sponsor\", \"Maintain Sponsor\");\r\n subContract = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.SUBCONTRACT_ICON)), \"Maintain SubContract\", \"Maintain Subcontract\");\r\n negotiations = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.NEGOTIATIONS_ICON)), \"Maintain Negotiations\", \"Maintain Negotiations\");\r\n buisnessRules = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.BUSINESS_RULES_ICON)), \"Maintain BusinessRules\", \"Maintain Business Rules\");\r\n map = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.MAP_ICON)), \"Maintain Map\", \"Maintain Map\");\r\n personnal = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.PERSONNAL_ICON)), \"Maintain Personal\", \"Maintain Personnel\");\r\n users = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.USERS_ICON)), \"Maintain Users\", \"Maintain Users\");\r\n unitHierarchy = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.UNIT_HIERARCHY_ICON)), \"Maintain UnitHierarchy\", \"Maintain Unit Hierarchy\");\r\n cascade = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.CASCADE_ICON)), \"Cascade\", \"Cascade\");\r\n tileHorizontal = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.TILE_HORIZONTAL_ICON)), \"Tile Horizontal\", \"Tile Horizontal\");\r\n tileVertical = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.TILE_VERTICAL_ICON)), \"Tile Vertical\", \"Tile Vertical\");\r\n layer = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.LAYER_ICON)), \"Layer\", \"Layer\");\r\n \r\n /*Added Icons are Committe,Protocol,Shedule. The Icons are different.Non-availability of standard Icon - Chandrashekar*/\r\n //Added for COEUSQA-2580_Change menu item name from \"Protocol\" to \"IRB Protocol\" on Maintain menu in Premium - Start\r\n /* JM 05-02-2013\r\n irbProtocol = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.PROTOCOL_ICON)), \"Protocol\", \"IRB Protocol\");\r\n \r\n irbProtocolSubmission = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.PROTOCOL_SUBMISSION_BASE_ICON)),\"Protocol Submission\",\"IRB Protocol Submission\");\r\n */\r\n //Added for COEUSQA-2580_Change menu item name from \"Protocol\" to \"IRB Protocol\" on Maintain menu in Premium - End\r\n /* JM 05-02-2013\r\n schedule = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.SCHEDULE_ICON)), \"Schedule\", \"Schedule\");\r\n committee = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.COMMITTEE_ICON)), \"Committee\", \"Committee\");\r\n */\r\n //Added for COEUSQA-2580_Change menu item name from \"Protocol\" to \"IRB Protocol\" on Maintain menu in Premium - Start\r\n //irbProtocolSubmission = new CoeusToolBarButton(new ImageIcon(\r\n // getClass().getClassLoader().getResource(CoeusGuiConstants.PROTOCOL_SUBMISSION_BASE_ICON)),\"Protocol Submission\",\"IRB Protocol Submission\");\r\n //Added for COEUSQA-2580_Change menu item name from \"Protocol\" to \"IRB Protocol\" on Maintain menu in Premium - End\r\n //Added for case id COEUSQA-2717 icons for IACUC to Coeus Premium start\r\n /* JM 05-02-2013\r\n iacucProtocol = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.IACUC_PROTOCOL_ICON)), \"Protocol\", \"IACUC Protocol\");\r\n \r\n iacucProtocolSubmission = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.IACUC_PROTOCOL_SUBMISSION_BASE_ICON)),\"Protocol Submission\",\"IACUC Protocol Submission\");\r\n */\r\n //Added for case id COEUSQA-2717 icons for IACUC to Coeus Premium end\r\n \r\n /* JM 4-25-2016 adding new Contact Coeus Help button */\r\n contactCoeusHelp = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.HELP_ICON)), \"Contact Coeus Help\", \"Contact Coeus Help\");\r\n /* JM END */\r\n \r\n exit = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.EXIT_ICON)), \"Exit\", \"Exit\");\r\n \r\n \r\n toolbar.add(inbox);\r\n toolbar.addSeparator();\r\n toolbar.add(awards);\r\n toolbar.add(proposal);\r\n toolbar.add(proposalDevelopment);\r\n toolbar.add(rolodex);\r\n toolbar.add(sponsor);\r\n toolbar.add(subContract);\r\n toolbar.add(negotiations);\r\n toolbar.add(buisnessRules);\r\n toolbar.add(map);\r\n toolbar.add(personnal);\r\n toolbar.add(users);\r\n toolbar.add(unitHierarchy);\r\n \r\n /*Added Icons are Committe,Protocol,Shedule - Chandrashekar*/\r\n /* JM 05-02-2013\r\n toolbar.add(irbProtocol);\r\n toolbar.add(irbProtocolSubmission);\r\n \r\n toolbar.add(schedule);\r\n toolbar.add(committee);\r\n */\r\n //Added for case id COEUSQA-2717 icons for IACUC to Coeus Premium start\r\n /* JM 05-02-2013\r\n toolbar.add(iacucProtocol);\r\n toolbar.add(iacucProtocolSubmission);\r\n */\r\n //Added for case id COEUSQA-2717 icons for IACUC to Coeus Premium end\r\n \r\n toolbar.addSeparator();\r\n toolbar.add(cascade);\r\n toolbar.add(tileHorizontal);\r\n toolbar.add(tileVertical);\r\n toolbar.add(layer);\r\n toolbar.addSeparator();\r\n \r\n /* JM 4-25-2016 adding new Contact Coeus Help button */\r\n toolbar.add(contactCoeusHelp);\r\n toolbar.addSeparator();\r\n /* JM END */\r\n \r\n toolbar.add(exit);\r\n \r\n toolbar.setFloatable(false);\r\n setTextLabels(false);\r\n MouseListener pl = new PopupListener();\r\n cpm = new CoeusPopupMenu();\r\n toolbar.addMouseListener(pl);\r\n \r\n inbox.addActionListener(this);\r\n awards.addActionListener(this);\r\n proposal.addActionListener(this);\r\n proposalDevelopment.addActionListener(this);\r\n rolodex.addActionListener(this);\r\n sponsor.addActionListener(this);\r\n subContract.addActionListener(this);\r\n negotiations.addActionListener(this);\r\n buisnessRules.addActionListener(this);\r\n map.addActionListener(this);\r\n personnal.addActionListener(this);\r\n users.addActionListener(this);\r\n unitHierarchy.addActionListener(this);\r\n cascade.addActionListener(this);\r\n tileHorizontal.addActionListener(this);\r\n tileVertical.addActionListener(this);\r\n layer.addActionListener(this);\r\n /*Added Icons are Committe,Protocol,Shedule - Chandrashekar*/\r\n /* JM 05-02-2013\r\n irbProtocol.addActionListener(this);\r\n schedule.addActionListener(this);\r\n committee.addActionListener(this);\r\n irbProtocolSubmission.addActionListener(this);\r\n //Added for case id COEUSQA-2717 icons for IACUC to Coeus Premium start\r\n iacucProtocol.addActionListener(this);\r\n iacucProtocolSubmission.addActionListener(this); */\r\n //Added for case id COEUSQA-2717 icons for IACUC to Coeus Premium end\r\n \r\n /* JM 4-25-2016 adding new Contact Coeus Help button */\r\n contactCoeusHelp.addActionListener(this);\r\n /* JM END */\r\n \r\n exit.addActionListener(this);\r\n }",
"@Override\r\n\tprotected ToolBarManager createToolBarManager(int style) {\r\n\t\tToolBarManager toolBarManager = new ToolBarManager(style);\r\n\t\treturn toolBarManager;\r\n\t}",
"public JToolBar createJToolBar(String name) throws MissingResourceException, ResourceFormatException, MissingListenerException {\n/* 83 */ JToolBar result = new JToolBar();\n/* 84 */ List buttons = getStringList(name);\n/* */ \n/* 86 */ for (Object button : buttons) {\n/* 87 */ String s = (String)button;\n/* 88 */ if (s.equals(\"-\")) {\n/* 89 */ result.add(new JToolbarSeparator()); continue;\n/* */ } \n/* 91 */ result.add(createJButton(s));\n/* */ } \n/* */ \n/* 94 */ return result;\n/* */ }",
"MenuItem addItem(String title, Command callback);",
"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}",
"@Override\n public void fill(ToolBar parent, int index) {\n toolitem = new ToolItem(parent, SWT.SEPARATOR, index);\n Control control = createControl(parent);\n toolitem.setControl(control);\n }",
"@Override\n\tpublic Toolbar createToolbar() {\n\t\tLightVisualThemeToolbar lightVisualThemeToolbar = new LightVisualThemeToolbar();\n\t\treturn lightVisualThemeToolbar;\n\t}",
"private void createButton(final ToolBar bar, final String imagePath,\r\n final String text, final SelectionListener listener) {\r\n final Image icon = getIcon(imagePath);\r\n\r\n final ToolItem toolItem = new ToolItem(bar, SWT.PUSH);\r\n toolItem.setImage(resize(icon, DEFAULT_ICON_SIZE, DEFAULT_ICON_SIZE));\r\n toolItem.setText(text);\r\n\r\n toolItem.addSelectionListener(listener);\r\n }",
"public MenuItem add(int titleRes);",
"C getRegisteredToolBar(ToolbarPosition position);",
"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 }",
"@Override\n\tprotected ToolBarManager createToolBarManager(int style) {\n\t\treturn null;\n\t}",
"private void createToolbar() {\n\t\ttoolbarPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));\n\n\t\tString iconsDir = \"icons/\";\n\n\t\tfileToolbar = new JToolBar();\n\t\tfileToolbar.setName(\"File\");\n\n\t\t// Componentes da barra de ferramentas de arquivo\n\t\tIcon newFileIcon = new ImageIcon(getClass().getClassLoader().getResource(iconsDir + \"new.png\"));\n\t\tnewFileButton = new JButton(newFileIcon);\n\t\tnewFileButton.setToolTipText(\"Novo arquivo\");\n\n\t\tIcon openFileIcon = new ImageIcon(getClass().getClassLoader().getResource(iconsDir + \"open.png\"));\n\t\topenFileButton = new JButton(openFileIcon);\n\t\topenFileButton.setToolTipText(\"Abrir arquivo\");\n\t\topenFileButton.addActionListener(new OpenFileHandler());\n\n\t\tIcon saveFileIcon = new ImageIcon(getClass().getClassLoader().getResource(iconsDir + \"save.png\"));\n\t\tsaveFileButton = new JButton(saveFileIcon);\n\t\tsaveFileButton.setToolTipText(\"Salvar arquivo\");\n\n\t\t// fileToolbar.add(newFileButton);\n\t\tfileToolbar.add(openFileButton);\n\t\t// fileToolbar.add(saveFileButton);\n\n\t\t// Componentes da barra de ferramentas de rede\n\t\tnetworkComponentsToolbar = new JToolBar();\n\t\tnetworkComponentsToolbar.setName(\"Network components\");\n\n\t\tIcon newPlaceIcon = new ImageIcon(getClass().getClassLoader().getResource(iconsDir + \"circle_stroked.png\"));\n\t\taddPlaceButton = new JButton(newPlaceIcon);\n\t\taddPlaceButton.setToolTipText(\"Adicionar lugar\");\n\n\t\tIcon newTransitionIcon = new ImageIcon(getClass().getClassLoader().getResource(iconsDir + \"pipe.png\"));\n\t\taddTransitionButton = new JButton(newTransitionIcon);\n\t\taddTransitionButton.setToolTipText(\"Adicionar transição\");\n\n\t\tIcon newEdgeIcon = new ImageIcon(getClass().getClassLoader().getResource(iconsDir + \"arrow_alt_right.png\"));\n\t\taddEdgeButton = new JButton(newEdgeIcon);\n\t\taddEdgeButton.setToolTipText(\"Adicionar aresta\");\n\n\t\tnetworkComponentsToolbar.add(addPlaceButton);\n\t\tnetworkComponentsToolbar.add(addTransitionButton);\n\t\tnetworkComponentsToolbar.add(addEdgeButton);\n\n\t\ttoolbarPanel.add(fileToolbar);\n\t\t// toolbarPanel.add(networkComponentsToolbar);\n\n\t\tthis.add(toolbarPanel, BorderLayout.NORTH);\n\t}",
"private void defineToolBar() {\r\n //ARREGLO CON LOS BOTONES ORDENADOS POR POSICION\r\n tools = new ImageView[]{im_tool1,im_tool2,im_tool3,im_tool4,im_tool5,im_tool6,im_tool7,im_tool8,im_tool9,im_tool10,im_tool11,im_tool12}; \r\n //CARGA DE LA BD LA CONFIGURACION DE USUARIO PARA LA PANTALLA\r\n toolsConfig = Ln.getInstance().loadToolBar();\r\n // arreglo con cada etiqueta, ordenado por boton\r\n tooltips = new String[]{\r\n \"Nueva \" + ScreenName + \" \",\r\n \"Editar \" + ScreenName + \" \",\r\n \"Guardar \" + ScreenName + \" \",\r\n \"Cambiar Status de \" + ScreenName + \" \",\r\n \"Imprimir \" + ScreenName + \" \",\r\n \"Cancelar \",\r\n \"Sin Asignar \",\r\n \"Faltante en \" + ScreenName + \" \",\r\n \"Devolución en \" + ScreenName + \" \",\r\n \"Sin Asignar\",\r\n \"Sin Asignar\",\r\n \"Buscar \" + ScreenName + \" \"\r\n };\r\n //se asigna la etiqueta a su respectivo boton\r\n for (int i = 0; i < tools.length; i++) { \r\n Tooltip tip_tool = new Tooltip(tooltips[i]);\r\n Tooltip.install(tools[i], tip_tool);\r\n }\r\n \r\n im_tool7.setVisible(false);\r\n im_tool8.setVisible(false);\r\n im_tool9.setVisible(false);\r\n im_tool10.setVisible(false);\r\n im_tool11.setVisible(false);\r\n }",
"@Override\n public void setToolbar(MToolBar arg0)\n {\n \n }",
"protected void addActivePathToolbarButton ()\n {\n\n }",
"private void createToolbars() {\n\t\tJToolBar toolBar = new JToolBar(\"Tools\");\n\t\ttoolBar.setFloatable(true);\n\n\t\ttoolBar.add(new JButton(new ActionNewDocument(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionOpen(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionSave(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionSaveAs(flp, this)));\n\t\ttoolBar.addSeparator();\n\t\ttoolBar.add(new JButton(new ActionCut(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionCopy(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionPaste(flp, this)));\n\t\ttoolBar.addSeparator();\n\t\ttoolBar.add(new JButton(new ActionStatistics(flp, this)));\n\n\t\tthis.getContentPane().add(toolBar, BorderLayout.PAGE_START);\n\t}",
"public ToolButton createToolButton(String path, String toolName, Tool tool);",
"private void createResponseToolbar ( ExpandableComposite parent ) {\n \t\trawAction = new ShowRawAction();\n \t\trawAction.setChecked(true);\n \t\tbrowserAction = new ShowInBrowserAction();\n \n \t\tToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);\n \t\tToolBar toolbar = toolBarManager.createControl(parent);\n \n \t\ttoolBarManager.add(new FileSaveAction());\n \t\ttoolBarManager.add(new OpenInXMLEditorAction());\n \t\ttoolBarManager.add(rawAction);\n \t\ttoolBarManager.add(browserAction);\n \n \t\ttoolBarManager.update(true);\n \n \t\tparent.setTextClient(toolbar);\n \t}",
"private void createToolbars() {\r\n\t\tJToolBar toolBar = new JToolBar(\"Tool bar\");\r\n\t\ttoolBar.add(createBlankDocument);\r\n\t\ttoolBar.add(openDocumentAction);\r\n\t\ttoolBar.add(saveDocumentAction);\r\n\t\ttoolBar.add(saveDocumentAsAction);\r\n\t\ttoolBar.add(closeCurrentTabAction);\r\n\t\t\r\n\t\ttoolBar.addSeparator();\r\n\t\ttoolBar.add(copyAction);\r\n\t\ttoolBar.add(cutAction);\r\n\t\ttoolBar.add(pasteAction);\r\n\t\t\r\n\t\ttoolBar.addSeparator();\r\n\t\ttoolBar.add(getStatsAction);\r\n\t\t\r\n\t\ttoolBar.addSeparator();\r\n\t\ttoolBar.add(exitAction);\r\n\t\t\r\n\t\tgetContentPane().add(toolBar, BorderLayout.PAGE_START);\r\n\t}",
"public ToolButton createToolButton(Icon icon, Icon selectedIcon,\n String toolName, Tool tool);",
"public ToolBarView() {\r\n\t\tbuttonsToolbar = new JButton[14];\r\n\t\tfor (int i = 0; i < imagesToolbar.length; i++) {\r\n\t\t\tif (i == 2 || i == 3 || i == 8 || i == 10 || i == 11 || i == 12 ) {\r\n /* adding separator to the toolbar */\r\n\t\t\t\taddSeparator();\r\n } \r\n /* adding the buttons to toolbar */\r\n\t\t\tadd(buttonsToolbar[i] = new JButton(new ImageIcon(ClassLoader.getSystemResource(imagesToolbar[i]))));\r\n\t\t\t/* setting the ToolTipText to the buttons of toolbar */\r\n\t\t\tbuttonsToolbar[i].setToolTipText(tipText[i]);\r\n\t\t}\r\n\t}",
"private JMenuItem createMenuItem(JMenu parent, String text, int mnemonic, String keyStrokeText, String tooltip) {\n\t\tJMenuItem item = new JMenuItem();\n\t\t\n\t\titem.setText(text);\n\t\tif (mnemonic != -1) {\n\t\t\titem.setMnemonic(mnemonic);\n\t\t}\n\t\tif (keyStrokeText != null) {\n\t\t\tKeyStroke accelerator = KeyStroke.getKeyStroke(keyStrokeText);\n\t\t\titem.setAccelerator(accelerator);\n\t\t}\n\t\tif (tooltip != null) {\n\t\t\titem.setToolTipText(tooltip);\n\t\t}\n\t\t\n\t\tparent.add(item);\n\t\treturn item;\n\t}",
"void setupToolbarDropDown(List<? extends CharSequence> dropDownItemList);",
"public JToolBar gameToolbar() {\n\t\tthis.gameToolbar = new JToolBar();\n\t\t//this.gameToolbar.setPreferredSize(size);\n\t\tFlowLayout tbLayout = new FlowLayout();\n\t\tthis.gameToolbar.setLayout(tbLayout);\n\t\ttbLayout.setAlignment(FlowLayout.CENTER);\n\t\tthis.gameToolbar.setRollover(true);\n\t\tthis.dealButton = new JButton(\"DEAL\");\n\t\tthis.dealButton.addActionListener(this);\n\t\tthis.placeBetButton = new JButton(\"PLACE BET\");\n\t\tthis.placeBetButton.addActionListener(this);\n\t\tthis.resultsButton = new JButton(\"VIEW RESULTS\");\n\t\tthis.resultsButton.addActionListener(this);\n\t\tthis.gameToolbar.add(this.dealButton);\n\t\tthis.gameToolbar.addSeparator();\n\t\tthis.gameToolbar.add(this.placeBetButton);\n\t\tthis.gameToolbar.addSeparator();\n\t\tthis.gameToolbar.add(this.resultsButton);\n\t\treturn this.gameToolbar;\n\t\t\n\t}",
"public MenuItem add(CharSequence title);",
"protected abstract JToolBar getNorthToolbar();",
"private ToolbarButtonView addFakeItem() {\n // NOTE: simplest way to add a fake item is to add an invisible button.\n ToolbarButtonView fakeButton = addClickButton();\n fakeButton.setState(State.INVISIBLE);\n return fakeButton;\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}",
"public MainToolBar(final Shell parent, final Controller controller, List<MainMenuItem> items) {\n super(controller);\n toolbar = new ToolBar(parent, SWT.FLAT);\n toolbar.setLayoutData(SWTUtil.createFillHorizontallyGridData());\n\n // Create items\n this.createItems(toolbar, items, \"\"); //$NON-NLS-1$\n this.createLabels();\n\n // Pack\n toolbar.pack();\n \n // Initialize\n this.update(new ModelEvent(this, ModelPart.MODEL, null));\n \n }",
"private Button initHBoxButton(HBox toolbar, DraftKit_PropertyType icon, DraftKit_PropertyType tooltip, boolean disabled) {\n PropertiesManager props = PropertiesManager.getPropertiesManager();\n String imagePath = \"file:\" + PATH_IMAGES + props.getProperty(icon.toString());\n Image buttonImage = new Image(imagePath);\n Button button = new Button();\n button.setDisable(disabled);\n button.setGraphic(new ImageView(buttonImage));\n Tooltip buttonTooltip = new Tooltip(props.getProperty(tooltip.toString()));\n button.setTooltip(buttonTooltip);\n toolbar.getChildren().add(button);\n return button;\n }",
"@Override\n protected int getToolbarMenu() {\n return R.menu.menu_activity_create_estate;\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}",
"private void createRequestToolbar ( ExpandableComposite parent ) {\n \t\trawRequestAction = new ShowRawRequestAction();\n \t\trawRequestAction.setChecked(true);\n \t\ttreeAction = new ShowInTreeAction();\n \n \t\tToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);\n \t\tToolBar toolbar = toolBarManager.createControl(parent);\n \n \t\ttoolBarManager.add(rawRequestAction);\n \t\ttoolBarManager.add(treeAction);\n \n \t\ttoolBarManager.update(true);\n \n \t\tparent.setTextClient(toolbar);\n \t}",
"protected abstract ToolbarEngine getInstanceOfToolbar();",
"private JToolBar getJToolBar() {\r\n\t\tif (jToolBar == null) {\r\n\t\t\tjToolBar = new JToolBar();\r\n\t\t\tjToolBar.setFloatable(false);\r\n\t\t\tjToolBar.add(getCmdAdd());\r\n\t\t\tjToolBar.add(getCmdDel());\r\n\t\t\tjToolBar.add(getCmdAddT());\r\n\t\t\tjToolBar.add(getCmdUrl());\r\n\t\t\tjToolBar.add(getCmdStart());\r\n\t\t\tjToolBar.add(getCmdPause());\r\n\t\t\tjToolBar.add(getCmdStop());\r\n\t\t\tjToolBar.add(getCmdExport());\r\n\t\t}\r\n\t\treturn jToolBar;\r\n\t}",
"public CreateToolBar(final String theName, final List<ToolAction> theToolActions) {\n myToolBar = new JToolBar(theName);\n final ButtonGroup group = new ButtonGroup();\n \n for (final ToolAction currentTool : theToolActions) {\n final JToggleButton item = new JToggleButton(currentTool);\n group.add(item);\n myToolBar.add(item);\n }\n }",
"@objid (\"491beea2-12dd-11e2-8549-001ec947c8cc\")\n private static MHandledMenuItem createItem(String label, String tooltip, String iconURI) {\n MHandledMenuItem item = MMenuFactory.INSTANCE.createHandledMenuItem();\n // item.setElementId(module.getName() + commandId);\n item.setLabel(label);\n item.setTooltip(tooltip);\n item.setIconURI(iconURI);\n item.setEnabled(true);\n item.setToBeRendered(true);\n item.setVisible(true);\n return item;\n }",
"private void createLabels() {\n\n // Add status labels\n infoItem = new ToolItem(toolbar, SWT.SEPARATOR);\n infoComposite = new Composite(toolbar, SWT.NONE);\n infoItem.setControl(infoComposite);\n infoComposite.setLayout(null);\n\n labelAttribute = new Label(infoComposite, SWT.SINGLE | SWT.READ_ONLY);\n labelAttribute.setText(Resources.getMessage(\"MainToolBar.33\")); //$NON-NLS-1$\n labelAttribute.pack(); \n labelTransformations = new Label(infoComposite, SWT.SINGLE | SWT.READ_ONLY);\n labelTransformations.setText(Resources.getMessage(\"MainToolBar.33\")); //$NON-NLS-1$\n labelTransformations.pack();\n labelSelected = new Label(infoComposite, SWT.SINGLE | SWT.READ_ONLY);\n labelSelected.setText(Resources.getMessage(\"MainToolBar.31\")); //$NON-NLS-1$\n labelSelected.pack();\n labelApplied = new Label(infoComposite, SWT.SINGLE | SWT.READ_ONLY);\n labelApplied.setText(Resources.getMessage(\"MainToolBar.32\")); //$NON-NLS-1$\n labelApplied.pack();\n \n // Copy info to clip board on right-click\n Menu menu = new Menu(toolbar);\n MenuItem itemCopy = new MenuItem(menu, SWT.NONE);\n itemCopy.setText(Resources.getMessage(\"MainToolBar.42\")); //$NON-NLS-1$\n itemCopy.addSelectionListener(new SelectionAdapter(){\n public void widgetSelected(SelectionEvent arg0) {\n if (tooltip != null) {\n Clipboard clipboard = new Clipboard(toolbar.getDisplay());\n TextTransfer textTransfer = TextTransfer.getInstance();\n clipboard.setContents(new String[]{tooltip}, \n new Transfer[]{textTransfer});\n clipboard.dispose();\n }\n }\n });\n labelSelected.setMenu(menu);\n labelApplied.setMenu(menu);\n labelTransformations.setMenu(menu);\n \n // Add listener for layout\n toolbar.addControlListener(new ControlAdapter() {\n @Override\n public void controlResized(final ControlEvent arg0) {\n layout();\n }\n });\n }",
"protected abstract int getIdResourcesOfToolbar();",
"private void setupToolBar() {\n\t\tbOk = ConfirmPanel.createOKButton(false);\n\t\tbOk.addActionListener(this);\n\t\tbSearch = ConfirmPanel.createRefreshButton(true);\n\t\tbSearch.addActionListener(this);\n\t\tbCancel = ConfirmPanel.createCancelButton(false);\n\t\tbCancel.addActionListener(this);\n\t\tbZoom = ConfirmPanel.createZoomButton(true);\n\t\tbZoom.addActionListener(this);\n\t\tbExport = ConfirmPanel.createExportButton(true);\n\t\tbExport.addActionListener(this);\n\t\tbDelete = ConfirmPanel.createDeleteButton(true);\n\t\tbDelete.addActionListener(this);\n\t\tAppsAction selectAllAction = new AppsAction(\"SelectAll\", null, Msg.getMsg(Env.getCtx(),\"SelectAll\"));\n\t\tselectAllAction.setDelegate(this);\n\t\tbSelectAll = (CButton) selectAllAction.getButton();\n\t\ttoolsBar = new javax.swing.JToolBar();\n\t}",
"private Button initChildButton(Pane toolbar, DraftKit_PropertyType icon, DraftKit_PropertyType tooltip, boolean disabled) {\n PropertiesManager props = PropertiesManager.getPropertiesManager();\n String imagePath = \"file:\" + PATH_IMAGES + props.getProperty(icon.toString());\n Image buttonImage = new Image(imagePath);\n Button button = new Button();\n button.setDisable(disabled);\n button.setGraphic(new ImageView(buttonImage));\n Tooltip buttonTooltip = new Tooltip(props.getProperty(tooltip.toString()));\n button.setTooltip(buttonTooltip);\n toolbar.getChildren().add(button);\n return button;\n }",
"protected AbstractButton createToolBarButton(String iconName, String toolTipText) {\r\n JButton button = new JButton(readImageIcon(iconName));\r\n button.setToolTipText(toolTipText);\r\n button.setFocusable(false);\r\n return button;\r\n }",
"private MenuBar.MenuItem createMenuItem(View vista, String menuAddress, Resource menuIcon) {\n MenuBar.MenuItem menuItem;\n MenuCommand cmd = new MenuCommand(menuBar, vista);\n menuItem = menuBar.addItem(menuAddress, menuIcon, cmd);\n menuItem.setStyleName(AMenuBar.MENU_DISABILITATO);\n\n return menuItem;\n }",
"public interface IActivityToolbar {\n\n ToolBarBean getToolBar();\n}",
"@Override\n public Component getToolbarPresenter() {\n return new FontPanel();\n }",
"public Menu createToolsMenu();",
"public void toolbarImplementacionIsmael() {\n\t\t// ToolBar Fuente\n\t\tbtnFuente = new JButton(\"Fuente\");\n\t\tbtnFuente.setEnabled(false);\n\t\ttry {\n\t\t\timg = ImageIO.read(getClass().getResource(\"img/copy.png\"));\n\t\t\timg = img.getScaledInstance(20, 20, Image.SCALE_SMOOTH);\n\t\t\tbtnFuente.setIcon(new ImageIcon(img));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttoolbar.add(btnFuente);\n\n\t\tbtnSeleccionarTodo = new JButton(\"Selec.Todo\");\n\t\tbtnSeleccionarTodo.setEnabled(false);\n\t\ttry {\n\t\t\timg = ImageIO.read(getClass().getResource(\"img/copy.png\"));\n\t\t\timg = img.getScaledInstance(20, 20, Image.SCALE_SMOOTH);\n\t\t\tbtnSeleccionarTodo.setIcon(new ImageIcon(img));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttoolbar.add(btnSeleccionarTodo);\n\n\t\tbtnHora = new JButton(\"Hora\");\n\t\ttry {\n\t\t\timg = ImageIO.read(getClass().getResource(\"img/copy.png\"));\n\t\t\timg = img.getScaledInstance(20, 20, Image.SCALE_SMOOTH);\n\t\t\tbtnHora.setIcon(new ImageIcon(img));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttoolbar.add(btnHora);\n\t}",
"private void putInToolbar(Toolbar toolbar) {\n Drawable drawable = getResources().getDrawable(R.drawable.arrow);\n drawable = resize(drawable, 64, 64);\n toolbar.setNavigationIcon(drawable);\n toolbar.setNavigationOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n finish();\n }\n });\n }",
"void setToolbar(int toolbarTemp) {\n\n }",
"public JToolBar getToolBar(){\r\n return toolbar;\r\n }",
"private MenuBar.MenuItem createMenuItem(Class<? extends View> viewClass, String label, boolean cached, Resource icon) {\n MenuBar.MenuItem menuItem;\n MenuCommand cmd = new MenuCommand(menuBar, viewClass, cached);\n menuItem = menuBar.addItem(label, icon, cmd);\n menuItem.setStyleName(AMenuBar.MENU_DISABILITATO);\n return menuItem;\n }",
"public interface SupportsBigDataViewerToolBarButton\n{\n int addToolBarButtons(int verticalPosition);\n}",
"private void addItemToDrawer() {\n\t\tmLDrawerItem.add(new DrawerItem(\"Control\", R.drawable.ic_control));\n\t\tmLDrawerItem.add(new DrawerItem(\"Setting\", R.drawable.ic_setting));\n\t\tmLDrawerItem.add(new DrawerItem(\"Feedback\", R.drawable.ic_feedback));\n\t\tmLDrawerItem.add(new DrawerItem(\"Help\", R.drawable.ic_help));\n\t\tmLDrawerItem.add(new DrawerItem(\"About\", R.drawable.ic_about));\n\n\t}",
"public interface ToolbarOperation {\n Toolbar getToolbar();\n\n void modifyToolbarTitle(String title);\n\n float getToolbarHeight();\n}",
"@NotNull\n TBItemButton addButton() {\n @NotNull TBItemButton butt = new TBItemButton(myItemListener, myStats != null ? myStats.getActionStats(\"simple_button\") : null);\n myItems.addItem(butt);\n return butt;\n }",
"private void setupToolBar() {\n\t\tJPanel buttons = new JPanel(new GridBagLayout());\n\t\tGridBagConstraints c = new GridBagConstraints();\n\t\tc.fill = GridBagConstraints.HORIZONTAL;\n\t\ttoolBar = new JToolBar(\"Buttons\");\n\t\ttoolBar.setFloatable(false);\n\t\ttoolBar.setOrientation(SwingConstants.VERTICAL);\n\t\tbuttons.add(toolBar, c);\n\t\tadd(buttons, BorderLayout.EAST);\n\t}",
"protected abstract Toolbar provideSupportActionbar();",
"public ToolScreen addToolbars()\n {\n ToolScreen toolbar = super.addToolbars();\n \n ToolScreen toolbar2 = new EmptyToolbar(this.getNextLocation(ScreenConstants.LAST_LOCATION, ScreenConstants.DONT_SET_ANCHOR), this, null, ScreenConstants.DONT_DISPLAY_FIELD_DESC, null);\n BaseField converter = null;\n ScreenComponent sField = null;\n \n converter = this.getRecord(Booking.BOOKING_FILE).getField(Booking.GROSS);\n sField = converter.setupDefaultView(toolbar2.getNextLocation(ScreenConstants.NEXT_INPUT_LOCATION, ScreenConstants.ANCHOR_DEFAULT), toolbar2, ScreenConstants.DEFAULT_DISPLAY);\n sField.setEnabled(false);\n converter = this.getRecord(Booking.BOOKING_FILE).getField(Booking.NET);\n sField = converter.setupDefaultView(toolbar2.getNextLocation(ScreenConstants.RIGHT_WITH_DESC, ScreenConstants.ANCHOR_DEFAULT), toolbar2, ScreenConstants.DEFAULT_DISPLAY);\n sField.setEnabled(false);\n converter = this.getRecord(Booking.BOOKING_FILE).getField(Booking.PRICING_STATUS_ID);\n sField = converter.setupDefaultView(toolbar2.getNextLocation(ScreenConstants.RIGHT_WITH_DESC, ScreenConstants.ANCHOR_DEFAULT), toolbar2, ScreenConstants.DEFAULT_DISPLAY);\n sField.setEnabled(false);\n \n converter = this.getRecord(Booking.BOOKING_FILE).getField(Booking.TOUR_PRICING_TYPE_ID);\n sField = converter.setupDefaultView(toolbar2.getNextLocation(ScreenConstants.NEXT_INPUT_LOCATION, ScreenConstants.ANCHOR_DEFAULT), toolbar2, ScreenConstants.DEFAULT_DISPLAY);\n converter = this.getRecord(Booking.BOOKING_FILE).getField(Booking.NON_TOUR_PRICING_TYPE_ID);\n sField = converter.setupDefaultView(toolbar2.getNextLocation(ScreenConstants.RIGHT_WITH_DESC, ScreenConstants.ANCHOR_DEFAULT), toolbar2, ScreenConstants.DEFAULT_DISPLAY);\n \n return toolbar;\n }",
"public ToolBarManager initTitle(String toolBarTitle, int color,int start,int top,int end,int bottom){\n if(toolBarTitle!=null){\n mToolbar.setTitle(toolBarTitle);\n mToolbar.setTitleTextColor(color);\n mToolbar.setTitleMargin(start,top,end,bottom);\n }\n return instance;\n }",
"void setupToolBar(String title) {\n setupToolBar(title, new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n onBackPressed();\n }\n });\n }",
"void modifyToolbar(Toolbar toolbar){\r\n toolbar.setTitle(name);\r\n toolbar.inflateMenu(R.menu.menu_toolbar_package);\r\n\r\n //needed to send context to util classes\r\n final Context context = this;\r\n\r\n toolbar.setOnMenuItemClickListener(\r\n new Toolbar.OnMenuItemClickListener() {\r\n @Override\r\n public boolean onMenuItemClick(MenuItem item) {\r\n switch (item.getItemId())\r\n {\r\n case R.id.action_exit_fragment:\r\n onBackPressed();\r\n break;\r\n case R.id.action_phone:\r\n DialogUtil.makePhoneDialog(context,R.string.dialog_phone_title, R.string.dialog_phone_customer_positive, selectedTask.getReceiver().getPhone());\r\n break;\r\n case R.id.action_sms:\r\n DialogUtil.makeSMSDialog(context, selectedTask);\r\n break;\r\n default:break;\r\n }\r\n return true;\r\n }\r\n });\r\n\r\n }",
"void setupToolBar(String title, View.OnClickListener onClickListener) {\n setupToolBar(title, true, onClickListener);\n showToolbar();\n }",
"private ActionBarHelper createActionBarHelper() {\n\t\treturn new ActionBarHelper(this);\n\t}",
"void setupToolBar(String title, boolean showNavigationBtn) {\n setupToolBar(title, showNavigationBtn, new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n// finish();\n onBackPressed();\n }\n });\n }",
"private static JToolBar initToolBar() {\n JToolBar basicMenu = new JToolBar();\n\n JButton cr = initButton(Icons.CREATE, a -> EditorScreen.instance().create());\n JButton op = initButton(Icons.LOAD, a -> EditorScreen.instance().load());\n JButton sv = initButton(Icons.SAVE, a -> EditorScreen.instance().save(false));\n JButton undo = initButton(Icons.UNDO, a -> UndoManager.instance().undo());\n JButton redo = initButton(Icons.REDO, a -> UndoManager.instance().redo());\n undo.setEnabled(false);\n redo.setEnabled(false);\n\n JToggleButton place = new JToggleButton();\n place.setIcon(Icons.PLACEOBJECT);\n requestFocusOnMouseDown(place);\n\n JToggleButton ed = new JToggleButton();\n ed.setIcon(Icons.EDIT);\n ed.setSelected(true);\n requestFocusOnMouseDown(ed);\n\n JToggleButton mv = new JToggleButton();\n mv.setIcon(Icons.MOVE);\n mv.setEnabled(false);\n requestFocusOnMouseDown(mv);\n\n ed.addActionListener(a -> {\n ed.setSelected(true);\n place.setSelected(false);\n mv.setSelected(false);\n isChanging = true;\n EditorScreen.instance().getMapComponent().setEditMode(MapComponent.EDITMODE_EDIT);\n isChanging = false;\n\n Game.window().getRenderComponent().setCursor(Cursors.DEFAULT, 0, 0);\n });\n\n place.addActionListener(a -> {\n addPopupMenu.show(place, 0, place.getHeight());\n place.setSelected(true);\n ed.setSelected(false);\n mv.setSelected(false);\n isChanging = true;\n EditorScreen.instance().getMapComponent().setEditMode(MapComponent.EDITMODE_CREATE);\n isChanging = false;\n });\n\n mv.addActionListener(a -> {\n mv.setSelected(true);\n ed.setSelected(false);\n place.setSelected(false);\n isChanging = true;\n EditorScreen.instance().getMapComponent().setEditMode(MapComponent.EDITMODE_MOVE);\n isChanging = false;\n\n Game.window().getRenderComponent().setCursor(Cursors.MOVE, 0, 0);\n });\n\n EditorScreen.instance().getMapComponent().onEditModeChanged(i -> {\n if (isChanging) {\n return;\n }\n\n if (i == MapComponent.EDITMODE_CREATE) {\n ed.setSelected(false);\n mv.setSelected(false);\n place.setSelected(true);\n place.requestFocus();\n Game.window().getRenderComponent().setCursor(Cursors.ADD, 0, 0);\n }\n\n if (i == MapComponent.EDITMODE_EDIT) {\n place.setSelected(false);\n mv.setSelected(false);\n ed.setSelected(true);\n ed.requestFocus();\n Game.window().getRenderComponent().setCursor(Cursors.DEFAULT, 0, 0);\n }\n\n if (i == MapComponent.EDITMODE_MOVE) {\n if (!mv.isEnabled()) {\n return;\n }\n\n ed.setSelected(false);\n place.setSelected(false);\n mv.setSelected(true);\n mv.requestFocus();\n Game.window().getRenderComponent().setCursor(Cursors.MOVE, 0, 0);\n }\n });\n\n JButton del = new JButton();\n del.setIcon(Icons.DELETE);\n del.setEnabled(false);\n del.addActionListener(a -> EditorScreen.instance().getMapComponent().delete());\n\n // copy\n JButton cop = new JButton();\n cop.setIcon(Icons.COPY);\n cop.setEnabled(false);\n ActionListener copyAction = a -> EditorScreen.instance().getMapComponent().copy();\n cop.addActionListener(copyAction);\n cop.getModel().setMnemonic('C');\n KeyStroke keyStroke = KeyStroke.getKeyStroke('C', Event.CTRL_MASK, false);\n cop.registerKeyboardAction(copyAction, keyStroke, JComponent.WHEN_IN_FOCUSED_WINDOW);\n\n // paste\n JButton paste = new JButton();\n paste.setIcon(Icons.PASTE);\n\n ActionListener pasteAction = a -> EditorScreen.instance().getMapComponent().paste();\n paste.addActionListener(pasteAction);\n paste.getModel().setMnemonic('V');\n KeyStroke keyStrokePaste = KeyStroke.getKeyStroke('V', Event.CTRL_MASK, false);\n paste.registerKeyboardAction(pasteAction, keyStrokePaste, JComponent.WHEN_IN_FOCUSED_WINDOW);\n\n // cut\n JButton cut = new JButton();\n cut.setIcon(Icons.CUT);\n cut.setEnabled(false);\n ActionListener cutAction = a -> EditorScreen.instance().getMapComponent().cut();\n cut.addActionListener(cutAction);\n cut.getModel().setMnemonic('X');\n KeyStroke keyStrokeCut = KeyStroke.getKeyStroke('X', Event.CTRL_MASK, false);\n cut.registerKeyboardAction(cutAction, keyStrokeCut, JComponent.WHEN_IN_FOCUSED_WINDOW);\n\n EditorScreen.instance().getMapComponent().onFocusChanged(mo -> {\n if (mv.isSelected()) {\n mv.setSelected(false);\n ed.setSelected(true);\n }\n\n mv.setEnabled(mo != null);\n del.setEnabled(mo != null);\n cop.setEnabled(mo != null);\n cut.setEnabled(mo != null);\n undo.setEnabled(UndoManager.instance().canUndo());\n redo.setEnabled(UndoManager.instance().canRedo());\n paste.setEnabled(EditorScreen.instance().getMapComponent().getCopiedBlueprint() != null);\n });\n\n EditorScreen.instance().getMapComponent().onEditModeChanged(mode -> paste.setEnabled(EditorScreen.instance().getMapComponent().getCopiedBlueprint() != null));\n\n UndoManager.onUndoStackChanged(manager -> {\n EditorScreen.instance().getMapComponent().updateTransformControls();\n undo.setEnabled(manager.canUndo());\n redo.setEnabled(manager.canRedo());\n });\n\n JButton colorButton = new JButton();\n colorButton.setIcon(Icons.COLOR);\n colorButton.setEnabled(false);\n\n JSpinner spinnerAmbientAlpha = new JSpinner();\n spinnerAmbientAlpha.setToolTipText(\"Adjust ambient alpha.\");\n spinnerAmbientAlpha.setModel(new SpinnerNumberModel(0, 0, 255, 1));\n spinnerAmbientAlpha.setMaximumSize(new Dimension(50, 50));\n spinnerAmbientAlpha.setEnabled(true);\n spinnerAmbientAlpha.addChangeListener(e -> {\n if (Game.world().environment() == null || Game.world().environment().getMap() == null || isChanging) {\n return;\n }\n\n Game.world().environment().getAmbientLight().setAlpha((int) spinnerAmbientAlpha.getValue());\n String hex = ColorHelper.encode(Game.world().environment().getAmbientLight().getColor());\n colorText.setText(hex);\n Game.world().environment().getMap().setValue(MapProperty.AMBIENTCOLOR, hex);\n\n });\n\n colorText = new JTextField();\n colorText.setHorizontalAlignment(SwingConstants.CENTER);\n colorText.setMinimumSize(new Dimension(70, 20));\n colorText.setMaximumSize(new Dimension(70, 50));\n colorText.setEnabled(false);\n\n colorButton.addActionListener(a -> {\n if (Game.world().environment() == null || Game.world().environment().getMap() == null || isChanging) {\n return;\n }\n\n Color color = null;\n if (colorText.getText() != null && !colorText.getText().isEmpty()) {\n Color solid = ColorHelper.decode(colorText.getText());\n color = new Color(solid.getRed(), solid.getGreen(), solid.getBlue(), (int) spinnerAmbientAlpha.getValue());\n }\n Color result = JColorChooser.showDialog(null, Resources.strings().get(\"panel_selectAmbientColor\"), color);\n if (result == null) {\n return;\n }\n\n spinnerAmbientAlpha.setValue(result.getAlpha());\n\n Game.world().environment().getMap().setValue(MapProperty.AMBIENTCOLOR, colorText.getText());\n Game.world().environment().getAmbientLight().setColor(result);\n String hex = ColorHelper.encode(Game.world().environment().getAmbientLight().getColor());\n colorText.setText(hex);\n });\n\n EditorScreen.instance().getMapComponent().onMapLoaded(map -> {\n isChanging = true;\n colorButton.setEnabled(map != null);\n spinnerAmbientAlpha.setEnabled(map != null);\n\n String colorValue = map.getStringValue(MapProperty.AMBIENTCOLOR, \"#00000000\");\n colorText.setText(colorValue);\n Color color = ColorHelper.decode(colorText.getText());\n if (color != null) {\n spinnerAmbientAlpha.setValue(color.getAlpha());\n }\n\n isChanging = false;\n });\n\n basicMenu.add(cr);\n basicMenu.add(op);\n basicMenu.add(sv);\n basicMenu.addSeparator();\n\n basicMenu.add(undo);\n basicMenu.add(redo);\n basicMenu.addSeparator();\n\n basicMenu.add(place);\n basicMenu.add(ed);\n basicMenu.add(mv);\n basicMenu.add(del);\n basicMenu.add(cop);\n basicMenu.add(paste);\n basicMenu.add(cut);\n basicMenu.addSeparator();\n\n basicMenu.add(colorButton);\n basicMenu.add(Box.createHorizontalStrut(5));\n basicMenu.add(colorText);\n basicMenu.add(Box.createHorizontalStrut(5));\n basicMenu.add(spinnerAmbientAlpha);\n\n return basicMenu;\n }",
"private void fillLocalToolBar(IToolBarManager manager) {\n\t\tmanager.add(actionReload);\n\t\tmanager.add(actionSort);\n\t\tmanager.add(new Separator());\n\t\t\n\t\tmanager.add(actionFind);\n//\t\tmanager.add(new Separator());\n//\t\tmanager.add(actionReloadAndValidate);\n\t\tmanager.add(new Separator());\n\t\tmanager.add(actionValidate);\n\t\tmanager.add(actionSimulate);\n\t\tmanager.add(new Separator());\n\t\tmanager.add(actionCollapseAll);\n\t\tmanager.add(actionLinkWithEditor);\n\t\t\n\t\tmanager.add(new Separator());\n\t\tmanager.add(actionShowAboutInfo);\n\t\t\n\t\tmanager.add(new Separator());\n\t\tdrillDownAdapter.addNavigationActions(manager);\n\t}",
"protected MenuBarView createMenuBuilder(Main mainFrameUtil) {\r\n return new MenuBarView(mainFrameUtil);\r\n }",
"private void setToolBarInfo() {\n mToolbar = (Toolbar)findViewById(R.id.toolbar);\n mToolbar.setTitle(\"Chatアプリ\");\n mToolbar.setTitleTextColor(-1);\n mToolbar.setNavigationIcon(R.drawable.common_google_signin_btn_icon_light);\n //setActionBar(toolbar);\n mToolbar.inflateMenu(R.menu.main_menu);\n mToolbar.setOnMenuItemClickListener(new Toolbar.OnMenuItemClickListener() {\n @Override\n public boolean onMenuItemClick(MenuItem item) {\n // メニューのクリック処理\n switch (item.getItemId()) {\n case R.id.sign_out_menu:\n mFirebaseAuth.signOut();\n Intent intent = new Intent();\n intent.setClassName(D.packageRoot, D.packageRoot + \".MainActivity\");\n startActivity(intent);\n return true;\n }\n return true;\n }\n });\n //setSupportActionBar(toolbar);\n }",
"public GWTJahiaToolbarItem getGwtToolbarItem() {\r\n return gwtToolbarItem;\r\n }",
"public JComponent getToolbarComponent()\n {\n return _box;\n }",
"protected void createContents() {\n setText(BUNDLE.getString(\"TranslationManagerShell.Application.Name\"));\n setSize(599, 505);\n\n final Composite cmpMain = new Composite(this, SWT.NONE);\n cmpMain.setLayout(new FormLayout());\n\n final Composite cmpControls = new Composite(cmpMain, SWT.NONE);\n final FormData fd_cmpControls = new FormData();\n fd_cmpControls.right = new FormAttachment(100, -5);\n fd_cmpControls.top = new FormAttachment(0, 5);\n fd_cmpControls.left = new FormAttachment(0, 5);\n cmpControls.setLayoutData(fd_cmpControls);\n cmpControls.setLayout(new FormLayout());\n\n final ToolBar modifyToolBar = new ToolBar(cmpControls, SWT.FLAT);\n\n tiSave = new ToolItem(modifyToolBar, SWT.PUSH);\n tiSave.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Save\"));\n tiSave.setEnabled(false);\n tiSave.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_save.gif\"));\n tiSave.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_save.gif\"));\n\n tiUndo = new ToolItem(modifyToolBar, SWT.PUSH);\n tiUndo.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Undo\"));\n tiUndo.setEnabled(false);\n tiUndo.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_reset.gif\"));\n tiUndo.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_reset.gif\"));\n\n tiDeleteSelected = new ToolItem(modifyToolBar, SWT.PUSH);\n tiDeleteSelected.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_remove.gif\"));\n tiDeleteSelected.setEnabled(false);\n tiDeleteSelected.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Delete\"));\n tiDeleteSelected.setImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/e_remove.gif\"));\n\n txtFilter = new LVSText(cmpControls, SWT.BORDER);\n final FormData fd_txtFilter = new FormData();\n fd_txtFilter.right = new FormAttachment(25, 0);\n fd_txtFilter.top = new FormAttachment(modifyToolBar, 0, SWT.CENTER);\n fd_txtFilter.left = new FormAttachment(modifyToolBar, 25, SWT.RIGHT);\n txtFilter.setLayoutData(fd_txtFilter);\n\n final ToolBar filterToolBar = new ToolBar(cmpControls, SWT.FLAT);\n final FormData fd_filterToolBar = new FormData();\n fd_filterToolBar.top = new FormAttachment(modifyToolBar, 0, SWT.TOP);\n fd_filterToolBar.left = new FormAttachment(txtFilter, 5, SWT.RIGHT);\n filterToolBar.setLayoutData(fd_filterToolBar);\n\n tiFilter = new ToolItem(filterToolBar, SWT.NONE);\n tiFilter.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_find.gif\"));\n tiFilter.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Filter\"));\n\n tiLocale = new ToolItem(filterToolBar, SWT.DROP_DOWN);\n tiLocale.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Locale\"));\n tiLocale.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_globe.png\"));\n\n menuLocale = new Menu(filterToolBar);\n addDropDown(tiLocale, menuLocale);\n\n lblSearchResults = new Label(cmpControls, SWT.NONE);\n lblSearchResults.setVisible(false);\n final FormData fd_lblSearchResults = new FormData();\n fd_lblSearchResults.top = new FormAttachment(filterToolBar, 0, SWT.CENTER);\n fd_lblSearchResults.left = new FormAttachment(filterToolBar, 5, SWT.RIGHT);\n lblSearchResults.setLayoutData(fd_lblSearchResults);\n lblSearchResults.setText(BUNDLE.getString(\"TranslationManagerShell.Label.Results\"));\n\n final ToolBar translateToolBar = new ToolBar(cmpControls, SWT.NONE);\n final FormData fd_translateToolBar = new FormData();\n fd_translateToolBar.top = new FormAttachment(filterToolBar, 0, SWT.TOP);\n fd_translateToolBar.right = new FormAttachment(100, 0);\n translateToolBar.setLayoutData(fd_translateToolBar);\n\n tiDebug = new ToolItem(translateToolBar, SWT.PUSH);\n tiDebug.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Debug\"));\n tiDebug.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/debug.png\"));\n\n new ToolItem(translateToolBar, SWT.SEPARATOR);\n\n tiAddBase = new ToolItem(translateToolBar, SWT.PUSH);\n tiAddBase.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.AddBase\"));\n tiAddBase.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_add.gif\"));\n\n tiTranslate = new ToolItem(translateToolBar, SWT.CHECK);\n tiTranslate.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Translate\"));\n tiTranslate.setImage(SWTResourceManager\n .getImage(TranslationManagerShell.class, \"/images/tools16x16/target.png\"));\n\n cmpTable = new Composite(cmpMain, SWT.NONE);\n cmpTable.setLayout(new FillLayout());\n final FormData fd_cmpTable = new FormData();\n fd_cmpTable.bottom = new FormAttachment(100, -5);\n fd_cmpTable.right = new FormAttachment(cmpControls, 0, SWT.RIGHT);\n fd_cmpTable.left = new FormAttachment(cmpControls, 0, SWT.LEFT);\n fd_cmpTable.top = new FormAttachment(cmpControls, 5, SWT.BOTTOM);\n cmpTable.setLayoutData(fd_cmpTable);\n\n final Menu menu = new Menu(this, SWT.BAR);\n setMenuBar(menu);\n\n final MenuItem menuItemFile = new MenuItem(menu, SWT.CASCADE);\n menuItemFile.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.File\"));\n\n final Menu menuFile = new Menu(menuItemFile);\n menuItemFile.setMenu(menuFile);\n\n menuItemExit = new MenuItem(menuFile, SWT.NONE);\n menuItemExit.setAccelerator(SWT.ALT | SWT.F4);\n menuItemExit.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.File.Exit\"));\n\n final MenuItem menuItemHelp = new MenuItem(menu, SWT.CASCADE);\n menuItemHelp.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help\"));\n\n final Menu menuHelp = new Menu(menuItemHelp);\n menuItemHelp.setMenu(menuHelp);\n\n menuItemDebug = new MenuItem(menuHelp, SWT.NONE);\n menuItemDebug.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help.Debug\"));\n\n new MenuItem(menuHelp, SWT.SEPARATOR);\n\n menuItemAbout = new MenuItem(menuHelp, SWT.NONE);\n menuItemAbout.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help.About\"));\n //\n }",
"private void createCardsEditingItem()\n {\n cardsEditing = new JMenuItem(\"Zobrazení a úprava karet\");\n cardsEditing.setMnemonic('Z');\n cardsEditing.addActionListener(new ActionListener() {\n\n @Override\n public void actionPerformed(ActionEvent e)\n {\n cards.setVisible(true);\n }\n });\n add(cardsEditing);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //noinspection SimplifiableIfStatement\n\n // Add Widget selected from toolbar fragment\n if (id == R.id.action_add) {\n Toast.makeText(getActivity().getApplicationContext(), \"Add Widget Selected!\", Toast.LENGTH_LONG).show();\n }\n\n // Add Widget selected from toolbar fragment\n if (id == R.id.action_edit) {\n Toast.makeText(getActivity().getApplicationContext(), \"Edit Selected!\", Toast.LENGTH_LONG).show();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"public ToolBarManager initTitle(String toolBarTitle,int start,int top,int end,int bottom){\n if(toolBarTitle!=null){\n mToolbar.setTitle(toolBarTitle);\n mToolbar.setTitleMargin(start,top,end,bottom);\n }\n return instance;\n }",
"public CoeusToolBarFactory(CoeusAppletMDIForm mdiForm) {\r\n super();\r\n this.mdiForm = mdiForm;\r\n coeusMessageResources = CoeusMessageResources.getInstance();\r\n createToolBar();\r\n // rdias UCSD - Coeus personalization impl\r\n//\t AbstractController persnref = AbstractController.getPersonalizationControllerRef();\r\n//\t persnref.customize_module(null, getToolBar(),this, \"MAINFRAME\");\r\n\t //rdias UCSD \r\n }",
"public ToolBar(final List<AbstractAction> theToolActions) {\n super();\n myToolActions = theToolActions;\n\n setupButtons();\n\n }",
"@Override\n public MToolBar getToolbar()\n {\n return null;\n }",
"private void createOpenButton(final ToolBar bar) {\r\n // image's source:\r\n // https://openclipart.org/detail/119905/load-cedric-bosdonnat-01-by-anonymous\r\n createButton(bar, \"images/load_cedric_bosdonnat_01.png\", \"Open\",\r\n new SelectionOpenListener());\r\n }",
"private static JMenuBar createMenu() {\r\n JMenuBar mb = new JMenuBar();\r\n JMenu menu = new JMenu(\"File\");\r\n JMenuItem item = new JMenuItem(\"Save\");\r\n item.addActionListener((ActionEvent evt) -> {\r\n saveActionPerformed();\r\n });\r\n menu.add(item);\r\n mb.add(menu);\r\n\r\n menu = new JMenu(\"Help\");\r\n item = new JMenuItem(\"Show how-to\");\r\n item.addActionListener((ActionEvent evt) -> {\r\n showHelp();\r\n });\r\n menu.add(item);\r\n\r\n mb.add(menu);\r\n\r\n return mb;\r\n }",
"@Override\r\n\tpublic void ShowToolBar(Context _in_context) {\n\t\tTypeSDKLogger.e( \"ShowToolBar\");\r\n\t}",
"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 JToolBar getToolBar() {\n return myToolBar;\n }",
"public TitleIconItem(){}",
"private void configureToolBar() {\n toolBar = findViewById(R.id.my_first_toolbar);\n setSupportActionBar(toolBar);\n getSupportActionBar().setDisplayShowTitleEnabled(false);\n }",
"private JToolBar createToolBar() {\n JToolBar toolbar = new JToolBar();\n Insets margins = new Insets(0, 0, 0, 0);\n\n ButtonGroup group1 = new ButtonGroup();\n\n ToolBarButton edit = new ToolBarButton(\"images/E.gif\");\n edit.setToolTipText(\"Edit motes\");\n edit.setMargin(margins);\n edit.setActionCommand(\"edit\");\n edit.setSelected(true);\n edit.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent ae) {\n setMode(ADD_MODE);\n add.enable();\n remove.enable();\n auto.enable();\n add.setSelected(true);\n }\n });\n group1.add(edit);\n toolbar.add(edit);\n\n ToolBarButton vis = new ToolBarButton(\"images/V.gif\");\n vis.setToolTipText(\"Visualize mote network\");\n vis.setMargin(margins);\n vis.setActionCommand(\"visualize\");\n vis.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent ae) {\n// AKD setMode(VIZ_MODE);\n add.setSelected(false);\n remove.setSelected(false);\n auto.setSelected(false);\n add.disable();\n remove.disable();\n auto.disable();\n }\n });\n group1.add(vis);\n toolbar.add(vis);\n\n toolbar.addSeparator();\n\n ButtonGroup group2 = new ButtonGroup();\n\n ToolBarButton pan = new ToolBarButton(\"images/P.gif\");\n pan.setToolTipText(\"Pan view\");\n pan.setMargin(margins);\n pan.setActionCommand(\"pan\");\n pan.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent ae) {\n setMode(PAN_MODE);\n }\n });\n group2.add(pan);\n toolbar.add(pan);\n\n add = new ToolBarButton(\"images/A.gif\");\n add.setToolTipText(\"Add mote\");\n add.setMargin(margins);\n add.setActionCommand(\"add\");\n add.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent ae) {\n setMode(ADD_MODE);\n }\n });\n group2.add(add);\n toolbar.add(add);\n\n remove = new ToolBarButton(\"images/R.gif\");\n remove.setToolTipText(\"Remove mote\");\n remove.setMargin(margins);\n remove.setActionCommand(\"pan\");\n remove.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent ae) {\n setMode(REMOVE_MODE);\n }\n });\n group2.add(remove);\n toolbar.add(remove);\n\n auto = new ToolBarButton(\"images/T.gif\");\n auto.setToolTipText(\"Automatic mode\");\n auto.setMargin(margins);\n auto.setActionCommand(\"auto\");\n auto.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent ae) {\n setMode(AUTO_MODE);\n }\n });\n group2.add(auto);\n toolbar.add(auto);\n\n toolbar.setFloatable(true);\n return toolbar;\n }",
"public ToolbarButtonViewBinder() {}",
"private ImageButton generateItemButton(Texture image) {\n\t\tTextureRegion imgRegion = new TextureRegion(image);\n\t\tTextureRegionDrawable imgDraw = new TextureRegionDrawable(imgRegion);\n\t\treturn new ImageButton(imgDraw);\n\t}",
"public Toolbar() {\n setBorder(BorderFactory.createEtchedBorder());\n saveButton = new JButton();\n saveButton.setIcon(createIcon(\"/image/save16.gif\"));\n saveButton.setToolTipText(\"Save\");\n \n refreshButton = new JButton();\n refreshButton.setIcon(createIcon(\"/image/refresh16.gif\"));\n refreshButton.setToolTipText(\"Refresh\");\n\n saveButton.addActionListener(this);\n refreshButton.addActionListener(this);\n\n add(saveButton);\n addSeparator();\n add(refreshButton);\n }"
]
| [
"0.76050127",
"0.69871646",
"0.69554067",
"0.68851686",
"0.66676176",
"0.6637981",
"0.6622059",
"0.6529776",
"0.64822775",
"0.6455589",
"0.64491737",
"0.64394486",
"0.64345956",
"0.6428304",
"0.6379222",
"0.6368298",
"0.6347139",
"0.63421875",
"0.63401055",
"0.63368994",
"0.63279307",
"0.63124317",
"0.6301143",
"0.62979674",
"0.6281271",
"0.6271714",
"0.627044",
"0.62680346",
"0.6231601",
"0.6216708",
"0.6207204",
"0.6151687",
"0.6129162",
"0.6126454",
"0.6122579",
"0.61217976",
"0.61195964",
"0.60821337",
"0.60532457",
"0.6052474",
"0.60522944",
"0.6045445",
"0.60427225",
"0.60212904",
"0.6019923",
"0.60108817",
"0.60039407",
"0.5999003",
"0.59917885",
"0.5979274",
"0.59791815",
"0.59723544",
"0.5961317",
"0.59561425",
"0.5941866",
"0.593781",
"0.5933757",
"0.593347",
"0.59294367",
"0.5908203",
"0.5901061",
"0.589914",
"0.5857752",
"0.5850012",
"0.58495206",
"0.58475953",
"0.5841059",
"0.584102",
"0.58329755",
"0.5829759",
"0.5823611",
"0.5806622",
"0.57967865",
"0.578817",
"0.5772768",
"0.5771853",
"0.57602423",
"0.57594216",
"0.5754999",
"0.5745942",
"0.57448393",
"0.57427263",
"0.57414067",
"0.5724988",
"0.57136285",
"0.5713379",
"0.5705121",
"0.5695851",
"0.56957304",
"0.56854254",
"0.56697285",
"0.5667812",
"0.56605506",
"0.56599724",
"0.5649291",
"0.56418514",
"0.5634257",
"0.5633231",
"0.56103027",
"0.5603098"
]
| 0.7207088 | 1 |
TODO Autogenerated method stub | @Override
public int compareTo(FreqLocKey o)
{
if (this.cityId > o.cityId)
{
return 1;
}
else if (this.cityId < o.cityId)
{
return -1;
}
else
{
if (this.freq > o.freq)
{
return 1;
}
else if (this.freq < o.freq)
{
return -1;
}
else
{
if (this.pci > o.pci)
{
return 1;
}
else if (this.pci < o.pci)
{
return -1;
}
else
{
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 |
Created by Ngoc Vu on 12/18/2017. | public interface IOnClickFilter {
void onClickFilter(String date);
void onClickClearFilter();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void anular() {\n\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\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"private void poetries() {\n\n\t}",
"@Override\n\tpublic void nadar() {\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 protected void getExras() {\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n protected void initialize() \n {\n \n }",
"public void mo4359a() {\n }",
"@Override\n\tprotected void interr() {\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 memoria() {\n \n }",
"@Override\n public void init() {\n }",
"@Override\n void init() {\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\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\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public int describeContents() { return 0; }",
"private void m50366E() {\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 anularFact() {\n\t\t\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 }",
"public void gored() {\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\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\n\tpublic void jugar() {\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\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void init() {\n }",
"protected boolean func_70814_o() { return true; }",
"@Override\n public void init() {}",
"private void init() {\n\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\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\r\n\tpublic void init() {\n\t\t\r\n\t}",
"private void kk12() {\n\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\n public void initialize() { \n }",
"public void mo6081a() {\n }",
"@Override\r\n\tpublic void init() {}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"Petunia() {\r\n\t\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n public void initialize() {\n \n }",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\n\tpublic void afterInit() {\n\t\t\n\t}",
"@Override\n\tpublic void afterInit() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t}",
"@Override\n public int retroceder() {\n return 0;\n }",
"@Override\n public int getSize() {\n return 1;\n }",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}"
]
| [
"0.6164021",
"0.58868957",
"0.5859397",
"0.58492446",
"0.5833453",
"0.5833453",
"0.582324",
"0.5787319",
"0.5785273",
"0.57738215",
"0.5695674",
"0.5694167",
"0.5659513",
"0.5658219",
"0.56442726",
"0.5642893",
"0.5642701",
"0.5641651",
"0.5638759",
"0.56335056",
"0.5630677",
"0.5612526",
"0.56014854",
"0.5586747",
"0.5586389",
"0.55750966",
"0.5574146",
"0.55462575",
"0.55462575",
"0.55462575",
"0.55462575",
"0.55462575",
"0.55462575",
"0.55415213",
"0.5537394",
"0.5532312",
"0.5525092",
"0.5522815",
"0.5522815",
"0.5522815",
"0.5522815",
"0.5522815",
"0.5507767",
"0.549764",
"0.5495814",
"0.54918903",
"0.5487489",
"0.54744434",
"0.5470416",
"0.5470416",
"0.5464115",
"0.54636264",
"0.54636264",
"0.54636264",
"0.54636264",
"0.54636264",
"0.54636264",
"0.54636264",
"0.54562175",
"0.5454176",
"0.5454176",
"0.54492384",
"0.5446626",
"0.5446626",
"0.54399776",
"0.5436328",
"0.5436328",
"0.5436328",
"0.54274565",
"0.5427264",
"0.5422462",
"0.5421616",
"0.54195124",
"0.5418029",
"0.5410081",
"0.5405779",
"0.5400084",
"0.5400084",
"0.5400084",
"0.5382049",
"0.5380057",
"0.5380057",
"0.5380057",
"0.5378185",
"0.53777796",
"0.5374894",
"0.5359131",
"0.5358001",
"0.5355721",
"0.5351297",
"0.5349542",
"0.53483796",
"0.5330308",
"0.53292644",
"0.5326553",
"0.5326553",
"0.53231305",
"0.53216636",
"0.5314586",
"0.5301661",
"0.5292258"
]
| 0.0 | -1 |
/ Showing splash screen with a timer. This will be useful when you want to show case your app logo / company | @Override
public void run() {
if (sharedPreferences.contains("User-id")) {
loginUserId = sharedPreferences.getString("User-id", null);
if (loginUserId.equals("") || loginUserId.equals(null)) {
startActivity(new Intent(SplashScreen.this, LoginActivity.class));
} else {
startActivity(new Intent(SplashScreen.this, HomePageActivity.class));
}
} else {
startActivity(new Intent(SplashScreen.this, LoginActivity.class));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void displaySplashScreen() {\n\t\t// Creates new thread to act as timer.\n\t\tThread logoTimer = new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\n\t\t\t\t\tint logoTimer = 0;\n\t\t\t\t\t// Pauses for SPLASH_TIME amount of time\n\t\t\t\t\twhile (logoTimer < SPLASH_TIME) {\n\t\t\t\t\t\tsleep(100);\n\t\t\t\t\t\tlogoTimer = logoTimer + 100;\n\t\t\t\t\t}\n\t\t\t\t\t// Calls the activity from manifest.xml\n\t\t\t\t\tIntent intent = new Intent(getApplicationContext(),\n\t\t\t\t\t\t\tMenuActivity.class);\n\t\t\t\t\tintent.putExtra(\"connect\", connect);\n\t\t\t\t\tstartActivity(intent);\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} finally {\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t// Starts the thread.\n\t\tlogoTimer.start();\n\t}",
"@Override\r\n public void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n setContentView(R.layout.activity_splash_screen);\r\n StartAnimations();\r\n\r\n new Handler().postDelayed(new Runnable() {\r\n\r\n\r\n @Override\r\n public void run() {\r\n // This method will be executed once the timer is over\r\n Intent i = new Intent(SplashScreen.this, MainActivity.class);\r\n startActivity(i);\r\n finish();\r\n }\r\n }, 5000);\r\n }",
"private void SplashScreen() {\n// if (!mSettings.getBoolean(\"PlayedBefore\", false)) {\n// mSolitaireView.DisplaySplash();\n// }\n splas.setVisibility(View.VISIBLE);\n Handler h = new Handler(Looper.getMainLooper());\n h.postDelayed(new Runnable() {\n @Override\n public void run() {\n splas.setVisibility(View.GONE);\n }\n }, 3000);\n }",
"public void showSplashScreen() {\r\n\r\n JPanel content = (JPanel) getContentPane();\r\n content.setBackground(Color.white);\r\n\r\n // setting the window's properties\r\n \r\n int width = 700;\r\n int height = 438;\r\n Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();\r\n int x = (screen.width - width) / 2;\r\n int y = (screen.height - height) / 2;\r\n setBounds(x, y, width, height);\r\n\r\n // build the splash screen using an image \r\n \r\n JLabel gifImage = new JLabel(new ImageIcon(this.getClass().getResource(\"/splash.gif\")));\r\n content.add(gifImage, BorderLayout.CENTER);\r\n\r\n // display it\r\n setVisible(true);\r\n\r\n new resourceLoader().execute();\r\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_splash);\n ButterKnife.inject(this);\n\n if(getResources().getBoolean(R.bool.isTablet)){\n lyMain.setBackgroundResource(R.drawable.ic_tablet_splash);\n }else {\n lyMain.setBackgroundResource(R.drawable.ic_smatphone_splash);\n }\n\n Thread timerThread = new Thread() {\n public void run() {\n try {\n sleep(3000);\n\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n startActivity(new Intent(SplashActivity.this, ApplicationsGridActivity.class));\n }\n }\n };\n timerThread.start();\n\n }",
"public frmSplashScreen() {\n initComponents();\n this.setLocationRelativeTo(null);\n timer.start();\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_splash_screen);\n\t\tnm1 = (NotificationManager)getSystemService(NOTIFICATION_SERVICE); //Declaracion de notificacion\n\t\t\n\t\tTimerTask task = new TimerTask(){\n\t\t @Override\n\t public void run() {\n\t Intent mainIntent = new Intent().setClass(SplashScreen.this, MainActivity.class);\n\t startActivity(mainIntent);\n\t finish();//Destrucion de la actividad, usuario no tendra oportunidad de verla hasta reiniciar\n\t }\t\t\n\t};\n\tTimer timer = new Timer();\n\ttimer.schedule(task, splashDelay); //Pasando los 6 segundos entramos a la tarea en si\n\tnoti1();\n\t}",
"private void showSplashScreen() {\n splashDialog = new SplashScreenDialog(this);\n splashDialog.show();\n }",
"@Override\n public void showSplash() {\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.splash);\n Thread timerThread = new Thread() {\n public void run() {\n try {\n sleep(3000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n if (user != null) {\n redireccionar();\n }else{\n Intent intent = new Intent(SplashScreen.this, Login.class);\n startActivity(intent);\n }\n\n }\n }\n };\n timerThread.start();\n }",
"@Override\n public void run() {\n // This method will be executed once the timer is over\n // Start your app main activity\n Intent i = new Intent(SplashScreen.this, MainActivity.class);\n startActivity(i);\n\n // close this activity\n finish();\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n //TODO: add any code you want to do while the splash screen is showing before the MainActivity is shown\n\n// try {\n// Thread.sleep(5000);\n// } catch (InterruptedException e) {\n// e.printStackTrace();\n// }\n\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n finish();\n }",
"private static void splashScreen() {\n\t\t\n\t\tString message = \"Welcome to JProject v\"+VERSION+\"\\nby Gabriel Skoropada\";\n\t\t\n\t\tJOptionPane.showMessageDialog(null, message, \"JProject v\"+VERSION, JOptionPane.NO_OPTION, null);\n\t\t\n\t}",
"public static void splashScreen() {\n System.out.println(printLine(\"-\",100));\n System.out.println(\"Welcome to KaviBase\"); // Display the string.\n System.out.println(\"Version \" + getVersion());\n System.out.println(getCopyright());\n System.out.println(\"\\nType \\\"help;\\\" to display supported commands.\");\n System.out.println(\"\\nEvery command should end with semicolon ;\");\n System.out.println(printLine(\"-\",100));\n }",
"public void onCreate(Bundle bundle) {\n super.onCreate(bundle);\n requestWindowFeature(1);\n getWindow().setFlags(1024, 1024);\n setContentView(R.layout.activity_splash_screen);\n new Handler().postDelayed(new Runnable() {\n public void run() {\n SplashScreen.this.startActivity(new Intent(SplashScreen.this, MainActivity.class));\n SplashScreen.this.finish();\n }\n }, 3000);\n }",
"@Override\r\n public void run() {\r\n // This method will be executed once the timer is over\r\n // Start your app main activity\r\n Intent i = new Intent(SplashScreen.this, MainActivity.class);\r\n startActivity(i);\r\n\r\n // close this activity\r\n finish();\r\n }",
"public void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n\r\n // Do not display title bar, this makes the splash screen really full screen\r\n requestWindowFeature(Window.FEATURE_NO_TITLE);\r\n \r\n // Check if we need to display the splash screen. If no, go directly to the main intent\r\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\r\n boolean showscreen = prefs.getBoolean(\"showsplashscreen\", true);\r\n if (! showscreen) {\r\n \t gotoMainIntent();\r\n \t return;\r\n }\r\n \r\n\r\n // Set the layout\r\n setContentView(R.layout.splash);\r\n\r\n // This will run after a specified time (SPLASH_DISPLAY_LENGHT milliseconds)\r\n new Handler().postDelayed(new Runnable(){\r\n public void run() {\r\n \t gotoMainIntent();\r\n }\r\n }, SPLASH_DISPLAY_LENGHT);\r\n }",
"public static void splashScreen() {\n System.out.println(line(\"-\", 80));\n System.out.println(\"Welcome to DavisBaseLite\"); // Display the string.\n System.out.println(\"DavisBaseLite Version \" + getVersion());\n System.out.println(getCopyright());\n System.out.println(\"\\nType \\\"help;\\\" to display supported commands.\");\n System.out.println(line(\"-\", 80));\n }",
"public SplashScreen(String image, int showTime)\r\n {\r\n\tlogo = new ImageIcon(image);\r\n\r\n\tContainer splashPanel = getContentPane();\r\n\tsplashPanel.setLayout(new BorderLayout());\r\n\tBorder bd1 = BorderFactory.createBevelBorder(BevelBorder.RAISED);\r\n\tBorder bd2 = BorderFactory.createEtchedBorder();\r\n\tBorder bd3 = BorderFactory.createCompoundBorder(bd1, bd2);\r\n\t((JPanel) splashPanel).setBorder(bd3);\r\n\r\n\tsplashPanel.add(\"Center\", new JLabel(logo, JLabel.CENTER));\r\n\r\n\tsetUndecorated(true);\r\n\tshowFor(showTime);\r\n }",
"private void splashScreen() {\r\n\t\t// Clear the screen, reset the level, and display the legend\r\n\t\tclear();\r\n\t\tdisplay.setLegend(\"Asteroids\");\r\n\r\n\t\t// Place four asteroids near the corners of the screen.\r\n\t\tplaceAsteroids();\r\n\t}",
"private void showSplash() {\n \t\tthis.splashInfoContainer.setVisibility( View.VISIBLE );\n \t}",
"@Override\n public void onCreate(Bundle icicle) {\n super.onCreate(icicle);\n setContentView(R.layout.activity_splash_screen);\n\n intent = new Intent(this, MainActivity.class);\n\n\n new Handler().postDelayed(new Runnable(){\n @Override\n public void run() {\n\n //Start MainActivity\n startActivity(intent);\n finish();\n }\n }, SPLASH_DISPLAY_LENGTH);\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);\n }\n super.onCreate(savedInstanceState);\n setContentView(R.layout.helal_haram_splash);\n\n initViews();\n alphaAnimation(img);\n\n\n // splash efect kodu\n /* Thread timerThread = new Thread(){\n public void run(){\n try{\n sleep(1200);\n }catch(InterruptedException e){\n e.printStackTrace();\n }finally{\n\n Intent intent = new Intent(Splash.this, MainActivity.class);\n startActivity(intent);\n\n }\n }\n };\n timerThread.start();\n */\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.splash);\n UserInfoData entry = new UserInfoData(this);\n \t\n \tentry.open();\n \t\n \tfinal String data = entry.getData();\n \t\n \tentry.close();\n Thread splashTimer = new Thread(){\n \tpublic void run(){\n \t\ttry{\n \t\t\tsleep(3000);\n \t\t\t\n \t}\n \t\tcatch(InterruptedException e){\n \t\t\t\n \t\t\te.printStackTrace();\n \t\t}\n finally{\n \tif (!data.equals(\"\")){\n \t\t\tstartActivity(new Intent (\"com.JacobyApps.android.mainMenu\")); \n \t}\n \t\telse{\n \n startActivity(new Intent (\"android.intent.action.Signup\"));\n \t}\n \tfinish();\n \t \n }\n \t \n \t}\n \t\n };\n splashTimer.start();\n }",
"@Override\n public void run() {\n // This method will be executed once the timer is over\n // Start your app main activity\n Intent i = new Intent(SplashScreen.this, LoginScreen.class);\n i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(i);\n\n // close this activity\n finish();\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_splash__screen);\n\n\n Thread splashTread = new Thread() {\n @Override\n public void run() {\n try {\n int waited = 0;\n while (_active && (waited < _splashTime)) {\n sleep(3000);\n if (_active) {\n waited += 3000;\n }\n }\n } catch (Exception e) {\n\n } finally {\n\n startActivity(new Intent(Splash_Screen.this,\n MainActivity.class));\n finish();\n }\n };\n };\n splashTread.start();\n\n// Thread thread = new Thread(){\n//\n// @Override\n// public void run() {\n// try {\n// sleep(SPLASH_DISPLAY_LENGTH);\n// Intent intent = new Intent(getApplicationContext(),MainActivity.class);\n// startActivity(intent);\n// finish();\n// } catch (InterruptedException e) {\n// e.printStackTrace();\n// }\n// }\n// };\n//\n// thread.start();\n\n\n }",
"@Override \r\n public void onCreate(Bundle icicle) { \r\n super.onCreate(icicle);\r\n \r\n getWindow().setFormat(PixelFormat.RGBA_8888);\r\n getWindow().addFlags(WindowManager.LayoutParams.FLAG_DITHER);\r\n setContentView(R.layout.splash_activity);\r\n \r\n //Display the current version number \r\n PackageManager pm = getPackageManager(); \r\n try {\r\n \tPackageInfo pi = pm.getPackageInfo(\"org.mems\", 0);\r\n TextView versionNumber = (TextView) findViewById(R.id.versionNumber); \r\n versionNumber.setText(\"Version \" + pi.versionName); \r\n } catch (NameNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n \r\n new Handler().postDelayed(new Runnable() {\r\n public void run() { \r\n \tIntent mainIntent = new Intent(SplashActivity.this, MainActivity.class); \r\n \tSplashActivity.this.startActivity(mainIntent); \r\n \tSplashActivity.this.finish(); \r\n } \r\n }, 2000); //2000 for release \r\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.splash);\n \n mp = MediaPlayer.create(this, R.raw.love_story);\n mp.start();\n \n Thread logoTimer = new Thread(){\n \tpublic void run(){\n \t\ttry{\n \t\t\tint logoTimer = 0;\n \t\t\twhile(logoTimer<5000){\n \t\t\t\tsleep(100);\n \t\t\t\tlogoTimer = logoTimer +100;\n \t\t\t}\n \t\t\tstartActivity(new Intent(\"com.crognar.CLEARSCREEN\"));\n \t\t\t//clearscreen mag anders\n \t\t} \n \t\t\n \t\tcatch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n \t\t\n \t\tfinally{\n \t\t\tfinish();\n \t\t}\n \t}\n };\n logoTimer.start();\n }",
"@Override\n public void onStart() {\n super.onStart();\n waitForSplashAnimation(SPLASH_SCREEN_DELAY);\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.splash);\n\t\tsound = MediaPlayer.create(this,R.raw.sound);\n\t\tsound.start();\n\t\tThread timer = new Thread(){\n\t\t\tpublic void run(){\n\t\t\t\ttry{\n\t\t\t\t\tsleep(6300);\n\t\t\t\t}catch(InterruptedException e){\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}finally{\n\t\t\t\t\tIntent window = new Intent(\"android.intent.action.Menu\");\n\t\t\t\t\tstartActivity(window);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\ttimer.start();\n\t}",
"@Override\n public void onCreate(final Bundle icicle) {\n super.onCreate(icicle);\n setContentView(R.layout.splash_screen);\n\n /* New Handler to start the Menu-Activity\n * and close this Splash-Screen after some seconds.*/\n new Handler().postDelayed(() -> {\n Intent mainIntent = new Intent(SplashScreen.this, MainActivity.class);\n SplashScreen.this.startActivity(mainIntent);\n SplashScreen.this.finish();\n }, SPLASH_DISPLAY_SECONDS * 1000);\n }",
"public void showSplashScreen(View view) {\n // start the splash screen to show information\n Intent intent = new Intent(LoginActivity.this, InformationActivity.class);\n startActivity(intent);\n }",
"public void splash(){\n ImageView splash = (ImageView) findViewById(R.id.mekslogo);\n Animation animation1 =\n AnimationUtils.loadAnimation(getApplicationContext(),\n R.anim.clockwise);\n animation1.setDuration(5000);\n splash.startAnimation(animation1);\n animation1.setAnimationListener(new Animation.AnimationListener() {\n @Override\n public void onAnimationStart(Animation animation) {\n\n }\n\n @Override\n public void onAnimationEnd(Animation animation) {\n // Toast.makeText(getApplicationContext(),\"Animation ended\",Toast.LENGTH_SHORT).show();\n Intent intent=new Intent(MainActivity.this, sign_up.class);\n startActivity(intent);\n }\n\n @Override\n public void onAnimationRepeat(Animation animation) {\n\n }\n });\n }",
"private void showSplash ()\n {\n ResourceBundle resourceBundle = null;\n try\n {\n resourceBundle = ResourceBundle.getBundle(\"splash\", Locale.getDefault());\n }\n catch (MissingResourceException ignored)\n {\n System.out.println(\"Info: file splash.properties not found in resources root directory.\");\n }\n\n FXMLLoader fxmlLoader = new FXMLLoader();\n if (resourceBundle != null)\n {\n fxmlLoader.setResources(resourceBundle);\n }\n try\n {\n primaryStage.setScene(new Scene(fxmlLoader.load(getClass().getResourceAsStream(\"/splash.fxml\"))));\n primaryStage.initStyle(StageStyle.UNDECORATED);\n primaryStage.centerOnScreen();\n primaryStage.show();\n }\n catch (NullPointerException ignored)\n {\n System.out.println(\"Info: file splash.fxml not found in resources root directory.\");\n }\n catch (Exception ex)\n {\n ex.printStackTrace();\n }\n }",
"@Override\n\tpublic void init() throws Exception {\n\t\ttry {\n\t\t\tThread.sleep(SPLASH_SCREEN_TIMER);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t}",
"@Override\n public void run() {\n // This method will be executed once the timer is over\n // Start your app main activity\n checkMainSetupCompletion();\n Intent i;\n if(isPermanentlySkipped == 1 || isFacebookLoggedIn == 1 )\n i = new Intent(SplashScreen.this, menuActivity.class);\n else\n i = new Intent(SplashScreen.this, MainActivity.class);\n startActivity(i);\n // close this activity\n finish();\n }",
"public static void hideSplashScreen() {//todo: is this useful ?????.....\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n if (splashScreen != null) {\n splashScreen.setVisible(false);\n splashScreen.dispose();\n }\n }\n });\n }",
"@Override\n public void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.splash);\n\n }",
"public void showFor(int showTime)\r\n {\r\n\tsetSize(logo.getIconWidth(), logo.getIconHeight());\r\n\r\n\tDisplayMode screenDisp = getGraphicsConfiguration().getDevice().getDisplayMode();\r\n\tsetLocation((screenDisp.getWidth()/2)-getSize().width/2, (screenDisp.getHeight()/2)-getSize().height/2);\r\n\r\n\tsetVisible(true);\r\n\ttry\r\n\t {\r\n\t\tThread.sleep(showTime);\r\n\t } \r\n\tcatch(InterruptedException e) {}\r\n\tsetVisible(false);\r\n }",
"private void goToMainScreen() {\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent mainIntent;\n\n MainActivity act = new MainActivity();\n Intent intent = new Intent(getApplication(), MainActivity.class);\n startActivity(intent);\n finish();\n }\n }, SPLASH_DISPLAY_LENGHT);\n }",
"@Override\n public void onCreate(Bundle icicle) {\n super.onCreate(icicle);\n\t\t/* layout splashscreen dengan background gambar */\n setContentView(R.layout.activity_spalsh);\n\t/* handler untuk menjalankan splashscreen selama 5 detik lalu\n\t * membuat HomeActivity\n\t */\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent mainIntent = null;\n\n mainIntent = new Intent(SpalshActivity.this,\n HomeActivity.class);\n\n SpalshActivity.this.startActivity(mainIntent);\n SpalshActivity.this.finish();\n overridePendingTransition(R.layout.fadein,R.layout.fadeout);\n\n\n }\n }, SPLASH_DISPLAY_LENGHT);\n }",
"private static void hideSplashScreen() {\n if (splash != null) {\n splash.dispose();\n splash = null;\n }\n }",
"public void run() {\n Intent i = new Intent(activity_splash.this, MainActivity.class);\r\n startActivity(i); // menghubungkan activity splashscren ke xml\r\n //jeda selesai Splashscreen\r\n this.finish();\r\n }",
"public void run(){\r\n try{\r\n \tsleep(DURACION_SPLASH);\r\n }catch(InterruptedException e){\r\n //Si no puedo ejecutar el sleep muestro el error\r\n e.printStackTrace();\r\n }finally{\r\n //Llamo a la nueva actividad\r\n Intent intent = new Intent(SplashScreenActivity.this, MainActivity.class);\r\n \tstartActivity(intent);\r\n \tfinish();\r\n } \r\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.logo_show);\n\t\tnew Thread(new Runnable() { \n @Override\n public void run() {\n // TODO Auto-generated method stub\n try {\n Thread.sleep(2000);\n Intent i = new Intent(ScreenLogo.this, MusicProject.class);\n startActivity(i);\n ScreenLogo.this.finish();\n //handler.sendMessage(handler.obtainMessage(1));\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }).start();\n\t}",
"@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tgetWindow().requestFeature(Window.FEATURE_NO_TITLE);\r\n\r\n\t\t/** Making this activity, full screen */\r\n\t\tgetWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,\r\n\t\t\t\tWindowManager.LayoutParams.FLAG_FULLSCREEN);\r\n\t\tsetContentView(R.layout.activity_splashscreen);\r\n\t\tCountDown _tik;\r\n\t\t_tik = new CountDown(2000, 2000, this, MainActivity.class);// It delay the screen for 2.5 second and after that switch to YourNextActivity\r\n\t\t_tik.start();\r\n\r\n\t\tinitTypeface();\r\n\r\n\t}",
"@Override\n public void run() {\n\n\n if(sessionManager.isLoggedIn()){\n\n // This method will be executed once the timer is over\n // Start your app main activity\n mDilatingDotsProgressBar.hideNow();\n Intent i = new Intent(SplashActivity.this, MainActivity.class);\n startActivity(i);\n\n }else{\n\n // This method will be executed once the timer is over\n // Start your app main activity\n mDilatingDotsProgressBar.hideNow();\n Intent i = new Intent(SplashActivity.this, LoginActivity1.class);\n startActivity(i);\n }\n\n\n\n\n }",
"public SplashScreen() {\r\n instance = this;\r\n\r\n width = 600;\r\n height = 600;\r\n\r\n icon = \"graphics/application/icon_96.png\";\r\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_splash_screen);\n\n pref = getApplicationContext().getSharedPreferences(AppConstants.mypreference, Context.MODE_PRIVATE);\n\n\n // ************************** SCREEN DISPLAY FOR SOMETIMES ******************************************\n\n final int welcomeScreenDisplay = 1500;\n /** create a thread to show splash up to splash time */\n Thread welcomeThread = new Thread()\n {\n int wait = 0;\n\n @Override\n public void run()\n {\n try\n {\n super.run();\n /**\n * use while to get the splash time. Use sleep() to increase\n * the wait variable for every 100L.\n */\n while (wait < welcomeScreenDisplay)\n {\n sleep(100);\n wait += 100;\n }\n }\n catch (Exception e) {\n System.out.println(\"EXC=\" + e);\n }\n finally {\n /**\n * Called after splash times up. Do some action after splash\n * times up. Here we moved to another main activity class\n */\n String getStatus=pref.getString(AppConstants.IS_LOGIN, \"null\");\n if(getStatus.equals(\"true\"))\n {\n Intent i=new Intent(getApplicationContext(),WelcomeScreen.class);\n startActivity(i);\n finish();\n\n }else\n {\n //first time\n Intent i=new Intent(getApplicationContext(),LoginScreen.class);\n startActivity(i);\n finish();\n\n }\n\n }\n }\n };\n welcomeThread.start();\n\n }",
"@Override\n public void run() {\n // This method will be executed once the timer is over\n // Start your app main activity\n if (serverUrl != null)\n emerTokenApiCall();\n else {\n Bundle bndlanimation = ActivityOptions.makeCustomAnimation(SplashScreenActivity.this, R.anim.anim_out, R.anim.anim_in).toBundle();\n Intent i = new Intent(SplashScreenActivity.this, CompanyDomainActivity.class);\n startActivity(i, bndlanimation);\n SplashScreenActivity.this.finish();\n }\n\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n makeActivityFullScreen();\n setContentView(R.layout.activity_splash);\n }",
"@Override\n public void onCreate(Bundle bundle) {\n super.onCreate(bundle);\n //Assign the splashscreen_activity_main layout to the SplashScreenActivity\n setContentView(R.layout.splashscreen_activity_main);\n\n /* New Handler to start the Menu-Activity\n * and close this Splash-Screen after some seconds.*/\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n /* Create an Intent that will start the Menu-Activity. */\n Intent mainIntent = new Intent(SplashscreenActivity.this, MainActivity.class);\n SplashscreenActivity.this.startActivity(mainIntent);\n //We call finish() function to prevent user to come back to splashScreen\n SplashscreenActivity.this.finish();\n }\n }, SPLASH_DISPLAY_LENGTH);\n }",
"public static void main(String args[]) \n {\n //declare constant to hold the speed of the loader\n final int LOAD_SPEED = 10;\n //create the new splash screen called mySplash\n TspSplash mySplash = new TspSplash();\n //center splash\n mySplash.setLocationRelativeTo(null);\n //set icon \n mySplash.setIconImage(Toolkit.getDefaultToolkit().getImage\n (\"src/Images/Salesperson.png\")); \n //make splash visible\n mySplash.setVisible(true);\n \n try\n {\n //create a variable which will count loop to 100, incrementing by\n //one until it reaches 100\n for(int loader = 0; loader <= 100; loader++)\n {\n //set speed of counter (miliseconds)\n Thread.sleep(LOAD_SPEED);\n //display the counter in the loading label\n mySplash.loadingJLabel.setText(\"Loading \" \n + Integer.toString(loader) + \"%\");\n //increment the progress bar with the counter\n mySplash.splashJProgressBar.setValue(loader);\n //when the loop gets to 100, close the splash screen\n if (loader == 100)\n {\n //when loader is done, close the splash screen\n mySplash.dispose();\n }\n }\n }\n catch (Exception exp)\n {\n JOptionPane.showMessageDialog(null, \"Loading error--\" \n + \"Cannot load splash\");\n }\n /* Set the Nimbus look and feel */\n //<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">\n /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n */\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(TspGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(TspGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(TspGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(TspGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() \n {\n public void run() \n {\n new TspGUI().setVisible(true);\n }\n });\n }",
"@Override\n\t\t public void run() {\n\t\t \tsetContentView(R.layout.activity_splash);\n\t\t }",
"@Override\r\n\t\t public void run() {\n\t\t Intent i = new Intent(SplashScreen.this, MainMenuActivity.class);\r\n\t\t startActivity(i);\r\n\t\t \r\n\t\t //Menyelesaikan Splashscreen\r\n\t\t finish();\r\n\t\t }",
"private void hideSplash() {\n \t\tthis.splashInfoContainer.startAnimation( this.splashFadeOut );\n \t}",
"public static void main(String[] args) {\n\t\t// Define new Runnable for splash screen execution\n\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\tSplashScreenView splash;\n\t\t\tTimer timer;\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\t// Create splash screen boundary object and set visible\n\t\t\t\t\tsplash = new SplashScreenView();\n\t\t\t\t\tsplash.setVisible(true);\n\n\t\t\t\t\t// Begin timer for 2 seconds to display\n\t\t\t\t\ttimer = new Timer(2000, new ActionListener(){ \n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\t\t// Create event on timer completion that hide the splash screen, and creates\n\t\t\t\t\t\t\t// the Kabasuji and corresponding view for interactions\n\t\t\t\t\t\t\tsplash.setVisible(false);\n\t\t\t\t\t\t\tKabasuji game = new Kabasuji();\n\t\t\t\t\t\t\tLevelSelectorView window = new LevelSelectorView(game);\n\n\t\t\t\t\t\t\t// allow controller to set up GUI based on the levels loaded by 'game'\n\t\t\t\t\t\t\tStartLevelSelectorController selectorController = new StartLevelSelectorController(window, game);\n\t\t\t\t\t\t\tselectorController.process();\n\n\t\t\t\t\t\t\t// show window\n\t\t\t\t\t\t\twindow.setVisible(true);\n\t\t\t\t\t\t\tImageIcon image = new ImageIcon(StartKabasuji.class.getResource(\"/images/heineman.jpg\"));\n\t\t\t\t\t\t\twindow.setIconImage(image.getImage().getScaledInstance(40, 40, 0));\n\t\t\t\t\t\t\tSystem.out.println(image);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t// Start the timer and ensure it only runs once\n\t\t\t\t\ttimer.setRepeats(false);\n\t\t\t\t\ttimer.start();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"@Override\n\t\tpublic void run() {\n\t\t\ttry {\n\t\t\t\tThread.sleep(3000);\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\t\t\tIntent it=new Intent(Splash.this,DashboardActivity.class);\n\t\t\tstartActivity(it);\n\t\t\tfinish();\n\t\t}",
"private void setupSplash() {\n \t\tthis.splashInfoContainer = (LinearLayout) this.findViewById( R.id.edit_gpsfilter_area_splash );\n \n \t\tTextView textView = (TextView) this.splashInfoContainer.findViewById( R.id.edit_gpsfilter_area_splash_text );\n \t\ttextView.setText( Html.fromHtml( this.getString( R.string.edit_gpsfilter_area_splash_text ) ) );\n \n \t\t// Define fade out animation.\n \t\tthis.splashFadeOut = new AlphaAnimation( 1.00f, 0.00f );\n \t\tthis.splashFadeOut.setDuration( SPLASH_FADE_DELAY );\n \t\tthis.splashFadeOut.setAnimationListener( new AnimationListener() {\n \t\t\tpublic void onAnimationStart( Animation animation ) {\n \t\t\t}\n \n \t\t\tpublic void onAnimationRepeat( Animation animation ) {\n \t\t\t}\n \n \t\t\tpublic void onAnimationEnd( Animation animation ) {\n \t\t\t\tsplashInfoContainer.setVisibility( View.GONE );\n \t\t\t}\n \t\t} );\n \n \t\t// Don't show if not new and we got polygon.\n \t\tif ( !this.isConsideredFresh() ) {\n \t\t\tthis.splashInfoContainer.setVisibility( View.GONE );\n \t\t}\n \t}",
"public ScreenSplash() {\n initComponents();\n this.setCursor(new Cursor(HAND_CURSOR));\n setBackground(new Color(0, 0, 0, 0));\n }",
"public S<T> splash(int time,final String nextActivity){\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n to(nextActivity);\n activity.finish();\n }\n }, time);\n \n\t\treturn this;\n\t}",
"public void initApp() {\n \tint ms = (int) Math.round(1000d / Settings.getFramesPerSecond());\n \ttimer = new Timer(ms, this);\n \ttimer.start();\n setBackground(new Color(35, 35, 35));\n Dimension d = new Dimension(Settings.getGridDimensions());\n d.setSize(d.getWidth() + Settings.getBoxSize() * 4 + 80, d.getHeight());\n setPreferredSize(d);\n setFocusable(true);\n }",
"@Override\n public void run() {\n progressBar.setVisibility(View.GONE);\n // Esse método será executado sempre que o timer acabar\n // E inicia a activity principal\n Intent i = new Intent(SplashAct.this, LogEnter.class);\n startActivity(i);\n\n // Fecha esta activity\n finish();\n }",
"@Override\n public void run() {\n // This method will be executed once the timer is over\n // Start your app main activity\n if (flag == true) {\n Intent intent = new Intent(SplashActivity.this, DashBoard.class);\n finish();\n startActivity(intent);\n }\n else {\n Intent intent1 = new Intent(SplashActivity.this, LoginActivity.class);\n finish();\n startActivity(intent1);\n }\n\n\n // close this activity\n finish();\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.splash);\n\t\tMyThread myThread=new MyThread();\n\t myThread.start();\n\t}",
"public void startSplashGameOver(){\r\n\t\t\r\n\t\tpanel[CurrentPanel].stop();\r\n\t\t\r\n\t\tDriver.panel[CurrentPanel].setVisible(false);\r\n\t\tgame.remove(panel[CurrentPanel] );\r\n\t\t\r\n\t\tCurrentPanel = 0;\r\n\t\t\r\n\t\t\r\n\t\tpanel[CurrentPanel] = new Splash(this);\r\n\t\t\r\n\t\tadd( panel[CurrentPanel] );\r\n\t\tpanel[CurrentPanel].setVisible(true);\r\n\t\tgame.setVisible(true);\r\n\t\t\r\n\t\tpanel[CurrentPanel].start();\r\n\t\t\r\n\t}",
"@Override\n public void run() {\n SplashScreen.this.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n startActivity(new Intent(SplashScreen.this,MainActivity.class));\n finish();\n\n }\n });\n }",
"void setSplashContentView() {\n// verifyUser = PreferenceHelper.isVerifyMail(getContext());\n // user is logged in app and is active.\n view.setSplashViewLayout(R.layout.activity_splash);\n\n }",
"private void waitForSplashAnimation(int duration) {\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n clearAndStartActivity(new Intent(SplashActivity.this, MainMenuActivity.class));\n }\n\n }, duration);\n }",
"@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.splash);\n\n\t\tRunnable showMain = new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tIntent intent = new Intent(SplashActivity.this, KeepErAppyActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tLog.i(Util.TAG, \"SplashActivity.onCreate.run\");\n\t\t\t}\n\t\t};\n\n\t\tView vw = findViewById(R.id.big_beer);\n\t\tvw.postDelayed(showMain, 1000);\n\t\tLog.i(Util.TAG, \"SplashActivity.onCreate\");\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n ImageView image = (ImageView)findViewById(R.id.logo);//logo image\n Animation animation1 =\n AnimationUtils.loadAnimation(getApplicationContext(), R.anim.side_slide); //animation\n image.startAnimation(animation1);\n TextView t = (TextView) findViewById(R.id.textView2);\n t.startAnimation(animation1);\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n\n Intent mySuperIntent = new Intent(MainActivity.this, Main2Activity.class);//link to main activity 2\n startActivity(mySuperIntent);\n finish();\n }\n }, SPLASH_TIME);\n }",
"public Splash() {\n initComponents();\n }",
"public Splash() {\n initComponents();\n }",
"@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// This method will be executed once the timer is over\n\t\t\t\t\t\t// Start your app main activity\n\t\t\t\t\t\tIntent i = new Intent(WelcomeScreen.this,\n\t\t\t\t\t\t\t\tLoginActivity.class);\n\t\t\t\t\t\tstartActivity(i);\n\n\t\t\t\t\t\t// close this activity\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}",
"@Override\n public void onCreate(Bundle icicle) {\n super.onCreate(icicle);\n setContentView(R.layout.sample);\n\n splash = findViewById(R.id.splashscreen);\n\n splash.startAnimation(\n AnimationUtils.loadAnimation(this, R.anim.rotation) );\n\n /* New Handler to start the Menu-Activity\n * and close this Splash-Screen after some seconds.*/\n new Handler().postDelayed(new Runnable(){\n @Override\n public void run() {\n /* Create an Intent that will start the Menu-Activity. */\n Intent mainIntent = new Intent(Sample.this,WebviewActivity.class);\n Sample.this.startActivity(mainIntent);\n Sample.this.finish();\n }\n }, SPLASH_DISPLAY_LENGTH);\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n SplashScreen.show(this); // here\n super.onCreate(savedInstanceState);\n }",
"static void renderSplashFrame(Graphics2D g) {\n\t\tfinal String version = \"Release: 2.1.1 - release date: 2022-07-31\";\r\n\t\tg.setComposite(AlphaComposite.Clear);\r\n\t\tg.fillRect(120, 140, 200, 40);\r\n\t\tg.setPaintMode();\r\n\t\tg.setColor(Color.BLACK);\r\n\t\tg.drawString(\"Loading \" + version + \"...\", 120, 350);\r\n\t}",
"public static void showSplashScreen(Class cls, String propFile) {//todo: is this useful ?????.....\n final Class appClass = cls;\n final String resPropFile = propFile;\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n if (splashScreen == null) {\n String filename = \"\";\n String resFile = CoreUtil.getPathOnly(appClass.getName(), true) + \"resources.\" + resPropFile;\n try {\n filename = ResourceBundle.getBundle(resFile)\n .getString(\"image.SplashScreenImage\");\n } catch (MissingResourceException e) {\n System.out.println(\"java.util.MissingResourceException: Couldn't find value for: image.SplashScreenImage\");\n }\n String path = \"resources/images/\" + filename;\n ImageIcon img = new ImageIcon(appClass.getResource(path));\n splashScreen = new JWindow();\n splashLabel = new JLabel(img);\n splashScreen.getContentPane().add(splashLabel);\n splashScreen.pack();\n }\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n splashScreen.setLocation(screenSize.width / 2 - splashScreen.getSize().width / 2,\n screenSize.height / 2 - splashScreen.getSize().height / 2);\n splashScreen.setVisible(true);\n }\n });\n }",
"@Override\n\tpublic Screen getStartScreen() {\n\t\treturn new Splash(this);\n\t}",
"public void start() {\n\t\tFile splashFile = new File(\"Splash\", \"title\");\r\n\t\tsplashString = TextFileReader.getContents(splashFile);\r\n\t\tsendOutput(splashString);\r\n\t\tsendOutput(\"Version \" + versionNum);\r\n\t\tsendOutput(\"by \" + author);\r\n\t\tprintMenu();\r\n\t}",
"@Override\n public void onCreate(Bundle icicle) {\n super.onCreate(icicle);\n setContentView(R.layout.splashscreen);\n ((LinearLayout)findViewById(R.id.bgsplashid)).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent mainIntent = new Intent(splash.this,firstAct.class);\n isClicked = true;\n splash.this.startActivity(mainIntent);\n splash.this.finish();\n }\n });\n\n /* New Handler to start the Menu-Activity\n * and close this Splash-Screen after some seconds.*/\n new Handler().postDelayed(new Runnable(){\n @Override\n public void run() {\n /* Create an Intent that will start the Menu-Activity. */\n if(!isClicked) {\n Intent mainIntent = new Intent(splash.this, firstAct.class);\n splash.this.startActivity(mainIntent);\n splash.this.finish();\n }\n }\n }, SPLASH_DISPLAY_LENGTH);\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n SplashScreenBuilder.getInstance(this)\n .setVideo(R.raw.splash_animation)\n .setImage(R.drawable.app_icon)\n .enableSkipOnTap(false)\n .show();\n\n Button restart_app = findViewById(R.id.restart_app);\n restart_app.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n // Restart app\n Intent i = getBaseContext().getPackageManager().getLaunchIntentForPackage(getBaseContext().getPackageName());\n i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(i);\n overridePendingTransition(0, 0);\n finish();\n }\n });\n }",
"@Override\n\t\t\t\t\tpublic boolean act(float delta) {\n\t\t\t\t\t\tchangeScreen(SplashScreen.class);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}",
"@Override\n public void run() {\n startActivity(new Intent(SplashActivity.this, MainActivity3.class));\n //Close the current welcome page after the jump\n SplashActivity.this.finish();\n }",
"public void run() {\n Intent mainIntent = new Intent(SplashActivity.this, MainActivity.class);\n startActivity(mainIntent);\n finish();\n }",
"private void removeSplashScreen(final boolean z) {\n this.cordova.getActivity().runOnUiThread(new Runnable() {\n /* class org.apache.cordova.splashscreen.SplashScreen.AnonymousClass4 */\n\n public void run() {\n if (SplashScreen.splashDialog != null && SplashScreen.this.splashImageView != null && SplashScreen.splashDialog.isShowing()) {\n int fadeDuration = SplashScreen.this.getFadeDuration();\n if (fadeDuration <= 0 || z) {\n SplashScreen.this.spinnerStop();\n SplashScreen.splashDialog.dismiss();\n Dialog unused = SplashScreen.splashDialog = null;\n SplashScreen.this.splashImageView = null;\n return;\n }\n AlphaAnimation alphaAnimation = new AlphaAnimation(1.0f, 0.0f);\n alphaAnimation.setInterpolator(new DecelerateInterpolator());\n alphaAnimation.setDuration((long) fadeDuration);\n SplashScreen.this.splashImageView.setAnimation(alphaAnimation);\n SplashScreen.this.splashImageView.startAnimation(alphaAnimation);\n alphaAnimation.setAnimationListener(new Animation.AnimationListener() {\n /* class org.apache.cordova.splashscreen.SplashScreen.AnonymousClass4.AnonymousClass1 */\n\n public void onAnimationRepeat(Animation animation) {\n }\n\n public void onAnimationStart(Animation animation) {\n SplashScreen.this.spinnerStop();\n }\n\n public void onAnimationEnd(Animation animation) {\n if (SplashScreen.splashDialog != null && SplashScreen.this.splashImageView != null && SplashScreen.splashDialog.isShowing()) {\n SplashScreen.splashDialog.dismiss();\n Dialog unused = SplashScreen.splashDialog = null;\n SplashScreen.this.splashImageView = null;\n }\n }\n });\n }\n }\n });\n }",
"public void onCreate(Bundle savedInstanceState) {\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);\n\n super.onCreate(savedInstanceState);\n\n setContentView(R.layout.activity_home_page);\n\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n\n ActionBar actionBar = getSupportActionBar();\n if (actionBar != null) {\n actionBar.hide();\n }\n\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent startActivityIntent = new Intent(SplashActivity.this, HomePage.class);\n startActivity(startActivityIntent);\n SplashActivity.this.finish();\n }\n }\n , SPLASH_DISPLAY_LENGTH);\n }",
"public SplashScreen getSplashScreen() {\n if (splashScreen == null) {//GEN-END:|26-getter|0|26-preInit\n // write pre-init user code here\n splashScreen = new SplashScreen(getDisplay());//GEN-BEGIN:|26-getter|1|26-postInit\n splashScreen.setTitle(\"splashScreen\");\n splashScreen.setCommandListener(this);\n splashScreen.setText(\"Who is Java`s mascote?\");//GEN-END:|26-getter|1|26-postInit\n // write post-init user code here\n }//GEN-BEGIN:|26-getter|2|\n return splashScreen;\n }",
"public void showTimer(){\n mTimerProgressBar.setVisibility(View.VISIBLE);\n mTimerText.setVisibility(View.VISIBLE);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_splash_screen);\n\n SharedPreferences sp = getSharedPreferences(FrozenBubble.PREFS_NAME,\n Context.MODE_PRIVATE);\n boolean showSplashScreen = sp.getBoolean(\"showSplashScreen\", true);\n if ( showSplashScreen )\n {\n SharedPreferences.Editor editor = sp.edit();\n editor.putBoolean(\"showSplashScreen\", false);\n editor.commit();\n }\n else\n {\n startFrozenBubble();\n return;\n }\n\n // thread for displaying the SplashScreen\n splashThread = new Thread()\n {\n @Override\n public void run()\n {\n try\n {\n synchronized(this)\n {\n //\n // TODO: The splash screen waits before launching\n // the game activity. Change this so that\n // the game activity is started immediately,\n // and notifies the splash screen activity\n // when it is done loading saved state data\n // and preferences, so the splash screen\n // functions as a distraction from game\n // loading latency.\n //\n //\n wait(_splashTime); //wait 3 seconds\n }\n } catch(InterruptedException e) {}\n finally\n {\n startFrozenBubble();\n }\n }\n };\n\n splashThread.start();\n }",
"@Override\r\n protected void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n setContentView(R.layout.activity_splash);\r\n\r\n new Handler().postDelayed(new Runnable(){\r\n @Override\r\n public void run() {\r\n\r\n //check whether user has already logged in\r\n SharedPreferences pref = getSharedPreferences(\"ActivityPREF\", Context.MODE_PRIVATE);\r\n\r\n //if user has logged in\r\n if (pref.getBoolean(\"activity_executed\", false)) {\r\n\r\n String bus_or_pas = pref.getString(\"bus_or_passenger\",\"bus\");\r\n\r\n switch (bus_or_pas){\r\n //if user has logged as a bus\r\n case(\"bus\"):{\r\n Intent intent = new Intent(SplashActivity.this, BusMapsActivity.class);\r\n startActivity(intent);\r\n finish();\r\n\r\n break;\r\n }\r\n\r\n //if user has logged as passenger\r\n case (\"passenger\"):{\r\n Intent intent = new Intent(SplashActivity.this, NavDrawerActivity.class);\r\n startActivity(intent);\r\n finish();\r\n\r\n break;\r\n }\r\n }\r\n\r\n //if user hasn't logged in\r\n } else {\r\n Intent intent = new Intent(SplashActivity.this, MainActivity.class);\r\n startActivity(intent);\r\n finish();\r\n }\r\n\r\n\r\n }\r\n },SPLASH_TIME_OUT);\r\n\r\n\r\n\r\n }",
"@Override\n public void run() {\n Intent intent = new Intent(SplashScreen.this, Welcome.class);\n startActivity(intent);\n finish();\n }",
"@Override\n public void run() {\n Intent mainIntent = new Intent(SplashscreenActivity.this, MainActivity.class);\n SplashscreenActivity.this.startActivity(mainIntent);\n //We call finish() function to prevent user to come back to splashScreen\n SplashscreenActivity.this.finish();\n }",
"private void initializeSplashScreenCycle()\n\t{\n\t\t// desabilitando os botoes antes de iniciar a animacao da splash screen:\n\t\tUtilidades.Views.disableViews(this.arrViewsBloqueaveis);\n\n\t\tAnimation animLayoutSplitLogo = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.splash_move);\n\t\tAnimation animLayoutContent = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.splash_fade_in);\n\n\t\tanimLayoutContent.setAnimationListener(new AnimationListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void onAnimationStart(Animation animation)\n\t\t\t{\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onAnimationRepeat(Animation animation)\n\t\t\t{\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onAnimationEnd(Animation animation)\n\t\t\t{\n\t\t\t\t// rehabilitando os botoes depois de finalizar a animacao da splash screen:\n\t\t\t\tUtilidades.Views.enableViews(arrViewsBloqueaveis);\n\t\t\t}\n\t\t});\n\n\t\t((RelativeLayout) findViewById(R.id.layout_split_logo)).startAnimation(animLayoutSplitLogo);\n\t\t((RelativeLayout) findViewById(R.id.layout_content)).startAnimation(animLayoutContent);\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n new AddressBookPresenter(this);\n // 去掉标题\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n setContentView(R.layout.act_splash_screen);\n // 闪屏核心代码\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n // TODO Auto-generated method stub\n if (LinphoneManager.getCore().getProxyConfigList().length > 0)\n {\n return;\n }\n Intent intent = new Intent(ActSplashScreen.this,\n LoginPhoneActivity.class);\n // 从启动动画切换到主界面\n startActivity(intent);\n ActSplashScreen.this.finish();// 结束动画\n }\n }, 3000);\n }",
"public void show(int seconds) {\n super.show(seconds);\n }",
"@Override\r\n public void run() {\n Intent i = new Intent(SplashScreen.this, MainActivity.class);\r\n startActivity(i);\r\n finish();\r\n }",
"private void launchHomeScreen(){\n\n prefManager.setFirstTimeLaunch(false);\n Intent i = new Intent(SplashActivity.this, MainActivity.class);\n startActivity(i);\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n super.onCreate(savedInstanceState);\n getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);\n GLSurfaceView view = new GLSurfaceView(this);\n view.setEGLConfigChooser(8, 8, 8, 8, 16, 0); //Transparent background\n view.getHolder().setFormat(PixelFormat.TRANSLUCENT); //Transparent background\n view.setRenderer(new OpenGLRenderer(this));\n setContentView(view);\n //Transition to Landing screen\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n // This app main activity\n Intent i = new Intent(SplashActivity.this, SearchActivity.class);\n startActivity(i);\n finish();\n }\n }, SPLASH_TIME_OUT);\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.splash);\n\t\ttActivityDisplay = (TextView) findViewById(R.id.tView1);\n\t\t//playSong = MediaPlayer.create(Splash.this,R.raw.aakasam);\n\t\tSharedPreferences getPrefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n\tboolean musicPref = getPrefs.getBoolean(\"checkbox\",true);\n\n\tif (musicPref == true)\n\t//playSong.start();\n\t\t;\n\t Thread timer = new Thread (){\n\t\t public void run(){\n\t\t\t try {\n\t\t\t\t sleep(5000);\n\t\t\t } catch (InterruptedException e){\n\t\t\t\t e.printStackTrace();\n\t\t\t } finally {\n\t\t\t\t Intent startAnotherActivity = new Intent(\"android.intent.action.MENU\");\n\t\t\t startActivity(startAnotherActivity);\n\t\t\t }\n\t\t }\n\t\t \n\t };\n\t \n\t timer.start();\n\t\t\n\t\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n SplashScreen.show(this);\n super.onCreate(savedInstanceState);\n }"
]
| [
"0.8441948",
"0.7592386",
"0.758094",
"0.74995446",
"0.7415382",
"0.7305605",
"0.72871166",
"0.72542226",
"0.72480965",
"0.72148776",
"0.72088456",
"0.71703327",
"0.71419084",
"0.71362996",
"0.7089052",
"0.70866483",
"0.70741343",
"0.7045565",
"0.70037585",
"0.699583",
"0.6934537",
"0.6898811",
"0.6781864",
"0.67497563",
"0.6749111",
"0.6715521",
"0.66320837",
"0.6623792",
"0.65873575",
"0.65406877",
"0.65353817",
"0.6474289",
"0.64605737",
"0.64493805",
"0.64412355",
"0.643668",
"0.6433717",
"0.64326656",
"0.6427017",
"0.6423394",
"0.641721",
"0.6412011",
"0.64086884",
"0.6400472",
"0.63984764",
"0.6394483",
"0.638889",
"0.6375295",
"0.6353313",
"0.6335088",
"0.63123935",
"0.6305111",
"0.6304301",
"0.6291522",
"0.6288063",
"0.62866867",
"0.62794197",
"0.62718683",
"0.62636983",
"0.62596637",
"0.62565416",
"0.6252439",
"0.6234933",
"0.62284267",
"0.62065744",
"0.616038",
"0.6118246",
"0.6105816",
"0.60938233",
"0.6092563",
"0.6073057",
"0.60714906",
"0.60714906",
"0.6059343",
"0.60453707",
"0.6038352",
"0.60346764",
"0.60306627",
"0.59807724",
"0.5966563",
"0.59531707",
"0.59375215",
"0.59294266",
"0.592722",
"0.59203726",
"0.5906197",
"0.5896731",
"0.58875865",
"0.5877776",
"0.587106",
"0.58624333",
"0.58520484",
"0.58462304",
"0.5837991",
"0.58354914",
"0.5834992",
"0.5833961",
"0.5833614",
"0.58184713",
"0.5812995",
"0.5808471"
]
| 0.0 | -1 |
Search into the dictionary the key passed in 'key' parameter into the ROOT | @Override
public String getValueFromRootDictionary(final String key) {
// search into the dictionary ROOT section
final Map<String, String> rootDictionary = getVal(MetocsBaseDictionary.ROOT_SECTION_KEY);
if (rootDictionary != null) {
return rootDictionary.get(key);
} else {
if (LOGGER.isErrorEnabled())
LOGGER.error("Unable to find a key named: \'" + key
+ "\' into the dictionary.");
return null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic K lookup(K key) {\n\t\treturn lookup(root, key);\n\t}",
"@Override\n public boolean search(K key) {\n if (rootNode == null)\n return false;\n try {\n return exist(key, rootNode);\n } catch (IllegalArgumentException e) {\n System.out.println(e.getMessage());\n return false;\n }\n }",
"public String search(Integer key) {\n\t\treturn root.search(key);\n\t}",
"public BTreeNode search(long key) {\n\t\treturn searcher(root, key);\n\t}",
"public RBNode<T> search(T key) {\r\n return search1(key);\r\n//\t\treturn search2(root, key); //recursive version\r\n }",
"public void search(int key) {\n beginAnimation();\n queueNodeSelectAnimation(root, \"Start at root\",\n AnimationParameters.ANIM_TIME);\n valueSearch(key, root);\n stopAnimation();\n\n }",
"public V find (K key) throws KeyNotFoundException {\n\t\treturn findKey(root, key);\n\t}",
"public boolean search(String key){\n DataPair dp = getDataPair(key);\n BTNode out=null;\n if (dp != null)\n out = search(dp);\n return out != null;\n }",
"@Override\r\n\tpublic CacheTreeNode searchTreeNode(String key) {\n\t\tassert (StringUtils.isNotEmpty(key));\r\n\t\tCacheTreeNode node = (CacheTreeNode)this.getCacheData(SUPER_ROOT_KEY);\r\n\t\tif(node != null){\r\n\t\t\treturn node.search(key);\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public MyBinaryNode<K> search(K key) {\n\t\t\n\t\treturn searchRecursive(root, key);\n\t}",
"@Override\r\n public Object findElement(Object key) {\r\n\r\n // Search for node possibly containing key\r\n TFNode node = search(root(), key);\r\n \r\n // Note the index of where the key should be\r\n int index = FFGTE(node, key);\r\n\r\n // If the index is greater than the number of items in the node, the key is not in the node\r\n if (index < node.getNumItems()) {\r\n // Look for key in node\r\n if (treeComp.isEqual(node.getItem(index).key(), key)) {\r\n return node.getItem(index);\r\n }\r\n }\r\n\r\n // The search hit a leaf without finding the key\r\n return null;\r\n }",
"private static boolean search(Node root, int key) {\n\t\tif(root == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif(key == root.data) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if(key < root.data ) {\r\n\t\t\t\treturn search(root.left,key);\r\n\t\t\t}\r\n\t\t\telse if(key > root.data) {\r\n\t\t\t\treturn search(root.right,key);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public boolean search(T key) {\r\n\t\tRBNode<T, E> c = root;\r\n\t\twhile (c != nillLeaf) {\r\n\t\t\t// If Node is less than the current Node then go left.\r\n\t\t\tif (key.compareTo(c.uniqueKey) < 0) {\r\n\t\t\t\t// we go left\r\n\t\t\t\tc = c.leftChild;\r\n\t\t\t}\r\n\t\t\t// If Node is bigger than the current Node then go right.\r\n\t\t\telse if (key.compareTo(c.uniqueKey) > 0) {\r\n\t\t\t\t// we go right\r\n\t\t\t\tc = c.rightChild;\r\n\t\t\t}\r\n\t\t\t// Else they are equal\r\n\t\t\telse {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// OtherWise return false, it doesnt exist.\r\n\t\treturn false;\r\n\t}",
"public V search(K key);",
"private TFNode search(TFNode node, Object key) throws TFNodeException {\r\n\r\n // Check for empty node\r\n if (node.getNumItems() == 0) {\r\n throw new TFNodeException(\"Search discovered an empty node\");\r\n }\r\n\r\n int index = FFGTE(node, key);\r\n TFNode child = node.getChild(index);\r\n\r\n // If the node contains they key, return node\r\n if (index < node.getNumItems()) {\r\n if(treeComp.isEqual(node.getItem(index).key(), key)){\r\n return node;\r\n }\r\n }\r\n \r\n // If the node is a leaf, return node\r\n if (child == null) {\r\n return node;\r\n // If neither of the above, keep searching\r\n } else {\r\n return search(child, key);\r\n }\r\n \r\n }",
"public String find(int key) {\n\t\t//YOUR CODE HERE\n\t\tif (root == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn find(key,root);\n\t}",
"public HPTNode<K, V> search(List<K> key) {\n check(key);\n int size = key.size();\n\n // Start at the root, and only search lower in the tree if it is\n // large enough to produce a match.\n HPTNode<K, V> current = root;\n for (int i = 0; i < size; i++) {\n if (current == null || (size - i) > current.maxDepth()) {\n return null;\n }\n current = find(current, i, key.get(i), false);\n }\n if (current == null || current.values == null) {\n return null;\n }\n return current.values.isEmpty() ? null : current;\n }",
"private BTNode search(BTNode btNode, DataPair key) {\n int i =0;\n while (i < btNode.mCurrentKeyNum && key.compareTo(btNode.mKeys[i]) > 0)\n i++;\n\n if (i < btNode.mCurrentKeyNum && key.compareTo(btNode.mKeys[i])==0)\n return btNode;//btNode.mKeys[i];\n if (btNode.mIsLeaf)\n return null;\n return search(btNode.mChildren[i],key);\n }",
"public Node search(K key) {\n\t\tNode currentNode = this.mRoot;\n\t\t// start from the root of the tree that calls the method\n\t\twhile (currentNode != mSentinel && key.compareTo(currentNode.getKey()) != 0) {\n\t\t\t// if the current node is not empty and its key is not equal to the\n\t\t\t// search key\n\t\t\tif (key.compareTo(currentNode.getKey()) < 0) {\n\t\t\t\tcurrentNode = currentNode.getLeftChild();\n\t\t\t\t// go left if the search key is lower\n\t\t\t} else {\n\t\t\t\tcurrentNode = currentNode.getrightChild();\n\t\t\t\t// go right if the search key is higher\n\t\t\t}\n\t\t\t// break the loop if the search key matches the node key\n\t\t}\n\t\tif (currentNode == mSentinel) {\n\t\t\treturn null;\n\t\t\t// if there is not a match return nu;;\n\t\t} else {\n\t\t\treturn currentNode;\n\t\t\t// return the first node with the same key as the search key\n\t\t}\n\t}",
"public OrderedPair search(String key) {\n return getRoot().search(key.toLowerCase());\n }",
"public RBNode<T, E> searchAndRetrieve(T key) {\r\n\t\tRBNode<T, E> c = root;\r\n\t\tRBNode<T, E> p = nillLeaf;\r\n\t\twhile (c != nillLeaf) {\r\n\t\t\t// if when comparing if it hasnt found the key go to the left\r\n\t\t\tif (key.compareTo(c.uniqueKey) < 0) {\r\n\t\t\t\tp = c;\r\n\t\t\t\tc = c.leftChild;\r\n\t\t\t}\r\n\t\t\t// if when comparing if it hasnt found the key go to the right\r\n\t\t\telse if (key.compareTo(c.uniqueKey) > 0) {\r\n\t\t\t\tp = c;\r\n\t\t\t\tc = c.rightChild;\r\n\t\t\t}\r\n\t\t\t// they are equal\r\n\t\t\telse {\r\n\t\t\t\tp = c;\r\n\t\t\t\tc = c.leftChild;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn p;\r\n\t}",
"public Integer search(Integer currentLine, int key) {\r\n\t\t//Key was found or there is not \r\n\t\t//any new Node to search\r\n\t\tif(increaseCompares() && (currentLine==-1 || key==getKey(currentLine))) {\r\n\t\t\treturn currentLine;\r\n\t\t}\r\n\t\t//Get left subtree for searching\t\r\n\t\tif(increaseCompares() && key<getKey(currentLine)) {\r\n\t\t\treturn search(getLeft(currentLine),key);\r\n\t\t}\r\n\t\t//Get right subtree for searching\r\n\t\telse {\r\n\t\t\treturn search(getRight(currentLine),key);\r\n\t\t}\r\n\t\t\r\n\t}",
"public Node search(int key) {\n\t\t\t Node node=root;\n\t while (node!= nil){\n\t if(node.id==key){\n\t \treturn node;\n\t }\n\t else if(node.id<key){\n\t \tnode=node.right;\n\t }\n\t else{\n\t \tnode=node.left;\n\t } \n\t }\n\t //key not found in the tree\n\t return nil;\n\t }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public boolean contains(Key key) {\n return auxContains(root, key);\n }",
"public Entry find(Object key) {\r\n Entry entry_with_key = new Entry();\r\n entry_with_key.key = key; \r\n int comp_hash = compFunction(entry_with_key.key.hashCode());\r\n if (hash_table[comp_hash] == null) {\r\n return null;\r\n } else {\r\n DList searching = hash_table[comp_hash];\r\n for(Object entry: searching){\r\n if(((Entry) entry).key().equals(key)){\r\n return (Entry) entry;\r\n }\r\n }\r\n return null;\r\n \r\n }\r\n\r\n\r\n }"
]
| [
"0.732411",
"0.72647256",
"0.71440285",
"0.7099403",
"0.70838755",
"0.7003468",
"0.69860935",
"0.69286895",
"0.6926768",
"0.69255084",
"0.6903724",
"0.68447334",
"0.68130165",
"0.67621404",
"0.6758053",
"0.67397267",
"0.6735766",
"0.67027956",
"0.66805625",
"0.66738355",
"0.66276014",
"0.6626757",
"0.6586406",
"0.65457916",
"0.65457916",
"0.65457916",
"0.65457916",
"0.65457916",
"0.65457916",
"0.65457916",
"0.65457916",
"0.65457916",
"0.65457916",
"0.65457916",
"0.65457916",
"0.65457916",
"0.65457916",
"0.65457916",
"0.65457916",
"0.65457916",
"0.65457916",
"0.65457916",
"0.65457916",
"0.65457916",
"0.65457916",
"0.65457916",
"0.65457916",
"0.65457916",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.6544438",
"0.65389943",
"0.6518934"
]
| 0.0 | -1 |
Metodo que guarda una imagen en la bade de datos | void save(Images image); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void guardarFoto() {\n if (foto != null && is != null) {\n\n Image foto_Nueva;\n foto_Nueva = foto.getScaledInstance(frmPersona.getLblFoto().getWidth(), frmPersona.getLblFoto().getHeight(), Image.SCALE_SMOOTH);\n frmPersona.getLblFoto().setIcon(new ImageIcon(foto_Nueva));\n cancelarFoto();\n ctrFrmPersona.pasarFoto(is);\n } else {\n JOptionPane.showMessageDialog(vtnWebCam, \"Aun no se a tomado una foto.\");\n }\n\n }",
"private void prepararImagenYStorage() {\n mImageBitmap = null;\n\n //this.capturarFotoButton = (Button) findViewById(R.id.capturarFotoButton);\n// setBtnListenerOrDisable(\n// this.capturarFotoButton,\n// mTakePicSOnClickListener,\n// MediaStore.ACTION_IMAGE_CAPTURE\n// );\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO) {\n mAlbumStorageDirFactory = new FroyoAlbumDirFactory();\n } else {\n mAlbumStorageDirFactory = new BaseAlbumDirFactory();\n }\n }",
"private void pruebaGuardado() {\n try {\n BufferedImage img = new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB);\n Graphics2D g2d = img.createGraphics();\n g2d.setColor(Color.RED);\n g2d.fillRect(25, 25, 50, 50);\n g2d.dispose();\n ImageIO.write(img, \"JPEG\", new File(\"D:\\\\LeapMotion\\\\foo.jpg\"));\n } catch (IOException ex) {\n Logger.getLogger(Nodo.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public void cambiarEstadoImagen(){\n ImageIcon respuesta=new ImageIcon();\n if(oportunidades==0){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado7.jpg\"));\n }\n if(oportunidades==1){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado6.jpg\"));\n }\n if(oportunidades==2){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado5.jpg\"));\n }\n if(oportunidades==3){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado4.jpg\"));\n }\n if(oportunidades==4){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado3.jpg\"));\n }\n if(oportunidades==5){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado2.jpg\"));\n }\n if(oportunidades==6){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado1.jpg\"));\n }\n if(oportunidades==7){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado0.jpg\"));\n }\n this.imgAhorcado=respuesta; \n }",
"public void rellenaImagen()\n {\n rellenaDatos(\"1\",\"Samsung\", \"cv3\", \"blanco\" , \"50\", 1200,2);\n rellenaDatos(\"2\",\"Samsung\", \"cv5\", \"negro\" , \"30\", 600,5);\n }",
"protected void setPic() {\n }",
"public void actualizarImagen() {\n\t\tentidadGrafica.actualizarImagen(this.valor);\n\t}",
"private void change_im_check(boolean boo){\r\n if(boo){ //IMAGEN SI EL MEASURE ES CORRECTO\r\n im_check.setImage(new Image(getClass().getResourceAsStream(\"/Images/img06.png\")));\r\n }else{ //IMAGEN PARA LA BUSQUEDA DE UN MEASURE\r\n im_check.setImage(new Image(getClass().getResourceAsStream(\"/Images/img34.png\")));\r\n }\r\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == CODIGO_DE_SOLICITUD_IMAGEN\n && resultCode == RESULT_OK\n && data!=null\n && data.getData() != null){\n\n RutaArchivoUri = data.getData();\n try {\n //Convertimos a bitmap\n Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(),RutaArchivoUri);\n //seteamos la imagen\n ImagenAgregarSerie.setImageBitmap(bitmap);\n\n }catch (Exception e){\n Toast.makeText(this, \"\"+e.getMessage(), Toast.LENGTH_SHORT).show();\n\n }\n }\n }",
"public ImagenLogica(){\n this.objImagen=new Imagen();\n //Creacion de rutas\n this.creaRutaImgPerfil();\n this.crearRutaImgPublicacion();\n \n }",
"public Image getBassClef();",
"private void setPhotoAttcher() {\n\n }",
"public Coloca_imagen(){\n \n \n }",
"public void setPicture(javax.activation.DataHandler param) {\r\n localPictureTracker = param != null;\r\n\r\n this.localPicture = param;\r\n }",
"private void guardar() {\n\t\t//JFileChooser fglobal = principal.getFglobal();\n\t\tprincipal.getFglobal().setDialogTitle(ic.buscar(38)); // Tag 38\n\n\t\t\tprincipal.getFglobal().setDialogType(JFileChooser.SAVE_DIALOG);\n\n\t\tAccesorio pep = new Accesorio(principal.getFglobal(),t, principal.getIC());\n\t\tprincipal.getFglobal().setAccessory(pep);\n\t\tpep.setProfundidad(true);\n\t\t\n principal.getFglobal().resetChoosableFileFilters();\n \n ExampleFileFilter filtroT = new ExampleFileFilter (\n new String [] {\"tiff\",\n \"tif\",\n },\n ic.buscar(3)); // Tag 3\n \n\n \n\t\t\t\n ExampleFileFilter filtroJ = new ExampleFileFilter (\n new String [] {\"jpeg\",\n \"jpg\"\n },\n ic.buscar(4)); // Tag 4\n principal.getFglobal().addChoosableFileFilter(filtroT);\n principal.getFglobal().addChoosableFileFilter(filtroJ);\n\t\t\n\t\t\n\t\t\n\t\tint retval = principal.getFglobal().showDialog(t, null);\n\t\tif (retval == JFileChooser.APPROVE_OPTION) \n\t\t{\t\t\n\t\t\tFile guardar = principal.getFglobal().getSelectedFile();\n \n\t\t\tif (\tprincipal.getFglobal().getFileFilter().getDescription().equals(filtroJ.getDescription()) )\n\t\t\t{// Guardar como JPEG\n \n\t\t\t\tJAI.create(\"filestore\",imagen_original,guardar.getPath(),\"JPEG\", new JPEGEncodeParam());\n\t\t\t}\n\t\t\telse if (principal.getFglobal().getFileFilter().getDescription().equals(filtroT.getDescription()))\n\t\t\t{// Guardar como TIFF\n\t\t\t\tint profundidad = pep.getEP().getMarcada();\n\t\t\t\t// Cubre todas las posibilidades (¿esto guarda los metadatos?)\n\t\t\t\tTiledImage tiled = null;\n\t\t\t\tif (profundidad != ElegirProfundidad.OCHO)\n\t\t\t\t{\n\t\t\t\t\ttiled = \n ElegirProfundidad.crearProfundidadReducida(\n ipixel_o, \n profundidad, \n imagen_original.getWidth(), \n imagen_original.getHeight());\n\t\t\t\t}\n\n\t\t\t\t//imgGuardar = djai.getSource();\n\t\t\t\tParameterBlock pb = new ParameterBlock();\n\t\t\t\tif (profundidad != ElegirProfundidad.OCHO)\n\t\t\t\t{\n\t\t\t\t\tpb.addSource(tiled);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tpb.addSource(imagen_original);\n\t\t\t\t}\n\t\t\t\tpb.add(guardar);\n\t\t\t\tpb.add(\"TIFF\");\n\t\t\t\tpb.add(false); //UseProperties\n\t\t\t\tpb.add(false); //Transcode\n\t\t\t\tpb.add(true); //VerifyOutput\n\t\t\t\tpb.add(false); //AllowPixelReplacement\n\t\t\t\tpb.add(null); //TileSize\n\t\t\t\tpb.add(streamData);\n\t\t\t\tpb.add(imageData);\n\t \t\t\tJAI.create(\"imagewrite\", pb);\n\t\t\t\t\n\t\t\t\t//JAI.create(\"imagewrite\",tiled,guardar.getPath(),\"TIFF\");\n\t\t\t}\n\t\t\telse\n\t\t\t{// No tiene extensión o es una extensión extraña\n\t\t\t\tJAI.create(\"imagewrite\",imagen_original,guardar.getPath()+\".tif\",\"TIFF\");\n\t\t\t}\n\t\t\t\n\t\t}\t\t\t \n\t\telse \n\t\t{\n\t\t\tdibujarMensajesError(retval);\n\t\t} \n\t\t\n\t\t\n\t}",
"public String getImagen() {\n return imagen;\n }",
"void guardarImagen(BufferedImage bimg1, BufferedImage bimg2, FichaDocente fcdc, TipoHuella tphl)\n\t\t\tthrows IOException, SerialException, SQLException;",
"public void cargarImagenes() {\n try {\n\n variedad = sp.getString(\"variedad\", \"\");\n gDia = sp.getFloat(\"gDia\", 0);\n dia = sp.getInt(\"dia\", 0);\n idVariedad = sp.getLong(\"IdVariedad\", 0);\n idFinca = sp.getLong(\"IdFinca\",0);\n\n\n\n imageAdmin iA = new imageAdmin();\n List<fenologiaTab> fi = forGradoloc(dia, gDia, idVariedad);\n\n path = getExternalFilesDir(null) + File.separator;\n String path2 = \"/storage/emulated/0/Pictures/fenologias/\"+idFinca+\"/\";\n\n iA.getImage(path2,jpgView1, idVariedad, fi.get(0).getImagen());\n datos(txt1, fi.get(0).getDiametro_boton(), fi.get(0).getLargo_boton(), fi.get(0).getGrados_dia(), fi.get(0).getImagen());\n\n iA.getImage(path2,jpgView2, idVariedad, fi.get(1).getImagen());\n datos(txt2, fi.get(1).getDiametro_boton(), fi.get(1).getLargo_boton(), fi.get(1).getGrados_dia(), fi.get(1).getImagen());\n\n iA.getImage(path2,jpgView3, idVariedad, fi.get(2).getImagen());\n datos(txt3, fi.get(2).getDiametro_boton(), fi.get(2).getLargo_boton(), fi.get(2).getGrados_dia(), fi.get(2).getImagen());\n\n iA.getImage(path2,jpgView4, idVariedad, fi.get(3).getImagen());\n datos(txt4, fi.get(3).getDiametro_boton(), fi.get(3).getLargo_boton(), fi.get(3).getGrados_dia(), fi.get(3).getImagen());\n } catch (Exception e) {\n Toast.makeText(getApplicationContext(), \"Error \\n\" + e, Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n //O sea que, la accion que ejecuta el usuario es igual a seleccionar una imagen de la galeria\n // Y \"&&\" que la seleccion de la imagen se hizo bien\n if (requestCode == CODIGO_GALERIA && resultCode == RESULT_OK);\n try {\n //Esto nos va transformar la URI en este archivo que esta aqui colocado.\n ArchivoImagen = UtilidadFile.from(this,data.getData());\n //Para que la imagen cargue en uno de los recuadros de la interfaz grafica se hara\n //esta implementacion en la cual recibe la ruta de la imagen.\n imgpost1.setImageBitmap(BitmapFactory.decodeFile(ArchivoImagen.getAbsolutePath()));\n }catch (Exception ex){\n Log.d(\"ERROR\", \"Ha ocurrido un error \"+ ex.getMessage());\n }\n }",
"public void camara(){\n Intent fotoPick = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n String fecha = new SimpleDateFormat(\"yyyy_MM_dd_HH_mm_ss\").format(new Date());\n Uri uriSavedImage=Uri.fromFile(new File(getExternalFilesDir(Environment.DIRECTORY_DCIM),\"inmueble_\"+id+\"_\"+fecha+\".jpg\"));\n fotoPick.putExtra(MediaStore.EXTRA_OUTPUT, uriSavedImage);\n startActivityForResult(fotoPick,TAKE_PICTURE);\n\n }",
"public void cambiarImagenGrande(ImagenTemp it) {\n\t\t\n\t\t//TODO automatizar haciendo que el método directamente coloque la imagen escalada en el panel?\n\t\tImage imgtemp = VistaPrincipal.ponerImagenEscalada(it.getbImagen(), panelImagenGrande);\n\t\tlabelImagenGrande.setIcon(new ImageIcon(imgtemp));\n\t\tlabelImagenGrande.setBounds((int)(((float)panelImagenGrande.getWidth()/2) - ((float)imgtemp.getWidth(null))/((float)2)), (int)(((float)panelImagenGrande.getHeight()/2) - ((float)imgtemp.getHeight(null))/((float)2)),imgtemp.getWidth(null), imgtemp.getHeight(null));\n\t\t\n\t\t\n\t\t//Se rellenan los datos de la imagen seleccionada\n\t\tlabelNombre.setText(it.getNombre()+it.getExtension());\n\t\t\n\t\tLocalDate localDate = LocalDate.ofEpochDay(it.getFecha()/(1000*60*60*24));//TODO llevar esto a un método estático de VistaPrincipal si se repite\n\t\tlabelFecha.setText(localDate.getDayOfMonth() + \"/\" + localDate.getMonthValue() + \"/\" + localDate.getYear());\n\t\t\n\t\tlabelResolucion.setText(it.getbImagen().getWidth() + \" x \" + it.getbImagen().getHeight());\n\t\t\n\t\tString peso = it.getImagen().length()/1024 < 1000 ? (float)(it.getImagen().length()/1024) + \" kB\" : (int)(it.getImagen().length()/(1024*1024)) + \" MB\";\n\t\tlabelPeso.setText(peso);\n\t\t\n\t\t\n\t\t//Se rellenan las etiquetas\n\t\tpanelImagenEtiquetas.removeAll();\n\t\tfor(Etiquetas e : it.getArrayEtiquetas()) panelImagenEtiquetas.add(e);\n\t\tresultadosEste.revalidate();\n\t\tresultadosEste.repaint();\n\t\t\n\t}",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n switch (requestCode) {\n case SELECT_PHOTO:\n if (resultCode == RESULT_OK) {\n // imABoolean=true;\n try {\n filePath = data.getData();\n bitmap = MediaStore.Images.Media.getBitmap(getActivity().getContentResolver(), filePath);\n\n logo.setImageBitmap(bitmap);\n\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n break;\n }\n }\n\n\n }",
"private void reanderImage(ImageData data) {\n \n }",
"public void pone_imagen(Image imagen) {\n if (imagen != null) {\n this.imagen = imagen;\n } else {\n this.imagen = null;\n }\n repaint();\n }",
"@Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n long imagename = System.currentTimeMillis();\n params.put(\"pic\", new DataPart(imagename + \".jpg\", getFileDataFromDrawable(bitmap)));\n return params;\n }",
"public void borra() {\n dib.borra();\n dib.dibujaImagen(limiteX-60,limiteY-60,\"tierra.png\");\n dib.pinta(); \n }",
"static void processPicture(byte[][] img) {\n\t\tcontrastImage(img);\n\t\t//generateDebugImage(img);\n\t\t\n\t\t\n\t\tPoint[] ergs = raster(img);\n\t\tprintPoints(ergs);\n\t\tergs = Cluster.cluster(ergs);\n\t\tprintPoints(ergs);\n\t\tBlume[] blumen = Radiuserkennung.erkennen(img, ergs);\n\t\t\n\t\t//Blumen veröffentlichen!\n\t\tDaten.setNewBlumen(blumen);\n\t\t\n\t\tprintBlumen(blumen);\n\t}",
"private void putProfPic(Blob gbPhoto) throws SQLException, FileNotFoundException, IOException {\n if(gbPhoto == null){\n ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();\n File file = new File(externalContext.getRealPath(\"\")+\"\\\\resources\\\\images\\\\user_default.png\");\n imagePic = new OracleSerialBlob(FileUtils.getBytes(file));\n Long size = imagePic.length();\n photo_profile = new ByteArrayContent(imagePic.getBytes(1, size.intValue()));\n }else{\n imagePic = gbPhoto;\n Long size = gbPhoto.length();\n photo_profile = new ByteArrayContent(gbPhoto.getBytes(1, size.intValue()));\n }\n }",
"private void setPic()\n {\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(currentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n int scaleFactor = Math.min(photoW/384, photoH/512);\n\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n\n Bitmap bitmap = BitmapFactory.decodeFile(currentPhotoPath, bmOptions);\n imageCapture.setImageBitmap(bitmap);\n }",
"private void queryAndSetPicture() {\n StorageReference storageRef = mStorage.getReference().child(user.getId());\n final long ONE_MEGABYTE = 1024 * 1024;\n storageRef.getBytes(ONE_MEGABYTE).addOnSuccessListener(new OnSuccessListener<byte[]>() {\n @Override\n public void onSuccess(byte[] bytes) {\n // Data for \"images/island.jpg\" is returns, use this as needed\n mImageByteArray = bytes;\n mImageBitmap = BitmapFactory.decodeByteArray(mImageByteArray, 0, mImageByteArray.length);\n mUserimage.setImageBitmap(mImageBitmap);\n mUserimage.setBackgroundColor(80000000);\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n // Handle any errors\n// mUserimage.setBackgroundColor(80000000);\n }\n });\n\n }",
"public void actualizarImagenConError() {\n\t\tentidadGrafica.actualizarImagenConError(this.valor);\n\t}",
"public void setImagen(String imagen) {\n this.imagen = imagen;\n }",
"public int savePicture() {\n if (path == null || name == null || author == null || dating == null || location == null\n || typeId == 0 || artPeriodId == 0 || typeId == -1 || artPeriodId == -1\n || path.trim().equals(\"\")\n || name.trim().equals(\"\")\n || author.trim().equals(\"\")\n || dating.trim().equals(\"\")\n || location.trim().equals(\"\")) {\n return 0;\n } else {\n Integer movement;\n if (movementId == -1) {\n movement = null;\n } else {\n movement = movementId;\n }\n if (trivia == null) {\n pictureRepository.insertNewPicture(path, name, author, dating, location, typeId, movement, artPeriodId);\n } else {\n pictureRepository.insertNewPicture(path, name, author, dating, location, typeId, movement, artPeriodId, trivia);\n }\n return 1;\n }\n }",
"private void change_im_val(int boo, ImageView im_obj){\r\n if(boo == 200){ //IMAGEN SI EL VEHICULO ES CORRECTO\r\n im_obj.setImage(new Image(getClass().getResourceAsStream(\"/Images/img57a.png\")));\r\n }else{ //IMAGEN PARA LA BUSQUEDA DE UN VEHICULO\r\n im_obj.setImage(new Image(getClass().getResourceAsStream(\"/Images/img61a.png\")));\r\n }\r\n }",
"public Proyectil(){\n disparar=false;\n ubicacion= new Rectangle(0,0,ancho,alto);\n try {\n look = ImageIO.read(new File(\"src/Disparo/disparo.png\"));\n } catch (IOException ex) {\n System.out.println(\"error la imagen del proyectil no se encuentra en la ruta por defecto\");\n }\n }",
"@Override\n\tpublic void carregar() {\n\t\tSystem.out.println(\"carregar imagem png\");\n\t\t\n\t}",
"void lSetImage(Image img);",
"@Override\n\tpublic boolean baseToImg() {\n\t\tList<Image> imgList = imageRepository.findAll();\n\t\tfor (Image img : imgList) {\n\t\t\tString base = img.getSource();\n\t\t\tFiles file = new Files(img.getSaegimId(), \"jpg\");\n\t\t\tfile = fileRepository.save(file);\n\t\t\tLong fileId = file.getId();\n\t\t\t\n\t\t\tBase64ToImgDecoder.decoder(base, dir + fileId + '.' + \"jpg\");\n\t\t}\n\t\treturn true;\n\t}",
"public String guardarImgPost(){\n \n File archivo=null;//Objeto para el manejo de os archivos\n InputStream in =null;//Objeto para el manejo del stream de datos del archivo\n //Se obtiene el codigo de usuario de la sesion actual\n String codUsuario=codUsuario=String.valueOf(new SessionLogica().obtenerUsuarioSession().getCodUsuario());\n //Se obtiene un codigo producto de la combinacion del codigo del usuario y de un numero aleatorio\n String codGenerado=new Utiles().generar(codUsuario);\n String extension=\"\";\n int i=0;\n //Extension del archivo ha subir\n extension=\".\"+FilenameUtils.getExtension(this.getObjImagen().getImagen().getFileName());\n \n \n try {\n //Pasa el buffer de datos en un array de bytes , finalmente lee cada uno de los bytes\n in=this.getObjImagen().getImagen().getInputstream();\n byte[] data=new byte[in.available()];\n in.read(data);\n \n //Crea un archivo en la ruta de publicacion\n archivo=new File(this.rutaImgPublicacion+codGenerado+extension);\n FileOutputStream out=new FileOutputStream(archivo);\n //Escribe los datos en el nuevo archivo creado\n out.write(data);\n \n System.out.println(\"Ruta de Path Absolute\");\n System.out.println(archivo.getAbsolutePath());\n \n //Cierra todas las conexiones\n in.close();\n out.flush();\n out.close();\n } catch (IOException ex) {\n System.out.println(ex.getMessage());\n return \"none.jpg\";\n }\n //Retorna el nombre de la iamgen almacenada\n return codGenerado+extension;\n }",
"private void galleryAddPic() {\n\t}",
"private BufferedImage loadImage(File dat) {\n\t\tBufferedImage img = null;\n\n\t\tint orientation = -1;\n\t\ttry {\n\t\t\torientation = readExifData(dat);\n\t\t} catch (ImageReadException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\timg = ImageIO.read(dat); // Loads image to memory\n\t\t} catch (IOException e) {\n\t\t\t// error code\n\t\t\tSystem.out.println(\"Problem reading an image!\");\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t\tBufferedImage newImage = null;\n\n\t\tif (orientation != -1) {\n\t\t\t// rotate image\n\n\t\t\tswitch (orientation) {\n\t\t\tcase 6:\n\t\t\t\t// rotate right for 90 degress\n\t\t\t\tnewImage = rotateRightFor90(img);\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\t// rotate left for 90 degress\n\t\t\t\tnewImage = rotateLeftFor90(img);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tnewImage = img;\n\t\t\t}\n\n\t\t} else {\n\t\t\treturn img;\n\t\t}\n\n\t\treturn newImage;\n\t}",
"private Bitmap setPic() {\n int targetH = 0; //mImageView.getHeight();\n int targetW = 0; //mImageView.getWidth();\n\n\n\t\t/* Get the size of the image */\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n if( photoH > photoW ){\n /*Se definen las dimensiones de la imagen que se desea generar*/\n targetH = Const.MedidasReduccionImagen.PEQUENA_PORTRAIT.heigh; // 640;\n targetW = Const.MedidasReduccionImagen.PEQUENA_PORTRAIT.width; //480;\n }else{\n targetH = Const.MedidasReduccionImagen.PEQUENA_LANDSCAPE.heigh; //480;\n targetW = Const.MedidasReduccionImagen.PEQUENA_LANDSCAPE.width; //640;\n }\n\n\t\t/* Figure out which way needs to be reduced less */\n int scaleFactor = 0;\n if ((targetW > 0) || (targetH > 0)) {\n scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n }\n\n\t\t/* Set bitmap options to scale the image decode target */\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n\t\t/* Decode the JPEG file into a Bitmap */\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\n return bitmap;\n }",
"public void crearRutaImgPublicacion(){\n \n servletContext=(ServletContext) contexto.getExternalContext().getContext();\n String ruta=\"\";\n //Ruta real hasta la carpeta uploads\n ruta=servletContext.getRealPath(\"/upload/\");\n //Obtener el codigo del usuario de la sesion actual\n //este es utilizado para ubicar la carpeta que le eprtenece\n String codUsuario=String.valueOf(new SessionLogica().obtenerUsuarioSession().getCodUsuario());\n //Concatenamiento de directorios internos\n ruta+=File.separatorChar+\"img\"+File.separatorChar+\"post\"+File.separatorChar+codUsuario+File.separatorChar+\"all\"+File.separatorChar;\n //Asignacion de la ruta creada\n this.rutaImgPublicacion=ruta;\n }",
"public Image meurt() {\n\t\t\tString str;//va contenir le nom de l'image\n\t\t\tImageIcon ico;//nom de la nouvelle instance de la methode ImageIcon\n\t\t\tImage img;//va etre egale a ico, et va retourner l'image voulu\n\t\t\t\n\t\t\tstr = \"/images/bouleDeFeu.png\";\n\t\t\tthis.compteurMort++;//on incremente un compteur\n\t\t\tif(this.compteurMort > 100) {//si le compteur arrive jusqu'a 100, mario meurt, \n\t\t\t\tstr = \"/images/mortDEMario.png\";//donc on change d'image\n\t\t\t\tthis.setY(this.getY() - 1);//fait monter l'image de la mort de mario vers le ciel\n\t\t\t}\n\t\t\tico = new ImageIcon(getClass().getResource(str));\n\t\t\timg = ico.getImage();\n\t\t\treturn img;\n\t\t}",
"java.lang.String getImage();",
"public void guardaImagenEnDisco(InputStream imagenBuffer)\n {\n try\n {\n File fichero = new File(\"c:\\\\paella.jpg\");\n BufferedInputStream in = new BufferedInputStream(imagenBuffer);\n BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(fichero));\n\n byte[] bytes = new byte[8096];\n int len = 0;\n\n depura(\"Copiamos el fichero\");\n\n while ( (len = in.read( bytes )) > 0 )\n {\n out.write( bytes, 0, len );\n }\n\n out.flush();\n out.close();\n in.close();\n\n depura(\"Teminación del proceso con éxito\");\n }\n catch(Exception e)\n {\n depura(\"Error al escribir en disco \" + e.getMessage());\n }\n }",
"private void setImage(){\n if(objects.size() <= 0)\n return;\n\n IImage img = objects.get(0).getImgClass();\n boolean different = false;\n \n //check for different images.\n for(IDataObject object : objects){\n IImage i = object.getImgClass();\n \n if((img == null && i != null) || \n (img != null && i == null)){\n different = true;\n break;\n }else if (img != null && i != null){ \n \n if(!i.getName().equals(img.getName()) ||\n !i.getDir().equals(img.getDir())){\n different = true;\n break;\n }\n } \n }\n \n if(!different){\n image.setText(BUNDLE.getString(\"NoImage\"));\n if(img != null){\n imgName = img.getName();\n imgDir = img.getDir();\n image.setImage(img.getImage());\n }else{\n image.setImage(null);\n }\n }else{\n image.setText(BUNDLE.getString(\"DifferentImages\"));\n }\n \n image.repaint();\n }",
"public boolean isPic(){\n return this.isPic;\n }",
"boolean saveImage(Image img) {\r\n\t\treturn true;\r\n\t}",
"public String getSqPic() { return sqPic; }",
"public interface Image {\n public String getPath();\n\n public String getFormat();\n\n public String getWidth();\n\n public String getHeight();\n\n}",
"Imagem getImagem();",
"public void restaura(){ \n super.restauraE();\n setImage(\"FrtEA1.png\"); \n check = false; \n }",
"public Image getImgMario() {return imgMario;}",
"public boolean savePicture(){\n String path = MediaStore.Images.Media.insertImage(getContentResolver(),\n ((BitmapDrawable)PicSingleton.getInstance().getPicShaped()).getBitmap(),\n \"pichsape\"+ System.currentTimeMillis(),\n \"PicShape\");\n\n if(path != null) return true;\n\n return false;\n }",
"private void cargarBitmaps(TipoMunicion tipo) {\n switch (tipo){\n case RIFLE:\n bala = utils.getBitmapFromAssets(\"balas/bullet1.png\");\n break;\n case PISTOLA:\n bala = utils.getBitmapFromAssets(\"balas/bullet3.png\");\n break;\n case BIGPISTOLA:\n bala = utils.getBitmapFromAssets(\"balas/bullet2.png\");\n break;\n }\n\n Matrix matrix = new Matrix();\n switch (direccion) {\n case NORTE:\n matrix.postRotate(-90);\n break;\n case SUR:\n matrix.postRotate(90);\n break;\n case ESTE:\n matrix.postRotate(0);\n break;\n case OESTE:\n matrix.postRotate(180);\n break;\n }\n bala = Bitmap.createBitmap(bala, 0, 0, bala.getWidth(), bala.getHeight(), matrix, true);\n bala = Bitmap.createScaledBitmap(bala, altoPantalla * 1/80, altoPantalla * 1/80, false);\n }",
"public void setNuevaImagen(PlanarImage imagen, Rectangle rect)\n {\n /* En el rectángulo viene definido el nuevo tamaño de la imagen y, \n * por tanto, porqué queremos actualizar los metadatos*/\n \n /* Parámetros a actualizar: \n * Altura: Tag 257 (SHORT/LONG)\n * Anchura: Tag 256 (SHORT/LONG)\n * ModelPixelScaleTag: 33550 (DOUBLE)\n * ModelTiepointTag: 22922 (DOUBLE) \n */\n \n GeoTiffIIOMetadataAdapter ti = new GeoTiffIIOMetadataAdapter (imageData);\n ti.setTiffField(257, String.valueOf(rect.height));\n ti.setTiffField(256, String.valueOf(rect.width));\n //ti.setTiffFields(33550, tiepoints);\n \n }",
"boolean restoreBufferedImage();",
"public void changePhoto() {\r\n\t\tisPictFetche = false;\r\n\t\tlaPhoto = new Photo();\r\n\t\tlaPhotoCandidate = new Photo();\r\n\t}",
"public void loadPhoto(String photopath) {\n if (photopath != null)\r\n {\r\n Bitmap bitmap = BitmapFactory.decodeFile(photopath);\r\n Bitmap bitmapReduced = Bitmap.createScaledBitmap(bitmap, 300, 300, true);\r\n photoField.setImageBitmap(bitmapReduced);\r\n photoField.setScaleType(ImageView.ScaleType.FIT_XY);\r\n photoField.setTag(photopath);\r\n\r\n }\r\n }",
"public int getImage();",
"com.google.protobuf.ByteString getPicture();",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) { /// automatski se zove kada krene startActivityResult\n //super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == REQUEST_IMAGE_CAPTURE && resultCode == RESULT_OK){\n // get the photo\n Bundle extras = data.getExtras();\n Bitmap photo = (Bitmap)extras.get(\"data\"); // spremanje u bitmap\n mojImageView.setImageBitmap(photo); // stavljanje na zaslon\n\n }\n }",
"public void prepareObjetivos(){\n\t\tfor( int x= 0 ; x < game.getAmountObjetivos();x++){\n\t\t\tObjetivo o = game.getObjetivo(x);\n\t\t\timage = o.getImage();\n\t\t\ttemporal = image.getImage().getScaledInstance(o.getAncho(), o.getAlto(), Image.SCALE_SMOOTH);\n\t\t\to.setImage(new ImageIcon(temporal));\n\t\t}\n\t\t\n\t}",
"@Override\n public String getPicPhoto() {\n return pic_filekey;\n }",
"String getImage();",
"public void crearImagenes() {\n try {\n fondoJuego1 = new Imagenes(\"/fondoJuego1.png\",39,-150,-151);\n fondoJuego2 = new Imagenes(\"/fondoJuego2.png\",40,150,149);\n regresar = new Imagenes(\"/regresar.png\",43,90,80);\n highLight = new Imagenes(\"/cursorSubmenus.png\",43,90,80);\n juegoNuevo = new Imagenes(\"/juegoNuevo.png\",44,90,80);\n continuar = new Imagenes(\"/continuar.png\",45,90,80);\n tituloJuegoNuevo = new Imagenes(\"/tituloJuegoNuevo.png\",200,100,165);\n tituloContinuar = new Imagenes(\"/tituloContinuar.png\",201,100,40);\n tituloRegresar = new Imagenes(\"/tituloRegresar.png\",202,20,100);\n\t} catch(IOException e){\n e.printStackTrace();\n }\n }",
"public static void anyadirRaco(Imagen imagen){\n HashSet<Imagen> imagenes;\n HashSet<Usuario> usuarios;\n Usuario usuario;\n\n usuario = buscarUsuario(imagen.getUidUser());\n imagenes = baseDatos.get(Tablas.Racons.name());\n usuarios = baseDatos.get(Tablas.Usuarios.name());\n imagenes.add(imagen);\n usuarios.add(usuario);\n baseDatos.put(Tablas.Racons.name(),imagenes);\n baseDatos.put(Tablas.Usuarios.name(),usuarios);\n }",
"@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\r\n //jika image picker membawa sebuah data berupa foto maka\r\n if (ImagePicker.shouldHandle(requestCode, resultCode, data)) {\r\n //ambil data foto yang dipilih\r\n Image image = ImagePicker.getFirstImageOrNull(data);\r\n //ambil path/lokasi dari foto/gambar yang dipilih\r\n File imgFile = new File(image.getPath());\r\n if (imgFile.exists()) {\r\n //convert path ke bitmap dan tampilkan pada imageview\r\n Bitmap myBitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath());\r\n imgTranscript.setImageBitmap(myBitmap);\r\n\r\n //set variabel change true karena gambar telah diupdate\r\n isPicChange = true;\r\n }\r\n }\r\n\r\n super.onActivityResult(requestCode, resultCode, data);\r\n }",
"protected abstract Image loadImage();",
"public Image getPic() {\n return pic;\n }",
"boolean hasPicture();",
"public void onPictureTaken(byte[] arg0, Camera arg1) {\n \t String pname = \"/sdcard/\"+System.currentTimeMillis()+\".jpg\";\n\t FileOutputStream outStream = null;\n\t try {\n\t\t outStream = new FileOutputStream(pname);\n\t\t outStream.write(arg0);\n\t\t outStream.close(); \n\t \n\t\t Calendar calendar = Calendar.getInstance();\n\t \tjava.util.Date now = calendar.getTime();\n\t \tjava.util.Date today = new java.util.Date();\n\t\t\tjava.sql.Timestamp ti = new java.sql.Timestamp(now.getTime());\n\t\t\t// storing photo on SD Card and link in database...\n\t\t\t\n\t Toast.makeText(AddContact.this,\n\t \"Image \"+pname+\" saved \",\n\t Toast.LENGTH_LONG).show();\n\t Bitmap bm = BitmapFactory.decodeFile(pname);\n\t img2.setImageBitmap(bm);\n\t // data.Insert(name,strmn,strln,strmno,mshome,mswork,msother,mscust, streid,eswork,esother,mscust,pname,strtag,0);\n\t } catch (FileNotFoundException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t } catch (IOException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t }\n\n\t camera.startPreview();\n }",
"private void salvaFoto(){\n\n try {\n\n File f = new File(Environment.getExternalStorageDirectory() +getResources().getString(R.string.folder_package)+ \"/\" +id_Familiar+ \".jpg\");\n\n if(f.exists()){ boolean deleted = f.delete();}\n\n ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, qualidade_image_profile, bytes);\n\n try {\n f.createNewFile();\n FileOutputStream fo = new FileOutputStream(f);\n fo.write(bytes.toByteArray());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n catch (Exception E){\n Log.e(\"error\",\"Erro ao carregar imagem\");\n }\n }",
"public String getImg(){\n return img;\n }",
"public void InitParam(Bitmap[] bm, int vitesse, int intru, int laserColor) {\n screenSizeX = getResources().getDisplayMetrics().widthPixels;\n screenSizeY = getResources().getDisplayMetrics().heightPixels;\n\n //On recupere toutes nos images\n this.bm = bm;\n\n //On recupere la couleur du laser\n this.laserColor = laserColor;\n\n //Et celui qui est l'intru\n this.intru = intru;\n\n //On creer nos tableau avec comme longueur notre nombre d'images\n pathMeasure = new PathMeasure[this.bm.length];\n pathLength = new float[this.bm.length];\n pos = new float[this.bm.length][2]; // ici 2 positions, x et y\n animPath = new Path[this.bm.length];\n distance = new float[this.bm.length];\n resultBitmap = new Bitmap[this.bm.length];\n\n //On boucle pour instancier chaque objets de nos tableaux\n for(int j=0;j<this.bm.length;j++){\n\n animPath[j]= getRandomPath();\n pathMeasure[j] = new PathMeasure(animPath[j],false);\n pathLength[j] = pathMeasure[j].getLength();\n\n resultBitmap[j] = Bitmap.createBitmap(bm[j], 0, 0,\n bm[j].getWidth() - 1, bm[j].getHeight() - 1);\n }\n\n //On definit le pas\n step = vitesse;\n\n // On creer la matrice\n matrix = new Matrix();\n\n //Parametre dans le cas ou l'ecran est touché / pour les laser\n fired=false;\n touchedPosition = new float[2];\n distGaucheRest = new float[2];\n distGaucheRest[0]=0;\n distGaucheRest[1]=screenSizeY;\n fireGauchePas = new float[2];\n fireGauchePas[0]=0;\n fireGauchePas[1]=0;\n\n distDroitRest = new float[2];\n distDroitRest[0]=screenSizeX;\n distDroitRest[1]=screenSizeY;\n fireDroitPas = new float[2];\n fireDroitPas[0]=0;\n fireDroitPas[1]=0;\n\n //Au cas ou le vaiseau explose\n xplosed=false;\n countBeforeXplose=0;\n\n }",
"private void displayImage() {\n if (currentPhotoPath != null) {\n // checkPicture = true; depreciated, try catch to catch if photo exists\n Bitmap temp = fixOrientation(BitmapFactory.decodeFile(currentPhotoPath));\n bitmapForAnalysis = temp;\n imageView.setImageBitmap(temp);\n } else {\n Toast.makeText(this, \"Image Path is null\", Toast.LENGTH_LONG).show();\n }\n }",
"public void setImg(){\n if(PicSingleton.getInstance().getPicToShape() != null){\n\n mResultImg.setImageDrawable(PicSingleton.getInstance().getPicShaped());\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == PICK_IMAGE && resultCode == RESULT_OK && data != null && data.getData() != null) {\n filePath = data.getData();\n try {\n Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), filePath);\n Image_brand.setImageBitmap(bitmap);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }",
"File resolveImage(Box box);",
"boolean hasImageByTransform();",
"@Override\n public void onActivityResult(int requestCode,int resultCode,Intent data)\n {\n alerta.dismiss();\n if(resultCode!=0)\n loading.abrir(\"Aguarde...\");\n\n super.onActivityResult(requestCode, resultCode, data);\n\n switch (requestCode) {\n case imagem_interna:\n if (resultCode == RESULT_OK) {\n Image img = new Image();\n ContentResolver cResolver = getContentResolver();\n Uri uri = data.getData();\n String[] projection = {MediaStore.Images.Media.DATA};\n Cursor cursor = cResolver.query(uri, projection, null, null, null);\n cursor.moveToFirst();\n int columnIndex = cursor.getColumnIndex(projection[0]);\n filepath = cursor.getString(columnIndex);\n cursor.close();\n\n File f64 = new File(filepath);\n if(f64!=null)\n {\n img.setResizedBitmap(f64,percentImgArq);\n img.setMimeFromImgPath(f64.getPath());\n }\n img64 = img.getBitmapBase64();\n tipoImagem = img.getMime();\n\n if(img.getBitmap()!=null)\n {\n imagem.setImageBitmap(img.getBitmap());\n }\n loading.fechar();\n }\n break;\n\n case imagem_camera:\n if (resultCode == RESULT_OK)\n {\n Image img = new Image();\n Bitmap photo = (Bitmap) data.getExtras().get(\"data\");\n\n Uri uri = img.getImageUri(pesqAgendaUser.this, photo);\n File file = new File(img.getRealPathFromURI(pesqAgendaUser.this,uri));\n String pathImgCamera = file.getPath();\n File f64 = new File(pathImgCamera);\n if(f64!=null)\n {\n img.setResizedBitmap(f64,percentImgCam);\n img.setMimeFromImgPath(f64.getPath());\n }\n img64 = img.getBitmapBase64();\n tipoImagem = img.getMime();\n\n if(img.getBitmap()!=null)\n {\n imagem.setImageBitmap(img.getBitmap());\n }\n loading.fechar();\n\n }\n break;\n\n default:\n loading.fechar();\n break;\n }//fim switch\n\n }",
"public BufferedImage getDati()\n { \n return imgDati;\n }",
"public void finalize(){\r\n srcImage = null;\r\n sigmas = null;\r\n xDataRound = null;\r\n yDataRound = null;\r\n zDataRound = null;\r\n super.finalize();\r\n }",
"public String getStaticPicture();",
"public void setImage(Image itemImg) \n {\n img = itemImg;\n }",
"void setImage(Bitmap bitmap);",
"public String getPicture() {\r\n return picture;\r\n }",
"private int getPictureType()\n {\n return pictureType;\n }",
"public void setImag(double imag) {this.imag = imag;}",
"public String getaImg() {\n return aImg;\n }",
"public interface Image {\n\n /**\n * Get number of pixels horizontally\n *\n * @return int number of pixels horizontally\n */\n int getWidth();\n\n /**\n * Get number of pixels vertically\n *\n * @return int number of pixels vertically\n */\n int getHeight();\n\n /**\n * Get the red value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @return the red value\n */\n int getRed(int x, int y);\n\n\n /**\n * Get the green value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @return the green value\n */\n int getGreen(int x, int y);\n\n /**\n * Get the blue value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @return the blue value\n */\n int getBlue(int x, int y);\n\n /**\n * Set the red value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @param value of the pixel\n */\n void setRed(int x, int y, int value);\n\n\n /**\n * Set the green value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @param value of the pixel\n */\n void setGreen(int x, int y, int value);\n\n /**\n * Set the blue value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @param value of the pixel\n */\n void setBlue(int x, int y, int value);\n}",
"public void setIdImagen(int idImagen) {\n this.idImagen = idImagen;\n }",
"public BufferedImage getImage() {\n/* 81 */ return this.bufImg;\n/* */ }",
"private void processAndSetImage() {\n\n // Resample the saved image to fit the ImageView\n mResultsBitmap = resamplePic(this, mTempPhotoPath);\n\n// tv.setText(base64conversion(photoFile));\n//\n// Intent intent = new Intent(Intent.ACTION_SEND);\n// intent.setType(\"text/plain\");\n// intent.putExtra(Intent.EXTRA_TEXT, base64conversion(photoFile));\n// startActivity(intent);\n\n /**\n * UPLOAD IMAGE USING RETROFIT\n */\n\n retroFitHelper(base64conversion(photoFile));\n\n // Set the new bitmap to the ImageView\n imageView.setImageBitmap(mResultsBitmap);\n }",
"private void enhanceImage(){\n }",
"@Override\n public Image getImage(Photo photo) {\n return null;\n }",
"public String getPic() {\n return pic;\n }",
"public String getPic() {\n return pic;\n }",
"private void change_im_tool4(int boo){\r\n if(boo == 0){ //IMAGEN SI EL USUARIO ESTA INHABILITADO\r\n im_tool4.setImage(new Image(getClass().getResourceAsStream(\"/Images/img07.png\")));\r\n }else{ //IMAGEN PARA HABILITAR AL USUARIO\r\n im_tool4.setImage(new Image(getClass().getResourceAsStream(\"/Images/img06.png\")));\r\n }\r\n }",
"private void initAreaImageFilm() {\n\n }"
]
| [
"0.7086435",
"0.6819326",
"0.6618787",
"0.656598",
"0.6542426",
"0.6523557",
"0.642219",
"0.62739956",
"0.62578523",
"0.62472427",
"0.6224402",
"0.61510694",
"0.6102917",
"0.6043047",
"0.6040214",
"0.60336053",
"0.6020479",
"0.5999752",
"0.59820884",
"0.59681326",
"0.5967599",
"0.5945402",
"0.5933286",
"0.59144884",
"0.5908793",
"0.5906225",
"0.590174",
"0.58899474",
"0.5884451",
"0.58631057",
"0.5859024",
"0.5845691",
"0.5843674",
"0.58409005",
"0.58168435",
"0.580222",
"0.58020675",
"0.57978016",
"0.57973534",
"0.5785886",
"0.57854676",
"0.5779444",
"0.57741857",
"0.5773305",
"0.57699245",
"0.57653666",
"0.57573986",
"0.5753745",
"0.57506675",
"0.5750523",
"0.5749605",
"0.57484716",
"0.57467914",
"0.5744434",
"0.5743035",
"0.57424235",
"0.5738573",
"0.57276344",
"0.5721145",
"0.5717661",
"0.5715893",
"0.5708222",
"0.5702775",
"0.570056",
"0.56983036",
"0.569757",
"0.5695375",
"0.56936353",
"0.5689917",
"0.5689746",
"0.5681974",
"0.5675049",
"0.5672979",
"0.56677496",
"0.5664824",
"0.5662802",
"0.56624556",
"0.56585455",
"0.5643634",
"0.56423163",
"0.5640112",
"0.5635549",
"0.5634483",
"0.5633621",
"0.56187993",
"0.561175",
"0.5608182",
"0.5607916",
"0.5607863",
"0.5602657",
"0.55974406",
"0.55884576",
"0.558472",
"0.55836916",
"0.5579824",
"0.5578629",
"0.5576992",
"0.55706036",
"0.55706036",
"0.5563068",
"0.55597275"
]
| 0.0 | -1 |
... TODO(developer): Handle FCM messages here. Not getting messages here? See why this may be: | @Override
public void onMessageReceived(RemoteMessage remoteMessage) {
Log.d(TAG, "From: " + remoteMessage.getFrom());
// Check if message contains a data payload.
if (remoteMessage.getData().size() > 0) {
Log.d(TAG, "Message data payload: " + remoteMessage.getData());
}
// Check if message contains a notification payload.
if (remoteMessage.getNotification() != null) {
//Log.d(TAG, "Message Notification Body: " + remoteMessage.getNotification().getBody());
final String msg = remoteMessage.getNotification().getBody();
Handler handler = new Handler(Looper.getMainLooper());
handler.post(new Runnable() {
@Override
public void run() {
Toast.makeText(MyService.this.getApplicationContext(), msg,Toast.LENGTH_SHORT).show();
}
});
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n // [START_EXCLUDE]\n // There are two types of messages data messages and notification messages. Data messages are handled\n // here in onMessageReceived whether the app is in the foreground or background. Data messages are the type\n // traditionally used with GCM. Notification messages are only received here in onMessageReceived when the app\n // is in the foreground. When the app is in the background an automatically generated notification is displayed.\n // When the user taps on the notification they are returned to the app. Messages containing both notification\n // and data payloads are treated as notification messages. The Firebase console always sends notification\n // messages. For more see: https://firebase.google.com/docs/cloud-messaging/concept-options\n // [END_EXCLUDE]\n\n // TODO(developer): Handle FCM messages here.\n // Not getting messages here? See why this may be: https://goo.gl/39bRNJ\n Log.d(TAG, \"From: \" + remoteMessage.getFrom());\n\n // Check if message contains a data payload.\n if (remoteMessage.getData().size() > 0) {\n Log.d(TAG, \"Message data payload: \" + remoteMessage.getData());\n\n if (/* Check if data needs to be processed by long running job */ true) {\n // For long-running tasks (10 seconds or more) use Firebase Job Dispatcher.\n scheduleJob();\n } else {\n // Handle message within 10 seconds\n handleNow(remoteMessage);\n }\n\n }\n\n // Check if message contains a notification payload.\n if (remoteMessage.getNotification() != null) {\n Log.d(TAG, \"Message Notification Body: \" + remoteMessage.getNotification().getBody());\n }\n\n // Also if you intend on generating your own notifications as a result of a received FCM\n // message, here is where that should be initiated. See sendNotification method below.\n\n // sendNotification(remoteMessage); //not trusted : // TODO: 07/11/2017 redo #later\n //todo https://developer.android.com/guide/topics/ui/notifiers/notifications.html\n //todo https://github.com/firebase/quickstart-android/tree/master/messaging/app/src/main/java/com/google/firebase/quickstart/fcm\n }",
"public void onMessageReceived(RemoteMessage remoteMessage) {\n Log.d(TAG, \"FCM Message Id: \" + remoteMessage.getMessageId());\n Log.d(TAG, \"FCM Notification Message: \" + remoteMessage.getNotification());\n Log.d(TAG, \"FCM Data Message: \" + remoteMessage.getData());\n\n Map<String, String> payload = remoteMessage.getData();\n\n if (payload != null) {\n String payloadType = payload.get(\"type\");\n\n switch (payloadType) {\n case \"invitation\":\n Intent inviteIntent = new Intent();\n inviteIntent.setAction(BroadcastHelper.INVITE_REQUEST);\n inviteIntent.putExtra(BroadcastHelper.ADMIN, payload.get(\"sender\"));\n inviteIntent.putExtra(BroadcastHelper.GAME_NAME, payload.get(\"game\"));\n inviteIntent.putExtra(BroadcastHelper.PLAYER_NAME, payload.get(\"receiver\"));\n sendBroadcast(inviteIntent);\n break;\n case \"game_start\":\n Intent gameStartIntent = new Intent();\n gameStartIntent.setAction(BroadcastHelper.GAME_START);\n gameStartIntent.putExtra(BroadcastHelper.ADMIN, payload.get(\"admin\"));\n gameStartIntent.putExtra(BroadcastHelper.GAME_NAME, payload.get(\"game\"));\n// gameStartIntent.putExtra(BroadcastHelper.SENDER, payload.get(\"sender\"));\n// gameStartIntent.putExtra(BroadcastHelper.PLAYER_NAME, payload.get(\"player\"));\n sendBroadcast(gameStartIntent);\n break;\n case \"invite_response\":\n Intent inviteResponseIntent = new Intent();\n inviteResponseIntent.setAction(BroadcastHelper.INVITE_RESPONSE);\n inviteResponseIntent.putExtra(BroadcastHelper.PLAYER_NAME, payload.get(\"player_name\")); // TODO: Complete Cloud Fxn\n sendBroadcast(inviteResponseIntent);\n break;\n case \"new_player_joined\":\n Intent newPlayerJoinedIntent = new Intent();\n newPlayerJoinedIntent.setAction(BroadcastHelper.NEW_PLAYER_JOINED);\n newPlayerJoinedIntent.putExtra(BroadcastHelper.PLAYER_NAME, payload.get(\"player_name\")); // TODO: Complete Cloud Fxn\n // newPlayerJoinedIntent.putExtra(BroadcastHelper.LOCATION, payload.get(\"location\")); // TODO: Complete Cloud Fxn\n sendBroadcast(newPlayerJoinedIntent);\n break;\n case \"game_end_message\":\n Intent gameEndIntent = new Intent();\n gameEndIntent.setAction(BroadcastHelper.GAME_ENDS);\n gameEndIntent.putExtra(BroadcastHelper.WINNING_TEAM, payload.get(\"winner\"));\n gameEndIntent.putExtra(BroadcastHelper.RESULT_MESSAGE, payload.get(\"message\"));\n sendBroadcast(gameEndIntent);\n // TODO: PASS NAME OF WINNING TEAM AND THE GAME MESSAGE (SEE FXN)\n break;\n default:\n Log.d(TAG, \"Intent error\");\n }\n }\n\n }",
"@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n super.onMessageReceived(remoteMessage);\n // [START_EXCLUDE]\n // There are two types of messages data messages and notification messages. Data messages are handled\n // here in onMessageReceived whether the app is in the foreground or background. Data messages are the type\n // traditionally used with GCM. Notification messages are only received here in onMessageReceived when the app\n // is in the foreground. When the app is in the background an automatically generated notification is displayed.\n // When the user taps on the notification they are returned to the app. Messages containing both notification\n // and data payloads are treated as notification messages. The Firebase console always sends notification\n // messages. For more see: https://firebase.google.com/docs/cloud-messaging/concept-options\n // [END_EXCLUDE]\n\n // TODO(developer): Handle FCM messages here.\n // Not getting messages here? See why this may be: https://goo.gl/39bRNJ\n Log.d(TAG, \"From: \" + remoteMessage.getFrom());\n\n // Check if message contains a data payload.\n if (remoteMessage.getData().size() > 0) {\n Log.d(TAG, \"Message data payload: \" + remoteMessage.getData());\n\n if (/* Check if data needs to be processed by long running job */ true) {\n // For long-running tasks (10 seconds or more) use Firebase Job Dispatcher.\n scheduleJob();\n } else {\n // Handle message within 10 seconds\n handleNow();\n }\n\n }\n\n // Check if message contains a notification payload.\n if (remoteMessage.getNotification() != null) {\n //Log.d(TAG, \"Message Notification Body: \" + remoteMessage.getNotification().getBody());\n// processData(remoteMessage);\n //sendNotification(remoteMessage.getNotification().getBody());\n //Toast.makeText(this, remoteMessage.getNotification().getBody(),Toast.LENGTH_SHORT).show();\n }\n\n // Also if you intend on generating your own notifications as a result of a received FCM\n // message, here is where that should be initiated. See sendNotification method below.\n }",
"@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n // [START_EXCLUDE]\n // There are two types of messages data messages and notification messages. Data messages are handled\n // here in onMessageReceived whether the app is in the foreground or background. Data messages are the type\n // traditionally used with GCM. Notification messages are only received here in onMessageReceived when the app\n // is in the foreground. When the app is in the background an automatically generated notification is displayed.\n // When the user taps on the notification they are returned to the app. Messages containing both notification\n // and data payloads are treated as notification messages. The Firebase console always sends notification\n // messages. For more see: https://firebase.google.com/docs/cloud-messaging/concept-options\n // [END_EXCLUDE]\n\n // TODO(developer): Handle FCM messages here.\n // Not getting messages here? See why this may be: https://goo.gl/39bRNJ\n Log.d(TAG, \"From:::: \" + remoteMessage.getFrom());\n\n\n //Handle notifications with data payload for your app\n // Check if message contains a data payload.\n if (remoteMessage.getData().size() > 0) {\n Log.d(TAG, \"Message data payload::: \" + remoteMessage.getData());\n\n }\n\n // Check if message contains a notification payload.\n if (remoteMessage.getNotification() != null) {\n Log.d(TAG, \"Message Notification Body:::: \" + remoteMessage.getNotification().getBody());\n }\n\n Log.e(\"Msg\", remoteMessage.getData().size()+\"\");\n //sendNotification(remoteMessage.getData());\n\n try {\n sendNotification(remoteMessage.getData());\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n\n\n\n // Also if you intend on generating your own notifications as a result of a received FCM\n // message, here is where that should be initiated. See sendNotification method below.\n }",
"@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n System.out.println(\"msg received\");\n Log.d(TAG, \"FCM Message Id: \" + remoteMessage.getMessageId());\n Log.d(TAG, \"FCM Notification Message: \" + remoteMessage.getNotification());\n Log.d(TAG, \"FCM Data Message: \" + remoteMessage.getData());\n System.out.println(\"hm msg recieved\"+remoteMessage.getFrom()+remoteMessage.getMessageType()+remoteMessage.getNotification());\n }",
"@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n // ...\n\n // TODO(developer): Handle FCM messages here.\n // Not getting messages here? See why this may be: https://goo.gl/39bRNJ\n Log.d(TAG, \"From: \" + remoteMessage.getFrom());\n\n // Check if message contains a data payload.\n if (remoteMessage.getData().size() > 0) {\n Log.d(TAG, \"Message data payload: \" + remoteMessage.getData());\n }\n\n // Check if message contains a notification payload.\n if (remoteMessage.getNotification() != null) {\n Log.d(TAG, \"Message Notification Body: \" + remoteMessage.getNotification().getBody());\n sendCustomNotification(remoteMessage);\n }\n\n // Also if you intend on generating your own notifications as a result of a received FCM\n // message, here is where that should be initiated. See sendNotification method below.\n }",
"@Override\n public void onMessageReceived(String from, Bundle data)\n {\n //FCM Handling start\n// Bundle bundle = data.getParcelable(\"notification\");\n// String message = bundle.getString(\"body\");\n //FCM Handling end\n\n String message = data.getString(\"message\");\n\n Log.d(TAG, \"From: \" + from);\n Log.d(TAG, \"Message: \" + message);\n\n try\n {\n GcmMessage gcmMessage = new Gson().fromJson(message, GcmMessage.class);\n\n ArrayList<String> eventTypes = gcmMessage.getEventTypes();\n\n for(String eventType : eventTypes)\n {\n GcmEventFactory.getEventCommand(eventType).run();\n }\n }\n catch(Exception e)\n {\n Log.d(TAG, \"Failed to process GCM message: \" + e.getMessage());\n }\n }",
"@Override public void onReceiveNotification(Context context, PushMsg msg) {\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE)) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n FirebaseMessaging.getInstance().subscribeToTopic(Config.TOPIC_GLOBAL);\n\n\n\n } else if (intent.getAction().equals(Config.PUSH_NOTIFICATION)) {\n // new push notification is received\n\n String message = intent.getStringExtra(\"message\");\n\n Toast.makeText(getApplicationContext(), \"Push notification: \" + message, Toast.LENGTH_LONG).show();\n\n\n }\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n String message = intent.getStringExtra(\"message\");\n Log.d(\"SCXTT\", \"in ShowMapActivity we got a GCM and they successfully told us about it message:\" + message);\n Toast.makeText(context, \"Receiving Updates\", Toast.LENGTH_SHORT).show();\n postGetRoomMessages();\n\n //do other stuff here\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE)) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n FirebaseMessaging.getInstance().subscribeToTopic(Config.TOPIC_GLOBAL);\n\n\n } else\n if (intent.getAction().equals(Config.PUSH_NOTIFICATION)) {\n // new push notification is received\n invalidateOptionsMenu();//Activity method\n //updateMenuCounts(MyFirebaseMessagingService.count1);\n\n String message = intent.getStringExtra(\"message\");\n\n Toast.makeText(getApplicationContext(), \"Push notification: \" + message, Toast.LENGTH_LONG).show();\n\n //txtMessage.setText(message);\n }\n\n }",
"@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n Log.d(\"TAG\", \"From: \" + remoteMessage.getFrom());\n\n // Check if message contains a data payload.\n if (remoteMessage.getData().size() > 0) {\n Log.d(\"TAG\", \"Message data payload: \" + remoteMessage.getData());\n\n if (/* Check if data needs to be processed by long running job */ true) {\n // For long-running tasks (10 seconds or more) use Firebase Job Dispatcher.\n scheduleJob();\n } else {\n // Handle message within 10 seconds\n handleNow();\n }\n\n }\n\n // Check if message contains a notification payload.\n if (remoteMessage.getNotification() != null) {\n Log.d(\"TAG\", \"Message Notification Body: \" + remoteMessage.getNotification().getBody());\n }\n\n // Also if you intend on generating your own notifications as a result of a received FCM\n // message, here is where that should be initiated. See sendNotification method below.\n }",
"@Override\n public void onMessageReceived(String from, Bundle data) {\n Date now = new Date();\n long uniqueId = now.getTime();\n String message = \"\";\n try {\n message = data.getString(\"message\");\n\n try {\n mJSONObject = new JSONObject(message);\n strMessage = mJSONObject.getString(\"message\");\n\n strArrList.add(strMessage);\n\n } catch (JSONException e) {\n Log.e(LOG_TAG, \"JSONException Cause \" + e.getCause());\n Log.e(LOG_TAG, \"JSONException Error parsing data \" + e.toString());\n }\n sendNotification();\n\n } catch (Exception e) {\n\n Log.e(LOG_TAG, \"Exception : \" + e.toString());\n Rollbar.reportException(e, \"critical\", \"My Gcmlistener services crash\");\n Rollbar.reportMessage(\"GCM String Builder value : \" + strArrList.toString(), \"--GCM Message:-\" + message);\n }\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE)) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n FirebaseMessaging.getInstance().subscribeToTopic(Config.TOPIC_GLOBAL);\n\n displayFirebaseRegId();\n\n } else if (intent.getAction().equals(Config.PUSH_NOTIFICATION)) {\n // new push notification is received\n\n String message = intent.getStringExtra(\"message\");\n\n Toast.makeText(getApplicationContext(), \"Push notification: \" + message, Toast.LENGTH_LONG).show();\n\n\n }\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(\"registrationComplete\")) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n FirebaseMessaging.getInstance().subscribeToTopic(\"VaahanMessages\");\n Toast.makeText(vehicle_list.this,\"Subscribed To Notification Server\",Toast.LENGTH_SHORT).show();\n\n } else if (intent.getAction().equals(\"pushNotification\")) {\n\n }\n }",
"private void sendMessageToNews(){\r\n JSONObject jPayload = new JSONObject();\r\n JSONObject jNotification = new JSONObject();\r\n try {\r\n jNotification.put(\"message\", \"Leaderboard Activity\");\r\n jNotification.put(\"body\", \"New high score!\");\r\n jNotification.put(\"sound\", \"default\");\r\n jNotification.put(\"badge\", \"1\");\r\n jNotification.put(\"click_action\", \"OPEN_ACTIVITY_1\");\r\n\r\n // Populate the Payload object.\r\n // Note that \"to\" is a topic, not a token representing an app instance\r\n jPayload.put(\"to\", \"/topics/high_score\");\r\n jPayload.put(\"priority\", \"high\");\r\n jPayload.put(\"notification\", jNotification);\r\n\r\n // Open the HTTP connection and send the payload\r\n URL url = new URL(\"https://fcm.googleapis.com/fcm/send\");\r\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\r\n conn.setRequestMethod(\"POST\");\r\n conn.setRequestProperty(\"Authorization\", SERVER_KEY);\r\n conn.setRequestProperty(\"Content-Type\", \"application/json\");\r\n conn.setDoOutput(true);\r\n\r\n // Send FCM message content.\r\n OutputStream outputStream = conn.getOutputStream();\r\n outputStream.write(jPayload.toString().getBytes());\r\n outputStream.close();\r\n\r\n // Read FCM response.\r\n InputStream inputStream = conn.getInputStream();\r\n final String resp = convertStreamToString(inputStream);\r\n\r\n Handler h = new Handler(Looper.getMainLooper());\r\n h.post(new Runnable() {\r\n @Override\r\n public void run() {\r\n Log.e(TAG, \"run: \" + resp);\r\n Toast.makeText(getActivity(),resp,Toast.LENGTH_LONG).show();\r\n }\r\n });\r\n } catch (JSONException | IOException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE)) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n FirebaseMessaging.getInstance().subscribeToTopic(Config.TOPIC_GLOBAL);\n\n displayFirebaseRegId();\n\n } else if (intent.getAction().equals(Config.PUSH_NOTIFICATION)) {\n // new push notification is received\n\n String message = intent.getStringExtra(\"message\");\n\n\n// txtMessage.setText(message);\n getlist();\n adapter.notifyDataSetChanged();\n }\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE)) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n FirebaseMessaging.getInstance().subscribeToTopic(Config.TOPIC_GLOBAL);\n\n displayFirebaseRegId();\n\n } else if (intent.getAction().equals(Config.PUSH_NOTIFICATION)) {\n // new push notification is received\n\n String message = intent.getStringExtra(\"message\");\n\n Toast.makeText(getApplicationContext(), \"Push notification: \" + message, Toast.LENGTH_LONG).show();\n\n txtMessage.setText(message);\n }\n }",
"@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n }",
"@Override public void onMessageReceived(RemoteMessage remoteMessage) {\n FCMManager.getInstance(getApplicationContext()).onMessage(remoteMessage);\n }",
"@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n // TODO(developer): Handle FCM messages here.\n // If the application is in the foreground handle both data and notification messages here.\n // Also if you intend on generating your own notifications as a result of a received FCM\n // message, here is where that should be initiated. See sendNotification method below.\n //Log.e(TAG, \"From: \" + remoteMessage.getFrom());\n //Log.e(TAG, \"Notification Message Body: \" + remoteMessage.getNotification().getBody());\n MyPreferenceManager prefs = MyApplication.getInstance().getPrefManager();\n if(prefs.getNotificationsEnabled()) // If notifications are enabled, send it\n sendNotification(remoteMessage);\n\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(NotificationConfig.REGISTRATION_COMPLETE)) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notification\n FirebaseMessaging.getInstance().subscribeToTopic(NotificationConfig.TOPIC_GLOBAL);\n\n displayFirebaseRegId();\n\n } else if (intent.getAction().equals(NotificationConfig.PUSH_NOTIFICATION)) {\n // new push notification is received\n\n String message = intent.getStringExtra(\"message\");\n\n Toast.makeText(getApplicationContext(), \"Notification: \" + message, Toast.LENGTH_LONG).show();\n\n\n }\n }",
"@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n // [START_EXCLUDE]\n // There are two types of messages data messages and notification messages. Data messages are handled\n // here in onMessageReceived whether the app is in the foreground or background. Data messages are the type\n // traditionally used with GCM. Notification messages are only received here in onMessageReceived when the app\n // is in the foreground. When the app is in the background an automatically generated notification is displayed.\n // When the user taps on the notification they are returned to the app. Messages containing both notification\n // and data payloads are treated as notification messages. The Firebase console always sends notification\n // messages. For more see: https://firebase.google.com/docs/cloud-messaging/concept-options\n // [END_EXCLUDE]\n\n // TODO(developer): Handle FCM messages here.\n // Not getting messages here? See why this may be: https://goo.gl/39bRNJ\n\n Log.d(TAG, \"From: \" + remoteMessage.getFrom());\n\n // Check if message contains a data payload.\n if (remoteMessage.getData().size() > 0) {\n Map<String,String> m = remoteMessage.getData();\n Log.d(TAG, \"Message data payload: \" + m);\n String id = remoteMessage.getMessageId();\n if(id == null)\n id = remoteMessage.getData().get(\"title\");\n handleData(id, m);\n }\n\n // Check if message contains a notification payload.\n if (remoteMessage.getNotification() != null) {\n String id = remoteMessage.getMessageId();\n if(id == null)\n id = remoteMessage.getNotification().getTitle();\n handleNotification(id, remoteMessage.getNotification());\n }\n // Also if you intend on generating your own notifications as a result of a received FCM\n // message, here is where that should be initiated. See sendNotification method below.\n }",
"static void serverToOneDevice(String userDeviceIdKey,String message) throws Exception {\r\n\r\n\t\t//String userDeviceIdKey = \"egtbfsd8MCo:APA91bGEDXehUv8iDoJE9Mj802ESCLlAtZXhdqMgHUiLU9hbUn3B-lYdvqISCc-t3FLnxGfS0IrxLkr_yhMtSuu98r-jwWn7opDjuNLjVsJ7dPacVbbunHK9rX_AezwXnROLjMe3w7HL\";\r\n\t\t\r\n\t//\tString userDeviceIdKey =\"fTiMENgaIAI:APA91bHdqOZEZHYlq34Aeve6_30WskJX1oBy56-kSTBh18usYArkr06tXXOIUjDDWBLo9ICLk5q5b0-4U4lo38AlJklTOm7yrMZIlu9LtaiGNqF1frefTyThDaFqyIiMaFnqgSUj-o3q\";\r\n\t\t// String authKey = AUTH_KEY_FCM; // You FCM AUTH key\r\n\t\t// String FMCurl = \"https://fcm.googleapis.com/fcm/send\";\r\n\t//\tString FIREBASE_SERVER_KEY = \"AIzaSyAuS9vJADBUEWM_pAQcgPDGR_GcNWP2knw\"; // You FCM AUTH key\r\n\t\t\r\n\t\t//String FIREBASE_SERVER_KEY = ApiUrl.FCM__SERVER_KEY; \r\n\t\t//String FIREBASE_API_URL = \"https://fcm.googleapis.com/fcm/send\";\r\n\r\n\t\tURL url = new URL(ApiUrl.FCM__API_URL);\r\n\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\r\n\r\n\t\tconn.setUseCaches(false);\r\n\t\tconn.setDoInput(true);\r\n\t\tconn.setDoOutput(true);\r\n\r\n\t\tconn.setRequestMethod(\"POST\");\r\n\t\tconn.setRequestProperty(\"Authorization\", \"key=\" + ApiUrl.FCM__SERVER_KEY);\r\n\t\tconn.setRequestProperty(\"Content-Type\", \"application/json\");\r\n\r\n\t\tJSONObject json = new JSONObject();\r\n\t\tjson.put(\"to\", userDeviceIdKey.trim());\r\n\t\tJSONObject info = new JSONObject();\r\n\t\tinfo.put(\"title\", \"Notificatoin\"); // Notification title\r\n\t\t//info.put(\"body\", \"Add new Product\"); // Notification body\r\n\t\tinfo.put(\"body\",message);\r\n\t\tjson.put(\"notification\", info);\r\n\r\n\t\tOutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());\r\n\t\twr.write(json.toString());\r\n\t\twr.flush();\r\n\t\tconn.getInputStream();\r\n\t\tSystem.out.println(conn);\r\n\t\tSystem.out.println(json.toString());\r\n\t\t//return null;\r\n\t}",
"@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE)) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n FirebaseMessaging.getInstance().subscribeToTopic(Config.TOPIC_GLOBAL);\n\n } else if (intent.getAction().equals(Config.PUSH_NOTIFICATION)) {\n // new push notification is received\n String message = intent.getStringExtra(\"message\");\n Toast.makeText(getApplicationContext(), \"Push notification: \" + message, Toast.LENGTH_LONG).show();\n }\n }",
"@Override\r\n public void onMessageReceived(RemoteMessage remoteMessage) {\n if(remoteMessage.getData().size()>0)\r\n {\r\n Log.d(TAG, \"Mensaje recibido: \"+ remoteMessage.getData());\r\n }\r\n //Checa si el mensaje contiene notificacion\r\n if(remoteMessage.getNotification() != null){\r\n String title = remoteMessage.getNotification().getTitle();\r\n String message = remoteMessage.getNotification().getBody();\r\n\r\n Log.d(TAG, \"Titulo del mensaje de notificación: \"+ title);\r\n Log.d(TAG, \"Cuerpo del mensaje de notificación: \"+message);\r\n\r\n mostrarNotificacion(title, message);\r\n }\r\n\r\n if(remoteMessage.getData() != null) {\r\n Log.d(\"FIREBASE\", \"DATOS RECIBIDOS\");\r\n Log.d(\"FIREBASE\", \"Usuario: \" + remoteMessage.getData().get(\"usuario\"));\r\n Log.d(\"FIREBASE\", \"Estado: \" + remoteMessage.getData().get(\"estado\"));\r\n }\r\n\r\n //super.onMessageReceived(remoteMessage);\r\n /*String from = remoteMessage.getFrom();\r\n String title = remoteMessage.getNotification().getTitle();\r\n String message = remoteMessage.getNotification().getBody();\r\n Log.d(TAG, \"Mensaje Recibido de: \"+ from + \"\\nTitulo:\"+title+\" Mensaje: \"+message);\r\n mostrarNotificacion(title, message);*/\r\n /*if(remoteMessage.getNotification()!=null)\r\n {\r\n Log.d(TAG, \"Notificacion: \"+ remoteMessage.getNotification().getBody());\r\n //mostrarNotificacion(remoteMessage.getNotification().getTitle(), remoteMessage.getNotification().getBody());\r\n }\r\n if(remoteMessage.getData().size()>0)\r\n {\r\n Log.d(TAG, \"data: \"+ remoteMessage.getData());\r\n }*/\r\n }",
"@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n Log.i(\"hell\", \"From: \" + remoteMessage.getData());\n Log.d(TAG, \"From: \" + remoteMessage.getFrom());\n Log.d(TAG, \"Notification Message Body: \" + remoteMessage.getData().get(\"message\"));\n// UpdaterService.Updater updater new UpdaterService.Updater();\n //Calling method to generate notification\n// scroll();\n SharedPreferences sharedPreferences = this.getSharedPreferences(\"user\",0);\n\n IcebreakerNotification message = new IcebreakerNotification();\n message.setMessage(remoteMessage.getData().get(\"message\"));\n message.setFrom(remoteMessage.getData().get(\"title\"));\n message.setTo(sharedPreferences.getString(\"enroll\",\"\"));\n MessageDb db = new MessageDb(MyFirebaseMessagingService.this);\n if (remoteMessage.getData().get(\"type\").equalsIgnoreCase(\"deliver\")){\n db.updateMessage(remoteMessage.getData().get(\"id\"));\n\n }\n else if(remoteMessage.getData().get(\"type\").equalsIgnoreCase(\"random\")){\n sendNotification(remoteMessage.getData().get(\"title\"), remoteMessage.getData().get(\"message\"),1,1,1);\n RandomChat randomChat;\n Gson gson = new Gson();\n randomChat = gson.fromJson(remoteMessage.getData().get(\"profile\"),RandomChat.class);\n db.addRandom(randomChat,Long.parseLong(remoteMessage.getData().get(\"time\")));\n\n\n }\n else {\n jsonObject = new JsonObject();\n jsonObject.addProperty(\"to\",message.getFrom());\n jsonObject.addProperty(\"from\", remoteMessage.getFrom());\n jsonObject.addProperty(\"id\",remoteMessage.getData().get(\"id\"));\n jsonObject.addProperty(\"type\",\"deliver\");\n sendDeliver();\n Log.i(\"hell\", String.valueOf(db.getChatId(message)));\n if (db.getChatId(message) == 0){\n db.addChat(message,System.currentTimeMillis());\n// db.addContact(message.getFrom());\n }\n db.updateChat(db.getChatId(message),System.currentTimeMillis());\n\n db.addMessage(message.getMessage(), db.getChatId(message),Long.parseLong(remoteMessage.getData().get(\"id\")),0,Long.parseLong(remoteMessage.getData().get(\"time\")),0);\n// ChatActivity.adapter.notifyDataSetChanged();\n if (isAppIsInBackground(this)) {\n\n sendNotification(remoteMessage.getData().get(\"title\"), remoteMessage.getData().get(\"message\"), db.unread(),db.unreadChat(),0);\n db.close();\n }\n else\n {\n final MediaPlayer mp = MediaPlayer.create(this, R.raw.sound);\n mp.start();\n }\n }\n Intent intent;\n intent = new Intent(BROADCAST_ACTION);\n sendBroadcast(intent);\n Intent intent2;\n intent2 = new Intent(BROADCAST_HOME);\n sendBroadcast(intent2);\n\n// bindService(UpdaterService,null,null);\n }",
"@Override\n\tpublic void onMessageRecieved(Message arg0) {\n\t\t\n\t}",
"private void postNotification(RoutingContext routingContext) {\n String body = routingContext.getBodyAsString();\n\n String response = \"\";\n \n try {\n // Send FCM message content.\n OutputStream outputStream;\n outputStream = fcmConn.getOutputStream();\n outputStream.write(body.getBytes());\n\n // Read FCM response.\n InputStream inputStream = fcmConn.getInputStream();\n response = IOUtils.toString(inputStream);\n logger.debug(response);\n\n response(routingContext, 201, response);\n\n } catch (IOException e) {\n System.out.println(\"Unable to send FCM message.\");\n System.out.println(\"Please ensure that API_KEY has been replaced by the server \" +\n \"API key, and that the device's registration token is correct (if specified).\");\n logger.debug(e.getMessage());\n \n JsonObject obj = new JsonObject();\n obj.put(\"error\", e.getMessage());\n \n response(routingContext, 404, obj);\n } \n \n }",
"@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n Log.d(TAG, \"From: \" + remoteMessage.getFrom());\n\n // Check if message contains a data payload.\n if (remoteMessage.getData().size() > 0) {\n Log.d(TAG, \"Message Data Payload Received\");\n Log.d(TAG, \"Message data payload: \" + remoteMessage.getData());\n\n }\n\n // Check if message contains a notification payload.\n if (remoteMessage.getNotification() != null) {\n //buildNotification(remoteMessage);\n Log.d(TAG, \"Message Notification Payload Received\");\n Log.d(TAG, \"Message Notification Title: \" + remoteMessage.getNotification().getTitle());\n Log.d(TAG, \"Message Notification Body: \" + remoteMessage.getNotification().getBody());\n }\n\n // Also if you intend on generating your own notifications as a result of a received FCM\n // message, here is where that should be initiated. See sendNotification method below.\n //TODO: this\n }",
"@Override\n public void onMessageReceived(String from, Bundle data) {\n Log.i(TAG,\"###### onMessageReceived, data: \" + data.toString());\n String message = data.getString(\"message\");\n if (message != null) {\n Log.d(TAG, \"** GCM message From: \" + from);\n Log.d(TAG, \"Message: \" + message);\n sendNotification(message);\n return;\n }\n// message = data.getString(\"track\");\n// if (message != null) {\n// LocationTrackerDTO m = GSON.fromJson(message, LocationTrackerDTO.class);\n// Log.d(TAG, \"** GCM track message From: \" + from);\n// Log.d(TAG, \"Track: \" + message);\n// sendNotification(m);\n// return;\n// }\n// message = data.getString(\"simpleMessage\");\n// if (message != null) {\n// SimpleMessageDTO m = GSON.fromJson(message, SimpleMessageDTO.class);\n// m.setDateReceived(new Date().getTime());\n// if (m.getLocationRequest() == null) {\n// m.setLocationRequest(Boolean.FALSE);\n// }\n// Log.d(TAG, \"** GCM simpleMessage From: \" + from);\n// Log.d(TAG, \"SimpleMessage: \" + m.getMessage());\n// broadcastMessage(m);\n// return;\n// }\n\n }",
"protected void onMessage(String channel, String sender, String login, String realName, String message) {}",
"@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n // [START_EXCLUDE]\n // There are two types of messages data messages and notification messages. Data messages are handled\n // here in onMessageReceived whether the app is in the foreground or background. Data messages are the type\n // traditionally used with GCM. Notification messages are only received here in onMessageReceived when the app\n // is in the foreground. When the app is in the background an automatically generated notification is displayed.\n // When the user taps on the notification they are returned to the app. Messages containing both notification\n // and data payloads are treated as notification messages. The Firebase console always sends notification\n // messages. For more see: https://firebase.google.com/docs/cloud-messaging/concept-options\n // [END_EXCLUDE]\n\n // TODO(developer): Handle FCM messages here.\n // Not getting messages here? See why this may be: https://goo.gl/39bRNJ\n Log.d(TAG, \"From: \" + remoteMessage.getFrom());\n\n // Check if message contains a data payload.\n if (remoteMessage.getData().size() > 0) {\n int type = Integer.parseInt(remoteMessage.getData().get(\"type\"));\n Bundle bundle = new Bundle();\n ;\n if (type == 0) {\n Poll incomingPoll = new Poll();\n String sub_contact = remoteMessage.getData().get(\"sub_contact\");\n Box<User> userBox = App.getInstance().getBoxStore().boxFor(User.class);\n incomingPoll.subject.setTarget(userBox.query().equal(User_.contact, sub_contact).build().findFirst());\n String question = remoteMessage.getData().get(\"question\").replaceAll(\"<.*>\", incomingPoll.subject.getTarget().name);\n incomingPoll.setQuestion(question);\n incomingPoll.setType(1);\n incomingPoll.setPollHash(remoteMessage.getData().get(\"poll_hash\"));\n String[] options = remoteMessage.getData().get(\"options\").replace(\"[\", \"\").replace(\"]\", \"\").split(\",\");\n for (String option : options) {\n incomingPoll.insertOption(option);\n }\n Box<Poll> pollBoxBox = App.getInstance().getBoxStore().boxFor(Poll.class);\n pollBoxBox.put(incomingPoll);\n EventBus.getDefault().post(new UpdatePoll(\"You got new poll \"));\n sendNotification(\"New question asked to you\");\n\n }\n if (type == 1) {\n Box<Thread> threadBox = App.getInstance().getBoxStore().boxFor(Thread.class);\n Thread outgoingthreadCumPoll = threadBox.query().equal(Thread_.threadHash, remoteMessage.getData().get(\"poll_hash\")).build().findFirst();\n assert outgoingthreadCumPoll != null;\n outgoingthreadCumPoll.setUnreadCount(outgoingthreadCumPoll.getUnreadCount() + 1);\n outgoingthreadCumPoll.increamentVote_counts();\n outgoingthreadCumPoll.setResultString(remoteMessage.getData().get(\"option_count\").replace(\"[\", \"\").replace(\"]\", \"\"));\n threadBox.put(outgoingthreadCumPoll);\n EventBus.getDefault().post(new UpdatePoll(\"Got an upvote\"));\n EventBus.getDefault().post(new UpdateThread(1, outgoingthreadCumPoll));\n sendNotification(\"Someone anwsered your question\");\n\n }\n if (type == 2) {\n String contact = remoteMessage.getData().get(\"user_contact\");\n Box<User> userBox = App.getInstance().getBoxStore().boxFor(User.class);\n if (!userBox.find(User_.contact, contact).isEmpty()) {\n User user = userBox.find(User_.contact, contact).get(0);\n if (!user.getKnows_me()) {\n ArrayList<String> contacts = new ArrayList<String>();\n contacts.add(contact);\n try {\n ApiCalls.syncContacts(this, 1, contacts);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }\n sendNotification(contact + \" added you in his network\");\n\n }\n if (type == 3) {\n String contact = remoteMessage.getData().get(\"user_contact\");\n Box<User> userBox = App.getInstance().getBoxStore().boxFor(User.class);\n if (!userBox.find(User_.contact, contact).isEmpty()) {\n User user = userBox.find(User_.contact, contact).get(0);\n user.setKnows_me(true);\n userBox.put(user);\n }\n sendNotification(contact + \" accepted your request\");\n }\n\n if (type == 4) {\n Poll incomingOpenPoll = new Poll();\n String question = remoteMessage.getData().get(\"question\");\n incomingOpenPoll.setQuestion(question);\n incomingOpenPoll.setType(1);\n incomingOpenPoll.setPollHash(remoteMessage.getData().get(\"poll_hash\"));\n String[] options = remoteMessage.getData().get(\"options\").replace(\"[\", \"\").replace(\"]\", \"\").split(\",\");\n for (String option : options) {\n incomingOpenPoll.insertOption(option);\n }\n Box<Poll> pollBoxBox = App.getInstance().getBoxStore().boxFor(Poll.class);\n pollBoxBox.put(incomingOpenPoll);\n EventBus.getDefault().post(new UpdatePoll(\"You got new open poll \"));\n sendNotification(\"New question asked to you\");\n }\n if (type == 5) {\n Poll incomingThread = new Poll();\n String sub_contact = remoteMessage.getData().get(\"sub_contact\");\n Box<User> userBox = App.getInstance().getBoxStore().boxFor(User.class);\n incomingThread.subject.setTarget(userBox.query().equal(User_.contact, sub_contact).build().findFirst());\n String question = remoteMessage.getData().get(\"question\").replaceAll(\"<.*>\", incomingThread.subject.getTarget().name);\n incomingThread.setQuestion(question);\n incomingThread.setType(1);\n incomingThread.setSender(remoteMessage.getData().get(\"passkey\"));\n incomingThread.setThread(true);\n incomingThread.setPollHash(remoteMessage.getData().get(\"thread_hash\"));\n Box<Poll> pollBox = App.getInstance().getBoxStore().boxFor(Poll.class);\n pollBox.put(incomingThread);\n EventBus.getDefault().post(new UpdatePoll(\"You received a thread invitation \"));\n sendNotification(\"You received a thread invitation\");\n\n }\n\n if (type == 6) {\n Poll incomingOpenThread = new Poll();\n String question = remoteMessage.getData().get(\"question\");\n incomingOpenThread.setQuestion(question);\n incomingOpenThread.setType(1);\n incomingOpenThread.setThread(true);\n incomingOpenThread.setSender(remoteMessage.getData().get(\"passkey\"));\n incomingOpenThread.setPollHash(remoteMessage.getData().get(\"thread_hash\"));\n Box<Poll> pollBox = App.getInstance().getBoxStore().boxFor(Poll.class);\n pollBox.put(incomingOpenThread);\n EventBus.getDefault().post(new UpdatePoll(\"You received a thread invitation \"));\n sendNotification(\"You received a thread invitation\");\n }\n\n if (type == 7) {\n Box<Thread> threadBox = App.getInstance().getBoxStore().boxFor(Thread.class);\n Thread thread = threadBox.query().equal(Thread_.threadHash, remoteMessage.getData().get(\"thread_hash\")).build().findFirst();\n assert thread != null;\n Message message = new Message(remoteMessage.getData().get(\"message\"), remoteMessage.getData().get(\"passkey\") + thread.getPasskey());\n thread.setDialogPhoto(remoteMessage.getData().get(\"passkey\") + thread.getPasskey());\n thread.setLastMessage(message);\n thread.setUnreadCount(thread.getUnreadCount() + 1);\n threadBox.put(thread);\n EventBus.getDefault().post(new MessageList(message));\n EventBus.getDefault().post(new UpdateThread(1, thread));\n sendNotification(\"Message received\");\n }\n// if (/* Check if data needs to be processed by long running job */ false) {\n// // For long-running tasks (10 seconds or more) use Firebase Job Dispatcher.\n// scheduleJob();\n// } else {\n// // Handle message within 10 seconds\n// handleNow();\n// }\n\n }\n\n // Check if message contains a notification payload.\n if (remoteMessage.getNotification() != null) {\n Log.d(TAG, \"Message Notification Body: \" + remoteMessage.getNotification().getTitle());\n }\n\n // Also if you intend on generating your own notifications as a result of a received FCM\n // message, here is where that should be initiated. See sendNotification method below.\n }",
"@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n Log.i(TAG, \"From: \" + remoteMessage.getFrom());\n sendOnChannel1();\n sendOnChannel2();\n if (remoteMessage == null)\n return;\n\n // Check if message contains a notification payload.\n if (remoteMessage.getNotification() != null) {\n Log.e(TAG, \"Notification Body: \" + remoteMessage.getNotification().getBody());\n // handleNotification(remoteMessage.getNotification().getBody());\n // sendMyBroadCast(remoteMessage.getNotification().getBody());\n }\n\n // Check if message contains a data payload.\n if (remoteMessage.getData().size() > 0) {\n Log.e(TAG, \"Data Payload: \" + remoteMessage.getData().toString());\n\n try {\n JSONObject json = new JSONObject(remoteMessage.getData().toString());\n // handleDataMessage(json);\n // sendMyBroadCast(remoteMessage.getData().toString());\n } catch (Exception e) {\n Log.e(TAG, \"Exception: \" + e.getMessage());\n }\n }\n }",
"@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n // [START_EXCLUDE]\n // There are two types of messages data messages and notification messages. Data messages are handled\n // here in onMessageReceived whether the app is in the foreground or background. Data messages are the type\n // traditionally used with GCM. Notification messages are only received here in onMessageReceived when the app\n // is in the foreground. When the app is in the background an automatically generated notification is displayed.\n // When the user taps on the notification they are returned to the app. Messages containing both notification\n // and data payloads are treated as notification messages. The Firebase console always sends notification\n // messages. For more see: https://firebase.google.com/docs/cloud-messaging/concept-options\n // [END_EXCLUDE]\n\n // Not getting messages here? See why this may be: https://goo.gl/39bRNJ\n\n // Check if message contains a data payload.\n if (remoteMessage.getData().size() > 0)\n {\n if (/* Check if data needs to be processed by long running job */ false) {\n // For long-running tasks (10 seconds or more) use Firebase Job Dispatcher.\n scheduleJob();\n } else {\n // Handle message within 10 seconds\n handleNow(remoteMessage.getData());\n }\n\n }\n\n // Check if message contains a notification payload.\n if (remoteMessage.getNotification() != null)\n {\n\n }\n\n // Also if you intend on generating your own notifications as a result of a received FCM\n // message, here is where that should be initiated. See sendNotification method below.\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE)) {\n // FCM successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n FirebaseMessaging.getInstance().subscribeToTopic(Config.TOPIC_GLOBAL);\n\n\n } else if (intent.getAction().equals(Config.PUSH_NOTIFICATION)) {\n // new push notification is received\n\n String message = intent.getStringExtra(\"message\");\n\n String JSON_DATA = sessionManager.getPushNotification();\n\n try {\n JSONObject jsonObject = new JSONObject(JSON_DATA);\n\n if (jsonObject.getJSONObject(\"custom\").has(\"chat_status\") && jsonObject.getJSONObject(\"custom\").getJSONObject(\"chat_status\").getString(\"status\").equals(\"New message\")) {\n\n //getChatConversationList();\n String cumessage = jsonObject.getJSONObject(\"custom\").getJSONObject(\"chat_status\").getString(\"message\");\n ReceiveDateModel receiveDateModel;//=new ReceiveDateModel();\n String dateResp = String.valueOf(jsonObject.getJSONObject(\"custom\").getJSONObject(\"chat_status\").getJSONObject(\"received_date_time\"));\n changeChatIcon(1);\n //Resumes the Fragement and Gets the data from Api\n Fragment fragment = myAdapter.getFragment(2);\n if (fragment != null) {\n //fragment.onResume();\n fragment.setUserVisibleHint(true);\n }\n }\n if (jsonObject.getJSONObject(\"custom\").has(\"match_status\") && jsonObject.getJSONObject(\"custom\").getJSONObject(\"match_status\").getString(\"match_status\").equals(\"Yes\")){\n changeChatIcon(1);\n //Resumes the Fragement and Gets the data from Api\n Fragment fragment = myAdapter.getFragment(2);\n if (fragment != null) {\n //fragment.onResume();\n fragment.setUserVisibleHint(true);\n }\n }\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE)) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n FirebaseMessaging.getInstance().subscribeToTopic(Config.TOPIC_GLOBAL);\n Log.e(TAG, \"USER_ID: \" + Preferences.get(Constants.USER_ID));\n if (Preferences.contains(Constants.USER_ID) && Preferences.get(Constants.USER_ID) != null) {\n if (!Preferences.get(Constants.USER_ID).equalsIgnoreCase(\"0\"))\n displayFirebaseRegId();\n }\n\n } else if (intent.getAction().equals(Config.PUSH_NOTIFICATION)) {\n // new push notification is received\n\n String message = intent.getStringExtra(\"message\");\n\n Toast.makeText(getApplicationContext(), \"Push notification: \" + message, Toast.LENGTH_LONG).show();\n }\n }",
"public void OnMessageReceived(String msg);",
"@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(CommonVariables.REGISTRATION_COMPLETE)) {\n\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n FirebaseMessaging.getInstance().subscribeToTopic(CommonVariables.TOPIC_GLOBAL);\n\n } else if (intent.getAction().equals(CommonVariables.PUSH_NOTIFICATION)) {\n // new push notification is received\n String message = intent.getStringExtra(\"message\");\n Toast.makeText(getApplicationContext(), \"Push notification: \" + message, Toast.LENGTH_LONG).show();\n }\n }",
"private void processCustomMessage(Context context, Bundle bundle) {\n//\t\tif (MainActivity.isForeground) {\n\t\t\tString message = bundle.getString(JPushInterface.EXTRA_MESSAGE);\n\t\t\tString extras = bundle.getString(JPushInterface.EXTRA_EXTRA);\n//\t\t\tIntent msgIntent = new Intent(MainActivity.MESSAGE_RECEIVED_ACTION);\n//\t\t\tmsgIntent.putExtra(MainActivity.KEY_MESSAGE, message);\n//\t\t\tif (!ExampleUtil.isEmpty(extras)) {\n\t\t\t\ttry {\n\t\t\t\t\tJSONObject extraJson = new JSONObject(extras);\n//\t\t\t\t\tif (extraJson.length() > 0) {\n//\t\t\t\t\t\tmsgIntent.putExtra(MainActivity.KEY_EXTRAS, extras);\n//\t\t\t\t\t}\n\t\t\t\t} catch (JSONException e) {\n\n\t\t\t\t}\n\n//\t\t\t}\n//\t\t\tLocalBroadcastManager.getInstance(context).sendBroadcast(msgIntent);\n//\t\t}\n\t}",
"protected abstract void onReceiveMessage(Context context, Intent intent);",
"public boolean handleAppboyAdmMessage(Context context, Intent intent) {\n NotificationManager notificationManager = (NotificationManager) context.getSystemService(\"notification\");\n if (\"deleted_messages\".equals(intent.getStringExtra(\"message_type\"))) {\n int intExtra = intent.getIntExtra(ADM_NUMBER_OF_MESSAGES_DELETED_KEY, -1);\n if (intExtra == -1) {\n String str = TAG;\n AppboyLogger.e(str, \"Unable to parse ADM message. Intent: \" + intent.toString());\n } else {\n String str2 = TAG;\n AppboyLogger.i(str2, \"ADM deleted \" + intExtra + \" messages. Fetch them from Appboy.\");\n }\n return false;\n }\n Bundle extras = intent.getExtras();\n String str3 = TAG;\n AppboyLogger.d(str3, \"Push message payload received: \" + extras);\n if (!extras.containsKey(Constants.APPBOY_PUSH_RECEIVED_TIMESTAMP_MILLIS)) {\n extras.putLong(Constants.APPBOY_PUSH_RECEIVED_TIMESTAMP_MILLIS, System.currentTimeMillis());\n }\n AppboyNotificationUtils.logPushDeliveryEvent(context, extras);\n Bundle appboyExtrasWithoutPreprocessing = AppboyNotificationUtils.getAppboyExtrasWithoutPreprocessing(extras);\n extras.putBundle(Constants.APPBOY_PUSH_EXTRAS_KEY, appboyExtrasWithoutPreprocessing);\n if (AppboyNotificationUtils.isNotificationMessage(intent)) {\n int notificationId = AppboyNotificationUtils.getNotificationId(extras);\n extras.putInt(Constants.APPBOY_PUSH_NOTIFICATION_ID, notificationId);\n Notification createNotification = AppboyNotificationUtils.getActiveNotificationFactory().createNotification(new AppboyConfigurationProvider(context), context, extras, appboyExtrasWithoutPreprocessing);\n if (createNotification == null) {\n AppboyLogger.d(TAG, \"Notification created by notification factory was null. Not displaying notification.\");\n return false;\n }\n notificationManager.notify(Constants.APPBOY_PUSH_NOTIFICATION_TAG, notificationId, createNotification);\n AppboyNotificationUtils.sendPushMessageReceivedBroadcast(context, extras);\n AppboyNotificationUtils.wakeScreenIfHasPermission(context, extras);\n if (!extras.containsKey(Constants.APPBOY_PUSH_NOTIFICATION_DURATION_KEY)) {\n return true;\n }\n AppboyNotificationUtils.setNotificationDurationAlarm(context, getClass(), notificationId, Integer.parseInt(extras.getString(Constants.APPBOY_PUSH_NOTIFICATION_DURATION_KEY)));\n return true;\n }\n AppboyNotificationUtils.sendPushMessageReceivedBroadcast(context, extras);\n AppboyNotificationUtils.requestGeofenceRefreshIfAppropriate(context, extras);\n return false;\n }",
"@Override\n protected void onMessage(Context context, Intent intent) {\n Log.i(TAG, \"Received message\");\n String message = intent.getExtras().getString(\"price\");\n \n // notifies user\n generateNotification(context, message);\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE)) {\n Log.e(\"vikas\",\"asklajeuireyqweweyytuiouiouiouiouiouiouiouiouiouio\");\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n FirebaseMessaging.getInstance().subscribeToTopic(Config.TOPIC_GLOBAL);\n\n displayFirebaseRegId();\n\n } else if (intent.getAction().equals(Config.PUSH_NOTIFICATION)) {\n // new push notification is received\n new FetchCountTask().execute();\n\n\n // updateNotificationsBadge(cont);\n Log.e(\"vikas\",\"asklajeuireyqweweyytuiouiouiouiouiouiouiouiouiouiozxcvbnmsddff\");\n\n String message = intent.getStringExtra(\"message\");\n\n Toast.makeText(getApplicationContext(), \"Push notification: \" + message, Toast.LENGTH_LONG).show();\n\n //txtMessage.setText(message);\n }\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE)) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n FirebaseMessaging.getInstance().subscribeToTopic(Config.TOPIC_GLOBAL);\n\n FirebaseInstanceId.getInstance().getInstanceId().addOnSuccessListener( Homescreen.this, new OnSuccessListener<InstanceIdResult>() {\n @Override\n public void onSuccess(InstanceIdResult instanceIdResult) {\n String updatedToken = instanceIdResult.getToken();\n Log.e(\"Updated Token\",updatedToken);\n if (!TextUtils.isEmpty(updatedToken))\n register_device(updatedToken);\n else\n Toast.makeText(getApplicationContext(), \"Firebase Reg Id is not received yet!\", Toast.LENGTH_SHORT).show();\n\n }\n });\n\n } else if (intent.getAction().equals(Config.PUSH_NOTIFICATION)) {\n // new push notification is received\n\n String message = intent.getStringExtra(\"message\");\n\n Toast.makeText(getApplicationContext(), \"Push notification: \" + message, Toast.LENGTH_LONG).show();\n\n }\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE)) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n String token = intent.getStringExtra(\"token\");\n\n //Toast.makeText(getContext().getApplicationContext(), \"GCM registration token: \" + token, Toast.LENGTH_LONG).show();\n\n } else if (intent.getAction().equals(Config.SENT_TOKEN_TO_SERVER)) {\n // gcm registration id is stored in our server's MySQL\n\n //Toast.makeText(getContext().getApplicationContext(), \"GCM registration token is stored in server!\", Toast.LENGTH_LONG).show();\n\n } else if (intent.getAction().equals(Config.PUSH_NOTIFICATION)) {\n // new push notification is received\n NotificationUtils notificationUtils = new NotificationUtils();\n notificationUtils.playNotificationSound();\n String message = intent.getStringExtra(\"message\");\n String from = intent.getStringExtra(\"from\");\n String time = intent.getStringExtra(\"time\");\n String other = intent.getStringExtra(\"otherId\");\n\n getHistory();\n\n //Toast.makeText(getApplicationContext(), from + \": \" + message + \" \" + other, Toast.LENGTH_LONG).show();\n //saveToPreferences(MainActivity.this,KEY_NOTIFICATIONS,null);\n }\n }",
"@Override\n public void onSuccess(String messageId) {\n System.out.println(messageId);\n }",
"@Override\r\n public void handleMessage(Message msg) {\n }",
"@Override\r\n public void onMessageReceived(final RemoteMessage remoteMessage) {\n Log.d(TAG, \"From: \" + remoteMessage.getFrom());\r\n Log.d(TAG, \"Notification Message Body: \" + remoteMessage.getNotification().getBody());\r\n Handler handler = new Handler(Looper.getMainLooper());\r\n handler.post(new Runnable() {\r\n public void run() {\r\n Toast.makeText(getApplicationContext(), \"Push notification received:\\n\"\r\n + remoteMessage.getNotification().getBody(), Toast.LENGTH_LONG).show();\r\n }\r\n });\r\n\r\n }",
"void onMessageReceived(Message message);",
"public void receivePushNotification() {\n mBroadcastReceiver = new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent) {\n\n // checking for type intent filter\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE)) {\n // FCM successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n FirebaseMessaging.getInstance().subscribeToTopic(Config.TOPIC_GLOBAL);\n\n\n } else if (intent.getAction().equals(Config.PUSH_NOTIFICATION)) {\n // new push notification is received\n\n String message = intent.getStringExtra(\"message\");\n\n String JSON_DATA = sessionManager.getPushNotification();\n\n try {\n JSONObject jsonObject = new JSONObject(JSON_DATA);\n\n if (jsonObject.getJSONObject(\"custom\").has(\"chat_status\") && jsonObject.getJSONObject(\"custom\").getJSONObject(\"chat_status\").getString(\"status\").equals(\"New message\")) {\n\n //getChatConversationList();\n String cumessage = jsonObject.getJSONObject(\"custom\").getJSONObject(\"chat_status\").getString(\"message\");\n ReceiveDateModel receiveDateModel;//=new ReceiveDateModel();\n String dateResp = String.valueOf(jsonObject.getJSONObject(\"custom\").getJSONObject(\"chat_status\").getJSONObject(\"received_date_time\"));\n changeChatIcon(1);\n //Resumes the Fragement and Gets the data from Api\n Fragment fragment = myAdapter.getFragment(2);\n if (fragment != null) {\n //fragment.onResume();\n fragment.setUserVisibleHint(true);\n }\n }\n if (jsonObject.getJSONObject(\"custom\").has(\"match_status\") && jsonObject.getJSONObject(\"custom\").getJSONObject(\"match_status\").getString(\"match_status\").equals(\"Yes\")){\n changeChatIcon(1);\n //Resumes the Fragement and Gets the data from Api\n Fragment fragment = myAdapter.getFragment(2);\n if (fragment != null) {\n //fragment.onResume();\n fragment.setUserVisibleHint(true);\n }\n }\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }\n };\n }",
"@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n super.onMessageReceived(remoteMessage);\n //Log.d(TAG, \"From: \" + remoteMessage.getFrom());\n Log.d(TAG, \"Notification Message Body: \" + remoteMessage.getData());\n\n long[] pattern = {500,500,500,500,500};\n\n Uri defaultSoundUri= RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n\n if (remoteMessage.getData() != null) {\n\n Intent intent;\n intent = new Intent(this, MainActivity.class);\n\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /* request code */, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n //NotificationManager notificationManager = new NotificationUtils(this).getManager();\n Notification notification = new Notification();\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n notification = new NotificationCompat.Builder(this)\n .setDefaults(Notification.DEFAULT_ALL)\n .setContentTitle(remoteMessage.getData().get(\"title\"))\n .setContentText(remoteMessage.getData().get(\"body\"))\n .setChannelId(\"com.example.fakenews.ANDROID\")\n .setSmallIcon(com.google.firebase.R.drawable.notify_panel_notification_icon_bg)\n .setAutoCancel(true)\n .setVibrate(pattern)\n .setLights(Color.BLUE, 1, 1)\n .setSound(defaultSoundUri)\n .setContentIntent(pendingIntent)\n .setVisibility(NotificationCompat.VISIBILITY_PUBLIC)\n .build();\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {\n //Log.d(TAG, String.valueOf(notificationManager.getImportance()));\n\n //Log.d(TAG, \"notificacion: \" + notificationManager.getActiveNotifications().toString());\n }\n }\n\n NotificationManagerCompat manager = NotificationManagerCompat.from(getApplicationContext());\n manager.notify(new Random().nextInt(), notification);\n //manager.notify(0, notification);\n\n Log.d(TAG,notification.toString());\n Log.d(TAG, String.valueOf(manager.areNotificationsEnabled()));\n Log.d(TAG, String.valueOf(manager.getImportance()));\n\n\n\n }\n }",
"@Override\n\tpublic void onMessage(Object arg0) {\n\t\t\n\t}",
"public interface INotification {\n\n String WebService = \"https://fcm.googleapis.com/\";\n\n @Headers({\n \"Content-Type:application/json\",\n \"Authorization:key=AAAAnzTOKs8:APA91bFZ1fSBTifV40epf-sRpLrH8woY-ZgVWCHFcvHnokfbP3HSt8lUj2AXc0KkHEn3jfV1_SlhCzjTurAp6wbsDJhOjnsMNAFg5UrRuel0nJuJEPdgcaxgo20OPxMdWgKqcq3O0s5t\"\n })\n @POST(\"fcm/send\")\n Call<ReturnMessage> enviarNotificacao(@Body Sender body);\n\n\n //******************* SERVICE RETROFIT ******************************\n OkHttpClient okHttpClient = new OkHttpClient().newBuilder()\n .connectTimeout(15, TimeUnit.SECONDS)\n .readTimeout(30, TimeUnit.SECONDS)\n .writeTimeout(15, TimeUnit.SECONDS)\n .build();\n\n public static final Retrofit retrofit = new Retrofit.Builder()\n\n .baseUrl(WebService)\n .client(okHttpClient)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n //*******************************************************************\n\n\n}",
"public final void mo3318b(Intent intent) {\n Task a;\n Object obj;\n int hashCode;\n Bundle extras;\n String str;\n String action = intent.getAction();\n if (!\"com.google.android.c2dm.intent.RECEIVE\".equals(action)) {\n if (!\"com.google.firebase.messaging.RECEIVE_DIRECT_BOOT\".equals(action)) {\n if (\"com.google.firebase.messaging.NOTIFICATION_DISMISS\".equals(action)) {\n if (C2609b.m12812e(intent)) {\n C2609b.m12810c(intent);\n return;\n }\n } else if (\"com.google.firebase.messaging.NEW_TOKEN\".equals(action)) {\n m23080b(intent.getStringExtra(\"token\"));\n return;\n } else {\n action = \"FirebaseMessaging\";\n String str2 = \"Unknown intent action: \";\n intent = String.valueOf(intent.getAction());\n Log.d(action, intent.length() != 0 ? str2.concat(intent) : new String(str2));\n }\n return;\n }\n }\n CharSequence stringExtra = intent.getStringExtra(\"google.message_id\");\n int i = 2;\n if (TextUtils.isEmpty(stringExtra)) {\n a = Tasks.m12422a(null);\n } else {\n Bundle bundle = new Bundle();\n bundle.putString(\"google.message_id\", stringExtra);\n a = C2590d.m12738a((Context) this).m12740a(2, bundle);\n }\n if (!TextUtils.isEmpty(stringExtra)) {\n if (f17748b.contains(stringExtra)) {\n if (Log.isLoggable(\"FirebaseMessaging\", 3)) {\n String str3 = \"FirebaseMessaging\";\n String str4 = \"Received duplicate message: \";\n action = String.valueOf(stringExtra);\n Log.d(str3, action.length() != 0 ? str4.concat(action) : new String(str4));\n }\n obj = 1;\n if (obj == null) {\n action = intent.getStringExtra(\"message_type\");\n if (action == null) {\n action = \"gcm\";\n }\n hashCode = action.hashCode();\n if (hashCode != -2062414158) {\n if (action.equals(\"deleted_messages\")) {\n i = 1;\n switch (i) {\n case 0:\n if (C2609b.m12812e(intent)) {\n C2609b.m12807a(intent);\n }\n extras = intent.getExtras();\n if (extras == null) {\n extras = new Bundle();\n }\n extras.remove(\"android.support.content.wakelockid\");\n if (C2612d.m12818a(extras)) {\n if (!new C2612d(this).m12824c(extras)) {\n if (C2609b.m12812e(intent)) {\n C2609b.m12811d(intent);\n }\n }\n }\n m23076a(new RemoteMessage(extras));\n break;\n case 1:\n m23075a();\n break;\n case 2:\n m23077a(intent.getStringExtra(\"google.message_id\"));\n break;\n case 3:\n action = intent.getStringExtra(\"google.message_id\");\n if (action == null) {\n action = intent.getStringExtra(\"message_id\");\n }\n m23078a(action, new SendException(intent.getStringExtra(\"error\")));\n break;\n default:\n intent = \"FirebaseMessaging\";\n str = \"Received message with unknown type: \";\n action = String.valueOf(action);\n if (action.length() == 0) {\n action = new String(str);\n } else {\n action = str.concat(action);\n }\n Log.w(intent, action);\n break;\n }\n }\n } else if (hashCode != 102161) {\n if (action.equals(\"gcm\")) {\n i = 0;\n switch (i) {\n case 0:\n if (C2609b.m12812e(intent)) {\n C2609b.m12807a(intent);\n }\n extras = intent.getExtras();\n if (extras == null) {\n extras = new Bundle();\n }\n extras.remove(\"android.support.content.wakelockid\");\n if (C2612d.m12818a(extras)) {\n if (new C2612d(this).m12824c(extras)) {\n if (C2609b.m12812e(intent)) {\n C2609b.m12811d(intent);\n }\n }\n }\n m23076a(new RemoteMessage(extras));\n break;\n case 1:\n m23075a();\n break;\n case 2:\n m23077a(intent.getStringExtra(\"google.message_id\"));\n break;\n case 3:\n action = intent.getStringExtra(\"google.message_id\");\n if (action == null) {\n action = intent.getStringExtra(\"message_id\");\n }\n m23078a(action, new SendException(intent.getStringExtra(\"error\")));\n break;\n default:\n intent = \"FirebaseMessaging\";\n str = \"Received message with unknown type: \";\n action = String.valueOf(action);\n if (action.length() == 0) {\n action = str.concat(action);\n } else {\n action = new String(str);\n }\n Log.w(intent, action);\n break;\n }\n }\n } else if (hashCode != 814694033) {\n if (action.equals(\"send_error\")) {\n i = 3;\n switch (i) {\n case 0:\n if (C2609b.m12812e(intent)) {\n C2609b.m12807a(intent);\n }\n extras = intent.getExtras();\n if (extras == null) {\n extras = new Bundle();\n }\n extras.remove(\"android.support.content.wakelockid\");\n if (C2612d.m12818a(extras)) {\n if (new C2612d(this).m12824c(extras)) {\n if (C2609b.m12812e(intent)) {\n C2609b.m12811d(intent);\n }\n }\n }\n m23076a(new RemoteMessage(extras));\n break;\n case 1:\n m23075a();\n break;\n case 2:\n m23077a(intent.getStringExtra(\"google.message_id\"));\n break;\n case 3:\n action = intent.getStringExtra(\"google.message_id\");\n if (action == null) {\n action = intent.getStringExtra(\"message_id\");\n }\n m23078a(action, new SendException(intent.getStringExtra(\"error\")));\n break;\n default:\n intent = \"FirebaseMessaging\";\n str = \"Received message with unknown type: \";\n action = String.valueOf(action);\n if (action.length() == 0) {\n action = new String(str);\n } else {\n action = str.concat(action);\n }\n Log.w(intent, action);\n break;\n }\n }\n } else if (hashCode != 814800675) {\n if (action.equals(\"send_event\")) {\n switch (i) {\n case 0:\n if (C2609b.m12812e(intent)) {\n C2609b.m12807a(intent);\n }\n extras = intent.getExtras();\n if (extras == null) {\n extras = new Bundle();\n }\n extras.remove(\"android.support.content.wakelockid\");\n if (C2612d.m12818a(extras)) {\n if (new C2612d(this).m12824c(extras)) {\n if (C2609b.m12812e(intent)) {\n C2609b.m12811d(intent);\n }\n }\n }\n m23076a(new RemoteMessage(extras));\n break;\n case 1:\n m23075a();\n break;\n case 2:\n m23077a(intent.getStringExtra(\"google.message_id\"));\n break;\n case 3:\n action = intent.getStringExtra(\"google.message_id\");\n if (action == null) {\n action = intent.getStringExtra(\"message_id\");\n }\n m23078a(action, new SendException(intent.getStringExtra(\"error\")));\n break;\n default:\n intent = \"FirebaseMessaging\";\n str = \"Received message with unknown type: \";\n action = String.valueOf(action);\n if (action.length() == 0) {\n action = str.concat(action);\n } else {\n action = new String(str);\n }\n Log.w(intent, action);\n break;\n }\n }\n }\n i = -1;\n switch (i) {\n case 0:\n if (C2609b.m12812e(intent)) {\n C2609b.m12807a(intent);\n }\n extras = intent.getExtras();\n if (extras == null) {\n extras = new Bundle();\n }\n extras.remove(\"android.support.content.wakelockid\");\n if (C2612d.m12818a(extras)) {\n if (new C2612d(this).m12824c(extras)) {\n if (C2609b.m12812e(intent)) {\n C2609b.m12811d(intent);\n }\n }\n }\n m23076a(new RemoteMessage(extras));\n break;\n case 1:\n m23075a();\n break;\n case 2:\n m23077a(intent.getStringExtra(\"google.message_id\"));\n break;\n case 3:\n action = intent.getStringExtra(\"google.message_id\");\n if (action == null) {\n action = intent.getStringExtra(\"message_id\");\n }\n m23078a(action, new SendException(intent.getStringExtra(\"error\")));\n break;\n default:\n intent = \"FirebaseMessaging\";\n str = \"Received message with unknown type: \";\n action = String.valueOf(action);\n if (action.length() == 0) {\n action = str.concat(action);\n } else {\n action = new String(str);\n }\n Log.w(intent, action);\n break;\n }\n }\n Tasks.m12424a(a, 1, TimeUnit.SECONDS);\n }\n if (f17748b.size() >= 10) {\n f17748b.remove();\n }\n f17748b.add(stringExtra);\n }\n obj = null;\n if (obj == null) {\n action = intent.getStringExtra(\"message_type\");\n if (action == null) {\n action = \"gcm\";\n }\n hashCode = action.hashCode();\n if (hashCode != -2062414158) {\n if (action.equals(\"deleted_messages\")) {\n i = 1;\n switch (i) {\n case 0:\n if (C2609b.m12812e(intent)) {\n C2609b.m12807a(intent);\n }\n extras = intent.getExtras();\n if (extras == null) {\n extras = new Bundle();\n }\n extras.remove(\"android.support.content.wakelockid\");\n if (C2612d.m12818a(extras)) {\n if (new C2612d(this).m12824c(extras)) {\n if (C2609b.m12812e(intent)) {\n C2609b.m12811d(intent);\n }\n }\n }\n m23076a(new RemoteMessage(extras));\n break;\n case 1:\n m23075a();\n break;\n case 2:\n m23077a(intent.getStringExtra(\"google.message_id\"));\n break;\n case 3:\n action = intent.getStringExtra(\"google.message_id\");\n if (action == null) {\n action = intent.getStringExtra(\"message_id\");\n }\n m23078a(action, new SendException(intent.getStringExtra(\"error\")));\n break;\n default:\n intent = \"FirebaseMessaging\";\n str = \"Received message with unknown type: \";\n action = String.valueOf(action);\n if (action.length() == 0) {\n action = new String(str);\n } else {\n action = str.concat(action);\n }\n Log.w(intent, action);\n break;\n }\n }\n } else if (hashCode != 102161) {\n if (action.equals(\"gcm\")) {\n i = 0;\n switch (i) {\n case 0:\n if (C2609b.m12812e(intent)) {\n C2609b.m12807a(intent);\n }\n extras = intent.getExtras();\n if (extras == null) {\n extras = new Bundle();\n }\n extras.remove(\"android.support.content.wakelockid\");\n if (C2612d.m12818a(extras)) {\n if (new C2612d(this).m12824c(extras)) {\n if (C2609b.m12812e(intent)) {\n C2609b.m12811d(intent);\n }\n }\n }\n m23076a(new RemoteMessage(extras));\n break;\n case 1:\n m23075a();\n break;\n case 2:\n m23077a(intent.getStringExtra(\"google.message_id\"));\n break;\n case 3:\n action = intent.getStringExtra(\"google.message_id\");\n if (action == null) {\n action = intent.getStringExtra(\"message_id\");\n }\n m23078a(action, new SendException(intent.getStringExtra(\"error\")));\n break;\n default:\n intent = \"FirebaseMessaging\";\n str = \"Received message with unknown type: \";\n action = String.valueOf(action);\n if (action.length() == 0) {\n action = str.concat(action);\n } else {\n action = new String(str);\n }\n Log.w(intent, action);\n break;\n }\n }\n } else if (hashCode != 814694033) {\n if (action.equals(\"send_error\")) {\n i = 3;\n switch (i) {\n case 0:\n if (C2609b.m12812e(intent)) {\n C2609b.m12807a(intent);\n }\n extras = intent.getExtras();\n if (extras == null) {\n extras = new Bundle();\n }\n extras.remove(\"android.support.content.wakelockid\");\n if (C2612d.m12818a(extras)) {\n if (new C2612d(this).m12824c(extras)) {\n if (C2609b.m12812e(intent)) {\n C2609b.m12811d(intent);\n }\n }\n }\n m23076a(new RemoteMessage(extras));\n break;\n case 1:\n m23075a();\n break;\n case 2:\n m23077a(intent.getStringExtra(\"google.message_id\"));\n break;\n case 3:\n action = intent.getStringExtra(\"google.message_id\");\n if (action == null) {\n action = intent.getStringExtra(\"message_id\");\n }\n m23078a(action, new SendException(intent.getStringExtra(\"error\")));\n break;\n default:\n intent = \"FirebaseMessaging\";\n str = \"Received message with unknown type: \";\n action = String.valueOf(action);\n if (action.length() == 0) {\n action = new String(str);\n } else {\n action = str.concat(action);\n }\n Log.w(intent, action);\n break;\n }\n }\n } else if (hashCode != 814800675) {\n if (action.equals(\"send_event\")) {\n switch (i) {\n case 0:\n if (C2609b.m12812e(intent)) {\n C2609b.m12807a(intent);\n }\n extras = intent.getExtras();\n if (extras == null) {\n extras = new Bundle();\n }\n extras.remove(\"android.support.content.wakelockid\");\n if (C2612d.m12818a(extras)) {\n if (new C2612d(this).m12824c(extras)) {\n if (C2609b.m12812e(intent)) {\n C2609b.m12811d(intent);\n }\n }\n }\n m23076a(new RemoteMessage(extras));\n break;\n case 1:\n m23075a();\n break;\n case 2:\n m23077a(intent.getStringExtra(\"google.message_id\"));\n break;\n case 3:\n action = intent.getStringExtra(\"google.message_id\");\n if (action == null) {\n action = intent.getStringExtra(\"message_id\");\n }\n m23078a(action, new SendException(intent.getStringExtra(\"error\")));\n break;\n default:\n intent = \"FirebaseMessaging\";\n str = \"Received message with unknown type: \";\n action = String.valueOf(action);\n if (action.length() == 0) {\n action = str.concat(action);\n } else {\n action = new String(str);\n }\n Log.w(intent, action);\n break;\n }\n }\n }\n i = -1;\n switch (i) {\n case 0:\n if (C2609b.m12812e(intent)) {\n C2609b.m12807a(intent);\n }\n extras = intent.getExtras();\n if (extras == null) {\n extras = new Bundle();\n }\n extras.remove(\"android.support.content.wakelockid\");\n if (C2612d.m12818a(extras)) {\n if (new C2612d(this).m12824c(extras)) {\n if (C2609b.m12812e(intent)) {\n C2609b.m12811d(intent);\n }\n }\n }\n m23076a(new RemoteMessage(extras));\n break;\n case 1:\n m23075a();\n break;\n case 2:\n m23077a(intent.getStringExtra(\"google.message_id\"));\n break;\n case 3:\n action = intent.getStringExtra(\"google.message_id\");\n if (action == null) {\n action = intent.getStringExtra(\"message_id\");\n }\n m23078a(action, new SendException(intent.getStringExtra(\"error\")));\n break;\n default:\n intent = \"FirebaseMessaging\";\n str = \"Received message with unknown type: \";\n action = String.valueOf(action);\n if (action.length() == 0) {\n action = new String(str);\n } else {\n action = str.concat(action);\n }\n Log.w(intent, action);\n break;\n }\n }\n try {\n Tasks.m12424a(a, 1, TimeUnit.SECONDS);\n } catch (Intent intent2) {\n intent2 = String.valueOf(intent2);\n StringBuilder stringBuilder = new StringBuilder(String.valueOf(intent2).length() + 20);\n stringBuilder.append(\"Message ack failed: \");\n stringBuilder.append(intent2);\n Log.w(\"FirebaseMessaging\", stringBuilder.toString());\n }\n }",
"private void handleNow(RemoteMessage remoteMessage) {\n NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n String CHANNEL_ID_CHAT = \"myapp-01\";\n String CHANNEL_ID_GENERAL = \"myapp-02\";\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n\n // Channel 1\n CharSequence chatChannel = \"Chat\";\n String chatChannelDesc = \"Notifications from chat app\";\n int chatImportance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel mChatChannel = new NotificationChannel(CHANNEL_ID_CHAT, chatChannel, chatImportance);\n mChatChannel.setDescription(chatChannelDesc);\n mChatChannel.enableLights(true);\n mChatChannel.setLightColor(Color.BLUE);\n notificationManager.createNotificationChannel(mChatChannel);\n\n // Channel 2\n CharSequence generalChannel = \"General\";\n String generalChannelDesc = \"General notifications\";\n int generalImportance = NotificationManager.IMPORTANCE_HIGH;\n NotificationChannel mGeneralChannel = new NotificationChannel(CHANNEL_ID_GENERAL, generalChannel, generalImportance);\n mGeneralChannel.setDescription(generalChannelDesc);\n mGeneralChannel.enableLights(true);\n mGeneralChannel.setLightColor(Color.BLUE);\n notificationManager.createNotificationChannel(mGeneralChannel);\n\n }\n\n // Sending push notification to spesific channel\n Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n Intent intent1 = new Intent(getApplicationContext(), MainActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(getApplicationContext(), 123, intent1, PendingIntent.FLAG_UPDATE_CURRENT);\n NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(getApplicationContext(), CHANNEL_ID_CHAT)\n .setSmallIcon(R.drawable.xmen)\n .setBadgeIconType(R.drawable.xmen)\n .setChannelId(CHANNEL_ID_CHAT)\n .setAutoCancel(true)\n .setContentIntent(pendingIntent)\n .setNumber(1)\n .setSound(defaultSoundUri)\n .setColor(ContextCompat.getColor(this, R.color.white))\n .setWhen(System.currentTimeMillis());\n\n if (remoteMessage.getData().size() > 0) {\n notificationBuilder.setContentTitle(remoteMessage.getData().get(\"title\"));\n notificationBuilder.setContentText(remoteMessage.getData().get(\"message\"));\n }\n\n notificationManager.notify(getID(), notificationBuilder.build());\n }",
"@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n Log.d(TAG, \"From: \" + remoteMessage.getFrom());\n\n // Check if message contains a data payload.\n if (remoteMessage.getData().size() > 0) {\n //Log.d(TAG, \"Message data payload: \" + remoteMessage.getData().values().toArray()[0]);\n String text = (String) remoteMessage.getData().values().toArray()[0];\n sendMessageToActivity(text);\n\n }\n // Check if message contains a notification payload.\n if (remoteMessage.getNotification() != null) {\n Log.d(TAG, \"Message Notification Body: \" + remoteMessage.getNotification().getBody());\n }\n }",
"@Override\n public void onReceive(Context context, Intent intent)\n {\n String typeOfMessage = intent.getStringExtra(\"type\");\n\n //The WS sent us the name of the sender\n String sender = intent.getStringExtra(\"sender\");\n\n String username = intent.getStringExtra(\"username\");\n\n String messageText = intent.getStringExtra(\"message\");\n\n ActivityManager.RunningAppProcessInfo appProcessInfo = new ActivityManager.RunningAppProcessInfo();\n ActivityManager.getMyMemoryState(appProcessInfo);\n\n if (appProcessInfo.importance == IMPORTANCE_FOREGROUND || appProcessInfo.importance == IMPORTANCE_VISIBLE)\n {\n //app is in the foreground so send the message to the active Activities\n Log.d(\"PUSHY\", \"Message received in foreground: \" + messageText);\n\n //create an Intent to broadcast a message to other parts of the app.\n Intent i = new Intent(RECEIVED_NEW_MESSAGE);\n i.putExtra(\"TYPE\", typeOfMessage);\n i.putExtra(\"SENDER\", sender);\n i.putExtra(\"MESSAGE\", messageText);\n i.putExtras(intent.getExtras());\n\n Log.e(\"PUSHY RECEIVED \", i.getStringExtra(\"TYPE\"));\n Log.e(\"PUSHY RECEIVED \", i.getStringExtra(\"SENDER\"));\n Log.e(\"PUSHY RECEIVED \", i.getStringExtra(\"MESSAGE\"));\n\n context.sendBroadcast(i);\n\n }\n else if(messageText.compareTo(\"Deletion\") != 0)\n {\n //app is in the background so create and post a notification\n Log.d(\"PUSHY\", \"Message received in background: \" + messageText);\n\n Intent i = new Intent(context, LoginActivity.class);\n i.putExtras(intent.getExtras());\n\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, i, PendingIntent.FLAG_UPDATE_CURRENT);\n\n //research more on notifications the how to display them\n //https://developer.android.com/guide/topics/ui/notifiers/notifications\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context, CHANNEL_ID);\n builder.setAutoCancel(true);\n builder.setSmallIcon(R.drawable.ic_chat_notification);\n if(username != null)\n {\n if(messageText.compareTo(\"Your Friends List has recently been modified.\") == 0)\n {\n builder.setContentTitle(\"Friend Notification from: \" + username);\n }\n else {\n builder.setContentTitle(\"Message Notification from: \" + username);\n }\n }\n else if(messageText.compareTo(\"One of your friends has added you to a chat!\") == 0)\n {\n builder.setContentTitle(\"Chat Notification: \");\n }\n\n\n builder.setContentText(messageText);\n builder.setPriority(NotificationCompat.PRIORITY_DEFAULT);\n builder.setContentIntent(pendingIntent);\n\n // Automatically configure a ChatMessageNotification Channel for devices running Android O+\n Pushy.setNotificationChannel(builder, context);\n\n // Get an instance of the NotificationManager service\n NotificationManager notificationManager = (NotificationManager) context.getSystemService(context.NOTIFICATION_SERVICE);\n\n // Build the notification and display it\n notificationManager.notify(1, builder.build());\n }\n }",
"@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n if (remoteMessage.getData().size() > 0) {\n\n if(remoteMessage.getData().get(\"preferenceId\")!=null) {\n Intent intent = new Intent(\"preferenceIdMercadoPagoData\");\n intent.putExtra(\"preferenceId\", remoteMessage.getData().get(\"preferenceId\"));\n Log.e(\"firebase service\", \"llega\");\n broadcaster.sendBroadcast(intent);\n }\n\n if (remoteMessage.getData().get(\"aviso_titulo\")!=null\n && remoteMessage.getData().get(\"aviso_mensaje\")!=null\n && remoteMessage.getData().get(\"aviso_tipo\")!=null){\n\n showNotification(remoteMessage.getData().get(\"aviso_titulo\"),\n remoteMessage.getData().get(\"aviso_mensaje\"),\n remoteMessage.getData().get(\"aviso_tipo\"));\n }\n }\n\n // Check if message contains a notification payload.\n if (remoteMessage.getNotification() != null) {\n\n }\n }",
"@Override\n public void onMessage(String data) {\n\n log.e(\"ipcChannel received message: [\" + data + \"]\");\n\n try {\n JSONObject json = new JSONObject(data);\n\n onIpcMessage(json);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void onReceive(Context context, Intent intent)\n {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE))\n {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n tokenGCM = intent.getStringExtra(\"token\");\n sharedPreferences.putString(\"TOKEN\",tokenGCM);\n\n // Toast.makeText(getApplicationContext(), \"GCM registration token: \" + tokenGCM, Toast.LENGTH_LONG).show();\n\n }\n\n else if (intent.getAction().equals(Config.SENT_TOKEN_TO_SERVER))\n {\n // gcm registration id is stored in our server's MySQL\n\n //Toast.makeText(getApplicationContext(), \"GCM registration token is stored in server!\", Toast.LENGTH_LONG).show();\n\n }\n\n else if (intent.getAction().equals(Config.PUSH_NOTIFICATION))\n {\n // new push notification is received\n\n Log.w(\"ALERTA\", \"Push notification is received!\");\n\n //Toast.makeText(getApplicationContext(), \"Push notification is received!\", Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n public void onMessage(String channel, String message) {\n responseMessage = message;\n onPostExecute(responseMessage);\n }",
"@Override\n public void handleMessage(Message message) {}",
"@Override\n public void onTextMessage(Context context, XGPushTextMessage message) {\n String text = \"收到消息:\" + message.toString();\n IMPushManager.getInstance(context).handlePush(message.getContent());\n // 获取自定义key-value\n String customContent = message.getCustomContent();\n if (customContent != null && customContent.length() != 0) {\n try {\n JSONObject obj = new JSONObject(customContent);\n // key1为前台配置的key\n if (!obj.isNull(\"key\")) {\n String value = obj.getString(\"key\");\n Log.d(LogTag, \"get custom value:\" + value);\n }\n // ...\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n // APP自主处理消息的过程...\n Log.d(LogTag, text);\n\n }",
"@Override\n public void deliveryComplete(IMqttDeliveryToken token) {\n String str = \"\";\n try {\n str = new String(token.getMessage().getPayload());\n } catch (MqttException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void onReceiveDataChannelMessage(final String message) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n JSONObject receive = new JSONObject();\n try {\n receive = new JSONObject(message);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n ContentValues values = new ContentValues();\n String payload = \"\";\n try {\n values.put(\"timestamp\", receive.getString(\"timestamp\"));\n payload = receive.getString(\"payload\");\n values.put(\"data\", payload);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n if(!payload.equals(\"\")) {\n sql.insert(values);\n }else {\n Toast.makeText(headerView.getContext(), \"接收到錯誤的資料,請檢查App是否為最新版本\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n NavHostFragment navHostFragment = (NavHostFragment) getSupportFragmentManager().getFragments().get(0);\n try {\n HomeFragment home = (HomeFragment) navHostFragment.getChildFragmentManager().getFragments().get(0);\n home.updateHistory();\n }catch(Exception e) {\n e.printStackTrace();\n }\n\n if(!payload.equals(\"\")) {\n ClipData clip = ClipData.newPlainText(\"message\", payload);\n mClip.setPrimaryClip(clip);\n Toast.makeText(headerView.getContext(), \"剪貼簿已更新\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }",
"@Override\r\n public void onReceive(Context context, Intent intent) {\n \ttry{\r\n \t\tString message = \"\";\r\n ComponentName comp = new ComponentName(context.getPackageName(),\r\n GCMIntentService.class.getName());\r\n // Start the service, keeping the device awake while it is launching.\r\n startWakefulService(context, (intent.setComponent(comp)));\r\n setResultCode(Activity.RESULT_OK);\r\n String number = intent.getStringExtra(\"message\");\r\n \r\n JSONObject poke = new JSONObject(number);\r\n DataBaseHandler db = new DataBaseHandler(context);\r\n if(globals.contactsmain == null)\r\n \tglobals.contactsmain = db.getAllContacts();\r\n if(number.contains(\"messager\"))\r\n {\r\n \tString messager = poke.getString(\"messager\");\r\n \tString msg = poke.getString(\"message\");\r\n \t\r\n \t\r\n \tint i=globals.getposition(poke.getString(\"messager\"));\r\n \tif(i==-1)\r\n \t{\r\n \t\tLoadContacts lc = new LoadContacts();\r\n \t\tContact cnt = new Contact(lc.getContactName(poke.getString(\"messager\")),poke.getString(\"messager\"));\r\n \t\tglobals.contactsmain.add(cnt);\r\n \t\tdb.addContact(cnt);\r\n \t}\r\n \ti=globals.getposition(poke.getString(\"messager\"));\r\n \tglobals.contactsmain.get(i).setLastTime(System.currentTimeMillis());\r\n \tif(globals.contactsmain.get(i).getNew_message().equals(\"yes\"))\r\n \t{\r\n \t\tmsg = globals.contactsmain.get(i).getMessage() + \"\\n\" + msg; \r\n \t}\r\n globals.contactsmain.get(i).setMessage(msg);\r\n globals.contactsmain.get(i).setNew_message(\"yes\");\r\n db.updateMessage(messager, msg);\r\n \tdb.updateNewMessage(messager, \"yes\");\r\n message=\"\";\r\n message = \"Message:\\n\"+globals.contactsmain.get(i).getContactName() + \" - \" + msg;\r\n Intent intent2 = new Intent(\"update-view\");\r\n \t // You can also include some extra data.\r\n \r\n \t intent2.putExtra(\"type\", \"message\");\r\n \t LocalBroadcastManager.getInstance(context).sendBroadcast(intent2);\r\n }\r\n else if (number.contains(\"poker\"))\r\n {\r\n \tint i=globals.getposition(poke.getString(\"poker\"));\r\n \tif(i==-1)\r\n \t{\r\n \t\tLoadContacts lc = new LoadContacts();\r\n \t\tContact cnt = new Contact(lc.getContactName(poke.getString(\"poker\")),poke.getString(\"poker\"));\r\n \t\tglobals.contactsmain.add(cnt);\r\n \t\tdb.addContact(cnt);\r\n \t}\r\n Contact newpokes = db.updateRecPokes(poke.getString(\"poker\"), Integer.parseInt(poke.getString(\"sent\")));\r\n db.updateSentPoke(poke.getString(\"poker\"), Integer.parseInt(poke.getString(\"recv\")));\r\n int flag =0;\r\n for(i=0;i<globals.newpokescontact.size();i++)\r\n {\r\n \tif(globals.newpokescontact.get(i).getContactNumber().equalsIgnoreCase(poke.getString(\"poker\")))\r\n \t{\r\n \t\tglobals.newpokescontact.get(i).setNewpokes(globals.newpokescontact.get(i).getNewpokes()+Integer.parseInt(newpokes.getContactNumber()));\r\n \t\tflag=1;\r\n \t}\r\n }\r\n if(flag==0)\r\n {\r\n \tglobals.newpokescontact.add(new Contact(newpokes.getContactName(), poke.getString(\"poker\"), 0, 0, System.currentTimeMillis(), Integer.parseInt(newpokes.getContactNumber())));\r\n }\r\n db.updateNewPoken(poke.getString(\"poker\"), Integer.parseInt(newpokes.getContactNumber()));\r\n \r\n i=globals.getposition(poke.getString(\"poker\"));\r\n globals.contactsmain.get(i).setSentPoke( Integer.parseInt(poke.getString(\"recv\")));\r\n globals.contactsmain.get(i).setRecvPoke(globals.contactsmain.get(i).getRecvPoke()+Integer.parseInt(newpokes.getContactNumber()));\r\n globals.contactsmain.get(i).setLastTime(System.currentTimeMillis());\r\n\t\tglobals.contactsmain.get(i).setNewpokes(globals.contactsmain.get(i).getNewpokes()+Integer.parseInt(newpokes.getContactNumber()));\r\n \r\n message =\"\";\r\n flag=0;\r\n for(i=0;i<globals.newpokescontact.size();i++)\r\n {\r\n \tif(flag==0)\r\n \t{\r\n \t\tflag=1;\r\n \t\tmessage = message + globals.newpokescontact.get(i).getNewpokes() + \" new pricks from \" + globals.newpokescontact.get(i).getContactName();\r\n \t}\r\n \telse\r\n \t\tmessage = message + \"\\n\" + globals.newpokescontact.get(i).getNewpokes() + \" new pricks from \" + globals.newpokescontact.get(i).getContactName();\r\n }\r\n Intent intent2 = new Intent(\"update-view\");\r\n //intent2.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);\r\n \t // You can also include some extra data.\r\n \t intent2.putExtra(\"type\", \"poke\");\r\n \t LocalBroadcastManager.getInstance(context).sendBroadcast(intent2);\r\n }\r\n else if(number.contains(\"update\"))\r\n {\r\n \t//read from shared preferences\r\n }\r\n if(globals.minimized == 1)\r\n {\r\n\t\tNotificationManager mNotificationManager = (NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);\r\n PendingIntent contentIntent = PendingIntent.getActivity(context, 0,new Intent(context, poke_grid.class),0);\r\n NotificationCompat.Builder mBuilder =\r\n new NotificationCompat.Builder(context)\r\n .setSmallIcon(R.drawable.poke)\r\n .setContentTitle(\"Poke\")\r\n .setStyle(new NotificationCompat.BigTextStyle()\r\n .bigText(message))\r\n .setContentText(message);\r\n mBuilder.setAutoCancel(true);\r\n mBuilder.setContentIntent(contentIntent);\r\n mNotificationManager.notify(1, mBuilder.build());\r\n Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\r\n \tRingtone r = RingtoneManager.getRingtone(context, notification);\r\n \tr.play();\r\n }\r\n //MediaPlayer mp = MediaPlayer.create(this, R.raw.ouch2);\r\n //mp.start();\r\n \t\r\n \t\r\n \r\n \t}\r\n \tcatch(Exception e)\r\n \t{\r\n \t\te.printStackTrace();\r\n \t}\r\n }",
"public void handleMessage(Message msg) {\n // if the message 'what' matches the constant MESSAGE_SENT, it\n // means the callback\n // to onNdefPushComplete happened which means the NFC was a\n // success\n if (msg.what == MESSAGE_SENT) {\n Toast.makeText(getApplicationContext(), \"Tag written successfully!!\", Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n String message = intent.getStringExtra(\"message\");\n Log.d(\"receiver\", \"Got message: \" + message);\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n String message = intent.getStringExtra(\"message\");\n Log.d(\"receiver\", \"Got message: \" + message);\n }",
"private void processChatRoomPush(String title, boolean isBackground, String data) {\n if (!isBackground) {\n\n try {\n JSONObject dataObj = new JSONObject(data);\n\n JSONObject uObj = dataObj.getJSONObject(\"user\");\n\n // skip the message if the message belongs to same user as\n // the user would be having the same message when he was sending\n // but it might differs in your scenario\n if (uObj.getString(\"user_id\").equals(BaseApplication.getInstance().getPrefManager().getUser().getId())) {\n Log.e(TAG, \"Skipping the push message as it belongs to same user\");\n return;\n }\n\n String userId = uObj.getString(\"user_id\");\n String userName = uObj.getString(\"user_name\");\n\n Message message = null;\n JSONObject msgObj = dataObj.getJSONObject(\"message\");\n\n String msgId = msgObj.getString(\"message_id\");\n String content = msgObj.getString(\"content\");\n String createdAt = msgObj.getString(\"created_at\");\n int type = msgObj.getInt(\"type\");\n\n message = new Message(msgId, content, createdAt, userId, userName, type);\n\n // verifying whether the app is in background or foreground\n if (!NotificationUtils.isAppIsInBackground(getApplicationContext())) {\n\n // app is in foreground, broadcast the push message\n Intent pushNotification = new Intent(Config.PUSH_NOTIFICATION);\n pushNotification.putExtra(Constants.EXTRA_KEY_PUSH_TYPE, Config.PUSH_TYPE_CHATROOM);\n pushNotification.putExtra(Constants.EXTRA_KEY_MESSAGE, message);\n pushNotification.putExtra(Constants.EXTRA_KEY_FRIEND_ID, userId);\n LocalBroadcastManager.getInstance(this).sendBroadcast(pushNotification);\n\n // play notification sound\n NotificationUtils notificationUtils = new NotificationUtils();\n notificationUtils.playNotificationSound();\n } else {\n\n // app is in background. show the message in notification try\n Intent resultIntent = new Intent(getApplicationContext(), ChatRoomActivity.class);\n resultIntent.putExtra(Constants.EXTRA_KEY_FRIEND_ID, userId);\n showNotificationMessage(getApplicationContext(), title, userName + \" : \" + message.getContent(), message.getCreatedAt(), resultIntent);\n }\n\n } catch (JSONException e) {\n Log.e(TAG, \"json parsing error: \" + e.getMessage());\n// Toast.makeText(getApplicationContext(), \"Json parse error: \" + e.getMessage(), Toast.LENGTH_LONG).show();\n }\n\n } else {\n // the push notification is silent, may be other operations needed\n // like inserting it in to SQLite\n }\n }",
"@Override\n public void onMessageReceived(String from, Bundle data) {\n\n\n\n\n\n // Time to unparcel the bundle!\n if (!data.isEmpty()) {\n // gcm_default sender ID came from the API console\n String senderId = getString(R.string.gcm_defaultSenderId);\n // Not a bad idea to check that the message is coming from your server.\n if ((senderId).equals(from)) {\n // Process message and then post a notification of the received message.\n try {\n //JSONObject jsonObject = new JSONObject(data.getString(EXTRA_DATA));\n String theMessage = data.getString(EXTRA_MESSAGE);\n //This SHOULD be a jsonobject of follow, lets check it out\n\n try{\n\n handleMessageFromServer(theMessage);\n\n\n\n }\n catch(Exception e)\n {\n\n String alert =theMessage;\n }\n }\n\n catch (Exception e) {\n // JSON parsing failed, so we just let this message go, since GCM is not one\n // of our critical features.\n }\n }\n Log.i(TAG, \"Received: \" + data.toString());\n }\n }",
"public void didReceivedNotification(int r7, int r8, java.lang.Object... r9) {\n /*\n r6 = this;\n int r0 = org.telegram.messenger.NotificationCenter.appDidLogout\n if (r7 != r0) goto L_0x0010\n int r7 = r6.lastResumedAccount\n if (r8 != r7) goto L_0x01c5\n r6.onFinish()\n r6.finish()\n goto L_0x01c5\n L_0x0010:\n int r0 = org.telegram.messenger.NotificationCenter.pushMessagesUpdated\n r1 = 3\n r2 = 1\n r3 = 0\n if (r7 != r0) goto L_0x0089\n boolean r7 = r6.isReply\n if (r7 != 0) goto L_0x01c5\n java.util.ArrayList<org.telegram.messenger.MessageObject> r7 = r6.popupMessages\n r7.clear()\n r7 = 0\n L_0x0021:\n if (r7 >= r1) goto L_0x003b\n org.telegram.messenger.UserConfig r8 = org.telegram.messenger.UserConfig.getInstance(r7)\n boolean r8 = r8.isClientActivated()\n if (r8 == 0) goto L_0x0038\n java.util.ArrayList<org.telegram.messenger.MessageObject> r8 = r6.popupMessages\n org.telegram.messenger.NotificationsController r9 = org.telegram.messenger.NotificationsController.getInstance(r7)\n java.util.ArrayList<org.telegram.messenger.MessageObject> r9 = r9.popupMessages\n r8.addAll(r9)\n L_0x0038:\n int r7 = r7 + 1\n goto L_0x0021\n L_0x003b:\n r6.getNewMessage()\n java.util.ArrayList<org.telegram.messenger.MessageObject> r7 = r6.popupMessages\n boolean r7 = r7.isEmpty()\n if (r7 != 0) goto L_0x01c5\n r7 = 0\n L_0x0047:\n if (r7 >= r1) goto L_0x01c5\n int r8 = r6.currentMessageNum\n int r8 = r8 - r2\n int r8 = r8 + r7\n java.util.ArrayList<org.telegram.messenger.MessageObject> r9 = r6.popupMessages\n int r9 = r9.size()\n if (r9 != r2) goto L_0x0061\n if (r8 < 0) goto L_0x005f\n java.util.ArrayList<org.telegram.messenger.MessageObject> r9 = r6.popupMessages\n int r9 = r9.size()\n if (r8 < r9) goto L_0x0061\n L_0x005f:\n r8 = 0\n goto L_0x007d\n L_0x0061:\n r9 = -1\n if (r8 != r9) goto L_0x006c\n java.util.ArrayList<org.telegram.messenger.MessageObject> r8 = r6.popupMessages\n int r8 = r8.size()\n int r8 = r8 - r2\n goto L_0x0075\n L_0x006c:\n java.util.ArrayList<org.telegram.messenger.MessageObject> r9 = r6.popupMessages\n int r9 = r9.size()\n if (r8 != r9) goto L_0x0075\n r8 = 0\n L_0x0075:\n java.util.ArrayList<org.telegram.messenger.MessageObject> r9 = r6.popupMessages\n java.lang.Object r8 = r9.get(r8)\n org.telegram.messenger.MessageObject r8 = (org.telegram.messenger.MessageObject) r8\n L_0x007d:\n org.telegram.messenger.MessageObject[] r9 = r6.setMessageObjects\n r9 = r9[r7]\n if (r9 == r8) goto L_0x0086\n r6.updateInterfaceForCurrentMessage(r3)\n L_0x0086:\n int r7 = r7 + 1\n goto L_0x0047\n L_0x0089:\n int r0 = org.telegram.messenger.NotificationCenter.updateInterfaces\n if (r7 != r0) goto L_0x00f1\n org.telegram.messenger.MessageObject r7 = r6.currentMessageObject\n if (r7 == 0) goto L_0x00f0\n int r7 = r6.lastResumedAccount\n if (r8 == r7) goto L_0x0096\n goto L_0x00f0\n L_0x0096:\n r7 = r9[r3]\n java.lang.Integer r7 = (java.lang.Integer) r7\n int r7 = r7.intValue()\n int r8 = org.telegram.messenger.MessagesController.UPDATE_MASK_NAME\n r8 = r8 & r7\n if (r8 != 0) goto L_0x00b2\n int r8 = org.telegram.messenger.MessagesController.UPDATE_MASK_STATUS\n r8 = r8 & r7\n if (r8 != 0) goto L_0x00b2\n int r8 = org.telegram.messenger.MessagesController.UPDATE_MASK_CHAT_NAME\n r8 = r8 & r7\n if (r8 != 0) goto L_0x00b2\n int r8 = org.telegram.messenger.MessagesController.UPDATE_MASK_CHAT_MEMBERS\n r8 = r8 & r7\n if (r8 == 0) goto L_0x00b5\n L_0x00b2:\n r6.updateSubtitle()\n L_0x00b5:\n int r8 = org.telegram.messenger.MessagesController.UPDATE_MASK_AVATAR\n r8 = r8 & r7\n if (r8 != 0) goto L_0x00bf\n int r8 = org.telegram.messenger.MessagesController.UPDATE_MASK_CHAT_AVATAR\n r8 = r8 & r7\n if (r8 == 0) goto L_0x00c2\n L_0x00bf:\n r6.checkAndUpdateAvatar()\n L_0x00c2:\n int r8 = org.telegram.messenger.MessagesController.UPDATE_MASK_USER_PRINT\n r7 = r7 & r8\n if (r7 == 0) goto L_0x01c5\n org.telegram.messenger.MessageObject r7 = r6.currentMessageObject\n int r7 = r7.currentAccount\n org.telegram.messenger.MessagesController r7 = org.telegram.messenger.MessagesController.getInstance(r7)\n org.telegram.messenger.MessageObject r8 = r6.currentMessageObject\n long r8 = r8.getDialogId()\n java.lang.CharSequence r7 = r7.getPrintingString(r8, r3, r3)\n java.lang.CharSequence r8 = r6.lastPrintString\n if (r8 == 0) goto L_0x00df\n if (r7 == 0) goto L_0x00eb\n L_0x00df:\n if (r8 != 0) goto L_0x00e3\n if (r7 != 0) goto L_0x00eb\n L_0x00e3:\n if (r8 == 0) goto L_0x01c5\n boolean r7 = r8.equals(r7)\n if (r7 != 0) goto L_0x01c5\n L_0x00eb:\n r6.updateSubtitle()\n goto L_0x01c5\n L_0x00f0:\n return\n L_0x00f1:\n int r0 = org.telegram.messenger.NotificationCenter.messagePlayingDidReset\n r4 = 300(0x12c, float:4.2E-43)\n if (r7 != r0) goto L_0x013d\n r7 = r9[r3]\n java.lang.Integer r7 = (java.lang.Integer) r7\n android.view.ViewGroup r9 = r6.messageContainer\n if (r9 == 0) goto L_0x01c5\n int r9 = r9.getChildCount()\n L_0x0103:\n if (r3 >= r9) goto L_0x01c5\n android.view.ViewGroup r0 = r6.messageContainer\n android.view.View r0 = r0.getChildAt(r3)\n java.lang.Object r2 = r0.getTag()\n java.lang.Integer r2 = (java.lang.Integer) r2\n int r2 = r2.intValue()\n if (r2 != r1) goto L_0x013a\n java.lang.Integer r2 = java.lang.Integer.valueOf(r4)\n android.view.View r0 = r0.findViewWithTag(r2)\n org.telegram.ui.Components.PopupAudioView r0 = (org.telegram.ui.Components.PopupAudioView) r0\n org.telegram.messenger.MessageObject r2 = r0.getMessageObject()\n if (r2 == 0) goto L_0x013a\n int r5 = r2.currentAccount\n if (r5 != r8) goto L_0x013a\n int r2 = r2.getId()\n int r5 = r7.intValue()\n if (r2 != r5) goto L_0x013a\n r0.updateButtonState()\n goto L_0x01c5\n L_0x013a:\n int r3 = r3 + 1\n goto L_0x0103\n L_0x013d:\n int r0 = org.telegram.messenger.NotificationCenter.messagePlayingProgressDidChanged\n if (r7 != r0) goto L_0x0186\n r7 = r9[r3]\n java.lang.Integer r7 = (java.lang.Integer) r7\n android.view.ViewGroup r9 = r6.messageContainer\n if (r9 == 0) goto L_0x01c5\n int r9 = r9.getChildCount()\n L_0x014d:\n if (r3 >= r9) goto L_0x01c5\n android.view.ViewGroup r0 = r6.messageContainer\n android.view.View r0 = r0.getChildAt(r3)\n java.lang.Object r2 = r0.getTag()\n java.lang.Integer r2 = (java.lang.Integer) r2\n int r2 = r2.intValue()\n if (r2 != r1) goto L_0x0183\n java.lang.Integer r2 = java.lang.Integer.valueOf(r4)\n android.view.View r0 = r0.findViewWithTag(r2)\n org.telegram.ui.Components.PopupAudioView r0 = (org.telegram.ui.Components.PopupAudioView) r0\n org.telegram.messenger.MessageObject r2 = r0.getMessageObject()\n if (r2 == 0) goto L_0x0183\n int r5 = r2.currentAccount\n if (r5 != r8) goto L_0x0183\n int r2 = r2.getId()\n int r5 = r7.intValue()\n if (r2 != r5) goto L_0x0183\n r0.updateProgress()\n goto L_0x01c5\n L_0x0183:\n int r3 = r3 + 1\n goto L_0x014d\n L_0x0186:\n int r9 = org.telegram.messenger.NotificationCenter.emojiLoaded\n if (r7 != r9) goto L_0x01ba\n android.view.ViewGroup r7 = r6.messageContainer\n if (r7 == 0) goto L_0x01c5\n int r7 = r7.getChildCount()\n L_0x0192:\n if (r3 >= r7) goto L_0x01c5\n android.view.ViewGroup r8 = r6.messageContainer\n android.view.View r8 = r8.getChildAt(r3)\n java.lang.Object r9 = r8.getTag()\n java.lang.Integer r9 = (java.lang.Integer) r9\n int r9 = r9.intValue()\n if (r9 != r2) goto L_0x01b7\n r9 = 301(0x12d, float:4.22E-43)\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n android.view.View r8 = r8.findViewWithTag(r9)\n android.widget.TextView r8 = (android.widget.TextView) r8\n if (r8 == 0) goto L_0x01b7\n r8.invalidate()\n L_0x01b7:\n int r3 = r3 + 1\n goto L_0x0192\n L_0x01ba:\n int r9 = org.telegram.messenger.NotificationCenter.contactsDidLoad\n if (r7 != r9) goto L_0x01c5\n int r7 = r6.lastResumedAccount\n if (r8 != r7) goto L_0x01c5\n r6.updateSubtitle()\n L_0x01c5:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.telegram.ui.PopupNotificationActivity.didReceivedNotification(int, int, java.lang.Object[]):void\");\n }",
"@Override\n public void onMessageReceived(JsonElement jsonElement) {\n try{\n mHandler.post(new Runnable() {\n @Override\n public void run() {\n\n Toast.makeText(context,jsonElement.toString(),Toast.LENGTH_LONG).show();\n }\n });}catch (Exception ex){\n ex.printStackTrace();\n }\n System.out.println(\"test we have new sms received : \"+jsonElement.toString());\n }",
"@Override\n public void onMessageReceived(String from, Bundle data) {\n String message = data.getString(\"message\");\n Log.i(\"P\", \"From: \" + from);\n Log.i(\"P\", \"Message: \" + message);\n\n notifyMessageReceived(message);\n }",
"@Override\n\tpublic void onMessageBackgroundThread(Object arg0) {\n\t\t\n\t}",
"@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n Log.d(TAG, \"From: \" + remoteMessage.getFrom());\n Log.d(TAG, \"Notification Message Body: \" + remoteMessage.getNotification().getBody());\n\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this);\n mBuilder.setSmallIcon(R.drawable.logo);\n mBuilder.setContentTitle(remoteMessage.getNotification().getTitle());\n mBuilder.setContentText(remoteMessage.getNotification().getBody());\n\n NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n // notificationID allows you to update the notification later on.\n mNotificationManager.notify(14, mBuilder.build());\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(ConfigNotification.REGISTRATION_COMPLETE)) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n FirebaseMessaging.getInstance().subscribeToTopic(ConfigNotification.TOPIC_GLOBAL);\n } else if (intent.getAction().equals(ConfigNotification.PUSH_NOTIFICATION)) {\n // new push notification is received\n }\n }",
"@Override\n public void onMessageReceived(String from, Bundle bundle) {\n String title = bundle.getString(\"title\");\n Boolean isBackground = Boolean.valueOf(bundle.getString(\"is_background\"));\n String flag = bundle.getString(\"flag\");\n String data = bundle.getString(\"data\");\n Log.d(TAG, \"From: \" + from);\n Log.d(TAG, \"title: \" + title);\n Log.d(TAG, \"isBackground: \" + isBackground);\n Log.d(TAG, \"flag: \" + flag);\n Log.d(TAG, \"data: \" + data);\n\n if (flag == null)\n return;\n\n if (BaseApplication.getInstance().getPrefManager().getUser() == null) {\n // user is not logged in, skipping push notification\n Log.e(TAG, \"user is not logged in, skipping push notification\");\n return;\n }\n\n if (from.startsWith(\"/topics/\")) {\n // message received from some topic.\n } else {\n // normal downstream message.\n }\n\n switch (Integer.parseInt(flag)) {\n case Config.PUSH_TYPE_CHATROOM:\n // push notification belongs to a chat room\n processChatRoomPush(title, isBackground, data);\n break;\n case Config.PUSH_TYPE_GROUP_CHATROOM:\n processGroupMessage(title, isBackground, data);\n break;\n case Config.PUSH_TYPE_USER:\n // push notification is specific to user\n// processUserMessage(title, isBackground, data);\n break;\n case Config.PUSH_TYPE_USER_STATUS:\n processUserStatusPush(isBackground, data);\n break;\n }\n }",
"private void sendNotification(RemoteMessage remoteMessage) {\n// Intent intent = new Intent(this, MainActivity.class);\n// intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n// PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /* Request code */, intent,\n// PendingIntent.FLAG_ONE_SHOT);\n//\n// Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n// NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)\n// .setSmallIcon(R.drawable.ic_stat_ic_notification)\n// .setContentTitle(\"FCM Message\")\n// .setContentText(messageBody)\n// .setAutoCancel(true)\n// .setSound(defaultSoundUri)\n// .setContentIntent(pendingIntent);\n//\n// NotificationManager notificationManager =\n// (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n//\n// notificationManager.notify(0 /* ID of notification */, notificationBuilder.build());\n //String title = remoteMessage.getNotification().getTitle();\n //String message = remoteMessage.getNotification().getBody();\n String title = remoteMessage.getData().get(\"title\");\n String message = remoteMessage.getData().get(\"text\");\n\n String imageURL = remoteMessage.getData().get(\"imageUrl\");\n long timestamp = remoteMessage.getSentTime();\n String articleID = remoteMessage.getData().get(\"articleID\");\n\n Intent intent = new Intent(this, SplashActivity.class);\n intent.putExtra(\"articleID\", articleID);\n //intent.setAction(\"rs.masinealati.PROCESS_NOTIFICATION\");\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n// PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /* Request code */, intent,\n// PendingIntent.FLAG_ONE_SHOT);\n\n\n showNotificationMessage(getApplicationContext(), title, message, timestamp, intent);\n\n// if (TextUtils.isEmpty(imageURL)) {\n// showNotificationMessage(getApplicationContext(), title, message, timestamp, intent);\n// }else{\n// // Show notification with image\n// Log.e(TAG, \"Notification with image...\");\n// showNotificationMessageWithBigImage(getApplicationContext(), title, message, timestamp, intent, imageURL);\n// }\n\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE)) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n FirebaseMessaging.getInstance().subscribeToTopic(Config.TOPIC_GLOBAL);\n\n } else if (intent.getAction().equals(Config.PUSH_NOTIFICATION)) {\n // new push notification is received\n\n }\n }",
"public void onMessageReceived(RemoteMessage remoteMessage) {\n if (remoteMessage.getData().size() > 0) {\n Log.e(\"ORM\", \"Message data payload: \" + remoteMessage.getData());\n }\n PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n // Check if message contains a notification payload.\n if (remoteMessage.getNotification() != null) {\n // for foreground\n Map<String, String> data = null;\n if (remoteMessage.getData().get(\"type\") != null) {\n data = remoteMessage.getData();\n Log.i(TAG, \"onMessageReceived: type = \" + remoteMessage.getData().get(\"type\"));\n Log.i(TAG, \"onMessageReceived: time = \" + remoteMessage.getSentTime());\n sendNotification(remoteMessage.getNotification().getTitle(), remoteMessage.getNotification().getBody(), data);\n }\n } else {\n // for background\n if (remoteMessage.getData().size() > 0) {\n switch (remoteMessage.getData().get(\"type\")) {\n case \"alarm_alert\":\n String[] request_link = remoteMessage.getData().get(\"api\").split(\"\\\\?\");\n new JSONResponse(this, request_link[0], request_link[1], new JSONResponse.onComplete() {\n @Override\n public void onComplete(JSONObject json) {\n Log.i(TAG, \"onComplete: alarm_alert data json = \" + json);\n try {\n JSONArray jsonArr = json.getJSONArray(\"data\");\n for (int i = 0; i < jsonArr.length(); i++) {\n JSONObject obj = jsonArr.getJSONObject(i);\n String time = obj.getString(\"day\") + \" \" + obj.getString(\"time\");\n String task = \"\";\n for (int j = 0; j < obj.getJSONArray(\"task\").length(); j++) {\n if (j != 0) {\n task += \",\";\n }\n task += obj.getJSONArray(\"task\").getString(j);\n }\n String title = obj.getString(\"stage\");\n Log.i(TAG, \"onComplete: alarm_alert time = \" + time);\n Log.i(TAG, \"onComplete: alarm_alert task = \" + task);\n String value = obj.getString(\"value\");\n String[] a = time.split(\" \");\n String requestCode = a[0].replace(\"-\", \"\") + a[1].replace(\":\", \"\");\n requestCode = requestCode.substring(2, 12);\n int rc = Integer.parseInt(requestCode);\n Log.i(TAG, \"onComplete: requestCode = \" + rc);\n long delta = calculateDelay(time);\n boolean enable = value.equals(\"on\");\n if (delta >= 0) {\n sendMsgForAlertSystem(title, task, delta, rc, enable);\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n });\n break;\n case \"nutrition\":\n String[] request_link1 = remoteMessage.getData().get(\"api\").split(\"\\\\?\");\n Log.i(TAG, \"onMessageReceived: \" + request_link1);\n new JSONResponse(this, request_link1[0], request_link1[1], new JSONResponse.onComplete() {\n @Override\n public void onComplete(JSONObject json) {\n Log.i(TAG, \"onComplete: json = \" + json);\n try {\n int rc = json.getInt(\"rc\");\n if (rc == 0) {\n JSONArray data = json.getJSONObject(\"data\").getJSONArray(\"data\");\n Log.i(TAG, \"onComplete: json data = \" + data);\n for (int i = 0; i < data.length(); i++) {\n JSONObject obj = data.getJSONObject(i);\n Log.i(TAG, \"onComplete: json data item = \" + obj);\n String title = obj.getString(\"title\");\n String time = obj.getString(\"time\");\n String content = \"\";\n JSONArray food = obj.getJSONArray(\"food\");\n JSONArray quantity = obj.getJSONArray(\"quantity\");\n for (int j = 0; j < food.length(); j++) {\n content += food.getString(j) + \" \" + quantity.getString(j);\n if (j < food.length() - 1) {\n content += \",\";\n }\n }\n Log.i(TAG, \"onComplete: json data content = \" + content);\n String today = getRealFormat(\"yyyy-MM-dd\").format(new Date());\n if (time != null && isTime(time) && !title.equals(\"\") && !content.equals(\" \")) {\n long delta = calculateDelay(today + \" \" + (time.length() < 6 ? time + \":00\" : time));\n delta -= delta - 10 * 60 * 1000; // 10min before\n String requestCode = today.replace(\"-\", \"\") + i;\n int resC = Integer.parseInt(requestCode.substring(2));\n if (delta >= 0) {\n// sendMsgForNutrition(title, content, time, delta, resC, i);\n sendMsgFor(API.ACTION_NUTRITION, title, content, time, delta, resC, i);\n } else {\n delta = delta + 24 * 60 * 60 * 1000;\n Date tmp = new Date();\n tmp.setTime(new Date().getTime() + 24 * 60 * 60 * 1000);\n String tomorrow = getRealFormat(\"yyyy-MM-dd\").format(tmp);\n requestCode = tomorrow.replace(\"-\", \"\") + i;\n resC = Integer.parseInt(requestCode.substring(2));\n// sendMsgForNutrition(title, content, time, delta, resC, i);\n sendMsgFor(API.ACTION_NUTRITION, title, content, time, delta, resC, i);\n }\n }\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n });\n break;\n case \"client_alert\":\n String[] request_link2 = remoteMessage.getData().get(\"api\").split(\"\\\\?\");\n Log.i(TAG, \"onMessageReceived: \" + request_link2);\n new JSONResponse(this, request_link2[0], request_link2[1], new JSONResponse.onComplete() {\n @Override\n public void onComplete(JSONObject json) {\n Log.i(TAG, \"onComplete: json = \" + json);\n try {\n int rc = json.getInt(\"rc\");\n if (rc == 0) {\n JSONArray data = json.getJSONObject(\"data\").getJSONArray(\"data\");\n Log.i(TAG, \"onComplete: json data = \" + data);\n for (int i = 0; i < data.length(); i++) {\n JSONObject obj = data.getJSONObject(i);\n Log.i(TAG, \"onComplete: json data item = \" + obj);\n String title = obj.getString(\"title\");\n String time = obj.getString(\"time\");\n String content = \"\";\n JSONArray contentArr = obj.getJSONArray(\"content\");\n for (int j = 0; j < contentArr.length(); j++) {\n content += contentArr.getString(j);\n if (j < contentArr.length() - 1) {\n content += \",\";\n }\n }\n Log.i(TAG, \"onComplete: json data content = \" + content);\n String today = getRealFormat(\"yyyy-MM-dd\").format(new Date());\n Log.i(TAG, \"onComplete: isTime = \" + isTime(time));\n if (time != null && isTime(time) && !title.equals(\"\") && !content.equals(\" \")) {\n long delta = calculateDelay(today + \" \" + (time.length() < 6 ? time + \":00\" : time));\n delta -= delta - 10 * 60 * 1000; // 10min before\n String requestCode = today.replace(\"-\", \"\") + (i + 10);\n int resC = Integer.parseInt(requestCode.substring(2));\n if (delta >= 0) {\n// sendMsgForClientAlert(title, content, time, delta, resC, i);\n sendMsgFor(API.ACTION_CLIENT_ALERT, title, content, time, delta, resC, i);\n } else {\n delta = delta + 24 * 60 * 60 * 1000;\n Date tmp = new Date();\n tmp.setTime(new Date().getTime() + 24 * 60 * 60 * 1000);\n String tomorrow = getRealFormat(\"yyyy-MM-dd\").format(tmp);\n requestCode = tomorrow.replace(\"-\", \"\") + (i + 10);\n resC = Integer.parseInt(requestCode.substring(2));\n// sendMsgForClientAlert(title, content, time, delta, resC, i);\n sendMsgFor(API.ACTION_CLIENT_ALERT, title, content, time, delta, resC, i);\n }\n }\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n });\n break;\n }\n }\n }\n }",
"@Override\n public void onMessageReceived(String from, Bundle data) {\n\n Log.d(TAG, data.toString());\n Log.d(TAG, from);\n int typePush = -1;\n try {\n typePush = Integer.parseInt(data.getString(FIELD_PUSH_TYPE));\n } catch (NumberFormatException ex) {\n Log.e(TAG, ex.getMessage());\n }\n if (typePush == PUSH_TYPE_CHAT) {\n processChatNotification(data);\n } else {\n showNotificationCourse(data);\n }\n\n }",
"@Override\n public void onReceive(Context context, Intent intent)\n {\n // int numMessagesOne = 0;\n //---get the SMS message passed in---\n Bundle bundle = intent.getExtras();\n SmsMessage[] msgs;\n List <Message> messageList;\n HashMap<String, String> phoneContacts;\n String str = \"\";\n // Get the messages from the SMS Inbox\n MessengerApplication appState = (MessengerApplication) context.getApplicationContext();\n messageList = appState.getMessageList();\n phoneContacts = appState.getPhoneContacts();\n\n if (bundle != null)\n {\n\n\n //---retrieve the SMS message received---\n Object[] pdus = (Object[]) bundle.get(\"pdus\");\n msgs = new SmsMessage[pdus.length];\n for (int i=0; i<msgs.length; i++){\n msgs[i] = SmsMessage.createFromPdu((byte[])pdus[i]);\n str += \"SMS from \" + msgs[i].getOriginatingAddress();\n str += \" :\";\n str += msgs[i].getMessageBody();\n str += \"\\n\";\n\n String contact = msgs[i].getOriginatingAddress();\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context);\n mBuilder.setContentTitle(\"Message from \" + msgs[i].getOriginatingAddress());\n\n if(phoneContacts.containsKey(contact)){\n mBuilder.setContentTitle(\"Message from \" + phoneContacts.get(contact));\n }\n // DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n // Date date = new Date();\n // System.out.println(dateFormat.format(date)); //2014/08/06 15:59:48\n mBuilder.setContentText(msgs[i].getMessageBody());\n mBuilder.setTicker(\"ASAP Message Recieved\");\n mBuilder.setSmallIcon(R.drawable.ic_logo_notification);\n\n // Increase notification number every time a new notification arrives\n mBuilder.setNumber(++numMessagesOne);\n\n Message tmpMsg = new Message(messageList.size()+1, msgs[i].getMessageBody(), msgs[i].getOriginatingAddress(), msgs[i].getTimestampMillis(), MessageStatus.RECEIVED);\n\n messageList.add(tmpMsg);\n appState.setMessageList(messageList);\n\n String selectedContact = msgs[i].getOriginatingAddress();\n\n Intent notificationIntent = new Intent(\"com.asap.messenger.conversationview\");\n notificationIntent.putExtra(\"selectedContact\", selectedContact);\n notificationIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK |\n Intent.FLAG_ACTIVITY_SINGLE_TOP);\n PendingIntent contentIntent = PendingIntent.getActivity(context, 100,\n notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // start the activity when the user clicks the notification text\n mBuilder.setContentIntent(contentIntent);\n mBuilder.setPriority(Notification.PRIORITY_HIGH);\n mBuilder.setVibrate(new long[1000]);\n NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n Notification note = mBuilder.build();\n note.flags |= Notification.FLAG_AUTO_CANCEL;\n// myNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n // pass the Notification object to the system\n notificationManager.notify(1234, note);\n abortBroadcast();\n\n // startActivity(intent);\n\n\n }\n //---display the new SMS message---\n // Log.d(TAG, str);\n // Toast.makeText(context, str, Toast.LENGTH_SHORT).show();\n\n\n\n\n }\n }",
"protected void pushNotification(String userID, String message){\n }",
"private void processCustomMessage(Context context, Bundle bundle) {\n//\n String message = bundle.getString(JPushInterface.EXTRA_MESSAGE);\n if (StringUtils.isNotBlank(message)) {\n notify(context, message);\n }\n }",
"@Override\n public void handleMessage(Message msg) {\n super.handleMessage(msg);\n Log.d(TAG,\"In Handler, Msg = \"+msg.arg1);\n }",
"@Override\n public void onResponse(Call<Token> call, Response<Token> response) {\n Map<String,String> contentSend = new HashMap<>();\n contentSend.put(\"title\",\"Dreymart\");\n contentSend.put(\"message\", \"Kamu mempunyai pesanan baru \"+orderResult.getOrderId());\n DataMessage dataMessage = new DataMessage();\n if (response.body().getToken() != null)\n dataMessage.setTo(response.body().getToken());\n dataMessage.setData(contentSend);\n\n IFCMService ifcmService = Common.getGetFCMService();\n ifcmService.sendNotification(dataMessage)\n .enqueue(new Callback<MyResponse>() {\n @Override\n public void onResponse(Call<MyResponse> call, Response<MyResponse> response) {\n if (response.code() == 200)\n {\n if (response.body().success == 1)\n {\n Toast.makeText(CartActivity.this, \"Terima Kasih Telah Memesan\", Toast.LENGTH_SHORT).show();\n //Clear Cart\n Common.cartRepository.emptyCart();\n finish();\n }\n else\n {\n Toast.makeText(CartActivity.this, \"Gagal mengirim notifikasi\", Toast.LENGTH_SHORT).show();\n }\n }\n\n }\n\n @Override\n public void onFailure(Call<MyResponse> call, Throwable t) {\n Toast.makeText(CartActivity.this, \"\"+t.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n String message = intent.getStringExtra(EXTRA_FCM_MESSAGE);\n String dialogId = intent.getStringExtra(EXTRA_FCM_DIALOG_ID);\n Log.v(TAG, \"Received broadcast \" + intent.getAction() + \" with data: \" + message + \", dialogId= \" + dialogId);\n notificationDlgId = dialogId;\n requestBuilder.setSkip(skipRecords = 0);\n loadDialogsREST(true, true);\n }",
"@Override\n public void onNotificationPosted(StatusBarNotification sbn) {\n\n if(isConnected()) {\n cone = ConnectBlActivity.con;\n //Here every notification is checked and if the user wands to listen to facebook, we get the message\n if (getFb()) {\n\n\n if (sbn.getPackageName().equals(\"com.facebook.orca\")) { //checking if the is a notification from facebook\n Bundle extras = sbn.getNotification().extras;\n String title;\n\n\n if (!extras.getString(\"android.text\").equals(\"Chat heads active\")) {\n String pack = \"Facebook\";\n title = extras.getString(\"android.text\"); //This is the actual user that sends the message\n String text = extras.getCharSequence(\"android.title\").toString(); //and that is the actual message\n\n\n Log.i(\"Title\", title);\n Log.i(\"Text\", text);\n\n\n //The message is being put in a String Builder\n StringBuilder msg = new StringBuilder();\n msg.append(pack);\n msg.append(\"\\n\");\n msg.append(text);\n msg.append(\"\\n\");\n msg.append(title);\n\n //The ui gets updated with the message\n Main.t.setText(msg);\n\n\n //The message is written to the outputStream\n\n byte[] send = msg.toString().getBytes();\n try {\n cone.write(String.valueOf(msg));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }\n\n\n //Here every notification is checked and if the user wands to listen to instagram, we get the message\n if (getInsta()) {\n if (sbn.getPackageName().equals(\"com.instagram.android\")) { //checking if the is a notification from facebook\n Bundle extras = sbn.getNotification().extras;\n String title = extras.getString(\"android.text\"); //This is the actual user that sends the message\n String text = extras.getCharSequence(\"android.title\").toString(); //and that is the actual message\n\n SimpleDateFormat sdff = new SimpleDateFormat(\"HH:mm\", Locale.getDefault());\n String tempf = sdff.format(new Date());\n\n\n Log.i(\"Title\", title);\n Log.i(\"Text\", text);\n\n\n //The message is being put in a String Builder\n StringBuilder msg = new StringBuilder();\n msg.append(\"`\");\n msg.append(tempf);\n msg.append(\" \");\n msg.append(text);\n msg.append(\" \");\n msg.append(title);\n\n //The ui gets updated with the message\n Main.t.setText(msg);\n\n\n //The message is written to the outputStream\n try {\n cone.write(String.valueOf(msg));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }\n }",
"@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n Log.d(TAG, \"From: \" + remoteMessage.getFrom());\n\n // Check if message contains a data payload.\n if (remoteMessage.getData().size() > 0) {\n Log.d(TAG, \"Message data payload: \" + remoteMessage.getData());\n /*final Map<String, String> data = remoteMessage.getData();\n\n try {\n Log.d(TAG, \"app_package: \" + data.get(\"app_package\"));\n// openAppOnGooglePlayStoreApp(getApplicationContext(), data.get(\"app_package\"));\n *//*if (data.get(\"app_package\") != null) *//*{\n\n\n _packageName = data.get(\"app_package\");\n\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n public void run() {\n AlertDialog alertDialog = new AlertDialog.Builder(mContext)\n .setTitle(data.get(\"title\"))\n .setMessage(data.get(\"message\"))\n .setPositiveButton(\"Open Google Play Store!\",new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n openAppOnGooglePlayStoreApp(getApplicationContext(), _packageName);\n }\n })\n .setIcon(R.drawable.ic_launcher)\n .create();\n\n alertDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);\n alertDialog.show();\n }\n });\n\n *//*AlertDialog.Builder builder = new AlertDialog.Builder(getApplicationContext());\n builder.setTitle(remoteMessage.getNotification().getTitle());\n builder.setMessage(remoteMessage.getNotification().getBody());\n builder.setPositiveButton(\"Open Google Play Store!\",new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n openAppOnGooglePlayStoreApp(getApplicationContext(), _packageName);\n }\n });\n AlertDialog dialog = builder.create();\n dialog.show();*//*\n\n// openAppOnGooglePlayStoreApp(getApplicationContext(), _packageName);\n }\n } catch (Exception e) {\n Log.d(TAG, \"Exception: \"+e);\n }*/\n }\n\n // Check if message contains a notification payload.\n if (remoteMessage.getNotification() != null) {\n Log.d(TAG, \"Message Notification Body: \" + remoteMessage.getNotification().getBody());\n }\n\n // Also if you intend on generating your own notifications as a result of a received FCM\n // message, here is where that should be initiated. See sendNotification method below.\n }",
"void onNewMessage(String message);",
"@Override\r\n\tpublic void onMessage(BmobMsg message) {\n\t\trefreshNewMsg(message);\r\n\t}",
"@Override\n public void deliveryComplete(IMqttDeliveryToken arg0) {\n try {\n if(arg0.getMessage()==null){\n //messageDelivered = true;\n }\n } catch (MqttException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic void msgReceived(Message msg) {\n\n\t}",
"@Override\n public void onReceive(Context context, Intent intent) {\n String message = intent.getStringExtra(\"message\");\n Log.d(\"receiver\", \"Got message: \" + message);\n showToastMessage(message);\n }",
"@Override\n protected void onPushOpen(Context context, Intent intent) {\n }",
"@Override\n\tpublic void onDirectMessage(DirectMessage directMessage) {\n\n\t}",
"public void a(final String str, final IUmengInAppMessageCallback iUmengInAppMessageCallback) {\n c();\n com.umeng.message.common.d.a(new Runnable() {\n public void run() {\n UInAppMessage uInAppMessage;\n UMLog.mutlInfo(d.f81246a, 2, \"get card message begin\");\n try {\n JSONObject a2 = d.this.b();\n a2.put(\"label\", str);\n JSONObject sendRequest = JUtrack.sendRequest(a2, MsgConstant.CARD_MSG_ENDPOINT);\n if (sendRequest != null && TextUtils.equals(sendRequest.getString(\"success\"), \"ok\")) {\n UMLog.mutlInfo(d.f81246a, 2, \"get card message success\" + sendRequest);\n JSONObject jSONObject = sendRequest.getJSONObject(\"data\");\n InAppMessageManager.f81177b = jSONObject.getInt(\"pduration\") * PushConstants.PUSHSERVICE_INFO_SENDMESSAGE_BY_NOTIFICATIONSERVICE;\n InAppMessageManager.f81178c = jSONObject.getInt(\"sduration\") * PushConstants.PUSHSERVICE_INFO_SENDMESSAGE_BY_NOTIFICATIONSERVICE;\n iUmengInAppMessageCallback.onCardMessage(new UInAppMessage(jSONObject.getJSONObject(\"card\")));\n InAppMessageManager.getInstance(d.this.f81249b).a(a2.optString(\"label\", \"\"));\n } else if (sendRequest == null || !TextUtils.equals(sendRequest.getString(\"success\"), \"fail\") || !TextUtils.equals(sendRequest.getString(\"error\"), \"no message\")) {\n iUmengInAppMessageCallback.onCardMessage(null);\n } else {\n String c2 = InAppMessageManager.getInstance(d.this.f81249b).c(str);\n if (!TextUtils.isEmpty(c2)) {\n try {\n uInAppMessage = new UInAppMessage(new JSONObject(c2));\n } catch (JSONException unused) {\n uInAppMessage = null;\n }\n if (uInAppMessage != null) {\n InAppMessageManager.getInstance(d.this.f81249b).a(new File(h.d(d.this.f81249b, uInAppMessage.msg_id)));\n InAppMessageManager.getInstance(d.this.f81249b).a((UInAppMessage) null, str);\n }\n }\n }\n } catch (Exception unused2) {\n iUmengInAppMessageCallback.onCardMessage(null);\n }\n }\n });\n }",
"private void sendRegistrationToServer(final String fcmToken) {\n Log.e(TAG, \"sendRegistrationToServer: \" + fcmToken);\n final String token= QueryPreferences.getToken(this);\n AsyncTask<Void, Void, Void> task= new AsyncTask<Void, Void, Void>() {\n @Override\n protected Void doInBackground(Void... voids) {\n\n RequestQueue requestQueue = Volley.newRequestQueue(MyFirebaseInstanceIDService.this);\n\n Map<String, String> params= new HashMap<>();\n params.put(\"token\", token);\n params.put(\"fcmToken\", \"\" + fcmToken);\n JsonObjectRequest jor= new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(params), new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject jsonObject) {\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError volleyError) {\n }\n });\n requestQueue.add(jor);\n return null;\n }\n };\n if(token!=null)\n task.execute();\n }"
]
| [
"0.7152236",
"0.7024289",
"0.7013079",
"0.6910088",
"0.6905307",
"0.6844186",
"0.6792167",
"0.67688257",
"0.6761622",
"0.6747036",
"0.6709493",
"0.66927433",
"0.6687474",
"0.6684927",
"0.66717225",
"0.66527075",
"0.66309696",
"0.6621969",
"0.6619448",
"0.6616293",
"0.659749",
"0.65804607",
"0.6578546",
"0.65714103",
"0.6548164",
"0.6539877",
"0.6535267",
"0.6496902",
"0.64479643",
"0.64059615",
"0.63932914",
"0.63917845",
"0.63783544",
"0.6372291",
"0.63569444",
"0.6356325",
"0.63521075",
"0.63446295",
"0.6337406",
"0.6290865",
"0.62901753",
"0.62867594",
"0.6279056",
"0.6277426",
"0.62674606",
"0.6264013",
"0.6242998",
"0.62384343",
"0.62336814",
"0.6233663",
"0.62325865",
"0.6207801",
"0.61624646",
"0.6156849",
"0.6155166",
"0.61485815",
"0.6147332",
"0.61378896",
"0.61154324",
"0.6113745",
"0.60924536",
"0.6089757",
"0.6078992",
"0.6072548",
"0.6063889",
"0.6053563",
"0.60468733",
"0.60429037",
"0.604075",
"0.604075",
"0.60307515",
"0.6028397",
"0.6023611",
"0.60067743",
"0.5997644",
"0.5981702",
"0.5979612",
"0.59777874",
"0.59651977",
"0.59651166",
"0.5963706",
"0.59546256",
"0.59519655",
"0.59516865",
"0.594324",
"0.59372044",
"0.59351194",
"0.5922976",
"0.59223866",
"0.59197646",
"0.59185785",
"0.5915483",
"0.59081745",
"0.59070724",
"0.5901522",
"0.5894372",
"0.5888299",
"0.5882816",
"0.58773327",
"0.58768857"
]
| 0.66023624 | 20 |
Calculate return and update nexr | public static void calculateReturn(TestPortfolioStat dp, TestPortfolioStat next) {
BigDecimal grossLast=dp.gross;
BigDecimal gross=next.gross;
if( grossLast.compareTo(BigDecimal.ZERO)!=0 ) {
next.dailyReturn=gross.subtract(grossLast).abs().
divide(grossLast.abs(), RoundingMode.HALF_DOWN );
// set correct sign
if( gross.compareTo(grossLast)<0 ) {
next.dailyReturn=next.dailyReturn.negate();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic double calculate() {\n\r\n\t\treturn n1 + n2;\r\n\t}",
"public double calculateNetPay() {\r\n return net_pay = grosspay - Statetax - Fedtax; }",
"public static final double internalRateOfReturn (\n double irrEstimate,\n double [ ] cashFlows )\n //////////////////////////////////////////////////////////////////////\n {\n double irr = irrEstimate;\n\n double delta = -irr * 0.1;\n\n double oldNpv = 0.0;\n\n while ( true )\n {\n double npv = netPresentValue ( irr, cashFlows );\n\n if ( npv == 0.0 )\n {\n return irr;\n }\n\n if ( oldNpv < 0.0 )\n {\n if ( npv > 0.0 )\n {\n delta *= -0.9;\n }\n else if ( npv > oldNpv )\n {\n delta *= 1.1;\n }\n else if ( npv < oldNpv )\n {\n delta = -delta;\n }\n else\n {\n delta = 0.0;\n }\n }\n else if ( oldNpv > 0.0 )\n {\n if ( npv < 0.0 )\n {\n delta *= -0.9;\n }\n else if ( npv < oldNpv )\n {\n delta *= 1.1;\n }\n else if ( npv > oldNpv )\n {\n delta = -delta;\n }\n else\n {\n delta = 0.0;\n }\n }\n\n/*\nSystem.out.println ( \"irr = \" + irr + \", oldNpv = \" + oldNpv + \", npv = \" + npv + \", delta = \" + delta );\n\ntry{\nnew BufferedReader ( new InputStreamReader ( System.in ) ).readLine ( );\n}catch (Exception x ) { }\n*/\n\n if ( delta == 0.0 )\n {\n return irr;\n }\n\n irr += delta;\n\n oldNpv = npv;\n }\n }",
"double calculateNewPrice(double discount_rate, double price);",
"double getTotalReward();",
"public double costNEX() {\r\n double diff=0;\r\n double intensity=0;\r\n \r\n for(int x=Config.ptvXLow-0; x < Config.ptvXHigh+0; x++) {\r\n// for(int x=Solver.xBoundsTumor[0]; x < Solver.xBoundsTumor[1]; x+= Config.scaleFactor) {\r\n for(int y=Config.ptvYLow-0; y < Config.ptvYHigh+0; y++) {\r\n// for(int y=Solver.yBoundsTumor[0]; y < Solver.yBoundsTumor[1]; y+= Config.scaleFactor) {\r\n for(int z=Config.ptvZLow-0; z < Config.ptvZHigh+0; z++) {\r\n// for(int z=Solver.zBoundsTumor[0]; z < Solver.zBoundsTumor[1]; z+= Config.scaleFactor) {\r\n\r\n this.body2[x][y][z].setCurrentDosis(0.0); //Set currentPtvVoxel Dose to 0 \r\n for(int i=0; i<Config.numberOfSeeds;++i) { \r\n // Calculate intensity based based on current dwelltime\r\n intensity = this.body2[x][y][z].radiationIntensity(this.seeds2[i].getCoordinate(), New_state[i]);\r\n if (intensity>0) {\r\n// LogTool.print(\"Cost: Intensity :\" + intensity + \"@ \" + x + \" \" + y + \" \" + z,\"notification\");\r\n }\r\n this.body2[x][y][z].addCurrentDosis(intensity);\r\n } \r\n diff += Math.pow((this.body2[x][y][z].getGoalDosis()-this.body2[x][y][z].getCurrentDosis()),2);\r\n// LogTool.print(\" diffdose \" + (Looper.body2[x][y][z].getGoalDosis()-Looper.body2[x][y][z].getCurrentDosis()),\"notification\");\r\n } \r\n }\r\n }\r\n return Math.sqrt(diff);\r\n// return Math.random();\r\n }",
"Update withReturnAddress(ReturnAddress returnAddress);",
"public double calculatePay() {\n\t\treturn 0;\r\n\t}",
"private Double redo(Double N) {\n return (Math.rint(N * 100) / 100);\n }",
"int calculate() {\n return getSum() + b1;\n }",
"public abstract double compute(BindRecord neoBindRecord, BindRecord selfBindRecord);",
"public abstract double pay();",
"@Test\n public void testCalculateRPNCustom() throws Exception {\n String[] expression = {\"3\",\"4\",\"+\",\"8\",\"3\",\"-\",\"+\",\"10\",\"2\",\"/\", \"3\", \"+\", \"*\", \"15\",\"/\"};\n double result = solver.calculateRPNCustom(expression);\n\n assertThat(result, is(6.4));\n }",
"protected BigDecimal reword(){\n\t\tif(getNowAct() == 0){\n\t\t\treturn(rewordBuy());\n\t\t}\n\t\t//keep\n\t\telse if(getNowAct() == 1){\n\t\t\treturn(rewordWait());\n\t\t}\n\t\t//sell\n\t\telse if(getNowAct() == 2){\n\t\t\treturn(rewordSell());\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"getNowAct : \" + getNowAct() + \"\\nerror occur.\");\n\t\t\tSystem.exit(2);\n\t\t\treturn(null);\n\t\t}\n\t}",
"@Override\n\tpublic void getResultat() {\n\t\tcalcul();\n\t}",
"public double calculateReimbursement (Reimburse reimburseEntry);",
"@Override\r\n\tpublic double calculate() {\n\t\treturn n1 * n2;\r\n\t}",
"@Override\n public double pay() {\n double payment = super.pay() + (this.commision_rate * this.total_sales);\n this.total_sales = 0;\n return payment;\n }",
"public double calculatePay() \r\n\t{\r\n\t\treturn (payRate*hoursWorked);\r\n\t}",
"@Override\r\n\t\tvoid calculate() {\r\n\t\t\tnum3=num1+num2;\r\n\t\t\t\r\n\t\t}",
"public Double getRawGross(int orNo, int storeCode ) {\r\n//\t\tString query = \"SELECT SUM(IF(o.RETURN=0,i.SELL_PRICE*i.QUANTITY,p.AMT)) FROM invoice_item i, invoice o, payment_item p WHERE MONTH (o.TRANS_DT) = '\"+month+\"' && YEAR(o.TRANS_DT) = '\"+year+\"' && DAY(o.TRANS_DT) = '\"+day+\"' AND i.OR_NO = o.OR_NO AND p.OR_NO = o.OR_NO AND p.STORE_CODE = o.STORE_CODE AND o.STORE_CODE = '\"+storeCode+\"'\";\r\n\t\tString query = \"SELECT SUM(i.SELL_PRICE*i.QUANTITY) FROM invoice_item i, invoice o WHERE o.OR_NO= '\"+orNo+\"' AND i.OR_NO = o.OR_NO AND i.STORE_CODE = o.STORE_CODE AND o.STORE_CODE = '\"+storeCode+\"'\"\r\n\t\t+ \" AND NOT EXISTS (SELECT 1 FROM INVOICE_SET s WHERE s.OR_NO = o.OR_NO) \"\r\n\t\t;\r\n\t\t\r\n\t\tResultSet rs = Main.getDBManager().executeQuery(query);\r\n//\t\tResultSet rs = Main.getDBManager().executeQuery(\"SELECT sum(p.AMT) from payment_item p WHERE MONTH (p.TRANS_DT) = '\"+month+\"' && YEAR(p.TRANS_DT) = '\"+year+\"' && DAY(p.TRANS_DT) = '\"+day+\"' AND p.STORE_CODE = '\"+storeCode+\"'\");\r\n\t\tDouble dailySale = 0.0d;\r\n\t\ttry {\r\n\t\t\twhile(rs.next()){\r\n//\t\t\t\tdouble amount = rs.getDouble(1);\r\n//\t\t\t\tdailySale = amount/getVatRate();\r\n\t\t\t\t\r\n\t\t\t\tdailySale = rs.getDouble(1);\r\n\t\t\t\tlogger.debug(\"Raw Gross BEFORE SUBTRACTION: \"+dailySale);\r\n\t\t\t\t\r\n\t\t\t\tdailySale = dailySale - getDeductibles(orNo, storeCode) + getCompletedTransactions(orNo, storeCode);\r\n\t\t\t\tlogger.debug(\"Raw Gross AFTER SUBTRACTION: \"+dailySale);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tLoggerUtility.getInstance().logStackTrace(e);\r\n\t\t}\r\n\t\tlogger.debug(\"Raw Gross: \"+dailySale);\r\n\t\treturn dailySale;\r\n\t}",
"public abstract double returnItem(int daysBorrowed) throws ReturnException;",
"@Override\r\n\tpublic double calculate() {\n\t\treturn n1 - n2;\r\n\t}",
"@Override\r\n public void update() {\r\n this.highestRevenueRestaurant = findHighestRevenueRestaurant();\r\n this.total = calculateTotal();\r\n }",
"double getrx() {\nreturn this.rx;\n }",
"@Override\n\tpublic void calc() {\n\t\tcalculated = true;\n\t\tanswer=operand1-operand2;\n\t}",
"public void recordReturn(double f) {\r\n\t\tif(f > 0) {\r\n\t\t\t//loanFine = new Fine(f);\r\n\t\t\tloanFine.setFine(f);\r\n\t\t}\r\n\t\tisReturned = true;\r\n\t}",
"private void updateInventory(ReturnTransaction returnRecord) {\n for (ReturnLineItem returnsLineItem: returnRecord.getReturnLineItems()) {\n Item item = InventoryRepo.getItem(returnsLineItem.getItemId());\n int newOH = (item.getOnhands() + returnsLineItem.getQuantity());\n Item updatedItem = new Item(item.getItemId(),item.getName(), newOH, item.getPrice(), item.getTax(),\n item.getThreshold(), item.getSupplierId(),item.getReorderQty(), item.getPending());\n InventoryRepo.updateItem(updatedItem);\n }\n }",
"public double payment(double r, double p, double n, double t)\n\t{\n\t\treturn (p*(Math.pow(1+r/n, n*t)))/(t*12);\n\t}",
"@Override\r\n\tpublic double calculate() {\n\t\treturn n1 / n2;\r\n\t}",
"abstract double calculateCurrentDiscountRate();",
"public void calculate();",
"public double pay()\r\n{\r\ndouble pay = hoursWorked * payRate;\r\nhoursWorked = 0;\r\nreturn pay;\r\n//IMPLEMENT THIS\r\n}",
"private void reciprocal()\n\t{\n\t\tif(Fun == null)\n\t\t{\n\t\t\tsetLeftValue();\n\t\t\tresult = calc.reciprocal ( );\n\t\t\tupdateText();\n\t\t\tsetLeftValue();\n\t\t}\n\t}",
"@Override\n\tpublic double GetValue() {\n\t\tdouble spot = inputs.getSpot();\n\t\tdouble strike = inputs.getStrike();\n\t\tdouble vol = inputs.getVol();\n\t\tint noSteps=inputs.getNoSteps();\n\t\tdouble expiry=inputs.getExpiry();\n\t OptionType type=inputs.getType();\n\t ExerciseType exercise=inputs.getExercise();\n\t InterestRate interestRate=inputs.getR();\n\t\t\n\t double timestep = expiry/noSteps;\n\t double DF = Math.exp(-interestRate.GetRate(1.)*timestep);\n\t double temp1 = Math.exp((interestRate.GetRate(1.) + vol * vol)*timestep);\n\t double temp2 = 0.5 * (DF + temp1);\n\t double up = temp2 + Math.sqrt(temp2*temp2 - 1);\n\t double down = 1/ up;\n\t double probaUp = (Math.exp(interestRate.GetRate(1.) * timestep) - down)/(up -down) ;\n\t double probaDown = 1 - probaUp;\n\n\t //stock price tree\n\t\tstockPrice[0][0]=spot;\n\t for (int n = 1; n <= noSteps; n ++) {\n for (int j = n; j > 0; j--){\n \tstockPrice[j][n] = up * stockPrice[j-1][n-1];\n }\n \t\tstockPrice[0][n] = down * stockPrice[0][n-1];\n }\n\t \n\t //last column set payoffs\n\t\tfor (int j = 0; j <= noSteps; j++) {\n\t\t\t\tif(type.equals(OptionType.CALL)) {\n\t\t\t\t\tpayOff[j][noSteps] = Math.max(this.stockPrice[j][noSteps] - strike, .0);\n\t\t\t\t}else {\n\t\t\t\t\tpayOff[j][noSteps] = Math.max(strike - this.stockPrice[j][noSteps], .0);\n\t\t\t\t}\n\t\t}\n\n\t\t\n\t //payoff tree in backwardation\n\t \n\t for (int i = noSteps ; i >= 1; i--) {\n for (int j = 0; j <= i-1; j++) {\n\t \tif(exercise.equals(ExerciseType.AMERICAN)) { \n\t //American\t\n\t \t\tif(type.equals(OptionType.CALL)) {\n\t \t\t\t\tpayOff[j][i-1] = Math.max(DF * (probaUp * payOff[j+1][i] + probaDown * payOff[j][i]) ,\n\t \t\t\t\tMath.max(this.stockPrice[j][i-1] - strike, .0));\n\t \t\t\t\n\t \t\t}else \tpayOff[j][i-1] = Math.max(DF * (probaUp * payOff[j+1][i] + probaDown * payOff[j][i]) ,\n\t \t\t\t\tMath.max(strike - this.stockPrice[j][i-1] , .0));\n\t \t}else { \n\t \t\t\t//European put and call option\n\t \t\t\t\tpayOff[j][i-1] = DF * (probaUp * payOff[j+1][i] + probaDown * payOff[j][i]);\n\t }\n }\n }\n\t \n\t double deltaUp = (payOff[0][2]-payOff[1][2])/(stockPrice[0][2]-stockPrice[1][2]);\n\t double deltaDown = (payOff[1][2]-payOff[2][2])/(stockPrice[1][2]-stockPrice[2][2]);\n\t delta = (deltaUp + deltaDown) /2;\n\t gamma = (deltaUp-deltaDown)/((stockPrice[0][2]-stockPrice[2][2])/2);\n\t theta = (payOff[1][2]-payOff[0][0])/(365*2*timestep);//time in days\n\t \n\t long rounded = Math.round(payOff[0][0]*10000);\n\t return rounded/10000.0;\n\t}",
"public void setReturn(float xreturn)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(RETURN$0, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(RETURN$0);\r\n }\r\n target.setFloatValue(xreturn);\r\n }\r\n }",
"protected boolean afterSave(boolean newRecord, boolean success) {\n /**\n * 26/07/2013 Maria Jesus Martin\n * Modificación realizada para que si la OP esta en borrador o en proceso se calculen nuevamente\n * las retenciones.\n */\n if (!Env.getContext(Env.getCtx(), \"OmitRetentionCalculation\").equals(\"Y\") \n && !this.isReceipt() \n && (super.isRetenciones()) \n && ( (DOCSTATUS_Drafted.equals(getDocStatus())) \n || (DOCSTATUS_InProgress.equals(getDocStatus()))\n )\n ) {\n System.out.println(\"Entrando a evaluar el calcular retenciones\");\n\n if (this.flagSave == false && this.retencion == true) {\n System.out.println(\"Entrando a calcular retenciones\");\n recalcularRetenciones();\n }\n }\n return true;\n\n }",
"Double postfixCalc(PostFixReturn returnValue){\r\n //data initialization\r\n Stack<Character> input = returnValue.postFix;\r\n\r\n char event;\r\n Stack<Double> Values = new Stack<>();\r\n String numStr=\"\";\r\n double number1,number2,number;\r\n double result = 0.0000;\r\n Long temp;\r\n //main loop\r\n while (!input.empty()){\r\n //detects numerics and converts it into doubles and place it within stack\r\n if(input.peek()=='|'){\r\n input.pop();\r\n while(input.peek()!='|'){\r\n Character c = input.pop();\r\n numStr += c;\r\n }\r\n input.pop();\r\n //detects strings as keys\r\n if(map.containsKey(numStr)){\r\n number = map.get(numStr);\r\n }\r\n else {\r\n number = Double.valueOf(numStr);\r\n }\r\n// number = Double.valueOf(numStr);\r\n Values.push(number);\r\n numStr = deleteString();\r\n }\r\n // checks operand and uses the last 2 numerics as input\r\n else if(operator(input.peek())){\r\n //checks events and does calculations\r\n event = input.pop();\r\n number1= Values.pop();\r\n System.out.println(\"Operand1: \" + number1);\r\n number2 = Values.pop();\r\n System.out.println(\"Operand2: \" + number2);\r\n System.out.println(\"Operator: \" + event);\r\n if (event == '+'){\r\n result = number2 + number1;\r\n }\r\n else if (event == '-'){\r\n result = number2 - number1;\r\n }\r\n else if (event == '*'){\r\n result = number2 * number1;\r\n }\r\n else if (event == '/'){\r\n result = number2 / number1;\r\n }\r\n else if (event == '^') {\r\n result = Math.pow(number2, number1);\r\n }\r\n System.out.println(\"result: \"+result);\r\n Values.push(result);\r\n }\r\n\r\n else{\r\n input.pop();\r\n }\r\n }\r\n result = Values.pop();\r\n //places into hashmap\r\n if (returnValue.status){\r\n map.put(returnValue.key,result);\r\n }\r\n\r\n return result;\r\n }",
"public static final void testRetire (\n double desiredSavingsInterestIncome,\n double savingsInterestRate,\n double inflationRate,\n double taxRate,\n double investmentInterestRate,\n double yearsOfSaving )\n //////////////////////////////////////////////////////////////////////\n {\n \n double savings\n = desiredSavingsInterestIncome * ( 1.0 + inflationRate )\n / ( savingsInterestRate * ( 1.0 - taxRate ) - inflationRate );\n\n double futureValueSavings\n = savings * Math.pow ( 1.0 + inflationRate, yearsOfSaving );\n\n double annualSavings = annualSavingsNeeded (\n futureValueSavings, investmentInterestRate, yearsOfSaving );\n\n System.out.println ( savings );\n System.out.println ( futureValueSavings );\n System.out.println ( annualSavings );\n System.out.println ( futureValueAnnuity (\n annualSavings, investmentInterestRate, yearsOfSaving ) );\n System.out.println ( presentValueAnnuity (\n annualSavings, investmentInterestRate, yearsOfSaving ) );\n }",
"double getTotalCost();",
"@Override\r\n public void update() {\r\n this.total = calculateTotal();\r\n }",
"public void Deposit(double ammount){\n abal = ammount + abal;\n UpdateDB();\n }",
"@Test\n public void testCalculateRPNStack() throws Exception {\n String[] expression = {\"3\",\"4\",\"+\",\"8\",\"3\",\"-\",\"+\",\"10\",\"2\",\"/\", \"3\", \"+\", \"*\", \"15\",\"/\"};\n double result = solver.calculateRPNCustom(expression);\n\n assertThat(result, is(6.4));\n }",
"private void processRentals(ReturnDocument rdoc) {\r\n for (ReturnDetail rdetail : rdoc.getReturnDetails()) {\r\n if (rdetail.getCatalogItem().getStock().isRental()) {\r\n\r\n List<StagingRental> stagingRentals = rdetail.getReturnRentals();\r\n \r\n if (!MMUtil.isCollectionEmpty(stagingRentals)) {\r\n List<String> serialNumberList = new ArrayList<String>();\r\n for (StagingRental stagingRental : stagingRentals) {\r\n serialNumberList.add(stagingRental.getSerialNumber());\r\n }\r\n Collection<Rental> currentRentals = MMServiceLocator.getRentalService()\r\n .getCurrentNonReturnedRentalItems(rdetail.getCatalogItem().getStock(),\r\n serialNumberList);\r\n for(Rental rental : currentRentals) {\r\n rental.setReturnDetailId(rdetail.getReturnDetailId());\r\n rental.setReturnDetail(rdetail);\r\n rental.setReturnDate(KNSServiceLocator.getDateTimeService().getCurrentTimestamp());\r\n rental.setRentalStatusCode(MMConstants.Rental.RENTAL_STATUS_RETURNED);\r\n rdetail.getRentals().add(rental);\r\n }\r\n MMServiceLocator.getRentalService().saveRentalList(rdetail.getRentals());\r\n \r\n if(MMConstants.DispositionCode.RETURN_TO_SHELF.equals(rdetail.getDispostitionCode())) {\r\n List<Rental> backToShelfRentals = new ArrayList<Rental>();\r\n for(Rental rental : currentRentals) {\r\n Rental newRental = new Rental();\r\n newRental.setRentalStatusCode(MMConstants.Rental.RENTAL_STATUS_AVAILABLE);\r\n newRental.setRentalSerialNumber(rental.getRentalSerialNumber());\r\n newRental.setRentalTypeCode(rental.getRentalTypeCode());\r\n newRental.setRentalType(rental.getRentalType());\r\n newRental.setStockId(rental.getStockId());\r\n newRental.setStock(rental.getStock());\r\n backToShelfRentals.add(newRental);\r\n }\r\n MMServiceLocator.getRentalService().saveRentalList(backToShelfRentals);\r\n }\r\n\r\n } \r\n }\r\n }\r\n }",
"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 }",
"public abstract void recalc();",
"@Override\r\n public double calculatePrice() {\r\n return super.priceAdjustIE(super.calculatePrice() + WASTE_REMOVAL);\r\n }",
"private static void updateTotals()\r\n\t{\r\n\t\ttaxAmount = Math.round(subtotalAmount * salesTax / 100.0);\r\n\t\ttotalAmount = subtotalAmount + taxAmount;\r\n\t}",
"public double calculateChangeToGive() {\r\n\t\treturn amountPaid - amountToPay;\r\n\t}",
"public void compute(){\r\n\r\n\t\ttotalCost=(capAmount*CAPCOST)+(hoodyAmount*HOODYCOST)+(shirtAmount*SHIRTCOST);\r\n\t}",
"double taxReturn() {\n\t\tdouble ddv = 0;\n\t\tif (d == 'A') {\n\t\t\tddv = 18;\n\t\t} else if (d == 'B') {\n\t\t\tddv = 5;\n\t\t}\n\t\t\n\t\tif (ddv = 0) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tdouble percent = price / 100.0;\n\t\tdouble tax = ddv * percent;\n\t\treturn tax / 100.0 * 15.0;\n\t}",
"double getPaid();",
"@Override\n public double calculatePay ()\n {\n double commissionPay = this.sales * this.rate / 100;\n return commissionPay;\n }",
"double calculatePrice();",
"public int calculate() {\n \ttraversal(root);\n \tif(!calResult.isEmpty()){\n \t\tint answer = Integer.parseInt(calResult.pop());\n \t\treturn answer;\n \t}\n return 0;\n }",
"public abstract double calcular();",
"int getBuyCurrentRaw();",
"private final void taxCalculations(){\n\r\n hraDeduction = totalHRA - 0.1*basicIncome;\r\n ltaDeduction = totalLTA - 0.7*totalLTA;\r\n\r\n //exemptions\r\n fundsExemption = fundsIncome - 150000; //upto 1.5 lakhs are exempted under IT Regulation 80C\r\n\r\n grossIncome = basicIncome + totalHRA + totalLTA + totalSpecialAl + fundsIncome ;\r\n\r\n totalDeduction = hraDeduction + ltaDeduction;\r\n\r\n totalTaxableIncome = grossIncome - (totalDeduction + fundsExemption);\r\n\r\n taxLiability = 0.05 * (totalTaxableIncome - 250000) + 0.2*(totalTaxableIncome - 500000);\r\n\r\n taxToPay = (cessPercent*taxLiability)/100 + taxLiability;\r\n }",
"@Override\r\n\tpublic void returnVehicle(DateTime actualReturnDate) throws ReturnException {\r\n\r\n\t\t// pass value from the records (the news one) to the object of rental record\r\n\t\t// calculate the actual rental days, over rental days and normal fee days\r\n\t\tCar car = (Car) databaseHandle.getOneVehicle(ID);\r\n\t\tif (car.getStatus() != Status.RENTED) {\r\n\t\t\tthrow new ReturnException(\"this car is not in rented and it's in : \" + status.toString());\r\n\t\t}\r\n\r\n\t\tRentalRecord temp = databaseHandle.getNewestRecords(ID);\r\n\t\tdouble actualRentalDays = DateTime.diffDays(actualReturnDate, temp.getRentDate());\r\n\t\tdouble overRentalDays = DateTime.diffDays(actualReturnDate, temp.getEstimatedReturnDate());\r\n\t\tdouble normalFeeDays = actualRentalDays - overRentalDays;\r\n\t\ttemp.setActualReturnDate(actualReturnDate);\r\n\r\n\t\t// if actual return date smaller than rent date, it should be return false\r\n\t\tif (DateTime.diffDays(actualReturnDate, temp.getRentDate()) < 0) {\r\n\t\t\tthrow new ReturnException(\"Actual return date should not smaller than rent date\");\r\n\t\t}\r\n\r\n\t\t// according to situation to set rental fee and late rates\r\n\t\tif (overRentalDays > 0) {\r\n\t\t\ttemp.setRentalFee(getRentalRates(), normalFeeDays);\r\n\t\t\tsetLateRates(rentalRates);\r\n\r\n\t\t\ttemp.setLateFee(getLateRates(), overRentalDays);\r\n\t\t}\r\n\t\tif (overRentalDays < 0) {\r\n\r\n\t\t\ttemp.setRentalFee(getRentalRates(), actualRentalDays);\r\n\t\t} else {\r\n\t\t\ttemp.setRentalFee(getRentalRates(), normalFeeDays);\r\n\t\t}\r\n\r\n\t\t// set status to available\r\n\t\tthis.status = Status.AVAILABLE;\r\n\t\tdatabaseHandle.returnVehicle(this, DateTime.formatDateType(actualReturnDate), temp);\r\n\t}",
"double getTotalProfit();",
"@Override\n\tpublic void visit(ReturnNode node) {\n\t\tEvaluator.missingRet = false;\n\t\t/**\n\t\t * verificam check failed, nu si assert failed, deoarece eroarea de\n\t\t * missing return are prioritate mai mare decat cea de assert failed\n\t\t */\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\t\t/**\n\t\t * evaluam copilul nodului\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\t/**\n\t\t * preluam rezultatul evaluarii\n\t\t */\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\tnode.setName(Evaluator.variables.get(node.getChild(0).getName()));\n\t\t} else {\n\t\t\tnode.setName(node.getChild(0).getName());\n\t\t}\n\t}",
"double getTotal();",
"protected SimulatorValue giveResult() {\n\tthis.evalExpression();\n\treturn value;\n }",
"double setrx(double rx) {\nreturn this.rx;\n }",
"public void returncoins(){\r\n\t\tDS1 d= (DS1) ds;\r\n\t\tSystem.out.println(\"Coins returned : \" + d.cp + \"\\n\");\r\n\t\td.cp=0;\r\n\t}",
"public int get_return(){\r\n return local_return;\r\n }",
"public int modifySaleReturn(SaleReturnVO vo) {\n\t\treturn saleReturn.Modify(vo);\r\n\t}",
"@Override\n public double calcCost() {\n return calcSalesFee()+calcTaxes();\n }",
"public void calculatePayment() {}",
"public void processReturnDocument(ReturnDocument rdoc) {\r\n this.processReturnDispositions(rdoc);\r\n this.processRentals(rdoc);\r\n // this.processDepartmentCredit(rdoc);\r\n this.computeSalesTaxAmount(rdoc);\r\n\r\n }",
"public abstract double calculateTax();",
"@Override\n\tpublic void payRent(RentDue d) {\n\t\t\n\t}",
"public double pay(){\n\t\treturn payRate;\n\t}",
"public ArmCurrency getGsthstTaxAmt() throws Exception {\n\t\t\n\t\tArmCurrency gstHstTaxAmt = new ArmCurrency(0.0);\n\t\tDouble offlineGstHstTax;\n \tDouble value = 0.0d;\n \tDouble netAMt = 0.0d;\n \tDouble belowThreshTaxAmt = 0.0d;\n \tDouble taxAmt = 0.0d;\n \tDouble valueExc = 0.0d;\n\t ArmCurrency itemGstHstTax = new ArmCurrency(0.0) ;\n\t\tCMSStore cmsStore = ((CMSStore)compositePOSTransaction.getStore());\n\t\t\n\t\tif(cmsStore.getCountry().equals(\"CAN\")){\n\t\tif(compositePOSTransaction.getTransactionType().contains(\"RETN\")){\n\t\t\tPOSLineItem[] lineitem = compositePOSTransaction.getLineItemsArray();\n\t\t\tCMSCompositePOSTransaction OrgSaleTxn = null;\n\t\t\t\n\t\t\tfor(int i =0 ; i<lineitem.length ;i++){\n\t\t\t if(lineitem[i] instanceof CMSReturnLineItem ){\n\t\t\t CMSReturnLineItem rtnLnItm = (CMSReturnLineItem) lineitem[i];\n\t\t\t CMSReturnLineItemDetail rtnLnItmDtl = (CMSReturnLineItemDetail) rtnLnItm.getLineItemDetailsArray()[0];\n\t\t\t CMSSaleLineItemDetail saleLnItmDtl = (CMSSaleLineItemDetail) rtnLnItmDtl.getSaleLineItemDetail();\n\t\t\t\t if(saleLnItmDtl!=null){\n\t\t\t\t CompositePOSTransaction txnObject = saleLnItmDtl.getLineItem().getTransaction().getCompositeTransaction();\n\t\t\t\t OrgSaleTxn = ((CMSCompositePOSTransaction) txnObject);\n\t\t\t\t \t\t break;\n\t\t\t\t }\n\t\t\t }\n\t\t\t}\t\t\n\t\t\t\n\t\t\tif(OrgSaleTxn == null){\n\t\t\t\tPOSLineItem[] itms = compositePOSTransaction.getLineItemsArray();\n\t\t\t\tfor(POSLineItem itm : itms){\n\t\t\t\t\tif(itm.getGsthstTaxAmt()!=null){\n\t\t\t\t\t\tif(itm instanceof CMSReturnLineItem)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgstHstTaxAmt = (gstHstTaxAmt.subtract(itm.getGsthstTaxAmt().absoluteValue())).absoluteValue();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\tgstHstTaxAmt = gstHstTaxAmt.add(itm.getGsthstTaxAmt().absoluteValue());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else{\n\t\t\t\t\n\t\t\t\tPOSLineItem[] itms = OrgSaleTxn.getLineItemsArray();\n\t\t\t\t\n\t\t\t\tfor(int i=0;i<lineitem.length;i++){\n\t\t\t\t\tfor(POSLineItem itm : itms){\n\t\t\t\t\t\tif((itm.getItem().getId() == lineitem[i].getItem().getId()) && (itm.getTaxAmount().equals(lineitem[i].getTaxAmount().absoluteValue()))){\t\n\t\t\t\t\t\t\tif(itm.getGsthstTaxAmt() != null){\n\t\t\t\t\t\t\t\tgstHstTaxAmt = gstHstTaxAmt.add(itm.getGsthstTaxAmt().absoluteValue());\n\t\t\t\t\t\t\t\tlineitem[i].setGsthstTaxAmt(itm.getGsthstTaxAmt().absoluteValue());\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\telse if(!(itm.getItem().getId() == lineitem[i].getItem().getId())){\t\n\t\t\t\t\t\t\tif(lineitem[i].getGsthstTaxAmt() == null){\n\t\t\t\t\t\t\t\tif(cmsStore.getGst_hstTAX() != null){\n\t\t\t\t\t\t\t\t\titemGstHstTax = lineitem[i].getNetAmount().multiply(cmsStore.getGst_hstTAX()).absoluteValue();\n\t\t\t\t\t\t\t\t\tlineitem[i].setGsthstTaxAmt(itemGstHstTax);\n\t\t\t\t\t\t\t\t\tgstHstTaxAmt = (gstHstTaxAmt.subtract(itemGstHstTax)).absoluteValue();\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if(lineitem[i].getGsthstTaxAmt()!=null){\t\n\t\t\t\t\t\t\t\tgstHstTaxAmt = (gstHstTaxAmt.subtract(lineitem[i].getGsthstTaxAmt())).absoluteValue();\t\n\n\t\t\t\t\t\t\t}\t\t\t\t\t\t \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(\"gstHstTaxAmt return, sale/return even exchange>>>>>>>>>>>>> \" + gstHstTaxAmt);\n\t\t\treturn gstHstTaxAmt.absoluteValue();\n\t\t}\t\n\t\telse if(compositePOSTransaction.getTaxableLineItemDetailsArray().length == 0)\n\t\t{\n\t\t\tPOSLineItem[] itms = compositePOSTransaction.getLineItemsArray();\n\t\t\tfor(POSLineItem itm : itms){\n\t\t\t\tif(itm.getGsthstTaxAmt()!=null)\n\t\t\t\tgstHstTaxAmt = gstHstTaxAmt.add(itm.getGsthstTaxAmt().absoluteValue());\n\t\t\t}\n\t\t\treturn gstHstTaxAmt.absoluteValue();\n\t\t}\n\t\telse {\t\t \n\t\t if (isVatEnabled())\n\t\t return null;\n\t\t \n\t\t POSLineItemDetail [] posLineItemDetails = compositePOSTransaction.getTaxableLineItemDetailsArray();\n\n\t\t POSLineItem itm = null;\n\t\t \n\t\t int lineItemLength = compositePOSTransaction.getTaxableLineItemDetailsArray().length;\n\t\t for(int i =0 ; i<lineItemLength ; i++){\n\t\t \ttry {\n\t\t \t\titm = posLineItemDetails[i].getLineItem();\n\t\t \t\tif((posLineItemDetails[i].getLineItem() instanceof SaleLineItem) && ((CMSSaleLineItem)posLineItemDetails[i].getLineItem()).getShippingRequest()!=null){\n\t\t \t\t\tofflineGstHstTax = ((CMSShippingRequest) (((CMSSaleLineItem)posLineItemDetails[i].getLineItem()).getShippingRequest())).getOfflineHstTax();\n\t\t \t\t\tif(offlineGstHstTax == null){\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tvalue = getTaxMapValue(\"HST\");\n\t\t\t \titm.setGsthstTaxAmt(itm.getNetAmount().multiply(value));\t\t\t \t\n\t\t\t \tDouble thresAmt = compositePOSTransaction.getThreshAmt()!=null ? compositePOSTransaction.getThreshAmt().doubleValue():0.0d;\n\t\t\t \tvalueExc = getTaxExecMapValue(\"HST\");\n\t\t\t \tif(compositePOSTransaction.getThrehRule()!=null && compositePOSTransaction.getThrehRule().equalsIgnoreCase(\"P\")){\n\t\t\t \t\tif(posLineItemDetails[i].getLineItem().getNetAmount().greaterThan(new ArmCurrency(thresAmt))){\t\t\t \t\t \n\t\t\t \t\t\tbelowThreshTaxAmt = thresAmt*valueExc;\n\t\t\t \t\t\tnetAMt = (posLineItemDetails[i].getLineItem().getNetAmount().doubleValue()) - thresAmt ;\n\t\t\t \t\t}\n\t\t\t \t\ttaxAmt = belowThreshTaxAmt + (netAMt*value);\n\t\t\t \t\titm.setGsthstTaxAmt(new ArmCurrency(taxAmt));\n\t\t\t \t} else {\n\t\t\t \t\titm.setGsthstTaxAmt(itm.getNetAmount().multiply(value)); \n\t\t\t \t}\t\t\t \t\n\t\t\t\t\t\t}else if(offlineGstHstTax!=null){\n\t\t \titm.setGsthstTaxAmt(itm.getNetAmount().multiply(offlineGstHstTax.doubleValue()));\n\t\t }\n\t\t \t\t\t\n\t\t \t\t\tgstHstTaxAmt = (gstHstTaxAmt.subtract(itm.getGsthstTaxAmt())).absoluteValue();\t\n\t\t \t\t\t\n\t\t \t\t} else {\n\t\t \t\t\t\n\t\t\t\t\t\titm = posLineItemDetails[i].getLineItem();\n\t\t\t\t\t\t\tif(itm.getGsthstTaxAmt()==null){\n\t\t\t\t\t\t\t\tif(cmsStore.getGst_hstTAX()!=null){\n\t\t\t\t\t\t\t\t\titemGstHstTax = itm.getNetAmount().multiply(cmsStore.getGst_hstTAX());\n\t\t\t\t\t\t\t\t\titm.setGsthstTaxAmt(itemGstHstTax);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (CurrencyException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t }\n\t\t try {\n\t\t \tfor(POSLineItemDetail line : posLineItemDetails){\n\t\t \t\tif(line.getLineItem().getGsthstTaxAmt()!=null) {\n\t\t \t\t\tgstHstTaxAmt = gstHstTaxAmt.add(line.getLineItem().getGsthstTaxAmt());\n\t\t \t\t}\n\t\t \t}\n\t\t \t\n\t\t\t\t//System.out.println(\"gstHstTaxAmt >>>>>>SALE>>>>>>>\"+gstHstTaxAmt);\n\t\t\t} catch (CurrencyException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t return gstHstTaxAmt.absoluteValue();\n\t\t\t}\n\t\t\t} // end country check.\n\t\t\treturn gstHstTaxAmt;\n\t\t }",
"@Override\n public Float compute() {\n\treturn calc();\n }",
"public int sumarConRetorno() {\n return a + b;\n }",
"public void xsetReturn(org.apache.xmlbeans.XmlFloat xreturn)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlFloat target = null;\r\n target = (org.apache.xmlbeans.XmlFloat)get_store().find_element_user(RETURN$0, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlFloat)get_store().add_element_user(RETURN$0);\r\n }\r\n target.set(xreturn);\r\n }\r\n }",
"public double printOutput() {\r\n return calculateNetPay();\r\n }",
"public void queryNext() {\n String sumText;\n if (!isExpire()) {\n this.mHandler.removeCallbacks(this.queryNextRunnable);\n this.mHandler.removeCallbacks(this.queryCurrentRunnable);\n boolean allQueried = this.currentID == this.bizOrderIds.size() + -1;\n if (allQueried && this.results.length > 0 && this.results[this.results.length - 1] != null && \"WAIT_BUYER_PAY\".equals(this.results[this.results.length - 1].getOrderInfo().getOrderStatusCode())) {\n allQueried = false;\n }\n double sum = ClientTraceData.b.f47a;\n if (allQueried) {\n OrderDetailMO[] orderDetailMOArr = this.results;\n int length = orderDetailMOArr.length;\n int i = 0;\n while (i < length) {\n OrderDetailMO mo = orderDetailMOArr[i];\n if (checkPaid(mo.getOrderInfo().getOrderStatusCode())) {\n sum += Double.parseDouble(mo.getOrderInfo().getTotalPrice());\n i++;\n } else {\n return;\n }\n }\n final QRDialogDelegate delegate = this.mDelegate;\n if (sum == ((double) ((int) sum))) {\n sumText = String.format(\"成功付款 %.0f 元\", new Object[]{Double.valueOf(sum)});\n } else {\n sumText = String.format(\"成功付款 %.2f 元\", new Object[]{Double.valueOf(sum)});\n }\n new PayConfirmDialog.Builder(this.mActivityContext).setCancelable(false).setMessage((CharSequence) onHandlerSpanned(sumText)).setPositiveButton(\"按OK键完成\", (DialogInterface.OnClickListener) new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialogInterface, int i) {\n if (delegate != null) {\n delegate.QRDialogSuccess(QRDialog.this, true);\n }\n dialogInterface.dismiss();\n }\n }).create().show();\n dismiss();\n return;\n }\n this.mHandler.postDelayed(this.queryNextRunnable, 5000);\n }\n }",
"@Override\r\n\tpublic int update() throws Exception {\n\t\treturn 0;\r\n\t}",
"private static NodeValue calcReturn(String result, Node arg) {\n Node n2 = NodeFactory.createLiteral(result, arg.getLiteralLanguage(), arg.getLiteralDatatype()) ;\n return NodeValue.makeNode(n2) ;\n }",
"@Override\n\tpublic void calculateAndUpdateBalance() {\n\n\t\tbalance -= fee;\n\n\t}",
"void compute() {\n\n if (random.nextBoolean()) {\n value = value + random.nextInt(variation);\n ask = value + random.nextInt(variation / 2);\n bid = value + random.nextInt(variation / 2);\n } else {\n value = value - random.nextInt(variation);\n ask = value - random.nextInt(variation / 2);\n bid = value - random.nextInt(variation / 2);\n }\n\n if (value <= 0) {\n value = 1.0;\n }\n if (ask <= 0) {\n ask = 1.0;\n }\n if (bid <= 0) {\n bid = 1.0;\n }\n\n if (random.nextBoolean()) {\n // Adjust share\n int shareVariation = random.nextInt(100);\n if (shareVariation > 0 && share + shareVariation < stocks) {\n share += shareVariation;\n } else if (shareVariation < 0 && share + shareVariation > 0) {\n share += shareVariation;\n }\n }\n }",
"public int balup(double newbalance, Long accountno, Long broaccno, Double bramt) throws Exception{\n\tint j=DbConnect.getStatement().executeUpdate(\"update account set balance=\"+newbalance+\" where accno=\"+accountno+\"\");\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update account set balance=balance+\"+bramt+\" where accno=\"+broaccno+\"\");\r\n\treturn i;\r\n}",
"double getUnpaidAmount();",
"public abstract int calculateOutput();",
"public double getStockFinal(long pv) {\n float entree = 0 ;\n float sortie = 0 ;\n\n ArrayList<Produit> produits = null ;\n if (pv==0) produits = produitDAO.getAll();\n else produits = produitDAO.getAllByPv(pv) ;\n\n ArrayList<Mouvement> mouvements = null;\n\n double valeur = 0 ;\n double total = 0 ;\n double quantite = 0 ;\n double cmpu = 0 ;\n double restant = 0 ;\n double qsortie = 0 ;\n double qentree = 0 ;\n // Vente par produit\n Mouvement mouvement = null ;\n Operation operation = null ;\n\n for (int i = 0; i < produits.size(); i++) {\n try {\n mouvements = mouvementDAO.getManyByProductInterval(produits.get(i).getId_externe(),DAOBase.formatter2.parse(datedebut),DAOBase.formatter2.parse(datefin)) ;\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n if (mouvements != null){\n valeur = 0 ;\n quantite = 0 ;\n restant = 0 ;\n qentree = 0 ;\n cmpu = 0 ;\n qsortie = 0 ;\n\n for (int j = 0; j < mouvements.size(); j++) {\n mouvement = mouvements.get(j) ;\n operation = operationDAO.getOne(mouvement.getOperation_id()) ;\n if (operation==null || (operation.getAnnuler()==1 && operation.getDateannulation().before(new Date())) || operation.getTypeOperation_id().startsWith(OperationDAO.CMD)) continue;\n\n //if (pv!=0 && caisseDAO.getOne(operation.getCaisse_id()).getPointVente_id()!=pv) continue;\n if (j==0)\n if (mouvement.getRestant()==mouvement.getQuantite() && mouvement.getEntree()==0){\n restant = 0 ;\n }\n else restant = mouvement.getRestant() ;\n\n if (mouvement.getEntree()==0) {\n valeur -= mouvement.getPrixA() * mouvement.getQuantite() ;\n qentree += mouvement.getQuantite() ;\n cmpu = mouvement.getPrixA() ;\n }\n else {\n valeur += mouvement.getCmup() * mouvement.getQuantite() ;\n qsortie += mouvement.getQuantite() ;\n }\n /*\n if (restant!=0) cmpu = valeur / restant ;\n else cmpu = mouvement.getCmup() ;\n */\n }\n\n quantite = restant + qentree - qsortie ;\n total+=Math.abs(valeur) ;\n }\n }\n\n return total;\n }",
"@Override\n\tdouble updateTotalPrice() {\n\t\treturn 0;\n\t}",
"public boolean updateData( Result r)\n {\n //some result checking...\n //set last update time\n time = NTPDate.currentTimeMillis();\n int prevState = nState;\n //get state as int\n nState = (int)r.param[r.getIndex(\"State\")];\n return (prevState!=nState);\n }",
"@Override\n\tpublic void calucate(EuroMatrices Result, OFNMatchData matchData) {\n\t\t\n\t}",
"Integer total();",
"protected abstract SoyValue compute();",
"public double calculateShipping() {\n shipAmount = (SHIPPINGCOST);\n\n return shipAmount;\n }",
"@Override\n\tpublic double execute() {\n\t\tList<TurtleModel> prevousTurtlesTold = myContext.getCanvasModel().getTurtlesTold();\n\n\t\t// execute\n\t\tMap<Integer, TurtleModel> myTurtleMap = myContext.getCanvasModel().getTurtleMap();\n\t\tdouble valueToReturn = 0;\n\n\t\tfor (TurtleModel turtle : myTurtleMap.values()) {\n\t\t\tmyContext.getCanvasModel().tellTurtles(turtle);\n\t\t\tmyContext.getCanvasModel().setActiveTurtleID(turtle.getID());\n\t\t\tif (myCondition.toValue() == 1) {\n\t\t\t\tvalueToReturn = myListNode.toValue();\n\t\t\t}\n\t\t}\n\n\t\t// set turtlesTold back\n\t\tmyContext.getCanvasModel().tellTurtles(prevousTurtlesTold);\n\t\treturn valueToReturn;\n\t}",
"private void updrec() {\n\t\tsavedata();\n\t\tcontractDetail.retrieve(stateVariable.getXwordn(), stateVariable.getXwabcd());\n\t\tnmfkpinds.setPgmInd36(! lastIO.isFound());\n\t\tnmfkpinds.setPgmInd66(isLastError());\n\t\t// BR00011 Product found on Contract_Detail and NOT ERROR(CONDET)\n\t\tif (! nmfkpinds.pgmInd36() && ! nmfkpinds.pgmInd66()) {\n\t\t\trestoredata();\n\t\t\tcontractDetail.update();\n\t\t\tnmfkpinds.setPgmInd99(isLastError());\n\t\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\t\tmsgObjIdx = setMsgObj(\"Y2U0007\", \"\", msgObjIdx, messages);\n\t\t\t\tstateVariable.setZmsage(subString(errmsg, 1, 78));\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tstateVariable.setZmsage(subString(errmsg, 1, 78));\n\t\t}\n\t}",
"float calculatePrice () \n\t{\n\t\tfloat final_price = 0;\n\t\tfinal_price = (float)(price * quantity); // price * number of items\n\t\tfinal_price += final_price*(.10); // add tax\n\t\tif(perishable.equals(\"P\"))\n\t\t{\n\t\t\tfloat ship = (float)(20* weight)*quantity; // add shipping\n\t\t\tship += ship*.20;\n\t\t\tfinal_price += ship;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfinal_price += (20* weight)*quantity; // add shipping\n\t\t}\n\t\treturn final_price;\n\t}",
"public void deposit(double value){\r\n balance += value;\r\n}",
"@Test\n public void testMakeChange() {\n\n //setting a variable for the amount of change the user should get back\n BigDecimal changeDue = new BigDecimal(\"3.19\");\n\n //creating map to store the results of the makeChange() method\n Map<Coin, BigDecimal> changeReturned = new HashMap<>();\n\n changeReturned = dao.makeChange(changeDue);\n\n //creating a variable to store the amount returned from the makeChange()\n // as a BigDecimal\n BigDecimal changeReturnedAsBigDecimal = BigDecimal.ZERO;\n\n BigDecimal quarter = new BigDecimal(\"0.25\");\n BigDecimal dime = new BigDecimal(\"0.10\");\n BigDecimal nickel = new BigDecimal(\"0.05\");\n BigDecimal penny = new BigDecimal(\"0.01\");\n\n BigDecimal numberOfQuarters;\n BigDecimal numberOfDimes;\n BigDecimal numberOfNickels;\n BigDecimal numberOfPennies;\n\n BigDecimal valueOfQuartersDispensed;\n BigDecimal valueOfDimesDispensed;\n BigDecimal valueOfNickelsDispensed;\n BigDecimal valueOfPenniesDispensed; \n\n //calculating the number of quarters that should be returned\n numberOfQuarters = changeDue.divide(quarter);\n //calculating the value of the quarters returned\n valueOfQuartersDispensed = numberOfQuarters.setScale(0, RoundingMode.DOWN).multiply(quarter);\n //calculating how much change is left to be dispensed after quarters\n BigDecimal changeAfterQuarters = changeDue.subtract(valueOfQuartersDispensed);\n \n //adding the value of the quarters returned\n changeReturnedAsBigDecimal = changeReturnedAsBigDecimal.add(valueOfQuartersDispensed);\n\n //dimes\n numberOfDimes = changeAfterQuarters.divide(dime);\n valueOfDimesDispensed = numberOfDimes.setScale(0, RoundingMode.DOWN).multiply(dime);\n\n BigDecimal changeAfterDimes = changeAfterQuarters.subtract(valueOfDimesDispensed);\n \n changeReturnedAsBigDecimal = changeReturnedAsBigDecimal.add(valueOfDimesDispensed);\n \n //nickels\n numberOfNickels = changeAfterDimes.divide(nickel);\n valueOfNickelsDispensed = numberOfNickels.setScale(0, RoundingMode.DOWN).multiply(nickel);\n\n BigDecimal changeAfterNickels = changeAfterDimes.subtract(valueOfNickelsDispensed);\n \n changeReturnedAsBigDecimal = changeReturnedAsBigDecimal.add(valueOfNickelsDispensed);\n \n //pennies\n numberOfPennies = changeAfterNickels.divide(penny);\n valueOfPenniesDispensed = numberOfPennies.setScale(0, RoundingMode.DOWN).multiply(penny);\n \n changeReturnedAsBigDecimal = changeReturnedAsBigDecimal.add(valueOfPenniesDispensed);\n\n //testing if the amount of change returnes equals the amount of change that is due\n assertEquals(changeDue, changeReturnedAsBigDecimal);\n }",
"@Override\n\tpublic double evaluate() {\n\t\t// TODO Auto-generated method stub\n\t\treturn 0;\n\t}",
"@Override\n public BigDecimal evaluate(TextMap args, String variableName) {\n return null;\n\n// return first.getBonus();\n }"
]
| [
"0.60968804",
"0.6095847",
"0.58928263",
"0.5850275",
"0.57671523",
"0.5740699",
"0.5712003",
"0.5694067",
"0.5685615",
"0.5633604",
"0.56275403",
"0.5600713",
"0.5599903",
"0.55895114",
"0.55684465",
"0.55331737",
"0.5526549",
"0.55169684",
"0.5512577",
"0.5510665",
"0.5497804",
"0.5473548",
"0.54720986",
"0.54549783",
"0.5450898",
"0.5430609",
"0.54247624",
"0.5424036",
"0.54234546",
"0.54038584",
"0.5396179",
"0.53955346",
"0.5388885",
"0.5378153",
"0.5343519",
"0.5326195",
"0.5319712",
"0.53135777",
"0.5308042",
"0.5298122",
"0.5293774",
"0.52886903",
"0.52878284",
"0.5277348",
"0.5268287",
"0.5262079",
"0.5255277",
"0.52536994",
"0.5248383",
"0.5244082",
"0.5230978",
"0.5227512",
"0.5219992",
"0.5215475",
"0.5212587",
"0.5203815",
"0.5195399",
"0.5195281",
"0.5195142",
"0.51898444",
"0.5188729",
"0.5185797",
"0.51836085",
"0.5176893",
"0.51694804",
"0.5163345",
"0.5159851",
"0.5142712",
"0.5135806",
"0.5135163",
"0.5121596",
"0.5117746",
"0.511466",
"0.5114138",
"0.5108495",
"0.50830966",
"0.5079021",
"0.50756335",
"0.50741535",
"0.5072521",
"0.5071013",
"0.50656694",
"0.50631726",
"0.5061368",
"0.5055132",
"0.5050349",
"0.50490505",
"0.5048502",
"0.5048444",
"0.5040931",
"0.5039576",
"0.5037011",
"0.50363296",
"0.50339574",
"0.503392",
"0.503314",
"0.5031524",
"0.5030721",
"0.50256974",
"0.5014439"
]
| 0.6153583 | 0 |
Creates a new directed edge between to vertices with direction from>to | public Edge(Node from, Node to, int weight) {
this.from = from;
this.to = to;
this.weight = weight;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Edge(Vertex<VV> from, Vertex<VV> to)\r\n {\r\n this.from = from;\r\n this.to = to;\r\n from.addEdge(this);\r\n to.addEdge(this);\r\n }",
"public void addEdge(Node from, Node to);",
"public Edge(int from, int to) {\n this(from, to, null);\n }",
"public Edge(Node from, Node to) {\n fromNode = from;\n toNode = to;\n }",
"public UndirectedEdge(VType from, VType to) {\n\t\t// TODO: Add your code here\n\t\tsuper(from,to);\n\t}",
"public Edge (Vertex from, Vertex to) {\r\n this.from = from;\r\n this.to = to;\r\n capacity = 0;\r\n flow = 0;\r\n }",
"void addEdge(int from, int to) {\n\t\tadjList.get(from).add(to);\n\t}",
"Edge(Node from,Node to, int length){\n this.source=from;\n this.destination=to;\n this.weight=length;\n }",
"public void addEdge(V from, V to) {\n Set<V> edges = new HashSet<>();\n edges.add(to);\n this.addEdges(from, edges);\n }",
"public Edge(int from, int to, int weight) {\n this.from = from;\n this.to = to;\n this.weight = weight;\n }",
"Edge(Vertex u, Vertex v) {\n From = u;\n To = v;\n\n }",
"public Edge(int from, int to, Integer weight) {\n this.from = from;\n this.to = to;\n this.weight = weight;\n }",
"public DirectedEdge(int from, int to, double weight) {\n this.from = from;\n this.to = to;\n this.weight = weight;\n }",
"public void addEdge(String from, String to) {\n Vertex v, w;\n if (hasEdge(from, to)) return; // no duplicate edges\n mNumEdges += 1;\n if ((v = getVertex(from)) == null)\n v = addVertex(from);\n if ((w = getVertex(to)) == null)\n w = addVertex(to);\n mAdjList.get(v).add(w);\n mAdjList.get(w).add(v); // undirected graph only\n }",
"public void setTo(Vertex<VV> vertex)\r\n { this.to = vertex; }",
"Edge createEdge(Vertex src, Vertex tgt, boolean directed);",
"public DotGraphEdge drawEdge(String from, String to) {\n DotGraphNode src = drawNode(from);\n DotGraphNode dst = drawNode(to);\n DotGraphEdge edge = new DotGraphEdge(src, dst);\n\n this.drawElements.add(edge);\n\n return edge;\n }",
"private void addEdge(int from, int to, Edge e) {\n _edges.get(from).set(to, e);\n _edgeMap.put(e, new int [] {from, to});\n }",
"@Override\n public void addEdge(V from, V to)\n {\n\n if (from.equals(null) || to.equals(null)){\n throw new IllegalArgumentException();\n }\n\n if (contains(from)){\n\n\t ArrayList <V> edges = getEdges(from);\n\n \t if (!edges.contains(to)){\n \t\t edges.add(to);\n graph.put(from, edges);\n \t }\n\t }\n\n \tif (!contains(from)){\n \t ArrayList <V> newEdge = new ArrayList<>();\n \t newEdge.add(to);\n \t graph.put(from, newEdge);\n \t}\n\n \tif (!contains(to)){\n \t ArrayList<V> e = new ArrayList<>();\n \t graph.put(to, e);\n \t}\n\n\n\n\n\n }",
"public static Set<MustAliasBUEdge> constructMove(Variable from, Variable to) {\n\t\tif (from == null || to == null)\n\t\t\tthrow new RuntimeException(\"Neither from nor to can be null!\");\n\t\tSet<MustAliasBUEdge> ret = new ArraySet<MustAliasBUEdge>();\n\t\t// Case 1: from \\notin ms && to \\notin ms\n\t\tMustAliasBUEdge c1 = new MustAliasBUEdge();\n\t\tc1.constraint = new AliasConstraint();\n\t\tSet<Variable> notInV1 = c1.constraint.getNotInVSet();\n\t\tnotInV1.add(from);\n\t\tnotInV1.add(to);\n\t\tret.add(c1);\n\t\t// Case 2: from \\in ms && to \\notin ms\n\t\tMustAliasBUEdge c2 = new MustAliasBUEdge();\n\t\tc2.constraint = new AliasConstraint();\n\t\tSet<Variable> notInV2 = c2.constraint.getNotInVSet();\n\t\tnotInV2.add(to);\n\t\tSet<Variable> inV2 = c2.constraint.getInVSet();\n\t\tinV2.add(from);\n\t\tc2.genSet.add(new Pair<Variable, Variable>(to, from));\n\t\tret.add(c2);\n\t\t// Case 3: from \\notin ms && to \\in ms\n\t\tMustAliasBUEdge c3 = new MustAliasBUEdge();\n\t\tc3.constraint = new AliasConstraint();\n\t\tSet<Variable> notInV3 = c3.constraint.getNotInVSet();\n\t\tnotInV3.add(from);\n\t\tSet<Variable> inV3 = c3.constraint.getInVSet();\n\t\tinV3.add(to);\n\t\tc3.killSet.add(to);\n\t\tret.add(c3);\n\t\t// Case 4: from \\in ms && to \\in ms\n\t\tMustAliasBUEdge c4 = new MustAliasBUEdge();\n\t\tc4.constraint = new AliasConstraint();\n\t\tSet<Variable> inV4 = c4.constraint.getInVSet();\n\t\tinV4.add(from);\n\t\tinV4.add(to);\n\t\tc4.killSet.add(to);\n\t\tc4.genSet.add(new Pair<Variable, Variable>(to, from));\n\t\tret.add(c4);\n\t\treturn ret;\n\t}",
"public abstract void removeEdge(int from, int to);",
"public Vertex<VV> getTo()\r\n { return to; }",
"public Link(Node from, Node to) {\n\t this.from = from;\n\t this.to = to;\n\t}",
"public void addRelation(int from, int to){\n this.setAdjacencyMatrixEntry(from, to, 1);\n }",
"public Edge(Vertex from, Vertex to, int capacity){\r\n this.from = from;\r\n this.to = to;\r\n this.capacity = capacity;\r\n flow = 0;\r\n\r\n }",
"@Override\n public Iterable<V> adjacentTo(V from)\n {\n if (from.equals(null)){\n throw new IllegalArgumentException();\n }\n Iterator graphIterator = graph.entrySet().iterator();\n \t Map.Entry graphElement = (Map.Entry) graphIterator.next();\n \t V vert = (V)graphElement.getKey();\n \t while (graphIterator.hasNext() && vert != from){\n \t\tgraphElement = (Map.Entry) graphIterator.next();\n \t\tvert = (V)graphElement.getKey();\n \t }\n \t ArrayList <V> edges = graph.get(vert);\n \t //Iterable <V> e = edges;\n \t return edges;\n }",
"public void connect(Vertex from, Vertex to, int weight)\n {\n Edge edge = new Edge(from, to , weight);\n\n for(Edge current: connections.get(from))\n {\n if(current.other(from) == to)\n {\n return;\n }\n }\n\n connections.get(from).add(edge);\n connections.get(to).add(edge);\n }",
"public Vertex getTo() {\r\n\r\n return to;\r\n }",
"public IEdge addEdge(String from, String to, Double cost);",
"public GraphEdge(int from, int to, double costVar)\r\n {\r\n indexFrom = from;\r\n indexTo = to;\r\n cost = costVar;\r\n }",
"public abstract boolean hasEdge(int from, int to);",
"public void addEdge(int start, int end);",
"public static void addEdge(List<List<Integer>> graph, int from, int to) {\n graph.get(from).add(to);\n }",
"public void removeEdge(V from, V to){\n if (from.equals(null) || to.equals(null)){\n throw new IllegalArgumentException();\n }\n if (hasEdge(from, to)){\n ArrayList<V> edges = (ArrayList<V>)getEdges(from);\n int i = 1;\n V vertex = edges.get(0);\n while (i < edges.size() && !vertex.equals(to)){\n i++;\n vertex = edges.get(i);\n }\n edges.remove(vertex);\n graph.put(from, edges);\n }\n\n }",
"public boolean isAdjacent(int from, int to) {\n //your code here\n \tfor (Edge e : myAdjLists[from]) {\n \t\tif (e.to() == to) {\n \t\t\treturn true;\n \t\t}\n \t}\n return false;\n }",
"public static void addEdge(List<List<Integer>> graph, int from, int to) {\n\t graph.get(from).add(to);\n\t graph.get(to).add(from);\n\t }",
"public Edge<V> addEdge(V source, V target);",
"void addEdge(int source, int destination, int weight);",
"public void addEdgeToBounds(S2Point from, S2Point to) {\n if (!boundSet) {\n boundSet = true;\n xmin = xmax = from.x;\n ymin = ymax = from.y;\n zmin = zmax = from.z;\n }\n xmin = Math.min(xmin, Math.min(to.x, from.x));\n ymin = Math.min(ymin, Math.min(to.y, from.y));\n zmin = Math.min(zmin, Math.min(to.z, from.z));\n xmax = Math.max(xmax, Math.max(to.x, from.x));\n ymax = Math.max(ymax, Math.max(to.y, from.y));\n zmax = Math.max(zmax, Math.max(to.z, from.z));\n\n // Because our arcs are really geodesics on the surface of the earth\n // an edge can have intermediate points outside the xyz bounds implicit\n // in the end points. Based on the length of the arc we compute a\n // generous bound for the maximum amount of deformation. For small edges\n // it will be very small but for some large arcs (ie. from (1N,90W) to\n // (1N,90E) the path can be wildly deformed. I did a bunch of\n // experiments with geodesics to get safe bounds for the deformation.\n double approxArcLen =\n Math.abs(from.x - to.x) + Math.abs(from.y - to.y) + Math.abs(from.z - to.z);\n if (approxArcLen < 0.025) { // less than 2 degrees\n maxDeformation = Math.max(maxDeformation, approxArcLen * 0.0025);\n } else if (approxArcLen < 1.0) { // less than 90 degrees\n maxDeformation = Math.max(maxDeformation, approxArcLen * 0.11);\n } else {\n maxDeformation = approxArcLen * 0.5;\n }\n }",
"public void addEdge(List<List<Integer>> graph, int from, int to) {\r\n graph.get(from).add(to);\r\n graph.get(to).add(from);\r\n }",
"public int[][] create_edge(int from, int to, boolean weighted, int weight){\n try{\n if(weighted==true) // If weighted edge\n adj_matrix[from][to]=weight;\n else\n adj_matrix[from][to]=1;\n }\n catch(ArrayIndexOutOfBoundsException index){ // If invalid index\n System.out.println(\" Invalid Vertex!\");\n }\n return adj_matrix;\n }",
"public void makeEdge(char start,char end,int distance){\n\n Edge e = new Edge(start,end,distance);\n adjList[getIdx(start)].addFirst(e);\n //undirected graph add two edges in opposite direction\n e = new Edge(end,start,distance);\n adjList[getIdx(end)].addFirst(e);\n numEdges++;\n }",
"public edge_type getEdge(int from, int to) {\n assert (from < nodeVector.size())\n && (from >= 0)\n && nodeVector.get(from).getIndex() != invalid_node_index :\n \"<SparseGraph::GetEdge>: invalid 'from' index\";\n\n assert (to < nodeVector.size())\n && (to >= 0)\n && nodeVector.get(to).getIndex() != invalid_node_index :\n \"<SparseGraph::GetEdge>: invalid 'to' index\";\n\n ListIterator<edge_type> it = edgeListVector.get(from).listIterator();\n while (it.hasNext()) {\n edge_type curEdge = it.next();\n if (curEdge.getTo() == to) {\n return curEdge;\n }\n }\n\n assert false : \"<SparseGraph::GetEdge>: edge does not exist\";\n return null;\n }",
"public boolean isEdge( VKeyT fromKey, VKeyT toKey )\n throws NoSuchVertexException;",
"public EdgeIntf addEdge( Vertex fromVertex, Vertex toVertex ) throws Exception {\r\n if( !isPath( toVertex, fromVertex ))\r\n return super.addEdge( fromVertex, toVertex );\r\n else\r\n throw new CycleException();\r\n }",
"public Edge<V> getEdge(V source, V target);",
"protected Edge<T> addEdge(final T object, final LineString line,\n final Point from, final Point to) {\n if (this.inMemory && getEdgeCount() >= this.maxEdgesInMemory) {\n this.edgeAttributesById = BPlusTreeMap.createIntSeralizableTempDisk(this.edgeAttributesById);\n // TODO edgIds\n // TODO edgeIndex\n this.edgeLinesById = BPlusTreeMap.createIntSeralizableTempDisk(this.edgeLinesById);\n this.edgeObjectsById = BPlusTreeMap.createIntSeralizableTempDisk(this.edgeObjectsById);\n this.edgesById = BPlusTreeMap.createIntSeralizableTempDisk(this.edgesById);\n\n // TODO nodeIndex\n this.nodeAttributesById = BPlusTreeMap.createIntSeralizableTempDisk(this.nodeAttributesById);\n this.nodesById = BPlusTreeMap.createIntSeralizableTempDisk(this.nodesById);\n this.nodesIdsByCoordinates = BPlusTreeMap.createTempDisk(\n this.nodesIdsByCoordinates, new SerializablePageValueManager<Point>(),\n PageValueManager.INT);\n this.inMemory = false;\n }\n final Node<T> fromNode = getNode(from);\n final Node<T> toNode = getNode(to);\n final int edgeId = ++this.nextEdgeId;\n final Edge<T> edge = new Edge<T>(edgeId, this, fromNode, toNode);\n if (this.edgeLinesById != null) {\n this.edgeLinesById.put(edgeId, line);\n }\n this.edgeObjectsById.put(edgeId, object);\n this.edgesById.put(edgeId, edge);\n this.edgeIds.put(edge, edgeId);\n if (this.edgeIndex != null) {\n this.edgeIndex.add(edge);\n }\n this.edgeListeners.edgeEvent(edge, null, EdgeEvent.EDGE_ADDED, null);\n return edge;\n }",
"public boolean hasEdge(String from, String to) {\n Vertex v1 = mVertices.get(from);\n Vertex v2 = mVertices.get(to);\n if (v1 == null || v2 == null) return false;\n return mAdjList.get(v1).contains(v2);\n }",
"public boolean isAdjacent(int from, int to) {\r\n LinkedList<Edge> testList = myAdjLists[from];\r\n int counter = 0;\r\n while (counter < testList.size()) {\r\n \tif (testList.get(counter).myTo == to) {\r\n \t\treturn true;\r\n \t}\r\n \tcounter++;\r\n }\r\n return false;\r\n }",
"private void addEdge(int from, int to, int cost) {\r\n\t\tif (edges[from] == null)\r\n\t\t\tedges[from] = new HashMap<Integer, Integer>(INITIAL_MAP_SIZE);\r\n\t\tif (edges[from].put(to, cost) == null)\r\n\t\t\tnumEdges++;\r\n\t}",
"private void createEdges() throws IOException {\r\n\t\tString line;\r\n\t\tString fromVertex=null;\r\n\t\tString toVertex=null;\r\n\t\twhile((line=next(1))!=null) {\r\n\t\t\tif(line.startsWith(\"[\"))\r\n\t\t\t\t{\r\n\t\t\t\tthis.buffer=line;\r\n\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\tint colon=line.indexOf(':');\r\n\t\t\tif(colon==-1) continue;\r\n\t\t\tif(line.startsWith(\"id:\"))\r\n\t\t\t\t{\r\n\t\t\t\ttoVertex= line.substring(colon+1).trim();\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\tif(line.startsWith(\"is_a:\"))\r\n\t\t\t\t{\r\n\t\t\t\tfromVertex = nocomment(line.substring(colon+1));\r\n\t\t\t\t//System.out.println(fromVertex+\" to be connected to: \"+toVertex);\r\n\t\t\t\tTerm fromNode = terms.get(fromVertex);\r\n\t\t\t\tTerm toNode = terms.get(toVertex);\r\n\t\t\t\tif (fromNode.namespace.equals(\"molecular_function\") && toNode.namespace.equals(\"molecular_function\")){\r\n\t\t\t\t\tdagMF.addEdge(fromNode, toNode);\r\n\t\t\t\t}\r\n\t\t\t\telse if (fromNode.namespace.equals(\"biological_process\") && toNode.namespace.equals(\"biological_process\")){\r\n\t\t\t\t\tdagBP.addEdge(fromNode, toNode);\r\n\t\t\t\t} \r\n\t\t\t\telse if (fromNode.namespace.equals(\"cellular_component\") && toNode.namespace.equals(\"cellular_component\")){\r\n\t\t\t\t\tdagCC.addEdge(fromNode, toNode);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(\"FAILED TO ADD TO DAG, not belonging to the same NAMESPACE\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t}\r\n\t}",
"public void addEdge(int start, int end, double weight);",
"public RefexCAB newEdge(RefexCAB originNode, RefexCAB destinationNode)\n throws IOException, InvalidCAB, ContradictionException {\n return newEdge(originNode, true, destinationNode);\n }",
"public Road(String name, Junction from, Junction to) {\n this.name = name;\n this.from = from;\n this.to = to;\n }",
"public void addEdge( VKeyT fromKey, VKeyT toKey, EDataT data )\n throws NoSuchVertexException;",
"public void addEdge(Character sourceId, Character destinationId) {\n Node sourceNode = getNode(sourceId);\n Node destinationNode = getNode(destinationId);\n sourceNode.adjacent.add(destinationNode);\n }",
"static String makeEdge(String id,\n String source,\n String target,\n String relationship,\n int causal) {\n return format(EDGE_FMT, id, source, target, relationship, causal);\n }",
"public void addEdge(int source, int destination) {\n adjacencyList.get(source).add(destination);\n adjMat[source][destination] = 1;\n //if graph is undirected graph, add u to v's adjacency list\n if (!isDirected) {\n adjacencyList.get(destination).add(source);\n adjMat[destination][source] = 1;\n }\n }",
"public static boolean areAdjacent(HantoCoordinate from, HantoCoordinate to){\n\n\t\treturn HantoUtil.getAllNeighbors(from).contains(to);\n\t}",
"public int get_edge(int from, int to){\n int temp=0;\n try{\n temp=adj_matrix[from][to];\n }\n catch(ArrayIndexOutOfBoundsException index){ // If invalid index\n System.out.println(\" Invalid Vertex!\");\n }\n return temp;\n }",
"public Node getTo() {\n return to;\n }",
"public void setFrom(Vertex<VV> vertex)\r\n { this.from = vertex; }",
"public List<Transition> getTransitionsFromStateToState(final State from, final State to) {\n\t\tfinal List<Transition> list = new ArrayList<>();\n\t\tgetTransitionsFromState(from).stream().forEach(transition -> {\n\t\t\tif (transition.getToState() == to) {\n\t\t\t\tlist.add(transition);\n\t\t\t}\n\t\t});\n\t\treturn list;\n\t}",
"public Stack<Vertex> next() {\n Vertex u = lov.pop();\n for (Edge e : u.outEdges) {\n if (!e.to.visited) {\n cameFromEdge.put(e.to.toIdentifier(), e.from);\n if (e.to.x == MazeWorld.width - 1 && e.to.y == MazeWorld.height - 1) {\n reconstruct(cameFromEdge, e.to);\n lov = new Stack<Vertex>();\n }\n else {\n lov.push(u);\n e.to.visited = true;\n lov.push(e.to);\n break;\n }\n }\n }\n return lov;\n }",
"protected Edge makeEdge(Node p_a, Node p_b) {\n\t\tif(!isDirectedGraph && p_a.hashCode() > p_b.hashCode()) {\n\t\t\treturn new Edge(p_b, p_a);\n\t\t} else {\n\t\t\treturn new Edge(p_a, p_b);\n\t\t}\n\t}",
"Iterable<DirectedEdge> pathTo(int v)\n\t{\n\t\tStack<DirectedEdge> path=new Stack<>();\n\t\tfor(DirectedEdge e=edgeTo[v]; e!=null; e=edgeTo[e.from()])\n\t\t{\n\t\t\tpath.push(e);\n\t\t}\n\t\treturn path;\n\t}",
"public void insertEdge(int from, int to, int cost) {\n\t\tmatrix[from][to] = cost;\n\t\tmatrix[to][from] = cost;\n\t}",
"public DNode getTo() { return targetnode; }",
"public DirectedGraphArc(V from, V to, A data)\n\t{\n\t\tthis.from = from;\n\t\tthis.to = to;\n\t\tthis.data = data;\n\t}",
"public OrderedEdge(int origin, int destination, double weight, Edge next) {\t\n\t\tsuper((origin < destination) ? origin : destination,\n\t\t\t (origin < destination) ? destination : origin,\n\t\t\t weight, next);\n\t}",
"public Edge(int start, int end, int weight) {\n this.start = start;\n this.end = end;\n this.weight = weight;\n }",
"public static void createAggregatedRelationship (AbstractStructureElement from, AbstractStructureElement to, ArrayList<KDMRelationship> relations) {\n\t\tif (from.getAggregated().size() > 0) {\r\n\t\t\t//System.out.println(\"MAIOR QUE 1, TODO\");\r\n\r\n\t\t\t//Andre - pega os aggragated que ja estão no from\r\n\t\t\tEList<AggregatedRelationship> aggregatedFROM = from.getAggregated();\t\t\r\n\r\n\t\t\t//Andre - começa um for nesses aggregated\r\n\t\t\tfor (int i = 0; i < aggregatedFROM.size(); i++) {\r\n\r\n\t\t\t\t//Andre - verifica se o aggregated que ja existe tem o mesmo destino que o que esta pra ser criado \r\n\t\t\t\tif (to.getName().equalsIgnoreCase(aggregatedFROM.get(i).getTo().getName())) {\r\n\r\n\t\t\t\t\t//Andre - se tiver o mesmo destino ele adiciona as relacoes novas e atualiza a densidade, depois disso ele pega e sai do for\r\n\t\t\t\t\t//ADICIONAR\r\n\r\n\t\t\t\t\taggregatedFROM.get(i).setDensity(aggregatedFROM.get(i).getDensity()+relations.size());\r\n\t\t\t\t\taggregatedFROM.get(i).getRelation().addAll(relations);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//Andre - se for o ultimo aggregated do for e mesmo assim não encontrou o com o mesmo destino que esta pra ser criado \r\n\t\t\t\t//Andre - entao cria um novo aggregated para ser adicionado\r\n\t\t\t\t//se chegar no ultimo e nao encontrar\r\n\t\t\t\tif (i == (aggregatedFROM.size()-1)) {\r\n\r\n\t\t\t\t\tAggregatedRelationship newRelationship = CoreFactory.eINSTANCE.createAggregatedRelationship();\r\n\t\t\t\t\tnewRelationship.setDensity(relations.size());\r\n\t\t\t\t\tnewRelationship.setFrom(from);\r\n\t\t\t\t\tnewRelationship.setTo(to);\r\n\t\t\t\t\tnewRelationship.getRelation().addAll(relations);\r\n\t\t\t\t\tfrom.getAggregated().add(newRelationship);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\t//Andre - se não tiver um agrregated na layer from adiciona um com as relacoes que podem entre duas layers\r\n\t\t\tAggregatedRelationship newRelationship = CoreFactory.eINSTANCE.createAggregatedRelationship();\r\n\t\t\tnewRelationship.setDensity(relations.size());\r\n\t\t\tnewRelationship.setFrom(from);\r\n\t\t\tnewRelationship.setTo(to);\r\n\t\t\tnewRelationship.getRelation().addAll(relations);\r\n\t\t\tfrom.getAggregated().add(newRelationship);\r\n\t\t}\r\n\r\n\t\t//Fernando - Limpando lista \r\n\t\trelations.clear();\r\n\t\tfrom = null;\r\n\t\tto = null;\r\n\r\n\r\n\t}",
"public void setTo(int to) {\n this.to = to;\n }",
"public Iterable<DirectedEdge> pathTo(int v){\n\t\tvalidateVertex(v);\n\t\tif(!hasPathTo(v)) return null;\n\n\t\tLinkedStack<DirectedEdge> stack=new LinkedStack<>();\n\t\twhile(edgeTo[v]!=null){\n\t\t\tstack.push(edgeTo[v]);\n\t\t\tv=edgeTo[v].from();\n\t\t}\n\t\treturn stack;\n\t}",
"public void makeUndirected(Position ep) throws InvalidPositionException;",
"private void addEdge(int start, int end) {\n adjMatrix[start][end] = 1;\n // for undirected graph\n adjMatrix[end][start] = 1;\n }",
"public int[] direction(Node from, Node to) {\n int dx = to.getX() - from.getX();\n int dy = to.getY() - from.getY();\n int[] direction = {0, 0};\n \n if (dx != 0) {\n direction[0] = dx/Math.abs(dx);\n }\n \n if (dy != 0) {\n direction[1] = dy/Math.abs(dy);\n }\n \n return direction;\n }",
"public List<E> createEdgeListPath()\r\n/* */ {\r\n/* 146 */ List<E> path = new ArrayList();\r\n/* 147 */ AbstractPathElement<V, E> pathElement = this;\r\n/* */ \r\n/* */ \r\n/* 150 */ while (pathElement.getPrevEdge() != null) {\r\n/* 151 */ path.add(pathElement.getPrevEdge());\r\n/* */ \r\n/* 153 */ pathElement = pathElement.getPrevPathElement();\r\n/* */ }\r\n/* */ \r\n/* 156 */ Collections.reverse(path);\r\n/* */ \r\n/* 158 */ return path;\r\n/* */ }",
"public Edge(Vertex origen, Vertex destino, double distancia){\n this.origen=origen;\n this.destino=destino;\n this.distancia=distancia;\n }",
"public abstract void addEdge(Point p, Direction dir);",
"protected FromToOption createOption() {\n return new FromToOption();\n }",
"public void setEdgeCost(int from, int to, double newCost) {\n //make sure the nodes given are valid\n assert (from < nodeVector.size()) && (to < nodeVector.size()) :\n \"<SparseGraph::SetEdgeCost>: invalid index\";\n\n //visit each neighbour and erase any edges leading to this node\n ListIterator<edge_type> it = edgeListVector.get(from).listIterator();\n while (it.hasNext()) {\n edge_type curEdge = it.next();\n if (curEdge.getTo() == to) {\n curEdge.setCost(newCost);\n break;\n }\n }\n }",
"public Queue<Vertex> next() {\n\n Vertex u = lov.dequeue();\n for (Edge e : u.outEdges) {\n if (!e.to.visited) {\n cameFromEdge.put(e.to.toIdentifier(), e.from);\n if (e.to.x == MazeWorld.width - 1 && e.to.y == MazeWorld.height - 1) {\n reconstruct(cameFromEdge, e.to);\n lov = new Queue<Vertex>();\n }\n else {\n e.to.visited = true;\n lov.enqueue(e.to);\n }\n }\n }\n return lov;\n }",
"public Edge(int source, int dest, int weight){\n\t\tthis.source = source;\n\t\tthis.dest = dest;\n\t\tthis.weight = weight;\n\t}",
"public boolean isAdjacent(int from, int to) {\n//your code here\n// LinkedList<Edge> list = adjLists[from];\n// for (Edge a : list) {\n// if(a.from()==from&&a.to()==to){\n// return true;\n// }\n// };\n// return false;\n return pathExists(from, to);\n }",
"public EDataT getEdgeData( VKeyT fromKey, VKeyT toKey )\n throws NoSuchVertexException;",
"public Edge createEdge(String description, int sourceId, int destId, int weight) throws SQLException {\n\t\tVertex source = findVertById(sourceId);\n\t\tVertex destination = findVertById(destId);\n\t\tEdge newEdge = new Edge(description, weight, destination, source);\n\t\treturn rDb.createEdge(newEdge);\n\t}",
"@Test\n public void testEdgeReverse() {\n Edge<Integer, String> target = new Edge<>(1, 2, \"hello\");\n Edge<Integer, String> reverse = target.reverse();\n assertNotNull(reverse);\n assertEquals(Integer.valueOf(2), reverse.getFrom());\n assertEquals(Integer.valueOf(1), reverse.getTo());\n }",
"private void addEdgeWithInst(NasmInst source, NasmInst destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n Node from = inst2Node.get(source);\n Node to = inst2Node.get(destination);\n if (from == null || to == null)\n throw new FgException(\"ERROR: No nodes matching with given Source or destination \");\n graph.addEdge(from, to);\n }",
"@Override\n public boolean hasEdge(V from, V to)\n {\n if (from.equals(null) || to.equals(null)){\n throw new IllegalArgumentException();\n }\n if (!contains(from)){\n return false;\n }\n else{\n Iterator graphIterator = graph.entrySet().iterator();\n Map.Entry graphElement = (Map.Entry) graphIterator.next();\n V vert = (V) graphElement.getKey();\n while (graphIterator.hasNext() && vert != from){\n graphElement = (Map.Entry) graphIterator.next();\n vert = (V)graphElement.getKey();\n }\n\t ArrayList <V> edges = graph.get(vert);\n\t return edges.contains(to);\n\t }\n }",
"@Test\n public void testEdge() {\n Edge<Integer, String> target = new Edge<>(1, 2, \"hello\");\n assertNotNull(target);\n assertEquals(Integer.valueOf(1), target.getFrom());\n assertEquals(Integer.valueOf(2), target.getTo());\n }",
"protected void validateEdge(int from, int to) {\n try {\n validateVertex(from);\n validateVertex(to);\n }\n catch (IllegalArgumentException e) {\n throw new IllegalArgumentException(INVALID_EDGE);\n }\n }",
"public void addEdge(FlowEdge e){\n int v = e.getFrom();\n int w = e.getTo();\n adj[v].add(e); //add forward edge\n adj[w].add(e); //add backward edge\n }",
"public void makeEdgeDown( String sourceName, String destName)\n {\n \tVertex v = vertexMap.get( sourceName );\n Vertex w = vertexMap.get( destName );\n if(v!=null && w!=null)\n \tv.adjEdge.get(w.name).isDown =true;\n else if(v==null){\n \tSystem.out.println(\"Invalid Source vertex\");\n }\n else if(w==null){\n \tSystem.out.println(\"Invalid dest vertex\");\n }\n // v.weightnext.put(w.name,(Double) distance);\n }",
"public void setEdge(int start, int target){\n\t\tthis.graph.elementAt(start).insert(target);\n\t}",
"public GraphEdge()\r\n {\r\n cost = 1.0;\r\n indexFrom = -1;\r\n indexTo = -1;\r\n }",
"void addEdge(int x, int y);",
"public Edge(Node source, Node sink) {\n\t\tsuper();\n\t\t_source = source;\n\t\t_sink = sink;\n\t}",
"public Edge(int start, int end, int weight) {\n this.startVertex = start;\n this.endVertex = end;\n this.weight = weight;\n }",
"public void addEdge(){\n Node[] newAdjacent = new Node[adjacent.length + 1];\n for (int i = 0; i < adjacent.length; i++) {\n newAdjacent[i] = adjacent[i];\n }\n adjacent = newAdjacent;\n }"
]
| [
"0.7491626",
"0.7325222",
"0.7166918",
"0.7166637",
"0.7025919",
"0.69079804",
"0.68526447",
"0.68398035",
"0.6789987",
"0.655798",
"0.65375525",
"0.6507651",
"0.64732",
"0.6404573",
"0.6394064",
"0.6391131",
"0.6387463",
"0.6328087",
"0.6320746",
"0.62752265",
"0.6239566",
"0.6166748",
"0.6100102",
"0.609769",
"0.6087647",
"0.60618526",
"0.6029657",
"0.6004367",
"0.6000856",
"0.5946847",
"0.5932779",
"0.59266704",
"0.59104186",
"0.5849062",
"0.581275",
"0.5790516",
"0.57876325",
"0.57832384",
"0.57807297",
"0.5753459",
"0.5721743",
"0.5705274",
"0.57032865",
"0.56802636",
"0.56606376",
"0.5644291",
"0.5601467",
"0.5570916",
"0.55310166",
"0.5480148",
"0.54616714",
"0.5459442",
"0.5439067",
"0.54214543",
"0.54036295",
"0.5401594",
"0.5396866",
"0.53523046",
"0.5345686",
"0.5339627",
"0.5338554",
"0.53373563",
"0.5332948",
"0.5320826",
"0.53115284",
"0.5291952",
"0.5291745",
"0.5290106",
"0.52671564",
"0.52591884",
"0.52515864",
"0.5232135",
"0.5228629",
"0.5219574",
"0.5219512",
"0.5213804",
"0.5211359",
"0.5206437",
"0.52040637",
"0.5201699",
"0.519513",
"0.5189168",
"0.51855576",
"0.51853186",
"0.5172416",
"0.51323587",
"0.51267403",
"0.5111918",
"0.5102279",
"0.5096575",
"0.50963044",
"0.50962543",
"0.5090407",
"0.5081592",
"0.50812274",
"0.50743556",
"0.5073592",
"0.5060772",
"0.50564784",
"0.5034749"
]
| 0.6481911 | 12 |
Add weight to the existing edge | public void addWeight(int weightToMerge) {
this.weight += weightToMerge;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addEdge(int start, int end, double weight);",
"void addEdge(int source, int destination, int weight);",
"public void setWeight(int weightIn){\n\t\tthis.edgeWeight = weightIn;\n\t}",
"boolean addEdge(V v, V w, double weight);",
"public void addWeight(){\n\t\tweight++;\n\t}",
"public void setEdgeWeight(double edgeWeight) {\n this.edgeWeight = edgeWeight;\n }",
"@Override\n public void addEdge(V source, V destination, double weight)\n {\n super.addEdge(source, destination, weight);\n super.addEdge(destination, source, weight);\n }",
"double getEdgeWeight();",
"public void setEdgeWeight(Node p_a, Node p_b, double p_weight) {\n\t\t\n\t\t// We need to use the makeEdge method to make a new edge\n\t\t// So we can ensure we generate an edge with consistent hashCodes\n\t\tEdge edge = makeEdge(p_a, p_b);\n\t\tint id = edge.hashCode();\n\t\tweights.put(id, p_weight);\n\t}",
"public void setEdgeWeight(Edge p_edge, double p_weight) {\n\t\tint id = p_edge.hashCode();\n\t\tweights.put(id, p_weight);\n\t}",
"void addEdge(String origin, String destination, double weight){\n\t\tadjlist.get(origin).addEdge(adjlist.get(destination), weight);\n\t\tedges++;\n\t}",
"public void updateWeightEdge(String srcLabel, String tarLabel, int weight) {\n // Implement me!\n\n String e = srcLabel + tarLabel;\n if (indexOf(e, edges) < 0) {\n return;\n }\n\n\n int srcInt = indexOf(srcLabel, vertices);\n int tarInt = indexOf(tarLabel, vertices);\n weights[srcInt][edges.get(e)] = weight;\n weights[tarInt][edges.get(e)] = weight * (-1);\n\n if (weight == 0) {\n edges.remove(e);\n return;\n }\n\n\n\n }",
"@Override\n public double getEdgeWeight() {\n return edgeWeight;\n }",
"public abstract boolean addEdge(Node node1, Node node2, int weight);",
"public void add(double weight) {\n this.weights.add(weight);\n // flip the flag to accept query operator\n this.acceptWeight = false;\n }",
"public int getWeight(){\n\t\treturn this.edgeWeight;\n\t}",
"void addEdge(Vertex v1, Vertex v2, Double w) throws VertexNotInGraphException;",
"public Edge(int weight){\n\t\tthis.EDGE_ID = IDToGive;\n\t\tthis.edgeWeight = weight;\n\t\tIDToGive++;\n\t}",
"public void addEdge(int i, int j, int weight) {\r\n adjacencyMatrix[i][j] = weight;\r\n if (!isDirected) {\r\n adjacencyMatrix[j][i] = weight;\r\n }\r\n }",
"public void calculateEdgeWeights() {\n\n\t// Use a ListIterator so that we can modify the list\n\t// as we go\n\tListIterator<LayoutEdge>iter = edgeList.listIterator();\n\twhile (iter.hasNext()) {\n\t LayoutEdge edge = iter.next();\n\n\t // If we're only dealing with selected nodes, drop any edges\n\t // that don't have any selected nodes\n\t if (edge.getSource().isLocked() && edge.getTarget().isLocked()) {\n\t\titer.remove();\n\t } else if (edgeWeighter != null && edgeWeighter.normalizeWeight(edge) == false)\n\t\titer.remove();\n\n\t //logger.debug(\"Edge \"+edge.getEdge().getIdentifier()+\" now has weight \"+edge.getWeight());\n\t // logger.info( edge.toString() + \" now has weight \"+edge.getWeight());\n\t}\n }",
"public boolean addEdge(T begin, T end, int weight);",
"public void addEdge(int v1, int v2, int weight) {\n\t\tedges[v1][v2] = weight;\n\t\tedges[v2][v1] = weight;\n\t\tsize++;\n\n\t}",
"public int getWeight()\r\n\t{\r\n\t\treturn edgeWeight;\t\t\r\n\t}",
"public void addEdge(int u, int v, double w) {\n\t\t\n\t}",
"void addEdge(SimpleVertex vertexOne, SimpleVertex vertexTwo, int weight) {\n\n\t\tSimpleEdge edge = new SimpleEdge(vertexOne, vertexTwo);\n\t\tedge.weight = weight;\n\t\t// edgeList.add(edge);\n\t\t// System.out.println(edge);\n\t\tvertexOne.neighborhood.add(edge);\n\n\t}",
"public void addEdge(int u, int v, int weight){\n this.edges.add(new DEdge(u,v,weight));\n }",
"public void setWeight(int newWeight) {\n weight = newWeight;\n }",
"public void addEdge(Edge edgeToAdd){\n for(int i = 0; i<edges.size(); i++){\n Edge edge = edges.get(i);\n if(edge.end() == edgeToAdd.end()){\n edge.setWeight(edgeToAdd.weight()); // Change weight and return if edge is present\n return;\n }\n }\n this.edges.add(edgeToAdd); // Add edge normally\n }",
"void addEdge(int v, int w) {\n adj [v].add(w);\n }",
"public Edge(Node source, Node sink, Object weight) {\n\t\tthis(source, sink);\n\t\tsetWeight(weight);\n\t}",
"@Override\n public void setWeight(double w) {\n this.weight = w;\n\n }",
"private final void addEdge(int v1, int v2, float weight) {\n if (nEdges >= edgeWeights.length) {\n edgeWeights = Arrays.copyOf(edgeWeights, edgeWeights.length*2);\n }\n int edgeIndex = nEdges;\n\n // add edge to v1\n int v1Index;\n {\n v1Index = nOutgoingEdgess[v1];\n if (v1Index >= outgoingEdgess[v1].length) {\n int newLength = outgoingEdgess[v1].length*2;\n outgoingEdgess[v1] = Arrays.copyOf(outgoingEdgess[v1], newLength);\n outgoingEdgeIndexess[v1] = Arrays.copyOf(outgoingEdgeIndexess[v1], newLength);\n outgoingEdgeIsMarkeds[v1] = Arrays.copyOf(outgoingEdgeIsMarkeds[v1], newLength);\n outgoingEdgeOppositeIndexess[v1] = Arrays.copyOf(outgoingEdgeOppositeIndexess[v1], newLength);\n }\n outgoingEdgess[v1][v1Index] = v2;\n outgoingEdgeIndexess[v1][v1Index] = edgeIndex;\n nOutgoingEdgess[v1]++;\n }\n\n // add edge to v2\n int v2Index;\n {\n v2Index = nOutgoingEdgess[v2];\n if (v2Index >= outgoingEdgess[v2].length) {\n int newLength = outgoingEdgess[v2].length*2;\n outgoingEdgess[v2] = Arrays.copyOf(outgoingEdgess[v2], newLength);\n outgoingEdgeIndexess[v2] = Arrays.copyOf(outgoingEdgeIndexess[v2], newLength);\n outgoingEdgeIsMarkeds[v2] = Arrays.copyOf(outgoingEdgeIsMarkeds[v2], newLength);\n outgoingEdgeOppositeIndexess[v2] = Arrays.copyOf(outgoingEdgeOppositeIndexess[v2], newLength);\n }\n outgoingEdgess[v2][v2Index] = v1;\n outgoingEdgeIndexess[v2][v2Index] = edgeIndex;\n nOutgoingEdgess[v2]++;\n }\n\n outgoingEdgeOppositeIndexess[v1][v1Index] = v2Index;\n outgoingEdgeOppositeIndexess[v2][v2Index] = v1Index;\n \n edgeWeights[nEdges] = weight;\n ++nEdges;\n }",
"public void setEdgeWeighter(EdgeWeighter edgeWeighter) {\n\tthis.edgeWeighter = edgeWeighter;\n }",
"public void addEdge(Node source, Node destination, int weight) {\n nodes.add(source);\n nodes.add(destination);\n checkEdgeExistance(source, destination, weight);\n\n if (!directed && source != destination) {\n checkEdgeExistance(destination, source, weight);\n }\n }",
"public void setWeight(double w){\n weight = w;\n }",
"private Edge addEdge(Node source, Node dest, double weight)\r\n\t{\r\n\t final Edge newEdge = new Edge(edgeType, source, dest, weight);\r\n\t if (!eSet.add(newEdge))\r\n\t\tthrow new RuntimeException(\"Edge already exists!\");\r\n\t source.addEdge(newEdge);\n\t return newEdge;\r\n\t}",
"@Override\r\n\tpublic void link(E src, E dst, int weight) {\r\n\t\tinsertVertex(src); //Inserts src if not currently in the graph\r\n\t\tinsertVertex(dst); //Inserts dst if not currently in the graph\r\n\t\tEdge<E> newedge1 = new Edge<>(src, dst, weight);\r\n\r\n\t\tArrayList<Edge<E>> sEdges = adjacencyLists.get(src);\r\n\t\tsEdges.remove(newedge1); //if the edge already exists remove it\r\n\t\tsEdges.add(newedge1);\r\n\t\tif(!isDirected) { //Add the additional edge if this graph is undirected\r\n\t\t\tEdge<E> newedge2 = new Edge<>(dst, src, weight);\r\n\r\n\t\t\tArrayList<Edge<E>> dEdges = adjacencyLists.get(dst);\r\n\t\t\tdEdges.remove(newedge2); //if the edge already exists remove it\r\n\t\t\tdEdges.add(newedge2); \r\n\t\t}\r\n\t}",
"public void setWeight(int w){\n\t\tweight = w;\n\t}",
"void addEdge(int v,int w)\n {\n adj[v].add(w);\n }",
"public void setWeight(int w) {\n\t\tweight = w;\n\t}",
"public void setWeight(float w) {\n weight = w;\n }",
"void addEdge(int v,int w, int cost) \r\n { \r\n adj[v].add(0,w);\r\n \r\n adj[v].add(1,cost);\r\n \r\n adj[w].add(0,v);\r\n \r\n adj[w].add(1,cost);\r\n \r\n }",
"void addEdge(int v, int w) {\n\t\tadj[v].add(w);\n\t}",
"void addEdge(int v, int w) {\n\t\tadj[v].add(w);\n\t}",
"public void setWeight(double weight) {\r\n this.weight = weight;\r\n }",
"void addEdge(int v, int w)\n {\n adj[v].add(w);\n }",
"public void setWeight(Double weight) {\n this.weight = weight;\n }",
"public void setWeight(double weight) {\n this.weight = weight;\n }",
"public void setEdge(int v1, int v2, int weight) {\n LinkedList<Integer> tmp = adjList.elementAt(v1);\n if(adjList.elementAt(v1).contains(v2) == false) {\n tmp.add(v2);\n adjList.set(v1, tmp);\n totalEdges ++;\n LinkedList<Integer> tmp2 = adjWeight.elementAt(v1);\n tmp2.add(weight);\n adjWeight.set(v1, tmp2);\n }\n }",
"public void setWeight(double weight){\n\t\tthis.weight = weight;\n\t}",
"public void addEdge( String sourceName, String destName , Double distance)\n {\n Vertex v = getVertex( sourceName );\n Vertex w = getVertex( destName );\n v.adjEdge.put(w.name, new Edge(w,distance) );\n \n // v.weightnext.put(w.name,(Double) distance);\n }",
"protected void addEdge(CyEdge edge) {\n\tLayoutEdge newEdge = new LayoutEdge(edge);\n\tupdateWeights(newEdge);\n\tedgeList.add(newEdge);\n }",
"public void addEdge(String srcLabel, String tarLabel, int weight) {\n // Implement me!\n\n String e = srcLabel + tarLabel;\n if (indexOf(e, edges) > -1) {\n return;\n }\n int sInt = indexOf(srcLabel, vertices);\n int tInt = indexOf(tarLabel, vertices);\n if (sInt < 0 ||tInt < 0) {\n return;\n }\n\n int eInt = edges.size();\n edges.put(e, eInt);\n weights = addOneCol(weights);\n weights[sInt][eInt] = weight;\n weights[tInt][eInt] = weight * (-1);\n\n\n }",
"public void addEdge(int source, int target, Cost w) {\n\t\tedges[source][target] = w;\n\t}",
"public void addEdge(K u, K v, int weight)\n {\n if (u.equals(v))\n {\n throw new IllegalArgumentException(\"adding self loop\");\n }\n\n\t// get u's adjacency list\n Map<K, Edge> adj = adjMaps.get(u);\n\n\t// check for edge already being there\n if (!adj.containsKey(v))\n {\n\t\t// edge is not already there -- add to both adjacency lists\n Edge e = new Edge(weight);\n adj.put(v, e);\n adjMaps.get(v).put(u, e);\n }\n }",
"public AverageEdgeWeight() {\n super(\"avrgEdgeWeight\");\n }",
"private void setWeight(float weight){\n this.weight = weight;\n }",
"public WeightedEdge(){\n\t\t\n\t}",
"public void update_weight() {\n this.weights = this.updatedWeights;\n }",
"public void addEdge(int v, int w) {\r\n adj[v].add(w);\r\n E++;\r\n }",
"public void setWeight(double weight){\n\t\tthis._weight = weight;\n\t}",
"private final void addTemporaryEdge(int v1, int v2, float weight) {\n // We assume that expansion is never needed.\n /*if (nEdges >= edgeWeights.length) {\n edgeWeights = Arrays.copyOf(edgeWeights, edgeWeights.length*2);\n edgeLevels = Arrays.copyOf(edgeLevels, edgeLevels.length*2);\n isMarkedIndex = Arrays.copyOf(isMarkedIndex, isMarkedIndex.length*2);\n }*/\n int edgeIndex = nEdges;\n\n // add edge to v1\n {\n int index = nOutgoingEdgess[v1];\n if (index >= outgoingEdgess[v1].length) {\n int newLength = outgoingEdgess[v1].length*2;\n outgoingEdgess[v1] = Arrays.copyOf(outgoingEdgess[v1], newLength);\n outgoingEdgeIndexess[v1] = Arrays.copyOf(outgoingEdgeIndexess[v1], newLength);\n outgoingEdgeIsMarkeds[v1] = Arrays.copyOf(outgoingEdgeIsMarkeds[v1], newLength);\n }\n outgoingEdgess[v1][index] = v2;\n outgoingEdgeIndexess[v1][index] = edgeIndex;\n nOutgoingEdgess[v1]++;\n }\n\n edgeWeights[edgeIndex] = weight;\n edgeLevels[edgeIndex] = 0;\n isMarked[edgeIndex] = false;\n ++nEdges;\n }",
"@Override public int set(L source, L target, int weight) {\r\n \r\n \tif(weight>0) {\r\n \t\tboolean flag=false;\r\n \t\tif(!vertices.contains(source)) {\r\n \t\t\tvertices.add(source);\r\n \t\t\tflag=true;\r\n \t\t}\r\n \tif(!vertices.contains(target)) {\r\n \t\tvertices.add(target);\r\n \t\tflag=true;\r\n \t}\r\n \tEdge<L> e=new Edge<L>(source,target,weight);\r\n \tif(flag==true) {//加点,直接把新边写入,\r\n \t\t\r\n \tedges.add(e);\r\n \tcheckRep();\r\n \treturn 0;\r\n \t}\r\n \telse {//点已经在了,可能边已经在了,考虑重复问题\r\n \t\tint n=edges.size();\r\n \t\tif(n==0) {\r\n \t\t\t\r\n \tedges.add(e);\r\n \tcheckRep();\r\n \treturn 0;\r\n \t\t}\r\n \t\telse {\r\n \t\t\tboolean tag=false;\t\r\n \t\t\tfor(int i=0;i<n;i++) {\r\n \t\t\t\t//这一步太关键了,之前一直判断是false\r\n \t\t\t\tif(edges.get(i).getSource().equals(source) && edges.get(i).getTarget().equals(target)) {\r\n \t\t\t//\tif(edges.get(i).getSource()==source && edges.get(i).getTarget()==target) {\r\n \t\t\t\t\tint res=edges.get(i).getWeight();\r\n \t\t\t\t\tedges.set(i,e);\r\n \t\t\t\t\tcheckRep();\r\n \t\t\t\t\ttag=true;\r\n \t\t\t\t\treturn res;//边已经在了,重新写权重\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\t//边不在里面,直接写入\r\n \t\t\tif(tag==false) {\r\n \t\t\t\tedges.add(e);\r\n \t\t\t\tcheckRep();\r\n \t\t\t\treturn 0;\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \t\r\n \t}\r\n \telse if(weight==0) {\r\n \t\tif(!vertices.contains(source)||!vertices.contains(target)) return 0;\r\n \t\tint n=edges.size();\r\n \t\tfor(int i=0;i<n;i++) {\r\n \t\t\t//改了\r\n\t\t\t\tif(edges.get(i).getSource().equals(source) && edges.get(i).getTarget().equals(target)) {\r\n \t\t\t//if(edges.get(i).getSource()==source && edges.get(i).getTarget()==target) {\t\r\n \t\t\t//把已经在的边移除\r\n\t\t\t\t\tint res=edges.get(i).getWeight();\r\n\t\t\t\t\tedges.remove(i);\r\n\t\t\t\t\tcheckRep();\r\n\t\t\t\t\treturn res;\r\n\t\t\t\t}\r\n\t\t\t}\r\n \t\treturn 0;\r\n \t}\r\n \tcheckRep();\r\n \treturn 0;\r\n \t\r\n }",
"@Override\n\tpublic void setWeight(final double weight) {\n\n\t}",
"public Double getEdgeWeight(Edge p_edge) {\n\t\tint id = p_edge.hashCode();\n\t\treturn weights.get(id);\n\t}",
"void addEdge(int v,int w)\n {\n adj[v].add(w);\n adj[w].add(v);\n }",
"@Override\r\n\tpublic void setWeight(double weight) {\n\t\t\r\n\t}",
"public Edge addEdge(EdgeType et, Node source, Node dest, double weight)\r\n {\r\n\tfinal String edgeTypeName = et.getName();\r\n Edge existingEdge = getEdge(edgeTypeName, source, dest);\r\n if (existingEdge == null)\r\n {\r\n existingEdge = ethMap.get(edgeTypeName).addEdge(source, dest, weight);\r\n edges = null;\r\n }\r\n else\r\n existingEdge.addWeight(weight);\n return existingEdge;\r\n }",
"public void addWeight(TextView weight){\n displayedWeights.add(weight);\n }",
"public void addEdge(Node n1, Node n2, int weight) {\n\t\tthis.edges.add(new Edge(n1, n2, weight));\n\t\tadjacencyList.get(n1.getIdNode()).add(new NodePair(n2.getIdNode(), weight));\n\n\n\t\tnrOfEdges++;\n\t}",
"public void setWeight(double weight) {\n\t\tthis.weight = weight;\n\t}",
"public void addEdge(int v, int w){\n //add w to the queue of v\n adj[v].enqueue(w);\n //add v to the queue of w\n adj[w].enqueue(v);\n //update Edge number;\n E++;\n }",
"public void addEdge(int u, int v, int weight) {\n\t\t\tif (adjacencyMatrix[u][v] == 0) { // new edge\n\t\t\t\tadjacencyMatrix[u][v] = weight;\n\n\t\t\t\tif (adjacencyList.get(u) == null) {\n\t\t\t\t\tList<Integer> l = new LinkedList<>();\n\t\t\t\t\tl.add(v);\n\t\t\t\t\tadjacencyList.put(u, l);\n\t\t\t\t} else {\n\t\t\t\t\tList<Integer> l = adjacencyList.get(u);\n\t\t\t\t\tl.add(v);\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public void addEdge (E vertex1, E vertex2, int edgeWeight) throws IllegalArgumentException\n {\n if(vertex1 == vertex2)\n return;\n \n int index1 = this.indexOf (vertex1);\n if (index1 < 0)\n throw new IllegalArgumentException (vertex1 + \" was not found!\");\n \n int index2 = this.indexOf (vertex2);\n if (index2 < 0)\n throw new IllegalArgumentException (vertex2 + \" was not found!\");\n\n\n if (this.hasEdge (vertex1, vertex2))\n {\n this.removeNode (index1, index2);\n this.removeNode (index2, index1);\n }\n \n Node node = new Node(index2, edgeWeight);\n this.addNode(node, index1);\n node = new Node(index1, edgeWeight);\n this.addNode(node, index2);\n }",
"public Edge(wVertex argTarget, double argWeight) \r\n {\r\n target = argTarget;\r\n weight = argWeight;\r\n }",
"protected static <V, E extends WeightedEdge> boolean addEgdeWithWeigth(IWeightedGraph<V, E> graph, V firstVertex,\r\n\t\t\tV secondVertex, E edge, double weight) {\r\n\t\ttry {\r\n\t\t\tgraph.addEdge(firstVertex, secondVertex, edge);\r\n\t\t\tgraph.setEdgeWeight(graph.getEdge(firstVertex, secondVertex), weight);\r\n\r\n\t\t\treturn true;\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public void addEdge(int v, int w){\n\t\tadj[v].add(w);\t\t\t\t\t\t\n\t}",
"public void updateWeights() {\n\t\t\n\t}",
"public void setWeight(float value) {\n this.weight = value;\n }",
"public void setWeight(int weight){\n\t\tthis.weight = weight;\n\t}",
"private void checkEdgeExistance(Node a, Node b, int weight) {\n for (Edge edge : a.getEdges()) {\n if (edge.getSource() == a && edge.getDestination() == b) {\n edge.setWeight(weight);\n return;\n }\n }\n a.getEdges().add(new Edge(a, b, weight));\n }",
"public double addWeight(Long c, Double w) {\n Double old;\n old = nodeWeights.put(c, w);\n if (old != null) {\n totalWeight -= old;\n totalWeight += w;\n } else {\n totalWeight += w;\n }\n\n return totalWeight;\n }",
"public void setEdge(int i, int j, int wt){\r\n\t\tif(wt!=0){\r\n\t\t\tSystem.out.println(\"Cannot set weight to 0!\");\r\n\t\t}\r\n\t\telse{\r\n\t\t\tif(matrix[i][j]==0){\r\n\t\t\t\tnumEdge++;\r\n\t\t\t\tmatrix[i][j]=wt;\r\n\t\t\t}\r\n\t\t}\t\r\n\t}",
"public Edge(Node from, Node to, int weight) {\n this.from = from;\n this.to = to;\n this.weight = weight;\n }",
"public Edge(int start, int end, int weight) {\n this.startVertex = start;\n this.endVertex = end;\n this.weight = weight;\n }",
"public void addEdge(int v, int w) {\r\n\t\t\tadj[v].add(w);\r\n\t\t\tadj[w].add(v);\r\n\t\t\tE++;\r\n\t\t}",
"public void addEdge(int v, int w) {\n\t\tadj[v].add(w);\n\t}",
"public Edge(int start, int end, int weight) {\n this.start = start;\n this.end = end;\n this.weight = weight;\n }",
"public Edge(int from, int to, Integer weight) {\n this.from = from;\n this.to = to;\n this.weight = weight;\n }",
"public Edge(int source, int dest, int weight){\n\t\tthis.source = source;\n\t\tthis.dest = dest;\n\t\tthis.weight = weight;\n\t}",
"protected void addEdge(CyEdge edge, LayoutNode v1, LayoutNode v2) {\n\tLayoutEdge newEdge = new LayoutEdge(edge, v1, v2);\n\tupdateWeights(newEdge);\n\tedgeList.add(newEdge);\n }",
"public void addEdge(int v, int w)\n { \n adj[v].add(w);\n adj[w].add(v);\n }",
"public void updateBottomWeight(){\r\n\t \tif(this.bottomNode != null)\r\n\t \t{\r\n\t \t\tif( this.bottomNode.isNoGoZone() == true)\r\n\t \t{\r\n\t \t\t\t//set edge weight to 9999 if the next node is NO go zone or\r\n\t \t\t\t//boundary node\r\n\t \t\tthis.bottomWeight = weightOfNoGoZone;\r\n\t \t}\r\n\t \telse if(this.bottomNode.isRoad() == true && this.bottomNode.isNoGoZone() == false)\r\n\t \t{\r\n\t \t\t//set edge weight to 1 if the next node is a road node\r\n\t \t\tthis.bottomWeight = this.bottomNode.getOwnElevation();\r\n\t \t}\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\t//set edge weight to INF if the next node is NULL\r\n\t \t\tthis.bottomWeight = weightOfMapEdge;\r\n\t \t}\r\n\t }",
"public void setWeight(final int weight) {\n this.weight = weight;\n }",
"public Edge(Object vertex1, Object vertex2, int w){\n v1 = vertex1;\n v2 = vertex2;\n weight = w;\n }",
"public void setWeight(T3 eWeight) {\r\n\t\tthis.weight = eWeight;\r\n\t}",
"private void relax(SiteEdge e) {\n int v = e.from(), w = e.to();\n if (distTo[w] > distTo[v] + e.weight()) {\n distTo[w] = distTo[v] + e.weight();\n edgeTo[w] = e;\n if (pq.contains(w)) pq.decreaseKey(w, distTo[w]);\n else pq.insert(w, distTo[w]);\n }\n }",
"public void setWeight (java.lang.Double weight) {\r\n\t\tthis.weight = weight;\r\n\t}",
"public void setWeight(Integer weight) {\n this.weight = weight;\n }",
"private void relax(DirectedEdge e) {\n int v = e.from(), w = e.to();\n if (distTo[w] > distTo[v] + e.weight()) {\n distTo[w] = distTo[v] + e.weight();\n edgeTo[w] = e;\n if (pq.contains(w)) pq.change(w, distTo[w]);\n else pq.insert(w, distTo[w]);\n }\n }"
]
| [
"0.79004776",
"0.78305537",
"0.7495176",
"0.7440764",
"0.74231917",
"0.728654",
"0.7273159",
"0.7253498",
"0.7223345",
"0.719759",
"0.7161828",
"0.7130395",
"0.6999705",
"0.6997591",
"0.6994346",
"0.6989986",
"0.694983",
"0.6946185",
"0.6937028",
"0.69141304",
"0.6856452",
"0.6823371",
"0.6809452",
"0.6808608",
"0.6765926",
"0.67250514",
"0.6690448",
"0.6682914",
"0.66740716",
"0.66669536",
"0.6649293",
"0.66436976",
"0.6641525",
"0.6593331",
"0.6588136",
"0.65735465",
"0.65623826",
"0.65419906",
"0.65264064",
"0.65234894",
"0.6506928",
"0.650692",
"0.6501485",
"0.6501485",
"0.64823717",
"0.6482295",
"0.6478452",
"0.6475808",
"0.6470542",
"0.64692515",
"0.64569455",
"0.64528507",
"0.6451718",
"0.6449122",
"0.6446952",
"0.644341",
"0.643388",
"0.6427235",
"0.64209735",
"0.64201766",
"0.6417732",
"0.6417609",
"0.6415146",
"0.64135236",
"0.6405011",
"0.6397405",
"0.63955724",
"0.6392128",
"0.6389509",
"0.63731027",
"0.63727444",
"0.63661194",
"0.63499796",
"0.6340418",
"0.63247746",
"0.6323205",
"0.6321952",
"0.63218164",
"0.63190114",
"0.63124365",
"0.63060164",
"0.63039744",
"0.6297773",
"0.62946576",
"0.6283347",
"0.62831",
"0.62818384",
"0.6279047",
"0.6269907",
"0.6262053",
"0.62417215",
"0.62310374",
"0.62309176",
"0.62281066",
"0.6226838",
"0.621433",
"0.61977494",
"0.6194657",
"0.61917245",
"0.61851805"
]
| 0.7161041 | 11 |
Gets the source vertex | public Node getFrom() {
return from;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Vertex getSource() {\n return source;\n }",
"@Override\n public Vertex getSource() {\n return sourceVertex;\n }",
"public Vertex getFrom() {\r\n\r\n return from;\r\n }",
"public Vertex<VV> getFrom()\r\n { return from; }",
"Vertex getVertex();",
"public Vertex getStart()\n\t{\n\t\treturn start.copy();\n\t}",
"public Object getVertex(){\r\n return this.vertex;\r\n }",
"public String getVertex() {\n\t\treturn vertices.get(0);\n\t}",
"Vertex getVertex(int index);",
"public ContractionVertex<RoadNode> getSourceCHNode() {\r\n return sourceCHNode;\r\n }",
"@Override\n public Vertex getTarget() {\n return targetVertex;\n }",
"@Override\n\tpublic VType getSource() {\n\t\t// TODO: Add your code here\n\t\treturn super.from;\n\t}",
"public V getParent(V vertex);",
"public Object getSource() {\n\t\treturn source;\n\t}",
"public Object getSource() {\n\t\treturn source;\n\t}",
"public int getStartVertex() {\n\t\treturn startVertex;\n\t}",
"public Node getSource() {\n return this.source;\n }",
"public Object getSource() {return source;}",
"public V getVertex()\r\n/* */ {\r\n/* 198 */ return (V)this.vertex;\r\n/* */ }",
"public Object getSource() {\n return source;\n }",
"public int getvertex() {\n\t\treturn this.v;\n\t}",
"public NativeEntity getSourceEntity() \n\t{\n\treturn fSource;\n\t}",
"public String getSource() {\n\t\treturn (String) _object.get(\"source\");\n\t}",
"public int getSource() {\n\t\treturn source;\n\t}",
"private Vertex getVertexFor(Agent ag) {\n return getDataFor(ag).vertex;\n }",
"public TCSObjectReference<Point> getSourcePoint() {\n if (hops.isEmpty()) {\n return null;\n }\n else {\n return hops.get(0);\n }\n }",
"public int getSource(){\r\n\t\treturn this.source;\r\n\t}",
"public Vertex getDestination() {\n return destination;\n }",
"public V getVertex(int index);",
"public Vertex getVertex() {\n return curr;\n }",
"@Override\r\n\tpublic E getSingleSourcePredecessor(E key) {\r\n\t\tif(containsVertex(key) && vertices.get(key).getPredecessor() != null) {\r\n\t\t\treturn vertices.get(key).getPredecessor().getElement();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public String getSource() {\n return mSource;\n }",
"public String getSource() {\n return this.source;\n }",
"public Object getSourceReference() { return this._sourceRef; }",
"@Override\r\n\tpublic E getVertexAtGivenDistance(E src, int distance) {\r\n\t\treturn graphForWarshall.getVertexAtGivenDistance(src, distance);\r\n\t}",
"public Object getSource() { return this.s; }",
"public Node source() {\n\t\treturn _source;\n\t}",
"@objid (\"4e37aa68-c0f7-4404-a2cb-e6088f1dda62\")\n Instance getSource();",
"public VertexObject getReferenceVertex() {\n return referenceVertex;\n }",
"public String getSource(){\n\t\treturn source.getEvaluatedValue();\n\t}",
"public E getParentEdge(V vertex);",
"public String getSourceNode() {\n return sourceNode;\n }",
"@Override\n\tpublic EList<SourceRef> getSource() {\n\t\treturn adaptee.getSource();\n\t}",
"protected Source getSource() {\r\n return source;\r\n }",
"public Vector getSourceComponents();",
"public Town getTargetVertex(Town sourceVertex) {\r\n\t\tfor(Town town: vertices) {\r\n\t\t\tif(!town.equals(sourceVertex)) {\r\n\t\t\t\treturn town;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"public String getSource() {\r\n return source;\r\n }",
"public String getSource() {\n return source;\n }",
"public abstract Object getSource();",
"public String getSource() {\n return JsoHelper.getAttribute(jsObj, \"source\");\n }",
"public String getSource() {\r\n return Source;\r\n }",
"public short getMesh_source() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readShort(__io__address + 12);\n\t\t} else {\n\t\t\treturn __io__block.readShort(__io__address + 12);\n\t\t}\n\t}",
"public String getSource() {\n return source;\n }",
"public String getSource() {\n return source;\n }",
"public String getSource() {\n return source;\n }",
"public ProcessVertex getInVertex() {\n\t\treturn this.inVertex;\n\t}",
"public long getSourceId() {\n return sourceId_;\n }",
"public Entity.ID getSourceID() {\n return sourceID;\n }",
"public String getSource() {\n Object ref = source_;\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 source_ = s;\n }\n return s;\n }\n }",
"public Node source() {\n return source;\n }",
"public T getSource() {\n return source;\n }",
"public String getSourceId() {\n return sourceId;\n }",
"public String getSource() {\n\n return source;\n }",
"public String getSource(){\r\n\t\treturn selectedSource;\r\n\t}",
"public java.lang.String getSource() {\r\n return localSource;\r\n }",
"public Integer getSourceID()\r\n\t\t{ return mapping.getSourceId(); }",
"public long getSourceId() {\n return sourceId_;\n }",
"public int getBaseVertex() {\n return baseVertex;\n }",
"@Override\n\tpublic Square getSource() {\n\t\treturn (Square) super.getSource();\n\t}",
"public java.lang.String getSource() {\n java.lang.Object ref = source_;\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 source_ = s;\n return s;\n }\n }",
"public String getSource() {\n Object ref = source_;\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 source_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }",
"ElementCircuit getSource();",
"@OutVertex\n ActionTrigger getSource();",
"public java.lang.Object getSourceID() {\n return sourceID;\n }",
"public EndpointID source() {\r\n\t\treturn source_;\r\n\t}",
"public java.lang.String getSource() {\n java.lang.Object ref = source_;\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 source_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getSource() {\n java.lang.Object ref = source_;\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 source_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"@Override\n public abstract SourcePoint getSourcePoint();",
"public native VertexNode first();",
"public long getSource()\r\n { return src; }",
"public String getSource();",
"public SourceIF source() {\n\t\treturn this.source;\n\t}",
"@InVertex\n Object getTarget();",
"public abstract Source getSource();",
"Node getSourceNode();",
"@java.lang.Override\n public java.lang.String getSource() {\n java.lang.Object ref = source_;\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 source_ = s;\n return s;\n }\n }",
"public Long getSourceNumber() {\n return this.sourceNumber;\n }",
"private E3DTexturedVertex getVertexA(){\r\n\t\treturn vertices[0];\r\n\t}",
"public Object getSource()\n {\n return this;\n }",
"public Object getSource()\n {\n return this;\n }",
"public String getSourceFigNodeId() {\n return sourceFigNodeId;\n }",
"@Override\n\tpublic String getSource() {\n\t\treturn source;\n\t}",
"public URI getSource() {\n return source;\n }",
"public String vertexName();",
"protected static GraphTraversalSource g() {\n return VertexCacheProvider.get().getFullGraph();\n }",
"@HippoEssentialsGenerated(internalName = \"katharsisexampleshippo:source\")\n public String getSource() {\n return getProperty(SOURCE);\n }",
"Variable getSourceVariable();",
"private Optional<Vertex> getVertexByIndex(GraphTraversalSource source, UUID id, String collectionName) {\n Optional<Vertex> vertexOpt = indexHandler.findById(id);\n\n // Return if the neo4j Node ID matches no vertex (extreme edge case)\n if (!vertexOpt.isPresent()) {\n LOG.error(Logmarkers.databaseInvariant,\n \"Vertex with tim_id {} is found in index with id {}L but not in graph database\", id);\n return Optional.empty();\n }\n\n // Get the latest version of the found Vertex\n Vertex foundVertex = vertexOpt.get();\n int infinityGuard = 0;\n while (foundVertex.vertices(Direction.OUT, \"VERSION_OF\").hasNext()) {\n // The neo4j index Node is one version_of behind the actual node\n foundVertex = foundVertex.vertices(Direction.OUT, \"VERSION_OF\").next();\n if (++infinityGuard >= MAX_VERSION_OF_DEPTH) {\n LOG.error(Logmarkers.databaseInvariant, \"Vertices with tim_id {} might have circular VERSION_OF\", id);\n return Optional.empty();\n }\n }\n\n // Only if this latest version is truly registered as latest return this as a successful hit\n if (foundVertex.value(\"isLatest\")) {\n return Optional.of(foundVertex);\n } else {\n LOG.error(Logmarkers.databaseInvariant,\n \"Last version of vertex with tim_id {} is not marked as isLatest=true\", id);\n }\n\n // Failed to find vertex in lucene index, so return\n return Optional.empty();\n }",
"public String getSource ();",
"@Override\n public Set<Vertex> getVertices() {\n Set<Vertex> vertices = new HashSet<Vertex>();\n vertices.add(sourceVertex);\n vertices.add(targetVertex);\n return vertices;\n }",
"public String get_source() {\n\t\treturn source;\n\t}"
]
| [
"0.8718873",
"0.85908216",
"0.7395446",
"0.71405274",
"0.7077689",
"0.70465297",
"0.682045",
"0.6689673",
"0.6682081",
"0.66801053",
"0.66238314",
"0.66225433",
"0.66148525",
"0.65918624",
"0.65918624",
"0.6584178",
"0.6583489",
"0.6552123",
"0.6551212",
"0.6548609",
"0.65477467",
"0.652779",
"0.65271527",
"0.6501951",
"0.6492646",
"0.6490153",
"0.64612824",
"0.64548725",
"0.6408724",
"0.6368975",
"0.63626814",
"0.63588893",
"0.63488823",
"0.63476676",
"0.63450074",
"0.63254994",
"0.6323953",
"0.63238096",
"0.632315",
"0.6315584",
"0.6308701",
"0.62855744",
"0.6280517",
"0.6255656",
"0.6247926",
"0.6246541",
"0.62354314",
"0.62181866",
"0.6215378",
"0.6214342",
"0.62127674",
"0.62020695",
"0.61995804",
"0.61995804",
"0.61995804",
"0.61955184",
"0.619428",
"0.6194261",
"0.6188526",
"0.61762035",
"0.617015",
"0.61672556",
"0.6163398",
"0.61608934",
"0.61586195",
"0.61458826",
"0.6140092",
"0.6136861",
"0.61328137",
"0.61287236",
"0.6123306",
"0.6118162",
"0.61035234",
"0.6085564",
"0.60834986",
"0.6067147",
"0.6067147",
"0.6066592",
"0.60630506",
"0.60577554",
"0.60516983",
"0.6048694",
"0.6042445",
"0.60396284",
"0.60377336",
"0.6036661",
"0.60336447",
"0.60312945",
"0.60303015",
"0.60303015",
"0.6029082",
"0.60277325",
"0.60262597",
"0.6001231",
"0.5997733",
"0.5995736",
"0.59911907",
"0.59808165",
"0.5976529",
"0.59756637",
"0.59710056"
]
| 0.0 | -1 |
Gets the destination vertex | public Node getTo() {
return to;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Vertex getDestination() {\n return destination;\n }",
"public V getDestination() {\r\n\r\n\t\tV result = null;\r\n\t\tif ((counter <= links.size()) && (counter > 0)) {\r\n\t\t\tresult = succNodes.get(counter - 1);\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public Vertex getFrom() {\r\n\r\n return from;\r\n }",
"public Vertex getTo() {\r\n\r\n return to;\r\n }",
"public Node getDestination() {\n return this.destination;\n }",
"public Vertex getSource() {\n return source;\n }",
"Vertex getVertex();",
"public Object getDestination() {\n/* 339 */ return this.peer.getTarget();\n/* */ }",
"public Coordinate getDestination() {\n return cDestination;\n }",
"public Vertex<VV> getTo()\r\n { return to; }",
"@Override\n public Vertex getSource() {\n return sourceVertex;\n }",
"public Vertex<VV> getFrom()\r\n { return from; }",
"public Town getTargetVertex(Town sourceVertex) {\r\n\t\tfor(Town town: vertices) {\r\n\t\t\tif(!town.equals(sourceVertex)) {\r\n\t\t\t\treturn town;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"int getDestination();",
"Destination getDestination();",
"@Override\n public Vertex getTarget() {\n return targetVertex;\n }",
"public int getDestination() {\r\n\t\treturn destination;\r\n\t}",
"public Integer getDestination() {\n\t\treturn new Integer(destination);\n\t}",
"public Object getVertex(){\r\n return this.vertex;\r\n }",
"@Override\r\n\tpublic E getVertexAtGivenDistance(E src, int distance) {\r\n\t\treturn graphForWarshall.getVertexAtGivenDistance(src, distance);\r\n\t}",
"public V getParent(V vertex);",
"T getDestination(T nodeOrigin, F flow);",
"public String getDestination() {\r\n\t\treturn this.destination;\r\n\t}",
"public E getParentEdge(V vertex);",
"public String getDestination() {\r\n return this.destination;\r\n }",
"public int getDest(){\r\n\t\treturn this.dest;\r\n\t}",
"public String getDestination(){\r\n\t\treturn route.getDestination();\r\n\t}",
"public String getDestination() {\n return this.destination;\n }",
"public Location getDestination()\r\n\t{ return this.destination; }",
"public int getvertex() {\n\t\treturn this.v;\n\t}",
"public String getDestination() {\r\n\t\treturn destination;\r\n\t}",
"public String getDestination() {\r\n return destination;\r\n }",
"public Location getDestination() {\r\n return destination;\r\n }",
"public java.lang.String getDestination()\n {\n return this._destination;\n }",
"public String getDestination() {\n\t\treturn destination;\n\t}",
"public String getDestination() {\n return destination;\n }",
"public V getVertex()\r\n/* */ {\r\n/* 198 */ return (V)this.vertex;\r\n/* */ }",
"public Location getDestination(){\n\t\treturn destination;\n\t}",
"public int getDestination() {\n\t\treturn finalDestination;\n\t}",
"Vertex getVertex(int index);",
"public String getVertex() {\n\t\treturn vertices.get(0);\n\t}",
"@InVertex\n Object getTarget();",
"public Object getDestination() { return this.d; }",
"public Sommet destination() {\n return destination;\n }",
"public LatLng getDestination () {\n return destination;\n }",
"public TCSObjectReference<Point> getDestinationPoint() {\n if (hops.isEmpty()) {\n return null;\n }\n else {\n return hops.get(hops.size() - 1);\n }\n }",
"public java.lang.String getDestination() {\n return destination;\n }",
"public List<Vertex> getPathTo(int targetVertexPortnum){\n LinkedList<Vertex> path = new LinkedList<Vertex>();\n path.add(graph.getVertex(convertToString(targetVertexPortnum))); // use string version of the port num.\n \n while(targetVertexPortnum != this.initialVertexPortNum)\n {\n Vertex predecessor = graph.getVertex(this.predecessors.get(convertToString(targetVertexPortnum))); // use string version of the portnum.\n targetVertexPortnum = predecessor.getVertexPortNum(); // get the int representation of the vertex portnum.\n path.add(0, predecessor); // add the vertex to our shortest path.\n }\n \n return path; // return the shortest path to the target vertex.\n }",
"public Vertex getEnd()\n\t{\n\t\treturn end.copy();\n\t}",
"public java.lang.String getDestination() {\n java.lang.Object ref = destination_;\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 destination_ = s;\n return s;\n }\n }",
"public Actor getDestination()\r\n\t{\r\n\t\treturn destinationActor;\t\r\n\t}",
"public int destination(){\n\t\treturn this.des;\n\t}",
"private int shortestDistance(Vertex dest) {\n Integer d = distance.get(dest);\n if (d==null)\n return Integer.MAX_VALUE;\n return d;\n }",
"public Town getDestination() {\r\n\t\treturn this.destination;\r\n\t}",
"@Override\r\n\tpublic ArrayList<E> getSingleSourcePath(E dst) {\r\n\t\tVertex<E> d = vertices.get(dst);\r\n\t\tArrayList<E> path = new ArrayList<E>();\r\n\t\tif(d != null && d.getPredecessor() != null) {\r\n\t\t\tpathFill(lastSrc, d, path);\r\n\t\t} else if(d == lastSrc && d != null) {\r\n\t\t\tpath.add(d.getElement());\r\n\t\t}\r\n\r\n\t\treturn path;\r\n\t}",
"public Vertex getVertex() {\n return curr;\n }",
"String getRouteDest();",
"@Override\n public String getDestination() {\n return this.dest;\n }",
"public Square destination() {\n return destination;\n }",
"@Override\n public Point3D getDestination() {\n return myMovable.getDestination();\n }",
"VertexType getOtherVertexFromEdge( EdgeType r, VertexType oneVertex );",
"public String getDestinationId()\n {\n return destinationId; // Field is final; no need to sync.\n }",
"public List<Node> getShortestPathToDestination(Node destination) {\n List<Node> path = new ArrayList<Node>();\n\n\n\n for (Node node = destination; node != null; node = node.previous){\n Log.i(\"bbb\", \"get path \"+node._waypointName);\n path.add(node);\n }\n\n // reverse path to get correct order\n Collections.reverse(path);\n return path;\n }",
"public Vertex getStart()\n\t{\n\t\treturn start.copy();\n\t}",
"public String destination() {\n return this.destination;\n }",
"@Override\r\n\tpublic int getSingleSourceDistance(E dst) {\r\n\t\tif(containsVertex(dst)) {\r\n\t\t\treturn vertices.get(dst).getDistance();\r\n\t\t}\r\n\t\treturn Integer.MAX_VALUE;\r\n\t}",
"public java.lang.String getDestination() {\n java.lang.Object ref = destination_;\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 destination_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public long getDestinationId() {\n return destinationId_;\n }",
"public Reference destination() {\n return getObject(Reference.class, FhirPropertyNames.PROPERTY_DESTINATION);\n }",
"List<V> getShortestPath(V vertex);",
"public V getVertex(int index);",
"public String getDestinationResource() {\r\n\t\treturn destinationSource;\r\n\t}",
"@Override\n public Location getDestination() {\n return _destinationLocation != null ? _destinationLocation : getOrigin();\n }",
"public long getDestinationId() {\n return destinationId_;\n }",
"public ArrayList<PathXNode> generatePath(PathXNode destination)throws VertexNotFoundException{\r\n \r\n String destState = destination.getState();\r\n if (destState.indexOf(\"MOUSE_OVER\") >= 0)\r\n destState = destState.substring(0, destState.indexOf(\"_MOUSE_OVER\"));\r\n \r\n if (path != null && !path.isEmpty())\r\n return null;\r\n \r\n Graph graph = getLevel().getGraph();\r\n \r\n //The shortest path from the current intersection/vertex to the destination\r\n //intersection/vertex as an ArrayList of vertices.\r\n ArrayList<Vertex> shortestPath = graph.findPath(getIntersection().getVertex(), destination.getVertex());\r\n \r\n ArrayList<PathXNode> newPath = new ArrayList();\r\n \r\n //Convert the shortestPath ArrayList of Vertices to PathXNodes.\r\n ArrayList<PathXNode> nodes = getLevel().getDataModel().getNodes();\r\n for (Vertex v : shortestPath){\r\n for (PathXNode node : nodes)\r\n if (node.getVertex() == v){\r\n newPath.add(node);\r\n break;\r\n }\r\n }\r\n \r\n \r\n newPath.remove(0);\r\n \r\n //Highlight the nodes.\r\n for (PathXNode node : newPath)\r\n node.setState(node.getState() + \"_HIGHLIGHTED\");\r\n \r\n destination.setState(destState + \"_HIGHLIGHTED\");\r\n if (newPath != null && !newPath.isEmpty()) {\r\n targetX = newPath.get(0).getConstantXPos();\r\n targetY = newPath.get(0).getConstantYPos();\r\n }\r\n return newPath; \r\n }",
"@Override\r\n\tpublic int getLinkDestinationId() {\n\t\treturn destination.getNodeId();\r\n\t}",
"public final int getDestIndex() {\n\t\treturn destIndex;\n\t}",
"public ProcessVertex getOutVertex() {\n\t\treturn this.outVertex;\n\t}",
"Vertex getOtherVertex(Vertex v) {\n\t\t\tif(v.equals(_one)) return _two;\n\t\t\telse if(v.equals(_two)) return _one;\n\t\t\telse return null;\n\t\t}",
"int getShortestDistance(V vertex);",
"public String toString(){\n\t\treturn vertex.toString();\n\t}",
"public InetSocketAddress getDestination () {\n\t\treturn origin;\n\t}",
"long getDestinationId();",
"private Vertex getVertexFor(Agent ag) {\n return getDataFor(ag).vertex;\n }",
"String getDest();",
"public Room getDestination() {\n return toRoom;\n }",
"public int other(int vertex) {\n if (vertex == v) return w;\n else if (vertex == w) return v;\n else throw new IllegalArgumentException(\"Illegal endpoint\");\n }",
"public int other(int vertex) {\n if (vertex == v) return w;\n else if (vertex == w) return v;\n else throw new IllegalArgumentException(\"Illegal endpoint\");\n }",
"public VertexObject getReferenceVertex() {\n return referenceVertex;\n }",
"public java.lang.String getDestination(){return this.destination;}",
"public Edge<V> getEdge(V source, V target);",
"com.google.protobuf.ByteString\n getRouteDestBytes();",
"@Override\n\tpublic String getDest() {\n\t\treturn dest;\n\t}",
"io.opencannabis.schema.commerce.OrderDelivery.DeliveryDestination getDestination();",
"public String getRouteDest() {\n Object ref = routeDest_;\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 routeDest_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }",
"public String getRouteDest() {\n Object ref = routeDest_;\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 routeDest_ = s;\n }\n return s;\n }\n }",
"private void printPath( Vertex dest )\n {\n if( dest.prev != null )\n {\n printPath( dest.prev );\n // System.out.print( \" to \" );\n }\n System.out.print( dest.name +\" \" );\n }",
"@Override\n\tpublic List<node_data> shortestPath(int src, int dest) {\n\t\tList<node_data> ans = new ArrayList<>();\n\t\tthis.shortestPathDist(src, dest);\n\t\tif(this.GA.getNode(src).getWeight() == Integer.MAX_VALUE || this.GA.getNode(dest).getWeight() == Integer.MAX_VALUE){\n\t\t\tSystem.out.print(\"There is not a path between the nodes.\");\n\t\t\treturn null;\n\t\t}\n\t\tgraph copied = this.copy();\n\t\ttransPose(copied);\n\t\tnode_data first = copied.getNode(dest);\n\t\tans.add(first);\n\t\twhile (first.getKey() != src) {\n\t\t\tCollection<edge_data> temp = copied.getE(first.getKey());\n\t\t\tdouble check= first.getWeight();\n\t\t\tif(temp!=null) {\n\t\t\t\tfor (edge_data edge : temp) {\n\t\t\t\t\tif (copied.getNode(edge.getDest()).getWeight() + edge.getWeight() == check) {\n\t\t\t\t\t\tfirst = copied.getNode(edge.getDest());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tans.add(first);\n\t\t}\n\t\tList<node_data> ans2 = new ArrayList<>();\n\t\tfor (int i = ans.size()-1;i>=0;i--){\n\t\t\tans2.add(ans.get(i));\n\t\t}\n\t\treturn ans2;\n\t}",
"public List<Vertex> getShortestPathTo(Vertex target)\n {\n List<Vertex> path = new ArrayList<Vertex>();\n for (Vertex vertex = target; vertex != null; vertex = vertex.previous)\n path.add(vertex);\n Collections.reverse(path);\n return path;\n }",
"@Override\n\tpublic Path getEdgeIfExists(Location src, Location dest) {\n\t\tfor (Path p : paths.get(locations.indexOf(src))) \n\t\t\tif (p.getDestination().equals(dest))\n\t\t\t\treturn p;\n\n\t\treturn null;\n\n\t}",
"public ContractionVertex<RoadNode> getSourceCHNode() {\r\n return sourceCHNode;\r\n }"
]
| [
"0.85373163",
"0.6957672",
"0.6665097",
"0.66431904",
"0.6555344",
"0.65531886",
"0.65136576",
"0.6506455",
"0.65032226",
"0.6465987",
"0.64613307",
"0.6434834",
"0.64030707",
"0.6378259",
"0.63702863",
"0.6352991",
"0.6309536",
"0.6242124",
"0.6241645",
"0.62160784",
"0.61949795",
"0.61669284",
"0.6165779",
"0.61561626",
"0.6137253",
"0.613725",
"0.6134337",
"0.61035603",
"0.60807693",
"0.6072249",
"0.60639304",
"0.60497016",
"0.6020079",
"0.60117173",
"0.6005774",
"0.6002899",
"0.5991357",
"0.5983763",
"0.5981922",
"0.5981471",
"0.5975187",
"0.59659845",
"0.5964882",
"0.5948855",
"0.5926085",
"0.5918051",
"0.5907376",
"0.58841693",
"0.5871387",
"0.5865355",
"0.5860745",
"0.5860457",
"0.5856597",
"0.5847136",
"0.5842434",
"0.58295256",
"0.5823144",
"0.58218855",
"0.581996",
"0.5808583",
"0.5807927",
"0.5807293",
"0.5798428",
"0.5785052",
"0.5781134",
"0.57747644",
"0.5773255",
"0.5769688",
"0.5764947",
"0.57573974",
"0.57520765",
"0.5746668",
"0.5744951",
"0.57364684",
"0.5720652",
"0.57192576",
"0.5713709",
"0.5704047",
"0.57005835",
"0.56889576",
"0.567589",
"0.5663277",
"0.56542456",
"0.56267565",
"0.5621771",
"0.56152123",
"0.56149024",
"0.56106716",
"0.5605662",
"0.55954105",
"0.5593028",
"0.5589111",
"0.55808127",
"0.5578039",
"0.55704474",
"0.5568199",
"0.55657405",
"0.5564715",
"0.55595434",
"0.5556137",
"0.5552922"
]
| 0.0 | -1 |
Gets the weight of this edge | public int getWeight() {
return weight;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getWeight(){\n\t\treturn this.edgeWeight;\n\t}",
"public int getWeight()\r\n\t{\r\n\t\treturn edgeWeight;\t\t\r\n\t}",
"double getEdgeWeight();",
"public double getWeight() {\n\t\treturn weight;\n\t}",
"public float getWeight() {\n\t\t\treturn weight;\n\t\t}",
"public Byte getWeight() {\n\t\treturn weight;\n\t}",
"public double getWeight() {\n\t\n\t\treturn this.weight;\t \n\t}",
"public int weight(){\n\t\treturn this.weight;\n\t}",
"public double getWeight() {\n\t\treturn weight; \n\t\t}",
"public double getWeight(){\n\t\treturn this._weight;\n\t}",
"@Override\n public double getEdgeWeight() {\n return edgeWeight;\n }",
"public int getWeight() {\n\t\treturn _weight;\n\t}",
"public int getWeight() {\n\t\treturn weight;\n\t}",
"public int getWeight() {\n\t\treturn weight;\n\t}",
"public int getWeight() {\r\n\t\treturn this.weight;\r\n\t}",
"public int getWeight()\n\t{\n\t\treturn this.weight;\n\t}",
"public int weight() {\n if (this.weight == null) {\n return 0;\n } else {\n return this.weight;\n } // if/else\n }",
"public Integer getWeight() {\n return weight;\n }",
"public double getWeight(){\n\t\treturn weight;\n\t}",
"public java.lang.Double getWeight () {\r\n\t\treturn weight;\r\n\t}",
"public double getWeight() {\r\n return weight;\r\n }",
"public double getWeight() {\r\n return weight;\r\n }",
"public double getWeight() {\n return weight;\n }",
"public double getWeight() {\n return weight;\n }",
"@Override\n\tpublic double getWeight() {\n\t\treturn weight;\n\t}",
"@Override\n\t\tpublic int get_weights() {\n\t\t\treturn weight;\n\t\t}",
"public float getWeight() {\n return weight;\n }",
"public int getWeight() {\n return weight;\n }",
"public double getWeight() {\n return this.weight * 2.20462;\n }",
"public int getWeight() {\n return this.weight;\n }",
"public double getWeight() {\n\t\tif(weightConfiguration == null) {\n\t\t\treturn 1.0;\n\t\t}\n\t\treturn weightConfiguration.weightForIdentifier(this.getIdentifier());\n\t}",
"public float getWeight() {\n return weight;\n }",
"public int getWeight() {\n return weight;\n }",
"public int getWeight(){\n\t\treturn weight;\n\t}",
"public int weight() {\n \treturn weight;\n }",
"@Override\n public double getWeight() {\n return this.weight;\n }",
"public float getWeight() {\n return weight;\n }",
"public float getWeight() {\n return weight;\n }",
"public Double getEdgeWeight(Edge p_edge) {\n\t\tint id = p_edge.hashCode();\n\t\treturn weights.get(id);\n\t}",
"public String getWeight()\r\n\t{\r\n\t\treturn weight;\r\n\t}",
"public int getWeight() {\n return parameter.getWeight();\n }",
"public String getWeight() {\n return weight;\n }",
"public int getWeight()\n {\n return weight;\n }",
"public double getWeight()\n\t{\n\t\t//metodo precisa retornar alguma coisa\n\t\treturn 0.0;\n\t}",
"public float getWeight();",
"int getWeight() {\n return weight;\n }",
"int getWeight() {\n return weight;\n }",
"public int getWeight(){\n \treturn weight;\n }",
"@Override\r\n\tpublic double Weight() {\n\t\treturn Weight;\r\n\t}",
"public double getWeight()\r\n {\r\n return this.aWeight ;\r\n }",
"public Double getEdgeWeight(Node p_a, Node p_b) {\n\t\tEdge edge = makeEdge(p_a, p_b);\n\t\tint id = edge.hashCode();\n\t\treturn weights.get(id);\n\t}",
"default double totalWeight() {\n return edges().stream().mapToDouble(E::weight).sum();\n }",
"@Basic\r\n\tpublic Weight getWeight(){\r\n\t\treturn weight;\r\n\t}",
"public Matrix getWeight() {\n return weights;\n }",
"public double getWeight(){\n return weight;\n }",
"public Weight getWeight();",
"public T3 getWeight() {\r\n\t\treturn weight;\r\n\t}",
"public double getWeight()\r\n {\r\n return this.weightCapacity;\r\n }",
"int getWeight();",
"int getWeight();",
"public int getWeight();",
"public int getWeight()\n {\n return weightCarried;\n }",
"public ButlerWeights getWeights() {\n\treturn currentWeights;\n }",
"public double getWeight() {\n\t\tIterator<Ball> it = this.contents.iterator();\n\t\tdouble retVal = 0;\n\t\twhile (it.hasNext()) {\n\t\t\tretVal += it.next().getWeight();\n\t\t}\n\t\treturn retVal;\n\t}",
"@Override\r\n public final int getWeight() {\r\n int i, c;\r\n Rule[] r;\r\n\r\n c = 0;\r\n r = this.m_rules;\r\n for (i = (r.length - 1); i >= 0; i--) {\r\n c += r[i].getWeight();\r\n }\r\n\r\n return c;\r\n }",
"public double getWeight() {\n \treturn this.trainWeight;\n }",
"public double getTotalWeight() {\n return this.totalWeight;\n }",
"public int getWeight()\n {\n return this.aWeight;\n\n }",
"public int getWeight() {\n\t\treturn quantity*weight; \n\t}",
"@Override\n\tpublic double getInternalWeight(int nodeIndex) {\n\t\treturn this.inWeights[nodeIndex];\n\t}",
"public int weight ();",
"final protected double getWeight() {\n\t\treturn getWeight( _population );\n\t}",
"double getWeight(int node) {\n\n return this.neighbors.get(node);\n }",
"public int getEdgeWeight(T vertex1, T vertex2){\n if (isEdge(vertex1, vertex2)){\n return edges[vertexIndex(vertex1)][vertexIndex(vertex2)];\n }\n return NOT_FOUND;\n }",
"public double getWeight() {\n return 0;\n }",
"public int getRelativeWeight() {\n return relativeWeight;\n }",
"public int getWeightSize() {\r\n\t\treturn weigths.length;\r\n\t}",
"public double getActualWeight() {\n return actualWeight;\n }",
"public int getpWeight() {\n return pWeight;\n }",
"@Override\n\tpublic double weight() {\n\t\treturn 1.0;\n\t}",
"public Weight[] getWeights() {\n return weights;\n }",
"@Override\r\n\tpublic int getEdgeWeight(E src, E dst) {\r\n\t\tif(containsVertex(src) && containsVertex(dst)) {\r\n\t\t\tArrayList<Edge<E>> srcAdj = adjacencyLists.get(src);\r\n\t\t\tfor(int i = 0; i < srcAdj.size(); i++) {\r\n\t\t\t\tif(srcAdj.get(i).getDst().equals(dst)) {\r\n\t\t\t\t\treturn srcAdj.get(i).getWeight();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(src.equals(dst)) {\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn Integer.MAX_VALUE;\r\n\t}",
"public int getWeightLimit() {\n\t\treturn this.weightLimit;\n\t}",
"public int getEdgeWeight(String a, String b) {\n\t\tInteger weight = edges.get(a + \" \" + b);\n\t\treturn weight == null ? -1 : weight;\n\t}",
"public double getcurrentWeight() {\n\t return this.currentWeight;\n\t}",
"private double weight(){\n return ((double) (m_PositiveCount + m_NegativeCount)) / ((double) m_PositiveCount);\n }",
"public abstract double getWeight ();",
"public Double getHeadWeight();",
"public double getWeightedHeight() {\n return weightedNodeHeight(overallRoot);\n }",
"public float getWeightUsed()\r\n {\r\n // implement our own magic formula here ...\r\n return 2.0f;\r\n }",
"@Override\n public double getWeight() {\n // For this example just assuming all cars weigh 500kg and people weigh 70kg\n return 500 + (70 * this.getNumPassengers());\n }",
"public double getWeight(int paraIndex) {\n\t\treturn weights[paraIndex];\n\t}",
"public float getWeightValue() {\r\n\t\treturn this.value;\r\n\t}",
"double getWeight(V v, V w);",
"public double getWeight(int vert1, int vert2) throws Exception {\n var vert1List = neighbors.get(vert1);\n for (Edge e : vert1List)\n if (e.getVert2() == vert2)\n return ((WeightedEdge) e).getWeight();\n throw new Exception(\"Edge {\" + vert1 + \",\" + vert2 + \"} does not exist\");\n }",
"public Long getLevelweight() {\n return levelweight;\n }",
"private int getWeight(Node source, Node target) {\n LinkedList<Edge> edges = source.getEdges();\n for (Edge edge : edges) {\n if (edge.getDestination() == target) {\n return edge.getWeight();\n }\n }\n return 0;\n }",
"public int getWeight(Item item) {\n\t\treturn weight.get(item);\n\t}",
"@JsonGetter(\"weight\")\n public int getWeight ( ) {\n return this.weight;\n }"
]
| [
"0.8496196",
"0.84784704",
"0.832242",
"0.7956425",
"0.7913882",
"0.79100865",
"0.78995305",
"0.78749496",
"0.7861408",
"0.78605086",
"0.784013",
"0.7822992",
"0.7815849",
"0.7815849",
"0.77961946",
"0.7795873",
"0.7783346",
"0.7780804",
"0.7775107",
"0.77712005",
"0.77685964",
"0.77685964",
"0.7766461",
"0.7766461",
"0.77647614",
"0.77623916",
"0.77506125",
"0.7737474",
"0.7732207",
"0.772112",
"0.7718822",
"0.7672036",
"0.7667857",
"0.76315945",
"0.76180696",
"0.7609183",
"0.76041204",
"0.76041204",
"0.75401014",
"0.7524437",
"0.75227195",
"0.7479712",
"0.74698013",
"0.743915",
"0.73893464",
"0.7373202",
"0.7373202",
"0.7361725",
"0.7348799",
"0.7340531",
"0.7337739",
"0.730825",
"0.7290738",
"0.7281067",
"0.72802436",
"0.72617775",
"0.72530776",
"0.72176605",
"0.7170639",
"0.7170639",
"0.7170369",
"0.7167904",
"0.7157351",
"0.7141669",
"0.710785",
"0.7091525",
"0.70885843",
"0.70684755",
"0.7045878",
"0.7034243",
"0.7026615",
"0.6968949",
"0.6919224",
"0.6917434",
"0.6886994",
"0.68697155",
"0.6855696",
"0.6854916",
"0.6796311",
"0.6780043",
"0.6778798",
"0.6751513",
"0.674954",
"0.6743676",
"0.67266834",
"0.67243874",
"0.6717553",
"0.6717069",
"0.670582",
"0.6705382",
"0.67028207",
"0.6670214",
"0.660922",
"0.65984654",
"0.6581314",
"0.65726745",
"0.65656716",
"0.65571856",
"0.6544768"
]
| 0.7654398 | 34 |
Get the boundary of a subgraph (edges with 1 endpoint in the subgraph and 1 endpoint outside of it. | public Set<E> getBoundary(Graph<V,E> subG , Graph<V,E>g) {
Set<E> boundary = new HashSet<E>();
for (V source : subG.vertexSet()) {
for (E e : g.edgesOf(source)) {
V target = Util.getEdgeTarget(g, source, e);
if (!subG.vertexSet().contains(target)) {
boundary.add(e);
}
}
}
return boundary;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Collection<? extends Boundary> getIsBoundaryNodeOf();",
"public ReferencedEnvelope getBounds(){\n if(bounds==null){\n // Create Null envelope\n this.bounds = new ReferencedEnvelope(getCRS());\n // First try to find the BBOX definition in the gisNode directly\n try{\n if(gisNode.hasProperty(INeoConstants.PROPERTY_BBOX_NAME)){\n double[] bbox = (double[])gisNode.getProperty(INeoConstants.PROPERTY_BBOX_NAME);\n this.bounds = new ReferencedEnvelope(bbox[0],bbox[1],bbox[2],bbox[3],crs);\n }else{\n System.err.println(\"No BBox defined in the GeoNeo object\");\n }\n }catch(Exception bbox_e){\n System.err.println(\"Failed to interpret BBOX: \"+bbox_e.getMessage());\n bbox_e.printStackTrace(System.err);\n }\n // Secondly, if bounds is still empty, try find all feature geometries and calculate bounds\n try{\n if(this.bounds.isNull()){\n // Try to create envelope from any data referenced by the gisNode\n for(GeoNode node:getGeoNodes()){\n //TODO: support high dimensions\n this.bounds.expandToInclude(node.getCoords()[0], node.getCoords()[1]);\n }\n }\n }catch(Exception bbox_e){\n System.err.println(\"Failed to interpret BBOX: \"+bbox_e.getMessage());\n bbox_e.printStackTrace(System.err);\n }\n }\n return bounds;\n }",
"public Rectangle2D getBoundary() {\n return new Rectangle2D(x, y, width, height);\n }",
"public int getBoundary() {\n return boundary;\n }",
"public Rectangle2D getBoundary()\n {\n \tRectangle2D shape = new Rectangle2D.Float();\n shape.setFrame(location.getX(),location.getY(),12,length);\n return shape;\n }",
"boolean hasIsBoundaryNodeOf();",
"public Rectangle2D getBounds() {\n\t\tif (_child == null) {\n\t\t\treturn new Rectangle2D.Double();\n\t\t} else {\n\t\t\treturn _child.getBounds();\n\t\t}\n\t}",
"public Rectangle getBound(){\n \tint x = (int)location.getX();\n \tint y = (int)location.getY();\n \t\n \tif(isExploded == false)\n \t\treturn new Rectangle(x, y, image.getWidth(null), image.getHeight(null));\n \telse\n \t\treturn new Rectangle(x,y, 1,1);\n }",
"public int getGameBoundary() {\n\t\treturn gameEngine.getBoundary();\n\t}",
"Rectangle getBounds();",
"public Rectangle getMinimalBoundingBox() {\n double xMin = Double.MAX_VALUE;\n double yMin = Double.MAX_VALUE;\n double xMax = -Double.MAX_VALUE;\n double yMax = -Double.MAX_VALUE;\n // look for minimal and maximal x and y\n for (VoronoiHalfEdge halfEdge : halfEdges) {\n Vector2D startPoint = halfEdge.getStartPoint();\n double currentX = startPoint.getX();\n double currentY = startPoint.getY();\n if (currentX < xMin) {\n xMin = currentX;\n }\n if (currentY < yMin) {\n yMin = currentY;\n }\n if (currentX > xMax) {\n xMax = currentX;\n }\n if (currentY > yMax) {\n yMax = currentY;\n }\n }\n return new Rectangle(new Vector2D(xMin, yMax - yMin), new Vector2D(xMax - xMin, yMin));\n }",
"public int upperBoundary(){\r\n\t\treturn yStart - Constants.FLOOR_HEIGHT;\r\n\t}",
"public Map<Integer, Geometry> getBoundary() throws SQLException {\n return retrieveExpected(createNativeBoundaryStatement(), GEOMETRY);\n }",
"public Rect getBound() {\n return new Rect((int) (x - radius), (int) (y - radius), (int) (x + radius), (int) (y + radius));\n }",
"public final BoundingBox getBounds() {\n\t\tif (bounds==null) {\n\t\t\tint srsID =( (Geometry)this.get(0).getDefaultGeometry()).getSRID();\n\t\t\tBoundingBox re = new BoundingBoxImpl(\"\"+srsID);\n\t\t\tfor (SimpleFeature f : this) {\n\t\t\t\tre.include(f.getBounds());\n\t\t\t}\n\t\t\tbounds = re;\n\t\t}\n\t\treturn bounds;\n\t}",
"public int getBound();",
"public Bounds getBounds() {\n\t\treturn boss.getBoundsInParent();\n\t}",
"private float[] getBounds(TileCoolantPipe tile) {\n float[] bounds = new float[6];\n boolean[] connected = tile.getConnectedSides();\n float hDiameter = cableDiameter / 2.0F;\n for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {\n float width = 0.5F;\n if (!connected[dir.ordinal()]) {//(sides & dir.flag) != dir.flag) {\n width = hDiameter;\n }\n if (dir.ordinal() % 2 == 0) {\n width *= -1;\n }\n bounds[dir.ordinal()] = 0.5F + width;\n }\n return bounds;\n }",
"public InfinitNumber getBound() {\n\t\treturn mBound;\n\t}",
"public Bounds[] subdivide() {\n return new Bounds[] {\n getSubdivision(0, 0, 0), getSubdivision(1, 0, 0), getSubdivision(0, 0, 1), getSubdivision(1, 0, 1),\n getSubdivision(0, 1, 0), getSubdivision(1, 1, 0), getSubdivision(0, 1, 1), getSubdivision(1, 1, 1)\n };\n }",
"protected Rectangle determineBounds() {\n return getNetTransform().createTransformedShape( _bounds ).getBounds();\n }",
"static R2Rect getClippedEdgeBound(R2Vector a, R2Vector b, R2Rect clip) {\n R2Rect bound = R2Rect.fromPointPair(a, b);\n if (clipEdgeBound(a, b, clip, bound)) {\n return bound;\n }\n return R2Rect.empty();\n }",
"public Rectangle getBounds() {\n\t\tif (bounds == null) {\n\t\t\tsuper.getBounds();\n\t\t\tfor (int i = 0; i < getChildren().size(); i++) {\n\t\t\t\tIFigure child = (IFigure) getChildren().get(i);\n\t\t\t\tbounds.union(child.getBounds());\n\t\t\t}\n\t\t}\n\t\treturn bounds;\n\t}",
"public Bounds getBounds () { return (bounds); }",
"Rectangle getBoundingBox(Rectangle rect);",
"@Override\n\tpublic GRectangle getBounds() {\n\t\tif (isEmpty()) {\n\t\t\treturn new GRectangle();\n\t\t} else {\n\t\t\tGPoint p0 = points.get(0);\n\t\t\tdouble minX = p0.getX();\n\t\t\tdouble maxX = minX;\n\t\t\tdouble minY = p0.getY();\n\t\t\tdouble maxY = minY;\n\t\t\tfor (int i = 1; i < size(); i++) {\n\t\t\t\tGPoint p1 = points.get(i);\n\t\t\t\tminX = Math.min(minX, p1.getX());\n\t\t\t\tmaxX = Math.max(maxX, p1.getX());\n\t\t\t\tminY = Math.min(minY, p1.getY());\n\t\t\t\tmaxY = Math.max(maxY, p1.getY());\n\t\t\t}\n\t\t\treturn new GRectangle(minX, maxX, minY, maxY);\n\t\t}\n\t}",
"public Rectangle getBoundingBox() {\n\t\treturn getBounds();\n\t}",
"public Rectangle2D getBounds2D() {\n/* 155 */ if (this.usePrimitivePaint) {\n/* 156 */ Rectangle2D primitiveBounds = this.node.getPrimitiveBounds();\n/* 157 */ if (primitiveBounds == null) {\n/* 158 */ return new Rectangle2D.Double(0.0D, 0.0D, 0.0D, 0.0D);\n/* */ }\n/* 160 */ return (Rectangle2D)primitiveBounds.clone();\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 168 */ Rectangle2D bounds = this.node.getBounds();\n/* 169 */ if (bounds == null) {\n/* 170 */ return new Rectangle2D.Double(0.0D, 0.0D, 0.0D, 0.0D);\n/* */ }\n/* */ \n/* 173 */ AffineTransform at = this.node.getTransform();\n/* 174 */ if (at != null) {\n/* 175 */ bounds = at.createTransformedShape(bounds).getBounds2D();\n/* */ }\n/* 177 */ return bounds;\n/* */ }",
"public Rectangle getBounds();",
"public Rectangle getBounds();",
"public Position[] getBoundary() {\n\t\treturn boundary.clone();\n\t}",
"public Rectangle getBoundsBigger() {\n return new Rectangle(x-32,y-32,128,128);\n }",
"public abstract Node getBoundingNode();",
"public void findBoundaryGivenPhi() {\n \r\n boundary.removeAllElements();\r\n \r\n \tfor(int i=0; i<pixelsWide-1; i++)\r\n \t\tfor(int j=0; j<pixelsHigh-1; j++) {\r\n Int2d pi = new Int2d(i,j);\r\n \r\n double sgnIJ = Math.signum( phi[i][j] );\r\n if( sgnIJ != Math.signum( phi[i+1][j] ) ) {\r\n if(!boundary.contains(pi)) boundary.add(pi);\r\n Int2d p2 = new Int2d(i+1,j);\r\n if(!boundary.contains(p2)) boundary.add(p2);\r\n }\r\n if( sgnIJ != Math.signum( phi[i][j+1] ) ) {\r\n if(!boundary.contains(pi)) boundary.add(pi);\r\n Int2d p2 = new Int2d(i,j+1);\r\n if(!boundary.contains(p2)) boundary.add(p2); \r\n }\r\n \r\n }\r\n \r\n \r\n }",
"public BoundsObject getBounds() {\n\t\treturn null;\n\t}",
"RectangleLatLng getBounds();",
"@Override\r\n\tpublic Rectangle getBound() {\n\t\treturn new Rectangle((int)x, (int)y, (int)width, (int)height);\r\n\t}",
"public GJBox2D boundingBox() {\n\t\tdouble xmin = Double.MAX_VALUE;\n\t\tdouble ymin = Double.MAX_VALUE;\n\t\tdouble xmax = Double.MIN_VALUE;\n\t\tdouble ymax = Double.MIN_VALUE;\n\n\t\t// coordinates of current point\n\t\tdouble x, y;\n\t\t\n\t\t// Iterate on each control point of each segment\n\t\tfor (Segment seg : this.segments) {\n\t\t\tfor (GJPoint2D p : seg.controlPoints()) {\n\t\t\t\t// get current coordinates\n\t\t\t\tx = p.x();\n\t\t\t\ty = p.y();\n\t\t\t\t\n\t\t\t\t// update bounds\n\t\t\t\txmin = Math.min(xmin, x);\n\t\t\t\tymin = Math.min(ymin, y);\n\t\t\t\txmax = Math.max(xmax, x);\n\t\t\t\tymax = Math.max(ymax, y);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// createFromCollection a new GJBox2D with the bounds\n\t\treturn new GJBox2D(xmin, xmax, ymin, ymax);\n\t}",
"public int getOutLinkBoundary() {\n return 0;\n }",
"public PBounds getBoundsReference() {\n\t\tPBounds bds = super.getBoundsReference();\n\t\tgetUnionOfChildrenBounds(bds);\n\n\t\tcachedChildBounds.setRect(bds);\n\t\tdouble scaledIndent = INDENT/renderCamera.getViewScale();\t\t\n\t\tbds.setRect(bds.getX()-scaledIndent,bds.getY()-scaledIndent,bds.getWidth()+2*scaledIndent,bds.getHeight()+2*scaledIndent);\n\t\t\n\t\treturn bds;\n\t}",
"public RMPath getPathInBounds() { return getPath().getPathInRect(getBoundsInside()); }",
"public abstract Rectangle getBounds();",
"public abstract Rectangle getBounds();",
"public abstract Rectangle getBounds();",
"public Rectangle getClipBounds()\r\n\t{\r\n\t\treturn _g2.getClipBounds();\r\n\t}",
"public List<Float> getBoundingsOfCell() {\n\n\t\tfloat minXPoint = Float.POSITIVE_INFINITY;\n\t\tfloat maxXPoint = Float.NEGATIVE_INFINITY;\n\t\tfloat minYPoint = Float.POSITIVE_INFINITY;\n\t\tfloat maxYPoint = Float.NEGATIVE_INFINITY;\n\n\t\tfor (int i = 0; i < face.edges().size(); i++) {\n\n\t\t\tDCEL_Edge e = (DCEL_Edge) face.edges().get(i);\n\n\t\t\tArc2_Sweep arc = (Arc2_Sweep) e.reference;\n\n\t\t\t// Looking for most left located point of cell\n\t\t\tif (minXPoint > arc.minX().x) {\n\t\t\t\tminXPoint = arc.minX().x;\n\t\t\t}\n\t\t\t// Looking for most right located point of cell\n\t\t\tif (maxXPoint < arc.maxX().x) {\n\t\t\t\tmaxXPoint = arc.maxX().x;\n\t\t\t}\n\t\t\t// Looking for highest located point of cell\n\t\t\tif (minYPoint > arc.minY().y) {\n\t\t\t\tminYPoint = arc.minY().y;\n\t\t\t}\n\t\t\t// Looking for lowest located point of cell\n\t\t\tif (maxYPoint < arc.maxY().y) {\n\t\t\t\tmaxYPoint = arc.maxY().y;\n\t\t\t}\n\n\t\t}\n\n\t\tList<Float> boundings = new ArrayList<Float>();\n\t\tboundings.add(minXPoint);\n\t\tboundings.add(maxXPoint);\n\t\tboundings.add(minYPoint);\n\t\tboundings.add(maxYPoint);\n\t\treturn boundings;\n\n\t}",
"@Test (expected=AssertionError.class)\n\tpublic final void testCurrentBoundaryNeighbor() {\n\t\tint boundarySize = totalSize/elementsPerDim;\n\t\tBoundaryIterator bdIterator = block.getBoundaryIterator();\n\t\tbdIterator.setBoundaryToIterate(new BoundaryId(0, false));\n\t\t// Step to middle of the boundary\n\t\tfor (int i=0; i< boundarySize/2; i++) {\n\t\t\tbdIterator.next();\n\t\t}\n\t\tbdIterator.currentNeighbor(0, extent + 1);\n\t}",
"public sRectangle getSRectangleBound()\n {\n return form.getSRectangleBound();\n }",
"public float[] getBounds() {\r\n\t\tfloat[] bounds = {x_ - width_/ 2, x_ + width_ / 2, y_ - height_ / 2, y_ + height_ / 2};\r\n\t\treturn bounds;\r\n\t}",
"public abstract Regionlike getGridBounds();",
"protected Rectangle getGraphBoundaries(int fromSample, int toSample) {\r\n\t\tif (fromSample < section.getStart()) fromSample = section.getStart();\r\n\t\tif (toSample > section.getEnd()) toSample = section.getEnd();\r\n\t\tif (fromSample > toSample || fromSample > section.getEnd()\r\n\t\t\t\t|| toSample < section.getStart())\r\n\t\t\treturn new Rectangle(0, 0, 0, 0);\r\n\t\tint x1 = toPixelX(fromSample);\r\n\t\tint x2 = toPixelEndX(toSample);\r\n\t\treturn new Rectangle(getGraphLeft() + x1, getGraphTop(0), x2 - x1 + 1,\r\n\t\t\t\tgetGraphHeight() * getChannelCount());\r\n\t}",
"public String getBoundary()\n {\n return _rawBoundary;\n }",
"public IRectangleBound getClipBound();",
"public Rectangle getBounds() {\r\n return bounds;\r\n }",
"public Rectangle getBounds() {\n return new Rectangle(x, y, DIAMETER, DIAMETER); // returns a rectangle with its dimensions\r\n }",
"public List<AdjacentVertexWithEdge> getNeighbourhood(SubGraph subGraph) {\n if (disable) {\n return null;\n }\n \n CacheKey cacheKey = new CacheKey(subGraph);\n List<AdjacentVertexWithEdge> neighbourhood = cachedNeighborhoods.get(cacheKey);\n if (neighbourhood != null) {\n // moved cached key to the end of the queue\n lruQueue.remove(cacheKey);\n lruQueue.add(cacheKey);\n }\n \n return neighbourhood;\n }",
"Long getResultMaskBoundary();",
"public Rectangle getBounds() {\n\treturn new Rectangle((int)x,(int)y,32,32);\n\t}",
"public Rectangle2D getBounds() {\n\t\t// FIXME: these bounds REALLY need to be cached. But it's\n\t\t// painful because of the public members.\n\t\tif (stroke == null) {\n\t\t\treturn shape.getBounds2D();\n\t\t} else if (stroke instanceof BasicStroke) {\n\t\t\t// For some reason (antialiasing?) the bounds returned by\n\t\t\t// BasicStroke is off by one. This code works around it.\n\t\t\t// if all we want is the bounds, then we don't need to actually\n\t\t\t// stroke the shape. We've had reports that this is no longer\n\t\t\t// necessary with JDK1.3.\n\t\t\tRectangle2D rect = shape.getBounds2D();\n\t\t\tint width = (int) ((BasicStroke) stroke).getLineWidth() + 2;\n\t\t\treturn new Rectangle2D.Double(rect.getX() - width, rect.getY()\n\t\t\t\t\t- width, rect.getWidth() + width + width, rect.getHeight()\n\t\t\t\t\t+ width + width);\n\t\t} else {\n\t\t\t// For some reason (antialiasing?) the bounds returned by\n\t\t\t// BasicStroke is off by one. This code works around it.\n\t\t\t// We've had reports that this is no longer\n\t\t\t// necessary with JDK1.3.\n\t\t\tRectangle2D rect = stroke.createStrokedShape(shape).getBounds2D();\n\t\t\treturn new Rectangle2D.Double(rect.getX() - 1, rect.getY() - 1,\n\t\t\t\t\trect.getWidth() + 2, rect.getHeight() + 2);\n\t\t}\n\t}",
"private Boundaries buildBoundaries(Graph graph, Graph clusterPlacement) {\n Boundaries boundaries = new Boundaries();\n NodeAttribute<Coordinates> clusterPositions = clusterPlacement.nodeAttribute(StdAttribute.nodePosition);\n NodeAttribute<Coordinates> clusterSizes = clusterPlacement.nodeAttribute(StdAttribute.nodeSize);\n NodeAttribute<Coordinates> positions = graph.nodeAttribute(StdAttribute.nodePosition);\n EdgeAttribute<ControlPoints> edgePoints = graph.edgeAttribute(StdAttribute.edgePoints);\n\n for (Graph cluster : graph.subGraphs()) {\n String clusterLabel = cluster.<String>graphAttribute(StdAttribute.label).get();\n Node clusterPlaceholder = clusterPlacement.getNode(clusterLabel);\n Coordinates clusterCenter = clusterPositions.get(clusterPlaceholder);\n Coordinates clusterSize = clusterSizes.get(clusterPlaceholder);\n Coordinates clusterBottomLeft = clusterCenter.minus(clusterSize.divide(2));\n\n Node boundaryNode = graph.newNode();\n Edge boundaryEdge = graph.newEdge(boundaryNode, boundaryNode);\n positions.set(boundaryNode, clusterBottomLeft);\n ControlPoints edgeBends = new ControlPoints();\n edgeBends.add(clusterBottomLeft.plus(new Coordinates(clusterSize.x(), 0)));\n edgeBends.add(clusterBottomLeft.plus(clusterSize));\n edgeBends.add(clusterBottomLeft.plus(new Coordinates(0, clusterSize.y())));\n edgePoints.set(boundaryEdge, edgeBends);\n\n boundaries.nodes.add(boundaryNode);\n boundaries.edges.add(boundaryEdge);\n Collection<Edge> surroundingEdge = new HashSet<>();\n surroundingEdge.add(boundaryEdge);\n for (Node node : cluster.nodes()) {\n boundaries.surroundingEdges.set(node, surroundingEdge);\n }\n }\n boundaries.surroundingEdges.setDefault(boundaries.edges);\n return boundaries;\n }",
"@Override\n \tpublic Rectangle2D GetBoundingBox() {\n\t\treturn null;\n \t}",
"public Rectangle getBoundingBox() {\n return new Rectangle(this);\r\n }",
"public Bounds getLogicalBounds() {\n return getDragContext().getLogicalBounds();\n }",
"private Bounds getSubdivision(int x, int y, int z) {\n final int xStep = (maxX - minX + 1) / 2;\n final int yStep = (maxY - minY + 1) / 2;\n final int zStep = (maxZ - minZ + 1) / 2;\n final int newMinX = minX + xStep * x;\n final int newMinY = minY + yStep * y;\n final int newMinZ = minZ + zStep * z;\n return new Bounds(newMinX, newMinY, newMinZ, newMinX + xStep, newMinY + yStep, newMinZ + zStep);\n }",
"@Override\n\tpublic BoundaryRectangle getBoundingBox() {\n\t\treturn new BoundaryRectangle(0, 0, drawView.getWidth(), drawView.getHeight());\n\t}",
"public RMRect getBoundsMarkedDeep()\n{\n // Get normal marked bounds\n RMRect bounds = getBoundsMarked();\n \n // Iterate over (visible) children and union with their BoundsMarkedDeep (converted to this shape coords)\n for(int i=0, iMax=getChildCount(); i<iMax; i++) { RMShape child = getChild(i);\n if(!child.isVisible()) continue;\n RMRect childBounds = child.getBoundsMarkedDeep();\n childBounds = child.convertRectToShape(childBounds, this);\n bounds.unionEvenIfEmpty(childBounds);\n }\n\n // Return marked bounds\n return bounds;\n}",
"public Rectangle getBounds() {\r\n return new Rectangle(x, y, 55, 51);\r\n }",
"public Rectangle getBounds(){\r\n return new Rectangle(x, y, w, w);\r\n }",
"private Rectangle getParentBounds() {\n final var bounds = mParentBounds;\n\n return bounds == null\n ? mParentBounds = calculateBounds( getParent() )\n : bounds;\n }",
"public Rectangle getBounds() {\n\t\treturn new Rectangle(getX(),getY(),width, width);\n\t}",
"public Rectangle getBounds()\n {\n return new Rectangle ((int)x,(int)y,32,32);\n }",
"public Rectangle getBounds() {\n return new Rectangle(x, y, 32, 32);\n }",
"public void determineNodeBoundary(boolean drivable) {\r\n \t\t//System.out.println(\"Determine node boundary of \" + name);\r\n \t\tArrayList<Point2D.Double> pointCloud = new ArrayList<Point2D.Double>(); \r\n \t\t// Add all end points of (drive-able) crossSectionElements to the pointCloud\r\n \t\tfor (DirectionalLink dl : links) {\r\n \t\t\tCrossSection cs = dl.link.getCrossSectionAtNode(dl.incoming);\r\n \t\t\t//if (name.equals(\"node_een\"))\r\n \t\t\t//\tLog.logToFile(\"d:/hull.txt\", false, \"selecting crosssection %s %s %s\", cs.toString(), dl.incoming ? \"from\" : \"to\", dl.incoming ? dl.link.getFromNode_r().getName_r() : dl.link.getToNode_r().getName_r());\r\n \t\t\tfor (int index = 2 * cs.getCrossSectionElementList_r().size(); --index >= 0; )\r\n \t\t\t\tif ((! drivable) || cs.elementFromNode(dl.incoming, true, index).getCrossSectionElementTypology().getDrivable()) {\r\n \t\t\t\t\tLine2D.Double dlLine = cs.vectorAtNode(dl.incoming, true, index, false);\r\n \t\t\t\t\tif (null == dlLine)\r\n \t\t\t\t\t\tcontinue;\r\n \t\t\t\t\tpointCloud.add((Point2D.Double) dlLine.getP1());\r\n \t\t\t\t\t//if (name.equals(\"node_een\"))\r\n \t\t\t\t\t//\tLog.logToFile(\"d:/hull.txt\", false, \"added endpoint %d %.3f,%.3f\", index, dlLine.x1, dlLine.y1);\r\n \t\t\t\t\t// Add the intersections of the boundaries of different (drive-able) crossSectionElements\r\n \t\t\t\t\tfor (DirectionalLink otherDL : links) {\r\n \t\t\t\t\t\tif (otherDL.angle >= dl.angle) // only search up to dl (and NEVER include dl itself)\r\n \t\t\t\t\t\t\tbreak;\t// this way we'll find each intersection only ONCE\r\n \t\t\t\t\t\tCrossSection otherCS = otherDL.link.getCrossSectionAtNode(otherDL.incoming);\r\n \t\t\t\t\t\tfor (int otherIndex = 2 * otherCS.getCrossSectionElementList_r().size(); --otherIndex >= 0; )\r\n \t\t\t\t\t\t\tif ((! drivable) || (otherCS.elementFromNode(otherDL.incoming, true, otherIndex).getCrossSectionElementTypology().getDrivable())) {\r\n \t\t\t\t\t\t\t\tLine2D.Double otherDLLine = otherCS.vectorAtNode(otherDL.incoming, true, otherIndex, false);\r\n \t\t\t\t\t\t\t\tif (null == otherDLLine)\r\n \t\t\t\t\t\t\t\t\tcontinue;\r\n \t\t\t\t\t\t\t\t//if (name.equals(\"node_een\"))\r\n \t\t\t\t\t\t\t\t//\tLog.logToFile(\"d:/hull.txt\", false, \"checking intersection between %s and %s\", GeometryTools.Line2DToString(dlLine), GeometryTools.Line2DToString(otherDLLine));\r\n \t\t\t\t\t\t\t\tif (Planar.lineIntersectsLine(dlLine, otherDLLine)) {\r\n \t\t\t\t\t\t\t\t\tPoint2D.Double intersection = Planar.intersection(dlLine, otherDLLine);\r\n \t\t\t\t\t\t\t\t\t//System.out.println(\"Adding boundary intersection \" + intersection);\r\n \t\t\t\t\t\t\t\t\tpointCloud.add(intersection);\r\n \t\t\t\t\t\t\t\t\t//if (name.equals(\"node_een\"))\r\n \t\t\t\t\t\t\t\t\t//\tLog.logToFile(\"d:/hull.txt\", false, \"added boundary intersection %.3f,%.3f\", intersection.x, intersection.y);\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t}\r\n \r\n \t\t//System.out.println(\"pointCloud of \" + name + \" contains these points: \" + pointCloud.toString());\r\n \t\tif (0 == pointCloud.size())\r\n \t\t\tpointCloud.add(getPoint());\t// add design point of this node\r\n \t\tcircle = Planar.circleCoveringPoints(pointCloud);\r\n \t\t//ArrayList<Point2D.Double> ppp = new ArrayList<Point2D.Double>();\r\n \t\t//ppp.add(new Point2D.Double(this.x, this.y));\r\n \t\t//circle = GeometryTools.circleCoveringPoints(ppp);\r\n \t\t//System.out.format(Main.Locale, \"covering circle is %s\\r\\n\", circle.toString());\r\n \t\t// Create the convex hull consisting of the points where the drive-able parts of the links enter the covering circle\r\n \t\tArrayList<Point2D.Double> points = new ArrayList<Point2D.Double>();\r\n \t\tfor (DirectionalLink dl : links) {\r\n \t\t\tCrossSection cs = dl.link.getCrossSectionAtNode(dl.incoming);\r\n \t\t\tfor (int index = 2 * cs.getCrossSectionElementList_r().size(); --index >= 0; )\r\n \t\t\t\tif (cs.elementFromNode(dl.incoming, true, index).getCrossSectionElementTypology().getDrivable()) {\r\n \t\t\t\t\tLine2D.Double line = cs.vectorAtNode(dl.incoming, true, index, false);\r\n \t\t\t\t\tif (null == line)\r\n \t\t\t\t\t\tcontinue;\r\n \t\t\t\t\tPoint2D.Double intersections[] = Planar.intersectRayAndCircle(line, circle);\r\n \t\t\t\t\t//System.out.format(Main.Locale, \"line %s intersects circle %s at %d point(s)\\r\\n\", GeometryTools.Line2DToString(line), circle.toString(), intersections.length);\r\n \t\t\t\t\tif (intersections.length > 1) {\r\n \t\t\t\t\t\tSystem.err.println(\"Peter thinks this never happens...\");\r\n \t\t\t\t\t\t// use the one that is closest to the far end of the line\r\n \t\t\t\t\t\tif (intersections[0].distance(line.getP2()) < intersections[1].distance(line.getP2()))\r\n \t\t\t\t\t\t\tpoints.add(intersections[0]);\r\n \t\t\t\t\t\telse\r\n \t\t\t\t\t\t\tpoints.add(intersections[1]);\r\n \t\t\t\t\t}\r\n \t\t\t\t\telse if (intersections.length > 0)\r\n \t\t\t\t\t\tpoints.add(intersections[0]);\r\n \t\t\t\t\telse {\r\n \t\t\t\t\t\tSystem.out.println(\"line \" + Planar.Line2DToString(line) + \" does not intersect the circle \" + circle.toString());\r\n \t\t\t\t\t\t// probably a very near miss\r\n \t\t\t\t\t\tdouble ratio = circle.radius() / line.getP1().distance(circle.center());\r\n \t\t\t\t\t\tif ((ratio > 0.99) && (ratio < 1.01))\r\n \t\t\t\t\t\t\tpoints.add(Planar.logPoint(\"adding almost intersection\", (Point2D.Double)(line.getP1())));\r\n \t\t\t\t\t\telse\r\n \t\t\t\t\t\t\tSystem.err.println(\"Total miss: ratio is \" + ratio + \" (\" + circle.radius() / line.getP2().distance(circle.center()) + \")\");\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t}\r\n \t\tif (points.size() == 0)\r\n \t\t\treturn;\r\n \t\t// Compute the convex hull (in 2D) and convert that into an ArrayList<Vertex>\r\n \t\t//System.out.println(\"Computing convex hull of \" + points.toString());\r\n \t\t//if (name.equals(\"node_een\"))\r\n \t\t//\tLog.logToFile(\"d:/hull.txt\", false, \"points is %s\", points.toString());\r\n \t\tconflictArea = new ArrayList<Vertex>();\r\n \t\tfor (Point2D.Double p : Planar.convexHull(points))\r\n \t\t\tconflictArea.add(new Vertex(p, z));\t// use Z-component of this node\r\n \t\tconflictArea.add(conflictArea.get(0));\t// close the polygon\r\n \t\t//System.out.println(\"convex hull is \" + conflictArea.toString());\r\n \t\t//if (name.equals(\"node_een\"))\r\n \t\t//\tLog.logToFile(\"d:/hull.txt\", false, \"hull is %s\", conflictArea.toString());\r\n \t}",
"public java.awt.Rectangle getBounds(){\r\n return new java.awt.Rectangle((int)Math.round(x), (int)Math.round(y), (int)Math.round(getWidth()), (int)Math.round(getHeight()));\r\n }",
"public RectF getBounds()\n {\n return bounds;\n }",
"private Node getNodeBetweenBounds(Node node, int x, int y) {\n boolean childBetweenBounds = true;\n while (childBetweenBounds) {\n childBetweenBounds = false;\n NodeList nodeList = node.getChildNodes();\n for (int i = 0; i < nodeList.getLength(); i++) {\n if (isBetweenBounds(x, y, getBounds(nodeList.item(i)))) {\n childBetweenBounds = true;\n node = nodeList.item(i);\n break;\n }\n }\n }\n return node;\n }",
"public Rectangle bounds()\n\t{\n\t\treturn (new Rectangle(x, y, 10, 10));\n\t}",
"public Rectangle getBounds()\r\n\t{\r\n\t\treturn new Rectangle(x, y, w, h);\r\n\t}",
"public ViewEdges extendsOutside(RectF bounds)\n {\n boolean left = false;\n boolean top = false;\n boolean right = false;\n boolean bottom = false;\n \n updateRotatedCorners();\n for (int i = 0; i < 4; i++)\n {\n left = left || (rotatedCorners[i][0] < bounds.left );\n top = top || (rotatedCorners[i][1] < bounds.top );\n right = right || (rotatedCorners[i][0] >= bounds.right );\n bottom = bottom || (rotatedCorners[i][1] >= bounds.bottom);\n }\n \n return new ViewEdges(left, top, right, bottom);\n }",
"int getBoundsHeight();",
"public Rectangle getBounds() {\n return new Rectangle((int) getX() - 20, (int) getY() - 20, 40, 40);\n }",
"public Rectangle getBounds() {\n return new Rectangle(getMinX(), getMinY(), getWidth(), getHeight());\n }",
"public boolean isInBoundaries() {\n\t return Referee.playfield.isInBoundaries(this);\n }",
"public S2LatLngRect getBound() {\n // To save time, we ignore numerical errors in the computed S2LatLngs while\n // accumulating the bounds and then account for them here.\n //\n // S2LatLng(S2Point) has a maximum error of 0.955 * S2.DBL_EPSILON in latitude.\n // In the worst case, we might have rounded \"inwards\" when computing the\n // bound and \"outwards\" when computing the latitude of a contained point P,\n // therefore we expand the latitude bounds by 2 * S2.DBL_EPSILON in each\n // direction. (A more complex analysis shows that 1.5 * S2.DBL_EPSILON is\n // enough, but the expansion amount should be a multiple of S2.DBL_EPSILON in\n // order to avoid rounding errors during the expansion itself.)\n //\n // S2LatLng(S2Point) has a maximum error of S2.DBL_EPSILON in longitude, which\n // is simply the maximum rounding error for results in the range [-Pi, Pi].\n // This is true because the Gnu implementation of atan2() comes from the IBM\n // Accurate Mathematical Library, which implements correct rounding for this\n // intrinsic (i.e., it returns the infinite precision result rounded to the\n // nearest representable value, with ties rounded to even values). This\n // implies that we don't need to expand the longitude bounds at all, since\n // we only guarantee that the bound contains the *rounded* latitudes of\n // contained points. The *true* latitudes of contained points may lie up to\n // S2.DBL_EPSILON outside of the returned bound.\n\n S2LatLng expansion = S2LatLng.fromRadians(2 * S2.DBL_EPSILON, 0);\n return builder.build().expanded(expansion).polarClosure();\n }",
"public abstract boolean getEdge(Point a, Point b);",
"public Rectangle getBounds() {\n return null;\n }",
"public RMRect getBoundsInside() { return new RMRect(0, 0, getWidth(), getHeight()); }",
"public Rectangle get_bounds() {\n return new Rectangle(x,y, width-3, height-3);\n }",
"public void setBoundary(int value) {\n this.boundary = value;\n }",
"public int lowerBoundary(){\r\n\t\treturn this.ypoints[0];\r\n\t}",
"@Override\n\tpublic Rectangle getBound() {\n\t\trectBound.setX(posX+20);\n\t\trectBound.setY(Y_LAND - image.getHeight() +10);\n\t\trectBound.setWidth(image.getWidth()-10);\n\t\trectBound.setHeight(image.getHeight());\n\t\treturn rectBound;\n\t}",
"public GeographicBoundingBox getBoundingBox()\r\n {\r\n return myBoundingBox;\r\n }",
"public Bounds get() {\n\treturn bounds;\n }",
"public MWC.GenericData.WorldArea getBounds()\r\n\t{\n\t\treturn null;\r\n\t}",
"public Rectangle getBounds() {\n return super.getBounds();\n }",
"@Override\n\tpublic Rectangle2D getBounds2D() {\n\t\treturn null;\n\t}",
"Map<Node, Edge> getInEdges() {\n return inEdges;\n }",
"protected Rectangle getGraphBounds(int channel) {\r\n\t\tif (channel != ALL_CHANNELS) {\r\n\t\t\treturn new Rectangle(getGraphLeft(), getGraphTop(channel),\r\n\t\t\t\t\tgetGraphWidth(), getGraphHeight());\r\n\t\t}\r\n\t\treturn new Rectangle(getGraphLeft(), getGraphTop(0), getGraphWidth(),\r\n\t\t\t\tgetGraphHeight() * getChannelCount());\r\n\t}",
"public Rectangle getBounds() {\n\t\treturn new Rectangle((int) xPos, (int) yPos, (int) width, (int) height);\n\t}",
"public ERectangle getPrimitiveBounds() {\n ERectangle primitiveBounds = this.primitiveBounds;\n if (primitiveBounds != null) return primitiveBounds;\n return this.primitiveBounds = computePrimitiveBounds();\n }"
]
| [
"0.661723",
"0.62518716",
"0.6056818",
"0.60562503",
"0.60113853",
"0.6008361",
"0.58013326",
"0.56860375",
"0.5679862",
"0.5674318",
"0.5642868",
"0.56094027",
"0.5602731",
"0.5588532",
"0.55870306",
"0.5585701",
"0.55775857",
"0.5576953",
"0.5572957",
"0.55350786",
"0.5507541",
"0.5506048",
"0.54883814",
"0.54698706",
"0.5461945",
"0.54384106",
"0.54349065",
"0.5433785",
"0.54195124",
"0.54195124",
"0.5416448",
"0.54125327",
"0.5406465",
"0.5402874",
"0.53780675",
"0.5354886",
"0.53527516",
"0.53358936",
"0.5329782",
"0.5322013",
"0.53187376",
"0.53181213",
"0.53181213",
"0.53181213",
"0.5288367",
"0.52817637",
"0.526873",
"0.5251415",
"0.5227679",
"0.5194501",
"0.5185002",
"0.51724553",
"0.51689094",
"0.5157842",
"0.51543236",
"0.5151709",
"0.51451796",
"0.5144112",
"0.51360685",
"0.5134971",
"0.5134567",
"0.51325524",
"0.5118126",
"0.5116651",
"0.5106916",
"0.5104696",
"0.5103692",
"0.5103052",
"0.5098254",
"0.5088724",
"0.50879717",
"0.508761",
"0.50875574",
"0.50853163",
"0.5061465",
"0.5060213",
"0.50599045",
"0.50546664",
"0.5053495",
"0.5037154",
"0.50340855",
"0.5025221",
"0.50238717",
"0.5022701",
"0.5018411",
"0.5016738",
"0.5015672",
"0.5007397",
"0.5003621",
"0.5001266",
"0.4998715",
"0.49930462",
"0.49886674",
"0.4984388",
"0.49824348",
"0.49669307",
"0.4964562",
"0.49603748",
"0.49540007",
"0.49475306"
]
| 0.7325538 | 0 |
Returns the bisection of the subgraph or null if the computation is not done yet | @Override
public Set<E> getClustering() {
return F;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int calcBF(Node node){\n\t\tint bf;\n\t\tif(node.left == null && node.right == null)\n\t\t\treturn 0;\n\t\tif(node.left == null){\n\t\t\tbf= -node.right.height;\n\t\t\tnode.height= 1+ node.right.height;\n\t\t}\n\t\telse if(node.right == null){\n\t\t\tbf= node.left.height;\n\t\t\tnode.height= 1+ node.left.height;\n\t\t}\n\t\telse {\n\t\t\tbf= node.left.height - node.right.height;\n\t\t\tnode.height = 1+ Math.max(node.left.height , node.right.height);\n\t\t}\n\t\treturn bf;\n\t}",
"public VariableCoefficientTuple suggestBranchingVariable (TwoIntegerTuple childRectCounts ) {\r\n \r\n VariableCoefficientTuple result= new VariableCoefficientTuple(null, ZERO) ;\r\n \r\n //first get the best lp rects\r\n List<Rectangle> rectanglesToConsiderForBranchingVarCalculation = this.getRectanglesToConsiderForBranchingVarCalculation( );\r\n \r\n //collect 0 direction refcounts into this map\r\n Map<String, Integer> zeroVar_RefCountMap = new HashMap<String, Integer> () ;\r\n //and one diirection refconts into this map\r\n Map<String, Integer> oneVar_RefCountMap = new HashMap<String, Integer> () ;\r\n \r\n List<VariableCoefficientTuple> variablesUsedForBranchingInThisRectangle =null;\r\n for (Rectangle rect: rectanglesToConsiderForBranchingVarCalculation){\r\n variablesUsedForBranchingInThisRectangle = getVariablesUsedForBranchingInThisRectangle (rect);\r\n if (variablesUsedForBranchingInThisRectangle.size()>ZERO) {\r\n this.updateVariableRefCounts(zeroVar_RefCountMap, oneVar_RefCountMap, variablesUsedForBranchingInThisRectangle) ;\r\n }else {\r\n System.err.print(\"trying to branch a node which should have been marked infeasible\" );\r\n exit(ONE);\r\n }\r\n }\r\n \r\n \r\n //now find the highest refcount var, no matter its direction\r\n int highZeroFreq = zeroVar_RefCountMap.isEmpty()?ZERO:Collections.max( zeroVar_RefCountMap.values());\r\n int highOneFreq = oneVar_RefCountMap.isEmpty()? ZERO: Collections.max(oneVar_RefCountMap.values()) ;\r\n \r\n //we need to find the selected var's refcount on the other side\r\n int selectedVarRefCountOnOtherSide = ZERO;\r\n \r\n int totalRects = getNumberOfRects(this.myInfeasibleRectanglesList) ;\r\n \r\n if (highZeroFreq>highOneFreq) {\r\n result.varName=getHighestFreqVar (zeroVar_RefCountMap,highZeroFreq ) ;\r\n result.coeff=highZeroFreq;\r\n selectedVarRefCountOnOtherSide= oneVar_RefCountMap.get( result.varName)==null? ZERO : oneVar_RefCountMap.get( result.varName);\r\n //this is how many rects will survive on either side\r\n childRectCounts.zeroSideCount = totalRects - selectedVarRefCountOnOtherSide;\r\n childRectCounts.oneSideCount=totalRects -highZeroFreq ;\r\n \r\n } else {\r\n result.varName=getHighestFreqVar (oneVar_RefCountMap,highOneFreq ) ;\r\n result.coeff=highOneFreq;\r\n selectedVarRefCountOnOtherSide= zeroVar_RefCountMap.get( result.varName)==null? ZERO : zeroVar_RefCountMap.get( result.varName);\r\n \r\n childRectCounts.zeroSideCount = totalRects - highOneFreq;\r\n childRectCounts.oneSideCount=totalRects - selectedVarRefCountOnOtherSide;\r\n }\r\n \r\n return result;\r\n }",
"private int BFS() {\n adjList.cleanNodeFields();\n\n //Queue for storing current shortest path\n Queue<Node<Integer, Integer>> q = new LinkedList<>();\n\n //Set source node value to 0\n q.add(adjList.getNode(startNode));\n q.peek().key = 0;\n q.peek().d = 0;\n q.peek().visited = true;\n\n //Helper variables\n LinkedList<Pair<Node<Integer, Integer>, Integer>> neighbors;//Array of pairs <neighborKey, edgeWeight>\n Node<Integer, Integer> neighbor, u;\n long speed = (long) (cellSideLength * 1.20);\n\n while (!isCancelled() && q.size() != 0) {\n u = q.poll();\n\n //Marks node as checked\n checkedNodesGC.fillRect((u.value >> 16) * cellSideLength + 0.5f,\n (u.value & 0x0000FFFF) * cellSideLength + 0.5f,\n (int) cellSideLength - 1, (int) cellSideLength - 1);\n\n //endNode found\n if (u.value == endNode) {\n //Draws shortest path\n Node<Integer, Integer> current = u, prev = u;\n\n while ((current = current.prev) != null) {\n shortestPathGC.strokeLine((prev.value >> 16) * cellSideLength + cellSideLength / 2,\n (prev.value & 0x0000FFFF) * cellSideLength + cellSideLength / 2,\n (current.value >> 16) * cellSideLength + cellSideLength / 2,\n (current.value & 0x0000FFFF) * cellSideLength + cellSideLength / 2);\n prev = current;\n }\n return u.d;\n }\n\n //Wait after checking node\n try {\n Thread.sleep(speed);\n } catch (InterruptedException interrupted) {\n if (isCancelled())\n break;\n }\n\n //Checking Neighbors\n neighbors = adjList.getNeighbors(u.value);\n for (Pair<Node<Integer, Integer>, Integer> neighborKeyValuePair : neighbors) {\n neighbor = neighborKeyValuePair.getKey();\n //Relaxation step\n //Checks if neighbor hasn't been checked, if so the assign the shortest path\n if (!neighbor.visited) {\n //Adds checked neighbor to queue\n neighbor.key = u.d + 1;\n neighbor.d = u.d + 1; //Assign shorter path found to neighbor\n neighbor.prev = u;\n neighbor.visited = true;\n q.add(neighbor);\n }\n }\n }\n return Integer.MAX_VALUE;\n }",
"@Override\n public Double visitHavingFunction(HavingFunctionContext ctx) {\n return null;\n }",
"public double getBestSolutionEvaluation();",
"@Override\n protected SearchResponse compute() {\n if (this.searchRoot.children == null || this.searchRoot.children.isEmpty()) {\n return new SearchResponse(searchRoot.weight, null);\n }\n\n // Search child nodes recursively\n List<UnbalancedNodeSearcher> subtasks = new ArrayList<>(searchRoot.children.size());\n for (Node n : searchRoot.children) {\n UnbalancedNodeSearcher subtask = new UnbalancedNodeSearcher(n);\n subtasks.add(subtask);\n subtask.fork();\n }\n\n // Use a map to vote for the \"wrong\"(i.e. minority) disc weight\n Map<Long, AtomicLong> totalWeight = new HashMap<>();\n\n // To find out who reported the \"wrong\" weight\n Map<Long, Node> resultNodeMap = new HashMap<>();\n for (UnbalancedNodeSearcher searcher : subtasks) {\n SearchResponse response = searcher.join();\n\n // The search is over\n if (response.foundResult != null) {\n return response;\n }\n\n resultNodeMap.put(response.subSum, searcher.searchRoot);\n\n totalWeight.computeIfAbsent(response.subSum, (i) -> new AtomicLong(0L)).incrementAndGet();\n }\n\n if (totalWeight.size() == 1) {\n // Since there's only one\n long subtotal = totalWeight.keySet().iterator().next();\n long total = subtotal * subtasks.size() + searchRoot.weight;\n\n return new SearchResponse(total, null);\n } else if (totalWeight.size() == 2) {\n long correctWeight = -1;\n long wrongWeight = -1;\n for (Map.Entry<Long, AtomicLong> entry : totalWeight.entrySet()) {\n if (entry.getValue().get() != 1L) {\n correctWeight = entry.getKey();\n } else {\n wrongWeight = entry.getKey();\n }\n }\n\n return new SearchResponse(null, resultNodeMap.get(wrongWeight).weight - (wrongWeight - correctWeight));\n } else {\n throw new RuntimeException(\"More than one incorrect nodes\");\n }\n }",
"@Override\r\n public double eval() {\r\n return (this.child == null) ? 0.0 : this.child.eval();\r\n }",
"private double heuristic(Node a, Node b){\n\n // absolute value of the differences in floors\n return Math.abs(a.getFloor() - b.getFloor());\n }",
"int solve(int p, int current) {\n int id = getId(p, current);\n if (p >= 0 && memo.containsKey(id)) {\n return memo.get(id);\n }\n List<Integer> adjList = adj.get(current);\n int n = adjList.size();\n if (n == 0) {\n throw new RuntimeException();\n }\n if ((n == 2 && p >= 0) || (n == 1 && p < 0)) {\n // should cut the nodes under current\n int ans = getDepth(p, current) - 1;\n // System.out.println(\"ans(\" + p + \",\" + current + \")=\" + ans);\n memo.put(id, ans);\n return ans;\n }\n if (n == 1) {\n // System.out.println(\"ans(\" + p + \",\" + current + \")=nochild\");\n return 0;\n }\n int ans = Integer.MAX_VALUE;\n\n for (int i = 0; i < n; i++) {\n int a = adjList.get(i);\n if (a == p) {\n continue;\n }\n for (int j = i + 1; j < n; j++) {\n int b = adjList.get(j);\n if (b == p) {\n continue;\n }\n // try a & b combo\n int tmp = solve(current, a);\n tmp += solve(current, b);\n for (int k = 0; k < n; k++) {\n int c = adjList.get(k);\n if (c != a && c != b && c != p) {\n tmp += getDepth(current, c);\n }\n }\n ans = Math.min(ans, tmp);\n }\n }\n memo.put(id, ans);\n // System.out.println(\"ans(\" + p + \",\" + current + \")=\" + ans);\n return ans;\n }",
"@Test(expected=RuntimeException.class)\n\tpublic void testGrafoNoConexoBFS() {\n\t\tGrafo g = new Grafo(9);\n\t\tg.agregarArista(0, 1, 4F);\n\t\tg.agregarArista(0, 7, 8F);\n\t\tg.agregarArista(1, 2, 8F);\n\t\tg.agregarArista(1, 7, 12F);\n\t\tg.agregarArista(6, 5, 1F);\n\t\tKruskal ks = new Kruskal(g);\n\t\tks.arbolMinimoBFS();\n\t}",
"private double calcB0() {\n double[] dataX = dsX.getDataX();\n double[] dataY = dsY.getDataY();\n double sumX = 0;\n double sumY = 0;\n for (int i = 0; i < dataX.length; i++) {\n sumX += dataX[i];\n sumY += dataY[i];\n }\n return (sumY - (this.B1 * sumX)) / dataX.length;\n }",
"float getB();",
"public java.math.BigInteger getGibbsq()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(GIBBSQ$2, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getBigIntegerValue();\r\n }\r\n }",
"private void squareRoot()\n\t{\n\t\tif(Fun == null)\n\t\t{\n\t\t\tsetLeftValue();\n\t\t\tresult = calc.squareRoot ();\n\t\t\tupdateText();\n\t\t\tsetLeftValue();\n\t\t}\n\t}",
"private String bfs(){\n String ans=\"\";\n //Base Case\n if (mRoot == null)\n return \"\";\n if (mRoot.mIsLeaf)\n return mRoot.toString();\n //create a queue for nodes and a queue for signs\n Queue<BTNode> q = new QueueAsLinkedList<>();\n Queue<Character> s = new QueueAsLinkedList<>();\n BTNode currNode = mRoot;\n q.enqueue(currNode);\n return getBfsOutput(ans, q, s, currNode);\n }",
"private void computeBeliefIfReady() throws FactorScopeException {\n\t\t\tboolean ready = true;\n\t\t\tfor(Entry<Edge, Boolean> entry : _neighborEdges.entrySet()) {\n\t\t\t\tif(DEBUG) System.out.printf(\"edge:%s\\nready?%s\\n\", entry.getKey(), entry.getValue());\n\t\t\t\tready = ready && entry.getValue();\n\t\t\t}\n\t\t\tif(ready) {\n\t\t\t\tif(DEBUG) System.out.println(\"updating belief!\");\n\t\t\t\tFactor b = new Factor(_initialBelief);\n\t\t\t\tSystem.out.println(\"initial belief before product:\\n\"+_initialBelief);\n\t\t\t\tfor(Edge e : _neighborEdges.keySet()) {\n\t\t\t\t\tFactor msg;\n\t\t\t\t\tif(DEBUG) System.out.printf(\"\\nmy id:%d neighbor id:%d\\n\", this._orderID, e.getOtherVertex(this)._orderID);\n\t\t\t\t\tif(DEBUG) System.out.println(\"edge info:\"+e.getLongInfo());\n\t\t\t\t\tif(this._orderID < e.getOtherVertex(this)._orderID) {\n\t\t\t\t\t\tif(DEBUG) System.out.println(\"getting upward msg from \"+e.getOtherVertex(this));\n\t\t\t\t\t\tmsg = e.getUpwardMessage();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif(DEBUG) System.out.println(\"getting downward msg from \"+e.getOtherVertex(this));\n\t\t\t\t\t\tmsg = e.getDownwardMessage();\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(\"multiply by msg:\\n\"+msg);\n\t\t\t\t\tb = b.product(msg);\n\t\t\t\t}\n\t\t\t\tthis.setFactorData(b);\n\t\t\t\tSystem.out.println(\"belief now updated:\\n\"+this.getLongInfo());\n\t\t\t}\n\t\t}",
"@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n public List<Edge<T>> viterbiPath() {\n final int numNodes = nodeList.size();\n double[] d_v = new double[numNodes];\n Arrays.fill(d_v, annihilator());\n d_v[ROOT_ID] = identity();\n Edge[] p_v = new Edge[numNodes]; \n \n // Forward pass\n for (int v = ROOT_ID+1; v < numNodes; ++v) {\n List<Edge<T>> edgeList = nodeList.get(v).backwardStar();\n for (Edge<T> edge : edgeList) {\n int u = edge.start().id();\n double bestCost = d_v[v];\n double transitionCost = score(d_v[u], edge.weight());\n if (compare(bestCost, transitionCost) == transitionCost) {\n // Do an update to the best cost\n d_v[v] = transitionCost;\n p_v[v] = edge;\n }\n }\n }\n \n // Backout the solution\n List<Edge<T>> bestPath = new LinkedList<Edge<T>>();\n Edge<T> bestEdge = p_v[numNodes-1];\n bestEdge = p_v[bestEdge.start().id()]; // Skip the goal node\n while(bestEdge.start().id() != ROOT_ID) {\n bestPath.add(0, bestEdge); // O(c) pre-pend\n bestEdge = p_v[bestEdge.start().id()];\n }\n\n return bestPath;\n }",
"public static double calcRoot( double coef_B, double discrimSqrt, double denom ) \r\n {\n return 0;\r\n }",
"public SASolution getNeighborSolution();",
"private BigDecimal evaluateResult() throws MathematicalError {\n if (!popOutOperationStack()) {\n throw new MathematicalError(\"Mismatched parentheses in the expression\");\n }\n for (ListIterator<String> iterator = outputQueue.listIterator(); iterator.hasNext(); ) {\n String element = iterator.next();\n if (!element.startsWith(valueBaseName)) {\n iterator.remove();\n Operation<BigDecimal, MathematicalError> operation = operationMap.get(element);\n int argumentsCount = operation.getArgumentsCount();\n BigDecimal[] arguments = new BigDecimal[argumentsCount];\n for (int i = 0; i < argumentsCount; ++i) {\n arguments[i] = valueMap.get(iterator.previous());\n iterator.remove();\n }\n String valueName = valueBaseName + valueCount++;\n BigDecimal tempResult = operation.getResult(arguments);\n if (tempResult == null) {\n return null;\n }\n valueMap.put(valueName, tempResult);\n iterator.add(valueName);\n }\n }\n return valueMap.get(outputQueue.get(0));\n }",
"private double bound(int iter, Solution next) {\n return Math.exp((-1.0 * (next.getValue() - bestSol.getValue())) / denominator(iter));\n }",
"void calc_closure(){\r\n\t\tint [] queue = new int[maxn];\r\n\t\tint head,tail,i,j,k;\r\n\t\tfor (i=0; i<state; ++i){\r\n\t\t\tfor (j=0; j<state; ++j)\r\n\t\t\t\tclosure[i][j]=false;\r\n\t\t\t\r\n\t\t\t//Breadth First Search\r\n\t\t\thead=-1;\r\n\t\t\ttail=0;\r\n\t\t\tqueue[0]=i;\r\n\t\t\tclosure[i][i]=true;\r\n\t\t\twhile (head<tail){\r\n\t\t\t\tj=queue[++head];\r\n\t\t\t\t//search along epsilon edge\r\n\t\t\t\tfor (k=0; k<state; ++k)\r\n\t\t\t\t\tif ((!closure[i][k])&&(g[j][symbol][k]))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tqueue[++tail]=k;\r\n\t\t\t\t\t\tclosure[i][k]=true;\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public boolean realSubSolution() {\n this.polySubSolve();\n return this.subreal;\n }",
"public static UniformCostSearchNode searchBnB(UniformCostSearchNode root){\n PriorityQueue<UniformCostSearchNode> frontier = new PriorityQueue<UniformCostSearchNode>();\n\n // hash set for fast verification of closed nodes\n HashSet<UniformCostSearchNode> closed = new HashSet<UniformCostSearchNode>();\n\n int upperBoundCost = Integer.MAX_VALUE;\n\n frontier.add(root);\n\n while(frontier.size() != 0){\n UniformCostSearchNode current = frontier.remove();\n if(current.isGoalState()){\n System.out.println(\"UCS B&B Nodes explored: \" + closed.size());\n return current;\n }\n\n // implicitly pruning the frontier\n if(current.getCost() >= upperBoundCost){\n // skipping due to bounding\n continue;\n }\n\n closed.add(current);\n\n PriorityQueue<UniformCostSearchNode> toAdd = new PriorityQueue<UniformCostSearchNode>();\n for(UniformCostSearchNode neighbor : current.getNeighbors()){\n toAdd.add(neighbor);\n }\n\n while(toAdd.size() != 0) {\n UniformCostSearchNode neighbor = toAdd.remove();\n if (neighbor.getCost() < upperBoundCost) {\n if (neighbor.isGoalState()) {\n // bounding\n upperBoundCost = neighbor.getCost();\n }\n frontier.add(neighbor);\n }\n }\n }\n\n System.out.println(\"UCS B&B Search failed, nodes explored: \" + closed.size());\n // search failed\n return null;\n }",
"@Override\n public Float calc() {\n\treturn null;\n }",
"@Override\n public double getResult(Map<String, Double> values) {\n List<Node> nodes = getChildNodes();\n double result = nodes.get(0).getResult(values);\n if (nodes.size() > 1) {\n for (int i = 1; i < nodes.size(); i++) {\n result = result / nodes.get(i).getResult(values);\n }\n }\n return result;\n }",
"double getBranchProbability();",
"public static double[] insideAlgorithm(final Hypergraph graph, final Hyperpotential w, final Semiring s) {\n final int n = graph.getNodes().size();\n final double[] beta = new double[n];\n // \\beta_i = 0 \\forall i\n Arrays.fill(beta, s.zero());\n graph.applyTopoSort(new HyperedgeFn() {\n\n @Override\n public void apply(Hyperedge e) {\n // \\beta_{H(e)} += w_e \\prod_{j \\in T(e)} \\beta_j\n double prod = s.one();\n for (Hypernode jNode : e.getTailNodes()) {\n prod = s.times(prod, beta[jNode.getId()]);\n }\n int i = e.getHeadNode().getId();\n //if (log.isTraceEnabled()) { log.trace(String.format(\"old beta[%d] = %f\", i, s.toReal(beta[i]))); }\n beta[i] = s.plus(beta[i], s.times(w.getScore(e, s), prod));\n //if (log.isTraceEnabled()) { log.trace(String.format(\"%s w_e=%f beta[%d] = %f\", e.getLabel(), s.toReal(w.getScore(e, s)), i, s.toReal(beta[i]))); }\n }\n \n });\n return beta;\n }",
"public int BFCalc(IAVLNode node)\r\n\t {\r\n\t\tif(node.isRealNode())\r\n\t\t\t return node.getLeft().getHeight()-node.getRight().getHeight();\r\n\t\treturn 0; //External node's balance factor\r\n\t }",
"public Double evaluateQBF() {\n\n\t\tDouble aux = (double) 0, sum = (double) 0;\n\t\tDouble vecAux[] = new Double[size];\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (variables[i] > 0.5)\n\t\t\t{\n\t\t\t\tfor (int j = 0; j < size; j++) {\n\t\t\t\t\taux += variables[j] * A[i][j];\n\t\t\t\t}\n\n\t\t\t\tvecAux[i] = aux;\n\t\t\t\tsum += aux * variables[i];\n\t\t\t\taux = (double) 0;\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < prohibited_triples.length; i++) {\n\t\t\tif (variables[prohibited_triples[i][0]] > 0.5 && variables[prohibited_triples[i][1]] > 0.5 && variables[prohibited_triples[i][2]] > 0.5)\n\t\t\t\tsum -= 1e5;\n\t\t}\n\n\t\treturn sum;\n\t}",
"public abstract double getHeuristic(State state);",
"public double getX2SubSolution() {\n this.polySubSolve();\n return this.x2sub;\n }",
"public static Resultado KSP_FF_Algorithm_MBBR(GrafoMatriz G, GrafoMatriz Gaux, Demanda demanda,ListaEnlazada [] ksp,int capacidad){\n \n /*Definicion de variables las variables*/\n int inicio=0, fin=0,cont; // posicion inicial y final dentro del espectro asi como el contador de FSs contiguos disponibles\n int demandaColocada=0; // bandera para controlar si ya se encontro espectro disponible para la demanda.\n int [] OE= new int[capacidad]; //Ocupacion de Espectro.\n //Inicializadomos el espectro, inicialmente todos los FSs estan libres\n \n /*Probamos para cada camino, si exite espectro para ubicar la damanda*/\n int k=0;\n while(k<ksp.length && ksp[k]!=null && demandaColocada==0){\n for(int i=0;i<capacidad;i++){\n OE[i]=1;\n }\n /*Calcular la ocupacion del espectro para cada camino k*/\n for(int i=0;i<capacidad;i++){\n for(Nodo n=ksp[k].getInicio();n.getSiguiente().getSiguiente()!=null;n=n.getSiguiente()){\n if(G.acceder(n.getDato(),n.getSiguiente().getDato()).getFS()[i].getEstado()==0 ||\n Gaux.acceder(n.getDato(),n.getSiguiente().getDato()).getFS()[i].getEstado()==0 ){\n OE[i]=0;\n break;\n }\n }\n }\n /*Teniendo la ocupacion del espectro del camino k, buscamos un bloque continuo de FS\n * que satisfazca la demanda.\n */\n inicio=fin=cont=0;\n for(int i=0;i<capacidad;i++){\n if(OE[i]==1){\n inicio=i;\n for(int j=inicio;j<capacidad;j++){\n if(OE[j]==1){\n cont++;\n }\n else{\n cont=0;\n break;\n }\n //si se encontro un bloque valido, salimos de todos los bloques\n if(cont==demanda.getNroFS()){\n fin=j;\n demandaColocada=1;\n break;\n }\n }\n }\n if(demandaColocada==1){\n break;\n }\n }\n k++;\n }\n \n if(demandaColocada==0){\n return null; // Si no se encontro, en ningun camino un bloque contiguo de FSs, retorna null.\n }\n /*Bloque contiguoo encontrado, asignamos los indices del espectro a utilizar \n * y retornamos el resultado\n */\n Resultado r= new Resultado();\n r.setCamino(k-1);\n r.setFin(fin);\n r.setInicio(inicio);\n return r;\n }",
"public abstract GF2nElement solveQuadraticEquation()\n throws RuntimeException;",
"private List<Node> compute() {\n\t\t\tgetGraphFromResolvedTree(root);\n\t\t\tdepthFirst(root);\n\t\t\treturn result;\n\t\t}",
"public double getHalfCurrWaterPotential() {\r\n\t\t\treturn -Math.sqrt (treeMaxTranspirationPotential * treeMinTranspirationPotential);\r\n\t}",
"private GraphPath<V, E> P(\n Graph<V, E> g, GraphPath<V, E> S, GraphPath<V, E> T, V m, V b1, V b2, V b3, V s1, V s2,\n V s3)\n {\n if (s1 == b1) {\n if (b1 == m) {\n List<E> edgeList = new LinkedList<>();\n return new GraphWalk<>(g, s1, b1, edgeList, 0);\n } else\n return null;\n } else {\n if (b1 == m)\n return null;\n if (g.containsEdge(m, b2) || g.containsEdge(m, b3) || g.containsEdge(m, s2)\n || g.containsEdge(m, s3) || S == null || T == null)\n return null;\n if (S.getVertexList().stream().anyMatch(\n t -> g.containsEdge(t, b2) || g.containsEdge(t, b3) || g.containsEdge(t, s2)\n || g.containsEdge(t, s3))\n || T.getVertexList().stream().anyMatch(\n t -> t != b1 && (g.containsEdge(t, b2) || g.containsEdge(t, b3)\n || g.containsEdge(t, s2) || g.containsEdge(t, s3))))\n return null;\n List<V> intersection = intersectGraphPaths(S, T);\n if (intersection.size() != 1 || !intersection.contains(m))\n return null;\n if (S.getVertexList().stream().anyMatch(\n s -> s != m\n && T.getVertexList().stream().anyMatch(t -> t != m && g.containsEdge(s, t))))\n return null;\n List<E> edgeList = new LinkedList<>();\n edgeList.addAll(T.getEdgeList());\n edgeList.addAll(S.getEdgeList());\n double weight = edgeList.stream().mapToDouble(g::getEdgeWeight).sum();\n return new GraphWalk<>(g, b1, s1, edgeList, weight);\n\n }\n }",
"public double getProbability(Object rootState) { return getProbability(rootState, (Object[])null); }",
"static int[] bfs(int n, int m, int[][] edges, int s) {\r\n \r\n HashSet<Integer> aList[] = new HashSet[n];\r\n // Array of the nodes of the tree\r\n\r\n Queue<Integer> bfsQueue = new LinkedList();\r\n\r\n boolean visited[] = new boolean[n];\r\n // check if a node is visited or not\r\n\r\n\r\n int cost[] = new int[n];\r\n // cost to travel from one node to other\r\n\r\n for (int i = 0; i < n; i++) {\r\n // intialising the values\r\n visited[i] = false;\r\n cost[i] = -1;\r\n\r\n aList[i] = new HashSet<Integer>();\r\n // Each element of aList is a Set\r\n // To store the neighbouring nodes of a particular node\r\n }\r\n\r\n for (int i = 0; i < m; i++) {\r\n // let node[i] <--> node[j]\r\n\r\n // adding node[j] to neighbours list of node[i]\r\n aList[edges[i][0] - 1].add(edges[i][1] - 1);\r\n\r\n // adding node[i] to neighbours list of node[j]\r\n aList[edges[i][1] - 1].add(edges[i][0] - 1);\r\n }\r\n\r\n //\r\n s = s - 1;\r\n bfsQueue.add(s);\r\n visited[s] = true;\r\n cost[s] = 0;\r\n //\r\n \r\n \r\n while (!bfsQueue.isEmpty()) {\r\n \r\n int curr = bfsQueue.poll();\r\n // takes the last element of the queue\r\n \r\n for (int neigh : aList[curr]) { // iterating the neighbours of node 'curr'\r\n if (!visited[neigh]) { // checking if node neigh id already visited during the search\r\n visited[neigh ] = true;\r\n bfsQueue.add(neigh); //add the node neigh to bfsqueue\r\n cost[neigh] = cost[curr] + 6; \r\n }\r\n }\r\n }\r\n\r\n int result[] = new int[n-1];\r\n\r\n for (int i=0, j=0; i<n && j<n-1; i++, j++) {\r\n if (i == s){\r\n i++;\r\n }\r\n result[j] = cost[i];\r\n }\r\n \r\n return result;\r\n }",
"private static String findHighParent_B(BabelSynset bs) throws IOException {\n\t\tdouble weight = 0.0;\n\t\tString id = null;\n\t\tArrayList<String> B_parentsDouble = new ArrayList<String>();\n\t\tList<BabelSynsetIDRelation> edges = bs.getEdges(BabelPointer.ANY_HYPERNYM);\n\t\t\n\t\tfor(BabelSynsetIDRelation b : edges) {\n\t\t\tweight += b.getWeight();\n\t\t}\n\t\tif(weight == 0.0) return edges.get(0).getTarget();\n\t\t\n\t\tweight = 0.0;\n\t\tfor(BabelSynsetIDRelation b : edges) {\n\t\t\tString b_id = b.getTarget();\n\t\t\tif(!B_parentsDouble.contains(b_id) || (B_parentsDouble.contains(b_id) && b.getWeight() != 0.0)) {\n\t\t\t\tdouble temp_weight = b.getWeight();\n\t\t\t\tif(temp_weight > weight && !B_Ancestors.contains(b_id)) {\n\t\t\t\t\tweight = temp_weight;\n\t\t\t\t\tid = b_id;\n\t\t\t\t}\n\t\t\t\tB_parentsDouble.add(b_id);\n\t\t\t}\n\t\t}\n\t\tif(id == null) id = \"bn:00031027n\";\n\t\treturn id;\n\t}",
"private void resolverBFS() {\n\t\tQueue<Integer> cola = new LinkedList<Integer>();\n\t\tint[] vecDistancia = new int[nodos.size()];\n\t\tfor (int i = 0; i < vecDistancia.length; i++) {\n\t\t\tvecDistancia[i] = -1;\n\t\t\trecorrido[i] = 0;\n\t\t}\n\t\tint nodoActual = 0;\n\t\tcola.add(nodoActual);\n\t\tvecDistancia[nodoActual] = 0;\n\t\trecorrido[nodoActual] = -1;\n\t\twhile (!cola.isEmpty()) {\n\t\t\tif (tieneAdyacencia(nodoActual, vecDistancia)) {\n\t\t\t\tfor (int i = 1; i < matrizAdyacencia.length; i++) {\n\t\t\t\t\tif (matrizAdyacencia[nodoActual][i] != 99 && vecDistancia[i] == -1) {\n\t\t\t\t\t\tcola.add(i);\n\t\t\t\t\t\tvecDistancia[i] = vecDistancia[nodoActual] + 1;\n\t\t\t\t\t\trecorrido[i] = nodoActual;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcola.poll();\n\t\t\t\tif (!cola.isEmpty()) {\n\t\t\t\t\tnodoActual = cola.peek();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private int optimize() {\n\t\t// items: Items sorted by value-to-weight ratio for linear relaxation\n\t\t// t: the decision vector being tested at each node\n\t\t// ws, vs, is, bs: stacks of weight, value, item id, whether bring item\n\t\t// p: stack pointer; i, b, weight, value: loop caches; best: max search\n\t\t// ss: stack size: Always <=2 children on stack for <=n-1 parents\n\t\tItem[] items = new Item[n];\n\t\tint ss = 2 * n;\n\t\tint[] itemsSorted = new int[n], t = new int[n], ws = new int[ss],\n\t\t\tvs = new int[ss], is = new int[ss], bs = new int[ss];\n\t\tint i, b, weight, value, best = 0, p = 0;\n\n\t\tfor (int j = 0; j < n; j++)\n\t\t\titems[j] = new Item(j);\n\t\tArrays.sort(items);\n\t\tfor (int j = 0; j < n; j++)\n\t\t\titemsSorted[j] = items[j].i();\n\t\titems = null; // For garbage collection.\n\n\t\t// Push item 0 onto the stack with and without bringing it.\n\t\tws[p] = 0; vs[p] = 0; is[p] = 0; bs[p] = 1; p++;\n\t\tws[p] = 0; vs[p] = 0; is[p] = 0; bs[p] = 0; p++;\n\n\t\twhile (p > 0) {\n\t\t\tp--; // Pop the latest item off the stack\n\t\t\ti = is[p]; b = bs[p];\n\t\t\tweight = ws[p] + w[i] * b;\n\t\t\tif (weight > k)\n\t\t\t\tcontinue;\n\t\t\tvalue = vs[p] + v[i] * b;\n\t\t\tif (bound(i, weight, value, itemsSorted) < best)\n\t\t\t\tcontinue;\n\t\t\tbest = Math.max(value, best);\n\t\t\tt[i] = b;\n\t\t\tif (i < n - 1) { // Push children onto stack w/ & w/o bringing item\n\t\t\t\tws[p] = weight; vs[p] = value; is[p] = i + 1; bs[p] = 1; p++;\n\t\t\t\tws[p] = weight; vs[p] = value; is[p] = i + 1; bs[p] = 0; p++;\n\t\t\t}\n\t\t\telse if (value >= best)\n\t\t\t\tSystem.arraycopy(t, 0, x, 0, n);\n\t\t}\n\t\treturn best;\n\t}",
"public ArrayList<Double> branch(BGStem parent) {\n\t\t\n\t\t// Store the node coordinates\n\t\tArrayList <Double> node = new ArrayList<Double>();\n\t\t\n\t\t// Calculate\n\t\tnode.add(parent.getLength() * Math.cos(parent.getDirection()) + parent.getX());\n\t\tnode.add(parent.getLength() * Math.sin(parent.getDirection()) + parent.getY());\n\t\t\n\t\treturn node;\n\t}",
"default int calcHeight() throws NotATreeException {\n\n int[] roots = getSources();\n\n if (roots.length == 0) {\n throw new NotATreeException();\n }\n\n class WrappedCalcLongestPath {\n private int calcLongestPath(int node, TIntList path) throws CycleDetectedException {\n\n if (!containsNode(node)) {\n throw new IllegalArgumentException(\"node \"+ node + \" was not found\");\n }\n\n if (isSink(node)) {\n return path.size()-1;\n }\n\n TIntList lengths = new TIntArrayList();\n for (int edge : getOutEdges(node)) {\n\n int nextNode = getHeadNode(edge);\n\n TIntList newPath = new TIntArrayList(path);\n newPath.add(nextNode);\n\n if (path.contains(nextNode)) {\n throw new CycleDetectedException(newPath);\n }\n\n lengths.add(calcLongestPath(nextNode, newPath));\n }\n\n return lengths.max();\n }\n }\n\n // it is ok if there are multiple roots (see example of enzyme-classification-cv where it misses the root that\n // connect children EC 1.-.-.-, EC 2.-.-.-, ..., EC 6.-.-.-)\n /*if (roots.length > 1) {\n throw new NotATreeMultipleRootsException(roots);\n }*/\n\n return new WrappedCalcLongestPath().calcLongestPath(roots[0], new TIntArrayList(new int[] {roots[0]}));\n }",
"public org.apache.xmlbeans.XmlInteger xgetGibbsq()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlInteger target = null;\r\n target = (org.apache.xmlbeans.XmlInteger)get_store().find_element_user(GIBBSQ$2, 0);\r\n return target;\r\n }\r\n }",
"private double dfs(String start, String end, HashMap<String, ArrayList<String>> pairs, HashMap<String, ArrayList<Double>> values, HashSet<String> set, double value)\n {\n if (set.contains(start)) \n return 0.0;\n \n // If start is not there, return 0\n if (!pairs.containsKey(start)) \n return 0.0;\n \n // Completed the query so return the result\n if (start.equals(end)) \n return value;\n \n set.add(start);\n \n ArrayList<String> strList = pairs.get(start);\n ArrayList<Double> valueList = values.get(start);\n double tmp = 0.0;\n \n for (int i = 0; i < strList.size(); i++) \n {\n tmp = dfs(strList.get(i), end, pairs, values, set, value*valueList.get(i));\n if (tmp != 0.0) \n break;\n }\n \n // Suppose we have a path a->b->c, and we have another path a->b->d. If c and d is completely the same, when we found the path a->b->c, \n // we need to undo the visited node so that we can find the other path a->b->d. Usually in DFS we only visited a node once but here we need to revisit a node in different paths.\n set.remove(start);\n return tmp;\n }",
"public abstract void bepaalGrootte();",
"public Integer retrieveBF(Vertex vert, Stack<Integer> st)\r\n\t{\r\n\t\tfor(int k = 0; k < vertices.size(); k++)\r\n\t\t{\r\n\t\t\t/*for(int j = 0; j < vertices.get(k).getEdges().size(); j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (!vert.get.isTraversed())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}*/\r\n\t\t\t//else if(this.getEdge(i, k) != null && vertices.get(i).getEdge(k).isTraversed() == false);\r\n\t\t\t//{\r\n\t\t\t/*else */\r\n\t\t\tif(vert.getEdge(k) != null && vert.getEdge(k).isTraversed() == false)\r\n\t\t\t{\t\t\t\t\r\n\t\t\t\tvert.getEdge(k).setTraversed();\r\n\t\t\t\tst.push(retrieveBF(vert.getEdge(k).getVertex(vert.getID()),st));\r\n\t\t\t\t//return st.push(retrieveBF(vert.getEdge(k).getVertex(vert.getID()),st));\r\n\t\t\t}\r\n\t\t\t\treturn st.push(retrieveBF(vert,st));\r\n\t\t}\r\n\t\treturn st.pop();\r\n\t}",
"public float getMedian() {\r\n // if empty tree\r\n if (rbt.root == null) {\r\n return 0;\r\n }\r\n int count = rbt.size();\r\n int currCount = 0;\r\n // current node, inorder direct predecessor (87 -> 88), and previous node\r\n RedBlackTree.Node<Grade> curr = rbt.root, pre = null, prev = null;\r\n\r\n while (curr != null) {\r\n if (curr.leftChild == null) {\r\n currCount++;\r\n // if current node is the median\r\n // middle node\r\n if ((count % 2) != 0 && currCount == (count + 1) / 2) {\r\n return prev.data.getGrade();\r\n }\r\n // split middle node\r\n else if ((count % 2) == 0 && currCount == (count / 2) + 1) {\r\n return (prev.data.getGrade() + curr.data.getGrade()) / 2;\r\n }\r\n prev = curr;\r\n curr = curr.rightChild;\r\n } else {\r\n // get inorder predecessor\r\n pre = curr.leftChild;\r\n while (pre.rightChild != null && pre.rightChild != curr) {\r\n pre = pre.rightChild;\r\n }\r\n if (pre.rightChild == null) {\r\n pre.rightChild = curr;\r\n curr = curr.leftChild;\r\n } else {\r\n pre.rightChild = null;\r\n prev = pre;\r\n currCount++;\r\n // if node is middle of set\r\n if ((count % 2) != 0 && currCount == (count + 1) / 2) {\r\n return curr.data.getGrade();\r\n } else if ((count % 2) == 0 && currCount == (count / 2) + 1) {\r\n return (prev.data.getGrade() + curr.data.getGrade()) / 2;\r\n }\r\n prev = curr;\r\n curr = curr.rightChild;\r\n }\r\n }\r\n }\r\n return -1;\r\n }",
"int BFS(int source,int sink) \n {\n\tint first=0, last=0; \n int[] queue=new int[V]; \n int[] mark = new int[V]; \n \n for (int i = 0; i < V; i++) {\n mark[i] = 0; // Mark all vertices as not visited \n minFlow[i] = 10000000;\n }\n\n queue[last++] = source; //enqueue source vertex\n mark[source] = 1; //mark source vertex as visited\n //BFS Loop\n while (first != last) { // While queue is not empty.\n int v = queue[first++];\n for (int u = 0; u < V; u++){\n if (mark[u] == 0 && resCap[v][u] > 0) {\n minFlow[u] = Math.min(minFlow[v],resCap[v][u]);\n parent[u] = v;\n mark[u] = 1;\n if (u == sink) //If we reach sink starting from source, then return 1\n return 1;\n queue[last++] = u;\n }\n }\n }\n return 0; //else return 0\n }",
"public static int bfs() {\r\n check = new int[N][N]; // check 변수 초기화\r\n q = new LinkedList<Point>();\t\t\t\t\t//bfs 할때 필요한 그 stack. first in first out\r\n q.offer(new Point(shark.x, shark.y));\t\t\t//q.offer == 해당 큐의 맨 뒤에 전달된 요소를 삽입함. list에서 list.add와 같은 말임.\r\n check[shark.x][shark.y] = 1;\r\n\r\n int FishCheck = 0;\t\t\t\t\t\t\t\t//the number of the fish in the sea map\r\n Shark fish = new Shark(N, N);\t\t\t\t\t//new shark initiation\r\n loop: while (!q.isEmpty()) {\r\n int r = q.peek().x;\t\t\t\t\t\t\t//q.peek == 해당 큐의 맨 앞에 있는(제일 먼저 저장된) 요소를 반환함\r\n int c = q.poll().y;\t\t\t\t\t\t\t//q.poll == 해당 큐의 맨 앞에 있는(제일 먼저 저장된) 요소를 반환하고, 해당 요소를 큐에서 제거함. 만약 큐가 비어있으면 null을 반환함.\r\n\r\n for (int d = 0; d < dr.length; d++) {\r\n int nr = r + dr[d];\t\t\t\t\t\t//북(0),남(1),동(2),서(3) 순으로. nr == new row\r\n int nc = c + dc[d];\t\t\t\t\t\t//북(0),남(1),동(2),서(3) 순으로. nc == new column\r\n\r\n // 지나갈 수 있는 곳: 자신보다 큰 물고기가 없는 곳\r\n if (isIn(nr, nc) && check[nr][nc] == 0 && sea[nr][nc] <= shark.lv) {\r\n check[nr][nc] = check[r][c] + 1;\r\n q.offer(new Point(nr, nc));\r\n\r\n // 위치가 더 커질 경우, 더이상 확인할 필요 X\r\n if (FishCheck != 0 && FishCheck < check[nr][nc]) {\r\n break loop;\r\n }\r\n \r\n // 처음 먹을 수 있는 자기보다 물고기가 발견 되었을 때\r\n if (0 < sea[nr][nc] && sea[nr][nc] < shark.lv && FishCheck == 0) {\r\n FishCheck = check[nr][nc];\r\n fish.x = nr;\r\n fish.y = nc;\r\n fish.lv = sea[nr][nc];\r\n }\r\n // 같은 위치에 여러 마리 있을 경우, 가장 위의 가장 왼쪽 물고기부터 먹음\r\n else if (FishCheck == check[nr][nc] && 0 < sea[nr][nc] && sea[nr][nc] < shark.lv) {\r\n if (nr < fish.x) { // 가장 위에 있는 거 우선권\r\n fish.x = nr;\r\n fish.y = nc;\r\n fish.lv = sea[nr][nc];\r\n } else if (nr == fish.x && nc < fish.y) { // 다 가장 위일 경우, 가장 왼쪽 우선권\r\n fish.x = nr;\r\n fish.y = nc;\r\n fish.lv = sea[nr][nc];\r\n }\r\n\r\n }\r\n\r\n }else if(isIn(nr, nc) && check[nr][nc] == 0) {\r\n check[nr][nc] = -1;\r\n }\r\n }\r\n }\r\n // idx 초과 안날 경우\r\n if (fish.x != N && fish.y != N) {\r\n eatFish(fish);\r\n }\r\n \r\n return (FishCheck - 1);\r\n }",
"public abstract double getConstraintFitness();",
"public abstract OptimisationSolution getBestSolution();",
"float getGte();",
"private double calcErrForNeighbour(GNode node) {\n return 0.0;\n }",
"@Override\n\tpublic void run() {\n\t\tMap<Integer, Integer> roots = new TreeMap<Integer, Integer>();\n\t\t\n\t\tEdge[] edges = new Edge[this.edges.length];\n\t\tint n, weight, relevantEdges, root, lowerBound = 0;\n\t\n\t\t// Sort edges by weight.\n\t\tquickSort(0, this.edges.length - 1);\n\t\n\t\t// Compute initial lower bound (best k - 1 edges).\n\t\t// Choosing the cheapest k - 1 edges is not very intelligent. There is no guarantee\n\t\t// that this subset of edges even induces a subgraph over the initial graph.\n\t\t// TODO: Find a better initial lower bound.\n\t\tfor (int i = 0; i < solution.length; i++) {\n\t\t\tlowerBound += this.edges[i].weight;\n\t\t}\n\t\n\t\t// Iterate over all nodes in the graph and run Prim's algorithm\n\t\t// until k - 1 edges are fixed.\n\t\t// As all induced subgraphs have k nodes and are connected according to Prim, they\n\t\t// are candidate solutions and thus submitted.\n\t\tfor (root = 0; root < taken.length; root++) {\n\t\t\ttaken = new boolean[taken.length];\n\t\t\tSystem.arraycopy(this.edges, 0, edges, 0, this.edges.length);\n\n\t\t\ttaken[root] = true;\n\t\t\tn = 0;\n\t\t\tweight = 0;\n\t\t\trelevantEdges = this.edges.length;\n\n\t\t\twhile (n < solution.length) { \n\t\t\t\tfor (int i = 0; i < relevantEdges; i++) {\n\t\t\t\t\t// XOR to check if connected and no circle.\n\t\t\t\t\tif (taken[edges[i].node1] ^ taken[edges[i].node2]) {\n\t\t\t\t\t\ttaken[taken[edges[i].node1] ? edges[i].node2 : edges[i].node1] = true;\n\t\t\t\t\t\tsolution[n++] = edges[i];\n\t\t\t\t\t\tweight += edges[i].weight;\n\t\t\t\t\t\tSystem.arraycopy(edges, i + 1, edges, i, --relevantEdges - i);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t// Check for circle.\n\t\t\t\t\telse if (taken[edges[i].node1]) {\n\t\t\t\t\t\tSystem.arraycopy(edges, i + 1, edges, i, --relevantEdges - i);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Sum up what we've just collected and submit this\n\t\t\t// solution to the framework.\n\t\t\tHashSet<Edge> set = new HashSet<Edge>(solution.length);\n\t\t\tfor (int i = 0; i < solution.length; i++) {\n\t\t\t\tset.add(solution[i]);\n\t\t\t}\n\t\t\tsetSolution(weight, set);\n\t\t\troots.put(weight, root);\n\t\t}\n\n\t\t// Now for the real business, let's do some Branch-and-Bound. Roots of \"k Prim Spanning Trees\"\n\t\t// are enumerated by weight to increase our chances to obtain the kMST earlier.\n\t\tfor (int item : roots.values()) {\n\t\t\ttaken = new boolean[taken.length];\n\t\t\tSystem.arraycopy(this.edges, 0, edges, 0, this.edges.length);\n\t\t\ttaken[item] = true;\n\t\t\tbranchAndBound(edges, solution.length, 0, lowerBound);\n\t\t}\n\t}",
"private double DFS(HashMap<String, HashMap<String, Double>> graph, String src, String target, double product, Set<String> visited) {\n visited.add(src);\n double ans = -1.0;\n \n Map<String, Double> neighbors = graph.get(src);\n if(neighbors.containsKey(target)) {\n ans = product * neighbors.get(target);\n } else {\n for(Map.Entry<String, Double> pair : neighbors.entrySet()) {\n String nextNode = pair.getKey();\n if(visited.contains(nextNode)) \n continue;\n ans = DFS(graph, nextNode, target, product*pair.getValue(), visited);\n \n if(ans != -1.0) \n break;\n }\n }\n \n // Unmark the visited node for next set of backtracking\n visited.remove(src);\n return ans; \n }",
"public double calculateValue() {\n if (!isLeaf && Double.isNaN(value)) {\n for (List<LatticeNode> list : children) {\n double tempVal = 0;\n for (LatticeNode node : list) {\n tempVal += ((CALatticeNode) node).calculateValue();\n }\n if (!list.isEmpty())\n value = tempVal;\n }\n }\n weight = Math.abs(value);\n return value;\n }",
"private double procesarCoeficientesFuncionesParentesis() throws Exception {\r\n Token token;\r\n try {\r\n double resultado = 0;\r\n token = colaDeTokens.poll();\r\n switch (token.tipoToken) {\r\n case PARENTESIS_IZQUIERDO:\r\n \r\n resultado = procesarOperadoresSecundarios();\r\n tokenValido(TipoToken.PARENTESIS_DERECHO);\r\n return resultado;\r\n case NUMERO:\r\n \r\n return Double.parseDouble(token.valor);\r\n case VARIABLE_INDEPENDIENTE:\r\n \r\n return valorVariableIndependiente;\r\n case FUNCION_MATEMATICA:\r\n \r\n tokenValido(TipoToken.PARENTESIS_IZQUIERDO);\r\n double argumento = procesarOperadoresSecundarios();\r\n tokenValido(TipoToken.PARENTESIS_DERECHO);\r\n Method m = java.lang.Math.class.\r\n getMethod(token.valor, Double.TYPE);\r\n return (Double) m.invoke(null, argumento);\r\n }\r\n return resultado;\r\n } catch (IllegalAccessException | IllegalArgumentException | NoSuchMethodException | SecurityException | InvocationTargetException ex) {\r\n System.out.println(\"Error: \" + ex.getMessage());\r\n throw new Exception(ex);\r\n }\r\n //return 0;\r\n }",
"double getSolutionCost();",
"public double getExcursionCosts()\n\t{\n\t\treturn this.excursionSubTotal;\n\t}",
"public void greedyBFS(String input)\r\n\t{\r\n\t\tNode root_gbfs = new Node (input);\r\n\t\tNode current = new Node(root_gbfs.getState());\r\n\t\t\r\n\t\tNodeComparator gbfs_comparator = new NodeComparator();\r\n\t\tPriorityQueue<Node> queue_gbfs = new PriorityQueue<Node>(12, gbfs_comparator);\r\n\t\tArrayList<String> visited = new ArrayList<String>();\r\n\t\tArrayList<String> children = new ArrayList<String>();\r\n\t\t\r\n\t\tint nodes_popped = 0;\r\n\t\tint pqueue_max_size = 0;\r\n\t\tint pq_size = 0;\r\n\t\t\r\n\t\tcurrent.cost = 0;\r\n\t\tcurrent.total_cost = 0;\r\n\t\t\r\n\t\twhile(!goal_gbfs)\r\n\t\t{\r\n\t\t\tvisited.add(current.getState());\r\n\t\t\tchildren = Successor.findChildren(current.getState());\r\n\t\t\t\r\n\t\t\tfor (String a : children)\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tif (visited.contains(a))\r\n\t\t\t\t{\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\tNode nino = new Node(a);\r\n\t\t\t\t\tcurrent.children_nodes.add(nino);\r\n\t\t\t\t\tvisited.add(nino.getState());\r\n\t\t\t\t\t\r\n\t\t\t\t\tint cost = isCost(current.getState(), nino.getState());\r\n\t\t\t\t\tnino.cost = cost;\r\n\t\t\t\t\tnino.parent = current;\r\n\t\t\t\t\tint greedy_cost = greedybfsCost(nino.getState(), root_gbfs.getState());\r\n\t\t\t\t\tnino.setTotalCost(greedy_cost);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!queue_gbfs.contains(nino))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tqueue_gbfs.add(nino);\r\n\t\t\t\t\t\tpq_size++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Repeated State checking. Removing the same node from PQ if the path cost is less then the current one \r\n\t\t\t\t\telse if (queue_gbfs.contains(nino))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfor (Node original : queue_gbfs)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (original.equals(nino))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tNode copy = original;\r\n\t\t\t\t\t\t\t\tif (nino.getTotalCost() < copy.getTotalCost())\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tqueue_gbfs.remove(copy);\r\n\t\t\t\t\t\t\t\t\tqueue_gbfs.add(nino);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcurrent = queue_gbfs.poll();\r\n\t\t\tnodes_popped++;\r\n\t\t\t\r\n\t\t\tif (pq_size > pqueue_max_size)\r\n\t\t\t{\r\n\t\t\t\tpqueue_max_size = pq_size;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tpq_size--;\r\n\t\t\tgoal_gbfs = isGoal(current.getState());\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tgoal_gbfs = false;\r\n\t\tSystem.out.println(\"GBFS Solved!!\");\r\n\t\tSolution.performSolution(current, root_gbfs, nodes_popped, pqueue_max_size);\r\n\t}",
"public int solve(ArrayList<Integer> A) {\n int n = A.size();\n \t\n \tvis = new boolean[n];\n\t\tG = new ArrayList[n];\n\t\t\n\t\t// making the graph\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tG[i] = new ArrayList<Integer>();\n\t\t}\n\t\t\n\t\t// adding edges to graph\n \tfor(int i=0; i<n; i++){\n \t int par = A.get(i);\n \t\tif(par != -1){\n \t\t\tG[i].add(par);\n \t\t\tG[par].add(i);\n \t\t}\n \t}\n \t\n \t//filling vis array to 0\n \tArrays.fill(vis, false);\n \t\n \t//running first dfs to find the farthest node from root.\n \t//It will be stored in variable root.\n \tans=0;\n \tdfs(0 , 0);\n \t\n \t//running second dfs to find the farthest node from TreeNode node (as found in last dfs).\n \t//This distance will be stored in variable ans.\n \tArrays.fill(vis, false);\n \tans = 0;\n \tdfs(node , 0);\n \t\n \t//ans is the required result\n \treturn ans;\n }",
"abstract public LinkedList<Vertex> betaReduction();",
"public java.lang.Boolean getBFS() {\n return BFS;\n }",
"BigDecimal getFare();",
"void fcalcHelper(LinkedList<Edge> l[], LinkedList<Integer> path[], int sn, int cn, int n, FibonacciHeap fh, Nodefh a[],double currentCost[]){\n\t\ttry{\n\t\t\tif(fh.isEmpty()==true){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tIterator<Edge> it = l[cn].iterator();\n\t\t\twhile(it.hasNext())\n\t\t\t{\n\t\t\t\tint tempcost=0;\n\t\t\t\tEdge e= (Edge)it.next();\n\t\t\t\tif(a[cn].dist == Double.POSITIVE_INFINITY)\n\t\t\t\t\ttempcost = e.cost;\n\t\t\t\telse\n\t\t\t\t\ttempcost= (int)(e.cost+a[cn].dist);\n\t\t\t\tif(tempcost < a[e.adjIndex].dist){\n\t\t\t\t\tfh.decreasekey(a[e.adjIndex], tempcost);\n\t\t\t\t\tcurrentCost[e.adjIndex] = tempcost;\n\t\t\t\t\tpath[e.adjIndex].clear();\n\t\t\t\t\tfor(int i=0; i < path[cn].size(); i++){\n\t\t\t\t\t\tpath[e.adjIndex].add(path[cn].get(i));\n\t\t\t\t\t}\n\t\t\t\t\tpath[e.adjIndex].add(e.adjIndex);\n\t\t\t\t}\n\t\t\t}\n\t\t\tNodefh temp = fh.removeMin();\n\t\t\tint prevcn = cn;\n\t\t\tcn = temp.index;\n\t\t\tif(cn != -1){\n\t\t\t\tfcalcHelper(l,path, sn,cn,n,fh,a,currentCost);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcn = prevcn;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{System.out.println(e);}\n\t}",
"public int getResult() {\n return Math.abs(greenLeafSum - nonLeafEvenDepthSum);\n }",
"float getEvaluationResult();",
"public static void bfs (String input)\r\n\t{\r\n\t\tNode root_bfs = new Node (input);\r\n\t\tNode current = new Node(root_bfs.getState());\r\n\t\t\r\n\t\tArrayList<String> visited = new ArrayList<String>();\r\n\t\tArrayList<String> children = new ArrayList<String>();\r\n\t\tQueue<Node> queue_bfs = new LinkedList<Node>();\r\n\t\t\r\n\t\tint nodes_popped = 0;\r\n\t\tint queue_max_size = 0;\r\n\t\tint queue_size = 0;\r\n\t\tcurrent.cost = 0;\r\n\t\t\r\n\t\t// Initial check for goal state\r\n\t\tgoal_bfs = isGoal(current.getState());\r\n\t\t\r\n\t\twhile(!goal_bfs)\r\n\t\t{\r\n\t\t\t// Add the current node to the visited array\r\n\t\t\tvisited.add(current.getState());\r\n\t\t\t// Get the nodes children from the successor function\r\n\t\t\tchildren = Successor.findChildren(current.getState());\r\n\t\t\t\r\n\t\t\tfor (String a : children)\r\n\t\t\t{\r\n\t\t\t\t// State checking, don't add already visited nodes to the queue\r\n\t\t\t\tif (visited.contains(a))\r\n\t\t\t\t{\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\t// Create child node from the children array and add it to the current node\r\n\t\t\t\t\tNode nino = new Node(a);\r\n\t\t\t\t\tcurrent.children_nodes.add(nino);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Obtaining the path cost\r\n\t\t\t\t\tint cost = isCost(current.getState(), nino.getState());\r\n\t\t\t\t\tnino.cost = cost;\r\n\t\t\t\t\tnino.parent = current;\r\n\t\t\t\t\t\r\n\t\t\t\t\t// State check and adding the child to the queue. Increasing size counter\r\n\t\t\t\t\tif (!queue_bfs.contains(nino))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tqueue_bfs.add(nino);\r\n\t\t\t\t\t\tqueue_size++;\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}\r\n\t\t\t\r\n\t\t\t// Pop a node off the queue\r\n\t\t\tcurrent = queue_bfs.poll();\r\n\t\t\tnodes_popped++;\r\n\t\t\t\r\n\t\t\t// Added this because my queue size variable was always one off based on where my goal check is\r\n\t\t\tif (queue_size > queue_max_size)\r\n\t\t\t{\r\n\t\t\t\tqueue_max_size = queue_size;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Decrease queue size because a node has been popped and check for goal state\r\n\t\t\tqueue_size--;\r\n\t\t\tgoal_bfs = isGoal(current.getState());\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// Now that a solution has been found, set the boolean back to false for another run\r\n\t\tgoal_bfs = false;\r\n\t\tSystem.out.println(\"BFS Solved!!\");\r\n\t\t\r\n\t\t// Send metrics to be printed to the console\r\n\t\tSolution.performSolution(current, root_bfs, nodes_popped, queue_max_size);\r\n\t\t\t\r\n\t}",
"public int fitness() {\n\t\t//System.out.println(\"/!\\\\ WARNING: Full fitness() called!\");\n\t\tint fitness = 0;\n\t\tint fitnessCases = (int) Math.pow(2, circuit.order);\n\t\tfor (int i=0; i<fitnessCases; i++) {\n\t\t\tValuation v = new Valuation(i, circuit.order);\n\t\t\tboolean actualOutput = tree.evaluate(v);\n\t\t\tboolean correctOutput = v.correctOutput();\n\t\t\t\n\t\t\tif (actualOutput == correctOutput) fitness++;\n\t\t}\n\t\t\n\t\tthis.fitness = fitness;\n\t\tthis.fitnessCases = null;\n\t\t\n\t\treturn fitness;\n\t}",
"@Override\n\tpublic List<Double> getCurrentBest() {\n\t\treturn null;\n\t}",
"List<BigDecimal> computeSol();",
"@NotNull\n BigDecimal calculate(@NotNull BigDecimal first, @NotNull BigDecimal second);",
"private static int breadthFirstSearch(Vertex start) throws Queue.UnderflowException, Queue.EmptyException {\n boolean visited[] = new boolean[48];\n //Keep a queue of vertecies and a queue of the depth of the verticies - they will be added to and poped from identically\n ListQueue<Vertex> queue = new ListQueue<Vertex>();\n ListQueue<Integer> numQueue = new ListQueue<Integer>();\n //Set the starting node as visited\n visited[start.index()] = true;\n queue.enqueue(start);\n numQueue.enqueue(new Integer(1));\n\n //Keep last\n int last = -1;\n //While the queue isnt empty\n while (!queue.isEmpty()) {\n //Pop off the top from both queues and mark as visited\n start = queue.dequeue();\n int current = numQueue.dequeue();\n visited[start.index] = true;\n //For all neigbors\n for (Vertex v : start.neighbors) {\n //If we havent visited it make sure to visit it\n if (visited[v.index()] == false) {\n //As we keep adding new nodes to visit keep track of the depth\n queue.enqueue(v);\n numQueue.enqueue(current + 1);\n }\n }\n //Keep track of the most recent depth before we pop it off (queue will be empty when we exit)\n last = current;\n }\n //Return the max of the depth\n return last;\n }",
"double muchMoreThenHalf() {\n return (this.getTotalNodeCount() + getFaultyNodeCount())/2;\n }",
"private double getCurbHeight(ReaderWay way) {\n\t\tdouble res = 0d;\n\t\tString str = null;\n\t\t// http://taginfo.openstreetmap.org/keys/sloped_curb#overview: 90% nodes, 10% ways\n\t\t// http://taginfo.openstreetmap.org/keys/sloped_curb#values\n\t\tif (way.hasTag(\"sloped_curb\")) {\n\t\t\tstr = way.getTag(\"sloped_curb\").toLowerCase();\n\t\t\tstr = str.replace(\"yes\", \"0.03\");\n\t\t\tstr = str.replace(\"both\", \"0.03\");\n\t\t\tstr = str.replace(\"no\", \"0.15\");\n\t\t\tstr = str.replace(\"one\", \"0.15\");\n\t\t\tstr = str.replace(\"at_grade\", \"0.0\");\n\t\t\tstr = str.replace(\"flush\", \"0.0\");\n\t\t\tstr = str.replace(\"low\", \"0.03\");\n\t\t}\n\t\telse if (way.hasTag(\"kerb\")) {\n\t\t\tif (way.hasTag(\"kerb:height\")) {\n\t\t\t\tstr = way.getTag(\"kerb:height\").toLowerCase();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tstr = way.getTag(\"kerb\").toLowerCase();\n\t\t\t\tstr = str.replace(\"lowered\", \"0.03\");\n\t\t\t\tstr = str.replace(\"raised\", \"0.15\");\n\t\t\t\tstr = str.replace(\"yes\", \"0.03\");\n\t\t\t\tstr = str.replace(\"flush\", \"0.0\");\n\t\t\t\tstr = str.replace(\"unknown\", \"0.03\");\n\t\t\t\tstr = str.replace(\"no\", \"0.15\");\n\t\t\t\tstr = str.replace(\"dropped\", \"0.03\");\n\t\t\t\tstr = str.replace(\"rolled\", \"0.03\");\n\t\t\t\tstr = str.replace(\"none\", \"0.15\");\n\t\t\t}\n\t\t}\n \n\t\t// http://taginfo.openstreetmap.org/keys/curb#overview: 70% nodes, 30% ways\n\t\t// http://taginfo.openstreetmap.org/keys/curb#values\n\t\telse if (way.hasTag(\"curb\")) {\n\t\t\tstr = way.getTag(\"curb\").toLowerCase();\n\t\t\tstr = str.replace(\"lowered\", \"0.03\");\n\t\t\tstr = str.replace(\"regular\", \"0.15\");\n\t\t\tstr = str.replace(\"flush;lowered\", \"0.0\");\n\t\t\tstr = str.replace(\"sloped\", \"0.03\");\n\t\t\tstr = str.replace(\"lowered_and_sloped\", \"0.03\");\n\t\t\tstr = str.replace(\"flush\", \"0.0\");\n\t\t\tstr = str.replace(\"none\", \"0.15\");\n\t\t\tstr = str.replace(\"flush_and_lowered\", \"0.0\");\n\t\t}\n\n\t\tif (str != null) {\n\t\t\tboolean isCm = false;\n\t\t\ttry {\n\t\t\t\tif (str.contains(\"c\")) {\n\t\t\t\t\tisCm = true;\n\t\t\t\t}\n\t\t\t\tres = Double.parseDouble(str.replace(\"%\", \"\").replace(\",\", \".\").replace(\"m\", \"\").replace(\"c\", \"\"));\n\t\t\t\tif (isCm) {\n\t\t\t\t\tres /= 100d;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception ex) {\n\t\t\t\t//\tlogger.warning(\"Error parsing value for Tag kerb from this String: \" + stringValue + \". Exception:\" + ex.getMessage());\n\t\t\t}\n\t\t}\n\n\t\t// check if the value makes sense (i.e. maximum 0.3m/30cm)\n\t\tif (-0.15 < res && res < 0.15) {\n\t\t\tres = Math.abs(res);\n\t\t}\n\t\telse {\n\t\t\t// doubleValue = Double.NaN;\n\t\t\tres = 0.15;\n\t\t}\n\t\t\n\t\treturn res;\n\t}",
"public void breadthFirstSearch(){\n Deque<Node> q = new ArrayDeque<>(); // In an interview just write Queue ? Issue is java 8 only has priority queue, \n // meaning I have to pass it a COMPARABLE for the Node class\n if (this.root == null){\n return;\n }\n \n q.add(this.root);\n while(q.isEmpty() == false){\n Node n = (Node) q.remove();\n System.out.print(n.val + \", \");\n if (n.left != null){\n q.add(n.left);\n }\n if (n.right != null){\n q.add(n.right);\n }\n }\n }",
"java.math.BigDecimal getWBMaximum();",
"public float getStability(){\n\t\tfloat stability;\n\t\t\n\t\t//Calculate Stability\n\t\ttry {\n if(getOutDegree() != 0) {\n \t//stability can be calculated\n stability = ((float) getOutDegree() / ((float) getInDegree() + (float) getOutDegree()));\n } else {\n \t//not dependant\n stability = 0;\n }//end ifElse\n } catch (ArithmeticException e){\n \t//Prevent NaN being Calculated return 0 instead\n \t//http://stackoverflow.com/questions/10817706/exception-in-thread-main-java-lang-arithmeticexception-by-zero\n \tSystem.out.println(\"[ERROR]: Error calculating Stability\");\n stability = 0;\n }//end tryCatch\n\t\t\n\t\treturn stability;\n\t}",
"public BTreeNode<E> handleUnderflow() {\n\t\tBTreeNode<E> donor = findDonor();\n\t\tint thisIndex = parent.children.indexOf(this);\n\t\tif (donor.canDonate()) {\n\t\t\tBTreeNode<E> parent = donor.parent;\n\t\t\tint donorIndex = parent.children.indexOf(donor);\n\t\t\t//rotate(donor, myGainIndex, sibLossIndex, pSepIndex);\n\t\t\t//if the donor is on the left, add the new data to the beginning of the deficient node; otherwise add it to the end\n\t\t\tif (donorIndex < thisIndex) {\n\t\t\t\trotate(donor, 0, donor.dataSize() - 1, donorIndex);\n\t\t\t}\n\t\t\telse {\n\t\t\t\trotate(donor, dataSize(), 0, thisIndex);\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t\telse {\n\t\t\t//the only time you will merge right, is if the deficient node is the first child\n\t\t\tBTreeNode<E> joinedNode;\n\t\t\tif (thisIndex == 0) {\n\t\t\t\tjoinedNode = join(this, donor, thisIndex);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tjoinedNode = join(donor, this, thisIndex - 1);\n\t\t\t}\n\n\t\t\treturn joinedNode;\n\t\t}\n\t}",
"public double getX1SubSolution() {\n this.polySubSolve();\n return this.x1sub;\n }",
"private AStarNode getMinFScore(ArrayList<AStarNode> openSet) {\n AStarNode save = null;\n for (AStarNode neighbor : openSet) { //linear search\n if (save == null) {\n save = neighbor;\n } else {\n if (save.getFScore() > neighbor.getFScore())\n save = neighbor;\n }\n }\n return save;\n }",
"public BigDecimal getBSCA_ProfitPriceStdEntered();",
"static BNode getSibling(BNode cur){\n int height = 0;\n cur = cur.parent;\n height++;\n while(cur!= null){\n\n if(cur.right!= null){\n int tHeight = height-1;\n BNode tCur = cur.right;\n while (tCur!=null){\n if(tHeight == 0 && tCur.left == null && tCur.right == null){\n return tCur;\n }else{\n tCur = tCur.right;\n tHeight--;\n }\n }\n\n }\n\n cur = cur.parent;\n height++;\n\n\n\n }\n\n return null;\n\n }",
"public int returnGraphRoot() {\n\t\tfor(int i = 0; i < sc.getInitPos().size(); i++) {\r\n\t\t\tfor(int j = 0; j < sc.getInitPos().size(); j++) {\r\n\t\t\t\tif(graph[i][j]) {\r\n\t\t\t\t\t//means i -> j\r\n\t\t\t\t\t// therefore we need to see if i has a parent\r\n\t\t\t\t\tboolean hasPred = true;\r\n\t\t\t\t\tint pred = -1;\r\n\t\t\t\t\twhile(hasPred) {\r\n\t\t\t\t\t\tfor(int k = 0; k < sc.getInitPos().size(); k++) {\r\n\t\t\t\t\t\t\tif(graph[k][i]) {\r\n\t\t\t\t\t\t\t\t//k is a parent of i\r\n\t\t\t\t\t\t\t\tpred = k;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(pred == -1) {\r\n\t\t\t\t\t\t\t//i has no predecessor\r\n\t\t\t\t\t\t\thasPred = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\ti = pred;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//TODO: remove i from graph\r\n\t\t\t\t\treturn i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn 0;\r\n\t}",
"private double calcB1() {\n double[] dataX = dsX.getDataX();\n double[] dataY = dsY.getDataY();\n double sumX = 0;\n double sumY = 0;\n double sumXY = 0;\n double sumXsq = 0;\n\n for (int i = 0; i < dataX.length; i++) {\n sumX += dataX[i];\n sumY += dataY[i];\n sumXY += dataX[i] * dataY[i];\n sumXsq += Math.pow(dataX[i], 2);\n }\n return (((dataX.length * sumXY) - (sumX * sumY)) / ((dataX.length * sumXsq) - (Math.pow(sumX, 2))));\n }",
"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 }",
"@Override\n public double calcValue() throws IllegalArgumentException {\n // calcolo ricorsivo del risultato dell'operazione\n double l = leftChild.calcValue();\n double r = rightChild.calcValue();\n // effettivo calcolo del risultato\n return oper.getOperation().calcValue(l, r);\n }",
"public abstract double evaluateFitness();",
"public static double getFitness(List<Double> xValues, List<Double> yValues, Tree tree){\n //tree.str();\n //System.out.println();\n //ystem.out.println();\n double fitness = 0;\n for (int i = 0; i < xValues.size(); i++){\n if (Double.isNaN(tree.getY(xValues.get(i)))) continue;\n double error = tree.getY(xValues.get(i)) - yValues.get(i);\n \n // System.out.println(error);\n fitness += (error * error) ;\n //System.out.println(fitness);\n \n \n }\n //System.out.println(fitness);\n \n return fitness / xValues.size();\n \n }",
"public double higherFitnessElementCalculator(BlackBoxTree blackBox) {\n distanceFromBlackBox = blackBox.measureDistanceFromCandidate(bestSyntaxTree);\n double distanceWeight = distanceFromBlackBox* 1000 / PARAMs.EPSILON_DISTANCE_FOR_LOWER_EVOLUTION_TO_STOP;//should be in the order 1000\n double effortWeight = effortElement.calcTotalEffort();//should be in the order of 100\n if(RunHigherLevel.PRINT_EVERY_H_FITNESS_ELEMENT_CALCULATION)\n System.out.println(\" calculated hFitnessElement for \"+ blackBox + \"| distanceWeight: \"+distanceWeight+ \", effortWeight: \"+ effortWeight);\n hFitnessElement = distanceWeight + effortWeight;// PARAM set how to calc the hFitnessElement of ParamGA\n\n return distanceFromBlackBox;\n }",
"public float calculTauxErreurBinaire() {\n \n \tint nbElementsEmis = source.getInformationEmise().nbElements() ;\n int nbBitsFaux = 0 ;\n \tint i ;\n \tfor(i=0;i<nbElementsEmis;i++){\n \t\tif(source.getInformationEmise().iemeElement(i) != destination.getInformationRecue().iemeElement(i)){\n \t\t\tnbBitsFaux++ ;\n \t\t}\t\n \t}\n \t\t\n \tif(nbBitsFaux != 0)\t\n return (float)nbElementsEmis/(float)nbBitsFaux;\n \telse\n \t\treturn 0.0f ;\n }",
"private int first_leaf() { return n/2; }",
"public BigInteger value() {\n\t\tBigInteger val = BigInteger.ONE;\n\t\tNode current_node = this.head;\n\t\twhile(current_node != null){\n\t\t\tval = val.multiply(BigInteger.valueOf(current_node.factor).pow(current_node.power));\n\t\t\tcurrent_node = current_node.next;\n\t\t}\n\t\treturn val;\n\t}",
"public int getSolutionCost(){\r\n if (this.path_solution.size()==0)\r\n return 0;\r\n return this.path_solution.get(this.path_solution.size()-1).getCost();\r\n }",
"public void executeStep() {\n\t\tvar parent = queue.poll();\n\t\tfinal var children = parent.getValidChildren(graph, probabilities, minSteps,\n\t\t\t\tinitialEdgeImportance.keySet().toArray(new ConcreteEdge[initialEdgeImportance.size()]));\n\n\t\tfor (final var child : children) {\n\t\t\tfor (var x : parent.getInitialEdgeIncrements().entrySet()) {\n\t\t\t\tinitialEdgeImportance.compute(x.getKey(), (k, v) -> v == null ? x.getValue() : (v + x.getValue()));\n\t\t\t}\n\n\t\t\tgetSuccessMatrixResult(child.getInitialAction()).max(child.getPosition(), child.getSuccessRating());\n\t\t\tgetCutOffMatrixResult(child.getInitialAction()).max(child.getPosition(), child.getCutOffRating());\n\n\t\t\tqueue.add(child);\n\t\t\tcalculatedPathsCount++;\n\t\t}\n\t}",
"public static <V> Graph<V> getMinimumSpanningTreeKruskal(Graph<V> graph) {\n class Arista {\n private V origen;\n private V destino;\n private double peso;\n\n private Arista(V pOrigen, double pPeso, V pDestino) {\n origen = pOrigen;\n peso = pPeso;\n destino = pDestino;\n }\n }\n\n V[] array = graph.getValuesAsArray();\n double[][] matrizPesos = graph.getGraphStructureAsMatrix();\n double[][] matrizCopia = new double[array.length][array.length];\n for (int x = 0; x < array.length; x++) {\n for (int y = 0; y < array.length; y++) {\n matrizCopia[x][y] = matrizPesos[x][y];\n }\n }\n\n List<Arista> aristas = new LinkedList<>();\n\n // Se buscan todas las aristas del grafo y se enlistan\n for (int x = 0; x < array.length; x++) {\n for (int y = 0; y < array.length; y++) {\n if (matrizCopia[x][y] != -1) {\n if (!graph.isDirected()) {\n matrizCopia[y][x] = -1;\n }\n Arista ar = new Arista(array[x], matrizCopia[x][y], array[y]);\n aristas.add(ar);\n }\n }\n }\n\n //Se ordenan las listas de menor a mayor, aplicando el ordenamiento de burbuja.\n if (aristas.size() > 1) {\n int i = 0;\n for (int x = 2; x < aristas.size(); x++) {\n for (int y = 1; y < aristas.size() - i; y++) {\n Arista temp = aristas.get(y);\n Arista temp2 = aristas.get(y+1);\n if (temp.peso > temp2.peso) {\n aristas.set(y, temp2);\n aristas.set(y+1, temp);\n }\n }\n i++;\n }\n }\n\n List<Graph<V>> bosque = new LinkedList<>();\n for (int x = 0; x < array.length; x++) {\n Graph<V> temp = new AdjacencyMatrix<>();\n temp.addNode(array[x]);\n bosque.add(temp);\n }\n\n Iterator<Arista> it1 = aristas.iterator();\n while (it1.hasNext()) {\n Arista aux = it1.next();\n int arbolOrigen = buscarArbol(aux.origen, bosque);\n int arbolDestino = buscarArbol(aux.destino, bosque);\n if (arbolDestino < arbolOrigen) {\n int temp = arbolDestino;\n arbolDestino = arbolOrigen;\n arbolOrigen = temp;\n }\n\n if (arbolDestino != arbolOrigen) { // Significa que estan en diferentes arboles.\n Graph<V> grafoDestino = bosque.remove(arbolDestino);\n Graph<V> grafoTemp = unirGrafos(bosque.get(arbolOrigen), grafoDestino);\n grafoTemp.addEdge(aux.origen, aux.destino, aux.peso);\n bosque.set(arbolOrigen, grafoTemp);\n }\n }\n if (bosque.size() != 1) { // Significa que hay vertices aislados.\n for (int x = 2; x <= bosque.size(); x++) {\n Graph<V> grafoTemp = bosque.remove(x);\n Graph<V> grafosUnidos = unirGrafos(bosque.get(1), grafoTemp);\n bosque.set(1, grafosUnidos);\n }\n }\n\n return bosque.get(1);\n }",
"public QuadTreeNode<E> getBestQuad(Point p) {\n\t\tif (divided) {\n\t\t\t// Loop through the sub nodes and return the one that contains\n\t\t\t// the point p\n\t\t\tfor (QuadTreeNode<E> n : nodes) {\n\t\t\t\tif (n.fits(p)) {\n\t\t\t\t\treturn n;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public static int cutOffValue(Node current, int nextTurn){\n /*\n New algo:\n - Make the 24 subsets possible. How?\n Make 6 columns, 6 diagonals (3 pos and 3 neg) - hard code, 12 from rows (3 from each)\n - Evaluate each. How?\n all 0's: reject.\n mix of 1 and 2: reject.\n just 2's: points = number of 2's multiply by 2. \n just 1's: points = number of 1's. \n - Return sum of all evaluation\n */\n int v_score = makeVerticalSubsets(current.board);\n int h_score = makeHorizontalSubsets(current.board);\n int d_score = makeDiagonalSubsets(current.board);\n \n printBoard(current.board);\n// System.out.println(\"Child depth: \"+ current.depth);\n int sum_score = v_score + h_score + d_score;\n //The player who has the next turn has an advantage so\n /*\n if(nextTurn==2)\n sum_score++;\n else if(nextTurn==1)\n sum_score--;\n */\n System.out.println(\"Evaluation cost: \"+sum_score);\n current.eval_cost=sum_score;\n return sum_score;\n }",
"public abstract double evaluer(SolutionPartielle s);"
]
| [
"0.5058364",
"0.50119835",
"0.49711078",
"0.49510092",
"0.49405876",
"0.49254805",
"0.49076843",
"0.4905598",
"0.4882285",
"0.47915596",
"0.47906885",
"0.47797793",
"0.47636425",
"0.47570306",
"0.47501245",
"0.4746002",
"0.4720728",
"0.46936047",
"0.46868533",
"0.46649486",
"0.46646357",
"0.46485358",
"0.46352372",
"0.460989",
"0.46032065",
"0.45940378",
"0.4582511",
"0.4576385",
"0.457567",
"0.45694464",
"0.45685485",
"0.45624885",
"0.45575517",
"0.45454338",
"0.45441043",
"0.45170626",
"0.45099014",
"0.45044252",
"0.4502131",
"0.44955298",
"0.44895014",
"0.44894204",
"0.44865963",
"0.44671",
"0.44629067",
"0.44613087",
"0.44518343",
"0.44450262",
"0.44408175",
"0.44404918",
"0.44397154",
"0.44388112",
"0.44347712",
"0.44319856",
"0.4430073",
"0.44296074",
"0.44291624",
"0.44280094",
"0.44234776",
"0.4421075",
"0.4415719",
"0.4412074",
"0.4411336",
"0.44090626",
"0.44056883",
"0.44042444",
"0.44029567",
"0.4402026",
"0.4392593",
"0.43751332",
"0.436905",
"0.43682697",
"0.43635604",
"0.4360683",
"0.4360308",
"0.43555447",
"0.4334743",
"0.43316787",
"0.4327021",
"0.43233612",
"0.43233046",
"0.4321589",
"0.43167675",
"0.42991725",
"0.4298876",
"0.42943376",
"0.4289362",
"0.42892072",
"0.42882615",
"0.4286925",
"0.42853796",
"0.42805672",
"0.42744222",
"0.42679727",
"0.42632765",
"0.42613307",
"0.4258612",
"0.42574796",
"0.4252695",
"0.42454475",
"0.4244752"
]
| 0.0 | -1 |
Returns the 'left' side of the bisection (= the side t is attached to) | public Set<V> getL() {
return L;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double Left(){\n\t\treturn (x);\n\t}",
"public double getLeft() {\r\n\t\treturn -left.getRawAxis(1);\r\n\t}",
"double getLeft(double min);",
"public double getLeft() {\n return this.xL;\n }",
"public Pixel downLeft() {\n if (this.down == null) {\n return null;\n }\n else {\n return this.down.left;\n }\n }",
"Binarbre<E> getLeft();",
"public double getLeftTrigger() {\n\t\treturn getRawAxis(LEFT_TRIGGER);\n\t}",
"public Bearing getLeftNeighbour() {\n return this == N || this == S ? W : N;\n }",
"public Point getdownLeft() {\n Point downLeft = new Point(this.upperLeft.getX(), this.upperLeft.getY() + this.getHeight());\n return downLeft;\n }",
"private int findTreeNodeLeftBoundary(RSTTreeNode node)\n {\n // recursive call for children (if applicable)\n if (node instanceof DiscourseRelation) {\n return findTreeNodeLeftBoundary(((DiscourseRelation) node).getArg1());\n }\n\n // it's EDU\n return node.getBegin();\n }",
"protected final IntervalNode getLeft() {\n\treturn(this.left);\n }",
"public FPointType calculateUpperLeft() {\n fRectBound = getBounds2D();\n FPointType fptUpperLeft = new FPointType(fRectBound.x, fRectBound.y);\n calculate(fptUpperLeft);\n \n rotateRadian = 0.0f;\n \n return fptUpperLeft;\n }",
"EObject getLeft();",
"public int getLeftX() {\n\t\treturn 0;\r\n\t}",
"protected int left(int i ) { return 2 * i + 1; }",
"private int getLeftOf(int i) {\n \t\t// TODO Complete this method!\n \t\treturn 2*i;\n \t}",
"public double getLeft(double min) {\n return Math.min(min, min + (this.length * Math.sin(Math.toRadians(this.theta)))\n ); \n }",
"LogicExpression getLeft();",
"public BinNode<T> getLeft();",
"public int getSideThin(float x, float y) {\n // dot product between vector to the point and the normal\n float side = (x - x1)*nx + (y - y1)*ny;\n return (side < 0)?BACK:(side > 0)?FRONT:COLLINEAR;\n }",
"public Direction left() {\r\n\t\tint newDir = this.index - 1;\r\n\r\n\t\tnewDir = (newDir == 0) ? 4 : newDir;\r\n\t\treturn getEnum(newDir);\r\n\t}",
"boolean getLeftToRight();",
"private static Position getLeftNeighbor(Position curr, int side) {\n int newX = curr.getX() - getNumElement(0, side) - getNumSpacePerSide(0, side) - 1;\n int newY = curr.getY() - side;\n return new Position(newX, newY);\n }",
"public int getLeftEdge() {\n return leftEdge;\n }",
"public int getXLeft() {\n return xLeft;\n }",
"public double getLeftDistance() {\n\t\treturn left.getDistance();\n\t}",
"public int getLeft() {\n\t\treturn left;\n\t}",
"public Integer checkLeft()\r\n\t{\r\n\t\treturn this.X - 1;\r\n\t}",
"public Direction left() {\r\n\t\tif (this.direction == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tswitch (this.direction) {\r\n\t\tcase NORTH:\r\n\t\t\tthis.direction = Direction.WEST;\r\n\t\t\tbreak;\r\n\t\tcase WEST:\r\n\t\t\tthis.direction = Direction.SOUTH;\r\n\t\t\tbreak;\r\n\t\tcase SOUTH:\r\n\t\t\tthis.direction = Direction.EAST;\r\n\t\t\tbreak;\r\n\t\tcase EAST:\r\n\t\t\tthis.direction = Direction.NORTH;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn this.direction;\r\n\t}",
"public Direction toLeft()\n {\n return new Direction(dirInDegrees - (FULL_CIRCLE / 4));\n }",
"static int left(int i)\n {\n return (2*i+1);\n }",
"double getLeftY();",
"protected static int left(int i){\n return 2*i+1;\n }",
"public Point getdownRigth() {\n Point downRigth = new Point(this.upperLeft.getX() + this.getWidth(), this.upperLeft.getY() + this.getHeight());\n return downRigth;\n }",
"public double Right(){\n\t\tdouble farx = x + sizeX - 1;\n\t\treturn (farx);\n\t}",
"public Entity getShoulderEntityLeft ( ) {\n\t\treturn extract ( handle -> handle.getShoulderEntityLeft ( ) );\n\t}",
"public double getSideB()\r\n\t{\r\n\t\treturn this.sideB;\r\n\t}",
"public double getLeftDistance() {\n return leftEnc.getDistance();\n }",
"public BSTItem getLeft()\r\n\t{\r\n\t\treturn left;\r\n\t}",
"public TreeNode getLeft() {\n\t\treturn left;\n\t}",
"public Direction left() {\n\t\treturn left;\n\t}",
"int side() {\n return s;\n }",
"public Bearing leftFrom() {\n return this.get(((this.bearing - 2) + 8) % 8);\n }",
"private Point middleLeft() {\n return this.topLeft.add(0, this.height / 2).asPoint();\n }",
"public float getDistanceToLeftPivot() {\n return leftDist;\n }",
"private static double getLeftStick() {\n\t\treturn (OI.getInstance().leftStick.getY()) * speed;\n\t}",
"private int left(int i) {\r\n\t\treturn 2 * i + 1;\r\n\t}",
"private Point2D.Double leftSensorLocation() {\n double dx = getSize() * Math.cos(getOrientation() + Math.PI / 4);\n double dy = -getSize() * Math.sin(getOrientation() + Math.PI / 4);\n return new Point2D.Double(getX() + dx * 2, getY() + dy * 2);\n }",
"private static int LEFT(int i) {\n return (2 * i + 1);\n }",
"TreeNode<T> getLeft();",
"public BoardCoordinate getLeft() {\n return new BoardCoordinate(x-1, y);\n }",
"OrExp getLeft();",
"public int getLeft() {\n\t\treturn this.left;\n\t}",
"public BTNode getLeft(){\r\n return leftLeaf;\r\n }",
"public BinaryTreeADT<T> getLeft();",
"public BinaryTreeNode getLeft() {\n\t\treturn left;\n\t}",
"public double getLeft(double min) {\n return Math.max(min, Math.max(Math.max(this.left.getLeft(min), this.right.getLeft(min)),\n Math.max(this.right.getLeft(min), this.right.getLeft(min))));\n }",
"public int getLeft(){\n\t\treturn platformHitbox.x;\n\t}",
"public double getLeftX(){\r\n\t\treturn adjustInput(driverLeft.getX());\r\n\t}",
"public int right_of(Halfedge el, Point p) {\r\n\t\tEdge e;\r\n\t\tSite topsite;\r\n\t\tint right_of_site, above, fast;\r\n\t\tfloat dxp, dyp, dxs, t1, t2, t3, yl;\r\n\r\n\t\te = el.ELedge;\r\n\t\ttopsite = e.reg[1];\r\n\t\tright_of_site = p.x > topsite.coord.x ? 1 : 0;\r\n\t\tif (right_of_site == 1 && el.ELpm == le)\r\n\t\t\treturn (1);\r\n\t\tif (right_of_site == 0 && el.ELpm == re)\r\n\t\t\treturn (0);\r\n\r\n\t\tif (e.a == 1.0) {\r\n\t\t\tdyp = p.y - topsite.coord.y;\r\n\t\t\tdxp = p.x - topsite.coord.x;\r\n\t\t\tfast = 0;\r\n\t\t\tif ((right_of_site == 0 & e.b < 0.0)\r\n\t\t\t\t\t| (right_of_site == 1 & e.b >= 0.0)) {\r\n\t\t\t\tabove = dyp >= e.b * dxp ? 1 : 0;\r\n\t\t\t\tfast = above;\r\n\t\t\t} else {\r\n\t\t\t\tabove = p.x + p.y * e.b > e.c ? 1 : 0;\r\n\t\t\t\tif (e.b < 0.0)\r\n\t\t\t\t\tabove = (above == 1 ? 0 : 1);\r\n\t\t\t\tif (above == 0)\r\n\t\t\t\t\tfast = 1;\r\n\t\t\t}\r\n\t\t\tif (fast == 0) {\r\n\t\t\t\tdxs = topsite.coord.x - (e.reg[0]).coord.x;\r\n\t\t\t\tabove = e.b * (dxp * dxp - dyp * dyp) < dxs * dyp\r\n\t\t\t\t\t\t* (1.0 + 2.0 * dxp / dxs + e.b * e.b) ? 1 : 0;\r\n\t\t\t\tif (e.b < 0.0)\r\n\t\t\t\t\tabove = (above == 1 ? 0 : 1);\r\n\t\t\t}\r\n\t\t} else { // e.b==1.0\r\n\t\t\tyl = e.c - e.a * p.x;\r\n\t\t\tt1 = p.y - yl;\r\n\t\t\tt2 = p.x - topsite.coord.x;\r\n\t\t\tt3 = yl - topsite.coord.y;\r\n\t\t\tabove = (t1 * t1 > (t2 * t2 + t3 * t3) ? 1 : 0);\r\n\t\t}\r\n\r\n\t\treturn (el.ELpm == le ? above : (above == 1 ? 0 : 1));\r\n\t}",
"public static char getsLeft() {\n\t\t\treturn sLeft;\n\t\t}",
"private static int getLeft(int index) {\n\t\treturn (index + 1) * 2 - 1;\n\t}",
"public double getLeftCurrent() {\n return leftMotor.getOutputCurrent();\n }",
"private int left(int index) {\r\n\t\treturn 2 * index + 1;\r\n\t}",
"public Fork getLeft() {\n\t\treturn left;\n\t}",
"int left(int i) { return i<<1; }",
"public double getBoundingBoxLeft() {\n return boundingBoxLeft;\n }",
"public static double side(double[] a, double[] b, double[] p)\n {\n double d = ( ( (p[0] - a[0]) * (b[1] - a[1]) ) - ( (p[1] - a[1]) * (b[0]-a[0]) ) );\n return d;\n }",
"private int leftChild(int pos)\n {\n return (2 * pos);\n }",
"public Node getLeft () {\r\n\t\treturn left;\r\n\t}",
"@Override\r\n\tpublic Trajectory getLeftTrajectory() {\n\t\treturn left;\r\n\t}",
"public Lane getLeft() {\r\n\t\treturn left;\r\n\t}",
"private int getLeftOf(int index) {\n // TODO: YOUR CODE HERE\n return index * 2;\n }",
"private int left(int parent) {\n\t\treturn (parent*2)+1;\n\t}",
"private Vector2D leftVelocity() {\n return new Vector2D(this.movementSpeed * this.differenceTime * -1, 0);\n }",
"public float getX(){\n return hitBox.left;\n }",
"public float getLeftX() {\n\t\treturn leftX;\n\t}",
"protected int getGraphLeft() {\r\n\t\treturn leftEdge;\r\n\t}",
"public Expr left() {\n\treturn this.left;\n }",
"public Point getUpperLeft() {\n return this.upperLeft;\n }",
"public double getWidth() {\n return this.left.getLeft(0) - this.right.getRight(0); \n }",
"public void setLeft(int x) {\r\n leftSide = x;\r\n }",
"private int leftIndex(int i) {\n return i * 2;\n }",
"public int getLeftEnc() {\n\t\treturn TalLM.getSelectedSensorPosition(0)-initEncL;\n\t}",
"private String parentside(WAVLNode d,WAVLNode y) {\n\t if(d.right==y) {\r\n\t\t return \"right\";\r\n\t }\r\n\t else {\r\n\t\t return \"left\";\r\n\t }\r\n }",
"public int getRightX() {\n\t\treturn 0;\r\n\t}",
"double getside1(){\n\t\treturn side1;\n\t}",
"public double getLeft(double min) {\n return min - this.size; \n }",
"public SegmentTreeNode<T> getLeftSon() {\n\t\treturn lson;\n\t}",
"public BinarySearchTreeNode<T> getLeft() {\r\n return left;\r\n }",
"public Coords getLowerLeft()\r\n {\r\n return new Coords(x, y + height);\r\n }",
"public BigInteger getNumLeft() {\n return numLeft;\n }",
"public double getSide1() {return side1;}",
"public double getFLAngle(){\r\n \treturn frontLeftPot.get() - FLOFFSET;\r\n }",
"public float getLeftRectF () { return atomSpriteBoundary.left; }",
"public BigInteger getNumLeft () {\n\t return numLeft;\n\t }",
"Point3D getLeftUpperBackCorner();",
"public CellIDExpression getLeftCell() {\n\t\treturn leftCell;\n\t}",
"public Node getLeft() {\n return left;\n }",
"public Node getLeft() {\n return left;\n }",
"public Node getLeft() {\n return left;\n }"
]
| [
"0.68917793",
"0.66980654",
"0.66127366",
"0.6458944",
"0.64583296",
"0.6442114",
"0.6396406",
"0.6334296",
"0.6302559",
"0.6178557",
"0.6162288",
"0.6150682",
"0.61446786",
"0.6128713",
"0.61066496",
"0.60833967",
"0.6063083",
"0.6019708",
"0.60159624",
"0.6010008",
"0.6005708",
"0.60036296",
"0.6002854",
"0.59912413",
"0.5985419",
"0.59738684",
"0.5957305",
"0.59568304",
"0.5952494",
"0.59489846",
"0.5946459",
"0.5943097",
"0.5942349",
"0.59370846",
"0.59233963",
"0.59062886",
"0.5903544",
"0.58963114",
"0.5895105",
"0.5894276",
"0.58592963",
"0.58513147",
"0.5849889",
"0.5846125",
"0.5845196",
"0.58450675",
"0.58305234",
"0.5828851",
"0.58273304",
"0.58176637",
"0.58039314",
"0.579789",
"0.5789564",
"0.5775425",
"0.5770375",
"0.57627815",
"0.5753994",
"0.57489383",
"0.5743414",
"0.5742591",
"0.57404476",
"0.5738229",
"0.57317215",
"0.57315964",
"0.5728579",
"0.57282335",
"0.5725909",
"0.57226217",
"0.572051",
"0.57185715",
"0.57163364",
"0.5713288",
"0.570249",
"0.5699399",
"0.56954587",
"0.56946",
"0.56901133",
"0.5689137",
"0.56821376",
"0.5681747",
"0.5681576",
"0.5681268",
"0.5670511",
"0.5665032",
"0.56610847",
"0.565336",
"0.56442606",
"0.56439686",
"0.56413025",
"0.5638487",
"0.5636387",
"0.56340265",
"0.5632463",
"0.5632217",
"0.5630861",
"0.56195533",
"0.5610581",
"0.56024957",
"0.5601432",
"0.5601432",
"0.5601432"
]
| 0.0 | -1 |
Returns the 'right' side of the bisection (= the side s is attached to) | public Set<V> getR() {
return R;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double Right(){\n\t\tdouble farx = x + sizeX - 1;\n\t\treturn (farx);\n\t}",
"int side() {\n return s;\n }",
"public Bearing getRightNeighbour() {\n return this == N || this == S ? E : S;\n }",
"public double getSideB()\r\n\t{\r\n\t\treturn this.sideB;\r\n\t}",
"public float getRight() {\r\n\t\treturn left + width;\r\n\t}",
"public double getRight() {\n return this.xR;\n }",
"public static char getsRight() {\n\t\t\treturn sRight;\n\t\t}",
"Binarbre<E> getRight();",
"double getside2(){\n\t\treturn side2;\n\t}",
"protected int right(int i) { return 2 * i + 2; }",
"public int getRight () {\n\t\treturn right;\n\t}",
"public int getRightX() {\n\t\treturn 0;\r\n\t}",
"private int getRightOf(int i) {\n \t\t// TODO Complete this method!\n \t\treturn 2*i + 1;\n \t}",
"double getRight(double max);",
"public Pixel downRight() {\n if (this.down == null) {\n return null;\n }\n else {\n return this.down.right;\n }\n }",
"EObject getRight();",
"public int getRightEdge() {\n return rightEdge;\n }",
"LogicExpression getRight();",
"private int right(int i) {\r\n\t\treturn 2 * i + 2;\r\n\t}",
"private int right(int parent) {\n\t\treturn parent*2+2;\n\t}",
"public int right_of(Halfedge el, Point p) {\r\n\t\tEdge e;\r\n\t\tSite topsite;\r\n\t\tint right_of_site, above, fast;\r\n\t\tfloat dxp, dyp, dxs, t1, t2, t3, yl;\r\n\r\n\t\te = el.ELedge;\r\n\t\ttopsite = e.reg[1];\r\n\t\tright_of_site = p.x > topsite.coord.x ? 1 : 0;\r\n\t\tif (right_of_site == 1 && el.ELpm == le)\r\n\t\t\treturn (1);\r\n\t\tif (right_of_site == 0 && el.ELpm == re)\r\n\t\t\treturn (0);\r\n\r\n\t\tif (e.a == 1.0) {\r\n\t\t\tdyp = p.y - topsite.coord.y;\r\n\t\t\tdxp = p.x - topsite.coord.x;\r\n\t\t\tfast = 0;\r\n\t\t\tif ((right_of_site == 0 & e.b < 0.0)\r\n\t\t\t\t\t| (right_of_site == 1 & e.b >= 0.0)) {\r\n\t\t\t\tabove = dyp >= e.b * dxp ? 1 : 0;\r\n\t\t\t\tfast = above;\r\n\t\t\t} else {\r\n\t\t\t\tabove = p.x + p.y * e.b > e.c ? 1 : 0;\r\n\t\t\t\tif (e.b < 0.0)\r\n\t\t\t\t\tabove = (above == 1 ? 0 : 1);\r\n\t\t\t\tif (above == 0)\r\n\t\t\t\t\tfast = 1;\r\n\t\t\t}\r\n\t\t\tif (fast == 0) {\r\n\t\t\t\tdxs = topsite.coord.x - (e.reg[0]).coord.x;\r\n\t\t\t\tabove = e.b * (dxp * dxp - dyp * dyp) < dxs * dyp\r\n\t\t\t\t\t\t* (1.0 + 2.0 * dxp / dxs + e.b * e.b) ? 1 : 0;\r\n\t\t\t\tif (e.b < 0.0)\r\n\t\t\t\t\tabove = (above == 1 ? 0 : 1);\r\n\t\t\t}\r\n\t\t} else { // e.b==1.0\r\n\t\t\tyl = e.c - e.a * p.x;\r\n\t\t\tt1 = p.y - yl;\r\n\t\t\tt2 = p.x - topsite.coord.x;\r\n\t\t\tt3 = yl - topsite.coord.y;\r\n\t\t\tabove = (t1 * t1 > (t2 * t2 + t3 * t3) ? 1 : 0);\r\n\t\t}\r\n\r\n\t\treturn (el.ELpm == le ? above : (above == 1 ? 0 : 1));\r\n\t}",
"private int findTreeNodeRightBoundary(RSTTreeNode node)\n {\n // recursive call for children (if applicable)\n if (node instanceof DiscourseRelation) {\n return findTreeNodeRightBoundary(((DiscourseRelation) node).getArg2());\n }\n\n // it's EDU\n return node.getEnd();\n }",
"public double getSide()\n\t{\n\t\treturn this.side;\n\t}",
"protected static int right(int i){\n return 2*(i+1);\n }",
"DoorMat getHingeOnRightSide(boolean onRightSide) throws RuntimeException;",
"private static double downRightScore(char piece, State state, int row, int col) {\n\t\tif(row != state.getGrid().length-1 && col != state.getGrid()[row].length-1 && state.getGrid()[row+1][col+1] == piece) {\n\t\t\treturn DIAGONAL;\n\t\t}\n\t\telse {\n\t\t\treturn ZERO;\n\t\t}\n\t}",
"public int getXRight() {\n return getXLeft() + getXLength();\n }",
"public double getRightTrigger() {\n\t\treturn getRawAxis(RIGHT_TRIGGER);\n\t}",
"public Direction right() {\n\t\treturn right;\n\t}",
"public double getRightDistance() {\n return rightEnc.getDistance();\n }",
"public int getRight() {\n\t\treturn this.right;\n\t}",
"public static double SideCalculator(float x1, float y1, float x2, float y2){\r\n double coord1 = Math.pow((x1 - x2), 2);\r\n double coord2 = Math.pow((y1 - y2), 2);\r\n double side = Math.pow((coord1 + coord2), 0.5);\r\n return side;\r\n }",
"public Fork getRight() {\n\t\treturn right;\n\t}",
"protected final IntervalNode getRight() {\n\treturn(this.right);\n }",
"boolean hasHingeOnRightSide() throws RuntimeException;",
"static int right(int i)\n {\n return (2*i+2);\n }",
"public final Vector3d getRight()\n {\n return myDir.cross(myUp).getNormalized();\n }",
"public int getRightWeight(){\r\n\t \treturn this.rightWeight;\r\n\t }",
"public double getSide2() {\r\n\t\treturn side2;\r\n\t}",
"private Side secondSide(final Cell cell, final Side prev) {\n switch (cell.getCellNdx()) {\n case 8:\n case 12:\n case 14:\n return LEFT;\n case 1:\n case 9:\n case 13:\n return BOTTOM;\n case 2:\n case 3:\n case 11:\n return RIGHT;\n case 4:\n case 6:\n case 7:\n return TOP;\n case 5:\n if (prev == null) {\n if (LOGGER.isErrorEnabled()) {\n LOGGER.atError().addArgument(cell).log(\"cell '{}' switch case 5, prev is null\");\n }\n throw new IllegalStateException(\"cell \" + cell + \" prev is null\");\n }\n switch (prev) {\n case LEFT:\n return cell.isFlipped() ? BOTTOM : TOP;\n case RIGHT:\n return cell.isFlipped() ? TOP : BOTTOM;\n default:\n final String m = \"Saddle w/ no connected neighbour; Cell = \" + cell + \", previous side = \" + prev;\n throw new IllegalStateException(m);\n }\n case 10:\n if (prev == null) {\n if (LOGGER.isErrorEnabled()) {\n LOGGER.atError().addArgument(cell).log(\"cell '{}' switch case 5, prev is null\");\n }\n throw new IllegalStateException(\"cell \" + cell + \" prev is null\");\n }\n switch (prev) {\n case BOTTOM:\n return cell.isFlipped() ? RIGHT : LEFT;\n case TOP:\n return cell.isFlipped() ? LEFT : RIGHT;\n default:\n final String m = \"Saddle w/ no connected neighbour; Cell = \" + cell + \", previous side = \" + prev;\n throw new IllegalStateException(m);\n }\n default:\n final String m = \"Attempt to use a trivial Cell as a node: \" + cell;\n throw new IllegalStateException(m);\n }\n }",
"private int right(int index) {\r\n\t\treturn 2 * index + 2;\r\n\t}",
"public int getSide(Line2D.Float segment) {\n if (this == segment) {\n return COLLINEAR;\n }\n int p1Side = getSideThick(segment.x1, segment.y1);\n int p2Side = getSideThick(segment.x2, segment.y2);\n if (p1Side == p2Side) {\n return p1Side;\n }\n else if (p1Side == COLLINEAR) {\n return p2Side;\n }\n else if (p2Side == COLLINEAR) {\n return p1Side;\n }\n else {\n return SPANNING;\n }\n }",
"public static short getAdversarySide(short side) {\r\n\treturn (short) Math.abs(side - 1);\r\n }",
"public void setRight(int x) {\r\n rightSide = x;\r\n }",
"public float getRight() {\n return internalGroup.getRight();\n }",
"public String getSide()//method to retrive the value of the SideUp String\r\n {//opening code for getSide method\r\n return sideUp;//getting the value for sideUp\r\n }",
"private Location getRightHandPos() {\r\n\t\treturn GeneralMethods.getRightSide(this.player.getLocation(), .34).add(0, 1.5, 0);\r\n\t}",
"public Direction right() {\r\n\t\tint newDir = this.index + 1;\r\n\r\n\t\tnewDir = (this.index + 1 == 5) ? 1 : newDir;\r\n\t\treturn getEnum(newDir);\r\n\t}",
"public int getSide() {\n\t\treturn getLength() ;\n\t}",
"public boolean isRightSide() {\n return rightSide;\n }",
"private static int RIGHT(int i) {\n return (2 * i + 2);\n }",
"boolean getLeftToRight();",
"public static double side(double[] a, double[] b, double[] p)\n {\n double d = ( ( (p[0] - a[0]) * (b[1] - a[1]) ) - ( (p[1] - a[1]) * (b[0]-a[0]) ) );\n return d;\n }",
"public Vector get_vRight() {\n\t\treturn _vRight;\n\t}",
"boolean isRight() {\r\n\t\tint maxlength;\r\n\t\tmaxlength = Math.max(Math.max(side1, side2), side3);\r\n\t\treturn (maxlength * maxlength == (side1 * side1) + (side2 * side2) + (side3 * side3) - (maxlength * maxlength));\r\n\t}",
"public double getSide1() {return side1;}",
"public BinNode<T> getRight();",
"public Entity getShoulderEntityRight ( ) {\n\t\treturn extract ( handle -> handle.getShoulderEntityRight ( ) );\n\t}",
"public Point getdownRigth() {\n Point downRigth = new Point(this.upperLeft.getX() + this.getWidth(), this.upperLeft.getY() + this.getHeight());\n return downRigth;\n }",
"public Bearing getLeftNeighbour() {\n return this == N || this == S ? W : N;\n }",
"public SegmentTreeNode<T> getRightSon() {\n\t\treturn rson;\n\t}",
"public Direction right() {\r\n\t\tif (this.direction == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tswitch (this.direction) {\r\n\t\tcase NORTH:\r\n\t\t\tthis.direction = Direction.EAST;\r\n\t\t\tbreak;\r\n\t\tcase WEST:\r\n\t\t\tthis.direction = Direction.NORTH;\r\n\t\t\tbreak;\r\n\t\tcase SOUTH:\r\n\t\t\tthis.direction = Direction.WEST;\r\n\t\t\tbreak;\r\n\t\tcase EAST:\r\n\t\t\tthis.direction = Direction.SOUTH;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn this.direction;\r\n\t}",
"private int rightIndex(int i) {\n return i * 2 + 1;\n }",
"public Node getRight () {\r\n\t\treturn right;\r\n\t}",
"public BeaconColor getStateRight() {\n return right;\n }",
"public int getRightEnc() {\n\t\treturn TalRM.getSelectedSensorPosition(0)-initEncR;\n\t}",
"public BSTItem getRight()\r\n\t{\r\n\t\treturn right;\r\n\t}",
"public int getSideThin(float x, float y) {\n // dot product between vector to the point and the normal\n float side = (x - x1)*nx + (y - y1)*ny;\n return (side < 0)?BACK:(side > 0)?FRONT:COLLINEAR;\n }",
"public Expr right() {\n\treturn this.right;\n }",
"public double Left(){\n\t\treturn (x);\n\t}",
"public Squarelotron leftRightFlip(int ring);",
"public double getBoundingBoxRight() {\n return boundingBoxRight;\n }",
"public HuffmanNode getRightNode()\n\t{\n\t\treturn right;\n\t}",
"private Point middleRight() {\n return this.topLeft.add(this.width, this.height / 2).asPoint();\n }",
"public boolean isRight () {\r\n\t\tif (((Math.pow(startSide1, 2) + Math.pow(startSide2, 2) == Math.pow(startSide3, 2)) || \r\n\t\t\t(Math.pow(startSide2, 2) + Math.pow(startSide3, 2) == Math.pow(startSide1, 2)) ||\r\n\t\t\t(Math.pow(startSide3, 2) + Math.pow(startSide1, 2) == Math.pow(startSide2, 2)))\r\n\t\t\t&& isTriangle () == true && isEquilateral () == false) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse return false;\r\n\t}",
"public Bearing rightFrom() {\n return this.get(((this.bearing + 2) + 8) % 8);\n }",
"public static int right(int i) {\r\n\t\treturn 2 * i + 1;\r\n\t}",
"public void strafeRight()\r\n\t{\r\n\t\t//Following the camera:\r\n\t\tif(loc[1] > 1)\r\n\t\t{\r\n\t\t\tthis.loc[0] += Math.sin(Math.toRadians(heading))*distance; \r\n\t\t\tthis.loc[2] += Math.cos(Math.toRadians(heading))*distance;\r\n\t\t}\r\n\t}",
"public double getR() {\n double b1 = getSlope();\n double result = Math.sqrt(getRSquare());\n if (b1 < 0) {\n result = -result;\n }\n return result;\n }",
"public Integer checkRight()\r\n\t{\r\n\t\treturn this.X + 1;\r\n\t}",
"private static double calculateSekante(double left, double right) {\n\n\t\t// if there was only a small change in angle , should be unnecessary\n\t\tif (Math.abs(newangle) < deviationAngle) {\n\t\t\tdistance = (left + right) / 2.0;\n\t\t\t// isLine = false;\n\t\t\treturn distance;\n\t\t}\n\t\t// compute radius\n\n\t\tdouble r = 0.5 * (left + right) / newangle;\n\t\tradius = r;\n\n\t\tInputHandler.stepForward(\"ra.\" + radius);\n\n\t\t// compute distance with the center pos\n\t\tdistance = 2.0 * (r) * Math.sin(newangle / 2.0);\n\n\t\treturn (distance);\n\t}",
"private static Position getRightBottomNeighbor(Position curr, int side) {\n int newX = curr.getX() + getNumElement(0, side) + getNumSpacePerSide(0, side) + 1;\n int newY = curr.getY() - side;\n return new Position(newX, newY);\n }",
"double getside1(){\n\t\treturn side1;\n\t}",
"public static int right(int i)\n {\n return 2 * i + 2;\n }",
"AndExp getRight();",
"public TreeNode getRight() {\n\t\treturn right;\n\t}",
"private double calcSide(int x1,int y1, int x2, int y2){\n \n double distance1 = Math.sqrt(Math.pow(x2 - x1,2) + Math.pow(y2-y1,2));\n \n return distance1;\n \n \n \n }",
"public com.cantor.drop.aggregator.model.CFTrade.Side getSide() {\n com.cantor.drop.aggregator.model.CFTrade.Side result = com.cantor.drop.aggregator.model.CFTrade.Side.valueOf(side_);\n return result == null ? com.cantor.drop.aggregator.model.CFTrade.Side.BUY : result;\n }",
"LogicExpression getRightExp();",
"public AST getRight() {\n\t\treturn right;\n\t}",
"public Node getRight() {\n return right;\n }",
"public Node getRight() {\n return right;\n }",
"public Node getRight() {\n return right;\n }",
"private static double upRightScore(char piece, State state, int row, int col) {\n\t\tif(row != 0 && col != state.getGrid()[row].length-1 && state.getGrid()[row-1][col+1] == piece) {\n\t\t\treturn DIAGONAL;\n\t\t}\n\t\telse {\n\t\t\treturn ZERO;\n\t\t}\n\t}",
"public com.cantor.drop.aggregator.model.CFTrade.Side getSide() {\n com.cantor.drop.aggregator.model.CFTrade.Side result = com.cantor.drop.aggregator.model.CFTrade.Side.valueOf(side_);\n return result == null ? com.cantor.drop.aggregator.model.CFTrade.Side.BUY : result;\n }",
"private int getRightOf(int index) {\n // TODO: YOUR CODE HERE\n return index * 2 + 1;\n }",
"public double calculateField(double aSide);",
"public Board getRightNeighbor() {\r\n\t\treturn rightNeighbor;\r\n\t}",
"public static int getRightmostRectStrip(double x) {\n return getLeftmostRectStrip(x) + 1;\n }",
"public BinaryTreeNode getRight() {\n\t\treturn right;\n\t}",
"public HuffmanNode getRightSubtree () {\n \treturn right;\n }"
]
| [
"0.6862899",
"0.6773507",
"0.6750002",
"0.63999945",
"0.6385609",
"0.6371591",
"0.63672394",
"0.62645644",
"0.6239806",
"0.62240887",
"0.61922747",
"0.61711645",
"0.6151033",
"0.61340433",
"0.6126873",
"0.61249113",
"0.61033964",
"0.6047143",
"0.6035836",
"0.6034702",
"0.6017279",
"0.6001922",
"0.59944826",
"0.5983732",
"0.59816384",
"0.59697837",
"0.59517086",
"0.59434575",
"0.5940444",
"0.5928514",
"0.591885",
"0.5915917",
"0.5912274",
"0.5908734",
"0.5908556",
"0.5898442",
"0.58781946",
"0.5878094",
"0.58605546",
"0.5846564",
"0.58400327",
"0.58374906",
"0.58217686",
"0.58174765",
"0.5805332",
"0.5792825",
"0.5782954",
"0.5779628",
"0.57751864",
"0.5760575",
"0.5758886",
"0.5756483",
"0.5745465",
"0.574437",
"0.57388777",
"0.57323885",
"0.5731986",
"0.5731515",
"0.57168967",
"0.5710262",
"0.5707914",
"0.5695829",
"0.5692192",
"0.56908625",
"0.56860983",
"0.5667389",
"0.5667127",
"0.5661097",
"0.56513655",
"0.56438905",
"0.5642687",
"0.56260127",
"0.56257594",
"0.56211406",
"0.561782",
"0.5609117",
"0.5602692",
"0.55991703",
"0.5593877",
"0.55930686",
"0.5587174",
"0.5578074",
"0.5570208",
"0.55547744",
"0.5551605",
"0.55484176",
"0.5547261",
"0.5540229",
"0.5534042",
"0.55284303",
"0.55280584",
"0.55280584",
"0.55280584",
"0.5527967",
"0.5527095",
"0.55220884",
"0.5519051",
"0.55098504",
"0.55036986",
"0.55012786",
"0.5501182"
]
| 0.0 | -1 |
Note the MVC tests use the actual database, this might create a problem with the order of adding/retrieving | void fillDatabase() {
Type.type( "FOOD" );
Type.type( "HOT" );
Type.type( "SNACK" );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\r\n\tpublic void addToDb() {\r\n\t\tservice.save(opinion);\r\n\t\tassertNotEquals(opinion.getId(), 0);\r\n\t\tassertTrue(service.exists(opinion.getId()));\r\n\t}",
"@Test\n public void addArticle(){\n User user = userDao.load(3);\n Article article = new Article();\n article.setUser(user);\n// article.setTitle(\"1896\");\n articleDao.add(article);\n }",
"@Test\r\n public void testloadExpenses_1() {\n fancyDatabase = new MyDatabase();\r\n expenseRepository = new ExpenseRepository(fancyDatabase);\r\n expenseRepository.loadExpenses();\r\n assertEquals(0,expenseRepository.getExpenses().size());\r\n }",
"@ActionKey(\"db\")\n\tpublic void testDB() {\n\t\tUser user = User.dao.findById(1, \"qword_id\");\n\t\trenderText(\"data in database:\" + user.getStr(\"qword_id\"));\n\t\t\n\t}",
"@Test\n public void addIngredient_DatabaseUpdates(){\n int returned = testDatabase.addIngredient(ingredient);\n Ingredient retrieved = testDatabase.getIngredient(returned);\n assertEquals(\"addIngredient - Correct Ingredient Name\", \"Flour\", retrieved.getName());\n assertEquals(\"addIngredient - Set Ingredients ID\", returned, retrieved.getKeyID());\n }",
"@Test\n public void addRecipeIngredient_DatabaseUpdates(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n ArrayList<RecipeIngredient> allRecipeIngredients = testDatabase.getAllRecipeIngredients(returnedRecipe);\n RecipeIngredient retrieved = new RecipeIngredient();\n if(allRecipeIngredients != null){\n for(int i = 0; i < allRecipeIngredients.size(); i++){\n if(allRecipeIngredients.get(i).getIngredientID() == ingredientID){\n retrieved = allRecipeIngredients.get(i);\n }\n }\n }\n assertEquals(\"addRecipeIngredient - Correct Quantity\", 2.0, retrieved.getQuantity(), 0);\n assertEquals(\"addRecipeIngredient - Correct Unit\", \"cups\", retrieved.getUnit());\n assertEquals(\"addRecipeIngredient - Correct Details\", \"White Flour\", retrieved.getDetails());\n }",
"@Test\n public void addRecipeCategory_DatabaseUpdates(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n int returnedCategory = testDatabase.addRecipeCategory(recipeCategory);\n ArrayList<RecipeCategory> allCategories = testDatabase.getAllRecipeCategories(returnedRecipe);\n RecipeCategory retrieved = new RecipeCategory();\n if(allCategories != null){\n for(int i = 0; i < allCategories.size(); i++){\n if(allCategories.get(i).getKeyID() == returnedCategory){\n retrieved = allCategories.get(i);\n }\n }\n }\n assertEquals(\"addRecipeDirection - Correct RecipeID\", returnedRecipe, retrieved.getRecipeID());\n assertEquals(\"addRecipeDirection - Correct CategoryID\", categoryID, retrieved.getCategoryID());\n }",
"@Before\n public void setUp() throws SQLException {\n modelUnderTest = new Model();\n }",
"@Test\n\tpublic void test03() {\n\t\t\tUser user1 = new User(\"megan\");\n\t\t\t\n\t\t\tuser1.setUser_id(\"UserID1\");\n\t\t\tassertEquals(\"UserID1\", user1.getUser_id());\n\t\t\t\n\t\t//\tdb.addRestaurant(rest1);\n\t\t}",
"@Test\n\tpublic void populatedDB() throws URISyntaxException{\n\t\tString pass;\n\t\t LoginController controller = new LoginController();\n\t\t \n\t\tpass = controller.gimmeSalt(\"PASSWORD\");\n pass = controller.hashBrowns(pass);\n\t\tdb.insertUser(\"TESTER\", pass, \"EMAIL\",666);\n\t\t\n\t\tdb.insertBusiness(\"Test1\",\"Somewhere\",7);\n\t\tdb.insertBusiness(\"Test2\",\"Somewhere\",8);\n\t\tdb.insertBusiness(\"Test3\",\"Somewhere\",9);\n\t\tlong start=12418*1000*60;\n\t\tlong end=912518*1000*60;\n\t\tdb.insertEvent(\"t1\",\"This is a tester\",start,end,\"Test1\",\"Somewhere\",1231);\n\t\t start=124118*1000*60;\n\t\tend=912518*1000*60;\n\t\tdb.insertEvent(\"t2\",\"This is a tester\",start,end,\"Test1\",\"Somewhere\",674754);\n\t\t start=412418*1000*60;\n\t\tend=912518*1000*60;\n\t\tdb.insertEvent(\"t3\",\"This is a tester\",start,end,\"Test2\",\"Somewhere\",241254);\n\t\tdb.insertEvent(\"t4\",\"This is a tester\",start,end,\"Test2\",\"Somewhere\",5432);\n\t\t start=1924218*1000*60;\n\t\t end=912518*1000*60;\n\t\tdb.insertEvent(\"t5\",\"This is a tester\",start,end,\"Test3\",\"Somewhere\",12);\n\t\t start=124318*1000*60;\n\t\t end=912518*1000*60;\n\t\tdb.insertEvent(\"t6\",\"This is a tester\",start,end,\"Test3\",\"Somewhere\",1241);\n\t\t\n\t\tdb.insertRelation(\"TESTER\",\"Test1\");\n\t\tdb.insertRelation( \"TESTER\",\"Test2\" );\n\t\tdb.insertRelation(\"TESTER\",\"Test3\");\n\t}",
"@Test\n public void addCategory_DatabaseUpdates(){\n int returned = testDatabase.addCategory(category);\n Category retrieved = testDatabase.getCategory(returned);\n assertEquals(\"addCategory - Correct Category Name\", \"Lunch\", retrieved.getName());\n assertEquals(\"addCategory - Set Category ID\", returned, retrieved.getKeyID());\n }",
"@Test\n public void contextLoads() {\n System.out.println(customerRepository.findAllByIdGreaterThanEqualOrderByFirstNameDesc(1L));\n\n //更新数据\n /*Customers customers = customerRepository.findByIdIs(1);\n customers.setFirstName(\"alan\");\n customerRepository.save(customers);*/\n\n //删除数据\n //customerRepository.delete(3L);\n\n\n //添加数据\n /*Customers customers=new Customers();\n customers.setFirstName(\"hello\");\n customers.setLastName(\"world\");\n customerRepository.save(customers);*/\n }",
"private void insertTestUsers() {\n\t\tinitDb();\n\t\tinsertUser(\"aaa\", \"11\");\n\t\tinsertUser(\"bbb\", \"22\");\n\t\tinsertUser(\"ccc\", \"33\");\n\t}",
"public void testMatchCRUD() {\n assertFalse(dbHelper.mMatchTable.hasData());\n\n // Create\n\n // Read\n\n // Update\n\n // Delete\n dbHelper.mMatchTable.deleteAll();\n assertFalse(dbHelper.mMatchTable.hasData());\n }",
"@Test\r\n\tpublic void createAndRetrieveStudent() {\n\t\tStudent duke = Student.find.where().eq(\"studentId\", 1).findUnique();\r\n\r\n\t\t// Check whether inMemoryDatabase() works\r\n\t\t// If not, more than 2 row might be found\r\n\t\tint totalRow = Student.find.findRowCount();\r\n\t\torg.junit.Assert.assertEquals(2, totalRow);\r\n\r\n\t\torg.junit.Assert.assertNotNull(duke);\r\n\t\torg.junit.Assert.assertEquals(1, duke.studentId.longValue());\r\n\t}",
"public void testdatenErzeugen(){\n\t\tCart_ cart = new Cart_();\n\t\tcart.setUserID(\"123\");\n\t\tcart.setTotalPrice(new BigDecimal(\"15.5\"));\n\t\tcart.setOid(UUID.randomUUID());\n\t\t\n\t\t//insert example data for CartItem_\n\t\tCartItem_ cartItem = new CartItem_();\n\t\tcartItem.setProduct(\"123\");\n\t\tcartItem.setQuantity(1L);\n\t\t\n\t\t// Set relations\n\t\tcart.getItems().add(cartItem);\n\t\t\n\t\t//Save all example Entities in an order that won't cause errors\n\t\tcartRepo.save(cart);\n\t}",
"@Test\n public void addRecipeDirection_DatabaseUpdates(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n int returnedDirection1 = testDatabase.addRecipeDirection(recipeDirection1);\n ArrayList<RecipeDirection> allDirections = testDatabase.getAllRecipeDirections(returnedRecipe);\n RecipeDirection retrieved = new RecipeDirection();\n if(allDirections != null){\n for(int i = 0; i < allDirections.size(); i++){\n if(allDirections.get(i).getKeyID() == returnedDirection1){\n retrieved = allDirections.get(i);\n }\n }\n }\n assertEquals(\"addRecipeDirection - Correct Number\", 1, retrieved.getDirectionNumber(), 0);\n assertEquals(\"addRecipeDirection - Correct Text\", \"TestDirection1\", retrieved.getDirectionText());\n }",
"public void testAll() {\r\n // Test dao.add\r\n ExtraPart part = new ExtraPart();\r\n part.setAttachPoint(new Coordinate(\"312,94\"));\r\n part.setImage(new ImageInfo(\"images/parts/extrapart1.png\",320,240));\r\n\r\n assertEquals(-1, part.getId());\r\n assertTrue(dao.add(part));\r\n assertTrue(part.getId() >= 0);\r\n\r\n // Test dao.getAll\r\n ArrayList<ExtraPart> parts = dao.getAll();\r\n assertEquals(1, parts.size());\r\n ExtraPart copy = parts.iterator().next();\r\n assertEquals(part.getId(), copy.getId());\r\n assertEquals(part.getAttachPoint(), copy.getAttachPoint());\r\n assertEquals(part.getImage(), copy.getImage());\r\n }",
"@Test\n void insertSuccess() {\n int insertedCarId;\n\n //Get User\n GenericDao<User> userDao = new GenericDao(User.class);\n User user = userDao.getById(1);\n\n //Create Inserted Car\n Car insertedCar = new Car(user,\"2016\",\"Honda\",\"Civic\",\"19XFC1F35GE206053\");\n\n //Save Inserted Car\n insertedCarId = carDao.insert(insertedCar);\n\n //Get Saved Car\n Car retrievedCar = carDao.getById(insertedCarId);\n assertNotNull(retrievedCar);\n\n //Compare Cars\n assertEquals(insertedCar,retrievedCar);\n }",
"@Test\n public void insertTaskAndGetTasks() {\n mDatabase.taskDao().insertTask(TASK);\n\n // When getting the tasks from the database\n List<Task> tasks = mDatabase.taskDao().getTasks();\n\n // There is only 1 task in the database\n assertThat(tasks.size(), is(1));\n // The loaded data contains the expected values\n assertTask(tasks.get(0), \"id\", \"title\", \"description\", true);\n }",
"@Test\n void getAllNotesSuccess() {\n List<Note> notes = noteDao.getAll();\n assertEquals(2, notes.size());\n }",
"@Test\n public void getCategory_CorrectInformation(){\n int returned = testDatabase.addCategory(category);\n Category retrieved = testDatabase.getCategory(returned);\n assertEquals(\"getCategory - Correct Name\", \"Lunch\", retrieved.getName());\n assertEquals(\"getCategory - Correct ID\", returned, retrieved.getKeyID());\n }",
"@Override\r\n public void setUp() throws Exception {\r\n super.setUp();\r\n\r\n dbOpenHelper = new DbOpenHelper(getContext());\r\n\r\n db = dbOpenHelper.getWritableDatabase();\r\n db.beginTransaction();\r\n dao = new ExtraPartsDAO(db);\r\n }",
"@Before\n\tpublic void fillSomeDataIntoOurDb() {\n\t\tentityManager.persist(ago);\n\t\tentityManager.persist(teacherAgo);\n\t\tentityManager.persist(agoSubject);\n\t}",
"@Test\n void add() {\n List<User> userList = Arrays.asList(\n new User(1L, \"star\", 20, \"123456\"),\n new User(2L, \"green\", 21, \"123456\"),\n new User(3L, \"red\", 22, \"123456\"),\n new User(4L, \"blue\", 23, \"123456\"),\n new User(5L, \"yellow\", 24, \"123456\"),\n new User(6L, \"black\", 26, \"123456\")\n );\n userRepository.saveAll(userList);\n }",
"static void testSavingDAO() {\n }",
"@Override\n\t\t\tpublic TestEntity addTest(TestEntity test) \n\t\t\t{\t\n\t\t\t\t\ttest = testDao.save(test);\n\t\t\t\t\treturn test;\n\t\t\t}",
"@Test\n public void shouldCreateEpiDataTravel() {\n assertThat(DatabaseHelper.getEpiDataTravelDao().queryForAll().size(), is(0));\n\n Case caze = TestEntityCreator.createCase();\n TestEntityCreator.createEpiDataTravel(caze);\n\n // Assure that the burial has been successfully created\n assertThat(DatabaseHelper.getEpiDataTravelDao().queryForAll().size(), is(1));\n }",
"@Test\n void insertWithTripSuccess() {\n String newUserFirst = \"Dave\";\n String newUserLast = \"Bowman\";\n String newUserEmail = \"[email protected]\";\n String newUserUname = \"dbowman1\";\n String newUserPassword = \"Supersecret2!\";\n String tripCityLoc = \"MILWWI\";\n int tripCount = 6;\n String tripRating = \"5\";\n String tripComment = \"Definitely worth a second look\";\n Date today = new Date();\n User newUser = new User(newUserFirst, newUserLast, newUserEmail, newUserUname, newUserPassword, today);\n //Usertrip newUserTrip = new Usertrip(newUser, tripCityLoc, tripCount, tripRating, tripComment, today);\n //newUser.addTrip(newUserTrip);\n //int id = dao.insert(newUser);\n //assertNotEquals(0, id);\n //User insertedUser = (User) dao.getById(id);\n //assertNotNull(insertedUser);\n //assertEquals(\"dbowman1\", insertedUser.getUserName());\n //assertEquals(1, insertedUser.getUsertrips().size());\n\n }",
"@Test\n public void testAddOrder() {\n Order addedOrder = new Order();\n\n addedOrder.setOrderNumber(1);\n addedOrder.setOrderDate(LocalDate.parse(\"1900-01-01\"));\n addedOrder.setCustomer(\"Add Test\");\n addedOrder.setTax(new Tax(\"OH\", new BigDecimal(\"6.25\")));\n addedOrder.setProduct(new Product(\"Wood\", new BigDecimal(\"5.15\"), new BigDecimal(\"4.75\")));\n addedOrder.setArea(new BigDecimal(\"100.00\"));\n addedOrder.setMaterialCost(new BigDecimal(\"515.00\"));\n addedOrder.setLaborCost(new BigDecimal(\"475.00\"));\n addedOrder.setTaxCost(new BigDecimal(\"61.88\"));\n addedOrder.setTotal(new BigDecimal(\"1051.88\"));\n\n dao.addOrder(addedOrder);\n\n Order daoOrder = dao.getAllOrders().get(0);\n\n assertEquals(addedOrder, daoOrder);\n }",
"@Test\n void getAllSuccess() {\n List<User> Users = dao.getAll();\n assertEquals(2, Users.size());\n }",
"@Test\n\tpublic void test02() {\n\t\t\tUser user1 = new User(\"megan\");\n\t\t\t\n\t\t\tuser1.setName(\"Name1\");\n\t\t\tassertEquals(\"Name1\", user1.getName());\n\t\t\t\n\t\t//\tdb.addRestaurant(rest1);\n\t\t}",
"public void testModel(Context context) {\n // insert our test records into the database\n MovieDBHelper dbHelper = new MovieDBHelper(context);\n SQLiteDatabase db = dbHelper.getWritableDatabase();\n\n\n ContentValues movieValues = TestUtilities.createMovieValues();\n long movieRowId = db.insert(MovieContract.MovieEntry.TABLE_NAME, null, movieValues);\n // Verify we got a row back.\n assertTrue(\"Error: Failure to insert records into movie table\", movieRowId != -1);\n\n ContentValues trailerValues = TestUtilities.createTrailerValues();\n long trailerRowId = db.insert(MovieContract.TrailerEntry.TABLE_NAME, null, trailerValues);\n // Verify we got a row back.\n assertTrue(\"Error: Failure to insert trailer records\", trailerRowId != -1);\n\n //[uery the database and receive a Cursor back\n Cursor cursor = db.query(MovieContract.MovieEntry.TABLE_NAME, // Table to Query\n null, // all columns\n null, // Columns for the \"where\" clause\n null, // Values for the \"where\" clause\n null, // columns to group by\n null, // columns to filter by row groups\n null // sort order\n );\n // Move the cursor to a valid database row\n assertTrue(\"Error: No Records returned from location query\", cursor.moveToFirst());\n\n // Validate data in resulting Cursor with the original ContentValues\n TestUtilities.validateCurrentRecord(\"Error: Movie Query Validation Failed\", cursor, movieValues);\n\n\n // Move the cursor to demonstrate that there is only one record in the database\n assertFalse(\"Error: More than one record returned from location query\",\n cursor.moveToNext());\n\n // Finally, close the cursor and database\n cursor.close();\n db.close();\n\n\n }",
"public void setUp() {\n super.setUp();\n dbSessionClearCache();\n if(!compare()) {\n clear();\n populate();\n }\n dbSessionClearCache();\n }",
"@RequestMapping(\"/eDBTest\")\n public String eDBTest(Model model){\n\n System.out.println(\"Creating tables\");\n testRepository.jdbcTemplate.execute(\"drop table customers if exists\");\n testRepository.jdbcTemplate.execute(\"create table customers(\" +\n \"id serial, first_name varchar(255), last_name varchar(255))\");\n\n\n String[] names = \"John Woo;Jeff Dean;Josh Bloch;Josh Long\".split(\";\");\n for (String fullname : names) {\n String[] name = fullname.split(\" \");\n System.out.printf(\"Inserting customer record for %s %s\\n\", name[0], name[1]);\n testRepository.jdbcTemplate.update(\n \"INSERT INTO customers(first_name,last_name) values(?,?)\",\n name[0], name[1]);\n }\n\n List<Customer> customers = testRepository.getAllCustomers();\n customers.forEach(System.out::println);\n model.addAttribute(\"customers\", customers);\n\n return \"customers\";\n }",
"@Test\n @Order(3)\n @Transactional\n void shouldFindThemAll() throws Exception {\n mockMvc.perform(MockMvcRequestBuilders.get(INDEX))\n .andExpect(status().isOk())\n .andExpect(status().is2xxSuccessful())\n .andExpect(view().name(\"profesor-todos\"))\n .andExpect(model().attributeExists(\"profesores\"))\n .andExpect(model().hasNoErrors())\n ;\n }",
"@Test\n\tpublic void testMainScenario() {\n\t\tProject project = this.db.project().create(\"Test project\", 200, \"13-05-2014\", null);\n\n//Test #1\t\t\n\t\tassertEquals(project.getActivities().size(), 0);\n\t\tassertEquals(project.getEstPercentageCompletion(), 0);\n\t\tassertEquals(project.getEstHoursRemaining(), 200);\n\t\tassertEquals(project.getHourBudget(), 200);\n\t\tassertEquals(project.getHoursAllocatedToActivities(), 0);\n\t\tassertEquals(project.getHoursRegistered(), 0);\n\t\t\n\t\tActivity activity1 = this.db.activity().createProjectActivity(project.getId(), \"activity1\", 10, this.stringDateTimeToLong(\"01-05-2013 01:00\"), this.stringDateTimeToLong(\"01-05-2014 01:00\"));\n\t\tActivity activity2 = this.db.activity().createProjectActivity(project.getId(), \"activity2\", 10, this.stringDateTimeToLong(\"01-05-2013 01:00\"), this.stringDateTimeToLong(\"01-05-2014 01:00\"));\n\n//Test #2\t\t\n\t\tassertEquals(project.getActivities().size(), 2);\n\t\tassertEquals(project.getEstPercentageCompletion(), 0);\n\t\tassertEquals(project.getEstHoursRemaining(), 200);\n\t\tassertEquals(project.getHourBudget(), 200);\n\t\tassertEquals(project.getHoursAllocatedToActivities(), 20);\n\t\tassertEquals(project.getHoursRegistered(), 0);\n\t\t\n\t\tDeveloper developer = this.db.developer().readByInitials(\"JL\").get(0);\n\t\tDeveloper developer2 = this.db.developer().readByInitials(\"PM\").get(0);\n\t\tDeveloper developer3 = this.db.developer().readByInitials(\"GH\").get(0);\n\t\tDeveloper developer4 = this.db.developer().readByInitials(\"RS\").get(0);\n\t\tactivity1.addDeveloper(developer);\n\t\tactivity1.addDeveloper(developer2);\n\t\tactivity1.addDeveloper(developer3);\n\t\tactivity1.addDeveloper(developer4);\n\n//Test #3\n\t\t//Tests that the initials of all developers are stored correctly\t\t\n\t\tassertEquals(activity1.getAllDevsInitials(),\"JL,PM,GH,RS\");\n\t\tassertEquals(activity1.getAllDevsInitials() == \"The Beatles\", false); //Please fail!\n\t\t\n\t\tthis.db.registerTime().create(this.stringDateTimeToLong(\"11-05-2013 06:30\"), this.stringDateTimeToLong(\"11-05-2013 09:30\"), developer.getId(), activity1.getId(), false);\n\t\tthis.db.registerTime().create(this.stringDateTimeToLong(\"11-05-2013 06:30\"), this.stringDateTimeToLong(\"11-05-2013 09:30\"), developer2.getId(), activity1.getId(), false);\n\t\t\n\t\t//Showed in the project maintainance view, and is relevant to the report\n\t\tassertEquals(activity1.getHoursRegistered(),6);\n\t\t\n//Test #4\n\t\t//Tests normal registration\t\t\n\t\tassertEquals(project.getEstPercentageCompletion(), 3);\n\t\tassertEquals(project.getEstHoursRemaining(), 194);\n\t\tassertEquals(project.getHourBudget(), 200);\n\t\tassertEquals(project.getHoursAllocatedToActivities(), 20);\n\t\tassertEquals(project.getHoursRegistered(), 6);\n\t\t\n\t\tthis.db.registerTime().create(this.stringDateTimeToLong(\"12-05-2013 06:30\"), this.stringDateTimeToLong(\"12-05-2013 09:30\"), developer3.getId(), activity2.getId(), true);\n\t\tthis.db.registerTime().create(this.stringDateTimeToLong(\"12-05-2013 06:30\"), this.stringDateTimeToLong(\"12-05-2013 09:30\"), developer4.getId(), activity2.getId(), true);\n\n//Test #5\n\t\t//Tests that assits also count\t\t\n\t\tassertEquals(project.getEstPercentageCompletion(), 6);\n\t\tassertEquals(project.getEstHoursRemaining(), 188);\n\t\tassertEquals(project.getHourBudget(), 200);\n\t\tassertEquals(project.getHoursAllocatedToActivities(), 20);\n\t\tassertEquals(project.getHoursRegistered(), 12);\n\t}",
"@Test\r\n public void testAddOrder() throws FlooringMasteryPersistenceException{\r\n firstTest = order1();\r\n secondTest = order2();\r\n\r\n assertEquals(firstTest, dao.getOrder(orderList, 1));\r\n\r\n assertEquals(secondTest, dao.getOrder(orderList, 2));\r\n\r\n }",
"private void addSomeItemsToDB () throws Exception {\n/*\n Position pos;\n Course course;\n Ingredient ing;\n\n PositionDAO posdao = new PositionDAO();\n CourseDAO coursedao = new CourseDAO();\n IngredientDAO ingdao = new IngredientDAO();\n\n ing = new Ingredient(\"Mozzarella\", 10,30);\n ingdao.insert(ing);\n\n // Salads, Desserts, Main course, Drinks\n pos = new Position(\"Pizza\");\n posdao.insert(pos);\n\n course = new Course(\"Salads\", \"Greek\", \"Cucumber\", \"Tomato\", \"Feta\");\n coursedao.insert(course);\n\n ing = new Ingredient(\"-\", 0,0);\n ingdao.insert(ing);\n */\n }",
"@Before\n public void initDb() {\n mDatabase = Room.inMemoryDatabaseBuilder(InstrumentationRegistry.getContext(),\n ToDoDatabase.class).build();\n }",
"@Test\n void getAllCarsSuccess() {\n List<Car> cars = carDao.getAll();\n assertNotNull(cars);\n assertEquals(1, cars.size());\n }",
"@Test\n\tpublic void test01() {\n\t\t\tUser user1 = new User(\"megan\");\n\t\t\t\n\t\t\tuser1.setUrl(\"url1\");\n\t\t\tassertEquals(\"url1\", user1.getUrl());\n\t\t\t\n\t\t//\tdb.addRestaurant(rest1);\n\t\t}",
"@Test\n public void queryTest() {\n // TODO: test query\n }",
"@Test\n public void testSaveMusic(){\n\n List<Media> movies = mediaService.findAll(\"movie\");\n\n\n/*\n //save product, verify has ID value after save\n assertNull(product.getId()); //null before save\n productRepository.save(product);\n assertNotNull(product.getId()); //not null after save\n //fetch from DB\n Product fetchedProduct = productRepository.findOne(product.getId());\n\n //should not be null\n assertNotNull(fetchedProduct);\n\n //should equal\n assertEquals(product.getId(), fetchedProduct.getId());\n assertEquals(product.getDescription(), fetchedProduct.getDescription());\n\n //update description and save\n fetchedProduct.setDescription(\"New Description\");\n productRepository.save(fetchedProduct);\n\n //get from DB, should be updated\n Product fetchedUpdatedProduct = productRepository.findOne(fetchedProduct.getId());\n assertEquals(fetchedProduct.getDescription(), fetchedUpdatedProduct.getDescription());\n\n //verify count of products in DB\n long productCount = productRepository.count();\n assertEquals(productCount, 1);\n\n //get all products, list should only have one\n Iterable<Product> products = productRepository.findAll();\n\n int count = 0;\n\n for(Product p : products){\n count++;\n }\n\n assertEquals(count, 1);\n */\n }",
"@Before\n public void setUp() {\n //clearDbData();//having some trouble\n }",
"@Test\n void getByIdSuccess() {\n //Get User\n GenericDao<User> userDao = new GenericDao(User.class);\n User user = userDao.getById(2);\n\n //Create Test Car\n Car testCar = new Car(1,user,\"2016\",\"Jeep\",\"Wrangler\",\"1C4BJWFG2GL133333\");\n\n //Ignore Create/Update times\n testCar.setCreateTime(null);\n testCar.setUpdateTime(null);\n\n //Get Existing Car\n Car retrievedCar = carDao.getById(1);\n assertNotNull(retrievedCar);\n\n //Compare Cars\n assertEquals(testCar,retrievedCar);\n }",
"@Test\n void getAllOrdersSuccess() {\n List<Order> orders = dao.getAllOrders();\n assertEquals(3, orders.size());\n }",
"@Test\n public void getAllCoffee() {\n Roaster roaster = new Roaster();\n roaster.setName(\"Roaster 1\");\n roaster.setStreet(\"123 Test Lane\");\n roaster.setCity(\"Crossvile\");\n roaster.setState(\"TN\");\n roaster.setPostal_code(\"38555\");\n roaster.setPhone(\"9312005591\");\n roaster.setEmail(\"[email protected]\");\n roaster.setNote(\"Test Note for Roaster 1\");\n roaster = roasterDao.addRoaster(roaster);\n\n // Create and add coffee1 to the database\n Coffee coffee1 = new Coffee();\n coffee1.setRoaster_id(roaster.getRoaster_id());\n coffee1.setName(\"Starbucks House Blend\");\n coffee1.setCount(10);\n coffee1.setUnit_price(new BigDecimal(\"12.50\"));\n coffee1.setDescription(\"Medium Brew Coffee\");\n coffee1.setType(\"Regular\");\n coffeeDao.addCoffee(coffee1);\n\n // Create and add coffee2 to the database\n Coffee coffee2 = new Coffee();\n coffee2.setRoaster_id(roaster.getRoaster_id());\n coffee2.setName(\"Carabou Coffee\");\n coffee2.setCount(20);\n coffee2.setUnit_price(new BigDecimal(\"11.00\"));\n coffee2.setDescription(\"Light Brew Coffee\");\n coffee2.setType(\"Special\");\n coffeeDao.addCoffee(coffee2);\n\n // Get all coffee entries from the database\n List<Coffee> coffeeList = coffeeDao.getAllCoffee();\n\n // Test that the getAllCoffee() method works correctly\n assertEquals(2, coffeeList.size());\n }",
"@Test\n public void testInsert() throws Exception {\n // create citation entites to reflect the change that happens after calling edit\n Citation entity = getSampleCitation();\n\n // pretend the entity was inserted \n doNothing().when(Service).insertCitation(any(Citation.class));\n\n // call insert\n ModelAndView mav = Controller.insert(entity.getPurl(),\n entity.getUrl(),\n entity.getErc(),\n entity.getWho(),\n entity.getWhat(),\n entity.getDate());\n\n // test to see that the correct view is returned\n Assert.assertEquals(\"result\", mav.getViewName());\n\n // test to see that Json is formated properly\n Map<String, Object> map = mav.getModel();\n String jsonObject = (String) map.get(\"message\");\n testJsonObject(jsonObject, entity);\n }",
"@Test\n public void testSave() {\n List<User> userList = new ArrayList<>();\n \n User user1 = new User(\"Claire\", \"Claire55\");\n userList.add(user1);\n \n User user2 = new User(\"Todd\", \"Todd34\");\n userList.add(user2);\n \n User user3 = new User(\"Jacob\", \"Jacob66\");\n userList.add(user3);\n \n userStore.save(userList);\n \n userList = userStore.load();\n assertEquals(3, userList.size());\n }",
"@Test\n public void shoppingListSavesLocally() throws Exception {\n }",
"@Test\n public void shouldCreatePreviousHospitalization() {\n assertThat(DatabaseHelper.getPreviousHospitalizationDao().queryForAll().size(), is(0));\n\n Case caze = TestEntityCreator.createCase();\n TestEntityCreator.createPreviousHospitalization(caze);\n\n // Assure that the previous hospitalization has been successfully created\n assertThat(DatabaseHelper.getPreviousHospitalizationDao().queryForAll().size(), is(1));\n }",
"@Test\r\n public void saveUserShouldCreateNewRowInDB(){\n userDaoJDBCTemplate.delete(38);\r\n userDaoJDBCTemplate.delete(40);\r\n userDaoJDBCTemplate.deleteByName(\"admin3\");\r\n userDaoJDBCTemplate.deleteByName(\"admin4\");\r\n }",
"@Test\n @DisplayName(\"Testataan kaikkien tilausten haku\")\n void getAllReservations() {\n assertEquals(0, reservationsDao.getAllReservations().size());\n\n TablesEntity table1 = new TablesEntity();\n table1.setSeats(2);\n tablesDao.createTable(table1);\n // Test that returns the same number as created reservations\n ReservationsEntity firstReservation = new ReservationsEntity(\"amal\",\"46111222\", new Date(System.currentTimeMillis()), table1.getId(),new Time(1000),new Time(2000));\n reservationsDao.createReservation(firstReservation);\n\n TablesEntity table2 = new TablesEntity();\n table2.setSeats(2);\n tablesDao.createTable(table2);\n reservationsDao.createReservation(new ReservationsEntity(\"juho\", \"46555444\", new Date(System.currentTimeMillis()), table2.getId(), new Time(1000),new Time(2000)));\n\n List<ReservationsEntity> reservations = reservationsDao.getAllReservations();\n assertEquals(2, reservations.size());\n assertEquals(firstReservation, reservations.get(0));\n }",
"@Test\n public void addRecipe_CorrectInformation(){\n int returned = testDatabase.addRecipe(testRecipe);\n Recipe retrieved = testDatabase.getRecipe(returned);\n\n // Check all recipe fields are accurate\n assertEquals(\"addRecipe - Correct Title\", recipeTitle, retrieved.getTitle());\n assertEquals(\"addRecipe - Correct Servings\", 1, retrieved.getServings(), 0);\n assertEquals(\"addRecipe - Correct prep_time\", 30, retrieved.getPrep_time(), 0);\n assertEquals(\"addRecipe - Correct total_time\", 60, retrieved.getTotal_time(), 0);\n assertEquals(\"addRecipe - Correct Favorited\", false, retrieved.getFavorited());\n assertEquals(\"addRecipe - Correct Ingredient Unit\", \"cups\", retrieved.getIngredientList().get(0).getUnit());\n assertEquals(\"addRecipe - Correct Ingredient Quantity\", 2.0, retrieved.getIngredientList().get(0).getQuantity(), 0);\n assertEquals(\"addRecipe - Correct Ingredient Details\", \"White Flour\", retrieved.getIngredientList().get(0).getDetails());\n assertEquals(\"addRecipe - Correct First Direction Number\", 1, retrieved.getDirectionsList().get(0).getDirectionNumber());\n assertEquals(\"addRecipe - Correct First Direction Text\", \"TestDirection1\", retrieved.getDirectionsList().get(0).getDirectionText());\n assertEquals(\"addRecipe - Correct Second Direction Number\", 2, retrieved.getDirectionsList().get(1).getDirectionNumber());\n assertEquals(\"addRecipe - Correct Second Direction Text\", \"TestDirection2\", retrieved.getDirectionsList().get(1).getDirectionText());\n }",
"@Before(stages = LifecycleStage.BindingAndValidation, on = {\"edit\", \"save\"})\r\n public void loadExcursionFromDatabase() {\r\n String ids = getContext().getRequest().getParameter(\"excursion.id\");\r\n if (ids == null) return;\r\n excursion = facade.getExcursion(Long.parseLong(ids));\r\n date = excursion.getExcursionDate().toString(DateTimeFormat.forPattern(pattern));\r\n trips = facade.getAllTrips();\r\n tripId = excursion.getTrip().getId();\r\n }",
"@Before\n public void setUp() {\n EntityManager em = emf.createEntityManager();\n try {\n em.getTransaction().begin();\n //Delete all, since some future test cases might add/change data\n em.createQuery(\"delete from Customer\").executeUpdate();\n //Add our test data\n Customer c1 = new Customer(\"Kurt\", \"Hansen\");\n Customer c2 = new Customer(\"Hans\", \"Jensen\");\n Customer c3 = new Customer(\"Bjarne\", \"Olsen\");\n em.persist(c1);\n em.persist(c2);\n em.persist(c3);\n em.getTransaction().commit();\n } finally {\n em.close();\n }\n }",
"@Test\n public void insert() {\n// int insert = iUserDao.insert(u);\n// System.out.println(u);\n\n }",
"@Test\n\tpublic void testInsertObj() {\n\t}",
"@Test\n void insertSuccess() {\n User newUser = new User(\"testname\",\"testpass\",\"Test\",\"name\",\"[email protected]\");\n UserRoles newRole = new UserRoles(1, \"administrator\", newUser, \"testname\");\n int id = genericDAO.insert(newRole);\n assertNotEquals(0,id);\n UserRoles insertedRole = (UserRoles)genericDAO.getByID(id);\n assertEquals(\"administrator\", insertedRole.getRoleName(), \"role is not equal\");\n }",
"public FakeDatabase() {\n\t\t\n\t\t// Add initial data\n\t\t\n//\t\tSystem.out.println(authorList.size() + \" authors\");\n//\t\tSystem.out.println(bookList.size() + \" books\");\n\t}",
"@Test\n public void testGetAllPharmacies() throws Exception {\n System.out.println(\"getAllPharmacies\");\n\n ManagePharmaciesController instance = new ManagePharmaciesController();\n LinkedList<PharmacyDTO> expResult= new LinkedList<>();\n LinkedList<PharmacyDTO> result = instance.getAllPharmacies();\n expResult.add(getPharmacyDTOTest(\"a\"));\n expResult.add(getPharmacyDTOTest(\"b\"));\n expResult.add(getPharmacyDTOTest(\"c\"));\n\n LinkedList<Pharmacy> resultDB = new LinkedList<>();\n resultDB.add(convertPharmacyDTO(getPharmacyDTOTest(\"a\")));\n resultDB.add(convertPharmacyDTO(getPharmacyDTOTest(\"b\")));\n resultDB.add(convertPharmacyDTO(getPharmacyDTOTest(\"c\")));\n PharmacyDB db = Mockito.mock(PharmacyDB.class);\n PharmaDeliveriesApp.getInstance().getPharmacyService().setPharmacyDB(db);\n when(db.getAllPharmacies()).thenReturn(resultDB);\n result = instance.getAllPharmacies();\n Assertions.assertEquals(result.size(), expResult.size());\n Assertions.assertEquals(result.get(0).getName(), expResult.get(0).getName());\n Assertions.assertEquals(result.get(1).getName(), expResult.get(1).getName());\n Assertions.assertEquals(result.get(2).getName(), expResult.get(2).getName());\n \n// int i = 0;\n// for(PharmacyDTO p : result){\n// Assertions.assertEquals(p.getName(), expResult.get(i).getName());\n// i++;\n// }\n \n when(db.getAllPharmacies()).thenReturn(null);\n Assertions.assertNull(instance.getAllPharmacies());\n }",
"private void testDB(){\n DB=new LinkedList<>(); \n DB.add(new Offer(\"ID1\",\"AGV923\",\"Nico\",\"Leo\",\"Salvo\",\"\"));\n DB.add(new Offer(\"ID2\",\"ADJ325\",\"Tizio\", \"Caio\", \"Sempronio\",\"\"));\n DB.add(new Offer(\"ID3\",\"T56G2G\",\"Antonella\", \"Daniele\",\"\",\"\"));\n }",
"@Test\n public void getAllRecipeCategories_RecipeInfo(){\n int returned = testDatabase.addRecipe(testRecipe);\n ArrayList<RecipeCategory> allCategories = testDatabase.getAllRecipeCategories(returned);\n RecipeCategory retrieved = allCategories.get(allCategories.size()-1);\n //Retrieved should now contain all the same information as testRecipe\n assertEquals(\"getAllRecipeCategories - Correct Recipe ID\", returned, retrieved.getRecipeID());\n assertEquals(\"getAllRecipeCategories - Correct Category ID\", categoryID, retrieved.getCategoryID());\n }",
"@Test\n public void getAllRecipes_RecipeInfo(){\n int returned = testDatabase.addRecipe(testRecipe);\n ArrayList<Recipe> allRecipes = testDatabase.getAllRecipes();\n Recipe retrieved = allRecipes.get(allRecipes.size()-1);\n //Retrieved should now contain all the same information as testRecipe\n assertEquals(\"getAllRecipes - Correct Title\", recipeTitle, retrieved.getTitle());\n assertEquals(\"getAllRecipes - Correct Servings\", 1, retrieved.getServings(), 0);\n assertEquals(\"getAllRecipes - Correct Prep Time\", 30, retrieved.getPrep_time(), 0);\n assertEquals(\"getAllRecipes - Correct Total Time\", 60, retrieved.getTotal_time(), 0);\n assertEquals(\"getAllRecipes - Correct Favorited\", false, retrieved.getFavorited());\n }",
"@Test\n public void testAddTravel_ForeignKeyNotFoundException() throws Exception {\n when(databaseMock.createTravel(anyInt(), any(Travel.class)))\n .thenThrow(new ForeignKeyNotFoundException());\n \n mockMVC.perform(post(\"/user/1/travel\")\n .contentType(TestUtil.APPLICATION_JSON_UTF8)\n .content(TestUtil.convertObjectToJsonBytes(dto))\n .header(\"Authorization\", \"1\"))\n .andExpect(status().isNotFound());\n \n verify(databaseMock, times(1)).getUser(anyInt());\n verify(databaseMock, times(1)).createTravel(anyInt(), any(Travel.class));\n verifyNoMoreInteractions(databaseMock);\n }",
"@Test\n void getAllSuccess() {\n // get all the users\n // make sure there are the proper number of users\n List<User> users = genericDao.getAll();\n assertEquals(users.size(), 4);\n }",
"@Test\n @Transactional\n void createLessonTimetableWithExistingId() throws Exception {\n lessonTimetable.setId(1L);\n\n int databaseSizeBeforeCreate = lessonTimetableRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restLessonTimetableMockMvc\n .perform(\n post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(lessonTimetable))\n )\n .andExpect(status().isBadRequest());\n\n // Validate the LessonTimetable in the database\n List<LessonTimetable> lessonTimetableList = lessonTimetableRepository.findAll();\n assertThat(lessonTimetableList).hasSize(databaseSizeBeforeCreate);\n }",
"private DatabaseCustomAccess(Context context) {\n\t\thelper = new SpokaneValleyDatabaseHelper(context);\n\n\t\tsaveInitialPoolLocation(); // save initial pools into database\n\t\tsaveInitialTotalScore(); // create total score in database\n\t\tsaveInitialGameLocation(); // create game location for GPS checking\n\t\tLoadingDatabaseTotalScore();\n\t\tLoadingDatabaseScores();\n\t\tLoadingDatabaseGameLocation();\n\t}",
"@Test\n void getAllUserRolesSuccess() {\n List<UserRoles> userRoles = genericDao.getAll();\n //assert that you get back the right number of results assuming nothing alters the table\n assertEquals(6, userRoles.size());//\n log.info(\"get all userRoles test: all userRoles;\" + genericDao.getAll());\n }",
"@Test\n public void queryUserList() {\n\n User user = new User();\n user.setName(\"lin\");\n\n List<User> users = userDao.queryUserList(user, 0, 5);\n assertEquals(1, users.size());\n\n }",
"@Test\n\t public void testSaveCollection(){\n\t\t try{\n\t\t\t List<Users> users = new ArrayList<Users>();\n\t\t\t users.add( BaseData.getUsers());\n\t\t\t\tusers.add(BaseData.getDBUsers());\n\t\t\t \tdoAnswer(new Answer() {\n\t\t\t \t public Object answer(InvocationOnMock invocation) {\n\t\t\t \t Object[] args = invocation.getArguments();\n\t\t\t \t EntityManager mock = (EntityManager) invocation.getMock();\n\t\t\t \t return null;\n\t\t\t \t }\n\t\t\t \t }).when(entityManager).persist(users);\n\t\t\t \tuserDao.save(users);\n\t\t}catch(DataAcessException se){\n\t\t\t logger.error(\"error at service layer while testing save:.\",se);\n\t\t }\n\t }",
"@Test\n public void test1Insert() {\n\n System.out.println(\"Prueba de SpecialityDAO\");\n SpecialityFactory factory = new MysqlSpecialityDAOFactry();\n SpecialityDAO dao = factory.create();\n assertEquals(dao.insert(spec), 1);\n \n }",
"@Order(9)\n\t@Test\n\tpublic void Attempt_AddUser() throws SQLException\n\t{\n\t\tUser testUser = new User(\"Test\",\"Drone\",\"TestCase\",\"NoOne\",\"CaresAboutthis\",\"[email protected]\");\n\t\tboolean Expected = true, actual = us.addUser(testUser);\n\t\tassertEquals(Expected,actual);\n\t}",
"@Before\n public void setUp() {\n\n EntityManager em = emf.createEntityManager();\n try {\n em.getTransaction().begin();\n //Delete all, since some future test cases might add/change data\n em.createQuery(\"delete from Car\").executeUpdate();\n //Add our test data\n Car e1 = new Car(\"Volvo\");\n Car e2 = new Car(\"WW\");\n em.persist(e1);\n em.persist(e2);\n em.getTransaction().commit();\n } finally {\n em.close();\n }\n }",
"@Test\r\n public void testInsert() {\r\n assertTrue(false);\r\n }",
"@Test\n public void getAllRecordsTest() {\n FileMetaData fileMetaData = new FileMetaData();\n fileMetaData.setAuthorName(\"Puneet\");\n fileMetaData.setFileName(\"resum2\");\n fileMetaData.setDescription(\"Attached resume to test upload\");\n fileMetaData.setUploadTimeStamp(DateUtil.getCurrentDate());\n fileMetaDataRepository.saveAndFlush(fileMetaData);\n fileMetaData = new FileMetaData();\n fileMetaData.setAuthorName(\"Puneet1\");\n fileMetaData.setFileName(\"resume3\");\n fileMetaData.setDescription(\"Attached resume to test upload1\");\n fileMetaData.setUploadTimeStamp(DateUtil.getCurrentDate());\n fileMetaDataRepository.saveAndFlush(fileMetaData);\n List<FileMetaData> fileMetaDataList = fileMetaDataRepository.findAll();\n Assert.assertNotNull(fileMetaDataList);\n //Assert.assertEquals(2, fileMetaDataList.size());\n }",
"@Test\n public void shouldCreateEpiDataGathering() {\n assertThat(DatabaseHelper.getEpiDataGatheringDao().queryForAll().size(), is(0));\n\n Case caze = TestEntityCreator.createCase();\n TestEntityCreator.createEpiDataGathering(caze);\n\n // Assure that the burial has been successfully created\n assertThat(DatabaseHelper.getEpiDataGatheringDao().queryForAll().size(), is(1));\n }",
"@Test\n public void getIngredient_CorrectInformation(){\n int returned = testDatabase.addIngredient(ingredient);\n Ingredient retrieved = testDatabase.getIngredient(returned);\n assertEquals(\"getIngredient - Correct Name\", \"Flour\", retrieved.getName());\n assertEquals(\"getIngredient - Correct ID\", returned, retrieved.getKeyID());\n }",
"@Test\n public void createPost() {\n User bob = new User(\"Jasdeep\",\"Madan\",\"JD\",\"[email protected]\",\"password\", \"member\", true, true).save();\n\n //Create a new Category and save it\n Category category = new Category(\"Tech\", \"Some Description\").save();\n\n // Create a new post\n new Article(\"My first post\", \"Hello world\", bob, category, true, null, null).save();\n\n // Test that the post has been created\n assertEquals(1, Article.count());\n\n // Retrieve all posts created by Bob\n List<Article> bobPosts = Article.find(\"byAuthor\", bob).fetch();\n\n // Tests\n assertEquals(1, bobPosts.size());\n Article firstPost = bobPosts.get(0);\n assertNotNull(firstPost);\n assertEquals(bob, firstPost.author);\n assertEquals(\"My first post\", firstPost.title);\n assertEquals(\"Hello world\", firstPost.content);\n assertNotNull(firstPost.submit_date);\n }",
"@Test\n public void testGetAllOrders() {\n Order addedOrder = new Order();\n Order addedOrder2 = new Order();\n\n addedOrder.setOrderNumber(1);\n addedOrder.setOrderDate(LocalDate.parse(\"1900-01-01\"));\n addedOrder.setCustomer(\"Order One\");\n addedOrder.setTax(new Tax(\"OH\", new BigDecimal(\"6.25\")));\n addedOrder.setProduct(new Product(\"Wood\", new BigDecimal(\"5.15\"), new BigDecimal(\"4.75\")));\n addedOrder.setArea(new BigDecimal(\"100.00\"));\n addedOrder.setMaterialCost(new BigDecimal(\"515.00\"));\n addedOrder.setLaborCost(new BigDecimal(\"475.00\"));\n addedOrder.setTaxCost(new BigDecimal(\"61.88\"));\n addedOrder.setTotal(new BigDecimal(\"1051.88\"));\n\n dao.addOrder(addedOrder);\n\n addedOrder2.setOrderNumber(2);\n addedOrder2.setOrderDate(LocalDate.parse(\"1900-01-01\"));\n addedOrder2.setCustomer(\"Order Two\");\n addedOrder2.setTax(new Tax(\"OH\", new BigDecimal(\"6.25\")));\n addedOrder2.setProduct(new Product(\"Wood\", new BigDecimal(\"5.15\"), new BigDecimal(\"4.75\")));\n addedOrder2.setArea(new BigDecimal(\"100.00\"));\n addedOrder2.setMaterialCost(new BigDecimal(\"515.00\"));\n addedOrder2.setLaborCost(new BigDecimal(\"475.00\"));\n addedOrder2.setTaxCost(new BigDecimal(\"61.88\"));\n addedOrder2.setTotal(new BigDecimal(\"1051.88\"));\n\n dao.addOrder(addedOrder2);\n\n assertEquals(2, dao.getAllOrders().size());\n }",
"@Test\n public void addUser(){\n System.out.println(userService.findAllSysUser());\n }",
"@Test\r\n\tpublic void testAddServices(){\r\n\t\tblog = new Blog();\r\n\t\t\r\n\t\tblog.setBlogId(1);\r\n\t\tblog.setBlogName(\"techZealot\");\r\n\t blog.setBlogDescription(\"for technical skills\");\r\n\t\tblog.setBlogStatus(\"approved\");\r\n\t\tblog.setNoOfComments(10);\r\n\t\tblog.setNoOfLikes(10);\r\n\t\tblog.setNoOfViews(12);\r\n\t\tblog.setPostDate(LocalDate.parse(\"2017-04-21\"));\r\n\t\tblog.setUserId(1);\r\n\t\tblog.setUserName(\"bhavna\");\r\n\t\t\r\n\t\tassertEquals(\"Successfully added a product inside the table!\",true,blogDao.addBlog(blog));\r\n\t}",
"@Before\n public void setupTests()\n {\n Service s1 = new Service();\n s1.setCategory(\"HAIR\");\n\n repository.save(s1);\n\n }",
"@Test\n @Order(4)\n @Transactional\n void shouldCreateAndFindToModify () throws Exception {\n LinkedMultiValueMap<String, String> materias = new LinkedMultiValueMap<>();\n materias.add(\"materias\", \"2\");\n materias.add(\"materias\", \"3\");\n mockMvc.perform(MockMvcRequestBuilders\n .post(NUEVO)\n .param(\"id\", \"\")\n .param(\"nombre\", \"Tony Stark\")\n .params(materias))\n .andExpect(status().isFound())\n .andExpect(status().is3xxRedirection())\n .andExpect(view().name(\"redirect:\" + INDEX))\n .andExpect(model().hasNoErrors())\n ;\n Profesor profesor = profesorService.findLastInserted();\n assertThat(profesor.getNombre()).isEqualTo(\"Tony Stark\");\n assertThat(profesor.getMaterias()).isNotNull();\n this.id = profesor.getId();\n //////////\n mockMvc.perform(MockMvcRequestBuilders.get(MODIFICAR, this.id))\n .andExpect(status().isOk())\n .andExpect(status().is2xxSuccessful())\n .andExpect(view().name(\"profesor-modificar\"))\n .andExpect(model().attributeExists(\"profesor\"))\n .andExpect(model().attributeExists(\"materiasWithNoProfesor\"))\n .andExpect(model().hasNoErrors())\n ;\n ///////////////////\n\n }",
"@Test\n void insertSuccess() {\n Date today = new Date();\n User newUser = new User(\"Artemis\", \"Jimmers\", \"[email protected]\", \"ajimmers\", \"supersecret2\", today);\n int id = dao.insert(newUser);\n assertNotEquals(0, id);\n User insertedUser = (User) dao.getById(id);\n assertNotNull(insertedUser);\n assertEquals(\"Jimmers\", insertedUser.getLastName());\n //Could continue comparing all values, but\n //it may make sense to use .equals()\n }",
"@Test\n\t@DatabaseSetup(value = \"classpath:databaseEntries.xml\", type = DatabaseOperation.CLEAN_INSERT)\n\tpublic void testGetLecturer(){\n\t\t\n\t\t//Expected Name and Surname\n\t\tString expectedLecturerName= \"John\";\n\t\tString expectedLecturerSurname= \"Murphy\";\n\t\t\n\t\t//Test Expected vs Actual(Name and Surname)\n\t\tlecturerJdbcDaoSupport = (LecturerJdbcDaoSupport) autoWireContext.getBean(\"lecturerJdbcDaoSupport\");\n\t\tLecturer actualLecturer= lecturerJdbcDaoSupport.getLecturer(\"L002\");\n\t\tString actualLecturerName= actualLecturer.getFirstName();\n\t\tString actualLecturerSurname= actualLecturer.getLastName();\n\t\tassertEquals(expectedLecturerName, actualLecturerName);\n\t\tassertEquals(expectedLecturerSurname, actualLecturerSurname);\n\t}",
"@Test\n public void testInserts() throws ConnectionException {\n //adding test ProviderEntry to database\n ProviderEntry pe = MariaDbConnectorTest.instance.findProviderEntryByName(\"test\");\n ProviderEntry ppe = MariaDbConnectorTest.instance.findProviderEntryByName(\"test\");\n assertEquals(pe, ppe); // Passes if insert succeeded\n \n \n //adding test RouteEntry to database\n RouteEntry re = new RouteEntry();\n re.setName(\"test\");\n re.setDescription(\"test\");\n MariaDbConnectorTest.instance.insert(re);\n RouteEntry rre = MariaDbConnectorTest.instance.findRouteEntryByName(\"test\");\n assertEquals(re, rre); // Passes if insert has succeeded\n \n //adding test DataEntry to database\n int traveltime = 1234569;\n DataEntry de = new DataEntry(traveltime, rre, ppe);\n MariaDbConnectorTest.instance.insert(de);\n System.out.println(ppe.getId());\n System.out.println(rre.getId());\n System.out.println(de.getTimestamp());\n DataEntry dde = MariaDbConnectorTest.instance.findDataEntryByID(ppe.getId(), rre.getId(), de.getTimestamp());\n //assertEquals(de, dde); // Passes if insert has succeeded\n \n // Removing all added testdata from database. Removing route & providers suffices\n MariaDbConnectorTest.instance.delete(ppe);\n MariaDbConnectorTest.instance.delete(rre);\n \n // Check if the provider & route objects are removed from the database\n RouteEntry rrre = MariaDbConnectorTest.instance.findRouteEntryByID(rre.getId());\n assertNull(rrre); // Passes if the test RouteEntry object does not exist anymore in the database\n \n ProviderEntry pppe = MariaDbConnectorTest.instance.findProviderEntryByID(ppe.getId());\n assertNull(pppe);\n \n \n \n \n }",
"@Test\n public void testSave() throws Exception {\n IDataSet databaseDataSet = databaseTester.getConnection().createDataSet();\n ITable actualTable = databaseDataSet.getTable(\"employees2\");\n SortedTable sortedActualTable = new SortedTable(actualTable, new String[]{\"ID\"});\n\n // Load expected data from an XML dataset\n IDataSet expectedDataSet = new FlatXmlDataSetBuilder().build(new File(\"src\\\\test\\\\resources\\\\dataset.xml\"));\n ITable expectedTable = expectedDataSet.getTable(\"employees\");\n\n\n // Assert actual database table match expected table\n Assertion.assertEquals(expectedTable, sortedActualTable);\n }",
"public testDatabaseAppController()\n\t{\n\t\tdataController = new testDatabaseController(this);\n\t\tqueryList = new ArrayList<QueryInfo>();\n\t\tappFrame = new testDatabaseFrame(this);\n\t}",
"private void autoPopulateDB() {\r\n User newUser = new User(\"din_djarin\", \"baby_yoda_ftw\");\r\n User secondNew = new User(\"csumb\", \"otters_woo\");\r\n User lastNew = new User(\"username\", \"password\");\r\n\r\n mUserDAO.insert(newUser);\r\n mUserDAO.insert(secondNew);\r\n mUserDAO.insert(lastNew);\r\n }",
"@Before\n\tpublic void setUpDB() {\n\t\tmanagerDAO = new ManagerDAO();\n\t\t// Clean the DB\n\t\tmanagerDAO.deleteAllEmployees();\n\t\tmanagerDAO.deleteAllMembers();\n\t\tmanagerDAO.deleteAllTickets();\n\t\tmanagerDAO.deleteAllSessions();\n\t\tmanagerDAO.deleteAllFilms();\n\t\tmanagerDAO.deleteAllRooms();\n\t\tmanagerDAO.deleteAllSeats();\n\t\t// Fill the DB\n\t\tFilm f1 = new Film(\"Inmersion\", \"Wim Wenders\", 12, 111, \"EE.UU.\");\n\t\tFilm f2 = new Film(\"Pacific Rim: Insurrecion\", \"Steven S. DeKnight\", 7, 110, \"EE.UU.\");\n\t\tFilm f3 = new Film(\"Leo Da Vinci\", \"Sergio Manfio\", 0, 85, \"Italia\");\n\t\tFilm f4 = new Film(\"Campeones\", \"Javier Fesser\", 7, 100, \"España\");\n\t\tFilm f5 = new Film(\"Ready Player One\", \"Steven Spielberg\", 7, 140, \"EE.UU.\");\n\n\t\tEmployee e1 = new Employee(\"e1\", \"Juan\", \"Garcia Perez\", \"e1\", 1500);\n\t\tEmployee e2 = new Employee(\"e2\", \"Maria\", \"Martin Gomez\", \"e2\", 1700);\n\t\tEmployee e3 = new Employee(\"e3\", \"Paco\", \"Perez Gomez\", \"e3\", 1300);\n\t\tEmployee e4 = new Employee(\"e4\", \"Luis\", \"Lozano Esteban\", \"e4\", 1800);\n\t\tEmployee e5 = new Employee(\"e5\", \"Andrea\", \"Hernandez Sarria\", \"e5\", 1500);\n\n\t\tRoom r1 = new Room(1, 60);\n\t\tRoom r2 = new Room(2, 70);\n\t\tRoom r3 = new Room(3, 80);\n\t\tRoom r4 = new Room(4, 60);\n\t\tRoom r5 = new Room();\n\t\tr5.setNumberSeats(60);\n\t\tr5.setRoomNumber(5);\n\n\t\tSeat se1 = new Seat(\"A3\");\n\t\tSeat se2 = new Seat(\"A4\");\n\t\tSeat se3 = new Seat(\"A5\");\n\t\tSeat se4 = new Seat(\"E10\");\n\t\tSeat se5 = new Seat(\"E9\");\n\t\tSeat se6 = new Seat(\"E8\");\n\t\tSeat se7 = new Seat(\"D5\");\n\t\tSeat se8 = new Seat(\"D6\");\n\t\tSeat se9 = new Seat(\"C7\");\n\t\tSeat seA = new Seat(\"B8\");\n\t\tSeat seB = new Seat(\"B9\");\n\t\tSeat seC = new Seat(\"B10\");\n\t\tSeat seD = new Seat(\"F3\");\n\t\tSeat seE = new Seat(\"F4\");\n\t\tSeat seF = new Seat(\"F5\");\n\n\t\tArrayList<Seat> ss1 = new ArrayList<Seat>();\n\t\tss1.add(se1);\n\t\tss1.add(se2);\n\t\tss1.add(se3);\n\n\t\tArrayList<Seat> ss2 = new ArrayList<Seat>();\n\t\tss2.add(se4);\n\t\tss2.add(se5);\n\t\tss2.add(se6);\n\n\t\tArrayList<Seat> ss3 = new ArrayList<Seat>();\n\t\tss3.add(se7);\n\t\tss3.add(se8);\n\n\t\tArrayList<Seat> ss4 = new ArrayList<Seat>();\n\t\tss4.add(se9);\n\n\t\tArrayList<Seat> ss5 = new ArrayList<Seat>();\n\t\tss5.add(seA);\n\t\tss5.add(seB);\n\t\tss5.add(seC);\n\n\t\tArrayList<Seat> ss6 = new ArrayList<Seat>();\n\t\tss6.add(seD);\n\t\tss6.add(seE);\n\t\tss6.add(seF);\n\n\t\tTicket t1 = new Ticket();\n\t\tt1.addSeats(ss1);\n\t\tTicket t2 = new Ticket();\n\t\tt2.addSeats(ss2);\n\t\tTicket t3 = new Ticket();\n\t\tt3.addSeats(ss3);\n\t\tTicket t4 = new Ticket();\n\t\tt4.addSeats(ss4);\n\t\tTicket t5 = new Ticket();\n\t\tt5.addSeats(ss5);\n\t\tTicket t6 = new Ticket();\n\t\tt6.addSeats(ss6);\n\t\n\n\t\tMember m1 = new Member(\"[email protected]\", \"Ariane\", \"Fernandez\", \"ariane\", \"26-04-1997\", 0);\n\t\tMember m2 = new Member(\"[email protected]\", \"Unai\", \"Bermejo\", \"unai\", \"23-08-1997\", 0);\n\t\tMember m3 = new Member(\"[email protected]\", \"Ander\", \"Arguinano\", \"ander\", \"26-10-1997\", 20);\n\t\tMember m4 = new Member(\"[email protected]\", \"Inigo\", \"Garcia\", \"inigo\", \"10-02-1997\", 0);\n\t\tMember m5 = new Member(\"[email protected]\", \"Wolfgang \", \"Fischer\", \"wolfgang\", \"05-09-1997\", 0);\n\n\t\tm1.addTicket(t1);\n\t\tm1.addTicket(t2);\n\t\tm3.addTicket(t3);\n\t\tm4.addTicket(t5);\n\t\tm5.addTicket(t6);\n\t\tm2.addTicket(t4);\n\n\t\tSession s1 = new Session(\"S1\", \"13-04-2018\", \"17:00\", (float) 8.90);\n\t\tSession s2 = new Session(\"S2\", \"13-04-2018\", \"18:00\", (float) 8.90);\n\t\tSession s3 = new Session(\"S3\", \"13-04-2018\", \"19:00\", (float) 5.90);\n\n\t\ts1.addTicket(t1);\n\t\ts2.addTicket(t2);\n\t\ts1.addTicket(t3);\n\t\ts2.addTicket(t4);\n\t\ts3.addTicket(t5);\n\t\ts1.addTicket(t6);\n\n\t\tr1.addSession(s1);\n\t\tr2.addSession(s2);\n\t\tr3.addSession(s3);\n\n\t\tf1.addSession(s1);\n\t\tf1.addSession(s2);\n\t\tf1.addSession(s3);\n\n\t\tSession s4 = new Session(\"S4\", \"14-04-2018\", \"17:00\", (float) 8.90);\n\t\tSession s5 = new Session(\"S5\", \"14-04-2018\", \"20:00\", (float) 7.50);\n\t\tSession s6 = new Session(\"S6\", \"14-04-2018\", \"22:00\", (float) 10.90);\n\n\t\tr4.addSession(s4);\n\t\tr5.addSession(s5);\n\t\tr1.addSession(s6);\n\n\t\tf2.addSession(s4);\n\t\tf2.addSession(s5);\n\t\tf2.addSession(s6);\n\n\t\tSession s7 = new Session(\"S7\", \"15-04-2018\", \"17:00\", (float) 5.80);\n\t\tSession s8 = new Session(\"S8\", \"15-04-2018\", \"19:00\", (float) 6.60);\n\t\tSession s9 = new Session(\"S9\", \"15-04-2018\", \"22:00\", (float) 4.40);\n\n\t\tr2.addSession(s7);\n\t\tr3.addSession(s8);\n\t\tr4.addSession(s9);\n\n\t\tf3.addSession(s7);\n\t\tf3.addSession(s8);\n\t\tf3.addSession(s9);\n\n\t\tSession sA = new Session(\"S10\", \"13-04-2018\", \"16:00\", (float) 12.90);\n\t\tSession sB = new Session(\"S11\", \"13-04-2018\", \"18:00\", (float) 8.90);\n\t\tSession sC = new Session(\"S12\", \"13-04-2018\", \"20:00\", (float) 6.90);\n\n\t\tr5.addSession(sA);\n\t\tr1.addSession(sB);\n\t\tr2.addSession(sC);\n\n\t\tf4.addSession(sA);\n\t\tf4.addSession(sB);\n\t\tf4.addSession(sC);\n\n\t\tSession sD = new Session(\"S13\", \"15-04-2018\", \"16:00\", (float) 12.90);\n\t\tSession sE = new Session(\"S14\", \"15-04-2018\", \"18:00\", (float) 8.90);\n\t\tSession sF = new Session(\"S15\", \"15-04-2018\", \"20:00\", (float) 6.90);\n\n\t\tr3.addSession(sD);\n\t\tr4.addSession(sE);\n\t\tr5.addSession(sF);\n\n\t\tf5.addSession(sD);\n\t\tf5.addSession(sE);\n\t\tf5.addSession(sF);\n\t\t\n\t\ttry {\t\n\t\t\tmanagerDAO.storeFilm(f1);\n\t\t\tmanagerDAO.storeEmployee(e1);\n\t\t\tmanagerDAO.storeEmployee(e2);\n\t\t\tmanagerDAO.storeEmployee(e3);\n\t\t\tmanagerDAO.storeEmployee(e4);\n\t\t\tmanagerDAO.storeEmployee(e5);\n\t\t} catch(Exception e) {\n\t\t\t\n\t\t}\n\t}",
"@Test\n @Transactional\n void createInternacoesWithExistingId() throws Exception {\n internacoes.setId(1L);\n\n int databaseSizeBeforeCreate = internacoesRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restInternacoesMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(internacoes)))\n .andExpect(status().isBadRequest());\n\n // Validate the Internacoes in the database\n List<Internacoes> internacoesList = internacoesRepository.findAll();\n assertThat(internacoesList).hasSize(databaseSizeBeforeCreate);\n }",
"@Test\n public void testInsert() {\n int resultInt = disciplineDao.insert(disciplineTest);\n // Je pense à le suppr si l'insert à fonctionné\n if(resultInt > 0){\n disciplineTest.setId(resultInt);\n disciplineDao.delete(disciplineTest);\n }\n assertTrue(resultInt > 0);\n }",
"@Test\n public void testHistory(){\n\n userService.insertHistory(\"kaaksd\",\"------sdas\");\n }",
"protected DatabaseEntry getTestPersistentDatabaseEntry() {\n return getTestPersistentDatabaseEntry( null, RandomStringUtils.randomAlphabetic( 10 ) );\n }",
"private void addItem()\n {\n Category category = new Category();\n category.setItemCategory(\"apple\");\n category.setItemDetail(\"iMessage\");\n //int randomNum = ThreadLocalRandom.current().nextInt(0, 500 + 1); weird interaction\n int randomNum = (int)(Math.random() * ((900 - 1) + 1)) + 1;\n category.setUid(randomNum);\n AppDatabase db = Room.databaseBuilder(getApplicationContext(),\n AppDatabase.class, \"database-name\").allowMainThreadQueries().build();\n Log.d(\"addItem\",\"\"+category);\n db.categoryDao().addCategory(category);\n testDatabase();\n\n\n }",
"@Test\n void getAllSuccess() {\n List<RunCategory> categories = dao.getAll();\n assertEquals(13, categories.size());\n }",
"@Test\n public void testInsertData() throws Exception {\n//TODO: Test goes here... \n }",
"@Test\n public void testFindProductByID_1() throws Exception {\n System.out.println(\"findProductByID_1\");\n String id = \"1\";\n Database instance = new Database();\n instance.addProduct(1, new Product(1.0, \"\", 1));\n try{\n assertEquals(instance.findProductByID(id), new Product(1.0, \"\", 1));\n }catch(AssertionError e){\n fail(\"testFindProductByID_1 failed\");\n }\n }",
"@Test\n void userStory1() throws ValidationException, NoShoppingListExist {\n ShoppingListFactory factory = api.createShoppingList();\n factory.setName(\"My Shoopping List\");\n factory.setDescription(\"A short description\");\n ShoppingList list = factory.validateAndCommit();\n\n // Times go on\n\n ShoppingList list2 = api.find(list.getId());\n\n // Test\n\n assertEquals(list.getId(), list2.getId());\n assertEquals(list.getName(), list2.getName());\n assertEquals(list.getDescription(), list2.getDescription());\n }"
]
| [
"0.67534786",
"0.65822726",
"0.64337385",
"0.6311345",
"0.6217106",
"0.620621",
"0.6202508",
"0.619957",
"0.6178337",
"0.6169391",
"0.61558944",
"0.614622",
"0.6140043",
"0.61117125",
"0.61053133",
"0.6071433",
"0.6049612",
"0.60223806",
"0.6014231",
"0.60021234",
"0.60007054",
"0.59993047",
"0.5980636",
"0.597971",
"0.5979509",
"0.5973807",
"0.5962354",
"0.5961909",
"0.59453785",
"0.5941317",
"0.5925838",
"0.5925086",
"0.5923617",
"0.59235865",
"0.59137905",
"0.58997303",
"0.58873224",
"0.58851105",
"0.588285",
"0.5873408",
"0.58516973",
"0.58442813",
"0.58428824",
"0.583979",
"0.58396864",
"0.58296394",
"0.58252656",
"0.58249474",
"0.5821921",
"0.58176655",
"0.58041984",
"0.5792068",
"0.5790999",
"0.57904524",
"0.57871014",
"0.5785965",
"0.5784299",
"0.5784166",
"0.5783787",
"0.5779605",
"0.5771131",
"0.5768494",
"0.57670534",
"0.57630676",
"0.57602406",
"0.57589185",
"0.57545274",
"0.57535726",
"0.5746126",
"0.5745787",
"0.5744922",
"0.5740552",
"0.57365656",
"0.5736084",
"0.5735901",
"0.5734466",
"0.57337034",
"0.5733248",
"0.5729557",
"0.5725102",
"0.57233536",
"0.57232094",
"0.5722424",
"0.5718294",
"0.5714157",
"0.5710073",
"0.57091546",
"0.5707716",
"0.5702304",
"0.57012695",
"0.5699302",
"0.56941855",
"0.56902957",
"0.56888986",
"0.5684704",
"0.5682408",
"0.56799257",
"0.5676243",
"0.5674493",
"0.56712604",
"0.56617016"
]
| 0.0 | -1 |
Handles the HTTP GET method. | protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
request.getRequestDispatcher("index.jsp").include(request, response);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void doGet( )\n {\n \n }",
"@Override\n\tprotected void executeGet(GetRequest request, OperationResponse response) {\n\t}",
"@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}",
"@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}",
"@Override\r\n\tprotected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\r\n\t}",
"void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n metGet(request, response);\n }",
"public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException {\r\n\tlogTrace( req, \"GET log\" );\r\n\tString requestId = req.getQueryString();\r\n\tif (requestId == null) return;\r\n\tif (\"get-response\".equals( requestId )) {\r\n\t try {\r\n\t\tonMEVPollsForResponse( req, resp );\r\n\t } catch (Exception e) {\r\n\t\tlogError( req, resp, e, \"MEV polling error\" );\r\n\t\tsendError( resp, \"MEV polling error: \" + e.toString() );\r\n\t }\r\n\t}\r\n }",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n \r\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t\t\n\t}",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\r\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\r\n\t}",
"public void doGet() throws IOException {\n\n // search ressource\n byte[] contentByte = null;\n try {\n contentByte = ToolBox.readFileByte(RESOURCE_DIRECTORY, this.url);\n this.statusCode = OK;\n ContentType contentType = new ContentType(this.extension);\n sendHeader(statusCode, contentType.getContentType(), contentByte.length);\n } catch (IOException e) {\n System.out.println(\"Ressource non trouvé\");\n statusCode = NOT_FOUND;\n contentByte = ToolBox.readFileByte(RESPONSE_PAGE_DIRECTORY, \"pageNotFound.html\");\n sendHeader(statusCode, \"text/html\", contentByte.length);\n }\n\n this.sendBodyByte(contentByte);\n }",
"public HttpResponseWrapper invokeGET(String path) {\n\t\treturn invokeHttpMethod(HttpMethodType.HTTP_GET, path, \"\");\n\t}",
"@Override\n\tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }",
"@Override\n\tprotected void doGet(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t}",
"public Result get(Get get) throws IOException;",
"@Override\n public void doGet(HttpServletRequest request, HttpServletResponse response) {\n System.out.println(\"[Servlet] GET request \" + request.getRequestURI());\n\n response.setContentType(FrontEndServiceDriver.APP_TYPE);\n response.setStatus(HttpURLConnection.HTTP_BAD_REQUEST);\n\n try {\n String url = FrontEndServiceDriver.primaryEventService +\n request.getRequestURI().replaceFirst(\"/events\", \"\");\n HttpURLConnection connection = doGetRequest(url);\n\n if (connection.getResponseCode() == HttpURLConnection.HTTP_OK) {\n PrintWriter pw = response.getWriter();\n JsonObject responseBody = (JsonObject) parseResponse(connection);\n\n response.setStatus(HttpURLConnection.HTTP_OK);\n pw.println(responseBody.toString());\n }\n }\n catch (Exception ignored) {}\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tSystem.out.println(\"get\");\n\t\tthis.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}",
"public void doGet(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \tSystem.out.println(\"---here--get--\");\n processRequest(request, response);\n }",
"@Override\n public final void doGet() {\n try {\n checkPermissions(getRequest());\n // GET one\n if (id != null) {\n output(api.runGet(id, getParameterAsList(PARAMETER_DEPLOY), getParameterAsList(PARAMETER_COUNTER)));\n } else if (countParameters() == 0) {\n throw new APIMissingIdException(getRequestURL());\n }\n // Search\n else {\n\n final ItemSearchResult<?> result = api.runSearch(Integer.parseInt(getParameter(PARAMETER_PAGE, \"0\")),\n Integer.parseInt(getParameter(PARAMETER_LIMIT, \"10\")), getParameter(PARAMETER_SEARCH),\n getParameter(PARAMETER_ORDER), parseFilters(getParameterAsList(PARAMETER_FILTER)),\n getParameterAsList(PARAMETER_DEPLOY), getParameterAsList(PARAMETER_COUNTER));\n\n head(\"Content-Range\", result.getPage() + \"-\" + result.getLength() + \"/\" + result.getTotal());\n\n output(result.getResults());\n }\n } catch (final APIException e) {\n e.setApi(apiName);\n e.setResource(resourceName);\n throw e;\n }\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tthis.service(req, resp);\r\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\n\t}",
"@RequestMapping(value = \"/{id}\", method = RequestMethod.GET)\n public void get(@PathVariable(\"id\") String id, HttpServletRequest req){\n throw new NotImplementedException(\"To be implemented\");\n }",
"@Override\npublic void get(String url) {\n\t\n}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString action = req.getParameter(\"action\");\r\n\t\t\r\n\t\tif(action == null) {\r\n\t\t\taction = \"List\";\r\n\t\t}\r\n\t\t\r\n\t\tswitch(action) {\r\n\t\t\tcase \"List\":\r\n\t\t\t\tlistUser(req, resp);\r\n\t\t\t\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tlistUser(req, resp);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest request, \n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tSystem.out.println(\"Routed to doGet\");\n\t}",
"@NonNull\n public String getAction() {\n return \"GET\";\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\n\t\tprocess(req,resp);\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"@Override\r\nprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t process(req,resp);\r\n\t }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tprocess(req, resp);\n\t}",
"@Override\n\tpublic HttpResponse get(final String endpoint) {\n\t\treturn httpRequest(HTTP_GET, endpoint, null);\n\t}",
"public void doGet(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\t}",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n System.out.println(\"teste doget\");\r\n }",
"public void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/plain\");\n // Actual logic goes here.\n PrintWriter out = response.getWriter();\n out.println(\"Wolken,5534-0848-5100,0299-6830-9164\");\n\ttry \n\t{\n Get g = new Get(Bytes.toBytes(request.getParameter(\"userid\")));\n Result r = table.get(g);\n byte [] value = r.getValue(Bytes.toBytes(\"v\"),\n Bytes.toBytes(\"\"));\n\t\tString valueStr = Bytes.toString(value);\n\t\tout.println(valueStr);\n\t}\n\tcatch (Exception e)\n\t{\n\t\tout.println(e);\n\t}\n }",
"@Override\r\n public void doGet(String path, HttpServletRequest request, HttpServletResponse response)\r\n throws Exception {\r\n // throw new UnsupportedOperationException();\r\n System.out.println(\"Inside the get\");\r\n response.setContentType(\"text/xml\");\r\n response.setCharacterEncoding(\"utf-8\");\r\n final Writer w = response.getWriter();\r\n w.write(\"inside the get\");\r\n w.close();\r\n }",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\r\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n System.out.println(\"Console: doGET visited\");\n String result = \"\";\n //get the user choice from the client\n String choice = (request.getPathInfo()).substring(1);\n response.setContentType(\"text/plain;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n //methods call appropriate to user calls\n if (Integer.valueOf(choice) == 3) {\n result = theBlockChain.toString();\n if (result != null) {\n out.println(result);\n response.setStatus(200);\n //set status if result output is not generated\n } else {\n response.setStatus(401);\n return;\n }\n }\n //verify chain method\n if (Integer.valueOf(choice) == 2) {\n response.setStatus(200);\n boolean validity = theBlockChain.isChainValid();\n out.print(\"verifying:\\nchain verification: \");\n out.println(validity);\n }\n }",
"@Override\n public DataObjectResponse<T> handleGET(DataObjectRequest<T> request)\n {\n if(getRequestValidator() != null) getRequestValidator().validateGET(request);\n\n DefaultDataObjectResponse<T> response = new DefaultDataObjectResponse<>();\n try\n {\n VisibilityFilter<T, DataObjectRequest<T>> visibilityFilter = visibilityFilterMap.get(VisibilityMethod.GET);\n List<Query> queryList = new LinkedList<>();\n if(request.getQueries() != null)\n queryList.addAll(request.getQueries());\n\n if(request.getId() != null)\n {\n // if the id is specified\n queryList.add(new ById(request.getId()));\n }\n\n DataObjectFeed<T> feed = objectPersister.retrieve(queryList);\n if(feed == null)\n feed = new DataObjectFeed<>();\n List<T> filteredObjects = visibilityFilter.filterByVisible(request, feed.getAll());\n response.setCount(feed.getCount());\n response.addAll(filteredObjects);\n }\n catch(PersistenceException e)\n {\n ObjectNotFoundException objectNotFoundException = new ObjectNotFoundException(String.format(OBJECT_NOT_FOUND_EXCEPTION, request.getId()), e);\n response.setErrorResponse(ErrorResponseFactory.objectNotFound(objectNotFoundException, request.getCID()));\n }\n return response;\n }",
"public void handleGet( HttpExchange exchange ) throws IOException {\n switch( exchange.getRequestURI().toString().replace(\"%20\", \" \") ) {\n case \"/\":\n print(\"sending /MainPage.html\");\n sendResponse( exchange, FU.readFromFile( getReqDir( exchange )), 200);\n break;\n case \"/lif\":\n // send log in page ( main page )\n sendResponse ( exchange, FU.readFromFile(getReqDir(exchange)), 200);\n //\n break;\n case \"/home.html\":\n\n break;\n case \"/book.html\":\n\n break;\n default:\n //checks if user is logged in\n\n //if not send log in page\n //if user is logged in then\n print(\"Sending\");\n String directory = getReqDir( exchange ); // dont need to do the / replace as no space\n File page = new File( getReqDir( exchange) );\n\n // IMPLEMENT DIFFERENT RESPONSE CODE FOR HERE IF EXISTS IS FALSE OR CAN READ IS FALSE\n sendResponse(exchange, FU.readFromFile(directory), 200);\n break;\n }\n }",
"public int handleGET(String requestURL) throws ClientProtocolException, IOException{\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\thttpGet = new HttpGet(requestURL);\t\t\r\n\t\t\t\t\t\t\r\n\t\tinputsource=null;\r\n\t\t\t\r\n\t\toutputString=\"\";\r\n\t\t\r\n\t\t//taking response by executing http GET object\r\n\t\tCloseableHttpResponse response = httpclient.execute(httpGet);\t\t\r\n\t\r\n\t\t/* \r\n\t\t * \tThe underlying HTTP connection is still held by the response object\r\n\t\t\tto allow the response content to be streamed directly from the network socket.\r\n\t\t\tIn order to ensure correct deallocation of system resources\r\n\t\t\tthe user MUST call CloseableHttpResponse.close() from a finally clause.\r\n\t\t\tPlease note that if response content is not fully consumed the underlying\r\n\t\t\tconnection cannot be safely re-used and will be shut down and discarded\r\n\t\t\tby the connection manager.\r\n\t\t */\r\n\t\t\r\n\t\t\tstatusLine= response.getStatusLine().toString();\t\t//status line\r\n\t\t\t\r\n\t\t\tHttpEntity entity1 = response.getEntity();\t\t\t\t//getting response entity from server response \t\r\n\t\t\t\t\t\r\n\t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(entity1.getContent()));\r\n\r\n\t\t\tString line;\r\n\t\t\twhile((line=br.readLine())!=null)\r\n\t\t\t{\r\n\t\t\t\toutputString=outputString+line.toString();\r\n\t }\r\n\t\t\t\r\n\t\t\t//removing spaces around server response string.\r\n\t\t\toutputString.trim();\t\t\t\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t//converting server response string into InputSource.\r\n\t\t\tinputsource = new InputSource(new StringReader(outputString));\t\r\n\t\t\t\r\n\t\t\t// and ensure it is fully consumed\r\n\t\t\tEntityUtils.consume(entity1);\t\t\t//consuming entity.\r\n\t\t\tresponse.close();\t\t\t\t\t\t//closing response.\r\n\t\t\tbr.close();\t\t\t\t\t\t\t\t//closing buffered reader\r\n\t\t\t\r\n\t\t\t//returning response code\r\n\t\t\treturn response.getStatusLine().getStatusCode();\r\n\t\r\n\t}",
"@Override\n\tprotected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\t logger.error(\"BISHUNNN CALLED\");\n\t\tString category = request.getParameter(\"category\").trim();\n\t\tGetHttpCall getHttpCall = new GetHttpCall();\n\t\turl = APIConstants.baseURL+category.toLowerCase();\n\t\tresponseString = getHttpCall.execute(url);\n\t\tresponse.getWriter().write(responseString);\n\t}",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n //processRequest(request, response);\r\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tPrintWriter out = resp.getWriter();\n\t\tout.print(\"<h1>Hello from your doGet method!</h1>\");\n\t}",
"public void doGet(HttpServletRequest request,\n HttpServletResponse response)\n throws IOException, ServletException {\n response.setContentType(TYPE_TEXT_HTML.label);\n response.setCharacterEncoding(UTF8.label);\n request.setCharacterEncoding(UTF8.label);\n String path = request.getRequestURI();\n logger.debug(RECEIVED_REQUEST + path);\n Command command = null;\n try {\n command = commands.get(path);\n command.execute(request, response);\n } catch (NullPointerException e) {\n logger.error(REQUEST_PATH_NOT_FOUND);\n request.setAttribute(JAVAX_SERVLET_ERROR_STATUS_CODE, 404);\n command = commands.get(EXCEPTION.label);\n command.execute(request, response);\n }\n }",
"public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString search = req.getParameter(\"searchBook\");\n\t\tString output=search;\n\n\t\t//redirect output to view search.jsp\n\t\treq.setAttribute(\"output\", output);\n\t\tresp.setContentType(\"text/json\");\n\t\tRequestDispatcher view = req.getRequestDispatcher(\"search.jsp\");\n\t\tview.forward(req, resp);\n\t\t\t\n\t}",
"public void doGet( HttpServletRequest request, HttpServletResponse response )\n throws ServletException, IOException\n {\n handleRequest( request, response, false );\n }",
"public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t}",
"public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t}",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n public Response handleGet() {\n Gson gson = GSONFactory.getInstance();\n List allEmployees = getAllEmployees();\n\n if (allEmployees == null) {\n allEmployees = new ArrayList();\n }\n\n Response response = Response.ok().entity(gson.toJson(allEmployees)).build();\n return response;\n }",
"@Override\n\tprotected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows IOException, ServletException {\n\t\tsuper.doGet(request, response);\t\t\t\n\t}",
"private static String sendGET(String getURL) throws IOException {\n\t\tURL obj = new URL(getURL);\n\t\tHttpURLConnection con = (HttpURLConnection) obj.openConnection();\n\t\tcon.setRequestMethod(\"GET\");\n\t\tString finalResponse = \"\";\n\n\t\t//This way we know if the request was processed successfully or there was any HTTP error message thrown.\n\t\tint responseCode = con.getResponseCode();\n\t\tSystem.out.println(\"GET Response Code : \" + responseCode);\n\t\tif (responseCode == HttpURLConnection.HTTP_OK) { // success\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n\t\t\tString inputLine;\n\t\t\tStringBuffer buffer = new StringBuffer();\n\n\t\t\twhile ((inputLine = in.readLine()) != null) {\n\t\t\t\tbuffer.append(inputLine);\n\t\t\t}\n\t\t\tin.close();\n\n\t\t\t// print result\n\t\t\tfinalResponse = buffer.toString();\n\t\t} else {\n\t\t\tSystem.out.println(\"GET request not worked\");\n\t\t}\n\t\treturn finalResponse;\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n //processRequest(request, response);\n }",
"@Override\n \tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n \t\t\tthrows ServletException, IOException {\n \t\tdoPost(req, resp);\n \t}",
"public BufferedReader reqGet(final String route) throws\n ServerStatusException, IOException {\n System.out.println(\"first reqGet\");\n return reqGet(route, USER_AGENT);\n }",
"HttpGet getRequest(HttpServletRequest request, String address) throws IOException;",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override \r\nprotected void doGet(HttpServletRequest request, HttpServletResponse response) \r\nthrows ServletException, IOException { \r\nprocessRequest(request, response); \r\n}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\n String action = request.getParameter(\"action\");\r\n\r\n try {\r\n switch (action)\r\n {\r\n case \"/getUser\":\r\n \tgetUser(request, response);\r\n break;\r\n \r\n }\r\n } catch (Exception ex) {\r\n throw new ServletException(ex);\r\n }\r\n }",
"@Override\n protected void doGet\n (HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\n\t}",
"@Test\r\n\tpublic void doGet() throws Exception {\n\t\tCloseableHttpClient httpClient = HttpClients.createDefault();\r\n\t\t// Create a GET object and pass a url to it\r\n\t\tHttpGet get = new HttpGet(\"http://www.google.com\");\r\n\t\t// make a request\r\n\t\tCloseableHttpResponse response = httpClient.execute(get);\r\n\t\t// get response as result\r\n\t\tSystem.out.println(response.getStatusLine().getStatusCode());\r\n\t\tHttpEntity entity = response.getEntity();\r\n\t\tSystem.out.println(EntityUtils.toString(entity));\r\n\t\t// close HttpClient\r\n\t\tresponse.close();\r\n\t\thttpClient.close();\r\n\t}",
"private void requestGet(String endpoint, Map<String, String> params, RequestListener listener) throws Exception {\n String requestUri = Constant.API_BASE_URL + ((endpoint.indexOf(\"/\") == 0) ? endpoint : \"/\" + endpoint);\n get(requestUri, params, listener);\n }",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tint i = request.getRequestURI().lastIndexOf(\"/\") + 1;\n\t\tString action = request.getRequestURI().substring(i);\n\t\tSystem.out.println(action);\n\t\t\n\t\tString view = \"Error\";\n\t\tObject model = \"service Non disponible\";\n\t\t\n\t\tif (action.equals(\"ProductsList\")) {\n\t\t\tview = productAction.productsList();\n\t\t\tmodel = productAction.getProducts();\n\t\t}\n\t\t\n\t\trequest.setAttribute(\"model\", model);\n\t\trequest.getRequestDispatcher(prefix + view + suffix).forward(request, response); \n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t throws ServletException, IOException {\n\tprocessRequest(request, response);\n }",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tcommandAction(request,response);\r\n\t}"
]
| [
"0.7589609",
"0.71665615",
"0.71148175",
"0.705623",
"0.7030174",
"0.70291144",
"0.6995984",
"0.697576",
"0.68883485",
"0.6873811",
"0.6853569",
"0.6843572",
"0.6843572",
"0.6835363",
"0.6835363",
"0.6835363",
"0.68195957",
"0.6817864",
"0.6797789",
"0.67810035",
"0.6761234",
"0.6754993",
"0.6754993",
"0.67394847",
"0.6719924",
"0.6716244",
"0.67054695",
"0.67054695",
"0.67012346",
"0.6684415",
"0.6676695",
"0.6675696",
"0.6675696",
"0.66747975",
"0.66747975",
"0.6669016",
"0.66621476",
"0.66621476",
"0.66476154",
"0.66365504",
"0.6615004",
"0.66130257",
"0.6604073",
"0.6570195",
"0.6551141",
"0.65378064",
"0.6536579",
"0.65357745",
"0.64957607",
"0.64672184",
"0.6453189",
"0.6450501",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.64067316",
"0.6395873",
"0.6379907",
"0.63737476",
"0.636021",
"0.6356937",
"0.63410467",
"0.6309468",
"0.630619",
"0.630263",
"0.63014317",
"0.6283933",
"0.62738425",
"0.62680805",
"0.62585783",
"0.62553537",
"0.6249043",
"0.62457556",
"0.6239428",
"0.6239428",
"0.62376446",
"0.62359244",
"0.6215947",
"0.62125194",
"0.6207376",
"0.62067443",
"0.6204527",
"0.6200444",
"0.6199078",
"0.61876005",
"0.6182614",
"0.61762017",
"0.61755335",
"0.61716276",
"0.6170575",
"0.6170397",
"0.616901"
]
| 0.0 | -1 |
Handles the HTTP POST method. | protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
doGet(request, response);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void doPost(Request request, Response response) {\n\n\t}",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) {\n }",
"public void doPost( )\n {\n \n }",
"@Override\n public String getMethod() {\n return \"POST\";\n }",
"public String post();",
"@Override\n\tpublic void doPost(HttpRequest request, AbstractHttpResponse response)\n\t\t\tthrows IOException {\n\t\t\n\t}",
"@Override\n public String getMethod() {\n return \"POST\";\n }",
"public ResponseTranslator post() {\n setMethod(\"POST\");\n return doRequest();\n }",
"protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n }",
"public void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows IOException {\n\n\t}",
"public void postData() {\n\n\t}",
"@Override\n public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {\n logger.warn(\"doPost Called\");\n handle(req, res);\n }",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n metPost(request, response);\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"@Override\n\tpublic void postHandle(WebRequest request, ModelMap model) throws Exception {\n\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n }",
"public void doPost(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\r\n\t\t\r\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}",
"@Override\n\tprotected HttpMethod requestMethod() {\n\t\treturn HttpMethod.POST;\n\t}",
"@Override\n\tprotected void handlePostBody(HashMap<String, HashMap<String, String>> params, DataFormat format) throws Exception {\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n }",
"@Override\n\tprotected void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }",
"@Override\n\n\tpublic void handlePOST(CoapExchange exchange) {\n\t\tFIleStream read = new FIleStream();\n\t\tread.tempWrite(Temp_Path, exchange.getRequestText());\n\t\texchange.respond(ResponseCode.CREATED, \"POST successfully!\");\n\t\t_Logger.info(\"Receive post request:\" + exchange.getRequestText());\n\t}",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.getWriter().println(\"go to post method in manager\");\n }",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }",
"public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\t\n\t}",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"public abstract boolean handlePost(FORM form, BindException errors) throws Exception;",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n super.doPost(req, resp);\n }",
"public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\n\t\t\t\n\t\t \n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"public void processPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException\n {\n }",
"@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\t}",
"@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\t}",
"public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\n\t}",
"public void doPost(HttpServletRequest request ,HttpServletResponse response){\n\n }",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"public void post(){\n\t\tHttpClient client = new HttpClient();\n\n\t\tPostMethod post = new PostMethod(\"http://211.138.245.85:8000/sso/POST\");\n//\t\tPostMethod post = new PostMethod(\"/eshopclient/product/show.do?id=111655\");\n//\t\tpost.addRequestHeader(\"Cookie\", cookieHead);\n\n\n\t\ttry {\n\t\t\tSystem.out.println(\"��������====\");\n\t\t\tint status = client.executeMethod(post);\n\t\t\tSystem.out.println(status);\n\t\t} catch (HttpException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n//\t\ttaskCount++;\n//\t\tcountDown--;\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException {\r\n\tlogTrace( req, \"POST log\" );\r\n\tString requestId = req.getQueryString();\r\n\tif (requestId == null) {\r\n\t try {\r\n\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t } catch (IOException ex) {\r\n\t }\r\n\t logError( req, resp, new Exception(\"Unrecognized POST\"), \"\" );\r\n\t sendError(resp, \"Unrecognized POST\");\r\n\t} else\r\n\t if (\"post-request\".equals( requestId )) {\r\n\t\ttry {\r\n\t\t onMEVPostsRequest( req, resp );\r\n\t\t} catch (Exception e) {\r\n\t\t try {\r\n\t\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t\t } catch (IOException ex) {\r\n\t\t }\r\n\t\t logError( req, resp, e, \"MEV POST error\" );\r\n\t\t sendError( resp, \"MEV POST error: \" + e.toString() );\r\n\t\t}\r\n\t } else if (\"post-response\".equals( requestId )) {\r\n\t\ttry {\r\n\t\t onPVMPostsResponse( req, resp );\r\n\t\t} catch (Exception e) {\r\n\t\t try {\r\n\t\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t\t } catch (IOException ex) {\r\n\t\t }\r\n\t\t logError( req, resp, e, \"PVM POST error\" );\r\n\t\t sendError( resp, \"PVM POST error: \" + e.toString() );\r\n\t\t}\r\n\t }\r\n }",
"@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\t\n\t}",
"@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\t\n\t}",
"@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest req, HttpServletResponse resp, Object handler, ModelAndView m)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t}",
"@Override\n public final void doPost() {\n try {\n checkPermissions(getRequest());\n final IItem jSonStreamAsItem = getJSonStreamAsItem();\n final IItem outputItem = api.runAdd(jSonStreamAsItem);\n\n output(JSonItemWriter.itemToJSON(outputItem));\n } catch (final APIException e) {\n e.setApi(apiName);\n e.setResource(resourceName);\n throw e;\n\n }\n }",
"@Override\n\tvoid post() {\n\t\t\n\t}",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\tSystem.out.println(\"=========interCpetor Post=========\");\r\n\t}",
"public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\tString method = request.getParameter(\"method\");\n\t\tswitch(method){\n\t\tcase \"Crawl\":\n\t\t\tcrawl(request, response);\n\t\t\tbreak;\n\t\tcase \"Extract\":\n\t\t\textract(request, response);\n\t\t\tbreak;\n\t\tcase \"JDBC\":\n\t\t\tjdbc(request, response);\n\t\t\tbreak;\n\t\tcase \"Indexer\":\n\t\t\tindexer(request, response);\n\t\t\tbreak;\n\t\t}\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n System.out.println(\"teste dopost\");\r\n }",
"protected void doPost(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response)\r\n\t/* 43: */throws ServletException, IOException\r\n\t/* 44: */{\r\n\t\t/* 45:48 */doGet(request, response);\r\n\t\t/* 46: */}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tprocess(req, resp);\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\tprocess(req,resp);\r\n\t}",
"public void handlePost(SessionSrvc session, IObjectContext context)\n throws Exception\n {\n }",
"public void doPost(HttpServletRequest request, HttpServletResponse response) {\n\t\tdoGet(request, response);\n\t}",
"public void doPost(HttpServletRequest request, HttpServletResponse response) {\n\t\tdoGet(request, response);\n\t}",
"public void doPost(HttpServletRequest request, HttpServletResponse response) {\r\n\t\tdoGet(request, response);\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\t}",
"@Override\n protected void doPost\n (HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n try {\r\n processRequest(request, response);\r\n } catch (JSONException ex) {\r\n Logger.getLogger(PDCBukUpload.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"@Override\r\n protected void doPost(HttpServletRequest request,\r\n HttpServletResponse response)\r\n throws ServletException,\r\n IOException {\r\n processRequest(request,\r\n response);\r\n\r\n }",
"@Override\r\n\tpublic void doPost(CustomHttpRequest request, CustomHttpResponse response) throws Exception {\n\t\tdoGet(request, response);\r\n\t}",
"@Override\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response,\n\t\t\tObject handler, ModelAndView modelAndView) throws Exception {\n\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoHandle(request, response);\n\t}",
"private void postRequest() {\n\t\tSystem.out.println(\"post request, iam playing money\");\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }",
"@Override\n public void postHandle(HttpServletRequest request,\n HttpServletResponse response, Object handler,\n ModelAndView modelAndView) throws Exception {\n\n }",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n processRequest(request, response);\n } catch (Exception ex) {\n Logger.getLogger(PedidoController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }"
]
| [
"0.73289514",
"0.71383566",
"0.7116213",
"0.7105215",
"0.7100045",
"0.70236707",
"0.7016248",
"0.6964149",
"0.6889435",
"0.6784954",
"0.67733276",
"0.67482096",
"0.66677034",
"0.6558593",
"0.65582114",
"0.6525548",
"0.652552",
"0.652552",
"0.652552",
"0.65229493",
"0.6520197",
"0.6515622",
"0.6513045",
"0.6512626",
"0.6492367",
"0.64817846",
"0.6477479",
"0.64725804",
"0.6472099",
"0.6469389",
"0.6456206",
"0.6452577",
"0.6452577",
"0.6452577",
"0.6450273",
"0.6450273",
"0.6438126",
"0.6437522",
"0.64339423",
"0.64253825",
"0.6422238",
"0.6420897",
"0.6420897",
"0.6420897",
"0.6407662",
"0.64041835",
"0.64041835",
"0.639631",
"0.6395677",
"0.6354875",
"0.63334197",
"0.6324263",
"0.62959254",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6280875",
"0.6272104",
"0.6272104",
"0.62711537",
"0.62616795",
"0.62544584",
"0.6251865",
"0.62274224",
"0.6214439",
"0.62137586",
"0.621211",
"0.620854",
"0.62023044",
"0.61775357",
"0.61775357",
"0.61775357",
"0.61775357",
"0.61775357",
"0.61775357",
"0.61775357",
"0.61638993",
"0.61603814",
"0.6148914",
"0.61465937",
"0.61465937",
"0.614548",
"0.6141879",
"0.6136717",
"0.61313903",
"0.61300284",
"0.6124381",
"0.6118381",
"0.6118128",
"0.61063534",
"0.60992104",
"0.6098801",
"0.6096766"
]
| 0.0 | -1 |
Processes requests for both HTTP GET and POST methods. | protected void processRequest(HttpServletRequest request, HttpServletResponse response) {
response.setContentType("text/html;charset=UTF-8");
//Invalidate user session
request.getSession().invalidate();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {\n final String method = req.getParameter(METHOD);\n if (GET.equals(method)) {\n doGet(req, resp);\n } else {\n resp.setStatus(HttpServletResponse.SC_METHOD_NOT_ALLOWED);\n }\n }",
"private void processRequest(HttpServletRequest request, HttpServletResponse response) {\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n // only POST should be used\n doPost(request, response);\n }",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\nSystem.err.println(\"=====================>>>>>123\");\n\t\tString key=req.getParameter(\"method\");\n\t\tswitch (key) {\n\t\tcase \"1\":\n\t\t\tgetProvinces(req,resp);\n\t\t\tbreak;\n\t\tcase \"2\":\n\t\t\tgetCities(req,resp);\t\t\t\n\t\t\tbreak;\n\t\tcase \"3\":\n\t\t\tgetAreas(req,resp);\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tprocess(req, resp);\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\r\n\t\tdoPost(req, resp);\r\n\t}",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\n\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\r\n\t}",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}",
"@Override\n \tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n \t\t\tthrows ServletException, IOException {\n \t\tdoPost(req, resp);\n \t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t\tdoGet(req, resp);\r\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\r\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n processRequest(request, response);\n }",
"@Override\n\tprotected void doGet(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tprocessRequest(request, response);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tprocessRequest(request, response);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t\t\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\n\t\tprocess(req,resp);\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }"
]
| [
"0.7004024",
"0.66585696",
"0.66031146",
"0.6510023",
"0.6447109",
"0.64421695",
"0.64405906",
"0.64321136",
"0.6428049",
"0.6424289",
"0.6424289",
"0.6419742",
"0.6419742",
"0.6419742",
"0.6418235",
"0.64143145",
"0.64143145",
"0.6400266",
"0.63939095",
"0.63939095",
"0.639271",
"0.63919044",
"0.63919044",
"0.63903785",
"0.63903785",
"0.63903785",
"0.63903785",
"0.63887113",
"0.63887113",
"0.6380285",
"0.63783026",
"0.63781637",
"0.637677",
"0.63761306",
"0.6370491",
"0.63626",
"0.63626",
"0.63614637",
"0.6355308",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896"
]
| 0.0 | -1 |
Make the bar disappear after URL is loaded, and changes string to Loading... | public void onProgressChanged(WebView view, int progress) {
setTitle("Loading...");
setProgress(progress * 100); //Make the bar disappear after URL is loaded
// Return the app name after finish loading
if (progress == 100)
setTitle(name);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setLoadingBarVisible(String text)\n {\n loadingBar.setVisibility(View.VISIBLE);\n loadingText.setText(text);\n }",
"private void setLoadingDisplay() {\n if (swipeRefreshing) {\n footer.clear();\n setRefreshing(true);\n } else if (loading) {\n footer.setLoading();\n }\n }",
"public void setLoadingMessage(String loadingMessage);",
"void showLoading(boolean isLoading);",
"public void showLoading() {\n }",
"@Override\r\n\tpublic void showLoading(boolean isLoading) {\r\n\t\tsetSupportProgressBarIndeterminateVisibility(isLoading);\r\n\t}",
"private void hideLoadingAndUpdate() {\n image.setVisibility(View.VISIBLE);\n loadingBar.setVisibility(View.INVISIBLE);\n shareBtn.setVisibility(shareBtnVisibility);\n\n }",
"private void showLoading() {\n hideNoNetwork();\n mRecipesBinding.fragmentRecipesProgressBar.setVisibility(View.VISIBLE);\n }",
"public void onProgressChanged(WebView view, int progress)\n {\n setTitle(R.string.txt_loading);\n setProgress(progress * 100); //Make the bar disappear after URL is loaded\n\n // Return the app name after finish loading\n if(progress == 100)\n setTitle(contentTitle);\n }",
"@Override\n public void showLoading() {\n setRefresh(true);\n }",
"@Override\n public void onPageFinished(WebView view, String url) {\n super.onPageFinished(view, url);\n web.setVisibility(View.VISIBLE);\n progressBar.setVisibility(View.GONE);\n }",
"@Override\n public void hiddenLoading() {\n Log.i(Tag, \"hiddenLoading\");\n }",
"@Override\n protected void onStartLoading() {\n progressBar.setVisibility(View.VISIBLE);\n forceLoad();\n }",
"public void setLoadingPanel(String msg){\n this.loadingPanel.add(getLoadingMessage(msg));\n }",
"public void onProgressChanged(WebView view, int progress)\n {\n pbSearchResult.setProgress(progress); //Make the bar disappear after URL is loaded\n\n // Return the app name after finish loading\n if(progress == 100)\n pbSearchResult.setVisibility(View.GONE);\n }",
"@Override\n public void onPageFinished(WebView view, String url) {\n super.onPageFinished(view, url);\n progressBar.setVisibility(View.GONE);\n }",
"@Override\n public void onPageFinished(WebView view, String url) {\n super.onPageFinished(view, url);\n loading.setVisibility(View.GONE);\n }",
"@Override\n\t public void onPageFinished(WebView view, String url) {\n\t super.onPageFinished(view, url);\n\t \n\t progressBar.setVisibility(View.GONE);\n\t }",
"void showLoading(boolean visible);",
"@Override\r\n\t \tpublic void onPageFinished(WebView view, String url) {\n\t \t\tsuper.onPageFinished(view, url);\r\n\t \t\tif(mProgressLoading != null){\r\n\t \t\t\tmProgressLoading.hide();\r\n\t \t\t}\r\n\t \t}",
"@Override\n public void onPageFinished(WebView view, String url) {\n super.onPageFinished(view, url);\n progressBusy.setVisibility(View.GONE);\n }",
"@Override\n public void onPageFinished(WebView view, String url) {\n super.onPageFinished(view, url);\n progressbar.setVisibility(View.GONE);\n }",
"private void showLoading()\n {\n relLoadingPanel.setVisibility(View.VISIBLE);\n ViewHelper.setViewGroupEnabled(scrMainContainer, false);\n }",
"@Override\n public void onPageFinished(android.webkit.WebView view, String url) {\n super.onPageFinished(view, url);\n progressBar5.setVisibility(View.GONE);\n }",
"public void displayLoadingWindowServerDown()\r\n\t{\r\n\t\tloadingWindow.hideLoadingBar();\r\n\t\tloadingWindow.setDescription(\"The HVMK server is down. Please try again later.\");\r\n\t}",
"@Override\r\n public void onPreResponse() {\r\n findViewById(R.id.loader).setVisibility(View.VISIBLE);\r\n findViewById(R.id.mainContainer).setVisibility(View.GONE);\r\n findViewById(R.id.errorText).setVisibility(View.GONE);\r\n\r\n }",
"void hideMainLoadingWheel();",
"void showMainLoadingWheel();",
"private void displayLoader() {\n pDialog = new ProgressDialog(DangKyActivity.this);\n pDialog.setMessage(\"Vui lòng đợi trong giây lát...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }",
"private void startLoad() {\n\t\tif (getIntent().getFlags()==8)\n\t\t{\n\t\t\ttitleTv.setText(R.string.WXYT);\n\t\tmWebView.loadUrl(UrlLib.CLI);\n\t\t}\n\t\telse if (getIntent().getFlags()==5)\n\t\t{\n\t\t\ttitleTv.setText(R.string.reservior); \n\t\t\tmWebView.loadUrl(UrlLib.CLI5);\t\n\t\t}\t\n\t\t\n\t\tmWebView.setWebViewClient(new WebViewClient() {\n\n\t\t\t/*\n\t\t\t * (non-Javadoc)\n\t\t\t * \n\t\t\t * @see\n\t\t\t * android.webkit.WebViewClient#shouldOverrideUrlLoading(android\n\t\t\t * .webkit.WebView, java.lang.String)\n\t\t\t */\n\n\t\t\t@Override\n\t\t\tpublic boolean shouldOverrideUrlLoading(WebView view, String url) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tview.loadUrl(url);\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * (non-Javadoc)\n\t\t\t * \n\t\t\t * @see\n\t\t\t * android.webkit.WebViewClient#onPageFinished(android.webkit.WebView\n\t\t\t * , java.lang.String)\n\t\t\t */\n\t\t\t@Override\n\t\t\tpublic void onPageFinished(WebView view, String url) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tsuper.onPageFinished(view, url);\n\t\t\t}\n\t\t});\n\n\t\tmWebView.setWebChromeClient(new WebChromeClient() {\n\t\t\t@Override\n\t\t\tpublic void onProgressChanged(WebView view, int newProgress) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tsuper.onProgressChanged(view, newProgress);\n\t\t\t\tprogressBar.setProgress(newProgress);\n\t\t\t\tprogressBar.postInvalidate();\n\t\t\t\tif(newProgress==100)\n\t\t\t\t\tprogressBar.setVisibility(View.GONE);\n\n\t\t\t}\n\t\t});\n\n\t}",
"@Override\n public void showLoading() {\n Log.i(Tag, \"showLoading\");\n }",
"public void showLoading() {\n loadingLayout.setVisibility(View.VISIBLE);\n mapView.setVisibility(View.GONE);\n errorLayout.setVisibility(View.GONE);\n }",
"protected void hideLoader() {\n\n if (progressBar != null) {\n progressBar.setVisibility(View.INVISIBLE);\n }\n if(getActivity()!=null) {\n getActivity().getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);\n }\n\n }",
"@Override\r\n\t\tpublic void onPageFinished(WebView view, String url) {\n\t\t\tsuper.onPageFinished(view, url);\r\n\r\n\t\t\tprogressBar.setVisibility(View.GONE);\r\n\t\t}",
"public final void showLoadingIndicator(boolean z) {\n if (z) {\n ProgressBar progressBar = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbLoadingAuctionSaleList);\n Intrinsics.checkExpressionValueIsNotNull(progressBar, \"pbLoadingAuctionSaleList\");\n progressBar.setVisibility(0);\n return;\n }\n ProgressBar progressBar2 = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbLoadingAuctionSaleList);\n Intrinsics.checkExpressionValueIsNotNull(progressBar2, \"pbLoadingAuctionSaleList\");\n progressBar2.setVisibility(8);\n }",
"public void showProgress(){\n loadMainActivity.setVisibility(View.VISIBLE);\n recyclerView.setVisibility(View.INVISIBLE);\n }",
"@Override\n public void hideLoading() {\n if (progressDialog!=null && progressDialog.isShowing()){\n progressDialog.dismiss();\n }\n }",
"private void hideLoading()\n {\n relLoadingPanel.setVisibility(View.GONE);\n ViewHelper.setViewGroupEnabled(scrMainContainer, true);\n }",
"@Override\n\t\t\tpublic void onPageFinished(WebView view, String url) {\n\t\t\t\tsuper.onPageFinished(view, url);\n\t\t\t\tprogressBar.setVisibility(View.GONE);\n\t\t\t}",
"protected void dismissLoading()\n {\n progressBar.dismiss();\n }",
"private void showLoadingDialogue(final String loadingMessage) {\n progressDialog.setMessage(loadingMessage);\n progressDialog.setCancelable(false);\n progressDialog.setIndeterminate(false);\n progressDialog.show();\n }",
"public void startLoadAnim(String msg) {\n avi.smoothToShow();\n loadTv.setText(msg);\n loadTv.setVisibility(View.VISIBLE);\n loginContainer.setVisibility(View.INVISIBLE);\n }",
"@Override\n\t\t\tpublic void loadingProgressChanged(WebBrowserEvent wbe) {\n\t\t\t\tJWebBrowser wb = wbe.getWebBrowser();\n\t\t\t\tint progress = wb.getLoadingProgress();\n\t\t\t\tloading.setValue(progress);\n\t\t\t\tloading.setStringPainted(true);\n\t\t\t\tloading.setString(progress + \"%\");\n\t\t\t}",
"void setLoading(boolean isLoading);",
"protected void showLoader() {\n if (progressBar != null) {\n progressBar.setVisibility(View.VISIBLE);\n }\n if(getActivity()!=null) {\n getActivity().getWindow().setFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE,\n WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);\n }\n }",
"public void cancelLoadUrl() {\n\t\t\n\t}",
"private void showLoading() {\n mRecycleView.setVisibility(View.INVISIBLE);\n /* Finally, show the loading indicator */\n mLoadingIndicator.setVisibility(View.VISIBLE);\n }",
"void onFinishedLoading();",
"private void sendLoadingMessage() {\n mUIHandler.removeMessages(MSG_GET_ACTIVE_USER);\n mUIHandler.sendMessageDelayed(Message.obtain(mUIHandler, MSG_GET_ACTIVE_USER), DELAY_SEND_MESSAGE_LOADING_MILLIS);\n }",
"@Override\n\t\t\tpublic void onPageFinished(final WebView view, String url) {\n\t\t\t\t\t\n\t\t\t\tLog.d(\"Finished\",\"Loading\"+url);\n\t\t\t\tpbLine.setVisibility(View.GONE);\n\t\t\t\tsuper.onPageFinished(view, url);\n\t\t\t\t\t\n\t\t\t}",
"@Override\n public void onProgressChanged(WebView view, int newProgress) {\n if (newProgress == 100) {\n // 网页加载完成\n mProgress.setVisibility(View.GONE);\n } else {\n // 加载中\n\n }\n\n }",
"private void changeStatusBar(String status)\r\n {\r\n jStatusBar.setText(status);\r\n }",
"protected void showLoading()\n {\n progressBar = new ProgressDialog(this);\n progressBar.setTitle(\"Loading\");\n progressBar.setMessage(\"Wait while loading...\");\n progressBar.setCancelable(false); // disable dismiss by tapping outside of the dialog\n progressBar.show();\n }",
"@Override\n public void onPageStarted(WebView view, String url, Bitmap favicon) {\n // loading start\n progressBar.setVisibility(View.VISIBLE);\n }",
"@Override\n public void onProgressChanged(WebView view, int newProgress) {\n if (newProgress == 100) {\n // 网页加载完成\n pb_webView.setVisibility(View.GONE);\n\n } else {\n // 加载中\n pb_webView.setProgress(newProgress);\n }\n\n }",
"public final void showLoadingIndicator(boolean z) {\n if (z) {\n ProgressBar progressBar = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbReviewPayment);\n Intrinsics.checkExpressionValueIsNotNull(progressBar, \"pbReviewPayment\");\n progressBar.setVisibility(0);\n return;\n }\n ProgressBar progressBar2 = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbReviewPayment);\n Intrinsics.checkExpressionValueIsNotNull(progressBar2, \"pbReviewPayment\");\n progressBar2.setVisibility(8);\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 }",
"private void loadingHandler() {\n final TextView loadingTxt = findViewById(R.id.loadingTxt);\n final Handler handler = new Handler();\n final Runnable runnable = new Runnable() {\n @Override\n public void run() {\n // Loading Txt\n if(loadingTxt.getText().length() > 10) {\n loadingTxt.setText(\"Loading \");\n } else {\n loadingTxt.setText(loadingTxt.getText()+\".\");\n }\n handler.postDelayed(this, 500);\n }\n };\n handler.postDelayed(runnable, 500);\n }",
"@Override\n protected void onProgressUpdate(Integer... progress) {\n loadingText.setText(loadingHints[random.nextInt(loadingHints.length)]);\n // [... Обновите индикатор хода выполнения, уведомления или другой\n // элемент пользовательского интерфейса ...]\n }",
"private void displayLoader() {\n pDialog = new ProgressDialog(AddReviewActivity.this);\n pDialog.setMessage(\"Adding Review...Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }",
"public void onUnFinishFetching() {\n\t\t\t\thideLoading();\n\t\t\t\tUiApplication.getUiApplication().invokeLater(new Runnable() {\n\t\t\t\t\t\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\tUiApplication.getUiApplication().pushScreen(new HomeScreen());\n\t\t\t\t\t}\n\t\t\t\t});\t\t\t\t\n\t\t\t}",
"String getLoadingMessage();",
"public void startLoading() {\r\n\t\tgetDisplay().setRowCount(0, true);\r\n\t\tlabel1.setHTML(\"\");\r\n\t\tlabel2.setHTML(\"\");\r\n\t}",
"public void showLoadingError() {\n showError(MESSAGE_LOADING_ERROR);\n }",
"public void setLoading(boolean loading) {\n this.loading = loading;\n }",
"public void setString(final String s){\n\t\tRunnable changeValueRunnable = new Runnable(){\n\t\t\tpublic void run(){\n\t\t\t\tloadBar.setString(s);\n\t\t\t}\n\t\t};\n\t\tSwingUtilities.invokeLater(changeValueRunnable);\n\t\tmessageLabel.setText(s);\n\t}",
"public void showLoadProcessPage() {\r\n\t\tmainFrame.setTitle(null);\r\n\t\tmainFrame.showPage(loadProcessPage.getClass().getCanonicalName());\r\n\t}",
"public void onProgressChanged(WebView view, int newProgress) {\n if (newProgress == 100) {\n // 网页加载完成\n progressBar.setVisibility(View.GONE);//加载完网页进度条消失\n Log.e(TAG, \"隱藏進度條\");\n } else {\n // 加载中\n progressBar.setVisibility(View.VISIBLE);//开始加载网页时显示进度条\n progressBar.setProgress(newProgress);//设置进度值\n Log.e(TAG, \"顯示進度條\");\n }\n\n }",
"public void showUnready();",
"@Override\n public void setLoadingIndicator(boolean active) {\n\n if (active) {\n mBusyIndicator.setVisibility(View.VISIBLE);\n } else {\n mBusyIndicator.setVisibility(View.GONE);\n }\n }",
"private void setLoading(boolean isLoading) {\n if (isLoading) {\n getWindow().setFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE,\n WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);\n layoutLoading.setVisibility(View.VISIBLE);\n } else {\n getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);\n layoutLoading.setVisibility(View.INVISIBLE);\n }\n }",
"public void updateReloading() {\n if (game.getPlayerComponent().getActiveWeapon().isReloading()) {\n reloadingText.setText(\"Reloading\");\n reloadingText.setFill(Color.INDIANRED);\n } else {\n reloadingText.setText(\"Reloaded\");\n reloadingText.setFill(Color.LIMEGREEN);\n }\n }",
"protected void onStartLoading() { forceLoad();}",
"@Override\n public void hideProgressBar() {\n MainActivity.sInstance.hideProgressBar();\n }",
"@Override\r\n\tprotected void onProgressUpdate(String... s) {\r\n\t\tactivity.addToGUI(s[0]);\r\n\t}",
"public void showLoadingView() {\n handleLoadingContainer(false /* showContent */, false /* showEmpty */, false /* animate */);\n }",
"public void stopLoadAnim() {\n avi.smoothToHide();\n loadTv.setVisibility(View.INVISIBLE);\n loginContainer.setVisibility(View.VISIBLE);\n }",
"public final void showLoadingIndicator(boolean z) {\n if (z) {\n ProgressBar progressBar = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbLogin);\n if (progressBar != null) {\n progressBar.setVisibility(0);\n return;\n }\n return;\n }\n ProgressBar progressBar2 = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbLogin);\n if (progressBar2 != null) {\n progressBar2.setVisibility(8);\n }\n }",
"@Override\n public void showProgressBar() {\n MainActivity.sInstance.showProgressBar();\n }",
"@Override\r\n\t\tpublic void onLoadingComplete(String arg0, View arg1, Bitmap arg2) {\n\t\t\tholder.app_icon.setVisibility(View.VISIBLE);\r\n\t\t}",
"@Override\n public void loadGif(String url) {\n CircularProgressDrawable progressPlaceHolder = ProgressBarUtil.getCircularProgressPlaceholder(getContext());\n if (!TextUtils.isEmpty(url)) {\n Glide.with(getContext())\n .asGif()\n .load(url)\n .apply(new RequestOptions()\n .placeholder(progressPlaceHolder))\n .into(ivGif);\n }\n }",
"protected final void showLoadingDialog() {\n }",
"@Override\n protected void onStartLoading() {\n super.onStartLoading();\n\n mLoadingIndicator.setVisibility(View.VISIBLE);\n\n forceLoad();\n }",
"public void setBarLabel(String message) {\n progressBarLabel.setText(message);\n }",
"public void onStopLoading() {\n cancelLoad();\n }",
"@Override\n protected void onPreExecute() {\n mLytContainerLayout.setVisibility(View.GONE);\n mToolbar.setVisibility(View.GONE);\n mPrgLoading.setVisibility(View.VISIBLE);\n }",
"@Override\n\t\t\tpublic void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {\n\t\t\t\tif (progressbar != null)\n\t\t\t\t\tprogressbar.setVisibility(View.GONE);\n\t\t\t}",
"@Override\n protected void onStopLoading() {\n cancelLoad();\n }",
"public void setLoadingStatus(LoadingStatus loadingStatus) {\n this.loadingStatus = loadingStatus;\n }",
"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}",
"public void setStateToInProgress() {\n progressBar.setIndeterminate(true);\n progressBarLabel.setText(\"Simulation is in progress...\");\n openFolderButton.setVisible(false);\n }",
"private void progressBarLoading() {\n new Thread(new Runnable() {\n public void run() {\n while (progressStatus < 100) {\n progressStatus += 1;\n handler.post(new Runnable() {\n public void run() {\n progressBar.setProgress(progressStatus);\n }\n });\n try {\n Thread.sleep(30);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n if (progressStatus == 100) {\n //intent for go next page\n MainActivityGo = new Intent(getApplicationContext(),MainActivity.class);\n startActivity(MainActivityGo);\n }\n }\n }).start();\n }",
"protected abstract String getLoadingMessage();",
"@Override\n public void onPageFinished(WebView view, String url){\n if (url.equals(getString(R.string.urlContact))) {\n fab.show();\n }\n progressBar.setVisibility(View.INVISIBLE);\n }",
"@Override\n protected void onStopLoading() {\n cancelLoad();\n }",
"public void setLoadingDescription(String description)\r\n\t{\r\n\t\tloadingWindow.setDescription(description);\r\n\t}",
"private final synchronized void m46525c(String str) {\n if (!mo39703C()) {\n loadUrl(str);\n } else {\n acd.m45783e(\"#004 The webview is destroyed. Ignoring action.\");\n }\n }",
"@Override\n public void onPageFinished(WebView view, String url) {\n if(!redirect){\n loadingFinished = true;\n }\n\n if(loadingFinished && !redirect){\n //HIDE LOADING IT HAS FINISHED\n if(dialog.isShowing())\n dialog.dismiss();\n relativeLayout.setVisibility(View.GONE);\n\n } else{\n redirect = false;\n }\n\n }",
"public void setUploading()\n {\n jPanel4.setVisible(false);\n th.start();\n }",
"public void onStopLoading() {\n boolean cancelLoad = cancelLoad();\n }"
]
| [
"0.6785701",
"0.6728997",
"0.663491",
"0.6597751",
"0.6520122",
"0.64353114",
"0.6403619",
"0.64014333",
"0.6376774",
"0.6375001",
"0.6332176",
"0.63294464",
"0.63215005",
"0.6309808",
"0.630527",
"0.62088156",
"0.6191272",
"0.6182557",
"0.61794114",
"0.6168333",
"0.61610705",
"0.61369294",
"0.6126661",
"0.6117509",
"0.60974497",
"0.6097398",
"0.6094458",
"0.6080368",
"0.60563767",
"0.6052126",
"0.6024478",
"0.6018682",
"0.6009866",
"0.5989338",
"0.59818774",
"0.59767944",
"0.59740424",
"0.5969234",
"0.5968728",
"0.59672725",
"0.5964189",
"0.59615356",
"0.59527844",
"0.59373134",
"0.5931161",
"0.59104",
"0.59015054",
"0.5840801",
"0.5834019",
"0.5818734",
"0.5811864",
"0.581031",
"0.5796964",
"0.5792538",
"0.57888365",
"0.5786948",
"0.57832897",
"0.5777122",
"0.5775839",
"0.57739437",
"0.57683194",
"0.5762878",
"0.5756604",
"0.5751575",
"0.57473236",
"0.5743997",
"0.5743136",
"0.57379174",
"0.5734829",
"0.573439",
"0.5725487",
"0.57188815",
"0.5708745",
"0.5702096",
"0.5700355",
"0.5695961",
"0.56939787",
"0.5678382",
"0.5666938",
"0.5654661",
"0.5642126",
"0.564185",
"0.56396514",
"0.56376785",
"0.56319386",
"0.5626142",
"0.56146264",
"0.56136775",
"0.5613221",
"0.56130606",
"0.56078595",
"0.56052023",
"0.5587762",
"0.5582957",
"0.5581255",
"0.5580907",
"0.5579548",
"0.5578216",
"0.5577958",
"0.55776715"
]
| 0.63134253 | 13 |
Convert the given object to string with each line indented by 4 spaces (except the first line). | private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPACES);\n }",
"private String toIndentedString(Object o)\n/* */ {\n/* 128 */ if (o == null) {\n/* 129 */ return \"null\";\n/* */ }\n/* 131 */ return o.toString().replace(\"\\n\", \"\\n \");\n/* */ }",
"private String toIndentedString( Object o )\n {\n if ( o == null )\n {\n return \"null\";\n }\n return o.toString().replace( \"\\n\", \"\\n \" );\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }",
"private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }"
]
| [
"0.78847593",
"0.75493765",
"0.74971926",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168"
]
| 0.0 | -1 |
To parse page been specified by URL. | List<ParseData> parse(ParseDataSettings parseData); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void parsePage() {\n seen = true;\n int first = id.indexOf('_', 0);\n int second = id.indexOf('_', first + 1);\n String firstDir = \"result_\" + id.substring(0, first);\n String secondDir = id.substring(0, second);\n String fileName = id + \".page\";\n String wholePath = pagePath + firstDir + File.separator + secondDir\n + File.separator + fileName;\n try {\n BufferedReader reader = new BufferedReader(new FileReader(wholePath));\n String line = null;\n while((line = reader.readLine()) != null) {\n if (line.equals(\"#ThisURL#\")) {\n url = reader.readLine();\n }\n// else if (line.equals(\"#Length#\")) {\n// length = Integer.parseInt(reader.readLine());\n// }\n else if (line.equals(\"#Title#\")) {\n title = reader.readLine();\n }\n else if (line.equals(\"#Content#\")) {\n content = reader.readLine();\n lowerContent = content.toLowerCase();\n break;\n }\n }\n reader.close();\n if (content == null) {\n return;\n }\n valid = true;\n } catch (IOException e) {\n// System.out.println(\"Parse page \" + id + \" not successful\");\n }\n }",
"public ParsedPage parse(String src);",
"Page getPage();",
"private void pageContent( String url) {\n\t\t\n\t\tif ( !url.matches(URL)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tList<String> outlinks = null; // out link urls\n\t\tUrlBean bean = null; // basic info of the url\n\t\t\n\t\tbean = new UrlBean();\n\t\ttry {\n\t\t\t\n\t\t\tconn = Jsoup.connect(url).timeout(5000);\n\t\t\tif ( conn == null) {\n\t\t\t\treturn ;\n\t\t\t}\n\t\t\t\n\t\t\tdocument = conn.get(); // 得到网页源代码,超时时间是5秒\n\t\t\t\n\t\t\t/*\n\t\t\t * 文章基本信息\n\t\t\t */\n\t\t\telements = document.getElementsByTag(\"title\");\n\t\t\tif ( elements!= null && elements.size() != 0) {\n\t\t\t\telement = elements.get(0);\n\t\t\t}\n\t\t\tString title = element.text();\n\t\t\tbean.setTitle(title);\n\t\t\tbean.setKeywords(title);\n\t\t\t\n\t\t\telements = document.getElementsByTag(\"a\");\n\t\t\tif ( elements != null) {\n\t\t\t\tString linkUrl = null;\n\t\t\t\toutlinks = new ArrayList<String>();\n\t\t\t\tfor ( int i = 0; i < elements.size(); i++) {\n\t\t\t\t\tlinkUrl = elements.get(i).attr(\"href\");\n\t\t\t\t\tif ( linkUrl.matches(URL)) {\n\t\t\t\t\t\toutlinks.add(linkUrl);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t} \n\t\t\n\t\tbean.setUrl(url);\n\t\tbean.setId(urlId++);\n\t\tbean.setRank(1);\n\t\tif ( outlinks != null) {\n\t\t\tint count = outlinks.size();\n\t\t\tbean.setOutlinks(count);\n\t\t\tfor ( int i = 0; i < count; i++) {\n\t\t\t\turlsSet.add(outlinks.get(i));\n\t\t\t}\n\t\t\tif ( new AllInterface().addOneUrlInfo(bean, outlinks)) {\n\t\t\t\tSystem.out.println(\"Add to database successfully, url is '\" + url + \"'.\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Fail to add to database, maybe url exists. Url is '\" + url + \"'.\");\n\t\t\t}\n\t\t\tSystem.out.println(\"[\" + count + \" urls remain...]\");\n\t\t\tSystem.out.println();\n\t\t} else {\n\t\t\tSystem.out.println(\"Error occurs in crawl, url is '\" + url + \"'.\");\n\t\t\tSystem.out.println(\"[[FINISHED]]\");\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t}",
"static List<WebURL> ExtractUrl(Page page){\n // TODO: reference to parser to extractor urls from the web content\n return null;\n }",
"public void getNextPage(String url) {\n String kw = \"flag\";\n client = new OkHttpClient();\n final Request request = new Request.Builder()\n .url(url)\n .build();\n Call call = client.newCall(request);\n call.enqueue(new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n System.out.println(e);\n }\n\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n String htmlStr = response.body().string();\n //Type listTpye = new TypeToken<LinkedList<QueryRes>>(){}.getType();\n //System.out.println(htmlStr.toString());\n\n try {\n json = new JSONObject(htmlStr);\n //parsePageJson(json);\n System.out.println(json);\n } catch (Exception e) {\n System.out.println(\"error again\");\n }\n //parseJson(json);\n Message msg = handler.obtainMessage();\n msg.what = 1;\n handler.sendMessage(msg);\n //parsePageJson(page_json);\n }\n });\n }",
"public abstract XMLDocument parse(URL url);",
"@Override\n\tpublic void process(Page page) {\n\t\tDocument doc = Jsoup.parse(page.getHtml().getFirstSourceText());\n\n\t\tif (isFirst) {\n\t\t\tSystem.out.println(\"添加所有列表链接\");\n\t\t\tArrayList<String> urls = new ArrayList<String>();\n\t\t\t// 33\n\t\t\tfor (int i = 2; i < 30; i++) {\n\t\t\t\turls.add(\"http://zyjy.jiangmen.gov.cn//szqjszbgg/index_\" + i + \".htm\");\n\t\t\t}\n\t\t\tpage.addTargetRequests(urls);\n\t\t\tSystem.out.println(\"这一页一共有 \" + urls.size() + \" 条数据\");\n\n\t\t\tisFirst = false;\n\t\t}\n\n\t\tif (page.getUrl().regex(URL_LIST).match() || page.getUrl().toString().trim().equals(url)) {\n\t\t\tSystem.out.println(\"获取列表数据\");\n\n\t\t\tElements uls = doc.getElementsByAttributeValue(\"class\", \"c1-bline\");\n\t\t\tfor (Element ul : uls) {\n\t\t\t\tString url = ul.getElementsByAttributeValue(\"class\", \"f-left\").get(0).select(\"a\").attr(\"href\").trim();\n\t\t\t\tString title = ul.getElementsByAttributeValue(\"class\", \"f-left\").get(0).text();\n\t\t\t\tString data = ul.getElementsByAttributeValue(\"class\", \"f-right\").get(0).text();\n\t\t\t\tCacheHashMap.cache.put(url, title + \"###\" + data);\n\t\t\t\tMyUtils.addRequestToPage(page, url);\n\t\t\t\tSystem.out.println(url + \" \" + CacheHashMap.cache.get(url));\n\t\t\t}\n\n\t\t}\n\t\tif (page.getUrl().regex(URL_DETAILS).match()) {\n\n\t\t\tProject project = new Project();\n\t\t\tStringBuffer project_article = new StringBuffer();\n\n\t\t\tString urldetails = CacheHashMap.cache.get(page.getUrl().toString().trim());\n\t\t\tSystem.out.println(\"url\" + page.getUrl().toString().trim());\n\t\t\tSystem.out.println(\"urldetails \" + urldetails);\n\n\t\t\tString[] value = urldetails.split(\"###\");\n\t\t\tif (value != null && value.length > 1) {\n\t\t\t\tproject.setProjectName(value[0]);\n\t\t\t\tproject.setPublicStart(value[1]);\n\t\t\t}\n\n\t\t\tElements divs = doc.getElementsByAttributeValue(\"class\", \"contlist minheight\");\n\t\t\tfor (Element div : divs.get(0).children()) {\n\t\t\t\tif (div.nodeName().equals(\"table\")) {\n\t\t\t\t\tElements trs = divs.select(\"tbody\").select(\"tr\");\n\t\t\t\t\tfor (Element tr : trs) {\n\t\t\t\t\t\tproject_article.append(tr.text()).append(\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tproject_article.append(div.text()).append(\"\\n\");\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tproject.setUrl(page.getUrl().toString().trim());\n\t\t\tproject.setState(0);\n\t\t\tproject.setWebsiteType(\"江门市\");\n\t\t\tproject.setTime(MyUtils.getcurentTime());\n\t\t\tproject.setRawHtml(divs.toString());\n\n\t\t\tproject.setArticle(project_article.toString());\n\t\t\tSystem.out.println(project);\n\n\t\t\tHibernateUtil.save2Hibernate(project);\n\n\t\t}\n\n\t}",
"PageAgent getPage();",
"final void searchPage(DataInputStream dis,String url)\r\n {\r\n try\r\n\t{\r\n String input; // Raw line read in.\r\n\t String upperCaseInput; // Upper case version of the above\r\n\t String link; // HTML link found\r\n\t String temp; \r\n\t String title=\"\"; // Page Title;\r\n\r\n\t // Read a line at a time.\r\n\t while((input=dis.readLine())!=null)\r\n\t {\r\n\t // Convert to Upper case (makes comparisions easier)\r\n\t\tupperCaseInput=input.toUpperCase();\r\n\t\t// Check for document title\r\n\t\ttemp=parseForTitle(input,upperCaseInput,dis);\r\n\t\t// If a title has been found then remember it. So, that it can displayed on the list box.\r\n\t\tif(temp!=null && temp.length()>0)\r\n\t\t title=temp;\r\n\t //Check for match after title has been found (Don't bother Searching the title though)\r\n\t\tif(title.length()>0 && temp==null)\r\n\t\t checkMatch(input,url,title);\r\n \r\n\t\t// Check to see if this line contains a link\r\n\t\tlink=parseForLink(upperCaseInput,input);\r\n\t\tif(link!=null)\r\n\t\t{\r\n\t\t // Check if the maximum number of pages to search has been reached.\r\n\t\t if(app.getTotalPages()>=maxPages)\r\n\t\t return;\r\n if(topLevelSearch==FIND_TOP_LEVEL_PAGES)\r\n\t\t topLevelPages.addElement(link);\r\n else if(topLevelSearch==SEARCH_TOP_LEVEL_PAGES)\r\n\t\t nextLevelPages.addElement(link);\r\n\t\t else checkLink(link);\t \r\n\t\t}\r\n\t }\r\n }\r\n\tcatch(IOException e){ }\r\n }",
"public PageList() { \n// fileIO = new CharFileIO(\"utf-8\");\n// We are not currently using this to extract 'title' because it doesn't work \n// for whose title and meta-description tags are not explicitly specified;\n// Such as pages written in scripting languages like .jsp, .asp etc \n// parseJob = new ParseJob();\n }",
"private String getText(URL url){\n\tString parsedHtml=null;\n\ttry{\n\t\tHttpURLConnection urlConn = (HttpURLConnection) url.openConnection();\n\t\tString line = null;\n\t\tStringBuilder tmp = new StringBuilder();\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));\n\t\twhile ((line = in.readLine()) != null) {\n\t\t tmp.append(line);\n\t\t}\n\t\t \n\t\tDocument doc = Jsoup.parse(tmp.toString());\n\t\tparsedHtml = doc.title() + doc.body().text();\n\t\t\n\t}\n\tcatch(IOException e){\n\t\tSystem.out.println(\"Page not reached for: \"+url );\n\t}\n\tfinally{\n\t\treturn parsedHtml;\n\t}\n\t\n}",
"WebCrawlerData retrieve(String url);",
"@Override\n public Page extractPage(String link) {\n\n return new Page(link, extract(link));\n }",
"int getPage();",
"@Override\n public void visit(Page page) {\n\t visitObject.visitUrls(page);\n\t String url = page.getWebURL().getURL();\n\t System.out.println(\"URL: \" + url);\n\t if (page.getParseData() instanceof HtmlParseData) {\n\t\t HtmlParseData htmlParseData = (HtmlParseData) page.getParseData();\n\t\t String text = htmlParseData.getText();\n\t\t String html = htmlParseData.getHtml();\n\t\t Set<WebURL> links = htmlParseData.getOutgoingUrls();\n\t\t System.out.println(\"Text length: \" + text.length());\n\t\t System.out.println(\"Html length: \" + html.length());\n\t\t System.out.println(\"Number of outgoing links: \" + links.size());\n\t\t }\n }",
"public void processDocument(String url) throws PageReadException {\n // TODO: reset the results.\n impossible = false;\n givenUrl = url;\n nextPageLink = null;\n if (!notFirstPage) {\n xmlImages = new ArrayList<String>();\n title = null;\n }\n\n String content = pageReader.readPage(url);\n\n document = Jsoup.parse(content);\n\n if (document.getElementsByTag(\"body\").size() == 0) {\n LOG.error(\"no body to parse \" + url);\n impossible = true;\n throw new PageReadException(\"no body to parse\");\n }\n\n init(); // this needs another name, it does all the work.\n if (readAllPages && nextPageLink != null) {\n try {\n String textSoFar = articleText;\n notFirstPage = true;\n processDocument(nextPageLink);\n if (articleText != null) {\n articleText = textSoFar + articleText;\n }\n } finally {\n notFirstPage = false;\n System.out.println(articleText);\n }\n }\n\n }",
"@VisibleForTesting\n\tDocument parseLocalFile(String url) throws IOException {\n\t\treturn Jsoup.parse(new File(url), \"UTF-8\", \"\");\n\t}",
"public void search(String url) throws ParseException {\r\n\t\tSpiderLeg leg = new SpiderLeg();\r\n\t\tif (this.pagesToVisit.isEmpty()) {\r\n\t\t\tthis.pagesToVisit.add(url);\r\n\t\t}\r\n\r\n\t\tfor (Iterator iterator = pagesToVisit.iterator(); iterator.hasNext();) {\r\n\t\t\tString page = (String) iterator.next();\r\n\t\t\tleg.crawl(page);\r\n\t\t\tthis.pagesToVisit.addAll(leg.getPageLinks());\r\n\t\t\tthis.reviewPagesToVisit.addAll(leg.getReviewLinks());\r\n\t\t\tthis.pagesVisited.add(page);\r\n\t\t}\r\n\r\n\t\tleg.getReviewContent(this.reviewPagesToVisit);\r\n\t\tSystem.out.println(\"\\n**Done** Visited \" + this.pagesVisited.size()\r\n\t\t\t\t+ \" web page(s)\");\r\n\t}",
"public static Set<String> parsePage(Document doc){\n\t\ttry{\n\t\t\tElements links = doc.select(\"a[href]\");\n\t\t\tSet<String> pageLinks = new HashSet<String>();\n\t\t\tfor(Element link : links){\n\t\t\t\tpageLinks.add(link.attr(\"abs:href\"));\n\t\t\t}\n\t\t\treturn pageLinks;\n\t\t}catch(Exception err){\n\t\t\terr.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}",
"private String fetchUrl() {\n\t\tString url;\n\t\tint depth;\n\t\tdo\n\t\t{\n\t\t\tLandingPage lp = this.pagesToVisit.remove(0);\n\t\t\turl = lp.getUrl();\n\t\t\tdepth = lp.getDepth();\n\t\t\t\n\t\t}while(this.pagesVisited.containsKey(url) || !(isvalidURL(url)));\n\t\tthis.pagesVisited.put(url,depth);\n\t\treturn url;\n\t}",
"public static String getPage(String urlStr) throws IOException {\n\t\tURL url = new URL(urlStr);\n\t\tHttpURLConnection httpUrlConnection = (HttpURLConnection)url.openConnection();\n\t\thttpUrlConnection.connect();\n\t\tString page = getPageFromUrlConnection(httpUrlConnection);\n\t\thttpUrlConnection.disconnect();\n\t\treturn page;\n\t}",
"public Collection<String> parse(Reader page)\r\n\t{\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t\r\n\t\t\t//create an input source to parse from the stream\r\n\t\t\tInputSource pageInputSource = new InputSource(page);\r\n\t\t\t\r\n\t\t\t// parse page\r\n\t\t\tp.parse(pageInputSource);\r\n\t\t\t\r\n\t\t\treturn linkContextHandler.removeLinkStrings();\r\n\t\t} catch (IOException e)\r\n\t\t{\r\n\r\n\t\t\tLogger.log(0, this.getClass().getSimpleName(), \"parse\",\r\n\t\t\t\t\t\"input error, couldn't parse page: \" + e.toString());\r\n\t\t} catch (SAXException e)\r\n\t\t{\r\n\t\t\tLogger.log(0, this.getClass().getSimpleName(), \"parse\",\r\n\t\t\t\t\t\"SAX exception, tag soup couldn't parse page: \"\r\n\t\t\t\t\t\t\t+ e.toString());\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}",
"public Parser(URL url) {\n \t\t\ttry {\n \t\t\t\tload(url.openStream());\n \t\t\t} catch (Exception e) {\n \t\t\t\t// continue ... actual parsing will report errors\n \t\t\t}\n \t\t}",
"public String ProcessHTMLPage(String url) {\n\t\tString htmlSource = null;\n\t\tSystem.out.println(\"processing ..\" + url);\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\ttry {\n\t\t\thtmlSource = getURLSource(url);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDocument document = Jsoup.parse(htmlSource);\n\n\t\torg.jsoup.select.Elements allElements = document.getAllElements();\n\t\tfor (Element element : allElements) {\n\t\t\tif (element.nodeName().matches(\n\t\t\t\t\t\"^.*(p|h1|h2|h3|h4|h5|h6|title|body|li|a|em|i|ins|big|bdo|b|blockquote|center|mark|small|string|sub|sup|tt|u).*$\")) {\n\t\t\t\tif (!element.ownText().isEmpty()) {\n\t\t\t\t\t// System.out.println(element.nodeName()\n\t\t\t\t\t// + \" \" + element.ownText());\n\t\t\t\t\tstringBuilder.append(element.ownText());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn stringBuilder.toString();\n\n\t}",
"public static Document getPage() throws IOException {\n\n String url = \"http://pogoda.spb.ru/\";\n Document page = Jsoup.parse(new URL(url), 3000);\n return page;\n\n }",
"private void parseIndex() throws IOException {\n\t\tDocument doc = Jsoup.connect(WOLFF + \"/bioscopen/cinestar/\").get();\n\t\tElements movies = doc.select(\".table_agenda td[width=245] a\");\n\t\t\n\t\tSet<String> urls = new HashSet<String>();\n\t\tfor(Element movie : movies) {\n\t\t\turls.add(movie.attr(\"href\"));\n\t\t}\n\t\t\n\t\tfor(String url: urls) {\n\t\t\tparseMovie(url);\n\t\t}\n\t}",
"public HtmlPage getHtmlPageFromUrl(String url, Map<String, String> header) {\r\n\t\treturn getHtmlPageFromUrl(url, header, false);\r\n\t}",
"@Override\n\tpublic void visit(Page page) {\n\t\tint docid = page.getWebURL().getDocid();\n\t\tString url = page.getWebURL().getURL();\n\t\tString domain = page.getWebURL().getDomain();\n\t\tString path = page.getWebURL().getPath();\n\t\tString subDomain = page.getWebURL().getSubDomain();\n\t\tString parentUrl = page.getWebURL().getParentUrl();\n\n\t\tSystem.out.println(\"Docid: \" + docid);\n\t\tSystem.out.println(\"URL: \" + url);\n\t\tSystem.out.println(\"Domain: '\" + domain + \"'\");\n\t\tSystem.out.println(\"Sub-domain: '\" + subDomain + \"'\");\n\t\tSystem.out.println(\"Path: '\" + path + \"'\");\n\t\tSystem.out.println(\"Parent page: \" + parentUrl);\n\n\t\tif(page.getParseData() instanceof JavaScriptParseData) {\n\t\t\tSystem.out.println(\"Got an instance of JS Parse DATA!!!!\");\n\t\t\tSystem.out.println(\"Parent Page of JS data is : \" + page.getWebURL().getParentUrl());\n\n\t\t\tJavaScriptParseData jsParseData = (JavaScriptParseData) page.getParseData();\n\t\t\tString jsText = jsParseData.getJs();\n\n\t\t\ttry {\n\t\t\t\tif(DomainTrackerParser.containsTracker(jsText)){\n\t\t\t\t\tdomainTrackerSet.add(url);\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\tif (page.getParseData() instanceof HtmlParseData) {\n\t\t\tHtmlParseData htmlParseData = (HtmlParseData) page.getParseData();\n\t\t\tString text = htmlParseData.getText();\n\t\t\tString html = htmlParseData.getHtml();\n\t\t\tList<WebURL> links = htmlParseData.getOutgoingUrls();\n\n\t\t\tSystem.out.println(\"Text length: \" + text.length());\n\t\t\tSystem.out.println(\"Html length: \" + html.length());\n\t\t\tSystem.out.println(\"Number of outgoing links: \" + links.size());\n\n\t\t\tfor(WebURL webUrl : links) {\n\t\t\t\tString urlString = webUrl.getURL().toString();\n\n\t\t\t\ttry {\n\t\t\t\t\tif(urlString != null && DomainTrackerParser.containsTracker(urlString)) {\n\t\t\t\t\t\tSystem.out.println(\"added a tracker to the set : \" + urlString);\n\t\t\t\t\t\tdomainTrackerSet.add(urlString);\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n//\t\t\t\tSystem.out.println(\"Outgoing URL : \" + webUrl);\n//\t\t\t\tSystem.out.println(domainTrackerSet);\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"=============\");\n\t}",
"Integer getPage();",
"CachedPage getCachedPage(String url);",
"public void crawl(String url);",
"public synchronized Node parse(String url) throws IOException,SAXException\n {\n if(log.isDebugEnabled())\n log.debug(\"parse: \"+url);\n return parse(new InputSource(url));\n }",
"public ArrayList<String> soupThatSite(String url) throws IOException {\n\n ArrayList<String> parsedDoc = new ArrayList<>();\n Document doc = Jsoup.connect(url).get();\n\n if (url.contains(\"cnn.com\")) {\n\n doc.select(\"h1\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n doc.select(\".zn-body__paragraph\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n } else {\n\n doc.select(\"h1\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n doc.select(\"p\").stream().filter(Element::hasText).forEach(element -> {\n String str = element.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n }\n\n return parsedDoc;\n }",
"@Override\r\n public void visit(Page page) {\r\n String url = page.getWebURL().getURL();\r\n System.out.println(\"URL: \" + url);\r\n\r\n if (page.getParseData() instanceof HtmlParseData) {\r\n HtmlParseData htmlParseData = (HtmlParseData) page.getParseData();\r\n String text = htmlParseData.getText();\r\n String html = htmlParseData.getHtml();\r\n List<WebURL> links = htmlParseData.getOutgoingUrls();\r\n\r\n System.out.println(\"Text length: \" + text.length());\r\n System.out.println(\"Html length: \" + html.length());\r\n System.out.println(\"Number of outgoing links: \" + links.size());\r\n\r\n try {\r\n Configuration config = new Configuration();\r\n System.setProperty(\"HADOOP_USER_NAME\", \"admin\");\r\n FileSystem fileSystem = FileSystem.get(new URI(\"hdfs://192.168.51.116:8022/\"), config);\r\n FSDataOutputStream outStream = fileSystem.append(new Path(\"/user/admin/crawler-results.txt\"));\r\n\r\n IOUtils.write(text.replace('\\n', ' '), outStream);\r\n outStream.flush();\r\n IOUtils.closeQuietly(outStream);\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n throw new RuntimeException(ex);\r\n }\r\n }\r\n }",
"public void getInfoPage(URL urlLocation) throws RuntimeException\r\n {\r\n BufferedReader in = null;\r\n\r\n try\r\n {\r\n URL url = urlLocation;\r\n\r\n HTTPConnection con = getConnectionToURL(url);\r\n\r\n HTTPResponse headRsp = con.Head(url.getFile());\r\n HTTPResponse rsp = con.Get(url.getFile());\r\n\r\n int status = headRsp.getStatusCode();\r\n\r\n if (status < 300 && DEBUG)\r\n {\r\n System.out.println(\"No authorization required to access \" + url);\r\n }\r\n else if (status >= 400 && status != 401 && status != 407)\r\n {\r\n String errorMsg = \"Error trying to access \" + url + \":\\n\" + headRsp;\r\n if (DEBUG)\r\n {\r\n System.out.println(errorMsg);\r\n }\r\n }\r\n else\r\n { // Everything else\r\n String errorMsg = \"Access to URL \" + url + \"returned status = \" + status + \":\\n\" + headRsp;\r\n if (DEBUG)\r\n {\r\n System.out.println(errorMsg);\r\n }\r\n }\r\n in = new BufferedReader(new InputStreamReader(rsp.getInputStream()));\r\n String inputLine;\r\n\r\n while ((inputLine = in.readLine()) != null)\r\n {\r\n processHTMLLine(inputLine);\r\n if (DEBUG)\r\n {\r\n System.out.println(inputLine);\r\n }\r\n }\r\n\r\n }\r\n catch (Exception exc)\r\n {\r\n String errorMsg = \"GetPageInfo::getInfoPage(URL) Caught: \\n[\" + exc + \"]\";\r\n if (DEBUG)\r\n {\r\n System.out.println(errorMsg);\r\n }\r\n throw new RuntimeException(errorMsg);\r\n }\r\n }",
"public static String getPage(String u) throws IOException {\n\t\tURL url = new URL(u);\n\t\tURLConnection yc = url.openConnection();\n\t\tyc.addRequestProperty(\"User-Agent\", \"Mozilla/4.76\"); \n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(\n\t\t\t\tyc.getInputStream()));\n\t\tString inputLine;\n\t\tString content=\"\";\n\t\twhile ((inputLine = in.readLine()) != null)\n\t\t\tcontent+=inputLine+\"\\n\";\n\t\tin.close();\n\t\treturn content;\n\t}",
"protected void page () throws HTMLParseException {\r\n while (block.restSize () == 0) {\r\n switch (nextToken) {\r\n case END:\r\n return;\r\n case LT:\r\n lastTagStart = tagStart;\r\n tagmode = true;\r\n match (LT);\r\n tag (lastTagStart);\r\n break;\r\n case COMMENT:\r\n //block.addToken (new Token (pagepart, Token.COMMENT, tagStart, stringLength));\r\n // 2009.05.28 by in-koo cho\r\n addTokenCheck(new Token (pagepart, Token.COMMENT, tagStart, stringLength));\r\n match (COMMENT);\r\n break;\r\n case SCRIPT:\r\n //block.addToken (new Token (pagepart, Token.SCRIPT, tagStart, stringLength));\r\n addTokenCheck(new Token (pagepart, Token.SCRIPT, tagStart, stringLength));\r\n match (SCRIPT);\r\n break;\r\n case STRING:\r\n if(stringLength > -1){\r\n //block.addToken (new Token (pagepart, Token.TEXT, tagStart, stringLength));\r\n // 2009.05.28 by in-koo cho\r\n addTokenCheck(new Token (pagepart, Token.TEXT, tagStart, stringLength));\r\n }\r\n match (nextToken);\r\n break;\r\n case MT:\r\n if(!tagmode) {\r\n scanString();\r\n }\r\n default:\r\n if(stringLength > -1){\r\n //block.addToken (new Token (pagepart, Token.TEXT, tagStart, stringLength));\r\n // 2009.05.28 by in-koo cho\r\n addTokenCheck(new Token (pagepart, Token.TEXT, tagStart, stringLength));\r\n }\r\n match (nextToken);\r\n }\r\n }\r\n }",
"public void processUrl() {\n try {\n\n JsonNode rootNode = getJsonRootNode(getJsonFromURL()); // todo: pass url in this method (to support multi-urls)\n getValuesFromJsonNodes(rootNode);\n setAndFormatValues();\n\n } catch (Exception e) {\n System.out.println(\"ERROR: caught error in processUrl()\");\n e.printStackTrace();\n }\n }",
"public CrawlerResult crawl(URL url){\n //Creating the crawler result\n CrawlerResult rslt = new CrawlerResult(url);\n logger.info(url +\" started crawling....\");\n try{\n //Get the Document from the URL\n Document doc = Jsoup.connect(url.toString()).get();\n\n rslt.setTitle(doc.title());\n\n //links on the page\n Elements links = doc.select(\"a\");\n\n //Links on the page\n for(Element link : links){\n rslt.addLinksOnPage(new URL(link.attr(\"abs:href\")));\n }\n }catch(Exception e){\n //TODO\n }\n logger.info(url +\" finished crawled.\");\n return rslt;\n }",
"void retrievePageContents()\n\t{\n\t\tStringBuilder longString = new StringBuilder();\n\t\tfor (int i = 0; i < pageContents.size(); i++)\n\t\t{\n\t\t\tlongString.append(pageContents.get(i));\n\t\t}\n\t\tString pageMarkup = longString.toString().toLowerCase();\n\t\textractComments(pageMarkup);\n\n\t}",
"private String getContent(String url) throws BoilerpipeProcessingException, IOException {\n int code;\n HttpURLConnection connection = null;\n URL uri;\n do{\n uri = new URL(url);\n if(connection != null)\n connection.disconnect();\n connection = (HttpURLConnection)uri.openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setConnectTimeout(5000);\n connection.setReadTimeout(5000);\n connection.connect();\n code = connection.getResponseCode();\n if(code == 301)\n url = connection.getHeaderField( \"Location\" );\n }while (code == 301);\n\n System.out.println(url + \" :: \" + code);\n String content = null;\n if(code < 400) {\n content = ArticleExtractor.INSTANCE.getText(uri);\n }\n connection.disconnect();\n return content;\n }",
"lanyotech.cn.park.protoc.CommonProtoc.PageHelper getPage();",
"public static int getPageFrom(String info) {\n/* 793 */ int pageNum = 0;\n/* */ \n/* 795 */ if (!Utils.isNullOrEmpty(info)) {\n/* */ try {\n/* 797 */ JSONObject jsonObj = new JSONObject(info);\n/* 798 */ pageNum = jsonObj.getInt(\"From\");\n/* 799 */ } catch (Exception e) {\n/* 800 */ AnalyticsHandlerAdapter.getInstance().sendException(e);\n/* */ } \n/* */ }\n/* */ \n/* 804 */ return pageNum;\n/* */ }",
"public static Parser getParser(String url)\n\t{\n\t\ttry\n\t\t{\n\t\t\tjava.net.URLConnection conn = (new java.net.URL(url)).openConnection();\n\t\t\tconn.setRequestProperty(\"User-Agent\", \"Mozilla\");\n\t\t\tParser p = new Parser(conn);\n\t\t\treturn p;\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tlogger.error(e.getMessage(), e);\n\t\t}\n\t\treturn null;\n\t}",
"private void getThePage(String location){\r\n try{\r\n //load document and display location\r\n contentsArea.setPage(location);\r\n enterField.setText(location);\r\n }\r\n catch(IOException ioe){\r\n JOptionPane.showMessageDialog(this, \"Error retrieving specified URL\",\"Bad URL\",JOptionPane.ERROR_MESSAGE);\r\n } //end catch\r\n }",
"public static void handleList(Page page){\n\n logger.info(\"handle:\" + page.getUrl());\n Document document = page.getHtml().getDocument();\n String currentUrl = document.location();\n String date =currentUrl.substring(currentUrl.lastIndexOf(\"/\")+1);\n\n Elements competitions = document.select(\"div.competition-matches\");\n for (Element competition : competitions) {\n String competitionName = competition.select(\"div.competition-name\").text();\n logger.debug(competition.html());\n Elements matches = competition.select(\"div.match-row\");\n\n if(matches.isEmpty()){\n continue;//没有比赛\n }\n for (Element match : matches) {\n Elements mainData = match.select(\"a.match-main-data-link\");\n String href = mainData.attr(\"abs:href\");\n String[] split = href.split(\"/\");\n int lastIndex = href.lastIndexOf(\"/\");\n String newUrl = href.substring(0,lastIndex)+\"/commentary-result\"+href.substring(lastIndex);\n Request request = new Request(newUrl);\n request.putExtra(Const.COMPETITION,competitionName);\n request.putExtra(Const.DATE,date);\n request.putExtra(Const.PAGE_TYPE,Const.DETAIL);\n request.putExtra(Const.MATCH,split[split.length-2]);\n page.addTargetRequest(request);\n }\n\n }\n }",
"public static void parsepage(String sourcecode) {\r\n\t\tint indexfrom = 0;\r\n\t\tint indexto = 0;\r\n\t\t\r\n\t\tindexfrom = sourcecode.indexOf(\"<title>\", indexfrom + 1);\r\n\t\tindexto = sourcecode.indexOf(\"</title>\", indexto + 1);\r\n\t\tif(indexfrom != -1 && indexto != -1) {\r\n\t\t\tSystem.out.println(sourcecode.substring(indexfrom + 7, indexto) + \"\\n\\r\");\r\n\t\t}\r\n\r\n\t\tindexfrom = 0;\r\n\t\tindexto = 0;\r\n\t\twhile(true) {\r\n\t\t\tindexfrom = sourcecode.indexOf(\"<\", indexfrom + 1);\r\n\t\t\tif(indexfrom != -1) {\r\n\t\t\t\tif(sourcecode.substring(indexfrom, indexfrom+6).contains(\"<p>\")) {\r\n\t\t\t\t\tindexto = sourcecode.indexOf(\"</p>\", indexfrom + 2);\r\n\t\t\t\t\tif(indexto != -1) {\r\n\t\t\t\t\t\tSystem.out.println(sourcecode.substring(indexfrom + 3, indexto) + \"\\n\\r\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(sourcecode.substring(indexfrom, indexfrom+6).contains(\"<img\")) {\r\n\r\n\t\t\t\t\tindexto = sourcecode.indexOf(\"src=\\\"\", indexfrom + 2);\r\n\t\t\t\t\tif(indexto != -1) {\r\n\t\t\t\t\t\tString imagepath = sourcecode.substring(indexto+5, sourcecode.indexOf(\"\\\"\", indexto+5));\r\n\t\t\t\t\t\tif(!imagepath.contains(host)) {\r\n\t\t\t\t\t\t\tif(imagepath.contains(\":\")) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tString[] tokens = url.split(\"\\\\/(?=[^\\\\/]+$)\");\r\n\t\t\t\t\t\t\t\thost = tokens[0];\r\n\t\t\t\t\t\t\t\tif(host.startsWith(\"http://\")) {\r\n\t\t\t\t\t\t\t\t\thost = host.substring(host.indexOf(\"//\") + 2);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(!host.startsWith(\"www.\")) {\r\n\t\t\t\t\t\t\t\t\thost = \"www.\" + host;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(imagepath.startsWith(\"/\")) {\r\n\t\t\t\t\t\t\t\t\timagepath = \"http://\" + host + imagepath;\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tif(host.endsWith(\"/\")) {\r\n\t\t\t\t\t\t\t\t\t\timagepath = \"http://\" + host + imagepath;\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\timagepath = \"http://\" + host + \"/\" + imagepath;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tdownloadimage(imagepath);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcatch(IOException e) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t} else {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}",
"Pages getPages();",
"private List<Elements> extractHTMLInfo(String url) throws IOException {\r\n\r\n //All required info to be collected is within the <section> tag\r\n Element sectionTag = Jsoup.connect(url).get().select(\"section\").get(0);\r\n\r\n List<Elements> list = new ArrayList();\r\n\r\n //Banner img Tag\r\n list.add(sectionTag.select(\"img\"));\r\n\r\n //TimeTag\r\n list.add(sectionTag.select(\"header\").select(\"time\"));\r\n\r\n //Article Title\r\n list.add(sectionTag.select(\"header\").select(\"h2 a\"));\r\n\r\n //Author\r\n list.add(sectionTag.select(\"header\").select(\"p a\"));\r\n\r\n //Content Body HTML\r\n list.add(sectionTag.select(\"article\").select(\"div\"));\r\n\r\n return list;\r\n }",
"public static Article scrape (String string_url) {\n try {\n\n Article article = new Article();\n\n URL url = new URL(string_url);\n\n final HTMLDocument htmlDoc = HTMLFetcher.fetch(url);\n\n final BoilerpipeExtractor extractor = CommonExtractors.ARTICLE_EXTRACTOR;\n\n final HTMLHighlighter hh = HTMLHighlighter.newExtractingInstance();\n hh.setOutputHighlightOnly(true);\n\n TextDocument doc = new BoilerpipeSAXInput(htmlDoc.toInputSource()).getTextDocument();\n extractor.process(doc);\n final InputSource is = htmlDoc.toInputSource();\n article.html_text = hh.process(doc, is);\n article.source = string_url;\n article.title = doc.getTitle();\n article.encoded_source = TextHelper.toSHA1(string_url);\n return article;\n } catch (Exception ex) {\n ExceptionNotification.printException(ex);\n return new Article();\n }\n }",
"private void processAllPages(final HtmlPage page, final HashMap<String, Object> metaData) {\n int pageNumber = 1;\n\n HtmlPage actualPage = page;\n\n while (actualPage!= null && isPageValid(actualPage)) {\n if (actualPage.getWebResponse().getStatusCode() != HTTP_SUCCESS_CODE) {\n logger.error(\"Received non-200 status code while trying to read from {}.\", actualPage.getUrl());\n throw new UnrecoverableException(\"Crawling failed due to non-200 HTTP response.\");\n }\n\n logger.info(\"Processing page #{}\", pageNumber);\n publishTenders(actualPage, metaData);\n\n logger.debug(\"Data extracted, moving to next page.\");\n pageNumber++;\n\n actualPage = getNextPage(actualPage, pageNumber);\n }\n }",
"private LazyParsedPage parse(\n\t PageTitle title,\n\t LazyPreprocessedPage ppAst,\n\t EntityMap entityMap,\n\t ContentNode parentLog)\n\t throws CompilerException\n\t{\n\t\tParserLog log = new ParserLog();\n\t\tparentLog.getContent().add(log);\n\t\t\n\t\tStopWatch stopWatch = new StopWatch();\n\t\tstopWatch.start();\n\t\t\n\t\ttry\n\t\t{\n\t\t\tPreprocessedWikitext preprocessedWikitext =\n\t\t\t PreprocessorToParserTransformer.transform(\n\t\t\t ppAst,\n\t\t\t entityMap,\n\t\t\t true);\n\t\t\t\n\t\t\tLazyParser parser = new LazyParser(wikiConfig);\n\t\t\t\n\t\t\tLazyParsedPage parsedAst =\n\t\t\t (LazyParsedPage) parser.parseArticle(\n\t\t\t preprocessedWikitext,\n\t\t\t title.getTitle());\n\t\t\t\n\t\t\tparsedAst.getWarnings().addAll(ppAst.getWarnings());\n\t\t\t\n\t\t\treturn parsedAst;\n\t\t}\n\t\tcatch (xtc.parser.ParseException e)\n\t\t{\n\t\t\tlog.getContent().add(new ParseException(e.getMessage()));\n\t\t\t\n\t\t\tthrow new CompilerException(\"Parsing failed!\", e);\n\t\t}\n\t\tcatch (Throwable e)\n\t\t{\n\t\t\tlogger.error(\"Parsing failed!\", e);\n\t\t\t\n\t\t\tStringWriter w = new StringWriter();\n\t\t\te.printStackTrace(new PrintWriter(w));\n\t\t\tlog.getContent().add(new UnhandledException(e, w.toString()));\n\t\t\t\n\t\t\tthrow new CompilerException(\"Parsing failed!\", e);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tstopWatch.stop();\n\t\t\tlog.setTimeNeeded(stopWatch.getElapsedTime());\n\t\t}\n\t}",
"protected Document getDocument(String searchString, int page) throws IOException{\n String url = String.format(URL_FORMAT, page);\n\n String referrer = \"https://hh.ru/search/vacancy?text=java\";\n String myUserAgent = \"Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36\";\n Document doc = Jsoup.connect(url).userAgent(myUserAgent).referrer(referrer).get();\n return doc;\n }",
"public void load(String url);",
"@Override\n\tpublic void process(Page page){\n\n\t CollectTemplate collectTemplate = templateService.getCollectTemplateById(templateId);\n\t String currentUrl=page.getUrl().toString();\n\t String nextUrlXpath=collectTemplate.getNextUrlXpath();\n \tString contentUrlXpath=collectTemplate.getContentUrlXpath();\n \tString listUrlRegex=collectTemplate.getListUrlRegex();\n \tString contentUrlRegex=collectTemplate.getContentUrlRegex();\n \tList<CollectTemplateField> fields=collectTemplate.getFields();\n \ttry {\n\t \t\t\n\t \tHtml currentHtml= page.getHtml();\n\n\t\t\t//判断是否是列表页\n\t if (currentUrl.matches(listUrlRegex)) {\n\n\t\t\t\t//处理列表页\n\t\t\t\tString nextPageUrl=\"\";\n\t\t\t\ttry{\n\t\t\t\t\tnextPageUrl=currentHtml.xpath(nextUrlXpath).toString();\n\t\t\t\t\tif (nextPageUrl==null||StringUtils.isEmpty(nextPageUrl)){\n\t\t\t\t\t\tthrow new Exception();\n\t\t\t\t\t}\n\t\t\t\t}catch (Exception e){\n\t\t\t\t\tXpath2Selector xpath2Selector = new Xpath2Selector(nextUrlXpath);\n\t\t\t\t\tnextPageUrl = xpath2Selector.select(page.getRawText());\n\n\t\t\t\t\tif (nextPageUrl!=null&&nextPageUrl.startsWith(\"/\")){\n\t\t\t\t\t\tnextPageUrl = \"http://\"+site.getDomain()+nextPageUrl;\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\n\t \tif (StringUtils.isNotEmpty(nextPageUrl)) {\n\n\t \t\tRequest request=new Request();\n\t \t\trequest.setUrl(nextPageUrl);\n\t \t\trequest.setPriority(-1);\n\t \t\t\n\t \t\tpage.addTargetRequest(request);\n\n\t \t\tlogService.info(projectId,\"get the next page link \"+nextPageUrl+\" and add it to the queue\");\n\n\t\t\t\t}else{\n\t\t\t\t\tlogService.warn(projectId,\"fail to get the next page link\");\n\n\t\t\t\t}\n\t \tList<String> detailPagesUrl;\n\t \ttry{\n\t\t\t\t\tdetailPagesUrl = currentHtml.xpath(contentUrlXpath).all();\n\n\t\t\t\t}catch (Exception e){\n\n\t\t\t\t\tXpath2Selector xpath2Selector2 = new Xpath2Selector(contentUrlXpath);\n\t\t\t\t\tdetailPagesUrl = xpath2Selector2.selectList(currentHtml.getDocument().text());\n\t\t\t\t}\n\n\n\n\t \tif (detailPagesUrl!=null&&detailPagesUrl.size()!=0) {\n\t\t\t\t\t//添加详情页\n\t\t\t\t\tpage.addTargetRequests(detailPagesUrl, 1);\n\n\t\t\t\t\tlogService.info(projectId,\"get \"+detailPagesUrl.size()+\" detail pages\");\n\t\t\t\t}else{\n\t\t\t\t\tlogService.warn(projectId,\"fail to get detail page\");\n\n\t\t\t\t}\n\t\t\t}else if (StringUtils.isEmpty(contentUrlRegex)||currentUrl.matches(contentUrlRegex)) {\n\t \t//处理详情页\n\t\t\t\tcontentPageProcessService.setProjectId(projectId);\n\t\t\t\tcontentPageProcessService.progressContentPage(page,fields);\n\t\t\t}\n\t \t} catch (Exception e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\n\t \n\t }",
"public void pullResources(String domainURL){\n URLResource page = new URLResource(\"https://www.dukelearntoprogram.com//course2/data/manylinks.html\");\n \n int startIndex;\n int endIndex;\n // loop through pages\n for (String s : page.lines()){\n \n //System.out.println(s);\n int pose = s.indexOf(domainURL);\n \n // if the url is in the line\n if (-1 != pose) {\n \n startIndex = s.lastIndexOf(\"\\\"\",pose); // find actual start\n endIndex = s.indexOf(\"\\\"\",pose+1); // find end\n \n System.out.println( s.substring(startIndex, endIndex));\n \n \n \n }\n \n \n }\n}",
"@Override\r\n\tpublic void run()\r\n\t{\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\t//System.out.println(\"beginning of Parser code\");\r\n\t\t\t\r\n\t\t\t//pull a page from the page que\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tpageText = SharedPage.getNextPage();\r\n\t\t\t\t//System.out.println(\"Parser Page Pulled\");\r\n\t\t\t} \r\n\t\t\tcatch (InterruptedException e) \r\n\t\t\t{\r\n\t\t\t\t//do nothing\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//search the page for all links in anchor (<a href=\"\") elements\r\n\t\t\t\r\n\t\t\t//Regex\r\n\t\t\t//loop will execute for each link found\r\n\t\t\tPattern pattern = Pattern.compile(\"href=\\\"(http:.*?)\\\"\");\r\n\t\t\tMatcher matcher = null;\r\n\t\t\t\r\n\t\t\t//Some pages are returning null values\r\n\t\t\tif(pageText != null)\r\n\t\t\t{\r\n\t\t\t\tmatcher = pattern.matcher(pageText);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//add each link found to the link queue\r\n\t\t\t\r\n\t\t\t//sometimes matcher is returning null values\r\n\t\t\twhile(matcher != null && matcher.find())\r\n\t\t\t{\r\n\t\t\t\tString link = matcher.group(1);\r\n\t\t\t\r\n\t\t\t\ttry \r\n\t\t\t\t{\r\n\t\t\t\t\tSharedLink.addLink(link);\r\n\t\t\t\t} \r\n\t\t\t\tcatch (InterruptedException e) \r\n\t\t\t\t{\r\n\t\t\t\t\t//do nothing\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//search the page for keywords specified by the user of the webcrawler\r\n\t\t\tArrayList<String> keywords = WebCrawlerConsole.getKeywords();\r\n\t\t\t\r\n\t\t\t\tfor(String word : keywords)\r\n\t\t\t\t{\r\n\t\t\t\t\t//cannot split pageText if it is null\r\n\t\t\t\t\tif(pageText != null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString[] keywordSearch = pageText.split(word);\r\n\t\t\t\t\t\tfor(int i=0; i < keywordSearch.length; i++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tWebCrawlerConsole.keywordHit();\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//System.out.println(\"end of Parser code\");\r\n\t\t}\r\n\t}",
"public HtmlList(StringReader page, String url) throws InvalidUrlException {\r\n super(page, url);\r\n initBeforeParsing();\r\n try {\r\n parsePage(page);\r\n } catch (Exception e) {\r\n throw new InvalidUrlException(url);\r\n }\r\n }",
"private int readPage(String loc) throws SAXException\r\n\t{\r\n\t\tif(loc.startsWith(\"page\"))\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tint page = Integer.parseInt(loc.substring(4));\r\n\t\t\t\tif(page < 0 || page > 15) throw new SAXException(\"RAM page \" + page + \" is not valid.\");\r\n\t\t\t\treturn page;\r\n\t\t\t}\r\n\t\t\tcatch(NumberFormatException e)\r\n\t\t\t{\r\n\t\t\t\tthrow new SAXException(\"Cannot decode RAM page \" + loc + \".\", e);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn Variable.ACCESS_BANK;\r\n\t}",
"public AbstractHtmlParser(final String url) {\n super(url);\n }",
"public String getUrlSourcePage(String url) throws IOException {\n\t\t\t URL URL = new URL(url);\n\t\t\t URLConnection uc = URL.openConnection();\n\t\t\t \n\t\t\t // allow GZip encodings \n\t\t\t // the encoding type\n\t\t\t BufferedReader in = null;\n\t\t\t if (uc.getHeaderField(\"Content-Encoding\") != null && uc.getHeaderField(\"Content-Encoding\").equals(\"gzip\")) {\n\t\t\t in = new BufferedReader(new InputStreamReader(new GZIPInputStream(uc.getInputStream())));\n\t\t\t } else { in = new BufferedReader(new InputStreamReader(uc.getInputStream())); }\n\t\t\t \n\t\t\t String inputLine;\n\t\t\t StringBuilder sb = new StringBuilder();\n\t\t\t while ((inputLine = in.readLine()) != null)\n\t\t\t sb.append(inputLine);\n\t\t\t in.close();\n\t\t\t \n\t\t\t return sb.toString();\n\t\t\t }",
"@Override\n public void visit(Page page) {\n String url = page.getWebURL().getURL();\n System.out.println(\"URL: \" + url);\n\n try {\n if (page.getParseData() instanceof HtmlParseData) {\n HtmlParseData htmlParseData = (HtmlParseData) page.getParseData();\n\n final Document document = Jsoup.parse(htmlParseData.getHtml());\n\n Transformer transformer = TransformerFactory.newInstance()\n .newTransformer(new StreamSource(getClass().getResourceAsStream(xslPath)));\n\n Writer write = new StringWriter();\n transformer.transform(new DOMSource(new W3CDom().fromJsoup(document)), new StreamResult(write));\n\n String xml = write.toString();\n\n // XML 1.1\n // [#x1-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]\n String xml11pattern = \"[^\"\n + \"\\u0001-\\uD7FF\"\n + \"\\uE000-\\uFFFD\"\n + \"\\ud800\\udc00-\\udbff\\udfff\"\n + \"]+\";\n\n // remove invalid character in xml\n xml = xml.replaceAll(xml11pattern, \"\");\n\n JAXBContext jc = JAXBContext.newInstance(ProxyListDTO.class);\n\n Unmarshaller unmarshaller = jc.createUnmarshaller();\n ProxyListDTO data = (ProxyListDTO) unmarshaller.unmarshal(new StringReader(xml));\n data.getProxies().forEach(p -> p.setSource(source));\n\n\n result.addAll(data.getProxies());\n }\n } catch (Exception e) {\n logger.error(\"fail to visit \" + url, e);\n }\n }",
"public FilingDetailPage(URL url) {\n try (final WebClient webClient = new WebClient()) {\n filing13FPage = webClient.getPage(url);\n System.out.println(filing13FPage);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic void process(Page page) {\n\t\t\n\t}",
"public String connectAndGetPage(String url) throws IOException {\n URL page = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) page.openConnection();\n conn.connect();\n InputStreamReader in = new InputStreamReader((InputStream) conn.getContent());\n BufferedReader buff = new BufferedReader(in);\n String line;\n StringBuilder sb = new StringBuilder(\"\");\n while ((line = buff.readLine()) != null) {\n sb.append(line).append(\"\\n\");\n }\n return sb.toString();\n }",
"@RequestMapping(\"/getResult\")\r\n @ResponseBody\r\n public String prob(@RequestParam String URL){\n \tHashSet<String> res= new CrawlerService().getPageLinks(URL); \t\r\n \tStringBuffer result =new StringBuffer(); \t\r\n \tfor (String item:res){\r\n \t\tresult.append(item+\"<br>\");\r\n \t} \t\r\n return result.toString();\r\n\r\n }",
"@GET(\"w/api.php?action=parse&format=json&noimage\")\n Call<JsonElement> getSectionFrom(@Query(\"pageid\") long pageid,@Query(\"section\") long section);",
"public static String getPage(String surl){\n\r\n\t\t\r\n\t\tString sPage=\"\";\r\n\t\t\r\n\t\tURLConnection connection = null;\t\t\r\n\t\t// Zerlegt einen String und fügt jeweils ein Zeilenende ein\r\n\t\ttry {\t\t\t\r\n\t\t\tURL urlpage=new URL(surl);\t\t\t\r\n\t\t\tconnection = urlpage.openConnection();\r\n\t\t\t//connection = urlpage.openConnection(proxy);\r\n\t\t\tconnection.setDoOutput(true);\t\t\t\r\n BufferedReader rd = new BufferedReader(new InputStreamReader(connection.getInputStream()));\r\n\t\t\t \r\n\t\t\t String line = null;\r\n\t\t\t \r\n\t\t\t while ((line = rd.readLine()) != null) {\r\n\t\t\t\t sPage+=line+System.getProperty(\"line.separator\");\r\n\t\t\t\t} \t\t\r\n\t\t\t \r\n\t\t} catch (ConnectException e) {\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (UnknownHostException e) {\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\t\t\r\n\t\treturn sPage;\r\n\t}",
"@Override\r\n\tpublic URLModule gotoPage(int page) {\n\t\treturn null;\r\n\t}",
"public List<Element> monitorPage(String link){\n\t\tSystem.out.println(\"monitor Page \" + link);\n\t\tDocument document;\n\t\tList<Element> results = new ArrayList<Element>();\n\t\t// se connecte au site\n\t\tdocument = connectToPage(link);\n\t\t// liste tous les éléments de la classe inner-article (i.e. tout ce qu'il y a sur la page\n\t\tSystem.out.println(document.toString());\n\t\t/*List<Element> articlesGeneral = new ArrayList<Element>();\n\t\tfor (Element element : elements) {\n\t\t\t// extrait chaque link a des articles \n\t\t\tElement linkPage = element.select(\"a\").first();\n\t\t\tarticlesGeneral.add(linkPage);\n\t\t}\n\t\tresults = articlesGeneral;*/\t\t\n\n\t\treturn results;\n\n\t}",
"public Address interpretUrl(String url);",
"public int getCurrentPage(String url) {\n Document doc;\n int result = 0;\n try {\n doc = Jsoup.connect(url).get();\n String position = doc.body().select(TABLE_SORT_OPTIONS)\n .last()\n .select(TR_TAG)\n .select(TD_TAG)\n .select(B_TAG)\n .text();\n result = Integer.parseInt(position);\n } catch (IOException e) {\n LOG.error(e, e.fillInStackTrace());\n }\n return result;\n }",
"private void parseData(String url, String response) {\n\n if (response.isEmpty()) {\n if (!mErrorMessage.isEmpty()) {\n alertParseErrorAndFinish(mErrorMessage);\n } else {\n renderData();\n }\n } else {\n if (mItemTotal == 0) {\n //---------------------------------------------------------------------------------\n // 목록 파싱하기 - 아메바 블로그의 HTML 코드가 변경됨. 파서 다시 만들어야 함. 2016-09-10\n //---------------------------------------------------------------------------------\n switch (mSiteData.getId()) {\n case Config.BLOG_ID_AKB48_TEAM8:\n Akb48Parser akb48Parser = new Akb48Parser();\n akb48Parser.parseTeam8ReportList(response, mNewDataList);\n break;\n case Config.BLOG_ID_SKE48_SELECTED:\n case Config.BLOG_ID_NMB48_OFFICIAL:\n BaseParser parser = new BaseParser();\n parser.parseAmebaList(response, mNewDataList);\n mItemTotal = mNewDataList.size();\n break;\n case Config.BLOG_ID_NGT48_MANAGER:\n Ngt48Parser ngt48manager = new Ngt48Parser();\n ngt48manager.parseLineBlogList(response, mNewDataList);\n //Collections.sort(mNewDataList);\n //Collections.sort(mNewDataList, Collections.reverseOrder());\n break;\n case Config.BLOG_ID_NGT48_PHOTOLOG:\n Ngt48Parser ngt48photo = new Ngt48Parser();\n ngt48photo.parseMemberBlogList(response, mNewDataList);\n //Collections.sort(mNewDataList);\n Collections.sort(mNewDataList, Collections.reverseOrder());\n break;\n }\n }\n\n //-------------------------------\n // 항목별 사진 파싱하기\n //-------------------------------\n if (mItemTotal > 0) { // && mItemTotal >= mItemCount) {\n if (mItemCount > 0) {\n BaseParser parser = new BaseParser();\n String[] array = parser.parseAmebaArticle(response);\n\n WebData webData = mNewDataList.get(mItemCount - 1);\n webData.setContent(array[0]);\n webData.setImageUrl(array[1]);\n }\n\n if (mItemCount < mItemTotal) {\n WebData webData = mNewDataList.get(mItemCount);\n String reqUrl = webData.getUrl();\n String reqAgent = Config.USER_AGENT_MOBILE;\n\n requestData(reqUrl, reqAgent);\n updateProgress();\n\n mItemCount++;\n } else {\n mItemTotal = 0;\n mItemCount = 0;\n mPbLoadingHorizontalMore.setProgress(0);\n }\n }\n\n if (mItemTotal == 0) {\n renderData();\n }\n }\n }",
"Page getPage(int index);",
"public Set<Anchor> parse(Reader reader, String url) {\n\n Set<Anchor> elements = new HashSet<>();\n String urtContent = null;\n try {\n urtContent = readFully(reader);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (urtContent == null){\n return elements;\n }\n\n mTag = pTag.matcher(urtContent);\n\n while (mTag.find()) {\n\n String href = mTag.group(1); // get the values of href\n String linkElem = mTag.group(2); // get the text of link Html Element\n\n mLink = pLink.matcher(href);\n\n while (mLink.find()) {\n\n String link = mLink.group(1);\n Anchor anchor = new Anchor();\n anchor.setUrl(link);\n anchor.setText(linkElem);\n\n elements.add(anchor);\n\n }\n }\n return elements;\n }",
"public void run()\n\t\t{\n\t\t\tint num = 0;\n\t\t\ttry{\n\t\t\t\tlog.debug(\"Dealing with: \" + url.toString() + \" From : \" + urlp);\n\t\t\t\t\n\t\t\t\tSocket socket = new Socket(url.getHost(), PORT);\n\t\t\t\tPrintWriter writer = new PrintWriter(socket.getOutputStream());\n\t\t\t\tBufferedReader reader = \n\t\t\t\t\tnew BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\t\t\tString request = \"GET \" + url.getPath() + \" HTTP/1.1\\n\" +\n\t\t\t\t\t\t\t\t\"Host: \" + url.getHost() + \"\\n\" +\n\t\t\t\t\t\t\t\t\"Connection: close\\n\" + \n\t\t\t\t\t\t\t\t\"\\r\\n\";\n\t\t\t\twriter.println(request);\n\t\t\t\twriter.flush();\n\t\t\n\t\t\t\tString line = reader.readLine();\n\t\t\t\t// filter the head message of the response\n\t\t\t\twhile(line != null && line.length() != 0)\n\t\t\t\t{\n\t\t\t\t\tline = reader.readLine();\n\t\t\t\t}\n\t\t\t\t// keep the html context\n\t\t\t\twhile (line != null) \n\t\t\t\t{\n\t\t\t\t\tcontext += line + \"\\n\";\n\t\t\t\t\tline = reader.readLine();\n\t\t\t\t}\n\t\t\t\treader.close();\n\t\t\t\twriter.close();\n\t\t\t\tsocket.close();\n\t\t\t\t//log.debug(context);\n\t\t\t\tstripper = new TagStripper(context);\n\t\t\t\tlog.debug(\"Removing script and style from: \" + url.toString());\n\t\t\t\tstripper.removeComments();\n\t\t\t\tstripper.removeScript();\n\t\t\t\tstripper.removeStyle();\n\t\t\t\tlog.debug(\"Getting links from: \" + url.toString());\n\t\t\t\tArrayList<String> link = new ArrayList<String>();\n\t\t\t\tstripper.buildLinks(url.toString());\n\t\t\t\t\n\t\t\t\tlink = stripper.getLinks();\n\t\t\t\tfor(String tmp : link) {\n\t\t\t\t\tif(getCount() < pageNum ) {\n\t\t\t\t\t\t// find if the link has been already visited\n\t\t\t\t\t\tif(!urlList.contains(tmp)) {\n\t\t\t\t\t\t\tworkers.execute(new SingleHTMLFetcher(new URL(tmp), this.url.toString()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString title = stripper.getTitle();\n\t\t\t\tif(title == null)\n\t\t\t\t\ttitle = \"NO title\";\n\t\t\t\ttitle = title.replaceAll(\"&[^;]*;\", \"\");\n\t\t\t\tlog.debug(\"Removing tags from: \" + url.toString());\n\t\t\t\tstripper.removeTags();\n\t\t\t\tstripper.removeSymbol();\n\t\t\t\tString snippet = stripper.getSnippet(title);\n\t\t\t\tdb.savePageInfo(connection, title, snippet, url.toString());\n\t\t\t\tcontext = stripper.getContext();\n\t\t\t\tString[] words = context.toLowerCase().split(\"\\\\s\");\n\t\t\t\tArrayList<String> wordsList = new ArrayList<String>();\n\t\t\t\tfor (int i = 0; i < words.length; i++) {\n\t\t\t\t\t// delete non-word character\n\t\t\t\t\twords[i] = words[i].replaceAll(\"\\\\W\", \"\").replace(\"_\",\n\t\t\t\t\t\t\t\"\");\n\t\t\t\t\tif(words[i].length() != 0)\n\t\t\t\t\t\twordsList.add(words[i]);\n\t\t\t\t}\n\t\t\t\tfor (String w : wordsList) {\n\t\t\t\t\tif (w.length() != 0) {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tindex.addNum(w, url.toString(), num);\n\t\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\tnum++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlog.debug(\"URL: \" + url.toString() + \" is finished!\");\n\t\t\t\tdecrementPending();\n\t\t\t}catch(Exception ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}",
"@Override\n public void crawl() {\n Document doc;\n try {\n\n\n doc = Jsoup.connect(rootURL).userAgent(\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A\").get();\n\n Elements articles = doc.select(\"section.list article\");\n\n System.out.println(\"Number of articles found:\"+articles.size());\n //list of links found\n for(Element article: articles){\n\n Element titleLink = article.select(\"a\").first();\n System.out.println(titleLink.attr(\"abs:href\"));\n\n //if the url found is in the cache, do not retrieve the url.\n if(urlCache.contains(titleLink.attr(\"abs:href\"))) {\n System.out.println(\"Doucment found in cache, ignoring document\");\n continue;\n }\n\n storeDocument(Jsoup.connect(titleLink.attr(\"abs:href\")).get());\n\n //add the URL to the cache so that we don't retrieve it again.\n urlCache.add(titleLink.attr(\"abs:href\"));\n }\n\n\n } catch (Exception e){\n logger.log(Level.SEVERE, \"Error Retrieving from URL\", e);\n e.printStackTrace();\n }\n }",
"@GET(\"w/api.php?action=query&format=json&redirects\")\n Call<JsonElement> getPageFromTitle(@Query(\"titles\") String titles);",
"public JsonParser createParser(URL url)\n/* */ throws IOException, JsonParseException\n/* */ {\n/* 782 */ IOContext ctxt = _createContext(url, true);\n/* 783 */ InputStream in = _optimizedStreamFromURL(url);\n/* 784 */ return _createParser(_decorate(in, ctxt), ctxt);\n/* */ }",
"public HtmlPage(String h){\r\n\t\t//extract the hrefs:\r\n\t\tHREF.setHref(getHrefs(h));\r\n\t\t//extract the encoding:\r\n\t\t\r\n\t}",
"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 }",
"private void hitURL(String URL){\n Log.v(\".hitURL\", \" now crawling at: \" + URL);\n String refinedURL = NetworkUtils.makeURL(URL).toString();\n visitedLinks.add(refinedURL);\n browser.loadUrl(refinedURL);\n\n\n // OR, you can also load from an HTML string:\n// String summary = \"<html><body>You scored <b>192</b> points.</body></html>\";\n// webview.loadData(summary, \"text/html\", null);\n // ... although note that there are restrictions on what this HTML can do.\n // See the JavaDocs for loadData() and loadDataWithBaseURL() for more info.\n }",
"private void loadFromURL(String url) throws IOException {\n URL destination = new URL(url);\r\n URLConnection conn = destination.openConnection();\r\n Reader r = new InputStreamReader(conn.getInputStream());\r\n load(r);\r\n }",
"public static String readPage(WikipediaPage page, String s) {\n page.page = s;\n return page.getContent();\n }",
"public void extract(String pathToPageFile, String baseUri) throws Exception {\n\n File file = new File(pathToPageFile);\n Document doc = Jsoup.parse(file, \"UTF-8\", baseUri);\n Elements links = doc.select(\"a[href]\");\n Elements media = doc.select(\"[src]\");\n Elements imports = doc.select(\"link[href]\");\n\n printf(\"\\nMedia: %d\", media.size());\n for (Element src: media) {\n printf(\" * %s: <%s>\", src.tagName(), src.attr(\"abs:src\"));\n }\n\n printf(\"\\nImports: %d\", imports.size());\n for (Element link: imports) {\n printf(\" * %s <%s> (%s)\", link.tagName(), link.attr(\"abs:href\"), link.attr(\"rel\"));\n }\n\n printf(\"\\nLinks: %d\", links.size());\n for (Element link: links) {\n printf(\" * %s <%s> (%s)\", link.tagName(), link.attr(\"abs:href\"), trim(link.text(), 35));\n }\n }",
"@Test\n public void getListingsPages_1() throws IOException {\n List<String> listingsPages = imobiParser.getListingPages(TEST_URL_PAGINATION_1);\n\n Assert.assertThat(listingsPages, notNullValue());\n Assert.assertThat(listingsPages.size(), is(10));\n Assert.assertThat(listingsPages, hasItem(is(TEST_URL_PAGINATION_1.replaceFirst(\"\\\\{pageNumber\\\\}\", String.valueOf(1)))));\n Assert.assertThat(listingsPages, hasItem(is(TEST_URL_PAGINATION_1.replaceFirst(\"\\\\{pageNumber\\\\}\", String.valueOf(5)))));\n Assert.assertThat(listingsPages, hasItem(is(TEST_URL_PAGINATION_1.replaceFirst(\"\\\\{pageNumber\\\\}\", String.valueOf(10)))));\n }",
"public void parseDocument(String fileLocation) {\n List<Object> objects = FileUtility.readObjectsFromFile(fileLocation);\n new File(FILE_DIRECTORY_NAME).mkdir();\n\n // TODO: Parellize the processing of html parsing for each html page\n\n objects.parallelStream().forEach((object) -> {\n HtmlPage htmlPage = (HtmlPage) object;\n String title = DocumentUtility.extractDocumentID(htmlPage.getURL());\n String parsedText = parseTitle(title) + NEWLINE + parseHtmlText(htmlPage);\n parsedHtmlPages.add(new ParsedHtmlPage(title, parsedText));\n });\n }",
"private Document parseFile() throws IOException {\n\tString contents = instream_to_contents();\n\tDocument doc = Jsoup.parse(contents);\n\treturn doc;\n }",
"@Test\n public void getListingsPages_3() throws IOException {\n List<String> listingsPages = imobiParser.getListingPages(TEST_URL_PAGINATION_ABSENT);\n\n Assert.assertThat(listingsPages, notNullValue());\n Assert.assertThat(listingsPages.size(), is(1));\n Assert.assertThat(listingsPages, hasItem(is(TEST_URL_PAGINATION_ABSENT.replaceFirst(\"\\\\{pageNumber\\\\}\", String.valueOf(1)))));\n }",
"public HtmlList(String url) throws InvalidUrlException {\r\n super(url);\r\n initBeforeParsing();\r\n try {\r\n parsePage(page);\r\n } catch (Exception e) {\r\n throw new InvalidUrlException(url);\r\n }\r\n }",
"private static Set<String> scrapeHTML(String html) {\n\t\tSet<String> set = new HashSet<String>();\n\t\tint skipLength = 0;\n\t\tint counter = 0;\n\t\t// the subtraction of 15 is because of the number of characters in \n\t\t// \"<a href=\\\"/wiki/\", to avoid a index out of bounds error\n\t\tfor(int i = 0; i < html.length()-15; i++) {\n\t\t\tif(html.substring(i, i+15).equals(\"<a href=\\\"/wiki/\")) {\n\t\t\t\t// if format matches starts to check the following characters\n\t\t\t\t// to check if it does not contain a : or a #\n\t\t\t\tchar ch = html.charAt(i+15);\n\t\t\t\tString str = \"\";\n\t\t\t\tint count = 0;\n\t\t\t\twhile(html.charAt(i+count+15) != '\"'){\n\t\t\t\t\tif(html.charAt(i+count+15) == ':' || html.charAt(i+count+15) == '#') {\n\t\t\t\t\t\tstr = \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tch = html.charAt(count+i+15);\n\t\t\t\t\tstr += ch;\n\t\t\t\t\tcount++;\n\t\t\t}\n\t\t\t\t// adds if the page name is not empty\n\t\t\t\tif(str != \"\")\n\t\t\t\tset.add(str);\n\t\t\t\tskipLength = str.length();\n\t\t\t\tcount = 0;\n\t\t}\n\t\t\ti += skipLength;\n\t\t\tskipLength = 0;\n\t\t\tcounter++;\n\t\n\t}\n\treturn set;\n}",
"@Override\n protected void parseURL(URL url, String spec, int start, int end) {\n if (end < start) {\n return;\n }\n String parseString = \"\";\n if (start < end) {\n parseString = spec.substring(start, end).replace('\\\\', '/');\n }\n super.parseURL(url, parseString, 0, parseString.length());\n }",
"Builder addMainEntityOfPage(URL value);",
"int getPageNumber();",
"public static int getPageTo(String info) {\n/* 816 */ int pageNum = 0;\n/* */ \n/* 818 */ if (!Utils.isNullOrEmpty(info)) {\n/* */ try {\n/* 820 */ JSONObject jsonObj = new JSONObject(info);\n/* 821 */ pageNum = jsonObj.getInt(\"To\");\n/* 822 */ } catch (Exception e) {\n/* 823 */ AnalyticsHandlerAdapter.getInstance().sendException(e);\n/* */ } \n/* */ }\n/* */ \n/* 827 */ return pageNum;\n/* */ }",
"public static boolean crawl(String URL){\n try{\n Connection connection = Jsoup.connect(URL).userAgent(USER_AGENT);\n Document htmlDocument = connection.get();\n //this.htmlDocument = htmlDocument;\n\n //200 is the ok status code for HTTP, which means\n if(connection.response().statusCode() == 200){\n System.out.println(\"\\n**Visiting** Received web page at \" + URL);\n }\n if(!connection.response().contentType().contains(\"text/html\")){\n System.out.println(\"**Failure** Retrieved something other than HTML\");\n return false;\n }\n Elements linksOnPage = htmlDocument.select(\"a[href]\");\n System.out.println(\"Found (\" + linksOnPage.size() + \") links\");\n for(Element link : linksOnPage)\n {\n links.add(link.absUrl(\"href\"));\n }\n return true;\n\n }\n \n catch(IOException ioe)\n {\n // We were not successful in our HTTP request\n return false;\n }\n }",
"public void pageElementsLoader(String fileName) {\n InputStream inpStream = RepositoryParser.class.getClassLoader().getResourceAsStream(fileName);\n JSONObject locatorRepository = null;\n try {\n locatorRepository = new JSONObject(IOUtils.toString(inpStream, \"UTF-8\"));\n } catch (JSONException e) {\n Log.error(\"Error in parsing JSOn file \" + e.getMessage());\n } catch (IOException e) {\n Log.error(\"IO Exception encounred \" + e.getMessage());\n } finally {\n CustomAssert.assertTrue(locatorRepository != null, \"Error in reading locator repository \"\n + fileName);\n }\n\n JSONArray pageArray = locatorRepository.optJSONArray(\"pages\");\n CustomAssert.assertTrue(pageArray != null, \"Error in parsing locator repository pages \"\n + fileName);\n\n putObjectFromPages(pageArray);\n }",
"public void Crawl(String startUrl) {\n HashSet crawledList = new HashSet();\n LinkedHashSet toCrawlList = new LinkedHashSet();\n // Add start URL to the To Crawl list.\n toCrawlList.add(startUrl);\n\n // Get URL at bottom of the list.\n String url = (String) toCrawlList.iterator().next();\n // Remove URL from the To Crawl list.\n toCrawlList.remove(url);\n // Convert string url to URL object.\n URL verifiedUrl = verifyUrl(url);\n\n // Add page to the crawled list.\n crawledList.add(url);\n // Download the page at the given URL.\n String pageContents = downloadPage(verifiedUrl);\n\n if (pageContents != null && pageContents.length() > 0) {\n // Retrieve list of valid links from page.\n ArrayList links = retrieveLinks(verifiedUrl, pageContents, crawledList);\n // Add links to the To Crawl list.\n toCrawlList.addAll(links);\n\n }\n\n System.out.println(pageContents);\n\n }",
"public void process(Page page) {\n\t\t\t\tgetContent(page);\n\t\t\t}",
"public Page getPage() {return page;}"
]
| [
"0.74779797",
"0.6869477",
"0.665032",
"0.65405256",
"0.6440897",
"0.6424629",
"0.6409475",
"0.63501763",
"0.6246125",
"0.6199847",
"0.6128713",
"0.61083573",
"0.6090152",
"0.60489804",
"0.6001067",
"0.59808534",
"0.59636486",
"0.59608656",
"0.5952571",
"0.59380513",
"0.5917672",
"0.59171873",
"0.5914132",
"0.5903001",
"0.5893591",
"0.5886057",
"0.5861003",
"0.5845204",
"0.5816841",
"0.5806507",
"0.5805005",
"0.57997316",
"0.5790097",
"0.5784121",
"0.5763124",
"0.57559156",
"0.5740991",
"0.57252073",
"0.5723391",
"0.570401",
"0.5685171",
"0.5680601",
"0.5662559",
"0.56585354",
"0.565251",
"0.5650198",
"0.56451195",
"0.5632852",
"0.56262934",
"0.56234485",
"0.56028783",
"0.55948836",
"0.55929476",
"0.5579608",
"0.5575733",
"0.556671",
"0.55349356",
"0.5534395",
"0.5532163",
"0.552569",
"0.55254906",
"0.55233145",
"0.54971856",
"0.54956615",
"0.54940665",
"0.5470897",
"0.5469098",
"0.5468464",
"0.54435104",
"0.54373544",
"0.54350966",
"0.5422959",
"0.5415512",
"0.54081064",
"0.53981066",
"0.53967094",
"0.5391968",
"0.5390249",
"0.5388199",
"0.5380489",
"0.53798807",
"0.5364752",
"0.53594065",
"0.5351512",
"0.5349832",
"0.5346817",
"0.5332236",
"0.53265655",
"0.5316544",
"0.5307522",
"0.5300925",
"0.52880746",
"0.527568",
"0.5273388",
"0.5256394",
"0.52532214",
"0.52475595",
"0.52463925",
"0.52443075",
"0.52417296",
"0.52396786"
]
| 0.0 | -1 |
liste des sessions accessibles par l'utilisateur en tant qu'apprenant | public List<Session> getListSessionApprenant() {// OK
if (utilisateur.getListeSessionsApprenantAccessible().isEmpty()) {
List<Session> liste = new ArrayList<Session>();
liste = getListeSessionsParam("sessionsAcc", "role", "apprenant");
utilisateur.setListeSessionsApprenantAccessible(liste);
return liste;
} else {
return utilisateur.getListeSessionsApprenantAccessible();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<String> getSessionList(){\r\n \t\r\n \tList<String> sessionIds = new ArrayList<String>();\r\n \tfor (Entry<String, AccessDetailVO> curPage : pageAccess.entrySet()) {\r\n \t\tAccessDetailVO currLock = curPage.getValue();\r\n \t\tif(!sessionIds.contains(currLock.getSessionId())){\r\n \t\t\tsessionIds.add(currLock.getSessionId());\r\n \t\t}\t\r\n \t}\r\n \t\r\n \treturn sessionIds;\r\n }",
"public synchronized Session[] getVisibleSessions(Session session) {\n return session.isAdmin() ? getAllSessions()\n : new Session[]{ session };\n }",
"int getActiveSessions();",
"List<Session> getAllSessions();",
"public int getActiveSessions();",
"public Session[] findSessions();",
"public ArrayList<UserSessionInfo> getAllSessionInfo() throws SessionManagementException {\n ArrayList<UserSessionInfo> userSessionInfoList = null;\n try {\n userSessionInfoList = SessionContextCache.getInstance(0).getSessionDetails();\n } catch (Exception e) {\n String errorMsg = \"Error is occurred while getting session details \";\n log.error(errorMsg, e);\n throw new SessionManagementException(errorMsg, e);\n }\n return userSessionInfoList;\n }",
"public abstract I_SessionInfo[] getSessions();",
"@GetMapping(\"tv_watching_sessions\")\n\tpublic List<TvWatchingSession> listSessions(){\n\t\treturn svc.allActiveSessionsByUser(userName);\n\t}",
"java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Session> \n getSessionsList();",
"public abstract String getSessionList();",
"public static List getAllSessions() {\n\t\tsynchronized (FQN) {\n\t\t\tList<MemberSession> msList = new ArrayList<MemberSession>();\n//\t\t\tObject object = cache.getValues(FQN);\n\t\t\tObject object = null;\n\t\t\tif (object != null) {\n\t\t\t\tmsList = (List<MemberSession>) object;\n\t\t\t\treturn new ArrayList(msList);\n\t\t\t} else {\n\t\t\t\tCollection list = new ArrayList();\n\t\t\t\tobject = cache.getValues(FQN);\n\t\t\t\tif(object != null){\n\t\t\t\t\tlist = (Collection) object;\n\t\t\t\t}\n\t\t\t\tmsList = new ArrayList(list);\n//\t\t\t\tfor (MemberSession ms : msList) {\n//\t\t\t\t\tcache.add(FQN, ms.getSessionId(), ms);\n//\t\t\t\t}\n\t\t\t\treturn msList;\n\t\t\t}\n\n\t\t}\n\t}",
"public ArrayList<Session> getActiveSessions()\r\n\t{\r\n\t\treturn this.activeSessions;\r\n\t}",
"public static ArrayList<Session> getSessions() {\r\n\t\treturn sessions;\r\n\t}",
"public Collection<Long> getSessions() {\n return dataTree.getSessions();\n }",
"public UserSession[] getUserSessions() throws SessionQueryException\n {\n UserSession[] userArray = null;\n\n \n // Get all of the users from the SMS\n UserLoginStruct[] userStructs;\n try {\n userStructs = getSessionManagementAdminService().getUsers(false);\n\n GUILoggerHome.find().debug(\"AbstractSessionInfoManager\", GUILoggerSABusinessProperty.USER_SESSION,\n userStructs);\n if (GUILoggerHome.find().isInformationOn()) {\n GUILoggerHome.find().information(\"AbstractSessionInfoManager\",\n GUILoggerSABusinessProperty.USER_SESSION, \"Found \" + userStructs.length + \" User Sessions\");\n }\n\n userArray = new UserSession[userStructs.length];\n UserSession userSession = null;\n\n for (int i = 0; i < userStructs.length; i++) {\n if (userStructs[i].sourceComponents != null && userStructs[i].sourceComponents.length == 1\n && userStructs[i].sourceComponents[0].length() == 0) {\n userSession = new UserSession(new User(userStructs[i].userId, userStructs[i].loggedIn),\n new String[0]);\n } else {\n userSession = new UserSession(new User(userStructs[i].userId, userStructs[i].loggedIn),\n userStructs[i].sourceComponents);\n }\n userArray[i] = userSession;\n }\n\n // Sort the list of users in alphabetical order by Name\n Arrays.sort(userArray, getNameComparator());\n\n } catch (Exception e) {\n throw new SessionQueryException(\"Could not acquire user sessions information.\" ,e);\n }\n \n return userArray;\n }",
"public int getLoggedInUsers();",
"public String[] getUsers() {\n\t\tEnumeration enumer = userSessions.keys();\n\t\tVector temp = new Vector();\n\t\twhile (enumer.hasMoreElements())\n\t\t\ttemp.addElement(enumer.nextElement());\n\t\tString[] returns = new String[temp.size()];\n\t\ttemp.copyInto(returns);\n\t\treturn returns;\n\n\t}",
"public Collection<RaftSession> getSessions() {\n return sessions.values();\n }",
"public static void loadSessions() {\n try (Connection con = getConnection()) {\n String query = \"SELECT `usermask`,`username` FROM \" + mysql_db + \".`sessions`\";\n try (PreparedStatement pst = con.prepareStatement(query)) {\n ResultSet r = pst.executeQuery();\n while (r.next()) {\n Bot.addUserSession(r.getString(\"usermask\"), r.getString(\"username\"));\n }\n pst.close();\n con.close();\n }\n con.close();\n } catch (SQLException e) {\n Logger.logMessage(LOGLEVEL_IMPORTANT, \"SQL Error in 'loadSessions()': \" + e.getMessage());\n }\n }",
"@GET\n public List<Session> getAllSessions() {\n log.debug(\"REST request to get all Sessions\");\n List<Session> sessions = sessionRepository.findAll();\n return sessions;\n }",
"private List<? extends Map<String, ?>> getSessions() {\n List<Map<String, String>> list = new ArrayList<Map<String, String>>();\n sessions = MXChatManager.getInstance().getGroupChatSessions();\n for (MXGroupChatSession session : sessions) {\n Map<String, String> map = new HashMap<String, String>();\n map.put(\"topic\", session.getTopic());\n map.put(\"type\", session.isAChat() ? \"Chat\" : \"Meet\");\n\n list.add(map);\n }\n\n return list;\n }",
"@GetMapping\n public List<Session> list() {\n return sessionRepository.findAll();\n }",
"public List getAllSessionList(){\n \tList l=null;\n try {\n Criteria crit=new Criteria();\n l=LecturePeer.doSelect(crit);\n } catch(Exception e) { ServerLog.log(\"Exception in Lecture select \"+e.getMessage());}\n \treturn l;\n }",
"public final List<MediaSession2> getSessions() {\n ArrayList<MediaSession2> arrayList = new ArrayList<MediaSession2>();\n Object object = this.mLock;\n synchronized (object) {\n arrayList.addAll(this.mSessions.values());\n return arrayList;\n }\n }",
"@Override\n public void getAllSystemsInSession() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"getAllSystemsInSession\");\n }\n\n List<SystemInSession> listOfSiS = null;\n EntityManager em = EntityManagerService.provideEntityManager();\n if (Role.isLoggedUserAdmin() || Role.isLoggedUserProjectManager() || Role.isLoggedUserMonitor()) {\n choosenInstitutionForAdmin = (Institution) Component.getInstance(CHOOSEN_INSTITUTION_FOR_ADMIN);\n\n if (choosenInstitutionForAdmin != null) {\n listOfSiS = SystemInSession.getSystemsInSessionForCompanyForSession(em, choosenInstitutionForAdmin);\n } else {\n listOfSiS = SystemInSession.getSystemsInSessionForActivatedTestingSession();\n }\n } else {\n listOfSiS = SystemInSession.getSystemsInSessionForCompanyForSession(em,\n Institution.getLoggedInInstitution());\n }\n foundSystemsInSession = listOfSiS;\n }",
"public List<SessionDetailVO> getSessionDetail(){\r\n \t\r\n \tList<AccessDetailVO> accessDetails = getLockList();\r\n \tIterator<AccessDetailVO> iter = accessDetails.iterator();\r\n \tString prevSessionId = \"\";\r\n \tList<SessionDetailVO> sessionList = new ArrayList<SessionDetailVO>();\r\n \t\r\n \tSessionDetailVO sessionTmp = new SessionDetailVO();\r\n \twhile(iter.hasNext()){\r\n \t\tAccessDetailVO accessDetail = iter.next();\r\n \t\tif(accessDetail.getSessionId() != prevSessionId){\r\n \t\t\tsessionTmp = new SessionDetailVO();\r\n \t\t\tsessionTmp.setSessionId(accessDetail.getSessionId());\r\n \t\t\tsessionTmp.setSessionDetail(new ArrayList<AccessDetailVO>());\r\n \t\t\tprevSessionId = accessDetail.getSessionId();\r\n \t\t\tsessionList.add(sessionTmp);\r\n \t\t}\r\n \t\tsessionTmp.getSessionDetail().add(accessDetail);\r\n \t\t\r\n \t}\r\n \t\r\n \treturn sessionList;\r\n }",
"private void updateList() {\r\n\t\ttry {\r\n\t \t// Reset the list\r\n\t\t\tsipSessions.clear();\r\n\t \t\r\n\t \t// Get list of pending sessions\r\n\t \tList<IBinder> sessions = sipApi.getSessions();\r\n\t\t\tfor (IBinder session : sessions) {\r\n\t\t\t\tISipSession sipSession = ISipSession.Stub.asInterface(session);\r\n\t\t\t\tsipSessions.add(sipSession);\r\n\t\t\t}\r\n\t\t\tif (sipSessions.size() > 0){\r\n\t\t String[] items = new String[sipSessions.size()]; \r\n\t\t for (int i = 0; i < items.length; i++) {\r\n\t\t\t\t\titems[i]=sipSessions.get(i).getSessionID();\r\n\t\t }\r\n\t\t\t\tsetListAdapter(new ArrayAdapter<String>(SessionsList.this, android.R.layout.simple_list_item_1, items));\r\n\t\t\t} else {\r\n\t\t\t\tsetListAdapter(null);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tUtils.showMessageAndExit(SessionsList.this, getString(R.string.label_session_failed));\r\n\t\t}\r\n }",
"protected final List<String> getSessionPermissions() {\n Session currentSession = sessionTracker.getSession();\n return (currentSession != null) ? currentSession.getPermissions() : null;\n }",
"public List getUserListShowToClient() {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n Session session = ConnectionFactory.getInstance().getSession();\n Query query;\n\n try {\n /*\n * Build HQL (Hibernate Query Language) query to retrieve a list\n * of all the items currently stored by Hibernate.\n */\n query = session.createQuery(\"select user from app.user.User user where user.currentEmployee = 'true' and user.clientShow = 'TRUE' order by user.lastName, user.firstName\");\n return query.list();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }",
"public static List<CourseSession> createSessions() {\n List<CourseSession> list = new ArrayList<CourseSession>();\n list.add(createSession(\"1\"));\n list.add(createSession(\"2\"));\n return list;\n }",
"public List<String> listUsers() \n\t{\n\t\treturn this.userList.keys();\n\t\t\n\t}",
"public List<com.scratch.database.mysql.jv.tables.pojos.Session> fetchByLifetime(Integer... values) {\n return fetch(Session.SESSION.LIFETIME, values);\n }",
"private Set<Session> getOpenServerSessions(){\n ClientContainer jettySocketServer = getWebSocketsContainer();\n return jettySocketServer.getOpenSessions();\n }",
"public static Object listUsers(String sessionToken) throws IOException, SQLException {\n if (validateToken(sessionToken)) {\n String callingUsername = getUsernameFromToken(sessionToken);\n if (!hasPermission(callingUsername, EditUser)) { // Require edit users permission\n System.out.println(\"Insufficient permissions, no list of users was retrieved\");\n return InsufficientPermission; // 1. Valid token but insufficient permission\n } else {\n System.out.println(\"Session and permission requirements were valid, list of users was retrieved\");\n return DbUser.listUsers(); // 2. Success, list of users returned\n }\n } else {\n System.out.println(\"Session was not valid, no list of users was retrieved\");\n return InvalidToken; // 3. Invalid Token\n }\n }",
"public PSUserSession getSession();",
"public List<Utilizator> listUsers();",
"@GetMapping(path=\"/showActivity\",produces = MediaType.APPLICATION_JSON_VALUE)\n public @ResponseBody Iterable<user_activity> getactivity(HttpSession session) {\n return activityService.getactivity(session.getAttribute(\"name\").toString());\n }",
"public ImmutableSet<Key<?>> getSessionKeys() {\n return ((SessionKeyExposingObjectify) ofy()).getSessionKeys();\n }",
"int getAccessCounterForSession();",
"public String getAllLoggedInUsers(Request req, Response res) {\n List<User> users = model.getAvailableUser();\n List<User> onlineUser = new ArrayList<>();\n for (User user : users) {\n if (user.getStatus()) {\n onlineUser.add(user);\n }\n }\n\n JsonArray bodyResult = JsonUtil.usersToJson(onlineUser);\n res.status(200);\n return JsonUtil.stringify(new ServerResponse(SUCCESS, bodyResult));\n }",
"public SessionList() { \n sessions = ExpiringMap.builder().variableExpiration().build();\n }",
"public static HTTPSession [] getAllSessions ()\n\t{\n\t\tObject [] theSessions = sessionHashtable.values ().toArray ();\n\t\tHTTPSession [] retVal = new HTTPSession [theSessions.length];\n\t\tfor (int i = 0; i < retVal.length; i++)\n\t\t{\n\t\t\tretVal [i] = (HTTPSession) theSessions [i];\n\t\t}\n\t\treturn retVal;\n\t}",
"public List<Login>listar();",
"public synchronized void checkUsers() {\n\t\tHttpSession temp;\n\t\tDate now = new Date();\n\t\tString tempUser;\n\t\tEnumeration userList = userSessions.keys();\n\t\twhile (userList.hasMoreElements()) {\n\t\t\ttempUser = (String) userList.nextElement();\n\t\t\ttry {\n\t\t\t\ttemp = (HttpSession) userSessions.get(tempUser);\n\t\t\t\tif ((now.getTime() - temp.getLastAccessedTime()) > 60000)\n\t\t\t\t\tuserSessions.remove(tempUser);\n\t\t\t} catch (Exception e) {\n\t\t\t\tuserSessions.remove(tempUser);\n\t\t\t}\n\t\t}\n\t}",
"public List<Usuario> obtenerListaUsuariosActivos(){\n return usuarioBean.obtenerListaUsuariosActivos();\n }",
"public Map<Long, Session> list() throws DAOException {\n\t\tHashMap<Long, Session> result = new HashMap<Long, Session>();\n\t\tTypedQuery<Session> query = em.createQuery(SQL_SELECT, Session.class);\n\t\ttry {\n\t\t\tList<Session> sessions = query.getResultList();\n\t\t\tfor (Session session : sessions)\n\t\t\t\tresult.put(session.getId(), session);\n\t\t} catch (NoResultException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new DAOException(e);\n\t\t}\n\n\t\treturn result;\n\t}",
"public UserSession[] getUserSessions(String name) throws SessionQueryException\n {\n UserSession[] userArray = null;\n\n try\n {\n int sessionId = getSessionManagementAdminService().getSessionByUserId(name);\n //Get all of the users from the SMS\n UserLoginStruct[] userStructs = getSessionManagementAdminService().getUsersForSession(sessionId);\n\n GUILoggerHome.find().debug(\"AbstractSessionInfoManager\", GUILoggerSABusinessProperty.USER_SESSION, userStructs);\n if (GUILoggerHome.find().isInformationOn())\n {\n GUILoggerHome.find().information(\"AbstractSessionInfoManager\", GUILoggerSABusinessProperty.USER_SESSION,\n \"Found \" + userStructs.length + \" User Sessions\");\n }\n\n userArray = new UserSession[userStructs.length];\n UserSession userSession = null;\n\n for(int i = 0; i < userStructs.length; i++)\n {\n if(userStructs[i].sourceComponents != null && userStructs[i].sourceComponents.length == 1 &&\n userStructs[i].sourceComponents[0].length() == 0)\n {\n userSession = new UserSession(new User(userStructs[i].userId, userStructs[i].loggedIn), new String[0]);\n }\n else\n {\n userSession = new UserSession(new User(userStructs[i].userId, userStructs[i].loggedIn), userStructs[i].sourceComponents);\n }\n userArray[i] = userSession;\n }\n\n //Sort the list of users in alphabetical order by Name\n Arrays.sort(userArray, getNameComparator());\n }\n catch(NotFoundException e)\n {\n //We are not throwing this back because, finding sessionId for a logged out user always \n //throws this exception. This is handled by the calling method accordingly.\n GUILoggerHome.find().debug(\"Session Not found for user-id \", GUILoggerSABusinessProperty.USER_SESSION, name);\n }\n catch(Exception e)\n {\n // catch the rest and attach the original exception that was the problem.\n throw new SessionQueryException(String.format(\"Could not get session for user name %s.\",name), e);\n }\n \n return userArray;\n }",
"List<User> getActivatedUserList();",
"@Override\r\n\tpublic List<Usuario> listarUsuario() {\n\t\treturn iUsuario.listarUsuarios();\r\n\t}",
"public ArrayList<String> getConnectedUsers() {\r\n\t\tArrayList<String> connectedUsers = new ArrayList<>();\r\n\t\tString message=\"107\";\r\n\t\tsendDatagramPacket(message);\r\n\t\t\r\n\t\t//connectedUsers.add(\"Default\");\r\n\t\t\r\n\t\treturn connectedUsers;\r\n\t}",
"public String[] getUsers(){\n try {\n names = credentials.keys();\n }catch (java.util.prefs.BackingStoreException e1){\n System.out.println(e1);\n }\n return names;\n }",
"private static I_SessionListener [] getSessionListeners ()\n\t{\n\t\tif (rebuildSessionListeners)\n\t\t{\n\t\t\tObject [] theListeners = sessionListeners.toArray ();\n\t\t\tsessionListenerArray = new I_SessionListener [theListeners.length];\n\t\t\tfor (int i = 0; i < theListeners.length; i++)\n\t\t\t{\n\t\t\t\tsessionListenerArray [i] = (I_SessionListener) theListeners [i];\n\t\t\t}\n\t\t\trebuildSessionListeners = false;\n\t\t}\n\t\treturn sessionListenerArray;\n\t}",
"public List<Usuario> getUsuarios(){\n\t\tList<Usuario> lista = new LinkedList<Usuario>();\n\t\tfor (Usuario c: usuarios.values()) \n\t\t\tlista.add(c);\n\t\treturn lista;\n\t}",
"public List<Account> getListOfLoggedUsers() {\n\t\tList<Account> loggedUsers = new ArrayList<>();\n\t\tloggedUsers = adminDao.getLoggedUsers();\n\n\t\tif (loggedUsers == null) {\n\t\t\tSystem.out.println(\"There is no logged users currently!\\n\");\n\t\t\tAdminMenu.getAdminMenu();\n\t\t}\n\t\treturn loggedUsers;\n\t}",
"public ArrayList<User> getAllLoggedInUser() {\n ArrayList<User> allUsers = new ArrayList<>();\n Realm realm = (mRealm == null) ? Realm.getDefaultInstance() : mRealm;\n\n try {\n RealmResults<User> allUsersInRealm = realm.where(User.class).equalTo(\"IsLoggedIn\", true).findAll();\n List<User> retval = realm.copyFromRealm(new ArrayList<>(allUsersInRealm)); // convert user to unmanaged copy\n allUsers.addAll(retval);\n } catch (Exception ex) {\n // todo handle exception\n }\n\n if (mRealm == null)\n realm.close();\n\n return allUsers;\n }",
"public ArrayList<User> showUsers(){\n\t\treturn this.userList;\n\t}",
"@GetMapping(\"/users\")\n\tpublic String get_users(HttpServletRequest request) {\n\t\tHttpSession session = request.getSession();\n\t\tif((session.getAttribute(\"user\") != null) && ((User)session.getAttribute(\"user\")).getType().toLowerCase().equals(\"admin\")) {\n\t\t\t\n\t\t\tList<User> blockedUsers = userService.blockedUsers();\n\t\t\trequest.setAttribute(\"users\", blockedUsers);\n\t\t\treturn \"users\";\n\t\t\t\n\t\t}else {\t\t\t\n\t\t\t\t\t\t\n\t\t\trequest.setAttribute(\"login_err\", \"show\");\n\t\t\trequest.setAttribute(\"login_msg\", \"You have to login.\");\n\t\t\t\n\t\t\treturn \"login\";\n\t\t}\t\t\n\t}",
"@SuppressWarnings(\"unchecked\")\n @Override\n public List<User> listUsers() {\n Session session = this.sessionFactory.getCurrentSession();\n List<User> UsersList = session.createQuery(\"from User\").list();\n for(User u : UsersList){\n logger.info(\"User List::\"+u);\n }\n return UsersList;\n }",
"public List getUserListCurrent() {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n Session session = ConnectionFactory.getInstance().getSession();\n Query query;\n\n try {\n /*\n * Build HQL (Hibernate Query Language) query to retrieve a list\n * of all the items currently stored by Hibernate.\n */\n query = session.createQuery(\"select user from app.user.User user where user.currentEmployee = 'true' order by user.lastName, user.firstName\");\n return query.list();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }",
"public static List<ITask> findWorkTaskOfSessionUser() {\r\n\r\n return findTaskOfSessionUser(DEFAULT_INDEX, DEFAULT_PAGESIZE, null, SortOrder.ASCENDING, RUNNING_MODE, null);\r\n }",
"boolean hasSession();",
"public String[] listUsers();",
"@Override\n\tpublic void sessionDestroyed(HttpSessionEvent arg0) {\n\t\tSet all = (Set)this.use.getAttribute(\"onlineuser\");//取出设置的集合\n\t\tall.remove(arg0.getSession().getAttribute(\"userid\"));//取出session中设置的内容\n\t\tthis.use.setAttribute(\"onlineuser\", all);//将更新的集合重新保存\n\t}",
"RunningTasks getActiveHarvestingSessions() throws RepoxException;",
"String getAssociatedSession();",
"Session getCurrentSession();",
"Session getCurrentSession();",
"public void getTestSessions(){\n TestSessionDAO sessionsManager = DAOFactory.getTestSessionDAO();\n //populate with values from the database\n if(!sessionsManager.readInactiveTestSessions(testSessions)){\n //close the window due to read failure\n JOptionPane.showMessageDialog(rootPanel, \"Failed to read test sessions from database. Please check your internet connection and try again.\");\n System.exit(-2);\n }\n }",
"public Map<String, UsageSession> getActiveUserSessions(List<String> userIds) {\n\t\treturn null;\n\t}",
"public ArrayList <Usuario>listaUsuario(){\r\n\t\treturn loja.getUsuarios();\r\n\t}",
"public User getSession(){\n\t\treturn this.session;\n\t}",
"@Override\r\n\tpublic List<User> viewUsers() {\n\t\treturn user.viewUsers();\r\n\t}",
"public List<Usuario> listarUsuarios(boolean Vigente){\r\n return cVista.listarUsuarios(Vigente);\r\n }",
"private static void getFromCache(Session session) {\n\t\tCacheManager cm=CacheManager.getInstance();\n\t\tCache cache=cm.getCache(\"namanCache\");\n\t\tfor(int i=0;i<2;i++){\n\t\t\tif(cache.get(i)!=null){\n\t\t\t\tSystem.out.println(((UserDetails)cache.get(1).getObjectValue()).getName());\n\t\t\t}else{\n\t\t\t\tUserDetails user1=(UserDetails)session.get(UserDetails.class, i);\n\t\t\t\tSystem.out.println(user1.getName());\n\t\t\t\tcache.put(new Element(i+1,user1));\n\t\t\t}\n\t\t}\n\t\tcm.shutdown();\n\t}",
"public List<String> show () {\n\t\treturn userDao.show();\n\t}",
"public List getOwnerUsersList(Map map) {\n\t String currentUser = UserUtil.getCurrentPrincipalUser();\r\n\t\t List ls = (List)map.get(currentUser);\r\n//\t\t System.out.println(\"map.size()\"+currentUser) ;\r\n//\t\t System.out.println(map.size()) ;\r\n\t\treturn ls;\r\n\t}",
"@Override\n\tpublic List<Session> getAssaignedSession(int agentid) {\n\t\treturn null;\n\t}",
"private boolean isInSession()\n {\n return EngagementActivityManager.getInstance().getCurrentActivityAlias() != null;\n }",
"public void mem_list() {\n synchronized(chat_room) {\n Set id_set = cur_chat_room.keySet();\n Iterator iter = id_set.iterator();\n clearScreen(client_PW);\n client_PW.println(\"------------online member-----------\");\n while(iter.hasNext()) {\n String mem_id = (String)iter.next();\n if(mem_id != client_ID) {\n client_PW.println(mem_id);\n }\n }\n client_PW.flush();\n }\n }",
"public void getRecentUsers(View view){\n SharedPreferences sharedPref = getContext().getSharedPreferences(\"recentVisited\", Context.MODE_PRIVATE);\n int size = sharedPref.getInt(\"size\", 0);\n\n // clears the variables.\n userName.clear();\n uid.clear();\n for (int i = size+1; i >0 ; i--) {\n String name= sharedPref.getString(\"name_\"+i,\"deleted\");\n String userId= sharedPref.getString(\"uid_\"+i,\"deleted\");\n if (!Objects.equals(name, \"deleted\")){\n userName.add(name);\n uid.add(userId);\n }\n\n }\n\n setList(view);\n }",
"@Override\n\tpublic List<Administrateur> getList() {\n\t\topenCurrentSession();\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Administrateur> list = (List<Administrateur>)getCurrentSession().createQuery(\"FROM Administrateur\").list();\n\t\tcloseCurrentSession();\n\t\treturn list;\n\t}",
"public List<Long> getSessionNodes() {\n List<Long> ret = new ArrayList<>();\n\n for (int i = 0; i < sessionsList.size(); i++) {\n ret.add(sessionsList.get(i).dhtNodes());\n }\n\n return ret;\n }",
"public List getUsuarios();",
"private void listaUsuario(HttpServletRequest req, HttpServletResponse resp) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic List<User> users() {\r\n\t\tList<User> ris = new ArrayList<>();\r\n\t\tList< Map <String,String>> maps = getAll(SELECT_USERS);\r\n\t\tfor (Map<String, String> map : maps) {\r\n\t\t\tris.add(IMappable.fromMap(User.class, map));\r\n\t\t}\r\n\t\treturn ris;\r\n\t}",
"public String navigateUsuarioList() {\n if (this.getSelected() != null) {\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"Usuario_items\", this.getSelected().getUsuarioList());\n }\n return \"/usuario/index\";\n }",
"@Override\n public UserLevel getSessionUsersLevel(String sessID) throws SQLException, RemoteException, SessionExpiredException {\n String name = SessionManager.getInstance().getUserForSession(sessID);\n return getUserLevel(sessID, name);\n }",
"public void returnToSessionList() {\n Context context = this;\n Class destinationClass = SessionListActivity.class;\n Intent intentToStartDetailActivity = new Intent(context, destinationClass);\n startActivity(intentToStartDetailActivity);\n }",
"public boolean getShowCommunicationSessions()\r\n {\r\n return showCommunicationSessions;\r\n }",
"private void listarUsuario(HttpServletRequest request, HttpServletResponse response) throws SQLException, ServletException, IOException {\n\t\tList<Usuario> listarUsuario = dao.selecionarTodosUsuarios();\n\t\trequest.setAttribute(\"listarUsuario\", listarUsuario);\n\t\tRequestDispatcher dispatcher = request.getRequestDispatcher(\"usuario-lista.jsp\");\n\t\tdispatcher.forward(request, response);\n\t}",
"public List listUsers() {\n Session session = HibernateSessionFactory.getSessionFactory().openSession();\n Transaction tx = null;\n List users = null;\n try {\n tx = session.beginTransaction();\n users = session.createQuery(\"FROM User\").list();\n for (Iterator iterator = users.iterator(); iterator.hasNext(); ) {\n User user = (User) iterator.next();\n System.out.print(\"id: \" + user.getId());\n System.out.print(\" Username: \" + user.getUsername());\n System.out.print(\" Password: \" + user.getPassword());\n System.out.println(\" Email: \" + user.getEmail());\n }\n tx.commit();\n } catch (HibernateException e) {\n if (tx != null) tx.rollback();\n e.printStackTrace();\n } finally {\n session.close();\n }\n return users;\n }",
"private void listarUsuarios() {\r\n \t\r\n \tfor(String usuario : ConfigureSetup.getUsers()) {\r\n \t\tif(!usuario.equals(ConfigureSetup.getUserName()))\r\n \t\t\tlista_usuarios.getItems().add(usuario);\r\n \t}\r\n \t\r\n \t//lista_usuarios.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);\t\r\n }",
"public void recuperoListeUtenteloggato(HttpServletRequest request, HttpServletResponse response){\n \n DAOFactory mySqlFactory = DAOFactory.getDAOFactory();\n HttpSession session = request.getSession();\n \n ShoppingListDAO shoppingListDAO = new MySQLShoppingListDAOImpl();\n SharingDAO sharingDAO = new MySQLSharingDAOImpl();\n ShoppingListCategoryDAO shoppingListCategoryDAO = new MySQLShoppingListCategoryDAOImpl();\n \n //elimino shopping list anonime scadute\n shoppingListDAO.deleteExpiredShoppingLists();\n \n if(session.getAttribute(\"emailSession\") != null){\n \n // START: recupero delle liste che appartengono all'utente loggato\n \n List lists = shoppingListDAO.getShoppingListsByOwner((String)session.getAttribute(\"emailSession\"));\n String[][] searchListResult = new String[lists.size()][4];\n\n for(int i=0; i<lists.size(); i++){\n searchListResult[i][0] = ((ShoppingList)(lists.get(i))).getName();\n searchListResult[i][1] = Integer.toString(((ShoppingList)(lists.get(i))).getLID());\n searchListResult[i][2] = ((ShoppingListCategory)(shoppingListCategoryDAO.getShoppingListCategory(((ShoppingList)(lists.get(i))).getLCID()))).getName();\n List listaCondivisa = sharingDAO.getAllEmailsbyList(Integer.parseInt(searchListResult[i][1]));\n if (listaCondivisa.isEmpty()){\n searchListResult[i][3] = Integer.toString(0);\n } else {\n searchListResult[i][3] = Integer.toString(1);\n }\n }\n\n session.setAttribute(\"ListUserSession\", searchListResult);\n session.setAttribute(\"ListUserSessionSize\", lists.size());\n\n // END: recupero delle liste che appartengono all'utente loggato\n \n // START: recupero delle liste condivise dell'utente loggato\n \n List sharingLists = sharingDAO.getAllListByEmail((String)session.getAttribute(\"emailSession\"));\n ShoppingList tmp = null;\n String[][] sharingListResult = new String[sharingLists.size()][3];\n\n for(int i=0; i<sharingLists.size(); i++){\n\n tmp = shoppingListDAO.getShoppingList(((Sharing)(sharingLists.get(i))).getLID());\n\n sharingListResult[i][0] = tmp.getName();\n sharingListResult[i][1] = Integer.toString(tmp.getLID());\n sharingListResult[i][2] = (shoppingListCategoryDAO.getShoppingListCategory(tmp.getLCID())).getName();\n } \n\n session.setAttribute(\"SharingListUserSession\", sharingListResult);\n session.setAttribute(\"SharingListUserSessionSize\", sharingLists.size());\n \n // END: recupero delle liste condivise dell'utente loggato \n \n } else {\n \n int cookieID;\n \n if(session.getAttribute(\"cookieIDSession\") == null){\n\n MyCookieDAO riverCookieDAO = mySqlFactory.getMyCookieDAO();\n MyCookieDAO myCookieDAO = new MySQLMyCookieDAOImpl();\n\n //cancello eventuali cookie scaduti\n List<MyCookie> cookieScaduti = myCookieDAO.deleteDBExpiredCookies();\n for(int i=0; i<cookieScaduti.size(); i++){\n myCookieDAO.deleteCookieByCookieID(cookieScaduti.get(i).getCookieID());\n }\n\n //Creo cookie\n Cookie cookie = new Cookie(\"FridayAnonymous\", Integer.toString(LastEntryTable(\"cookieID\", \"cookies\")));\n cookie.setMaxAge(-1);\n cookieID = Integer.parseInt((String)cookie.getValue());\n\n Long Deadline = new Timestamp(System.currentTimeMillis()).getTime()+1800*1000;\n\n myCookieDAO.createCookie(new MyCookie(LastEntryTable(\"cookieID\", \"cookies\"), 0, null, Deadline));\n session.setAttribute(\"cookieIDSession\", Integer.parseInt(cookie.getValue()));\n response.addCookie(cookie);\n \n } else {\n cookieID = (int)session.getAttribute(\"cookieIDSession\");\n }\n \n ShoppingList shoppingList = shoppingListDAO.getAnonymusShoppingList(cookieID);\n String[][] ListResult = null;\n\n if(shoppingList != null){\n\n ListResult = new String[1][3];\n ListResult[0][0] = shoppingList.getName();\n ListResult[0][1] = Integer.toString(shoppingList.getLID());\n ListResult[0][2] = (shoppingListCategoryDAO.getShoppingListCategory(shoppingList.getLCID())).getName();\n session.setAttribute(\"ListUserSessionSize\", 1);\n\n } else {\n ListResult = new String[0][3];\n session.setAttribute(\"ListUserSessionSize\", 0);\n }\n \n session.setAttribute(\"ListUserSession\", ListResult);\n \n }\n \n \n }",
"public static List<Connection> getLoggedInUserConnections() {\n List<Connection> userConnections = new ArrayList<Connection>();\n for (User user : UserManager.getLoggedInUsers()) {\n if (user.getConnection() != null) {\n userConnections.add(user.getConnection());\n }\n }\n return userConnections;\n }",
"@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}",
"public String ListOnlineUsers(){\r\n StringBuilder listUsers = new StringBuilder();\r\n for (Utente u: utenti) { // crea la lista degli utenti registrati al servizio e online\r\n if(u.getStatus().equals(\"ONLINE\")) {\r\n \tlistUsers.append(u.getUsername()).append(\" \");\r\n \tlistUsers.append(u.getStatus()).append(\"\\n\");\r\n }\r\n }\r\n return listUsers.toString(); \r\n }",
"public ArrayList<Session> getSessionList(){\n \n ArrayList<Session> sessionList= new ArrayList<Session>(); \n Connection connection=getConnection();\n \n String studentGroup = combo_studentGroup.getSelectedItem().toString();\n\n String query= \"SELECT `SessionId`,`Tag`,`StudentGroup`,`Subject`,`NoOfStudents`,`SessionDuration` FROM `sessions` WHERE StudentGroup='\"+studentGroup+\"' \";\n Statement st;\n ResultSet rs;\n\n try{\n st = connection.createStatement();\n rs= st.executeQuery(query);\n Session session;\n while(rs.next()){\n session = new Session(rs.getInt(\"SessionId\"),rs.getString(\"Tag\"),rs.getString(\"StudentGroup\"),rs.getString(\"Subject\"),rs.getInt(\"NoOfStudents\"),rs.getInt(\"SessionDuration\"));\n sessionList.add(session);\n }\n }catch(Exception e){\n e.printStackTrace();\n }\n return sessionList; \n }",
"@RequestMapping(\"/indexAppusers\")\n\tpublic ModelAndView listAppuserss() {\n\t\tModelAndView mav = new ModelAndView();\n\n\t\tmav.addObject(\"appuserss\", appusersService.loadAppuserss());\n\n\t\tmav.setViewName(\"appusers/listAppuserss.jsp\");\n\n\t\treturn mav;\n\t}",
"public List<String> getUserList() {\n\t\treturn userList;\n\t}"
]
| [
"0.73108876",
"0.72718275",
"0.7062307",
"0.7046068",
"0.6949508",
"0.6889909",
"0.68578464",
"0.6786809",
"0.67715716",
"0.6765313",
"0.67325574",
"0.67322767",
"0.6728642",
"0.6669417",
"0.6417641",
"0.63619095",
"0.6316831",
"0.62818384",
"0.6213493",
"0.6162216",
"0.6156598",
"0.6139269",
"0.61292094",
"0.61287093",
"0.6060097",
"0.6044441",
"0.6029429",
"0.6020405",
"0.59762615",
"0.59676826",
"0.5966802",
"0.5950904",
"0.5945808",
"0.5911856",
"0.5903358",
"0.5898284",
"0.5885286",
"0.58845323",
"0.5860105",
"0.5857942",
"0.58512974",
"0.5842174",
"0.5827864",
"0.581971",
"0.58133084",
"0.5812239",
"0.5809466",
"0.5774197",
"0.57631147",
"0.5746831",
"0.5744988",
"0.57365745",
"0.57359636",
"0.5733953",
"0.5725871",
"0.57153237",
"0.57150364",
"0.5680686",
"0.5675728",
"0.5675522",
"0.5674697",
"0.56707",
"0.56701785",
"0.56680846",
"0.5658299",
"0.56512135",
"0.56500727",
"0.56500727",
"0.5648612",
"0.5634114",
"0.5631919",
"0.56305146",
"0.56294745",
"0.562916",
"0.5627432",
"0.562242",
"0.562234",
"0.5619553",
"0.56046635",
"0.5594491",
"0.5593621",
"0.5584141",
"0.5576918",
"0.55706674",
"0.5557441",
"0.55559933",
"0.554027",
"0.5539922",
"0.5537068",
"0.553331",
"0.55261344",
"0.55242944",
"0.551776",
"0.55173767",
"0.55128276",
"0.5511147",
"0.5504322",
"0.55024356",
"0.5500461",
"0.5476751"
]
| 0.79693204 | 0 |
suppression des candidatures de l'agent aux sessions ou il ne veut plus postuler | public void annuleCandidatures(List<Session> list) {// OK
for (Session session : list) {
String valID = String.valueOf(session.getId());
service.path(idConnexion + "/delete").queryParam("session", valID);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void supprimerInaccessibles(){\n grammaireCleaner.nettoyNonAccGramm();\n setChanged();\n notifyObservers(\"3\");\n }",
"private void removeDuplicateUserAgents() throws Exception {\n Db db = getDb();\n try {\n db.enter();\n Map<Integer, Integer> dups = new HashMap<Integer, Integer>();\n _logger.info(\"checking duplicate user agents\");\n String sqlSelectDupUA = \"select a1.t_http_agent_id, a2.t_http_agent_id FROM http.t_http_agent a1, http.t_http_agent a2 WHERE a1.t_http_agent_id <> a2.t_http_agent_id AND a1.agent_name = a2.agent_name AND a1.version = a2.version AND a1.authorized = 'ALLOWED' ORDER BY a1.t_http_agent_id\";\n PreparedStatement pstSelDups = db.prepareStatement(sqlSelectDupUA);\n ResultSet rsDups = db.executeQuery(pstSelDups);\n if (rsDups.next()) {\n do {\n dups.put(Integer.valueOf(rsDups.getInt(1)), Integer.valueOf(rsDups.getInt(2)));\n } while (rsDups.next());\n } else {\n _logger.debug(\"removeDuplicateUserAgents 1 - no rows found.\");\n }\n _logger.debug(dups.size() + \" user agents duplicated\");\n if (dups.size() == 0) return;\n String sqlSelUAD = \"SELECT count, calc_day FROM http.t_http_agent_daily WHERE t_http_agent_id = ?\";\n String sqlUpdUAD = \"UPDATE http.t_http_agent_daily SET count = count + ? WHERE calc_day = ? AND t_http_agent_id = ?\";\n String sqlDelUAD = \"DELETE FROM http.t_http_agent_daily WHERE t_http_agent_id = ?\";\n PreparedStatement pstSelUAD = db.prepareStatement(sqlSelUAD);\n PreparedStatement pstUpdUAD = db.prepareStatement(sqlUpdUAD);\n PreparedStatement pstDelUAD = db.prepareStatement(sqlDelUAD);\n for (Iterator<Map.Entry<Integer, Integer>> it = dups.entrySet().iterator(); it.hasNext(); ) {\n try {\n db.enter();\n Map.Entry<Integer, Integer> kv = it.next();\n Integer key = kv.getKey();\n Integer dupToRemove = kv.getValue();\n pstSelUAD.setInt(1, dupToRemove.intValue());\n ResultSet rsSelUAD = db.executeQuery(pstSelUAD);\n if (rsSelUAD.next()) {\n do {\n pstUpdUAD.setInt(1, rsSelUAD.getInt(1));\n pstUpdUAD.setDate(2, rsSelUAD.getDate(2));\n pstUpdUAD.setInt(3, key.intValue());\n db.executeUpdate(pstUpdUAD);\n } while (rsSelUAD.next());\n } else {\n _logger.debug(\"removeDuplicateUserAgents 2 - no rows found.\");\n }\n pstDelUAD.setInt(1, dupToRemove.intValue());\n db.executeUpdate(pstDelUAD);\n } finally {\n db.exit();\n }\n }\n _logger.debug(\"Finished removing duplicate rows in http_agent_daily\");\n String sqlSelectUADates = \"SELECT first_occurence, last_occurence FROM http.t_http_agent WHERE t_http_agent_id = ?\";\n String sqlUpdateUA = \"UPDATE http.t_http_agent SET first_occurence = timestamp_smaller(first_occurence, ?), last_occurence = timestamp_larger(last_occurence, ?) WHERE t_http_agent_id = ?\";\n String sqlDeleteUA = \"DELETE FROM http.t_http_agent WHERE t_http_agent_id = ?\";\n PreparedStatement pstSelDates = db.prepareStatement(sqlSelectUADates);\n PreparedStatement pstUpdUA = db.prepareStatement(sqlUpdateUA);\n PreparedStatement pstDelUA = db.prepareStatement(sqlDeleteUA);\n for (Iterator<Map.Entry<Integer, Integer>> it = dups.entrySet().iterator(); it.hasNext(); ) {\n try {\n db.enter();\n Map.Entry<Integer, Integer> kv = it.next();\n Integer key = kv.getKey();\n Integer dupToRemove = kv.getValue();\n pstSelDates.setInt(1, dupToRemove.intValue());\n ResultSet rsSelUA = db.executeQuery(pstSelDates);\n if (rsSelUA.next()) {\n pstUpdUA.setTimestamp(1, rsSelUA.getTimestamp(1));\n pstUpdUA.setTimestamp(2, rsSelUA.getTimestamp(2));\n pstUpdUA.setInt(3, key.intValue());\n db.executeUpdate(pstUpdUA);\n }\n pstDelUA.setInt(1, dupToRemove.intValue());\n db.executeUpdate(pstDelUA);\n } finally {\n db.exit();\n }\n }\n _logger.debug(\"Finished removing duplicate rows in http_agent\");\n } finally {\n db.exit();\n }\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}",
"public void mettreOrdre() throws NbDeException {\n\t\tfor (Senateur s : senateurs) {\n\t\t\tif (De.jet(1) - De.getMauvaisPresage() >= 5) {\n\t\t\t\t// TODO remettre le senateur au forum\n\t\t\t}\n\t\t}\n\t}",
"private void resetCount(){\r\n\t\t\tactiveAgent = 0;\r\n\t\t\tjailedAgent = 0;\r\n\t\t\tquietAgent = 0;\r\n\t\t}",
"private void countAgents(){\r\n\t\t\tfor(Agent agent : agents){\r\n\t\t\t\tif(agent.isActive()) activeAgent ++;\r\n\t\t\t\telse if(agent.getJailTerm() > 0) jailedAgent ++;\r\n\t\t\t\telse quietAgent ++;\r\n\t\t\t}\r\n\t\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}",
"private void fncConversacionPendienteSessionActiva() {\n if( Storage.fncStorageEncontrarUnaLinea(perfil.stgFriends, yoker) == true && \r\n Storage.fncStorageEncontrarUnaLinea(perfil.stgChats, yoker) == true\r\n ){\r\n\r\n // Agrego un nuevo mensaje a la conversion original\r\n // por que si perfil me tiene como amigo pudo estar enviado mesajes... (Entonces es el más actualizado)\r\n String chat_original = Storage.fncStorageCrearRutaChats(perfil.getStrEmail(), session_activa.getStrEmail());\r\n Storage.fncStorageAcoplarUnaLinea(chat_original, mensaje);\r\n\r\n // Registrar a perfil en mi cuenta o session_activa\r\n Storage.fncStorageActualizarUnaLinea(session_activa.stgFriends, perfil_seleccionado);\r\n\r\n // Regitrar a perfil en mi cuenta o session_activa (Este no es necesario)\r\n // Storage.fncStorageActualizarUnaLinea(session_activa.stgChats, perfil);\r\n\r\n // Clonar la conversion de perfil a session_activa (Entonces es el más actualizado)\r\n String chat_clone = Storage.fncStorageCrearRutaChats(session_activa.getStrEmail(), perfil.getStrEmail());\r\n Storage.fncStorageCopiarArchivo(new File(chat_original), chat_clone);\r\n \r\n if( this.mostrar_msg )\r\n JOptionPane.showMessageDialog(null, \"Tienes una conversación pendiente con \"\r\n + \"\\n\\t\\t\\t\\t\" + perfil.getStrEmail()\r\n + \"\\nPuedes chatear pueden conservar en usuario en las lista de amigos.\");\r\n }else{ \r\n\r\n // Agrego un nuevo mensaje en la conversación de session_activa\r\n String chat = Storage.fncStorageCrearRutaChats(session_activa.getStrEmail(), perfil.getStrEmail());\r\n Storage.fncStorageAcoplarUnaLinea(chat, mensaje);\r\n\r\n // Clonar la conversion de session_activa a perfil \r\n String chat_clone = Storage.fncStorageCrearRutaChats(perfil.getStrEmail(), session_activa.getStrEmail());\r\n Storage.fncStorageCopiarArchivo(new File(chat), chat_clone);\r\n\r\n // * Verificar que los puedan conversar entre ellos ....\r\n if( Storage.fncStorageEncontrarUnaLinea(perfil.stgFriends, yoker) == false && \r\n Storage.fncStorageEncontrarUnaLinea(session_activa.stgFriends, perfil_seleccionado) == false\r\n ){\r\n\r\n Storage.fncStorageActualizarUnaLinea(perfil.stgFriends, yoker);\r\n Storage.fncStorageActualizarUnaLinea(session_activa.stgFriends, perfil_seleccionado);\r\n \r\n if( this.mostrar_msg )\r\n JOptionPane.showMessageDialog(null, \"Haz recuperado la conversación con \"\r\n + \"\\n\\t\\t\\t\\t\" + perfil.getStrEmail()\r\n + \"\\nPuedes chatear pueden conservar en usuario en las lista de amigos.\");\r\n\r\n }else JOptionPane.showMessageDialog(null, \"Mensaje enviado.\"); \r\n } \r\n }",
"public void removeAllGuests(ArrayList <Invitato> Guests){\n AssegnamentiTavolo.removeAll(Guests);\n num_posti = num_posti + Guests.size();\n openAssignment();\n\n }",
"public String dissociaAuditors(){\n\t\tHttpServletRequest request = ServletActionContext.getRequest();\n\t\tDatiUtente user = (DatiUtente) request.getSession().getAttribute(\"DatiUtente\");\n\t\t\n\t\tlong idUtente=getModel().getIdAuditors();\n\t\tlong idAccesso=user.getIdSessione();\n\t\t\n\t\tAuAssUtenteSessione ass = auditService.getAssociazioneAuditors(idAccesso, idUtente);\n\t\tass.setIdSessione(idAccesso);\n\t\tass.setIdUtente(idUtente);\n\t\tass.setDataFine(new Date());\n\t\tAuAssUtenteSessione managed=(AuAssUtenteSessione)auditService.salva(ass);\n\t\t\n\t\t//auditService.dissociaAuditors(idAccesso, idUtente);\n\t\t\n\t\treturn SUCCESS;\n\t}",
"@Override\n public void interagit() {\n super.interagit();\n ArrayList<EtreVivant> cibles = this.ciblesPotentiellesAdjacentes(this.getPosition(),this.nombreVoisins);\n cibles.stream().filter((vivants) -> (vivants.getEtat().equals(EtatEtreVivant.MALADE))).forEach((vivants) -> {\n this.soigne(vivants);\n });\n }",
"public void permitirRobotsSuperpuestos(boolean superpuestos);",
"public void supprimerImproductifs(){\n grammaireCleaner.nettoyNonProdGramm();\n setChanged();\n notifyObservers(\"2\");\n }",
"private void liberateAroom() {\n\t\tif(this.adminLogin() == 1) {\n\t\t\tSystem.out.println(\"\\n------------------\\n| Bonjour Ibobai |\\n------------------\");\n\t\t\tfor(Chambre chambre : this.getChambres()) {\n\t\t\t\tif(chambre.equals(this.chambresNonVides().get(this.chambresNonVides().size()-1))) {\n\t\t\t\t\tchambre.setReserve(false);\n\t\t\t\t\tSystem.err.println(\"--------------------------------------------------\\nVous avez bien libérée cette chambre:\\n--------------------------------------------------\\n\");\n\t\t\t\t\tSystem.out.println(chambre.toString());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}else {\n\t\t\tSystem.err.println(\"----------------------------\\nVous n'êtes pas un admin! |\\n----------------------------\");\n\t\t}\n\t\t\n\t}",
"public CapteurVitesse() {\n super();\n vitesseDetecte = 0;\n }",
"public void suppressionRdV_all() {\n //on vide l'agenda de ses elements\n for (RdV elem_agenda : this.agd) {\n this.getAgenda().remove(elem_agenda);\n }\n //on reinitialise a null l'objet agenda\n //this.agd = null;\n }",
"public List<Agent> findAgentsActifs() {\n Query q = getEntityManager().createQuery(\"select A from Agent A WHERE A.etat NOT IN('RET','DEM') ORDER BY A.personne.name\");\n List<Agent> list = q.getResultList();\n return list;\n }",
"@Override\n public void selectionnerJoueurs(EnsJoueurs joueursGagnantsPhase1) {\n this.participantsDeLaPhase = joueursGagnantsPhase1; // Joueurs actifs\n }",
"public synchronized void pistesOccupee() {\n\t\tSystem.out.println(Thread.currentThread().getName() + \"[PisteDeDanse][les pistes sont occupée]\");\n\t\tthis.pisteLibre = false;\n\t\tnotify();\n\t}",
"private void clearTokens(){\n Login.gramateia_counter = false; \n }",
"@Override\r\n\tpublic void action() {\n\t\tMessageTemplate mt=MessageTemplate.or(MessageTemplate.MatchContent(\"comida\"), MessageTemplate.MatchContent(\"bebida\"));\r\n ACLMessage msg = myAgent.receive(mt);\r\n if(msg!=null){\r\n \tif(msg.getContent().compareTo(\"comida\")==0){\r\n \t\tif(Comida>=5){\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"Si\");\r\n System.out.println(myAgent.getLocalName()+\":Si, gracias tengo hambre todavia\"); \r\n myAgent.send(reply);\r\n Comida=Comida-5;\r\n \t\t}\r\n \t\telse{\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"No\");\r\n System.out.println(myAgent.getLocalName()+\":No gracias\"); \r\n myAgent.send(reply);\r\n \t\t} \r\n \t}\r\n \telse if(msg.getContent().compareTo(\"bebida\")==0){\r\n \t\tif(Bebida>=5){\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"Si\");\r\n System.out.println(myAgent.getLocalName()+\":Si, gracias tengo sed todavia\"); \r\n myAgent.send(reply);\r\n Bebida=Bebida-5;\r\n \t\t}\r\n \t\telse{\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"No\");\r\n System.out.println(myAgent.getLocalName()+\":No gracias\"); \r\n myAgent.send(reply);\r\n \t\t} \r\n \t}\r\n }\r\n if (Comida==0 && Bebida==0){\r\n \tmyAgent.doDelete();\r\n }\r\n\t}",
"@Override\r\n public void visit(final Context context, final Object object)\r\n {\r\n final CRMSpid serviceProvider = (CRMSpid) object;\r\n final Date dormantToDectivateDate;\r\n {\r\n final Calendar calendar = Calendar.getInstance();\r\n calendar.add(Calendar.DAY_OF_MONTH, -serviceProvider.getFinteBalanceDeactivationDays());\r\n calendar.set(Calendar.HOUR, 59);\r\n calendar.set(Calendar.MINUTE, 59);\r\n calendar.set(Calendar.SECOND, 59);\r\n calendar.set(Calendar.MILLISECOND, 59);\r\n dormantToDectivateDate = calendar.getTime();\r\n }\r\n final Context subcontext = context.createSubContext();\r\n final And condition = new And();\r\n condition.add(new EQ(SubscriberXInfo.STATE, SubscriberStateEnum.DORMANT));\r\n condition.add(new EQ(SubscriberXInfo.SPID, Integer.valueOf(serviceProvider.getSpid())));\r\n condition.add(new LT(SubscriberXInfo.LAST_MODIFIED, dormantToDectivateDate));\r\n try\r\n {\r\n final Home filteredHome = getHome().where(subcontext, condition);\r\n filteredHome\r\n .forEach(subcontext, new CloneingVisitor(new CloseZeroBlalanceSubscriberVisitor(getHome())));\r\n }\r\n catch (IllegalArgumentException exception)\r\n {\r\n // should not happen!!\r\n new MinorLogMsg(this, \"Home is not set in visitor for deactivating Dormant Subscribers in SPID [\" +serviceProvider.getSpid() +\"].\", exception).log(subcontext);\r\n }\r\n catch (AbortVisitException exception)\r\n {\r\n new MinorLogMsg(this, \"Error visiting home for deactivating Dormant Subscribers in SPID [\" +serviceProvider.getSpid() +\"].\", exception).log(subcontext);\r\n }\r\n catch (HomeException exception)\r\n {\r\n new MinorLogMsg(this, \"Error selecting who are Dormant Subscribers in SPID [\" +serviceProvider.getSpid() +\"].\", exception).log(subcontext);\r\n }\r\n catch (Throwable t)\r\n {\r\n new MinorLogMsg(this, \"Uknown Error while processing deactivation of Dormant Subscribers in SPID [\" +serviceProvider.getSpid() +\"].\", t).log(subcontext);\r\n }\r\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}",
"private void checkElim(int origin) {\r\n\r\n\t// if (elimDay.size() > playerIDs.size() / 2) {\r\n\tserver.publicMessage(players.get(origin) + \" has voted to eliminate \" + server.getUsername(playerOnTrialID));\r\n\r\n\tif (elimDay.size() > players.size() / 2) {\r\n\t eliminateDay();\r\n\t}\r\n\r\n }",
"private static void verifPayement(){\n\t\tint x,y, dime;\n\t\tx=jeu.getAssam().getXPion()-1;\n\t\ty=jeu.getAssam().getYPion()-1;\n\t\tint caseInfoTapis = jeu.cases[x][y].getCouleurTapis();\n\t\tif(caseInfoTapis == tour || caseInfoTapis == 0){\n\t\t\treturn;\n\t\t}\n\t\telse{\n\t\t\tdime = jeu.payerDime(caseInfoTapis,x,y,0,new boolean[7][7]);\n\t\t\tJoueur payeur = jeu.getJoueurs()[tour-1];\n\t\t\tJoueur paye = jeu.getJoueurs()[caseInfoTapis-1];\n\t\t\tif(jeu.payerVraimentDime(payeur,paye,dime)){\n\t\t\t\tjoueurElimine++;\n\t\t\t}\n\t\t\tconsole.afficherPayeurPaye(payeur, paye, dime);\n\t\t}\n\t}",
"public void videListeClient(){\n couleurs.clear();\n }",
"public void desactiveRegraJogadaDupla() {\n this.RegraJogadaDupla = true;\n }",
"public void receiveFromFollowees(Set<Candidate> candidates) {\n\r\n \tSet<Transaction> goodTx = new HashSet<Transaction>();\r\n \tcounter+=1; \r\n \tfor (Candidate c: candidates){\r\n \t\tint cnt=0;\r\n // maybe try adding a check to see if random followees are in the set of candidate.senders\r\n // \t\tRandom random = new Random();\r\n // \t\tint randi = random.nextInt(followees.length-1);\r\n // \t\twhile(!followees[randi]){\r\n // \t\t\trandi = random.nextInt();\r\n // \t\t}\r\n \t\tif (!txcount.containsKey(c.tx)){\r\n \t\t\ttxcount.put(c.tx, 1);\r\n \t\t}\r\n \t\telse {\r\n \t\t\tcnt = txcount.get(c.tx)+1;\r\n \t\t\ttxcount.put(c.tx, cnt);\r\n \t\t}\r\n \t}\r\n \tfor (Transaction tx: txcount.keySet()){\r\n// \t\tif (counter<2&&txcount.get(tx)>2) {\r\n // \t\tSystem.out.println(\"counter:\"+counter+ \"txcount:\"+txcount.get(tx));\r\n \t\tif (counter<4){\r\n // \t\t\tSystem.out.println(\"counter:\"+counter+ \"txcount:\"+txcount.get(tx));\r\n \t\t\tgoodTx.add(tx);\r\n \t\t}\r\n \t\telse if (counter>3&&txcount.get(tx)>counter){\r\n \t\t//\t \t\tSystem.out.println(\"counter:\"+counter+ \"txcount:\"+txcount.get(tx));\r\n \t\t\tgoodTx.add(tx);\r\n \t\t}\r\n// \t\telse if ((txcount.get(tx)>9*(counter/10))){\r\n \t\telse {\r\n \t\t\ttxcount.put(tx,0);\r\n \t\t}\r\n }\r\n }",
"public void acionarInadimplencia(CestaGarantiasDO cesta);",
"public void cambieSentido() {\n\t\tsentidoLR=(!sentidoLR);\n\t}",
"public void pagarSaidaDaPrisao() throws Exception {\n if (listaJogadoresNaPrisao.contains(listaJogadores.get(jogadorAtual()).getNome())) {\n listaJogadoresNaPrisao.remove(listaJogadores.get(jogadorAtual()).getNome());\n listaJogadores.get(jogadorAtual()).setTentativasSairDaPrisao(0);\n listaJogadores.get(jogadorAtual()).retirarDinheiro(50);\n\n } else {\n print(\"\\tTentou tirar \" + listaJogadores.get(jogadorAtual()).getNome());\n throw new Exception(\"player is not on jail\");\n }\n\n this.pagouPrisaoRecentemente = false;\n }",
"private boolean setPermessiPrivacy(HttpServletRequest request, HttpServletResponse response,\r\n String utente) {\r\n Gruppo g = new Gruppo();\r\n\r\n g.setRuolo(utente);\r\n if (request.getParameter((\"radio\").concat(utente)) != null\r\n && request.getParameter((\"radio\").concat(utente)).equals(\"conFirma\".concat(utente))) {\r\n if (!conFirma.getGruppi().contains(g)) {\r\n conFirma.getGruppi().add(g);\r\n noFeedback.getGruppi().remove(g);\r\n anonimi.getGruppi().remove(g);\r\n }\r\n } else if (request.getParameter((\"radio\").concat(utente)) != null\r\n && request.getParameter((\"radio\").concat(utente)).equals(\"anonimi\".concat(utente))) {\r\n if (!anonimi.getGruppi().contains(g)) {\r\n anonimi.getGruppi().add(g);\r\n noFeedback.getGruppi().remove(g);\r\n conFirma.getGruppi().remove(g);\r\n }\r\n } else if (request.getParameter((\"radio\").concat(utente)) != null\r\n && request.getParameter((\"radio\").concat(utente)).equals(\"noFeedback\".concat(utente))) {\r\n if (!noFeedback.getGruppi().contains(g)) {\r\n noFeedback.getGruppi().add(g);\r\n anonimi.getGruppi().remove(g);\r\n conFirma.getGruppi().remove(g);\r\n }\r\n } else {\r\n return false;\r\n }\r\n return true;\r\n }",
"public void kill() {\r\n\t\t\tfor(Guerre war : aggresiveWar) {\r\n\t\t\t\twar.finalize();\r\n\t\t\t}\r\n\t\t\tfor(Guerre war : defensiveWar) {\r\n\t\t\t\twar.finalize();\r\n\t\t\t}\r\n\t\t\tfor(Case c : caseOwned) {\r\n\t\t\t\tc.liberate();\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(nom + \" n'a pas su s'adapter aux nombreux dangers environnants, l'Histoire oublie les faibles.\");\r\n\t\t\t\r\n\t\t\tfor(String str : saveStats()) System.out.println(str);\r\n\t\t\t//finalisation de la mort\r\n\t\t\tthis.die();\r\n\t\t\tSystem.out.println(\"Une civilisation c'est éteinte...\");\r\n\t\t\t//finalize(); //bloque la sauvegarde et case les relations avec les autres (du à la recherche de la civ par id dans l'arraylist\r\n\t\t}",
"public void removeGuest(Invitato in){\n AssegnamentiTavolo.remove(in);\n num_posti++;\n openAssignment();\n }",
"@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}",
"@Test\r\n public void CriterioUnidadNoCumple()\r\n {\r\n CriterioDeCorreccion criterio = new UnaDeCadaUnidadCriterioDeCorreccion();\r\n ExamenCorregido corregido = generarExamenCorregidoNoAprobado(criterio);\r\n \r\n assertFalse(criterio.cumple(corregido.getNotasPregunta()));\r\n assertEquals(corregido.getNota(), 0);\r\n }",
"@Override\r\n\tpublic boolean seLanceSurServiteurProprietaire() {\n\t\treturn false;\r\n\t}",
"@Override\n\tpublic void procesareMesajChat(MesajChat mesaj) {\n\t\tif(mesaj.getDestinatie(). isEmpty() || mesaj.getDestinatie().equals(\"@Everyoane\")) {\n\t\t\tif(this.next!=null)\n\t\t\t\tthis.next.procesareMesajChat(mesaj);\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//procesare mesaj privat\n\t\t\tSystem.out.println(String.format(\"Mesaj privat pentru %s = %s\",\n\t\t\t\t\tmesaj.getDestinatie(), mesaj.getContinut()));\n\t\t}\n\t}",
"@Override\n\tpublic boolean eliminaDipendente() {\n\t\treturn false;\n\t}",
"public boolean isAuMoinsUneCompetenceAutrefEstEnCoursDeModification() {\n\t\tboolean result = false;\n\t\tint i = 0;\n\t\twhile (!result && i < tosRepartFdpCompetencesAutres().count()) {\n\t\t\tEORepartFdpAutre repart = (EORepartFdpAutre) tosRepartFdpCompetencesAutres().objectAtIndex(i);\n\t\t\tif (repart.isEnCoursDeModification()) {\n\t\t\t\tresult = true;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn result;\n\t}",
"public IRecepteur quiEstEnDessous();",
"private void supprAffichage() {\n switch (afficheChoix) {\n case AFFICHE_SPOOL :\n ecranSpool.deleteContents();\n break;\n case AFFICHE_USER :\n ecranUser.deleteContents();\n break;\n case AFFICHE_CONFIG :\n ecranConfig.deleteContents();\n break;\n default: break;\n }\n afficheChoix = AFFICHE_RIEN;\n }",
"public void aumentarMinas(){\n\r\n if(espM==false){\r\n minascerca++;\r\n }\r\n }",
"public boolean disattiva_account()\n {\n boolean d=true;//variabile per disattivare l'account\n //già messa a true in quanto l'account viene attualmente usato\n int scelta;\n \n System.out.println(\"--Vuoi disattivare l'account?\\n[1] si [0] no\");\n scelta=input.nextInt();\n \n if(scelta==1)\n { \n d=false;\n System.out.println(\"--Attenzione account disattivato--\");\n }\n \n else if(scelta==0)\n { \n System.out.println(\"--Puoi usare ancora il tuo account--\");\n }\n \n else \n System.out.println(\"Impossibile eseguire l'operazione scelta\");\n \n return d;\n }",
"public void resign(){\n\t\tint turn = DBCommunicator.requestInt(\"SELECT id FROM beurt WHERE spel_id = \" + id + \" AND account_naam = '\" + app.getCurrentAccount().getUsername() + \"' ORDER BY id DESC\");\n\t\tturn += 2;\n\t\tint totalScore = DBCommunicator.requestInt(\"SELECT totaalscore FROM score WHERE spel_id = \" + id + \" AND account_naam = '\" + app.getCurrentAccount().getUsername() + \"'\");\n\t\ttotalScore = totalScore * -1;\n\t\tDBCommunicator.writeData(\"INSERT INTO beurt (id, spel_id, account_naam, score, aktie_type) VALUES(\" + turn + \", \" + id + \", '\" + app.getCurrentAccount().getUsername() + \"', \" + totalScore +\", 'Resign')\");\n\t\tfor(int e : gameStones){\n\t\t\tDBCommunicator.writeData(\"INSERT INTO letterbakjeletter (spel_id, letter_id, beurt_id) VALUES (\" + id + \", \" + e + \", \" + turn + \")\");\n\t\t}\n\t\tDBCommunicator.writeData(\"UPDATE spel SET toestand_type = 'Resigned' WHERE id = \" + id );\n\t\t\n\t\tint opTurn = turn + 1;\n\t\tint myTurn = opTurn + 1;\n\t\tDBCommunicator.writeData(\"INSERT INTO beurt (id, spel_id, account_naam, score, aktie_type) VALUES \"\n\t\t\t\t+ \"(\" + opTurn + \", \" + id + \", '\" + opponent + \"', 0, 'End'),\"\n\t\t\t\t+ \"(\" + myTurn + \", \" + id + \", '\" + app.getCurrentAccount().getUsername() + \"', 0, 'End')\");\n\t}",
"public void jouerUnTour(Personnage personnage) throws PersonnageHorsPlateauException, JoueurMortException {\n System.out.println(\"\\u001B[33mNouveau jeu!\");\n Random rand = new Random();\n int tour = 0;\n\n // size() permet d'obtenir le nombre d'éléments dans une liste\n\n while (position_personnage < plateau.size()) {\n tour++;\n //à chaque tour on lance le dés et on avance vers la case correspondante\n System.out.println(\"Tour: \" + tour + \": Position personnage: \" + position_personnage);\n int des = rand.nextInt(5) + 1; // simulation des\n System.out.println(\"Jeté de dés: \" + des);\n\n if (position_personnage + des <= plateau.size()) {\n //on choisit l'action à faire suivant l'instance que l'on trouve sur la case ou on est allé\n position_personnage += des;\n Case current_case = plateau.get(position_personnage - 1);\n if (current_case != null)\n {\n int new_position_personnage=current_case.interaction(personnage, position_personnage);\n if (new_position_personnage!=position_personnage) {\n position_personnage = new_position_personnage;\n System.out.println(\"Nouvelle position personnage: \"+position_personnage);\n }\n }\n else System.out.println(\"Case vide...\");\n\n } else throw new PersonnageHorsPlateauException();\n }\n\n }",
"public void reinitAff()\n\t{\n\t\tthis.gagne = false;\n\t\tthis.perdu = false;\n\t}",
"private void verificaUnicitaAccertamento() {\n\t\t\n\t\t//chiamo il servizio ricerca accertamento per chiave\n\t\tRicercaAccertamentoPerChiave request = model.creaRequestRicercaAccertamento();\n\t\tRicercaAccertamentoPerChiaveResponse response = movimentoGestioneService.ricercaAccertamentoPerChiave(request);\n\t\tlogServiceResponse(response);\n\t\t// Controllo gli errori\n\t\tif(response.hasErrori()) {\n\t\t\t//si sono verificati degli errori: esco.\n\t\t\taddErrori(response);\n\t\t} else {\n\t\t\t//non si sono verificatui errori, ma devo comunque controllare di aver trovato un accertamento su db\n\t\t\tcheckCondition(response.getAccertamento() != null, ErroreCore.ENTITA_NON_TROVATA.getErrore(\"Movimento Anno e numero\", \"L'impegno indicato\"));\n\t\t\tmodel.setAccertamento(response.getAccertamento());\n\t\t}\n\t}",
"public void removeAllAgents() {\n\t\tagents.clear();\n\t}",
"public void countNonSites(GenePred gene, boolean include_introns)\n {\n String dna_seq;\n if (include_introns)\n {\n int cds_start = gene.getCDSStart();\n int cds_end = gene.getCDSEnd();\n\n dna_seq = gene.getChrom().getSubstring(cds_start, cds_end);\n if (gene.isReverseStrand() == is_donor_site)\n {\n dna_seq = DNASequence.reverseComplement(dna_seq);\n }\n } else\n {\n dna_seq = gene.getSequenceCDS();\n if (!is_donor_site)\n dna_seq = DNASequence.reverseComplement(dna_seq);\n }\n\n int max_pos = dna_seq.length()-motif_intronic_length-motif_boundary_length;\n for (int pos=0; pos<max_pos; pos++)\n countSite(dna_seq, pos);\n \n// dna_seq = DNASequence.reverseComplement(dna_seq);\n// for (int pos=0; pos<max_pos; pos++)\n// countSite(dna_seq, pos);\n }",
"public void clearParticipation(ActionEvent e)\n {\n ArrayList joueurs = ((JoueursTableModel)sorter.getTableModel()).getJoueurs();\n for (Iterator iter = joueurs.iterator(); iter.hasNext();)\n {\n Joueur j = (Joueur) iter.next();\n j.setNbParticipation(0);\n }\n ((JoueursTableModel)sorter.getTableModel()).fireTableDataChanged();\n }",
"private void recolteNourriture() {\r\n\t\t\t//1pop recolte toute la case\r\n\t\t\tint tempNourr = 0;\r\n\t\t\tint totalPop = population + populationColoniale;\r\n\t\t\tint limite = (totalPop < caseOwned.size()) ? totalPop : caseOwned.size();\r\n\t\t\tfor(int id = 0; id < limite; id++) {\r\n\t\t\t\ttempNourr += caseOwned.get(id).getFood();\r\n\t\t\t}\r\n\t\t\t//animaux\r\n\t\t\ttempNourr += howManyAnimal(Animaux.Bétail) * 10; //Ca mange de l'herbe, ça se tente.\r\n\t\t\ttempNourr += howManyAnimal(Animaux.Cervidés) * 7.5; //CARIBOUUUUUUUUU !!\r\n\t\t\ttempNourr += howManyAnimal(Animaux.Crabe) * 2; //ca pique les pied, a mort!!\r\n\t\t\ttempNourr += howManyAnimal(Animaux.Elephants) * 30; //polution sonore\r\n\t\t\ttempNourr += howManyAnimal(Animaux.Moutons) * 5; //kébab landais\r\n\t\t\ttempNourr += howManyAnimal(Animaux.Poissons) * 5; //croustibat\r\n\t\t\ttempNourr += howManyAnimal(Animaux.Chevaux) * 7; //lasagnes\r\n\t\t\ttempNourr += howManyAnimal(Animaux.Baleines) * 50; //*bruit de baleine virile*\r\n\t\t\t//aplication des bonus\r\n\t\t\ttempNourr *= (1 + (0.15 * scienceLvl) + (0.05 * (bonheur - baseBonheur))); // +15% par scienceLvl +5% par bonheur excedentaire, -5% par bonheur négatif\r\n\t\t\t\r\n\t\t\tnourriture += tempNourr;\r\n\t\t\t//bonus de conservation grâce au sel\r\n\t\t\tif(howManyRessource(StrategicRessource.Sel) > 0 && nourriture > 0) nourriture *= 1.10;\r\n\t\t\t//limitation de stockage\r\n\t\t\tint stockageMax = caseOwned.size() * 100 * scienceLvl;\r\n\t\t\tif(nourriture > stockageMax) nourriture = stockageMax;\r\n\t\t}",
"private void deleteUnwantedFsnAcceptability(Concept c) throws TermServerScriptException {\n\t\tList<Description> fsns = c.getDescriptions(Acceptability.BOTH, DescriptionType.FSN, ActiveState.ACTIVE);\n\t\tif (fsns.size() != 1) {\n\t\t\tString msg = \"Concept has \" + fsns.size() + \" active fsns\";\n\t\t\treport(c, c.getFSNDescription(), Severity.HIGH, ReportActionType.VALIDATION_CHECK, msg);\n\t\t} else {\n\t\t\tString msg = \"[\" + fsns.get(0).getDescriptionId() + \"]: \";\n\t\t\tList<LangRefsetEntry> langRefEntries = fsns.get(0).getLangRefsetEntries(ActiveState.BOTH, US_ENG_LANG_REFSET);\n\t\t\tif (langRefEntries.size() != 1) {\n\t\t\t\tif (langRefEntries.size() == 2) {\n\t\t\t\t\tList<LangRefsetEntry> uslangRefEntries = fsns.get(0).getLangRefsetEntries(ActiveState.BOTH, refsets, SCTID_US_MODULE);\n\t\t\t\t\tList<LangRefsetEntry> corelangRefEntries = fsns.get(0).getLangRefsetEntries(ActiveState.BOTH, refsets, SCTID_CORE_MODULE);\n\t\t\t\t\tif (uslangRefEntries.size() > 1 || corelangRefEntries.size() >1) {\n\t\t\t\t\t\tmsg += \"Two acceptabilities in the same module\";\n\t\t\t\t\t\treport(c, c.getFSNDescription(), Severity.HIGH, ReportActionType.VALIDATION_CHECK, msg);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!uslangRefEntries.get(0).isActive() && corelangRefEntries.get(0).isActive() ) {\n\t\t\t\t\t\t\tlong usET = Long.parseLong(uslangRefEntries.get(0).getEffectiveTime());\n\t\t\t\t\t\t\tlong coreET = Long.parseLong(corelangRefEntries.get(0).getEffectiveTime());\n\t\t\t\t\t\t\tmsg += \"US langrefset entry inactivated \" + (usET > coreET ? \"after\":\"before\") + \" core row activated - \" + usET;\n\t\t\t\t\t\t\treport(c, c.getFSNDescription(), Severity.HIGH, ReportActionType.VALIDATION_CHECK, msg);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//If the US inactivated AFTER the core activated, then this is the case we need to fix\n\t\t\t\t\t\t\tuslangRefEntries.get(0).delete(deletionEffectiveTime);\n\t\t\t\t\t\t\tString action = \"Deleted US FSN LangRefset entry\";\n\t\t\t\t\t\t\treport(c, c.getFSNDescription(), Severity.MEDIUM, ReportActionType.DESCRIPTION_CHANGE_MADE, action);\n\t\t\t\t\t\t\tc.setModified();\n\t\t\t\t\t\t} if (uslangRefEntries.get(0).isActive() && corelangRefEntries.get(0).isActive() ) {\n\t\t\t\t\t\t\tmsg += \"Both US and Core module lang refset entries are inactive\";\n\t\t\t\t\t\t\treport(c, c.getFSNDescription(), Severity.LOW, ReportActionType.VALIDATION_CHECK, msg);\n\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmsg += \"Unexpected configuration of us and core lang refset entries\";\n\t\t\t\t\t\t\treport(c, c.getFSNDescription(), Severity.HIGH, ReportActionType.VALIDATION_CHECK, msg);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmsg += \"FSN has \" + langRefEntries.size() + \" US acceptability values.\";\n\t\t\t\t\treport(c, c.getFSNDescription(), Severity.HIGH, ReportActionType.VALIDATION_CHECK, msg);\n\t\t\t\t}\n\t\t\t} else if (!langRefEntries.get(0).getAcceptabilityId().equals(SCTID_PREFERRED_TERM)) {\n\t\t\t\tmsg += \"FSN has an acceptability that is not Preferred.\";\n\t\t\t\treport(c, c.getFSNDescription(), Severity.HIGH, ReportActionType.VALIDATION_CHECK, msg);\n\t\t\t} else if (!langRefEntries.get(0).isActive()) {\n\t\t\t\tmsg += \"FSN's US acceptability is inactive.\";\n\t\t\t\treport(c, c.getFSNDescription(), Severity.HIGH, ReportActionType.VALIDATION_CHECK, msg);\n\t\t\t}\n\t\t}\n\t}",
"public static void jouerAuJustePrix() {\n\t\tint nbVies=Tools.inputInt(\"Combien de tentatives voulez-vous ? \");\n\t\tint limite=Tools.inputInt(\"Quel est le nombre maximum à prendre en compte?\");\n\t\tint nbATrouver=Tools.randomint(limite);\n\t\tint nbPropose;\n\t\t\n\t\twhile (nbVies>0){\n\t\t\tnbPropose=Tools.inputInt(\"Saisissez un nombre : \");\n\t\t\tif (afficherResultatProposition(nbPropose, nbATrouver)) {\n\t\t\t\tbreak;\n\t\t\t};\n\t\t\tnbVies=nbVies-1;\n\t\t}\n\t\t\n\t\tif (nbVies==0) {\n\t\t\tSystem.out.println(\"Game Over\");\n\t\t}\n\t}",
"void negarAnalise();",
"public void diminuiInSitu(){\n if(quantidade_in_situ>0)\n quantidade_in_situ--;\n else\n return;\n }",
"public void NopagaImpuestos(){\n\t\tif(sueldoBruto<BASE_MINIMA_IMPUESTOS){\n\t\tsueldoNeto=sueldoBruto;\n\t\ttipoImpuesto=\"En esta ocasión no paga impuestos\";\n\t\t}\n\t}",
"private boolean setPermessiRicevuti(HttpServletRequest request, HttpServletResponse response,\r\n String utente) {\r\n Gruppo g = new Gruppo();\r\n\r\n g.setRuolo(utente);\r\n if (request.getParameter((\"checkbox\").concat(utente)).equals(\"true\")) {\r\n if (!ricevuti.getGruppi().contains(g)) {\r\n ricevuti.getGruppi().add(g);\r\n }\r\n } else if (request.getParameter((\"checkbox\").concat(utente)).equals(\"false\")) {\r\n ricevuti.getGruppi().remove(g);\r\n } else {\r\n return false;\r\n }\r\n return true;\r\n }",
"public void reset() {\n tpsAttentePerso = 0;\n tpsAttentePerso2 =0;\n \ttotalTime = 0;\n\tnbVisited = 0;\n moyenne =0;\n }",
"private void suppressionCartes () {\r\n\t\tfor (int i = 0; i < 5; i++) {\r\n\t\t\tcartes.put(i, new JVide(carte_lg, carte_ht));\r\n\t\t}\r\n\t\tthis.formerTable();\r\n\t}",
"public void restarPunto ( ) {\n\t\tif ( vida > 0 )\n\t\t\tvida--;\n\t}",
"public void aggiungiPecoraCasualmente() {\n\t\tif (((int) (Math.random() * 3)) >= 1) {\n\t\t\tPecoraAdulta nuovaPecoraAdulta = new PecoraAdulta();\n\t\t\tpecore.add(nuovaPecoraAdulta);\n\t\t\tif (nuovaPecoraAdulta.isMaschio())\n\t\t\t\tnumMontoni++;\n\t\t\telse\n\t\t\t\tnumPecoreFemmine++;\n\t\t} else {\n\t\t\tpecore.add(new Agnello());\n\t\t\tnumeroAgelli++;\n\t\t}\n\t}",
"private void cruzarGenesMonopunto(Cromosoma padre, Cromosoma madre) {\n\t\t//obtenemos el punto de cruce\n\t\tint longCromosoma = this.poblacion[0].getLongitudCrom();\n\t\tint puntoCruce = (int) (Math.random() * longCromosoma) + 1;\n\t\t\n\t\tboolean[] infoPadre = padre.getCromosoma();\n\t\tboolean[] infoMadre = madre.getCromosoma();\n\t\tboolean aux;\n\t\tfor(int i = puntoCruce; i < longCromosoma; i++) {\n\t\t\t\n\t\t\taux = infoPadre[i];\n\t\t\tinfoPadre[i] = infoMadre[i];\n\t\t\tinfoMadre[i] = aux;\n\t\t\t\n\t\t}\n\t\tpadre.setCromosoma(infoPadre);\n\t\tmadre.setCromosoma(infoMadre);\n\t\t\n\t}",
"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}",
"public Node passAgent(){\n int length = liveNeighbors.size();\n Random rnd = new Random();\n boolean stat = false;\n Node node=null;\n while(!stat) {\n int len = rnd.nextInt(length);\n node = liveNeighbors.get(len);\n stat = node.recieveAgent(agent);\n }\n agent = null;\n updateScreen(\"removeBorder\");\n return node;\n }",
"public void unblock(){ \n blocked = false;\n blockedMssg = \"\";\n\n // update todos los votos como colectivo\n for (Collective c: memberCollectives) c.updateFamilyVotes();\n\n // update todos los votos como usuario\n for (Project p: getVotedProjects()) p.updateVotes();\n }",
"public void consulterBoiteVocale() {\n for (int i = 0; i < this.boiteVocale.getListeMessagesVocaux().size(); i++) {\n //on passe l'attribut consulte à true pour savoir qu'il a été vu pour la facturation\n this.boiteVocale.getListeMessagesVocaux().get(i).setConsulte(true);\n }\n }",
"public boolean mueveVictima(String idAgente,Coordenada coord){\n\t\treturn mueveAgente(idAgente,coord,\"Miner\");\n\t}",
"public void removeAgent() {agent = null;}",
"private void eliminateDay() {\r\n\tdayElimTimer.cancel();\r\n\tdayElimTimer.purge();\r\n\r\n\t// playerIDs.remove(playerOnTrialID);\r\n\tplayers.remove(playerOnTrialID);\r\n\r\n\tif (mafia.contains(playerOnTrialID)) {\r\n\t int index = mafia.indexOf(playerOnTrialID);\r\n\t mafia.remove(index);\r\n\r\n\t} else {\r\n\t int index = innocentIDs.indexOf(playerOnTrialID);\r\n\t innocentIDs.remove(index);\r\n\t}\r\n\r\n\tserver.setPlayerMuted(playerOnTrialID, true);\r\n\r\n\tserver.publicMessage(server.getUsername(playerOnTrialID) + \" has been eliminated\");\r\n\r\n\tplayerOnTrialID = null;\r\n\telimDay.clear();\r\n\tsave.clear();\r\n\telimDayVoteInProgress = false;\r\n\r\n\tcheckWin();\r\n }",
"@Override\n\tpublic void acceptSession(int id, String agent) {\n\t\t\n\t}",
"public void act() \r\n {\r\n // Add your action code here.\r\n espacio esp=(espacio)getWorld();\r\n Actor act=getOneIntersectingObject(nave.class);//Cuando la nave tome el poder \r\n if(act!=null)\r\n {\r\n for(int i=1;i<=10;i++)//incrementa el poder mediante el metodo solo 1s disparos\r\n esp.poder.incrementar();\r\n getWorld().removeObject(this);\r\n Greenfoot.playSound(\"Poder.wav\");\r\n }\r\n \r\n }",
"public void visit(Personnes p) {\n pers = p;\n tpsAttentePerso = p.getTpsAttente();\n tpsAttentePerso2 = p.getTpsArrive();\n totalTime += tpsAttentePerso;\n\tnbVisited += 1;\n moyenne = totalTime/nbVisited; \n }",
"@Before\n\tpublic void incoporacionDeCandidatosYProvinciasHabilitadasALaJuntaElectoral(){\n\t\tmendoza.agregarPartido(pro);\n\t\tbuenosaires.agregarPartido(pro);\n\t\trionegro.agregarPartido(pro);\n\t\tentrerios.agregarPartido(pro);\n\t\tmendoza.agregarPartido(renovador);\n\t\tbuenosaires.agregarPartido(renovador);\n\t\trionegro.agregarPartido(renovador);\n\t\tentrerios.agregarPartido(renovador);\n\t\tmendoza.agregarPartido(fpv);\n\t\tbuenosaires.agregarPartido(fpv);\n\t\trionegro.agregarPartido(fpv);\n\t\tentrerios.agregarPartido(fpv);\n\n\t\t//Incorporacion de los candidatos habilitados al centro de computos\n\t\tjuntaElectoral.agregarCandidato(macri);\t\t\n\t\tjuntaElectoral.agregarCandidato(massa);\t\t\n\t\tjuntaElectoral.agregarCandidato(scioli);\n\n\t\t//Incorporacion de las provincias habilitadas al centro de computos\n\t\tjuntaElectoral.agregarProvincia(mendoza);\n\t\tjuntaElectoral.agregarProvincia(buenosaires);\n\t\tjuntaElectoral.agregarProvincia(rionegro);\n\t\tjuntaElectoral.agregarProvincia(entrerios);\n\t}",
"@Override\n public List<IEpisode> prune(List<IEpisode> candidates, IObserver observer, \n SessionInfo session)\n {\n if (DEBUG) { \n System.out.println(\"NegativeStrengthThreshold: pruning episodes base on individual predictions\");\n System.out.println(\"NegativeStrengthThreshold: start count ->\" + candidates.size());\n } \n observer.setExtent( candidates.size() );\n observer.startup();\n IEventDataStream sequence = session.getSequence();\n for (ListIterator<IEpisode> li = candidates.listIterator(); li.hasNext(); ) \n {\n IEpisode episode = li.next();\n if (episode.size() == 1) return candidates;\n \n if (DEBUG)\n {\n System.out.println(episode.toString(sequence.getEventFactor()) + \n \" : \" + episode.getVoteString() + \" < \" + episode.getRequiredVoteString());\n }\n \n boolean flag = false;\n for(int index = 0; index < session.getSegIndexLen(); index++)\n {\n if (episode.getVotes(index) > episode.getRequiredVotes(index))\n {\n flag = true;\n break;\n }\n }\n if (flag)\n {\n li.remove();\n }\n if (observer.update(li.nextIndex())) break;\n }\n observer.shutdown();\n if (DEBUG) System.out.println(\"NegativeStrengthThreshold: final count ->\" + candidates.size());\n return candidates;\n }",
"public void AumentarVictorias() {\r\n\t\tthis.victorias_actuales++;\r\n\t\tif (this.victorias_actuales >= 9) {\r\n\t\t\tthis.TituloNobiliario = 3;\r\n\t\t} else if (this.victorias_actuales >= 6) {\r\n\t\t\tthis.TituloNobiliario = 2;\r\n\t\t} else if (this.victorias_actuales >= 3) {\r\n\t\t\tthis.TituloNobiliario = 1;\r\n\t\t} else {\r\n\t\t\tthis.TituloNobiliario = 0;\r\n\t\t}\r\n\t}",
"@Override\n public void deleteAllConnectathonParticipantsForSession() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"deleteAllConnectathonParticipantsForSession\");\n }\n\n for (ConnectathonParticipant cp : connectathonParticipantsDataModel().getAllItems(FacesContext.getCurrentInstance())) {\n ConnectathonParticipant cpToDelete = entityManager.find(ConnectathonParticipant.class, cp.getId());\n try {\n\n entityManager.remove(cpToDelete);\n entityManager.flush();\n\n } catch (Exception e) {\n\n StatusMessages.instance().addFromResourceBundle(StatusMessage.Severity.ERROR,\n \"gazelle.users.connectaton.participants.CannotDeleteParticipant\", cp.getFirstname(),\n cp.getLastname(), cp.getEmail());\n }\n }\n FinancialCalc.updateInvoiceIfPossible(choosenInstitutionForAdmin, TestingSession.getSelectedTestingSession(),\n entityManager);\n }",
"public List<Etudiant> etudiantAdmis() {\n\t\t\r\n\tList<Etudiant> liste = new ArrayList<Etudiant>();\r\n\t\tList<Etudiant> listetuds = dao.afficher();\r\n\t\tfor(Etudiant et : listetuds) {\r\n\t\t\tif(dao.getMoyenneGenerale(et.getIdPersonne())>=10){\r\n\t\t\t\tliste.add(et);\r\n\t\t\t} \r\n\r\n\t\t\treturn liste;\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"public void nouveau(){\r\n try {\r\n viewEtudiantInscripEcheance = new ViewEtudiantInscriptionEcheance();\r\n echeance_etudiant = new EcoEcheanceEtudiant(); \r\n \r\n } catch (Exception e) {\r\n System.err.println(\"Erreur capturée : \"+e);\r\n }\r\n }",
"private String SuppressionMot(String Mot, String Texte) throws InterruptedException {\n\t\tboolean trouve = false;\n\t\tString newCh =\"\";\n\t\tint i =0;\n\t\tif(Texte.equalsIgnoreCase(Mot)) { \t// Recherche dans le message si le mot est présent. \n\t\t\tnewCh=Texte.replaceAll(Mot, \"**\");\t// Remplace le mot par un espace. \n\t\t\ttrouve= true;\n\t\t} else {\n\t\t\tnewCh = Texte;\t//Sinon, on remplace la nouvelle chaîne de caractères par l'ancienne. \n\t\t}\n\t\treturn newCh;\t//Retourne la nouvelle chaîne de caractère modifiée ou pas. \n\t}",
"public void quitarParticipante(UsuarioDeLista echado){\r\n\t\ttry {\r\n\t\t\tthis.participantes.remove(echado);\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());//Seria mejor poner un messagebox.\r\n\t\t}\r\n\t\t\r\n\t}",
"public void diminueVies() {\n\n nbVies_restantes.set(nbVies_restantes.get()-1);\n\n }",
"@Override\n public synchronized void demarrer(){\n if(modele.getQuiterJeu()){return;}\n modele.getMoteurJeu().setEtapeJeu(this);\n // apercu dans le termial pour debuger\n System.out.println(\"-----------------nom joueur: \"+modele.getJoueurCourant().getNom());\n System.out.print(\" humain: \"+modele.getJoueurCourant().estHumain());\n System.out.print(\" stand: \"+modele.getJoueurCourant().getMainCourant().getStand());\n System.out.print(\" perdu: \"+modele.getJoueurCourant().getMainCourant().estPerdu());\n System.out.print(\" blackjack: \"+modele.getJoueurCourant().getMainCourant().estBlackJack());\n System.out.println(\" jeu: \"+modele.getJoueurCourant().getMainCourant().getJeu().toString());\n //-------------------------------------------------\n // On ne fait pas une boucle ici pour que l'observer\n // puisse acceder a son observé et se mettre a jour\n //-------------------------------------------------\n new Thread(){\n @Override\n public void run() {\n try {\n // si plus de carte\n if(modele.getPioche().getCartes().size() < 1){\n for(Carte carte:modele.getDefausse().getCartes()){\n carte.setFaceCarte(Face.VERSO);\n modele.getPioche().ajouterDessous(carte);\n }\n modele.getDefausse().vider();\n modele.getPioche().melanger();\n }\n \n \n // si il peut plus jouer\n if(modele.getJoueurCourant().getMainCourant().estBlackJack() || modele.getJoueurCourant().getMainCourant().estPerdu() \n || modele.getJoueurCourant().getMainCourant().getStand() || modele.getJoueurCourant().getMainCourant().est21()\n || modele.getJoueurCourant().getMainCourant().getAAbandonner() || modele.getJoueurCourant().getAPerduJeu()){\n \n // si le joueur a une autre main\n if(modele.getJoueurCourant().mainSuivant()){\n Thread.sleep(2000);\n demarrer();\n \n }\n // sinon si il y a un joueur suivant on fait joueur suivant\n else if(modele.joueurSuivant()){\n Thread.sleep(2000);\n demarrer();\n }else{\n modele.getMoteurJeu().setEtapeJeu(etapeSuivant);\n Thread.sleep(2000);\n modele.setMessage(modele.getCroupier().getNom()+\" plays\");\n // on affiche les carte du croupier\n for(Carte carte: modele.getCroupier().getMainCourant().getJeu().getCartes()){\n carte.setFaceCarte(Face.RECTO);\n }\n System.out.println(\"+++++++++++++++++++++++++++++++++++++++++++++++++\");\n Thread.sleep(3000);\n demarrerEtapeSuivant();\n\n }\n\n }\n // sinon\n else{\n modele.setMessage(modele.getJoueurCourant().getNom()+\" plays\");\n if(!modele.getJoueurCourant().estHumain()){\n modele.getJoueurCourant().jouer(modele.getPioche(),modele.getDefausse());\n Thread.sleep(3000);\n demarrer();\n }\n \n\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }.start();\n \n }",
"public void verVerPermisos(Permiso permisocandidat)\r\n\t{\r\n\t\tverpermisos = new VerPermisos(this, permisocandidat);\r\n\t\tverpermisos.setVisible(true);\r\n\t}",
"private void validaCheckoutDestaqueDoAnuncio() {\n\t\tHttpServletRequest req = cmsUtilsIliketoo.getMyrequest().getRequest();\n\t\tif(req.getRequestURI().contains(\"CheckoutFeatured\")){\n\t\t\t//operacao de checkout para comprar destaque de anuncios\n\t\t\tDB db = (DB) req.getAttribute(Str.CONNECTION_DB);\n\t\t\tString idAnuncio = req.getParameter(\"id_announce\");\n\t\t\tif(idAnuncio != null && !idAnuncio.isEmpty()){\n\t\t\t\tAnnounce anuncio = (Announce) new AnnounceDAO(db, req).readById(idAnuncio, Announce.class);\n\t\t\t\tif(anuncio != null){\n\t\t\t\t\treq.getSession().setAttribute(\"anuncioDestaqueCheckout\", anuncio);\n\t\t\t\t\tlog.info(\"Servlet Paypal Novo Checkout para anuncio - Processo de compra de destaque do anuncio... idAnuncio=\" + idAnuncio);\n\t\t\t\t}else{\n\t\t\t\t\tlog.info(\"Servlet Paypal Novo Checkout para destaque de anuncios - registro do anuncio nao encontrado no bd... idAnuncio=\" + idAnuncio);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void donnerArtefact() {\r\n\t\tZone z = j.getZone();\r\n\t\tif (z.getElement() == modele.Element.Neutre) {\r\n\t\t\tSystem.out.println(\"Cette zone ne contient pas d'artefact !\");\r\n\t\t}\r\n\t\tif (this.clefsMinimum <= j.combienCles(z.getElement())) {\r\n\t\t\tj.recupereObjet(new Artefact(z.getElement()));\r\n\t\t\tj.enleveCles(new Clef(z.getElement()), clefsMinimum);\r\n\t\t\t\r\n\t\t\tthis.incrNbAction();\r\n\t\t\tthis.notifyObservers();\r\n\t\t\tj.getIle().notifyObservers(); // Pour l'affichage d'inventaire.\r\n\t\t}\r\n\t}",
"public void subirNivelAtaque(){\n\tif(contadorNivel==5){\n\t nivelAtaque++;\n\t System.out.println(\"El ataque \"+obtenerNombreAtaque()+\" ha subido de nivel\");\n\t contadorNivel=0;\n\t dano+=5;\n\t} else {\n\t nivelAtaque=nivelAtaque;\n\t}\n }",
"private void clearSeenAToServer() {\n if (reqCase_ == 15) {\n reqCase_ = 0;\n req_ = null;\n }\n }",
"private boolean noVacancy() {\r\n\t\t\treturn removed = false;\r\n\t\t}",
"public interface IRecepteur {\n\t\n\t\n\t/**\n\t * Methode permettant de recevoir un porcelet\n\t * @param p le porcelet \n\t */\n\tpublic void recevoir(IPorcelet p);\n\t\n\t/**\n\t * Methode permettant d'acceder au porcelet en dessous\n\t * @return le porcelet en dessous : Null si c'est une case, un porcelet sinon\n\t */\n\tpublic IRecepteur quiEstEnDessous();\n\t\n\t/** \n\t * Methode qui retourne la case sur laquelle se trouve le porcelet\n\t * renvoie null si le recepteur est une case\n\t **/\n\tpublic ICase retourneLaCase() ;\n\t\n\t/**\n\t * Methode permettant d'acceder au porcelet au dessus\n\t * @return le porcelet au dessus : Null si il n'y a personne, un porcelet sinon\n\t */\n\tpublic IRecepteur quiEstAuDessus();\n\t\n\t/** \n\t * Predicat pour tester si le porcelet occupe la case\n\t **/\n\tpublic boolean estSurLaCase(ICase c) ;\n\t\n\t/**\n\t * Methode utilisee uniquement pour les porcelets\n\t * @return le joueur proprietaire du porcelet\n\t */\n\tpublic IJoueur quiEstMonMaitre();\n\n}",
"public void disconnetti() {\n\t\tconnesso = false;\n\t}",
"public void NPSShot()\n\t{\n\t\t//can only occur if a friendly missile and \n\t\t//a NPS are spawned\n\t\tif(gameObj[2].size() > 0 && gameObj[4].size() > 0)\n\t\t{\n\t\t\tint nps = new Random().nextInt(gameObj[2].size());\n\t\t\tint mis = new Random().nextInt(gameObj[4].size());\n\t\t\tgameObj[2].remove(nps);\n\t\t\tgameObj[4].remove(mis);\n\t\t\tscore += 500;\n\t\t\tSystem.out.println(\"A player misile has struck a NPS! +500 points\");\n\t\t}else\n\t\t\tSystem.out.println(\"An NPS and a friendly missile are not spawned\");\n\t}",
"public static void traduitSiteAllemand() {\n\t\t\n\t}",
"int isProduitFormateUniteUniqueInPointvente(ProduitFormate produitFormate, Uniteproduit uniteproduit);",
"public void activeRegraJogadaDupla() {\n this.RegraJogadaDupla = true;\n }",
"@Override\n\tpublic void jogavel(Participante p) {\n\t\t\n\t}",
"public void supprimerParcelle() {\n\t\tboolean isEmpty=false;\n\t\tint nbParcelleSup=0;\n\t\tList<String> nomParcellesNonSupprimees = new ArrayList<>();\n\t\tList<String> nomParcellesSupprimees = new ArrayList<>();\n\n\t\tfor (String emplacement : emplacementsSelectionneesFromJS.split(\"-\")) {\n\t\t\tnbParcelleSup++;\n\n\t\t\tif (!isEmpty(emplacement)){\n\t\t\t\tString[] refEmplacement= emplacement.split(\"_\");\n\t\t\t\tint numLigne = Integer.parseInt(refEmplacement[0]);\n\t\t\t\tint numColonne = Integer.parseInt(refEmplacement[1]);\n\t\t\t\tEmplacement e = obtenirEmplacement(numLigne,numColonne);\n\n\t\t\t\tif(e != null && notHaveTachePlanified(parcelle).equals(\"true\") ) {\n\t\t\t\t\t// Suppression de la parcelle \n\t\t\t\t\tthis.parcelle = e.getParcelle();\n\t\t\t\t\taffecterDateRetraitPuisMAJParcelleEnBase(parcelle);\n\t\t\t\t\tnomParcellesSupprimees.add(parcelle.getLibelleParcelle());\n\t\t\t\t\tSystem.out.println(\"Supprimer Parcelle OK \");\n\t\t\t\t}else {\n\t\t\t\t\tnomParcellesNonSupprimees.add(parcelle.getLibelleParcelle());\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\t//Probleme de selection d'emplacement\n\t\t\t\tisEmpty=true;\n\t\t\t}\n\t\t}\n\n\t\tif(isEmpty&&nbParcelleSup==1) {\n\t\t\tmsgInfoActionGrilleJS=\"Erreur : La selection ne correspond à aucune parcelle !\";\n\t\t\tetatMsgInfoGrilleJS=\"color:red;\";\n\t\t\tSystem.out.println(\"Supprimer Parcelle KO : L'emplacement selectionnee n'est pas affecté à une parcelle \");\n\t\t}else {\n\t\t\tif(nbParcelleSup>1) {\n\t\t\t\tString listeLibelleParcellesSupprimees=\"\";\n\t\t\t\tString listeLibelleParcellesNonSupprimees=\"\";\n\n\t\t\t\tfor (String string : nomParcellesSupprimees) {\n\t\t\t\t\tlisteLibelleParcellesSupprimees+=string+\", \";\n\t\t\t\t}\n\t\t\t\tfor (String string : nomParcellesNonSupprimees) {\n\t\t\t\t\tlisteLibelleParcellesNonSupprimees+=string+\", \";\n\t\t\t\t}\n\t\t\t\tif(listeLibelleParcellesSupprimees.length()>0) {\n\t\t\t\t\tint i = listeLibelleParcellesSupprimees.length()-2;\n\t\t\t\t\tmsgInfoActionGrilleJS=\"Les parcelles ' \"+listeLibelleParcellesSupprimees.substring(0, i)+\" ' ont bien été retirées !\";\n\t\t\t\t}\n\t\t\t\tif(listeLibelleParcellesNonSupprimees.length()>0) {\n\t\t\t\t\tint j = listeLibelleParcellesNonSupprimees.length()-2;\n\n\t\t\t\t\tmsgInfoActionGrilleJS=\"\\n Attention : Les parcelles ' \"+listeLibelleParcellesNonSupprimees.substring(0, j)+\" ' n'ont pas pu être supprimées (Taches en cours ou emplamcement vide)!\";\n\t\t\t\t}\n\n\t\t\t}else {\n\t\t\t\tmsgInfoActionGrilleJS=\"La parcelle '\"+parcelle.getLibelleParcelle()+\"'a bien été retirée !\";\n\t\t\t}\n\t\t\tetatMsgInfoGrilleJS=\"color:green;\";\n\t\t}\n\t\tthis.clearForm();\n\t}",
"public void resetearContadores() {\n\t\treproducciones = 0;\n\t\tsuper.resetearreproducidas();\n\t}",
"public void Pedircarnet() {\n\t\tSystem.out.println(\"solicitar carnet para verificar si es cliente de ese consultorio\");\r\n\t}",
"public final void nonRedefinissableParEnfant(){\n\n }"
]
| [
"0.55850947",
"0.5294051",
"0.528722",
"0.5280719",
"0.5252003",
"0.5207434",
"0.5178379",
"0.51740056",
"0.51735705",
"0.51657265",
"0.513529",
"0.50925833",
"0.5060659",
"0.5055187",
"0.50323683",
"0.50285095",
"0.5024063",
"0.5010083",
"0.49891162",
"0.4981563",
"0.49690205",
"0.49645612",
"0.49581707",
"0.49539548",
"0.4952596",
"0.49512452",
"0.4944733",
"0.49208373",
"0.4918923",
"0.48979372",
"0.4877583",
"0.486316",
"0.48611155",
"0.48492667",
"0.48323542",
"0.48084792",
"0.48035717",
"0.48035508",
"0.47971576",
"0.47902572",
"0.47900382",
"0.4788245",
"0.47753742",
"0.4774879",
"0.4773369",
"0.47669113",
"0.4765551",
"0.47582427",
"0.47549358",
"0.47547665",
"0.47542882",
"0.47391382",
"0.47338623",
"0.4731746",
"0.47259426",
"0.47245902",
"0.4724325",
"0.4718564",
"0.47159156",
"0.47111025",
"0.47087306",
"0.47045344",
"0.47010854",
"0.46923584",
"0.46852738",
"0.46808612",
"0.46633103",
"0.46617442",
"0.4661069",
"0.46600342",
"0.4658694",
"0.465649",
"0.4654354",
"0.46514997",
"0.46490112",
"0.4647241",
"0.46447",
"0.46442184",
"0.46415085",
"0.46411026",
"0.4638524",
"0.46312413",
"0.4630469",
"0.4630276",
"0.46300066",
"0.46241924",
"0.4619949",
"0.4616051",
"0.46148992",
"0.46128675",
"0.4612097",
"0.4605587",
"0.46055838",
"0.46018648",
"0.4601679",
"0.45989418",
"0.459793",
"0.45968872",
"0.45967358",
"0.4590507"
]
| 0.50951767 | 11 |
soumission des candidatures de l'agent comme apprenant | public void postulerApprenant(List<Session> list) {// OK
for (Session session : list) {
String valID = String.valueOf(session.getId());
String prio = String.valueOf(session.getPrio());
service.path(idConnexion + "/submit").queryParam("role", "Apprenant").queryParam("session", valID)
.queryParam("prio", prio);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 }",
"public void aumentarAciertos() {\r\n this.aciertos += 1;\r\n this.intentos += 1; \r\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 comprobarActividades(List<DetectedActivity> actividadesProvables){\n for( DetectedActivity activity : actividadesProvables) {\n //preguntamos por el tipo\n switch( activity.getType() ) {\n case DetectedActivity.IN_VEHICLE: {\n //preguntamos por la provabilidad de que sea esa actividad\n //si es mayor de 75 (de cien) mostramos un mensaje\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"En vehiculo\");\n }\n break;\n }\n case DetectedActivity.ON_BICYCLE: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"En bici\");\n }\n break;\n }\n case DetectedActivity.ON_FOOT: {\n //este lo dejamos vacio por que va implicito en correr y andar\n break;\n }\n case DetectedActivity.RUNNING: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"Corriendo\");\n }\n break;\n }\n case DetectedActivity.WALKING: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"Andando\");\n }\n break;\n }\n case DetectedActivity.STILL: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"Quieto\");\n }\n break;\n }\n case DetectedActivity.TILTING: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"Tumbado\");\n }\n break;\n }\n\n case DetectedActivity.UNKNOWN: {\n //si es desconocida no decimos nada\n break;\n }\n }\n }\n }",
"private void suono(int idGioc) {\n\t\tpartita.effettoCasella(idGioc);\n\t}",
"public Personnage attaqueSurPersonnage() {\n\t\tdouble rand = Math.random();\n\t\t\tif (rand >= 0.85){\n\t\t\t\tfrappeMonstre = monstre.getCaracter().getForce() * 2;\n\t\t\t\tjoueur.setDiminutionPV(frappeMonstre);\n\t\t\t\tsetVictimeKO(joueur);\n\t\t\t\tetatAttaque = 'C';\n\t\t\t\treturn joueur;\n\t\t\t}\n\t\t\telse if ((rand < 0.85) && (rand >= 0.15)){\n\t\t\t\tfrappeMonstre = monstre.getCaracter().getForce();\n\t\t\t\tjoueur.setDiminutionPV(frappeMonstre);\n\t\t\t\tsetVictimeKO(joueur);\n\t\t\t\tetatAttaque = 'N';\n\t\t\t\treturn joueur;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tetatAttaque = 'F';\n\t\t\t\tfrappeMonstre = 0;\n\t\t\t\treturn joueur;\n\t\t\t}\n\t\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}",
"@Override\n public void interagit() {\n super.interagit();\n ArrayList<EtreVivant> cibles = this.ciblesPotentiellesAdjacentes(this.getPosition(),this.nombreVoisins);\n cibles.stream().filter((vivants) -> (vivants.getEtat().equals(EtatEtreVivant.MALADE))).forEach((vivants) -> {\n this.soigne(vivants);\n });\n }",
"public void attaque(Personnage p,int x, int y, int xApres, int yApres, Case[][] tableauIle, Affichage affichage, int equipe){\n\t\tRandom random=new Random();\n\t\tif (this.getObjetInventaire(\"Epee\")){\n\t\t\t//il fait plus de dommage s'il a une epee\t\n\t\t\tint degat=5*random.nextInt(7);\n\t\t\tif(!p.perteEnergie(degat, xApres, yApres, tableauIle, true, false, affichage, equipe)){\n\t\t\t\t//Verifie que le personnage ne meurt pas de la perte d'energie\n\t\t\t\taffichage.popUp(equipe,\"Vous avez inflige \"+degat+\" points de degats a votre cible\", \"ATTAQUE\" );\n\t\t\t}else{\n\t\t\t\taffichage.popUp(equipe,\"Vous avez reussi a tuer votre cible\", \"ATTAQUE\" );\n\t\t\t}\n\t\t}else{\n\t\t\t//fait moins de dommage comme le guerrier se bat avec ses poings\t\n\t\t\tint degat=random.nextInt(7);\n\t\t\tif(!p.perteEnergie(degat, xApres, yApres, tableauIle, true, false,affichage, equipe)){\n\t\t\t\t//Verifie que le personnage ne meurt pas de la perte d'energie\n\t\t\t\taffichage.popUp(equipe,\"Vous combattez à main nues... Vous avez infliger \"+degat+\" points de degats a votre cible\", \"ATTAQUE\" );\n\t\t\t}else{\n\t\t\t\taffichage.popUp(equipe,\"Vous avez reussi a tuer votre cible\", \"ATTAQUE\" );\n\t\t\t}\n\t\t}\n\t\tsuper.perteEnergie(10, x,y, tableauIle, false, false,affichage, equipe);\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}",
"@Override\r\n\tpublic void action() {\n\t\tMessageTemplate mt=MessageTemplate.or(MessageTemplate.MatchContent(\"comida\"), MessageTemplate.MatchContent(\"bebida\"));\r\n ACLMessage msg = myAgent.receive(mt);\r\n if(msg!=null){\r\n \tif(msg.getContent().compareTo(\"comida\")==0){\r\n \t\tif(Comida>=5){\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"Si\");\r\n System.out.println(myAgent.getLocalName()+\":Si, gracias tengo hambre todavia\"); \r\n myAgent.send(reply);\r\n Comida=Comida-5;\r\n \t\t}\r\n \t\telse{\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"No\");\r\n System.out.println(myAgent.getLocalName()+\":No gracias\"); \r\n myAgent.send(reply);\r\n \t\t} \r\n \t}\r\n \telse if(msg.getContent().compareTo(\"bebida\")==0){\r\n \t\tif(Bebida>=5){\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"Si\");\r\n System.out.println(myAgent.getLocalName()+\":Si, gracias tengo sed todavia\"); \r\n myAgent.send(reply);\r\n Bebida=Bebida-5;\r\n \t\t}\r\n \t\telse{\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"No\");\r\n System.out.println(myAgent.getLocalName()+\":No gracias\"); \r\n myAgent.send(reply);\r\n \t\t} \r\n \t}\r\n }\r\n if (Comida==0 && Bebida==0){\r\n \tmyAgent.doDelete();\r\n }\r\n\t}",
"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\n public List<Pair<Candidatura, FAE>> atribui() {\n \n List<FAE> listaFaeEvento = evento.getListaFaeEvento();\n List<Candidatura> listaCandidaturaEvento = evento.getListaCandidaturasEvento();\n List<Pair<Candidatura, FAE>> listaAtribuicoes = new ArrayList();\n \n Random geradorAleatorio = new Random();\n int indiceFae = geradorAleatorio.nextInt(listaFaeEvento.size());\n \n for (Candidatura cand : listaCandidaturaEvento){\n listaAtribuicoes.add( new Pair<>(cand, listaFaeEvento.get(indiceFae)));\n }\n \n return listaAtribuicoes;\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 void consulterBoiteVocale() {\n for (int i = 0; i < this.boiteVocale.getListeMessagesVocaux().size(); i++) {\n //on passe l'attribut consulte à true pour savoir qu'il a été vu pour la facturation\n this.boiteVocale.getListeMessagesVocaux().get(i).setConsulte(true);\n }\n }",
"public void aggiungiPecoraCasualmente() {\n\t\tif (((int) (Math.random() * 3)) >= 1) {\n\t\t\tPecoraAdulta nuovaPecoraAdulta = new PecoraAdulta();\n\t\t\tpecore.add(nuovaPecoraAdulta);\n\t\t\tif (nuovaPecoraAdulta.isMaschio())\n\t\t\t\tnumMontoni++;\n\t\t\telse\n\t\t\t\tnumPecoreFemmine++;\n\t\t} else {\n\t\t\tpecore.add(new Agnello());\n\t\t\tnumeroAgelli++;\n\t\t}\n\t}",
"public void eisagwgiSintagis() {\n\t\t//Elegw ean mporei na eisaxthei suntagi\n\t\tif(numOfMedicine != 0 && numOfDoctors != 0 && numOfPatient != 0 && numOfPrescription < 1000) \n\t\t{\n\t\t\ttmp_1 = numOfPrescription + 1;\n\t\t\t// Emfanizw to synolo twn giatrwn pou yparxoun sto farmakeio\n\t\t\tfor(i = 0; i < numOfDoctors; i++)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(i + \". STOIXEIA IATROU: \");\n\t \t \tdoctor[i].print();\n\t \t \tSystem.out.println();\n\t\t\t}\n\t\t\t// O xristis epilegei ton ari8mo pou antistoixei ston giatro pou egrapse thn syntagh\n\t\t\ttmp_1 = sir.readPositiveInt(\"EPILEKSTE TON GIATRO POU EGGRAPSE THN SYNTAGH: \"); \n\t\t\t// Elegxw an o yparxei o giatros pou edwse o xristis\n\t\t\twhile(tmp_1 < 0 || tmp_1 > numOfDoctors - 1)\n\t \t {\n\t\t\t\ttmp_1 = sir.readPositiveInt(\"DEN YPARXEI GIATROS ME TO NOUMERO POU PLIKTROLOGISATE! PARAKALW KSANADWSTE ARITHMO: \");\n\t\t\t\tSystem.out.println();\n\t \t }\n\t\t\t\n\t\t\ti = numOfPrescription + 1;\n\t\t\t// Emfanizw to synolo twn asthenwn pou yparxoun sto farmakeio\n\t\t\tfor(i = 0; i < numOfPatient; i++)\n\t\t {\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(i + \". STOIXEIA ASTHENOUS: \");\n\t patient[i].print();\n\t System.out.println();\n\t\t }\n\t\t\t// O xristis epilegei ton ari8mo pou antistoixei ston as8enh gia ton opoio proorizetai i syntagh\n\t\t\ti = sir.readPositiveInt(\"EPILEKSTE TON ASTHENH GIA TON OPOIO PROORIZETAI H SYNTAGH: \"); \n\t\t\t// Elegxw an o yparxei o as8enhs pou edwse o xristis\n\t\t\twhile(i < 0 || i > numOfPatient - 1)\n\t \t {\n\t\t\t\ti = sir.readPositiveInt(\"DEN YPARXEI ASTHENHS ME TO NOUMERO POU PLIKTROLOGISATE! PARAKALW KSANADWSTE ARITHMO: \");\n\t\t\t\tSystem.out.println();\n\t \t }\n\t\t\t\n\t\t\t// O xristis eisagei tn synoliko ar8mo farmakwn pou 8a exei h syntagh\n\t\t\tSystem.out.println();\n\t\t\ttmp_2= sir.readPositiveInt(\"EISAGETAI TON ARITHMO TWN FARMAKWN POU EPITHUMEITAI NA EXEI H SYNTAGH(1-6): \");\n\t\t\t// Elegxw an o ari8mos twn farmakwn pou edwse o xristis einai egkyros\n\t\t\twhile(tmp_2 < 0 || tmp_2 > 6)\n\t \t {\n\t\t\t\ttmp_2 = sir.readPositiveInt(\"PARAKALW KSANAEISAGETAI SYNOLIKO ARITHMO FARMAKWN(1-6): \");\n\t\t\t\tSystem.out.println();\n\t \t }\n\t\t\t// Apo8ikeuw tis times ston constructor Syntagi\n\t\t\tprescription[numOfPrescription] = new Syntagi(doctor[tmp_1], patient[i], sir.readDate(\"\\nEISAGETAI THN HMEROMHNIA EGGRAFHS THS SYNTAGHS: \"), tmp_2);\n\t\t\t\n\t\t\tprescription[numOfPrescription].dimiourgiaPinakaFarmakwn(); // Kalw tin methodo auti gia na dimiourgisw ton pinaka me ton arithmo twn farmakwn pou mou edwse o xrhsths\n\t\t\t\n\t\t\t// Emfanizw to synolo twn farmakwn\n\t\t\tfor(i = 0; i < numOfMedicine; i++)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(i + \". STOIXEIA FARMAKOU: \");\n\t\t\t\tmedicine[i].print();\n\t\t\t}\n\t\t\t\n\t\t\tfor(i = 0; i < tmp_2; i++)\n \t \t{\n\t\t\t\ta = i + 1; \n\t\t\t\t// An h syntagh apoteleitai apo perissotera tou enos farmaka tote...\n\t\t\t\tif(tmp_2 != 1)\n \t \t \t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\ttmp_1 = sir.readPositiveInt(\"ARITHMOS \" + a + \"ou FARMAKOU: \");\n\t\t\t\t\ttmp_3 = sir.readPositiveInt(\"POSOTHTA \" + a + \"ou FARMAKOU: \");\n \t \t \tSystem.out.println();\n \t \t \t}\n\t\t\t\t// An h syntagh apoteleitai apo ena farmako tote...\n\t\t\t\telse\n \t \t \t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\ttmp_1 = sir.readPositiveInt(\"ARITHMOS FARMAKOU: \");\n\t\t\t\t\ttmp_3 = sir.readPositiveInt(\"POSOTHTA FARMAKOU: \");\n \t \t\t \tSystem.out.println();\n \t \t \t}\n \t \t \t// Elegxw an o ari8mos pou edwse o xristis einai egkyros\n\t\t\t\twhile(tmp_1 < 0 || tmp_1 > numOfMedicine - 1)\n \t \t \t{\n \t \t \t\ttmp_1 = sir.readPositiveInt(\"EISAGATAI LATHOS DEDOMENA!DWSTE KSANA TIMH: \");\n \t \t\t \tSystem.out.println();\n \t \t \t}\n \t \t \t\n\t\t\t\tprescription[numOfPrescription].gemismaPinakaFarmakwn(i, medicine[tmp_1], tmp_3); // Kalw tin methodo auti gia na gemisw ton pinaka twn farmakwn pou dimiourgisa proigoumenws\n \t \t}\n\t\t\tnumOfPrescription++;\n\t\t}\n\t\t// Elegxw pote den mporei na eisaxthei syntagh\n\t\telse\n\t\t{\n\t\t\t// An oi syntages pou exoun eisaxthei xeperasan to epitrepto orio\n\t\t\tif(numOfPrescription >= 1000)\n \t\t \t{\n \t\t\t\tSystem.out.print(\"DEN MPOREITAI NA EISAGETAI ALLES SYNTAGES!EXEI KALIFTHEI O MEGISTOS ARITHMOS TOUS\");\n \t\t\t\tSystem.out.println();\n \t\t \t}\n\t\t\t// An den yparxoun iatroi, astheneis kai farmaka sto farmakeio\n\t\t\telse if(numOfDoctors == 0 && numOfPatient == 0 && numOfMedicine == 0)\n \t\t \t{\n \t\t\t\tSystem.out.print(\"DEN YPARXOUN DIATHESIMOI GIATROI, ASTHENEIS KAI FARMAKA WSTE NA OLOKLIRWTHEI H EISAGWGH SYNTAGHS!PARAKALW EISAGETAI GIATROUS, ASTHENEIS KAI FARMAKA!\");\n \t\t\t\tSystem.out.println();\n \t\t \t}\n\t\t\t// An den yparxoun iatroi kai astheneis\n\t\t\telse if(numOfDoctors == 0 && numOfPatient == 0)\n \t \t{\n\t\t\t\tSystem.out.print(\"DEN YPARXOUN DIATHESIMOI GIATROI KAI ASTHENEIS GIA NA OLOKLHRWTHEI H EISAGWGH SYNTAGHS!PARAKALW EISAGETAI GIATROUS KAI ASTHENEIS!\");\n \t \t \tSystem.out.println();\n \t \t}\n\t\t\t// An den yparxoun iatroi kai farmaka\n\t\t\telse if(numOfDoctors == 0 && numOfMedicine == 0)\n \t \t{\n\t\t\t\tSystem.out.print(\"DEN YPARXOUN DIATHESIMOI GIATROI KAI FARMAKA GIA NA OLOKLHRWTHEI H EISAGWGH SYNTAGHS!PARAKALW EISAGETAI GIATROUS KAI FARMAKA!\");\n \t \t \tSystem.out.println();\n \t \t}\n\t\t\t// An den yparxoun astheneis kai farmaka\n\t\t\telse if(numOfPatient == 0 && numOfMedicine == 0)\n \t \t{\n\t\t\t\tSystem.out.print(\"DEN YPARXOUN DIATHESIMOI ASTHENEIS KAI FARMAKA GIA NA OLOKLHRWTHEI H EISAGWGH SYNTAGHS!PARAKALW EISAGETAI ASTHENEIS KAI FARMAKA!\");\n \t \t \tSystem.out.println();\n \t \t}\n\t\t\t// An den yparxoun iatroi\n\t\t\telse if (numOfDoctors == 0)\n \t\t \t{\n \t\t\t\tSystem.out.print(\"DEN YPARXOUN DIATHESIMOI GIATROI GIA NA OLOKLHRWTHEI H EISAGWGH SYNTAGHS!PARAKALW EISAGETAI GIATROUS!\");\n \t\t\t\tSystem.out.println();\n \t\t \t}\n \t\t \t// An den yparxoun astheneis\n\t\t\telse\n \t\t \t{\n \t\t\t\tSystem.out.print(\"DEN YPARXOUN DIATHESIMOI ASTHENEIS GIA NA OLOKLHRWTHEI H EISAGWGH SYNTAGHS!PARAKALW EISAGETAI ASTHENEIS!\");\n \t\t\t\tSystem.out.println();\n \t\t \t}\n\t\t}\n\t}",
"public void imprimeAgencias() {\n System.out.println(\"\\n\\n=============== RELATORIO DE AGENCIAS DO BANCO ==================\\n\");\n System.out.println(\"Numero de agencias abertas: \" + numAgenciasAbertas);\n for (int i = 0; i < numAgenciasAbertas; i++) {\n agencias[i].imprimeDados();\n }\n System.out.println(\"===============================================\");\n }",
"@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\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}",
"public void acionarInadimplencia(CestaGarantiasDO cesta);",
"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 }",
"@Before\n\tpublic void incoporacionDeCandidatosYProvinciasHabilitadasALaJuntaElectoral(){\n\t\tmendoza.agregarPartido(pro);\n\t\tbuenosaires.agregarPartido(pro);\n\t\trionegro.agregarPartido(pro);\n\t\tentrerios.agregarPartido(pro);\n\t\tmendoza.agregarPartido(renovador);\n\t\tbuenosaires.agregarPartido(renovador);\n\t\trionegro.agregarPartido(renovador);\n\t\tentrerios.agregarPartido(renovador);\n\t\tmendoza.agregarPartido(fpv);\n\t\tbuenosaires.agregarPartido(fpv);\n\t\trionegro.agregarPartido(fpv);\n\t\tentrerios.agregarPartido(fpv);\n\n\t\t//Incorporacion de los candidatos habilitados al centro de computos\n\t\tjuntaElectoral.agregarCandidato(macri);\t\t\n\t\tjuntaElectoral.agregarCandidato(massa);\t\t\n\t\tjuntaElectoral.agregarCandidato(scioli);\n\n\t\t//Incorporacion de las provincias habilitadas al centro de computos\n\t\tjuntaElectoral.agregarProvincia(mendoza);\n\t\tjuntaElectoral.agregarProvincia(buenosaires);\n\t\tjuntaElectoral.agregarProvincia(rionegro);\n\t\tjuntaElectoral.agregarProvincia(entrerios);\n\t}",
"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 void annuler(){\r\n try {\r\n viewEtudiantInscripEcheance = new ViewEtudiantInscriptionEcheance();\r\n echeance_etudiant = new EcoEcheanceEtudiant(); \r\n \r\n } catch (Exception e) {\r\n System.err.println(\"Erreur capturée : \"+e);\r\n }\r\n }",
"public void aumentarIntentos() {\r\n this.intentos += 1;\r\n }",
"public void setacto()\n\t\t{\n\t\t\tacto=1;\n\t\tavance=0;\n\t\t}",
"private static void etapa3Urna() {\n\t\t\n\t\turna.contabilizarVotosPorCandidato(enderecoCandidatos);\n\t\t\n\t}",
"@Override\n public void atacar(Jinete jinete, Pieza receptor) {\n }",
"public void accusation() {\n\t\tNotebook notebook = turnController.getData().getCurrentTurn()\n\t\t\t\t.getPlayer().getNotebook();\n\t\tCard room = notebook.getViableCards(Card.Type.ROOM).get(0);\n\t\tCard suspect = notebook.getViableCards(Card.Type.SUSPECT).get(0);\n\t\tCard weapon = notebook.getViableCards(Card.Type.WEAPON).get(0);\n\n\t\tturnController.makeAccusation(room, suspect, weapon);\n\t}",
"public String accionemergencia(){\n\t\tString resp=\"\";\n\t\tif(puntosvida<=5 && acc!=1){\n\t\t\tpuntosvida=puntosvida+15;\n\t\t\tresp=\"\\nAccion de emergencia \"+ tipo +\"activada vida +15\";\n\t\t\tacc=1;\n\t\t}\n\t\treturn resp;\n\t}",
"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}",
"public void diagrafiGiatrou() {\n\t\t// Elegxw an yparxoun iatroi sto farmakeio\n\t\tif(numOfDoctors != 0)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\" STOIXEIA IATRWN\");\n\t\t\t// Emfanizw olous tous giatrous\n\t\t\tfor(int j = 0; j < numOfDoctors; j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\n \" + j + \". STOIXEIA IATROU: \");\n\t\t\t\tSystem.out.println();\n\t \t \tdoctor[j].print();\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\ttmp_1 = sir.readPositiveInt(\"DWSTE TON ARITHMO TOU IATROU POU THELETAI NA DIAGRAFEI: \");\n\t\t\tSystem.out.println();\n\t\t\t// Elegxos egkyrotitas tou ari8mou pou edwse o xristis\n\t\t\twhile(tmp_1 < 0 || tmp_1 > numOfDoctors)\n\t\t\t{\n\t\t\t\ttmp_1 = sir.readPositiveInt(\"KSANAEISAGETAI ARITHMO IATROU: \");\n\t\t\t}\n\t\t\t// Metakinw tous epomenous giatrous mia 8esi pio aristera\n\t\t\tfor(int k = tmp_1; k < numOfDoctors - 1; k++)\n\t\t\t{\n\t\t\t\tdoctor[k] = doctor[k+1]; // Metakinw ton giatro sti 8esi k+1 pio aristera\n\t\t\t}\n\t\t\tnumOfDoctors--; // Meiwse ton ari8mo twn giatrwn\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.print(\"\\nDEN YPARXOUN DIATHESIMOI GIATROI PROS DIAGRAFH!\\n\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"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}",
"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 static String tomaDeDecisionesGato(String tipoAgente, OrientacionAgenteVisto orientacion, double claridad_percepcion, double distancia, String decisionAnt, double w1, double w2, double w3, double w4, double w5){\n\t\tlogger.info(\"TOMA DE DECISIONES DEL GATO\");\n\t\tlogger.info(\"Tres criterios:\");\n\t\tlogger.info(\"Criterio 1: Tipo de agente (beneficio)\");\n\t\tlogger.info(\"Criterio 2: Orientación (beneficio)\");\n\t\tlogger.info(\"Criterio 3: Claridad de percepción (beneficio)\");\n\t\tlogger.info(\"Criterio 4: Distancia (coste)\");\n\t\tint numCriterios= 5;\n\t\tString decision= \"\";\n\t\t//Normalizamos las entradas entre 0 y 1:\n\t\tdouble tipoAgenteN= normalizaTipoAgenteG(tipoAgente);\n\t\tdouble orientacionN= normalizaOrientacion(orientacion); \n\t\tdouble claridad_percepcionN= claridad_percepcion;\n\t\tdouble distanciaN= normalizaDistancia(distancia);\n\t\tdouble decisionAntN= normalizaDecisionAntG(decisionAnt);\n\t\t\n\t\tint[] modeloA1= {0, 0, 0, 1, 0};//Alternativa 1: no hacer nada\n\t\tlogger.info(\"Modelo para la alternativa 1, NO HACER NADA: \"+modeloA1[0]+\" \"+modeloA1[1]+\" \"+modeloA1[2]+\" \"+modeloA1[3]);\n\t\tint[] modeloA2= {1, 1, 1, 0, 1};//Alternativa 2: perseguir\n\t\tlogger.info(\"Modelo para la alternativa 2, PERSEGUIR: \"+modeloA2[0]+\" \"+modeloA2[1]+\" \"+modeloA2[2]+\" \"+modeloA2[3]);\n\t\tint[] modeloA3= {0, 0, 1, 0, 1/2};//Alternativa 2: esquivar (esquivo si no es ratón, me da igual la orientación, le veo bien y está muy cerca)\n\t\tlogger.info(\"Modelo para la alternativa 3, ESQUIVAR: \"+modeloA3[0]+\" \"+modeloA3[1]+\" \"+modeloA3[2]+\" \"+modeloA3[3]);\n\t\t\n\t\t\n\t\t//Convertimos cada una de las tres entradas en 3 números fuzzy ordenados de menor a mayor:\n\t\tlogger.info(\"Números fuzzy triangulares para el criterio 1: \");\n\t\tdouble[] _tipoAgente= generaNumAleatorio(tipoAgenteN);\t\t\n\t\tlogger.info(\"Números fuzzy triangulares para el criterio 2: \");\n\t\tdouble[] _orientacion= generaNumAleatorio(orientacionN);\n\t\tlogger.info(\"Números fuzzy triangulares para el criterio 3: \");\n\t\tdouble[] _claridad_percepcion= generaNumAleatorio(claridad_percepcionN);\n\t\tlogger.info(\"Números fuzzy triangulares para el criterio 4: \");\n\t\tdouble[] _distancia= generaNumAleatorio(distanciaN);\n\t\tlogger.info(\"Números fuzzy triangulares para el criterio 5: \");\n\t\tdouble[] _decisionAnt= generaNumAleatorio(decisionAntN);\n\t\t\n\t\t//Rellenamos la tabla:\n\t\t//Alternativa 1:\n\t\tdouble[] a1_tipoAgente= new double[3];\n\t\tdouble[] a1_orientacion= new double[3];\n\t\tdouble[] a1_claridad_percepcion= new double[3];\n\t\tdouble[] a1_distancia= new double[3];\n\t\tdouble[] a1_decisionAnt= new double[3];\n\t\t//Alternativa 2:\n\t\tdouble[] a2_tipoAgente= new double[3];\n\t\tdouble[] a2_orientacion= new double[3];\n\t\tdouble[] a2_claridad_percepcion= new double[3];\n\t\tdouble[] a2_distancia= new double[3];\n\t\tdouble[] a2_decisionAnt= new double[3];\n\t\t//Alternativa 3:\n\t\tdouble[] a3_tipoAgente= new double[3];\n\t\tdouble[] a3_orientacion= new double[3];\n\t\tdouble[] a3_claridad_percepcion= new double[3];\n\t\tdouble[] a3_distancia= new double[3];\n\t\tdouble[] a3_decisionAnt= new double[3];\n\t\t\n\t\tfor(int k= 0; k< 5; k++){//Recorremos los criterios:\n\t\t\tif(k==0){//Son criterios de beneficio: Tipo de agente\n\t\t\t\tif(modeloA1[k] == 1){//entonces (modeloA2[k] == 0)\n\t\t\t\t\tfor(int i= 0; i< 3; i++){\n\t\t\t\t\t\ta1_tipoAgente[i]= _tipoAgente[i];\n\t\t\t\t\t\ta2_tipoAgente[i]= 1- _tipoAgente[i];\n\t\t\t\t\t\ta3_tipoAgente[i]= _tipoAgente[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{//modeloA1[k] == 0 entonces (modeloA2[k] == 1)\n\t\t\t\t\tfor(int i= 0; i< 3; i++){\n\t\t\t\t\t\ta1_tipoAgente[i]= 1- _tipoAgente[i];\n\t\t\t\t\t\ta2_tipoAgente[i]= _tipoAgente[i];\n\t\t\t\t\t\ta3_tipoAgente[i]= 1 - _tipoAgente[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(k==1){//Son criterios de beneficio: Orientación\n\t\t\t\tif(modeloA1[k] == 1){//entonces (modeloA2[k] == 0)\n\t\t\t\t\tfor(int i= 0; i< 3; i++){\n\t\t\t\t\t\ta1_orientacion[i]= _orientacion[i];\n\t\t\t\t\t\ta2_orientacion[i]= 1 - _orientacion[i];\n\t\t\t\t\t\ta3_orientacion[i]= _orientacion[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{//modeloA1[k] == 0 entonces (modeloA2[k] == 1)\n\t\t\t\t\tfor(int i= 0; i< 3; i++){\n\t\t\t\t\t\ta1_orientacion[i]= 1 - _orientacion[i];\t\n\t\t\t\t\t\ta2_orientacion[i]= _orientacion[i];\n\t\t\t\t\t\ta3_orientacion[i]= 1 - _orientacion[i];\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\n\t\t\t}\t\n\t\t\telse if(k==2){//Son criterios de beneficio: Claridad de percepción\n\t\t\t\t\tif(modeloA1[k] == 1){//entonces (modeloA2[k] == 0)\n\t\t\t\t\t\tfor(int i= 0; i< 3; i++){\n\t\t\t\t\t\t\ta1_claridad_percepcion[i]= _claridad_percepcion[i];\n\t\t\t\t\t\t\ta2_claridad_percepcion[i]= 1 - _claridad_percepcion[i];\n\t\t\t\t\t\t\ta3_claridad_percepcion[i]= 1 - _claridad_percepcion[i];\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{//modeloA1[k] == 0\tentonces (modeloA2[k] == 1)\n\t\t\t\t\t\tfor(int i= 0; i< 3; i++){\n\t\t\t\t\t\t\ta1_claridad_percepcion[i]= 1 - _claridad_percepcion[i];\n\t\t\t\t\t\t\ta2_claridad_percepcion[i]= _claridad_percepcion[i];\n\t\t\t\t\t\t\ta3_claridad_percepcion[i]= _claridad_percepcion[i];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\n\t\t\t}\n\t\t\telse if(k==3){// Son criterios de coste: Distancia\n\t\t\t\tif(modeloA1[k] == 1){//entonces (modeloA2[k] == 0)\n\t\t\t\t\tfor(int i= 0; i< 3; i++){ \n\t\t\t\t\t\ta1_distancia[i]= 1- _distancia[i];\n\t\t\t\t\t\ta2_distancia[i]= _distancia[i];\t\t\t\t\t\n\t\t\t\t\t\ta3_distancia[i]= _distancia[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{//modeloA1[k] == 0\tentonces (modeloA2[k] == 1)\n\t\t\t\t\tfor(int i= 0; i< 3; i++){\n\t\t\t\t\t\ta1_distancia[i]= _distancia[i];\n\t\t\t\t\t\ta2_distancia[i]= 1- _distancia[i];\n\t\t\t\t\t\ta3_distancia[i]= 1- _distancia[i];\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t\telse{//k=4. Criterio de beneficio: Decision anterior\n\t\t\t\tif(modeloA1[k] == 1){//entonces (modeloA2[k] == 0)\n\t\t\t\t\tfor(int i= 0; i< 3; i++){\n\t\t\t\t\t\ta1_decisionAnt[i]= _decisionAnt[i];\n\t\t\t\t\t\ta2_decisionAnt[i]= 1 - _decisionAnt[i];\n\t\t\t\t\t\ta3_decisionAnt[i]= 0.5 - _decisionAnt[i];\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{//modeloA1[k] == 0\tentonces (modeloA2[k] == 1)\n\t\t\t\t\tfor(int i= 0; i< 3; i++){\n\t\t\t\t\t\ta1_decisionAnt[i]= 1 - _decisionAnt[i];\n\t\t\t\t\t\ta2_decisionAnt[i]= _decisionAnt[i];\n\t\t\t\t\t\ta3_decisionAnt[i]= 0.5 - _decisionAnt[i];\n\t\t\t\t\t}\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t}\n\t\tlogger.info(\"Mostramos la tabla rellena (ANTES de aplicar los pesos): \");\n\t\tlogger.info(\"Criterio 1, alternativa 1: \"+ a1_tipoAgente[0]+\", \"+a1_tipoAgente[1]+\", \"+a1_tipoAgente[2]); \n\t\tlogger.info(\"Criterio 1, alternativa 2: \"+ a2_tipoAgente[0]+\", \"+a2_tipoAgente[1]+\", \"+a2_tipoAgente[2]);\n\t\tlogger.info(\"Criterio 1, alternativa 3: \"+ a3_tipoAgente[0]+\", \"+a3_tipoAgente[1]+\", \"+a3_tipoAgente[2]);\n\t\t\n\t\tlogger.info(\"Criterio 2, alternativa 1: \"+ a1_orientacion[0]+\", \"+a1_orientacion[1]+\", \"+a1_orientacion[2]); \n\t\tlogger.info(\"Criterio 2, alternativa 2: \"+ a2_orientacion[0]+\", \"+a2_orientacion[1]+\", \"+a2_orientacion[2]);\n\t\tlogger.info(\"Criterio 2, alternativa 3: \"+ a3_orientacion[0]+\", \"+a3_orientacion[1]+\", \"+a3_orientacion[2]);\n\t\t\n\t\tlogger.info(\"Criterio 3, alternativa 1: \"+ a1_claridad_percepcion[0]+\", \"+a1_claridad_percepcion[1]+\", \"+a1_claridad_percepcion[2]); \n\t\tlogger.info(\"Criterio 3, alternativa 2: \"+ a2_claridad_percepcion[0]+\", \"+a2_claridad_percepcion[1]+\", \"+a2_claridad_percepcion[2]);\n\t\tlogger.info(\"Criterio 3, alternativa 3: \"+ a3_claridad_percepcion[0]+\", \"+a3_claridad_percepcion[1]+\", \"+a3_claridad_percepcion[2]);\n\t\t\n\t\tlogger.info(\"Criterio 4, alternativa 1: \"+ a1_distancia[0]+\", \"+a1_distancia[1]+\", \"+a1_distancia[2]);\n\t\tlogger.info(\"Criterio 4, alternativa 2: \"+ a2_distancia[0]+\", \"+a2_distancia[1]+\", \"+a2_distancia[2]);\n\t\tlogger.info(\"Criterio 4, alternativa 3: \"+ a3_distancia[0]+\", \"+a3_distancia[1]+\", \"+a3_distancia[2]);\n\t\t//Aplicamos los diversos pesos:\n\t\tfor(int i= 0; i< 3; i++){\n\t\t\ta1_tipoAgente[i]= w1 * a1_tipoAgente[i];\n\t\t\ta2_tipoAgente[i]= w1 * a2_tipoAgente[i];\n\t\t\ta3_tipoAgente[i]= w1 * a3_tipoAgente[i];\n\t\t\ta1_orientacion[i]= w2 * a1_orientacion[i];\n\t\t\ta2_orientacion[i]= w2 * a2_orientacion[i];\n\t\t\ta3_orientacion[i]= w2 * a3_orientacion[i];\n\t\t\ta1_claridad_percepcion[i]= w3 * a1_claridad_percepcion[i];\n\t\t\ta2_claridad_percepcion[i]= w3 * a2_claridad_percepcion[i];\n\t\t\ta3_claridad_percepcion[i]= w3 * a3_claridad_percepcion[i];\n\t\t\ta1_distancia[i]= w4 * a1_distancia[i];\n\t\t\ta2_distancia[i]= w4 * a2_distancia[i];\n\t\t\ta3_distancia[i]= w4 * a3_distancia[i];\n\t\t\ta1_decisionAnt[i]= w5 * a1_decisionAnt[i];\n\t\t\ta2_decisionAnt[i]= w5 * a2_decisionAnt[i];\n\t\t\ta3_decisionAnt[i]= w5 * a3_decisionAnt[i];\n\t\t}\n\t\t\n\t\tlogger.info(\"Mostramos la tabla rellena (DESPUES de aplicar los pesos): \");\n\t\tlogger.info(\"Criterio 1, alternativa 1: \"+ a1_tipoAgente[0]+\", \"+a1_tipoAgente[1]+\", \"+a1_tipoAgente[2]); \n\t\tlogger.info(\"Criterio 1, alternativa 2: \"+ a2_tipoAgente[0]+\", \"+a2_tipoAgente[1]+\", \"+a2_tipoAgente[2]);\n\t\tlogger.info(\"Criterio 1, alternativa 3: \"+ a3_tipoAgente[0]+\", \"+a3_tipoAgente[1]+\", \"+a3_tipoAgente[2]);\n\t\t\n\t\tlogger.info(\"Criterio 2, alternativa 1: \"+ a1_orientacion[0]+\", \"+a1_orientacion[1]+\", \"+a1_orientacion[2]); \n\t\tlogger.info(\"Criterio 2, alternativa 2: \"+ a2_orientacion[0]+\", \"+a2_orientacion[1]+\", \"+a2_orientacion[2]);\n\t\tlogger.info(\"Criterio 2, alternativa 3: \"+ a3_orientacion[0]+\", \"+a3_orientacion[1]+\", \"+a3_orientacion[2]);\n\t\t\n\t\tlogger.info(\"Criterio 3, alternativa 1: \"+ a1_claridad_percepcion[0]+\", \"+a1_claridad_percepcion[1]+\", \"+a1_claridad_percepcion[2]); \n\t\tlogger.info(\"Criterio 3, alternativa 2: \"+ a2_claridad_percepcion[0]+\", \"+a2_claridad_percepcion[1]+\", \"+a2_claridad_percepcion[2]);\n\t\tlogger.info(\"Criterio 3, alternativa 3: \"+ a3_claridad_percepcion[0]+\", \"+a3_claridad_percepcion[1]+\", \"+a3_claridad_percepcion[2]);\n\t\t\n\t\tlogger.info(\"Criterio 4, alternativa 1: \"+ a1_distancia[0]+\", \"+a1_distancia[1]+\", \"+a1_distancia[2]);\n\t\tlogger.info(\"Criterio 4, alternativa 2: \"+ a2_distancia[0]+\", \"+a2_distancia[1]+\", \"+a2_distancia[2]);\n\t\tlogger.info(\"Criterio 4, alternativa 3: \"+ a3_distancia[0]+\", \"+a3_distancia[1]+\", \"+a3_distancia[2]);\n\t\t\n\t\t\n\t\t//Calculamos d1+, d1-, d2+ y d2-:\n\t\tdouble[] pMasBeneficio= {1, 1, 1};\n\t\tdouble[] pMenosBeneficio= {0, 0, 0};\n\t\tdouble[] pMasCoste= {0, 0, 0};\n\t\tdouble[] pMenosCoste= {1, 1, 1};\n\t\t\n\t\tdouble d1Mas= calculaDistancia(a1_tipoAgente, pMasBeneficio) + calculaDistancia(a1_orientacion, pMasBeneficio) + calculaDistancia(a1_claridad_percepcion, pMasBeneficio) + calculaDistancia(a1_distancia, pMasCoste) + calculaDistancia(a1_decisionAnt, pMasBeneficio);\n\t\tdouble d1Menos= calculaDistancia(a1_tipoAgente, pMenosBeneficio) + calculaDistancia(a1_orientacion, pMenosBeneficio) + calculaDistancia(a1_claridad_percepcion, pMenosBeneficio) + calculaDistancia(a1_distancia, pMenosCoste) + calculaDistancia(a1_decisionAnt, pMenosBeneficio);\n\t\tdouble d2Mas= calculaDistancia(a2_tipoAgente, pMasBeneficio) + calculaDistancia(a2_orientacion, pMasBeneficio) + calculaDistancia(a2_claridad_percepcion, pMasBeneficio) + calculaDistancia(a2_distancia, pMasCoste) + calculaDistancia(a2_decisionAnt, pMasBeneficio);\n\t\tdouble d2Menos= calculaDistancia(a2_tipoAgente, pMenosBeneficio) + calculaDistancia(a2_orientacion, pMenosBeneficio) + calculaDistancia(a2_claridad_percepcion, pMenosBeneficio) + calculaDistancia(a2_distancia, pMenosCoste) + calculaDistancia(a2_decisionAnt, pMenosBeneficio);\n\t\tdouble d3Mas= calculaDistancia(a3_tipoAgente, pMasBeneficio) + calculaDistancia(a3_orientacion, pMasBeneficio) + calculaDistancia(a3_claridad_percepcion, pMasBeneficio) + calculaDistancia(a3_distancia, pMasCoste) + calculaDistancia(a3_decisionAnt, pMasBeneficio);\n\t\tdouble d3Menos= calculaDistancia(a3_tipoAgente, pMenosBeneficio) + calculaDistancia(a3_orientacion, pMenosBeneficio) + calculaDistancia(a3_claridad_percepcion, pMenosBeneficio) + calculaDistancia(a3_distancia, pMenosCoste) + calculaDistancia(a3_decisionAnt, pMenosBeneficio);\n\t\t\n\t\t\n\t\t//Calculamos p1, p2 y p3:\n\t\tdouble p1= (d1Menos + numCriterios - d1Mas) / (2 * numCriterios);\n\t\tdouble p2= (d2Menos + numCriterios - d2Mas) / (2 * numCriterios);\n\t\tdouble p3= (d3Menos + numCriterios - d3Mas) / (2 * numCriterios);\n\t\tlogger.info(\"Se tomará la decisión que mas se aproxime a 1: \");\n\t\tlogger.info(\"No hacer nada= \"+p1);\n\t\tlogger.info(\"Perseguir= \"+p2);\n\t\tlogger.info(\"Esquivar= \"+p3);\n\t\t\n\t\t//Tomamos la decisión:\n\t\tdouble alternativa1= Math.abs(p1 - 1);\n\t\tdouble alternativa2= Math.abs(p2 - 1);\n\t\tdouble alternativa3= Math.abs(p3 - 1);\n\t\t\n\t\tif((alternativa1 < alternativa2) && (alternativa1 < alternativa3))\n\t\t\tdecision= \"no hacer nada\";//a1\n\t\telse if ((alternativa2 < alternativa1) && (alternativa2 < alternativa3))\n\t\t\tdecision= \"perseguir\";//a2\t\t\n\t\telse if ((alternativa3 < alternativa1) && (alternativa3 < alternativa2))\n\t\t\tdecision= \"esquivar\";//a3\n\t\treturn decision;\n\t}",
"@Override\n\tpublic void action() {\n\t\t_agj.addBehaviour(new RecibirDistritos(_agj));\n\t\t_agj.addBehaviour(new RecibirMonedas(_agj));\n\t}",
"public void actualiserAffichage();",
"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 }",
"public void AumentarVictorias() {\r\n\t\tthis.victorias_actuales++;\r\n\t\tif (this.victorias_actuales >= 9) {\r\n\t\t\tthis.TituloNobiliario = 3;\r\n\t\t} else if (this.victorias_actuales >= 6) {\r\n\t\t\tthis.TituloNobiliario = 2;\r\n\t\t} else if (this.victorias_actuales >= 3) {\r\n\t\t\tthis.TituloNobiliario = 1;\r\n\t\t} else {\r\n\t\t\tthis.TituloNobiliario = 0;\r\n\t\t}\r\n\t}",
"public void niveauSuivant() {\n niveau = niveau.suivant();\n }",
"Activite getActiviteCourante();",
"public void anazitisiSintagisVaseiGiatrou() {\n\t\tString doctorName = null;\n\t\ttmp_2 = 0;\n\t\tif(numOfPrescription != 0)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\" STOIXEIA SYNTAGWN\");\n\t\t\t// Emfanizw oles tis syntages\n\t\t\tfor(int j = 0; j < numOfPrescription; j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\n \" + j + \". STOIXEIA SYNTAGHS: \");\n\t \t \tprescription[j].print();\n\t\t\t}\n\t\t\tdoctorName = sir.readString(\"DWSTE TO EPWNYMO TOU GIATROU: \"); // Zitaw apo ton xrhsth na mou dwsei to onoma tou giatrou pou exei grapsei thn sintagh pou epithumei\n\t\t\tfor(int i = 0; i < numOfPrescription; i++)\n\t\t\t{\n\t\t\t\tif(doctorName.equals(prescription[i].getDoctorLname())) // An vre8ei kapoia antistoixeia emfanizw thn syntagh pou exei grapsei o giatros\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"VRETHIKE SYNTAGH!\");\n\t\t\t\t\t// Emfanizw thn/tis sintagh/sintages pou exoun graftei apo ton sygkekrimeno giatro\n\t\t\t\t\tprescription[i].print();\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\ttmp_2++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(tmp_2 == 0)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(\"DEN YPARXEI SYNTAGH POU NA PERILAMVANEI TON IATRO ME EPWNYMO: \" + doctorName);\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"DEN YPARXOUN DIATHESIMES SYNTAGES!\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public int choixAttaque(Caracter monstre, Caracter player){\n Inventory inventaire = monstre.getInventory();\n Weapon armeSecondaire = inventaire.getSecondWeapon();\n Weapon armePrincipale = inventaire.getMainWeapon();\n Spell conso = inventaire.getSpell();\n \n if (armeSecondaire == null)\n {\n return 1;\n }\n else if(armeSecondaire != null)\n {\n if(armePrincipale.dmin + armePrincipale.dmax > armeSecondaire.dmin + armeSecondaire.dmax){\n return 1;\n }\n else{\n return 2;\n }\n }\n \n return 1;\n }",
"public void eisagwgiAstheni() {\n\t\t// Elegxw o arithmos twn asthenwn na mhn ypervei ton megisto dynato\n\t\tif(numOfPatient < 100)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tpatient[numOfPatient] = new Asthenis();\n\t\t\tpatient[numOfPatient].setFname(sir.readString(\"DWSTE TO ONOMA TOU ASTHENH: \")); // Pairnei to onoma tou asthenh apo ton xrhsth\n\t\t\tpatient[numOfPatient].setLname(sir.readString(\"DWSTE TO EPWNYMO TOU ASTHENH: \")); // Pairnei to epitheto tou asthenh apo ton xrhsth\n\t\t\tpatient[numOfPatient].setAMKA(rnd.nextInt(1000000)); // To sistima dinei automata ton amka tou asthenous\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\t//Elegxos monadikotitas tou amka tou astheni\n\t\t\th = rnd.nextInt(1000000);\n\t\t\tfor(int i = 0; i < numOfPatient; i++)\n\t\t\t{\n\t\t\t\tif(patient[i].getAMKA() == 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\tnumOfPatient++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"DEN MPOREITE NA EISAGETE ALLOUS ASTHENEIS!\");\n\t\t\tSystem.out.println(\"EXEI SYMPLHRWTHEI O PROVLEPOMENOS ARITHMOS!\");\n\t\t}\n\t}",
"public static void viaggia(List<Trasporto> lista,Taxi[] taxi,HandlerCoR h) throws SQLException\r\n {\n Persona app = (Persona) lista.get(0);\r\n /* ARGOMENTI handleRequest\r\n 1° Oggetto Request\r\n 2° Array Taxi per permettere la selezione e la modifica della disponibilità\r\n */\r\n h.handleRequest(new RequestCoR(app.getPosPartenza(),app.getPosArrivo(),taxi),taxi); \r\n SceltaPercorso tempo = new SceltaPercorso();\r\n SceltaPercorso spazio = new SceltaPercorso();\r\n tempo.setPercorsoStrategy(new timeStrategy());\r\n spazio.setPercorsoStrategy(new lenghtStrategy());\r\n for(int i=0;i<5;i++)\r\n if(!taxi[i].getLibero())\r\n {\r\n if(Scelta.equals(\"veloce\"))\r\n {\r\n JOptionPane.showMessageDialog(null,\"Hai Scelto il Percorso più Veloce...\");\r\n Connessione conn;\r\n conn = Connessione.getConnessione();\r\n String query = \"Delete from CRONOCORSE where PASSEGGERO = ? \";\r\n try (PreparedStatement ps = conn.connect.prepareStatement(query)) {\r\n ps.setString(1, app.getNome());\r\n ps.executeUpdate();\r\n ps.close();\r\n JOptionPane.showMessageDialog(null,\"Cliente in viaggio...\\n\"+app.getNome()+\" è arrivato a destinazione!\\nPrezzo Corsa: \"+taxi[i].getPrezzoTotale()+\"€\");\r\n \r\n \r\n }catch(SQLException e){JOptionPane.showMessageDialog(null,e);}\r\n tempo.Prenota(taxi[i]); \r\n app.setPosPartenza();\r\n taxi[i].setPosizione(app.getPosArrivo());\r\n taxi[i].setStato(true);\r\n taxi[i].clear();\r\n lista.set(0,app);\r\n i=5;\r\n \r\n } else\r\n \r\n {\r\n JOptionPane.showMessageDialog(null,\"Hai Scelto il Percorso più Breve...\");\r\n Connessione conn;\r\n conn = Connessione.getConnessione();\r\n String query = \"Delete from CRONOCORSE where PASSEGGERO = ? \";\r\n try (PreparedStatement ps = conn.connect.prepareStatement(query)) {\r\n ps.setString(1, app.getNome());\r\n ps.executeUpdate();\r\n ps.close();\r\n JOptionPane.showMessageDialog(null,\"Cliente in viaggio...\\n\"+app.getNome()+\" è arrivato a destinazione!\\nPrezzo Corsa: \"+taxi[i].getPrezzoTotale()+\"€\");\r\n \r\n \r\n }catch(SQLException e){JOptionPane.showMessageDialog(null,e);}\r\n spazio.Prenota(taxi[i]); \r\n app.setPosPartenza();\r\n taxi[i].setPosizione(app.getPosArrivo());\r\n taxi[i].setStato(true);\r\n taxi[i].clear();\r\n lista.set(0,app);\r\n i=5;\r\n \r\n \r\n }\r\n }\r\n \r\n }",
"private Candidatos calculaCandidatos(Etapa e) {\n if(debug) {\n System.out.println(\"**********************calculaCandidatos\");\n System.out.println(\"e.i: \" + e.i);\n }\n \n Candidatos c = new Candidatos();\n if(e.k <= this.G.numVertices()) {\n //crear un objeto candidato y rellenarlo para esta etapa \n c.i = -1; //no apuntamos a ninguna pos porque en la funcion seleccionaCandidato ya incrementamos este valor\n //buscar el primer vertize sin emparejar\n int size = this.sol.emparejamientos.length;\n \n c.fila = e.i;\n \n //añadimos los candidatos\n c.verticesSinPareja = new ArrayList<>();\n for(int k = 0; k < size; ++k) {\n if(this.sol.emparejamientos[c.fila][k] == 0) {\n if(debug) {\n System.out.print(\" candidato: \" + k+ \" \");\n }\n c.verticesSinPareja.add(k);\n }\n }\n \n }\n else {\n c.verticesSinPareja = new ArrayList<>();\n }\n return c;\n }",
"private void getEncuestaSatisfaccions(){\n mEncuestaSatisfaccions = estudioAdapter.getEncuestaSatisfaccionSinEnviar();\n //ca.close();\n }",
"private static void imprimirMensajeEnPantalla() {\n\tSystem.out.println(\"########### JUEGO EL AHORCADO ###########\");\n\timprimirAhorcado(intentosRestantes);\n\tSystem.out.println(\"\\nPALABRA ACTUAL: \" + getPalabraActualGuionBajo());\n\tSystem.out.println(\"INTENTOS RESTANTES: \" + intentosRestantes);\n\t}",
"@Override\r\n public void combattre(Creature c) {\r\n System.out.println(\"Tour de combat de \" + getNom() + \" :\");\r\n if (this.getPtMana() > 0) {\r\n this.setPtMana(this.getPtMana() - 1);\r\n Random rand = new Random();\r\n int success = rand.nextInt(100), distance;\r\n distance = this.getPos().distance(c.getPos());\r\n if (distance <= this.getDistAttMax()) {//On vérifie que l'on peut toucher l'adversaire\r\n if (success < this.getPourcentageMag()) { // L'attaque réussie\r\n c.setPtVie(c.getPtVie() - this.getDegAtt()); //on inflige des dégats à l'adversaire.\r\n System.out.println(\"Attaque réussie de \" + getNom() + \" : \" + this.getDegAtt() + \" dégats infligés.\");\r\n } else {\r\n System.out.println(\"Dans le vide!\");\r\n }\r\n } else {\r\n System.out.println(\"Trop loin.\");\r\n }\r\n } else {\r\n System.out.println(\"Oups... plus de mana.\");\r\n }\r\n }",
"public void esperarRecogidaIngrediente(){\n enter();\n if ( ingredienteact != -1 )\n estanquero.await();\n leave();\n }",
"@Override\n public void buildAspecto() {\n this.personaje.setAspecto(\"Se presenta con rasgos humanos, rodeado de circulos de agua.\");\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 }",
"@Override\n public void atacar(SoldadoDeInfanteria soldado, Pieza receptor) {\n }",
"@Override\n public void receiveMessage(AgentID sender, Action action)\n {\n super.receiveMessage(sender, action);\n\n // update the value of Care_Value、Reluctance、Agreement_Value every ten rounds\n if (getTimeLine() instanceof DiscreteTimeline) {\n DiscreteTimeline discreteTimeline = (DiscreteTimeline)getTimeLine();\n int cRound = discreteTimeline.getRound();\n if (cRound % 10 == 0) {\n\n // care_value increase 4% every ten rounds\n Care_Value = Care_Value * (1 + 0.04);\n if (Care_Value > 0.72) {\n Care_Value = 0.72;\n }\n\n // reluctance decrease 4% every ten rounds\n Reluctance = Reluctance * (1 - 0.06);\n if (timeline.getTime() < 7 && Reluctance < 0.9) {\n Reluctance = 0.9;\n }\n\n List<BidDetails> allBids = new ArrayList<>(feasibleBids);\n // find a common set for all opponent\n Set<BidDetails> commonBids = opponentModelInterface.queryCommonBestBidsSet(allBids, Number_of_Bids);\n List<BidDetails> commonBidsList = new ArrayList<>(commonBids);\n // sort the common set\n Collections.sort(commonBidsList);\n // AV = Utility(BidBest) * Reluctance\n Agreement_Value = (commonBidsList.get(commonBidsList.size() - 1).getMyUndiscountedUtil()) * Reluctance;\n if (Agreement_Value > 0.85) {\n Agreement_Value = 0.85;\n }\n\n if (Agreement_Value < Minimum_Offer_Threshold * (3 - Math.pow(2, timeline.getTime()))) {\n Agreement_Value = Minimum_Offer_Threshold * (3 - Math.pow(2, timeline.getTime()));\n }\n }\n }\n\n if (action instanceof Inform) {\n // receive message first time, update the number of opponent\n opponentModelInterface = new OpponentModelManager(getNumberOfParties());\n }else if (action instanceof Offer) {\n // save the last offer\n lastOffer = ((Offer) action).getBid();\n // update opponent model by new bid from opponent\n opponentModelInterface.handleBidFromSender(sender.toString(), lastOffer, getDomain());\n }\n }",
"public synchronized void abilitarAbordaje() {\n abordar = true;\r\n notifyAll();\r\n while(pedidoAbordaje != 0){//Mientras los pasajeros esten abordando\r\n try {\r\n wait();\r\n } catch (InterruptedException ex) {\r\n Logger.getLogger(Vuelo.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n //Cuando los pasajeros hayan abordado el vuelo sale\r\n salio = true;\r\n System.out.println(\"El vuelo \" + nro + \" de \" + aerolinea + \" ha despegado\");\r\n }",
"private void liberateAroom() {\n\t\tif(this.adminLogin() == 1) {\n\t\t\tSystem.out.println(\"\\n------------------\\n| Bonjour Ibobai |\\n------------------\");\n\t\t\tfor(Chambre chambre : this.getChambres()) {\n\t\t\t\tif(chambre.equals(this.chambresNonVides().get(this.chambresNonVides().size()-1))) {\n\t\t\t\t\tchambre.setReserve(false);\n\t\t\t\t\tSystem.err.println(\"--------------------------------------------------\\nVous avez bien libérée cette chambre:\\n--------------------------------------------------\\n\");\n\t\t\t\t\tSystem.out.println(chambre.toString());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}else {\n\t\t\tSystem.err.println(\"----------------------------\\nVous n'êtes pas un admin! |\\n----------------------------\");\n\t\t}\n\t\t\n\t}",
"private void antiguedad() {\n\t\tint anti1, anti2, anti3;\n\t\tanti1 = socio1.antiguedad();\n\t\tanti2 = socio2.antiguedad();\n\t\tanti3 = socio3.antiguedad();\n\n\t\tif (anti1 > anti2 && anti1 > anti3) {\n\t\t\tSystem.out.println(\"El socio con mayor antiguedad es: \" + socio1.socio());\n\t\t} else {\n\t\t\tif (anti2 > anti3) {\n\t\t\t\tSystem.out.println(\"El socio con mayor antiguedad es: \" + socio2.socio());\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"El socio con mayor antiguedad es: \" + socio3.socio());\n\t\t\t}\n\n\t\t}\n\n\t}",
"public Cotisant visite(Contributeur c){ \n int somme = this.state.get(c); \n c.affecterSolde(somme); \n return c ; \n }",
"public void abrirCerradura(){\n cerradura.abrir();\r\n }",
"public void vistaInterfazNiveles (View view){\n Intent interfaz = new Intent(this,MainActivity.class);\n //Intancio el Objeto Intent que necesito enviar la información\n Intent enviar = new Intent( view.getContext(), MainNivelesReto.class );\n //Metodo que me permite crear variable\n enviar.putExtra(\"IdCategoria\", getIntent().getStringExtra(\"IdCategoria\") );\n startActivity(interfaz);\n finish();\n }",
"public void calculoPersonal(){\n ayudantes = getAyudantesNecesarios();\n responsables = getResponsablesNecesarios();\n \n //Calculo atencion al cliente (30% total trabajadores) y RRPP (10% total trabajadores):\n \n int total = ayudantes + responsables;\n \n atencion_al_cliente = (total * 30) / 100;\n \n RRPP = (total * 10) / 100;\n \n //Creamos los trabajadores\n \n gestor_trabajadores.crearTrabajadores(RRPP, ayudantes,responsables,atencion_al_cliente);\n \n }",
"public void construirCargo() {\n persona.setCargo(Cargos.SUPERVISOR);\n }",
"public static ArrayList<Integer> estadisticageneral() {\n\n\t\tArrayList<Integer> mensaje = new ArrayList<>();\n\n\t\tArrayList<Res> resesAntes = ResCRUD.select();\n\t\tArrayList<Res> resess = new ArrayList<>();\n\n\t\t\n\t\tfor (int i = 0; i < resesAntes.size(); i++) {\n\t\t\t\n\t\t\tif (resesAntes.get(i).getVivo()==1) {\n\t\t\t\t\n\t\t\t\tresess.add(resesAntes.get(i));\n\t\t\t}\n\t\t}\t\t\n\n\t\tArrayList<Potrero> potrero = PotreroCRUD.select();\n\n\t\tRes res = null;\n\n\t\tint potreros = potrero.size();\n\t\tint reses = resess.size();\n\t\tint hembras = 0;\n\t\tint machos = 0;\n\t\tint ch = 0;\n\t\tint hl = 0;\n\t\tint nv = 0;\n\t\tint vh = 0;\n\t\tint vp = 0;\n\t\tint cm = 0;\n\t\tint ml = 0;\n\t\tint mc = 0;\n\t\tint tp = 0;\n\n\t\tfor (int i = 0; i < resess.size(); i++) {\n\n\t\t\tres = resess.get(i);\n\n\t\t\tif (res.getGenero().equalsIgnoreCase(\"H\")) {\n\t\t\t\thembras++;\n\n\t\t\t\tswitch (res.getTipo()) {\n\n\t\t\t\tcase \"CH\":\n\n\t\t\t\t\tch++;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"HL\":\n\n\t\t\t\t\thl++;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"NV\":\n\n\t\t\t\t\tnv++;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"VH\":\n\n\t\t\t\t\tvh++;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"VP\":\n\n\t\t\t\t\tvp++;\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (res.getGenero().equalsIgnoreCase(\"M\")) {\n\t\t\t\tmachos++;\n\n\t\t\t\tswitch (res.getTipo()) {\n\n\t\t\t\tcase \"CM\":\n\n\t\t\t\t\tcm++;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"ML\":\n\n\t\t\t\t\tml++;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"MC\":\n\n\t\t\t\t\tmc++;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"TP\":\n\n\t\t\t\t\ttp++;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tmensaje.add(potreros);\n\t\tmensaje.add(reses);\n\t\tmensaje.add(hembras);\n\t\tmensaje.add(machos);\n\t\tmensaje.add(ch);\n\t\tmensaje.add(hl);\n\t\tmensaje.add(nv);\n\t\tmensaje.add(vh);\n\t\tmensaje.add(vp);\n\t\tmensaje.add(cm);\n\t\tmensaje.add(ml);\n\t\tmensaje.add(mc);\n\t\tmensaje.add(tp);\n\n\t\treturn mensaje;\n\t}",
"@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 void actionsTouches () {\n\t\t//Gestion des deplacements du mineur si demande\n\t\tif (Partie.touche == 'g' || Partie.touche == 'd' || Partie.touche == 'h' || Partie.touche == 'b') deplacements();\n\n\t\t//Affichage du labyrinthe et des instructions, puis attente de consignes clavier.\n\t\tpartie.affichageLabyrinthe();\n\n\t\t//Quitte la partie si demande.\n\t\tif (Partie.touche == 'q') partie.quitter();\n\n\t\t//Trouve et affiche une solution si demande.\n\t\tif (Partie.touche == 's') affichageSolution();\n\n\t\t//Recommence la partie si demande.\n\t\tif (Partie.touche == 'r') {\n\t\t\tgrille.removeAll();\n\t\t\tpartie.initialisation();\n\t\t}\n\n\t\t//Affichage de l'aide si demande\n\t\tif (Partie.touche == 'a') {\n\t\t\tString texteAide = new String();\n\t\t\tswitch(themeJeu) {\n\t\t\tcase 2 : texteAide = \"Le but du jeu est d'aider Link à trouver la sortie du donjon tout en récupérant le(s) coffre(s).\\n Link doit egalement recuperer la Master Sword qui permet de tuer le monstre bloquant le chemin.\\n\\nLink se déplace à l'aide des touches directionnelles.\\nUne solution peut-être affichée en appuyant sur la touche (s).\\nLa touche (r) permet de recommencer, (q) de quitter.\\n\\n Bon jeu !\"; break;\n\t\t\tcase 3 : texteAide = \"Le but du jeu est d'aider Samus à trouver la sortie du vaisseau tout en récupérant le(s) émeraude(s).\\nSamus doit egalement recuperer la bombe qui permet de tuer le metroid qui bloque l'accès à la sortie.\\n\\nSamus se déplace à l'aide des touches directionnelles.\\nUne solution peut-être affichée en appuyant sur la touche (s).\\nLa touche (r) permet de recommencer, (q) de quitter.\\n\\n Bon jeu !\"; break;\n\t\t\tcase 4 : texteAide = \"Le but du jeu est d'aider le pompier à trouver la sortie du batiment tout en sauvant le(s) rescapé(s).\\nLe pompier doit egalement recuperer l'extincteur qui permet d'éteindre le feu qui bloque l'accès à la sortie.\\n\\nLe pompier se déplace à l'aide des touches directionnelles.\\nUne solution peut-être affichée en appuyant sur la touche (s).\\nLa touche (r) permet de recommencer, (q) de quitter.\\n\\n Bon jeu !\"; break;\n\t\t\tcase 5 : texteAide = \"Le but du jeu est d'aider Mario à trouver le drapeau de sortie tout en ramassant le(s) pièce(s).\\nMario doit egalement recuperer l'étoile d'invincibilité qui permet de se débarasser du Goomba qui l'empêche de sortir.\\n\\nMario se déplace à l'aide des touches directionnelles.\\nUne solution peut-être affichée en appuyant sur la touche (s).\\nLa touche (r) permet de recommencer, (q) de quitter.\\n\\n Here we gooo !\"; break;\n\t\t\tdefault : texteAide = \"Le but du jeu est d'aider le mineur à trouver la sortie du labyrinthe tout en extrayant le(s) filon(s).\\nLe mineur doit egalement recuperer la clef qui permet l'ouverture de le porte qui bloque l'accès à la sortie.\\n\\nLe mineur se déplace à l'aide des touches directionnelles.\\nUne solution peut-être affichée en appuyant sur la touche (s).\\nLa touche (r) permet de recommencer, (q) de quitter.\\n\\n Bon jeu !\"; break;\n\t\t\t}\n\t\t\tSystem.out.println(\"\\n============================================ AIDE ========================================\\n\\n\" + texteAide + \"\\n\\n==========================================================================================\\n\");\n\t\t\tJOptionPane.showMessageDialog(null, texteAide, \"Aide\", JOptionPane.QUESTION_MESSAGE);\n\t\t\tPartie.touche = ' ';\n\t\t}\n\n\t\t//Affichage de les infos si demande\n\t\tif (Partie.touche == 'i') {\n\t\t\tSystem.out.println(\"\\n============================================ INFOS =======================================\\n\\nCe jeu a ete developpe par Francois ADAM et Benjamin Rancinangue\\ndans le cadre du projet IPIPIP 2015.\\n\\n==========================================================================================\\n\");\n\t\t\tPartie.touche = ' ';\n\t\t\tJOptionPane.showMessageDialog(null, \"Ce jeu a été développé par François Adam et Benjamin Rancinangue\\ndans le cadre du projet IPIPIP 2015.\", \"Infos\", JOptionPane.INFORMATION_MESSAGE, new ImageIcon(getClass().getResource(\"/images/EMN.png\")));\n\t\t}\n\n\t\t//Nettoyage de l'ecran de console\n\t\tSystem.out.println(\"\\n==========================================================================================\\n\");\n\t}",
"public AppareilSecurise(String p_Marque, String p_Modele, int p_Puissance, int p_incPuissance,\r\n\t\t\tint p_valeurThermostatMax) {\r\n\t\tsuper(p_Marque, p_Modele, p_Puissance, p_incPuissance, p_valeurThermostatMax);\r\n\t}",
"public IRecepteur quiEstAuDessus();",
"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 }",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"private void executeRicercaAccertamentoPerOrdinativo() {\n \tif (model.getGestioneOrdinativoStep1Model().getAnnoAccertamento() == null || model.getGestioneOrdinativoStep1Model().getNumeroAccertamento() == null) {\n\n \t\tif(!sonoInAggiornamento()){\n \t\t\t\n \t\t\tmodel.getGestioneOrdinativoStep2Model().setListaAccertamento(new ArrayList<Accertamento>());\n \t\t\tmodel.getGestioneOrdinativoStep2Model().setListaAccertamentoOriginale(new ArrayList<Accertamento>());\n \t\t\tmodel.getGestioneOrdinativoStep2Model().setResultSize(0);\n\n \t\t\tRicercaAccertamentiSubAccertamenti request= new RicercaAccertamentiSubAccertamenti();\n \t\t\trequest.setEnte(sessionHandler.getEnte());\n \t\t\trequest.setRichiedente(sessionHandler.getRichiedente());\n\n\n \t\t\tParametroRicercaAccSubAcc param= new ParametroRicercaAccSubAcc();\n \t\t\tparam.setAnnoEsercizio(Integer.parseInt(sessionHandler.getAnnoEsercizio()));\n \t\t\tparam.setAnnoAccertamento(Integer.parseInt(sessionHandler.getAnnoEsercizio()));\n \t\t\tparam.setDisponibilitaAdIncassare(true);\n\n \t\t\t// Capitolo\n \t\t\tif (model.getGestioneOrdinativoStep1Model().getCapitolo() != null) {\n \t\t\t\tparam.setNumeroCapitolo(model.getGestioneOrdinativoStep1Model().getCapitolo().getNumCapitolo());\n \t\t\t\tparam.setNumeroArticolo(model.getGestioneOrdinativoStep1Model().getCapitolo().getArticolo());\n \t\t\t\tif(null!=model.getGestioneOrdinativoStep1Model().getCapitolo().getUeb()){\n \t\t\t\t\tparam.setNumeroUEB(model.getGestioneOrdinativoStep1Model().getCapitolo().getUeb().intValue());\n \t\t\t\t}\n \t\t\t}\n\n\n \t\t\tparam.setCodiceDebitore(model.getGestioneOrdinativoStep1Model().getSoggetto().getCodCreditore());\n \t\t\tparam.setIsRicercaDaAccertamento(false);\n \t\t\trequest.setParametroRicercaAccSubAcc(param);\n\n\n \t\t\taddNumAndPageSize(request, \"listaAccertamentoOrdinativoId\");\n\n \t\t\tRicercaAccertamentiSubAccertamentiResponse response= movimentoGestionService.ricercaAccertamentiSubAccertamentiPerOrdinativoIncasso(request);\n\n \t\t\tif(response.isFallimento() || !response.getErrori().isEmpty()){\n\n \t\t\t\t//setto gli errori cosi che siano segnalati lato app!\n \t\t\t\taddErrori(response.getErrori());\n\n \t\t\t}else{\n\n \t\t\t\tif (response.getListaAccertamenti() != null && response.getListaAccertamenti().size() > 0) {\n \t\t\t\t\tfor (Accertamento currentAccetamento : response.getListaAccertamenti()) {\n \t\t\t\t\t\taddAccertamentiESubAccertamentiInUnicaLista(currentAccetamento);\n \t\t\t\t\t}\n\n \t\t\t\t\tmodel.getGestioneOrdinativoStep2Model().setResultSize(response.getNumRisultati());\n \t\t\t\t\t\n \t\t\t\t\tif(model.getGestioneOrdinativoStep2Model().getListaAccertamento()==null || model.getGestioneOrdinativoStep2Model().getListaAccertamento().size()==0){\n \t\t\t\t\t\taddPersistentActionWarning(ErroreFin.CRU_WAR_1003.getErrore().getCodice()+\" : \"+ErroreFin.CRU_WAR_1003.getErrore(\" accertamenti o subaccertamenti\").getDescrizione());\n \t\t\t\t\t}\n \t\t\t\t} else {\n \t\t\t\t\taddPersistentActionWarning(ErroreFin.CRU_WAR_1003.getErrore().getCodice()+\" : \"+ErroreFin.CRU_WAR_1003.getErrore(\" accertamenti o subaccertamenti\").getDescrizione());\n \t\t\t\t}\n \t\t\t}\n\n \t\t}\n \t}\n }",
"public void comenzarDiaLaboral() {\n\t\tSystem.out.println(\"AEROPUERTO: Inicio del dia laboral, se abren los puestos de informe, atención y freeshops al público, el conductor del tren llega a tiempo como siempre\");\n\t\tthis.turnoPuestoDeInforme.release();\n\t\t}",
"@Override\n\tpublic void concentrarse() {\n\t\tSystem.out.println(\"Se centra en sacar lo mejor del Equipo\");\n\t\t\n\t}",
"@Override\n public synchronized void demarrer(){\n if(modele.getQuiterJeu()){return;}\n modele.getMoteurJeu().setEtapeJeu(this);\n // apercu dans le termial pour debuger\n System.out.println(\"-----------------nom joueur: \"+modele.getJoueurCourant().getNom());\n System.out.print(\" humain: \"+modele.getJoueurCourant().estHumain());\n System.out.print(\" stand: \"+modele.getJoueurCourant().getMainCourant().getStand());\n System.out.print(\" perdu: \"+modele.getJoueurCourant().getMainCourant().estPerdu());\n System.out.print(\" blackjack: \"+modele.getJoueurCourant().getMainCourant().estBlackJack());\n System.out.println(\" jeu: \"+modele.getJoueurCourant().getMainCourant().getJeu().toString());\n //-------------------------------------------------\n // On ne fait pas une boucle ici pour que l'observer\n // puisse acceder a son observé et se mettre a jour\n //-------------------------------------------------\n new Thread(){\n @Override\n public void run() {\n try {\n // si plus de carte\n if(modele.getPioche().getCartes().size() < 1){\n for(Carte carte:modele.getDefausse().getCartes()){\n carte.setFaceCarte(Face.VERSO);\n modele.getPioche().ajouterDessous(carte);\n }\n modele.getDefausse().vider();\n modele.getPioche().melanger();\n }\n \n \n // si il peut plus jouer\n if(modele.getJoueurCourant().getMainCourant().estBlackJack() || modele.getJoueurCourant().getMainCourant().estPerdu() \n || modele.getJoueurCourant().getMainCourant().getStand() || modele.getJoueurCourant().getMainCourant().est21()\n || modele.getJoueurCourant().getMainCourant().getAAbandonner() || modele.getJoueurCourant().getAPerduJeu()){\n \n // si le joueur a une autre main\n if(modele.getJoueurCourant().mainSuivant()){\n Thread.sleep(2000);\n demarrer();\n \n }\n // sinon si il y a un joueur suivant on fait joueur suivant\n else if(modele.joueurSuivant()){\n Thread.sleep(2000);\n demarrer();\n }else{\n modele.getMoteurJeu().setEtapeJeu(etapeSuivant);\n Thread.sleep(2000);\n modele.setMessage(modele.getCroupier().getNom()+\" plays\");\n // on affiche les carte du croupier\n for(Carte carte: modele.getCroupier().getMainCourant().getJeu().getCartes()){\n carte.setFaceCarte(Face.RECTO);\n }\n System.out.println(\"+++++++++++++++++++++++++++++++++++++++++++++++++\");\n Thread.sleep(3000);\n demarrerEtapeSuivant();\n\n }\n\n }\n // sinon\n else{\n modele.setMessage(modele.getJoueurCourant().getNom()+\" plays\");\n if(!modele.getJoueurCourant().estHumain()){\n modele.getJoueurCourant().jouer(modele.getPioche(),modele.getDefausse());\n Thread.sleep(3000);\n demarrer();\n }\n \n\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }.start();\n \n }",
"private void jogarIa() {\n\t\tia = new IA(this.mapa,false);\r\n\t\tia.inicio();\r\n\t\tthis.usouIa = true;\r\n\t\tatualizarBandeirasIa();//ATUALIZA AS BANDEIRAS PARA DEPOIS QUE ELA JOGOU\r\n\t\tatualizarNumeroBombas();//ATUALIZA O NUMERO DE BOMBAS PARA DPS QUE ELA JOGOU\r\n\t\tatualizarTela();\r\n\t\tif(ia.isTaTudoBem() == false)\r\n\t\t\tJOptionPane.showMessageDialog(this, \"IMPOSSIVEL PROSSEGUIR\", \"IMPOSSIVEL ENCONTRAR CASAS CONCLUSIVAS\", JOptionPane.INFORMATION_MESSAGE);\r\n\t}",
"public Candidatura (){\n \n }",
"public Coup coupIA() {\n\n int propriete = TypeCoup.CONT.getValue();\n int bloque = Bloque.NONBLOQUE.getValue();\n Term A = intArrayToList(plateau1);\n Term B = intArrayToList(plateau2);\n Term C = intArrayToList(piecesDispos);\n Variable D = new Variable(\"D\");\n Variable E = new Variable(\"E\");\n Variable F = new Variable(\"F\");\n Variable G = new Variable(\"G\");\n Variable H = new Variable(\"H\");\n org.jpl7.Integer I = new org.jpl7.Integer(co.getValue());\n q1 = new Query(\"choixCoupEtJoue\", new Term[] {A, B, C, D, E, F, G, H, I});\n\n\n if (q1.hasSolution()) {\n Map<String, Term> solution = q1.oneSolution();\n int caseJ = solution.get(\"D\").intValue();\n int pion = solution.get(\"E\").intValue();\n Term[] plateau1 = listToTermArray(solution.get(\"F\"));\n Term[] plateau2 = listToTermArray(solution.get(\"G\"));\n Term[] piecesDispos = listToTermArray(solution.get(\"H\"));\n for (int i = 0; i < 16; i++) {\n if (i < 8) {\n this.piecesDispos[i] = piecesDispos[i].intValue();\n }\n this.plateau1[i] = plateau1[i].intValue();\n this.plateau2[i] = plateau2[i].intValue();\n }\n\n int ligne = caseJ / 4;\n int colonne = caseJ % 4;\n\n if (pion == 1 || pion == 5) {\n pion = 1;\n }\n if (pion == 2 || pion == 6) {\n pion = 0;\n }\n if (pion == 3 || pion == 7) {\n pion = 2;\n }\n if (pion == 4 || pion == 8) {\n pion = 3;\n }\n\n\n Term J = intArrayToList(this.plateau1);\n q1 = new Query(\"gagne\", new Term[] {J});\n System.out.println(q1.hasSolution() ? \"Gagné\" : \"\");\n if (q1.hasSolution()) {\n propriete = 1;\n }\n return new Coup(bloque,ligne, colonne, pion, propriete);\n }\n System.out.println(\"Bloqué\");\n return new Coup(1,0, 0, 0, 3);\n }",
"public void acheter(){\n\t\t\n\t\t// Achete un billet si il reste des place\n\t\ttry {\n\t\t\tthis.maBilleterie.vendre();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tthis.status.put('B', System.currentTimeMillis());\n\t\tSystem.out.println(\"STATE B - Le festivalier \" + this.numFestivalier + \" a acheté sa place\");\n\t}",
"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}",
"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 void action() {\n\t\t\ttreinador.Correu();\r\n\t\t\ttreinador.Perdeu();\r\n\t\t\treturn;\r\n\t\t}",
"private void recolteNourriture() {\r\n\t\t\t//1pop recolte toute la case\r\n\t\t\tint tempNourr = 0;\r\n\t\t\tint totalPop = population + populationColoniale;\r\n\t\t\tint limite = (totalPop < caseOwned.size()) ? totalPop : caseOwned.size();\r\n\t\t\tfor(int id = 0; id < limite; id++) {\r\n\t\t\t\ttempNourr += caseOwned.get(id).getFood();\r\n\t\t\t}\r\n\t\t\t//animaux\r\n\t\t\ttempNourr += howManyAnimal(Animaux.Bétail) * 10; //Ca mange de l'herbe, ça se tente.\r\n\t\t\ttempNourr += howManyAnimal(Animaux.Cervidés) * 7.5; //CARIBOUUUUUUUUU !!\r\n\t\t\ttempNourr += howManyAnimal(Animaux.Crabe) * 2; //ca pique les pied, a mort!!\r\n\t\t\ttempNourr += howManyAnimal(Animaux.Elephants) * 30; //polution sonore\r\n\t\t\ttempNourr += howManyAnimal(Animaux.Moutons) * 5; //kébab landais\r\n\t\t\ttempNourr += howManyAnimal(Animaux.Poissons) * 5; //croustibat\r\n\t\t\ttempNourr += howManyAnimal(Animaux.Chevaux) * 7; //lasagnes\r\n\t\t\ttempNourr += howManyAnimal(Animaux.Baleines) * 50; //*bruit de baleine virile*\r\n\t\t\t//aplication des bonus\r\n\t\t\ttempNourr *= (1 + (0.15 * scienceLvl) + (0.05 * (bonheur - baseBonheur))); // +15% par scienceLvl +5% par bonheur excedentaire, -5% par bonheur négatif\r\n\t\t\t\r\n\t\t\tnourriture += tempNourr;\r\n\t\t\t//bonus de conservation grâce au sel\r\n\t\t\tif(howManyRessource(StrategicRessource.Sel) > 0 && nourriture > 0) nourriture *= 1.10;\r\n\t\t\t//limitation de stockage\r\n\t\t\tint stockageMax = caseOwned.size() * 100 * scienceLvl;\r\n\t\t\tif(nourriture > stockageMax) nourriture = stockageMax;\r\n\t\t}",
"private void grabarIndividuoPCO(final ProyectoCarreraOferta proyectoCarreraOferta) {\r\n /**\r\n * PERIODO ACADEMICO ONTOLOGÍA\r\n */\r\n OfertaAcademica ofertaAcademica = ofertaAcademicaService.find(proyectoCarreraOferta.getOfertaAcademicaId());\r\n PeriodoAcademico periodoAcademico = ofertaAcademica.getPeriodoAcademicoId();\r\n PeriodoAcademicoOntDTO periodoAcademicoOntDTO = new PeriodoAcademicoOntDTO(periodoAcademico.getId(), \"S/N\",\r\n cabeceraController.getUtilService().formatoFecha(periodoAcademico.getFechaInicio(), \"yyyy-MM-dd\"),\r\n cabeceraController.getUtilService().formatoFecha(periodoAcademico.getFechaFin(), \"yyyy-MM-dd\"));\r\n cabeceraController.getOntologyService().getPeriodoAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getPeriodoAcademicoOntService().write(periodoAcademicoOntDTO);\r\n /**\r\n * OFERTA ACADEMICA ONTOLOGÍA\r\n */\r\n OfertaAcademicaOntDTO ofertaAcademicaOntDTO = new OfertaAcademicaOntDTO(ofertaAcademica.getId(), ofertaAcademica.getNombre(),\r\n cabeceraController.getUtilService().formatoFecha(ofertaAcademica.getFechaInicio(),\r\n \"yyyy-MM-dd\"), cabeceraController.getUtilService().formatoFecha(ofertaAcademica.getFechaFin(), \"yyyy-MM-dd\"),\r\n periodoAcademicoOntDTO);\r\n cabeceraController.getOntologyService().getOfertaAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getOfertaAcademicoOntService().write(ofertaAcademicaOntDTO);\r\n\r\n /**\r\n * NIVEL ACADEMICO ONTOLOGIA\r\n */\r\n Carrera carrera = carreraService.find(proyectoCarreraOferta.getCarreraId());\r\n Nivel nivel = carrera.getNivelId();\r\n NivelAcademicoOntDTO nivelAcademicoOntDTO = new NivelAcademicoOntDTO(nivel.getId(), nivel.getNombre(),\r\n cabeceraController.getValueFromProperties(PropertiesFileEnum.URI, \"nivel_academico\"));\r\n cabeceraController.getOntologyService().getNivelAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getNivelAcademicoOntService().write(nivelAcademicoOntDTO);\r\n /**\r\n * AREA ACADEMICA ONTOLOGIA\r\n */\r\n AreaAcademicaOntDTO areaAcademicaOntDTO = new AreaAcademicaOntDTO(carrera.getAreaId().getId(), \"UNIVERSIDAD NACIONAL DE LOJA\",\r\n carrera.getAreaId().getNombre(), carrera.getAreaId().getSigla(),\r\n cabeceraController.getValueFromProperties(PropertiesFileEnum.URI, \"area_academica\"));\r\n cabeceraController.getOntologyService().getAreaAcademicaOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getAreaAcademicaOntService().write(areaAcademicaOntDTO);\r\n /**\r\n * CARRERA ONTOLOGÍA\r\n */\r\n CarreraOntDTO carreraOntDTO = new CarreraOntDTO(carrera.getId(), carrera.getNombre(), carrera.getSigla(), nivelAcademicoOntDTO,\r\n areaAcademicaOntDTO);\r\n cabeceraController.getOntologyService().getCarreraOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getCarreraOntService().write(carreraOntDTO);\r\n /**\r\n * PROYECTO CARRERA OFERTA ONTOLOGY\r\n */\r\n \r\n ProyectoCarreraOfertaOntDTO proyectoCarreraOfertaOntDTO = new ProyectoCarreraOfertaOntDTO(proyectoCarreraOferta.getId(),\r\n ofertaAcademicaOntDTO, sessionProyecto.getProyectoOntDTO(), carreraOntDTO);\r\n cabeceraController.getOntologyService().getProyectoCarreraOfertaOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getProyectoCarreraOfertaOntService().write(proyectoCarreraOfertaOntDTO);\r\n }",
"final void moureExercit(final Main campB) {\n\n Random r = new Random();\n\n int indexRandom = r.nextInt(soldats.size());\n\n if (!soldats.get(indexRandom).isHaArribat()) {\n soldats.get(indexRandom).mouSoldat(ubicacio, campB);\n\n }\n\n }",
"public void distribuirAportes2(){\n\n if(comprobanteSeleccionado.getAporteorganismo().floatValue() > 0f){\n comprobanteSeleccionado.setAportecomitente(comprobanteSeleccionado.getMontoaprobado().subtract(comprobanteSeleccionado.getAporteuniversidad().add(comprobanteSeleccionado.getAporteorganismo())));\n }\n }",
"public void moverArriba() {\n estado = EstadosPersonaje.QUIETO;\n mover(new Vector2(0, 1));\n }",
"@Override\n\t\t\t\tpublic void action() {\n\t\t\t\t\t\tRandom r = new Random();\n\t\t\t\t\t\tint Low = 1;\n\t\t\t\t\t\tint High = 999;\n\t\t\t\t\t\tint Result = r.nextInt(High-Low) + Low;\n\t\t\t\t\t\tACLMessage msg = new ACLMessage(ACLMessage.REQUEST);\n\t\t\t\t\t\tmsg.setOntology(\"AirConditioner\");\n\t\t\t\t\t\tmsg.addReceiver(new AID(\"da\", AID.ISLOCALNAME));\n//\t\t\t\t\t\tif (Result % 2 == 0){\n//\t\t\t\t\t\t\t//humid mode\n//\t\t\t\t\t\t\tmsg.setContent(\"humid\");\n//\t\t\t\t\t\t\tSystem.out.println(\"Agent \"+ myAgent.getLocalName() + \": operating mode: humid\" );\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse if((Result % 3 == 0)) {\n//\t\t\t\t\t\t\t//mid\n//\t\t\t\t\t\t\tmsg.setContent(\"mid\");\n//\t\t\t\t\t\t\tSystem.out.println(\"Agent \"+ myAgent.getLocalName() + \": operating mode: mid\" );\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse if((Result % 5 == 0)) {\n//\t\t\t\t\t\t\t//high\n//\t\t\t\t\t\t\tmsg.setContent(\"mid\");\n//\t\t\t\t\t\t\tSystem.out.println(\"Agent \"+ myAgent.getLocalName() + \": operating mode: high\" );\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse {\n//\t\t\t\t\t\t\t//low\n//\t\t\t\t\t\t\tmsg.setContent(\"mid\");\n//\t\t\t\t\t\t\tSystem.out.println(\"Agent \"+ myAgent.getLocalName() + \": operating mode: low\" );\n//\t\t\t\t\t\t}\n\t\t\t\t\t\tmsg.setContent(Airconditioner_Agent.mode);\n\t\t\t\t\t\tSystem.out.println(\"Agent \"+ myAgent.getLocalName() + \": operating mode: \"+Airconditioner_Agent.mode );\n\t\t\t\t\t\tmyAgent.send(msg);\n\t\t\t\t\t}",
"public void venceuRodada () {\n this.pontuacaoPartida++;\n }",
"@Test\n\tpublic void driverReenvioDeChirpAChorbi() {\n\t\tfinal Object testingData[][] = {\n\t\t\t{\n\t\t\t\t\"chorbi1\", \"Envio1\", \"text1\", this.actorService.findOne(277), 279, null\n\t\t\t}, {\n\t\t\t\t\"chorbi2\", \"Envio2\", \"text2\", this.actorService.findOne(273), 280, null\n\t\t\t}, {\n\t\t\t\t\"chorbi1\", \"Envio4\", \"text4\", this.actorService.findOne(276), 280, IllegalArgumentException.class\n\t\t\t}, {\n\t\t\t\t\"chorbi1\", \"\", \"text1\", this.actorService.findOne(275), 279, ConstraintViolationException.class\n\t\t\t}\n\t\t};\n\n\t\tfor (int i = 0; i < testingData.length; i++)\n\t\t\tthis.reenvioDeChirpAChorbi((String) testingData[i][0], (String) testingData[i][1], (String) testingData[i][2], (Actor) testingData[i][3], (int) testingData[i][4], (Class<?>) testingData[i][5]);\n\t}",
"public static void main(String[] args) {\n Animal unAnimalRavioso = new Animal();\n System.out.println(unAnimalRavioso.informaEnergia());\n\n //Al objeto le digo que corra\n unAnimalRavioso.correr();\n\n //Imprimo la energia\n System.out.println(unAnimalRavioso.informaEnergia());\n\n Comida unPaty = new Comida();\n unPaty.setEnergia(120);\n System.out.println(unPaty.getEnergia());\n\n System.out.println(\"Energia antes de comer paty \" + unAnimalRavioso.informaEnergia());\n unAnimalRavioso.comer(unPaty);\n\n System.out.println(\"Energia despues de comer paty \" + unAnimalRavioso.informaEnergia());\n\n Perro perroCobarde = new Perro();\n perroCobarde.hacerRuido();\n\n Gato gatoCobarde = new Gato();\n ArrayList<Animal>animales = new ArrayList<>();\n\n animales.add(perroCobarde);\n animales.add(gatoCobarde);\n\n System.out.println(\"hacer ruido animales\");\n for (Animal unAnimal:animales) {\n unAnimal.hacerRuido();\n }\n\n\n\n }",
"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 analizarRespuestasPrueba(ArrayList respuestas, Candidato candidatoactual, Prueba tipopruebaactual, Convocatoria convocatoriaactual, ArrayList rolesactuales, Resultado resultadoactual)\r\n\t{\r\n\t\t//se elimina el permiso asignado al candidato al terminar de presentar la prueba.\r\n\t\tPermiso permisocandidato = 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\tpermisocandidato = PermisoBD.buscarCandidato(candidatoactual.getIdcandidato(), 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(permisocandidato != null)\r\n\t\t{\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\tPermisoBD.eliminar(permisocandidato.getIdpermiso(), conector);\r\n\t\t\t\tconector.terminarConexionBaseDatos();\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\t//se calcula los puntajes, luego se analizan estos puntajes para determinar las observaciones, para finalmente almacenar los resultados de la prueba candidato\r\n\t\tmotorinferencia.calcularPuntajesTodasLasEscalas(respuestas);\r\n\t\tmotorinferencia.calcularPuntajeRoles(rolesactuales);\r\n\t\tmotorinferencia.calcularPuntajeResultadoPrueba(resultadoactual, rolesactuales);\r\n\t\tmotorinferencia.determinarObservacionesResultadoPrueba();\r\n\t\tmotorinferencia.almacenarResultadoPruebaCandidato(candidatoactual, tipopruebaactual, convocatoriaactual);\r\n\t}",
"public interface IRecepteur {\n\t\n\t\n\t/**\n\t * Methode permettant de recevoir un porcelet\n\t * @param p le porcelet \n\t */\n\tpublic void recevoir(IPorcelet p);\n\t\n\t/**\n\t * Methode permettant d'acceder au porcelet en dessous\n\t * @return le porcelet en dessous : Null si c'est une case, un porcelet sinon\n\t */\n\tpublic IRecepteur quiEstEnDessous();\n\t\n\t/** \n\t * Methode qui retourne la case sur laquelle se trouve le porcelet\n\t * renvoie null si le recepteur est une case\n\t **/\n\tpublic ICase retourneLaCase() ;\n\t\n\t/**\n\t * Methode permettant d'acceder au porcelet au dessus\n\t * @return le porcelet au dessus : Null si il n'y a personne, un porcelet sinon\n\t */\n\tpublic IRecepteur quiEstAuDessus();\n\t\n\t/** \n\t * Predicat pour tester si le porcelet occupe la case\n\t **/\n\tpublic boolean estSurLaCase(ICase c) ;\n\t\n\t/**\n\t * Methode utilisee uniquement pour les porcelets\n\t * @return le joueur proprietaire du porcelet\n\t */\n\tpublic IJoueur quiEstMonMaitre();\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 }",
"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 static void miedo(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n aleatorio = (numeroAleatorio.nextInt(10-5+1)+5);\n \n if(oro>aleatorio){//condicion de finalizar battalla y sus acciones\n oroPerdido= (nivel*2)+aleatorio;\n oro= oro-oroPerdido;\n System.out.println(\"Huiste de la batalla!!!\");\n\t\t System.out.println(\"oro perdido:\"+oroPerdido);\n opcionMiedo=1; //finalizando battalla por huida del jugador \n }\n else{\n System.out.println(\"No pudes huir de la batalla\");\n } \n }",
"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 Message action(Joueur joueurCourant) {\r\n\t\t\r\n\t\treturn new Message(Message.Types.effetClassique);\r\n\t}",
"public static void main(String[] args) {\n \n //Joueur zidane=new Joueur(\"zidane\",\"zinedine\",\"zizou\", \"12/07/1995\",\"marseille\",\"francais\",75.5f,1.82f, Sexe.HOMME,Pied.AMBIDEXTRE,Tenue.SHORT,34,Sponsor.FLY_EMIRATES);\n // Attaquant messi=new Attaquant(\"zidane\",\"zinedine\",\"zizou\", \"12/07/1995\",\"marseille\",\"francais\",75.5f,1.82f, Sexe.HOMME,Pied.AMBIDEXTRE,Tenue.SHORT,10,Sponsor.FLY_EMIRATES,PosteJoueur.DEFENSEUR);\n //Milieu xavi=new Milieu(\"xavi\",\"xava\",\"go\", \"12/07/1990\",\"barcelone\",\"espagnol\",78.5f,1.85f, Sexe.HOMME,Pied.DROIT,Tenue.JOGGING,15,Sponsor.FLY_EMIRATES,PosteJoueur.DEFENSEUR);\n //Defenseur ramos=new Defenseur(\"xavi\",\"ramos\",\"ifjiej\", \"18/07/1990\",\"madrid\",\"espagnol\",78.5f,1.88f, Sexe.HOMME,Pied.GAUCHE,Tenue.SHORT,15,Sponsor.FLY_EMIRATES,PosteJoueur.MILIEU);\n //ramos.celebrer();\n //ramos.defendre();\n //Gardien neuer=new Gardien(\"neuer\",\"manuel\",\"ifjiej\", \"18/07/1991\",\"Bayern\",\"bayern\",88.5f,1.95f, Sexe.HOMME,Pied.GAUCHE,Tenue.SHORT,15,Sponsor.FLY_EMIRATES);\n //neuer.sortir();\n //Spectateur paul=new Spectateur(\"bollart\",12,false,false);\n //Arbitre guillaume=new Arbitre(\"ovigneur\",\"guillaume\",\"guigou\",\"12/07/1676\",\"Lille\", \"France\", 1.98f,1.67f,Sexe.HOMME,Pied.DROIT,Tenue.SHORT,48,Sponsor.MORELLE);\n Equipe marseille= new Equipe (NomEquipe.OM);\n Equipe paris= new Equipe (NomEquipe.PSG);\n Match match=new Match(TypeTerrain.GAZON,marseille,paris);\n match.simulerMatch();\n System.out.println(match.equipeGagnante);\n System.out.println(marseille.attaquants[2].getStatTir());\n \n Tournoi tournoi = new Tournoi(); \n tournoi.qualificaionsTournoi();\n tournoi.huitiemes();\n tournoi.quarts();\n tournoi.demi();\n tournoi.finale();\n \n System.out.println(tournoi.getEquipeEnLis());\n System.out.println(tournoi.getEquipeQualifie());\n System.out.println(tournoi.getEquipePerdanteHuit());\n System.out.println(tournoi.getEquipeGagnanteHuit());\n System.out.println(tournoi.getEquipePerdanteQuarts());\n System.out.println(tournoi.getEquipeGagnanteQuarts());\n System.out.println(tournoi.getEquipePerdanteDemi());\n System.out.println(tournoi.getEquipeGagnanteDemi());\n System.out.println(tournoi.getEquipeFinale());\n\n \n \n //Mise en place de \"l'interface\"\n Scanner sc = new Scanner(System.in);\n \n //Choix du mode de jeu\n System.out.println(\"\\n *** Choix du mode de jeu *** \\n\\t| tournoi : taper 1|\\n\\t| mode solo : taper 2|\");\n int modeDeJeu = sc.nextInt();\n sc.nextLine(); //On vide la ligne\n \n //AJOUTER UNE EXCEPTION POUR LE MODE DE JEU\n \n \n \n //Choix de l'equipe a l'aide d'un scanner\n// System.out.println(\"Choisissez votre équipe :\");\n// NomEquipe equipe;\n// Equipe equipeChoisit = new Equipe(nomEquipe);\n \n\n\n /*Scanner sc = new Scanner(System.in);\n System.out.println(\"Voulez vous disputer un match ? Oui=1 ou NON=2 \");\n int i = sc.nextInt();\n System.out.println(\"Saisissez le numéro de l'equipe avec laquelle vous voulez Jouez \"\n + \"PSG :1\"\n + \"MARSEILLE:2 \");\n //On vide la ligne avant d'en lire une autre\n sc.nextLine();\n int equipe = sc.nextInt(); \n System.out.println(\"FIN ! \");\n \n switch(equipe) {\n case 1:\n Equipe paris= new Equipe (NomEquipe.PSG);\n System.out.println(paris.stade);\n break;\n case 2 :\n Equipe marseille= new Equipe (NomEquipe.OM);\n System.out.println(marseille.stade);\n \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 }",
"private void ajouterPot (int somme) {\r\n\t\tbanque.ajouter(somme);\r\n\t}"
]
| [
"0.6156156",
"0.60783446",
"0.5943292",
"0.59376246",
"0.59139246",
"0.5908114",
"0.5860505",
"0.5851091",
"0.5807388",
"0.5766564",
"0.5757402",
"0.5751942",
"0.5737166",
"0.5723882",
"0.5697107",
"0.5691608",
"0.5691365",
"0.56881493",
"0.5650249",
"0.5646645",
"0.56444293",
"0.5625097",
"0.559534",
"0.5582956",
"0.5562757",
"0.5562374",
"0.55411494",
"0.5538206",
"0.5535364",
"0.55289394",
"0.55122656",
"0.54906255",
"0.5487242",
"0.548149",
"0.5481416",
"0.54775333",
"0.5472981",
"0.54664826",
"0.54582095",
"0.5456546",
"0.5450781",
"0.54463595",
"0.5435845",
"0.54292685",
"0.5428249",
"0.542185",
"0.5416532",
"0.54133266",
"0.5411547",
"0.5390149",
"0.5385446",
"0.53810215",
"0.5379435",
"0.5368261",
"0.5366702",
"0.5363722",
"0.5355039",
"0.5332413",
"0.5331602",
"0.5328028",
"0.5323872",
"0.5320966",
"0.5318945",
"0.53158176",
"0.5306944",
"0.5303678",
"0.5300735",
"0.5291984",
"0.52830225",
"0.52820456",
"0.5280874",
"0.5278861",
"0.52781314",
"0.52771944",
"0.5274026",
"0.52699625",
"0.52586013",
"0.5254127",
"0.52476585",
"0.5246913",
"0.52467877",
"0.52343625",
"0.5234217",
"0.5232346",
"0.5225891",
"0.52233136",
"0.52201337",
"0.5214482",
"0.521181",
"0.51950455",
"0.51929957",
"0.5182356",
"0.51807743",
"0.5179524",
"0.5176178",
"0.5175724",
"0.5173364",
"0.51733",
"0.5173132",
"0.51679796",
"0.51670873"
]
| 0.0 | -1 |
soumission des candidatures de l'agent comme formateur | public void postulerFormateur(List<Session> list) {// OK
for (Session session : list) {
String valID = String.valueOf(session.getId());
String prio = String.valueOf(session.getPrio());
service.path(idConnexion + "/submit").queryParam("role", "Formateur").queryParam("session", valID)
.queryParam("prio", prio);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void consulterBoiteVocale() {\n for (int i = 0; i < this.boiteVocale.getListeMessagesVocaux().size(); i++) {\n //on passe l'attribut consulte à true pour savoir qu'il a été vu pour la facturation\n this.boiteVocale.getListeMessagesVocaux().get(i).setConsulte(true);\n }\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 void choicePersonage() {\n\t\tSystem.out.println(\"souhaitez-vous créer un guerrier ou un magicien ?\");\n\t\tchoice = sc.nextLine().toLowerCase();\t\t\t\n\t\tSystem.out.println(\"Vous avez saisi : \" + choice);\n\t\tif(!(choice.equals(MAGICIEN) || choice.equals(GUERRIER))) {\n\t\t\tchoicePersonage();\n\t\t}\n\t\tsaisieInfoPersonage(choice);\n\t}",
"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 }",
"protected void filtrarEstCid() {\r\n\t\tif (cmbx_cidade.getSelectedItem() != \"\" && cmbx_estado.getSelectedItem() != \"\") {\r\n\t\t\tStringBuilder filtracomando = new StringBuilder();\r\n\r\n\t\t\tfiltracomando\r\n\t\t\t\t\t.append(comando + \" WHERE ESTADO = '\" + Estado.validar(cmbx_estado.getSelectedItem().toString())\r\n\t\t\t\t\t\t\t+ \"' AND CIDADE = '\" + cmbx_cidade.getSelectedItem().toString() + \"'\");\r\n\t\t\tlistacliente = tabelaCliente.mostraRelatorio(filtracomando.toString());\r\n\r\n\t\t\ttablecliente.setModel(tabelaCliente);\r\n\r\n\t\t} else {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Escolha a Cidade e o Estado que deseja Filtrar\");\r\n\t\t}\r\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 }",
"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 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 void actionPerformed(ActionEvent arg0) {\n\t\t\t\tint idMat= Integer.parseInt(IdText.getText().trim());\n\t\t\t\tString CategorieMat=CategText.getText().trim();\n\t\t\t\tString Marque=MarqueText.getText().trim();\n\t\t\t\tString serial=SerialText.getText().trim();\n\t\t\t\tString NomSE=(String) comboBox.getSelectedItem().toString();\n\t\t\t\tString Logiceils=LogiceilText.getText().trim();\n\t\t\t\t\n\t\t\t\tMateriel Materiel1=new Materiel(idMat,CategorieMat,Marque,serial,NomSE,Logiceils);\n\t\t\t\t \n\t\t\t\t MAJMateriel MaterielMAJ=new MAJMateriel();\n\t\t\t\t MaterielMAJ.create(Materiel1);\t\n\t\t\t\tJOptionPane.showMessageDialog(null,\"Le Matériel à été Ajouter avec Succée\");\n\t\t\t}",
"@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent a) {\n\t\t\t\t\tClientsDAO clientsDAO = DAOFactory.getClientsDAO();\n\t\t\t\t\tAnimauxDAO animauxDAO = DAOFactory.getAnimauxDAO();\n\t\t\t\t\tRacesDAO racesDAO = new DAOFactory().getRaceDAO();\n\t\t\t\t\tJOptionPane display = new JOptionPane();\n\t\t\t\t\tAgendasDAO agendasDAO = DAOFactory.getAgendasDAO();\n\n\t\t\t\t\tif (comboBxPersonnels.getSelectedIndex() == 0) {\n\t\t\t\t\t\tdisplay.showMessageDialog(panelAgendas, \"Veuillez sélectionnez un vétérinaire\", \"Attention\",\n\t\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (datePickerRendezVous.getJFormattedTextField().getText().isEmpty()) {\n\t\t\t\t\t\t\tdisplay.showMessageDialog(panelAgendas, \"Veuillez sélectionnez une date \", \"Attention\",\n\t\t\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tint ligne = tableRendezVous.getSelectedRow();\n\t\t\t\t\t\t\tint colonne = tableRendezVous.getSelectedColumn();\n\t\t\t\t\t\t\tif (!tableRendezVous.getValueAt(ligne, colonne).equals(\"Aucune données\")) {\n\t\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t\t * System.out.println(\"valide\"); try { cli =\n\t\t\t\t\t\t\t\t * clientsDAO.getClient(tableRendezVous.\n\t\t\t\t\t\t\t\t * getValueAt(ligne, 1).toString());\n\t\t\t\t\t\t\t\t * System.out.println(cli); } catch\n\t\t\t\t\t\t\t\t * (DALException e) { // TODO Auto-generated\n\t\t\t\t\t\t\t\t * catch block e.printStackTrace(); } try { ani\n\t\t\t\t\t\t\t\t * = animauxDAO.getAnimauxClients(cli.\n\t\t\t\t\t\t\t\t * getCodeClient()).get(0); } catch\n\t\t\t\t\t\t\t\t * (DALException e) { // TODO Auto-generated\n\t\t\t\t\t\t\t\t * catch block e.printStackTrace(); } try {\n\t\t\t\t\t\t\t\t * espece = racesDAO.allRaces().get(0); } catch\n\t\t\t\t\t\t\t\t * (DALException e) { // TODO Auto-generated\n\t\t\t\t\t\t\t\t * catch block e.printStackTrace(); }\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\tEcranAgendas.this.fntrDossierMedic();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdisplay.showMessageDialog(panelAgendas, \"Veuillez sélectionner un rendez-vous valide\",\n\t\t\t\t\t\t\t\t\t\t\"Attention\", JOptionPane.WARNING_MESSAGE);\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}",
"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}",
"public Candidatura (){\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}",
"public void nouveau(){\r\n try {\r\n viewEtudiantInscripEcheance = new ViewEtudiantInscriptionEcheance();\r\n echeance_etudiant = new EcoEcheanceEtudiant(); \r\n \r\n } catch (Exception e) {\r\n System.err.println(\"Erreur capturée : \"+e);\r\n }\r\n }",
"@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tRadioButtonDataField grb = (RadioButtonDataField) IMEliminarVehiculo.this.managedForm\r\n\t\t\t\t\t\t\t.getDataFieldReference(\"BAJA_VEHICULO_CONTRATO\");\r\n\t\t\t\t\tif (grb != null) {\r\n\t\t\t\t\t\tif (grb.isSelected()) {\r\n\t\t\t\t\t\t\tint rtn = JOptionPane.showConfirmDialog(IMEliminarVehiculo.this.managedForm,\r\n\t\t\t\t\t\t\t\t\tApplicationManager.getTranslation(\"M_SE_DARA_DE_BAJA_VEHICULO_DE_CONTRATO\"), \"\", JOptionPane.YES_NO_OPTION);\r\n\t\t\t\t\t\t\tif (rtn == JOptionPane.YES_OPTION) {\r\n\t\t\t\t\t\t\t\t//\r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tfinal String cg_contrato = (String) IMEliminarVehiculo.this.managedForm.getDataFieldValue(\"CG_CONTRATO\");\r\n\t\t\t\t\t\t\t\t\tif (cg_contrato == null) {\r\n\t\t\t\t\t\t\t\t\t\tIMEliminarVehiculo.this.managedForm.message(\"M_NO_EXISTE_CONTRATO\", Form.ERROR_MESSAGE);\r\n\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tfinal String matricula = (String) IMEliminarVehiculo.this.managedForm.getDataFieldValue(\"MATRICULA\");\r\n\t\t\t\t\t\t\t\t\tfinal String cif = (String) IMEliminarVehiculo.this.managedForm.getDataFieldValue(\"CIF\");\r\n\t\t\t\t\t\t\t\t\tfinal Entity entidad = IMEliminarVehiculo.this.formManager.getReferenceLocator().getEntityReference(\r\n\t\t\t\t\t\t\t\t\t\t\t\"EVehiculoCont\");\r\n\t\t\t\t\t\t\t\t\tfinal Date d = new Date();\r\n\t\t\t\t\t\t\t\t\tOperationThread infoInforme = new OperationThread(ApplicationManager.getTranslation(\"dando_de_baja_vehiculo\")) {\r\n\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\t\t\tthis.hasStarted = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\tHashtable atributosValores = new Hashtable();\r\n\t\t\t\t\t\t\t\t\t\t\t\tHashtable clavesValores = new Hashtable();\r\n\t\t\t\t\t\t\t\t\t\t\t\tclavesValores.put(\"CG_CONTRATO\", cg_contrato);\r\n\t\t\t\t\t\t\t\t\t\t\t\tclavesValores.put(\"MATRICULA\", matricula);\r\n\t\t\t\t\t\t\t\t\t\t\t\tclavesValores.put(\"CIF\", cif);\r\n\t\t\t\t\t\t\t\t\t\t\t\tatributosValores.put(\"F_BAJA\", d);\r\n\t\t\t\t\t\t\t\t\t\t\t\tEntityResult resultado = entidad.update(atributosValores, clavesValores,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tIMEliminarVehiculo.this.formManager.getReferenceLocator().getSessionId());\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (resultado.getCode() != EntityResult.OPERATION_SUCCESSFUL) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tthrow new Exception();\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\tString msg = ApplicationManager.getTranslation(\"M_BAJA_VEHICULO\",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tIMEliminarVehiculo.this.formManager.getResourceBundle());\r\n\t\t\t\t\t\t\t\t\t\t\t\tIMEliminarVehiculo.this.managedForm.message(msg, JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t\t\t\t\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tIMEliminarVehiculo.this.managedForm.message(ex.getMessage(), Form.ERROR_MESSAGE);\r\n\t\t\t\t\t\t\t\t\t\t\t} finally {\r\n\t\t\t\t\t\t\t\t\t\t\t\tthis.hasFinished = true;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t\t\tExtendedApplicationManager.proccessOperation(\r\n\t\t\t\t\t\t\t\t\t\t\t(JDialog) SwingUtilities.getWindowAncestor(IMEliminarVehiculo.this.managedForm), infoInforme, 50);\r\n\t\t\t\t\t\t\t\t\tIMEliminarVehiculo.this.managedForm.getJDialog().setVisible(false);\r\n\t\t\t\t\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t\t\t\t\t\tIMEliminarVehiculo.this.managedForm.message(\"M_ERROR_BAJA_VEHICULO\", Form.ERROR_MESSAGE);\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tIMEliminarVehiculo.this.managedForm.getJDialog().setVisible(false);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgrb = (RadioButtonDataField) IMEliminarVehiculo.this.managedForm.getDataFieldReference(\"BORRAR_TODO_VEHICULO\");\r\n\t\t\t\t\tif (grb != null) {\r\n\t\t\t\t\t\tif (grb.isSelected()) {\r\n\t\t\t\t\t\t\t// Entidad entidad = null;\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tfinal String cg_contrato = (String) IMEliminarVehiculo.this.managedForm\r\n\t\t\t\t\t\t\t\t\t\t.getDataFieldValue(OpentachFieldNames.CG_CONTRATO_FIELD);\r\n\t\t\t\t\t\t\t\tif (cg_contrato == null) {\r\n\t\t\t\t\t\t\t\t\tIMEliminarVehiculo.this.managedForm.message(\"M_NO_EXISTE_CONTRATO\", Form.ERROR_MESSAGE);\r\n\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tfinal String matricula = (String) IMEliminarVehiculo.this.managedForm\r\n\t\t\t\t\t\t\t\t\t\t.getDataFieldValue(OpentachFieldNames.MATRICULA_FIELD);\r\n\t\t\t\t\t\t\t\tfinal String cif = (String) IMEliminarVehiculo.this.managedForm.getDataFieldValue(OpentachFieldNames.CIF_FIELD);\r\n\r\n\t\t\t\t\t\t\t\tfinal Entity entidad = buscador.getEntityReference(\"EVehiculosEmp\");\r\n\t\t\t\t\t\t\t\tint rtn = JOptionPane.showConfirmDialog(IMEliminarVehiculo.this.managedForm,\r\n\t\t\t\t\t\t\t\t\t\tApplicationManager.getTranslation(\"M_SE_ELIMINARA_DATOS_VEHICULO\"), \"\", JOptionPane.YES_NO_OPTION);\r\n\t\t\t\t\t\t\t\tif (rtn == JOptionPane.YES_OPTION) {\r\n\t\t\t\t\t\t\t\t\tOperationThread infoInforme = new OperationThread(ApplicationManager.getTranslation(\"Eliminando_vehiculo\")) {\r\n\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\t\t\tthis.hasStarted = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\tHashtable clavesValores = new Hashtable();\r\n\t\t\t\t\t\t\t\t\t\t\t\tclavesValores.put(OpentachFieldNames.CG_CONTRATO_FIELD, cg_contrato);\r\n\t\t\t\t\t\t\t\t\t\t\t\tclavesValores.put(OpentachFieldNames.MATRICULA_FIELD, matricula);\r\n\t\t\t\t\t\t\t\t\t\t\t\tclavesValores.put(OpentachFieldNames.CIF_FIELD, cif);\r\n\t\t\t\t\t\t\t\t\t\t\t\tEntityResult resultado = entidad.delete(clavesValores, IMEliminarVehiculo.this.formManager\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getReferenceLocator().getSessionId());\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (resultado.getCode() != EntityResult.OPERATION_SUCCESSFUL) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tthrow new Exception();\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\tString msg = ApplicationManager.getTranslation(\"M_BORRAR_VEHICULO\",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tIMEliminarVehiculo.this.formManager.getResourceBundle());\r\n\t\t\t\t\t\t\t\t\t\t\t\tIMEliminarVehiculo.this.managedForm.message(msg, JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t\t\t\t\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tIMEliminarVehiculo.this.managedForm.message(ex.getMessage(), Form.ERROR_MESSAGE);\r\n\t\t\t\t\t\t\t\t\t\t\t} finally {\r\n\t\t\t\t\t\t\t\t\t\t\t\tthis.hasFinished = true;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t\t\tExtendedApplicationManager.proccessOperation(\r\n\t\t\t\t\t\t\t\t\t\t\t(JDialog) SwingUtilities.getWindowAncestor(IMEliminarVehiculo.this.managedForm), infoInforme, 50);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tIMEliminarVehiculo.this.managedForm.getJDialog().setVisible(false);\r\n\r\n\t\t\t\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t\t\t\t\tIMEliminarVehiculo.this.managedForm.message(\"M_ERROR_BORRAR_CONDUCTOR\", Form.ERROR_MESSAGE);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}",
"public void verVacanteMultiple(String convocatoriaselecconada, Candidato actualcandidat)\r\n\t{\r\n\t\tmultiple = new VacanteMultiple(this, convocatoriaselecconada, actualcandidat);\r\n\t\tmultiple.setVisible(true);\r\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 annuler(){\r\n try {\r\n viewEtudiantInscripEcheance = new ViewEtudiantInscriptionEcheance();\r\n echeance_etudiant = new EcoEcheanceEtudiant(); \r\n \r\n } catch (Exception e) {\r\n System.err.println(\"Erreur capturée : \"+e);\r\n }\r\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgetControleur(). ConsultOuvrage() ;}",
"private void valider() {\n\n\t\t/**\n\t\t * Renvoie un tableau de caractères qui sera transformé en chaine de caractère\n\t\t **/\n\n\t\tString passewordTraduit = new String(passeword.getPassword());\n\n\t\t/**\n\t\t * login.getText() récupère le contenu de la barre de saisie\n\t\t **/\n\t\t\n\t\tString user = login.getText();\n\t\tString passwd = passewordTraduit;\n\t\t/**\n\t\t *Permettra de savoir si la connexion à la BDD SQL c'est bien passée.\n\t\t */\n\t\tboolean reussite;\n\t\t/**\n\t\t * On va créer la BDD si elle n'existe pas\n\t\t */\n\t\t\n\t\treussite = Initialisation.getInstance().creerBDD(user, passwd);\n\t\t/**\n\t\t * On set le password et l'utilisateur pour que les paramètres de connexion soient les bons\n\t\t */\n\t\tInitialisation.getInstance().setPasswd(passwd);\n\t\tInitialisation.getInstance().setUser(user);\n\t\tModification.getInstance().setPasswd(passwd);\n\t\tModification.getInstance().setUser(user);\n\t\tif(reussite) {\n\t\t\t/**\n\t\t\t *Si tout c'est bien passé on regarde si l'utilisateur existe dans le fichier et dans le cas contraire on le crée.\n\t\t\t */\n\t\t\tif(personnesDejaInscrite.getInstance().getMaListDePersonneInscrite().get(user) == null) {\n\t\t\t\tpersonnesDejaInscrite.getInstance().getMaListDePersonneInscrite().put(user, new CompteAdministrateur(passwd));\n\t\t\t\tpersonnesDejaInscrite.getInstance().sauvegarder();\n\t\t\t}\n\t\t\tFenetreLogin.getInstance().dispose();\n\t\t\tFenetreFond.getInstance().changerFenetre(login.getText());\n\t\t\t/**\n\t\t\t *On remet les champs à nul pour que quand on se déconnecte on est pas le login et le mot de passe de l'utilisateur précédent.\n\t\t\t */\n\t\t\tlogin.setText(\"\");\n\t\t\tpasseword.setText(\"\");\n\t\t}\n\t\n\t}",
"public void acutualizarInfo(){\n String pibId = String.valueOf(comentario.getId());\n labelId.setText(\"#\" + pibId);\n\n String autor = comentario.getAutor().toString();\n labelAutor.setText(autor);\n\n String fecha = comentario.getFechaCreacion().toString();\n labelFecha.setText(fecha);\n \n String contenido = comentario.getContenido();\n textAreaContenido.setText(contenido);\n \n String likes = ((Integer)comentario.totalLikes()).toString();\n labelLikes.setText(likes);\n \n Collection<Comentario> comments = socialNetwork.searchSubComentarios(comentario);\n panelSubComentarios.loadItems(comments, 15);\n \n if(comentario.isSubcomentario()){\n jButton4.setEnabled(true);\n }\n else{\n jButton4.setEnabled(false);\n }\n }",
"@Override\r\n\tpublic void action() {\n\t\tMessageTemplate mt=MessageTemplate.or(MessageTemplate.MatchContent(\"comida\"), MessageTemplate.MatchContent(\"bebida\"));\r\n ACLMessage msg = myAgent.receive(mt);\r\n if(msg!=null){\r\n \tif(msg.getContent().compareTo(\"comida\")==0){\r\n \t\tif(Comida>=5){\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"Si\");\r\n System.out.println(myAgent.getLocalName()+\":Si, gracias tengo hambre todavia\"); \r\n myAgent.send(reply);\r\n Comida=Comida-5;\r\n \t\t}\r\n \t\telse{\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"No\");\r\n System.out.println(myAgent.getLocalName()+\":No gracias\"); \r\n myAgent.send(reply);\r\n \t\t} \r\n \t}\r\n \telse if(msg.getContent().compareTo(\"bebida\")==0){\r\n \t\tif(Bebida>=5){\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"Si\");\r\n System.out.println(myAgent.getLocalName()+\":Si, gracias tengo sed todavia\"); \r\n myAgent.send(reply);\r\n Bebida=Bebida-5;\r\n \t\t}\r\n \t\telse{\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"No\");\r\n System.out.println(myAgent.getLocalName()+\":No gracias\"); \r\n myAgent.send(reply);\r\n \t\t} \r\n \t}\r\n }\r\n if (Comida==0 && Bebida==0){\r\n \tmyAgent.doDelete();\r\n }\r\n\t}",
"public void actionPerformed(ActionEvent e) {\r\n\t\t\tif (e.getSource() == barra.btnuevo\r\n\t\t\t\t\t|| e.getSource() == barra.btmodifi) {\r\n\t\t\t\tif (e.getSource() == barra.btnuevo) {\r\n\t\t\t\t\ttfrif.setText(\"\");\r\n\t\t\t\t\ttfrazon.setText(\"\");\r\n\t\t\t\t\ttfdireccion.setText(\"\");\r\n\t\t\t\t\ttftelefono.setText(\"\");\r\n\t\t\t\t\ttfcorreo.setText(\"\");\r\n\t\t\t\t\tcbCiudad.setSelectedItem(-1);\r\n\t\t\t\t\tultimo = actual;\r\n\t\t\t\t\tactual = new Facturacion();\r\n\t\t\t\t}\r\n\t\t\t\tbarra.Edicion();\r\n\t\t\t\ttfrif.grabFocus();\r\n\r\n\t\t\t\ttfrif.setEditable(true);\r\n\t\t\t\ttfrazon.setEditable(true);\r\n\t\t\t\ttfdireccion.setEditable(true);\r\n\t\t\t\ttftelefono.setEditable(true);\r\n\t\t\t\ttfcorreo.setEditable(true);\r\n\t\t\t\tcbCiudad.setEditable(true);\r\n\t\t\t}\r\n\t\t\tif (e.getSource() == barra.btgrabar) {\r\n\t\t\t\tif (tfrif.getText().trim().equals(\"\")\r\n\t\t\t\t\t\t|| tfrazon.getText().trim().equals(\"\")\r\n\t\t\t\t\t\t|| tfdireccion.getText().trim().equals(\"\")) {\r\n\t\t\t\t\tJOptionPane\r\n\t\t\t\t\t\t\t.showMessageDialog(new JFrame(),\r\n\t\t\t\t\t\t\t\t\t\"Debe completar todos los Datos del Persona\\nIngreso de Nuevo Persona\");\r\n\t\t\t\t\ttfrif.grabFocus();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tactual.setRif(tfrif.getText().trim());\r\n\t\t\t\t\tactual.setRazon(tfrazon.getText().trim());\r\n\t\t\t\t\tactual.setDireccion(tfdireccion.getText().trim());\r\n\t\t\t\t\tactual.setTelefono(tftelefono.getText().trim());\r\n\t\t\t\t\tactual.setFacCiudad(ModCiudad.getElemento(cbCiudad.getSelectedIndex()));\r\n\t\t\t\t\tactual.setFacOficina(principal.ofic);\r\n\t\t\t\t\tif (cbCiudad.getSelectedIndex()>-1)\r\n\t\t\t\t\t\tactual.setFacCiudad(ModCiudad.getElemento(cbCiudad.getSelectedIndex()));\r\n\t\t\t\t\tactual.setCorreo(tfcorreo.getText().trim());\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tSession sesion = principal.fabrica.getCurrentSession();\r\n\t\t\t\t\t\tsesion.beginTransaction();\r\n\t\t\t\t\t\tsesion.saveOrUpdate(actual);\r\n\t\t\t\t\t\tsesion.getTransaction().commit();\r\n\t\t\t\t\t} catch (HibernateException e2) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(new JFrame(),\r\n\t\t\t\t\t\t\t\t\"btGrabar!!!Errores de Base de Datos!!!\\n\" + e2\r\n\t\t\t\t\t\t\t\t\t\t+ \" \", \"Database Error!\",\r\n\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * if (pac!=null) { JOptionPane.showMessageDialog(new\r\n\t\t\t\t\t * JFrame(),\r\n\t\t\t\t\t * \"Número de Cédula ya existe!!!\",\"Database Error!\"\r\n\t\t\t\t\t * ,JOptionPane.ERROR_MESSAGE); tfcedula.grabFocus(); }\r\n\t\t\t\t\t */\r\n\t\t\t\t\tbarra.Consulta();\r\n\t\t\t\t\tif (cierra)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tAdminFactura.setFacturacion(actual);\r\n\t\t\t\t\t\tcerrarventana();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// refreshPersona();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (e.getSource() == barra.btcancel) {\r\n\t\t\t\tif (cierra)\r\n\t\t\t\t{\r\n//\t\t\t\t\tAdminFactura.setFacturacion(actual); corregido el 12/01/2012 estaba dando error, ya que si cancela la ventana no debe grabar nada en AdminFactura.setFacturacion()\r\n\t\t\t\t\tcerrarventana();\r\n\t\t\t\t}\r\n\t\t\t\tif (buscando) {\r\n\t\t\t \tlbbuscando.setText(\"\");\r\n\t\t\t\t\tbuscando = false;\r\n\t\t\t\t}\r\n\t\t\t\tif (actual.equals(new Persona())) actual = ultimo;\r\n\t\t\t\tbarra.Consulta();\r\n\t\t\t\trefreshFacturacion();\r\n\t\t\t}\r\n\t\t\tif (e.getSource() == barra.btbuscar) {\r\n\t\t\t\tbarrabusca();\r\n\t\t\t}\r\n\t\t\tif (e.getSource() == barra.btanteri) {\r\n\t\t\t\tif (buscando){\r\n\t\t\t\t\tif (tfrif.isEditable()){\r\n\t\t\t\t\t\tbuscar();\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\tactual = busqueda.get(puntero>0?--puntero:puntero);\r\n\t\t\t\t\t\tSystem.out.println(\"\"+puntero+\"/\"+busqueda.size());\r\n\t\t\t\t\t\trefreshFacturacion();\r\n\t\t\t\t}else\r\n\t\t\t\t{\r\n\t\t\t\t\tFacturacion per = null;\r\n\t\t\t\t\tint text = actual.getCodigo();\r\n\t\t\t\t\tString q = \"from Facturacion where CodOficina = \"+principal.ccodoff+\" and codigo < :text order by codigo desc\";\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tSession sesion = principal.fabrica.getCurrentSession();\r\n\t\t\t\t\t\tsesion.beginTransaction();\r\n\t\t\t\t\t\tQuery queryResult = sesion\r\n\t\t\t\t\t\t\t\t.createQuery(q);\r\n\t\t\t\t\t\tqueryResult.setInteger(\"text\", text);\r\n\t\t\t\t\t\tqueryResult.setMaxResults(1);\r\n\t\t\t\t\t\tper = (Facturacion) queryResult.uniqueResult();\r\n\t\t\t\t\t\tsesion.getTransaction().commit();\r\n\t\t\t\t\t} catch (HibernateException e2) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(new JFrame(),\r\n\t\t\t\t\t\t\t\t\"btAnterior!!!Errores de Base de Datos!!!\\n\" + e2 + \" \"\r\n\t\t\t\t\t\t\t\t\t\t+ text, \"Database Error!\",\r\n\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (per != null) {\r\n\t\t\t\t\t\tactual = per;\r\n\t\t\t\t\t\trefreshFacturacion();\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (e.getSource() == barra.btsiguie) {\r\n\t\t\t\tif (buscando){\r\n\t\t\t\t\tif (tfrif.isEditable()){\r\n\t\t\t\t\t\tbuscar();\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\tactual = busqueda.get(puntero<busqueda.size()-1?++puntero:puntero);\r\n\t\t\t\t\t\tSystem.out.println(\"\"+puntero+\"/\"+busqueda.size());\r\n\t\t\t\t\t\trefreshFacturacion();\r\n\t\t\t\t}else\r\n\t\t\t\t{\r\n\t\t\t\t\tFacturacion per = null;\r\n\t\t\t\t\tint text = actual.getCodigo();\r\n\t\t\t\t\tString q = \"from Facturacion where CodOficina = \"+principal.ccodoff+\" and codigo > :text order by codigo asc\";\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tSession sesion = principal.fabrica.getCurrentSession();\r\n\t\t\t\t\t\tsesion.beginTransaction();\r\n\t\t\t\t\t\tQuery queryResult = sesion\r\n\t\t\t\t\t\t\t\t.createQuery(q);\r\n\t\t\t\t\t\tqueryResult.setInteger(\"text\", text);\r\n\t\t\t\t\t\tqueryResult.setMaxResults(1);\r\n\t\t\t\t\t\tper = (Facturacion) queryResult.uniqueResult();\r\n\t\t\t\t\t\tsesion.getTransaction().commit();\r\n\t\t\t\t\t} catch (HibernateException e2) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(new JFrame(),\r\n\t\t\t\t\t\t\t\t\"btsiguie!!!Errores de Base de Datos!!!\\n\" + e2 + \" \"\r\n\t\t\t\t\t\t\t\t\t\t+ text, \"Database Error!\",\r\n\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (per != null) {\r\n\t\t\t\t\t\tactual = per;\r\n\t\t\t\t\t\trefreshFacturacion();\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (e.getSource() == barra.btultimo) {\r\n\t\t\t\tif (buscando)\r\n\t\t\t\t{\r\n\t\t\t\t\tpuntero = busqueda.size()-1;\r\n\t\t\t\t\tif (tfrif.isEditable()){\r\n\t\t\t\t\t\tbuscar();\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\tactual = busqueda.get(puntero);\r\n\t\t\t\t\t\tSystem.out.println(\"\"+puntero+\"/\"+busqueda.size());\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tactual = obtenerUltimo();\r\n\t\t\t\t\trefreshFacturacion();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (e.getSource() == barra.btsalir) {\r\n\t\t\t\tdispose();\r\n\t\t\t}\r\n\t\t}",
"private void B_InscrireActionPerformed(java.awt.event.ActionEvent evt) {\n \n String ident=T_Email.getText();\n String mdp1=String.valueOf(Ps_Mdp.getPassword());\n String mdp2=String.valueOf(Ps_ConfirmeMdp.getPassword());\n String prenom_uti=prenom.getText();\n String nom_uti=nom.getText();\n \n boolean ajout;\n \n if (mdp1.equals(mdp2)){\n System.out.println(\"Les deux mots de passe correspondent\");\n Bdd bdd = new Bdd();\n \n //On vérifie que l'utilisateur existe pas déjà\n boolean exists = bdd.liste_uti(ident);\n \n if(exists==true){ //alors on ajoute\n bdd.Inscription(ident,mdp1,prenom_uti,nom_uti);\n AffichageConnexion Aff = new AffichageConnexion();\n Aff.setLocationRelativeTo(null);\n Aff.setVisible(true);\n this.dispose();\n }\n else {\n System.out.println(\"existe déjà\");\n } \n }\n else \n System.out.println(\"mdp diff\");\n }",
"private void validarForm(AtualizarTramiteEspecificacaoActionForm form){\n\n\t\tString idLocalidade = form.getIdLocalidade();\n\t\tString codigoSetorComercial = form.getCodigoSetorComercial();\n\t\tString idMunicipio = form.getIdMunicipio();\n\t\tString codigoBairro = form.getCodigoBairro();\n\t\tString idSistemaAbastecimento = form.getIdSistemaAbastecimento();\n\t\tString idDistritoOperacional = form.getIdDistritoOperacional();\n\t\tString idZonaAbastecimento = form.getIdZonaAbastecimento();\n\t\tString idSetorAbastecimento = form.getIdSetorAbastecimento();\n\t\tString idSistemaEsgoto = form.getIdSistemaEsgoto();\n\t\tString idSubsistemaEsgoto = form.getIdSubsistemaEsgoto();\n\t\tString idBacia = form.getIdBacia();\n\t\tString idSubBacia = form.getIdSubBacia();\n\t\tString idUnidadeOrganizacionalOrigem = form.getIdUnidadeOrganizacionalOrigem();\n\t\tString idUnidadeOrganizacionalDestino = form.getIdUnidadeOrganizacionalDestino();\n\t\tString indicadorUso = form.getIndicadorUso();\n\n\t\tString numeroNaoInformadoStr = Integer.toString(ConstantesSistema.NUMERO_NAO_INFORMADO);\n\n\t\tFachada fachada = Fachada.getInstancia();\n\n\t\t// Localidade\n\t\tif(!Util.isVazioOuBranco(idLocalidade)){\n\t\t\tFiltroLocalidade filtro = new FiltroLocalidade();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroLocalidade.INDICADORUSO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroLocalidade.ID, idLocalidade));\n\n\t\t\tCollection<Localidade> colecao = fachada.pesquisar(filtro, Localidade.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Localidade\");\n\t\t\t}\n\t\t}\n\n\t\t// Setor Comercial\n\t\tif(Util.isVazioOuBranco(idLocalidade) && !Util.isVazioOuBranco(codigoSetorComercial)){\n\t\t\tthrow new ActionServletException(\"atencao.required\", null, \"Localidade\");\n\t\t}else if(!Util.isVazioOuBranco(idLocalidade) && !Util.isVazioOuBranco(codigoSetorComercial)){\n\t\t\tFiltroSetorComercial filtro = new FiltroSetorComercial();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSetorComercial.INDICADORUSO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSetorComercial.ID_LOCALIDADE, idLocalidade));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSetorComercial.CODIGO_SETOR_COMERCIAL, codigoSetorComercial));\n\n\t\t\tCollection<SetorComercial> colecao = fachada.pesquisar(filtro, SetorComercial.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Setor Comercial\");\n\t\t\t}\n\t\t}\n\n\t\t// Bairro\n\t\tif(Util.isVazioOuBranco(idMunicipio) && !Util.isVazioOuBranco(codigoBairro)){\n\t\t\tthrow new ActionServletException(\"atencao.required\", null, \"Município\");\n\t\t}else if(!Util.isVazioOuBranco(idMunicipio) && !Util.isVazioOuBranco(codigoBairro)){\n\t\t\tFiltroBairro filtro = new FiltroBairro();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroBairro.INDICADOR_USO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroBairro.MUNICIPIO_ID, idMunicipio));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroBairro.CODIGO, codigoBairro));\n\n\t\t\tCollection<Bairro> colecao = fachada.pesquisar(filtro, Bairro.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Bairro\");\n\t\t\t}\n\t\t}\n\n\t\t// Sistema de Abastecimento\n\t\tif(!Util.isVazioOuBranco(idSistemaAbastecimento) && !idSistemaAbastecimento.equals(numeroNaoInformadoStr)){\n\t\t\tFiltroSistemaAbastecimento filtro = new FiltroSistemaAbastecimento();\n\t\t\tfiltro\n\t\t\t\t\t\t\t.adicionarParametro(new ParametroSimples(FiltroSistemaAbastecimento.INDICADOR_USO,\n\t\t\t\t\t\t\t\t\t\t\tConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSistemaAbastecimento.ID, idSistemaAbastecimento));\n\n\t\t\tCollection<SistemaAbastecimento> colecao = fachada.pesquisar(filtro, SistemaAbastecimento.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Sistema de Abastecimento\");\n\t\t\t}\n\t\t}\n\n\t\t// Unidade Operacional\n\t\tif(!Util.isVazioOuBranco(idDistritoOperacional) && !idDistritoOperacional.equals(numeroNaoInformadoStr)){\n\t\t\tFiltroDistritoOperacional filtro = new FiltroDistritoOperacional();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroDistritoOperacional.INDICADORUSO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroDistritoOperacional.ID, idDistritoOperacional));\n\n\t\t\tCollection<DistritoOperacional> colecao = fachada.pesquisar(filtro, DistritoOperacional.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Unidade Operacional\");\n\t\t\t}\n\t\t}\n\n\t\t// Zona de Abastecimento\n\t\tif(!Util.isVazioOuBranco(idZonaAbastecimento) && !idZonaAbastecimento.equals(numeroNaoInformadoStr)){\n\t\t\tFiltroZonaAbastecimento filtro = new FiltroZonaAbastecimento();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroZonaAbastecimento.INDICADOR_USO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroZonaAbastecimento.ID, idZonaAbastecimento));\n\n\t\t\tCollection<ZonaAbastecimento> colecao = fachada.pesquisar(filtro, ZonaAbastecimento.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Zona de Abastecimento\");\n\t\t\t}\n\t\t}\n\n\t\t// Setor de Abastecimento\n\t\tif(!Util.isVazioOuBranco(idSetorAbastecimento) && !idSetorAbastecimento.equals(numeroNaoInformadoStr)){\n\t\t\tFiltroSetorAbastecimento filtro = new FiltroSetorAbastecimento();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSetorAbastecimento.INDICADOR_USO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSetorAbastecimento.ID, idSetorAbastecimento));\n\n\t\t\tCollection<SetorAbastecimento> colecao = fachada.pesquisar(filtro, SetorAbastecimento.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Setor de Abastecimento\");\n\t\t\t}\n\t\t}\n\n\t\t// Sistema de Esgoto\n\t\tif(!Util.isVazioOuBranco(idSistemaEsgoto) && !idSistemaEsgoto.equals(numeroNaoInformadoStr)){\n\t\t\tFiltroSistemaEsgoto filtro = new FiltroSistemaEsgoto();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSistemaEsgoto.INDICADOR_USO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSistemaEsgoto.ID, idSistemaEsgoto));\n\n\t\t\tCollection<SistemaEsgoto> colecao = fachada.pesquisar(filtro, SistemaEsgoto.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Sistema de Esgoto\");\n\t\t\t}\n\t\t}\n\n\t\t// Subsistema de Esgoto\n\t\tif(!Util.isVazioOuBranco(idSubsistemaEsgoto) && !idSubsistemaEsgoto.equals(numeroNaoInformadoStr)){\n\t\t\tFiltroSubsistemaEsgoto filtro = new FiltroSubsistemaEsgoto();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSubsistemaEsgoto.INDICADOR_USO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSubsistemaEsgoto.ID, idSubsistemaEsgoto));\n\n\t\t\tCollection<SubsistemaEsgoto> colecao = fachada.pesquisar(filtro, SubsistemaEsgoto.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Subsistema de Esgoto\");\n\t\t\t}\n\t\t}\n\n\t\t// Bacia\n\t\tif(!Util.isVazioOuBranco(idBacia) && !idBacia.equals(numeroNaoInformadoStr)){\n\t\t\tFiltroBacia filtro = new FiltroBacia();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroBacia.INDICADORUSO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroBacia.ID, idBacia));\n\n\t\t\tCollection<Bacia> colecao = fachada.pesquisar(filtro, Bacia.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Bacia\");\n\t\t\t}\n\t\t}\n\n\t\t// Subbacia\n\t\tif(!Util.isVazioOuBranco(idSubBacia) && !idSubBacia.equals(numeroNaoInformadoStr)){\n\t\t\tFiltroSubBacia filtro = new FiltroSubBacia();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSubBacia.INDICADOR_USO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSubBacia.ID, idSubBacia));\n\n\t\t\tCollection<SubBacia> colecao = fachada.pesquisar(filtro, SubBacia.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Subbacia\");\n\t\t\t}\n\t\t}\n\n\t\t// Unidade Origem\n\t\tif(!Util.isVazioOuBranco(idUnidadeOrganizacionalOrigem)){\n\t\t\tFiltroUnidadeOrganizacional filtro = new FiltroUnidadeOrganizacional();\n\t\t\tfiltro\n\t\t\t\t\t\t\t.adicionarParametro(new ParametroSimples(FiltroUnidadeOrganizacional.INDICADOR_USO,\n\t\t\t\t\t\t\t\t\t\t\tConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroUnidadeOrganizacional.ID, idUnidadeOrganizacionalOrigem));\n\n\t\t\tCollection<UnidadeOrganizacional> colecao = fachada.pesquisar(filtro, UnidadeOrganizacional.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Unidade Origem\");\n\t\t\t}\n\t\t}\n\n\t\t// Unidade Destino\n\t\tif(Util.isVazioOuBranco(idUnidadeOrganizacionalDestino)){\n\t\t\tthrow new ActionServletException(\"atencao.required\", null, \"Unidade Destino\");\n\t\t}else{\n\t\t\tFiltroUnidadeOrganizacional filtro = new FiltroUnidadeOrganizacional();\n\t\t\tfiltro\n\t\t\t\t\t\t\t.adicionarParametro(new ParametroSimples(FiltroUnidadeOrganizacional.INDICADOR_USO,\n\t\t\t\t\t\t\t\t\t\t\tConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroUnidadeOrganizacional.ID, idUnidadeOrganizacionalDestino));\n\n\t\t\tCollection<UnidadeOrganizacional> colecaoUnidadeOrganizacional = fachada.pesquisar(filtro, UnidadeOrganizacional.class\n\t\t\t\t\t\t\t.getName());\n\t\t\tif(colecaoUnidadeOrganizacional == null || colecaoUnidadeOrganizacional.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Unidade Destino\");\n\t\t\t}\n\t\t}\n\n\t\t// Indicador de Uso\n\t\tif(Util.isVazioOuBranco(indicadorUso)){\n\t\t\tthrow new ActionServletException(\"atencao.required\", null, \"Indicador de Uso\");\n\t\t}\n\t}",
"public Cotisant visite(Contributeur c){ \n int somme = this.state.get(c); \n c.affecterSolde(somme); \n return c ; \n }",
"public void verPruevaCandidato(Candidato actualcandidato, Prueba pruebaselect, Convocatoria convoselect, ArrayList rolesselect)\r\n\t{\r\n\t\tList preguntas = null;\r\n\t try \r\n\t {\r\n\t\t Conector conector = new Conector();\r\n\t\t conector.iniciarConexionBaseDatos();\r\n\t\t preguntas= PreguntaBD.listar(conector);\r\n\t\t conector.terminarConexionBaseDatos();\r\n\t } catch (Exception e){\r\n\t\t JOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t }\r\n\t if(preguntas != null)\r\n\t {\r\n\t \tif(actualcandidato != null)\r\n\t \t{\r\n\t \t\tif(pruebaselect != null)\r\n\t\t \t{\r\n\t \t\t\tpruevacandidato = new PruebaCandidatoI(this, actualcandidato, pruebaselect, convoselect, rolesselect);\r\n\t \t\t\tpruevacandidato.setVisible(true);\r\n\t\t \t}\r\n\t \t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tJOptionPane.showMessageDialog(this,\"No se encontro el tipo de prueba seleccionado.\",\"Presentar Prueba\", JOptionPane.WARNING_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/advertencia.PNG\"));\r\n\t\t\t\t}\r\n\t \t}\r\n\t \telse\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog(this,\"No se encontro el candidato para preentar la prueba.\",\"Presentar Prueba\", JOptionPane.WARNING_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/advertencia.PNG\"));\r\n\t\t\t}\r\n\t }\r\n\t}",
"private void suono(int idGioc) {\n\t\tpartita.effettoCasella(idGioc);\n\t}",
"private void jBtn_AjouterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtn_AjouterActionPerformed\n // Si onglet Client\n if(numOnglet() == 0){\n Formulaire_Client creaClient = new Formulaire_Client();\n creaClient.setVisible(true);\n this.setVisible(false);\n \n }\n else{\n Formulaire_Prospect creaProspect = new Formulaire_Prospect();\n creaProspect.setVisible(true);\n this.setVisible(false);\n } \n }",
"public static void gereCandidatos() {\n\t\tString idE, titulo, op, numCandidatos, nomeP;\n\t\tScanner sc = new Scanner(System.in);\n\t\tint check = 0, num, i;\n\t\tArrayList<Pessoa> listaCandidatos = new ArrayList<>();\n\t\tString msgServer = \"\";\n\t\t\n\t\tSystem.out.println(\"\\nInsira o id da eleicao a qual pretende adicionar uma lista de candidatos:\");\n\t\tidE = sc.nextLine();\n\t\t\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nInsira o titulo da lista:\");\n\t\t\ttitulo = sc.nextLine();\n\t\t\tif(verificarLetras(titulo) && titulo.length()>0) {\n\t\t\t\tcheck = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"\\nO titulo apenas pode conter letras\");\n\t\t\t}\n\t\t}while(check==0);\n\t\t\n\t\tcheck = 0;\n\t\t\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nO que pretende fazer?\\n(1) Adicoes (2) Remocoes\");\n\t\t\top = sc.nextLine();\n\t\t\tif(op.equals(\"1\") || op.equals(\"2\")) {\n\t\t\t\tcheck = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"\\nA opcao so pode conter digitos de 1 a 2\");\n\t\t\t}\n\t\t}while(check==0);\n\t\tcheck = 0;\n\t\t\n\t\tswitch(op) {\n\t\t\tcase \"1\":\n\t\t\t\tdo {\n\t\t\t\t\tSystem.out.println(\"\\nInsira numero de elementos:\");\n\t\t\t\t\tnumCandidatos = sc.nextLine();\n\t\t\t\t\tif(verificarNumeros(numCandidatos)) {\n\t\t\t\t\t\tif (Integer.parseInt(numCandidatos) > 0) {\n\t\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\"\\nO numero so pode conter digitos\");\n\t\t\t\t\t}\n\t\t\t\t}while(check==0);\n\t\t\t\tnum = Integer.parseInt(numCandidatos);\n\t\t\t\tcheck = 0;\n\t\t\t\t\n\t\t\t\tfor (i=0; i<num;i++) {\n\t\t\t\t\tdo {\n\t\t\t\t\t\tSystem.out.println(\"\\nInsira o nome do elemento a adicionar:\");\n\t\t\t\t\t\tnomeP = sc.nextLine();\n\t\t\t\t\t\tif(verificarLetras(nomeP) && nomeP.length()>0) {\n\t\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tSystem.out.println(\"\\nO nome apenas pode conter letras\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}while(check==0);\n\t\t\t\t\tPessoa novaP = new Pessoa(nomeP);\n\t\t\t\t\tlistaCandidatos.add(novaP);\n\t\t\t\t\tcheck = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcheck = 0;\n\t\t\t\tint tries = 0;\n\t\t\t\tdo {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmsgServer = rmiserver.adicionaCandidatos(idE, titulo, listaCandidatos);\n\t\t\t\t\t\tSystem.out.println(msgServer);\n\t\t\t\t\t\tSystem.out.println(\"\\n\");\n\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t} catch (RemoteException e1) {\n\t\t\t\t\t\t// Tratamento da Excepcao da chamada RMI addCandidatos\n\t\t\t\t\t\tif(tries == 0) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(6000);\n\t\t\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\t\t\ttries++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(tries > 0 && tries < 24) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\t\t\ttries++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(tries >= 24) {\n\t\t\t\t\t\t\tSystem.out.println(\"Impossivel realizar a operacao devido a falha tecnica (Servidores RMI desligados).\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}while(check==0);\n\t\t\t\tcheck = 0;\n\t\t\t\tbreak;\n\t\t\tcase \"2\":\n\t\t\t\tdo {\n\t\t\t\t\tSystem.out.println(\"\\nInsira numero de elementos:\");\n\t\t\t\t\tnumCandidatos = sc.nextLine();\n\t\t\t\t\tif(verificarNumeros(numCandidatos)) {\n\t\t\t\t\t\tif (Integer.parseInt(numCandidatos) > 0) {\n\t\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\"\\nO numero so pode conter digitos\");\n\t\t\t\t\t}\n\t\t\t\t}while(check==0);\n\t\t\t\tnum = Integer.parseInt(numCandidatos);\n\t\t\t\tcheck = 0;\n\t\t\t\t\n\t\t\t\tfor (i=0; i<num;i++) {\n\t\t\t\t\tdo {\n\t\t\t\t\t\tSystem.out.println(\"\\nInsira o nome do elemento a remover:\");\n\t\t\t\t\t\tnomeP = sc.nextLine();\n\t\t\t\t\t\tif(verificarLetras(nomeP) && nomeP.length()>0) {\n\t\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tSystem.out.println(\"\\nO nome apenas pode conter letras\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}while(check==0);\n\t\t\t\t\tPessoa novaP = new Pessoa(nomeP);\n\t\t\t\t\tlistaCandidatos.add(novaP);\n\t\t\t\t\tcheck = 0;\n\t\t\t\t}\n\t\t\t\n\t\t\t\tcheck = 0;\n\t\t\t\ttries = 0;\n\t\t\t\tdo {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmsgServer = rmiserver.removeCandidatos(idE, titulo, listaCandidatos);\n\t\t\t\t\t\tSystem.out.println(msgServer);\n\t\t\t\t\t\tSystem.out.println(\"\\n\");\n\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t} catch (RemoteException e1) {\n\t\t\t\t\t\t// Tratamento da Excepcao da chamada RMI addCandidatos\n\t\t\t\t\t\tif(tries == 0) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(6000);\n\t\t\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\t\t\ttries++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(tries > 0 && tries < 24) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\t\t\ttries++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(tries >= 24) {\n\t\t\t\t\t\t\tSystem.out.println(\"Impossivel realizar a operacao devido a falha tecnica (Servidores RMI desligados).\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}while(check==0);\n\t\t\t\tcheck = 0;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t}\n\t}",
"private void majComponentsAdresse(Candidat candidat){\r\n\t\tif (candidat==null){\r\n\t\t\tsetButtonVisible(false);\r\n\t\t\ttable.setVisible(false);\r\n\t\t\tnoInfoLabel.setVisible(false);\r\n\t\t\treturn;\r\n\t\t}else{\r\n\t\t\tAdresse adresse = candidat.getAdresse();\r\n\t\t\tif (adresse == null){\r\n\t\t\t\tnoInfoLabel.setVisible(true);\r\n\t\t\t\ttable.setVisible(false);\r\n\t\t\t\tsetGenericLayoutSizeFull(false);\r\n\t\t\t}else{\r\n\t\t\t\tnoInfoLabel.setVisible(false);\r\n\t\t\t\ttable.setVisible(true);\r\n\t\t\t\tList<SimpleTablePresentation> liste = candidatController.getInformationsAdresse(adresse);\r\n\t\t\t\tcontainer.removeAllItems();\r\n\t\t\t\tcontainer.addAll(liste);\r\n\t\t\t\ttable.setPageLength(liste.size());\r\n\t\t\t\tsetGenericLayoutSizeFull(true);\r\n\t\t\t}\t\t\t\r\n\t\t}\t\r\n\t}",
"public void construirCargo() {\n persona.setCargo(Cargos.SUPERVISOR);\n }",
"public void onClick$btnAceptar() throws InterruptedException {\n\t\tif (lsbxPersonas.getSelectedIndex() != -1) {\r\n\t\t\t// se obtiene la Persona Natural seleccionada\r\n\t\t\tPersonaNatural d = personaNatural.get(lsbxPersonas\r\n\t\t\t\t\t.getSelectedIndex());\r\n\t\t\t// se obtiene la referencia del formulario\r\n\t\t\tComponent formulario = (Component) catalogo.getVariable(\r\n\t\t\t\t\t\"formulario\", false);\r\n\t\t\t// se le asigna el objeto Persona Natural al formulario\r\n\t\t\tformulario.setVariable(\"personaNatural\", d, false);\r\n\t\t\t// se le envia una señal al formulario indicado que el formulario\r\n\t\t\t// se cerro y que los datos se han enviado\r\n\t\t\tEvents.sendEvent(new Event(\"onCatalogoCerrado2\", formulario));\r\n\t\t\t// se cierra el catalogo\r\n\t\t\tcatalogo.detach();\r\n\r\n\t\t} else {\r\n\t\t\tMessagebox.show(\"Seleccione una divisa\", \"Mensaje\", Messagebox.YES,\r\n\t\t\t\t\tMessagebox.INFORMATION);\r\n\r\n\t\t}\r\n\r\n\t}",
"private void InsetarEstudiantes() {\n new Insertar_Estudiantes(arreglo).setVisible(true); // CONECTA LA VENTANA Y LE PASA LA REFERENCIA DEL ARREGLO A INSERTAR ESTUDIANTE\n this.hide(); // Esconde la ventana anterior,\n // this.setVisible(false); // Otra forma de Eliminar - Esconder la ventana anterior.\n }",
"private void ajouterPot (int somme) {\r\n\t\tbanque.ajouter(somme);\r\n\t}",
"@Override\n public void afficher() {\n super.afficher();\n System.out.println(\"Sexe : \" + getSexe());\n System.out.println(\"Numéro de sécurité sociale : \" + getNumeroSecuriteSociale());\n System.out.println(\"Date de naissance : \" + getDateDeNaissance().format(DateTimeFormatter.ofLocalizedDate(FormatStyle.LONG)));\n System.out.println(\"Commentaires : \" + getCommentaires());\n this.adresse.afficher();\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 actionPerformed(ActionEvent e){ \r\n\t\r\n\t\t\tif (e.getSource().equals(ajouter)){\r\n\t\t\t\tcont.removeAll();\r\n\t\t\t\tFormulaire f = new Formulaire(FenetrePrincipale.this); // on change le panneau courant pour lui en mettre un nouveau\r\n\t\t\t\tcont.add(f, BorderLayout.CENTER);\r\n\t\t\t\tcont.repaint();\r\n\t\t\t\tFenetrePrincipale.this.setVisible(true);\r\n\t\t\t}\r\n\t\t\tif (e.getSource().equals(listingComplet)){\r\n\t\t\t\tnew ListeComplete(FenetrePrincipale.this); // creer une nouvelle fenetre qui a juste besoin de connection comme objet\r\n\t\t\t}\r\n\t\t\tif (e.getSource().equals(supprimer)){\r\n\t\t\t\tcont.removeAll();\r\n\t\t\t\tSuppression supprimer = new Suppression(FenetrePrincipale.this);\r\n\t\t\t\tcont.add(supprimer, BorderLayout.CENTER);\r\n\t\t\t\tcont.repaint();\r\n\t\t\t\tFenetrePrincipale.this.setVisible(true);\r\n\t\t\t}\r\n\t\t\t if (e.getSource().equals(retourPr)){\r\n\t\t\t\tcont.removeAll(); // effacer les anciens affichages (cont = endroit ou on stock l'ensemble des panneau et autres éléments graphiques)\r\n\t\t\t\tAccueil accueil = new Accueil();// initialise la variable av le nouveau panneau a afficher\r\n\t\t\t\tcont.add(accueil, BorderLayout.CENTER);// le réajouter au panneau\r\n\t\t\t\tcont.repaint(); // force la visualisation graphique du panneau (repeindre le containaire)\r\n\t\t\t\tFenetrePrincipale.this.setVisible(true);\r\n\t\t\t}\r\n\t\t\t if (e.getSource().equals(listingFamille)){\r\n\t\t\t\tcont.removeAll(); // effacer les anciens affichages (cont = endroit ou on stock l'ensemble des panneau et autres éléments graphiques)\r\n\t\t\t\tRechercheFam rech = new RechercheFam(FenetrePrincipale.this);// initialise la variable av le nouveau panneau a afficher\r\n\t\t\t\tcont.add(rech, BorderLayout.CENTER);// le réajouter au panneau\r\n\t\t\t\tcont.repaint(); // force la visualisation graphique du panneau (repeindre le containaire)\r\n\t\t\t\tFenetrePrincipale.this.setVisible(true);\r\n\t\t\t}\r\n\t\t\t if (e.getSource().equals(listingSection)){\r\n\t\t\t\t\tcont.removeAll(); // effacer les anciens affichages (cont = endroit ou on stock l'ensemble des panneau et autres éléments graphiques)\r\n\t\t\t\t\tRechercheSec rech = new RechercheSec(FenetrePrincipale.this);// initialise la variable av le nouveau panneau a afficher\r\n\t\t\t\t\tcont.add(rech, BorderLayout.CENTER);// le réajouter au panneau\r\n\t\t\t\t\tcont.repaint(); // force la visualisation graphique du panneau (repeindre le containaire)\r\n\t\t\t\t\tFenetrePrincipale.this.setVisible(true);\r\n\t\t\t}\r\n\t\t\t if (e.getSource().equals(aide)){\r\n\t\t\t\t\tcont.removeAll(); // effacer les anciens affichages (cont = endroit ou on stock l'ensemble des panneau et autres éléments graphiques)\r\n\t\t\t\t\tAide aide = new Aide();// initialise la variable av le nouveau panneau a afficher\r\n\t\t\t\t\tcont.add(aide, BorderLayout.CENTER);// le réajouter au panneau\r\n\t\t\t\t\tcont.repaint(); // force la visualisation graphique du panneau (repeindre le containaire)\r\n\t\t\t\t\tFenetrePrincipale.this.setVisible(true);\r\n\t\t\t }\r\n\t\t}",
"public void mettreOrdre() throws NbDeException {\n\t\tfor (Senateur s : senateurs) {\n\t\t\tif (De.jet(1) - De.getMauvaisPresage() >= 5) {\n\t\t\t\t// TODO remettre le senateur au forum\n\t\t\t}\n\t\t}\n\t}",
"@Before\n\tpublic void incoporacionDeCandidatosYProvinciasHabilitadasALaJuntaElectoral(){\n\t\tmendoza.agregarPartido(pro);\n\t\tbuenosaires.agregarPartido(pro);\n\t\trionegro.agregarPartido(pro);\n\t\tentrerios.agregarPartido(pro);\n\t\tmendoza.agregarPartido(renovador);\n\t\tbuenosaires.agregarPartido(renovador);\n\t\trionegro.agregarPartido(renovador);\n\t\tentrerios.agregarPartido(renovador);\n\t\tmendoza.agregarPartido(fpv);\n\t\tbuenosaires.agregarPartido(fpv);\n\t\trionegro.agregarPartido(fpv);\n\t\tentrerios.agregarPartido(fpv);\n\n\t\t//Incorporacion de los candidatos habilitados al centro de computos\n\t\tjuntaElectoral.agregarCandidato(macri);\t\t\n\t\tjuntaElectoral.agregarCandidato(massa);\t\t\n\t\tjuntaElectoral.agregarCandidato(scioli);\n\n\t\t//Incorporacion de las provincias habilitadas al centro de computos\n\t\tjuntaElectoral.agregarProvincia(mendoza);\n\t\tjuntaElectoral.agregarProvincia(buenosaires);\n\t\tjuntaElectoral.agregarProvincia(rionegro);\n\t\tjuntaElectoral.agregarProvincia(entrerios);\n\t}",
"public void actionPerformed(ActionEvent ae) {\n if(ae.getSource().equals(ajouter))\n { //Selon le type on recupere les valeurs \n // et l'on cree un objet de ce type avec ces params\n // On cree cet objet dans la bdd\n if(S2 == \"service\"){\n String str = in_JT4.getText();\n \n String str2 = in_JT3.getText();\n // check si chaque case est remplie avant l'ajout\n if ((str.length() != 0 )&&(in_JT2.getText().length()!= 0)&&(in_JT3.getText().length() != 0)&&(in_JT4.getText().length()!= 0)){\n int i = Integer.parseInt(str);\n char c = str2.charAt(0);\n obj = new Service(in_JT1.getText(),in_JT2.getText(),c,i);\n serv_dao3.create(obj);\n }\n // else message erreur\n else jop1 = new JOptionPane();\n jop1.showMessageDialog(null, \"Vous ne pouvez ajouter, il manque au moins un champ\"\n + \" !\", \"Information\", JOptionPane.INFORMATION_MESSAGE);\n }\n }\n //Selon le type on recupere les valeurs \n // et l'on cree un objet de ce type avec ces params\n // On cree cet objet dans la bdd\n if(S2 == \"malade\"){\n String str = in_JT1.getText();\n String str2 = combo.getSelectedItem().toString();\n // check si chaque case est remplie avant l'ajout\n if ((str.length() != 0 )&&(in_JT2.getText().length()!= 0)&&(in_JT3.getText().length() != 0)&&(in_JT4.getText().length()!= 0)&&(in_JT5.getText().length() != 0) && (str2.length() !=0)){\n int i = Integer.parseInt(str);\n mal = new Malade(i, in_JT2.getText(),in_JT3.getText(),in_JT4.getText(),in_JT5.getText(), str2);\n mal_dao.create(mal);\n }\n // else message erreur\n else jop1 = new JOptionPane();\n jop1.showMessageDialog(null, \"Vous ne pouvez ajouter, il manque au moins un champ\"\n + \" !\", \"Information\", JOptionPane.INFORMATION_MESSAGE);\n }\n //Selon le type on recupere les valeurs \n // et l'on cree un objet de ce type avec ces params\n // On cree cet objet dans la bdd\n if(S2 == \"hospitalisation\"){\n String str = in_JT1.getText();\n String str2 = in_JT2.getText();\n String str3 = in_JT3.getText();\n String str4 = in_JT4.getText();\n \n // check si chaque case est remplie avant l'ajout\n if ((str.length() != 0 )&&(in_JT2.getText().length()!= 0)&&(in_JT3.getText().length() != 0)&&(in_JT4.getText().length()!= 0)){\n \n int i = Integer.parseInt(str);\n int i2 = Integer.parseInt(str3);\n int i3 = Integer.parseInt(str4);\n hosp = new Hosp (i,str2 ,i2,i3);\n hosp_dao.create(hosp);\n }\n // else message erreur\n else jop1 = new JOptionPane();\n jop1.showMessageDialog(null, \"Vous ne pouvez ajouter , il manque au moins un champ\"\n + \" !\", \"Information\", JOptionPane.INFORMATION_MESSAGE);\n \n }\n //Selon le type on recupere les valeurs \n // et l'on cree un objet de ce type avec ces params\n // On cree cet objet dans la bdd\n if(S2 == \"docteur\"){\n String str = in_JT1.getText();\n String str2 = in_JT2.getText();\n String str3 = in_JT3.getText();\n String str4 = in_JT4.getText();//tel\n String str5 = in_JT5.getText();//adresse\n String str6 = combo.getSelectedItem().toString();\n // check si chaque case est remplie avant l'ajout\n if ((str.length() != 0 )&&(in_JT2.getText().length()!= 0)&&\n (in_JT3.getText().length() != 0)&&(in_JT4.getText().length()!= 0)\n &&(in_JT5.getText().length() != 0) && (in_JT6.getText().length() != 0)&&(str6.length()!=0)){\n \n int i = Integer.parseInt(str);\n doc = new Docteur(i, str2,str3,str4,str5,str6);\n doc_dao.create(doc); \n }\n // else message erreur\n else jop1 = new JOptionPane();\n jop1.showMessageDialog(null, \"Vous ne pouvez ajouter, il manque au moins un champ\"\n + \" !\", \"Information\", JOptionPane.INFORMATION_MESSAGE);\n \n \n }\n //Selon le type on recupere les valeurs \n // et l'on cree un objet de ce type avec ces params\n // On cree cet objet dans la bdd\n if(S2 == \"infirmier\"){\n String str = in_JT1.getText();\n String str2 = in_JT2.getText();\n String str3 = in_JT3.getText();\n String str4 = in_JT4.getText();//tel\n String str5 = in_JT5.getText();//adresse\n String str6 = combo2.getSelectedItem().toString();\n String str7 = combo.getSelectedItem().toString();\n String str8 = in_JT6.getText();\n // check si chaque case est remplie avant l'ajout\n if ((str.length() != 0 )&&(in_JT2.getText().length()!= 0)&&\n (in_JT3.getText().length() != 0)&&(in_JT4.getText().length()!= 0)\n &&(in_JT5.getText().length() != 0) && (str7.length() != 0)&&(str6.length()!=0)&&(str8.length()!=0)){\n int i = Integer.parseInt(str);\n float f = Float.parseFloat(str8);\n inf = new Infirmier (i, str2,str3,str4,str5,str6,str7,f);\n inf_dao.create(inf);\n }\n // else message erreur\n else jop1 = new JOptionPane();\n jop1.showMessageDialog(null, \"Vous ne pouvez ajouter, il manque au moins un champ\"\n + \" !\", \"Information\", JOptionPane.INFORMATION_MESSAGE);\n \n \n }\n }",
"@Override\r\n public void actionPerformed(ActionEvent e) {\r\n //-------------------- ASIGNACIONES INICIALES PARA EL COMBATE-------------------\r\n //Aqui se cargan todas las vistas y parametros iniciales, se llenan los label, etc\r\n //Este boton es el de iniciar combate en la vista previa combate\r\n if (vpc.getBotonIniciar() == (JButton) e.getSource()){\r\n try {\r\n creg.guardarAccionUsuario(\"Usuario inicio el combate\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n this.termino = false;\r\n va.agregarListener(this);\r\n ve.agregarListener(this);\r\n this.vc.agregarListener(this);\r\n vpc.setVisible(false);\r\n int Index_inicial1 = vpc.getIndexjC_Inicial1();\r\n int Index_inicial2 = vpc.getIndexjC_Inicial2();\r\n vc.setjL_jugador1(entrenador1.getNombre());\r\n vc.setjL_jugador2(entrenador2.getNombre());\r\n vc.setjL_nombrepokemon1(getEquipo1()[Index_inicial1].getPseudonimo());\r\n vc.setjL_nombrepokemon2(getEquipo2()[Index_inicial2].getPseudonimo());\r\n vc.setjL_especie1(getEquipo1()[Index_inicial1].getNombre_especie());\r\n vc.setjL_especie2(getEquipo2()[Index_inicial2].getNombre_especie());\r\n vc.setjL_nombrepokemon2(vpc.getjC_Inicial2());\r\n vc.setjL_vida_actual1(getEquipo1()[Index_inicial1].getVida_restante(), getEquipo1()[Index_inicial1].getVida());\r\n vc.setjL_vida_actual2(getEquipo2()[Index_inicial2].getVida_restante(), getEquipo2()[Index_inicial2].getVida());\r\n vc.setjL_Nivel1(getEquipo1()[Index_inicial1].getNivel());\r\n vc.setjL_Nivel2(getEquipo2()[Index_inicial2].getNivel());\r\n vc.setjL_distincion1(entrenador1.getDistincion());\r\n vc.setjL_distincion2(entrenador2.getDistincion());\r\n this.turno = 0;\r\n this.pokemon_activo1 = getEquipo1()[Index_inicial1];\r\n this.pokemon_activo2 = getEquipo2()[Index_inicial2];\r\n vc.setVisible(true);\r\n if(tipo_simulacion == 1 || tipo_simulacion == 2){\r\n JOptionPane.showMessageDialog(this.vc, \"Turno\"+\" \"+entrenador1.getNombre(), \"Tu Turno\", JOptionPane.INFORMATION_MESSAGE);\r\n vc.turnoJugador1();\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.setjL_Turno_actual(entrenador1.getNombre());\r\n }\r\n else{\r\n JOptionPane.showMessageDialog(this.vc, \"Comenzando Simulacion Completa de un Combate Usuario vs Sistema\", \"Comienzo Simulacion\", JOptionPane.INFORMATION_MESSAGE); \r\n vc.turnoSimulacion();\r\n try {\r\n creg.guardarRegistroSimulacion(\"Comenzando simulacion completa usuario vs sistema\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n while (condicionVictoria(getEquipo1(), getEquipo2())==false){\r\n turnoUsuario();\r\n if(termino == true) break;\r\n turnoSistema();\r\n if(termino == true) break;\r\n }\r\n }\r\n \r\n }\r\n // Para cambiar a un equipo personalizado distinto al que se posee para el primer entrenador\r\n if(vpc.getBotonEquipo1()== (JButton) e.getSource()){\r\n try {\r\n creg.guardarAccionUsuario(\"Jugador1 eligió cambiar su equipo por uno personalizado\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n VistaNuevoEquipo vnew = new VistaNuevoEquipo();\r\n try {\r\n int equipo = 1;\r\n ControladorEquipo ce = new ControladorEquipo(vnew, 0, 0, controlador_principal, this, vpc, equipo);\r\n ConexionBD cBD = new ConexionBD();\r\n ArrayList<String> nombres_pokemon = new ArrayList();\r\n nombres_pokemon = cBD.obtenerNombresPokemones();\r\n vnew.setJL_Pokemon1(nombres_pokemon);\r\n vnew.setJL_Pokemon2(nombres_pokemon);\r\n vnew.setJL_Pokemon3(nombres_pokemon);\r\n vnew.setJL_Pokemon4(nombres_pokemon);\r\n vnew.setJL_Pokemon5(nombres_pokemon);\r\n vnew.setJL_Pokemon6(nombres_pokemon);\r\n \r\n } catch (SQLException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n \r\n // Lo mismo pero para el segundo\r\n if(vpc.getBotonEquipo2()== (JButton) e.getSource()){\r\n try {\r\n creg.guardarAccionUsuario(\"Jugador2 eligió cambiar su equipo por uno personalizado\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n VistaNuevoEquipo vnew = new VistaNuevoEquipo();\r\n try {\r\n int equipo = 2;\r\n ControladorEquipo ce = new ControladorEquipo(vnew, 0, 0, controlador_principal, this, vpc, equipo);\r\n ConexionBD cBD = new ConexionBD();\r\n ArrayList<String> nombres_pokemon = new ArrayList();\r\n nombres_pokemon = cBD.obtenerNombresPokemones();\r\n vnew.setJL_Pokemon1(nombres_pokemon);\r\n vnew.setJL_Pokemon2(nombres_pokemon);\r\n vnew.setJL_Pokemon3(nombres_pokemon);\r\n vnew.setJL_Pokemon4(nombres_pokemon);\r\n vnew.setJL_Pokemon5(nombres_pokemon);\r\n vnew.setJL_Pokemon6(nombres_pokemon);\r\n \r\n } catch (SQLException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n \r\n // ----------ACCIONES BOTONES DE ATAQUE------------- \r\n //Boton ataque jugador 1\r\n //Setea la vista para los movimientos del pokemon activo del jugador 1\r\n if (vc.getBotonAtacar1() == (JButton) e.getSource()){\r\n va.activarAtaques();\r\n try {\r\n creg.guardarAccionUsuario(\"Jugador1 eligio atacar\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n for (int i = 0; i < 4; i++) {\r\n if(pokemon_activo1.getMovimientos()[i].getPuntos_poder_restantes() <= 0){\r\n va.desactivarAtaque(i);\r\n }\r\n \r\n }\r\n va.setVistaAtaque(pokemon_activo1);\r\n va.setVisible(true);\r\n \r\n }\r\n //Boton ataque jugador 2\r\n //Setea la vista para los movimientos del pokemon activo del jugador 2\r\n if (vc.getBotonAtacar2() == (JButton) e.getSource()){\r\n va.activarAtaques();\r\n try {\r\n creg.guardarAccionUsuario(\"Jugador2 eligió atacar\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n for (int i = 0; i < 4; i++) {\r\n if(pokemon_activo2.getMovimientos()[i].getPuntos_poder_restantes() <= 0){\r\n va.desactivarAtaque(i);\r\n }\r\n \r\n }\r\n va.setVistaAtaque(pokemon_activo2);\r\n va.setVisible(true);\r\n \r\n }\r\n //-------------ACCIONES DE LOS ATAQUES SELECCIONADOS DESDE EL PRIMERO HASTA EL CUARTO----------\r\n //-------------ACCION ATAQUE 1-------------------- \r\n // Boton para el primer ataque de la lista de movimientos del pokemon seleccionado \r\n if(va.getBotonAtaque1() == (JButton) e.getSource()){\r\n try {\r\n creg.guardarAccionUsuario(\"Usuario eligió atacar con el primer ataque\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n try {\r\n accionAtaques(0);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n \r\n //---------------------ACCION ATAQUE 2 ------------------\r\n // Boton para el segundo ataque de la lista de movimientos del pokemon seleccionado \r\n if(va.getBotonAtaque2() == (JButton) e.getSource()){\r\n try {\r\n creg.guardarAccionUsuario(\"Usuario eligió atacar con el segundo ataque\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n try {\r\n accionAtaques(1);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n \r\n //-----------------ACCION ATAQUE 3------------------\r\n // Boton para el tercer ataque de la lista de movimientos del pokemon seleccionado \r\n if(va.getBotonAtaque3() == (JButton) e.getSource()){\r\n try {\r\n creg.guardarAccionUsuario(\"Usuario eligió atacar con el tercer ataque\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n try {\r\n accionAtaques(2);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n \r\n //-----------------ACCION ATAQUE 4-------------------\r\n // Boton para el cuarto ataque de la lista de movimientos del pokemon seleccionado \r\n if(va.getBotonAtaque4() == (JButton) e.getSource()){\r\n try {\r\n creg.guardarAccionUsuario(\"Usuario eligió atacar con el cuarto ataque\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n try {\r\n accionAtaques(3);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n \r\n //-----------------ACCIONES BOTONES CAMBIAR---------\r\n //Boton cambiar del primer jugador\r\n if(vc.getBotonCambiar1() == (JButton) e.getSource()){\r\n try {\r\n creg.guardarAccionUsuario(\"Jugador1 eligió cambiar de pokemon\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n ve.activarBotones();\r\n int index = -1;\r\n for (int j = 0; j < getEquipo1().length; j++) {\r\n if(getEquipo1()[j].equals(pokemon_activo1))\r\n index=j; \r\n }\r\n ve.setVistaCambio(getEquipo1(), pokemon_activo1, index);\r\n ve.setVisible(true);\r\n }\r\n //Boton cambiar del segundo jugador \r\n if(vc.getBotonCambiar2() == (JButton) e.getSource()){\r\n try {\r\n creg.guardarAccionUsuario(\"Jugador2 eligió cambiar de pokemon\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n ve.activarBotones();\r\n int index = -1;\r\n for (int j = 0; j < getEquipo2().length; j++) {\r\n if(getEquipo2()[j].equals(pokemon_activo2))\r\n index=j; \r\n }\r\n ve.setVistaCambio(getEquipo2(), pokemon_activo2, index);\r\n ve.setVisible(true);\r\n }\r\n //----------------SELECCION DE CADA POKEMON A CAMBIAR-------------\r\n //----------------CAMBIO POKEMON 1 -------------------------------\r\n //Boton que ejecuta las acciones cuando se selecciona al primer pokemon del equipo para el cambio\r\n if(ve.getBotonPokemon1() == (JButton) e.getSource()){\r\n try {\r\n creg.guardarAccionUsuario(\"Usuario eligio cambiar el pokemon activo por el primero de su lista\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n accionCambios(0);\r\n }\r\n \r\n //----------------CAMBIO POKEMON 2 -------------------------------\r\n //Boton que ejecuta las acciones cuando se selecciona al segundo pokemon del equipo para el cambio\r\n if(ve.getBotonPokemon2() == (JButton) e.getSource()){\r\n try {\r\n creg.guardarAccionUsuario(\"Usuario eligio cambiar el pokemon activo por el segundo de su lista\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n accionCambios(1);\r\n \r\n }\r\n \r\n //----------------CAMBIO POKEMON 3 -------------------------------\r\n //Boton que ejecuta las acciones cuando se selecciona al tercer pokemon del equipo para el cambio\r\n if(ve.getBotonPokemon3() == (JButton) e.getSource()){\r\n try {\r\n creg.guardarAccionUsuario(\"Usuario eligio cambiar el pokemon activo por el tercero de su lista\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n accionCambios(2);\r\n \r\n }\r\n \r\n //----------------CAMBIO POKEMON 4 -------------------------------\r\n //Boton que ejecuta las acciones cuando se selecciona al cuarto pokemon del equipo para el cambio\r\n if(ve.getBotonPokemon4() == (JButton) e.getSource()){\r\n try {\r\n creg.guardarAccionUsuario(\"Usuario eligio cambiar el pokemon activo por el cuarto de su lista\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n accionCambios(3);\r\n \r\n }\r\n \r\n //----------------CAMBIO POKEMON 5 -------------------------------\r\n //Boton que ejecuta las acciones cuando se selecciona al quinto pokemon del equipo para el cambio\r\n if(ve.getBotonPokemon5() == (JButton) e.getSource()){\r\n try {\r\n creg.guardarAccionUsuario(\"Usuario eligio cambiar el pokemon activo por el quinto de su lista\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n accionCambios(4);\r\n \r\n }\r\n //----------------CAMBIO POKEMON 6 -------------------------------\r\n //Boton que ejecuta las acciones cuando se selecciona al sexto pokemon del equipo para el cambio\r\n if(ve.getBotonPokemon6() == (JButton) e.getSource()){\r\n try {\r\n creg.guardarAccionUsuario(\"Usuario eligio cambiar el pokemon activo por el sexto de su lista\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n accionCambios(5);\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }",
"public void abrirDialogoCustodio(){\n\t\tif(aut_empleado.getValor()!=null){\n\t\t\ttab_tarspaso_Custodio.limpiar();\n\t\t\ttab_tarspaso_Custodio.insertar();\n\t\t\t//tab_direccion.limpiar();\n\t\t//\ttab_direccion.insertar();\n\t\t\tdia_traspaso_custodio.dibujar();\n\t\t}\n\t\telse{\n\t\t\tutilitario.agregarMensaje(\"Inserte un Custodio\", \"\");\n\t\t}\n\n\t}",
"public void setar_campos()\n {\n int setar = tblCliNome.getSelectedRow();\n txtCliId.setText(tblCliNome.getModel().getValueAt(setar, 0).toString());\n txtCliNome.setText(tblCliNome.getModel().getValueAt(setar, 1).toString());\n txtCliRua.setText(tblCliNome.getModel().getValueAt(setar, 2).toString());\n txtCliNumero.setText(tblCliNome.getModel().getValueAt(setar, 3).toString());\n txtCliComplemento.setText(tblCliNome.getModel().getValueAt(setar, 4).toString());\n txtCliBairro.setText(tblCliNome.getModel().getValueAt(setar, 5).toString());\n txtCliCidade.setText(tblCliNome.getModel().getValueAt(setar, 6).toString());\n txtCliUf.setText(tblCliNome.getModel().getValueAt(setar, 7).toString());\n txtCliFixo.setText(tblCliNome.getModel().getValueAt(setar, 8).toString());\n txtCliCel.setText(tblCliNome.getModel().getValueAt(setar, 9).toString());\n txtCliMail.setText(tblCliNome.getModel().getValueAt(setar, 10).toString());\n txtCliCep.setText(tblCliNome.getModel().getValueAt(setar, 11).toString());\n \n // A LINHA ABAIXO DESABILITA O BOTÃO ADICIONAR PARA QUE O CADASTRO NÃO SEJA DUPLICADO\n btnAdicionar.setEnabled(true);\n \n }",
"public Gui_lectura_consumo() {\n initComponents();\n centrarform();\n consumo_capturado.setEditable(false);\n limpiarCajas();\n \n \n }",
"public void verRegistrarCandidato()\r\n\t{\r\n\t\tdatos = new RegistrarCandidato(this);\r\n\t\tdatos.setVisible(true);\r\n\t}",
"private void Screentocharge() {\r\n\r\n\t\t\t\t\r\n\t\tJTextField nombre = new JTextField();\r\n\t\tJTextField edad = new JTextField();\r\n\t\tJTextField raza = new JTextField();\r\n\t\tJTextField cuento = new JTextField();\r\n\t\tChoice tipo = new Choice();\r\n\t\t\t\t\t\t\r\n\t\ttipo.add(\"Perro\");\r\n\t\ttipo.add(\"Gato\");\r\n\t\ttipo.add(\"Conejo\");\r\n\t\t\r\n\t\tedad.addKeyListener(new KeyAdapter()\r\n\t\t{\r\n\t\t public void keyTyped(KeyEvent e)\r\n\t\t {\r\n\t\t char caracter = e.getKeyChar();\r\n\t\t if(((caracter<'0')||(caracter>'9'))&&(caracter!='\\b'))\r\n\t\t {\r\n\t\t e.consume(); \r\n\t\t }\r\n\t\t }\r\n\t\t});\r\n\t\t\r\n\t\tObject[] message = { \"Tipo:\", tipo, \"Nombre:\", nombre, \"Edad\", edad, \"Raza\", raza, \"Causa\", cuento };\r\n\r\n\t\tUIManager.put(\"OptionPane.minimumSize\",new Dimension(500,400));\r\n\t\tint option = JOptionPane.showConfirmDialog(null, message, \"Ingreso de Pasiente\", JOptionPane.OK_CANCEL_OPTION);\r\n\t\tif (option == JOptionPane.OK_OPTION) {\t\r\n\t\t\tif (edad.getText().equals(\"\")) {\r\n\t\t\t\tedad.setText(\"0\");\r\n\t\t\t\treturnAnimal(tipo.getSelectedItem(), nombre.getText(), raza.getText(), \r\n\t\t\t\t\t\tInteger.valueOf(edad.getText()), cuento.getText());\r\n\t\t\t}\r\n\t\t\t returnAnimal(tipo.getSelectedItem(), nombre.getText(), raza.getText(), \r\n\t\t\t\t\t\t\tInteger.valueOf(edad.getText()), cuento.getText());\r\n\t\t}\r\n\t\t\r\n\t\tnombre = null;\r\n\t\tedad =null;\r\n\t\traza = null;\r\n\t\tcuento = null;\r\n\t\ttipo =null;\r\n\t\t\r\n\t}",
"private void botonEnviarActionPerformed(java.awt.event.ActionEvent evt) {\n emisor = Integer.parseInt(jTextField2.getText());\r\n time_emisor = Integer.parseInt(jTextField4.getText());\r\n receptor = Integer.parseInt(jTextField3.getText());\r\n time_receptor = Integer.parseInt(jTextField5.getText());\r\n \r\n posXEmisor = emisor;\r\n posYEmisor = time_emisor;\r\n posXReceptor = receptor;\r\n posYReceptor = time_receptor;\r\n \r\n if(desfaces[emisor][time_emisor]>=desfaces[receptor][time_receptor]){\r\n jButton1.setEnabled(true);\r\n lienzo.setGraficar_flecha(true);\r\n } else {\r\n lienzo.setGraficar_flecha(false);\r\n lienzo.repaint();\r\n jPanel5.repaint();\r\n }\r\n }",
"public void identificacion(){\n System.out.println(\"¡Bienvenido gamer!\\nSe te solcitaran algunos datos con el fin de personalizar tu experiencia :)\");\n System.out.println(\"Porfavor, ingresa tu nombre\");\n nombre = entrada.nextLine();\n System.out.println(\"Bien, ahora, ingresa tu gamertag\");\n gamertag = entrada.nextLine();\n System.out.println(\"Ese es un gran gamertag, ahora, diseña tu id, recuerda que tiene que ser un numero entero\");\n id = entrada.nextInt();\n //se le pide al usuario que elija la dificultad del juego, cada dificultad invocara a un metodo distinto\n System.out.println(\"Instrucciones:\\nTienes un numero limitado de intentos, tendras que encontrar las minas para asi desactivarlas\\n¿Quien no queria ser un Desactivador de minas de niño?\");\n System.out.println(\"Selecciona la dificultad\\n1. Facil\\n2. Intermedia\\n3 .Dificil\\n4. Imposible\");\n decision = entrada.nextInt();\n //creo el objeto que me llevara al juego, mandandolo con mis variables recopiladas\n Buscaminas dear = new Buscaminas(nombre, gamertag, id);\n if (decision==1){\n System.out.println(\"Estamos listos para empezar :), La dificultad que has elegido es Facil\");\n //vamos para el juego\n dear.juego();\n }else if(decision==2){\n System.out.println(\"Estamos listos para empezar :), La dificultad que has elegido es Intermedia\");\n dear.juego1();\n\n }else if(decision==3){\n System.out.println(\"Estamos listos para empezar :), La dificultad que has elegido es Dificil\");\n dear.juego2();\n\n }else if(decision==4){\n System.out.println(\"Estamos listos para empezar :), La dificultad que has elegido es Imposible\");\n dear.juego3();\n\n }\n\n\n\n }",
"public void acionarInadimplencia(CestaGarantiasDO cesta);",
"@Override\n\tpublic void effetto(Giocatore giocatoreAttuale) {\n\t\tgiocatoreAttuale.vaiInPrigione();\n\t\tSystem.out.println(MESSAGGIO_IN_PRIGIONE);\n\t\t\n\t}",
"private void controladorNuevoColectivo(Controlador controlador){\n this.contNuevoColectivo = controlador.getNuevoColectivo();\n nuevoColectivo.setControlCreateCollective(contNuevoColectivo);\n }",
"public ManipularEstudiantes() {\n initComponents();\n cme = new Control_Mantenimiento_Estudiante(this);\n this.gUI_botones2.agregar_eventos(cme);\n }",
"@Override\n public synchronized void demarrer(){\n if(modele.getQuiterJeu()){return;}\n modele.getMoteurJeu().setEtapeJeu(this);\n // apercu dans le termial pour debuger\n System.out.println(\"-----------------nom joueur: \"+modele.getJoueurCourant().getNom());\n System.out.print(\" humain: \"+modele.getJoueurCourant().estHumain());\n System.out.print(\" stand: \"+modele.getJoueurCourant().getMainCourant().getStand());\n System.out.print(\" perdu: \"+modele.getJoueurCourant().getMainCourant().estPerdu());\n System.out.print(\" blackjack: \"+modele.getJoueurCourant().getMainCourant().estBlackJack());\n System.out.println(\" jeu: \"+modele.getJoueurCourant().getMainCourant().getJeu().toString());\n //-------------------------------------------------\n // On ne fait pas une boucle ici pour que l'observer\n // puisse acceder a son observé et se mettre a jour\n //-------------------------------------------------\n new Thread(){\n @Override\n public void run() {\n try {\n // si plus de carte\n if(modele.getPioche().getCartes().size() < 1){\n for(Carte carte:modele.getDefausse().getCartes()){\n carte.setFaceCarte(Face.VERSO);\n modele.getPioche().ajouterDessous(carte);\n }\n modele.getDefausse().vider();\n modele.getPioche().melanger();\n }\n \n \n // si il peut plus jouer\n if(modele.getJoueurCourant().getMainCourant().estBlackJack() || modele.getJoueurCourant().getMainCourant().estPerdu() \n || modele.getJoueurCourant().getMainCourant().getStand() || modele.getJoueurCourant().getMainCourant().est21()\n || modele.getJoueurCourant().getMainCourant().getAAbandonner() || modele.getJoueurCourant().getAPerduJeu()){\n \n // si le joueur a une autre main\n if(modele.getJoueurCourant().mainSuivant()){\n Thread.sleep(2000);\n demarrer();\n \n }\n // sinon si il y a un joueur suivant on fait joueur suivant\n else if(modele.joueurSuivant()){\n Thread.sleep(2000);\n demarrer();\n }else{\n modele.getMoteurJeu().setEtapeJeu(etapeSuivant);\n Thread.sleep(2000);\n modele.setMessage(modele.getCroupier().getNom()+\" plays\");\n // on affiche les carte du croupier\n for(Carte carte: modele.getCroupier().getMainCourant().getJeu().getCartes()){\n carte.setFaceCarte(Face.RECTO);\n }\n System.out.println(\"+++++++++++++++++++++++++++++++++++++++++++++++++\");\n Thread.sleep(3000);\n demarrerEtapeSuivant();\n\n }\n\n }\n // sinon\n else{\n modele.setMessage(modele.getJoueurCourant().getNom()+\" plays\");\n if(!modele.getJoueurCourant().estHumain()){\n modele.getJoueurCourant().jouer(modele.getPioche(),modele.getDefausse());\n Thread.sleep(3000);\n demarrer();\n }\n \n\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }.start();\n \n }",
"private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {\n if (txtBusquedaNumHist.getText().isEmpty() == false) {\n try {\n limpiar();\n CP.buscarpacienteNumHistoria(Integer.valueOf(txtBusquedaNumHist.getText()));\n int id = Integer.valueOf(txtBusquedaNumHist.getText());\n if (CP.paciente(id) == null) {\n JOptionPane.showMessageDialog(null, \"No se encontro ningun Paciente\", \"Información\", 1);\n }\n jTextField3.setText(CP.paciente(id).getIdpaciente().toString());\n jTextField4.setText(CP.paciente(id).getCedpaciente());\n jTextField5.setText(CP.paciente(id).getApeppaciente());\n jTextField6.setText(CP.paciente(id).getApempaciente());\n jTextField7.setText(CP.paciente(id).getNom1paciente());\n jTextField8.setText(CP.paciente(id).getNom2paciente());\n jButton1.setEnabled(true);\n } catch (Exception e) {\n }\n } else {\n JOptionPane.showMessageDialog(null, \"Ingres Bun. Historia\", \"Información\", 1);\n }\n\n\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}",
"public void Pedircarnet() {\n\t\tSystem.out.println(\"solicitar carnet para verificar si es cliente de ese consultorio\");\r\n\t}",
"public void clickSurCarte(CarteModel carteJouer) throws IOException{\n\t\tif (ajm.estJoueurCourant() && !platMod.retourneFinDeManche())\n\t\t{\n\t\t\t//Si le joueur doit piocher une carte chez le joueur précédent\n\t\t\tif (platMod.retournePiocheChezJoueur())\n\t \t{\n\t\t\t\tSystem.out.println(\"Vous piochez chez un joueur\");\n\t\t\t\tnew DialogVuePiocheChezJoueur(jv, platMod); \n\t\t\t\tjv.validate();\n\t\t\t//sinon, c'est qu'il peut jouer une carte de son choix, a condition qu'elle soit valide et qu'il n'est pas à piocher\n\t \t}else if (platMod.peutJouerCarte(carteJouer)){\n\t \t//Si le joueur joue une carte alors qu'il aurait du prévenir \"Carte !\", il pioche deux cartes\n\t \t\tif(((JoueurHumain)ajm).retourneDerCarte())\n\t \t\t{\n\t \t\t\tSystem.out.println(\"Vous piochez deux cartes car vous n'avez pas cliquer sur Carte ! avant de jouer votre avans dernière carte\");\n\t \t\t\tajm.piocherCarteMultiple(platMod.retourneModelPioche(), 2);\n\t \t\t\tplatMod.roulementJoueurCourant();\n\t \t\t//Sinon, sa carte est prit en compte et est joué\n\t \t\t}else{\n\t \t\t\tSystem.out.println(\"Vous jouez la carte : \"+carteJouer.toString());\n\t\t\t\t\tArrayList<CarteModel> listCarteJouable = new ArrayList<CarteModel>(); //La liste ne contient que la carte cliqué valide\n\t\t\t\t\tlistCarteJouable.add(carteJouer);\n\t\t\t\t\tajm.jouer(platMod, listCarteJouable);\n\t\t\t\t\t\n\t\t\t\t\t//Pour le huit et le 15, le passage au joueur suivant se fera après un clic sur l'IHM\n\t\t\t\t\tif (carteJouer.retourneTaille() == 8 || carteJouer.retourneTaille() == 15) \n\t\t\t\t\t\tnew DialogVueChoixCouleur(jv, platMod);\n\t\t\t\t\telse \n\t\t\t\t\t\tplatMod.roulementJoueurCourant();\n\t \t\t}\n\t \t}\n\t\t}\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\n\n\t\t\t\t\tString nomSaisi = txtNomPersonnel.getText();\n\t\t\t\t\tString motDePasseSaisi = txtMotDePassePersonnel.getText();\n\t\t\t\t\tString roleChoisi = comboRoles.getSelectedItem().toString();\n\n\t\t\t\t\tif (!nomSaisi.isEmpty() && !motDePasseSaisi.isEmpty() && !roleChoisi.isEmpty()) {\n\t\t\t\t\t\t//ajout d'un nouveau personnel dans la bdd\n\t\t\t\t\t\tPersonnelMger.getInstance().addPersonnel(nomSaisi, motDePasseSaisi, roleChoisi);\n\t\t\t\t\t\t//fermer la boite de dialogue\n\t\t\t\t\t\tNewPersonnelDialog.this.setVisible(false);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\talert.showMessageDialog(null, \"Cet identifiant existe déjà !\", \"Erreur\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\n\t\t\t}",
"public GWDPEXPRESS_MY_ACHIEVEMENTS()\n{\najouterFenetre(\"EXPRESS_FEN_Search\", mWD_EXPRESS_FEN_Search);\najouterFenetre(\"EXPRESS_FEN_Profil\", mWD_EXPRESS_FEN_Profil);\najouterFenetre(\"EXPRESS_FEN_Achievement\", mWD_EXPRESS_FEN_Achievement);\n\n}",
"public void billeMurs() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t// Décomposition de la bille\n\t\t// 2 3 4\n\t\t// 1 5\n\t\t// 8 7 6 \n\n\t\tint mur = 0;\n\n\t\t// Contact Gauche de la bille\n\t\tif (billeEnCours.GM()[0] <= 0) {\n\t\t\tmur = 1;\n\t\t}\n\n\t\t// Contact Droite de la bille\n\t\tif (mur == 0) {\n\t\t\tif (billeEnCours.DM()[0] >= limiteDroite) {\n\t\t\t\tmur = 5;\n\t\t\t}\n\t\t}\n\n\t\t// Contact Haut de la bille\n\t\tif (mur == 0) {\n\t\t\tif (billeEnCours.MH()[1] <= 0) {\n\t\t\t\tmur = 3;\n\t\t\t}\n\t\t}\n\n\t\t// Contact Bas de la bille\n\t\tif (mur == 0) {\n\t\t\tif (billeEnCours.MB()[1] >= limiteHaut) {\n\t\t\t\tmur = 7;\n\t\t\t\tperteDeVie();\n\t\t\t\tbilleEnCours.changeVitesse(vitBilleInitiale);\n\t\t\t\tbilleEnCours.changePosition(posBilleInitiale);\n\t\t\t\tbarreEnCours.changePosition(posBarreInitiale);\n\t\t\t}\n\t\t}\n\n\t\t// Mise à jour de la vitesse\n\n\t\tif ((mur == 1)||(mur == 5)) {\n\t\t\tint[] nv = {- billeEnCours.renvoyerVitesse()[0], billeEnCours.renvoyerVitesse()[1]};\n\t\t\tbilleEnCours.changeVitesse(nv);\n\t\t}\n\n\t\tif (mur == 3) {\n\t\t\tint[] nv = {billeEnCours.renvoyerVitesse()[0], - billeEnCours.renvoyerVitesse()[1]};\n\t\t\tbilleEnCours.changeVitesse(nv);\n\t\t}\n\n\t}",
"private void iniciarDatos(Cliente pCliente, int pOpcionForm, FrmClienteLec pFrmPadre) {\n frmPadre = pFrmPadre;\n clienteActual = new Cliente();\n opcionForm = pOpcionForm;\n this.txtNombre.setEditable(true); // colocar txtNombre que se pueda editar \n this.txtApellido.setEditable(true); // colocar txtNombre que se pueda editar \n this.txtDui.setEditable(true); // colocar txtNombre que se pueda editar \n this.txtNumero.setEditable(true); // colocar txtNombre que se pueda editar \n switch (pOpcionForm) {\n case FormEscOpcion.CREAR:\n btnOk.setText(\"Nuevo\"); // modificar el texto del boton btnOk a \"Nuevo\" cuando la pOpcionForm sea CREAR\n this.btnOk.setMnemonic('N'); // modificar la tecla de atajo del boton btnOk a la letra N\n this.setTitle(\"Crear un nuevo Cliente\"); // modificar el titulo de la pantalla de FrmRolEsc\n break;\n case FormEscOpcion.MODIFICAR:\n btnOk.setText(\"Modificar\"); // modificar el texto del boton btnOk a \"Modificar\" cuando la pOpcionForm sea MODIFICAR\n this.btnOk.setMnemonic('M'); // modificar la tecla de atajo del boton btnOk a la letra M\n this.setTitle(\"Modificar el Cliente\"); // modificar el titulo de la pantalla de FrmRolEsc\n llenarControles(pCliente);\n break;\n case FormEscOpcion.ELIMINAR:\n btnOk.setText(\"Eliminar\");// modificar el texto del boton btnOk a \"Eliminar\" cuando la pOpcionForm sea ELIMINAR\n this.btnOk.setMnemonic('E'); // modificar la tecla de atajo del boton btnOk a la letra E\n this.setTitle(\"Eliminar el Cliente\"); // modificar el titulo de la pantalla de FrmRolEsc\n this.txtNombre.setEditable(false); // deshabilitar la caja de texto txtNombre\n this.txtApellido.setEditable(false);\n this.txtDui.setEditable(false);\n this.txtNumero.setEditable(false);\n llenarControles(pCliente);\n break;\n case FormEscOpcion.VER:\n btnOk.setText(\"Ver\"); // modificar el texto del boton btnOk a \"Ver\" cuando la pOpcionForm sea VER\n btnOk.setVisible(false); // ocultar el boton btnOk cuando pOpcionForm sea opcion VER\n this.setTitle(\"Ver el Cliente\"); // modificar el titulo de la pantalla de FrmRolEsc\n this.txtNombre.setEditable(false); // deshabilitar la caja de texto txtNombre\n this.txtApellido.setEditable(false);\n this.txtDui.setEditable(false);\n this.txtNumero.setEditable(false);\n llenarControles(pCliente);\n break;\n default:\n break;\n }\n }",
"private void executeRicercaAccertamentoPerOrdinativo() {\n \tif (model.getGestioneOrdinativoStep1Model().getAnnoAccertamento() == null || model.getGestioneOrdinativoStep1Model().getNumeroAccertamento() == null) {\n\n \t\tif(!sonoInAggiornamento()){\n \t\t\t\n \t\t\tmodel.getGestioneOrdinativoStep2Model().setListaAccertamento(new ArrayList<Accertamento>());\n \t\t\tmodel.getGestioneOrdinativoStep2Model().setListaAccertamentoOriginale(new ArrayList<Accertamento>());\n \t\t\tmodel.getGestioneOrdinativoStep2Model().setResultSize(0);\n\n \t\t\tRicercaAccertamentiSubAccertamenti request= new RicercaAccertamentiSubAccertamenti();\n \t\t\trequest.setEnte(sessionHandler.getEnte());\n \t\t\trequest.setRichiedente(sessionHandler.getRichiedente());\n\n\n \t\t\tParametroRicercaAccSubAcc param= new ParametroRicercaAccSubAcc();\n \t\t\tparam.setAnnoEsercizio(Integer.parseInt(sessionHandler.getAnnoEsercizio()));\n \t\t\tparam.setAnnoAccertamento(Integer.parseInt(sessionHandler.getAnnoEsercizio()));\n \t\t\tparam.setDisponibilitaAdIncassare(true);\n\n \t\t\t// Capitolo\n \t\t\tif (model.getGestioneOrdinativoStep1Model().getCapitolo() != null) {\n \t\t\t\tparam.setNumeroCapitolo(model.getGestioneOrdinativoStep1Model().getCapitolo().getNumCapitolo());\n \t\t\t\tparam.setNumeroArticolo(model.getGestioneOrdinativoStep1Model().getCapitolo().getArticolo());\n \t\t\t\tif(null!=model.getGestioneOrdinativoStep1Model().getCapitolo().getUeb()){\n \t\t\t\t\tparam.setNumeroUEB(model.getGestioneOrdinativoStep1Model().getCapitolo().getUeb().intValue());\n \t\t\t\t}\n \t\t\t}\n\n\n \t\t\tparam.setCodiceDebitore(model.getGestioneOrdinativoStep1Model().getSoggetto().getCodCreditore());\n \t\t\tparam.setIsRicercaDaAccertamento(false);\n \t\t\trequest.setParametroRicercaAccSubAcc(param);\n\n\n \t\t\taddNumAndPageSize(request, \"listaAccertamentoOrdinativoId\");\n\n \t\t\tRicercaAccertamentiSubAccertamentiResponse response= movimentoGestionService.ricercaAccertamentiSubAccertamentiPerOrdinativoIncasso(request);\n\n \t\t\tif(response.isFallimento() || !response.getErrori().isEmpty()){\n\n \t\t\t\t//setto gli errori cosi che siano segnalati lato app!\n \t\t\t\taddErrori(response.getErrori());\n\n \t\t\t}else{\n\n \t\t\t\tif (response.getListaAccertamenti() != null && response.getListaAccertamenti().size() > 0) {\n \t\t\t\t\tfor (Accertamento currentAccetamento : response.getListaAccertamenti()) {\n \t\t\t\t\t\taddAccertamentiESubAccertamentiInUnicaLista(currentAccetamento);\n \t\t\t\t\t}\n\n \t\t\t\t\tmodel.getGestioneOrdinativoStep2Model().setResultSize(response.getNumRisultati());\n \t\t\t\t\t\n \t\t\t\t\tif(model.getGestioneOrdinativoStep2Model().getListaAccertamento()==null || model.getGestioneOrdinativoStep2Model().getListaAccertamento().size()==0){\n \t\t\t\t\t\taddPersistentActionWarning(ErroreFin.CRU_WAR_1003.getErrore().getCodice()+\" : \"+ErroreFin.CRU_WAR_1003.getErrore(\" accertamenti o subaccertamenti\").getDescrizione());\n \t\t\t\t\t}\n \t\t\t\t} else {\n \t\t\t\t\taddPersistentActionWarning(ErroreFin.CRU_WAR_1003.getErrore().getCodice()+\" : \"+ErroreFin.CRU_WAR_1003.getErrore(\" accertamenti o subaccertamenti\").getDescrizione());\n \t\t\t\t}\n \t\t\t}\n\n \t\t}\n \t}\n }",
"public void accionCambios(int i){\r\n \r\n if(turno == 0){\r\n pokemon_activo1.setConfuso(false);\r\n pokemon_activo1.setDormido(false);\r\n this.pokemon_activo1 = this.getEquipo1()[i];\r\n ve.setVisible(false);\r\n vc.setjL_especie1(pokemon_activo1.getNombre_especie());\r\n vc.setjL_nombrepokemon1(pokemon_activo1.getPseudonimo());\r\n vc.setjL_vida_actual1(pokemon_activo1.getVida_restante(), pokemon_activo1.getVida());\r\n vc.setjL_Nivel1(pokemon_activo1.getNivel());\r\n vc.setjL_Turno_actual(entrenador2.getNombre());\r\n ve.setVisible(false);\r\n if(tipo_simulacion == 2){\r\n turnoSistema();\r\n }\r\n else{\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 setLabelEstados(1);\r\n setLabelEstados(0);\r\n }\r\n else if(turno == 1){\r\n pokemon_activo2.setConfuso(false);\r\n pokemon_activo2.setDormido(false);\r\n this.pokemon_activo2 = this.getEquipo2()[i];\r\n ve.setVisible(false);\r\n vc.setjL_especie2(pokemon_activo2.getNombre_especie());\r\n vc.setjL_nombrepokemon2(pokemon_activo2.getPseudonimo());\r\n vc.setjL_vida_actual2(pokemon_activo2.getVida_restante(), pokemon_activo2.getVida());\r\n vc.setjL_Nivel2(pokemon_activo2.getNivel());\r\n vc.setjL_Turno_actual(entrenador1.getNombre());\r\n ve.setVisible(false);\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 setLabelEstados(1);\r\n setLabelEstados(0);\r\n }\r\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString puestoNuevo=txtENombre.getText();\n\t\t\t\tString sueldoNuevo=txtEdSueldo.getText();\n\t\t\t\tif(!sueldoNuevo.matches(\"[0-9]+\")) {\n\t\t\t\t\tJOptionPane.showMessageDialog(btnGuardarE,\"La cantidad de sueldo es incorrecta\");\n\t\t\t\t}else {\n\t\t\t\tdouble sueldoNuevoNew = Double.parseDouble(sueldoNuevo);\n\t\t\t\tdata.setQuery(\"UPDATE TipoPuesto SET puesto = '\"+puestoNuevo+\"', sueldo='\"+sueldoNuevoNew+\"' WHERE puesto='\"+puestoViejo+\"'\");\n\t\t\t\t\n\t\t\t\ttxtENombre.setText(\"\");\n\t\t\t\ttxtEdSueldo.setText(\"\");\n\t\t\t\tif(cbEdPuesto.getSelectedIndex()!=0) {\n\t\t\t\t\tJOptionPane.showMessageDialog(btnGuardarE,\"Edición exitosa\");\n\t\t\t\t\tcbElPuesto.removeAllItems();\n\t\t\t\t\tcbEdPuesto.removeAllItems();\n\t\t\t\t\tcbElPuesto.addItem(\"Seleccione un hospital...\");\n\t\t\t\t\tcbEdPuesto.addItem(\"Seleccione un hospital...\");\n\t\t\t\t\tregistros=(ResultSet) data.getQuery(\"Select * from TipoPuesto\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\twhile(registros.next()) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcbElPuesto.addItem(registros.getString(\"puesto\"));\n\t\t\t\t\t\t\tcbEdPuesto.addItem(registros.getString(\"puesto\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"private void ajoutAffichage(int choix) {\n switch(choix) {\n case AFFICHE_SPOOL :\n ecranSpool.createContents();\n afficheChoix = AFFICHE_SPOOL;\n mntmSpoolUsage.setEnabled(false);\n mntmUser.setEnabled(true);\n mntmConfig.setEnabled(true);\n shell.layout();\n break;\n case AFFICHE_USER :\n ecranUser.createContents();\n afficheChoix = AFFICHE_USER;\n mntmSpoolUsage.setEnabled(true);\n mntmUser.setEnabled(false);\n mntmConfig.setEnabled(true);\n shell.layout();\n break;\n case AFFICHE_CONFIG :\n ecranConfig.createContents();\n afficheChoix = AFFICHE_CONFIG;\n mntmSpoolUsage.setEnabled(true);\n mntmUser.setEnabled(true);\n mntmConfig.setEnabled(false);\n shell.layout();\n break;\n default: break;\n }\n }",
"public void recibeOrden() {\r\n\t\tSystem.out.println(\"Ordene mi General\");\r\n\t}",
"public void nouvelleRelation(String formule,String commentaire, EOGenericRecord ecEnCours) {\r\n\t\tEOClassDescription descriptionIPrelation = EOClassDescription.classDescriptionForEntityName(\"IpRelationChoixEc\");\r\n\t\tEOGenericRecord nouvIpRelation=(EOGenericRecord)descriptionIPrelation.createInstanceWithEditingContext(null, null);\r\n\r\n\t\tmonEcSsShared.insertObject(nouvIpRelation);\r\n\t\tnouvIpRelation.takeValueForKey(formule,\"rceFormuleContrainte\");\t// normallement la clé primaire est attribuée d'office\r\n\t\tnouvIpRelation.takeValueForKey(commentaire,\"rceCommentaireContrainte\");\r\n\t\tSystem.out.println(\"ecEnCours ::::::::: \" + ecEnCours);\r\n\t\tnouvIpRelation.takeValueForKey(ecEnCours.valueForKey(\"fannKey\"), \"fannKey\");\r\n\t\tnouvIpRelation.takeValueForKey(ecEnCours.valueForKey(\"mrecKey\"), \"mrecKeyCible\");\r\n\t\tnouvIpRelation.takeValueForKey(eoDiplSelected.valueForKey(\"msemKey\"), \"msemKey\");\r\n\t\tnouvIpRelation.takeValueForKey(\"L\", \"rceTypeRelation\");\r\n\t\tmonEcSsShared.saveChanges();\r\n\t}",
"public void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == corporativa){\n\t\t\tthis.convenios.setVisible(true);\n\t\t}\n\t\tif((e.getSource()==guardar)&&(this.normal.isSelected())){\n\t\t\tControladorSocios s = ControladorSocios.getInstancia();\n\t\t\ts.generarInscripcionNormal(Integer.parseInt(this.TEXTDNI.getText()),Integer.parseInt(String.valueOf(this.abonos.getSelectedItem())));\n\t\t\t\n\t\t}\n\t\tif((e.getSource() == guardar)&&(this.corporativa.isSelected())){\n\t\t\tControladorSocios s = ControladorSocios.getInstancia();\n\t\t\ts.generarInscripcionCorporativa(Integer.parseInt(this.TEXTDNI.getText()), \n\t\t\t\t\tInteger.parseInt(String.valueOf(this.abonos.getSelectedItem())), \n\t\t\t\t\tInteger.parseInt(String.valueOf(this.convenios.getSelectedItem())),\"\");\n\t\t}\n\t\tif(e.getSource() == this.salir){\n\t\t\tFrameSocio s = FrameSocio.getFrameSocio();\n\t\t\ts.setVisible(true);\n\t\t\tthis.setVisible(false);\n\t\t}\n\t}",
"public Coup coupIA() {\n\n int propriete = TypeCoup.CONT.getValue();\n int bloque = Bloque.NONBLOQUE.getValue();\n Term A = intArrayToList(plateau1);\n Term B = intArrayToList(plateau2);\n Term C = intArrayToList(piecesDispos);\n Variable D = new Variable(\"D\");\n Variable E = new Variable(\"E\");\n Variable F = new Variable(\"F\");\n Variable G = new Variable(\"G\");\n Variable H = new Variable(\"H\");\n org.jpl7.Integer I = new org.jpl7.Integer(co.getValue());\n q1 = new Query(\"choixCoupEtJoue\", new Term[] {A, B, C, D, E, F, G, H, I});\n\n\n if (q1.hasSolution()) {\n Map<String, Term> solution = q1.oneSolution();\n int caseJ = solution.get(\"D\").intValue();\n int pion = solution.get(\"E\").intValue();\n Term[] plateau1 = listToTermArray(solution.get(\"F\"));\n Term[] plateau2 = listToTermArray(solution.get(\"G\"));\n Term[] piecesDispos = listToTermArray(solution.get(\"H\"));\n for (int i = 0; i < 16; i++) {\n if (i < 8) {\n this.piecesDispos[i] = piecesDispos[i].intValue();\n }\n this.plateau1[i] = plateau1[i].intValue();\n this.plateau2[i] = plateau2[i].intValue();\n }\n\n int ligne = caseJ / 4;\n int colonne = caseJ % 4;\n\n if (pion == 1 || pion == 5) {\n pion = 1;\n }\n if (pion == 2 || pion == 6) {\n pion = 0;\n }\n if (pion == 3 || pion == 7) {\n pion = 2;\n }\n if (pion == 4 || pion == 8) {\n pion = 3;\n }\n\n\n Term J = intArrayToList(this.plateau1);\n q1 = new Query(\"gagne\", new Term[] {J});\n System.out.println(q1.hasSolution() ? \"Gagné\" : \"\");\n if (q1.hasSolution()) {\n propriete = 1;\n }\n return new Coup(bloque,ligne, colonne, pion, propriete);\n }\n System.out.println(\"Bloqué\");\n return new Coup(1,0, 0, 0, 3);\n }",
"public static void viaggia(List<Trasporto> lista,Taxi[] taxi,HandlerCoR h) throws SQLException\r\n {\n Persona app = (Persona) lista.get(0);\r\n /* ARGOMENTI handleRequest\r\n 1° Oggetto Request\r\n 2° Array Taxi per permettere la selezione e la modifica della disponibilità\r\n */\r\n h.handleRequest(new RequestCoR(app.getPosPartenza(),app.getPosArrivo(),taxi),taxi); \r\n SceltaPercorso tempo = new SceltaPercorso();\r\n SceltaPercorso spazio = new SceltaPercorso();\r\n tempo.setPercorsoStrategy(new timeStrategy());\r\n spazio.setPercorsoStrategy(new lenghtStrategy());\r\n for(int i=0;i<5;i++)\r\n if(!taxi[i].getLibero())\r\n {\r\n if(Scelta.equals(\"veloce\"))\r\n {\r\n JOptionPane.showMessageDialog(null,\"Hai Scelto il Percorso più Veloce...\");\r\n Connessione conn;\r\n conn = Connessione.getConnessione();\r\n String query = \"Delete from CRONOCORSE where PASSEGGERO = ? \";\r\n try (PreparedStatement ps = conn.connect.prepareStatement(query)) {\r\n ps.setString(1, app.getNome());\r\n ps.executeUpdate();\r\n ps.close();\r\n JOptionPane.showMessageDialog(null,\"Cliente in viaggio...\\n\"+app.getNome()+\" è arrivato a destinazione!\\nPrezzo Corsa: \"+taxi[i].getPrezzoTotale()+\"€\");\r\n \r\n \r\n }catch(SQLException e){JOptionPane.showMessageDialog(null,e);}\r\n tempo.Prenota(taxi[i]); \r\n app.setPosPartenza();\r\n taxi[i].setPosizione(app.getPosArrivo());\r\n taxi[i].setStato(true);\r\n taxi[i].clear();\r\n lista.set(0,app);\r\n i=5;\r\n \r\n } else\r\n \r\n {\r\n JOptionPane.showMessageDialog(null,\"Hai Scelto il Percorso più Breve...\");\r\n Connessione conn;\r\n conn = Connessione.getConnessione();\r\n String query = \"Delete from CRONOCORSE where PASSEGGERO = ? \";\r\n try (PreparedStatement ps = conn.connect.prepareStatement(query)) {\r\n ps.setString(1, app.getNome());\r\n ps.executeUpdate();\r\n ps.close();\r\n JOptionPane.showMessageDialog(null,\"Cliente in viaggio...\\n\"+app.getNome()+\" è arrivato a destinazione!\\nPrezzo Corsa: \"+taxi[i].getPrezzoTotale()+\"€\");\r\n \r\n \r\n }catch(SQLException e){JOptionPane.showMessageDialog(null,e);}\r\n spazio.Prenota(taxi[i]); \r\n app.setPosPartenza();\r\n taxi[i].setPosizione(app.getPosArrivo());\r\n taxi[i].setStato(true);\r\n taxi[i].clear();\r\n lista.set(0,app);\r\n i=5;\r\n \r\n \r\n }\r\n }\r\n \r\n }",
"public Personnage attaqueSurPersonnage() {\n\t\tdouble rand = Math.random();\n\t\t\tif (rand >= 0.85){\n\t\t\t\tfrappeMonstre = monstre.getCaracter().getForce() * 2;\n\t\t\t\tjoueur.setDiminutionPV(frappeMonstre);\n\t\t\t\tsetVictimeKO(joueur);\n\t\t\t\tetatAttaque = 'C';\n\t\t\t\treturn joueur;\n\t\t\t}\n\t\t\telse if ((rand < 0.85) && (rand >= 0.15)){\n\t\t\t\tfrappeMonstre = monstre.getCaracter().getForce();\n\t\t\t\tjoueur.setDiminutionPV(frappeMonstre);\n\t\t\t\tsetVictimeKO(joueur);\n\t\t\t\tetatAttaque = 'N';\n\t\t\t\treturn joueur;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tetatAttaque = 'F';\n\t\t\t\tfrappeMonstre = 0;\n\t\t\t\treturn joueur;\n\t\t\t}\n\t\t}",
"private void mostrarEstadoObjetosUsados() {\n Beneficiario beneficiario = null;\n FichaSocial fichaSocial = null;\n SolicitudBeneficio solicitudBeneficio = null;\n AspectoHabitacional aspectoHabitacional = null;\n AspectoEconomico aspectoEconomico = null;\n\n // CAMBIAR: Obtener datos del Request y asignarlos a los textField\n if (this.getRequestBean1().getObjetoABM() != null) {\n fichaSocial = (FichaSocial) this.getRequestBean1().getObjetoABM();\n aspectoHabitacional = (AspectoHabitacional) fichaSocial.getAspectoHabitacional();\n aspectoEconomico = (AspectoEconomico) fichaSocial.getAspectoEconomico();\n this.getElementoPila().getObjetos().set(0, fichaSocial);\n this.getElementoPila().getObjetos().set(1, aspectoHabitacional);\n this.getElementoPila().getObjetos().set(2, aspectoEconomico);\n }\n\n int ind = 0;\n fichaSocial = (FichaSocial) this.obtenerObjetoDelElementoPila(ind++, FichaSocial.class);\n aspectoHabitacional = (AspectoHabitacional) this.obtenerObjetoDelElementoPila(ind++, AspectoHabitacional.class);\n aspectoEconomico = (AspectoEconomico) this.obtenerObjetoDelElementoPila(ind++, AspectoEconomico.class);\n\n\n this.getTfCodigo().setText(fichaSocial.getNumero());\n this.getTfFecha().setText(Conversor.getStringDeFechaCorta(fichaSocial.getFecha()));\n ////\n //Beneficiarios:\n if (fichaSocial.getTitular() != null) {\n this.getTfTitular().setText(fichaSocial.toString());\n }\n\n this.setListaDelCommunication(new ArrayList(fichaSocial.getGrupoFamiliar()));\n this.getObjectListDataProvider().setList(new ArrayList(fichaSocial.getGrupoFamiliar()));\n\n //Aspecto habitacional:\n if (aspectoHabitacional.getNumeroPersonas() != null) {\n this.getTfNroPersonas().setText(aspectoHabitacional.getNumeroPersonas().toString());\n }\n this.getTfVivienda().setText(aspectoHabitacional.getVivienda());\n this.getTfTenencia().setText(aspectoHabitacional.getTenencia());\n this.getTfNroCamas().setText(aspectoHabitacional.getNumeroCamas());\n this.getTfNroAmbientes().setText(aspectoHabitacional.getNumeroAmbientes());\n this.getCbBanioCompleto().setValue(new Boolean(aspectoHabitacional.isBanioCompleto()));\n this.getCbBanioInterno().setValue(new Boolean(aspectoHabitacional.isBanioInterno()));\n this.getCbAgua().setValue(new Boolean(aspectoHabitacional.isAgua()));\n this.getCbLuz().setValue(new Boolean(aspectoHabitacional.isLuz()));\n this.getCbCloaca().setValue(new Boolean(aspectoHabitacional.isCloaca()));\n this.getCbGasNatural().setValue(new Boolean(aspectoHabitacional.isGasNatural()));\n\n //Aspecto Economico:\n this.getTfNroCasas().setText(aspectoEconomico.getNumeroCasas());\n this.getTfNroTerrenos().setText(aspectoEconomico.getNumeroTerrenos());\n this.getTfNroCampos().setText(aspectoEconomico.getNumeroCampos());\n this.getTfVehiculo().setText(aspectoEconomico.getVehiculo());\n this.getTfIndustria().setText(aspectoEconomico.getIndustria());\n this.getTfActividadLaboral().setText(aspectoEconomico.getActividadLaboral());\n this.getTfComercio().setText(aspectoEconomico.getComercio());\n\n //Solicitud Beneficio\n this.setListaDelCommunication2(new ArrayList(fichaSocial.getListaSolicitudBeneficio()));\n this.getObjectListDataProvider2().setList(new ArrayList(fichaSocial.getListaSolicitudBeneficio()));\n }",
"private void btnModificaActionPerformed(java.awt.event.ActionEvent evt) { \n try {\n // Exceptie pentru neselectarea unui element\n if (ContactList.isSelectionEmpty()) {\n throw new ItemNotSelectedException();\n }\n // Prelucrarea datelor contactului selectat pentru a le prelua in campurile din fereastra de dialog\n Contact actual = (Contact) model.getElementAt(ContactList.getSelectedIndex());\n String sc[] = actual.toString().split(\",\");\n diAdauga.setVisible(true);\n String name[] = sc[0].split(\" \");\n tfNume.setText(name[0]);\n tfPrenume.setText(name[1]);\n tfNumarTelefon.setText(sc[1].trim());\n if (tfNumarTelefon.getText().substring(0, 2).equals(\"02\") || tfNumarTelefon.getText().substring(0, 2).equals(\"03\")) {\n cbFix.setSelected(true);\n } else {\n cbMobil.setSelected(true);\n }\n String d = sc[2].trim();\n String dataNasterii[] = d.split(\"-\");\n String a = dataNasterii[0];\n String l = dataNasterii[1];\n String z = dataNasterii[2];\n String dt = z + \".\" + l + \".\" + a;\n tfDataNasterii.setText(dt);\n btnConfirma.setVisible(false);\n } catch (ArrayIndexOutOfBoundsException e) {\n JOptionPane.showMessageDialog(this, \"Lista este goala!\");\n } catch (ItemNotSelectedException e) {\n JOptionPane.showMessageDialog(this, \"Nu exista un index selectat\");\n }\n\n\n }",
"public void verValidarCandidato()\r\n\t{\r\n\t\tcandidato = new ValidarCandidato(this);\r\n\t\tcandidato.setVisible(true);\r\n\t}",
"public Participante() {\n\t\tsuper();\n\t\tthis.nombreCompleto = \"\";\n\t\tthis.dni = \"\";\n\t\tthis.telefono = \"\";\n\t\tthis.fechaDeNacimiento = Date.valueOf(\"1977-11-14\");\n\t\tthis.direccion = \"\";\n\t\tthis.codigoPostal = \"\";\n\t\tthis.municipio = \"\";\n\t\tthis.provincia = \"\";\n\t\tthis.erte = false;\n\t\tthis.situacionLaboral = \"\";\n\t\tthis.situacionAdministrativa = \"\";\n\t\tthis.titulacion = \"\";\n\t\tthis.guardado = false;\n\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n if (e.getSource() == vistaCarrera.btnGuardar) { \n //primero compara si estan vacios los campos de texto\n if (!vistaCarrera.txtId.getText().equals(\"\") && !vistaCarrera.txtNombre.equals(\"\") && \n !vistaCarrera.txtFacultad.equals(\"\")) {\n carrera.setIdCarrera(vistaCarrera.txtId.getText());\n carrera.setNombreCarrera(vistaCarrera.txtNombre.getText());\n carrera.setFacultad(vistaCarrera.txtFacultad.getText());\n //De ser valida la accion, se guarda el objeto y se muestra el mensaje\n if (conC.registrar(carrera)) {\n JOptionPane.showMessageDialog(null, \"Carrera agregada correctamente\");\n limpiar();\n } //De lo contrario se muestra el mensaje de error\n else {\n JOptionPane.showMessageDialog(null, \"No se ha agregado la carrera\");\n limpiar();\n }\n }\n else{\n //mandara un mensaje al usuario si los campos estan vacios\n vistaCarrera.labelMsg.setText(\"No se aceptan campos vacíos\");\n }\n } \n }",
"public void anularEquiparacion() {\n\n\n try {\n\n if (!equiparacionBeanSelected.getEqp_estado().equals(\"2\")) {\n EquiparacionesDao equiparacionDAo = new EquiparacionesDao();\n equiparacionBeanSelected.setEqp_estado(\"3\");\n\n equiparacionDAo.dmlDr_regt_equiparaciones(2, equiparacionBeanSelected);\n\n MateriasSolicitudDao materiaDao = new MateriasSolicitudDao();\n\n addMessage(\"Registro anulado satisfactoriamente\", 1);\n FacesContext facesContext = FacesContext.getCurrentInstance(); \n Dr_siseg_usuarioBean usuario= new Dr_siseg_usuarioBean();\n usuario = (Dr_siseg_usuarioBean) facesContext.getExternalContext().getSessionMap().get(\"usuario\");\n \n BitacoraSolicitudDao bitacoraSolicitudDao=new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean=new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(equiparacionBeanSelected.getEqp_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"E\");\n bitacoraSolicitudBean.setBit_detalle(\"La Equiparacion fue Eliminada\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n \n \n listaEquiparaciones();\n }else{\n addMessage(\"Equiparacion NO puede ser Eliminada\", 1);\n }\n\n } catch (ExceptionConnection ex) {\n /* Logger.getLogger(EquivalenciaController.class\n .getName()).log(Level.SEVERE, null, ex);\n addMessage(\"Se produjo un error al anular el registro, contacte al administrador del sistema\", 2);\n */ }\n\n }",
"public void majAffichageConnectes() {\n effacerConnectes(); // on efface ce qui est deja ecrit dans la zone reservees a la liste des\n // connectes\n\n choixMessage.removeAllItems(); // Suppression de tous les items de la comboBox\n choixMessage.addItem(\"Tout le monde\");\n choixMessage.setSelectedIndex(0); // Par defaut => envoi a tout le monde\n\n // Parcours de la liste des personnes connectees\n for (Map.Entry<String, Color> entry : couleurs.entrySet()) {\n String nom = entry.getKey(); // recuperation du nom\n Color rgb = new Color(chercherCouleur(nom)); // recuperation de la couleur correspondante\n\n // Mise a jour de la combobox\n if(!fenetre.getClient().getNom().equals(nom)){\n choixMessage.addItem(nom);\n }\n\n // Mise a jour de l'affichage dans le panneau \"Connectes\"\n StyledDocument doc = connectes.getStyledDocument();\n StyleContext style = StyleContext.getDefaultStyleContext();\n // Modification de la couleur\n AttributeSet aset = style.addAttribute(style.getEmptySet(), StyleConstants.Foreground, rgb);\n // Mettre en gras\n aset = style.addAttributes(aset, style.addAttribute(style.getEmptySet(), StyleConstants.Bold, true));\n\n // ajout de la personne dans la liste avec la couleur correspondante\n try {\n doc.insertString(doc.getLength(), nom+\"\\n\", aset);\n } catch (BadLocationException e) {\n e.printStackTrace();\n }\n }\n\n System.out.println(\"maj de l'affichage de la liste des connectes\");\n }",
"public void aggiungiPecoraCasualmente() {\n\t\tif (((int) (Math.random() * 3)) >= 1) {\n\t\t\tPecoraAdulta nuovaPecoraAdulta = new PecoraAdulta();\n\t\t\tpecore.add(nuovaPecoraAdulta);\n\t\t\tif (nuovaPecoraAdulta.isMaschio())\n\t\t\t\tnumMontoni++;\n\t\t\telse\n\t\t\t\tnumPecoreFemmine++;\n\t\t} else {\n\t\t\tpecore.add(new Agnello());\n\t\t\tnumeroAgelli++;\n\t\t}\n\t}",
"public void pedirValoresCabecera(){\n \r\n \r\n \r\n \r\n }",
"public void AumentarVictorias() {\r\n\t\tthis.victorias_actuales++;\r\n\t\tif (this.victorias_actuales >= 9) {\r\n\t\t\tthis.TituloNobiliario = 3;\r\n\t\t} else if (this.victorias_actuales >= 6) {\r\n\t\t\tthis.TituloNobiliario = 2;\r\n\t\t} else if (this.victorias_actuales >= 3) {\r\n\t\t\tthis.TituloNobiliario = 1;\r\n\t\t} else {\r\n\t\t\tthis.TituloNobiliario = 0;\r\n\t\t}\r\n\t}",
"private void btnConfirmaActionPerformed(java.awt.event.ActionEvent evt) throws Contact.NumeEronatExceptie { \n try {\n String nume = tfNume.getText();\n String prenume = tfPrenume.getText();\n String dataNasterii = tfDataNasterii.getText();\n Contact c = new Contact(nume, prenume, dataNasterii);\n if (c.getDataNasterii().getMonth().equals(LocalDate.now().getMonth()) && c.getDataNasterii().getDayOfMonth() == LocalDate.now().getDayOfMonth()) {\n JOptionPane.showMessageDialog(this, \"Data de nasterii a contactului este astazi!\");\n }\n String numarTelefon = tfNumarTelefon.getText();\n if (cbFix.isSelected()) {\n NrTel nrTel = new NrFix(numarTelefon);\n c.setNrTel(nrTel);\n } else if (cbMobil.isSelected()) {\n NrTel nrTel = new NrMobil(numarTelefon);\n c.setNrTel(nrTel);\n } else {\n throw new NullPointerException(\"\");\n }\n for (Contact ct : listaContacte) {\n if (ct.getNume().equals(c.getNume()) && ct.getPrenume().equals(c.getPrenume()) && ct.getDataNasterii().equals(c.getDataNasterii()) && ct.getNrTel().equals(c.getNrTel())) {\n throw new ContactExistentException(\"\");\n }\n }\n listaContacte.add(c);\n model.addElement(c);\n tfNume.setText(\"\");\n tfPrenume.setText(\"\");\n tfDataNasterii.setText(\"\");\n tfNumarTelefon.setText(\"\");\n btnGroup.clearSelection();\n btnUpdate.setVisible(true);\n diAdauga.setVisible(false);\n actualizeazaModel();\n } catch (IllegalArgumentException e) {\n JOptionPane.showMessageDialog(this, \"Numele/prenumele nu a fost introdus!\");\n } catch (NumeEronatExceptie e) {\n JOptionPane.showMessageDialog(this, \"Numele a fost introdus eronat!\");\n } catch (PrenumeEronatExceptie e) {\n JOptionPane.showMessageDialog(this, \"Prenumele a fost introdus eronat!\");\n } catch (DateTimeParseException e) {\n JOptionPane.showMessageDialog(this, \"Data nasterii nu este valida!\");\n } catch (NumarTelefonExceptie e) {\n JOptionPane.showMessageDialog(this, \"Numarul de telefon introdus este invalid!\");\n } catch (ContactExistentException e) {\n JOptionPane.showMessageDialog(this, \"Contactul exista deja in agenda!\");\n } catch (NullPointerException e) {\n JOptionPane.showMessageDialog(this, \"Nu ai selectat tipul de telefon!\");\n }\n\n }",
"@Override\n public Coup meilleurCoup(Plateau _plateau, Joueur _joueur, boolean _ponder) {\n \n _plateau.sauvegardePosition(0);\n \n /* On créé un noeud père, qui est le noeud racine de l'arbre. On définit arbitrairement le joueur associé (\n (0 ou 1, il importe peu de savoir quel joueur correspond à ce nombre, cette information étant déjà portée par \n j1 et j2 dans l'algorithme. Le tout est de faire alterner cette valeur à chaque niveau de l'arbre. */\n \n Noeud pere = new Noeud();\n pere.joueurAssocie = 0;\n \n // On définit ici c, le coefficient d'arbitrage entre exploration et exploitation. Ce dernier est théroquement optimal pour una valeur égale à sqrt(2).\n \n double c = 10 * Math.sqrt(2);\n double[] resultat = new double[2];\n \n // Conditions de fonctionnement par itération\n \n //int i = 1;\n //int nbTours = 10000;\n \n //while(i <= nbTours){\n \n // Conditions de fonctionnement en mode \"compétition\" (100 ms pour se décider au maximum).\n \n long startTime = System.currentTimeMillis();\n \n while((System.currentTimeMillis()-startTime) < 100){\n\n // La valeur résultat ne sert à rien fondamentalement ici, elle sert uniquement pour le bon fonctionnement de l'algorithme en lui même.\n // On restaure le plateau à chaque tour dans le MCTS (Sélection - Expension - Simulation - Backpropagation). \n \n resultat = MCTS(pere, _plateau, this.j_humain, this.j_ordi, c, this.is9x9, this.methodeSimulation);\n _plateau.restaurePosition(0);\n \n //i++;\n }\n\n // On doit maintenant choisir le meilleur coup parmi les fils du noeud racine, qui correspondent au coup disponibles pour l'IA.\n \n double maxValue = 0;\n int maxValueIndex = 0;\n \n for(int j = 0; j < pere.fils.length; j++){\n \n double tauxGain = ((double)pere.fils[j].nbPartiesGagnees / (double)pere.fils[j].nbPartiesJouees);\n\n // On choisirat le coup qui maximise le taux de gain des parties simulées.\n \n if(tauxGain >= maxValue){\n maxValueIndex = j;\n maxValue = tauxGain;\n \n }\n }\n \n // On retourne le coup associé au taux de gain le plus élevé.\n\n return pere.fils[maxValueIndex].coupAssocie;\n }",
"public void executer()\r\n\t{\r\n\t\tswitch(this.type)\r\n\t\t{\r\n\t\tcase \"Gain\":\r\n\t\t\tPartie.getJoueurCourant().changeSolde(this.valeur);\r\n\t\t\tbreak;\r\n\t\tcase \"Perte\":\r\n\t\t\tPartie.getJoueurCourant().changeSolde(-this.valeur);\r\n\t\t\tbreak;\r\n\t\tcase \"Avancer\":\r\n\t\t\tPartie.getJoueurCourant().deplace(this.valeur);\r\n\t\t\tbreak;\r\n\t\tcase \"Aller en prison\":\r\n\t\t\tPartie.getJoueurCourant().setPosition(this.valeur);\r\n\t\t\tbreak;\r\n\t\tcase \"Sortie de prison\":\r\n\t\t\tPartie.getJoueurCourant().setEnPrison(false);\r\n\t\t\tbreak;\r\n\t\t}\t\r\n\t}",
"public void validerFormation() {\n\t\tSystem.out.println(\"Le manager \" + super.getPrenom() + \" \" + super.getNom() + \" valide la formation\");\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgetControleur(). saisirParution() ;}",
"public void recupera() {\n Cliente clienteActual;\n clienteActual=clienteDAO.buscaId(c.getId());\n if (clienteActual!=null) {\n c=clienteActual;\n } else {\n c=new Cliente();\n }\n }",
"private void liberateAroom() {\n\t\tif(this.adminLogin() == 1) {\n\t\t\tSystem.out.println(\"\\n------------------\\n| Bonjour Ibobai |\\n------------------\");\n\t\t\tfor(Chambre chambre : this.getChambres()) {\n\t\t\t\tif(chambre.equals(this.chambresNonVides().get(this.chambresNonVides().size()-1))) {\n\t\t\t\t\tchambre.setReserve(false);\n\t\t\t\t\tSystem.err.println(\"--------------------------------------------------\\nVous avez bien libérée cette chambre:\\n--------------------------------------------------\\n\");\n\t\t\t\t\tSystem.out.println(chambre.toString());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}else {\n\t\t\tSystem.err.println(\"----------------------------\\nVous n'êtes pas un admin! |\\n----------------------------\");\n\t\t}\n\t\t\n\t}",
"@Override\r\n\tpublic void aggiornaUI() {\r\n\t\tString valore = input_ricerca_cliente.getText();\r\n\t\tthis.clienti.setAll(AppFacadeController.getInstance().getGestisciClientiController().cercaCliente(valore));\r\n\t}",
"public void action() {\n\t\t\ttreinador.Correu();\r\n\t\t\ttreinador.Perdeu();\r\n\t\t\treturn;\r\n\t\t}",
"void realizarSolicitud(Cliente cliente);",
"@Override\n public void onClick(View v) {\n String nom =\"\";\n String prenom = \"\";\n String mail = \"\";\n String tel = \"\";\n String mdp = \"\";\n String confMdp = \"\";\n\n // Recuperation des données saisies\n try {\n nom = nomInscription.getText().toString();\n prenom = prenomInscription.getText().toString();\n mail = mailInscription.getText().toString();\n tel = telInscription.getText().toString();\n mdp = mdpInscription.getText().toString();\n confMdp = mdpConfirmation.getText().toString();\n\n Utilisateur connexionUtilisateurs = new Utilisateur(nom,prenom,mail,tel,mdp);\n controle.setConnexionUtilisateurs(connexionUtilisateurs);\n }catch (Exception e){\n Log.d(\"Recup\", \"****************** Erreur reuperation donnees inscription\\n****\" + e);\n }\n\n // Controle des données saisie\n if((nom.equals(\"\"))||(prenom.equals(\"\"))||(mail.equals(\"\"))||(tel.equals(\"\"))||(mdp.equals(\"\"))||(confMdp.equals(\"\"))){\n Toast.makeText(InscriptionActivity.this,\"Saisie incorrect\",Toast.LENGTH_SHORT).show();\n }else if (!(mdp.equals(confMdp))){\n Toast.makeText(InscriptionActivity.this,\"mots de passe incorrect\",Toast.LENGTH_SHORT).show();\n }else if (tel.length() != 10){\n Toast.makeText(InscriptionActivity.this,\"Numéro de téléphone incorrect\",Toast.LENGTH_SHORT).show();\n }else if (!isValiEmail(mail)){\n Toast.makeText(InscriptionActivity.this,\"Format de l'adresse mail incorrect\",Toast.LENGTH_SHORT).show();\n }else {\n // si la saisie est correcte, envoie les informations à la base de données pour l'inscription\n afficheResult(nom,prenom,mail,tel,mdp);\n Utilisateur user = new Utilisateur(nom,prenom,mail,tel,mdp);\n AccesDistant accesDistant = new AccesDistant();\n Log.d(\"envoi inscript\",\"*************\" + user.inscriptionConvertToJSONArray());\n accesDistant.envoi(\"inscription\", user.inscriptionConvertToJSONArray());\n\n // Bouton pour aller vers la page home\n Intent intent = new Intent(InscriptionActivity.this,HomeActivity.class);\n startActivity(intent);\n }\n\n }",
"public void seleccionarBeneficiario(){\n\t\tvisualizarGrabarRequisito = false;\r\n\t\ttry{\r\n\t\t\tlog.info(\"intItemBeneficiarioSeleccionar:\"+intItemBeneficiarioSeleccionar);\r\n\t\t\tif(intItemBeneficiarioSeleccionar.equals(new Integer(0))){\r\n\t\t\t\tbeneficiarioSeleccionado = null;\r\n\t\t\t\tlistaEgresoDetalleInterfaz = new ArrayList<EgresoDetalleInterfaz>();\r\n\t\t\t\tbdTotalEgresoDetalleInterfaz = null;\r\n\t\t\t\t//\r\n\t\t\t\tmostrarPanelAdjuntoGiro = false;\r\n\t\t\t\tdeshabilitarNuevo = false;\r\n\t\t\t\tdeshabilitarNuevoBeneficiario = false;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor(BeneficiarioPrevision beneficiarioPrevision : expedientePrevisionGirar.getListaBeneficiarioPrevision()){\r\n\t\t\t\tif(beneficiarioPrevision.getId().getIntItemBeneficiario().equals(intItemBeneficiarioSeleccionar)){\r\n\t\t\t\t\tbeneficiarioSeleccionado = beneficiarioPrevision;\r\n\t\t\t\t\tlistaEgresoDetalleInterfaz = previsionFacade.cargarListaEgresoDetalleInterfaz(expedientePrevisionGirar, beneficiarioSeleccionado);\t\t\t\t\t\r\n\t\t\t\t\tbdTotalEgresoDetalleInterfaz = ((EgresoDetalleInterfaz)(listaEgresoDetalleInterfaz.get(0))).getBdSubTotal();;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tList<ControlFondosFijos> listaControlValida = new ArrayList<ControlFondosFijos>();\r\n\t\t\tfor(ControlFondosFijos controlFondosFijos : listaControl){\r\n\t\t\t\tAcceso acceso = bancoFacade.obtenerAccesoPorControlFondosFijos(controlFondosFijos);\r\n\t\t\t\tlog.info(controlFondosFijos);\r\n\t\t\t\tlog.info(acceso);\t\t\t\t\r\n\t\t\t\tif(acceso!=null\r\n\t\t\t\t&& acceso.getAccesoDetalleUsar()!=null\r\n\t\t\t\t&& acceso.getAccesoDetalleUsar().getBdMontoMaximo()!=null\r\n\t\t\t\t&& acceso.getAccesoDetalleUsar().getBdMontoMaximo().compareTo(bdTotalEgresoDetalleInterfaz)>=0){\r\n\t\t\t\t\tlistaControlValida.add(controlFondosFijos);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvisualizarGrabarRequisito = true;\r\n\t\t\tdeshabilitarNuevoBeneficiario = false;\r\n\t\t\t\r\n\t\t\tif(listaControlValida.isEmpty() && intItemBeneficiarioSeleccionar!=0){\r\n\t\t\t\t//Deshabilitamos todos los campos para detener el proceso de grabacion\r\n\t\t\t\tif(validarExisteRequisito()) {\r\n\t\t\t\t\tmensajeAdjuntarRequisito = \"No existe un fondo de cambio con un monto máximo configurado que soporte el monto de giro del expediente.\"+\r\n\t\t\t\t\t \"Este giro será realizado por la Sede Central.\";\r\n\t\t\t\t\tmostrarMensajeAdjuntarRequisito = true;\r\n\t\t\t\t\tmostrarPanelAdjuntoGiro = true;\r\n\t\t\t\t\thabilitarGrabarRequisito = true;\t\r\n\t\t\t\t\tvisualizarGrabarAdjunto = true;\r\n\t\t\t\t\tdeshabilitarNuevo = true;\r\n\t\t\t\t\tdeshabilitarDescargaAdjuntoGiro = false;\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\tmensajeAdjuntarRequisito = \"Ya existen requisitos registrados para este expediente.\";\r\n\t\t\t\t\tarchivoAdjuntoGiro = previsionFacade.getArchivoPorRequisitoPrevision(lstRequisitoPrevision.get(0));\r\n\t\t\t\t\tmostrarMensajeAdjuntarRequisito = true;\r\n\t\t\t\t\tmostrarPanelAdjuntoGiro = true;\r\n\t\t\t\t\thabilitarGrabarRequisito = false;\r\n\t\t\t\t\tvisualizarGrabarAdjunto =false;\r\n\t\t\t\t\tdeshabilitarNuevo = true;\r\n\t\t\t\t\tdeshabilitarDescargaAdjuntoGiro = true;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tvisualizarGrabarRequisito = false;\r\n\t\t\t\tmostrarPanelAdjuntoGiro = false;\r\n\t\t\t\tdeshabilitarNuevo = false;\r\n\t\t\t\tdeshabilitarDescargaAdjuntoGiro = false;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}catch (Exception e){\r\n\t\t\tlog.error(e.getMessage(),e);\r\n\t\t}\r\n\t}",
"public void ajouterPatient() throws SQLException {\n //on récupère la date courante et les infos utilisateur\n Date dateActu = new Date(System.currentTimeMillis());\n int jourNaiss = Integer.parseInt(jTextFieldDateNaissJour.getText());\n int moisNaiss = Integer.parseInt(jTextFieldDateNaissMois.getText());\n int anneeNaiss = Integer.parseInt(jTextFieldDateNaissAnnee.getText());\n String medGen = \"Pas de médecin généraliste\";\n String adGen = \"\";\n //cas ou un des champs n'est pas rempli\n if ((jTextFieldNomNewPatient.getText().equals(\"\"))\n || (jTextFieldPrenomNewPatient.getText().equals(\"\"))\n || (jTextFieldAdresseNewPatient.getText().equals(\"\"))\n || (jTextFieldCodePostalNewPatient.getText().equals(\"\"))\n || (jTextFieldVilleNewPatient.getText().equals(\"\"))\n || (jTextFieldDateNaissJour.getText().equals(\"\"))\n || (jTextFieldDateNaissMois.getText().equals(\"\"))\n || (jTextFieldDateNaissAnnee.getText().equals(\"\"))) {\n JOptionPane jop1 = new JOptionPane();\n jop1.showMessageDialog(null, \"Il manque des informations relatives au patient\", \"Attention\", JOptionPane.WARNING_MESSAGE);\n //on vérifie la forme du code postal si le pays est la france\n } else if ((pays == Pays.France)\n && ((jTextFieldCodePostalNewPatient.getText().length() != 5) || (jTextFieldCodePostalDr.getText().length() != 5))) {\n JOptionPane jop1 = new JOptionPane();\n jop1.showMessageDialog(null, \"Mauvais code postal\", \"Attention\", JOptionPane.WARNING_MESSAGE);\n //on vérifie que la date de naissance rentrée est plausible\n } else if ((anneeNaiss > (dateActu.getYear() + 1900))\n || (anneeNaiss < 1875)\n || (moisNaiss > 12)\n || (jourNaiss > 31)\n || ((anneeNaiss == dateActu.getYear() + 1900) && (moisNaiss > (dateActu.getMonth() + 1)))\n || ((anneeNaiss == dateActu.getYear() + 1900) && (moisNaiss == dateActu.getMonth() + 1) && (jourNaiss > (dateActu.getDate())))) {\n JOptionPane jop1 = new JOptionPane();\n jop1.showMessageDialog(null, \"Date de naissance : date incorrecte\", \"Attention\", JOptionPane.WARNING_MESSAGE);\n //on ajoute le patient\n } else {\n //récupération des informations normalisées et prévention de SQL Injection\n medGen = jTextFieldNomDr.getText().replaceAll(\"'\", \"''\");\n adGen = jTextFieldAdresseDr.getText().replaceAll(\"'\", \"''\") + \", \" + jTextFieldCodePostalDr.getText() + \" \" + jTextFieldVilleDr.getText().replaceAll(\"'\", \"''\");\n String nom = jTextFieldNomNewPatient.getText().substring(0, 1).toUpperCase().replaceAll(\"'\", \"''\");\n nom += jTextFieldNomNewPatient.getText().substring(1, jTextFieldNomNewPatient.getText().length()).toLowerCase().replaceAll(\"'\", \"''\");\n String prenom = jTextFieldPrenomNewPatient.getText().substring(0, 1).toUpperCase().replaceAll(\"'\", \"''\");\n prenom += jTextFieldPrenomNewPatient.getText().substring(1, jTextFieldPrenomNewPatient.getText().length()).toLowerCase().replaceAll(\"'\", \"''\");\n //on récupère la date sous plusieurs formats pour après\n String date = anneeNaiss + \"-\" + moisNaiss + \"-\" + jourNaiss;\n java.sql.Date d = new java.sql.Date(Integer.parseInt(jTextFieldDateNaissAnnee.getText()),\n Integer.parseInt(jTextFieldDateNaissMois.getText()), Integer.parseInt(jTextFieldDateNaissJour.getText())\n );\n java.sql.Date d2 = new java.sql.Date(Integer.parseInt(jTextFieldDateNaissAnnee.getText()) - 1900,\n Integer.parseInt(jTextFieldDateNaissMois.getText()) - 1, Integer.parseInt(jTextFieldDateNaissJour.getText())\n );\n Adresse adresse = new Adresse(jTextFieldAdresseNewPatient.getText().replaceAll(\"'\", \"''\"), jTextFieldCodePostalNewPatient.getText(), jTextFieldVilleNewPatient.getText().replaceAll(\"'\", \"''\"), pays);\n String adress = adresse.getAdresse();\n String sqldeces = \"select * from patient where etat = 2\";\n ResultSet resultdeces = CHUPP.getRequete(sqldeces);\n resultdeces.last();\n //on vérifie que le patient n'est pas décédé\n //on vérifie s'il y a des patients décédés \n if (resultdeces.getRow() == 0) {\n //pas de patients décédés ; on vérifie que le patient n'a pas déjà été admis\n String sqlPatient = \" select * from patient where etat = 1\";\n ResultSet result = CHUPP.getRequete(sqlPatient);\n result.last();\n //s'il n'y a aucun patient ayant déjà fait un séjour à l'hopital\n if (result.getRow() == 0) {\n //on ajoute le patient à la base de données et on le définit comme patientcourant\n currentPatient = new Patient(nom, prenom, d, sexe, adress, medGen, adGen, dateActu);\n //on vérifie que le patient n'est pas déjà admis\n if (!(serviceAdmission.getDlm().contains(nom + \" \" + prenom + \" / \" + date))) {\n try {\n sql = \"INSERT INTO Patient VALUES (\" + currentPatient.getIPP() + \", '\" + nom + \"','\" + prenom + \"','\" + date\n + \"','\" + sexe + \"','\" + adress + \"', '\" + medGen + \"', '\" + adGen + \"',0 )\";\n CHUPP.getInsert(sql);\n JOptionPane jop1 = new JOptionPane();\n jop1.showMessageDialog(null, \"Patient bien ajouté !\", \"Ajout Patient\", JOptionPane.INFORMATION_MESSAGE);\n afficherdchUI = true;\n } catch (Exception e) {\n System.out.println(\"Failed to get Statement\");\n e.printStackTrace();\n }\n } else {\n JOptionPane j = new JOptionPane();\n j.showMessageDialog(null, \"Le patient est déjà admis en ce moment\", \"Ajout Patient\", JOptionPane.INFORMATION_MESSAGE);\n }\n } else {\n //si des patients sont en statut \"DMA Fermés\" on vérifie que le nouveau patient n'en fait pas partie\n result.beforeFirst();\n while (result.next()) {\n //vérification qui se base sur meme nom, meme prenom et meme date de naissance\n if ((result.getString(\"nom\").equals(nom))\n && (result.getString(\"prenom\").equals(prenom))\n && (result.getDate(\"date_naissance\").equals(d2))) {\n //s'il a déjà été admis on met a jour ses données (nouvelle adresse ou nouveau médecin généraliste)\n currentPatient = new Patient(nom, prenom, d, sexe, adress, medGen, adGen, result.getInt(\"ipp\"));\n String update = \"update patient set adresse='\" + adress + \"' where nom='\" + nom + \"' and prenom='\" + prenom + \"' and date_naissance='\" + d2 + \"'\";\n String update2 = \"update patient set medecin_generaliste='\" + medGen + \"' where nom='\" + nom + \"' and prenom='\" + prenom + \"' and date_naissance='\" + d2 + \"'\";\n String update3 = \"update patient set adresse_med_gen='\" + adGen + \"' where nom='\" + nom + \"' and prenom='\" + prenom + \"' and date_naissance='\" + d2 + \"'\";\n String update4 = \"update patient set etat=0 where nom='\" + nom + \"' and prenom='\" + prenom + \"' and date_naissance='\" + d2 + \"'\";\n CHUPP.getInsert(update);\n CHUPP.getInsert(update2);\n CHUPP.getInsert(update3);\n CHUPP.getInsert(update4);\n JOptionPane jop1 = new JOptionPane();\n jop1.showMessageDialog(null, \"Le patient a déjà été admis auparavant : le DMA est rouvert et les modifications ont bien été prises en compte.\", \"Ajout Patient\", JOptionPane.INFORMATION_MESSAGE);\n afficherdchUI = true;\n break;\n //si le patient n'a jamais été admis on l'ajoute normalement à la base de données\n } else {\n currentPatient = new Patient(nom, prenom, d, sexe, adress, medGen, adGen, dateActu);\n if (!(serviceAdmission.getDlm().contains(nom + \" \" + prenom + \" / \" + d2))) {\n try {\n sqlPatient = \"INSERT INTO Patient VALUES (\" + currentPatient.getIPP() + \", '\" + nom + \"','\" + prenom + \"','\" + date\n + \"','\" + sexe + \"','\" + adress + \"', '\" + medGen + \"', '\" + adGen + \"',0 )\";\n CHUPP.getInsert(sqlPatient);\n JOptionPane jop1 = new JOptionPane();\n jop1.showMessageDialog(null, \"Patient bien ajouté !\", \"Ajout Patient\", JOptionPane.INFORMATION_MESSAGE);\n afficherdchUI = true;\n break;\n } catch (Exception e) {\n System.out.println(\"Failed to get Statement\");\n e.printStackTrace();\n }\n } else {\n JOptionPane j = new JOptionPane();\n j.showMessageDialog(null, \"Le patient est déjà admis en ce moment\", \"Ajout Patient\", JOptionPane.INFORMATION_MESSAGE);\n }\n break;\n }\n }\n }\n //dans le cas ou il y des patients décédés on vérifie que le nouveau n'en fait pas partie, puis même traitement qu'au dessus\n } else {\n resultdeces.beforeFirst();\n while (resultdeces.next()) {\n if ((resultdeces.getString(\"nom\").equals(nom))\n && (resultdeces.getString(\"prenom\").equals(prenom))\n && (resultdeces.getDate(\"date_naissance\").equals(d2))) {\n JOptionPane j = new JOptionPane();\n j.showMessageDialog(null, \"Le patient que vous souhaitez ajouter est décédé.\", \"Attention\", JOptionPane.WARNING_MESSAGE);\n } else {\n String sqlPatient = \" select * from patient where etat = 1\";\n ResultSet result = CHUPP.getRequete(sqlPatient);\n result.last();\n if (result.getRow() == 0) {\n currentPatient = new Patient(nom, prenom, d, sexe, adress, medGen, adGen, dateActu);\n if (!(serviceAdmission.getDlm().contains(nom + \" \" + prenom + \" / \" + date))) {\n try {\n sql = \"INSERT INTO Patient VALUES (\" + currentPatient.getIPP() + \", '\" + nom + \"','\" + prenom + \"','\" + date\n + \"','\" + sexe + \"','\" + adress + \"', '\" + medGen + \"', '\" + adGen + \"',0 )\";\n CHUPP.getInsert(sql);\n JOptionPane jop1 = new JOptionPane();\n jop1.showMessageDialog(null, \"Patient bien ajouté !\", \"Ajout Patient\", JOptionPane.INFORMATION_MESSAGE);\n afficherdchUI = true;\n break;\n } catch (Exception e) {\n System.out.println(\"Failed to get Statement\");\n e.printStackTrace();\n }\n } else {\n JOptionPane j = new JOptionPane();\n j.showMessageDialog(null, \"Le patient est déjà admis en ce moment\", \"Ajout Patient\", JOptionPane.INFORMATION_MESSAGE);\n }\n } else {\n result.beforeFirst();\n while (result.next()) {\n if ((result.getString(\"nom\").equals(nom))\n && (result.getString(\"prenom\").equals(prenom))\n && (result.getDate(\"date_naissance\").equals(d2))) {\n currentPatient = new Patient(nom, prenom, d, sexe, adress, medGen, adGen, result.getInt(\"ipp\"));\n String update = \"update patient set adresse='\" + adress + \"' where nom='\" + nom + \"' and prenom='\" + prenom + \"' and date_naissance='\" + d2 + \"'\";\n String update2 = \"update patient set medecin_generaliste='\" + medGen + \"' where nom='\" + nom + \"' and prenom='\" + prenom + \"' and date_naissance='\" + d2 + \"'\";\n String update3 = \"update patient set adresse_med_gen='\" + adGen + \"' where nom='\" + nom + \"' and prenom='\" + prenom + \"' and date_naissance='\" + d2 + \"'\";\n String update4 = \"update patient set etat=0 where nom='\" + nom + \"' and prenom='\" + prenom + \"' and date_naissance='\" + d2 + \"'\";\n CHUPP.getInsert(update);\n CHUPP.getInsert(update2);\n CHUPP.getInsert(update3);\n CHUPP.getInsert(update4);\n JOptionPane jop1 = new JOptionPane();\n jop1.showMessageDialog(null, \"Le patient a déjà été admis auparavant : le DMA est rouvert et les modifications ont bien été prises en compte.\", \"Ajout Patient\", JOptionPane.INFORMATION_MESSAGE);\n afficherdchUI = true;\n break;\n } else {\n currentPatient = new Patient(nom, prenom, d, sexe, adress, medGen, adGen, dateActu);\n if (!(serviceAdmission.getDlm().contains(nom + \" \" + prenom + \" / \" + d2))) {\n try {\n sqlPatient = \"INSERT INTO Patient VALUES (\" + currentPatient.getIPP() + \", '\" + nom + \"','\" + prenom + \"','\" + date\n + \"','\" + sexe + \"','\" + adress + \"', '\" + medGen + \"', '\" + adGen + \"',0 )\";\n CHUPP.getInsert(sqlPatient);\n JOptionPane jop1 = new JOptionPane();\n jop1.showMessageDialog(null, \"Patient bien ajouté !\", \"Ajout Patient\", JOptionPane.INFORMATION_MESSAGE);\n afficherdchUI = true;\n break;\n } catch (Exception e) {\n System.out.println(\"Failed to get Statement\");\n e.printStackTrace();\n }\n } else {\n JOptionPane j = new JOptionPane();\n j.showMessageDialog(null, \"Le patient est déjà admis en ce moment\", \"Ajout Patient\", JOptionPane.INFORMATION_MESSAGE);\n }\n break;\n }\n }\n }\n }\n }\n }\n //on ajoute le patient à la liste des patients de l'interface d'admission\n if (!(serviceAdmission.getDlm().contains(currentPatient.getNom().replaceAll(\"''\", \"'\") + \" \" + currentPatient.getPrenom().replaceAll(\"''\", \"'\") + \" / \" + d2))) {\n serviceAdmission.getDlm().addElement(currentPatient.getNom().replaceAll(\"''\", \"'\") + \" \" + currentPatient.getPrenom().replaceAll(\"''\", \"'\") + \" / \" + d2);\n }\n serviceAdmission.getJList1().setModel(serviceAdmission.getDlm());\n serviceAdmission.getJList1().repaint();\n }\n }",
"public void reversarComprobanteContabilidad() {\r\n String ide_cnccc = ser_comprobante.reversarComprobante(tab_tabla1.getValorSeleccionado(), null);\r\n if (guardarPantalla().isEmpty()) {\r\n utilitario.agregarMensaje(\"Se genero el Comprobante Num: \", ide_cnccc);\r\n }\r\n }",
"public void generarCuestionario() {\n \n try{\n ValidarOpcionSeleccionada.validar (radios);\n }catch (OpcionNoSeleccionadaException e) {\n etiquetaRespuesta.setText(\"Debes selecionar una opcion\");\n}\n \n\n //Con el modelo construido debemos representar nuestra pregunta\n //y mostrarala\n //Primero creamos las opciones\n Opcion op1 = new Opcion();\n op1.setTitulo(\"Inglaterra\");\n op1.setCorrecta(false);\n\n Opcion op2 = new Opcion();\n op2.setTitulo(\"México\");\n op2.setCorrecta(false);\n\n Opcion op3 = new Opcion();\n op3.setTitulo(\"Italia\");\n op3.setCorrecta(false);\n\n Opcion op4 = new Opcion();\n op4.setTitulo(\"Francia\");\n op4.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones = {op1, op2, op3, op4};\n Pregunta p1 = new Pregunta();\n p1.setTitulo(\"¿Que país tiene más Premios Nobel de Literatura?\");\n p1.setOpciones(opciones);\n\n \n //opciones de la pregunta 2\n Opcion op21 = new Opcion();\n op21.setTitulo(\"Ares\");\n op21.setCorrecta(false);\n\n Opcion op22 = new Opcion();\n op22.setTitulo(\"Prometeo\");\n op22.setCorrecta(false);\n\n Opcion op23 = new Opcion();\n op23.setTitulo(\"Poseidón\");\n op23.setCorrecta(true);\n\n Opcion op24 = new Opcion();\n op24.setTitulo(\"Hefesto\");\n op24.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones2 = {op21, op22, op23, op24};\n Pregunta p2 = new Pregunta();\n p2.setTitulo(\"¿Quién es el padre del cíclope Polifemo según la mitología griega?\");\n p2.setOpciones(opciones2);\n \n //opciones de la pregunta 3\n Opcion op31 = new Opcion();\n op31.setTitulo(\"J.K Rowling\");\n op31.setCorrecta(false);\n\n Opcion op32 = new Opcion();\n op32.setTitulo(\"Emily Bronte\");\n op32.setCorrecta(false);\n\n Opcion op33 = new Opcion();\n op33.setTitulo(\"Stephen King\");\n op33.setCorrecta(false);\n\n Opcion op34 = new Opcion();\n op34.setTitulo(\"Jane Austen\");\n op34.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones3 = {op31, op32, op33, op34};\n Pregunta p3 = new Pregunta();\n p3.setTitulo(\"¿Quien escribio el libro Orgullo y Prejuicio?\");\n p3.setOpciones(opciones3);\n \n //Opciones pregunta 4\n Opcion op41 = new Opcion();\n op41.setTitulo(\"El Cáliz de Fuego\");\n op41.setCorrecta(true);\n\n Opcion op42 = new Opcion();\n op42.setTitulo(\"Festin de Cuervos\");\n op42.setCorrecta(false);\n\n Opcion op43 = new Opcion();\n op43.setTitulo(\"El prisionero de Azkaban\");\n op43.setCorrecta(false);\n\n Opcion op44 = new Opcion();\n op44.setTitulo(\"Principe Mecánico\");\n op44.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones4 = {op41, op42, op43, op44};\n Pregunta p4 = new Pregunta();\n p4.setTitulo(\"¿Como se llama el cuarto libro de Harry Potter?\");\n p4.setOpciones(opciones4);\n \n //Opciones pregunta 5\n Opcion op51 = new Opcion();\n op51.setTitulo(\"Dunkirk\");\n op51.setCorrecta(false);\n\n Opcion op52 = new Opcion();\n op52.setTitulo(\"Los Miserables\");\n op52.setCorrecta(true);\n\n Opcion op53 = new Opcion();\n op53.setTitulo(\"Interestelar\");\n op53.setCorrecta(false);\n\n Opcion op54 = new Opcion();\n op54.setTitulo(\"Batman: El caballero de la noche\");\n op54.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones5= {op51, op52, op53, op54};\n Pregunta p5 = new Pregunta();\n p5.setTitulo(\"¿Que película NO dirigio Chistopher Nolan?\");\n p5.setOpciones(opciones5);\n \n //Opciones pregunta 6\n Opcion op61 = new Opcion();\n op61.setTitulo(\"Joe Greene\");\n op61.setCorrecta(false);\n\n Opcion op62 = new Opcion();\n op62.setTitulo(\"Tom Brady\");\n op62.setCorrecta(false);\n\n Opcion op63 = new Opcion();\n op63.setTitulo(\"Joe Montana\");\n op63.setCorrecta(false);\n\n Opcion op64 = new Opcion();\n op64.setTitulo(\"Peyton Manning\");\n op64.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones6 = {op61, op62, op63, op64};\n Pregunta p6 = new Pregunta();\n p6.setTitulo(\"¿Que jugador ha ganado más MVP en la NFL?\");\n p6.setOpciones(opciones6);\n \n //Opciones pregunta 7\n Opcion op71 = new Opcion();\n op71.setTitulo(\"Bayern Munich\");\n op71.setCorrecta(false);\n\n Opcion op72 = new Opcion();\n op72.setTitulo(\"Real Madrid\");\n op72.setCorrecta(true);\n\n Opcion op73 = new Opcion();\n op73.setTitulo(\"Barcelona\");\n op73.setCorrecta(false);\n\n Opcion op74 = new Opcion();\n op74.setTitulo(\"Manchester United\");\n op74.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones7 = {op71, op72, op73, op74};\n Pregunta p7 = new Pregunta();\n p7.setTitulo(\"¿Que equipo ha ganado más Champions League en la hsitoria?\");\n p7.setOpciones(opciones7);\n \n \n //Opciones pregunta 8\n \n Opcion op81 = new Opcion();\n op81.setTitulo(\"Tratado de Versalles\");\n op81.setCorrecta(true);\n\n Opcion op82 = new Opcion();\n op82.setTitulo(\"Tratado de Granada\");\n op82.setCorrecta(false);\n\n Opcion op83 = new Opcion();\n op83.setTitulo(\"Tratado de Lyon\");\n op83.setCorrecta(false);\n\n Opcion op84 = new Opcion();\n op84.setTitulo(\"Tratado de Londres\");\n op84.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones8 = {op81, op82, op83, op84};\n Pregunta p8 = new Pregunta();\n p8.setTitulo(\"¿Como se llamo el tratado con el que se le dio fin a la PGM?\");\n p8.setOpciones(opciones8);\n \n //opciones pregunta 9 \n \n Opcion op91 = new Opcion();\n op91.setTitulo(\"Hermanos Lumiere\");\n op91.setCorrecta(false);\n\n Opcion op92 = new Opcion();\n op92.setTitulo(\"Steven Spielberg\");\n op92.setCorrecta(false);\n\n Opcion op93 = new Opcion();\n op93.setTitulo(\"Thomas Harper\");\n op93.setCorrecta(false);\n\n Opcion op94 = new Opcion();\n op94.setTitulo(\"George Mellies\");\n op94.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones9 = {op91, op92, op93, op94};\n Pregunta p9 = new Pregunta();\n p9.setTitulo(\"¿A quien se le considera como el mago del cine?\");\n p9.setOpciones(opciones9);\n \n //Opciones pregunta 10\n Opcion op101 = new Opcion();\n op101.setTitulo(\"Miguel Ángel\");\n op101.setCorrecta(false);\n\n Opcion op102 = new Opcion();\n op102.setTitulo(\"Rafael Sanzio\");\n op102.setCorrecta(false);\n\n Opcion op103 = new Opcion();\n op103.setTitulo(\"Leonardo Da Vinci\");\n op103.setCorrecta(true);\n\n Opcion op104 = new Opcion();\n op104.setTitulo(\"Bernini\");\n op104.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones10 = {op101, op102, op103, op104};\n Pregunta p10 = new Pregunta();\n p10.setTitulo(\"¿Que artífice NO participo en la construcción de la Basílica de San Pedro?\");\n p10.setOpciones(opciones10);\n \n \n \n //Pregunta p11 =new Pregunta();\n System.out.println(\"Fin de Cuestionario \");\n \n \n \n //Vamos a adaptar el cuestioanario a lo que ya teniamos\n Cuestionario c = new Cuestionario();\n //Creamos el list de preguntas\n \n \n \n //Se agrega a este list las preguntas que tenemos\n preguntas.add(p1);\n preguntas.add(p2);\n preguntas.add(p3);\n preguntas.add(p4);\n preguntas.add(p5);\n preguntas.add(p6);\n preguntas.add(p7);\n preguntas.add(p8);\n preguntas.add(p9);\n preguntas.add(p10);\n // preguntas.add(p11);\n //A este list le vamos a proporcionar el valor del correspondiente\n //cuestioanrio\n \n c.setPreguntas(preguntas);\n //Ajustamos el titulo de la primera pregunta\n mostrarPregunta (preguntaActual); \n//Primero ajustamos el titulo de la primer pregunta en la etiqueta de la pregunta\ntry{\n int opcion= Integer.parseInt (etiquetaRespuesta.getText());\n ValidarNumeroPreguntas.validar (opcion);\n }catch (NumberFormatException e) {\n \n}\n \n }",
"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 Dipendente() {\r\n\t\tsetnMat();\r\n\t}",
"public void AjouterInvitation(long idDemandeur,long idCible) {\n\t\tDate dateDemande=new Date();\n\t\tString dateDemandeEnChaine=dateFormat.format(dateDemande);\t\t\n\t\t try {\n\t\t\t dateDemande=dateFormat.parse (dateDemandeEnChaine);\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tAmi amitie1=new Ami(\"Envoi\", idDemandeur, idCible, dateDemande,getMembre(idCible));\n\t\tAmi amitie2=new Ami(\"Recu\", idCible , idDemandeur, dateDemande,getMembre(idDemandeur));\n\t\t\n\t\tgerantAmi.save(amitie1);\t\n\t\tgerantAmi.save(amitie2);\t\n\t}",
"private void btnUpdateActionPerformed(java.awt.event.ActionEvent evt) throws Contact.NumeEronatExceptie { \n try {\n //Efectuam validarea numarului de telefon inainte de a schimba datele contactului din model\n String numarTelefon = tfNumarTelefon.getText();\n if (cbFix.isSelected()) {\n NrTel nrTel = new NrFix(numarTelefon);\n } else if (cbMobil.isSelected()) {\n NrTel nrTel = new NrMobil(numarTelefon);\n } else {\n JOptionPane.showMessageDialog(this, \"Nu ati selectat tipul de numar de telefon!\");\n }\n Contact s = (Contact) model.getElementAt(ContactList.getSelectedIndex());\n listaContacte.remove(s);\n // Setam datele din model luand in considerare modificarile efectuate\n model.setElementAt(new Contact(tfNume.getText(), tfPrenume.getText(), tfDataNasterii.getText()), ContactList.getSelectedIndex());\n Contact c = (Contact) model.getElementAt(ContactList.getSelectedIndex());\n //Parcurgem din nou algoritmul de validare al numarului de telefon pentru a il seta\n if (cbFix.isSelected()) {\n NrTel nrTel = new NrFix(numarTelefon);\n c.setNrTel(nrTel);\n } else if (cbMobil.isSelected()) {\n NrTel nrTel = new NrMobil(numarTelefon);\n c.setNrTel(nrTel);\n } else {\n throw new NullPointerException(\"\");\n }\n if (c.getDataNasterii().getMonth().equals(LocalDate.now().getMonth()) && c.getDataNasterii().getDayOfMonth() == LocalDate.now().getDayOfMonth()) {\n JOptionPane.showMessageDialog(this, \"Data de nasterii a contactului este astazi!\");\n }\n for (Contact ct : listaContacte) {\n if (ct.getNume().equals(c.getNume()) && ct.getPrenume().equals(c.getPrenume()) && ct.getDataNasterii().equals(c.getDataNasterii()) && ct.getNrTel().equals(c.getNrTel())) {\n throw new ContactExistentException(\"\");\n }\n }\n // Stergem datele din campuri pentru a nu afisate cand se apasa din nou Adauga/Modifica pentru alt contact;\n listaContacte.add(c);\n tfNume.setText(\"\");\n tfPrenume.setText(\"\");\n tfDataNasterii.setText(\"\");\n tfNumarTelefon.setText(\"\");\n btnGroup.clearSelection();\n btnConfirma.setVisible(true);\n diAdauga.setVisible(false);\n actualizeazaModel();\n } catch (IllegalArgumentException e) {\n JOptionPane.showMessageDialog(this, \"Numele/prenumele nu a fost introdus!\");\n } catch (NumeEronatExceptie e) {\n JOptionPane.showMessageDialog(this, \"Numele a fost introdus eronat!\");\n } catch (PrenumeEronatExceptie e) {\n JOptionPane.showMessageDialog(this, \"Prenumele a fost introdus eronat!\");\n } catch (DateTimeParseException e) {\n JOptionPane.showMessageDialog(this, \"Data nasterii nu este valida!\");\n } catch (NumarTelefonExceptie e) {\n JOptionPane.showMessageDialog(this, \"Numarul de telefon introdus este invalid!\");\n } catch (ContactExistentException e) {\n JOptionPane.showMessageDialog(this, \"Contactul exista deja in agenda!\");\n } catch (NullPointerException e) {\n JOptionPane.showMessageDialog(this, \"Nu ai selectat tipul de telefon!\");\n }\n\n }"
]
| [
"0.6118943",
"0.6113252",
"0.6077922",
"0.6036126",
"0.5993698",
"0.5980177",
"0.5962998",
"0.59380275",
"0.58917224",
"0.58546835",
"0.58107394",
"0.57986504",
"0.5795864",
"0.5774651",
"0.5766006",
"0.57649946",
"0.5762705",
"0.5745207",
"0.5743996",
"0.5740793",
"0.57182044",
"0.5713139",
"0.5711141",
"0.5695029",
"0.568992",
"0.5682732",
"0.56782365",
"0.5661704",
"0.56600666",
"0.56558025",
"0.5644065",
"0.56309605",
"0.56175715",
"0.5611762",
"0.56090325",
"0.56067735",
"0.5605881",
"0.560061",
"0.5598668",
"0.55979615",
"0.5596395",
"0.5582899",
"0.55822337",
"0.55788654",
"0.55770236",
"0.55701065",
"0.55685824",
"0.556849",
"0.55545986",
"0.55518556",
"0.5547476",
"0.5544921",
"0.5542768",
"0.5531599",
"0.55284125",
"0.5524635",
"0.55174387",
"0.5516976",
"0.5509383",
"0.5509234",
"0.550226",
"0.54975015",
"0.549118",
"0.54857457",
"0.54842806",
"0.54840845",
"0.54835135",
"0.5476802",
"0.5468718",
"0.5467291",
"0.54659426",
"0.54588985",
"0.54572546",
"0.5452686",
"0.54492646",
"0.54418933",
"0.5439996",
"0.54388934",
"0.5436758",
"0.543231",
"0.54298335",
"0.5428674",
"0.5423682",
"0.54176164",
"0.54129845",
"0.5410165",
"0.54058915",
"0.5405182",
"0.54036176",
"0.5402081",
"0.54017985",
"0.54016745",
"0.53959906",
"0.5389811",
"0.53869176",
"0.53866255",
"0.53844774",
"0.5384077",
"0.53831553",
"0.538277",
"0.53775555"
]
| 0.0 | -1 |
convertit la liste de SessionT en Session | private List<Session> ConvertSessionT(List<SessionT> listT) {
List<Session> listerep = new ArrayList<Session>();
for (SessionT st : listT) {
Session session = new Session();
session.setSessionT(st);
listerep.add(session);
}
return listerep;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract String getSessionList();",
"List<Session> getAllSessions();",
"public List<Session> getListSessionApprenant() {// OK\r\n\r\n\t\tif (utilisateur.getListeSessionsApprenantAccessible().isEmpty()) {\r\n\t\t\tList<Session> liste = new ArrayList<Session>();\r\n\t\t\tliste = getListeSessionsParam(\"sessionsAcc\", \"role\", \"apprenant\");\r\n\t\t\tutilisateur.setListeSessionsApprenantAccessible(liste);\r\n\t\t\treturn liste;\r\n\t\t} else {\r\n\t\t\treturn utilisateur.getListeSessionsApprenantAccessible();\r\n\t\t}\r\n\t}",
"public List<String> getSessionList(){\r\n \t\r\n \tList<String> sessionIds = new ArrayList<String>();\r\n \tfor (Entry<String, AccessDetailVO> curPage : pageAccess.entrySet()) {\r\n \t\tAccessDetailVO currLock = curPage.getValue();\r\n \t\tif(!sessionIds.contains(currLock.getSessionId())){\r\n \t\t\tsessionIds.add(currLock.getSessionId());\r\n \t\t}\t\r\n \t}\r\n \t\r\n \treturn sessionIds;\r\n }",
"public static List<CourseSession> createSessions() {\n List<CourseSession> list = new ArrayList<CourseSession>();\n list.add(createSession(\"1\"));\n list.add(createSession(\"2\"));\n return list;\n }",
"java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Session> \n getSessionsList();",
"public SessionList() { \n sessions = ExpiringMap.builder().variableExpiration().build();\n }",
"public void postulerFormateur(List<Session> list) {// OK\r\n\r\n\t\tfor (Session session : list) {\r\n\t\t\tString valID = String.valueOf(session.getId());\r\n\t\t\tString prio = String.valueOf(session.getPrio());\r\n\r\n\t\t\tservice.path(idConnexion + \"/submit\").queryParam(\"role\", \"Formateur\").queryParam(\"session\", valID)\r\n\t\t\t\t\t.queryParam(\"prio\", prio);\r\n\t\t}\r\n\r\n\t}",
"public static List getAllSessions() {\n\t\tsynchronized (FQN) {\n\t\t\tList<MemberSession> msList = new ArrayList<MemberSession>();\n//\t\t\tObject object = cache.getValues(FQN);\n\t\t\tObject object = null;\n\t\t\tif (object != null) {\n\t\t\t\tmsList = (List<MemberSession>) object;\n\t\t\t\treturn new ArrayList(msList);\n\t\t\t} else {\n\t\t\t\tCollection list = new ArrayList();\n\t\t\t\tobject = cache.getValues(FQN);\n\t\t\t\tif(object != null){\n\t\t\t\t\tlist = (Collection) object;\n\t\t\t\t}\n\t\t\t\tmsList = new ArrayList(list);\n//\t\t\t\tfor (MemberSession ms : msList) {\n//\t\t\t\t\tcache.add(FQN, ms.getSessionId(), ms);\n//\t\t\t\t}\n\t\t\t\treturn msList;\n\t\t\t}\n\n\t\t}\n\t}",
"private void updateList() {\r\n\t\ttry {\r\n\t \t// Reset the list\r\n\t\t\tsipSessions.clear();\r\n\t \t\r\n\t \t// Get list of pending sessions\r\n\t \tList<IBinder> sessions = sipApi.getSessions();\r\n\t\t\tfor (IBinder session : sessions) {\r\n\t\t\t\tISipSession sipSession = ISipSession.Stub.asInterface(session);\r\n\t\t\t\tsipSessions.add(sipSession);\r\n\t\t\t}\r\n\t\t\tif (sipSessions.size() > 0){\r\n\t\t String[] items = new String[sipSessions.size()]; \r\n\t\t for (int i = 0; i < items.length; i++) {\r\n\t\t\t\t\titems[i]=sipSessions.get(i).getSessionID();\r\n\t\t }\r\n\t\t\t\tsetListAdapter(new ArrayAdapter<String>(SessionsList.this, android.R.layout.simple_list_item_1, items));\r\n\t\t\t} else {\r\n\t\t\t\tsetListAdapter(null);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tUtils.showMessageAndExit(SessionsList.this, getString(R.string.label_session_failed));\r\n\t\t}\r\n }",
"public Map<Long, Session> list() throws DAOException {\n\t\tHashMap<Long, Session> result = new HashMap<Long, Session>();\n\t\tTypedQuery<Session> query = em.createQuery(SQL_SELECT, Session.class);\n\t\ttry {\n\t\t\tList<Session> sessions = query.getResultList();\n\t\t\tfor (Session session : sessions)\n\t\t\t\tresult.put(session.getId(), session);\n\t\t} catch (NoResultException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new DAOException(e);\n\t\t}\n\n\t\treturn result;\n\t}",
"public static ArrayList<Session> getSessions() {\r\n\t\treturn sessions;\r\n\t}",
"private List<? extends Map<String, ?>> getSessions() {\n List<Map<String, String>> list = new ArrayList<Map<String, String>>();\n sessions = MXChatManager.getInstance().getGroupChatSessions();\n for (MXGroupChatSession session : sessions) {\n Map<String, String> map = new HashMap<String, String>();\n map.put(\"topic\", session.getTopic());\n map.put(\"type\", session.isAChat() ? \"Chat\" : \"Meet\");\n\n list.add(map);\n }\n\n return list;\n }",
"public List<SessionDetailVO> getSessionDetail(){\r\n \t\r\n \tList<AccessDetailVO> accessDetails = getLockList();\r\n \tIterator<AccessDetailVO> iter = accessDetails.iterator();\r\n \tString prevSessionId = \"\";\r\n \tList<SessionDetailVO> sessionList = new ArrayList<SessionDetailVO>();\r\n \t\r\n \tSessionDetailVO sessionTmp = new SessionDetailVO();\r\n \twhile(iter.hasNext()){\r\n \t\tAccessDetailVO accessDetail = iter.next();\r\n \t\tif(accessDetail.getSessionId() != prevSessionId){\r\n \t\t\tsessionTmp = new SessionDetailVO();\r\n \t\t\tsessionTmp.setSessionId(accessDetail.getSessionId());\r\n \t\t\tsessionTmp.setSessionDetail(new ArrayList<AccessDetailVO>());\r\n \t\t\tprevSessionId = accessDetail.getSessionId();\r\n \t\t\tsessionList.add(sessionTmp);\r\n \t\t}\r\n \t\tsessionTmp.getSessionDetail().add(accessDetail);\r\n \t\t\r\n \t}\r\n \t\r\n \treturn sessionList;\r\n }",
"public ArrayList<Session> getSessionList(){\n \n ArrayList<Session> sessionList= new ArrayList<Session>(); \n Connection connection=getConnection();\n \n String studentGroup = combo_studentGroup.getSelectedItem().toString();\n\n String query= \"SELECT `SessionId`,`Tag`,`StudentGroup`,`Subject`,`NoOfStudents`,`SessionDuration` FROM `sessions` WHERE StudentGroup='\"+studentGroup+\"' \";\n Statement st;\n ResultSet rs;\n\n try{\n st = connection.createStatement();\n rs= st.executeQuery(query);\n Session session;\n while(rs.next()){\n session = new Session(rs.getInt(\"SessionId\"),rs.getString(\"Tag\"),rs.getString(\"StudentGroup\"),rs.getString(\"Subject\"),rs.getInt(\"NoOfStudents\"),rs.getInt(\"SessionDuration\"));\n sessionList.add(session);\n }\n }catch(Exception e){\n e.printStackTrace();\n }\n return sessionList; \n }",
"public static void setSessions(ArrayList<Session> _sessions) {\r\n\t\tsessions = _sessions;\r\n\t}",
"@GetMapping\n public List<Session> list() {\n return sessionRepository.findAll();\n }",
"public abstract I_SessionInfo[] getSessions();",
"public void postulerApprenant(List<Session> list) {// OK\r\n\r\n\t\tfor (Session session : list) {\r\n\t\t\tString valID = String.valueOf(session.getId());\r\n\t\t\tString prio = String.valueOf(session.getPrio());\r\n\t\t\tservice.path(idConnexion + \"/submit\").queryParam(\"role\", \"Apprenant\").queryParam(\"session\", valID)\r\n\t\t\t\t\t.queryParam(\"prio\", prio);\r\n\r\n\t\t}\r\n\r\n\t}",
"public Session[] findSessions();",
"public List getAllSessionList(){\n \tList l=null;\n try {\n Criteria crit=new Criteria();\n l=LecturePeer.doSelect(crit);\n } catch(Exception e) { ServerLog.log(\"Exception in Lecture select \"+e.getMessage());}\n \treturn l;\n }",
"public void recuperoListeUtenteloggato(HttpServletRequest request, HttpServletResponse response){\n \n DAOFactory mySqlFactory = DAOFactory.getDAOFactory();\n HttpSession session = request.getSession();\n \n ShoppingListDAO shoppingListDAO = new MySQLShoppingListDAOImpl();\n SharingDAO sharingDAO = new MySQLSharingDAOImpl();\n ShoppingListCategoryDAO shoppingListCategoryDAO = new MySQLShoppingListCategoryDAOImpl();\n \n //elimino shopping list anonime scadute\n shoppingListDAO.deleteExpiredShoppingLists();\n \n if(session.getAttribute(\"emailSession\") != null){\n \n // START: recupero delle liste che appartengono all'utente loggato\n \n List lists = shoppingListDAO.getShoppingListsByOwner((String)session.getAttribute(\"emailSession\"));\n String[][] searchListResult = new String[lists.size()][4];\n\n for(int i=0; i<lists.size(); i++){\n searchListResult[i][0] = ((ShoppingList)(lists.get(i))).getName();\n searchListResult[i][1] = Integer.toString(((ShoppingList)(lists.get(i))).getLID());\n searchListResult[i][2] = ((ShoppingListCategory)(shoppingListCategoryDAO.getShoppingListCategory(((ShoppingList)(lists.get(i))).getLCID()))).getName();\n List listaCondivisa = sharingDAO.getAllEmailsbyList(Integer.parseInt(searchListResult[i][1]));\n if (listaCondivisa.isEmpty()){\n searchListResult[i][3] = Integer.toString(0);\n } else {\n searchListResult[i][3] = Integer.toString(1);\n }\n }\n\n session.setAttribute(\"ListUserSession\", searchListResult);\n session.setAttribute(\"ListUserSessionSize\", lists.size());\n\n // END: recupero delle liste che appartengono all'utente loggato\n \n // START: recupero delle liste condivise dell'utente loggato\n \n List sharingLists = sharingDAO.getAllListByEmail((String)session.getAttribute(\"emailSession\"));\n ShoppingList tmp = null;\n String[][] sharingListResult = new String[sharingLists.size()][3];\n\n for(int i=0; i<sharingLists.size(); i++){\n\n tmp = shoppingListDAO.getShoppingList(((Sharing)(sharingLists.get(i))).getLID());\n\n sharingListResult[i][0] = tmp.getName();\n sharingListResult[i][1] = Integer.toString(tmp.getLID());\n sharingListResult[i][2] = (shoppingListCategoryDAO.getShoppingListCategory(tmp.getLCID())).getName();\n } \n\n session.setAttribute(\"SharingListUserSession\", sharingListResult);\n session.setAttribute(\"SharingListUserSessionSize\", sharingLists.size());\n \n // END: recupero delle liste condivise dell'utente loggato \n \n } else {\n \n int cookieID;\n \n if(session.getAttribute(\"cookieIDSession\") == null){\n\n MyCookieDAO riverCookieDAO = mySqlFactory.getMyCookieDAO();\n MyCookieDAO myCookieDAO = new MySQLMyCookieDAOImpl();\n\n //cancello eventuali cookie scaduti\n List<MyCookie> cookieScaduti = myCookieDAO.deleteDBExpiredCookies();\n for(int i=0; i<cookieScaduti.size(); i++){\n myCookieDAO.deleteCookieByCookieID(cookieScaduti.get(i).getCookieID());\n }\n\n //Creo cookie\n Cookie cookie = new Cookie(\"FridayAnonymous\", Integer.toString(LastEntryTable(\"cookieID\", \"cookies\")));\n cookie.setMaxAge(-1);\n cookieID = Integer.parseInt((String)cookie.getValue());\n\n Long Deadline = new Timestamp(System.currentTimeMillis()).getTime()+1800*1000;\n\n myCookieDAO.createCookie(new MyCookie(LastEntryTable(\"cookieID\", \"cookies\"), 0, null, Deadline));\n session.setAttribute(\"cookieIDSession\", Integer.parseInt(cookie.getValue()));\n response.addCookie(cookie);\n \n } else {\n cookieID = (int)session.getAttribute(\"cookieIDSession\");\n }\n \n ShoppingList shoppingList = shoppingListDAO.getAnonymusShoppingList(cookieID);\n String[][] ListResult = null;\n\n if(shoppingList != null){\n\n ListResult = new String[1][3];\n ListResult[0][0] = shoppingList.getName();\n ListResult[0][1] = Integer.toString(shoppingList.getLID());\n ListResult[0][2] = (shoppingListCategoryDAO.getShoppingListCategory(shoppingList.getLCID())).getName();\n session.setAttribute(\"ListUserSessionSize\", 1);\n\n } else {\n ListResult = new String[0][3];\n session.setAttribute(\"ListUserSessionSize\", 0);\n }\n \n session.setAttribute(\"ListUserSession\", ListResult);\n \n }\n \n \n }",
"public List<com.scratch.database.mysql.jv.tables.pojos.Session> fetchById(String... values) {\n return fetch(Session.SESSION.ID, values);\n }",
"public List<CourseSession> getAllCourseSession(){\r\n List<CourseSession> lstSession = new ArrayList<CourseSession>(); \r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n try{\r\n session.beginTransaction();\r\n List allSession = session.createQuery(\"from CourseSession\").list();\r\n for(Iterator i = allSession.iterator(); i.hasNext();){\r\n CourseSession cSession = (CourseSession) i.next(); \r\n \r\n Course c = new Course();\r\n c.setCode(cSession.getCourse().getCode());\r\n c.setTitle(cSession.getCourse().getTitle());\r\n \r\n Location l = new Location();\r\n l.setId(cSession.getLocation().getId());\r\n l.setCity(cSession.getLocation().getCity());\r\n \r\n CourseSession cs = new CourseSession();\r\n cs.setId(cSession.getId());\r\n cs.setStartDate(cSession.getStartDate());\r\n cs.setEndDate(cSession.getEndDate());\r\n cs.setCourse(c);\r\n cs.setLocation(l);\r\n \r\n lstSession.add(cs);\r\n }\r\n session.getTransaction().commit();\r\n }\r\n catch(HibernateException e){\r\n System.err.println(\"Initial SessionFactory creation failed.\");\r\n if(session.getTransaction() != null){\r\n try{\r\n session.getTransaction().rollback();\r\n }\r\n catch(HibernateException e2){\r\n e2.printStackTrace();\r\n }\r\n }\r\n }\r\n finally{\r\n if(session != null){\r\n try{\r\n session.close();\r\n }\r\n catch(HibernateException e3){\r\n e3.printStackTrace();\r\n }\r\n }\r\n } \r\n return lstSession;\r\n }",
"public List<Login>listar();",
"Session getSession();",
"Session getSession();",
"public Session getSession();",
"public List<com.scratch.database.mysql.jv.tables.pojos.Session> fetchByLifetime(Integer... values) {\n return fetch(Session.SESSION.LIFETIME, values);\n }",
"List<T> fetch(Session session);",
"public void returnToSessionList() {\n Context context = this;\n Class destinationClass = SessionListActivity.class;\n Intent intentToStartDetailActivity = new Intent(context, destinationClass);\n startActivity(intentToStartDetailActivity);\n }",
"public List<SessionDetails> getSessionDetails(JobStep js);",
"public static HTTPSession [] getAllSessions ()\n\t{\n\t\tObject [] theSessions = sessionHashtable.values ().toArray ();\n\t\tHTTPSession [] retVal = new HTTPSession [theSessions.length];\n\t\tfor (int i = 0; i < retVal.length; i++)\n\t\t{\n\t\t\tretVal [i] = (HTTPSession) theSessions [i];\n\t\t}\n\t\treturn retVal;\n\t}",
"public Session(){\n\t\tallToDoLists = new ArrayList<ObjectListElement>();\n\t\tallNotes = new ArrayList<ObjectListElement>();\n\t}",
"public final List<MediaSession2> getSessions() {\n ArrayList<MediaSession2> arrayList = new ArrayList<MediaSession2>();\n Object object = this.mLock;\n synchronized (object) {\n arrayList.addAll(this.mSessions.values());\n return arrayList;\n }\n }",
"public void annuleCandidatures(List<Session> list) {// OK\r\n\r\n\t\tfor (Session session : list) {\r\n\t\t\tString valID = String.valueOf(session.getId());\r\n\r\n\t\t\tservice.path(idConnexion + \"/delete\").queryParam(\"session\", valID);\r\n\r\n\t\t}\r\n\r\n\t}",
"@Override\r\n\tpublic void setSession(Map<String, Object> map) {\r\n\t\t sessionMap=(SessionMap<String, Object>)map;\r\n\t\t\r\n\t}",
"@RequestMapping(\"/showallemployee\")\npublic String viewEmployee(HttpSession session)\n{\nArrayList<EmployeeRegmodel> alist = ergserv.getAllDetails();\nsession.setAttribute(\"aetall\", alist);\nSystem.out.println(alist.size());\nreturn \"showAllEmployee.jsp\";\n\n\n}",
"private void listadoEstados() {\r\n sessionProyecto.getEstados().clear();\r\n sessionProyecto.setEstados(itemService.buscarPorCatalogo(CatalogoEnum.ESTADOPROYECTO.getTipo()));\r\n }",
"private void updateSessionListView() {\n FastLap[] temp = lapMap.values().toArray(new FastLap[lapMap.size()]);\n SessionAdapter adapter = new SessionAdapter(getApplicationContext(), temp);\n mSessionFragment.update(adapter);\n //Log.d(TAG, \"sessionListView UI updated...\");\n }",
"public interface FormSessionListView {\n String getId();\n String getTitle();\n Instant getDateCreated();\n Map<String, String> getSessionData();\n}",
"public List<com.scratch.database.mysql.jv.tables.pojos.Session> fetchByData(String... values) {\n return fetch(Session.SESSION.DATA, values);\n }",
"@RequestMapping(value=\"/tracuunguoidang\" ,method = RequestMethod.GET)\r\n\tpublic String tracuugiangvien(Model model, HttpSession session){\n\t\tClientConfig config = new DefaultClientConfig();\r\n\t\tClient client = Client.create(config);\r\n\t\tWebResource resource = client.resource(Server.addressAuthenWS);\r\n\t\tForm form = new Form();\r\n\t\tform.add(\"username\", \"\");\r\n\t\tform.add(\"email\", \"\");\r\n\t\tString json = resource.path(\"userinfo/findAll\").cookie(new NewCookie(\"JSESSIONID\", session.getAttribute(\"sessionid\").toString())).post(String.class,form);\r\n\t\tType type = new TypeToken<ArrayList<User>>(){}.getType();\r\n\t\tArrayList<User> dsuser = new Gson().fromJson(json, type);\r\n\t\tmodel.addAttribute(\"dsuser\", dsuser);\r\n\t\treturn \"tracuunguoidang\";\r\n\t}",
"public Collection<RaftSession> getSessions() {\n return sessions.values();\n }",
"@Override\n\tpublic void setSession(Map<String, Object> map) {\n\t\tthis.session=map;\n\t\t\n\t}",
"public List<Calificar> comentarios(){\n List<Calificar> comentarios = null;\n Session session = sessionFactory.openSession();\n Transaction tx = null;\n \n try{\n \n tx = session.beginTransaction();\n String hql = \"from Calificar\";\n Query query = session.createQuery(hql);\n comentarios = (List<Calificar>)query.list();\n tx.commit();\n \n } catch (Exception e) {\n if (tx != null) {\n tx.rollback();\n }\n e.printStackTrace();\n } finally {\n session.close();\n }\n \n return comentarios;\n }",
"public List<com.scratch.database.mysql.jv.tables.pojos.Session> fetchByName(String... values) {\n return fetch(Session.SESSION.NAME, values);\n }",
"@Override\n\tpublic void setSession(Map<String, Object> s) {\n\t\tsession = s;\n\t}",
"public List<CourseSession> findCourseSessionByLocation(int locationId){\r\n List<CourseSession> lstSession = new ArrayList<CourseSession>(); \r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n try{\r\n session.beginTransaction();\r\n Query query = session.createQuery(\"from CourseSession where location.id = :idLocation \");\r\n query.setParameter(\"idLocation\",locationId);\r\n List allSession = query.list();\r\n for(Iterator i = allSession.iterator(); i.hasNext();){\r\n CourseSession cSession = (CourseSession) i.next(); \r\n \r\n Course c = new Course();\r\n c.setCode(cSession.getCourse().getCode());\r\n c.setTitle(cSession.getCourse().getTitle());\r\n \r\n Location l = new Location();\r\n l.setId(cSession.getLocation().getId());\r\n l.setCity(cSession.getLocation().getCity());\r\n \r\n CourseSession cs = new CourseSession();\r\n cs.setId(cSession.getId());\r\n cs.setStartDate(cSession.getStartDate());\r\n cs.setEndDate(cSession.getEndDate());\r\n cs.setCourse(c);\r\n cs.setLocation(l);\r\n \r\n lstSession.add(cs);\r\n }\r\n session.getTransaction().commit();\r\n }\r\n catch(HibernateException e){\r\n System.err.println(\"Initial SessionFactory creation failed.\");\r\n if(session.getTransaction() != null){\r\n try{\r\n session.getTransaction().rollback();\r\n }\r\n catch(HibernateException e2){\r\n e2.printStackTrace();\r\n }\r\n }\r\n }\r\n finally{\r\n if(session != null){\r\n try{\r\n session.close();\r\n }\r\n catch(HibernateException e3){\r\n e3.printStackTrace();\r\n }\r\n }\r\n } \r\n return lstSession;\r\n }",
"Session getCurrentSession();",
"Session getCurrentSession();",
"public List<CourseSession> findCourseSessionByDate(Date start){\r\n List<CourseSession> lstSession = new ArrayList<CourseSession>(); \r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n try{\r\n session.beginTransaction();\r\n //List allSession = session.createQuery(\"from CourseSession\").list();\r\n Query query = session.createQuery(\"from CourseSession Where startDate >= :dateStart \");\r\n query.setParameter(\"dateStart\",start);\r\n List allSession = query.list();\r\n for(Iterator i = allSession.iterator(); i.hasNext();){\r\n CourseSession cSession = (CourseSession) i.next(); \r\n \r\n Course c = new Course();\r\n c.setCode(cSession.getCourse().getCode());\r\n c.setTitle(cSession.getCourse().getTitle());\r\n \r\n Location l = new Location();\r\n l.setId(cSession.getLocation().getId());\r\n l.setCity(cSession.getLocation().getCity());\r\n \r\n CourseSession cs = new CourseSession();\r\n cs.setId(cSession.getId());\r\n cs.setStartDate(cSession.getStartDate());\r\n cs.setEndDate(cSession.getEndDate());\r\n cs.setCourse(c);\r\n cs.setLocation(l);\r\n \r\n lstSession.add(cs);\r\n }\r\n session.getTransaction().commit();\r\n }\r\n catch(HibernateException e){\r\n System.err.println(\"Initial SessionFactory creation failed.\");\r\n if(session.getTransaction() != null){\r\n try{\r\n session.getTransaction().rollback();\r\n }\r\n catch(HibernateException e2){\r\n e2.printStackTrace();\r\n }\r\n }\r\n }\r\n finally{\r\n if(session != null){\r\n try{\r\n session.close();\r\n }\r\n catch(HibernateException e3){\r\n e3.printStackTrace();\r\n }\r\n }\r\n } \r\n return lstSession;\r\n }",
"protected Session getSession() { return session; }",
"public void setSession(Session value);",
"public void show_Sessions(){\n \n ArrayList<Session> list= getSessionList();\n DefaultTableModel model=(DefaultTableModel)sessions.getModel();\n Object[] row=new Object[6];\n \n for(int i=0; i<list.size(); i++){\n row[0]=list.get(i).getSessionID();\n row[1]=list.get(i).getTag();\n row[2]=list.get(i).getStGrp();\n row[3]=list.get(i).getSubject();\n row[4]=list.get(i).getNoOfStudents();\n row[5]=list.get(i).getSessionDuration();\n \n model.addRow(row);\n }\n \n }",
"public String navigateUsuarioList() {\n if (this.getSelected() != null) {\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"Usuario_items\", this.getSelected().getUsuarioList());\n }\n return \"/usuario/index\";\n }",
"public Collection<Long> getSessions() {\n return dataTree.getSessions();\n }",
"@GET\n public List<Session> getAllSessions() {\n log.debug(\"REST request to get all Sessions\");\n List<Session> sessions = sessionRepository.findAll();\n return sessions;\n }",
"public static List<Comentario> listar()\n {\n Session sessionRecheio;\n sessionRecheio = HibernateUtil.getSession();\n Transaction tr = sessionRecheio.beginTransaction();\n String hql = \"from Comentario u\";\n List<Comentario> lista = (List)sessionRecheio.createQuery(hql).list();\n tr.commit();\n return lista;\n }",
"public Result listAll(SessaoUser sessao) {\n\t\t\tSimpleExpression rcontratante = retriction(\"contratante.id\", sessao.getContratante());\n\n\t\t\tResult result = super.listAllRestricao(rcontratante);\n\n\t\t\tinicializeList(result.getList());\n\t\t\treturn result;\n\t\t}",
"private List<String> getSessionIdFromCookie()\n //----------------------------------------------------------------\n {\n String name = null;\n String value = null;\n PageContext pageContext = null;\n HttpServletRequest httpRequest = null;\n Cookie[] cookies = null;\n pageContext = (PageContext) this.getJspContext();\n List<String> sessionList = null;\n\n /*\n * There might be multiple Cookies with the same name\n * Get the value for each Cookie and store it in the List\n */\n\n sessionList = new LinkedList<String>();\n\n if (pageContext != null)\n {\n httpRequest = (HttpServletRequest) pageContext.getRequest();\n if (httpRequest != null)\n {\n cookies = httpRequest.getCookies();\n if (cookies != null)\n {\n for (Cookie cookie : cookies)\n {\n if (cookie != null)\n {\n name = cookie.getName();\n if (name != null && name.length() > 0 && name.equals(COOKIE_NAME))\n {\n value = cookie.getValue();\n if (value != null && value.length() > 0)\n {\n sessionList.add(value);\n }\n }\n }\n }\n }\n }\n }\n\n return sessionList;\n }",
"@Override\n\tpublic List<Session> getAssaignedSession(int agentid) {\n\t\treturn null;\n\t}",
"public void getListaUsuarios(ArrayList<Usuario> listaUsuario) {\n sql = \"SELECT * FROM tbl_usuario\";\n try {\n Statement st = cn.createStatement();\n ResultSet rs = st.executeQuery(sql);\n listaUsuario.clear();\n while (rs.next()) {\n Usuario usuario = new Usuario();\n usuario.setId_usuario(rs.getInt(\"id_usuario\"));\n usuario.setNombre_usuario(rs.getString(\"nombre_usuario\"));\n usuario.setApellido_usuario(rs.getString(\"apellido_usuario\"));\n usuario.setPassword_usuario(rs.getString(\"password_usuario\"));\n usuario.setEmail_usuario(rs.getString(\"email_usuario\"));\n listaUsuario.add(usuario);\n }\n } catch (SQLException ex) {\n Logger.getLogger(UsuarioDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public List<Usuario> listarUsuario() {\n \n List<Usuario> lista = usuarioDAO.findAll();\n return lista;\n \n \n\n }",
"@Override\n\tpublic void setSession(Map<String, Object> map) {\n\t\tsessionMap=(SessionMap<String, Object>) map;\n\t}",
"private static void getFromCache(Session session) {\n\t\tCacheManager cm=CacheManager.getInstance();\n\t\tCache cache=cm.getCache(\"namanCache\");\n\t\tfor(int i=0;i<2;i++){\n\t\t\tif(cache.get(i)!=null){\n\t\t\t\tSystem.out.println(((UserDetails)cache.get(1).getObjectValue()).getName());\n\t\t\t}else{\n\t\t\t\tUserDetails user1=(UserDetails)session.get(UserDetails.class, i);\n\t\t\t\tSystem.out.println(user1.getName());\n\t\t\t\tcache.put(new Element(i+1,user1));\n\t\t\t}\n\t\t}\n\t\tcm.shutdown();\n\t}",
"public ArrayList<UserSessionInfo> getAllSessionInfo() throws SessionManagementException {\n ArrayList<UserSessionInfo> userSessionInfoList = null;\n try {\n userSessionInfoList = SessionContextCache.getInstance(0).getSessionDetails();\n } catch (Exception e) {\n String errorMsg = \"Error is occurred while getting session details \";\n log.error(errorMsg, e);\n throw new SessionManagementException(errorMsg, e);\n }\n return userSessionInfoList;\n }",
"public Session getSession() { return session; }",
"@Override\n\tpublic ActionForward execute(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest request, HttpServletResponse response)\n\tthrows Exception {\n\t\tList cout=new ArrayList();\n\t\tHttpSession session=request.getSession(false);//change - paramter passing active session object\n\t\tresponse.setHeader(\"Cache-Control\", \"no-cache, no-store, must-revalidate\"); // HTTP 1.1.\n\t\tresponse.setHeader(\"Pragma\", \"no-cache\"); // HTTP 1.0.\n\t\tresponse.setDateHeader(\"Expires\", 0); \n\t\tresponse.setDateHeader(\"Expires\",-1); \t\t\n\t\t//System.out.println(\"Session value::::\"+session);\n\t\tString id=request.getParameter(\"id\");\n\t\tString value=(String)session.getAttribute(\"sessionvalue\");\n\t\t\n\t\tif(!request.getParameter(session.getAttribute(\"Tkey\").toString()).equals(session.getAttribute(\"Tvalue\").toString())){\n\t\t\treturn mapping.findForward(\"failure\");\n\t\t}\n\t\t\n\t\tif(value!=null && !value.equalsIgnoreCase(\"\") )\n\t\t{\n\t\t\tcout.add(value);\n //System.out.println(\"I am in session\");\n\t\t\tif(id.equalsIgnoreCase(\"addDetailsIntoDatabase\")){ \t\t\t\t\n\t\t\t\treturn mapping.findForward(\"failure\");\n\t\t\t}\n\t\t\telse if(id.equalsIgnoreCase(\"editRemain\"))\n\t\t\t{\n\t\t\t\trequest.getSession();\n\t\t\t\treturn mapping.findForward(\"edit\");\n\t\t\t}\n\t\t\telse if(id.equalsIgnoreCase(\"editfail\"))\n\t\t\t{\n\t\t\t\tLoginActionBean bean=new LoginActionBean();\n\t\t\t\tString str=(String)session.getAttribute(\"sessionvalue\");//bhushan\n\t\t\t\t//bean.droptable(str); //new code\n\t\t\t\t//bean.droptable(str+\"OTP\");\t\t//new code\t\n\t\t\t\tbean.unnessesaricontent(str);//bhushan\n\t\t\t\tsession.invalidate();\n\t\t\t\t//System.out.println(\"Out of session\");\n\t\t\t\treturn mapping.findForward(\"sessionend\");\n\t\t\t}\t\t\t\n\t\t\telse if(id.equalsIgnoreCase(\"SuccessOtpRemain\"))\n\t\t\t{\n\t\t\t\trequest.getSession();\n\t\t\t\t//System.out.println(\"I am in alive\");\n\t\t\t\treturn mapping.findForward(\"Successotp\");\t\t\t\t\n\t\t\t}\n\t\t\telse if(id.equalsIgnoreCase(\"SuccessOtpfail\"))\n\t\t\t{\n\t\t\t\tLoginActionBean bean=new LoginActionBean();\n\t\t\t\tString str=(String)session.getAttribute(\"sessionvalue\");//bhushan\n\t\t\t\t//bean.droptable(str); //new code\n\t\t\t\t//bean.droptable(str+\"OTP\");\t\t//new code\t\n\t\t\t\tbean.unnessesaricontent(str);//bhushan\t\n\t\t\t\tsession.invalidate();\n\t\t\t\t//System.out.println(\"Out of session\");\n\t\t\t\treturn mapping.findForward(\"sessionend\");\t\t\t\n\t\t\t}\n\t\t\telse if(id.equalsIgnoreCase(\"aliveMainPage\")) //bhushan\n\t\t\t{\n\t\t\t request.getSession();//bhushan\n\t\t\t //System.out.println(\"I am in alive\");//bhushan\n\t\t\t return mapping.findForward(\"Successotp\"); //bhushan code end\t\t\t\t\n\t\t\t}\n\t\t\telse if(id.equalsIgnoreCase(\"alive\"))\n\t\t\t{\n\t\t\t\trequest.getSession();\n\t\t\t\t//System.out.println(\"I am in alive\");\n\t\t\t\treturn mapping.findForward(\"otp\");\n\t\t\t}\n\t\t\telse if(id.equalsIgnoreCase(\"pass2\")){ // room is already register but user is not register //bhushan code start\n\t\t\t\t//System.out.println(\"I am pass2\");\n\t\t\t\tLoginActionBean bean=new LoginActionBean();\n\t\t\t\tRegisterForm registerForm = (RegisterForm) form;\n\t\t\t\tString userid=(String) session.getAttribute(\"sessionvalue\");\n\t\t\t\tbean.droptable(userid+\"OTP\");\n\t\t\t\t//\n\t\t\t\tString generatedOtp=GenerateId.getOtp();\t\t\t\t\n\t\t\t\tString queryRetriveMobilenumber=\"SELECT mobilenumber FROM register WHERE userId_Pk=\"+userid;\n\t\t\t\tString mobilenumber=bean.getUsermobilenumber(queryRetriveMobilenumber);\t\t\t\t\n\t\t\t\tString idValue=(String)session.getAttribute(\"sessionvalue\");\t\t\t\t\n\t\t\t\t//String query=\"\";\n\t\t\t\tif(!bean.checkTable(\"temp\"+idValue+\"OTP\")){ //bhushan\n\t\t\t\tbean.createTable(generatedOtp,idValue+\"OTP\",2);\n\t\t\t\tSMS.sendSMS(mobilenumber, \"Your OTP is :\"+generatedOtp);\t\t\t\t\n\t\t\t\tregisterForm.setMessage(\"\");\n\t\t\t\tregisterForm.setUpdationMessage(\"\");\n\t\t\t\trequest.setAttribute(\"message\", \"\");\n\t\t\t\tregisterForm.setOtpMessage(\"Otp sent to your mobile\");\n\t\t\t\trequest.setAttribute(\"otpMessage\", \"Otp sent to your mobile\");\n\t\t\t\t////System.out.println(registerForm.getUrl());\n\t\t\t\treturn mapping.findForward(\"otp\");\n\t\t\t\t}\n\t\t\t\telse//bhushan\n\t\t\t\t{\n\t\t\t\t\treturn mapping.findForward(\"otpAlreadyGenerated\");//bhushan\n\t\t\t\t}\n\t\t\t\t//\n\t\t\t\t\n\t\t\t }\n\t\t\telse if(id.equalsIgnoreCase(\"pass\")){ // room is already register but user is not register//bhushan code start\n\t\t\t\tLoginActionBean bean=new LoginActionBean();\n\t\t\t\t//System.out.println(\"pass\");\n\t\t\t\t////System.out.println(\"I am in logout\");\n\t\t\t\t//HttpSession session=request.getSession();\n\t\t\t\tString generatedOtp=GenerateId.getOtp();\t\t\t\t\n\t\t\t\t//String selectQuery=\"select count(*) as count from register where username='\"+username+\"' and password='\"+password+\"'\";\n\t\t\t\tString userid=(String) session.getAttribute(\"sessionvalue\");\n\t\t\t\tString queryRetriveMobilenumber=\"SELECT mobilenumber FROM register WHERE userId_Pk=\"+userid;\n\t\t\t\tString mobilenumber=bean.getUsermobilenumber(queryRetriveMobilenumber);\t\t\t\t\n\t\t\t\tString idValue=(String)session.getAttribute(\"sessionvalue\");\t\t\t\t\n\t\t\t\t//String query=\"\";\n\t\t\t\tif(!bean.checkTable(\"temp\"+idValue+\"OTP\")){ //bhushan\n\t\t\t\tbean.createTable(generatedOtp,idValue+\"OTP\",2);\n\t\t\t\tSMS.sendSMS(mobilenumber, \"Your OTP is :\"+generatedOtp);\n\t\t\t\t\n\t\t\t\tRegisterForm registerForm = (RegisterForm) form;\n\t\t\t\tregisterForm.setMessage(\"\");\n\t\t\t\tregisterForm.setUpdationMessage(\"\");\n\t\t\t\trequest.setAttribute(\"message\", \"\");\n\t\t\t\trequest.setAttribute(\"updationMessage\", \"\");\n\t\t\t\tregisterForm.setOtpMessage(\"\");\n\t\t\t\trequest.setAttribute(\"otpMessage\", \"\");\n\t\t\t\t////System.out.println(registerForm.getUrl());\n\t\t\t\treturn mapping.findForward(\"otp\");\n\t\t\t\t}\n\t\t\t\telse//bhushan\n\t\t\t\t{\n\t\t\t\t\treturn mapping.findForward(\"otpAlreadyGenerated\");//bhushan\n\t\t\t\t}//bhushan code end\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(id.equalsIgnoreCase(\"Otpcheck\")){ // room is already register but user is not register\n\t\t\t\tLoginActionBean bean=new LoginActionBean();\n\t\t\t\t////System.out.println(\"I am in logout\");\n\t\t\t\t//System.out.println(\"Otpcheck\");\n\t\t\t\t\n\t\t\t\t//HttpSession session=request.getSession();\n\t\t\t\tRegisterForm registerForm = (RegisterForm) form;\n\t\t\t\tString finalOtp=registerForm.getOtp();\n\t\t\t\t//System.out.println(finalOtp);\n\t\t\t\t//String alreadyGenerated=(String)session.getAttribute(\"flagOtp\");//bhushan\n\t\t\t\tString idValue1=(String)session.getAttribute(\"sessionvalue\");\n\t\t\t\tboolean value1=bean.otpCheck(finalOtp,idValue1+\"OTP\");\n\t\t\t\n\t\t\t\tif(value1/* && !alreadyGenerated.equalsIgnoreCase(\"Alreadygenrated\")*/){//bhushan\n\t\t\t\t//String mainKey=registerForm.getTimepass();\n\t\t\t\tbean.droptable(idValue1+\"OTP\");//bhushan\n\t\t\t\tCollection<Maindata> listUsers = bean.listData(value,idValue1);\n\t\t\t\t//session.setAttribute(\"flagOtp\", \"Alreadygenrated\");//bhushan\n\t\t\t\trequest.setAttribute(\"listUsers\", listUsers);\n\t\t\t\tregisterForm.setMessage(\"\");\n\t\t\t\tregisterForm.setUpdationMessage(\"\");\n\t\t\t\trequest.setAttribute(\"message\", \"\");\n\t\t\t\trequest.setAttribute(\"updationMessage\", \"\");\n\t\t\t\tregisterForm.setOtpMessage(\"\");\n\t\t\t\trequest.setAttribute(\"otpMessage\", \"\");\n\t\t\t\t////System.out.println(registerForm.getUrl());\n\t\t\t\treturn mapping.findForward(\"Successotp\");\n\t\t\t\t}\n\t\t\t\t//else if(alreadyGenerated.equalsIgnoreCase(\"Alreadygenrated\"))//bhushan\n\t\t\t\t//{\n\t\t\t\t//\treturn mapping.findForward(\"otpAlreadyGenerated\");//bhushan\n\t\t\t\t//}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tregisterForm.setOtpMessage(\"You Enter wrong OTP\");\n\t\t\t\t\trequest.setAttribute(\"otpMessage\", \"You Enter wrong OTP\");\n\t\t\t\t\treturn mapping.findForward(\"otp\");\t\n\t\t\t\t}\n\t\t\t} \t\n\t\t\telse if(id.equalsIgnoreCase(\"addDetails\")){ // room is already register but user is not register\n\t\t\t\tLoginActionBean bean=new LoginActionBean();\n\t\t\t\t//System.out.println(\"addDetailsIntoDatabase\");\n\t\t\t\tRegisterForm registerForm = (RegisterForm) form;\n\t\t\t\tString idValue1=(String)session.getAttribute(\"sessionvalue\");\n\t\t\t\tString url=registerForm.getUrl();\n\t\t\t\tString username=registerForm.getUsername();\n\t\t\t\tString password=registerForm.getPasswordRegisterData();\n\t\t\t\t//String key=registerForm.getTimepass();\n\t\t\t\t////System.out.println(\"Main Security PIN is Require for encryption(add details)::\"+key);\n\t\t\t\tString flag1=request.getParameter(\"flag\");\n\t\t\t\tif(flag1!=null && flag1.equals(\"1\"))\n\t\t\t\t{\n\t\t\t\t\turl=\"Enter Website Link\";\n\t\t\t\t\tusername=\"Enter Username\";\n\t\t\t\t\tpassword=\"Password\";\n\t\t\t\t\t//key=\"Enter Security PIN\";\n\t\t\t\t}\n\t\t\t\tif(url!=null && !url.equalsIgnoreCase(\"\")&&!url.equalsIgnoreCase(\"Enter Website Link\".trim()) && !username.equalsIgnoreCase(\"Enter Username\".trim()) && !password.equalsIgnoreCase(\"Password\".toString())){\n\t\t\t String querySelect=\"select count(*) as count from details where weblink='\"+url+\"' and userId_fk=\"+idValue1+\"\";\n\t\t\t if(bean.checkAlready(querySelect)){\n\t\t\t \t\n\t\t\t\t \t//jyotsana 1 level encryption\n\t\t\t \t //System.out.println(\"Simple Password::\"+password);\n\t\t\t \t //System.out.println(\"Before Jyoshna Incrypt :\"+password);\n\t\t\t\t\t\tGetEncrypt encryptd = new GetEncrypt();//jyo\n\t\t\t\t\t\t//ResultSet rsFirstRecord=SqlCrudOperation.selectQuery(\"Select data from temp\"+idValue1);\n\t\t\t\t\t\t//rsFirstRecord.next();\n\t\t\t\t\t\t//String key=rsFirstRecord.getString(\"data\");\n\t\t\t\t\t\tString key=bean.getSecurityPIN(idValue1,1);\n\t\t\t\t\t\t//System.out.println(\"key value isL:::::::::::::::::::::::::::\"+key);\n\t\t\t\t\t\tbyte[] encryptedData = encryptd.encryptData(password, key); //Jyoshana Encrypt\n\t\t\t\t\t\tpassword=encryptd.ByteToString(encryptedData);\n\t\t\t\t\t\n\t\t\t\t\t\tbyte[] encryptedData1 = encryptd.encryptData(username, key); //Jyoshana Encrypt\n\t\t\t\t\t\tusername=encryptd.ByteToString(encryptedData1);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//System.out.println(\"Encrypted Data::::::::::::::::::::::::::::::::::::\"+encryptedData);\n\t\t\t\t\t\t//System.out.println(\"Value passing to database::::::::::::::::::::::::::::::::::::\"+password);\n\t\t\t\t\t\t\n\t\t\t\t\t\t////System.out.println(\"After Jyoshna Incrypt :\"+password);\n\t\t\t\t\t\t////System.out.println(encryptedData.toString());\n\t\t\t\t\t\t////System.out.println(\"Decrypted data::::::\"+ encryptd.decryptData(encryptedData,\"207244291\"));\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t//End jyotsana\n\t\t\t \t //bhushan Change : MyCrypto.encrypt(password)\n\t\t\t \t\tString query=\"INSERT INTO `details` (`weblink`, `usernameweb`, `passwordweb`, `userId_fk`) VALUES ('\"+url+\"', '\"+username+\"', '\"+password+\"', '\"+value+\"')\"; //bhushan Encrypt\n\t\t\t \t//\t//System.out.println(\"After Bhushan Incrypt :\"+MyCrypto.encrypt(password));\n\t\t\t \t\t////System.out.println(registerForm.getUrl());\n\t\t\t\t\t\tint flag= bean.register(query);\n\t\t\t\t\t\tif(flag!=0)\n\t\t\t\t\t\t{ \n\t\t\t\t\t\t\t//System.out.println(\"I am in flag\");\n\t\t\t\t\t\t\tregisterForm.setMessage(\"Data successfully inserted\");\n\t\t\t\t\t\t request.setAttribute(\"message\", \"Data successfully inserted\");\n\t\t\t\t\t\t\treturn mapping.findForward(\"success\");\n\t\t\t\t\t\t\t///return mapping.findForward(\"successReg\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(\"Insertion Query Zol\");\n\t\t\t\t\t\t\tregisterForm.setMessage(\"Data is not inserted\");\n\t\t\t\t\t\t\trequest.setAttribute(\"message\", \"Data is not inserted\");\n\t\t\t\t\t\t\t//return mapping.findForward(\"failure\");\n\t\t\t\t\t\t\treturn mapping.findForward(\"success\");\n\t\t\t\t\t\t}\n\t\t\t }\n\t\t\t else \n\t\t\t {\n\t\t\t \tregisterForm.setMessage(\"Data for this website is already registered If you want to change please go to view password\");\n\t\t\t\t\trequest.setAttribute(\"message\", \"Data for this website is already registered If you want to change please go to view password\");\n\t\t\t\t\treturn mapping.findForward(\"success\");\n\t\t\t }\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tregisterForm.setMessage(\"Enter the details\");\n\t\t\t\t\trequest.setAttribute(\"message\", \"Enter the details\");\n\t\t\t\t\treturn mapping.findForward(\"success\");\n\t\t\t\t}\n\t\t\t\t//System.out.println(registerForm.getPasswordRegister());\n\t\t\t\t//System.out.println(registerForm.getUsername());\n\t\t\t} \n\t\t\telse if(id.equalsIgnoreCase(\"logout\")){ // room is already register but user is not register\n\t\t\t\tLoginActionBean bean=new LoginActionBean();\n\t\t\t\t//bean.droptable((String)session.getAttribute(\"sessionvalue\"));//bhushan\n\t\t\t\t//bean.droptable((String)session.getAttribute(\"sessionvalue\")+\"\");\n\t\t\t\t//System.out.println(\"logout\");\n\t\t\t\t//System.out.println(\"I am in logout\");\n\t\t\t\t//HttpSession session=request.getSession();\n\t\t\t\t//bean.droptable(value+\"OTP\"); //new code//bhushan\n\t\t\t\tString str=(String)session.getAttribute(\"sessionvalue\");//bhushan\n\t\t\t\t//bean.droptable(str); //new code\n\t\t\t\t//bean.droptable(str+\"OTP\");\t\t//new code\t\n\t\t\t\tbean.unnessesaricontent(str);//bhushan\n\t\t\t\tsession.setAttribute(\"sessionvalue\", \"\");\n\t\t\t\tsession.setAttribute(\"sessionvalue\", null);\n\t\t\t\tsession.invalidate();\n\t\t\t\tRegisterForm registerForm = (RegisterForm) form;\n\t\t\t\t\n\t\t\t\t//System.out.println(registerForm.getUrl());\n\t\t\t\treturn mapping.findForward(\"logout\");\n\t\t\t}\n\t\t\telse if(id.equalsIgnoreCase(\"edit\"))\n\t\t\t{\n\t\t\t\tLoginActionBean bean=new LoginActionBean();\n\t\t\t\tString idvalue2=(String)session.getAttribute(\"sessionvalue\");\n\t\t\t\tRegisterForm formReg=(RegisterForm)form;\n\t\t\t\tSystem.out.println(\"value of Id::::::::::::\"+formReg.getDetailsId());\n\t\t\t\tString query=\"Select * from details where userId_fk='\"+value+\"' and detailsId='\"+formReg.getDetailsId()+\"'\";\n\t\t\t\tMaindata main=bean.getEdit(query,idvalue2);\n\t\t\t\tformReg.setDetailsId(main.getDetailsId());\n\t\t\t\tformReg.setUrl(main.getWeblink());\n\t\t\t\tformReg.setUsername(main.getUsername());\n\t\t\t\tformReg.setPasswordRegisterData(main.getPassword());\n\t\t\t\treturn mapping.findForward(\"edit\");\n\t\t\t}\n\t\t\telse if(id.equalsIgnoreCase(\"expiresession\"))\n\t\t\t{\n\t\t\t\tLoginActionBean bean=new LoginActionBean();\n\t\t\t\tString str=(String)session.getAttribute(\"sessionvalue\");//bhushan\n\t\t\t\t//bean.droptable(str); //new code\n\t\t\t\t//bean.droptable(str+\"OTP\");\t\t//new code\t\n\t\t\t\tbean.unnessesaricontent(str);//bhushan\t\n\t\t\t\tsession.invalidate();\n\t\t\t\tSystem.out.println(\"Out of session\");\n\t\t\t\treturn mapping.findForward(\"sessionend\");\n\t\t\t}\n\t\t\telse if(id.equalsIgnoreCase(\"update\"))\n\t\t\t{\n\t\t\t\tLoginActionBean bean=new LoginActionBean();\n\t\t\t\tRegisterForm formReg=(RegisterForm)form;\n\t\t\t\t//String query=\"Select * from details where userId_fk='\"+value+\"'\";\n\t\t\t\t//Maindata main=bean.getEdit(query);\n\t\t\t String d=formReg.getDetailsId();\n\t\t\t\tString url=formReg.getUrl();\n\t\t\t\tString username=formReg.getUsername();\n\t\t\t\tString registerData=formReg.getPasswordRegisterData();\n\t\t\t\tGetEncrypt encryptd = new GetEncrypt();//jyo\n\t\t\t\tString strkey=(String)session.getAttribute(\"sessionvalue\");\n\t\t\t\tString key=bean.getSecurityPIN(strkey,1);\n\t\t\t\tbyte[] encryptedData = encryptd.encryptData(registerData, key); //Jyoshana Encrypt\n\t\t\t\tregisterData=encryptd.ByteToString(encryptedData);\n\t\t\t\t\n\t\t\t\tbyte[] encryptedData1 = encryptd.encryptData(username, key); //Jyoshana Encrypt\n\t\t\t\tusername=encryptd.ByteToString(encryptedData1);\t\t\t\n\t\t\t\t\n\t\t\t//\tString mainKey=formReg.getTimepass();\n\t\t\t//\tSystem.out.println(\"Main Security PIN is Require for encryption((Update details))::\"+mainKey);\n\t\t\t\t//new updation\n\t\t\t\trequest.setAttribute(\"updationMessage\", \"Data is not updated\");\n\t\t\t\tformReg.setUpdationMessage(\"Data is not updated\");\n\t\t\t // String querySelect=\"select count(*) as count from details where weblink='\"+url+\"'\";\n\t\t\t // bean.checkAlready(querySelect)\n\t\t\t\t//MyCrypto.encrypt(registerData) bhushan \n\t\t\t \tString query=\"update details set weblink='\"+url+\"',usernameweb='\"+username+\"',passwordweb='\"+registerData+\"' where detailsId=\"+d+\" and userId_fk=\"+value+\"\";\n\t\t\t \tSystem.out.println(query);\n\t\t\t\tint flag= bean.register(query);\n\t\t\t\tif(flag!=0)\n\t\t\t\t{ \n\t\t\t\tSystem.out.println(\"I am in flag\");\n\t\t\t\tformReg.setUpdationMessage(\"Data updated successfully \");\n\t\t\t request.setAttribute(\"updationMessage\", \"Data updated successfully\");\n\t\t\t\treturn mapping.findForward(\"edit\");\n\t\t\t\t///return mapping.findForward(\"successReg\");\n\t\t\t\t}\n\t\t\t else\n\t\t\t\t{\n\t\t\t\tSystem.out.println(\"updation Query Zol\");\n\t\t\t\tformReg.setUpdationMessage(\"Data is not Updated\");\n\t\t\t\trequest.setAttribute(\"updationMessage\", \"Data is not updated\");\n\t\t\t\t//return mapping.findForward(\"failure\");\n\t\t\t\treturn mapping.findForward(\"edit\");\n\t\t\t\t}\n\t\t\t }\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn mapping.findForward(\"failure\");\n\t\t\t}\n\t\t}\n\t\n\t\telse\n\t\t{\n\t\t\tLoginActionBean bean=new LoginActionBean();\n\t\t\tString str=(String)session.getAttribute(\"sessionvalue\");//bhushan\n\t\t\t//bean.droptable(str); //new code\n\t\t\t//bean.droptable(str+\"OTP\");\t\t//new code\t\n\t\t\tbean.unnessesaricontent(str);//bhushan\n\t\t\tsession.invalidate();\n\t\t\tSystem.out.println(\"Out of session\");\n\t\t\treturn mapping.findForward(\"sessionend\");\n\t\t}\n\n\t}",
"public void setSession(Session session) {\n\tthis.session = session; \r\n}",
"public void setSession(Session session) { this.session = session; }",
"public createsessions() {\n initComponents();\n loadlec();\n loadlec2();\n\n // subcode() ;\n loadsubname();\n loadsubname1();\n\n loadtag();\n loadtag2();\n\n loadgrpid();\n loadgrpid2();\n\n loadsubgrpid1();\n loadsubgrpid2();\n\n }",
"public abstract List<Usuario> seleccionarTodos();",
"public synchronized Session[] getVisibleSessions(Session session) {\n return session.isAdmin() ? getAllSessions()\n : new Session[]{ session };\n }",
"public List<Usuario> listar() {\n return listaUse;\n }",
"public void listadoCarreras() {\r\n try {\r\n this.sessionProyecto.getCarreras().clear();\r\n this.sessionProyecto.getFilterCarreras().clear();\r\n this.sessionProyecto.getCarreras().addAll(sessionUsuarioCarrera.getCarreras());\r\n this.sessionProyecto.setFilterCarreras(this.sessionProyecto.getCarreras());\r\n } catch (Exception e) {\r\n }\r\n }",
"public void setSession(Map map) {\n\t\tthis.sessionMap=map;\n\t}",
"public java.util.List findStudentBySession(java.lang.Integer session) throws GenericBusinessException {\n sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();\n try {\n String queryString = \"from \" + Student.class.getName() + \" e where e.session like :session \";\n // Add a an order by on all primary keys to assure reproducable results.\n String orderByPart = \"\";\n orderByPart += \" order by e.studentId\";\n queryString += orderByPart;\n Query query = hibernateTemplate.createQuery(queryString);\n hibernateTemplate.setQueryParameter(query, \"session\", session);\n List list = hibernateTemplate.list(query);\n return list;\n } finally {\n log.debug(\"finished findStudentBySession(java.lang.Integer session)\");\n }\n }",
"public void setSession(Map<String, Object> session) {\n\t\t\n\t}",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n /* HttpSession session = request.getSession();\n String idWork = request.getParameter(\"identifiant\");\n if(ShoppingCart.items.isEmpty()){\n for(Work work : Catalogue.listOfWorks){\n if(Integer.parseInt(idWork) == work.getId()){\n ShoppingCart.items.add(work);\n session.setAttribute(\"caddie\", ShoppingCart.items);\n }\n }\n }else{\n ShoppingCart.items = (Set<Work>) session.getAttribute(\"caddie\");\n for(Work work : Catalogue.listOfWorks){\n if(Integer.parseInt(idWork) == work.getId()){\n ShoppingCart.items.add(work);\n session.setAttribute(\"caddie\", ShoppingCart.items);\n }\n }\n }*/\n \n /*response.setContentType(\"text/html;charset=UTF-8\");\n try (PrintWriter out = response.getWriter()) {\n out.println(\"<!DOCTYPE html>\");\n out.println(\"<html>\");\n out.println(\"<head>\");\n out.println(\"<title>Servlet AddToCartServlet</title>\"); \n out.println(\"</head>\");\n out.println(\"<body>\");\n out.println(\"<h1>Œuvre ajoutée au caddie (\" + ShoppingCart.items.size() + \")</h1>\");\n out.println(\"<a href='http://localhost:8080/frontoffice-1.0/catalogue'>Accès au catalogue des oeuvres</a>\");\n out.println(\"</body>\");\n out.println(\"</html>\");\n }*/\n \n String idAsString = request.getParameter(\"identifiant\");\n long idAsLong = Long.parseLong(idAsString);\n \n ShoppingCart cart = (ShoppingCart)request.getSession().getAttribute(\"cart\");\n //On crée l'attribut de session cart si ce dernier n'existe pas\n if(cart == null){\n cart = new ShoppingCart();\n request.getSession().setAttribute(\"cart\", cart);\n }\n \n /*for(Work work : Catalogue.listOfWorks){\n if(work.getId() == idAsLong){\n cart.getItems().add(work);\n }\n }*/\n \n Optional<Work> optionalWork = Catalogue.listOfWorks.stream().filter(work -> work.getId() == idAsLong).findAny();\n \n if(optionalWork.isPresent()){\n cart.getItems().add(optionalWork.get());\n }\n \n response.setContentType(\"text/html;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n out.println(\"<html>\");\n out.println(\"<body>\");\n out.println(\"<h1>Œuvre ajoutée au caddie (\" + cart.getItems().size() + \")</h1>\");\n out.println(\"<a href='http://localhost:8080/frontoffice-1.0/catalogue'>Accès au catalogue des oeuvres</a>\");\n out.println(\"</body>\");\n out.println(\"</html>\");\n }",
"@Override\r\n\tpublic void updateSessionId(ClimingList clim) {\n\t\tsession.update(\"climingLists.updateSessionId\",clim);\r\n\t\t\r\n\t}",
"@Override\n\tpublic void setSession(Map<String, Object> session) {\n\t\tthis.session=session;\n\t}",
"@Override\n\tpublic List<Seccion> listarSecciones() {\n\t\t\n \tList<Seccion> secciones= entity.createQuery(\"FROM Seccion\", Seccion.class).getResultList();\n \t\n\t\treturn secciones;\n\t}",
"@Override\n\tpublic <T, S> List<T> getRecords(S session) {\n\t\treturn null;\n\t}",
"public List<Sesion> getSesiones() {\r\n\t\treturn sesiones;\r\n\t}",
"@OneToMany(mappedBy = Session.Attributes.PARTICIPATION, targetEntity = Participation.class, orphanRemoval = true)\n\tpublic Set<Session> getSessions() {\n\t\treturn this.sessions;\n\t}",
"@Override\r\n\tpublic void setSession(Map<String, Object> session) {\n\t\tthis.session=session;\r\n\t}",
"@GetMapping(value = \"/viewcart\")\n public ResponseEntity<List<CartProduct>> viewCart(final HttpSession session) {\n log.info(session.getId() + \" : Retrieving the cart to view\");\n Map<String, CartProduct> initialCart = (Map<String, CartProduct>) session.getAttribute(CART_SESSION_CONSTANT);\n ControllerUtils.checkEmptyCart(initialCart, session.getId());\n List<CartProduct> result = new ArrayList();\n\n for (String key : initialCart.keySet()) {\n result.add(initialCart.get(key));\n }\n return ResponseEntity.status(HttpStatus.OK).body(result);\n }",
"public ArrayList<Session> getActiveSessions()\r\n\t{\r\n\t\treturn this.activeSessions;\r\n\t}",
"@Override\r\n\tpublic void setSession(Map<String, Object> session) \r\n\t{\n\t\tthis.session = session;\r\n\t}",
"List<Joined> findBySession(Long Session);",
"@RequestMapping(\"/list\")\n public String listPage(HttpSession session, Model model) {\n if (!baseRequest(session, model)) {\n return \"redirect:/login\";\n }\n return \"admin/data_set/list\";\n }",
"public List<Usuario> obtenerListaUsuariosActivos(){\n return usuarioBean.obtenerListaUsuariosActivos();\n }",
"public List<Calificar> list_comentarios(String nombre){\n List<Calificar> comentarios = null;\n\n Session session = sessionFactory.openSession();\n Transaction tx = null;\n\n try{\n\n tx = session.beginTransaction();\n String hql = \"from Calificar c where c.puesto.idNombre = :puesto\";\n Query query = session.createQuery(hql);\n query.setParameter(\"puesto\", nombre);\n comentarios = (List<Calificar>)query.list();\n tx.commit();\n\n } catch (Exception e) {\n if (tx != null) {\n tx.rollback();\n }\n e.printStackTrace();\n } finally {\n session.close();\n }\n\n return comentarios;\n }",
"@Override\r\npublic void setSession(Map<String, Object> arg0) {\n\t\r\n}",
"private static void sessionFromCurrentSession(final Context context) {\n\n \t// The session itself\n final Session newSession = Session.getInstance();\n \n // The service\n Service newService = new Service();\n newSession.setService(newService);\n\n // The shared preferences\n Preferences preferences = new Preferences(context);\n newSession.setPreferences(preferences);\n\n // The database\n RestaurantDBAdapter restaurantDBAdapter = new RestaurantDBAdapter(context);\n newSession.setRestaurantDBAdapter(restaurantDBAdapter);\n\n // The hashmap of all the restaurants\n HashMap<String, Restaurant> restaurants = restaurantDBAdapter.getAllRestaurants();\n newSession.setRestaurants(restaurants);\n\n //Save the current session\n Session.setCurrentSession(newSession);\n Session.currentSession.saveAsCurrentSession(context);\n }",
"Session get(int id);",
"@Override\n\tpublic void setSession(Map<String, Object> session)\n\t{\n\t\tthis.session = session;\n\n\t}",
"@Test\n public void testGetTasksForSession() {\n\n List<Task> tasks;\n\n tasks = Session.getTasks(Session.NAME.PRE, 1);\n\n assertNotNull(tasks);\n assertTrue(\"Pre should have two tasks.\", tasks.size() == 2);\n assertEquals(\"Unique name for the task should be DASS_21\", \"DASS21_AS\", tasks.get(0).getName());\n assertEquals(\"First task should be named Status Questionnaire\", \"Status Questionnaire\", tasks.get(0).getDisplayName());\n assertEquals(\"First task should point to the DASS21 questionniare\", Task.TYPE.questions, tasks.get(0).getType());\n assertEquals(\"First task should point to the DASS21 questionniare\",\"questions/DASS21_AS\", tasks.get(0).getRequestMapping());\n assertTrue(\"First task should be completed\",tasks.get(0).isComplete());\n assertFalse(\"First task should not be current\",tasks.get(0).isCurrent());\n assertFalse(\"Second task should not be completed\",tasks.get(1).isComplete());\n assertTrue(\"Second task should be current\",tasks.get(1).isCurrent());\n\n Session s = new Session();\n s.setTasks(tasks);\n assertEquals(\"Second task is returned when current requested\", tasks.get(1), s.getCurrentTask());\n\n }",
"public List<Loginhistory> getLoginHistoryList() throws Exception {\n\r\n List<Loginhistory> userRoleList = new ArrayList<Loginhistory>();\r\n Session session = null;\r\n try {\r\n session = HibernateInit.sessionFactory.openSession();\r\n String sql = \"from Loginhistory u order by u.historyid asc\";\r\n Query query = session.createQuery(sql);\r\n userRoleList = query.list();\r\n\r\n } catch (Exception e) {\r\n throw e;\r\n } finally {\r\n try {\r\n session.flush();\r\n session.close();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n }\r\n return userRoleList;\r\n }"
]
| [
"0.6947645",
"0.67987615",
"0.6662458",
"0.64974076",
"0.64923686",
"0.6349439",
"0.6287025",
"0.62805283",
"0.6265119",
"0.61937535",
"0.6154852",
"0.60634273",
"0.6053341",
"0.6043949",
"0.60269856",
"0.60144496",
"0.6010456",
"0.60001755",
"0.5998978",
"0.5997114",
"0.59930295",
"0.59886247",
"0.59648293",
"0.59545493",
"0.59330136",
"0.5871701",
"0.5871701",
"0.5854428",
"0.5841907",
"0.5833388",
"0.57969946",
"0.57885456",
"0.569757",
"0.5694441",
"0.56888264",
"0.56846106",
"0.5670998",
"0.5656516",
"0.56531566",
"0.56469697",
"0.56427646",
"0.5618735",
"0.5617573",
"0.5614325",
"0.56096077",
"0.55980635",
"0.5588804",
"0.55886614",
"0.55703014",
"0.5562205",
"0.5562205",
"0.5538684",
"0.55287635",
"0.5522912",
"0.55220187",
"0.5516654",
"0.5502988",
"0.55011404",
"0.5477181",
"0.54749167",
"0.54674613",
"0.5463373",
"0.54626447",
"0.5458902",
"0.5445305",
"0.54444766",
"0.5439232",
"0.5436233",
"0.5429572",
"0.54095167",
"0.5409403",
"0.5403556",
"0.5395443",
"0.53886485",
"0.53875387",
"0.5385133",
"0.53830296",
"0.53813756",
"0.5379513",
"0.5367338",
"0.5365297",
"0.53626466",
"0.536261",
"0.5356548",
"0.5352977",
"0.5346595",
"0.5345016",
"0.5342452",
"0.53409106",
"0.5332302",
"0.5323503",
"0.5319755",
"0.5318688",
"0.5318121",
"0.53109837",
"0.5306193",
"0.5296186",
"0.5293341",
"0.5291637",
"0.5289626"
]
| 0.81615126 | 0 |
convertit la liste de AgentT en Agent | private List<Agent> ConvertAgentT(List<AgentT> listT) {
List<Agent> listerep = new ArrayList<Agent>();
for (AgentT at : listT) {
Agent agent = new Agent();
agent.setAgentT(at);
listerep.add(agent);
}
return listerep;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String getAgentLista() {\n return agentLista;\n }",
"public List<Agente> getAllAgentes(){\r\n\t\treturn resAgenteDAO.getAllAgentes();\r\n\t}",
"public StrategieClassique(List<InfraAgent> listInfraAgents, List<OrdonnanceurListener> listListenerActuels) {\r\n listOrdonnancement = listInfraAgents;\r\n /*\r\n\t\t * listInfraAgents.add(agent1); listInfraAgents.add(agent2);\r\n\t\t * listInfraAgents.add(agent3);\r\n\t\t */\r\n listListenerPourOrdonnanceur = listListenerActuels;\r\n changerVitesse(EnumVitesse.CENT);\r\n }",
"public java.util.List<org.biocatalogue.x2009.xml.rest.Agent> getAgentList()\r\n {\r\n final class AgentList extends java.util.AbstractList<org.biocatalogue.x2009.xml.rest.Agent>\r\n {\r\n public org.biocatalogue.x2009.xml.rest.Agent get(int i)\r\n { return AgentsResultsImpl.this.getAgentArray(i); }\r\n \r\n public org.biocatalogue.x2009.xml.rest.Agent set(int i, org.biocatalogue.x2009.xml.rest.Agent o)\r\n {\r\n org.biocatalogue.x2009.xml.rest.Agent old = AgentsResultsImpl.this.getAgentArray(i);\r\n AgentsResultsImpl.this.setAgentArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.biocatalogue.x2009.xml.rest.Agent o)\r\n { AgentsResultsImpl.this.insertNewAgent(i).set(o); }\r\n \r\n public org.biocatalogue.x2009.xml.rest.Agent remove(int i)\r\n {\r\n org.biocatalogue.x2009.xml.rest.Agent old = AgentsResultsImpl.this.getAgentArray(i);\r\n AgentsResultsImpl.this.removeAgent(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return AgentsResultsImpl.this.sizeOfAgentArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new AgentList();\r\n }\r\n }",
"public List<Agent> findAgentsActifs() {\n Query q = getEntityManager().createQuery(\"select A from Agent A WHERE A.etat NOT IN('RET','DEM') ORDER BY A.personne.name\");\n List<Agent> list = q.getResultList();\n return list;\n }",
"@Override\r\n\tpublic List<Agent> agentWhole() {\n\t\treturn agentMapper.agentWhole();\r\n\t}",
"public List<Agent> findAgentsInterne() {\n Query q = getEntityManager().createQuery(\"select A from Agent A WHERE A.etat NOT IN('RET','DEM') AND A.lastDirection IN(SELECT D.code FROM Direction D WHERE D.internExtern=?1) ORDER BY A.personne.name\");\n q.setParameter(1, InterneExterne.Interne);\n List<Agent> list = q.getResultList();\n return list;\n }",
"private static String getAgents(ArrayList<Agent> auth){\n String agents =\"\";\n try{\n Iterator<Agent> it = auth.iterator();\n int i = 1;\n while(it.hasNext()){\n Agent currAuth = it.next();\n String authorName = currAuth.getName(); //the name should be always there\n if(authorName==null || \"\".equals(authorName)){\n authorName = \"Author\"+i;\n i++;\n }\n if(currAuth.getURL()!=null &&!\"\".equals(currAuth.getURL())){\n agents+=\"<dd><a property=\\\"dc:creator schema:author prov:wasAttributedTo\\\" resource=\\\"\"+currAuth.getURL()+\"\\\" href=\\\"\"+currAuth.getURL()+\"\\\">\"+authorName+\"</a>\";\n }else{\n agents+=\"<dd>\"+authorName;\n }\n if(currAuth.getInstitutionName()!=null && !\"\".equals(currAuth.getInstitutionName()))\n agents+=\", \"+currAuth.getInstitutionName();\n agents+=\"</dd>\";\n } \n }catch(Exception e){\n System.out.println(\"Error while writing authors, their urls or their instititions.\");\n }\n return agents;\n }",
"public List<Agent> listAgentByAgentType(String code);",
"public List<Agent> listAgentNotMappedwithDevice();",
"public List<Object[]> listAgentIdName();",
"public List<Agente> getAgentesAgencia(int idAgencia){\r\n\t\treturn resAgenteDAO.getAgentesAgencia(idAgencia);\r\n\t}",
"void setAgentListDialogWithAgentsList(List<String> agents);",
"List<TransactionType> listAgentTransactionTypes();",
"private static ArrayList<NameId> getAgentroles() {\n\t\tArrayList<NameId> modelList = new ArrayList<NameId>();\n\t\tif (CONSTANTS.agentroleNames().length != AccessControl.AGENT_ROLES.length) {Window.alert(\"AgentPopup getAgentroles()\");}\n\t\tfor (int i = 0; i < AccessControl.AGENT_ROLES.length; i++) {modelList.add(new NameId(CONSTANTS.agentroleNames()[i], String.valueOf(AccessControl.AGENT_ROLES[i])));}\n\t\treturn modelList;\n\t}",
"List<JavaAgent> getJavaAgents();",
"T setJavaAgents(List<JavaAgent> javaAgents);",
"List<AgentReference> getCurrentAgents();",
"private List<VueloEntity> vuelosListDTO2Entity(List<VueloDTO> dtos) {\n List<VueloEntity> list = new ArrayList<>();\n for (VueloDTO dto : dtos) {\n list.add(dto.toEntity());\n }\n return list;\n }",
"@Transactional\r\n\tpublic void newAgente(List listaAgentes)\r\n\t{\r\n\t\tfor (Object entiy : listaAgentes) {\r\n\t\t\tresAgenteDAO.newAgente(entiy);\r\n\t\t}\r\n\t}",
"public ArrayList<String> mostraRegles(){\n ArrayList<String> tauleta = new ArrayList<>();\n String aux = reg.getAssignacions().get(0).getAntecedents().getRangs().get(0).getNom();\n for (int i=1; i<list.getAtribs().size(); i++){\n aux += \"\\t\" + list.getAtribs().get(i).getNom();\n }\n tauleta.add(aux);\n for (int j=0; j<list.getNumCasos(); j++) {\n aux = list.getAtribs().get(0).getCasos().get(j);\n for (int i = 1; i < list.getAtribs().size(); i++) {\n aux += \"\\t\" + list.getAtribs().get(i).getCasos().get(j);\n }\n tauleta.add(aux);\n }\n return tauleta;\n }",
"private void enlistar(ArrayList<Caracter> caracteres){\n for (int i = 0; i < caracteres.size(); i++) {\n insertaOrdenado(new NodoCaracter((Caracter) caracteres.get(i)));\n }\n }",
"public static List<StrategyAgent> createAgents() {\n\t\tdouble ratioAlt = parameters.getRatioAltruistic();\n\t\tint numberAlt = (int)Math.floor(parameters.getNAgents() * ratioAlt);\n\t\t\n\t\tList<StrategyAgent> agents = new ArrayList<StrategyAgent>();\n\t\tfor (int i = 0; i < numberAlt; i++) {\n\t\t\tStrategyAgent agent = new StrategyAgent(lastID, 0, parameters.getEtaN(), parameters.getEtaS(),\n\t\t\t\t\tparameters.getFeatures(), parameters.getNNoLearning(), parameters.getAlphabetSize(),\n\t\t\t\t\tStrategyType.ALTRUISTIC, parameters.getMemorySize());\n\t\t\tagent.architecture.ontology = Utils.getSingletonOntology();\n\t\t\tagents.add(agent);\n\t\t\tlastID++;\n\t\t}\n\t\tfor (int i = numberAlt; i < parameters.getNAgents(); i++){\n\t\t\tStrategyAgent agent = new StrategyAgent(lastID, 0, parameters.getEtaN(), parameters.getEtaS(),\n\t\t\t\t\tparameters.getFeatures(), parameters.getNNoLearning(), parameters.getAlphabetSize(),\n\t\t\t\t\tStrategyType.MUTUALISTIC, parameters.getMemorySize());\n\t\t\tagent.architecture.ontology = Utils.getSingletonOntology();\n\t\t\tagents.add(agent);\n\t\t\tlastID++;\n\t\t}\n\t\tCollections.shuffle(agents);\n\t\treturn agents;\n\t}",
"public ArrayList<String> mostraLlistaAtribs(){\n ArrayList<String> tauleta = new ArrayList<>();\n System.out.print(\"num atribs: \"+list.getNomLlista()+\"\\n\");\n String aux = list.getAtribs().get(0).getNom();\n for (int i=1; i<list.getAtribs().size(); i++){\n aux += \"\\t\" + list.getAtribs().get(i).getNom();\n }\n tauleta.add(aux);\n for (int j=0; j<list.getNumCasos(); j++) {\n aux = list.getAtribs().get(0).getCasos().get(j);\n for (int i = 1; i < list.getAtribs().size(); i++) {\n aux += \"\\t\" + list.getAtribs().get(i).getCasos().get(j);\n }\n tauleta.add(aux);\n }\n return tauleta;\n }",
"@Transactional\r\n\tpublic void updateAgentes(List listaAgentes)\r\n\t{\r\n\t\tfor (Object entiy : listaAgentes) {\r\n\t\t\tresAgenteDAO.updateAgente(entiy);\r\n\t\t}\r\n\t}",
"public List<Mobibus> darMobibus();",
"@Override\r\n\tpublic List<String> agentAllName() {\n\t\treturn agentMapper.agentAllName();\r\n\t}",
"private List<SubServicoTO> parseTO(List<AgvTabSubservico> listaResultado) {\r\n\t\t\r\n\t\tArrayList<SubServicoTO> lista = new ArrayList<SubServicoTO>();\r\n\t\t\r\n\t\tfor (Iterator<AgvTabSubservico> iterator = listaResultado.iterator(); iterator.hasNext();) {\r\n\t\t\tAgvTabSubservico element = (AgvTabSubservico) iterator.next();\r\n\t\t\t\r\n\t\t\tSubServicoTO to = new SubServicoTO();\r\n\t\t\tto.setCdServicoCsi( (element.getCdServicoCsi() == null ? null : element.getCdServicoCsi().toString()));\r\n\t\t\tto.setCdSerCom(element.getCdSerCom());\r\n\t\t\tto.setCdServExe(element.getCdServExe());\r\n\t\t\tto.setCdSubservico(element.getCdSubservico());\r\n\t\t\tto.setDataAtualizacao(element.getDtAtualizacao());\r\n\t\t\tto.setDataPublicacao(element.getDtPublicacao());\r\n\t\t\tto.setDsCondExec(element.getDsCondExec());\r\n\t\t\tto.setDsFormaPgto(element.getDsFormaPgto());\r\n\t\t\tto.setDsLink(element.getDsLink());\r\n\t\t\tto.setDsPrazoAtend(element.getDsPrazoAtend());\r\n\t\t\tto.setDsPreco(element.getDsPreco());\r\n\t\t\tto.setDsSubservico(element.getDsSubservico());\r\n\t\t\tto.setFlagPublicGuia(element.getFlPublicGuia());\r\n\t\t\tto.setFlagPublicTabPrecos(element.getFlPublicTabPrecos());\r\n\r\n\t\t\tlista.add(to);\r\n\t\t}\r\n\t\t\r\n\t\treturn lista;\r\n\t}",
"public abstract List toNameValueList();",
"public java.util.List<com.appscode.api.ci.v1beta1.Agent> getAgentsList() {\n if (agentsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(agents_);\n } else {\n return agentsBuilder_.getMessageList();\n }\n }",
"private List<ComentarioEntity> listDTO2Entity(List<ComentarioDTO> dtos) {\n List<ComentarioEntity> list = new ArrayList<>();\n for (ComentarioDTO dto : dtos) {\n list.add(dto.toEntity());\n }\n return list;\n }",
"private List<EquipoDetailDTO> listEntity2DTO(List<EquipoEntity> listaEntidades)\n {\n List<EquipoDetailDTO> lista = new ArrayList<>();\n for (EquipoEntity e: listaEntidades) \n {\n lista.add(new EquipoDetailDTO(e));\n }\n return lista;\n }",
"public ArrayList<String> mostraResultats(){\n ArrayList<String> tauleta = new ArrayList<>();\n for (int j=0; j<res.getClients().size(); j++) {\n for (int k=0; k<res.getClients().get(j).getAssigs().size(); k++) {\n String aux = \"\";\n for (int i = 0; i < res.getClients().get(j).getAssigs().get(k).getAntecedents().getRangs().size(); i++) {\n aux += res.getClients().get(j).getAssigs().get(k).getAntecedents().getRangs().get(i).getNom() + \"\\t\";\n }\n aux += \" -> \" + res.getClients().get(j).getAssigs().get(k).getConsequent().getNom();\n tauleta.add(aux);\n }\n }\n return tauleta;\n }",
"public List<Agent> listOfAgentByArea(String servicePointCode);",
"public Tirage getTirage(List<ObjetArchiver> listeTirages) {\n\tTirage tirageCorrespondant = new Tirage();\n\t/*\n\t * On calcule l'occurence de chaque numéro et chaque étoile depuis listeTirage\n\t */\n\t// On créer une liste d'occurance pour les étoiles et numéros\n\tList<StatNombre> listeOcNumeros = OccuranceData.getListeStatNumerosEnum();\n\tList<StatNombre> listeOcEtoiles = OccuranceData.getListeStatEtoilesEnum();\n\n\t// On met à jour les occurances de la liste de tirages\n\tfor (ObjetArchiver objetArchiver : listeTirages) {\n\t for (Numero numero : objetArchiver.getNumeros()) {\n\t\tfor (StatNombre statNumero : listeOcNumeros) {\n\t\t if (numero.getNumero() == statNumero.getNombre()) {\n\t\t\tstatNumero.setOccurence(statNumero.getOccurence() + 1);\n\t\t }\n\t\t}\n\t }\n\t for (Etoile etoile : objetArchiver.getEtoiles()) {\n\t\tfor (StatNombre statEtoile : listeOcEtoiles) {\n\t\t if (etoile.getEtoile() == statEtoile.getNombre()) {\n\t\t\tstatEtoile.setOccurence(statEtoile.getOccurence() + 1);\n\t\t }\n\t\t}\n\t }\n\t}\n\n\t// On range dans l'ordre croissant les occurences\n\tCollections.sort(listeOcNumeros, (o1, o2) -> o1.getOccurence().compareTo(o2.getOccurence()));\n\tCollections.sort(listeOcEtoiles, (o1, o2) -> o1.getOccurence().compareTo(o2.getOccurence()));\n\n\t// On prend les 15 dernières occurences de listeOcNumeros\n\tList<Numero> combinaisonNumeros = new ArrayList<>();\n\tList<Etoile> combinaisonEtoiles = new ArrayList<>();\n\tFloat precision = 0F;\n\tFloat precisionNumeros = 0F;\n\tFloat precisionEtoiles = 0F;\n\tInteger listeTiragesSize = listeTirages.size();\n\t// On prend les 5 deniers occurences de listeOcNumros\n\tfor (int i = 1; i <= 15; i++) {\n\t Numero numero = new Numero((listeOcNumeros.get(listeOcNumeros.size() - i)).getNombre());\n\t combinaisonNumeros.add(numero);\n\t // On recupère l'occurence de i\n\t Integer ocCourante = listeOcNumeros.get(listeOcNumeros.size() - i).getOccurence();\n\t /*\n\t * On ajoute le rapport (occurence courante/au nombre de tirage) à la précision\n\t * précédente ce qui revient à faire la moyenne des ratios d'occurence\n\t * (occurence/nb de tirage)\n\t */\n\t precisionNumeros += Float.valueOf((float) ocCourante / (float) listeTiragesSize);\n\t precisionNumeros = precisionNumeros / 2;\n\t}\n\t// On prend les 4 denières occurences de listeOcEtoiles\n\tfor (int i = 1; i <= 4; i++) {\n\t Etoile etoile = new Etoile((listeOcEtoiles.get(listeOcEtoiles.size() - i)).getNombre());\n\t combinaisonEtoiles.add(etoile);\n\t // On recupère l'occurence de i\n\t Integer ocCourante = listeOcEtoiles.get(listeOcEtoiles.size() - i).getOccurence();\n\t /*\n\t * On ajoute le rapport (occurence courante/au nombre de tirage) à la précision\n\t * précédente ce qui revient à faire la moyenne des ratios d'occurence\n\t * (occurence/nb de tirage)\n\t */\n\t precisionEtoiles += Float.valueOf((float) ocCourante / (float) listeTiragesSize);\n\t precisionEtoiles = precisionEtoiles / 2;\n\t}\n\n\t// On recupère la precision du tirage (moyenne des deux precision)\n\tprecision = 100 * (precisionNumeros + precisionEtoiles) / 2;\n\n\ttirageCorrespondant.setPrecision(precision);\n\ttirageCorrespondant.setNumeros(combinaisonNumeros);\n\ttirageCorrespondant.setEtoiles(combinaisonEtoiles);\n\n\treturn tirageCorrespondant;\n }",
"public Collection<String> getAgentsNames();",
"public List getTrabajadores();",
"public abstract List<T> convertToEntities(List<D> dtos);",
"public List<Agente> getAllPAgentes(int efiscal){\r\n\t\tList<Agente> list=getAllAgentes();\r\n\t\tfor (Agente agente : list) {\r\n\t\t\tagente.setListRes_Agente_P(getAgentesPAgentes(efiscal, agente.getId()));\r\n\t\t}\r\n\t\t\r\n\t\treturn list;\r\n\t}",
"public List<Agent> listAgentsByIdentiyNumber(String identityNumber);",
"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}",
"@Override\n\tpublic void achete(List<Achat> listachat) {\n\t\tthis.achats = listachat;\n\n\t}",
"Object getTolist();",
"protected ArrayList<String> convertUeToNamesList(ArrayList<UE> ueList2) {\n\t\tArrayList<String> ueList = new ArrayList<String>();\n\t\tfor (UE ue : ueList2) {\n\t\t\tueList.add(\"UE\" + ue.getName().replaceAll(\"\\\\D+\", \"\").trim());\n\t\t}\n\t\treturn ueList;\n\t}",
"private List<PaseoEcologicoDetailDTO> listEntity2DTO(List<PaseoEcologicoEntity> listaEntrada)\r\n {\r\n List<PaseoEcologicoDetailDTO> l = new ArrayList<>( );\r\n for(PaseoEcologicoEntity entity : listaEntrada)\r\n {\r\n l.add(new PaseoEcologicoDetailDTO(entity));\r\n }\r\n return l; \r\n }",
"public String montar(ArrayList<Estado> e){\n\t\tString data = \"\";\n\t\tIterator<Estado> it = e.iterator();\n\t\twhile(it.hasNext()){\n\t\t\tEstado a = it.next();\n\t\t\tdata += a.getId();\n\t\t}\n\t\treturn data;\n\t}",
"@Override\n\tpublic void acheter(List<Object> la) {\n\t\t\n\t}",
"public java.util.List<com.appscode.api.ci.v1beta1.Agent> getAgentsList() {\n return agents_;\n }",
"public ArrayList<String> AMSGetAllConnectedAgents() {\n ArrayList<String> res = new ArrayList<>();\n AMSAgentDescription list[];\n list = this.AMSQuery(\"\");\n for (AMSAgentDescription list1 : list) {\n res.add(list1.getName().getLocalName());\n }\n return res;\n }",
"public void convertHashtoArray(ArrayList<Manufacturer> manu){\r\n\t\tfor(Manufacturer d: manu){\r\n\t\tManlist.add(t.get(d.code));\r\n\t\t}\r\n\t}",
"private void getAgentTypesFromFile(){\n \t\tagentTypes= agentTypesProvider.GetAgentTypes();\n \t}",
"private void listToString() {\n textList.clear();\n for (int x = 0; x < party.size(); x++) {\n Agent thisAgent = party.getMember(x);\n Statistics thisAgentStats = thisAgent.getStats();\n textList.add(thisAgent.getName());\n textList.add(\"HP:\" + thisAgentStats.getCurrentHP() + \"/\" + thisAgentStats.getMaxHP() + \" MP:\" + thisAgentStats.getCurrentMP() + \"/\" + thisAgentStats.getMaxMP());\n }\n }",
"@Override\r\n\tpublic Collection<TVA> obtenirTousTVA() {\n\t\treturn null;\r\n\t}",
"public void agregarPlanetasAAtaque(java.util.List<Ataque> listaAtaques, java.util.List<Planetas> listaPlanetas){\n Planetas planetas;\n for (int i = 0; i < listaAtaques.size(); i++) {\n Ataque ataque = listaAtaques.get(i);\n for (int j = 0; j < listaPlanetas.size(); j++) {\n planetas = listaPlanetas.get(j);\n if (ataque.getPlanetaDestino().getNombre().equalsIgnoreCase(planetas.getNombre())) {\n ataque.setPlanetaDestino(planetas);\n } else if (ataque.getPlanetaOrigen().getNombre().equalsIgnoreCase(planetas.getNombre())) {\n ataque.setPlanetaOrigen(planetas);\n }\n } \n }\n }",
"List<Reservation> trouverlisteDeReservationAyantUneDateDenvoieDeMail();",
"public List<Vendedor> listarVendedor();",
"@Override\n public String toString() {\n return \"Agent{\" +\n \"name='\" + this.name + '\\'' +\n \", collectionOfCurrentListings=\" + this.collectionOfCurrentListings +\n \", commissionRate=\" + this.commissionRate +\n \", totalEarnings=\" + this.totalEarnings +\n '}';\n }",
"ArrayList<Actor> getActors();",
"List<ParqueaderoEntidad> listar();",
"public List<Fortaleza> listarFortalezas(){\r\n return cVista.listarFortalezas();\r\n }",
"public List<EntradaDeMaterial> buscarEntradasDisponibles(Almacen a);",
"private int findBidders() {\r\n try {\r\n agents = new ArrayList<AMSAgentDescription>();\r\n //definisce i vincoli di ricerca, in questo caso tutti i risultati\r\n SearchConstraints searchConstraints = new SearchConstraints();\r\n searchConstraints.setMaxResults(Long.MAX_VALUE);\r\n //tutti gli agenti dell'AMS vengono messi in un array\r\n AMSAgentDescription [] allAgents = AMSService.search(this, new AMSAgentDescription(), searchConstraints);\r\n //scorre la lista degli agenti trovati al fine di filtrare solo quelli di interesse\r\n for (AMSAgentDescription a: allAgents) {\r\n //aggiunge l'agente partecipante all'ArrayList se e' un partecipante\r\n if(a.getName().getLocalName().contains(\"Participant\")) {\r\n agents.add(a);\r\n } \r\n }\r\n } catch (Exception e) {\r\n System.out.println( \"Problema di ricerca dell'AMS: \" + e );\r\n e.printStackTrace();\r\n }\r\n return agents.size();\r\n }",
"private void listarEntidades() {\r\n\t\tsetListEntidades(new ArrayList<EntidadDTO>());\r\n\t\tgetListEntidades().addAll(entidadController.encontrarTodos());\r\n\t\tif (!getListEntidades().isEmpty()) {\r\n\t\t\tfor (EntidadDTO entidadDTO : getListEntidades()) {\r\n\t\t\t\t// Conversión de decimales.\r\n\t\t\t\tDouble porcentaje = entidadDTO.getPorcentajeValorAsegurable() * 100;\r\n\t\t\t\tdouble por = Math.round(porcentaje * Math.pow(10, 2)) / Math.pow(10, 2);\r\n\t\t\t\tentidadDTO.setPorcentajeValorAsegurable(por);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public AdaptadorEntrevistas(Context context,Entrevista[] listaEntrevistas) {\n super(context, R.layout.layout_lista_entrevistas,listaEntrevistas);\n }",
"public void afficherListe(){\n StringBuilder liste = new StringBuilder(\"\\n\");\n logger.info(\"OUTPUT\",\"\\nLes produits en vente sont:\");\n for (Aliment aliment : this.productList) { liste.append(\"\\t\").append(aliment).append(\"\\n\"); }\n logger.info(\"OUTPUT\", liste+\"\\n\");\n }",
"public List<WorkGroupDTO> getWorkGroupToAgent();",
"public List<Arbeitsgang> getArbeitsgang(Arbeitsgang ag);",
"public List<String> GetAssegnamentiInCorso() {\n String str = \"Guillizzoni-Coca Cola Spa1-DRYSZO,Rossi-Coca Cola Spa2-DRYSZ2\";\n StringaAssegnamenti = str;\n StringaAssegnamenti = \"\";\n \n\tList<String> items = Arrays.asList(str.split(\"\\\\s*,\\\\s*\"));\n return items;\n }",
"public List<Res_Agente_Semana> getListAgenteSemanaAgente(int efiscal, int mes, int idAgente, int idAgencia){\r\n\t\treturn resAgenteDAO.getListAgenteSemanaAgente(efiscal, mes, idAgente, idAgencia);\r\n\t}",
"public ArrayList<AgentObject> getAllAgentDetailsFromDelphiClientWithEmail(String email) {\n try {\n Map<String, ArrayList> accountServiceMap = AccountsService.getInstance().getAccountDetailsObjectFromEmail(httpclient, email);\n if ((accountServiceMap.get(\"code\")) != null) {\n log.info(accountServiceMap.get(\"message\"));\n } else {\n ArrayList<String> meshIDs = accountServiceMap.get(\"mesh_ids\");\n if (meshIDs.size() != 0) {\n ArrayList<AgentObject> agentObjectList = DelphiService.getInstance().getAgentObjectListFromMeshId(httpclient, meshIDs.get(0));\n// AgentObject agentObject = getEachAgentDetailsFromAgentObjectList(agentObjectList);\n\n }\n }\n } catch (IndexOutOfBoundsException iob) {\n iob.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return agentObjectList;\n }",
"List<Pacote> buscarPorTransporte(Transporte transporte);",
"public List<ActDetalleActivo> listarPorSerial(String serial,String amie, int estado,Integer anio,int estadoActivo);",
"public Set<Agent> getAllAgents() {\n return agents.keySet();\n }",
"void outPut(ArrayList<SanPham> list);",
"@Override\r\n\tpublic List<Map<String, Object>> dayAgent(int day) {\n\t\treturn agentMapper.dayAgent(day);\r\n\t}",
"public List<Tripulante> obtenerTripulantes();",
"public org.biocatalogue.x2009.xml.rest.Agent[] getAgentArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List<org.biocatalogue.x2009.xml.rest.Agent> targetList = new java.util.ArrayList<org.biocatalogue.x2009.xml.rest.Agent>();\r\n get_store().find_all_element_users(AGENT$0, targetList);\r\n org.biocatalogue.x2009.xml.rest.Agent[] result = new org.biocatalogue.x2009.xml.rest.Agent[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }",
"public List<String> getListOfAircraftModels() {\n \n List<AircraftModel> list = project.getAircraftModelList().getModelList();\n LinkedList<String> modelListInString = new LinkedList<>();\n for (AircraftModel model : list) {\n modelListInString.add(model.getId());\n }\n\n return modelListInString;\n }",
"@Override\n public void HienThiDanhSach(List<DienTu> listdienTu) {\n\n }",
"private static List<Aeropuerto> llenarAeropuertos(){\n List<Aeropuerto> res = new ArrayList<>();\n res.add(new Aeropuerto(\"la paz\",LocalTime.of(06,0,0),LocalTime.of(23,59,0)));\n res.add(new Aeropuerto(\"cochabamba\",LocalTime.of(06,0,0),LocalTime.of(23,59,0)));\n res.add(new Aeropuerto(\"santa cruz\",LocalTime.of(06,20,0),LocalTime.of(23,59,0)));\n res.add(new Aeropuerto(\"tarija\",LocalTime.of(06,10,0),LocalTime.of(18,0,0)));\n res.add(new Aeropuerto(\"sucre\",LocalTime.of(06,0,0),LocalTime.of(18,0,0)));\n res.add(new Aeropuerto(\"oruro\",LocalTime.of(06,15,0),LocalTime.of(18,0,0)));\n res.add(new Aeropuerto(\"potosi\",LocalTime.of(06,10,0),LocalTime.of(18,0,0)));\n res.add(new Aeropuerto(\"beni\",LocalTime.of(06,0,0),LocalTime.of(18,0,0)));\n res.add(new Aeropuerto(\"pando\",LocalTime.of(06,0,0),LocalTime.of(18,0,0)));\n return res;\n }",
"public static List<ViajeEntidad> getListaViajesEntidad(){\n List<ViajeEntidad> viajes = new ArrayList<>();\n Date date = new Date();\n ViajeEntidadPK viajePK = new ViajeEntidadPK();\n TaxiEntidad taxiByPkPlacaTaxi = new TaxiEntidad();\n ClienteEntidad clienteByPkCorreoCliente = new ClienteEntidad();\n clienteByPkCorreoCliente.setPkCorreoUsuario(\"[email protected]\");\n TaxistaEntidad taxistaByCorreoTaxi = new TaxistaEntidad();\n taxistaByCorreoTaxi.setPkCorreoUsuario(\"[email protected]\");\n OperadorEntidad agendaOperador = new OperadorEntidad();\n agendaOperador.setPkCorreoUsuario(\"[email protected]\");\n\n viajePK.setPkPlacaTaxi(\"CCC11\");\n viajePK.setPkFechaInicio(\"2019-01-01 01:01:01\");\n viajes.add(new ViajeEntidad(viajePK, \"2019-01-01 02:01:01\",\"5000\", 2, \"origen\",\"destino\", \"agenda\", \"agenda2\", taxiByPkPlacaTaxi, clienteByPkCorreoCliente, taxistaByCorreoTaxi, agendaOperador));\n viajePK.setPkPlacaTaxi(\"DDD11\");\n viajes.add(new ViajeEntidad(viajePK, \"2019-01-01 02:01:01\",\"5000\", 2, \"origen\",\"destino\", \"agenda\", \"agenda2\", taxiByPkPlacaTaxi, clienteByPkCorreoCliente, taxistaByCorreoTaxi, agendaOperador));\n viajePK.setPkPlacaTaxi(\"EEE11\");\n viajes.add(new ViajeEntidad(viajePK, \"2019-01-01 02:01:01\",\"5000\", 2, \"origen\",\"destino\", \"agenda\", \"agenda2\", taxiByPkPlacaTaxi, clienteByPkCorreoCliente, taxistaByCorreoTaxi, agendaOperador));\n\n return viajes;\n }",
"public void addAllAgents(Collection agents){\n Iterator itr = agents.iterator();\n while(itr.hasNext()){\n MonitorAgent agent = (MonitorAgent)itr.next();\n addAgent(agent);\n }\n }",
"@Override\r\n\tpublic List<Tramite_presentan_info_impacto> lista() {\n\t\treturn tramite.lista();\r\n\t}",
"public List<Ausleihe> sucheAusgehendeAnfragen(Benutzer benutzer, Status status) {\n List<Ausleihe> list = new ArrayList<Ausleihe>();\n for (Ausleihe b : benutzer.getAusgeliehen()) {\n if (b.getAusleihStatus().equals(status)) {\n list.add(b);\n }\n }\n return list;\n }",
"@Override\r\n\tpublic List<Map<String, Object>> agentOriginal(String agentname) {\n\t\treturn agentMapper.agentOriginal(agentname);\r\n\t}",
"private void listarDadosNaTelaEditora(ArrayList<Editora> lista) {\n DefaultTableModel modelEditoras = (DefaultTableModel) jTable_tabelaEditoras.getModel();\n jTable_tabelaEditoras.setRowSorter(new TableRowSorter(modelEditoras));\n //Limpando a tela\n modelEditoras.setNumRows(0);\n //Correr o ArrayList\n for (int pos = 0; pos < lista.size(); pos++) {\n String[] linha = new String[2];\n Editora aux = lista.get(pos);\n linha[0] = \"\"+aux.getId();\n linha[1] = aux.getNome();\n modelEditoras.addRow(linha);\n }\n }",
"List<Oficios> buscarActivas();",
"public List<Agent> findAgentsInServiceAndNature(String serviceCode, NatureAgent natureAgent) {\n Query q = getEntityManager().createQuery(\"select A from Agent A WHERE A.etat NOT IN('RET','DEM') AND A.lastService=?1 AND A.lastProgressionPoste IN(SELECT P.id FROM ProgressionPoste P WHERE P.natureAgent=?2) ORDER BY A.personne.name\");\n q.setParameter(1, serviceCode);\n q.setParameter(2, natureAgent);\n List<Agent> list = q.getResultList();\n return list;\n }",
"void chargerListeAchats(ObservableList <Element> o) {\n\t\tthis.codeAchat.setCellValueFactory(\n new PropertyValueFactory<Element, String>(\"code\"));\n\t\tthis.nomAchat.setCellValueFactory(\n new PropertyValueFactory<Element, String>(\"nom\"));\n\t\tthis.quantiteAchat.setCellValueFactory(\n new PropertyValueFactory<Element, Double>(\"quantite\"));\n\t\tthis.tableauAchats.setItems(o);\n }",
"List <JAVATYPE> convertList(List<JAVATYPE> oldList, final METATYPE meta);",
"public void GetVehiculos() {\n String A = \"&LOCATION=POR_ENTREGAR\";\n String Pahtxml = \"\";\n \n try {\n \n DefaultListModel L1 = new DefaultListModel();\n Pahtxml = Aso.SendGetPlacas(A);\n Lsvehiculo = Aso.Leerxmlpapa(Pahtxml);\n Lsvehiculo.forEach((veh) -> {\n System.out.println(\"Placa : \" + veh.Placa);\n L1.addElement(veh.Placa);\n });\n \n Lista.setModel(L1);\n \n } catch (Exception ex) {\n Logger.getLogger(Entrega.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }",
"public void success(Response arg0, Response arg1) {\n\t\t\t\tAgentList agents = DecompressGZIP.fromBody(arg0.getBody(), new TypeToken<AgentList>() {}.getType());\n\t\t\t\tagentList = agents.getAgents();\n\t\t\t\t\n\t\t\t\tLog.i(\"\", \"Agent list: \"+agentList.toString());\n\t\t\t}",
"public List<Tripulante> buscarTodosTripulantes();",
"public ArrayList<Cliente> convertirAClases(String ficheroEnTexto){\n Cliente[] clientess;\n ArrayList<Cliente> listcliente;\n clientess= new Gson().fromJson(ficheroEnTexto,Cliente[].class);\n listcliente = new ArrayList<>(Arrays.asList(clientess));\n\n return listcliente;\n\n }",
"public List<VerbPhrase> getVpList(){\n\t\tSet<NounPhrase> entitySet = this.getEntConsiderPass(\"O\");\n\t\tList<VerbPhrase> vpList = new ArrayList<VerbPhrase>();\n\t\t\n\t\tfor(NounPhrase object : entitySet){\t\t\n\t\t\t//vpList.add(new VerbPhrase(this.getActionStr(), object));\n\t\t\tvpList.add(new VerbPhrase(this.action, object));\n\t\t}\t\t\n\t\treturn vpList;\n\t}",
"List<PersonaDTO> PersonaListToPersonaDTOList(List<Persona> personaList);",
"public List<Agent> findAgentsInService(String serviceCode) {\n Query q = getEntityManager().createQuery(\"select A from Agent A WHERE A.etat NOT IN('RET','DEM') AND A.lastService=?1 ORDER BY A.personne.name\");\n q.setParameter(1, serviceCode);\n List<Agent> list = q.getResultList();\n return list;\n }",
"public abstract NSMutableArray<I_WorkFlowItem> tachesObligatoires();",
"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 }",
"private void updateEntityLabelList(Set<String> entity_tag_types, JList gui_list) {\n List<String> selection = Utils.jListGetValuesWrapper(gui_list);\n List<String> items = new ArrayList<String>();\n // Add the transforms\n BundlesG globals = getRTParent().getRootBundles().getGlobals();\n String postproc[] = BundlesDT.listAvailablePostProcessors();\n for (int i=0;i<postproc.length;i++) items.add(postproc[i]);\n /*\n String transforms[] = globals.getTransforms();\n for (int i=0;i<transforms.length;i++) items.add(transforms[i]);\n */\n // Add the tag types\n Iterator<String> it = entity_tag_types.iterator(); \n while (it.hasNext()) items.add(TAG_TYPE_LM + it.next());\n Collections.sort(items, new CaseInsensitiveComparator());\n // Insert the default items\n items.add(0, TIMEFRAME_LM);\n items.add(0, LASTHEARD_LM);\n items.add(0, FIRSTHEARD_LM);\n items.add(0, DEGREE_LM);\n items.add(0, TAGS_LM);\n items.add(0, BUNDLECOUNT_LM);\n items.add(0, ENTITYCOUNT_LM);\n items.add(0, ENTITY_LM);\n // Convert and update the list\n setListAndResetSelection(gui_list, items, selection);\n }"
]
| [
"0.6584916",
"0.6390338",
"0.629684",
"0.6295812",
"0.62739116",
"0.6207889",
"0.62073296",
"0.61286426",
"0.6036004",
"0.5988465",
"0.59661525",
"0.5949867",
"0.5934015",
"0.5891889",
"0.5882686",
"0.5798925",
"0.57689124",
"0.5766785",
"0.5739105",
"0.5718551",
"0.5688352",
"0.5652666",
"0.56485367",
"0.56147105",
"0.5587197",
"0.5494273",
"0.5487757",
"0.54803103",
"0.5455202",
"0.5443156",
"0.542956",
"0.5426356",
"0.54250425",
"0.5415426",
"0.54121774",
"0.54068077",
"0.5398325",
"0.5390284",
"0.53898305",
"0.5388028",
"0.53748995",
"0.53744096",
"0.5366358",
"0.5365264",
"0.53438455",
"0.5312547",
"0.52957976",
"0.52922",
"0.5290317",
"0.52692115",
"0.52642363",
"0.52619946",
"0.52541924",
"0.52326775",
"0.52323616",
"0.5203231",
"0.51985157",
"0.51903343",
"0.51885486",
"0.5187786",
"0.5185851",
"0.51806414",
"0.517522",
"0.51711905",
"0.5169554",
"0.51676446",
"0.51634675",
"0.5149748",
"0.51484686",
"0.51448303",
"0.5142338",
"0.5134272",
"0.5133699",
"0.5132858",
"0.5130366",
"0.5129435",
"0.5126625",
"0.51188815",
"0.5118297",
"0.5118104",
"0.5116461",
"0.5110577",
"0.51047045",
"0.51041764",
"0.5102236",
"0.50977534",
"0.507914",
"0.5072131",
"0.50706124",
"0.5051896",
"0.5051565",
"0.5045225",
"0.5035556",
"0.5035366",
"0.5027443",
"0.50190955",
"0.5017414",
"0.5014515",
"0.50144565",
"0.49980295"
]
| 0.7920588 | 0 |
Distributes the given binding event to interested parties. | private void distribute( final BindingEvent event, final BindingPublisher publisher, final int rank )
{
for ( final Iterator<XRankedBindings> itr = bindingsCache.values().iterator(); itr.hasNext(); )
{
final XRankedBindings bindings = itr.next();
if ( bindings.isActive() )
{
notify( bindings, event, publisher, rank );
}
else
{
itr.remove(); // cleanup up stale entries
}
}
for ( int i = 0; i < watchedBeans.size(); i++ )
{
final XWatchedBeans beans = watchedBeans.get( i );
if ( beans.isActive() )
{
notify( beans, event, publisher, rank );
}
else
{
watchedBeans.remove( i-- ); // cleanup up stale entries
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void notify( final BindingDistributor distributor, final BindingEvent event,\n final BindingPublisher publisher, final int rank )\n {\n switch ( event )\n {\n case ADD:\n distributor.add( publisher, rank );\n break;\n case REMOVE:\n distributor.remove( publisher );\n break;\n case CLEAR:\n distributor.clear();\n break;\n }\n }",
"EventBinding createEventBinding();",
"void bind(EventService service);",
"public void newBinding(BGMEvent e);",
"public void newValueBinding(BGMEvent e);",
"void bind(Object element);",
"void distributeNoteEvent(final AutomataNoteEvent event) {\n\t\tfinal Iterator<AutomataNoteListener> it = noteListeners.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tfinal AutomataNoteListener listener = it.next();\n\t\t\tlistener.automataNoteChange(event);\n\t\t}\n\t}",
"@Override\n public void binding(String exchangeName, String queueName, String bindingKey, ByteBuffer buf) {\n synchronized (this) {\n try {\n Exchange exchange = _virtualHost.getExchangeRegistry().getExchange(exchangeName);\n if (exchange == null) {\n _logger.error(\"Unknown exchange: \" + exchangeName + \", cannot bind queue : \" + queueName);\n return;\n }\n\n AMQQueue queue = _virtualHost.getQueueRegistry().getQueue(new AMQShortString(queueName));\n if (queue == null) {\n _logger.error(\"Unknown queue: \" + queueName + \", cannot be bound to exchange: \" + exchangeName);\n } else {\n FieldTable argumentsFT = null;\n if (buf != null) {\n argumentsFT = new FieldTable(org.wso2.org.apache.mina.common.ByteBuffer.wrap(buf), buf.limit());\n }\n\n BindingFactory bf = _virtualHost.getBindingFactory();\n\n Map<String, Object> argumentMap = FieldTable.convertToMap(argumentsFT);\n\n boolean isBindingAlreadyPresent = true;\n if (bf.getBinding(bindingKey, queue, exchange, argumentMap) == null) {\n //for direct exchange do an additional check to see if a binding is\n //already added to default exchange. We do not need duplicates as default\n //exchange is an direct exchange\n if (exchange.getName().equals(AMQPUtils.DIRECT_EXCHANGE_NAME)) {\n Exchange testExchange = _virtualHost.getExchangeRegistry().getExchange(\n AMQPUtils.DEFAULT_EXCHANGE_NAME);\n if (bf.getBinding(bindingKey, queue, testExchange,\n argumentMap) == null) {\n isBindingAlreadyPresent = false;\n }\n } else {\n isBindingAlreadyPresent = false;\n }\n }\n if(!isBindingAlreadyPresent) {\n if(_logger.isDebugEnabled()) {\n _logger.debug(\"Binding Sync - Added Binding: (Exchange: \"\n + exchange.getNameShortString() + \", Queue: \" + queueName\n + \", Routing Key: \" + bindingKey + \", Arguments: \" + argumentsFT + \")\");\n }\n bf.restoreBinding(bindingKey, queue, exchange, argumentMap);\n }\n }\n } catch (AMQException e) {\n throw new RuntimeException(e);\n }\n }\n }",
"public interface BAPushDataEventHandler {\n\tpublic void publishedData(BAEvent event);\n}",
"protected abstract void bind();",
"protected abstract void bind();",
"void notifyAdapters(Object event);",
"@Override\r\n\tprotected void bindEvents() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void bindEvents() {\n\t\t\r\n\t}",
"@Override\n\tpublic void bind() {\n\t\t\n\t}",
"public interface Binding extends AutoCloseable, Consumer<Bindings> {\n\n\n}",
"@Bean\n public Binding dlxBinding(){\n return BindingBuilder.bind(dlxQueue()).to(dlxExchange()).with(dlxRoutingKey);\n }",
"public void sendEvent(Event event);",
"void distributeStateEvent(final AutomataStateEvent event) {\n\t\tfinal Iterator<AutomataStateListener> it = stateListeners.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tfinal AutomataStateListener listener = it.next();\n\t\t\tlistener.automataStateChange(event);\n\t\t}\n\t}",
"private void bindObject() {\n }",
"private void apply(ShipArrived event) {\n }",
"protected void onBindingSet(@NonNull AutoRef<Context> context, @NonNull AutoRef<TBinding> binding) {\n }",
"Binding<T> shared();",
"public interface YCoolBindings {\n /**\n * The porpouse of this method is to store any bind, because depending on\n * the circunstances it can be caught by garbadge collector.\n * @param bind_name Binding name\n * @param bind Bind itself\n */\n public void yAddBind(String bind_name, ObservableValue<? extends Number> bind);\n\n /**\n * @param pivo The porcentage point of the object, for example, 0 is the\n * leftmost point of the object, 0.5 is the middle and 1 is the rightmost\n * point (it is not limited from 0 to 1, you can go further).\n * @return A DoubleBinding that is linked to the X location of the object, in\n * other words, whenever the X location of the object changes, the\n * DoubleBinding will change automaticaly with it. (this bind is linked to\n * the X location but the opposite is not true).\n */\n public DoubleBinding yTranslateXbind(double pivo);\n\n /**\n * @param pivo The porcentage point of the object, for example, 0 is the\n * upper point of the object, 0.5 is the middle and 1 is the bottom point (it\n * is not limited from 0 to 1, you can go further).\n * @return A DoubleBinding that is linked to the Y location of the object, in\n * other words, whenever the Y location of the object changes, the\n * DoubleBinding will change automaticaly with it. (this bind is linked to\n * the Y location but the opposite is not true).\n */\n public DoubleBinding yTranslateYbind(double pivo);\n\n /**\n * Links the X position of the object with an observable value, so whenever\n * it changes, the object's X position will change too.\n *\n * @param bind_name The name for this link.\n * @param X The observable value to link the object's X position.\n * @param pivo The porcentage point of the object, for example, 0 is the\n * leftmost point of the object, 0.5 is the middle and 1 is the rightmost\n * point (it is not limited from 0 to 1, you can go further).\n */\n public void yBindTranslateX(String bind_name, ObservableValue<? extends Number> X, double pivo);\n\n /**\n * Links the Y position of the object with an observable value, so whenever\n * it changes, the object's Y position will change too.\n *\n * @param bind_name The name for this link.\n * @param Y The observable value to link the object's Y position.\n * @param pivo The porcentage point of the object, for example, 0 is the\n * upper point of the object, 0.5 is the middle and 1 is the bottom point (it\n * is not limited from 0 to 1, you can go further).\n */\n public void yBindTranslateY(String bind_name, ObservableValue<? extends Number> Y, double pivo);\n\n /**\n * @param stroke_included If you want the stroke of the object to be part of\n * the new width, mark this as true.\n * @return A DoubleBinding that is linked to the width of the object, in\n * other words, whenever the width of the object changes, the DoubleBinding\n * will change automaticaly with it. (this bind is linked to the width but\n * the opposite is not true).\n */\n public DoubleBinding yWidthBind(boolean stroke_included);\n\n /**\n * @param stroke_included If you want the stroke of the object to be part of\n * the new height, mark this as true.\n * @return A DoubleBinding that is linked to the height of the object, in\n * other words, whenever the height of the object changes, the DoubleBinding\n * will change automaticaly with it. (this bind is linked to the height but\n * the opposite is not true).\n */\n public DoubleBinding yHeightBind(boolean stroke_included);\n\n /**\n * Links the width of the object with an observable value, so whenever it\n * changes, the object's width will change too.\n *\n * @param bind_name The name for this link.\n * @param width The observable value to link the object's width.\n * @param stroke_included If you want the stroke of the object to be part of\n * the new width, mark this as true.\n */\n public void yBindWidth(String bind_name, ObservableValue<? extends Number> width, boolean stroke_included);\n\n /**\n * Links the height of the object with an observable value, so whenever it\n * changes, the object's height will change too.\n *\n * @param bind_name The name for this link.\n * @param height The observable value to link the object's height.\n * @param stroke_included If you want the stroke of the object to be part of\n * the new height, mark this as true.\n */\n public void yBindHeight(String bind_name, ObservableValue<? extends Number> height, boolean stroke_included);\n\n /**\n * Breaks any bind created previously based on the name of the bind.\n * @param bind_name Name of the bind to be broken.\n */\n public void yUnbind(String bind_name);\n}",
"void publish(Event event) throws PublishingException;",
"EventChannel apply();",
"public void transmitEvents(){\n Log.info(\"Transmitting Events\", EventShare.class);\n for(Entry<Class, List<EventTrigger>> eventGroup: HandlerRegistry.getHandlers().entrySet()){\n String annotation = eventGroup.getKey().getName();\n for(EventTrigger trigger : eventGroup.getValue()){\n if(trigger.getServer()!=this) { // do not send own events...\n if(trigger.getMethod()!=null){ // its a local event\n if(trigger.getMethod().isAnnotationPresent(ES.class)){\n try {\n eventBusServer.write(new ESSharedEvent(annotation, trigger.getTrigger()));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }else {\n try {\n eventBusServer.write(new ESSharedEvent(annotation, trigger.getTrigger()));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n }\n }\n }",
"private void handleGroupSendableStubEvent(GroupSendableStubEvent stub) throws AppiaEventException {\n \t\tstub.loadMessage();\n \n \t\t//Get the contained event\n \t\tGroupSendableEvent realEvent = stub.getEncapsulatedEvent();\n \t\tString groupId = stub.getGroupId();\n \n \t\t//Create a proxy for GroupSendableEvent\n \t\tGroupSendableProxyEvent proxyEvent = new GroupSendableProxyEvent(groupId, realEvent);\n \n \t\t//And we send to the other servers\n \t\tsendToOtherServers(proxyEvent);\n \t\tsendToMyself(proxyEvent);\n \t}",
"void onBusEvent(Event event);",
"public void bindHandlers() {\n\n _eventBus.addHandler(NewIncidentEvent.TYPE, new NewIncidentEventHandler() {\n\n @Override\n public void onNewIncidentEventHandler(NewIncidentEvent event) {\n\n newIncident(event.getIncident());\n //addTodo(event.getTodoTitle());\n }\n });\n\n _eventBus.addHandler(AddressSearchEvent.TYPE, new AddressSearchEventHandler() {\n\n @Override\n public void onAddressSearchEventHandler(AddressSearchEvent event) {\n requestAddress(event.getTypedAddress());\n //addTodo(event.getTodoTitle());\n }\n });\n\n _eventBus.addHandler(RepairCallEvent.TYPE, new RepairCallEventHandler() {\n\n @Override\n public void onRepairCallEventHandler(RepairCallEvent event) {\n\n updateIncident(event.getIncident());\n //addTodo(event.getTodoTitle());\n }\n });\n }",
"void distributeTransitionEvent(final AutomataTransitionEvent event) {\n\t\tfinal Iterator<AutomataTransitionListener> it = transitionListeners.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tfinal AutomataTransitionListener listener = it.next();\n\t\t\tlistener.automataTransitionChange(event);\n\t\t}\n\t}",
"@Override\r\n\t\t\tpublic void broadcast(ID source, ID target, Boolean hit) {\n\t\t\t\t\r\n\t\t\t}",
"private void changeBinding(InstanceBinding binding) {\r\n\t\t\r\n\t}",
"public void processEvent(Event event) {\n\t\t\n\t}",
"public abstract void processEvent(Object event);",
"@Override\n public void publish(Object event) {\n System.out.println(\"Sending Event\");\n\n List<Hub> hubList = hubFacade.findAll();\n Iterator<Hub> it = hubList.iterator();\n while (it.hasNext()) {\n Hub hub = it.next();\n restEventPublisher.publish(hub, event);\n\n\n //Thread.currentThread().sleep(1000);\n }\n System.out.println(\"Sending Event After\");\n }",
"@Override\n public void accept(final Bindings arg0, final Throwable arg1) {\n \n }",
"public void bind(String event, PusherCallback callback) {\n\t\tif (!mLocalCallbacks.containsKey(event)) {\n\t\t\tmLocalCallbacks.put(event, new ArrayList<PusherCallback>());\n\t\t}\n\n\t\t/* add the callback to the event's callback list */\n\t\tmLocalCallbacks.get(event).add(callback);\n\n\t\t//Log.d(LOG_TAG, \"bound to event \" + event + \" on channel \" + mName);\n\t}",
"public void arrive(Port port) {\n ShipArrived event = new ShipArrived(\"id\", port, new Date());\n // apply change du to the event\n // it should require only current state and\n apply(event);\n list.add(event);\n // events will be published to the rest of the system\n // from there.. This is where further side effect will\n // occure\n }",
"public void addBinding(WbBinding binding)\n {\n _bindingList.add(binding);\n }",
"public void process(WatchedEvent event) {\n\t\t\n\t}",
"@Override\n public void postEvent(Event event)\n {\n normalQueue.offer(event);\n }",
"private void registerBindings(){\t\t\n\t}",
"private void registerBindings(){\t\t\n\t}",
"public void bind() {\n }",
"@Override\n\tpublic void processEvent(Event e) {\n\n\t}",
"void distributeSelectionEvent(final ConfigurationSelectionEvent event) {\n\t\tfinal Iterator<ConfigurationSelectionListener> it = selectionListeners.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tfinal ConfigurationSelectionListener listener = it.next();\n\t\t\tlistener.configurationSelectionChange(event);\n\t\t}\n\t}",
"public EventMapper onTransfer(final BiConsumer<Duty, Serializable> biconsumer) {\n\t\tinitConsumerDelegate();\n\t\t((ConsumerDelegate)getDepPlaceholder().getDelegate()).setBiConsumerTransfer(biconsumer);\n\t\treturn this;\n\t}",
"<T extends Binding> PhysicalWireDefinition generateBoundServiceCallback(LogicalBinding<T> binding) throws Fabric3Exception;",
"public void clusterBindingAdded(AndesBinding binding) throws AndesException {\n try {\n\n String boundQueueName = binding.getBoundQueue().getName();\n if(!(boundQueueName.contains(AndesUtils.MQTT_TOPIC_STORAGE_QUEUE_PREFIX)\n || DLCQueueUtils.isDeadLetterQueue(boundQueueName))) {\n binding(binding.getMessageRouterName(),\n binding.getBoundQueue().getName(),\n binding.getBindingKey(),\n null);\n }\n } catch (Exception e) {\n log.error(\"could not add cluster binding + \" + binding.toString(), e);\n throw new AndesException(\"could not add cluster binding : \" + binding.toString(), e);\n }\n }",
"@Override\r\n\tpublic void addEvent(NetworkEvent e) {\n\t\tif (e.getType() == NetworkEvent.SEND && buffer_sz > e.getPDU().size) {\r\n\t\t\tTCPBony kid = (TCPBony) e.getTarget();\r\n\t\t\tTCPMessage m = (TCPMessage) e.getPDU();\r\n\t\t\tFlowId fid = new FlowId(m.src, m.dest, m.getSport(), m.getDport());\r\n\t\t\tif (kid.isElephant()) {\r\n\t\t\t\tdard.addElephantFlow(fid);\r\n\t\t\t} else\r\n\t\t\t\tdard.addMiceFlow(fid);\r\n\t\t\t\r\n\t\t\tint i = connections.indexOf(kid);\r\n\t\t\te.setTarget(this);\r\n\t\t\tsend_buffer.get(i).add(e);\r\n\t\t\tbuffer_sz -= e.getPDU().size;\r\n\t\t} else if (e.getType() == NetworkEvent.RECEIVE) {\r\n\t\t\treceived_buffer.add(e);\r\n\t\t} else {\r\n\t\t\t// System.out.println(this.getName() + \" Drop packet due to buffer overflow: \" + buffer_sz + \r\n\t\t\t//\t\" from \" + ((TCPMessage) e.getPDU()).getSport() + \r\n\t\t\t//\t\" Seq: \" + ((TCPMessage) e.getPDU()).getSeq());\r\n\t\t}\r\n\t}",
"protected final void send(Event event) {\n logger.debug(\"new event: {}\", event);\n Stats.received.incrementAndGet();\n if(! outQueue.offer(event)) {\n Stats.dropped.incrementAndGet();\n logger.error(\"send failed for {}, destination blocked\", event);\n }\n }",
"@Override\n public void broadcast(FacesEvent event)\n throws AbortProcessingException\n {\n\n // Deliver to the default ChartDrillDownEvent\n if (event instanceof ChartDrillDownEvent)\n {\n broadcastToMethodBinding(event, getChartDrillDownListener());\n }\n super.broadcast(event);\n }",
"T bindTo(Object instance);",
"@Override\n\tpublic void bind(ChannelHandlerContext ctx, SocketAddress localAddress, ChannelPromise promise) throws Exception {\n\t\tLog.i(\"MySocketHandler\", \"bind\");\n\t\tsuper.bind(ctx, localAddress, promise);\n\t}",
"public void bindSendService(){\r\n\t\tif (sendService!=null){\r\n\t\t\tIntent intent = new Intent(context, SendService.class);\r\n\t context.bindService(intent, sendServiceConnection, Context.BIND_AUTO_CREATE);\r\n\t \r\n\t\t}\r\n\t}",
"@Override\n public void accept(T event) {\n synchronized(this) {\n collected.add(event);\n }\n }",
"private void sendStubEvent(StubEvent stubEvent, InetSocketAddress destination) throws AppiaEventException {\n \t\tstubEvent.storeMessage();\n \t\tstubEvent.setDir(Direction.DOWN);\n \t\tstubEvent.setChannel(listenChannel);\n \t\tstubEvent.setSourceSession(this);\n \t\tstubEvent.dest = destination;\n \t\tstubEvent.init();\n \t\tstubEvent.go();\n \t}",
"private void bind()\n {\n /* Cancel unbind */\n cancelUnbind();\n\n /* Bind to the Engagement service if not already done or being done */\n if (mEngagementService == null && !mBindingService)\n {\n mBindingService = true;\n mContext.bindService(EngagementAgentUtils.getServiceIntent(mContext), mServiceConnection,\n BIND_AUTO_CREATE);\n }\n }",
"@Override\n\tpublic void transferEvent(AbstractEvent event) throws IOException, InterruptedException {\n\t}",
"public interface EventBusProducer {\n void post(final Answer answer);\n}",
"public void installBindings(TableRep bindings) throws RemoteException, Error;",
"public void bind() {\n\t\ttry {\n\t\t\tthis.out = new DataOutputStream(this.s.getOutputStream());\n\t\t\tthis.in = new DataInputStream(new DataInputStream(this.s.getInputStream()));\n\t\t} catch (IOException e) {\n\t\t\tthis.finishedOK = false;\n\t\t}\n\t}",
"public interface IEvent {\r\n\r\n\t/**\r\n\t * Returns the source of the event. As events are emitted\r\n\t * by instances that are bound to an instance, this method\r\n\t * will point to the corresponding source emitter that \r\n\t * received the event.\r\n\t * \r\n\t * @return The source of the event.\r\n\t */\r\n\tpublic IEventCollector getSource();\r\n\t\r\n\t/**\r\n\t * The type of the event. This will be the string that is\r\n\t * negotiated in the contract. \r\n\t * \r\n\t * @return The type of the event that has been sent. This\r\n\t * \twill be the parameter as defined in the contract.\r\n\t */\r\n\tpublic String getType();\r\n\t\r\n\t/**\r\n\t * The data object that has been sent as event object. \r\n\t * \r\n\t * @return The data object of this event.\r\n\t */\r\n\tpublic Object getData();\r\n\r\n}",
"private void handleGroupSendableProxyEvent(GroupSendableProxyEvent groupProxyEvent) throws AppiaEventException {\n \t\tgroupProxyEvent.loadMessage();\n \n \t\t//Get the arguments\n \t\tString groupId = groupProxyEvent.getGroupId();\n \t\tGroupSendableEvent sendableEvent = groupProxyEvent.getSendableEvent();\n \n \t\t//Create the stub event to send to the users\n \t\tGroupSendableStubEvent stubEvent = new GroupSendableStubEvent(groupId, sendableEvent);\n \n \t\t//Send to my clients\n \t\tVsGroup group = VsClientManagement.getVsGroup(groupProxyEvent.getGroupId());\n \t\tsendStubEvent(stubEvent, group);\n \t}",
"public void propagateSignal() {\r\n\t\tif (enabled) {\r\n\t\t\tdouble input = in.getOutput();\r\n\t\t\tdouble output = input * weight;\r\n\t\t\tout.addInput(output);\r\n\t\t\tactivated = true;\r\n\t\t}\r\n\t}",
"private AttributeMapBindingEvent getContextBindingEvent(HttpSessionBindingEvent event) {\r\n\t\treturn new AttributeMapBindingEvent(new LocalAttributeMap(sessionMap), event.getName(), listener);\r\n\t}",
"public interface BindButtonSubscriber {\n\n /**\n * Called when the bind is activated\n *\n * @param delta The time passing this frame\n * @param target The current camera target\n * @return True if the bind event was consumed\n */\n boolean onPress(float delta, EntityRef target);\n\n /**\n * Called when the bind repeats\n *\n * @param delta The time this frame (not per repeat)\n * @param target The current camera target\n * @return True if the bind event was consumed\n */\n boolean onRepeat(float delta, EntityRef target);\n\n /**\n * Called when the bind is deactivated\n *\n * @param delta The time passing this frame\n * @param target The current camera target\n * @return True if the bind event was consumed\n */\n boolean onRelease(float delta, EntityRef target);\n}",
"@EventHandler\n public void on(MoneyDepositedEvent event) {\n System.out.println(\"Received Event -> MoneyDepositedEvent\");\n }",
"public void doSomeChanges() {\n\n eventBus.publish(\"our.event.coming.from.model\", \"some data passed\");\n }",
"public void yAddBind(String bind_name, ObservableValue<? extends Number> bind);",
"@EventHandler\n public void handleAll(DomainEvent event) {\n }",
"@Override\n public void publish(Event<? extends Enum, ?> event) {\n byte[] body = null;\n if (null == event) {\n log.error(\"Captured event is null...\");\n return;\n }\n if (event instanceof DeviceEvent) {\n body = bytesOf(MQUtil.json((DeviceEvent) event));\n } else if (event instanceof TopologyEvent) {\n body = bytesOf(MQUtil.json((TopologyEvent) event));\n } else if (event instanceof LinkEvent) {\n body = bytesOf(MQUtil.json((LinkEvent) event));\n } else {\n log.error(\"Invalid event: '{}'\", event);\n return;\n }\n processAndPublishMessage(body);\n }",
"@Override\r\n public void processEvent(IAEvent e) {\n\r\n }",
"public void sendInputEvent(InputEvent event, int policyFlags) {\n if (event == null) {\n throw new IllegalArgumentException(\"event must not be null\");\n }\n if (mHost == null) {\n throw new IllegalStateException(\"Cannot send input event because the input filter \" +\n \"is not installed.\");\n }\n if (mOutboundInputEventConsistencyVerifier != null) {\n mOutboundInputEventConsistencyVerifier.onInputEvent(event, 0);\n }\n try {\n mHost.sendInputEvent(event, policyFlags);\n } catch (RemoteException re) {\n /* ignore */\n }\n }",
"EventChannel apply(Context context);",
"@Subscribe\n public void onEvent(Object event) {\n }",
"@Subscribe\n public void onEvent(Object event) {\n }",
"public abstract Pipe deliver( Pipe sink );",
"public interface FilterEventConsumer {\n void onMessage(EventeumMessage<ContractEventFilter> message);\n}",
"public void bind(ItemHandler handler) {\n if (handler.getOption().equals(Option.ALL)) {\n for (Map.Entry<Option, List<ItemHandler>> entry : handlerLists.entrySet()) {\n entry.getValue().add(handler);\n }\n } else {\n List<ItemHandler> list = handlerLists.get(handler.getOption());\n list.add(handler);\n }\n }",
"public void callSendEvent(PacketEvent event) {\n\t\tfor(PacketListener l : PACKET_OUT_LISTENER) \n\t\t\tl.onEvent(event);\n\t}",
"void derived(TwoWayEvent.Derived<DM, UMD, DMD> evt);",
"private void removeBinding(String exchangeName, String queueName, String bindingKey, ByteBuffer buf)\n throws AMQSecurityException, AMQInternalException {\n\n synchronized (this) {\n Exchange exchange = _virtualHost.getExchangeRegistry().getExchange(exchangeName);\n if (exchange == null) {\n return;\n }\n\n AMQQueue queue = _virtualHost.getQueueRegistry().getQueue(new AMQShortString(queueName));\n if (queue != null) {\n FieldTable argumentsFT = null;\n if (buf != null) {\n argumentsFT = new FieldTable(org.wso2.org.apache.mina.common.ByteBuffer.wrap(buf), buf.limit());\n }\n\n BindingFactory bf = _virtualHost.getBindingFactory();\n\n Map<String, Object> argumentMap = FieldTable.convertToMap(argumentsFT);\n\n if (bf.getBinding(bindingKey, queue, exchange, argumentMap) != null) {\n\n if(_logger.isDebugEnabled()) {\n _logger.debug(\"Binding Sync - Removed binding: (Exchange: \" + exchange.getNameShortString()\n + \", Queue: \" + queueName\n + \", Routing Key: \" + bindingKey + \", Arguments: \" + argumentsFT + \")\");\n }\n\n bf.removeBinding(bindingKey, queue, exchange, argumentMap, false);\n }\n }\n }\n }",
"public static String bind(String message, Object binding) {\n \t\treturn PlatformMessages.bind(message, new Object[] {binding});\n \t}",
"@Test\n void testRegisterBinding() {\n final var queue = new Queue(\"test\");\n final var exchange = new TopicExchange(\"testExchange\");\n final var routingKey = \"routing-key\";\n\n final var binding = BindingBuilder.bind(queue).to(exchange).with(routingKey);\n\n // When we call registry method\n contextUtils.registerBinding(\"testBinding\", binding);\n\n // Then we expect the queue to be available in the context\n final var actual = context.getBean(\"testBinding\", Binding.class);\n assertNotNull(actual);\n assertEquals(binding.getExchange(), exchange.getName());\n assertEquals(binding.getRoutingKey(), routingKey);\n }",
"@Override\n public void notify(Object event){\n }",
"@Override\n\tpublic <E extends Event> void trigger(final E event) {\n//\t\tgetLogger().trace(new FormatterLoggable(\"trigger {0}\", new Object[] { event }));\n\t\tfinal EventExecutorFactory factory = getExecutorFactory();\n\t\tExecutor executor = factory.getLookupExecutor(event);\n\t\tif (executor == null)\n\t\t\texecutor = new DirectExecutor();\n\t\tfinal Executor lookupExecutor = executor;\n\t\tlookupExecutor.execute(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tint handlerCount = 0;\n\t\t\t\ttry {\n\t\t\t\t\teventLookupStarted();\n\t\t\t\t\tList<EventHandler<? extends Event>> handlers = lookupHandlers(event);\n\t\t\t\t\tif (handlers == null) {\n\t//\t\t\t\t\tgetLogger().trace(new SimpleLoggable(\"no handlers\"));\n//\t\t\t\t\t\trecordStat(event.getEventName(), 0);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tList<EventHandler<? extends Event>> handlersCopy = null;\n\t\t\t\t\tsynchronized(handlers) {\n\t\t\t\t\t\thandlersCopy = new ArrayList<EventHandler<? extends Event>>(handlers);\n\t\t\t\t\t}\n\t\t\t\t\tExecutor processExecutor = factory.getProcessExecutor(event);\n\t\t\t\t\tif (processExecutor == null)\n\t\t\t\t\t\tprocessExecutor = lookupExecutor;\n\t\t\t\t\tif (processExecutor == lookupExecutor && handlersCopy.size() == 1) {\n\t\t\t\t\t\thandlerCount++;\n\t\t\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\t\tfinal EventHandler<Event> handler = (EventHandler<Event>) handlersCopy.get(0);\n\t\t\t\t\t\tgetLogger().trace(new SimpleLoggable(\"calling event \" + event + \" handler \" + handler));\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\teventProcessingStarted();\n\t\t\t\t\t\t\thandler.on(event);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch(Throwable ex) {\n\t\t\t\t\t\t\tgetLogger().warn(new SimpleLoggable(ex, \"exception in handler: \" + ex));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinally {\n\t\t\t\t\t\t\teventProcessingCompleted();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t@SuppressWarnings(\"rawtypes\")\n\t\t\t\t\t\tIterator iterator = handlersCopy.listIterator();\n\t\t\t\t\t\twhile (iterator.hasNext()) {\n\t\t\t\t\t\t\thandlerCount++;\n\t\t\t\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\t\t\tfinal EventHandler<Event> handler = (EventHandler<Event>) iterator.next();\n\t\t\t\t\t\t\tgetLogger().trace(new SimpleLoggable(\"calling event \" + event + \" handler \" + handler));\n\t\t\t\t\t\t\tprocessExecutor.execute(new Runnable() {\n\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\teventProcessingStarted();\n\t\t\t\t\t\t\t\t\t\thandler.on(event);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tcatch(Throwable ex) {\n\t\t\t\t\t\t\t\t\t\tgetLogger().warn(new SimpleLoggable(ex, \"exception in handler: \" + ex));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfinally {\n\t\t\t\t\t\t\t\t\t\teventProcessingCompleted();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfinally {\n\t\t\t\t\trecordStat(event.getEventName(), handlerCount);\n\t\t\t\t\teventLookupCompleted();\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\t}",
"public interface EventSink {\n\n /**\n * Generate event, that a new peer has been discovered for some torrent.\n *\n * @since 1.5\n */\n void firePeerDiscovered(TorrentId torrentId, Peer peer);\n\n /**\n * Generate event, that a new connection with some peer has been established.\n *\n * @since 1.9\n */\n void firePeerConnected(ConnectionKey connectionKey);\n\n /**\n * Generate event, that a connection with some peer has been terminated.\n *\n * @since 1.9\n */\n void firePeerDisconnected(ConnectionKey connectionKey);\n\n /**\n * Generate event, that local information about some peer's data has been updated.\n *\n * @since 1.9\n */\n void firePeerBitfieldUpdated(TorrentId torrentId, ConnectionKey connectionKey, Bitfield bitfield);\n\n /**\n * Generate event, that processing of some torrent has begun.\n *\n * @since 1.5\n */\n void fireTorrentStarted(TorrentId torrentId);\n\n /**\n * Generate event, that torrent's metadata has been fetched.\n *\n * @since 1.9\n */\n void fireMetadataAvailable(TorrentId torrentId, Torrent torrent);\n\n /**\n * Generate event, that processing of some torrent has finished.\n *\n * @since 1.5\n */\n void fireTorrentStopped(TorrentId torrentId);\n\n /**\n * Generate event, that the downloading and verification\n * of one of torrent's pieces has been finished.\n *\n * @since 1.8\n */\n void firePieceVerified(TorrentId torrentId, int pieceIndex);\n}",
"void distributeKeys() {\n // System.out.println(\"Mapper.distributeKeys() :: 1\");\n while (!toDistribute.empty()) {\n Entry e = toDistribute.pop();\n sendEntry(e);\n printAct(\">sent Entry \" + e.hash);\n\n }//while\n }",
"@Override\n\tpublic void publishMessage(QPEvent event) {\n\t\tfor(final String endpoint : webhookRegistry.all()) {\n\t\t\tlog.debug(\"POSTing event to {}\", endpoint);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tCloseableHttpAsyncClient httpClient = HttpAsyncClients.createDefault();\n\t\t\t\thttpClient.start();\n\t\t\t\t\n\t\t\t\tHttpPost post = new HttpPost(endpoint);\n\t\t\t\tpost.setHeader(\"Content-Type\", \"application/json\");\n\t\t\t\tpost.setEntity(new StringEntity(objectMapper.writeValueAsString(event), \"UTF-8\"));\n\t\t\t\t\n\t\t\t\thttpClient.execute(post, new FutureCallback<HttpResponse>() {\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void failed(Exception ex) {\n\t\t\t\t\t\tlog.warn(\"Request for endpoint {} failed, removing endpoint\", endpoint);\n\t\t\t\t\t\twebhookRegistry.remove(endpoint);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void completed(HttpResponse result) {\n\t\t\t\t\t\tlog.debug(\"Request for endpoint {} completed\", endpoint);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void cancelled() {\n\t\t\t\t\t\tlog.debug(\"Request for endpoint {} cancelled\", endpoint);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} catch(Exception x) {\n\t\t\t\tlog.error(\"Error handling event.\", x);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\tbindingSource.setItemId(this, true, bindingSource.getItemId());\n\t\t\t\t\n\t\t\t\t// fire the app event if it's implemented\n\t\t\t\tif (listenerDownButton != null)\n\t\t\t\t\tlistenerDownButton.downButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, 0));\n\t\t\t\t\n\t\t\t}",
"@Override\n public void publish(String senderAddress, String subject, PublishScope scope, Object args) {\n if (!noDbTxn()){\n String errMsg = \"NO EVENT PUBLISH CAN BE WRAPPED WITHIN DB TRANSACTION!\";\n s_logger.error(errMsg, new CloudRuntimeException(errMsg));\n }\n if (_gate.enter(true)) {\n if (s_logger.isTraceEnabled()) {\n s_logger.trace(\"Enter gate in message bus publish\");\n }\n try {\n List<SubscriptionNode> chainFromTop = new ArrayList<SubscriptionNode>();\n SubscriptionNode current = locate(subject, chainFromTop, false);\n\n if (current != null)\n current.notifySubscribers(senderAddress, subject, args);\n\n Collections.reverse(chainFromTop);\n for (SubscriptionNode node : chainFromTop)\n node.notifySubscribers(senderAddress, subject, args);\n } finally {\n _gate.leave();\n }\n }\n }",
"public void addBinding(Binding aBinding)\n{\n removeBinding(aBinding.getPropertyName()); // Remove current binding for property name (if it exists)\n List <Binding> bindings = getBindings(true); // Add binding\n bindings.add(aBinding);\n aBinding.setNode(this); // Set binding width to this shape\n}",
"private void addExtraBindings() {\n }",
"public interface EventDispatcher extends EventBroker {\n\n /**\n * Take an event of type {@code T} and dispatch it to all subscribed\n * listeners.\n * Note: It is not defined whether the event is delivered synchronously or\n * asynchronously.\n *\n * @param <T> A subtype of RootApplicationEvent\n * @param event The event to deliver\n */\n <T extends RootApplicationEvent> void dispatch(T event);\n}",
"@Override\r\n public void onEvent(FlowableEvent event) {\n }",
"public void setBindingKey(java.lang.String[] bindingKey) {\r\n this.bindingKey = bindingKey;\r\n }",
"@Override\r\n\tpublic IBinder onBind(Intent arg0) {\n\t\treturn binder;\r\n\t}",
"public abstract void handle(Object event);"
]
| [
"0.62064075",
"0.59603184",
"0.584701",
"0.5557553",
"0.5254478",
"0.50603855",
"0.5026903",
"0.50241685",
"0.4973741",
"0.49479073",
"0.49479073",
"0.4915836",
"0.4852233",
"0.4852233",
"0.47720918",
"0.47563088",
"0.47345924",
"0.4724394",
"0.47100943",
"0.46829718",
"0.46680936",
"0.46630365",
"0.46559894",
"0.46531937",
"0.4650185",
"0.46488547",
"0.4646627",
"0.46230644",
"0.46226937",
"0.45983914",
"0.4594949",
"0.45890728",
"0.45859042",
"0.4580521",
"0.4575871",
"0.45707893",
"0.4570359",
"0.45641503",
"0.45615023",
"0.45571363",
"0.45535803",
"0.45524034",
"0.45424214",
"0.45424214",
"0.45352644",
"0.45334333",
"0.45311168",
"0.4527195",
"0.45261395",
"0.45255995",
"0.45230126",
"0.4483462",
"0.44827217",
"0.44625002",
"0.44439113",
"0.44392166",
"0.44305438",
"0.44295093",
"0.44276544",
"0.44265807",
"0.44216764",
"0.44176602",
"0.44068813",
"0.44040194",
"0.44015467",
"0.4398849",
"0.4398508",
"0.43982136",
"0.4393351",
"0.43876907",
"0.4387186",
"0.43836942",
"0.43822142",
"0.43815762",
"0.43655616",
"0.43647152",
"0.43589938",
"0.43589938",
"0.43524238",
"0.43457374",
"0.43356234",
"0.4330979",
"0.4325253",
"0.4323856",
"0.43212366",
"0.43208307",
"0.43049803",
"0.4303653",
"0.42953348",
"0.4294064",
"0.42911878",
"0.42892668",
"0.42889395",
"0.42852756",
"0.4278603",
"0.42753345",
"0.42732623",
"0.42641112",
"0.4263479",
"0.42622322"
]
| 0.6533612 | 0 |
Notifies the given distributor of the given binding event and its optional details. | private static void notify( final BindingDistributor distributor, final BindingEvent event,
final BindingPublisher publisher, final int rank )
{
switch ( event )
{
case ADD:
distributor.add( publisher, rank );
break;
case REMOVE:
distributor.remove( publisher );
break;
case CLEAR:
distributor.clear();
break;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void distribute( final BindingEvent event, final BindingPublisher publisher, final int rank )\n {\n for ( final Iterator<XRankedBindings> itr = bindingsCache.values().iterator(); itr.hasNext(); )\n {\n final XRankedBindings bindings = itr.next();\n if ( bindings.isActive() )\n {\n notify( bindings, event, publisher, rank );\n }\n else\n {\n itr.remove(); // cleanup up stale entries\n }\n }\n\n for ( int i = 0; i < watchedBeans.size(); i++ )\n {\n final XWatchedBeans beans = watchedBeans.get( i );\n if ( beans.isActive() )\n {\n notify( beans, event, publisher, rank );\n }\n else\n {\n watchedBeans.remove( i-- ); // cleanup up stale entries\n }\n }\n }",
"void notifyAdapters(Object event);",
"@Override\n\tpublic void notifyReceived(LinphoneCore lc, LinphoneCall call,\n\t\t\tLinphoneAddress from, byte[] event) {\n\t\t\n\t}",
"@Override\n\t\t\t\tpublic void notifyReceived(LinphoneCore lc, LinphoneCall call,\n\t\t\t\t\t\tLinphoneAddress from, byte[] event) {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void notify(Object event){\n }",
"public void doSomeChanges() {\n\n eventBus.publish(\"our.event.coming.from.model\", \"some data passed\");\n }",
"@Override\n public void recipient(String recipient) {\n }",
"@Override\r\n public void notify(Object arg) {\n }",
"private void apply(ShipArrived event) {\n }",
"protected void notify(Employee e) {\n\t}",
"public void newValueBinding(BGMEvent e);",
"void notify(IUISemanticEvent event);",
"void onInstallerEvent(String eventName, Object... args);",
"private void notifyStakeholder(){\n }",
"public void newBinding(BGMEvent e);",
"public void notify(Event event) throws RemoteException {\r\n System.out.println(\"Event Notification Received\");\r\n System.out.println(\"These are the Details: \");\r\n System.out.println(event);\r\n receivedEvents.add(event);\r\n }",
"public void notifyResponsibleChanged(Collection<TestName> arg0, ResponsibilityEntry arg1, SProject arg2, Set<SUser> sUsers) {\n\t\t\r\n\t}",
"public void notifyChanged(Notification n){\n\t \n\t super.notifyChanged(n); // the superclass handles adding/removing this Adapter to new Books\n\t \n\t // find out the type of the notifier which could be either 'LanguageDefinition' or 'Library'\n\t Object notifier = n.getNotifier();\n\t if (notifier instanceof ConcurrentLanguageDefinition) {\n\t handleLanguageDefinitionNotification(n);\n\t } else if (notifier instanceof DomainModelProject) {\n\t handleDomainModelProjectNotification(n);\n\t } else if (notifier instanceof XTextEditorProject) {\n\t \thandleXTextProjectNotification(n);\n\t } else if (notifier instanceof SiriusEditorProject) {\n\t \thandleSiriusEditorProjectNotification(n);\n\t } else if (notifier instanceof SiriusAnimatorProject) {\n\t \thandleSiriusAnimatorProjectNotification(n);\n\t } else if (notifier instanceof MoCCProject) {\n\t handleMoCProjectNotification(n);\n\t } else if (notifier instanceof DSAProject) {\n\t handleDSAProjectNotification(n);\n\t } else if (notifier instanceof DSEProject) {\n\t handleDSEProjectNotification(n);\n\t }\n\t \n\t \n\t }",
"public interface ReceiverObserver {\n\n void update(DataNotification notification);\n}",
"public interface EventReceiver {\n\n void onNotify(Event event);\n\n }",
"public void notifyEvent(GrillEvent event) throws GrillException;",
"Builder addReleasedEvent(String value);",
"public interface CommercialUpdateNotificationService {\n void notify(Commercial commercial);\n}",
"boolean deliver(CommInfrastructure busType, String topic, Object event);",
"boolean notify(int event, Point point, Object value);",
"@Override\n public void publish(String senderAddress, String subject, PublishScope scope, Object args) {\n if (!noDbTxn()){\n String errMsg = \"NO EVENT PUBLISH CAN BE WRAPPED WITHIN DB TRANSACTION!\";\n s_logger.error(errMsg, new CloudRuntimeException(errMsg));\n }\n if (_gate.enter(true)) {\n if (s_logger.isTraceEnabled()) {\n s_logger.trace(\"Enter gate in message bus publish\");\n }\n try {\n List<SubscriptionNode> chainFromTop = new ArrayList<SubscriptionNode>();\n SubscriptionNode current = locate(subject, chainFromTop, false);\n\n if (current != null)\n current.notifySubscribers(senderAddress, subject, args);\n\n Collections.reverse(chainFromTop);\n for (SubscriptionNode node : chainFromTop)\n node.notifySubscribers(senderAddress, subject, args);\n } finally {\n _gate.leave();\n }\n }\n }",
"Builder addReleasedEvent(PublicationEvent value);",
"public void receiveBoothUpdatedEvent(BoothUpdatedEvent event) {\r\n\t\tthis.fireTableDataChanged();\r\n\t}",
"Builder addReleasedEvent(PublicationEvent.Builder value);",
"public void firePropertyChange(String p, Object a, Object b) {\n\n\t}",
"protected void firePaperJamEvent()\n {\n // construct parameters and signatures\n Object[] parameter = new Object[ 1 ];\n parameter[ 0 ] = new Notification( \n \"PrinterEvent.PAPER_JAM\", this, 0L );\n String[] signature = new String[ 1 ];\n signature[ 0 ] = \"javax.management.Notification\";\n \n // invoke notification\n try {\n mBeanServer.invoke( eventBroadcasterName,\n \"sendNotification\", parameter, signature ); \n } \n\n // handle exception when invoking method\n catch( ReflectionException exception ) {\n exception.printStackTrace();\n }\n\n // handle exception communicating with MBean\n catch( MBeanException exception ) {\n exception.printStackTrace();\n } \n\n // handle exception if MBean not found\n catch( InstanceNotFoundException exception ) {\n exception.printStackTrace();\n } \n\n }",
"public abstract Object notify(NotifyDescriptor descriptor);",
"public void notifyResponsibleAssigned(TestNameResponsibilityEntry arg0,\r\n\t\t\tTestNameResponsibilityEntry arg1, SProject arg2, Set<SUser> sUsers) {\n\t}",
"public void notifyResponsibleChanged(TestNameResponsibilityEntry arg0,\r\n\t\t\tTestNameResponsibilityEntry arg1, SProject arg2, Set<SUser> sUsers) {\n\t}",
"protected void attachNotification(Txn txn) {\r\n }",
"@Override\n\tpublic void processItemInformation(ProcessItemInformationObjectEvent e, String message) {\n\t\t\n\t}",
"public void notifyResponsibleAssigned(Collection<TestName> arg0, ResponsibilityEntry arg1, SProject arg2, Set<SUser> sUsers) {\n\t\t\r\n\t}",
"void onBusEvent(Event event);",
"public void notifyBuildProblemResponsibleChanged(\r\n\t\t\tCollection<BuildProblemInfo> arg0, ResponsibilityEntry arg1,\r\n\t\t\tSProject arg2, Set<SUser> arg3) {\n\t\t\r\n\t}",
"public XmlAdaptedDistributor(Distributor source) {\n name = source.getDistName().fullDistName;\n phone = source.getDistPhone().value;\n }",
"@Override\n public void receiverAddressChanged(String receiver) {\n }",
"public Event createNotify(Address resource, String event);",
"public void notifyBuildProblemResponsibleAssigned(\r\n\t\t\tCollection<BuildProblemInfo> arg0, ResponsibilityEntry arg1,\r\n\t\t\tSProject arg2, Set<SUser> arg3) {\n\t\t\r\n\t}",
"boolean deliver(String busType, String topic, Object event);",
"private void indicateAddressBookChanged() {\n raise(new AddressBookChangedEvent(addressBook));\n }",
"public void update(Observable obs, Object arg) {\r\n\t\t//checking if the trigger is observable date only and not some other property\r\n\t\tif (obs == this.observedObj) {\r\n\t\t\tString strDate = (String) arg;\r\n\t\t\tsetText(strDate);\r\n\t\t}\r\n\t}",
"public void notifyCustomer(String message) {}",
"abstract public void fireEvent(String eventkey, Object listener, Object event);",
"@Override\n public void author(SinkEventAttributes attributes)\n {\n }",
"void notificationReceived(Notification notification);",
"private void announce( String arg ) {\r\n for ( var obs : this.observers ) {\r\n obs.update( this, arg );\r\n }\r\n }",
"@Override\n public void onDestInfo(BNRGDestInfo arg0) {\n Log.d(BNRemoteConstants.MODULE_TAG, \"onDestInfo...... \");\n }",
"private void indicateAddressBookChanged() {\n raise(new AddressBookChangedEvent(versionedAddressBook));\n }",
"@Override\r\n\tpublic void publish(ISeller seller, IHotelBiding hotelBiding) {\n\t\t\r\n\t}",
"boolean deliver(CommInfrastructure busType, String topic, String event);",
"public void update(Observable o, Object arg) {\n\t\tSystem.out.println(\"====-UPDATE-=====Nava PIRAMIDA \" + arg+\".\");\n\t}",
"public void updateStatisticsHandler(Object sender, Object arg) {\n\t\tif (sender.getClass() == CustomerArrivalEvent.class) {\n\t\t\tupdateStatsCAE();\n\t\t}else if(sender.getClass() == ServiceCompletionEvent.class){\n\t\t\tupdateStatsSCE((Customer) arg);\n\t\t}\n\t}",
"@Override\n\tpublic void execute(DelegateExecution execution) throws Exception {\n\t\tLong packageId=(Long) execution.getVariable(\"packageId\");\n\t\tLong userId=(Long) execution.getVariable(\"userId\");\n\t\t// Send Notification\n\t\tnotificationService.sendDriverArrivedNotification(userId,packageId);\n\t\t\n\t}",
"public Subscription subscribeForDistributorDeliveries(ClockListener listener);",
"public void setHANotificationBroadcasterName( String newBroadcasterName );",
"public boolean notify(EventObject aEvent)\r\n\t\t{\r\n\t\t\tfinal Object lSubscriber = this.subscriberRef.get();\r\n\t\t\tif (lSubscriber != null)\r\n\t\t\t{\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tif (this.parameterType.isAssignableFrom(aEvent.getClass()))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tObject lSource = aEvent.getSource();\r\n\t\t\t\t\t\tif (((lSource == null) && this.allowNullSource) || \r\n\t\t\t\t\t\t\t((lSource != null) && this.sourceType.isAssignableFrom(lSource.getClass())))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Invoke the notification method and remember the result.\r\n\t\t\t\t\t\t\tfinal Object lResult = this.method.invoke(lSubscriber, aEvent);\r\n\t\t\t\t\t\t\t// If the notification method gave us a boolean, we will interpret this value,\r\n\t\t\t\t\t\t\t// if we got 'true' this means that the event was handled completely, no other handlers will be invoked.\r\n\t\t\t\t\t\t\t// If we got a 'false' this means that we have to continue invoking the other handlers.\r\n\t\t\t\t\t\t\treturn (lResult instanceof Boolean) && (Boolean)lResult;\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\tcatch (InvocationTargetException e)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (e.getTargetException() instanceof PropertyVetoException)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tthrow (PropertyVetoException)e.getTargetException();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfinal String lMsg = \"Error while invoking notification method '%s' on an instance of class '%s'.\";\r\n\t\t\t\t\t\tthrow new RuntimeException(String.format(lMsg, this.method.getName(), lSubscriber.getClass().getSimpleName()), e);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception e)\r\n\t\t\t\t{\r\n\t\t\t\t\tfinal String lMsg = \"Error while invoking notification method '%s' on an instance of class '%s'.\";\r\n\t\t\t\t\tthrow new RuntimeException(String.format(lMsg, this.method.getName(), lSubscriber.getClass().getSimpleName()), e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}",
"protected final void firePropertyChange(String name, Object o, Object n) {\n // even though o == null and n == null will signify a change, that\n // is consistent with PropertyChangeSupport's behavior and is\n // necessary for this to work\n boolean noChange = ((o != null) && (n != null) && o.equals(n));\n\n super.firePropertyChange(name, o, n);\n\n if (!(PROP_MODIFIED.equals(name)) && !noChange) {\n setModified(true);\n }\n }",
"public void setReceivedSerialNumber(String receivedSerialNumber) ;",
"@Override\n public void update(Observable o, Object arg) {\n /*this.alerts.add((String)arg);*/\n }",
"EventBinding createEventBinding();",
"@Override\r\n\tpublic void onSpy(SpyEvent arg0) {\n\t\tif (arg0.getSnapshot() == null) {\r\n\t\t\tspy = arg0.getMsg();\r\n\t\t} else {\r\n\t\t\tspy = arg0.getSnapshot().toString();\r\n\t\t}\r\n\r\n\t}",
"protected void notifyListeners(BAEvent event) {\n \t\ttmc.callListeners(event); /// Call our listeners listening to only this match\n \t\tevent.callEvent(); /// Call bukkit listeners for this event\n \t}",
"@Override\r\n public void notifyEndOfSale(RevenueDTO revenue) {\r\n\r\n }",
"@Override\n\tpublic void ActOnNotification(String message) {\n\t \tSystem.out.println(\"Sending Event\");\n\t}",
"@Override\n public void handleNotification(final Notification notification, final Object handback)\n {\n if (!(notification instanceof JobNotification)) return;\n JobNotification notif = (JobNotification) notification;\n if (traceEnabled) log.trace(\"driver \" + driverName + \" received notification: \" + notif);\n jobDataPanel.handleNotification(driverName, notif);\n }",
"@Override\n public void call(Object... args) {\n Message msg = mHanler.obtainMessage();\n msg.what = 2;\n msg.obj = args[0];\n msg.sendToTarget();\n LogTool.e(TAG + \" notification call\");\n }",
"RequestSender onInform(Consumer<Message> consumer);",
"public static void notifyListenersOfEvent(String event, Object... communicationData)\n {\n List<Consumer<Object>> eventListeners = EVENTS_TO_LISTENERS.get(event);\n\n if (eventListeners != null)\n {\n eventListeners.forEach(listener -> listener.accept(communicationData));\n }\n }",
"private void fireEvent(SafeRunnable runnable, IPartListener2 listener, IWorkbenchPartReference ref, String string) {\n //for debugging\n String label = null;\n if (UIStats.isDebugging(UIStats.NOTIFY_PART_LISTENERS)) {\n label = string + ref.getTitle();\n UIStats.start(UIStats.NOTIFY_PART_LISTENERS, label);\n }\n SafeRunner.run(runnable);\n if (UIStats.isDebugging(UIStats.NOTIFY_PART_LISTENERS)) {\n UIStats.end(UIStats.NOTIFY_PART_LISTENERS, listener, label);\n }\n }",
"public abstract void sendNotification(String sendFrom, List<Object> sendTo, String sendToProperty, NoticeTemplate noticeTemplate, Object noticeData);",
"public interface theListener {\n public void itemToSend(String s);\n }",
"public void notify (JsimEvent evt)\n {\n trc.show (\"notify\", \"Event type: \" + evt.getEventType ());\n \n\tObject handback = evt.getRegistrationObject ();\n if (evt.getID () == EventMap.INQUIRE_EVT) {\n } else if (evt.getID () == EventMap.INFORM_EVT) {\n \n /**************************************************************\n * Handle InformEvent from model\n */\n\n ModelProperties prop;\n if (use_xml) {\n\t try {\n Vector data = XMLSerializer.deserializeFromString ((String) handback);\n prop = (ModelProperties) (data.get (0));\n } catch (Exception e) {\n trc.tell (\"notify (InformEvent)\", e.getMessage ());\n e.printStackTrace ();\n return;\n }\n\t } else {\n\t prop = (ModelProperties) handback;\n\t }; // if\n\n if (prop != null) {\n\t\t propCache = prop;\n\t\t new PropertyDialog (this, prop);\n } else {\n\t\t trc.show (\"notify\", \"model prop is null\");\n\t }; // if\n\n } else if (evt.getID () == EventMap.CHANGE_EVT) {\n } else if (evt.getID () == EventMap.CHANGED_EVT) {\n\t fireSimulateEvent ();\n } else if (evt.getID () == EventMap.SIMULATE_EVT) {\n } else if (evt.getID () == EventMap.REPORT_EVT) {\n\t Message msg = null;\n\t if (use_xml) {\n try {\n Vector v = XMLSerializer.deserializeFromString ((String) handback);\n msg = (Message) v.get (0);\n } catch (Exception e) {\n trc.tell (\"notify\", e.getMessage ());\n e.printStackTrace ();\n }\n } else {\n msg = (Message) handback;\n\t }; // if\n\t handleReport (msg);\n } else if (evt.getID () == EventMap.INJECT_EVT) {\n } else if (evt.getID () == EventMap.QUERY_EVT) {\n } else if (evt.getID () == EventMap.STORE_EVT) {\n } else if (evt.getID () == EventMap.RESULT_EVT) {\n } else if (evt.getID () == EventMap.INSTRUCT_EVT) {\n\n /******************************************************************\n * Handle instruct events from a model\n */\n\t Instruct instruct;\n\t if (use_xml) {\n try {\n Vector data = XMLSerializer.deserializeFromString ((String) handback);\n instruct = (Instruct) data.get (0);\n } catch (Exception e) { \n trc.tell (\"notify\", e.getMessage ());\n e.printStackTrace ();\n return;\n }\n\t } else {\n\t instruct = (Instruct) handback;\n\t }; // if\n\n\t scenarioID = instruct.getScenarioID ();\n started = false;\n quit = false;\n fireInquireEvent ();\n\n } else {\n trc.tell (\"notify\", \"Unknown event type!\");\n }; // if\n\n }",
"void sendDataForSubscriber(int subId, String callingPkg, String destAddr,\n String scAddr, int destPort, byte[] data, PendingIntent sentIntent,\n PendingIntent deliveryIntent);",
"void forgotten(TwoWayEvent.Forgotten<DM, UMD, DMD> evt);",
"public interface IGatewayEventListener<Object>\n{\n /**\n * Fires the event\n * @param object The object to receive\n * @param correlationId Id to refer to this trigger\n */\n void Fire(Object object, String correlationId);\n}",
"public PresenterRevealedEvent( Presenter presenter, boolean originator ) {\n this.presenter = presenter;\n this.originator = originator;\n }",
"protected void fireLowTonerEvent()\n {\n // construct parameters and signatures\n Object[] parameter = new Object[ 1 ];\n parameter[ 0 ] = new Notification( \n \"PrinterEvent.LOW_TONER\", this, 0L );\n String[] signature = new String[ 1 ];\n signature[ 0 ] = \"javax.management.Notification\";\n \n // invoke notification\n try {\n mBeanServer.invoke( eventBroadcasterName,\n \"sendNotification\", parameter, signature ); \n } \n\n // handle exception when invoking method\n catch ( ReflectionException exception ) {\n exception.printStackTrace();\n }\n\n // handle exception communicating with MBean\n catch ( MBeanException exception ) {\n exception.printStackTrace();\n }\n\n // handle exception if MBean not found\n catch ( InstanceNotFoundException exception ) {\n exception.printStackTrace();\n } \n \n }",
"public void removeFromList(Distributor distributor) {\n distributors.remove(distributor);\n distributor.kill();\n }",
"public void receiveNotification(Order order) {\n System.out.println(this.getDescription() + \" has received a notification about \" + order.getDescription());\n }",
"public void notifyResponsibleChanged(SBuildType sBuildType, Set<SUser> sUsers) {\n\t}",
"void notify(HorseFeverEvent e);",
"public void objectChanged(NamingEvent evt) throws RemoteException;",
"public void update(Observable o, Object d){\n\n\t\t System.out.println(name1 + \" was notified about a price change of \" + \n\t\t ((PriceChange)d).getProduct().getName() + \n\t\t \" at \" + ((PriceChange)d).getProduct().getStore() + \n\t\t \" to \"+ String.format(\"%.2f\", ((PriceChange)d).getProduct().getPrice()) + \".\");\n\n\t\t\n\t}",
"public void notifyUserInfo(String userInfo);",
"void distributeNoteEvent(final AutomataNoteEvent event) {\n\t\tfinal Iterator<AutomataNoteListener> it = noteListeners.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tfinal AutomataNoteListener listener = it.next();\n\t\t\tlistener.automataNoteChange(event);\n\t\t}\n\t}",
"@Override\n\tpublic void notifyAcceptedOffer(Role role, String managerName,\n\t\t\tString managerEmail) {\n\t\tSystem.out.println(\"Send an email to \" + managerEmail + \" because \" + role.getTitle() + \" Accepted\");\n\t\t\n\t}",
"public void notifyResponsibleAssigned(SBuildType sBuildType, Set<SUser> sUsers) {\n\t}",
"void bind(EventService service);",
"public EventMapper onPalletUpdate(final Consumer<Pallet> consumer) {\n\t\tinitConsumerDelegate();\n\t\t((ConsumerDelegate)getDepPlaceholder().getDelegate()).setConsumerUpdatePallet(consumer);\n\t\treturn this;\n\t}",
"public static Notification buildNotification(Event event, Map<String, String> placeHolderData)\n throws IdentityEventException, NotificationRuntimeException {\n String sendTo = placeHolderData.get(NotificationConstants.EmailNotification.ARBITRARY_SEND_TO);\n Map<String, String> userClaims = new HashMap<>();\n String notificationEvent = (String) event.getEventProperties().get(NotificationConstants.EmailNotification.EMAIL_TEMPLATE_TYPE);\n String username = (String) event.getEventProperties().get(IdentityEventConstants.EventProperty.USER_NAME);\n org.wso2.carbon.user.core.UserStoreManager userStoreManager = (org.wso2.carbon.user.core.UserStoreManager) event.getEventProperties().get(\n IdentityEventConstants.EventProperty.USER_STORE_MANAGER);\n String userStoreDomainName = (String) event.getEventProperties().get(IdentityEventConstants.EventProperty.USER_STORE_DOMAIN);\n String tenantDomain = (String) event.getEventProperties().get(IdentityEventConstants.EventProperty.TENANT_DOMAIN);\n String sendFrom = (String) event.getEventProperties().get(NotificationConstants.EmailNotification.ARBITRARY_SEND_FROM);\n\n if (StringUtils.isNotBlank(username) && userStoreManager != null) {\n userClaims = NotificationUtil.getUserClaimValues(username, userStoreManager);\n } else if (StringUtils.isNotBlank(username) && StringUtils.isNotBlank(userStoreDomainName) &&\n StringUtils.isNotBlank(tenantDomain)) {\n userClaims = NotificationUtil.getUserClaimValues(username, userStoreDomainName, tenantDomain);\n }\n\n String locale = NotificationConstants.EmailNotification.LOCALE_DEFAULT;\n if (userClaims.containsKey(NotificationConstants.EmailNotification.CLAIM_URI_LOCALE)) {\n locale = userClaims.get(NotificationConstants.EmailNotification.CLAIM_URI_LOCALE);\n }\n //Only sendTo value read from claims if it is not set the event sender.\n if (StringUtils.isEmpty(sendTo)) {\n if (userClaims.containsKey(NotificationConstants.EmailNotification.CLAIM_URI_EMAIL)) {\n sendTo = userClaims.get(NotificationConstants.EmailNotification.CLAIM_URI_EMAIL);\n }\n if (StringUtils.isEmpty(sendTo)) {\n throw new IdentityEventException(\"Email notification sending failed. \" +\n \"Sending email address is not configured for the user.\");\n }\n }\n\n EmailTemplate emailTemplate;\n try {\n emailTemplate = NotificationHandlerDataHolder.getInstance().getEmailTemplateManager().getEmailTemplate(notificationEvent, locale, tenantDomain);\n } catch (I18nEmailMgtException e) {\n String message = \"Error when retrieving template from tenant registry.\";\n throw NotificationRuntimeException.error(message, e);\n }\n\n // This is added to change the copyright year in the email templates dynamically.\n int currentYear = Calendar.getInstance().get(Calendar.YEAR);\n placeHolderData.put(\"current-year\", String.valueOf(currentYear));\n\n NotificationUtil.getPlaceholderValues(emailTemplate, placeHolderData, userClaims);\n\n Notification.EmailNotificationBuilder builder =\n new Notification.EmailNotificationBuilder(sendTo);\n builder.setSendFrom(sendFrom);\n builder.setTemplate(emailTemplate);\n builder.setPlaceHolderData(placeHolderData);\n Notification emailNotification = builder.build();\n return emailNotification;\n }",
"public Binding (TriggerRecipient recipient) {\n this(recipient, TriggerAlways.getInstance(), false);\n }",
"void notifyFill(final TradeInstruction instruction, Product product, OrderSide orderSide, double amount,\n\t\tdouble price);",
"public void valueChanged(ListSelectionEvent e) {\n\t\t\t\n\t\t\tiHungryRestaurant hungryRestaurant = iHungryRestaurant.getInstance();\n\t\t\tgui.getOrderGui().getToBeDeliveredSubPanel().setVisible(true);\n\t\t\tListSelectionModel lsm = (ListSelectionModel) e.getSource();\n\t\t\tint minIndex = lsm.getMinSelectionIndex();\t\t\t\n\t\t\t\n\t\t\tif (minIndex>=0)\n\t\t\t{\n\t\t\t\tList<Order> acceptedOrders = new ArrayList<Order>(hungryRestaurant.getAcceptedOrders());\n\t\t\t\tOrder selectedOrder = acceptedOrders.get(minIndex);\n\t\t\t\tgui.getOrderGui().getToBeDeliveredOrderNo().setText(selectedOrder.getOrderID());\n\t\t\t\tgui.getOrderGui().getToBeDeliveredCustNo().setText(selectedOrder.getCustID());\n\t\t\t\t\n\t\t\t\t//get the customer address \n\t\t\t\tString supinfo = model.getCustContact(restaurant.getAccountInfo(), selectedOrder);\n\t\t\t\tString custAddress = getCustAddress(supinfo);\n\t\t\t\tgui.getOrderGui().getToBeDeliveredCustAddrT().setText(custAddress);\n\t\t\t\t\n\t\t\t\tString[] orderDetails = new String[50];\n\t\t\t\tfor (int j = 0; j < selectedOrder.getOrderItems().size(); j++) {\n\t\t\t\t\torderDetails[j] = selectedOrder.getOrderItems().get(j)\n\t\t\t\t\t\t\t.getItem().getItemName()\n\t\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t\t+ selectedOrder.getOrderItems().get(j).getQuantity();\n\t\t\t\t}\n\t\t\t\tgui.getOrderGui().getToBeDeliveredList().setListData(orderDetails);\n\t\t\t}\n\t\t}",
"public abstract void onInvoked(CommandSender sender, String[] args);",
"public interface IEvent {\r\n\r\n\t/**\r\n\t * Returns the source of the event. As events are emitted\r\n\t * by instances that are bound to an instance, this method\r\n\t * will point to the corresponding source emitter that \r\n\t * received the event.\r\n\t * \r\n\t * @return The source of the event.\r\n\t */\r\n\tpublic IEventCollector getSource();\r\n\t\r\n\t/**\r\n\t * The type of the event. This will be the string that is\r\n\t * negotiated in the contract. \r\n\t * \r\n\t * @return The type of the event that has been sent. This\r\n\t * \twill be the parameter as defined in the contract.\r\n\t */\r\n\tpublic String getType();\r\n\t\r\n\t/**\r\n\t * The data object that has been sent as event object. \r\n\t * \r\n\t * @return The data object of this event.\r\n\t */\r\n\tpublic Object getData();\r\n\r\n}"
]
| [
"0.53575975",
"0.52533555",
"0.5124526",
"0.51093847",
"0.5089501",
"0.5039785",
"0.4998557",
"0.4941765",
"0.49397773",
"0.49392906",
"0.49058735",
"0.48393035",
"0.47802287",
"0.4768885",
"0.47271195",
"0.4659711",
"0.46472296",
"0.46471438",
"0.464157",
"0.46303257",
"0.46293825",
"0.4617655",
"0.4615719",
"0.46099937",
"0.46098307",
"0.4602213",
"0.45950466",
"0.45908886",
"0.45783365",
"0.45753995",
"0.45543262",
"0.45472053",
"0.45299497",
"0.45269656",
"0.45062238",
"0.4505586",
"0.4502625",
"0.4497359",
"0.449356",
"0.44914526",
"0.44789174",
"0.4464356",
"0.44637826",
"0.44529578",
"0.44421363",
"0.44395238",
"0.44278038",
"0.44241598",
"0.4423486",
"0.44227988",
"0.44199663",
"0.44165164",
"0.44153017",
"0.44110233",
"0.4408995",
"0.44029272",
"0.4401969",
"0.43989158",
"0.43981126",
"0.4390597",
"0.4387146",
"0.4380533",
"0.43666974",
"0.43482596",
"0.4347345",
"0.43458128",
"0.43447936",
"0.43441367",
"0.43428028",
"0.4312674",
"0.42977217",
"0.42951876",
"0.4291053",
"0.42881927",
"0.42859024",
"0.42827675",
"0.42807123",
"0.42639375",
"0.42638242",
"0.4259506",
"0.4255433",
"0.42492735",
"0.42409146",
"0.42376432",
"0.42371327",
"0.42358044",
"0.42352852",
"0.4225161",
"0.42245457",
"0.4218314",
"0.4217897",
"0.42160404",
"0.4213004",
"0.42116794",
"0.41982898",
"0.41971588",
"0.41944045",
"0.41941845",
"0.4192978",
"0.41918498"
]
| 0.75682306 | 0 |
constructor: same name as the class | studentCounter(){
numStudentInRoom = 0 ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Constructor() {\r\n\t\t \r\n\t }",
"public Constructor(){\n\t\t\n\t}",
"public CyanSus() {\n\n }",
"private Instantiation(){}",
"defaultConstructor(){}",
"public Clade() {}",
"public _355() {\n\n }",
"public PSRelation()\n {\n }",
"public Chick() {\n\t}",
"private void __sep__Constructors__() {}",
"void DefaultConstructor(){}",
"public Pitonyak_09_02() {\r\n }",
"public CSSTidier() {\n\t}",
"public Classe() {\r\n }",
"private TMCourse() {\n\t}",
"ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}",
"public Self__1() {\n }",
"public Lanceur() {\n\t}",
"public Chauffeur() {\r\n\t}",
"public Curso() {\r\n }",
"public Pasien() {\r\n }",
"public Orbiter() {\n }",
"Reproducible newInstance();",
"public Method() {\n }",
"public Rol() {}",
"private SingleObject()\r\n {\r\n }",
"public Trening() {\n }",
"public OOP_207(){\n\n }",
"private ATCres() {\r\n // prevent to instantiate this class\r\n }",
"public Carrera(){\n }",
"@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }",
"private Rekenhulp()\n\t{\n\t}",
"public Supercar() {\r\n\t\t\r\n\t}",
"public Basic() {}",
"public Person() {\n\t\t\n\t}",
"public lo() {}",
"public Car(){\n\t\t\n\t}",
"public JSFOla() {\n }",
"public SlanjePoruke() {\n }",
"public Spec__1() {\n }",
"public Achterbahn() {\n }",
"public TTau() {}",
"public Coche() {\n super();\n }",
"public Cgg_jur_anticipo(){}",
"private Cat() {\n\t\t\n\t}",
"private SingleObject(){}",
"public Cohete() {\n\n\t}",
"public Sad() {\n }",
"protected abstract void construct();",
"public Odontologo() {\n }",
"public SubjectClass() {\n }",
"public Mitarbeit() {\r\n }",
"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 Mannschaft() {\n }",
"public ClassTemplate() {\n\t}",
"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 Tigre() {\r\n }",
"public Student(){}",
"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 Alojamiento() {\r\n\t}",
"public Excellon ()\n {}",
"public Anschrift() {\r\n }",
"public Phl() {\n }",
"public Parser()\n {\n //nothing to do\n }",
"public Demo() {\n\t\t\n\t}",
"public Libro() {\r\n }",
"public Soil()\n\t{\n\n\t}",
"public God() {}",
"public Ov_Chipkaart() {\n\t\t\n\t}",
"public SgaexpedbultoImpl()\n {\n }",
"public Mueble() {\n }",
"public Name() {\n\n }",
"public Classroom() {\n\t}",
"public Tbdtokhaihq3() {\n super();\n }",
"public CD() {}",
"private Marinator() {\n }",
"private Marinator() {\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 }",
"public Aanbieder() {\r\n\t\t}",
"private Sequence() {\n this(\"<Sequence>\", null, null);\n }",
"public Goodsinfo() {\n super();\n }",
"public Person() {}",
"private Converter()\n\t{\n\t\tsuper();\n\t}",
"private DarthSidious(){\n }",
"public Parameters() {\n\t}",
"public Aritmetica(){ }",
"public AntrianPasien() {\r\n\r\n }",
"public Demo3() {}",
"public Book() {\n\t\t// Default constructor\n\t}",
"public Person() {\n }",
"public Person() {\n }",
"public Person() {\n }",
"public Person() {\n }",
"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 Good() {\n }",
"public Data() {\n \n }",
"VehicleClass() {}",
"public Person(){\r\n\t\tsuper();\r\n\t}",
"public MethodEx2() {\n \n }",
"private Solution() {\n //constructor\n }",
"ConstuctorOverloading(){\n\t\tSystem.out.println(\"I am non=argument constructor\");\n\t}"
]
| [
"0.8322638",
"0.8241015",
"0.7708888",
"0.76635176",
"0.7506672",
"0.73829204",
"0.7345352",
"0.73355263",
"0.7314051",
"0.7289153",
"0.72829735",
"0.7269448",
"0.72325623",
"0.720557",
"0.7185218",
"0.71643543",
"0.71621287",
"0.71520877",
"0.71508294",
"0.7148654",
"0.7144587",
"0.71407294",
"0.713012",
"0.71291465",
"0.712122",
"0.71195364",
"0.71194184",
"0.71008617",
"0.70942646",
"0.7063476",
"0.7051189",
"0.70393264",
"0.703392",
"0.7028372",
"0.7020795",
"0.70186424",
"0.70144016",
"0.7007901",
"0.70001584",
"0.69884574",
"0.69704777",
"0.6956516",
"0.6948695",
"0.6944863",
"0.694045",
"0.69402474",
"0.69258296",
"0.6924092",
"0.69212",
"0.69132996",
"0.6912761",
"0.6906035",
"0.6900867",
"0.68995076",
"0.68970585",
"0.6894573",
"0.6894256",
"0.68935627",
"0.6892878",
"0.6885694",
"0.6885353",
"0.6884733",
"0.6882013",
"0.6879941",
"0.68739974",
"0.6869369",
"0.6866635",
"0.6859822",
"0.6851669",
"0.6843689",
"0.68410265",
"0.683838",
"0.6834109",
"0.68311656",
"0.6825786",
"0.6824687",
"0.6824687",
"0.681928",
"0.68181276",
"0.6817236",
"0.6813806",
"0.6812073",
"0.681027",
"0.68083715",
"0.68033016",
"0.6799828",
"0.6797745",
"0.67947733",
"0.6789948",
"0.67898124",
"0.67898124",
"0.67898124",
"0.67898124",
"0.6784978",
"0.6783733",
"0.67823946",
"0.6779838",
"0.6777984",
"0.6777247",
"0.6772937",
"0.6770246"
]
| 0.0 | -1 |
constructor2: with some student in the room | studentCounter( int numStudentAlreadyInTheRoom ){
numStudentInRoom = numStudentAlreadyInTheRoom ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Student()\n {\n lname = \"Tantiviramanond\";\n fname = \"Anchalee\";\n grade = 12;\n studentNumber = 2185;\n }",
"public Student() {\n \n }",
"public Student() {\r\n }",
"public Student(Person person) {\r\n\t\tsuper(person);\r\n\t}",
"public Student(){}",
"Student4(int i, String n) {\n id = i;\n name = n;\n\n }",
"public ClassRoom (String course, String teacher)\r\n {\r\n this.course = course;\r\n this.teacher = teacher;\r\n }",
"public Student(){\n firstName = \"\";\n lastName = \"\";\n bootcamp = \"\";\n id = 42;\n grade = 1.0;\n }",
"public Student( String name ) {\n sname=name;\n }",
"public Student(String studentId){\n id = studentId;\n }",
"public Student() {\n }",
"public Student() {\n }",
"public Student() {\n }",
"Student4(int i, String n, int t) {\n id = i;\n name = n;\n age = t;\n\n }",
"public Student() {\r\n\t\timePrezime = \"Petar Petrovic\";\r\n\t\tfakultet = \"Matematicki\";\r\n\t\tgodina = 1;\r\n\t}",
"Student(String name){\n this.name = name;\n }",
"public Student(int studentId) \r\n {\r\n\r\n this.studentId = studentId;\r\n studentName = \"\";\r\n studentMajor = \"\";\r\n }",
"public Student(String name, String gender, String email){\n this.name = name;\n this.gender = gender;\n this.email = email;\n this.course1 = new Course();\n this.course2 = new Course();\n this.course3 = new Course();\n }",
"public Student() \r\n {\r\n studentId = 0;\r\n studentName = \"\";\r\n studentMajor = \"\";\r\n }",
"public Student(String requiredStudentName)\n {\n studentName = requiredStudentName;\n }",
"Student(int i, String n) {\n id = i;\n name = n;\n }",
"StudenteImpl(String nome, String cognome, Cdl corso, int annoCorso, String matricola) {\n super(nome, cognome);\n initialize(corso, annoCorso, matricola);\n }",
"public Student() { //Default Constructor\n\t\tthis.roll_no=0;\n\t\tthis.full_name=\"\";\n\t\tthis.grade=\"\";\n\t}",
"public Student(String name) {\n this.name = name;\n }",
"public Student(String name, String gender,String rollNumber,String mobileNumber){\n this.name = name;\n this.gender = gender;\n this.rollNumber = rollNumber;\n this.mobileNumber = mobileNumber;\n }",
"Student createStudent();",
"public Student(String studentID) {\r\n\t\tthis.studentID = studentID;\r\n\t}",
"public Student(String name) {\n\n this.name = name;\n }",
"Student(String name, double cgpa, int token){\n this.name=name;\n this.cgpa=cgpa;\n this.token=token;\n }",
"public Student(String name) { // constructor\n\t\tthis.name = name; \n\t}",
"public Student(String name, String address, String facNumber) {\r\n super(name, address);\r\n this.facultyNumber = facNumber;\r\n courses = new HashMap<String, Double>();\r\n }",
"public Student(String name, String gender, String email, Course course1, \n Course course2, Course course3){\n this.name = name;\n this.gender = gender;\n this.email = email;\n this.course1 = course1;\n this.course2 = course2;\n this.course3 = course3;\n }",
"public Student() {\r\n\t\tScanner in=new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter Student first name: \");\r\n\t\tthis.firstName=in.nextLine();\r\n\t\tSystem.out.print(\"Enter Student last name: \");\r\n\t\tthis.lastName=in.nextLine();\r\n\t\tSystem.out.print(\"1.Infant\\n2.child\\n3.junior\\n4.senior\\nEnter student class level: \");\r\n\t\tthis.gradeYear=in.nextInt();\r\n\t\r\n\t\tsetStudentId();\r\n\t\t\r\n\t\t\r\n\t}",
"public Student( String name , String address ){//constructor with arguments \r\n \tID_COUNTER++;\r\n \tstudentNum = ID_COUNTER;\r\n getFirstAndLastName( name );\r\n this.address = address ;\r\n loginID = makeLoginID() ;\r\n numCredits = 0;\r\n totalGradePoints = 0;\r\n }",
"public Student (String first, String last, String id)\r\n\t{\r\n\t\tthis.firstName = first;\r\n\t\tthis.lastName = last;\r\n\t\tthis.studentId = id;\r\n\t}",
"public Student(int userId, String firstName, String lastName, String email, String password, int schoolId)\n {\n super(firstName, lastName, email, password, schoolId);\n this.setUserId(userId);\n this.setFirstName(firstName);\n this.setLastName(lastName);\n this.setEmail(email);\n this.setPassword(password);\n this.setSchoolId(schoolId);\n }",
"public Course(String n, String i, int m, String in, int s, String l) {\n\t\tname = n;\n\t\tid = i;\n\t\tmaxstudents = m;\n\t\tinstructor = in;\n\t\tsection = s;\n\t\tlocation = l;\n\t}",
"public StudentRecord() {}",
"public Student()\r\n {\r\n //This is intended to be empty\r\n }",
"public Student(int id) {\n\t\tthis.id = id;\n\t}",
"public Student(){//default constructor \r\n ID_COUNTER++;\r\n studentNum = ID_COUNTER;\r\n firstName = \"\";\r\n lastName = \"\";\r\n address = \"\";\r\n loginID = \"\";\r\n numCredits = 0;\r\n totalGradePoints = 0;\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 StudentChoresAMImpl() {\n }",
"public student1(int r)\n {\n this();//calling default constructor\n System.out.println(\"rno = \" + r);\n }",
"public Student(String name, String SSN) {\n this.name = name;\n this.SSN = SSN;\n System.out.println(\"Student: \" + name + \", email: \" + generateEmail(name) + \", ID: \" + generateID(SSN));\n }",
"public Student(String id, String fname, String lname, String email, String phone, String dob) {\r\n\t\tsuper(fname, lname, email, phone);\r\n\t\t//id++;\r\n\t\tthis.dob = dob;\r\n\t\tmgList = new ModuleGradeList();\r\n\t\tthis.studentId = id;\r\n\t}",
"public StudentDemo(){\r\n \r\n \r\n \r\n }",
"public StudentCourse() {\n this(\"student_course\", null);\n }",
"Student() {\n // Set all to \"undefined\"/0, but assign unique student ID\n this.firstName = \"Undefined\";\n this.lastName = \"Undefined\";\n this.grade = 0;\n\n // Unique student IDs - increment lastStudentID and set it as this student's student ID\n lastStudentID++;\n this.studentID = lastStudentID;\n }",
"public Student(String id, String fname, String mname, String lname, String email, String phone, String dob) {\r\n\t\tsuper(fname, mname, lname, email, phone);\r\n\t\t//id++;\r\n\t\tthis.dob = dob;\r\n\t\tmgList = new ModuleGradeList();\r\n\t\tthis.studentId = id;\r\n\t}",
"public TeamStudent() {\r\n\t\t// Default constructor\r\n\t}",
"public College()\r\n {\r\n students = new ArrayList<Student>();\r\n }",
"public Student ( int rollno, String name, String course ) {\n\t\tthis.rollno = rollno;\n\t\tthis.name = name;\n\t\tthis.course = course;\n\t}",
"public Course(int courseID) {\n this.courseID = courseID;\n morningRoster = new Vector<Student>();\n waitlist = new LinkedList<Student>();\n eveningRoster = new Vector<Student>();\n }",
"public Student(int num) {\n//\t\tstuNum = num;\n//\t\tgpa = 0.0;\n\t\tthis(num, 0.0);\n\t}",
"public Course()\n\t{\n\t\tstudents = new Student[30];\n\t\tnumStudents = 0;\n\t}",
"public StudentAthlete() {\n }",
"public Student(String myname, int myid){ \r\n\t\tname = myname;\r\n\t\tid = myid;\r\n\t\tgrades[0]= -1;\r\n\t\tgrades[1]= -1;\r\n\t\tgrades[2]= -1;\r\n\r\n\t// use the static variable from StudentArray Class to keep count of the number of student object\r\n\t\tnumberOfStudents++; \r\n\t}",
"public UserImplPart1(int studentId, String yourName, int yourAge,int yourSchoolYear, String yourNationality){\n this.studentId = studentId;\n this.name= yourName;\n this.age = yourAge; \n this.schoolYear= yourSchoolYear;\n this.nationality= yourNationality;\n}",
"public Student() {\r\n\t\t\r\n\t\t//populating country options\r\n\t\t//can also be done using a properties file\r\n\t\t\r\n\t\t/*\r\n\t\t * countryOptions = new LinkedHashMap<String, String>();\r\n\t\t * \r\n\t\t * countryOptions.put(\"BR\", \"Brazil\"); countryOptions.put(\"IN\", \"India\");\r\n\t\t * countryOptions.put(\"US\", \"United States\"); countryOptions.put(\"CA\",\r\n\t\t * \"Canada\");\r\n\t\t */\r\n\t\t\r\n\t\t\r\n\t}",
"public Student(String fname, String lname, int age, String coll, String maj, double grade) {\n super(fname, lname, age);\n college = coll;\n major = maj;\n gpa = grade;\n }",
"Student(String name) {\n\t\tthis.name = name;\n\t\tregisteredCourses = new Course[30];\n\t}",
"public GradeBook2( String name )\n {\n courseName = name; // initializes courseName\n }",
"public Student(Integer age) {\n\n this.age = age;\n }",
"public Login(Student s) \n\t\t{ \n\t\t\t\tthis.s = s;\n\t\t}",
"public Student(String firstName, String lastName, int age, double gpa, String major, String department, List<Course> courses) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.age = age;\n this.gpa = gpa;\n this.major = major;\n this.department = department;\n this.courses = courses;\n }",
"public Student(String studentID, String passwordHash, String name, String matricNum, String nationality,\r\n\t\t\tchar gender, ArrayList<String> school, ArrayList<String> courseList, ArrayList<Integer> indexGroupList,\r\n\t\t\tArrayList<String> exemptionCoursesList, ArrayList<String> completedCoursesList,\r\n\t\t\tArrayList<Integer> waitListIDList, Schedule schedule, Calendar startTime, Calendar endTime, String email,\r\n\t\t\tString mobileNum, String notifMode) {\r\n\t\tthis.studentID = studentID;\r\n\t\tthis.passwordHash = passwordHash;\r\n\t\tthis.name = name;\r\n\t\tthis.matricNum = matricNum;\r\n\t\tthis.nationality = nationality;\r\n\t\tthis.gender = gender;\r\n\t\tthis.school = school;\r\n\t\tthis.courseList = courseList;\r\n\t\tthis.indexGroupList = indexGroupList;\r\n\t\tthis.exemptionCoursesList = exemptionCoursesList;\r\n\t\tthis.completedCoursesList = completedCoursesList;\r\n\t\tthis.waitListIDList = waitListIDList;\r\n\t\tthis.schedule = schedule;\r\n\t\tthis.startTime = startTime;\r\n\t\tthis.endTime = endTime;\r\n\t\tthis.email = email;\r\n\t\tthis.mobileNum = mobileNum;\r\n\t\tthis.notifMode = notifMode;\r\n\t}",
"public Student(String registrationNumber, int[] marks){\n this.registrationNumber = registrationNumber;\n this.marks = marks;\n \n }",
"public Student(String nume, int varsta) {\n\t\tthis.nume = nume;\n\t\tthis.varsta = varsta;\n\t}",
"public Student(\n int userId, String firstName, String lastName, String email, String password, int\n schoolId,\n double gpa)\n {\n super(firstName, lastName, email, password, schoolId);\n this.setUserId(userId);\n this.setFirstName(firstName);\n this.setLastName(lastName);\n this.setEmail(email);\n this.setPassword(password);\n this.setSchoolId(schoolId);\n this.setGpa(gpa);\n }",
"public Student(int userPID)\n\t{\n\t\tPID = userPID;\n\t\tfirst = \"Tyler\";\n\t\tlast = \"Hoyt\";\n\t\tmajor = \"Computer Science\";\n\t\tminor = \"\"; //Wont let me set it to null????????????????????????????????????????????\n\t}",
"public School() {\r\n }",
"public student(String n, char l, int g) {\n\t\t\t\n\t\t\tname = n;\n\t\t\tletter = l;\n\t\t\tgpa = g;\n\t\t\t\n\t\t}",
"public StudentRecord(Student s, Department dep, Degree deg, Term tb, List<Professor> a, List<Professor> c,\r\n List<CourseTaken> ct, List<String> n){\r\n student = s;\r\n department = dep;\r\n degreeSought = deg;\r\n termBegan = tb;\r\n advisors = a;\r\n committee = c;\r\n coursesTaken = ct;\r\n notes = n;\r\n }",
"public Student(int id, String name, String course) {\n this.id = id;\n this.name = name;\n this.course = course;\n }",
"public StudentPlayer() {\n super(\"260719721\");\n }",
"public SingleRoom(Hotel hotel, String nomor_kamar)\n {\n // initialise instance variables\n super(hotel,nomor_kamar);\n\n }",
"public Student(String id, String firstName, String lastName, String email, String username, String password) {\n super(id, firstName, lastName, email, username, password, \"student\");\n }",
"public StudentPlayer() {\n super(\"260622641\");\n }",
"public StudentPlayer() {\n super(\"260740998\");\n }",
"Student(String firstName, String lastName, int grade) {\n // Standard constructor assignments\n this.firstName = firstName;\n this.lastName = lastName;\n this.grade = grade;\n\n // Unique student IDs - increment lastStudentID and set it as this student's student ID\n lastStudentID++;\n this.studentID = lastStudentID;\n }",
"public StudentPlayer() {\r\n super(\"260767897\");\r\n }",
"public Student(String firstName, String lastName, int grade) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.grade = grade; \n studentNumber = totalStudents++; // the new student's number is equal the total number of students, therefore, each student number will be unique\n }",
"public Student (String first, String last)\n {\n firstName = first;\n lastName = last;\n testScore1 = 0;\n testScore2 = 0;\n testScore3 = 0;\n }",
"public Student(String name, Integer age) {\n\n this.name = name;\n this.age = age;\n }",
"public Student(String nm, int day, int month, int year){\r\n\t\tthis.name = nm;\r\n//\t\tthis.username = createUsername(nm); //creates unique username from Student's name\r\n\r\n\t dateofbirth = LocalDate.of(year, month, day);\r\n\t\tthis.age = getAge();\r\n\t\tStudent.userID = userID++; //ID increments for each new User\r\n\t\t\r\n\t\tthis.username = getUsername();\r\n\t}",
"public Student(String firstName, String lastName, int age, int number) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.age = age;\n this.studentNumber = number;\n this.grades = new int[0];\n }",
"public Student(int studentID, String firstName, String lastName) {\n this.studentID = studentID;\n this.firstName = firstName;\n this.lastName = lastName;\n }",
"Classroom() {}",
"public Student build() { \n\t return new Student(this); \n\t }",
"public Student(String name, char gender, int age) {\r\n super(name, gender, age);\r\n }",
"public Student(String name, String emailAddress, String matriculationNumber) {\n this.name = name;\n this.emailAddress = emailAddress;\n this.matriculationNumber = matriculationNumber;\n }",
"public Student(String name, int studentId) {\n this.name = name;\n this.studentId = studentId;\n this.numberOfCredits = 0;\n this.gpa = 0.0;\n }",
"public Student(String fullName,Student_Status stStatus)\n {\n this.fullName = fullName;\n this.stStatus = stStatus;\n }",
"public Student() {\n\t\tthis.firstName = \"no name entered\";\n\t\tthis.lastName = \"no name entered\";\n\t\tthis.wId = \"no WID\";\n\t\tthis.labScore = 0;\n\t\tthis.projScore = 0;\n\t\tthis.examScore = 0;\n\t\tthis.codeLabScore = 0;\n\t\tthis.finalExamScore = 0;\n\t\tthis.scorePercent = 0;\n\t}",
"public Student(int level, String first, String last, long gnum, String major, \n String degree) {\n // TODO initialize the instance variables\n // Also use the parameter variable \"level\" as follows\n // 1) use its value to initialized the PROGRAM constant\n // 2) create the transcripts array to be of size [50] if is level 0, \n // or to be of size [15] if level is 1. \n // note that level refers to the student type and we use a value of 0 for \n // an undergrad and a value of 1 for a grad\n PROGRAM = level;\n this.first = first;\n this.last = last;\n this.gnum = gnum;\n this.major = major;\n this.degree = degree;\n if (PROGRAM == 0){\n transcripts = new TranscriptEntry[50];\n }\n else{\n transcripts = new TranscriptEntry[15];\n }\n }",
"public void setStudent(Student s) {\r\n student = s;\r\n }",
"static void initializeStudentSystem() {\r\n\r\n Course math = new Course(\"1000\", \"Mathematics\", \"College of Science\");\r\n Course computing = new Course(\"1001\", \"Computing\", \"College of Engineering\");\r\n Course english = new Course(\"1002\", \"English\", \"College of Liberal Arts\");\r\n Course history = new Course(\"1003\", \"History\", \"College of Liberal Arts\");\r\n Course biology = new Course(\"1004\", \"Biology\", \"College of Science\");\r\n courses.put(math.getCRN(), math);\r\n courses.put(computing.getCRN(), computing);\r\n courses.put(english.getCRN(), english);\r\n courses.put(history.getCRN(), history);\r\n courses.put(biology.getCRN(), biology);\r\n //\r\n User admin = new User();\r\n admin.setUsername(\"admin\");\r\n admin.setPassword(\"admin\");\r\n admin.setAccountType(4);\r\n accounts.put(admin.getUsername(), admin);\r\n //\r\n Student defaultStudent = new Student();\r\n defaultStudent.setName(\"Jose Cabrera\");\r\n defaultStudent.setUsername(\"John1\");\r\n defaultStudent.setPassword(\"123\");\r\n defaultStudent.setId(\"80539934\");\r\n defaultStudent.setMajor(\"CS\");\r\n defaultStudent.setAccountType(1);\r\n defaultStudent.setGraduationStatus(21);\r\n accounts.put(\"John1\", defaultStudent);\r\n //\r\n Student defaultStudent2 = new Student();\r\n defaultStudent2.setName(\"Raul Hinostroza\");\r\n defaultStudent2.setUsername(\"John2\");\r\n defaultStudent2.setPassword(\"123\");\r\n defaultStudent2.setId(\"805393\");\r\n defaultStudent2.setMajor(\"CS\");\r\n defaultStudent2.setAccountType(1);\r\n accounts.put(\"John2\", defaultStudent2);\r\n //\r\n Student defaultStudent3 = new Student();\r\n defaultStudent3.setName(\"Max Morales\");\r\n defaultStudent3.setUsername(\"John3\");\r\n defaultStudent3.setPassword(\"123\");\r\n defaultStudent3.setId(\"8053923\");\r\n defaultStudent3.setMajor(\"CS\");\r\n defaultStudent3.setAccountType(1);\r\n accounts.put(\"John3\", defaultStudent3);\r\n defaultStudent.addCourses(\"1000\");\r\n defaultStudent2.addCourses(\"1000\");\r\n defaultStudent3.addCourses(\"1000\");\r\n //\r\n Faculty defaultFaculty = new Faculty();\r\n defaultFaculty.setAccountType(2);\r\n defaultFaculty.setName(\"Smith\");\r\n defaultFaculty.setUsername(\"Smith1\");\r\n defaultFaculty.setPassword(\"123\");\r\n accounts.put(defaultFaculty.getUsername(), defaultFaculty);\r\n //\r\n Staff defaultStaff = new Staff();\r\n defaultStaff.setAccountType(3);\r\n defaultStaff.setName(\"Smith\");\r\n defaultStaff.setUsername(\"Smith2\");\r\n defaultStaff.setPassword(\"123\");\r\n accounts.put(defaultStaff.getUsername(), defaultStaff);\r\n }",
"Student(String n, int age, String i,Student ref)\n\t{\n\t\tthis.name=n;\n\t\tthis.age=age;\n\t\tthis.id=i;\n\t\tthis.next=ref;\n\t}",
"public Student(String myname, int myid , double[] theGradeArray){ \r\n\r\n\t\tname = myname;\r\n\t\tid = myid;\r\n\t\tgrades = theGradeArray;\r\n\t\t\r\n\t// use the static variable from StudentArray Class to keep count of the number of student object\r\n\t\tnumberOfStudents++;\r\n\t}",
"public SchoolPerson() {\n }"
]
| [
"0.7491991",
"0.73914623",
"0.7365542",
"0.7327239",
"0.73242867",
"0.7304222",
"0.7300967",
"0.72765434",
"0.7232966",
"0.7228103",
"0.7222494",
"0.7222494",
"0.7222494",
"0.72158235",
"0.7179406",
"0.71485114",
"0.7141651",
"0.711161",
"0.7067934",
"0.7061169",
"0.7058654",
"0.7013872",
"0.695711",
"0.69430757",
"0.69422746",
"0.6871033",
"0.6870257",
"0.6863612",
"0.6846786",
"0.68263495",
"0.6802419",
"0.67940295",
"0.67726946",
"0.6765801",
"0.67521703",
"0.67429614",
"0.673908",
"0.6733978",
"0.6723871",
"0.6709933",
"0.6707616",
"0.6697024",
"0.669626",
"0.6653868",
"0.6647888",
"0.66473603",
"0.6634938",
"0.6631405",
"0.66243124",
"0.6614425",
"0.6612138",
"0.6591494",
"0.65771216",
"0.6573748",
"0.6568148",
"0.65566677",
"0.65473616",
"0.6546044",
"0.6538438",
"0.6509059",
"0.6495555",
"0.64948386",
"0.6486876",
"0.6475901",
"0.6457972",
"0.6452516",
"0.6452111",
"0.6451758",
"0.6451313",
"0.6450781",
"0.64443535",
"0.64398664",
"0.6436282",
"0.6410655",
"0.6390699",
"0.6387506",
"0.6382452",
"0.63753974",
"0.637532",
"0.63655895",
"0.63537717",
"0.6342596",
"0.63423645",
"0.6333423",
"0.6327762",
"0.6325571",
"0.63120735",
"0.63109535",
"0.631003",
"0.6305659",
"0.6302389",
"0.6299449",
"0.6291425",
"0.629053",
"0.6289568",
"0.62864405",
"0.6283601",
"0.62784386",
"0.62751025",
"0.62741816",
"0.6270981"
]
| 0.0 | -1 |
methodoverloading: methods with same name but different arguments | public void StudentEntered() {
numStudentInRoom ++;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isMoreSpecific (MethodType type) throws OverloadingAmbiguous {\r\n boolean status = false;\r\n\r\n try {\r\n for (int i = 0, size = arguments.size (); i < size; i++) {\r\n\tIdentifier this_arg = (Identifier) arguments.elementAt (i);\r\n\tIdentifier target_arg = (Identifier) type.arguments.elementAt (i);\r\n\r\n\tint type_diff = this_arg.type.compare (target_arg.type);\r\n\tif (type_diff == 0)\r\n\t continue;\r\n\telse if (type_diff > 0) {\r\n\t if (status == true) throw new OverloadingAmbiguous ();\r\n\t} else {\r\n\t if (i != 0) throw new OverloadingAmbiguous ();\r\n\t status = true;\r\n\t}\r\n }\r\n } catch (OverloadingAmbiguous ex) {\r\n throw ex;\r\n } catch (TypeMismatch ex) {\r\n throw new OverloadingAmbiguous ();\r\n }\r\n\r\n return status;\r\n }",
"public static void main(String[] args) {\n methodOverloading();\n }",
"static void add() {\r\n\t\tSystem.out.println(\"Overloading Method\");\r\n\t}",
"public static void main(String[] args) {\n\t\tMethodOverloading7.add(1, 2, 3);\n\t\tMethodOverloading7.add(1, 2l, 3l);\n\t\tMethodOverloading7.add(1, 2, 3l);\n\t}",
"public static void main(String[] args) {\r\n\t\t\r\n\t\tMethodOverloading m = new MethodOverloading();\r\n\t\tm.sum();\r\n\t\tm.sum(15, 15);\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\tP92_Overloading_Sample obj=new P92_Overloading_Sample();\n\t\tSystem.out.println(obj.add());//30\n\t\tSystem.out.println(obj.add(500));//530\n\t\tSystem.out.println(obj.add(200, 300.9f));//500\n\t\tSystem.out.println(obj.add(55, 500));//555\n\t}",
"public static void main(String[] args) {\n\n Method();\n Method(10);\n Method(\"Hello\");\n Method(10, 20);\n // Multiple methods can have the same name as long as the number and/or type of parameters are different.\n \n }",
"public static void main(String[] args) {\n\t\tOverloadingType1 ot1 = new OverloadingType1();\n\t\tshort a=3, b=6;\n\t\tot1.add(2, 3);\n\t\tot1.add(a, b);\n\t\tot1.add(a);\n\t\t\n\t\t\n\t}",
"public void openen() {\n System.out.println(\"2.Overloaded methode zonder argument\");\n }",
"public void sum(int a, int b)\r\n\t{\r\n\t\tint c=a+b;\r\n\t\tSystem.out.println(\"Addition of 2 no [method overloading] : \" + c);\r\n\t\t\r\n\t}",
"public AmbiguousMethodException() {\n super();\n }",
"public void testOverloadedMethods(){\n System.out.printf(\"Square of integer 7 is %d\\n\", square(7));\n System.out.printf(\"Square of double 7.5 is %f\\n\", square(7.5));\n }",
"private boolean methodEqueals(Method m1, Method m2) {\n\t\tif (m1.getName() == m2.getName()) {\n\t\t\tif (!m1.getReturnType().equals(m2.getReturnType()))\n\t\t\t\treturn false;\n\t\t\tClass<?>[] params1 = m1.getParameterTypes();\n\t\t\tClass<?>[] params2 = m2.getParameterTypes();\n\t\t\tif (params1.length == params2.length) {\n\t\t\t\tfor (int i = 0; i < params1.length; i++) {\n\t\t\t\t\tif (params1[i] != params2[i])\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"class_1069 method_104(int var1, int var2);",
"boolean overrides(MethodDeclaration sub, MethodDeclaration sup);",
"public static void main(String[] args) {\n\t\t\r\n\t\tCompleOverloadDemo1 obj = new CompleOverloadDemo1();\r\n\t\t\r\n\t\tobj.add(1, 3); \t\t\t\t\t\t\t\t\t\t//Calling first function with 2 parameters\r\n\t\tobj.add(3.2, 3);\t\t\t\t\t\t\t\t\t//Calling second function with 2 different type of parameters\r\n\t\tobj.add(2, 3, 1);\t\t\t\t\t\t\t\t\t//Calling third function with 3 parameters\r\n\t\tobj.add(3, 3.4);\t\t\t\t\t\t\t\t\t//Calling Forth function with 2 different type of parameters in different order\r\n\r\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tmethodoverloading mol = new methodoverloading();\n\t\toverriding ovr = new overriding();\n\t\t\n\t\tSystem.out.println(mol.sum(5, 7));\n\t\tSystem.out.println(mol.sum(10, 5, 8));\n\t\tmol.print();\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t}",
"public interface IMostSpecificOverloadDecider\n{\n OverloadRankingDto inNormalMode(\n WorkItemDto workItemDto, List<OverloadRankingDto> applicableOverloads, List<ITypeSymbol> argumentTypes);\n\n //Warning! start code duplication, more or less the same as in inNormalMode\n List<OverloadRankingDto> inSoftTypingMode(\n WorkItemDto workItemDto, List<OverloadRankingDto> applicableOverloads);\n}",
"@Override\n\tpublic void javaMethodBaseWithTwoParams(long longParam, double doubleParam) {\n\t\t\n\t}",
"public void andThisIsAMethodName(){}",
"public AmbiguousMethodException(String s) {\n super(s);\n }",
"public static void main(String[] args) {\n\n MethodOverloading mo = new MethodOverloading();\n mo.sum();\n int s1 = mo.sum(4,9,7);\n System.out.println(\"With three params sum is : \"+s1);\n int s2 = mo.sum(6,8);\n System.out.println(\"With two params sum is : \"+s2);\n\n }",
"class_1069 method_105(int var1, int var2);",
"public static void main(String[] args) {\n\t\tOverloadingAdditionEx ad=new OverloadingAdditionEx();\n\t\tad.add(10, 20);\n\t\tad.add(10,20, 30);\n\t\tad.add(20.5f, 10.7f);\n\t\tad.add(10, 20.6f);\n\n\t}",
"OverloadedFunctionDescriptor() {\n super();\n this.overloads = new ArrayList<>();\n }",
"public interface a {\n void a(int i, O o, Object obj);\n\n void a(int i, String str);\n }",
"@Override\n\tpublic void randomMethod(String name) {\n\t\t\n\t}",
"public Method getMethodByParameters(String name, Class<?>... args) {\r\n \t\t\r\n \t\t// Find the correct method to call\r\n \t\tfor (Method method : getMethods()) {\r\n \t\t\tif (Arrays.equals(method.getParameterTypes(), args)) {\r\n \t\t\t\treturn method;\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t\t// That sucks\r\n \t\tthrow new RuntimeException(\"Unable to find \" + name + \" in \" + source.getName());\r\n \t}",
"@Override\n\tpublic Void visit(OwnMethodCall method) {\n\t\tprintIndent(\"implicit dispatch\");\n\t\tindent++;\n\t\tmethod.methodName.accept(this);\n\t\tfor (var v : method.args) \n\t\t\tv.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}",
"abstract void method();",
"MethodName getMethod();",
"private ContractMethod findMatchedInstance(List arguments) {\n List<ContractMethod> matchedMethod = new ArrayList<>();\n\n if(this.getInputs().size() != arguments.size()) {\n for(ContractMethod method : this.getNextContractMethods()) {\n if(method.getInputs().size() == arguments.size()) {\n matchedMethod.add(method);\n }\n }\n } else {\n matchedMethod.add(this);\n }\n\n if(matchedMethod.size() == 0) {\n throw new IllegalArgumentException(\"Cannot find method with passed parameters.\");\n }\n\n if(matchedMethod.size() != 1) {\n LOGGER.warn(\"It found a two or more overloaded function that has same parameter counts. It may be abnormally executed. Please use *withSolidityWrapper().\");\n }\n\n return matchedMethod.get(0);\n }",
"@OOPMultipleInterface\npublic interface I7D {\n @OOPMultipleMethod\n default String f(Object p1, Object p2, Object p3) throws OOPMultipleException {return \"\";}\n @OOPMultipleMethod\n default String f(Integer p1, Object p2, E p3) throws OOPMultipleException {return \"\";}\n}",
"public interface xe {\n Object a(int i, Class cls);\n\n Object a(Class cls);\n\n void a();\n\n void a(int i);\n\n void a(Object obj);\n}",
"List method_111(class_922 var1, int var2, int var3, int var4);",
"public interface Product {\n\n void methodSame();\n\n void methodDiff();\n}",
"@Test\n public void testCircleImplSpecifics()\n throws NoSuchMethodException\n {\n final List<String> expectedMethodNames = Arrays.asList(\n \"getColor\", \"setColor\", \"getArea\", \"getPerimeter\", \"translate\",\n \"getRadius\", \"setRadius\", \"getCenter\");\n\n final List<Class> expectedMethodReturns = Arrays.asList(\n Color.class, void.class, double.class, double.class, void.class,\n double.class, void.class, Point.class);\n\n final List<Class[]> expectedMethodParameters = Arrays.asList(\n new Class[0], new Class[] {Color.class}, new Class[0], new Class[0], new Class[] {Point.class},\n new Class[0], new Class[] {double.class}, new Class[0]);\n\n verifyImplSpecifics(Circle.class, expectedMethodNames,\n expectedMethodReturns, expectedMethodParameters);\n }",
"public boolean sameSignature(MethodType other) {\n return name.equals(name) &&\n Arrays.equals(typeParams, other.typeParams) &&\n Arrays.equals(paramTypes, other.paramTypes);\n }",
"void method_114(int var1, int var2);",
"public abstract void method1();",
"interface A9 {\r\n void test(int i, String s1); //test method is taking some argument\r\n}",
"public static void main(String[] args) {\n\t\t\r\n\t\t\r\n\t\toverload2 ov=new overload2();\r\n\t\tint i=88;\r\n\t\tov.test();\r\n\t\tov.test(10, 20);\r\n\t\tov.test(i);//test(double a) exacute \r\n\t\tov.test(123.2);\r\n\r\n\r\n\t}",
"public abstract void a(b paramb, int paramInt1, int paramInt2);",
"int foo(int a, int b);",
"public boolean overrideEquivalent(MethodType other) {\n return this.sameSubsignature(other) || other.sameSubsignature(this);\n }",
"MethodType (String m, Type r, ExpressionList args) {\r\n name = m;\r\n return_type = r;\r\n arguments = args;\r\n body = null;\r\n }",
"private boolean methodsMatch(Method method,\n CallStatement.CallStatementEntry entry) throws EngineException {\n if (!method.getName().equals(entry.getName())) {\n return false;\n }\n if (method.getParameterTypes().length != parameters.size()) {\n return false;\n }\n Class[] parameterTypes = method.getParameterTypes();\n for (int index = 0; index < parameters.size(); index++) {\n Class parameterType = parameterTypes[index];\n Object parameterValue = parameters.get(index);\n if (!parameterType.isAssignableFrom(parameterValue.getClass())) {\n return false;\n }\n }\n \n for (int index = 0; index < parameters.size(); index++) {\n Class parameterType = parameterTypes[index];\n Object parameterValue = parameters.get(index);\n parameters.set(index, parameterType.cast(parameterValue));\n }\n return true;\n }",
"public interface class_25 {\r\n\r\n // $FF: renamed from: b (int, int) boolean\r\n boolean method_103(int var1, int var2);\r\n\r\n // $FF: renamed from: c (int, int) gI\r\n class_1069 method_104(int var1, int var2);\r\n\r\n // $FF: renamed from: d (int, int) gI\r\n class_1069 method_105(int var1, int var2);\r\n\r\n // $FF: renamed from: b (gG, int, int) void\r\n void method_106(class_25 var1, int var2, int var3);\r\n\r\n // $FF: renamed from: b (boolean, vu) boolean\r\n boolean method_107(boolean var1, class_81 var2);\r\n\r\n // $FF: renamed from: a () boolean\r\n boolean method_108();\r\n\r\n // $FF: renamed from: b () boolean\r\n boolean method_109();\r\n\r\n // $FF: renamed from: c () java.lang.String\r\n String method_110();\r\n\r\n // $FF: renamed from: b (as, int, int, int) java.util.List\r\n List method_111(class_922 var1, int var2, int var3, int var4);\r\n\r\n // $FF: renamed from: b (ahb, java.lang.String, int, int, int) dd\r\n class_1034 method_112(ahb var1, String var2, int var3, int var4, int var5);\r\n\r\n // $FF: renamed from: d () int\r\n int method_113();\r\n\r\n // $FF: renamed from: f (int, int) void\r\n void method_114(int var1, int var2);\r\n\r\n // $FF: renamed from: e () void\r\n void method_115();\r\n}",
"@Override\n public void method1() {\n\n // we have 2 method (this method1 and method2 from A) in this class. Not the abstract.\n }",
"public static void main(String[] args) {\n\t\tMethodOverload m=new MethodOverload();\t\n\t\tint p=m.add(40,1);\n\t\t\t\tint q=m.add(10, 1);\n\t\tSystem.out.println(\"p=\" +p);\n\t\tSystem.out.println(\"q=\" +q);\n\t\t// TODO Auto-generated method stub\n\n\t}",
"@Override\n public int getMethodCount()\n {\n return 1;\n }",
"@Test\n\tpublic void testChangeMethodParameters() {\n\t\tDeclarationListDelta delta = createClassDelta(\n\t\t\t\t\"int someMethod(String x) { return 0;} \",\n\t\t\t\t\"int someMethod(int x) { return 0;}\");\n\n\t\tassertEquals(1, delta.getAddedDeclarations().size());\n\t\tassertEquals(0, delta.getChangedDeclarations().size());\n\t\tassertEquals(1, delta.getRemovedDeclarations().size());\n\n\t\tString removedMethod = methodSignature(delta.getRemovedDeclarations()\n\t\t\t\t.get(0));\n\t\tassertEquals(\"int someMethod(String)\", removedMethod);\n\n\t\tString addedMethod = methodSignature(delta.getAddedDeclarations()\n\t\t\t\t.get(0));\n\t\tassertEquals(\"int someMethod(int)\", addedMethod);\n\t}",
"public interface AbstractC2930hp1 {\n void a(String str, boolean z);\n\n void b(String str, long j);\n\n void c(String str, int i, int i2, int i3, int i4);\n\n void d(String str, int i);\n\n void e(String str, int i, int i2, int i3, int i4);\n}",
"protected final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke paramMethodToInvoke, Object paramObject1, Object paramObject2) {\n }",
"protected final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke paramMethodToInvoke, Object paramObject1, Object paramObject2) {\n }",
"interface PureAbstract {\n void method1();\n long method2(long a, long b);\n}",
"public void b(int paramInt1, int paramInt2) {}",
"public void b(int paramInt1, int paramInt2) {}",
"abstract String applicable(Method[] getters) throws InvalidObjectException;",
"protected void a(int paramInt1, int paramInt2, boolean paramBoolean, yz paramyz) {}",
"@Override\n public final int getMethodCount() {\n return 1;\n }",
"public interface RoundtripPortTypeB {\n\n public java.lang.Float methodSoapFloat(java.lang.Float inSoapFloat)\n throws java.rmi.RemoteException;\n public java.lang.Double methodSoapDouble(java.lang.Double inSoapDouble)\n throws java.rmi.RemoteException;\n public java.lang.Boolean methodSoapBoolean(java.lang.Boolean inSoapBoolean)\n throws java.rmi.RemoteException;\n public java.lang.Byte methodSoapByte(java.lang.Byte inSoapByte)\n throws java.rmi.RemoteException;\n public java.lang.Short methodSoapShort(java.lang.Short inSoapShort)\n throws java.rmi.RemoteException;\n public java.lang.Integer methodSoapInt(java.lang.Integer inSoapInt)\n throws java.rmi.RemoteException;\n public java.lang.Long methodSoapLong(java.lang.Long inSoapLong)\n throws java.rmi.RemoteException;\n public void throwInvalidTickerException()\n throws InvalidTickerSymbol, \n java.rmi.RemoteException;\n public void throwInvalidTradeExchange()\n throws InvalidCompanyId, InvalidTradeExchange, InvalidTickerSymbol, \n java.rmi.RemoteException;\n\n // Overloading test\n public int getId(BondInvestment investment) throws java.rmi.RemoteException;\n public int getId(Investment investment) throws java.rmi.RemoteException;\n\n public void holderTest(StringHolder sh, BondInvestmentHolder bih);\n}",
"@Override\n\tpublic void VisitMethodCallNode(MethodCallNode Node) {\n\n\t}",
"@Override\n public SubroutineDescriptor getOverload(List<ExpressionNode> actualParameters) throws LexicalException {\n for (SubroutineDescriptor descriptor : this.overloads) {\n if (this.compareActualWithFormatParameters(descriptor.getFormalParameters(), actualParameters)) {\n return descriptor;\n }\n }\n\n throw new LexicalException(\"Not existing overload for this subroutine\");\n }",
"public abstract String[] getMethodNames();",
"public interface b {\n void a(int i, String str, String str2, String str3);\n\n void a(long j);\n }",
"boolean method_107(boolean var1, class_81 var2);",
"interface C9349bs {\n /* renamed from: a */\n int mo28885a(int i);\n\n /* renamed from: a */\n void mo28886a(int i, double d) throws zzlm;\n\n /* renamed from: a */\n void mo28887a(int i, int i2, zzno zzno) throws IOException, InterruptedException;\n\n /* renamed from: a */\n void mo28888a(int i, long j, long j2) throws zzlm;\n\n /* renamed from: a */\n void mo28889a(int i, String str) throws zzlm;\n\n /* renamed from: b */\n void mo28890b(int i) throws zzlm;\n\n /* renamed from: b */\n void mo28891b(int i, long j) throws zzlm;\n\n /* renamed from: c */\n boolean mo28892c(int i);\n}",
"S op(final S a, final S b);",
"interface dmf {\n void a(int i, double d);\n\n void a(int i, float f);\n\n void a(int i, int i2);\n\n void a(int i, long j);\n\n void a(int i, dik dik);\n\n void a(int i, Object obj);\n\n void a(int i, Object obj, dkw dkw);\n\n void a(int i, boolean z);\n\n void b(int i, int i2);\n\n void b(int i, long j);\n\n @Deprecated\n void b(int i, Object obj, dkw dkw);\n\n void c(int i, int i2);\n\n void c(int i, long j);\n\n void d(int i, int i2);\n\n void d(int i, long j);\n\n void e(int i, int i2);\n\n void e(int i, long j);\n\n void f(int i, int i2);\n}",
"public static String interMethod(int modifiers, UnresolvedType aspectType, UnresolvedType classType, String name) \n \t{\n \t\tif (Modifier.isPublic(modifiers)) return name;\n \t\t//??? might want to handle case where aspect and class are in same package similar to public\n \t\treturn makeName(\"interMethodDispatch2\", makeVisibilityName(modifiers, aspectType), name);\t\n \t}",
"@Override\r\n\tpublic void Method1() {\n\t\t\r\n\t}",
"@Override\n protected String getMethodName() {\n return suitename() + \"-\" + super.getMethodName();\n }",
"ConstuctorOverloading(){\n\t\tSystem.out.println(\"I am non=argument constructor\");\n\t}",
"public static void main(String[] args) {\n\t\t\tmeth(args);\r\n\t\t\targument_test:meth(args);\r\n\t}",
"public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}",
"public void testOneOrMoreParameters() {\n int nrParameters = methodToTest.getParameterTypes().length;\n Class[] params = methodToTest.getParameterTypes();\n Object[] foo = new Object[nrParameters];\n \n // set up all parameters. Some methods are invoked with\n // primitives or collections, so we need to create them\n // accordingly\n for (int i = 0; i < nrParameters; i++) {\n try {\n if (params[i].isPrimitive()) {\n String primitiveName = params[i]\n .getName();\n if (primitiveName.equals(\"int\")) {\n foo[i] = Integer.valueOf(0);\n }\n if (primitiveName.equals(\"boolean\")) {\n foo[i] = Boolean.TRUE;\n }\n if (primitiveName.equals(\"short\")) {\n foo[i] = new Short(\"0\");\n }\n } else if (params[i].getName().equals(\"java.util.Collection\")) {\n foo[i] = new ArrayList();\n } else {\n /*\n * this call could easily fall if there is e.g. no public\n * default constructor. If it fails tweak the if/else tree\n * above to accommodate the parameter or check if we need to\n * test the particular method at all.\n */\n foo[i] = params[i].newInstance();\n }\n } catch (InstantiationException e) {\n fail(\"Cannot create an instance of : \"\n + params[i].getName()\n + \", required for \"\n + methodToTest.getName()\n + \". Check if \"\n + \"test needs reworking.\");\n } catch (IllegalAccessException il) {\n fail(\"Illegal Access to : \"\n + params[i].getName());\n }\n }\n \n try {\n methodToTest.invoke(facade, foo);\n fail(methodToTest.getName()\n + \" does not deliver an IllegalArgumentException\");\n } catch (InvocationTargetException e) {\n if (e.getTargetException() instanceof IllegalArgumentException \n || e.getTargetException() instanceof ClassCastException\n || e.getTargetException() instanceof NotImplementedException) {\n return;\n }\n fail(\"Test failed for \" + methodToTest.toString()\n + \" because of: \"\n + e.getTargetException());\n } catch (NotImplementedException e) {\n // If method not supported ignore failure\n } catch (Exception e) {\n fail(\"Test failed for \" + methodToTest.toString()\n + \" because of: \" + e.toString());\n }\n }",
"public static void main(String[] args) throws ClassNotFoundException {\n\t\t\n\t\tFunctionOverloading func = new OverridingFunction();\n\t\tfunc.function();\n//\t\tfunc.functionOverloading(\"Sravan\");\n//\t\t\n//\t\tfunc.functionOverloading();\n//\t\t\n//\t\tfunc.funtionOver(32);\n//\t\tSystem.out.println(\"Data Member: \"+func.number);\n\t}",
"Method addMethod(PositionString name, Symbol resultType, Iterator<Variable> parameters,\n\t\t\tModifier modifier) throws\n\t\t\tDuplicateIdentifierException, ShadowedIdentifierException, WrongModifierException, InvalidIdentifierException;",
"public static void add(int a,int b){ }",
"Method getMethod(int id, boolean filterObsolete);",
"public boolean sameSubsignature(MethodType other) {\n return sameSignature(other) || sameSignature(other.erase());\n }",
"@Override\npublic void sub(int a, int b) {\n\t\n}",
"private void handleActionFoo(String param1, String param2) {\n // TODO: Handle action Foo\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }",
"private void handleActionFoo(String param1, String param2) {\n // TODO: Handle action Foo\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }",
"private void handleActionFoo(String param1, String param2) {\n // TODO: Handle action Foo\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }",
"private void handleActionFoo(String param1, String param2) {\n // TODO: Handle action Foo\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }",
"private void handleActionFoo(String param1, String param2){\n\t// TODO: Handle action Foo\n\tthrow new UnsupportedOperationException(\"Not yet implemented\");\n }",
"public interface AbstractC2726a {\n /* renamed from: a */\n void mo36480a(int i, int i2, ImageView imageView, Uri uri);\n\n /* renamed from: a */\n void mo36481a(int i, ImageView imageView, Uri uri);\n\n /* renamed from: a */\n void mo36482a(ImageView imageView, Uri uri);\n\n /* renamed from: b */\n void mo36483b(int i, ImageView imageView, Uri uri);\n}",
"public Method getMethodByParameters(String name, Class<?> returnType, Class<?>[] args) {\r\n \t\r\n \t\t// Find the correct method to call\r\n \t\tfor (Method method : getMethods()) {\r\n \t\t\tif (method.getReturnType().equals(returnType) && Arrays.equals(method.getParameterTypes(), args)) {\r\n \t\t\t\treturn method;\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t\t// That sucks\r\n \t\tthrow new RuntimeException(\"Unable to find \" + name + \" in \" + source.getName());\r\n \t}",
"protected abstract void handle(Object... params);",
"public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}",
"@Override\n\tpublic void name1() {\n\t\t\n\t}",
"@Override\n\t\t\t\t\tpublic Method handleSimpleMethod(Element parent, FMethod src) {\n\t\t\t\t\t\treturn super.handleSimpleMethod(parent, src);\n\t\t\t\t\t}",
"public abstract void add(T input, List<Method> methods);",
"public abstract void mo102900a(int i, int i2);",
"public abstract Builder methods(RequestMethod... paramVarArgs);",
"MethodType getMethodType();",
"@Override\r\n\tpublic void method1() {\n\t}",
"abstract protected Set<Method> createMethods();",
"void method16(int aOne)\n {\n }"
]
| [
"0.7265742",
"0.69174397",
"0.67893624",
"0.6499035",
"0.63102424",
"0.62991756",
"0.6238876",
"0.62275845",
"0.6212186",
"0.6200564",
"0.6156836",
"0.5955843",
"0.58426523",
"0.58343863",
"0.58138746",
"0.5801521",
"0.5797013",
"0.5777153",
"0.5762427",
"0.5755801",
"0.5747163",
"0.5734532",
"0.57227975",
"0.5660894",
"0.56569827",
"0.558979",
"0.5586394",
"0.5575308",
"0.555626",
"0.5538343",
"0.5520934",
"0.5508708",
"0.5507991",
"0.55005145",
"0.5472563",
"0.5470985",
"0.54561293",
"0.54432976",
"0.5428178",
"0.54210055",
"0.5388637",
"0.53873295",
"0.53802156",
"0.5372884",
"0.53659856",
"0.5354331",
"0.5346725",
"0.53446376",
"0.533054",
"0.53254545",
"0.52944875",
"0.5284108",
"0.5279924",
"0.5270406",
"0.5270406",
"0.5262438",
"0.52536565",
"0.52536565",
"0.52536416",
"0.5253614",
"0.5244944",
"0.5234899",
"0.52330005",
"0.52305156",
"0.52271414",
"0.52268565",
"0.5206815",
"0.5203778",
"0.51961094",
"0.5188262",
"0.51864386",
"0.51756835",
"0.5171786",
"0.5163871",
"0.5157156",
"0.51566166",
"0.5156177",
"0.5155062",
"0.5122379",
"0.51208544",
"0.5120379",
"0.511522",
"0.5114513",
"0.5112826",
"0.5112826",
"0.5112826",
"0.5112826",
"0.51124126",
"0.51096916",
"0.51088697",
"0.5092013",
"0.508656",
"0.50793546",
"0.50753814",
"0.5065122",
"0.50597167",
"0.5055527",
"0.50441486",
"0.50416017",
"0.5041328",
"0.50358015"
]
| 0.0 | -1 |
Print following chessboard using nested for loops. W B W B W B W B B W B W B W B W W B W B W B W B B W B W B W B W W B W B W B W B B W B W B W B W W B W B W B W B B W B W B W B W NOTE: 1. Total 8 rows and 8 columns. 2. "W" and "B" are in alternate positions (rowwise or columnwise), you will not find consecutive W or B. | public static void main(String[] args) {
int row=8;
int column=8;
for (int i=1; i<=row; i++) {
for (int j=1; i%2==1&&j<=column; j+=2) {
System.out.print("B");
System.out.print("W");
}
for(int k=1;i%2==0 && k<=column; k+=2) {
System.out.print("W");
System.out.print("B");
}
System.out.println();
}
/*!!!! BETTER !!!
*
* for(int i=1;i<=8;i++) {
for(int j=1;j<=8;j++) {
if ((i+j)%2!=0) {
System.out.print("W ");
}else {
System.out.print("B ");
}
}
System.out.println();
}
*/
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void printCheckerboard(int width,int height)\r\n{\n\tfor (int row=0; row<width; row++)\r\n\t{\r\n\r\n\t // for each column in this row\r\n\t for (int col=0; col<height; col++)\r\n\t {\r\n\t\t if (row % 2 == 0)\r\n\t\t\t{\r\n\t\t\t \tif (col % 2 == 0)\r\n\t\t\t \t\t{\r\n\t\t\t \t\t\tSystem.out.print(\"#\");\r\n\t\t\t \t\t}\r\n\t\t\t \tif (col % 1 == 0)\r\n\t\t\t \t\t{\r\n\t\t\t \t\t\tSystem.out.print(\" \");\r\n\t\t\t \t\t}\r\n\t\t\t}\r\n\t\t if (row % 1 == 0)\r\n\t\t {\r\n\t\t\t\tif (col % 2 == 0)\r\n\t\t \t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t \t\t\t}\r\n\t\t\t\r\n\t\t \t\tif (col % 1 == 0)\r\n\t\t \t\t\t{\r\n\t\t \t\t\t\tSystem.out.print(\"#\");\r\n\t\t \t\t\t}\r\n\t\t }\r\n\t\t System.out.println(\"\");\r\n\t }\r\n\t System.out.println(\"\");\r\n\t}\r\n}",
"public void printBoard() {\n \tfor(int i = 7; i >= 0; i--) {\n \t\tfor(int j = 0; j < 8; j++) {\n \t\t\tSystem.out.print(\"\"+getPiece(j, i).getColor().toString().charAt(0)+getPiece(j, i).getName().charAt(0)+\"\\t\");\n \t\t}\n \t\tSystem.out.println();\n \t}\n }",
"public void printBoard() {\n\t\tfor (int row=8; row>=0;row--){\n\t\t\tfor (int col=0; col<9;col++){\n\t\t\t\tSystem.out.print(boardArray[col][row]);\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t}\n\t}",
"private static void showBoard() {\n for (int i = 1; i < 10; i++) {\n for (int j = 1; j < 4; j++) {\n System.out.println(j + \".\" + board[i]);\n }\n\n }\n }",
"public void printBoard(){\n\t\tfor(int row = 0; row <9; row++)\n\t\t{\n\t\t\tfor(int column = row; column<25-row; column++)\n\t\t\t{\n\t\t\t\tBoard[row][column]='O';\n\t\t\t}\n\t\t}\n\t\tfor(int iteration_i = 0;iteration_i<9;iteration_i++){\n\t\t\tfor(int iteration_j=0;iteration_j<25;iteration_j++)\n\t\t\t{\t\n\t\t\t\tif (Board[iteration_i][iteration_j]=='\\u0000')\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\telse\n\t\t\t\t\tSystem.out.print(Board[iteration_i][iteration_j]);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public void printBoard() {\n\t\tSystem.out.print(\"\\r\\n\");\n\t\tSystem.out.println(\" A | B | C | D | E | F | G | H\");\n\t\tfor(int i = BOARD_SIZE ; i > 0 ; i--) {\n\t\t\tSystem.out.println(\" ___ ___ ___ ___ ___ ___ ___ ___\");\n\t\t\tfor(int j = 0; j < BOARD_SIZE ; j++) {\n\t\t\t\tif(j == 0) {\n\t\t\t\t\tSystem.out.print(i + \" |\");\n\t\t\t\t} \n\t\t\t\tif(this.tiles.get(i).get(j).getPiece() != null) {\n\t\t\t\t\tif(this.tiles.get(i).get(j).getPiece().getColor() == PrimaryColor.BLACK) {\n\t\t\t\t\t\tif(this.tiles.get(i).get(j).getPiece() instanceof Soldier)\n\t\t\t\t\t\t\tSystem.out.print(\" B |\");\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tSystem.out.print(\"B Q|\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif(this.tiles.get(i).get(j).getPiece() instanceof Soldier)\n\t\t\t\t\t\t\tSystem.out.print(\" W |\");\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tSystem.out.print(\"W Q|\");\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.print(\" |\");\n\t\t\t\t}\n\n\t\t\t\tif(j==BOARD_SIZE-1) {\n\t\t\t\t\tSystem.out.print(\" \" + i); \n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\tSystem.out.println(\" ___ ___ ___ ___ ___ ___ ___ ___\");\n\t\tSystem.out.println(\" A | B | C | D | E | F | G | H\\r\\n\");\n\n\t}",
"public static void printBoard() {\n\t\tfor (int i = 0; i<3; i++) {\n\t\t\tSystem.out.println();\n\t\t\tfor (int j = 0; j<3; j++) {\n\t\t\t\tif (j == 0) {\n\t\t\t\t\tSystem.out.print(\"| \");\n\t\t\t\t}\n\t\t\t\tSystem.out.print(board[i][j] + \" | \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public static void main(String[] args) {\n boolean[][] board = new boolean[8][8];\n for(int i = 0; i < 8; i++) {\n for(int j = 0; j < 8; j++) {\n board [i][j] = false;\n }\n }\n int row = 3; //can be between -1 and 6 depending where you want first square (row - 2)\n int count = 1;\n int column = 1;\n int addedTrue = 0;\n \n while (count < 9) {\n for(int i = row + 1; i < 8; i++) { \n if(horizontal(board, i) && diagonal(board, column - 1, i)) {\n board[column - 1][i] = true;\n addedTrue++;\n break;\n } \n }\n if(addedTrue == 0) {\n column--;\n count--;\n for(int z = 0; z < 8; z++) {\n if(board[column - 1][z]) {\n row = z;\n board[column - 1][z] = false;\n }\n }\n }\n if(addedTrue == 1) {\n column++;\n count++;\n addedTrue = 0;\n row = -1;\n } \n /*printBoard(board);\n System.out.println(\"\\n\\n\");*/\n }\n printBoard(board);\n }",
"private void boardPrint(){\t\t\n\t\tfor (int i=0;i<size;i++) {\n\t for (int j=0;j<size;j++) {\n\t System.out.print(\" ---- \");\n\t }\n\t System.out.println();\n\t for (int j=0;j<size;j++) {\n\t \tint value = (i*size) + j + 1;\n\t \tif(board[i][j] == '\\u0000'){\n\t \t\tif(value < 10)\n\t \t\t\tSystem.out.print(\"| \"+ value + \" |\");\n\t \t\telse\n\t \t\t\tSystem.out.print(\"| \"+ value + \" |\");\n\t \t}\n\t \telse\n\t \t\tSystem.out.print(\"| \"+ board[i][j] + \" |\");\n\t }\n\t System.out.println();\n\t }\n\n\t for (int i=0;i<size;i++){\n\t \tSystem.out.print(\" ---- \");\n\t }\n\t System.out.println();\n\t}",
"public void print_board(){\n\t\tfor(int i = 0; i < size*size; i++){\n\t\t\tif(i%this.size == 0) System.out.println(); //just for divider\n\t\t\tfor(int j = 0; j < size*size; j++){\n\t\t\t\tif(j%this.size == 0) System.out.print(\" \"); //just for divider\n\t\t\t\tSystem.out.print(board[i][j]+\" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"private static void printBoard(char [][] board){\n for (int i = 0; i < 6; i++){\n for(int j = 0; j < 7; j++){\n System.out.print(\"|\"+board[i][j]);\n }\n System.out.println(\"|\");\n }\n System.out.println();\n }",
"private void printBoard() {\n\n for (int j=Board.getSize()-1; j >= 0; j--) {\n for (int i=0; i < Board.getSize(); i++) {\n // make sure indexes get printed for my pieces\n if (board.layout[i][j] == player) {\n //System.out.print(\" \"+ getPieceIndex(i,j)+ \" \");\n } else {\n System.out.print(\" \"+ board.layout[i][j]+ \" \");\n }\n }\n System.out.print(\"\\n\");\n\n }\n }",
"public static void printBoard() {\n int separatorLen = 67;\n StringBuilder boardString = new StringBuilder();\n boardString.append(new String(new char [separatorLen]).replace(\"\\0\",\"*\"));\n boardString.append(\"\\n\");\n for(int y = Y_UPPER_BOUND - 1; y >= 0; y--)\n {\n boardString.append(y + 1).append(\" \");\n boardString.append(\"*\");\n for (int x = 0; x < X_UPPER_BOUND; x++)\n {\n Piece p = Board.board[x + y * X_UPPER_BOUND];\n if(p != null)\n {\n boardString.append(\" \").append(p).append(p.getColor()? \"-B\":\"-W\").append(\" \").append((p.toString().length() == 1? \" \":\"\"));\n }\n else\n {\n boardString.append(\" \");\n }\n boardString.append(\"*\");\n }\n boardString.append(\"\\n\").append((new String(new char [separatorLen]).replace(\"\\0\",\"*\"))).append(\"\\n\");\n }\n boardString.append(\" \");\n for(char c = 'A'; c <= 'H';c++ )\n {\n boardString.append(\"* \").append(c).append(\" \");\n }\n boardString.append(\"*\\n\");\n System.out.println(boardString);\n }",
"public void printBoard(int[][] board) //creates a user-freindly representation of the board and prints it for the user\n {\n for (int i = 0; i < 9; i++) //n\n {\n if (i == 0) { //1\n System.out.println(\"-------------------------\"); //prints top border of board //1\n }\n \n for (int j = 0; j < 9; j++) //n\n {\n if (j == 0)\n {\n System.out.print(\"| \" + board[i][j] + \" \");\n }\n else if ((j+1) % 3 == 0) // 3\n {\n System.out.print(board[i][j] + \" | \"); //prints divider to separate into sets of 3 columns //3\n }\n else \n {\n System.out.print(board[i][j] + \" \");\n }\n }\n System.out.println(); //1\n\n if ((i+1) % 3 == 0) //3\n {\n System.out.println(\"-------------------------\"); //prints to separate into sets of 3 rows //1\n }\n }\n }",
"public void printBoard() {\n System.out.println(\"---+---+---\");\n for (int x = 0; x < boardLength; x++) {\n for (int y = 0; y < boardWidth; y++) {\n char currentPlace = getFromCoordinates(x, y);\n System.out.print(String.format(\" %s \", currentPlace));\n\n if (y != 2) {\n System.out.print(\"|\");\n }\n }\n System.out.println();\n System.out.println(\"---+---+---\");\n }\n }",
"public void printBoard() {\n\t\tfor (int colIndex = 0; colIndex < 4; colIndex++){\n\t\t\tfor (int rowIndex = 0; rowIndex < 4; rowIndex++){\n\t\t\t\tSystem.out.print(this.myBoard[colIndex][rowIndex] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"private void printBoard(int[][] beard) {\n for (int i = 0; i < 9; i++) {\n System.out.println();\n if (i % 3 == 0 && i != 0) {\n System.out.println();\n }\n for (int j = 0; j < 9; j++) {\n if (j % 3 == 0 && j != 0) {\n System.out.print(\" \");\n }\n if (beard[i][j] == 0) {\n if (counter <= i) {\n System.out.print(\"?\");\n } else {\n System.out.print(\"_\");\n }\n }\n else {\n System.out.print(beard[i][j]);\n }\n System.out.print(\" \");\n }\n }\n System.out.println();\n }",
"public void printBoard() {\n\t\tSystem.out.println();\n\t\tint i;\n\t\tfor (i = 0; i < 7; i++) {\n\t\t\tSystem.out.print(board[13 - i] + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.printf(\" \");\n\t\twhile (i < 14) {\n\t\t\tSystem.out.print(board[i - 7] + \" \");\n\t\t\ti++;\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public static void printBoard() {\n System.out.println(\"\\t-------------\");\n for (int row = 0; row < SIZE_ROW; row++) {\n System.out.print(\"\\t| \");\n for (int col = 0; col < SIZE_COL; col++) {\n System.out.print(board[row][col] + \" | \");\n }\n System.out.println(\"\\n\\t-------------\");\n }\n }",
"public void printboard(){\n \tfor(int i=0;i<9;i+=3){\n\t\t\t System.err.println(board[i]+board[i+1]+board[i+2]);\n\t\t\t}\n }",
"public void printBoard() {\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j <colls; j++) {\n System.out.print(board[i][j]);\n }\n if(i == 0) {\n System.out.print(\" Apples eaten: \" + appleCount);\n }\n System.out.println(\"\");\n }\n }",
"private void printBoard() {\r\n for (int i = 0; i < board.length; i++) {\r\n for (int j = 0; j < board[i].length; j++) {\r\n System.out.print(board[j][i] + \" \");\r\n }\r\n System.out.println();\r\n }\r\n }",
"void draw_board(int x, int y, char[][] _display, char[][] _board) {\n for (int i = 0; i < 65; i++) {\n for (int j = 0; j < 33; j++) {\n if (i%8 == 0 && j%4 == 0) {\n draw_char(x + i + 1, y + j + 1, _display, '+');\n } else if (j%4 == 0) {\n draw_char(x + i + 1, y + j + 1, _display, '-');\n } else if (i%8 == 0) {\n draw_char(x + i + 1, y + j + 1, _display, '|');\n } else {\n draw_char(x + i + 1, y + j + 1, _display, ' ');\n }\n }\n }\n char label_row = '1';\n char label_column = 'A';\n for (int i = 0; i < 8; i++) {\n draw_char(x, \t\t\t\t\t\t\t4 * i + 3 + y, _display, label_row);\n draw_char(x + 66, \t\t\t\t4 * i + 3 + y, _display, label_row);\n draw_char(8 * i + 5 + x, \ty,\t\t\t\t\t\t _display, label_column);\n draw_char(8 * i + 5 + x, \ty + 34,\t\t\t\t _display, label_column);\n label_row ++;\n label_column ++;\n }\n draw_pieces(x, y, _display, _board);\n }",
"static void printBoard() \r\n {\r\n \tSystem.out.println(\"/---|---|---\\\\\");\r\n \tSystem.out.println(\"| \" + board[0][0] + \" | \" + board[0][1] + \" | \" + \r\n \tboard[0][2] + \" |\");\r\n \tSystem.out.println(\"|-----------|\");\r\n \tSystem.out.println(\"| \" + board[1][0] + \" | \" + board[1][1] + \" | \" + \r\n \tboard[1][2] + \" |\");\r\n \tSystem.out.println(\"|-----------|\");\r\n \tSystem.out.println(\"| \" + board[2][0] + \" | \" + board[2][1] + \" | \" + \r\n \tboard[2][2] + \" |\");\r\n \tSystem.out.println(\"\\\\---|---|---/\");\r\n }",
"public void printBoard() {\r\n // Print column numbers.\r\n System.out.print(\" \");\r\n for (int i = 0; i < BOARD_SIZE; i++) {\r\n System.out.printf(\" %d \", i+1);\r\n }\r\n System.out.println(\"\\n\");\r\n\r\n\r\n for (int i = 0; i < BOARD_SIZE; i++) {\r\n System.out.printf(\"%c %c \", 'A' + i, board[i][0].mark);\r\n\r\n for (int j = 1; j < BOARD_SIZE; j++) {\r\n System.out.printf(\"| %c \", board[i][j].mark);\r\n }\r\n\r\n System.out.println(\"\");\r\n\r\n if (i < BOARD_SIZE - 1) {\r\n System.out.print(\" \");\r\n for (int k = 1; k < BOARD_SIZE * 3 + BOARD_SIZE; k++) {\r\n System.out.print(\"-\");\r\n }\r\n System.out.println(\"\");\r\n }\r\n }\r\n System.out.println(\"\");\r\n }",
"public void PrintBoard() {\n\tSystem.out.println(\"printing from class\");\n\t\tString[][] a = this.piece;\n\t\tSystem.out.println(\" 0 1 2 3 4 5 6 7 <- X axis\");\n\t\tSystem.out.println(\" +----------------+ \");\n\t\t\n\t\tfor (int i=0; i<8 ;i++) {\n\t\t\tSystem.out.print(i + \" |\");\n\t\t\tfor (int j=0; j<8;j++) {\n\t\t\t\t\n\t\tSystem.out.print(\"\" + a[i] [j] + \" \");\n\t\t\t\t\t} \n\t\t\tSystem.out.println(\"|\");\n\t\t}\n\t\tSystem.out.println(\" +----------------+ \");\n\t\tSystem.out.println(\" 0 1 2 3 4 5 6 7 \");\n\t\n\t}",
"public void printBoard() {\n\t\t// loop through board and add appropriate character based on board\n\t\t// contents\n\n\t\t// for each board column\n\t\tfor (int row = 0; row < board.length; row++) {\n\t\t\t// for each board row\n\t\t\tfor (int col = 0; col < board[row].length; col++) {\n\t\t\t\tif (board[row][col] == 0) {\n\t\t\t\t\tSystem.out.println(\" \");\n\t\t\t\t} else if (board[row][col] == 1) {\n\t\t\t\t\tSystem.out.println(\"X\");\n\t\t\t\t} else if (board[row][col] == 2) {\n\t\t\t\t\tSystem.out.println(\"0\");\n\t\t\t\t}\n\n\t\t\t\t// set the dividers\n\t\t\t\tif (col < board[row].length) {\n\t\t\t\t\tSystem.out.print(\"|\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"-----\");\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// check if the board is occupied by player X, or player O, or neither\n\t\t// Print the correct character to the screen depending on the contents\n\t\t// of the square\n\t\t// System.out.print(\"stuff\") will print things on the same row\n\n\t\t// System.out.print(\"/n\") or System.out.println() will print a new line\n\t\t// Don't forget to add in the grid lines!\n\t}",
"public static void printBoard() {\n\t\tint i = 0;\n\t\tint j = 0;\n\n\t\t// Row Counter\n\t\tfor (i = 0; i < numPeople; i++) {\n\n\t\t\t// Column Counter\n\t\t\tfor (j = 0; j < numPeople; j++) {\n\t\t\t\tSystem.out.print(board[i][j] + \"\\t\");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\n\t\t}\n\n\t}",
"public static void main(String[] args) {\n // **\r\n\r\n int rows = 6;\r\n int columns = 4;\r\n int i;\r\n int j;\r\n\r\n for (i = 1; i <= rows; i++) {\r\n //System.out.print(\"*\");\r\n //this inner loop runs its course (completely) for EACH TIME the outer loop runs.\r\n for (j = 1; j <= columns; j++) {\r\n if (j == 1 || j == columns || i == 1 || i == rows) {\r\n System.out.print(\"*\");\r\n } else\r\n System.out.print(\"#\");\r\n }\r\n //System.out.print(\"*\");\r\n System.out.println();\r\n }\r\n }",
"public void printBoard(){\n for(int i=0;i<3;i++){\n for(int j=0;j<3;j++){\n if(gameBoard[i][j].equals(\"O\") || gameBoard[i][j].equals(\"X\")){\n if(j<2)\n System.out.print(gameBoard[i][j]+\" | \");\n else\n System.out.print(gameBoard[i][j]);\n }\n else{\n if(j<2)\n System.out.print(\"- | \");\n else\n System.out.print(\"-\");\n }\n\n }\n System.out.print(\"\\n\");\n }\n }",
"public void print()\n {\n System.out.println();\n for (int i = 0; i < 6; i++) {\n for (int j = 0; j < 6; j++) {\n int index=0;\n if(j>2)\n index++;\n if(i>2)\n index+=2;\n char c='○';\n if(blocks[index].getCells()[i%3][j%3]==CellType.Black)\n c='B';\n if(blocks[index].getCells()[i%3][j%3]==CellType.Red)\n c='R';\n System.out.print(c+\" \");\n if(j==2)\n System.out.print(\"| \");\n }\n System.out.println();\n if(i==2)\n System.out.println(\"-------------\");\n }\n }",
"public static void printBoard(){\n \n System.out.println(board[0][0] + \" | \" + board[0][1] + \" | \" + board[0][2]);\n System.out.println(board[1][0] + \" | \" + board[1][1] + \" | \" + board[1][2]);\n System.out.println(board[2][0] + \" | \" + board[2][1] + \" | \" + board[2][2]);\n \n }",
"public void printBoard() {\nString xAxis[] = {\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\"};\n\t\tfor(int k = 0; k <8; k++) {\n\t\t\tSystem.out.print(\"\\t\" + xAxis[k]);\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t\tfor(int i = 0; i<8;i++) {\n\t\t\tSystem.out.print((i + 1) + \"\\t\");\n\t\t\tfor(int j = 0; j<8;j++) {\n\t\t\t\tSystem.out.print(board.getBoard()[i][j] + \"\\t\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\t\tfor(int k = 0; k <8; k++) {\n\t\t\tSystem.out.print(\"\\t\" + xAxis[k]);\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public static void printBoard() {\n\t\tSystem.out.println(\"Board:\");\r\n\t\tfor(int i=0; i<BoardSquare.numberOfSquare; i++) {\r\n\t\t\t\r\n\t\t\tSystem.out.print(String.format(\"%4s\", (i+1) + \":\"));\r\n\t\t\tif(BoardGame.board.get(i).isPlayerOne()) System.out.print(\" P1\"); \r\n\t\t\tif(BoardGame.board.get(i).isPlayerTwo()) System.out.print(\" P2\");\r\n\t\t\tif(BoardGame.board.get(i).isHasCard()) System.out.print(\" C\");\t\t\t\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\t\r\n\t}",
"public void showGameBoard() {\n for (int row = 0; row < BOARD_SIZE; row++) {\n for (int col = 0; col < BOARD_SIZE; col++) {\n System.out\n .printf(\"%3d\", playingBoard[row][col].getMoveNumber());\n if (col == BOARD_SIZE - 1) {\n System.out.println();\n }\n }\n }\n }",
"public void PrintGameBoard(int [][] arr) {\r\n\t\tsb.append(\" | A B C D E F G H I J\");\r\n\t\tSystem.out.println(sb.toString());\r\n\t\tsb.delete(0, sb.length());\r\n\t\tfor (int i = 0; i <arr.length; i++ ) {\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < arr.length; j++) {\r\n\t\t\t\tif (arr[i][j] == 0 || arr[i][j] == 3) {\r\n\t\t\t\t\tsb.append(\"* \");\r\n\t\t\t\t}\r\n\t\t\t\telse if(arr[i][j] == 1) {\r\n\t\t\t\t\tsb.append(\"O \");\r\n\t\t\t\t}\r\n\t\t\t\telse if (arr[i][j] == 2) {\r\n\t\t\t\t\tsb.append(\"X \");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println(i+\"| \"+sb.toString());\r\n\t\t\tsb.delete(0, sb.length());\r\n\t\t}\r\n\t}",
"public void Display_Boards(){\r\n\t\tfor(int i=0; i<13; i++){\r\n\t\t\tdisplay.putStaticLine(myBoard.Display(i)+\" \"+hisBoard.Display(i));\r\n\t\t}\r\n\t}",
"public void drawBoard() {\n String[][] strBoard= new String[4][4];\n for(int x= 0; x<4; x++) {\n for(int y= 0; y<4; y++) {\n if(board[x][y]==0) {\n strBoard[x][y]= \".\";\n }\n else {\n // set color\n if(board[x][y]%3==2) {\n }\n strBoard[x][y]= \"\"+board[x][y];\n }\n }\n }\n \n String line= \"---------------------------------\";\n System.out.println(line);\n for(int x= 0; x<4; x++) {\n for(int y= 0; y<4; y++) {\n System.out.print(\"|\"+strBoard[x][y]+\"\\t\");\n }\n System.out.println(\"|\");\n }\n System.out.println(line);\n }",
"public void printBoard()\n {\n // Print column numbers;\n System.out.print(\" \");\n for (int index = 0; index < columns; index++)\n System.out.print(\" \" + index);\n\n System.out.println();\n\n // Print the row numbers and the board contents.\n for (int index = 0; index < rows; index++)\n {\n System.out.print(index);\n\n for (int index2 = 0; index2 < columns; index2++)\n System.out.print(\" \" + board[index][index2]);\n\n System.out.println();\n }\n\n }",
"public static void m6() {\r\n\tfor(int i=1;i<=5;i++) {\r\n\t\t\r\n\t\tfor(int j=1;j<=(5-i);j++) {\r\n\t\tSystem.out.print(\" \");\t\r\n\t\t}\r\n\t\tchar ch ='A';\r\n\t\tfor(int k =1;k<=i;k++) {\r\n\t\t\tSystem.out.print(ch);\r\n\t\t\tch++;\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}\r\n}",
"public void printBoard() {\n printStream.println(\n \" \" + positions.get(0) + \"| \" + positions.get(1) + \" |\" + positions.get(2) + \"\\n\" +\n \"---------\\n\" +\n \" \" + positions.get(3) + \"| \" + positions.get(4) + \" |\" + positions.get(5) + \"\\n\" +\n \"---------\\n\" +\n \" \" + positions.get(6) + \"| \" + positions.get(7) + \" |\" + positions.get(8) + \"\\n\");\n }",
"public void printBoard() {\r\n\t\tif (getOpenTiles() != 0) {\r\n\t\t\tSystem.out.println(\"\\n\\nCurrent open tiles: \" + getOpenTiles() + \" | Total moves: \" + getMoves() + \" | Current board:\");\r\n\t\t}for (int i = 0; i < gameBoard.length; i++) {\r\n\t\t\tfor (int j = 0; j < gameBoard[i].length; j++) {\r\n\t\t\t\tif (gameBoard[i][j] != 0) {\r\n\t\t\t\t\tSystem.out.print(gameBoard[i][j]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t}System.out.print(\" | \");\r\n\t\t\t}System.out.print(\"\\n--+\");\r\n\t\t\tfor (int k = 0; k < getSize(); k++) {\r\n\t\t\t\tSystem.out.print(\"---+\");\r\n\t\t\t}System.out.println();\r\n\t\t}\r\n\t}",
"public static void m9() {\r\n\tfor(int i =1;i<=5;i++) {\r\n\t\t\r\n\t for(int j =1;j<=i;j++) {\r\n\t\t System.out.print(\" \");\r\n\t }\r\n\t char ch ='A';\r\n\t for(int k=0;k<=(5-i);k++) {\r\n\t System.out.print(ch);\r\n\t ch++;\r\n\t }\r\n\t System.out.println();\r\n\t}\r\n}",
"void draw_pieces(int x, int y, char[][] _display, char[][] _board) {\n for (int i = 0; i < 8; i++) {\n for (int j = 0; j < 8; j++) {\n switch (_board[i][j]) {\n case ' ':\n break;\n case 'p':\n draw_text(i*8 + 2 + x, j*4 + 2 + y, _display, \" _ \" );\n draw_text(i*8 + 2 + x, j*4 + 2 + y + 1, _display, \" (_) \" );\n draw_text(i*8 + 2 + x, j*4 + 2 + y + 2, _display, \" /_\\\\ \");\n break;\n case 'r':\n draw_text(i*8 + 2 + x, j*4 + 2 + y, _display, \" [###] \" );\n draw_text(i*8 + 2 + x, j*4 + 2 + y + 1, _display, \" |_| \" );\n draw_text(i*8 + 2 + x, j*4 + 2 + y + 2, _display, \" /___\\\\ \");\n break;\n case 'k':\n draw_text(i*8 + 2 + x, j*4 + 2 + y, _display, \" /\\\\_ \" );\n draw_text(i*8 + 2 + x, j*4 + 2 + y + 1, _display, \" / o = \" );\n draw_text(i*8 + 2 + x, j*4 + 2 + y + 2, _display, \" \\\\ \\\\ \");\n break;\n case 'b':\n draw_text(i*8 + 2 + x, j*4 + 2 + y, _display, \" O \" );\n draw_text(i*8 + 2 + x, j*4 + 2 + y + 1, _display, \" ( ) \" );\n draw_text(i*8 + 2 + x, j*4 + 2 + y + 2, _display, \" / \\\\ \");\n break;\n case 'q':\n draw_text(i*8 + 2 + x, j*4 + 2 + y, _display, \" \\\\\\\\|// \");\n draw_text(i*8 + 2 + x, j*4 + 2 + y + 1, _display, \" )_( \" );\n draw_text(i*8 + 2 + x, j*4 + 2 + y + 2, _display, \" /___\\\\ \" );\n break;\n case 'K':\n draw_text(i*8 + 2 + x, j*4 + 2 + y, _display, \" [###] \" );\n draw_text(i*8 + 2 + x, j*4 + 2 + y + 1, _display, \" (___) \" );\n draw_text(i*8 + 2 + x, j*4 + 2 + y + 2, _display, \" /___\\\\ \");\n break;\n default:\n break;\n }\n }\n }\n }",
"public static void main(String[] args) {\n\t\tint length = 9;\n\t\tint counter = 1;\n\t\t\tfor ( int x = (length+1)/2; x<=length;x++){\n\t\t\t\tfor (int j = x-counter; j>=0; j--){\n\t\t\t\t\t//System.out.println(\"j is \"+ j);\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t}\n\t\t\t\tfor (int i =1;i<=counter;i++){\n\t\t\t\t\t\t\n\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println();\n\t\t\t\tcounter+=2;\n\t\t\t}\n\t\t\tcounter = length-2;\n\t\t\t\n\t\t\t// length = 9, counter is 7 , j = 1, i = 7, x=8\n\t\t\tfor ( int x = (length-1); x>=(length+1)/2; x--){\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t\tfor (int j = 1; j<=x-counter; j++){\n\t\t\t\t\t//System.out.println(\"j is \"+ j);\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\tfor (int i =counter;i>=1;i--){\n\t\t\t\t\t\t\n\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}\n\t\t\t\tcounter-=2;\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t}",
"public void printBoard(){\n for (int i = 0; i < boardRows ; i++) {\n for (int j = 0; j < boardColumns; j++) {\n if(this.currentBoardState[i][j] == 0){\n System.out.print(\"0 \");\n }else{\n System.out.print(currentBoardState[i][j] + \" \");\n }\n }\n System.out.println();\n }\n }",
"public static void printBoard(char[][] board) {\n\t\tfor(int i=0; i<3; i++) {\n\t\t\tfor(int j=0; j<3; j++) {\n\t\t\t\tboard[i][j] = '-';\n\t\t\t\tSystem.out.print(board[i][j]);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public void displayBoard() {\n newLine();\n for (int row = _board[0].length - 1; row >= 0; row -= 1) {\n String pair = new String();\n for (int col = 0; col < _board.length; col += 1) {\n pair += \"|\";\n pair += _board[col][row].abbrev();\n }\n System.out.println(pair + \"|\");\n newLine();\n }\n }",
"private void displayBoard(Board board)\n {\n for (int i = 0; i < size; i++)\n {\n System.out.print(\"|\");\n for (int j = 0; j < size; j++)\n \n System.out.print(board.array[i][j] + \"|\");\n System.out.println();\n }\n }",
"public void displayBoard()\n {\n System.out.println(\"\");\n System.out.println(\" Game Board \");\n System.out.println(\" ---------------------------------\");\n for (int i = 0; i < ROW; i++)\n {\n System.out.print(i+1 + \" | \");\n for (int j = 0; j < COL; j++)\n {\n //board[i][j] = \"A\";\n System.out.print(board[i][j].getPieceName() + \" | \");\n }\n System.out.println();\n }\n System.out.println(\" ---------------------------------\");\n\n System.out.println(\" a b c d e f g h \");\n }",
"public void printBoard(){\n for(int r = 0; r < board.length; r++){\n for(int c = 0; c < board[0].length; c++){\n if(board[r][c].isMine()){\n System.out.print(\"X \");\n } else{\n System.out.print(board[r][c].getValue() + \" \");\n }\n }\n System.out.println();\n }\n }",
"public static void main(String[] args) {\n\r\n\t\t\r\n\t\tfor(int i=1;i<=4;i++)\r\n\t\t{\r\n\t\t\tfor(int j=1;j<=8;j=j*2)\r\n\t\t\t{\r\n\t\t\t\tif(j%2==0)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"#\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\r\n\t}\r\n\r\n}",
"public void display() { \r\n\t\tfor (int i=0; i<3; i++){ \r\n\t\t\tSystem.out.print(\"|\"); \r\n\t\t\tfor (int j=0; j<3; j++){ \r\n\t\t\t\tSystem.out.print(board[i][j] + \"|\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println(); \r\n\t\t}\r\n\t\tSystem.out.println(); \r\n\t}",
"public static void main(String[] args) {\n\r\n\t\t\r\n\t\tint n = 7;\r\n\t\tfor (int i = n; i >= 0; i--) {\r\n\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t for(int j=0; j<n-i; j++) {\r\n\t\t\t \r\n\t\t\t System.out.print(\" \");\r\n\t\t\t \r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t \r\n\r\n\t\t\tfor (int j = n; j >= n-i; j--) {\r\n\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t}\r\n\r\n\t\t\r\n\t}",
"public static void displayboard(String board[][]){\n\t\tint rowindicator[]=new int[boardwidth+1];\n\t\tint rowcount=1;\n\t\tfor(int i=1;i<=boardwidth;i++){\n\t\t\trowindicator[i]=rowcount;\n\t\t\trowcount++;\n\t\t}\n\t\tint columnindicator[]=new int[boardlength+1];\n\t\tint columncount=1;\n\t\tfor(int i=1;i<=boardlength;i++){\n\t\t\tcolumnindicator[i]=columncount;\n\t\t\tcolumncount++;\n\t\t}\n\t\tSystem.out.print(\"\\n \");\n\t\tfor(int i=1;i<=boardlength;i++){\n\t\t\t//displays column indicator\n\t\t\tSystem.out.print(\" \"+columnindicator[i]);\n\t\t}\n\t\t//displays board\n\t\tSystem.out.println(\"\");\n\t\tfor(int x=1;x<=boardwidth;x++){\n\t\t\t//displays row indicator\n\t\t\tSystem.out.print(\" \"+rowindicator[x]);\n\t\t\tfor(int i=1;i<=boardlength;i++){\n\t\t\t\tSystem.out.print(\" \"+board[x][i]);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public void printBoard(){\n if(this.isEmpty()){\n System.out.println(\"Board empty: place anything\");\n } else {\n\n System.out.println(\"Dominos played:\");\n for (Dominos s : this) {\n if(this.indexOf(s)%2==0) {\n System.out.print(\"[\" + s.toString() + \"]\" + \" \");\n }\n }\n System.out.println();\n System.out.print(\" \");\n for (Dominos s : this) {\n if(this.indexOf(s)%2==1) {\n System.out.print(\"[\" + s.toString() + \"]\" + \" \");\n }\n }\n System.out.println();\n\n\n// System.out.println(\"Left domino: \" + this.getFirst()\n// + \", Right Domino: \" + this.getLast());\n }\n }",
"public static void main(String[] args) {\n\t\tfor (int i = 1; i <= 7; i++) { //outer loop for 7 rows\n\t\t String print=\"\";\n\t\t for(int j = 1; j <= i; j++) { //inner loop\n\t\t print=print+i;\n\t\t }\n\t\t System.out.println(print);\n\t\t}\n\n\t}",
"public void printTiles() {\r\n for (int row=0; row<BOARD_MAX_WIDTH; row++) {\r\n for (int col=0; col<BOARD_MAX_WIDTH; col++) {\r\n System.out.print(tiles[row][col]);\r\n }\r\n System.out.println();\r\n }\r\n System.out.println();\r\n }",
"public static boolean isBlackWin(char[][] board){\r\n for (int r= 0; r < 6; r++ ){\r\n for (int c = 0; c < 7; c++){\r\n if (r < 3){\r\n if (board [r][c] =='b' && board [r + 1][c] =='b' && board [r + 2][c] =='b' && board [r + 3][c] =='b' ){\r\n return true;\r\n }\r\n }\r\n if (c < 4){\r\n if (board [r][c] =='b' && board [r][c + 1] =='b' && board [r ][c + 2] =='b' && board [r][c + 3] =='b' ){\r\n return true;\r\n }\r\n }\r\n\r\n \r\n }\r\n }\r\n \r\n for (int r = 0; r < 3; r++){\r\n for (int c = 0; c < 4; c++){\r\n if (board [r][c] =='b' && board [r + 1][c +1 ] =='b' && board [r + 2][c +2] =='b' && board [r + 3][c +3 ] =='b' ){\r\n return true; }\r\n }\r\n }\r\n\r\n for (int r = 0; r < 3 ; r++){\r\n for (int c = 6; c > 2; c--){\r\n if (board [r][c] =='b' && board [r + 1][c - 1 ] =='b' && board [r + 2][c - 2] =='b' && board [r + 3][c - 3 ] =='b' ){\r\n return true; }\r\n }\r\n }\r\n return false;\r\n }",
"public void printGrid(){\n\t\tfor (int i = 0; i < 8; i++){\n\t\t\tfor (int j = 0; j < 8; j++)\n\t\t\t\tSystem.out.print(Grid[i][j]+\" \"); \n\t\t\tSystem.out.println(); \n\t\t}\n\t}",
"static void showBoard() \n\t{\n\t\tSystem.out.println(\"|---|---|---|\");\n\t\tSystem.out.println(\"| \" + tictactoeBoard[1] + \" | \" + tictactoeBoard[2] + \" | \" + tictactoeBoard[3] + \" |\");\n\t\tSystem.out.println(\"|-----------|\");\n\t\tSystem.out.println(\"| \" + tictactoeBoard[4] + \" | \" + tictactoeBoard[5] + \" | \" + tictactoeBoard[6] + \" |\");\n\t\tSystem.out.println(\"|-----------|\");\n\t\tSystem.out.println(\"| \" + tictactoeBoard[7] + \" | \" + tictactoeBoard[8] + \" | \" + tictactoeBoard[9] + \" |\");\n\t\tSystem.out.println(\"|---|---|---|\");\n\t}",
"public static void main(String[] args) {\n int i= 1; int j=1;\r\n\t\t/*for(i=1; i<=6; i++){\r\n\t\t\tfor(j=1; j<=6-i; j++){\r\n\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t }\r\n\t\t\t for(j=1; j<=i; j++){\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t } for(j=1; j<=6; j++){\r\n\t\t} System.out.print(\"*\");\r\n\t\t System.out.println();\r\n\t\t}\r\n\t\t*/\r\n\t\r\nfor(i=1; i<=7;i++){\r\n\tfor(j=1; j<=7-i; j++){\r\n\t\tSystem.out.println(\" \");\r\n\t}\r\n\tfor(j=1; j<=i; j++){\r\n\t\tSystem.out.print(\"*\");\r\n\t\r\n\t}\r\n}\r\n\r\n\t\t\r\n\t\t/*int num = 6;\r\n\t\tfor(i=1; i<=num; i++){\r\n\t\t\tfor(j=1; j<=num+1-i; j++){\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t*/\r\n\t\t\r\n\t\tint num = 6;\r\n\t\tfor(i=1; i<=num; i++){\r\n\t\t\tfor(j=1; j<=num+6-i; j++){\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t/******* i=1 *=6\r\n\t\t***** i=2 *=5\r\n\t\t**** i=3 *=4\r\n\t\t*** i=4 *=3\r\n\t\t** i=5 *=2\r\n\t\t* i=6 *=1\r\n\t\t *=7 -i=6+1-i=num+1-i\r\n\t\t*/\r\n\t\t\r\n\t\t\r\n\t/*\t****** i=1 * =6\r\n\t\t ***** i=2 * = 5\r\n\t\t ***\r\n\t\t **\r\n\t\t *\r\n\t\t\r\n\t*/\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tfor(i=1; i<=num; i++){\r\n\t\t\tfor(j=1; j<=i-1; j++){\r\n\t\t\t\tSystem.out.println(\" \");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"public static void drawBoard(){\n\t\tSystem.out.println(\"\\n\\t A B C\");\r\n\t\tSystem.out.println(\"\\t .-----------.\");\r\n\t\tSystem.out.println(\"\\t1 |_\"+TicTac.place[0]+\"_|_\"+TicTac.place[1]+\"_|_\"+TicTac.place[2]+\"_|\\n\");\r\n\t\tSystem.out.println(\"\\t2 |_\"+TicTac.place[3]+\"_|_\"+TicTac.place[4]+\"_|_\"+TicTac.place[5]+\"_|\\n\");\r\n\t\tSystem.out.println(\"\\t3 |_\"+TicTac.place[6]+\"_|_\"+TicTac.place[7]+\"_|_\"+TicTac.place[8]+\"_|\");\r\n\t\tSystem.out.println(\"\\t '-----------'\");\r\n\t}",
"public static void main(String[] args) {\n char[][] a = {\n {'O','X','O'},\n {'X','X','O'},\n {'O','O','X'}\n };\n\n//Display the board.\n\n/**@helpDescription(each element of the array is accessed by using a nested for loop. the first loop gets the character arrays of a, the nested loop iterates through each character, one array at a time . question_1: Please explain what does the following for loop does ? answer_1: ach element of the array is accessed by using a nested for loop. the first loop gets the character arrays of a, the nested loop iterates through each character, one array at a time .)**/\n System.out.println(\"------------\");\n for (char[] innerArray: a) {\n for(char data: innerArray) {\n System.out.print(data+\" | \");\n }\n System.out.println();\n System.out.println(\"------------\");\n }\n }",
"public static void main(String[] args) {\n\t\tfor(int j=0;j<8;j++){\n\t\t\tfor(int i=0;i<8;i++){\n\t\t\t\t//上下两侧\n\t\t\t\tif(j==0||j==7){\n\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}else{\n\t\t\t\t\t//中间\n\t\t\t\t\tif(i>0&&i<7){\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"private void displayBoard() {\r\n\r\n for (int r = 0; r < 8; r++) {\r\n for (int c = 0; c < 8; c++) {\r\n if (model.pieceAt(r, c) == null)\r\n board[r][c].setIcon(null);\r\n else if (model.pieceAt(r, c).player() == Player.WHITE) {\r\n if (model.pieceAt(r, c).type().equals(\"Pawn\"))\r\n board[r][c].setIcon(wPawn);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Rook\"))\r\n board[r][c].setIcon(wRook);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Knight\"))\r\n board[r][c].setIcon(wKnight);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Bishop\"))\r\n board[r][c].setIcon(wBishop);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Queen\"))\r\n board[r][c].setIcon(wQueen);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"King\"))\r\n board[r][c].setIcon(wKing);\r\n } else if (model.pieceAt(r, c).player() == Player.BLACK) {\r\n if (model.pieceAt(r, c).type().equals(\"Pawn\"))\r\n board[r][c].setIcon(bPawn);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Rook\"))\r\n board[r][c].setIcon(bRook);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Knight\"))\r\n board[r][c].setIcon(bKnight);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Bishop\"))\r\n board[r][c].setIcon(bBishop);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Queen\"))\r\n board[r][c].setIcon(bQueen);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"King\"))\r\n board[r][c].setIcon(bKing);\r\n }\r\n repaint();\r\n }\r\n }\r\n if (model.inCheck(Player.WHITE))\r\n JOptionPane.showMessageDialog(null, \"White King in Check\");\r\n if (model.inCheck(Player.BLACK))\r\n JOptionPane.showMessageDialog(null, \"Black King in Check\");\r\n if (model.movingIntoCheck())\r\n JOptionPane.showMessageDialog(null, \"Cannot move into check\");\r\n if (model.isComplete())\r\n JOptionPane.showMessageDialog(null, \"Checkmate\");\r\n }",
"public void printVisitedCells()\r\n\t{\r\n\t\tSystem.out.print(\"+ +\");\r\n\t\tfor (int i = 1; i < this.getWidth(); i++)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"-+\");\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\r\n\t\tfor (int i = 0; i < this.getHeight(); i++)\r\n\t\t{\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < this.getWidth(); j++)\r\n\t\t\t{\r\n\t\t\t\tCell c = this.getCellAt(i, j);\r\n\t\t\t\t// if cells are connected, no wall is printed in between them\r\n\t\t\t\tif (c.hasDoorwayTo(Cell.WEST))\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(\"|\");\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif(c.getDiscoveryTime() != -1)\r\n\t\t\t\t\tSystem.out.print(c.getDiscoveryTime() % 10);\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"|\");\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < this.getWidth(); j++)\r\n\t\t\t{\r\n\t\t\t\tCell c = this.getCellAt(i, j);\r\n\t\t\t\tSystem.out.print(\"+\");\r\n\r\n\t\t\t\tif (c.hasDoorwayTo(Cell.SOUTH) || c == this.getCellAt(getHeight()-1, getWidth()-1))\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"+\");\r\n\t\t}\r\n\t}",
"public static void printBoard(char[][] board) {\n\t\tfor (int i = 0; i < SIZE_OF_BOARD; ++i) {\n\t\t\tfor (int j = 0; j < SIZE_OF_BOARD; ++j) {\n\t\t\t\tSystem.out.print('[');\n\t\t\t\tSystem.out.print(board[i][j]);\n\t\t\t\tSystem.out.print(']');\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public void printBoard() {\n System.out.println(\"Updated board:\");\n for (int row = 0; row < size; row++) {\n for (int col = 0; col < size; col++) {\n\n System.out.print(grid[row][col] + \" \");\n\n }\n System.out.println(\"\");\n }\n }",
"void print() {\n for (int i = 0; i < 8; i--) {\n System.out.print(\" \");\n for (int j = 0; j < 8; j++) {\n System.out.print(_pieces[i][j].textName());\n }\n System.out.print(\"\\n\");\n }\n }",
"public static void printBoard(String[][] ticTacToeBoard) {\n\t\t\n\t\tString printElement1 = \"\", printElement2=\"\", printElement3=\"\";\n\n\t\tfor (int i = 0; i < 3; i++) {\n\n\t\t\tif (ticTacToeBoard[i][0] == \"\") {\n\t\t\t\tprintElement1 = \"-\";\n\t\t\t} else if (ticTacToeBoard[i][0] !=\"\") {\n\n\t\t\t\tprintElement1 = ticTacToeBoard[i][0];\n\t\t\t}\n\n\t\t\tif (ticTacToeBoard[i][1] == \"\") {\n\t\t\t\tprintElement2 = \"-\";\n\t\t\t} else if (ticTacToeBoard[i][1] != \"\") {\n\t\t\t\tprintElement2 = ticTacToeBoard[i][1];\n\t\t\t}\n\n\t\t\tif (ticTacToeBoard[i][2] == \"\") {\n\t\t\t\tprintElement3 = \"-\";\n\t\t\t} else if (ticTacToeBoard[i][2] != \"\") {\n\t\t\t\tprintElement3 = ticTacToeBoard[i][2];\n\t\t\t}\n\n\t\t\t System.out.println(printElement1 + \" |\" + printElement2 + \" |\"+\n\t\t\t printElement3);\n\n\t\t}\n\n\t}",
"public void print()\n {\n System.out.println(\"------------------------------------------------------------------\");\n System.out.println(this.letters);\n System.out.println();\n for(int row=0; row<8; row++)\n {\n System.out.print((row)+\"\t\");\n for(int col=0; col<8; col++)\n {\n switch (gameboard[row][col])\n {\n case B:\n System.out.print(\"B \");\n break;\n case W:\n System.out.print(\"W \");\n break;\n case EMPTY:\n System.out.print(\"- \");\n break;\n default:\n break;\n }\n if(col < 7)\n {\n System.out.print('\\t');\n }\n\n }\n System.out.println();\n }\n System.out.println(\"------------------------------------------------------------------\");\n }",
"public void paint() {\n for (int row = 0; row < ROWS; ++row) {\n for (int col = 0; col < COLS; ++col) {\n cells[row][col].paint();\n if (col < COLS - 1) System.out.print(\"|\");\n }\n System.out.println();\n if (row < ROWS - 1) {\n System.out.println(\"-----------\");\n }\n }\n }",
"public static void drawBoard(ArrayList<Integer> brd){\n\n clearScreen();\n\n /*\n | | | |\n | | | |\n | | | |\n */\n String p = \"\"; // what to print out\n for (int i = 0; i < brd.size(); i++) { // looping through the board\n String put = \"\"; // what will appear in the console\n int z = brd.get(i); // value of the current square\n if (z == 1) { // value is 1 which means it is an x square\n put = \"x\";\n } else if (z == 2) { // value is 2 which means it is an o square\n put = \"o\";\n } else if (z == 0) { // value is 0 which means it hasn't been claimed yet.\n // finding the row and column\n if (i == 0 || i == 1 || i == 2) {\n put = \"a\" + (i+1);\n }\n if (i == 3 || i == 4 || i == 5) {\n put = \"b\" + ((i-3) + 1);\n }\n if (i == 6 || i == 7 || i == 8) {\n put = \"c\" + ((i-6) + 1);\n }\n }\n\n // formatting\n p += \"| \" + put + \" \";\n if (i == 2 || i == 5 || i == 8) {\n p += \"|\\n\"; // closing off rows.\n \n }\n //System.out.println(i + \" \" + brd.get(i));\n }\n System.out.println(p); // display the board\n }",
"public void ShowBoard(){\n System.out.println(\" ___________{5}_____{4}_____{3}_____{2}_____{1}_____{0}____________\");\n System.out.println(\"| ____ ____ ____ ____ ____ ____ ____ ____ |\");\n System.out.printf(\"| | | [_%2d_] [_%2d_] [_%2d_] [_%2d_] [_%2d_] [_%2d_] | | |\\n\",\n this.gameBoard[5], this.gameBoard[4], this.gameBoard[3],\n this.gameBoard[2], this.gameBoard[1], this.gameBoard[0]);\n System.out.println(\"| | | | | |\");\n System.out.printf(\"| | %2d | ____ ____ ____ ____ ____ ____ | %2d | |\\n\",\n this.gameBoard[6], this.gameBoard[13]);\n System.out.printf(\"| |____| [_%2d_] [_%2d_] [_%2d_] [_%2d_] [_%2d_] [_%2d_] |____| |\\n\",\n this.gameBoard[7], this.gameBoard[8], this.gameBoard[9],\n this.gameBoard[10], this.gameBoard[11], this.gameBoard[12]);\n System.out.println(\"|_________________________________________________________________|\");\n }",
"public static void main(String[] args) {\n\t\tfor (int i=8; i>=1; i--){\n\t\t\tfor (int j=1; j<=6; j++){\n\t\t\t\tif((7<=i&&i<=8)&&(5<=j&&j<=6)) \n\t\t\t\t\tbreak;\n\t\t\t\telse if((5<=i&&i<=6)&&(4<=j&&j<=5))\n\t\t\t\t\tcontinue;\n\t\t\t\telse if((i==1)&&(4<=j&&j<=5)){\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tSystem.out.print((i*100+j)+\" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\t\t\t\n\t}",
"public void printBoard(Tile[][] gameState) {\n\t\tint boardSize = gameState.length;\n\t\tSystem.out.println(printBoardLine());\n\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\tfor (int j = 0; j < boardSize; j++) {\n\t\t\t\tSystem.out.print(\"|\");\n\t\t\t\tif (gameState[i][j].getColorValue().equals(black)) {\n\t\t\t\t\tSystem.out.print(\" b \");\n\t\t\t\t} else if (gameState[i][j].getColorValue().equals(white)) {\n\t\t\t\t\tSystem.out.print(\" w \");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"|\");\n\t\t\tSystem.out.println(printBoardLine());\n\t\t}\n\t}",
"public void showBoard() {\n System.out.println(\"The board is\");\n System.out.println(\"| 1 | 2 | 3 |\\n| 4 | 5 | 6 | \\n| 7 | 8 | 9 |\");\n }",
"public static void m12() {\r\n\tint m =1;\r\n\tfor(int i =1;i<=4;i++) {\r\n\t\tfor(int j =1;j<=(4-i);j++) {\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t\tchar ch ='A';\r\n\t\tfor(int k =1;k<=m;k++) {\r\n\t\t\tSystem.out.print(ch);\r\n\t\t\tch++;\r\n\t\t}\r\n\t\tm+=2;\r\n\t\tSystem.out.println();\r\n\t}\r\n}",
"public void printPuzzle() {\n\t\tSystem.out.print(\" +-----------+-----------+-----------+\\n\");\n\t\tString value = \"\";\n\t\tfor (int row = 0; row < puzzle.length; row++) {\n\t\t\tfor (int col = 0; col < puzzle[0].length; col++) {\n\t\t\t\t// if number is 0, print a blank\n\t\t\t\tif (puzzle[row][col] == 0) value = \" \";\n\t\t\t\telse value = \"\" + puzzle[row][col];\n\t\t\t\tif (col % 3 == 0)\n\t\t\t\t\tSystem.out.print(\" | \" + value);\n\t\t\t\telse\n\t\t\t\t\tSystem.out.print(\" \" + value);\n\t\t\t}\n\t\t\tif ((row + 1) % 3 == 0)\n\t\t\t\tSystem.out.print(\" |\\n +-----------+-----------+-----------+\\n\");\n\t\t\telse\n\t\t\t\tSystem.out.print(\" |\\n\");\n\t\t}\n\t}",
"public void printCells()\r\n {\r\n for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n {\r\n for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n {\r\n System.out.println(\"Columns: \" + columns + \"Row: \" + rows + \" \" + cellGrid[columns][rows].isAlive());\r\n } // end of for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n } // end of for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n }",
"public static void main(String[] args) {\n\r\n\t\tfor(int i = 1; i <= 6; i++) {\r\n\t\t\tSystem.out.print(\"*\");\r\n\t\t}\r\n\t\tSystem.out.println(\"\\n\");\r\n\t\t\r\n\t\t\r\n\t\tfor(int j = 1; j <= 4; j++) {\r\n\t\t\tfor(int i = 1; i <= 6; i++) {\r\n\t\t\t\tSystem.out.print('*');\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t/*\t\t\t\tj(行号)\t\tk(*的个数)\r\n\t\t*\t\t\t\t1\t\t\t1\r\n\t\t**\t\t\t\t2\t\t\t2\r\n\t\t***\t\t\t\t3\t\t\t3\r\n\t\t****\t\t\t4\t\t\t4\r\n\t\t*****\t\t\t5\t\t\t5\r\n\t\t*/\r\n\t\t\r\n\t\tfor (int j = 1; j <= 5;j++) {//控制行数\r\n\t\t\tfor(int k = 1; k <= j; k++) {//控制列数\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t/*\t\t\t\tj(行号)\t\tk(*的个数)\t规律:j + k = 5 换句话说:k = 5 - j;\r\n\t\t****\t\t\t1\t\t\t4\r\n\t\t***\t\t\t\t2\t\t\t3\r\n\t\t**\t\t\t\t3\t\t\t2\r\n\t\t*\t\t\t\t4\t\t\t1\r\n\t\t*/\r\n\t\t\r\n\t\tfor (int j = 1; j <= 4;j++) {//控制行数\r\n\t\t\tfor(int k = 1; k <= 5 - j; k++) {//控制列数\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\r\n\t}",
"private static void printBoard(char[][] board) {\n\n\t\t// header\n\t\tfor (int i = 0; i < board.length; i++) {\n\t\t\tSystem.out.print(\"- \");\n\t\t}\n\n\t\tSystem.out.println();\n\n\t\tfor (int i = 0; i < board.length; i++) {\n\t\t\tfor (int j = 0; j < board[0].length; j++) {\n\t\t\t\tSystem.out.print(board[i][j] + \" \");\n\t\t\t}\n\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\t// footer\n\t\tfor (int j = 0; j < board.length; j++) {\n\t\t\tSystem.out.print(\"- \");\n\t\t}\n\n\t\tSystem.out.println();\n\t}",
"private static void showBoard()\n {\n System.out.println(board[1] + \" | \" + board[2] + \" | \" + board[3]);\n System.out.println(\"----------\");\n System.out.println(board[4] + \" | \" + board[5] + \" | \" + board[6]);\n System.out.println(\"----------\");\n System.out.println(board[7] + \" | \" + board[8] + \" | \" + board[9]);\n }",
"public void printGrid() {\n // Creation of depth Z\n for (int d = 0; d < grid[0][0].length; d++) {\n System.out.println(\"\");\n int layer = d + 1;\n System.out.println(\"\");\n System.out.println(\"Grid layer: \" + layer);\n // Creation of height Y\n for (int h = 1; h < grid.length; h++) {\n System.out.println(\"\");\n // Creation of width X\n for (int w = 1; w < grid[0].length; w++) {\n if (grid[h][w][d] == null) {\n System.out.print(\" . \");\n } else {\n String gridContent = grid[h][w][d];\n char identifier = gridContent.charAt(0);\n\n int n = 0;\n if(grid[h][w][d].length() == 3) {\n n = grid[h][w][d].charAt(2) % 5;\n } else if (grid[h][w][d].length() == 2) {\n n = grid[h][w][d].charAt(1)%5;\n }\n if(n == 0) n = 6;\n\n // Labelling\n if (identifier == 'G' && grid[h][w][d].length() == 3) {\n System.out.print(\"\\033[47m\");\n System.out.print(grid[h][w][d]);\n System.out.print(\"\\033[0m\");\n } else if (identifier == 'G') {\n System.out.print(\"\\033[47m\");\n System.out.print(grid[h][w][d]);\n System.out.print(\"\\033[0m\");\n System.out.print(\" \");\n } else if (identifier == 'L' && grid[h][w][d].length() == 3) {\n System.out.print(\"\\033[3\"+ n + \"m\");\n System.out.print(grid[h][w][d]);\n System.out.print(\"\\033[0m\");\n } else if (identifier == 'L') {\n System.out.print(\"\\033[3\"+ n + \"m\");\n System.out.print(grid[h][w][d]);\n System.out.print(\"\\033[0m\");\n System.out.print(\" \");\n }\n }\n }\n }\n }\n System.out.println(\"\");\n }",
"public static void main(String[] args) {\r\n\t\t\r\n\t\tint cols=7;\r\n\t\t\r\n\t\tfor(int i=1; i<=13; i++) {\r\n\t\t\t\r\n\t\t\tfor(int j=1; j<=cols; j++) {\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.print(j+\" \");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t\t\r\n\t\t\tif(i<7) cols--;\r\n\t\t\telse cols++;\r\n\t\t}\r\n\r\n\t}",
"public static void printGameBoard(char[][] gameBoard){\n for(char[] row: gameBoard){\n for(char col: row){\n System.out.print(col);\n }\n System.out.println();\n }\n }",
"public void showBoardState() {\n System.out.print(\" \");\n //top row X axis\n for(int i = 0; i < boardSize; i++){\n System.out.print(\" \" + i + \" \");\n }\n System.out.println();\n for (int i = 0; i < boardSize; i++) {\n //conversion 0-9 to char for display as Y axis\n System.out.print(\" \" + (char)(i + 'A') + \" \");\n for (int j = 0; j < boardSize; j++) {\n System.out.print(\" \" + board[i][j] + \" \");\n }\n System.out.println();\n\n }\n System.out.println();\n }",
"private static void printMatrix(char[][] board) {\n\t\tint row = board.length;\n\t\tint col = board[0].length;\n\t\tfor(int i=0; i<row; i++){\n\t\t\t\n\t\t\tfor(int j=0; j<col; j++){\n\t\t\t\t\n\t\t\t\tSystem.out.print(\" \" + board[i][j]+\"\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t}",
"public void print(){\n for (int i=0; i<11; i++){\n for (int j=0; j<11; j++){\n //print 0-9s on the horizontal and vertical axis\n if (i == 0 & j==0) System.out.print(\" \");\n else if (i==0) System.out.print(\" \"+(j-1)+\" \");\n else if (j==0) System.out.print(\" \"+(i-1)+\" \");\n else{\n //print out ships and status\n Ship ship = ships[i-1][j-1];\n if(ship.isSunk()) System.out.print(\" x \");\n else if(ship.getShipType().equals(\"empty\") && ship.hit[1]) System.out.print(\" - \");\n else if(ship.getShipType().equals(\"empty\") && !ship.hit[1]) System.out.print(\" . \");\n else if(ship.isHorizontal() && ship.hit[j-1-ship.getBowColumn()]) System.out.print(\" S \");\n else if(ship.isHorizontal() && !ship.hit[j-1-ship.getBowColumn()]) System.out.print(\" . \");\n else if(!ship.isHorizontal() && ship.hit[i-1-ship.getBowRow()]) System.out.print(\" S \");\n else if(!ship.isHorizontal() && !ship.hit[i-1-ship.getBowRow()]) System.out.print(\" . \");\n }\n }\n System.out.print(\"\\n\");\n }\n }",
"public void displayBoard() {\n System.out.printf(\"%20s\",\"\"); // to add spacing\n for(int i = 0; i < space[0].length; i++) //Put labels for number axis\n {\n System.out.printf(\"%4d\",i+1);\n }\n System.out.println();\n for(int row = 0; row < this.space.length; row++) { //Put letter labels and appropriate coordinate values\n System.out.print(\" \"+ (char)(row+'A') + \"|\");\n for (String emblem: this.space[row]) //coordinate values\n System.out.print(emblem + \" \");\n System.out.println();\n }\n }",
"public static void m7() {\r\n\tchar ch ='A';\r\n\tfor(int i=1;i<=5;i++) {\r\n\t\tfor(int j =1;j<=i;j++)\r\n\t\t{\r\n\t\t\tSystem.out.print(ch);\r\n\t\t}\r\n\t\tch++;\r\n\t\tSystem.out.println();\r\n\t}\r\n}",
"public void printBoard() {\n String value = \"\";\n renderBoard();\n System.out.println(\"\");\n // loop to print out values in rows and columns\n for (int i = 0; i < game.getRows(); i++) {\n for (int j = 0; j < game.getCols(); j++) {\n if (grid[i][j] == 0)\n value = \".\";\n else\n value = \"\" + grid[i][j];\n System.out.print(\"\\t\" + value);\n }\n System.out.print(\"\\n\");\n }\n }",
"static void printGrid (int[][] G){\n for(int i=1; i<G.length; i++){\n for (int j=1; j<G[i].length; j++){\n if (G[i][j]==0){\n System.out.print(\"- \");\n } else System.out.print(G[i][j]+\" \");\n if ( j==3) System.out.print(\" \");\n if ( j==6) System.out.print(\" \");\n if ( j==9) System.out.print(\"\\n\");\n }\n if ( i==3) System.out.print(\"\\n\");\n if ( i==6) System.out.print(\"\\n\");\n }\n }",
"public static void m8() {\r\n\tfor(int i =1;i<=5;i++) {\r\n\t\tchar ch ='A';\r\n\t\tfor(int j=5;j>=i;j--) {\r\n\t\t\tSystem.out.print(ch);\r\n\t\t\tch++;\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}\r\n}",
"void checkForPlayer(boolean checkForBlacks, int i, int j) {\n\t\tcounter = 0;\n\t\tpossibleFlips.clear();\n\t\t//**Check vertical**\\\\\n\t\t// Check upwards\n\t\tfor (int n = j-1; n >= 0; --n) {\n\t\t\tif (!check(i, n, checkForBlacks))\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\tcounter = 0;\n\t\tpossibleFlips.clear();\n\t\t\n\t\t// Check downwards\n\t\tfor (int n = j+1; n < dimensions.y; ++n) {\n\t\t\tif (!check (i, n, checkForBlacks))\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\tcounter = 0;\n\t\tpossibleFlips.clear();\n\t\t\n\t\t//**Check horizontal**\\\\\n\t\t// Check to left\n\t\tfor (int n = i-1; n >=0; --n) {\n\t\t\tif (!check(n, j, checkForBlacks))\n\t\t\tbreak;\n\t\t}\n\n\t\tcounter = 0;\n\t\tpossibleFlips.clear();\n\t\t\n\t\t// Check to right\n\t\tfor (int n = i+1; n < dimensions.x; ++n) {\n\t\t\tif (!check(n, j, checkForBlacks))\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tcounter = 0;\n\t\tpossibleFlips.clear();\n\t\t\n\t\t//**Check diagonals**\\\\\n\t\t// Check North-East\n\t\tfor (int n = 1; i+n < dimensions.x && j-n >= 0; ++n) {\n\t\t\tif (!check(i+n, j-n, checkForBlacks))\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tcounter = 0;\n\t\tpossibleFlips.clear();\n\t\t\n\t\t// Check North-West\n\t\tfor (int n = 1; i-n >= 0 && j-n >= 0; ++n) {\n\t\t\tif (!check(i-n, j-n, checkForBlacks))\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tcounter = 0;\n\t\tpossibleFlips.clear();\n\t\t\n\t\t// Check South-East\n\t\tfor (int n = 1; i+n < dimensions.x && j+n < dimensions.y; ++n) {\n\t\t\tif (!check(i+n, j+n, checkForBlacks))\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tcounter = 0;\n\t\tpossibleFlips.clear();\n\t\t\n\t\t// Check South-West\n\t\tfor (int n = 1; i-n >= 0 && j+n < dimensions.y; ++n) {\n\t\t\tif (!check(i-n, j+n, checkForBlacks))\n\t\t\tbreak;\n\t\t}\n\t}",
"public StringBuffer2D printBoard(){\n StringBuffer2D sb = new StringBuffer2D();\n StringBuffer2D lettersHeader = makeLettersHeader();\n //hardcoded numberLegend width\n sb.insert(lettersHeader,2,0);\n //top row\n int actualWidth = getActualWidth(true)+1;\n //System.out.println(\" \");\n //top border\n try{\n for(int y=0;y<board.getHeight();++y){\n int startY = lettersHeader.getHeight() + y*getActualHeight();\n //LEFT number headers\n StringBuffer2D numberLegend = makeNumberLegend(y+1);\n sb.insert(numberLegend, 0, startY);\n for(int x=0;x<board.getWidth();++x){\n Position position = new Position(x,y);\n StringBuffer2D dispCell = displayCell(position);\n int startX = numberLegend.getWidth() + x*actualWidth;\n sb.replace(dispCell, startX, startY, maxWidth, startY+getActualHeight());\n }\n }\n }catch(PositionOutOfBoundsException e){\n e.printStackTrace();\n }\n return sb;\n }",
"public void showBoard() {\n for (int i = 0; i < booleanBoard.length; i++) {\n for (int j = 0; j < booleanBoard.length; j++) {\n if (strBoard[i][j].equals(\"possible move\") || strBoard[i][j].equals(\"castling\")) {\n gA.getBoard()[i][j].setBackgroundResource(R.color.green);\n }\n if (strBoard[i][j].equals(\"possible kill\")) {\n gA.getBoard()[i][j].setBackgroundResource(R.color.red);\n }\n if (booleanBoard[i][j]) {\n if (figBoard[i][j].getColor().equals(\"white\")) {\n gA.getBoard()[i][j].setRotation(180);\n } else {\n gA.getBoard()[i][j].setRotation(0);\n }\n gA.getBoard()[i][j].setImageResource(figBoard[i][j].getImageResource());\n } else {\n gA.getBoard()[i][j].setImageResource(0);\n }\n }\n }\n }",
"public void draw()\n\t{\n\t\tSystem.out.println(\" |-------------------------------|\");\n\t\t\n\t\tfor (int i = 0; i < board_size; i++)\n\t\t{\n\t\t\tSystem.out.print(board_size - i + \" |\");\n\t\t\t\n\t\t\tfor (int j = 0; j < board_size; j++)\n\t\t\t{\n\t\t\t\tif (getPiece(i,j) == null) {System.out.print(\" |\");}\n\t\t\t\telse {System.out.print(\" \" + getPiece(i,j).getSymbol().toChar() + \" |\");}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(\" |-------------------------------|\");\n\t\t}\n\t\t\n\t\tSystem.out.println(\" A B C D E F G H \\n\");\n\t}",
"public void displayBoard(char[][] grid) {\n System.out.println();\n System.out.println(\" 0 1 2 3 4 5 6\");\n System.out.println(\"---------------\");\n for (int row = 0; row < grid.length; row++) {\n System.out.print(\"|\");\n for (int col = 0; col < grid[0].length; col++) {\n System.out.print(grid[row][col]);\n System.out.print(\"|\");\n }\n System.out.println();\n System.out.println(\"---------------\");\n }\n System.out.println(\" 0 1 2 3 4 5 6\");\n System.out.println();\n }"
]
| [
"0.743742",
"0.73621684",
"0.72961605",
"0.72007877",
"0.7163517",
"0.71534497",
"0.7143661",
"0.7097016",
"0.7095154",
"0.7082978",
"0.6984334",
"0.69692874",
"0.69668174",
"0.6963451",
"0.6959669",
"0.6893516",
"0.68648994",
"0.6848538",
"0.6846587",
"0.6836146",
"0.6825409",
"0.67676103",
"0.6738188",
"0.6722639",
"0.67217374",
"0.6717181",
"0.6715293",
"0.6699576",
"0.66757995",
"0.66734666",
"0.665855",
"0.6648504",
"0.66433287",
"0.6633436",
"0.6579647",
"0.6541572",
"0.65251106",
"0.65250784",
"0.651685",
"0.6516352",
"0.6500154",
"0.6487441",
"0.64847463",
"0.64840496",
"0.64704585",
"0.6468413",
"0.64640796",
"0.6449948",
"0.6447466",
"0.6438971",
"0.643194",
"0.6430532",
"0.6414203",
"0.640537",
"0.63980967",
"0.63975084",
"0.6391066",
"0.63851386",
"0.6383566",
"0.6383327",
"0.6370204",
"0.63620186",
"0.6359725",
"0.63525873",
"0.63504666",
"0.6348105",
"0.6315872",
"0.63081825",
"0.62937385",
"0.62683606",
"0.6264006",
"0.6254642",
"0.6249761",
"0.6247472",
"0.6244601",
"0.6242619",
"0.6238744",
"0.6238424",
"0.62361187",
"0.6230396",
"0.6229694",
"0.6224588",
"0.6221618",
"0.62181675",
"0.6207629",
"0.6199298",
"0.6192172",
"0.61846215",
"0.6172179",
"0.61633676",
"0.6151622",
"0.6146296",
"0.6137773",
"0.61367273",
"0.6134281",
"0.61267835",
"0.6121032",
"0.6104639",
"0.6098876",
"0.60987055"
]
| 0.74761677 | 0 |
Shuts down an ExecutorService in two phases, first by calling shutdown to reject incoming tasks, and then calling shutdownNow, if necessary, to cancel any lingering tasks. Note: This method was culled from the ExecutorService documentation | private boolean shutdownAndAwaitTermination(
ExecutorService pool, long timeout,
TimeUnit unit, List<Runnable> addInterruptedHere) {
pool.shutdown(); // Disable new tasks from being submitted
if(timeout <= 0) {
timeout = 1;
}
try {
// Wait a while for existing tasks to terminate
if (!pool.awaitTermination(timeout, unit)) {
List interrupted = pool.shutdownNow(); // Cancel currently executing tasks
if(addInterruptedHere != null &&
(interrupted != null && !interrupted.isEmpty())) {
addInterruptedHere.addAll(interrupted);
}
// Wait a while for tasks to respond to being cancelled
if (!pool.awaitTermination(timeout, unit)) {
return false;
}
}
} catch (InterruptedException ie) {
// (Re-)Cancel if current thread also interrupted
List interrupted = pool.shutdownNow();
if(addInterruptedHere != null &&
(interrupted != null && !interrupted.isEmpty())) {
addInterruptedHere.addAll(interrupted);
}
// Preserve interrupt status
Thread.currentThread().interrupt();
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void shutDownExecutorService() {\r\n\t\tlogger.info(\"Shutting down FileEncryptionExecutor...\");\r\n\t\ttry {\r\n\t\t\tservice.shutdown();\r\n\t\t\tservice.awaitTermination(60 * 10, TimeUnit.SECONDS);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\tlogger.error(\r\n\t\t\t\t\t\"InterruptedException occurred when shutDownExecutorService.\",\r\n\t\t\t\t\te);\r\n\t\t}\r\n\t\tlogger.info(\"Shut down FileEncryptionExecutor.\");\r\n\t}",
"static void shutdownExecutorService(ExecutorService service){\n service.shutdown();\n\n try {\n if (!service.awaitTermination(60, TimeUnit.SECONDS)) {\n // pool didn't terminate after the first try\n service.shutdownNow();\n }\n\n\n if (!service.awaitTermination(60, TimeUnit.SECONDS)) {\n // pool didn't terminate after the second try\n System.out.println(\"ERROR: executor service did not terminate after a second try.\");\n }\n } catch (InterruptedException ex) {\n service.shutdownNow();\n Thread.currentThread().interrupt();\n }\n }",
"public void shutDownExecutors(ScheduledExecutorService executorService) {\n try {\n java.lang.System.out.println(\"attempt to shutdown executor\");\n executorService.shutdown();\n executorService.awaitTermination(5, TimeUnit.SECONDS);\n }\n catch (InterruptedException e) {\n java.lang.System.err.println(\"tasks interrupted\");\n }\n finally {\n if (!executorService.isTerminated()) {\n java.lang.System.err.println(\"cancel non-finished tasks\");\n }\n executorService.shutdownNow();\n java.lang.System.out.println(\"shutdown finished\");\n }\n }",
"public ExecutorService shutdown() {\n\t\tpool.shutdown();\n\t\treturn pool;\n\t}",
"public static void shutdown() {\n\t\trunning = false;\n\t\texecutor.shutdown();\n\t\tlog.info(\"### All threads shutdown requested ###\");\n\t\t\n\t\ttry {\n\t\t\tfor (int i = 0; !executor.awaitTermination(10, TimeUnit.SECONDS); i++) {\n\t\t\t\tlog.info(\"### Awaiting for pending task pool termination... ({}) ###\", i);\n\t\t\t}\n\t\t} catch (InterruptedException e) {\n\t\t\tlog.warn(\"### Exception awaiting for pending task pool termination: {} ###\", e.getMessage());\n\t\t}\n\t\t\n\t\tlog.info(\"### All threads have finished ###\");\n\t}",
"private void shutdownExecutor(ExecutorService executor) {\n try {\n System.out.println(\"attempt to shutdown executor\");\n // The executor shuts down softly ...\n executor.shutdown();\n // ... by waiting a certain amount of time for termination of currently running tasks.\n executor.awaitTermination(5, TimeUnit.SECONDS);\n }\n catch (InterruptedException e) {\n System.err.println(\"tasks interrupted\");\n }\n // After a maximum of five seconds ...\n finally {\n // ... the executor finally shuts down by interrupting all running tasks.\n if (!executor.isTerminated()) {\n System.err.println(\"cancel non-finished tasks\");\n }\n executor.shutdownNow();\n System.out.println(\"shutdown finished\");\n }\n }",
"@Override\n public void shutdown() throws ExecutionException, InterruptedException {\n // When we close this service we need to shutdown our executor!\n threadPoolExecutorService.shutdown();\n if (!threadPoolExecutorService.awaitTermination(SHUTDOWN_TIME, TimeUnit.SECONDS)) {\n LOG.error(\"SfcOfFlowProgrammerImpl Executor did not terminate in the specified time.\");\n List<Runnable> droppedTasks = threadPoolExecutorService.shutdownNow();\n LOG.error(\"SfcOfFlowProgrammerImpl Executor was abruptly shut down. [{}] tasks will not be executed.\",\n droppedTasks.size());\n }\n }",
"public void stopExecutorService(ExecutorService executorService) {\n\t\texecutorService.shutdown();\n\n\t\ttry {\n\t\t\tif (!executorService.awaitTermination(10, TimeUnit.SECONDS)) {\n\t\t\t\tlogger.debug(\"The await termination time is overdue.\");\n\t\t\t\texecutorService.shutdownNow();\n\t\t\t}\n\t\t} catch (InterruptedException interruptedException) {\n\t\t\tlogger.debug(\"The thread have been interrupted during the await termination time.\");\n\t\t\texecutorService.shutdownNow();\n\t\t\tThread.currentThread().interrupt();\n\t\t}\n\t}",
"public void shutdown() {\n executor.shutdown();\n try {\n executor.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"private static void closeExecutorPool(ExecutorService pool) {\n pool.shutdown(); // Disable new tasks from being submitted\n try {\n // Wait a while for existing tasks to terminate\n if (!pool.awaitTermination(POOL_GRACEFUL_WAIT_SEC, TimeUnit.SECONDS)) {\n pool.shutdownNow(); // Cancel currently executing tasks\n // Wait a while for tasks to respond to being cancelled\n if (!pool.awaitTermination(POOL_TERMINATE_WAIT_SEC, TimeUnit.SECONDS))\n System.err.println(\"Pool did not terminate\");\n }\n } catch (InterruptedException ie) {\n // (Re-)Cancel if current thread also interrupted\n pool.shutdownNow();\n // Preserve interrupt status\n Thread.currentThread().interrupt();\n }\n }",
"private void shutdown() {\n try {\n LOGGER.debug(\"Shutting down executor service\");\n this.executorService.shutdown();\n LOGGER.debug(\"Waiting for termination of executor\");\n this.executorService.awaitTermination(15, TimeUnit.MINUTES);\n } catch (InterruptedException e) {\n LOGGER.warn(\"Interrupted while waiting for Executor to shut down!\");\n } finally {\n for (Extractor extractor : this.extractors) {\n try {\n extractor.finish();\n } catch (Exception e) {\n LOGGER.error(\"Error while shutting down extractor {} : {}\",\n extractor.getClass().getSimpleName(), LogHelper.getStackTrace(e));\n }\n }\n LOGGER.debug(\"All extractors termination, executor service terminated. Exiting shutdown.\");\n }\n }",
"public void shutDown()\n\t{\n\t\tthis.threadPool.shutdown();\n\t}",
"public void shutdown() {\n\t\tthreadPool.shutdown();\n\t}",
"@Override\n\tpublic void destroy() throws Exception\n\t{\n\t\tlog.debug(\"Shutdown threadpool\");\n\t\tpool.shutdownNow(); // disable new tasks from being submitted and interrupt running threads.\n\n\t\t// Wait briefly for tasks to respond to being cancelled\n\t\tif (!pool.awaitTermination(1, TimeUnit.SECONDS))\n\t\t{\n\t\t\tlog.error(\"Threads still running\");\n\t\t}\n\t\tsuper.destroy();\n\t\tlog.debug(\"Leaving servlet destroy\");\n\t}",
"public void stop() {\n executorService.shutdown();\n try {\n if (!executorService.awaitTermination(500, TimeUnit.MILLISECONDS)) {\n executorService.shutdownNow();\n }\n } catch (InterruptedException e) {\n executorService.shutdownNow();\n }\n }",
"public void shutdown() {\n lock.lock();\n try {\n state = State.SHUTDOWN;\n if (serialExecutorMap.isEmpty()) {\n executor.shutdown();\n }\n } finally {\n lock.unlock();\n }\n }",
"public void stop() {\n executor.shutdown();\n }",
"public static void shutdown() {\n\t\tSystem.err.println(\"shutdown initiated!\");\n\t\tBaseFuture bf0 = master.shutdown();\n\t\tbf0.awaitUninterruptibly();\n\t\tSystem.err.println(\"shutdown master done!\");\n\t\t\n\t\tBaseFuture bf1 = unreachable1.shutdown();\n\t\tbf1.awaitUninterruptibly();\n\t\tSystem.err.println(\"shutdown unreachable1 done!\");\n\n\t\tBaseFuture bf2 = unreachable2.shutdown();\n\t\tbf2.awaitUninterruptibly();\n\t\tSystem.err.println(\"shutdown unreachable 2 done!\");\n\t}",
"public static void shutdown(final ExecutorService executorService) {\n ValidationUtils.notNull(executorService, \"Executor service should not be null\");\n executorService.shutdownNow();\n }",
"public void forceShutdown()\n {\n taskExecutor.shutdownNow();\n differencingDone.signalAll();\n completed.signalAll();\n }",
"public void testUnconfigurableExecutorService() {\n final ExecutorService e = Executors.unconfigurableExecutorService(Executors.newFixedThreadPool(2));\n try (PoolCleaner cleaner = cleaner(e)) {\n e.execute(new NoOpRunnable());\n e.execute(new NoOpRunnable());\n e.execute(new NoOpRunnable());\n }\n }",
"private void shutdownThreads() {\n\t\tif (backupHeartbeatBroadcaster != null) {\n\t\t\tbackupHeartbeatBroadcaster.cancel();\n\t\t}\n\t\tif (activeHeartbeatTimer != null) {\n\t\t\tactiveHeartbeatTimer.cancel();\n\t\t}\n\t\tif (serverLatencyProcessorTimer != null) {\n\t\t\tserverLatencyProcessorTimer.cancel();\n\t\t}\n\t\tif (backupHeartbeatTimer != null) {\n\t\t\tbackupHeartbeatTimer.cancel();\n\t\t}\n\t\tif (reElectionTimer != null) {\n\t\t\treElectionTimer.cancel();\n\t\t}\n\t\tif (preElectionTimeoutTimer != null) {\n\t\t\tpreElectionTimeoutTimer.cancel();\n\t\t}\n\t}",
"@PreDestroy\r\n public void destroy() {\r\n log.info(\"Executor will be shut down\");\r\n\r\n executor.shutdown();\r\n try {\r\n if (!executor.awaitTermination(1000, TimeUnit.MILLISECONDS)) {\r\n executor.shutdownNow();\r\n }\r\n } catch (InterruptedException e) {\r\n log.error(\"Could not await termination of executor. forcing shutdown\", e);\r\n executor.shutdownNow();\r\n }\r\n\r\n brokerExecutor.shutdown();\r\n try {\r\n if (!brokerExecutor.awaitTermination(1000, TimeUnit.MILLISECONDS)) {\r\n brokerExecutor.shutdownNow();\r\n }\r\n } catch (InterruptedException e) {\r\n log.error(\"Could not await termination of executor. forcing shutdown\", e);\r\n brokerExecutor.shutdownNow();\r\n }\r\n\r\n logExecutor.shutdown();\r\n try {\r\n if (!logExecutor.awaitTermination(1000, TimeUnit.MILLISECONDS)) {\r\n logExecutor.shutdownNow();\r\n }\r\n } catch (InterruptedException e) {\r\n log.error(\"Could not await termination of executor. forcing shutdown\", e);\r\n logExecutor.shutdownNow();\r\n }\r\n\r\n log.info(\"Executor shutdown complete!\");\r\n }",
"@Test\n @DisplayName(\"SingleThread Executor + shutdown\")\n void firstExecutorService() {\n ExecutorService executor = Executors.newSingleThreadExecutor();\n executor.submit(this::printThreadName);\n\n shutdownExecutor(executor);\n assertThrows(RejectedExecutionException.class, () -> executor.submit(this::printThreadName));\n }",
"public void shutdown() {\n\t\tfinal List<Runnable> tasks = updater.shutdownNow();\n\t\tif (null == tasks) return;\n\t\tfor (final Runnable t : tasks)\n\t\t\tt.run();\n\t}",
"public void shutdown(boolean drain) throws InterruptedException {\n shuttingDown = true;\n reaper.stop();\n if (drain) {\n drain(0);\n }\n ifSet(timeoutScheduler, TaskScheduler::forceExecute);\n ifSet(timeoutScheduler, TaskScheduler::terminate);\n ifSet(backgroundScheduler, TaskScheduler::forceExecute);\n ifSet(backgroundScheduler, TaskScheduler::terminate);\n globalExecutor.shutdown();\n running = false;\n }",
"private static void shutdown() {\n\t\tSystem.out.println(\"Shutting down ...\");\n\t\tpool.shutdown();\n\t\tfor (Client client : clientMap.values()) {\n\t\t\tclient.cleanup();\n\t\t}\n\n\t\t// wait until all threads complete\n\t\ttry {\n\t\t\tif (!pool.awaitTermination(30, TimeUnit.SECONDS)) {\n\t\t\t\tSystem.out.println(\"Force shutdown after 30 seconds ...\");\n\t\t\t\tpool.shutdownNow();\n\t\t\t\tif (!pool.awaitTermination(30, TimeUnit.SECONDS)) {\n\t\t\t\t\tSystem.out.println(\"Terminate the process.\");\n\t\t\t\t\tThread.currentThread().interrupt();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (InterruptedException e) {\n\t\t\tThread.currentThread().interrupt();\n\t\t}\n\t}",
"protected void shutdown() throws InterruptedException {\n\t\tsynchronized (this) // Don't allow shutdown during startup.\n\t\t{\n\t\t\t// Only the first call to shutdown() will be executed.\n\t\t\tif (shutdownMutex.acquire()) {\n\t\t\t\t// Stop payment.\n\t\t\t\tpayerThread.interrupt();\n\t\t\t\tpayerThread.join();\n\n\t\t\t\t// Stop allocating.\n\t\t\t\tproducerThreadPool.shutdown();\n\n\t\t\t\t// Stop sets (and their containers' maintenance threads).\n\t\t\t\tfor (int i = 0; i < sets.length; i++) {\n\t\t\t\t\tsets[i].shutdown();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"synchronized public void shutdownBlocking() throws InterruptedException\n {\n if (!started)\n return;\n\n started = false;\n executor.shutdown();\n executor.awaitTermination();\n segmentManager.shutdown();\n segmentManager.awaitTermination(1L, TimeUnit.MINUTES);\n }",
"@Override\n protected void tearDown() throws Exception {\n shutdown.set(true);\n for (Thread t : threads) {\n t.interrupt();\n t.join();\n }\n brokerService.stop();\n }",
"public void shutdown() {\n if (this.service instanceof PicassoExecutorService) {\n this.service.shutdown();\n }\n this.downloader.shutdown();\n this.dispatcherThread.quit();\n Picasso.HANDLER.post(new Runnable() {\n /* class com.squareup.picasso.Dispatcher.AnonymousClass1 */\n\n public void run() {\n Dispatcher.this.receiver.unregister();\n }\n });\n }",
"@Override\n public void stop() {\n try {\n serverSocket.close();\n }\n catch (IOException e) {\n getExceptionHandler().receivedException(e);\n }\n\n // Close all open connections.\n synchronized (listConnections) {\n for (TcpConnectionHandler tch : listConnections)\n tch.kill();\n listConnections.clear();\n }\n\n // Now close the executor service.\n executorService.shutdown();\n try {\n executorService.awaitTermination(3, TimeUnit.SECONDS);\n }\n catch (InterruptedException e) {\n getExceptionHandler().receivedException(e);\n }\n }",
"@VisibleForTesting\n void killIoThreads() {\n ioThreadPool.shutdownNow();\n }",
"static void unregisterExecutorService(ExecutorService executorService) {\n SupplierInfo supplierInfo = EXECUTOR_SERVICES.get(executorService);\n if (supplierInfo == null) {\n // This can happen in some unit tests but should not happen in production.\n LOGGER.log(Level.WARNING, String.format(\n \"Executor service %s is being unregistered but could not locate supplier to notify observers\",\n executorService));\n return;\n }\n supplierInfo.unregisterExecutorService(executorService);\n }",
"private void shutdownAndAwaitTermination(ExecutorService pool, int shutdownTime, TimeUnit unit) {\n if (pool != null) {\n log.info(\"Entered the shutdown method : total shutdown time is : \" + shutdownTime + \" time unit is : \" + unit.toString());\n pool.shutdown();\n\n try {\n if (!pool.awaitTermination((long)shutdownTime, unit)) {\n pool.shutdownNow();\n if (!pool.awaitTermination(10L, TimeUnit.SECONDS)) {\n log.info(\"Pool did not terminate\");\n }\n }\n } catch (InterruptedException var4) {\n pool.shutdownNow();\n Thread.currentThread().interrupt();\n } catch (Exception var5) {\n log.error(\"exception occured : \" + var5.getMessage(), var5);\n log.error(var5.getMessage(), var5);\n }\n\n log.info(\"pool is shut down\");\n }\n }",
"@Override\n public void stop() {\n try {\n socket.close();\n } catch (IOException e) {\n getExceptionHandler().receivedException(e);\n }\n\n // Now close the executor service.\n\n }",
"void stopThreadPool() {\n\n if (!mThreadPoolExecutor.isShutdown()) {\n mThreadPoolExecutor.getQueue().clear();\n mThreadPoolExecutor.shutdown();\n\n new Thread(() -> {\n\n while (!mThread.isInterrupted() && mThread.isAlive()) {\n\n if (mThreadPoolExecutor.isShutdown() && mThreadPoolExecutor.isTerminated()) {\n mThread.interrupt();\n Log.d(TAG, \"Interrupting mThread - thread pool isShutdown\");\n }\n\n try {\n Thread.sleep(500L);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n\n }).start();\n }\n }",
"public void shutdown() {\n MultiThreadedHttpConnectionManager manager = \n (MultiThreadedHttpConnectionManager) httpClient.getHttpConnectionManager();\n manager.shutdown();\n }",
"void shutdown() {\n this.shutdown.set(true);\n Thread currentThread = this.currentThread.get();\n if (currentThread != null) {\n currentThread.interrupt();\n }\n\n }",
"@Override\n\t// O(1)\n\tpublic void close() {\n\t\tsynchronized (mInetAddressList) {\n\t\t\tmIsClosed = true;\n\t\t\tmCleanupTask.cancel();\n\t\t\tmInetAddressList.clear();\n\n\t\t\t// unblock the blocked threads\n\t\t\t// when they resume, they'll throw an interrupted exception\n\t\t\t// there's only one place where they'll be blocked (in take())\n\t\t\twhile (mInetAddressAvailableSemaphore.hasQueuedThreads()) {\n\t\t\t\tmInetAddressAvailableSemaphore.release();\n\t\t\t}\n\t\t}\n\t}",
"protected void shutDown() throws Exception {\n logger.error(\"FetchCoinTask has been requested to shutdown\");\n }",
"public void shutdown() {\n drivers.stream().filter(ClosingAwareWebDriver::isAlive)\n .forEach(ClosingAwareWebDriver::forceShutdown);\n }",
"@Override\n public void close() {\n executor.shutdown();\n }",
"public synchronized void shutdown() {\n try {\n stop();\n } catch (Exception ex) {\n }\n \n try {\n cleanup();\n } catch (Exception ex) {\n }\n }",
"public void forceStop() {\n\t\tfor (int i = 0; i < worker_num; i++) {\n\t\t\tif (workThreads[i] == null)\n\t\t\t\tcontinue;\n\t\t\tworkThreads[i].interrupt();\n\t\t\tworkThreads[i] = null;\n\t\t}\n\t\tthreadPool = null;\n\t\ttaskQueue.clear();\n\t}",
"public static void shutdown() {\n logger.warn(\"Attempting to shut down scheduled LRU cache tasks ...\");\n scheduler.shutdown();\n try {\n if (! scheduler.awaitTermination(1000, TimeUnit.MILLISECONDS)) {\n logger.warn(\"Attempting to force shut down scheduled LRU cache tasks ...\");\n scheduler.shutdownNow();\n }\n } catch (InterruptedException e) {\n logger.warn(\"Exception shutting down tasks ... \" + e.getMessage());\n }\n }",
"private static void shutdownDone(ChannelFuture shutdownOutputFuture, ChannelFuture shutdownInputFuture, ChannelPromise promise) {\n/* 674 */ Throwable shutdownOutputCause = shutdownOutputFuture.cause();\n/* 675 */ Throwable shutdownInputCause = shutdownInputFuture.cause();\n/* 676 */ if (shutdownOutputCause != null) {\n/* 677 */ if (shutdownInputCause != null) {\n/* 678 */ logger.debug(\"Exception suppressed because a previous exception occurred.\", shutdownInputCause);\n/* */ }\n/* */ \n/* 681 */ promise.setFailure(shutdownOutputCause);\n/* 682 */ } else if (shutdownInputCause != null) {\n/* 683 */ promise.setFailure(shutdownInputCause);\n/* */ } else {\n/* 685 */ promise.setSuccess();\n/* */ } \n/* */ }",
"public static void shutdownAndAwaitTermination(ExecutorService pool, String poolName,\n long timeout, TimeUnit unit, Logger logger) {\n Preconditions.checkNotNull(pool);\n\n pool.shutdown(); // Disable new tasks from being submitted\n try {\n // Wait a while for existing tasks to terminate\n if (!pool.awaitTermination(timeout, unit)) {\n pool.shutdownNow(); // Cancel currently executing tasks\n // Wait a while for tasks to respond to being cancelled\n if ((!pool.awaitTermination(timeout, unit)) && (logger != null)) {\n logger.error(\"Executor service {} did not terminate\",\n StringUtils.defaultIfBlank(poolName, \"null\"));\n }\n }\n } catch (InterruptedException ignored) {\n // (Re-)Cancel if current thread also interrupted\n pool.shutdownNow();\n // Preserve interrupt status\n Thread.currentThread().interrupt();\n }\n }",
"public List<Runnable> shutdownNow() {\n lock.lock();\n try {\n shutdown();\n List<Runnable> result = new ArrayList<>();\n for (SerialExecutor serialExecutor : serialExecutorMap.values()) {\n serialExecutor.tasks.drainTo(result);\n }\n result.addAll(executor.shutdownNow());\n return result;\n } finally {\n lock.unlock();\n }\n }",
"public void shutDown() {\n isShutdown = true;\n eventLoopGroup.shutdownGracefully().awaitUninterruptibly();\n timer.stop();\n }",
"protected abstract void shutdown();",
"public void shutdown() {\n this.runnable.stop = true;\n LockSupport.unpark(this);\n }",
"private void stop()\n {\n if(running)\n {\n scheduledExecutorService.shutdownNow();\n running = false;\n }\n }",
"public FutureDone<Void> shutdown() {\n // set shutdown flag for UDP and TCP, if we acquire a write lock, all read locks are blocked as well\n writeUDP.lock();\n writeTCP.lock();\n try {\n if (shutdownTCP || shutdownUDP) {\n shutdownFuture().setFailed(\"already shutting down\");\n return shutdownFuture();\n }\n shutdownUDP = true;\n shutdownTCP = true;\n } finally {\n writeTCP.unlock();\n writeUDP.unlock();\n }\n\n recipients.close().addListener(new GenericFutureListener<ChannelGroupFuture>() {\n @Override\n public void operationComplete(final ChannelGroupFuture future) throws Exception {\n if (!semaphoreUPD.tryAcquire(maxPermitsUDP)) {\n LOG.error(\"Cannot shutdown, as connections (UDP) are still alive\");\n shutdownFuture().setFailed(\"Cannot shutdown, as connections (UDP) are still alive\");\n throw new RuntimeException(\"Cannot shutdown, as connections (UDP) are still alive\");\n }\n if (!semaphoreTCP.tryAcquire(maxPermitsTCP)) {\n LOG.error(\"Cannot shutdown, as connections (TCP) are still alive\");\n shutdownFuture().setFailed(\"Cannot shutdown, as connections (TCP) are still alive\");\n throw new RuntimeException(\"Cannot shutdown, as connections (TCP) are still alive\");\n }\n shutdownFuture().setDone();\n }\n });\n return shutdownFuture();\n }",
"@Override\n protected void shutdown() {\n super.shutdown();\n // Now perform any other shutdown tasks you need.\n // ...\n }",
"public ShutdownSuppressingExecutorServiceAdapter(TaskExecutor taskExecutor) {\n\t\tsuper(taskExecutor);\n\t}",
"public void stop(int delay) {\n log.info(\"Stopping worker pool\");\n\n pool.shutdown();\n try {\n // Wait the given delay for workers to terminate\n if (!pool.awaitTermination(delay, TimeUnit.SECONDS)) {\n pool.shutdownNow(); // Cancel currently executing tasks\n // Again wait some time for tasks to respond to being cancelled\n if (!pool.awaitTermination(60, TimeUnit.SECONDS)) {\n log.error(\"WorkerTask pool did not terminate correctly!\");\n }\n }\n log.info(\"Worker pool stopped\");\n } catch (InterruptedException ie) {\n log.error(\"Interrupt received while stopping worker pool:\" + ie.getMessage());\n\n // (Re-)Cancel if current thread also interrupted\n pool.shutdownNow();\n // Preserve interrupt status\n Thread.currentThread().interrupt();\n }\n }",
"@Test\n public void testTaskAddedAfterShutdownNotAbandoned() throws Exception {\n LinkedBlockingQueue<Runnable> taskQueue = new LinkedBlockingQueue<Runnable>() {\n @Override\n public boolean remove(Object o) {\n throw new UnsupportedOperationException();\n }\n };\n\n final Runnable dummyTask = new Runnable() {\n @Override\n public void run() {\n }\n };\n\n final LinkedBlockingQueue<Future<?>> submittedTasks = new LinkedBlockingQueue<Future<?>>();\n final AtomicInteger attempts = new AtomicInteger();\n final AtomicInteger rejects = new AtomicInteger();\n\n ExecutorService executorService = Executors.newSingleThreadExecutor();\n final SingleThreadEventExecutor executor = new SingleThreadEventExecutor(null, executorService, false,\n taskQueue, RejectedExecutionHandlers.reject()) {\n @Override\n protected void run() {\n while (!confirmShutdown()) {\n Runnable task = takeTask();\n if (task != null) {\n task.run();\n }\n }\n }\n\n @Override\n protected boolean confirmShutdown() {\n boolean result = super.confirmShutdown();\n // After shutdown is confirmed, scheduled one more task and record it\n if (result) {\n attempts.incrementAndGet();\n try {\n submittedTasks.add(submit(dummyTask));\n } catch (RejectedExecutionException e) {\n // ignore, tasks are either accepted or rejected\n rejects.incrementAndGet();\n }\n }\n return result;\n }\n };\n\n // Start the loop\n executor.submit(dummyTask).sync();\n\n // Shutdown without any quiet period\n executor.shutdownGracefully(0, 100, TimeUnit.MILLISECONDS).sync();\n\n // Ensure there are no user-tasks left.\n assertEquals(0, executor.drainTasks());\n\n // Verify that queue is empty and all attempts either succeeded or were rejected\n assertTrue(taskQueue.isEmpty());\n assertTrue(attempts.get() > 0);\n assertEquals(attempts.get(), submittedTasks.size() + rejects.get());\n for (Future<?> f : submittedTasks) {\n assertTrue(f.isSuccess());\n }\n }",
"void shutdown() throws Exception;",
"@Override\r\n protected void shutdownInternal() {\r\n service.stop();\r\n }",
"public void shutdown() {\n shutdown(false);\n }",
"public void stop() {\n if (isStop.compareAndSet(false, true)) {\n if (bootstrap.config().group() != null) {\n Future future = bootstrap.config().group().shutdownGracefully();\n ((io.netty.util.concurrent.Future) future).syncUninterruptibly();\n }\n for (BrpcChannelGroup channelGroup : healthyInstances) {\n channelGroup.close();\n }\n for (BrpcChannelGroup channelGroup : unhealthyInstances) {\n channelGroup.close();\n }\n if (timeoutTimer != null) {\n timeoutTimer.stop();\n }\n if (namingService != null) {\n namingService.unsubscribe(subscribeInfo);\n }\n if (healthCheckTimer != null) {\n healthCheckTimer.stop();\n }\n if (loadBalanceStrategy != null) {\n loadBalanceStrategy.destroy();\n }\n if (callbackThread != null) {\n callbackThread.shutdown();\n }\n if (threadPool != null) {\n threadPool.stop();\n }\n }\n }",
"public void shutdown() {\n // Shutting down a 'null' transport is invalid. Also, shutting down a server for multiple times is invalid.\n ensureServerState(true);\n try {\n transport.close();\n } catch (final Exception e) {\n throw new RuntimeException(e);\n } finally {\n isShutdown = true;\n }\n }",
"public void shutdown() {\n fsManager.getOpenFileSystems().forEach(JGitFileSystem::close);\n shutdownSSH();\n forceStopDaemon();\n fsManager.clear();\n }",
"@Override\n public void close() throws Exception {\n\n socketAcceptor.close();\n rmiAcceptor.close();\n connectedViews.clear();\n\n synchronized (threadPool) {\n threadPool.shutdown();\n }\n while (!threadPool.awaitTermination(5, TimeUnit.SECONDS)) {\n logger.warning(\"Thread pool hasn't shut down yet, waiting...\");\n }\n }",
"public void closePool() {\n threadPool.destroy();\n }",
"public static void ender(ExternalThreadPool etp) {\n LOGGER.info(\"Starting ExternalThreadPool ender\");\n // Destroys the bash process\n etp.piper.destroy();\n\n // Pipes are destroyed by bash TRAP on script\n }",
"public void shutdown() {\n YbkService.stop(ErrorDialog.this);\r\n System.runFinalizersOnExit(true);\r\n // schedule actual shutdown request on a background thread to give the service a chance to stop on the\r\n // foreground thread\r\n new Thread(new Runnable() {\r\n\r\n public void run() {\r\n try {\r\n Thread.sleep(500);\r\n } catch (InterruptedException e) {\r\n }\r\n System.exit(-1);\r\n }\r\n }).start();\r\n }",
"@Override\n public void close() {\n if (!this.isClosed) preClose();\n\n ExecutorService customThreadPool =\n ExecutorUtil.newMDCAwareCachedThreadPool(new SolrNamedThreadFactory(\"closeThreadPool\"));\n\n customThreadPool.submit(() -> IOUtils.closeQuietly(overseerElector.getContext()));\n\n customThreadPool.submit(() -> IOUtils.closeQuietly(overseer));\n\n try {\n customThreadPool.submit(\n () -> {\n Collection<ElectionContext> values = electionContexts.values();\n synchronized (electionContexts) {\n values.forEach(IOUtils::closeQuietly);\n }\n });\n\n } finally {\n\n sysPropsCacher.close();\n customThreadPool.submit(() -> IOUtils.closeQuietly(cloudSolrClient));\n customThreadPool.submit(() -> IOUtils.closeQuietly(cloudManager));\n\n try {\n try {\n zkStateReader.close();\n } catch (Exception e) {\n log.error(\"Error closing zkStateReader\", e);\n }\n } finally {\n try {\n zkClient.close();\n } catch (Exception e) {\n log.error(\"Error closing zkClient\", e);\n } finally {\n\n // just in case the OverseerElectionContext managed to start another Overseer\n IOUtils.closeQuietly(overseer);\n\n ExecutorUtil.shutdownAndAwaitTermination(customThreadPool);\n }\n }\n }\n assert ObjectReleaseTracker.release(this);\n }",
"public void shutdown();",
"public void shutdown();",
"public void shutdown();",
"public void shutdown();",
"public abstract void shutdown();",
"public abstract void shutdown();",
"public abstract void shutdown();",
"public abstract void shutdown();",
"public void shutdown() {\n\t\t//We call peers.values() and put into Array to create an unchanging copy, one that\n\t\t//does not shrink even as the sockets remove themselves from the peers list\n\t\t//this prevents a ConcurrentModificationException\n\t\tonline = false;\n\t\tArrayList<DecentSocket> connections = new ArrayList<DecentSocket>(peers.values());\n\t\tfor(DecentSocket socket: connections) {\n\t\t\tsocket.stop();\n\t\t}\n\t\tlistener.stop();\n\t\tchecker.stop();\n\t}",
"private void shutdown() {\n //LOG.debug(\"# Shutting down parking facility now... \");\n ParkingLotOperatorInstance.shutdownParkingLot();\n\n /** Since there is a sleep of 1 at the thread, we need to wait to come out of run()\n * However, sleep at the run() is required so that the thread digests the input command */\n try {\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n OperatorThread.interrupt();\n }",
"public void shutdown() throws InterruptedException {\n shutdown(true);\n }",
"public synchronized void shutdown() {\n final String actionDescription = \"shutdown\";\n auditLog.logMessage(actionDescription, GovernanceEngineAuditCode.SERVICE_TERMINATING.getMessageDefinition());\n\n if (instance != null) {\n this.instance.shutdown();\n }\n\n auditLog.logMessage(actionDescription, GovernanceEngineAuditCode.SERVICE_SHUTDOWN.getMessageDefinition());\n }",
"public void shutdown() {\n // no-op\n }",
"public void shutdownAll() {\n System.out.println(\"Shutting down network, received halt command!\");\n _poolData.shutdown();\n }",
"public final void stopAll() {\n for (BotTaskInterface bt : TASKS) {\n LOG.info(\"Stoping BotTask {}\", bt.getName());\n bt.stop();\n }\n EXECUTOR_SERVICE.shutdown();\n }",
"@Override\r\n public void close() {\r\n\tsaveZip();\r\n\tsetChanged();\r\n\tnotifyObservers(\"shutting down\");\r\n\tthreadpool.shutdown();\r\n\t// wait 10 seconds over and over again until all running jobs have\r\n\t// finished\r\n\ttry {\r\n\t boolean allTasksCompleted = false;\r\n\t while (!(allTasksCompleted = threadpool.awaitTermination(10, TimeUnit.SECONDS)))\r\n\t\t;\r\n\t setChanged();\r\n\t notifyObservers(\"Server is safely closed\");\r\n\t} catch (InterruptedException e) {\r\n\t e.printStackTrace();\r\n\t}\r\n }",
"public void shutdown() {\n logger.info(\"Shutting down modules.\");\n for (Module module : modules) {\n module.stop();\n }\n logger.info(\"Shutting down reporters.\");\n for (Reporter reporter : reporters.values()) {\n reporter.stop();\n }\n }",
"@Override\n public void stopEndpoint() {\n if (!isRunning()) {\n return;\n }\n\n setRunning(false);\n\n try {\n try{\n if ( getServerSocket() != null ) {\n getServerSocket().close();\n }\n } catch (Throwable t){\n getLogger().log(Level.SEVERE,\n \"selectorThread.closeSocketException\", t);\n }\n\n unregisterComponents();\n\n clearTasks();\n } catch (Throwable t) {\n getLogger().log(Level.SEVERE,\"selectorThread.stopException\", t);\n }\n }",
"public void shutdown() {\r\n ThreadLocalEventLoop.INSTANCE.resetEventLoop$kotlinx_coroutines_core();\r\n this.isCompleted = true;\r\n closeQueue();\r\n do {\r\n } while (processNextEvent() <= 0);\r\n rescheduleAllDelayed();\r\n }",
"@Test\n public void testShutdownConditions() throws InvocationTargetException, IllegalAccessException {\n when(this.config.shutDownWebdriver()).thenReturn(false);\n when(this.config.closeVisualWebDriveronFail()).thenReturn(false);\n when(this.config.reuseWebDriver()).thenReturn(false);\n\n this.context.setFailed();\n\n boolean rtn = (Boolean)shutdownMethod.invoke(this.std, this.context);\n\n Assert.assertThat(\"should Not Shutdown If Global Shutdown Disabled And Reuse Disabled And Close On Fail Disabled\", rtn, is(false));\n\n\n /**\n * Case where user wants to keep browser open for failed tests (possibly to\n * see page on failure), but does want the browser to be reused - don't\n * shutdown because the test has failed\n */\n\n when(this.config.shutDownWebdriver()).thenReturn(false);\n when(this.config.reuseWebDriver()).thenReturn(true);\n when(this.config.closeVisualWebDriveronFail()).thenReturn(false);\n\n rtn = (Boolean)shutdownMethod.invoke(this.std, this.context);\n\n Assert.assertThat(\"should Not Shutdown If Global Shutdown Disabled And Reuse Enabled And Close On Fail Disabled\", rtn, is(false));\n\n }",
"public synchronized void shutDown() {\n\t state.shutDown();\n\t}",
"public synchronized void stop() {\n if (isPausing) {\n start();\n }\n if (isRunning) {\n isRunning = false;\n for (int i = 0; i < numComputeTasks; i++) {\n inputQueue.addLast(new ComputeStopSign());\n }\n ComputeUtil.acquire(taskSync,\n numComputeTasks);\n for (int i = 0; i < threads.length; i++) {\n boolean isFailed = false;\n do {\n isFailed = false;\n try {\n threads[i].join();\n } catch (Exception e) {\n isFailed = true;\n }\n } while (isFailed);\n }\n threads = null;\n }\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 }",
"@PreDestroy\n\tpublic void destroy() {\n\t\tthis.executorService.shutdown();\n\t}",
"public void shutdown() {\n if (pipelineExecutor != null) {\n ExecutorUtil.shutdownAndAwaitTermination(pipelineExecutor);\n }\n\n if (mHandler != null) {\n mHandler.removeCallbacksAndMessages(null);\n }\n }",
"public void shutdown() {\n for (TServer server : thriftServers) {\n server.stop();\n }\n try {\n zookeeper.shutdown();\n discovery.close();\n } catch (IOException ex) {\n //don't care\n }\n }",
"public void shutdown() {\n this.dontStop = false;\n }",
"void shutdown() throws IOException, SoapException;",
"public void shutDown() {\n collector.removePool(this);\n factory.poolClosing(this);\n\n // close all objects\n synchronized (objects) {\n for (Iterator it = objects.values().iterator(); it.hasNext();) {\n ObjectRecord rec = (ObjectRecord) it.next();\n if (null != rec) {\n if (rec.isInUse())\n factory.returnObject(rec.getClientObject());\n factory.deleteObject(rec.getObject());\n rec.close();\n }\n }\n objects.clear();\n deadObjects.clear();\n }//end of synch\n\n factory = null;\n poolName = null;\n initialized = false;\n }",
"void shutdown();",
"void shutdown();"
]
| [
"0.7323128",
"0.6762808",
"0.6740299",
"0.6712123",
"0.6645723",
"0.6568594",
"0.65484524",
"0.63611966",
"0.63063234",
"0.62286633",
"0.61687714",
"0.61384785",
"0.60171175",
"0.59957117",
"0.59826344",
"0.5927129",
"0.5852816",
"0.58085275",
"0.5804328",
"0.5684393",
"0.5674722",
"0.56605077",
"0.5623391",
"0.55965483",
"0.5566162",
"0.55402637",
"0.55115604",
"0.5510558",
"0.54434955",
"0.54189277",
"0.54133725",
"0.53966266",
"0.5375079",
"0.5360104",
"0.5353509",
"0.5330171",
"0.5327831",
"0.5283979",
"0.52833474",
"0.52817816",
"0.52793175",
"0.5252853",
"0.52314365",
"0.5229265",
"0.5228798",
"0.5228796",
"0.5206594",
"0.51974225",
"0.5184405",
"0.5156201",
"0.51556146",
"0.5147752",
"0.5132634",
"0.51256734",
"0.5111895",
"0.510225",
"0.5083037",
"0.5076988",
"0.50587535",
"0.50485736",
"0.50423354",
"0.50415015",
"0.5031829",
"0.5031416",
"0.50312126",
"0.502511",
"0.5017863",
"0.50020534",
"0.50007254",
"0.49838018",
"0.49838018",
"0.49838018",
"0.49838018",
"0.49645814",
"0.49645814",
"0.49645814",
"0.49645814",
"0.49628052",
"0.49570778",
"0.49534717",
"0.49533254",
"0.49335334",
"0.49153292",
"0.49047473",
"0.4903196",
"0.48966977",
"0.48832607",
"0.48826537",
"0.4875513",
"0.4874288",
"0.4863241",
"0.48510724",
"0.4838689",
"0.48382142",
"0.48379275",
"0.48279896",
"0.48203376",
"0.48150656",
"0.48113474",
"0.48113474"
]
| 0.509492 | 56 |
Three ways to create thread 1. extend thread class 2. make anonymous class of thread 3. implement runnable interface(see another class) | public void run(){
System.out.println("Thread class extends " + getName());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic Thread newThread(Runnable r) {\n\t\t\n\t\tThread th = new Thread(r,\" custum Thread\");\n\t\treturn th;\n\t}",
"private static void createThreadUsingAnonymousInnerClass() {\n\t\tRunnable rn = new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(\"My Anonymous Inner Class thread is executed.\");\n\t\t\t}\n\t\t};\n\n\t\tThread th = new Thread(rn);\n\t\tth.start();\n\t}",
"@Override\r\n public Thread newThread(Runnable r) {\n Thread t = new Thread(r, \"example-runner\");\r\n t.setDaemon(true);\r\n return t;\r\n }",
"public void createThread() {\n }",
"@Override\n protected Thread createThread(final Runnable runnable, final String name) {\n return new Thread(runnable, Thread.currentThread().getName() + \"-exec\");\n }",
"@Override\n\t\t\tpublic Thread newThread(final Runnable r) {\n\t\t\t\tint id = threadNumber.getAndIncrement();\n\t\t\t\tString threadName = leftPad(String.valueOf(id), 2, \"0\");\n\t\t\t\tThread th = new Thread(r);\n\t\t\t\tth.setName(threadName);\n\t\t\t\tth.setDaemon(false);\n\t\t\t\treturn th;\n\t\t\t}",
"@Override\n // Thread creation\n // Run method from the Runnable class.\n public void run() {\n p.println(\"Current thread = \" + Thread.currentThread().getName());\n // Shows when a task is being executed concurrently with another thread,\n // then puts the thread to bed (I like saying that)\n try {\n p.println(\"Doing a task during : \" + name);\n Thread.currentThread().sleep(time);\n }\n // Exception for when a thread is interrupted.\n catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"ThreadStart createThreadStart();",
"private void startRunnableThread() {\n customRunnable = new CustomRunnable();\n customThread = new CustomThread(customRunnable);\n customRunnable.setTag(customThread.tag);\n customThread.start();\n\n }",
"private static void ThreadCreationOldWay() {\r\n\t\tThread t1 = new Thread(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tSystem.out.println(\"This is a runnable method done in old fashion < 1.8\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tt1.start();\r\n\t}",
"public static void main(String args[]) throws Exception\n {\n ImplementsRunnable rc = new ImplementsRunnable();\n Thread t1 = new Thread(rc);\n t1.start();\n Thread.sleep(1000); // Waiting for 1 second before starting next thread\n Thread t2 = new Thread(rc);\n t2.start();\n Thread.sleep(1000); // Waiting for 1 second before starting next thread\n Thread t3 = new Thread(rc);\n t3.start();\n \n // Modification done here. Only one object is shered by multiple threads\n // here also.\n ExtendsThread extendsThread = new ExtendsThread();\n Thread thread11 = new Thread(extendsThread);\n thread11.start();\n Thread.sleep(1000);\n Thread thread12 = new Thread(extendsThread);\n thread12.start();\n Thread.sleep(1000);\n Thread thread13 = new Thread(extendsThread);\n thread13.start();\n Thread.sleep(1000);\n }",
"public IThread createThread() throws IllegalWriteException, BBException;",
"public Thread getThread(int type, String name, Runnable r);",
"public static void main(String args[ ]){\r\nMythread rt = new Mythread(); /* main thread created the runnable object*/\r\nThread t = new Thread(rt); /*main thread creates child thread and passed the runnable object*/\r\nt.start();\r\nfor(int i=0; i<10; i++){\r\nSystem.out.println(\"Main Thread\");\r\n}\r\n}",
"public MyRunnable(){\t\n\t}",
"public static void main(String[] args) {\n\t\n System.out.println(ANSI_Black+\"Hello from Main thread\");\n\tThread extendThread = new ThreadExtendsExample();\n\textendThread.setName(\"ThreadByExtends1~\");\n\textendThread.start();\n\t\n\t//java.lang.IllegalThreadStateException, same thread cannot be started again\n\t//extendThread.start();\n\tThread extendThread2 = new ThreadExtendsExample();\n\textendThread2.setName(\"ThreadByExtends2~\");\n\textendThread2.start();\n\t\n\t\n\t\n\tThreadImplExample implThread = new ThreadImplExample();\n\timplThread.run();\n\t\n\t\n\tThread runnableThread = new Thread(new ThreadImplExample());\n\trunnableThread.start();\n\t\n\t\n\t\n\tSystem.out.println(ANSI_Black+\"Hello Again from Main thread\");\n\t\n}",
"private void startNormalThread() {\n customThread = new CustomThread();\n customThread.start();\n }",
"void runInThread(Runnable runnable) {\n try {\n Thread thread = new Thread(runnable::run);\n thread.start();\n } catch (Exception ex) {\n log.info(ex.getMessage());\n }\n\n }",
"private Thread createThreadFor(Agent ag) {\n ProcessData data = getDataFor(ag);\n\n data.thread = new Thread(threadGroup, ag);\n data.thread.setPriority(THREAD_PRIORITY);\n\n return data.thread;\n }",
"public interface MainThread {\n void post(Runnable runnable);\n}",
"@Override\r\n\tpublic Thread newThread(Runnable arg0) {\n\t\treturn null;\r\n\t}",
"public interface ThreadApi {\n Future executeInBackground(Runnable task);\n boolean executeInMainThread(Runnable task);\n boolean executeInMainThread(Runnable task, long delay);\n}",
"public interface ThreadExecutor extends Executor {\n}",
"public static void main(String[] args) {\n\t\tThreadTest test= new ThreadTest();\n\t\ttest.start();\n\t\t\n\t\t// creating thread by implementing Runnable interface\n\t\tRunnable runnable = new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(\" Creating thread by implement Runnable Interface\");\n\t\t\t}\n\t\t};\n\t\t\t\n\t\tThread test2 = new Thread(runnable);\n\t\ttest2.start();\n\t\t\n\t\t// Runnable is a Functional Interface which having only one abstract method\n\t\tRunnable functionalInterface = ()-> System.out.println(\" creating thread using lembda expression\");\n\t\tThread test3 = new Thread(functionalInterface);\n\t\ttest3.start();\n\t\t\n\n\n\t\t\n\t}",
"public static void main(String[] args){\n\n\t\tRunnable obj1=new Runnable() {\n\n\t\t\tpublic void run() {\n\n\t\t\t\tfor(int i=0;i<5;i++) {\n\n\t\t\t\t\tSystem.out.println(\"1\");\t\n\t\t\t\t\ttry{Thread.sleep(1000);} catch(Exception e) {}\n\t\t\t\t}\t\n\n\t\t\t}\n\t\t};\t\t\n\n\t\tRunnable obj2=new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t\tfor(int i=0;i<5;i++) {\n\n\t\t\t\t\tSystem.out.println(\"A\");\n\t\t\t\t\ttry{Thread.sleep(1000);} catch(Exception e) {}\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t};\n\n\t\tThread t1=new Thread(obj1);\n\t\tThread t2=new Thread(obj2);\n\n\t\tt1.start();\n\t\ttry {Thread.sleep(50);} catch (InterruptedException e1) {}\n\t\tt2.start();\n\n\n //In the above example obj1 and obj2 are used only once so removing both and method which also used once by creating anonymous class\n\t\tThread t3=new Thread(() -> //in runnable interface run method is having function i.e lambda -> so instead of interface we used lambda\n\t\t{\n\t\t\tfor(int i=0;i<5;i++) {\n\n\t\t\t\tSystem.out.println(\"1\");\t\n\t\t\t\ttry{Thread.sleep(1000);} catch(Exception e) {}\n\t\t\t}\t\n\t\t});\n\n\t\tThread t4=new Thread(() ->\n\t\t{\n\t\t\tfor(int i=0;i<5;i++) {\n\n\t\t\t\tSystem.out.println(\"A\");\n\t\t\t\ttry{Thread.sleep(1000);} catch(Exception e) {}\n\n\t\t\t}\n\t\t});\n\n\t\t//\tt3.start();\n\t\t//\tt4.start();\n\n\t}",
"NetThread(){}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(mThread==null){\n\t\t\t\t\tmThread=new Thread(runnable);\n\t\t\t\t\tmThread.start();\n\t\t\t\t}else{\n\t\t\t\t\tToast.makeText(getApplication(), getApplication().getString(R.string.thread_started), Toast.LENGTH_LONG).show();\n\t\t\t\t}\n\t\t\t}",
"private static void createThreadUsingLambdaExpressions() {\n\t\tRunnable r = () -> {System.out.println(\"Lambda Expression thread is executed.\");};\n\t\tThread t = new Thread(r);\n\t\tt.start();\n\t}",
"public void run(){\n //logic to execute in a thread \n }",
"void startThread();",
"public static void main(String[] args) {\n\t\tRunnable r= new Runnable() \r\n\t\t{\r\n\t\t\tpublic void run(){\r\n\t\t\t\tfor(int i=0; i<=5;i++) {\r\n\t\t\t\t\tSystem.out.println(\"Child Thread\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n//\t\tThread class 't' reference variable is calling Runnable implementation class\r\n\t\tSystem.out.println(\"Thread Class calling Runnable Interfface 'r' \");\r\n\t\tThread t = new Thread(r);\r\n\t\tt.start();\r\n\t\tfor(int i=0; i<=5;i++) {\r\n\t\t\tSystem.out.println(\"Main Thread\");\r\n\t\t}\r\n\t}",
"private static void demoRunnable() {\n new Thread(() -> System.out.println(Thread.currentThread().getName()), \"thread-λ\").start();\n new Thread(ToLambdaP5::printThread, \"thread-method-ref\").start();\n }",
"public void run() {\n System.out.println(ANSI_GREEN + \"Hello from anonymous class thread\");\n }",
"public interface IHttpThreadExecutor {\n public void addTask(Runnable runnable);\n}",
"private Thread startTestThread(Runnable runnable) {\n Thread t = new Thread(runnable);\n t.setDaemon(true);\n return t;\n }",
"public ThreadNameWithRunnable(String name, int n) {\n\t\t// Give a name to the thread\n\t\tt = new Thread(this, name);\n\n\t\t// sleepTime\n\t\tsleepTime = n;\n\n\t\t// Start the thread\n\t\tt.start();\n\t}",
"public interface ThreadHandlerWorker {\n Message obtainThreadMessage(int what);\n\n void sendEmptyThreadMessage(int what);\n\n void sendThreadMessage(Message msg);\n\n void sendThreadMessageDelay(Message msg, long timeMillis);\n\n void sendEmptyThreadMessageDelay(int what, long timeMillis);\n\n void postThread(Runnable runnable);\n\n void postThreadDelay(Runnable runnable, long delay);\n\n void removeThreadCallbacks(Runnable runnable);\n\n void removeThreadMessage(int what);\n\n Handler obtainThreadHandler();\n}",
"private static void ThreadCreationLambdaWay() {\r\n\t\tThread t2 = new Thread(() -> {\r\n\t\t\tSystem.out.println(\"This is a runnable method done in Lambda Expressions > 1.8\");\r\n\t\t});\r\n\t\tt2.start();\r\n\t\t\r\n\t\t// Other way\r\n\t\t\r\n\t\tThread t3 = new Thread(() -> System.out.println(\"This is runnable method done in single line Lambda expressions > 1.8\"));\r\n\t\tt3.start();\r\n\t}",
"public Thread getThread();",
"public static void main(String[] args) throws Exception {\n\t\tThread t1 = new Thread(\"t1\") {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tlog.debug(\"this is t1\");\n\t\t\t}\n\t\t};\n\t\tt1.start();\n\t\t\n\t\t\n\t\t//create by runnable\n\t\tThread t2 = new Thread(()->log.debug(\"this is t2\"),\"t2\");\n\t\tt2.start();\n\t\t\n\t\t//create by futuretask, futureTask is created by callable\n\t\tFutureTask<Integer> futureTask = new FutureTask<>(() -> {\n\t\t\tlog.debug(\"this is t3\");\n\t\t\treturn 100;\n\t\t});\n\t\tnew Thread(futureTask,\"t3\").start();\n\t\tlog.debug(\"{}\",futureTask.get());\n\t\t\n\t\tRunnable t4 = ()->{log.debug(\"test\");};\n\t\tt4.run();\n\t\t\n\n\t}",
"public void startThread(View view) {\n //startNormalThread();\n startRunnableThread();\n }",
"NewThread (String threadname) {\r\n name = threadname;\r\n t = new Thread(this, name); // Constructor de un nuevo thread\r\n System.out.println(\"Nuevo hilo: \" +t);\r\n t.start(); // Aquí comienza el hilo\r\n }",
"private ThreadUtil() {\n \n }",
"private static Thread watch(Runnable block) {\n Thread thread = new Thread(block::run);\n thread.start();\n return thread;\n }",
"Runnable mk();",
"public static void main(String[] args)\n {\n Runnable r1=()->{ \n System.out.println(\"Thread1 is running...\");}; \n Thread t1=new Thread(r1); \n t1.start(); \n }",
"public static void main(String[] args)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tThread t1 = new Thread(new MyThread1_RunnableInterface(1,\"Hello from Thread1\"));\n\t\t\t\tThread t2 = new Thread(new MyThread1_RunnableInterface(2,\"Hello from Thread2\"));\n\t\t\t\tThread t3 = new Thread(new MyThread1_RunnableInterface(3,\"Hello from Thread3\"));\n\t\t\t\t\n t1.start();\n t2.start();\n t3.start();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t}",
"public interface a {\n Thread a();\n\n void a(Runnable runnable);\n\n Executor b();\n\n Executor c();\n}",
"public static void main(String[] args) {\n Runnable myRunnable = new TestThread();\n Thread t1 = new Thread(myRunnable,\"t1\");\n Thread t2 = new Thread(myRunnable,\"t2\");\n t1.start();\n t2.start();\n }",
"private VirtualThread createThread(String threadName) {\n\t\tJavaObjectReference threadObj = new JavaObjectReference(new LazyClassfile(\"java/lang/Thread\"));\n\t\t\n\t\t// TODO: We should invoke constructors here...\n\t\tthreadObj.setValueOfField(\"priority\", new JavaInteger(1));\n\t\tthreadObj.setValueOfField(\"name\", JavaArray.str2char(vm,threadName));\n\t\tthreadObj.setValueOfField(\"group\", new JavaObjectReference(bcl.load(\"java/lang/ThreadGroup\")));\n\t\t\n\t\tmainThread = new VirtualThread(vm, rda, threadName, threadObj);\n\t\tthreadAreas.add(mainThread);\n\t\treturn mainThread;\n\t}",
"public static void main(String[] args) {\n MyRunnableThreadTest mt = new MyRunnableThreadTest();\n Thread t1 = new Thread( mt,\"一号窗口\");\n Thread t2 = new Thread( mt,\"二号窗口\");\n t1.start();\n t2.start();\n t2.interrupt();\n\n }",
"private void YeWuMethod(String name) {\n\n for (int j = 0; j < 10; j++) {\n\n\n// Runnable task = new RunnableTask();\n// Runnable ttlRunnable = TtlRunnable.get(task);\n\n// executor.execute(ttlRunnable);\n\n executor.execute(() -> {\n System.out.println(\"==========\"+name+\"===\"+threadLocal.get());\n });\n }\n\n// for (int i = 0; i < 10; i++) {\n// new Thread(() -> {\n// System.out.println(name+\"===\"+threadLocal.get());\n// }, \"input thread name\").start();\n// }\n\n\n\n\n }",
"public void startThread(VirtualThread newThread) {\n\t\tlog.debug(\"**** CREATING A THREAD? ****\");\n\t}",
"@Override\n protected void runInListenerThread(Runnable runnable) {\n runnable.run();\n }",
"public static void main(String[] args) throws InterruptedException {\n\t\t\n\t\tList<Thread> threads = new ArrayList<>();\n\t\t\n//\t\tthreads.add(e)\n\t\tint result = add(4,5);\n\t\tSystem.out.println(result);\n\t\t\n\t\tfor(int i=0;i<5;i++){\n\t\t\tThread t = new Thread(new MyRunnable());\n\t\t\t\n\t\t\tt.start();\n//\t\t\tt.join();\n\t\t\tthreads.add(t);\n\t\t}\n\t\t\n\t\tfor(Thread t : threads){\n\t\t\tt.join();\n\t\t}\n\t\t\n//\t\tt.join()\n\t\t\n\t\t\n\t\tSystem.out.println(\"New Thread: \" + Thread.currentThread().getName());\n\t\t\n\t\t\n\t\t\n\t}",
"public interface RunnableFactory {\n\n\t/**\n\t * Yields a new instance of the runnable.\n\t */\n\n Runnable mk();\n}",
"public static void main(String[] args) {\n Runnable runnable = new Runnable() {\n @Override\n public void run() {\n for(int i =0; i<10000; i++){\n System.out.println(\n Thread.currentThread().getId() + \":\" + i\n );\n }\n }\n };\n\n // using functions, a bit cleaner\n Runnable runnable2 = () -> {\n for(int i =0; i<10000; i++){\n System.out.println(\n Thread.currentThread().getId() + \":\" + i\n );\n }\n };\n\n Thread thread = new Thread(runnable);\n thread.start();\n\n Thread thread2 = new Thread(runnable);\n thread2.start();\n\n Thread thread3 = new Thread(runnable);\n thread3.start();\n\n }",
"public JavaHandlerThread(String name) {\n mThread = new HandlerThread(name);\n }",
"public static void main(String[] args) {\n CreateRunnable createRunnable = new CreateRunnable();\n Thread thread = new Thread(createRunnable);\n thread.start();\n }",
"public static Thread newThread(String name, Runnable runnable, boolean daemon) {\n Thread thread = new Thread(runnable, name);\n thread.setDaemon(daemon);\n thread.setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {\n public void uncaughtException(Thread t, Throwable e) {\n LOG.error(\"Uncaught exception in thread '\" + t.getName() + \"':\", e);\n }\n });\n return thread;\n }",
"public Person(Runnable r, int value) // e.g. new Person(new Runnable(...), child)\r\n\t{\r\n\t\tthis.value = value;\r\n\t\tthread = new KThread(r);\r\n\t\tthread.fork(); // allow thread to begin execution when possible\r\n\t}",
"void runInAudioThread(Runnable runnable) {\n executor.execute(runnable);\n }",
"public void toThread() {\n\t\t// TODO Auto-generated method stub\n\t\tnew Thread(this).start();\n\t\tclient.start();\n\t}",
"public void startThread() \n { \n ExecutorService taskList = \n Executors.newFixedThreadPool(2); \n for (int i = 0; i < 5; i++) \n { \n // Makes tasks available for execution. \n // At the appropriate time, calls run \n // method of runnable interface \n taskList.execute(new Counter(this, i + 1, \n \"task \" + (i + 1))); \n } \n \n // Shuts the thread that's watching to see if \n // you have added new tasks. \n taskList.shutdown(); \n }",
"public static void main(String[] args) {\n Runnable runnable = new Runnable() { //Implemented as an anonymous inner class\n @Override\n public void run() {\n System.out.println(\"Inside runnable 1\");\n }\n };\n\n Thread thread = new Thread(runnable);\n thread.start();\n\n /*\n * Using lambda expressions\n * */\n Runnable runnable1 = () -> {\n System.out.println(\"Inside runnable 2.\");\n };\n new Thread(runnable1).start();\n //Shorter Version: As there is only a single line of statement to be executed we can remove braces\n Runnable runnable2 = () -> System.out.println(\"Inside runnable 3.\");\n new Thread(runnable2).start();\n //Even Shorter Version\n new Thread(() -> System.out.println(\"Inside runnable 4\")).start();\n }",
"public ThreadState(KThread thread) \n {\n this.thread = thread;\n setPriority(priorityDefault);\n }",
"public Thread startThread() {\n Thread thread = createThread();\n thread.start();\n return thread;\n }",
"private void initThread() {\r\n\t\tthreadPreviewDataToImageData = new ThreadPreviewDataToImageData();\r\n\t\t// threadPreviewDataToFakePictureImageData = new\r\n\t\t// ThreadPreviewDataToFakePictureImageData();\r\n\t\t// threadPreviewYUVDecode = new ThreadPreviewYUVDecode();\r\n\r\n\t\tthreadPreviewDataToImageData.start();\r\n\t\t/*\r\n\t\t * if (CameraConfigure.isUseFakeImageData) { //\r\n\t\t * threadPreviewDataToFakePictureImageData.start(); } else {\r\n\t\t * //threadPreviewYUVDecode.start(); }\r\n\t\t */\r\n\r\n\t\t/** preview callback to ThreadPreviewDataToImageData */\r\n\t\tif (null == BlockingQueuePreviewData.getBlockingQueuePreviewData()) {\r\n\t\t\tnew BlockingQueuePreviewData();\r\n\t\t}\r\n\t\t/** ThreadPreviewDataToImageData to ThreadQRcodeDecode */\r\n\t\tif (null == BlockingQueueGrayByteData.getBlockingQueueGrayByteData()) {\r\n\t\t\tnew BlockingQueueGrayByteData();\r\n\t\t}\r\n\t\t/** ThreadPreviewDataToImageData to ThreadBarcodeDecode */\r\n\t\tif (null == BlockingQueueGrayByteDataArray\r\n\t\t\t\t.getBlockingQueueGrayByteDataArray()) {\r\n\t\t\tnew BlockingQueueGrayByteDataArray();\r\n\t\t}\r\n\t\t/** ThreadPreviewDataToImageData to ThreadBCardScanning */\r\n\t\tif (null == BlockingQueueGrayByteDataPreviewData\r\n\t\t\t\t.getBlockingQueueGrayByteDataPreviewData()) {\r\n\t\t\tnew BlockingQueueGrayByteDataPreviewData();\r\n\t\t}\r\n\t\t/*\r\n\t\t * if (null == BlockingQueueByteArray.getBlockingQueueByteArray()) { new\r\n\t\t * BlockingQueueByteArray(); }\r\n\t\t */\r\n\r\n\t\t/*\r\n\t\t * if (null == BlockingQueueFakePictureImageData\r\n\t\t * .getBlockingQueueFakePictureImageData()) { new\r\n\t\t * BlockingQueueFakePictureImageData(); }\r\n\t\t */\r\n\t}",
"public abstract void postToMainThread(@NonNull Runnable runnable);",
"public ThreadDemo() {\n\n\t\t// create a window\n\t\twin = new javax.swing.JFrame(\"Thread Demo\");\n\t\twin.setSize(400, 300);\n\t\twin.setLocation(50, 50);\n\t\twin.setDefaultCloseOperation(javax.swing.JFrame.DISPOSE_ON_CLOSE);\n\t\twin.add(this);\n\n\t\t// set-up a tool bar\n\t\tjavax.swing.JPanel tools = new javax.swing.JPanel();\n\t\twin.add(tools, java.awt.BorderLayout.SOUTH);\n\t\tright = new javax.swing.JButton(\"Move Right\");\n\t\thome = new javax.swing.JButton(\"Home\");\n\t\tgo = new javax.swing.JButton(\"Go\");\n\t\ttools.add(right);\n\t\ttools.add(home);\n\t\ttools.add(go);\n\n\t\t// set up the panel\n\t\tx = y = 10;\n\t\tsetBackground(java.awt.Color.white);\n\n\t\t// set up event handler\n\t\thome.addActionListener(this);\n\t\tright.addActionListener(this);\n\t\tgo.addActionListener(this);\n\n\t\t// make the window visible\n\t\twin.setVisible(true);\n\t\twin.repaint();\n\t}",
"private ThreadUtil() {\n }",
"public void runInThread() {\n\t\tTaskRunner taskRunner = Dep.get(TaskRunner.class);\n\t\tATask atask = new ATask<Object>(getClass().getSimpleName()) {\n\t\t\t@Override\n\t\t\tprotected Object run() throws Exception {\n\t\t\t\tBuildTask.this.run();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t};\n\t\ttaskRunner.submitIfAbsent(atask);\n\t}",
"public static void action() {\n\n MyRunnableC rc = new MyRunnableC();\n Thread tc = new Thread(rc, \"Thread_A\");\n Thread td = new Thread(rc, \"Thread_B\");\n Thread te = new Thread(new Runnable() {\n public void run() {\n (new ClsC()).funCB(Thread.currentThread().getName());\n }\n }, \"Thread_C\");\n tc.start();\n td.start();\n te.start();\n }",
"public void setThread(Thread t);",
"public ThreadAvnet(Element element) {\n this.element = element;\n // run();\n }",
"interface Runnable {\n void execute() throws Throwable;\n default void run() {\n try {\n execute();\n } catch(Throwable t) {\n throw new RuntimeException(t);\n }\n }\n }",
"public static void main(String[] args) {\n\t\tMyThread m = new MyThread();\n\t\tThread m2 = new Thread(new MyRunable());\n\t\tm.start();\n\t\t\n\t\t\n\t\tm2.start();\n\t}",
"tut65(int numero){\n\t\tthis.numero=numero; //me guardo un numero\n\t\t\n\t\tThread thread = new Thread(this); //Pasarle como parametro la clase runnable\n\t\tthread.start();\n\t}",
"PythonThread(Python python, String code) {\n this.python = python;\n this.code = code;\n this.ptf = new PythonTraceFunction();\n this.py = new PythonInterpreter();\n }",
"@Override\n public void threadStarted() {\n }",
"public Thread addPerson(int sourceFloor, int destinationFloor) {\r\n\r\n /**\r\n * Important to add code here to make a\r\n * new thread that runs your person-runnable\r\n * \r\n * Also return the Thread object for your person\r\n * so that it can be reaped in the testSuite\r\n * (you don't have to join() yourself)\r\n */\r\n\r\n Thread thread = new Thread(new Person(sourceFloor, destinationFloor));\r\n thread.start();\r\n\r\n incrementNumberOfPeopleWaitingAtFloor(sourceFloor);\r\n \r\n\r\n return thread;\r\n }",
"protected Thread createPlayerThread()\n\t{\n\t\treturn new Thread(this, \"Audio player thread\");\t\n\t}",
"public static void main(String[] args) {\n Thread thread=new Thread(new MyRunnable(),\"firstThread\");\n thread.start();\n System.out.println(thread.getName());\n }",
"public static void main(String[] args) {\n\t\t\n\t\tThread th = new Thread(new Runnable(){//annonymous inner class\n\t\t\tpublic void run(){\n\t\t\t\tSystem.out.println(\"In other thread\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tth.start();\n\t\t\n\t\t// function has 4 things .. \n\t\t/*\n\t\t * 1.name , \n\t\t * 2. parameters , \n\t\t * 3.body and \n\t\t * 4.return type\n\t\t * \n\t\t * lambda has body and parameters .. no body .. no return type\n\t\t */\n\t\t\n\t\tThread th2 = new Thread(()->\n\t\t\t\tSystem.out.println(\"in thread 2\")\n\t\t\t);\n\t\t\n\t\tth2.start();\n\t\t\n\t\tSystem.out.println(\"In Main\");\n\t\t\n\t\t/*\n\t\t * c -sharp doesn't have backward compatibility\n\t\t * java is backward compatible and can be used with old code\n\t\t * \n\t\t * Lambdas are backed by single abstract method interfaces-- existing libraries you can pass lambdas\n\t\t * java7 and java8 can live together as java8 can leverage lambda and java7 can pass annonymous inner classes\n\t\t * \n\t\t */\n\t\t\n\t\t\n\t\t/*\n\t\t * Lambda under the hood\n\t\t * \n\t\t * second example is just NOT change in the syntax expression\n\t\t */\n\t\tThread th3,th4,th5;\n\t\tth3 = new Thread(()->\n\t\tSystem.out.println(\"in thread 3\"));\n\t\tth4 = new Thread(()->\n\t\tSystem.out.println(\"in thread 4\"));\n\t\tth5 = new Thread(()->\n\t\tSystem.out.println(\"in thread 5\"));\n\t th3.start();\n\t th4.start();\n\t th5.start();\n\t \n\t\t/*\n\t\t * Scala before 2 .. are using anonymous inner classes for lambda\n\t\t * \n\t\t * More anonymous inner classes more classes in the disk .. \n\t\t * loading jars will have more time .. more memory food print .. \n\t\t * anonymous objects.. more garbage .. run time memory is going to be increased\n\t\t * \n\t\t */\n\t \n\t \n\t /*\n\t * java 7 has invokedynamic .. attach and detach to the function dynamically .. also reattach\n\t * at runtime .. function pointers are available in JVM \n\t * \n\t * invokedynamic for implementing dynamic lambda expressions\n\t * \n\t * invokedynamic was rewritten in java8 for lambdas\n\t * \n\t * no anonymous inner classes in the example\n\t * \n\t * all calls are invokedynamic looking at javap\n\t * lambda might be static method ,, or instance method.. or routing of invokedynamic to \n\t * an existing method in other class \n\t * \n\t * \n\t *\n\t *\n\t */\n\n\t\t\n\t}",
"public FuncCallExecutor(ThreadRuntime rt) {\r\n\t\tthis.rt = rt;\r\n\t}",
"public static void main(String[] args) {\n\t\tExtendsThreadCls t = new ExtendsThreadCls();\r\n\t\t \r\n\t}",
"private void newListener() {\n (new Thread(this)).start();\n }",
"ThreadCounterRunner() {}",
"private void startThreads() {\n Listener listener = new Listener();\n Thread listenerThread = new Thread(listener);\n\n listenerThread.start();\n }",
"public void start() {\n thread = new Thread(this);\n thread.setPriority(Thread.MIN_PRIORITY);\n thread.start();\n }",
"public static void main(String args[]) {\n\t\t (new Thread(new Threads_and_Executors())).start();\r\n}",
"public abstract void putThread(Waiter waiter, Thread thread);",
"public void run() {\n\n\n }",
"public static void main(String[] args) throws InterruptedException, ExecutionException {\n\t\tMyThread myThread=new MyThread();\n\t\t//用Excutors 线程执行器类创建可扩展的线程池\n\t\tExecutorService executor=Executors.newCachedThreadPool();\n\t\t//将实现类对象提交到线程池进行管理\n\t\tFuture<Object> result1=executor.submit(myThread);\n\t\tFuture<Object> result2=executor.submit(myThread);\n\t\texecutor.shutdown();\n\t\tSystem.out.println(result1.get());\n\t\tSystem.out.println(result2.get());\n\t}",
"public interface Startable extends Runnable {\n \n /**\n * Waits until the thread this object is running in is finished before returning.\n */\n public void join();\n \n /**\n * Checks whether the component is done with its work.\n * @return <code>true</code> if the component is finished its work\n */\n public boolean isDone();\n \n /**\n * Sets the thread that this object is running in.\n * \n * @param t the thread that this object is running in\n */\n public void setThread(Thread t);\n\n /**\n * Gets the thread that this object is running in.\n * \n * @return the thread that this object is running in\n */\n public Thread getThread();\n\n}",
"public void start() {\n\t\tmyThread = new Thread(this); myThread.start();\n\t}",
"public abstract void runOnUiThread(Runnable runnable);",
"public ThreadTimeoutHandler(Thread thread) {\n\t this.thread = thread;\n\t}",
"void start() {\n\tsleepThread = new Thread(this);\n\tsleepThread.start();\n }",
"public static void main(String[] args) {\n\t\tMyThread mt = new MyThread();\n\t\t// We can assign a name\n\t\tmt.setName(\"Thread 1\");\n\t\tmt.start();\n\t\t\n\t\tMyThreads2 mt2 = new MyThreads2();\n\t\tThread t = new Thread(mt2);\n\t\t\n\t\t//New Thread\n\t\tThread t2 = new Thread(mt2);\n\t\tThread t3 = new Thread(mt2); \n\t\tt.setName(\"Thread 2\");\n\t\tt2.setName(\"Thread 3\");\n\t\tt3.setName(\"Thread 4\");\n\t\tt.start();\n\t\tt2.start();\n\t\tt3.start();\n\t\t\n\t}"
]
| [
"0.7622964",
"0.7439177",
"0.7281032",
"0.7247681",
"0.7088086",
"0.70650136",
"0.7015546",
"0.6993771",
"0.6977898",
"0.69636816",
"0.68349403",
"0.6787434",
"0.6595392",
"0.65947163",
"0.658184",
"0.65483624",
"0.6547933",
"0.6538352",
"0.6519646",
"0.64696944",
"0.6467151",
"0.64453423",
"0.6418517",
"0.6414894",
"0.6386352",
"0.6381644",
"0.6362287",
"0.635883",
"0.6350085",
"0.6293419",
"0.62601495",
"0.6258403",
"0.6256333",
"0.6246655",
"0.6237974",
"0.6146355",
"0.6143715",
"0.6108996",
"0.60538566",
"0.6052489",
"0.6048427",
"0.60481095",
"0.6040093",
"0.6018975",
"0.60165226",
"0.5959507",
"0.5953686",
"0.59520185",
"0.5951586",
"0.5935534",
"0.5904305",
"0.58788615",
"0.5869857",
"0.58621734",
"0.58597505",
"0.5851905",
"0.5847611",
"0.58438087",
"0.5839428",
"0.5829998",
"0.5829156",
"0.58245486",
"0.5824036",
"0.5823486",
"0.5823113",
"0.5804299",
"0.58034384",
"0.5794717",
"0.57781553",
"0.5776908",
"0.5765896",
"0.5756581",
"0.5755272",
"0.5749672",
"0.57482606",
"0.5732953",
"0.5730607",
"0.5727381",
"0.57262045",
"0.5720483",
"0.57133126",
"0.57131505",
"0.5708031",
"0.570461",
"0.57005674",
"0.56969583",
"0.5696464",
"0.56949127",
"0.56786",
"0.56642485",
"0.5661845",
"0.56599396",
"0.56538427",
"0.5653195",
"0.5652455",
"0.5650081",
"0.5644562",
"0.56382847",
"0.56338274",
"0.5605788"
]
| 0.58805007 | 51 |
Created by Ricardo Bravo on 7/07/16. | public interface OnTagDeleteListener {
void onTagDeleted(TagGroup view, TagGroup.Tag tag, int position);
} | {
"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}",
"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\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@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}",
"private void poetries() {\n\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\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"private void m50366E() {\n }",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"public void mo38117a() {\n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\n public void init() {\n\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n public void init() {\n }",
"@Override\n public int retroceder() {\n return 0;\n }",
"public void mo4359a() {\n }",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"private void kk12() {\n\n\t}",
"@Override\n public void init() {}",
"public void method_4270() {}",
"@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 void init() {\n }",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n protected void init() {\n }",
"@Override\r\n\tpublic void init() {}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"@Override public int describeContents() { return 0; }",
"@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 protected void initialize() \n {\n \n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"public void m23075a() {\n }",
"@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}",
"@Override\n public void memoria() {\n \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\tpublic void init() {\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"private void init() {\n\n\t}",
"@Override\n\tpublic void nefesAl() {\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 }",
"private void m50367F() {\n }",
"public abstract void mo70713b();",
"public void mo21779D() {\n }",
"@Override\n\tpublic void jugar() {}",
"public final void mo91715d() {\n }"
]
| [
"0.60618854",
"0.60239667",
"0.58510906",
"0.5805997",
"0.58017904",
"0.58017904",
"0.5792242",
"0.57703006",
"0.5737736",
"0.57067055",
"0.5706095",
"0.56990796",
"0.56983715",
"0.56744635",
"0.5666943",
"0.5656584",
"0.5635593",
"0.56338704",
"0.56291497",
"0.5622822",
"0.56097937",
"0.5594597",
"0.55912614",
"0.5589624",
"0.55765",
"0.5559984",
"0.5535764",
"0.5533164",
"0.55236626",
"0.55188316",
"0.55188316",
"0.55188316",
"0.55188316",
"0.55188316",
"0.551638",
"0.5501452",
"0.5492568",
"0.54729736",
"0.5470394",
"0.5470394",
"0.5461953",
"0.54583293",
"0.54357046",
"0.54337424",
"0.54293066",
"0.5425007",
"0.5424808",
"0.54102993",
"0.54102993",
"0.54102993",
"0.54102993",
"0.54102993",
"0.54102993",
"0.54050577",
"0.5399662",
"0.5385968",
"0.5376634",
"0.53764915",
"0.53764915",
"0.5375716",
"0.5366521",
"0.5365985",
"0.5364779",
"0.53547114",
"0.53482056",
"0.5345504",
"0.53390193",
"0.53385544",
"0.53385544",
"0.53385544",
"0.5336126",
"0.5326631",
"0.53260154",
"0.53260154",
"0.53260154",
"0.53218585",
"0.53203374",
"0.53203374",
"0.5319248",
"0.53186184",
"0.53077817",
"0.53071296",
"0.53071296",
"0.53071296",
"0.53025806",
"0.53006667",
"0.5297598",
"0.5294549",
"0.5286677",
"0.52811867",
"0.52811867",
"0.52811867",
"0.52811867",
"0.52811867",
"0.52811867",
"0.52811867",
"0.52734745",
"0.5269339",
"0.52688324",
"0.5266069",
"0.52645385"
]
| 0.0 | -1 |
Creates new form IfrViagem | public IfrViagem() {
initComponents();
v = new Viagem();
criarViagem();
Formatacao.formatarData(ftfDataSaida);
Formatacao.formatarHora(ftfHoraSaida);
Formatacao.formatarData(ftfDataRetorno);
Formatacao.formatarHora(ftfHoraRetorno);
Formatacao.formatarReal(ftfValorViagem);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public SrvINFONEGOCIO(AgregarInfoNegocio view) {//C.P.M Tendremos un constructor con la vista de agregar informacion de negocio\r\n this.vista = view;//C.P.M Se la agregamos a la variable para tener acceso a la vista \r\n }",
"@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}",
"@GetMapping(value = \"/create\") // https://localhost:8080/etiquetasTipoDisenio/create\n\tpublic String create(Model model) {\n\t\tetiquetasTipoDisenio etiquetasTipoDisenio = new etiquetasTipoDisenio();\n\t\tmodel.addAttribute(\"title\", \"Registro de una nuev entrega\");\n\t\tmodel.addAttribute(\"etiquetasTipoDisenio\", etiquetasTipoDisenio); // similar al ViewBag\n\t\treturn \"etiquetasTipoDisenio/form\"; // la ubicacion de la vista\n\t}",
"@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}",
"private void addInstituicao() {\n\n if (txtNome.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Campo Nome Invalido\");\n txtNome.grabFocus();\n return;\n } else if (txtNatureza.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Campo Natureza Invalido\");\n txtNatureza.grabFocus();\n return;\n }\n if ((instituicao == null) || (instituicaoController == null)) {\n instituicao = new Instituicao();\n instituicaoController = new InstituicaoController();\n }\n instituicao.setNome(txtNome.getText());\n instituicao.setNatureza_administrativa(txtNatureza.getText());\n if (instituicaoController.insereInstituicao(instituicao)) {\n limpaCampos();\n JOptionPane.showMessageDialog(null, \"Instituicao Cadastrada com Sucesso\");\n }\n }",
"public void CrearNew(ActionEvent e) {\n List<Pensum> R = ejbFacade.existePensumID(super.getSelected().getIdpensum());\n if(R.isEmpty()){\n super.saveNew(e);\n }else{\n new Auxiliares().setMsj(3,\"PENSUM ID YA EXISTE\");\n }\n }",
"@Override\r\n\tprotected void agregarObjeto() {\r\n\t\t// opcion 1 es agregar nuevo justificativo\r\n\t\tthis.setTitle(\"PROCESOS - PERMISOS INDIVIDUALES (AGREGANDO)\");\r\n\t\tthis.opcion = 1;\r\n\t\tactivarFormulario();\r\n\t\tlimpiarTabla();\r\n\t\tthis.panelBotones.habilitar();\r\n\t}",
"public FormInserir() {\n initComponents();\n }",
"private void azzeraInsertForm() {\n\t\tviewInserimento.getCmbbxTipologia().setSelectedIndex(-1);\n\t\tviewInserimento.getTxtFieldDataI().setText(\"\");\n\t\tviewInserimento.getTxtFieldValore().setText(\"\");\n\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.white);\n\t\tviewInserimento.getTxtFieldValore().setBackground(Color.white);\n\t}",
"public String nuevo() {\n\n\t\tLOG.info(\"Submitado formulario, accion nuevo\");\n\t\tString view = \"/alumno/form\";\n\n\t\t// las validaciones son correctas, por lo cual los datos del formulario estan en\n\t\t// el atributo alumno\n\n\t\t// TODO simular index de la bbdd\n\t\tint id = this.alumnos.size();\n\t\tthis.alumno.setId(id);\n\n\t\tLOG.debug(\"alumno: \" + this.alumno);\n\n\t\t// TODO comprobar edad y fecha\n\n\t\talumnos.add(alumno);\n\t\tview = VIEW_LISTADO;\n\t\tmockAlumno();\n\n\t\t// mensaje flash\n\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\tExternalContext externalContext = facesContext.getExternalContext();\n\t\texternalContext.getFlash().put(\"alertTipo\", \"success\");\n\t\texternalContext.getFlash().put(\"alertMensaje\", \"Alumno \" + this.alumno.getNombre() + \" creado con exito\");\n\n\t\treturn view + \"?faces-redirect=true\";\n\t}",
"public CrearQuedadaVista() {\n }",
"public static void create(Formulario form){\n daoFormulario.create(form);\n }",
"public Ventaform() {\n initComponents();\n }",
"private void iniciaFrm() {\n statusLbls(false);\n statusBtnInicial();\n try {\n clientes = new Cliente_DAO().findAll();\n } catch (Exception ex) {\n Logger.getLogger(JF_CadastroCliente.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@GetMapping(\"/producto/nuevo\")\n\tpublic String nuevoProductoForm(Model model) {\n\t\tmodel.addAttribute(\"producto\", new Producto());\n\t\treturn \"app/producto/form\";\n\t}",
"public frmTelaVendas() {\n initComponents();\n this.carrinho = new CarrinhoDeCompras();\n listaItens.setModel(this.lista);\n }",
"public ViewCreatePagamento() {\n initComponents();\n clientesDAO cDAO = DaoFactory.createClientesDao(); \n matriculaDAO mDAO = DaoFactory.createMatriculaDao();\n \n cmbIDClientes.addItem(null);\n cDAO.findAll().forEach((p) -> {\n cmbIDClientes.addItem(p.getNome());\n });\n \n \n txtDataAtual.setText(DateFormat.getDateInstance().format(new Date()));\n }",
"public frm_tutor_subida_prueba() {\n }",
"public FormularioLivroView() {\n initComponents();\n }",
"@GetMapping(\"/createRegistro\")\n\tpublic String crearValidacion(Model model) {\n\t\tList<Barrio> localidades = barrioService.obtenerBarrios();\n\t\tmodel.addAttribute(\"localidades\",localidades);\n\t\tmodel.addAttribute(\"persona\",persona);\n\t\tmodel.addAttribute(\"validacion\",validacion);\n\t\tmodel.addAttribute(\"registro\",registro);\n\t\tmodel.addAttribute(\"barrio\",barrio);\n\t\treturn \"RegistroForm\";\n\t}",
"public void crearAutomovil(){\r\n automovil = new Vehiculo();\r\n automovil.setMarca(\"BMW\");\r\n automovil.setModelo(2010);\r\n automovil.setPlaca(\"TWS435\");\r\n }",
"public AfiliadoVista() {\r\n }",
"public Vehiculo() {\r\n }",
"public JIFInventario() {\n initComponents();\n }",
"private String creerOeuvre(HttpServletRequest request) throws Exception {\n\n String vueReponse;\n try {\n Oeuvre oeuvreE = new Oeuvre();\n oeuvreE.setIdOeuvre(0);\n request.setAttribute(\"oeuvreR\", oeuvreE);\n request.setAttribute(\"titre\", \"Créer une oeuvre\");\n vueReponse = \"/oeuvre.jsp\";\n return (vueReponse);\n } catch (Exception e) {\n throw e;\n }\n }",
"private void crearVista() {\n\t\tVista vista = Vista.getInstancia();\n\t\tvista.addObservador(this);\n\n\t}",
"public void SalvarNovaPessoa(){\r\n \r\n\t\tpessoaModel.setUsuarioModel(this.usuarioController.GetUsuarioSession());\r\n \r\n\t\t//INFORMANDO QUE O CADASTRO FOI VIA INPUT\r\n\t\tpessoaModel.setOrigemCadastro(\"I\");\r\n \r\n\t\tpessoaRepository.SalvarNovoRegistro(this.pessoaModel);\r\n \r\n\t\tthis.pessoaModel = null;\r\n \r\n\t\tUteis.MensagemInfo(\"Registro cadastrado com sucesso\");\r\n \r\n\t}",
"@RequestMapping(value = \"/guardarVoto\", method = RequestMethod.POST)\n\tpublic String GetVoteInfo(VotoForm votacion, Model model) {\n\n\t\tif (votacion != null) {\n\t\t\t// OBTENER LOS DATOS DEL FORMULARIO\n\t\t\tLong idVotacion = 1L;\n\n\t\t\t// DATOS VOTANTE\n\t\t\tString NIF = votacion.getNif();\n\t\t\tString tipovoto = TipoVoto.WEB.toString();\n\t\t\tboolean estado = true;\n\t\t\tVotante votante = new Votante(NIF, tipovoto, estado, idVotacion);\n\n\t\t\t//Comprobamos que el usuario puede votar\n\t\t\tInsertVirtual ins = new InsertVirtualR(votante);\n\t\t\tVotante vot = ins.getTipoVoto(new InsertVirtualVotesP());\n\n\t\t\tif (vot != null && !vot.isEstado() && vot.getTipovoto().equals(TipoVoto.WEB.toString())) {\n\t\t\t\t// Obtenemos el censo del votante\n\t\t\t\tCensos censo = ins.getCenso(new InsertVirtualVotesP());\n\n\t\t\t\t// Datos de la votacion\n\t\t\t\tString tipoVoto = TipoVoto.WEB.toString();\n\t\t\t\tLong aux = null;\n\t\t\t\tif(votacion.getOpcion().equals(\"SI\"))\n\t\t\t\t\taux =1L;\n\t\t\t\telse if(votacion.getOpcion().equals(\"NO\"))\n\t\t\t\t\taux=2L;\n\t\t\t\telse if(votacion.getOpcion().equals(\"BLANCO\"))\n\t\t\t\t\taux=3L;\n\t\t\t\tLong opcionEscogida = aux;\n\t\t\t\t//Long opcionEscogida = (long) (Double.parseDouble(votacion.getOpcion()));\n\t\t\t\tString colegioElectoral = String.valueOf(censo.getCofColegioElectoral());\n\n\t\t\t\tint totalVotos = 4;\n\t\t\t\tVotos votos = new Votos(tipoVoto, opcionEscogida, totalVotos, idVotacion, colegioElectoral);\n\n\t\t\t\t// Marcamos que el votante ya realizó su voto\n\t\t\t\tins = new InsertVirtualR(votante, votos);\n\t\t\t\tins.setTypeVote(new InsertVirtualVotesP());\n\t\t\t\tins.setVote(new InsertVirtualVotesP());\n\t\t\t\t\n\t\t\t\tmodel.addAttribute(\"resultado\", \"Su voto se ha realizado correctamente.\");\n\t\t\t\treturn \"exitoGuardarVotacion\"; // ?????\n\t\t\t}\n\t\t}\n\t\tmodel.addAttribute(\"resultado\", \"Su voto no se ha podido realizar, pruebe otra vez.\");\n\t\treturn \"/error\";\n\n\t}",
"public DialogoAggiungiFissi() {\n /* rimanda al costruttore della superclasse */\n super();\n\n\n try { // prova ad eseguire il codice\n /* regolazioni iniziali di riferimenti e variabili */\n this.inizia();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }",
"@Override\n\tpublic void createForm(ERForm form) {\n\t\t\tString sql = \"insert into project1.reimbursementInfo (userName, fullName, thedate, eventstartdate, thelocation, description, thecost, gradingformat, passingpercentage, eventtype, filename,status,reason) values (?,?,?,?,?,?,?,?,?,?,?,?,?);\";\n\t\t\ttry {PreparedStatement stmt = conn.prepareCall(sql);\n\t\t\t//RID should auto increment, so this isnt necessary\n\t\t\t\n\t\t\tstmt.setString(1, form.getUserName());\n\t\t\tstmt.setString(2, form.getFullName());\n\t\t\tstmt.setDate(3, Date.valueOf(form.getTheDate()));\n\t\t\tstmt.setDate(4, Date.valueOf(form.getEventStartDate()));\n\t\t\tstmt.setString(5, form.getTheLocation());\n\t\t\tstmt.setString(6, form.getDescription());\n\t\t\tstmt.setDouble(7, form.getTheCost());\n\t\t\tstmt.setString(8, form.getGradingFormat());\n\t\t\tstmt.setString(9, form.getPassingPercentage());\n\t\t\tstmt.setString(10, form.getEventType());\n\t\t\tstmt.setString(11, form.getFileName());\n\t\t\tstmt.setString(12, \"pending\");\n\t\t\tstmt.setString(13, \"\");\n\t\t\tstmt.executeUpdate();\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override //inserisce un viaggio nel db // \r\n\tpublic boolean create(Viaggio viaggio) {\r\n\t\tboolean esito=false;\r\n\t\tif(viaggio==null) {\r\n\t\t\tSystem.out.println( \"insert(): failed to insert a null entry\");\r\n\t\t\t}\r\n\t\ttry {\r\n\t\t\tPreparedStatement prep_stmt = conn.prepareStatement(MssqlViaggioDAO.insert);\r\n\t\t\tprep_stmt.clearParameters();\r\n\t\t\t//prep_stmt.setInt(1,viaggio.getIdViaggio());\r\n\t\t\tint i=1;\r\n\t\t\tprep_stmt.setInt(i++,viaggio.getCreatore().getId());\r\n\t\t\tprep_stmt.setString(i++,viaggio.getTitolo());\r\n\t\t\tprep_stmt.setString(i++,viaggio.getDestinazione());\r\n\t\t\tprep_stmt.setString(i++,viaggio.getDescrizione());\r\n\t\t\tprep_stmt.setString(i++,viaggio.getLingua());\r\n\t\t\tprep_stmt.setInt(i++,viaggio.getBudget());\r\n\t\t\tprep_stmt.setString(i++,viaggio.getLuogopartenza());\r\n\t\t\tprep_stmt.setInt(i++,viaggio.getStato().ordinal());\r\n\t\t\tprep_stmt.setDate(i++,viaggio.getDatainizio());\r\n\t\t\tprep_stmt.setDate(i++,viaggio.getDatafine());\r\n\t\t\tprep_stmt.setString(i++,viaggio.getImmaginiProfilo());\t\t\r\n\t\t\tif(prep_stmt.executeUpdate()>0) esito= true;\r\n\t\t\telse esito= false;\r\n\t\t\tprep_stmt.close();\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tSystem.out.println(\"create(): failed to insert entry: \" + e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\ttry {\r\n\t\t\t\tconn.close();\r\n\t\t\t\treturn esito;\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"FORM createFORM();",
"public vOferta() {\n initComponents();\n }",
"private void iniciarNovaVez() {\n this.terminouVez = false;\n }",
"public void nouveau(){\r\n try {\r\n viewEtudiantInscripEcheance = new ViewEtudiantInscriptionEcheance();\r\n echeance_etudiant = new EcoEcheanceEtudiant(); \r\n \r\n } catch (Exception e) {\r\n System.err.println(\"Erreur capturée : \"+e);\r\n }\r\n }",
"public ProfilsFIForm() {\r\n\t\tsuper();\r\n\t}",
"public void crearEntidad() throws EntidadNotFoundException {\r\n\t\tif (validarCampos(getNewEntidad())) {\r\n\t\t\tif (validarNomNitRepetidoEntidad(getNewEntidad())) {\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_WARN, \"Advertencia: \", \"Nombre, Nit o Prejifo ya existe en GIA\"));\r\n\t\t\t} else {\r\n\t\t\t\tif (entidadController.crearEntidad(getNewEntidad())) {\r\n\t\t\t\t\tmensajeGrow(\"Entidad Creada Satisfactoriamente\", getNewEntidad());\r\n\t\t\t\t\tRequestContext.getCurrentInstance().execute(\"PF('entCrearDialog').hide()\");\r\n\t\t\t\t\tsetNewEntidad(new EntidadDTO());\r\n\t\t\t\t\tresetCodigoBUA();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmensajeGrow(\"Entidad No Fue Creada\", getNewEntidad());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlistarEntidades();\r\n\t\t\t// newEntidad = new EntidadDTO();\r\n\t\t\t// fechaActual();\r\n\t\t}\r\n\r\n\t}",
"public CadastroProdutoNew() {\n initComponents();\n }",
"public VistaInicio() {\n initComponents();\n }",
"public ConsultaMassivaCapitoloEntrataPrevisioneModel() {\n\t\tsuper();\n\t\tsetTitolo(\"Consulta Capitolo Entrata Previsione (Massivo)\");\n\t}",
"public FiltroGirosDialog() {\n \n }",
"@Override\n protected void carregaObjeto() throws ViolacaoRegraNegocioException {\n entidade.setNome( txtNome.getText() );\n entidade.setDescricao(txtDescricao.getText());\n entidade.setTipo( txtTipo.getText() );\n entidade.setValorCusto(new BigDecimal((String) txtCusto.getValue()));\n entidade.setValorVenda(new BigDecimal((String) txtVenda.getValue()));\n \n \n }",
"@RequestMapping(\"/upload\")\n public String formNewGif(Model model) {\n if (!model.containsAttribute(\"gif\")) {\n model.addAttribute(\"gif\", new Gif());\n }\n model.addAttribute(\"categories\", categoryService.findAll());\n model.addAttribute(\"action\", \"/gifs\");\n model.addAttribute(\"heading\", \"Upload Gif\");\n model.addAttribute(\"submit\", \"Upload\");\n return \"gif/form\";\n }",
"@RequestMapping(\"enviar\")\n\tpublic String abrirForm() {\n\t\treturn \"contato/form\";\n\t}",
"public NovaContaFisica() {\n initComponents();\n }",
"public frmAfiliado() {\n initComponents();\n \n }",
"public FRMCadastrarFornecedor() {\n initComponents();\n }",
"public InvoiceLineViewForm() throws IllegalArgumentException, Exception {\n\t\tbuildMainLayout();\n\t\tsetCompositionRoot(mainLayout);\n\t\t\n\t\t// TODO add user code here\t\t\n\t\tinitComponents();\n\t\t\n\t\t// configure Organization Type data\n\t\tinvoiceLineStatusField.setItemCaptionMode(Select.ITEM_CAPTION_MODE_PROPERTY);\n\t\tinvoiceLineStatusField.setItemCaptionPropertyId(\"description\");\n\t\t\n\t\tinvoiceField.setItemCaptionMode(Select.ITEM_CAPTION_MODE_PROPERTY);\n\t\tinvoiceField.setItemCaptionPropertyId(\"code\");\n\t\t\n\t\tivaField.setItemCaptionMode(Select.ITEM_CAPTION_MODE_PROPERTY);\n\t\tivaField.setItemCaptionPropertyId(\"description\");\n\t\t\t\t\n\t\t// get form services from OSGi Service Registry\n\t\tgetServices();\n\t\t\n\t\t// load data sources\n\t\tloadData();\t\t\n\t}",
"private void initFormulario() {\n btnCadastro = findViewById(R.id.btnCadastro);\n editNome = findViewById(R.id.editNome);\n editEmail = findViewById(R.id.editEmail);\n editSenhaA = findViewById(R.id.editSenha);\n editSenhaB = findViewById(R.id.editSenhaB);\n chTermo = findViewById(R.id.chTermos);\n isFormOk = false;\n }",
"public void controlloEventiInserimento() {\n\t\t/**\n\t\t * Riempimento form informativo riguardo\n\t\t * all'ultima quota inserita per un determinato\n\t\t * tipo di socio\n\t\t */ \n\t\tviewInserimento.getCmbbxTipologia().addItemListener(new ItemListener() {\n\t\t\t@Override\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\tif (viewInserimento.getCmbbxTipologia().getSelectedIndex() != -1) {\n\t\t\t\t\tquotapre = model.getQuotaPrecendente(viewInserimento.getCmbbxTipologia()\n\t\t\t\t\t\t\t.getItemAt(viewInserimento.getCmbbxTipologia().getSelectedIndex()));\n\t\t\t\t\tif (quotapre != null) {\n\t\t\t\t\t\tviewInserimento.getTxtFieldDataIPre().setText(quotapre.getDataI().toString());\n\t\t\t\t\t\tviewInserimento.getTxtFieldValorePre().setText(String.valueOf(quotapre.getValore()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (viewInserimento.getCmbbxTipologia().getSelectedIndex() == -1 || quotapre == null) {\n\t\t\t\t\tviewInserimento.getTxtFieldDataIPre().setText(\"\");\n\t\t\t\t\tviewInserimento.getTxtFieldValorePre().setText(\"\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t/**\n\t\t * Evento inserimento quota \n\t\t */\n\t\tviewInserimento.getBtnInserisci().addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tif (validatorForm()) {\n\t\t\t\t\tboolean esito = false;\n\t\t\t\t\tQuota quota = null;\n\t\t\t\t\tquota = new Quota(Float.valueOf(viewInserimento.getTxtFieldValore().getText()).floatValue(),\n\t\t\t\t\t\t\tviewInserimento.getCmbbxTipologia().getSelectedItem().toString(),\n\t\t\t\t\t\t\tDate.valueOf(viewInserimento.getTxtFieldDataI().getText() + \"-01\"));\n\t\t\t\t\tesito = model.insertQuota(quota);\n\t\t\t\t\tif (esito) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(viewInserimento.getFrame().getContentPane(), \"Quota inserita\");\n\t\t\t\t\t\tazzeraInsertForm();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(viewInserimento.getFrame().getContentPane(),\n\t\t\t\t\t\t\t\t\"Inserimento non effettuato\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(viewInserimento.getFrame().getContentPane(),\n\t\t\t\t\t\t\t\"Campi non validi, modificare i campi contrassegnati in rosso\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t/**\n\t\t * Evento azzeramento form \n\t\t */\n\t\tviewInserimento.getBtnAzzera().addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tazzeraInsertForm();\n\t\t\t}\n\t\t});\n\n\t\t/**\n\t\t * Evento ritorno all'AdminView \n\t\t */\n\t\tviewInserimento.getBtnDashboard().addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tAdminController adminController = new AdminController();\n\t\t\t\tadminController.controlloEvento();\n\t\t\t\tviewInserimento.getFrame().dispose();\n\t\t\t}\n\t\t});\n\t}",
"public CrearPedidos() {\n initComponents();\n }",
"public ConsultarVeiculo() {\n initComponents();\n }",
"@Override\r\n public void agregarVehiculo(VehiculoModel vehiculo) {\n Connection conn = null;\r\n try{\r\n conn = Conexion.getConnection();\r\n String sql = \"Insert into vehiculo(veh_placa, veh_marca, veh_modelo, veh_anio, veh_capacidad, veh_color, veh_kilometros) values (?, ?, ?, ?, ?, ?, ?)\";\r\n PreparedStatement statement = conn.prepareStatement(sql);\r\n statement.setString(1, vehiculo.getVehPlaca());\r\n statement.setString(2, vehiculo.getVehMarca());\r\n statement.setString(3, vehiculo.getVehModelo());\r\n statement.setInt(4, vehiculo.getVehAnio());\r\n statement.setInt(5, vehiculo.getVehCapacidad());\r\n statement.setString(6, vehiculo.getVehColor());\r\n statement.setInt(7, vehiculo.getVehKilometros());\r\n //para insert into se usa executeUpdate();\r\n int rowUpdated = statement.executeUpdate();\r\n if(rowUpdated > 0){\r\n JOptionPane.showMessageDialog(null, \"El registro fue \" \r\n + \" creado exitosamente.\");\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Codigo : \" + ex.getErrorCode() + \"\\nError : \" + ex.getMessage());\r\n }\r\n }",
"public FGlavna() {\n initComponents();\n pripremiFormu();\n }",
"public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }",
"public InvoiceCreate() {\n initComponents();\n }",
"public Result inicioGenerarLibro(){\n ContabilidadDTO dto = new ContabilidadDTO();\n dto.tipoLibro = new Parametro(\"\",\"LVEN\",\"\");\n //dto.tipoLibro.id.codigo =\"LVEN\";\n dto.anio = new Parametro(\"\",\"2018\",\"\");\n //dto.anio.id.codigo =\"2018\";\n dto.mes = new Parametro(\"\",\"3\",\"\");\n //dto.mes.id.codigo =\"3\"; //Simpre debe ser el mes anterior al actual\n\n Form<ContabilidadDTO> contabilidadDTOForm = formFactory.form(ContabilidadDTO.class).fill(dto);\n\n/*\n EbeanServer db = DBConnectionUtil.getDBServerFacturador();\n List<BandejaFactura> lista = db.find(BandejaFactura.class).findList();; //BandejaFactura.find.all();//obtenerTodos();\n for (BandejaFactura x:lista) {\n System.out.println(x);\n }\n*/\n/*\n EbeanServer db = DBConnectionUtil.getDBServerSGV();\n List<ControlVenta> lista = db.find(ControlVenta.class)\n .where().ilike(\"CVNT_NUM_DOCUMENTO\", \"F002-00000213\")\n .findList();\n for (ControlVenta x:lista) {\n System.out.println(\"*********** \"+x);\n }\n*/\n/*\n EbeanServer db = DBConnectionUtil.getDBServerSGV();\n List<ControlVenta> lista = db.find(ControlVenta.class).findList();; //BandejaFactura.find.all();//obtenerTodos();\n for (ControlVenta x:lista) {\n System.out.println(x);\n }\n*/\n\n return ok(generadorLibrosContables.render(contabilidadDTOForm));\n }",
"public telaAddPedidoII() {\n initComponents();\n }",
"public void createAgendamento() {\n\n if (tbagendamento.getTmdataagendamento().after(TimeControl.getDateIni())) {\n if (agendamentoLogic.createTbagendamento(tbagendamento)) {\n AbstractFacesContextUtils.redirectPage(PagesUrl.URL_AGENDAMENTO_LIST);\n AbstractFacesContextUtils.addMessageInfo(\"Agendamento cadastrado com sucesso.\");\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"Falhar ao realizado cadastro do agendamento.\");\n }\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"verifique se a data de agendamento esta correta.\");\n }\n }",
"public frmAddIncidencias() {\n initComponents();\n }",
"public String crea() {\n c.setId(0);\n clienteDAO.crea(c); \n //Post-Redirect-Get\n return \"visualiza?faces-redirect=true&id=\"+c.getId();\n }",
"@GetMapping(\"/cliente/new\")\n\tpublic String newCliente(Model model) {\n\t\tmodel.addAttribute(\"cliente\", new Cliente());\n\t\tControllerHelper.setEditMode(model, false);\n\t\t\n\t\t\n\t\treturn \"cadastro-cliente\";\n\t\t\n\t}",
"public Form_reporte_comuna_y_tipo(Controlador cont) {\n initComponents();\n this.controlador = cont;\n cargarSelect();\n\n }",
"public VistaCrearPedidoAbonado() {\n initComponents();\n errorLabel.setVisible(false);\n controlador = new CtrlVistaCrearPedidoAbonado(this);\n }",
"public void controladorVistoNotif(Controlador controlador){\n this.contVistoNotif = controlador.getVistoNotif();\n notif.setControlVisto(contVistoNotif);\n }",
"public FrmPartida(JugadorPartida jp){\n initComponents();\n PnlPartida.setVisible(false);\n jugadorPartida = jp;\n this.setTitle(\"Jugador: \" + jp.getJugador().getNombreUsuario() + \" - Esperando en Lobby...\"); \n controller = new PartidaController(this, jugadorPartida);\n lblNumeroJugadores.setText(\"Jugadores esperando: \" + jp.getPartida().getColJugadores().size()); \n btnTirarCarta.setEnabled(false);\n pozo = (jugadorPartida.getPartida().getValorApuesta() * 3);\n \n \n \n \n }",
"public DialogoAggiungiFissiConto(int codConto) {\n /* rimanda al costruttore della superclasse */\n super();\n\n try { // prova ad eseguire il codice\n\n /* regola le variabili di istanza coi parametri */\n this.setCodConto(codConto);\n\n /* regolazioni iniziali di riferimenti e variabili */\n this.inizia();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }",
"public interface NuevoTesauroForm\r\n{\r\n}",
"public ViewDetalleVentas() {\n initComponents();\n }",
"@RequestMapping(value = \"/create\", method = RequestMethod.POST)\n public ModelAndView create(@RequestParam(\"horasalida\") Date horasalida,@RequestParam(\"horallegada\") Date horallegada,@RequestParam(\"aeropuerto_idaeropuerto\") Long aeropuerto_idaeropuerto,\n \t\t@RequestParam(\"aeropuerto_idaeropuerto2\") Long aeropuerto_idaeropuerto2,@RequestParam(\"avion_idavion\") Long avion_idavion) {\n Vuelo post=new Vuelo();\n post.setHorallegada(horallegada);\n post.setHorasalida(horasalida);\n\t\t\n post.setAeropuerto_idaeropuerto(aeropuerto_idaeropuerto);\n post.setAeropuerto_idaeropuerto2(aeropuerto_idaeropuerto2);\n post.setAvion_idavion(avion_idavion);\n repository.save(post);\n return new ModelAndView(\"redirect:/vuelos\");\n }",
"public Veiculo() {\r\n\r\n }",
"private void realizarVinculos() {\n btnVoltar = findViewById(R.id.btnVoltar);\n\n edtNome = findViewById(R.id.edtNome);\n edtCPF = findViewById(R.id.edtCpf);\n edtTelefone = findViewById(R.id.edtTelefone);\n edtIdade = findViewById(R.id.edtIdade);\n edtEmail = findViewById(R.id.edtEmail);\n }",
"public TelaRegistroVendas() {\n initComponents();\n }",
"public FrmInsertar() {\n initComponents();\n }",
"public FrmIntProveedor() {\n initComponents();\n muestraProveedor();\n\n }",
"private void criaInterface() {\n\t\tColor azul = new Color(212, 212, 240);\n\n\t\tpainelMetadado.setLayout(null);\n\t\tpainelMetadado.setBackground(azul);\n\n\t\tmetadadoLabel = FactoryInterface.createJLabel(10, 3, 157, 30);\n\t\tpainelMetadado.add(metadadoLabel);\n\n\t\tbotaoAdicionar = FactoryInterface.createJButton(520, 3, 30, 30);\n\t\tbotaoAdicionar.setIcon(FactoryInterface.criarImageIcon(Imagem.ADICIONAR));\n\t\tbotaoAdicionar.setToolTipText(Sap.ADICIONAR.get(Sap.TERMO.get()));\n\t\tpainelMetadado.add(botaoAdicionar);\n\n\t\tbotaoEscolha = FactoryInterface.createJButton(560, 3, 30, 30);\n\t\tbotaoEscolha.setIcon(FactoryInterface.criarImageIcon(Imagem.VOLTAR_PRETO));\n\t\tbotaoEscolha.setToolTipText(Sap.ESCOLHER.get(Sap.TERMO.get()));\n\t\tbotaoEscolha.setEnabled(false);\n\t\tpainelMetadado.add(botaoEscolha);\n\n\t\talterarModo(false);\n\t\tatribuirAcoes();\n\t}",
"@GetMapping(value = \"/utilisateur/inscription\")\n public String inscriptionForm(Model model){\n Utilisateur utilisateur=new Utilisateur();\n logger.info(\"Un visiteur veut accéder au formulaire d'inscription\");\n model.addAttribute(\"utilisateur\",utilisateur);\n return \"inscription\";\n }",
"public frmVenda() {\n initComponents();\n }",
"Vaisseau_Vaisseau createVaisseau_Vaisseau();",
"Vaisseau_Vaisseau createVaisseau_Vaisseau();",
"Vaisseau_Vaisseau createVaisseau_Vaisseau();",
"Vaisseau_Vaisseau createVaisseau_Vaisseau();",
"public Form getRecordVehicule() {\n if (RecordVehicule == null) {//GEN-END:|36-getter|0|36-preInit\n // write pre-init user code here\n RecordVehicule = new Form(\"V\\u00E9hicule en infraction\", new Item[]{getStringItem2(), getTextField3(), getTextField4()});//GEN-BEGIN:|36-getter|1|36-postInit\n RecordVehicule.addCommand(getOkCommand3());\n RecordVehicule.setCommandListener(this);//GEN-END:|36-getter|1|36-postInit\n // write post-init user code here\n }//GEN-BEGIN:|36-getter|2|\n return RecordVehicule;\n }",
"public FrmCrearFotoEmpresa() {\n initComponents();\n }",
"public AvtekOkno() {\n initComponents();\n }",
"@Override\r\n\tpublic void entregarRecibo() {\n\t\tSystem.out.println(\"Imprimir recibo\");\r\n\t}",
"public XStatusForm(Icq icq) {\n this.icq = icq;\n }",
"public ViewIngrediente() {\n initComponents();\n this.setLocationRelativeTo(null);\n \n ImageIcon check = new ImageIcon(\"Images/success-menor.png\");\n jButtonSalvarMedida.setIcon(check);\n ImageIcon proximo = new ImageIcon(\"Images/next-azul-menor.png\");\n jButtonProximaMedida.setIcon(proximo);\n ImageIcon anterior = new ImageIcon(\"Images/previous-azul-menor.png\");\n jButtonMedidaAnterior.setIcon(anterior);\n ImageIcon novoEndereco = new ImageIcon(\"Images/plus-menor.png\");\n jButtonNovaMedida.setIcon(novoEndereco);\n \n ImageIcon editar = new ImageIcon(\"Images/edit.png\");\n jButtonEditarMedida.setIcon(editar);\n jButtonEditarIngrediente.setIcon(editar);\n \n ImageIcon excluir = new ImageIcon(\"Images/delete.png\");\n jButtonExcluirMedida.setIcon(excluir);\n jButtonExcluirIngrediente.setIcon(excluir);\n \n visibleEditarIngrediente(false);\n visibleExcluirIngredienteTelaCadastro(false);\n\n }",
"Motivo create(Motivo motivo);",
"public VistaPedido() {\n initComponents();\n }",
"public VistaDetallemensaje() {\n // You can initialise any data required for the connected UI components here.\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 }",
"public frmPesquisaServico() {\n initComponents();\n listarServicos();\n }",
"public Ficha_Ingreso_Egreso() {\n initComponents();\n limpiar();\n bloquear();\n \n }",
"public EditarVenda() {\n initComponents();\n URL caminhoIcone = getClass().getResource(\"/mklivre/icone/icone2.png\");\n Image iconeTitulo = Toolkit.getDefaultToolkit().getImage(caminhoIcone);\n this.setIconImage(iconeTitulo);\n conexao = ModuloConexao.conector();\n codigoCliente.setEnabled(false);\n lucro.setEnabled(false);\n valorLiquidoML.setEnabled(false);\n }",
"public PanelRpEd(VEditarPr v) {\n vpregunta = v;\n initComponents();\n }",
"@Override\n\tpublic SATipoVivienda generarSATipoVivienda() {\n\t\treturn new SATipoViviendaImp();\n\t}",
"public Inventario() {\n initComponents();\n }",
"public Vencimientos() {\n initComponents();\n \n \n }",
"@Override\n\tpublic void goToUiMantTipoNotificacionInsertar() {\n\t\tif (ui == null) {\n\t\t\tui = new UiMantTipoNotificacionImpl(this);\n\t\t\tui.setModo(UiMantenimiento.MODOINSERTAR);\n\t\t\tui.loadFields();\n\t\t\tui.show();\n\t\t} else {\n\t\t\tui.setModo(UiMantenimiento.MODOINSERTAR);\n\t\t\tui.loadFields();\n\t\t\tui.show();\n\t\t}\n\t}"
]
| [
"0.6351408",
"0.6313825",
"0.6020398",
"0.595509",
"0.59450215",
"0.5886757",
"0.58554447",
"0.5785354",
"0.5767957",
"0.57352245",
"0.5718646",
"0.5669904",
"0.565581",
"0.5631023",
"0.5628643",
"0.5614351",
"0.56077164",
"0.5604907",
"0.56035113",
"0.5585308",
"0.55849665",
"0.556692",
"0.5563951",
"0.55580235",
"0.5537468",
"0.5536611",
"0.5527045",
"0.552456",
"0.5518116",
"0.55103564",
"0.549677",
"0.5489496",
"0.54884297",
"0.5487247",
"0.5472131",
"0.5469948",
"0.54662544",
"0.5459717",
"0.54341304",
"0.54289633",
"0.5427531",
"0.5415678",
"0.54152757",
"0.54120827",
"0.54040265",
"0.5403588",
"0.53930086",
"0.5391063",
"0.5390461",
"0.5387322",
"0.53845406",
"0.53787726",
"0.5364655",
"0.53532475",
"0.53485394",
"0.5340818",
"0.53390497",
"0.53387535",
"0.5337682",
"0.5331828",
"0.5324814",
"0.5324132",
"0.53212416",
"0.5321042",
"0.5317797",
"0.5309744",
"0.52999777",
"0.52895904",
"0.52894217",
"0.528851",
"0.5285031",
"0.5284772",
"0.5281014",
"0.5276722",
"0.5271393",
"0.5268042",
"0.5267579",
"0.52649486",
"0.52634764",
"0.52634764",
"0.52634764",
"0.52634764",
"0.5250512",
"0.52487797",
"0.52429765",
"0.52380687",
"0.52306974",
"0.5225162",
"0.52205646",
"0.52197313",
"0.52180177",
"0.5216876",
"0.5208691",
"0.5203819",
"0.5200262",
"0.5198735",
"0.51924294",
"0.5187909",
"0.51868194",
"0.5183751"
]
| 0.727859 | 0 |
End of variables declaration//GENEND:variables | private void limpaTela() {
txfNomeGrupo.setText("");
ftfValorViagem.setText("0");
ftfDataSaida.setText("");
ftfHoraSaida.setText("");
ftfDataRetorno.setText("");
ftfHoraRetorno.setText("");
txfNumPessoas.setText("");
txfIntegrante.setText("");
txfNomeGrupo.setBackground(null);
ftfValorViagem.setBackground(Color.white);
ftfDataSaida.setBackground(Color.white);
ftfHoraSaida.setBackground(Color.white);
ftfDataRetorno.setBackground(Color.white);
ftfHoraRetorno.setBackground(Color.white);
txfNumPessoas.setBackground(null);
txfIntegrante.setBackground(Color.white);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}",
"public void mo38117a() {\n }",
"@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}",
"private void assignment() {\n\n\t\t\t}",
"private void kk12() {\n\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"public void mo21779D() {\n }",
"public final void mo51373a() {\n }",
"protected boolean func_70041_e_() { return false; }",
"public void mo4359a() {\n }",
"public void mo21782G() {\n }",
"private void m50366E() {\n }",
"public void mo12930a() {\n }",
"public void mo115190b() {\n }",
"public void method_4270() {}",
"public void mo1403c() {\n }",
"public void mo3376r() {\n }",
"public void mo3749d() {\n }",
"public void mo21793R() {\n }",
"protected boolean func_70814_o() { return true; }",
"public void mo21787L() {\n }",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo21780E() {\n }",
"public void mo21792Q() {\n }",
"public void mo21791P() {\n }",
"public void mo12628c() {\n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"public void mo97908d() {\n }",
"public void mo21878t() {\n }",
"public void mo9848a() {\n }",
"public void mo21825b() {\n }",
"public void mo23813b() {\n }",
"public void mo3370l() {\n }",
"public void mo21879u() {\n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"public void mo21785J() {\n }",
"public void mo21795T() {\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 }",
"public void mo55254a() {\n }",
"public void m23075a() {\n }",
"public void mo21789N() {\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"public void mo21794S() {\n }",
"public final void mo12688e_() {\n }",
"@Override\r\n\tvoid func04() {\n\t\t\r\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"public void mo6944a() {\n }",
"public static void listing5_14() {\n }",
"public void mo1405e() {\n }",
"public final void mo91715d() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"public void mo9137b() {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"public void func_70295_k_() {}",
"void mo57277b();",
"public void mo21877s() {\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"public void Tyre() {\n\t\t\r\n\t}",
"void berechneFlaeche() {\n\t}",
"public void mo115188a() {\n }",
"public void mo21880v() {\n }",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"public void mo21784I() {\n }",
"private stendhal() {\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"public void mo56167c() {\n }",
"public void mo44053a() {\n }",
"public void mo21781F() {\n }",
"public void mo2740a() {\n }",
"public void mo21783H() {\n }",
"public void mo1531a() {\n }",
"double defendre();",
"private zzfl$zzg$zzc() {\n void var3_1;\n void var2_-1;\n void var1_-1;\n this.value = var3_1;\n }",
"public void stg() {\n\n\t}",
"void m1864a() {\r\n }",
"private void poetries() {\n\n\t}",
"public void skystonePos4() {\n }",
"public void mo2471e() {\n }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"private void yy() {\n\n\t}",
"@Override\n\tpublic void verkaufen() {\n\t}",
"@AnyLogicInternalCodegenAPI\n private void setupPlainVariables_Main_xjal() {\n }",
"static void feladat4() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"public void init() { \r\n\t\t// TODO Auto-generated method\r\n\t }",
"public void furyo ()\t{\n }",
"public void verliesLeven() {\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"protected void mo6255a() {\n }"
]
| [
"0.6359434",
"0.6280371",
"0.61868024",
"0.6094568",
"0.60925734",
"0.6071678",
"0.6052686",
"0.60522056",
"0.6003249",
"0.59887564",
"0.59705925",
"0.59680873",
"0.5967989",
"0.5965816",
"0.5962006",
"0.5942372",
"0.5909877",
"0.5896588",
"0.5891321",
"0.5882983",
"0.58814824",
"0.5854075",
"0.5851759",
"0.58514243",
"0.58418584",
"0.58395296",
"0.5835063",
"0.582234",
"0.58090156",
"0.5802706",
"0.5793836",
"0.57862717",
"0.5784062",
"0.5783567",
"0.5782131",
"0.57758564",
"0.5762871",
"0.5759349",
"0.5745087",
"0.57427835",
"0.573309",
"0.573309",
"0.573309",
"0.573309",
"0.573309",
"0.573309",
"0.573309",
"0.57326084",
"0.57301426",
"0.57266665",
"0.57229686",
"0.57175463",
"0.5705802",
"0.5698347",
"0.5697827",
"0.569054",
"0.5689405",
"0.5686434",
"0.56738997",
"0.5662217",
"0.56531453",
"0.5645255",
"0.5644223",
"0.5642628",
"0.5642476",
"0.5640595",
"0.56317437",
"0.56294966",
"0.56289655",
"0.56220204",
"0.56180173",
"0.56134313",
"0.5611337",
"0.56112075",
"0.56058615",
"0.5604383",
"0.5602629",
"0.56002104",
"0.5591573",
"0.55856615",
"0.5576992",
"0.55707216",
"0.5569681",
"0.55570376",
"0.55531484",
"0.5551123",
"0.5550893",
"0.55482954",
"0.5547471",
"0.55469507",
"0.5545719",
"0.5543553",
"0.55424106",
"0.5542057",
"0.55410767",
"0.5537739",
"0.55269134",
"0.55236584",
"0.55170715",
"0.55035424",
"0.55020875"
]
| 0.0 | -1 |
/ Retourne la couleur du diamant | public char getCouleur(){
return couleur;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getCustoAluguel(){\n return 2 * cilindradas;\n }",
"public Integer getCedula() {return cedula;}",
"double getDiametro(){\n return raggio * 2;\n }",
"public int getCxcleunik() {\r\r\r\r\r\r\r\n return cxcleunik;\r\r\r\r\r\r\r\n }",
"int getCedula();",
"@Override\n public double perimetro() {\n return 4 * this.lado;\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 }",
"double getPerimetro(){\n return 2 * 3.14 * raggio;\n }",
"public int fondMagasin(){\n\tint total =this.jeton;\n\tfor(Caisse c1 : this.lesCaisses){\n\ttotal = c1.getTotal()+total;\n\t}\n\treturn total;\n}",
"public int getCedula() {\n return cedula;\n }",
"@Override\n public int getAltura(){\n return(super.getAltura());\n }",
"public int getCiclo() { return this.ciclo; }",
"@Override\n\tpublic long unidadesComida() {\n\t\treturn 3;\n\t}",
"public String getCurp(){\r\n return beneficiario[0].toString();\r\n }",
"public int getBrillo(){\n return brillo;\n }",
"@Override\n\tpublic int getDouleur() {\n\t\treturn intDouleur;\n\t}",
"public String getCouleur() {\n return this.COULEUR;\n }",
"public String getCouleur() {\n return this.COULEUR;\n }",
"public int getClase() {return clase;}",
"private double calculaDiametro(){\r\n double diametro;\r\n diametro=((cir.getY()-cir.getX())*2);\r\n return diametro;\r\n }",
"@Override\n\tpublic String getCouleur() {\n\t\treturn null;\n\t}",
"public int getCuerdas(){\n\treturn this.cuerdas;\n }",
"int getNombreColonnesPlateau();",
"int getNombreLignesPlateau();",
"public String getCuisine(){\n return cuisine;\n }",
"String getCognome();",
"String getCidade();",
"public int getHauteur() {\n\t\treturn DIM_CASE;\n\t}",
"public String getCouleur() {\n\t\treturn this.couleur;\n\t}",
"public abstract java.lang.String getAcma_cierre();",
"private int obstaculos() {\n\t\treturn this.quadricula.length * this.quadricula[0].length - \n\t\t\t\tthis.ardiveis();\n\t}",
"@Override\r\n\tpublic double getSalaire() {\n\t\treturn nbJoursTravailles*montantJournalier;\r\n\t}",
"@Override\r\n\tpublic double getRelacaoCinturaQuadril() {\r\n\r\n\t\treturn anamnese.getCintura() / anamnese.getQuadril();\r\n\t}",
"@Override\n\tpublic double mangeLegumes() {\n\t\treturn quantiteLegumes*this.getPoids();\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}",
"float getKeliling() {\n\t\treturn super.sisi * 3;\n\t}",
"@Override public String getCarne(){\n return \"salchicha y jamón \";\n }",
"public String getPuissanceCampGentil(){ \n Integer total = 0;\n total+=bonusTemporaireGentil;\n for(Personnage p : CampGentil)\n total += p.getPuissance(); \n return total.toString();\n }",
"@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 }",
"@Override\n\tpublic String getInformeVendedor() {\n\t\treturn \"Informe trimestre 3\";\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 double getCena() {\r\n\t\treturn cena;\r\n\t}",
"@Override\n public int altura() {\n return altura(this.raiz);\n }",
"@Override\n\tdouble dienTich() {\n\t\tdouble p = chuVi() / 2;\n\t\treturn Math.sqrt(p*(p-canhA)*(p-canhB)*(p-canhC));\n\t}",
"@Override\n\tpublic double calculaDesconto() {\n\t\treturn this.gastosEmCongressos;\n\t}",
"public Punto getCentro() {\r\n\treturn centro;\r\n}",
"public int valeurPiece() {\n return 3;\n }",
"public String getClasz() {\r\n \t\treturn clasz;\r\n \t}",
"@Override public double getCosto(){\n double d = 190.00;\n return d;\n }",
"@Override\n\tpublic double perimetro() {\n\t\treturn getBase()*4;\n\t}",
"@Override\npublic String toString() {// PARA MOSTRAR LOS DATOS DE ESTA CLASE\n// TODO Auto-generated method stub\nreturn MuestraCualquiera();\n}",
"public int getCoeficienteBernua()\n {\n return potenciaCV;\n }",
"@Override\n\tpublic String parler() {\n\t\treturn \"Je suis un Orc\";\n\t}",
"public float Superficie() {\n\t\t\n\t\tfloat cuadradob = (float) (Math.pow(puntos[3].getX() - puntos[0].getX(), 2) + Math.pow(puntos[3].getY() - puntos[0].getY(), 2));\n\t\tfloat cuadradoa = (float) (Math.pow(puntos[1].getX() - puntos[0].getX(), 2) + Math.pow(puntos[1].getY() - puntos[0].getY(), 2));\n\t\tfloat raizb = (float) Math.sqrt(cuadradob);\n\t\tfloat raiza = (float) Math.sqrt(cuadradoa);\n\t\treturn raiza * raizb;\n\t\t\n\t\t//return (puntos[3].getX() - puntos[0].getX())*(puntos[1].getY() - puntos[0].getY());\n\t}",
"public Punto getCentroide() {\n \treturn centroide;\n }",
"protected int getTreinAantal(){\r\n return treinaantal;\r\n }",
"public String getPuissanceCampMechant(){ \n Integer total = 0;\n total+=bonusTemporaireMechant;\n for(Monstre p : CampMechant)\n total += p.getPuissance(); \n return total.toString();\n }",
"public int getDireccionX(){\n return this.ubicacion.x;\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}",
"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 }",
"private static void cajas() {\n\t\t\n\t}",
"java.lang.String getPrenume();",
"private String getCampo3() {\r\n String campo = this.campoLivre.substring(15);\r\n return boleto.getDigitoCampo(campo);\r\n }",
"private String getCampo3() {\n String campo = this.campoLivre.substring(15);\n System.out.println(\"campo3 \" + campo);\n return boleto.getDigitoCampo(campo);\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 int getLargeur() {\n\t\treturn DIM_CASE;\n\t}",
"@Override public int conocerMonto(){\n\treturn 120;\n }",
"@Override\r\n\tpublic int getPuntuacion() {\n\t\treturn super.getPuntuacion();\r\n\t}",
"@Override\n public String toString(){\n return \"G(\"+this.getVidas()+\")\";\n }",
"public double getSubidaSalarial() {\n\t\tdouble sueldoActual = super.getRetribucion();\n\t\tif(super.getAntigüedad() >= 5) {\n\t\t\treturn (sueldoActual*2/100);\n\t\t}\n\t\telse {\n\t\t\treturn (sueldoActual * 0.015);\n\t\t}\n\t}",
"public int getDineroRecaudadoPorMaquina1()\n {\n return maquina1.getTotal();\n }",
"public String getCedula() {\r\n return cedula;\r\n }",
"protected String decrisToi(){\r\n return \"\\t\"+this.nomVille+\" est une ville de \"+this.nomPays+ \", elle comporte : \"+this.nbreHabitants+\" habitant(s) => elle est donc de catégorie : \"+this.categorie;\r\n }",
"@Override public String getMasa(){\n return \"gruesa \";\n }",
"public int contenuto(Casella cas)\n { return contenutoCaselle[cas.riga][cas.colonna]; }",
"public Dipendente() {\r\n\t\tsetnMat();\r\n\t}",
"public long getPlateau()\n {\n return plateau;\n }",
"private void caricaLivelloDiLegge() {\n\t\ttry {\n\t\t\t//TODO riutilizzo il piano dei conti caricato in precedenza ma associato al padre (per evitare un nuovo accesso a db)! verificare se va bene!\n\t\t\tlivelloDiLegge = conto.getContoPadre().getPianoDeiConti().getClassePiano().getLivelloDiLegge();\n\t\t} catch(NullPointerException npe) {\n\t\t\tthrow new BusinessException(\"Impossibile determinare il livello di legge associato al conto. Verificare sulla base dati il legame con il piano dei conti e la classe piano.\");\n\t\t}\n\t}",
"java.lang.String getCit();",
"public Personnage attaqueSurPersonnage() {\n\t\tdouble rand = Math.random();\n\t\t\tif (rand >= 0.85){\n\t\t\t\tfrappeMonstre = monstre.getCaracter().getForce() * 2;\n\t\t\t\tjoueur.setDiminutionPV(frappeMonstre);\n\t\t\t\tsetVictimeKO(joueur);\n\t\t\t\tetatAttaque = 'C';\n\t\t\t\treturn joueur;\n\t\t\t}\n\t\t\telse if ((rand < 0.85) && (rand >= 0.15)){\n\t\t\t\tfrappeMonstre = monstre.getCaracter().getForce();\n\t\t\t\tjoueur.setDiminutionPV(frappeMonstre);\n\t\t\t\tsetVictimeKO(joueur);\n\t\t\t\tetatAttaque = 'N';\n\t\t\t\treturn joueur;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tetatAttaque = 'F';\n\t\t\t\tfrappeMonstre = 0;\n\t\t\t\treturn joueur;\n\t\t\t}\n\t\t}",
"public int getIdDetalleComponenteCosto()\r\n/* 58: */ {\r\n/* 59: 83 */ return this.idDetalleComponenteCosto;\r\n/* 60: */ }",
"public double getCijena() {\r\n return cijena;\r\n }",
"public Perso designerCible(){\r\n\t\tRandom rand = new Random();\r\n\t\tint x = rand.nextInt((int)provocGlob);\r\n\t\tboolean trouve =false;\r\n\t\tdouble cpt=0;\r\n\t\tPerso res=groupe.get(0);\r\n\t\tfor(Perso pers : groupeAble){\r\n\t\t\tcpt+=pers.getProvoc();\r\n\t\t\tif(cpt>x && !trouve){\r\n\t\t\t\tres=pers;\r\n\t\t\t\ttrouve=true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t}",
"int getC();",
"public void niveauSuivant() {\n niveau = niveau.suivant();\n }",
"@Override\n public double obtenrArea() {\n return lado*lado;\n }",
"public int dameFila() {\n return this.fila;\n }",
"public Arbre residuelSousArbre(char c){\n\t\tArbre g, d;\n\t\tif(this.symbole == '.'){\n\t\t\tif(gauche.contientMotVide){\n\t\t\t\tg = gauche.residuelSousArbre(c);\n\t\t\t\td = droit.clone();\n\t\t\t\tif(g == null || d == null) g = null;\n\t\t\t\telse g = new Binaire('.', g, d);\n\t\t\t\td = droit.residuelSousArbre(c);\n\t\t\t\tif(g == null && d == null) return null;\n\t\t\t\tif(g == null) return d;\n\t\t\t\tif(d == null) return g;\n\t\t\t\treturn new Binaire('+', g, d);\n\t\t\t}\n\t\t\tg = gauche.residuelSousArbre(c);\n\t\t\td = droit.clone();\n\t\t\tif(g == null || d == null) return null;\n\t\t\treturn new Binaire('.', g, d);\n\t\t}else{\n\t\t\tg = gauche.residuelSousArbre(c);\n\t\t\td = droit.residuelSousArbre(c);\n\t\t\tif(g == null && d == null) return null;\n\t\t\tif(g == null) return d;\n\t\t\tif(d == null) return g;\n\t\t\treturn new Binaire('+', g, d);\n\t\t}\n\t}",
"public float carga(){\n return (this.capacidade/this.tamanho);\n }",
"@Override\r\n\tpublic String toString() {\n\t\treturn super.getCor().equals(\"Branco\") ? \" ♘ \": \" ♞ \";\r\n\t}",
"public String toString() {\n\t\treturn \"\" + type + \",\" + (rempli ? \"p\" : \"v\") + \",\" +\n\t\t\t\tx + \",\" + y + \",\" + largeur + \",\" + hauteur + \",\"\n\t\t\t\t+ Integer.toHexString(couleur.getRGB() & 0xffffff);\n\t}",
"public int cima(){\n return VectorPila[cima];\n }",
"@Override\r\n\tpublic double porcentajeDelComercio() {\n\t\treturn 0.25;\r\n\t}",
"public String getCognome() {\r\n return cognome;\r\n }",
"public Iterable<AristaDirigida> ciclo() {\n return ciclo;\n }",
"public int getAltura(){\n return this._altura;\n }",
"public int getNiveau() {\r\n return niveau;\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 friggere un uovo\";\r\n }",
"public int getTipoAtaque(){return tipoAtaque;}",
"@Override\n\tdouble chuVi() {\n\t\treturn canhA + canhB + canhC;\n\t}"
]
| [
"0.6411981",
"0.63984",
"0.63391525",
"0.63273203",
"0.63069946",
"0.6224698",
"0.61927754",
"0.6153293",
"0.6144747",
"0.61045957",
"0.607537",
"0.60576993",
"0.6015161",
"0.60030246",
"0.5983227",
"0.596796",
"0.5965901",
"0.5965901",
"0.5960021",
"0.5946415",
"0.59416145",
"0.5941278",
"0.5930844",
"0.59244573",
"0.5915081",
"0.5910756",
"0.59106207",
"0.5889643",
"0.5883383",
"0.5865578",
"0.58564544",
"0.58516675",
"0.58494925",
"0.5847451",
"0.58221704",
"0.5811055",
"0.58105105",
"0.57989645",
"0.57831746",
"0.57808006",
"0.5778073",
"0.5774538",
"0.57673633",
"0.5761139",
"0.57611316",
"0.57595676",
"0.5757339",
"0.575203",
"0.57474774",
"0.5745007",
"0.5739665",
"0.5736739",
"0.5734268",
"0.57224244",
"0.5719799",
"0.5715949",
"0.57107794",
"0.5704171",
"0.57029104",
"0.5701202",
"0.5699229",
"0.56952214",
"0.5694278",
"0.568776",
"0.5681736",
"0.5680552",
"0.56791574",
"0.5676192",
"0.56738955",
"0.5670909",
"0.5658402",
"0.56554955",
"0.56491005",
"0.5644567",
"0.5640493",
"0.5637751",
"0.5636987",
"0.56299794",
"0.5628855",
"0.5623578",
"0.56211525",
"0.5619793",
"0.56190926",
"0.56159085",
"0.5610861",
"0.56097233",
"0.5608425",
"0.5598658",
"0.5593365",
"0.5588318",
"0.55824274",
"0.55741155",
"0.5568422",
"0.5568024",
"0.55671024",
"0.5564089",
"0.5558692",
"0.5558062",
"0.55577886",
"0.5554805"
]
| 0.6088137 | 10 |
/ Retourne la position en x du diamant | public int getPositionX(){
return positionx;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getX() { return position.x; }",
"double getPositionX();",
"double getPositionX();",
"double getPositionX();",
"double getXPosition();",
"public int getXPos();",
"public int getX(){ return xPosition; }",
"public int getX(){\n return this.position[0];\n }",
"public int getXPosition()\n {\n return xPosition;\n }",
"public int getXPosition()\n {\n return xPosition;\n }",
"public int getX() {\n return pos_x;\n }",
"public int getXPosition(){\n\t\treturn xPosition;\n\t}",
"public int getX() {\n return positionX;\n }",
"public final int getPositionX() {\r\n return (int) position.x();\r\n }",
"public int getPos_x(){\n\t\treturn pos_x;\n\t}",
"public int getXPosition() {\n return xPosition;\n }",
"public int getXPosition() {\n return this.xPosition;\n }",
"@Override\n\tpublic double getXLoc() {\n\t\tdouble side = Math.sqrt(getMySize())/2;\n\t\treturn x+side;\n\t}",
"public int getPositionX() {\r\n\t\treturn positionX;\r\n\t}",
"public int getX()\r\n {\r\n \treturn xPos;\r\n }",
"public int getPositionX() {\n return positionX;\n }",
"public int getxPosition() {\n\t\treturn xPosition;\n\t}",
"int getPosition();",
"int getX() {\n return xPos;\n }",
"public int getX() {\r\n return xpos;\r\n }",
"@Override\n\tpublic int getX() {\n\t\treturn this.posicionX;\n\t}",
"public float getPositionX() {return this.position.getX();}",
"public int getX() {\n return (int) xPos;\n }",
"public int getX() {\n return posX;\n }",
"public final int getX()\n\t{\n\t\treturn pos.x;\n\t}",
"public int getPosicaoX() {\r\n\t\treturn posicaoX;\r\n\t}",
"public int getxPos() \n\t{\n\t\treturn xPos;\n\t}",
"public int getXOffset();",
"public int getPosition();",
"public abstract int ranXPos();",
"public int getxPos() {\n return xPos;\n }",
"double getX() { return pos[0]; }",
"private int get_x() {\n return center_x;\n }",
"public int getX()\r\n {\r\n return xLoc;\r\n }",
"int getXpos(int pos) {\n\t\treturn pos % Game.ROWLENGTH;\n\t}",
"public int getLocationX() {\r\n\t\treturn x;\r\n\t}",
"public int getXPosition() {\n\t\treturn this.position.x;\n\t}",
"public double getXPos() {\n\t\treturn this.position[0];\n\t}",
"public int xPos() {\r\n\t\treturn this.xPos;\r\n\t}",
"public int xPos() {\r\n\t\treturn this.xPos;\r\n\t}",
"public double getPositionX() {\n return positionX_;\n }",
"public double getPositionX() {\n return positionX_;\n }",
"public double getPositionX() {\n return positionX_;\n }",
"public int getX(){\n\t\treturn this.x_location;\n\t}",
"public double getXPosition()\n\t{\n\t\treturn xPosition;\n\t}",
"public double getUserFriendlyXPos(){\n return xPos - myGrid.getWidth()/ HALF;\n }",
"public int getX() { return loc.x; }",
"public int getxPos() {\n\t\treturn xPos;\n\t}",
"public int getX()\r\n {\r\n return xCoord;\r\n }",
"String getPosX();",
"public int getXpos() {\n\t\treturn xpos;\n\t}",
"public double getX() {\n return position.getX();\n }",
"private double xPos(double xMetres){\r\n\t\treturn xMetres*14+canvas.getWidth()/2;\r\n\t}",
"public int xPos() {\n\t\treturn Engine.scaleX(x);\n\t}",
"public int getLocX() {\n return locX;\n }",
"public double getPositionX() {\n return positionX_;\n }",
"public int getXPos() {\n\t\treturn xPos;\n\t}",
"public double getPositionX() {\n return positionX_;\n }",
"public double getPositionX() {\n return positionX_;\n }",
"@Override\n public double getPosX() {\n return this.pos[0];\n }",
"protected abstract int getXOffset();",
"public int getLocX() {\n return locX;\n }",
"public float getxPosition() {\n return xPosition;\n }",
"public double getXPos(){\n return xPos;\n }",
"public int getTheXPosition(int x){\n\t\t\tif(x==5 || x==13 || x==21 || x==29){\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\telse if(x==1 || x==9 || x==17 || x==25){\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telse if(x==6 || x==14 || x==22 || x==30){\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\telse if(x==2 || x==10 || x==18 || x==26){\n\t\t\t\treturn 3;\n\t\t\t}\n\t\t\telse if(x==7 || x==15 || x==23 || x==31){\n\t\t\t\treturn 4;\n\t\t\t}\n\t\t\telse if(x==3 || x==11 || x==19 || x==27){\n\t\t\t\treturn 5;\n\t\t\t}\n\t\t\telse if(x==8 || x==16 || x==24 || x==32){\n\t\t\t\treturn 6;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn 7;\n\t\t\t}\t\t\n\t}",
"public short getXPos(){\n return xPos;\n }",
"public double getPositionX() {\n\t\treturn this.tilePositionX;\n\t}",
"public int getX() {\n\t\t\n\t\treturn xPosition;\t\t// Gets the x integer\n\t}",
"public int getX() {\r\n\t\treturn xcoord;\r\n\t}",
"public int getPos();",
"public int getPos();",
"public int x() {\r\n\t\treturn xCoord;\r\n\t}",
"public int getX() {\n return this.coordinate.x;\n }",
"public float getX() {\n return pos.x;\n }",
"public int getXIndex(){\r\n return xIndex;\r\n }",
"public int getX() {\n return xCoord;\n }",
"public final float getPositionX() {\r\n\t\treturn getState(false).getPositionX();\r\n\t}",
"public int getXcoord(){\n\t\treturn this.coordinates[0];\n\t}",
"double getMapPositionX();",
"public float getX()\n {\n return getBounds().left + positionAnchor.x;\n }",
"public int getX() { \n\t\treturn x;\n\t}",
"public Integer getPosition();",
"public int getXCoordinate ()\n {\n return xCoordinate;\n }",
"@Override\n\tpublic int getPosX() {\n\t\treturn posX;\n\t}",
"public int x (int index) { return coords[index][0]; }",
"Object getPosition();",
"public int getX() {\r\n return (int) center.getX();\r\n }",
"public int getX() {\n\t\treturn this.x_indice * DIM_CASE;\n\t}",
"protected int getxCoord() {\n\t\treturn xCoord;\n\t}",
"public double getxOffset() {\n return currentXOffset + xOffset;\n }",
"public int getLocationX( )\n\t{\n\t\treturn locationX;\n\t}",
"private double getPosX() {\n\t\treturn this.posX.get();\n\t}",
"public int getX(){\n\t\tif(!resetCoordinates()) return 10000;\n\t\treturn Math.round(robot.translation.get(0)/ AvesAblazeHardware.mmPerInch);\n\t}",
"public float getX() { return xCoordinate;}",
"public int getX() {\n return (int) center.getX();\n }"
]
| [
"0.82663953",
"0.824418",
"0.824418",
"0.824418",
"0.806901",
"0.79546696",
"0.7916644",
"0.7841104",
"0.7793408",
"0.7793408",
"0.7760998",
"0.7744617",
"0.7731366",
"0.77300996",
"0.77011055",
"0.7624159",
"0.7615702",
"0.7591571",
"0.7572285",
"0.75635004",
"0.7557258",
"0.7540922",
"0.75322115",
"0.7527576",
"0.75241184",
"0.7522142",
"0.751176",
"0.7506346",
"0.75025004",
"0.7490309",
"0.7488697",
"0.74655825",
"0.74642116",
"0.7433179",
"0.7425863",
"0.74240136",
"0.74198323",
"0.74053264",
"0.7398055",
"0.73967814",
"0.73796713",
"0.7369247",
"0.73689985",
"0.7368616",
"0.7368616",
"0.7367903",
"0.7367903",
"0.73677313",
"0.73644984",
"0.73537904",
"0.7331287",
"0.73169905",
"0.7297853",
"0.72714925",
"0.72684205",
"0.72671205",
"0.72638416",
"0.72465366",
"0.7244304",
"0.72396874",
"0.72358894",
"0.7233836",
"0.7233566",
"0.7233566",
"0.72278893",
"0.7222018",
"0.7221432",
"0.7220471",
"0.72133744",
"0.71970814",
"0.71863365",
"0.7185275",
"0.71785295",
"0.71773946",
"0.71771",
"0.71771",
"0.71664643",
"0.715653",
"0.71550745",
"0.71516526",
"0.7144572",
"0.7139613",
"0.7139131",
"0.7137529",
"0.7127678",
"0.7123161",
"0.70973724",
"0.70947945",
"0.7083599",
"0.70828855",
"0.70625865",
"0.7059527",
"0.70595044",
"0.7051316",
"0.7050527",
"0.70243526",
"0.7007636",
"0.7006529",
"0.70033896",
"0.7002734"
]
| 0.7812293 | 8 |
/ Retourne la position en y du diamant | public int getPositionY(){
return positiony;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"double getPositionY();",
"double getPositionY();",
"double getPositionY();",
"double getYPosition();",
"public int getY(){\n return this.position[1];\n }",
"public int getY() { return loc.y; }",
"double getY() { return pos[1]; }",
"public int getY(){ return yPosition; }",
"public int getTheYPosition(int y){\n\t\tif(y>=1 && y<=4){\n\t\t\treturn 7;\n\t\t}\n\t\telse if(y>=5 && y<=8){\n\t\t\treturn 6;\n\t\t}\n\t\telse if(y>=9 && y<=12){\n\t\t\treturn 5;\n\t\t}\n\t\telse if(y>=13 && y<=16){\n\t\t\treturn 4;\n\t\t}\n\t\telse if(y>=17 && y<=20){\n\t\t\treturn 3;\n\t\t}\n\t\telse if(y>=21 && y<=24){\n\t\t\treturn 2;\n\t\t}\n\t\telse if(y>=25 && y<=28){\n\t\t\treturn 1;\n\t\t}\n\t\telse{\n\t\t\treturn 0;\n\t\t}\n\t}",
"public int getLocationY() {\r\n\t\treturn y;\r\n\t}",
"private double yPos(double yMetres){\r\n\t\treturn -yMetres*14+canvas.getHeight();\r\n\t}",
"public int getYPos();",
"long getY();",
"public int getYOffset();",
"public int getPos_y(){\n\t\treturn pos_y;\n\t}",
"public int getPosicaoY() {\r\n\t\treturn posicaoY;\r\n\t}",
"public int getY() {return y;}",
"public int getY() { return y; }",
"public int getY() { return y; }",
"String getPosY();",
"public int getLocY() {\n return locY;\n }",
"public int yPos() {\n\t\treturn Engine.scaleY(y);\n\t}",
"public int getY()\r\n {\r\n return yLoc;\r\n }",
"public int getY() {\n return pos_y;\n }",
"public int getY() { return y;}",
"public int getY() { return y;}",
"public int getY() {\n return positionY;\n }",
"double getMapPositionY();",
"@Override\n public double getPosY() {\n return this.pos[1];\n }",
"public double getYPos() {\n\t\treturn this.position[1];\n\t}",
"public double getUserFriendlyYPos(){\n return myGrid.getHeight()/ HALF-yPos;\n }",
"double getStartY();",
"public int getY() {\n return (int) yPos;\n }",
"int getY() {\n return yPos;\n }",
"int getY();",
"int getY();",
"int getY();",
"int getY();",
"int getY();",
"public int getY() { return (int)y; }",
"public int getLocY() {\n return locY;\n }",
"public int y() {\r\n\t\treturn yCoord;\r\n\t}",
"public static int getStartYCoordinate(){\n\t\tint y = getThymioStartField_Y();\n\t\tif(y == 0){\n \t\t\n \t}else{\n \t\ty *= FIELD_HEIGHT;\n \t}\n\t\treturn y;\n\t}",
"public int getLocY ()\n {\n return locY;\n }",
"public final int getY()\n\t{\n\t\treturn pos.y;\n\t}",
"public int getY() {\n return posY;\n }",
"@Override\r\n\tpublic int getY() {\n\t\treturn (int)y;\r\n\t}",
"public int getYPosition()\n {\n return yPosition;\n }",
"public int getYPosition()\n {\n return yPosition;\n }",
"public int getY(){\n\t\tif(!resetCoordinates()) return 10000;\n\t\treturn Math.round(robot.translation.get(1)/ AvesAblazeHardware.mmPerInch);\n\t}",
"@Override\n\tpublic double getYLoc() {\n\t\treturn y;\n\t}",
"int getYpos(int pos) {\n\t\treturn (int) pos / Game.ROWLENGTH;\n\t}",
"public int getYPosition() {\n return this.yPosition;\n }",
"public int getYPosition(){\n\t\treturn yPosition;\n\t}",
"private int getY() {\n\t\treturn 0;\r\n\t}",
"public int getY(){\r\n\t\treturn y;\r\n\t}",
"public int getLocationY( )\n\t{\n\t\treturn locationY;\n\t}",
"public double getYPosition()\n\t{\n\t\treturn yPosition;\n\t}",
"public int getY() {\n return y;\n }",
"public int getY() {\n return y;\n }",
"public int getY() {\n return y;\r\n }",
"public int getY() {\n return this.coordinate.y;\n }",
"public int getY() {\n\t\treturn this.y_indice * DIM_CASE;\n\t}",
"public int y (int index) { return coords[index][1]; }",
"public int getY()\r\n {\r\n return yCoord;\r\n }",
"public int getyPosition() {\n\t\treturn yPosition;\n\t}",
"public int getYcoord(){\n\t\treturn this.coordinates[1];\n\t}",
"public int getY() {\r\n return ypos;\r\n }",
"public int getY(){\n return y;\n }",
"public int getY(){\n return y;\n }",
"public int getY(){\n return y;\n }",
"public double getY() {\n return position.getY();\n }",
"public int getY()\r\n\t{\r\n\t\treturn y;\r\n\t}",
"public int getY()\n {\n \t return _y;\n }",
"public int getY(){\n\t\treturn y;\n\t}",
"public int getY(){\n\t\treturn y;\n\t}",
"public final int getPositionY() {\r\n return (int) position.y();\r\n }",
"public int getY()\n {\n return rettangoloY; \n }",
"public double getPositionY() {\n return positionY_;\n }",
"public double getPositionY() {\n return positionY_;\n }",
"public double getPositionY() {\n return positionY_;\n }",
"public int getY()\n {\n return y;\n }",
"public int getY()\n {\n return y;\n }",
"public float getyPosition() {\n return yPosition;\n }",
"public int getY() {\r\n return y;\r\n }",
"public int getY() {\r\n return y;\r\n }",
"public int getYPosition() {\n return yPosition;\n }",
"public int getY() {\r\n\t\treturn ycoord;\r\n\t}",
"public float getY()\n {\n return getBounds().top + positionAnchor.y;\n }",
"public int getY() {\r\n return ix / numCols;\r\n }",
"public int getyPos() \n\t{\n\t\treturn yPos;\n\t}",
"public double getYPos(){\n return yPos;\n }",
"public int get_Y_Coordinate()\n {\n return currentBallY;\n }",
"public int getPositionY() {\r\n\t\treturn positionY;\r\n\t}",
"public int getY() {\n return y;\n }",
"public int getY() {\n return y;\n }",
"public int getY() {\n return y;\n }",
"public int getY() {\n return y;\n }",
"public int getY() {\n return y;\n }",
"public int getY() {\n return y;\n }"
]
| [
"0.8033784",
"0.8033784",
"0.8033784",
"0.8012419",
"0.7814433",
"0.77821964",
"0.77165437",
"0.7649627",
"0.75938416",
"0.75625813",
"0.75570226",
"0.75412196",
"0.7495531",
"0.74933165",
"0.7492683",
"0.749143",
"0.7478956",
"0.7474868",
"0.7474868",
"0.7464015",
"0.74570805",
"0.7450044",
"0.74456656",
"0.7431256",
"0.74299645",
"0.74299645",
"0.74059534",
"0.7402397",
"0.74019074",
"0.7364317",
"0.7356765",
"0.7349884",
"0.7349613",
"0.73471266",
"0.73443055",
"0.73443055",
"0.73443055",
"0.73443055",
"0.73443055",
"0.73407185",
"0.733865",
"0.73056245",
"0.7296867",
"0.72780013",
"0.7255127",
"0.724556",
"0.7237278",
"0.7233446",
"0.7233446",
"0.7231294",
"0.7230534",
"0.72047246",
"0.72026616",
"0.7198362",
"0.7197268",
"0.71897316",
"0.7187643",
"0.7176244",
"0.7161443",
"0.7161443",
"0.7148994",
"0.71472096",
"0.71431935",
"0.71423686",
"0.7140964",
"0.7140802",
"0.71404415",
"0.71376956",
"0.7133801",
"0.7133801",
"0.7133801",
"0.7133782",
"0.7130177",
"0.7112827",
"0.7110964",
"0.7110964",
"0.71059245",
"0.70984954",
"0.70943725",
"0.7093199",
"0.7093199",
"0.70930994",
"0.70930994",
"0.7088714",
"0.7086117",
"0.7086117",
"0.7082974",
"0.70705837",
"0.7058276",
"0.70532596",
"0.7053158",
"0.70522785",
"0.7048777",
"0.7048565",
"0.7047257",
"0.7047257",
"0.7047257",
"0.7047257",
"0.7047257",
"0.7047257"
]
| 0.73151624 | 41 |
lista powiazanych plikow, plik zrodlowy bedzie musial miec zmienione odnosniki | private static List<Message> parse(File f, String sourceUrlString) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void podstawZapiszDaneWielePlikow() throws IOException {\r\n\t\tBufferedWriter bw = null; // tutaj zaSztywno\r\n\t\tString[] wektorDanych;\r\n\t\tString nazwaPlikuWynikowego = null;\r\n\t\tint licznik = 0;\r\n\t\twhile ((wektorDanych = daneEgzemplarza.getNextCorrectData()) != null) {\r\n\t\t\t++licznik;\r\n\t\t\tnazwaPlikuWynikowego = \"./wynik/wynik\" + Integer.toString(licznik)\r\n\t\t\t\t\t+ \".\" + rozszerzenieSzablonu;\r\n\t\t\tbw = new BufferedWriter(new FileWriter(nazwaPlikuWynikowego));\r\n\t\t\tfor (String[] s : calaZawartoscRozsep) {\r\n\t\t\t\tfor (String wyraz : s) {\r\n\t\t\t\t\tif (wyraz.equals(interpretujWyraz(wyraz)))\r\n\t\t\t\t\t\tfor (int i = 0; i < zmienne.length; ++i) {\r\n\t\t\t\t\t\t\tif (wyraz.equals(zmienne[i])) {\r\n\t\t\t\t\t\t\t\twyraz = wektorDanych[i];\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\twyraz = interpretujWyraz(wyraz);\r\n\r\n\t\t\t\t\tbw.write(wyraz);\r\n\t\t\t\t}\r\n\t\t\t\tbw.newLine();\r\n\t\t\t}\r\n\t\t\tbw.close();\r\n\t\t}\r\n\t}",
"public static void getListOfAllFileVarianta2() {\n\t\tPath pathToSrc = Paths.get(\"D:\\\\TorrentsMd\");\r\n\t\ttry {\r\n\t\t\t//cu method references\r\n//\t\t\tFiles.walk(pathToSrc)\r\n//\t\t\t\t.map(Path::toFile)\r\n//\t\t\t\t.filter(File::isFile)\r\n//\t\t\t\t.map(File::getName)\r\n//\t\t\t\t.sorted()\r\n//\t\t\t\t.forEach(System.out::println);\r\n\t\t\t\r\n\t\t\t//cu lambda, dar dpdv semantic sunt identice\r\n\t\t\tFiles.walk(pathToSrc)\r\n\t\t\t\t .map(path -> path.toFile()) //trasnform fiecare Path din stream intr-un File\r\n\t\t\t\t .filter(file -> file.isFile()) //filtrez doar fisierele\r\n\t\t\t\t .map(file -> file.getName())//transform fiecare File din stream intr-un String, care e numele sau\r\n\t\t\t\t .sorted()\r\n\t\t\t\t .forEach(file -> System.out.println(file));\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public static List getAllImgs() {\n List polovniautomobili = new ArrayList<>();\n try {\n CONNECTION = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n String query = \"SELECT imgUrl FROM polovni\";\n try (PreparedStatement ps = CONNECTION.prepareStatement(query)) {\n ResultSet result = ps.executeQuery();\n while (result.next()) {\n String imgUrl = result.getString(\"imgUrl\");\n polovniautomobili.add(imgUrl);\n }\n\n ps.close();\n CONNECTION.close();\n }\n CONNECTION.close();\n } catch (SQLException ex) {\n Logger.getLogger(Register.class.getName()).log(Level.SEVERE, null, ex);\n }\n return polovniautomobili;\n }",
"public void llenarListaArchivos(int op) {\n String[] archivosPermitidos = {\".HA\", \".HE\"};\n if (op == 1) {\n archivos_directorio.removeAllItems();\n } else {\n archivos_directorio2.removeAllItems();\n }\n File directorio = new File(\"./\");\n File[] archivos = null;\n if (directorio.exists()) {\n archivos = directorio.listFiles();\n }\n int i;\n\n for (i = 0; i < archivos.length; i++) {\n if (op == 1 && (\"\" + archivos[i]).contains(\".txt\")) {\n archivos_directorio.addItem(\"\" + archivos[i]);\n } else {\n int j;\n for (j = 0; j < archivosPermitidos.length; j++) {\n if ((\"\" + archivos[i]).contains(archivosPermitidos[j])) {\n archivos_directorio2.addItem(\"\" + archivos[i]);\n break;\n }\n }\n }\n }\n\n }",
"public String getAllFilles(int n) throws IOException {\n\t\tString x = \"\";\n\t\tString path = \"C:/JEE/workspace/Server/Upload\";\n\t\tString path2 = \"C:/JEE/workspace/Server/Upload/\";\n\t\tFile folder = new File(path);\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\tArrayList listOfPathFiles = new ArrayList();\n\n\t\t// for (int i = 0; i < listOfFiles.length; i++) {\n\t\tif (listOfFiles[n].isFile()) {\n\n\t\t\tInputStream inputStream2 = new FileInputStream(path2 + listOfFiles[n].getName());\n\t\t\tbyte[] buffer = new byte[4096];\n\t\t\tint bytesRead = 0;\n\t\t\tBASE64Encoder encoder = new BASE64Encoder();\n\t\t\tByteArrayOutputStream buffer2 = new ByteArrayOutputStream();\n\t\t\twhile (true) {\n\t\t\t\tbytesRead = inputStream2.read(buffer); \n\t\t\t\tif (bytesRead > 0) {\n\t\t\t\t\tbuffer2.write(buffer, 0, bytesRead);\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbuffer2.flush(); \n\t\t\tString codec;\n\t\t\tcodec = encoder.encode(buffer2.toByteArray());\n\t\t\tif (n >= 0) {\n\t\t\t\t// listOfPathFiles.add(\"data:image/png;base64,\"+codec);\n\t\t\t\tx = codec;\n\t\t\t}\n\t\t}\n\t\tif (listOfFiles[n].isDirectory()) {\n\t\t\tSystem.out.println(\"Directory \" + listOfFiles[n].getName());\n\t\t}\n\t\t// }\n\t\treturn x;\n\t\t// return listOfPathFiles;\n\t}",
"public static List<Object> czytaniePogody(){\r\n Object[] elementyPogody = new Object[3];\r\n elementyPogody[0]=0;\r\n elementyPogody[1]=0;\r\n elementyPogody[2]=null;\r\n String line;\r\n OdczytZPliku plik = new OdczytZPliku();\r\n InputStream zawartosc = plik.pobierzZPliku(\"bazapogod.txt\");\r\n try (InputStreamReader odczyt = new InputStreamReader(zawartosc, StandardCharsets.UTF_8);\r\n BufferedReader czytaj = new BufferedReader(odczyt)) {\r\n String numerWStringu = String.valueOf(elementyPogody[0] = (int) (Math.random() * 4));\r\n while ((line = czytaj.readLine()) != null){\r\n if (line.equals(numerWStringu)){\r\n elementyPogody[1] = Integer.parseInt(czytaj.readLine());\r\n elementyPogody[2] = czytaj.readLine();\r\n System.out.println(\"\\nPogoda na dzis: \" + elementyPogody[2]);\r\n break;\r\n }\r\n else {\r\n for (int i = 0; i < 2; i++) {\r\n line = czytaj.readLine();\r\n }\r\n }\r\n }\r\n } catch (Exception ignored) {\r\n }\r\n return List.of(elementyPogody);\r\n }",
"public static List<Integer> czytanieMotorniczego(){\r\n int numerMotorniczego;\r\n int wiek=0;\r\n int doswiadczenie = 0;\r\n String line;\r\n OdczytZPliku plik = new OdczytZPliku();\r\n InputStream zawartosc = plik.pobierzZPliku(\"bazamotorniczych.txt\");\r\n String numerWStringu = String.valueOf( numerMotorniczego = (int) (Math.random() * 4));\r\n try (InputStreamReader odczyt = new InputStreamReader(zawartosc, StandardCharsets.UTF_8);\r\n BufferedReader czytaj = new BufferedReader(odczyt)) {\r\n while ((line = czytaj.readLine()) != null) {\r\n if (line.equals(numerWStringu)) {\r\n wiek = Integer.parseInt(czytaj.readLine());\r\n doswiadczenie = Integer.parseInt(czytaj.readLine());\r\n break;\r\n }\r\n else{\r\n for (int i = 0; i < 2; i++) {\r\n line = czytaj.readLine();\r\n }\r\n }\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n return List.of(numerMotorniczego, wiek, doswiadczenie);\r\n }",
"public static void zapisPliku(String nazwaPlikuZapis) throws IOException{\n FileWriter plikZapisz = null;\n try {\n // tworzy nowy plik jeżeli nie istnieje, w przeciwnym przypadku\n // usuwa zawartość pliku i nadpisuje od początku\n plikZapisz = new FileWriter(nazwaPlikuZapis);\n //zapis łańcucha\n plikZapisz.write(tekstDoZapisu);\n //zapis po znaku\n for (char znak = 'a'; znak <='z'; znak++){\n plikZapisz.write(znak);\n plikZapisz.write('\\n');\n }\n }finally {\n if (plikZapisz != null){\n plikZapisz.close();\n }\n }\n }",
"public void podstawZapiszDaneJedenPlik() throws IOException {\r\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(\"./wynik/wynik.\"\r\n\t\t\t\t+ rozszerzenieSzablonu));\r\n\t\tString[] wektorDanych;\r\n\t\twhile ((wektorDanych = daneEgzemplarza.getNextCorrectData()) != null) {\r\n\t\t\tfor (String[] s : calaZawartoscRozsep) {\r\n\t\t\t\tfor (String wyraz : s) {\r\n\t\t\t\t\tif (wyraz.equals(interpretujWyraz(wyraz)))\r\n\t\t\t\t\t\tfor (int i = 0; i < zmienne.length; ++i) {\r\n\t\t\t\t\t\t\tif (wyraz.equals(zmienne[i])) {\r\n\t\t\t\t\t\t\t\twyraz = wektorDanych[i];\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\twyraz = interpretujWyraz(wyraz);\r\n\r\n\t\t\t\t\tbw.write(wyraz);\r\n\t\t\t\t}\r\n\t\t\t\tbw.newLine();\r\n\t\t\t}\r\n\t\t\tbw.write(\"---------------------------------------------------\");\r\n\t\t\tbw.newLine();\r\n\t\t}\r\n\t\tbw.close();\r\n\t}",
"public static ArrayList<Puntaje> getListadoPuntajes(String jugador)\n {\n ArrayList<Puntaje> listado = new ArrayList<>();\n String rutaPuntaje = \"src/recursos/puntaje.txt\"; \n try \n {\n File archivo = new File(rutaPuntaje);\n if(!archivo.exists())\n return listado;\n\n listado = listadoPuntajes(rutaPuntaje,jugador); \n }\n catch(Exception ex)\n {\n return listado;\n } \n return listado; \n }",
"public String [] losuj(){\n int licznik = 0;\n String [] wybrane = new String[5];\n while(licznik<5){ // Dla jednego gracza\n int kolor = (int) (Math.random()*4);\n int wartosc = (int) (Math.random()*13);\n if(czyWybrana[kolor][wartosc]==false){\n czyWybrana[kolor][wartosc]=true;\n wybrane[licznik]=karty[kolor][wartosc]+\".jpg\";\n licznik++;\n }\n }\n return wybrane;// tablica z 5 wylosowanymi kartami\n }",
"public void listarCarpetas() {\n\t\tFile ruta = new File(\"C:\" + File.separator + \"Users\" + File.separator + \"ram\" + File.separator + \"Desktop\" + File.separator+\"leyendo_creando\");\n\t\t\n\t\t\n\t\tSystem.out.println(ruta.getAbsolutePath());\n\t\t\n\t\tString[] nombre_archivos = ruta.list();\n\t\t\n\t\tfor (int i=0; i<nombre_archivos.length;i++) {\n\t\t\t\n\t\t\tSystem.out.println(nombre_archivos[i]);\n\t\t\t\n\t\t\tFile f = new File (ruta.getAbsoluteFile(), nombre_archivos[i]);//SE ALMACENA LA RUTA ABSOLUTA DE LOS ARCHIVOS QUE HAY DENTRO DE LA CARPTEA\n\t\t\t\n\t\t\tif(f.isDirectory()) {\n\t\t\t\tString[] archivos_subcarpeta = f.list();\n\t\t\t\tfor (int j=0; j<archivos_subcarpeta.length;j++) {\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(archivos_subcarpeta[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}",
"private static void obtenirUneListe() throws FileNotFoundException {\n\t\tSystem.out.println(\"\\r\\nPour combien de jours : \");\n\t\tint nbJours = sc.nextInt();\n\n\t\tSystem.out.println(\"\\r\\nCombien de propositions : \");\n\t\tint nbPropositions = sc.nextInt();\n\n\t\tList<List<Recette>> listeProposition = genererListePropositions(nbJours, nbPropositions);\n\n\t\tSystem.out.println(\"\\r\\nChoix ? \");\n\t\tint choix = sc.nextInt();\n\n\t\tgenererFichier(listeProposition.get(choix - 1));\n\n\t\tsc.nextLine();\n\n\t\traz();\n\t}",
"public File[] CreateListFiles() {\n\t\tif (!Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {\n\t\t\tToast.makeText(this, \"Error! No SDCARD Found!\", Toast.LENGTH_LONG).show();\n\t\t} else {\n\t\t\tfile = new File(Environment.getExternalStorageDirectory(), File.separator + \"/MelanomaPics/\" + File.separator + MelanomaActivity.pacientSelected);\n\t\t\tfile.mkdirs();\n\t\t}\n\t\t// pega todas as imagens do diretorio MelanomaPics e coloca dentro de\n\t\t// uma lista\n\t\tif (file.isDirectory()) {\n\t\t\tlistFile = file.listFiles();\n\t\t}\n\t\treturn listFile;\n\t}",
"public void testListerFichiers()\n\t{\n\t\t// Lister les fichiers du serveur marine.edu.ups-tlse.fr\n\t\ttry\n\t\t{\n\t\t\tSystem.out.println(\"----------------------------------------------\");\n\t\t\tSystem.out.println(\"---- Lister les fichiers de ftp.cict.fr ----\");\n\t\t\tftp.seConnecter(\"ftp.cict.fr\");\n\t\t\tVector listFic = new Vector(ftp.listerFichiers());\n\t\t\tSystem.out.println(\"Liste des fichiers du serveur : \");\n\t\t\tfor (int i = 0; i < listFic.size(); i++)\n\t\t\t\tSystem.out.println(listFic.get(i));\n\t\t\tSystem.out.println(\"Fin du listing\");\n\t\t\tassertTrue(true);\n\t\t\tSystem.out.println(\"---- OK ----\");\n\t\t\tSystem.out.println(\"----------------------------------------------\");\n\t\t}\n\t\tcatch (ConnexionException e)\n\t\t{\n\t\t\tSystem.err.println(\"---- ECHEC ---- Probleme de connexion\");\n\t\t\tassertTrue(false);\n\t\t\tSystem.out.println(\"----------------------------------------------\");\n\t\t}\n\t\tcatch (ListerFichiersException e1)\n\t\t{\n\t\t\tSystem.err.println(\"---- ECHEC ---- Probleme de listing de fichiers\");\n\t\t\tassertTrue(false);\n\t\t\tSystem.out.println(\"----------------------------------------------\");\n\t\t}\n\t}",
"public void testListerFichiersString()\n\t{\n\t\t// Lister les fichiers d'extension .gz du serveur marine.edu.ups-tlse.fr\n\t\ttry\n\t\t{\n\t\t\tSystem.out.println(\"----------------------------------------------\");\n\t\t\tSystem.out.println(\"---- Lister les fichiers .gz sur ftp.cict.fr ----\");\n\t\t\tftp.seConnecter(\"ftp.cict.fr\");\n\t\t\tVector listFic = new Vector(ftp.listerFichiers(\"gz\"));\n\t\t\tSystem.out.println(\"Liste des fichiers .gz du serveur : \");\n\t\t\tfor (int i = 0; i < listFic.size(); i++)\n\t\t\t\tSystem.out.println(listFic.get(i));\n\t\t\tSystem.out.println(\"Fin du listing des .gz\");\n\t\t\tassertTrue(true);\n\t\t\tSystem.out.println(\"---- OK ----\");\n\t\t\tSystem.out.println(\"----------------------------------------------\");\n\t\t}\n\t\tcatch (ConnexionException e)\n\t\t{\n\t\t\tSystem.err.println(\"---- ECHEC ---- Probleme de connexion\");\n\t\t\tassertTrue(false);\n\t\t\tSystem.out.println(\"----------------------------------------------\");\n\t\t}\n\t\tcatch (ListerFichiersException e1)\n\t\t{\n\t\t\tSystem.err.println(\"---- ECHEC ---- Probleme de listing de fichiers\");\n\t\t\tassertTrue(false);\n\t\t\tSystem.out.println(\"----------------------------------------------\");\n\t\t}\n\t}",
"ArrayList<Float> pierwszaPredykcjaWezPredykcjeZListy()\n\t{\n\t\tArrayList<Float> L1 = new ArrayList<Float>();\n\t\t\n\t\tint i=0;\n\t\twhile (i<Stale.horyzontCzasowy && (LokalneCentrum.getTimeIndex()+i)<listaCenWczytanaZPliku.size())\n\t\t{\n\t\t\tL1.add(listaCenWczytanaZPliku.get(LokalneCentrum.getTimeIndex()+i));\n\t\t\ti++;\n\t\t}\n\t\t\n\t\treturn L1;\n\t}",
"public List<File> getFiles();",
"public List<String> getListFilePath() throws AncestryException {\n\t\tList<String> listFormKey = new ArrayList<String>();\n\t\tConnection con = null;\n\t\tString sql = \"\";\n\t\ttry {\n\t\t\tsql = \"SELECT filepath FROM \" + management + \" WHERE step =4 GROUP BY filepath ORDER BY filepath\";\n\t\t\tcon = db.getConnectByProject(project);\n\t\t\tlistFormKey = JdbcHelper.queryToSingleList(con, sql , true);\n\t\t} catch (Exception e) {\n\t\t\tthrow new AncestryException(\"getListFilePath : \" + e.toString() ,e);\n\t\t}\n\t\tfinally {\n\t\t\tJdbcHelper.close(con);\n\t\t}\n\t\treturn listFormKey;\n\t}",
"private void przygotujFolderWynikowy() {\r\n\t\tFile folder = new File(\"./wynik\");\r\n\t\tif (!(folder.mkdir())) {\r\n\t\t\tFile[] tablica = folder.listFiles();\r\n\t\t\tif(tablica != null)\r\n\t\t\tfor (File f : tablica) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tf.delete();\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t}\r\n\t}",
"public static List<Transakcja> pobierzbiezaceTransakcjeDlaNowejTransakcji(StronaWiersza stronawiersza, String wnma) {\r\n List<Transakcja> pobrana = Collections.synchronizedList(new ArrayList<>());\r\n try {\r\n pobrana.addAll((stronawiersza).getPlatnosci());\r\n return pobrana;\r\n } catch (Exception e) {\r\n return pobrana;\r\n }\r\n }",
"@Override\n\tpublic List<URL> getPhotos() {\n\t\timages.clear(); //vide la liste des images\n\t\t\n\t\t\n\t\tList<URL> allImagesURL = new ArrayList<URL>();\n\t\t\n\t\t/* On initialise la liste de toutes les images */\n\t\tList<String> filelocations = null;\n\t\t\n\t\t/*Nous allons retrouver les fichiers images présent dans le répertoire et tous ses sous-répertoires*/\n\t\tPath start = Paths.get(path); //détermine le point de départ \n\t\ttry (Stream<Path> stream = Files.walk(start, Integer.MAX_VALUE)) {\n\t\t filelocations = stream\n\t\t .map(String::valueOf) //transforme les Path en string\n\t\t .filter(filename -> filename.contains(\".jpg\") || filename.contains(\".png\")) //ne prend que les images jpg et png\n\t\t .collect(Collectors.toList());\n\t\t \n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t/* Pour chaque fichier retrouvé, on essaie de retrouver son chemin absolu pour le stocker dans le allImagesURL */\n\t\tfor (String filelocation : filelocations) {\n\t\t\tString relativeLocation = filelocation.replace(path+\"/\", \"\"); // Pour ne pas partir de src mais de la classe courante\n\t\t\trelativeLocation = relativeLocation.replace(windowspath+\"\\\\\", \"\");\n\t\t\tallImagesURL.add(this.getClass().getResource(relativeLocation)); //on ajoute le chemin absolu dans la liste\n\t\t}\n\t\t\n\t\t\n\t\treturn allImagesURL; //on retourne la liste\n\t}",
"public abstract List<String> getFiles( );",
"java.util.List<entities.Torrent.FileInfo>\n getFilesList();",
"public void getListaArchivos() {\n\n File rutaAudio = new File(Environment.getExternalStorageDirectory() + \"/RecordedAudio/\");\n File[] archivosAudio = rutaAudio.listFiles();\n\n for (int i = 0; i < archivosAudio.length; i++) {\n File file = archivosAudio[i];\n listadoArchivos.add(new Archivo(file.getName()));\n }\n\n File rutaVideos = new File(Environment.getExternalStorageDirectory() + \"/RecordedVideo/\");\n File[] archivosVideo = rutaVideos.listFiles();\n\n for (int i = 0; i < archivosVideo.length; i++) {\n File file = archivosVideo[i];\n listadoArchivos.add(new Archivo(file.getName()));\n }\n }",
"public ListaPracownikow() {\n generujPracownikow();\n //dodajPracownika();\n }",
"public void realizacjap34() {\n System.out.println(\"REALIZACJA PUNKTU 3\\n\");\n\n System.out.println(\"\\nWyszukiwanie osob po imieniu (Piotr) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzOsobyPoImieniu(Listy.osoby, \"Piotr\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po nazwisku (Oleszczuk) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzOsobyPoNazwisku(Listy.osoby, \"Oleszczuk\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stazu pracy mniejszym niz 10============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStazuPracyMniejszymNiz(Listy.osoby, 10).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stazu pracy większym niz 10============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStazuPracyWiekszymNiz(Listy.osoby, 10).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stazu pracy równym 5============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStazuPracyRownym(Listy.osoby, 5).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po liczbie nadgodzin mniejszej niz 6 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoNadgodzinachMniejszychNiz(Listy.osoby, 6).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po liczbie nadgodzin wiekszej niz 6 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoNadgodzinachWiekszychNiz(Listy.osoby, 6).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po liczbie nadgodzin równej 6 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoNadgodzinachRownych(Listy.osoby, 6).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po pensji wiekszej niz 15000 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoPensjiWiekszejNiz(Listy.osoby, 15000).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po pensji mniejszej niz 15000 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoPensjiMniejszejNiz(Listy.osoby, 15000).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po pensji rownej 15000 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoPensjiRownej(Listy.osoby, 15000).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stanowisku (Adiunkt) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStanowisku(Listy.osoby, \"Adiunkt\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie studenta po numerze indeksu (123456) ============================================================================\\n\");\n System.out.println(NarzedziaWyszukiwania.znajdzStudentaPoIndeksie(Listy.osoby, \"123456\"));\n\n System.out.println(\"\\nWyszukiwanie studentów po roku studiów (1) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzStudentowPoRokuStudiow(Listy.osoby, 1).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie studentów po kierunku (Informatyka Stosowana) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzStudentowPoKierunku(Listy.osoby, \"Informatyka Stosowana\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie kursu po nazwie (Analiza Matematyczna 1) ============================================================================\\n\");\n System.out.println(NarzedziaWyszukiwania.znajdzKursPoNazwie(Listy.kursy, \"Analiza Matematyczna 1\"));\n\n System.out.println(\"\\nWyszukiwanie kursów po liczbie ects (5) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzKursyPoECTS(Listy.kursy, 5).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie kursów po prowadzacym+\"+Listy.osoby.get(0).getImie()+\" \"+Listy.osoby.get(0).getNazwisko()+\" ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzKursyPoProwadzacym(Listy.kursy, Listy.osoby.get(0)).forEach(System.out::println);\n\n\n //REALIZACJA PUNKTU 4\n System.out.println(\"=====================================================================================================================\");\n System.out.println(\"REALIZACJA PUNKTU 4\");\n System.out.println(\"=====================================================================================================================\\n\");\n System.out.println(\"Kursy:\\n\");\n for (Kurs kurs : Listy.kursy) {\n System.out.println(kurs.toString());\n }\n\n System.out.println(\"\\nOsoby:\\n\");\n for (Osoba osoba : Listy.osoby) {\n System.out.println(\"OSOBA====================================================================================================\");\n System.out.println(osoba.toString());\n System.out.println();\n }\n }",
"public List<String> getFiles();",
"List<Path> getFiles();",
"public void KvtTartListFrissit( String sKonyvtar)\r\n {\n File cAktKvt = null ;\r\n Object aKvtTartalma[] = null ;\r\n\r\n//System.out.println( \"JFileValasztDlg.KvtTartListFrissit( \" + sKonyvtar + \")\") ;\r\n\r\n// cAktKvt = new File( \".\") ;\r\n// cAktKvt = new File( \"/home/tamas/java/Polar/hrmfiles\") ;\r\n cAktKvt = new File( sKonyvtar) ;\r\n\r\n//System.out.println( \"JFileValasztDlg.KvtTartListFrissit cAktKvt = new File() utan\") ;\r\n\r\n // Az aktualis konyvtar teljes utvonalanak beirasa\r\n// Itt nyeli le a vegerol a \\-t vagy /-t :\r\n// m_jKonyvtarTxtFld.setText( cAktKvt.getAbsolutePath()) ; // getAbsolutePath()\r\n m_jKonyvtarTxtFld.setText( sKonyvtar) ;\r\n\r\n//System.out.println( \"JFileValasztDlg.KvtTartListFrissit m_jKonyvtarTxtFld.setText( cAktKvt.getAbsolutePath()) utan\") ;\r\n if ( cAktKvt != null && cAktKvt.isDirectory() == true )\r\n {\r\n aKvtTartalma = HRMFileSzuro( cAktKvt) ;\r\n//System.out.println( \"JFileValasztDlg.KvtTartListFrissit() : HRMFileSzuro() utan\") ;\r\n\r\n if ( aKvtTartalma != null )\r\n {\r\n/*\r\nfor ( int i=0 ; i < aKvtTartalma.length ; i++ )\r\n{\r\nSystem.out.println( \"JFileValasztDlg.KvtTartListFrissit() : cKvtrkFileok[\" + i + \"]=\" + aKvtTartalma[i].toString()) ;\r\n}\r\n*/\r\n m_jKvtTartList.setListData( aKvtTartalma) ;\r\n//System.out.println( \"JFileValasztDlg.KvtTartListFrissit() : .setListData() utan\") ;\r\n\r\n // Itt mar valoszinu, hogy a ListBox a konyvtar file-jait tartalmazza +++\r\n SetAktKonyvtar( sKonyvtar) ;\r\n\r\n m_jKvtTartList.setSelectedIndex( 0) ;\r\n \r\n//System.out.println( \"JFileValasztDlg.KvtTartListFrissit() : SetAktKonyvtar() utan\") ;\r\n//System.out.println( \"JFileValasztDlg.KvtTartListFrissit() : setListData\") ;\r\n/*\r\n for ( nIdx = 0 ; nIdx < aKvtTartalma.length ; nIdx++ )\r\n {\r\n m_jKvtTartList.setListData( aKvtTartalma) ;\r\n }\r\n*/\r\n }\r\n }\r\n }",
"private void listFiles(JSONArray parameter) {\n String response = \"Files and Directorys to list: \";\n if (parameter.size() == 1) {\n File file = new File((String) parameter.get(0));\n for (String s : file.list()) {\n response = response + \"\\n\" + s;\n }\n clientResponse(response);\n } else {\n failedClientResponse(\"Wrong Parameters! -400\");\n }\n }",
"public void Listar()\n {\n File diretorio = new File(dir_arq_download);\n File[] arquivos = diretorio.listFiles();\n if(arquivos != null)\n {\n int length = arquivos.length;\n for(int i = 0; i < length; ++i)\n {\n File f = arquivos[i];\n if (f.isFile())\n {\n Arquivos.add(f.getName());\n }\n }\n\n ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>\n (this,android.R.layout.simple_dropdown_item_1line, Arquivos);\n SpnListarArquivos.setAdapter(arrayAdapter);\n }\n }",
"public static List getAllUrl() {\n List polovniautomobili = new ArrayList<>();\n try {\n CONNECTION = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n String query = \"SELECT url FROM polovni\";\n try (PreparedStatement ps = CONNECTION.prepareStatement(query)) {\n ResultSet result = ps.executeQuery();\n while (result.next()) {\n String naziv = result.getString(\"url\");\n polovniautomobili.add(naziv);\n\n }\n\n ps.close();\n CONNECTION.close();\n }\n CONNECTION.close();\n } catch (SQLException ex) {\n Logger.getLogger(Register.class.getName()).log(Level.SEVERE, null, ex);\n }\n return polovniautomobili;\n }",
"public void showWordsListInfo(String path) throws IOException {\r\n\t ArrayList<String> listOfWords=new ArrayList<String>();//creem lista\r\n\t @SuppressWarnings(\"resource\") \r\n\tBufferedReader bfr=new BufferedReader(new FileReader(new File(path)));//initializam un buffer reader cu calea URL a unui fisier\r\n\t String word=\"\"; \r\n\t while ((word = bfr.readLine()) != null) \t //pentru fiecare linie citita, incarcam lista cu respectivul cuvant de pe linie. \r\n\t listOfWords.add(word);\r\n\t for (String element_word : listOfWords) {\r\n\t \t System.out.println(element_word);\r\n\t\t\tshowInfoWord(element_word); //pentru fiecare cuvant din lista afisam informatiile :cuvantul, Acceptata/Neacceptat, starea finala.\r\n\t\t\t\r\n\t\t}\r\n }",
"public static void pokreniTagNadSvima(File[] files){\n\t for (File file : files) {\n\t \tif (file.isDirectory()) {\n\t //System.out.println(\"Directory: \" + file.getName());\n\t \t\tpokreniTagNadSvima(file.listFiles()); // Calls same method again.\n\t } else \n\t if(!file.getPath().contains(\".DS_Store\")){\n\t \t//System.out.println(file.getPath());\n\t \t //System.out.println(file.getAbsolutePath());\n\t \t//tekstovi.put((String)file.getPath(), vratiStringFajla((String)file.getPath()));\n\t \tnapraviTextFajloveKonacne(file.getAbsolutePath());\n\t \t//System.out.println((String)file.getPath()+vratiStringFajla((String)file.getPath()));\n\t }\n\t }\n\t \n\t \n\t\t//napraviTextFajloveKonacne(putanjaDoFajla)\n\t}",
"public static void odczytZnakPoZnaku(String nazwaPlikuOdczyt) throws IOException {\n FileReader plikZPZ = null;\n try {\n plikZPZ = new FileReader(nazwaPlikuOdczyt);\n System.out.println(\"\\n\\nOdczyt pliku znak po znaku:\\n\");\n int znaki;\n //odczyt pliku znak po anaku i wyświetlenie na ekranie\n while ((znaki = plikZPZ.read()) != -1) {//jeśli znaki = -1 to znaczy koniec pliku\n System.out.println((char) znaki);\n }\n } finally {// klauzula finally służy do wykonania instrukcji\n // niezależnie od tego kiedy i w jaki sposób (normalnie lub\n // przez wyjątek) zostało zakończone wykonywanie bloku try\n if (plikZPZ != null) {\n plikZPZ.close();//zamknięcie pliku\n }\n }\n }",
"public static void skrivBetygsfil (List < Student > list, File betygsfil) throws IOException {\n// skriv kod for filskrivning har\n\n //Skriver över filen med de nya betygen\n //Kollar ifall överskrivningen av filen går till korrekt\n try {\n BufferedWriter wr = null;\n wr = new BufferedWriter(new FileWriter(betygsfil));\n\n for (int i = 0; i < list.size(); i++) {\n wr.write(list.get(i) + \"Slutbetyg: \" + list.get(i).getKursbetyg() + \"\\n\");\n }\n\n wr.close();\n System.out.println(\"Betygsfilen är klar...\");\n\n } catch (IOException ex) {\n System.out.println(\"Något gick fel vid skrivning till filen... Prova igen.\");\n }\n\n }",
"public static void main(String[] args) {\n String startDir = \"E:/DEKSTOP/Projets/photosortTest\";\n\n //We list what is in this folder :\n\n System.out.println(\"\\n\\n\\nListing of files recursively : \\n\");\n\n printListFilesRecursive(startDir);\n\n //Then we create 2 directories\n createDirectory(startDir, \"css_files\");\n createDirectory(startDir, \"js_files\");\n\n //Then we select all the js file and move it to /js_file, same for css files\n List<String> list_js = new ArrayList<>();\n List<String> list_css = new ArrayList<>();\n\n listFilesRecursiveByExtension(startDir,\"js\",list_js);\n listFilesRecursiveByExtension(startDir,\"css\",list_css);\n\n for (String item_js : list_js){\n copyFile(item_js,startDir+\"/js_files\",new File(item_js).getName());\n }\n\n\n for (String item_css : list_css){\n copyFile(item_css,startDir+\"/css_files\",new File(item_css).getName());\n }\n System.out.println(\"Listing of file dummy : \\n\");\n //array in which we will store the names of files and directories\n\n printDummyListFiles(startDir);\n\n\n\n\n System.out.println(\"\\n\\n\\nListing of JS files recursively : \\n\");\n\n printListFilesRecursiveByExtension(startDir, \"map\");\n\n System.out.println(\"\\n\\n\\nListing of JS files recursively : \\n\");\n\n printListFilesRecursiveByExtension(startDir, \"map\");\n }",
"public void armarPreguntas(){\n preguntas = file.listaPreguntas(\"Preguntas.txt\");\n }",
"public static List<StronaWiersza> pobierzStronaWierszazBazy(StronaWiersza stronaWiersza, String wnma, StronaWierszaDAO stronaWierszaDAO, TransakcjaDAO transakcjaDAO) {\r\n List<StronaWiersza> listaStronaWierszazBazy =new ArrayList<>();\r\n// stare = pobiera tylko w walucie dokumentu rozliczeniowego \r\n// listaNowychRozrachunkow = stronaWierszaDAO.findStronaByKontoWnMaWaluta(stronaWiersza.getKonto(), stronaWiersza.getWiersz().getTabelanbp().getWaluta().getSymbolwaluty(), stronaWiersza.getWnma());\r\n// nowe pobiera wszystkie waluty \r\n listaStronaWierszazBazy = stronaWierszaDAO.findStronaByKontoWnMa(stronaWiersza.getKonto(), wnma);\r\n //stronaWierszaDAO.refresh(listaStronaWierszazBazy);\r\n if (listaStronaWierszazBazy != null && !listaStronaWierszazBazy.isEmpty()) {\r\n try {\r\n DateFormat formatter;\r\n formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n String datarozrachunku = null;\r\n if (stronaWiersza.getWiersz().getDataWalutyWiersza() != null) {\r\n datarozrachunku = stronaWiersza.getWiersz().getDokfk().getRok()+\"-\"+stronaWiersza.getWiersz().getDokfk().getMiesiac()+\"-\"+stronaWiersza.getWiersz().getDataWalutyWiersza();\r\n } else {\r\n datarozrachunku = stronaWiersza.getWiersz().getDokfk().getDatadokumentu();\r\n }\r\n Date dataR = formatter.parse(datarozrachunku);\r\n Iterator it = listaStronaWierszazBazy.iterator();\r\n while(it.hasNext()) {\r\n StronaWiersza stronaWierszaZbazy = (StronaWiersza) it.next();\r\n List<Transakcja> zachowaneTransakcje = transakcjaDAO.findByNowaTransakcja(stronaWierszaZbazy);\r\n for (Iterator<Transakcja> itx = stronaWierszaZbazy.getPlatnosci().iterator(); itx.hasNext();) {\r\n Transakcja transakcjazbazy = (Transakcja) itx.next();\r\n if (zachowaneTransakcje == null || zachowaneTransakcje.size() == 0) {\r\n itx.remove();\r\n } else if (!zachowaneTransakcje.contains(transakcjazbazy)) {\r\n itx.remove();\r\n }\r\n }\r\n for (Transakcja ta : zachowaneTransakcje) {\r\n if (!stronaWierszaZbazy.getPlatnosci().contains(ta)) {\r\n stronaWierszaZbazy.getPlatnosci().add(ta);\r\n }\r\n }\r\n if (Z.z(stronaWierszaZbazy.getPozostalo()) <= 0.0) {\r\n it.remove();\r\n } else {\r\n String dataplatnosci;\r\n if (stronaWierszaZbazy.getWiersz().getDataWalutyWiersza() != null) {\r\n dataplatnosci = stronaWierszaZbazy.getWiersz().getDokfk().getRok()+\"-\"+stronaWierszaZbazy.getWiersz().getDokfk().getMiesiac()+\"-\"+stronaWierszaZbazy.getWiersz().getDataWalutyWiersza();\r\n } else {\r\n dataplatnosci = stronaWierszaZbazy.getWiersz().getDokfk().getDatadokumentu();\r\n }\r\n Date dataP = formatter.parse(dataplatnosci);\r\n if (dataP.compareTo(dataR) > 0) {\r\n it.remove();\r\n }\r\n }\r\n }\r\n } catch (ParseException ex) {\r\n E.e(ex);\r\n }\r\n }\r\n List<StronaWiersza> stronywierszaBO = stronaWierszaDAO.findStronaByKontoWnMaBO(stronaWiersza.getKonto(), stronaWiersza.getWnma());\r\n if (stronywierszaBO != null && !stronywierszaBO.isEmpty()) {\r\n Iterator it = stronywierszaBO.iterator();\r\n while(it.hasNext()) {\r\n StronaWiersza p = (StronaWiersza) it.next();\r\n if (Z.z(p.getPozostalo()) <= 0.0) {\r\n it.remove();\r\n }\r\n }\r\n listaStronaWierszazBazy.addAll(stronywierszaBO);\r\n }\r\n if (listaStronaWierszazBazy == null) {\r\n return (new ArrayList<>());\r\n }\r\n return listaStronaWierszazBazy;\r\n //pobrano wiersze - a teraz z nich robie rozrachunki\r\n }",
"private void getArquivo()\n {\n /*** Obtem o conteudo do pacote através do diretorio ***/\n File file = new File(caminho_origem);\n if (file.isFile())\n {\n try\n {\n /*** Lê o pacote e põe em um array de bytes ***/\n DataInputStream diStream = new DataInputStream(new FileInputStream(file));\n long len = (int) file.length();\n if (len > Utils.tamanho_maximo_arquivo)\n {\n System.out.println(Utils.prefixo_cliente + Utils.arquivo_muito_grande);\n System.exit(0);\n }\n Float numero_pacotes_ = ((float)len / Utils.tamanho_util_pacote);\n int numero_pacotes = numero_pacotes_.intValue();\n int ultimo_pacote = (int) len - (Utils.tamanho_util_pacote * numero_pacotes);\n int read = 0;\n /***\n 1500\n fileBytes[1500]\n p[512]\n p[512]\n p[476]len - (512 * numero_pacotes.intValue())\n ***/\n byte[] fileBytes = new byte[(int)len];\n while (read < fileBytes.length)\n {\n fileBytes[read] = diStream.readByte();\n read++;\n }\n int i = 0;\n int pacotes_feitos = 0;\n while ( pacotes_feitos < numero_pacotes)\n {\n byte[] mini_pacote = new byte[Utils.tamanho_util_pacote];\n for (int k = 0; k < Utils.tamanho_util_pacote; k++)\n {\n mini_pacote[k] = fileBytes[i];\n i++;\n }\n Pacote pacote_ = new Pacote();\n pacote_.setConteudo(mini_pacote);\n this.pacotes.add(pacote_);\n pacotes_feitos++;\n }\n byte[] ultimo_mini_pacote = new byte[ultimo_pacote];\n int ultimo_indice = ultimo_mini_pacote.length;\n for (int j = 0; j < ultimo_mini_pacote.length; j++)\n {\n ultimo_mini_pacote[j] = fileBytes[i];\n i++;\n }\n byte[] ultimo_mini_pacote2 = new byte[512];\n System.arraycopy(ultimo_mini_pacote, 0, ultimo_mini_pacote2, 0, ultimo_mini_pacote.length);\n for(int h = ultimo_indice; h < 512; h++ ) ultimo_mini_pacote2[h] = \" \".getBytes()[0];\n Pacote pacote_ = new Pacote();\n pacote_.setConteudo(ultimo_mini_pacote2);\n this.pacotes.add(pacote_);\n this.janela = new HashMap<>();\n for (int iterator = 0; iterator < this.pacotes.size(); iterator++) janela.put(iterator, new Estado());\n } catch (Exception e)\n {\n System.out.println(Utils.prefixo_cliente + Utils.erro_na_leitura);\n System.exit(0);\n }\n } else\n {\n System.out.println(Utils.prefixo_cliente + Utils.arquivo_inexistente);\n System.exit(0);\n }\n }",
"private static void listarDirectorio2(String directorio) {\n\t\tFile f = new File(directorio);\n\t\tFile[] ficheros = f.listFiles();\n\t\tSystem.out.printf(\"DIRECTORY: %s%n\", directorio);\n\t\tfor (int i = 0; i < ficheros.length; i++) {\n\t\t\t// es fichero\n\t\t\tif (ficheros[i].isFile()) {\n\t\t\t\tSystem.out.printf(\"-- FILE %s%n\", \n\t\t\t\t\t\tficheros[i].getName());\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < ficheros.length; i++) {\n\t\t\t// es directorio\n\t\t\tif (ficheros[i].isDirectory()) {\n\t\t\t\tSystem.out.printf(\"-- DIR %s%n\", \n\t\t\t\t\t\tficheros[i].getName());\n\t\t\t\t//System.out.println(\"\");\n\t\t\t\t//listarDirectorio2(ficheros[i].getPath());\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < ficheros.length; i++) {\n\t\t\t// explora nuevos directorios\n\t\t\tif (ficheros[i].isDirectory()) {\t\t\t\t\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t\tlistarDirectorio2(ficheros[i].getPath());\n\t\t\t}\n\t\t}\n\t}",
"public void devolverArchivo(ArrayList<Alumno> lista) // Crea archivo de texto con la lista de datos ya ordenada\n {\n try\n {\n PrintWriter print = new PrintWriter(\"Registros Ordenados.txt\");\n for(int k=0; k<100; k++)\n {\n print.println(F0.get(k).getNombre() + \", \" + F0.get(k).getApellido() + \", \" + F0.get(k).getNoCnt());\n }\n print.close();\n }\n catch(Exception ex)\n {\n System.out.println(ex.getMessage());\n }\n }",
"public void listPictures()\r\n {\r\n int index = 0;\r\n while(index >=0 && index < pictures.size()) \r\n {\r\n String filename = pictures.get(index);\r\n System.out.println(index + \": \"+ filename);\r\n index++;\r\n }\r\n }",
"public void exportToXML(String sciezka) {\n\t\tFile plik = new File(sciezka);\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\n\t\ttry\t{\n\t\t\tplik.createNewFile();\n\t\t\tFileWriter strumienZapisu = new FileWriter(plik);\n\t\t\tstrumienZapisu.write(\"<ListaZdarzen>\\n\");\n\t\t\tfor (int i=0; i < listaZdarzen.size(); i++) {\n\t\t\t\tstrumienZapisu.write(\"\\t<zdarzenie>\\n\");\n\t\t\t\t\n\t\t\t\tstrumienZapisu.write(\"\\t\\t<id>\");\n\t\t\t\tstrumienZapisu.write(Integer.toString(listaZdarzen.get(i).getId()));\n\t\t\t\tstrumienZapisu.write(\"</id>\\n\");\n\t\t\t\t\n\t\t\t\tstrumienZapisu.write(\"\\t\\t<data>\");\n\t\t\t\tstrumienZapisu.write(sdf.format(listaZdarzen.get(i).getDataZdarzenia()));\n\t\t\t\tstrumienZapisu.write(\"</data>\\n\");\n\t\t\t\t\n\t\t\t\tstrumienZapisu.write(\"\\t\\t<nazwa>\");\n\t\t\t\tstrumienZapisu.write(listaZdarzen.get(i).getNazwa());\n\t\t\t\tstrumienZapisu.write(\"</nazwa>\\n\");\n\t\t\t\t\n\t\t\t\tstrumienZapisu.write(\"\\t\\t<opis>\");\n\t\t\t\tstrumienZapisu.write(listaZdarzen.get(i).getOpis());\n\t\t\t\tstrumienZapisu.write(\"</opis>\\n\");\n\t\t\t\t\n\t\t\t\tstrumienZapisu.write(\"\\t\\t<miejsce>\");\n\t\t\t\tstrumienZapisu.write(listaZdarzen.get(i).getMiejsce());\n\t\t\t\tstrumienZapisu.write(\"</miejsce>\\n\");\n\t\t\t\t\n\t\t\t\tstrumienZapisu.write(\"\\t</zdarzenie>\\n\");\n\t\t\t}\n\t\t\tstrumienZapisu.write(\"</ListaZdarzen>\");\n\t\t\tstrumienZapisu.close();\n\t\t}\n\t\tcatch (IOException io)\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t{System.out.println(io.getMessage());}\n\t\tcatch (Exception se)\n\t\t\t{System.err.println(\"blad sec\");}\n\t}",
"private static void listar(Path a){\n File dir = new File(a.toString());\n if(dir.isDirectory()){\n String[] dirContents = dir.list();\n for(int i =0; i < dirContents.length; i++){\n System.out.println(dirContents[i]);\n }\n }\n }",
"private List<org.jajuk.base.File> getFiles() {\n List<org.jajuk.base.File> files;\n if (Mode.DJ.equals(data.get(Variable.MODE))) {\n files = UtilPrepareParty.getDJFiles((String) data.get(Variable.ITEM));\n } else if (Mode.Ambience.equals(data.get(Variable.MODE))) {\n files = UtilPrepareParty.getAmbienceFiles((String) data.get(Variable.ITEM));\n } else if (Mode.Playlist.equals(data.get(Variable.MODE))\n || Mode.ProvidedPlaylist.equals(data.get(Variable.MODE))) {\n try {\n Playlist tempPlaylist = (Playlist) data.get(Variable.TEMP_PLAYLIST);\n files = UtilPrepareParty.getPlaylistFiles((String) data.get(Variable.ITEM), tempPlaylist);\n } catch (JajukException e1) {\n Log.error(e1);\n return null;\n }\n } else if (Mode.Shuffle.equals(data.get(Variable.MODE))) {\n files = UtilPrepareParty.getShuffleFiles();\n } else if (Mode.BestOf.equals(data.get(Variable.MODE))) {\n try {\n files = UtilPrepareParty.getBestOfFiles();\n } catch (JajukException e1) {\n Log.error(e1);\n return null;\n }\n } else if (Mode.Queue.equals(data.get(Variable.MODE))) {\n try {\n files = UtilPrepareParty.getQueueFiles();\n } catch (JajukException e1) {\n Log.error(e1);\n return null;\n }\n } else if (Mode.Bookmarks.equals(data.get(Variable.MODE))) {\n try {\n files = UtilPrepareParty.getBookmarkFiles();\n } catch (JajukException e1) {\n Log.error(e1);\n return null;\n }\n } else if (Mode.Novelties.equals(data.get(Variable.MODE))) {\n try {\n files = UtilPrepareParty.getNoveltiesFiles();\n } catch (JajukException e1) {\n Log.error(e1);\n return null;\n }\n } else {\n throw new IllegalArgumentException(\"Unknown mode in PreparePartyWizard: \"\n + data.get(Variable.MODE));\n }\n // filter by media first\n if (isTrue(Variable.ONE_MEDIA_ENABLED) && !isTrue(Variable.CONVERT_MEDIA)) {\n files = UtilPrepareParty.filterMedia(files, (String) data.get(Variable.ONE_MEDIA));\n }\n // then filter out by rating\n if (data.containsKey(Variable.RATING_LEVEL)) {\n files = UtilPrepareParty.filterRating(files, (Integer) data.get(Variable.RATING_LEVEL));\n }\n // filter max length\n if (isTrue(Variable.MAXLENGTH_ENABLED)) {\n files = UtilPrepareParty.filterMaxLength(files, (Integer) data.get(Variable.MAXLENGTH));\n }\n // filter max size\n if (isTrue(Variable.MAXSIZE_ENABLED)) {\n files = UtilPrepareParty.filterMaxSize(files, (Integer) data.get(Variable.MAXSIZE));\n }\n // filter max tracks\n if (isTrue(Variable.MAXTRACKS_ENABLED)) {\n files = UtilPrepareParty.filterMaxTracks(files, (Integer) data.get(Variable.MAXTRACKS));\n }\n return files;\n }",
"@Override\r\n\tpublic List<Map<String, Object>> select_file_list(int cms_bno) throws Exception {\n\t\treturn sql.selectList(\"cms_board.select_file_list\", cms_bno);\r\n\t}",
"public List listFiles(String path);",
"public void gerarSelenium(Map<String, String> mapPreferencia) {\t\r\n\t\tthis.diretorioScreenShots = mapPreferencia.get(\"DiretorioScreenShot\");\t\t\t\r\n\t\tthis.diretorioJava = mapPreferencia.get(\"DiretorioArquivoJava\");\r\n\t\tthis.url = mapPreferencia.get(\"URL\");\r\n\t\t\r\n\t\tif (mapPreferencia.get(\"Lista\").equals(\"true\")) {\r\n\t\t\tisPaginaLista = true;\r\n\t\t}\r\n\r\n\t\t//if (url.contains(\"?id\") || isPaginaLista) {\r\n\t\t//\tgerarTestSelenium(null, url.substring(url.lastIndexOf(\"/\")+1, url.indexOf(\"xhtml\")-1));\r\n\t\t//\tgerarArquivo();\r\n\t\t//} else {\r\n\t\t\t//File fileSelecionado = new File(mapPreferencia.get(\"DiretorioXHTML\"));\r\n\t\t\tfileList.clear();\r\n\t\t\tList<File> l = listarArquivos(new File(mapPreferencia.get(\"DiretorioXHTML\")));\r\n\t\t\tfor (File arquivo : l) {\r\n\t\t\t\tif (arquivo.getAbsolutePath().endsWith(\".xhtml\")) {\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(\"Gerando o arquivo....:\"+arquivo.getName());\t\t\t\t\t\r\n\t\t\t\t\tgerarTestSelenium(arquivo.getAbsolutePath(), arquivo.getName().substring(0, arquivo.getName().indexOf(\".\")));\r\n\t\t\t\t\tgerarArquivo();\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\t//for (File f : fileSelecionado.listFiles()) {\r\n\t\t\t\t//if (f.getAbsolutePath().endsWith(\".xhtml\")) {\r\n\t\t\t\t//\tgerarTestSelenium(f.getAbsolutePath(), f.getName().substring(0, f.getName().indexOf(\".\")));\r\n\t\t\t\t//\tgerarArquivo();\r\n\t\t\t\t//}\t\t\t\t\r\n\t\t\t//}\r\n\t\t//}\t\t\t\t\t\r\n\t}",
"private List<String> returnFiles(int selection) {\n\t\tString path = System.getProperty(\"user.dir\");\n\t\tList<String> allImages = new ArrayList<String>();\n\t\tpath += this.setFolderPath(selection);\n\t\tFile[] files = new File(path).listFiles();\n\n\t\tfor (File file : files) {\n\t\t\tif (file.isFile() && isCorrectFile(file)) {\n\t\t\t\tallImages.add(file.getAbsolutePath());\n\t\t\t}\n\t\t}\n\t\treturn allImages;\n\t}",
"public abstract List<File> listFiles() throws AccessException;",
"public List<Path> getTestFiles() throws Exception {\n try (Stream<Path> stream = Files.list(Paths.get(BibTeXMLImporterTest.class.getResource(\"\").toURI()))) {\n return stream.filter(p -> !Files.isDirectory(p)).collect(Collectors.toList());\n }\n\n }",
"public void Zabojstwa() {\n\t\tSystem.out.println(\"Zabojstwa\");\n\t\tfor(int i=0;i<Plansza.getNiebezpieczenstwoNaPlanszy().size();i++) {\n\t\t\tfor(GenerujNiebezpieczenstwo niebez : Plansza.getNiebezpieczenstwoNaPlanszy()) {\n\n\t\t\t\tif(niebez.getZabojca() instanceof DzikieZwierzeta) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getNiewolnikNaPLanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getNiewolnikNaPLanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getNiewolnikNaPLanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getNiewolnikNaPLanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getNiewolnikNaPLanszy().getUbrania() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getNiewolnikNaPLanszy().getJedzenie() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setUbrania(Plansza.getNiewolnikNaPLanszy().getUbrania() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setJedzenie(Plansza.getNiewolnikNaPLanszy().getJedzenie() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setLicznikNiebezpieczenstw(Plansza.getNiewolnikNaPLanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(niebez.getZabojca() instanceof Bandyci) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getRzemieslnikNaPlanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getRzemieslnikNaPlanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getRzemieslnikNaPlanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getRzemieslnikNaPlanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getRzemieslnikNaPlanszy().getMaterialy() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getRzemieslnikNaPlanszy().getNarzedzia() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tif(GeneratorRandom.RandomOd0(101) <= ZapisOdczyt.getRzemieslnicySzansa()) {\n\t\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setMaterialy(Plansza.getRzemieslnikNaPlanszy().getMaterialy() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setNarzedzia(Plansza.getRzemieslnikNaPlanszy().getNarzedzia() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setLicznikNiebezpieczenstw(Plansza.getRzemieslnikNaPlanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(niebez.getZabojca() instanceof Zlodzieje) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getArystokrataNaPlanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getArystokrataNaPlanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getArystokrataNaPlanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getArystokrataNaPlanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getArystokrataNaPlanszy().getTowary() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getArystokrataNaPlanszy().getZloto() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setTowary(Plansza.getArystokrataNaPlanszy().getTowary() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setZloto(Plansza.getArystokrataNaPlanszy().getZloto() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setLicznikNiebezpieczenstw(Plansza.getArystokrataNaPlanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}",
"public List<Upfile> findLinerPic(Long itickettypeid);",
"public static void downloadByLists(List<Enity> list, String path, JTextArea area, int i) {\n\t\t\n\t\tif(i>1){\n\t\t\ti = 1+i;\n\t\t}else{\n\t\t\ti = 1;\n\t\t}\n\t\tString result;\n\t\tfor(Enity l : list){\n\t\t\t//System.out.println(i+\":\"+l.getHref());\n\t\t\tarea.append(i+\":\"+l.getHref()+\"\\n\");\n\t\t\ttry {\n\t\t\t\tdownload(l.getHref(),path+\"\\\\\"+i+\".jpg\");\n\t\t\t} catch(UnknownHostException e){\n\t\t\t\tmap.put(path+\"\\\\\"+i+\".jpg\", l.getHref());\n\t\t\t\tarea.append(\"put:\"+i+\"\\n\");\n\t\t\t\t//return;\n\t\t\t}catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tmap.put(path+\"\\\\\"+i+\".jpg\", l.getHref());\n\t\t\t\tarea.append(\"put:\"+i+\"\\n\");\n\t\t\t\t//e.printStackTrace();\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\t\n\t\tif(!map.isEmpty()){\n\t\t\tarea.append(\"round:\"+map.size()+\"\\n\");\n\t\t\tround(area);\n\t\t}\n\t}",
"public void pruebasMonitores(int distribucion, int numeroMonitores, String url) {\n File archivo = new File(url);\n BufferedWriter bw;\n try {\n bw = new BufferedWriter(new FileWriter(archivo));\n bw.write(numeroMonitores + \"\\n\");\n for (int i = 0; i < numeroMonitores; i++) {\n bw.write(genNombres() + \" \" + genDiaSemana(distribucion) + \" \" + genHorarioMonitor(distribucion) + \"\\n\");\n }\n bw.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }",
"private List<MediaFile> listHtml() {\n\t\tList<MediaFile> list = new ArrayList<MediaFile>(32);\n\t\treturn list;\n\t}",
"public void recuperando(String ruta) throws IOException {\n File file = new File(ruta);\n FileWriter fwr = new FileWriter(file);\n PrintWriter bwr = new PrintWriter(fwr);\n String d = \"\";\n String c;\n double total = 0.0;\n String parametro = \"jsx-3921358990 icon cs-icon-star-filled\";\n String parametro1 = \"jsx-3921358990 icon cs-icon-star-half_filled\";\n esperar(10);\n List<WebElement> list = pagina.findElements(By.xpath(\"//*[@id=\\\"__next\\\"]/div[2]/div/div[5]/div[3]/div/div[1]/div[3]/div\"));\n List<WebElement> nombreMarcas = pagina.findElements(By.xpath(\"//*[@id=\\\"__next\\\"]/div[2]/div/div[5]/div[3]/div/div[1]/div[3]/div/div/div[3]\"));\n List<WebElement> producto = pagina.findElements(By.xpath(\"//*[@id=\\\"__next\\\"]/div[2]/div/div[5]/div[3]/div/div[1]/div[3]/div/div/div[4]\"));\n List<WebElement> calificaciones = pagina.findElements(By.xpath(\"//*[@id=\\\"__next\\\"]/div[2]/div/div[5]/div[3]/div/div[1]/div[3]/div/div/div[6]/div/div[1]/span\"));\n List<WebElement> precios = pagina.findElements(By.xpath(\"//*[@id=\\\"__next\\\"]/div[2]/div/div[5]/div[3]/div/div[1]/div[3]/div/div/div[6]/div/div[3]\"));;\n List<WebElement> despachos = pagina.findElements(By.xpath(\"//*[@id=\\\"__next\\\"]/div[2]/div/div[5]/div[3]/div/div[1]/div[3]/div/div/div[6]/div/div[4]/div[1]\"));\n List<WebElement> retiros = pagina.findElements(By.xpath(\"//*[@id=\\\"__next\\\"]/div[2]/div/div[5]/div[3]/div/div[1]/div[3]/div/div/div[6]/div/div[4]/div[2]\"));\n int cantidad = list.size();\n List<Double> arreglo = new ArrayList<>();\n for(int i = 0; i < cantidad; i++ ) {\n for (int j = i; j < listaEstrellas.size(); j++) {\n c = listaEstrellas.get(j).getAttribute(\"class\");\n if ((j % 5) == 0 && j != 0) {\n arreglo.add(total);\n total = 0;\n }\n if (c.equals(parametro)) {\n total = total + 1.0;\n } else if (c.equals(parametro1)) {\n total = total + 0.5;\n } else {\n }\n }\n d =\"Nombre de la Marca: \" +nombreMarcas.get(i).getText() + \"\\n\" + \"Nombre del producto: \" +producto.get(i).getText() + \"\\n\" +\"Cantidad de estrellas: \" + arreglo.get(i) + \"\\n\" + \"Calificaciones obtenidas: \" + calificaciones.get(i).getText() + \"\\n\" + \"Precio del producto: \" + precios.get(i).getText() + \"\\n\" + despachos.get(i).getText()+ \"\\n\" + retiros.get(i).getText() + \"\\n++++++++++++++++\\n\\n\";\n System.out.println(d);\n bwr.write(d);\n }\n //PrintWriter bwr = new PrintWriter(fwr);\n bwr.close();\n }",
"public List<Cuenta> leerArchivoToList(InputStream archivo);",
"List<String> obtenerlineas(String archivo) throws FileException;",
"public abstract List<LocalFile> getAllFiles();",
"private boolean pomjeri(int direkcija) {\t\r\n\t\t/**\r\n\t\t * Atribut predstavlja zadnje polje u smjeru direkcije u redu ili koloni (zavisno od toga da li je\r\n\t\t * pomjeranje horizontalno ili vertikalno).\r\n\t\t */\r\n\t\tint pocetna;\r\n\t\t/**\r\n\t\t * Atribut govori u kojem smjeru se pomjera trenutnaPozicija (smjer je suprotan direkciji poteza).\r\n\t\t */\r\n\t\tint pomak;\r\n\t\t/**\r\n\t\t * Atribut predstavlja prvo prazno polje na koje se moze pomjeriti iduce neprazno polje.\r\n\t\t */\r\n\t\tint trenutnaPozicija;\r\n\t\t/**\r\n\t\t * Atribut se postavlja na true ukoliko dodje do nekog pomjeranja (promjene u odnosu na prijasnje stanje tabele).\r\n\t\t */\r\n\t\tboolean bilo_promjene = false;\r\n\t\t\r\n\t\t// pomjeranje desno i lijevo\r\n\t\tif(direkcija == 1 || direkcija == 2) {\r\n\t\t\tpocetna = 6 - 3*direkcija; // pocetna je ili 3 ili 0\r\n\t\t\tpomak = 2*direkcija - 3; // pomak je ili -1 ili 1\r\n\t\t\ttrenutnaPozicija = pocetna;\r\n\t\t\t\r\n\t\t\t// ovaj dio vrsi samo pomjeranje polja\r\n\t\t\tfor(int i = 0 ; i < 4 ; i++) {\r\n\t\t\t\tfor(int j = pocetna ; j != pocetna + 4 * pomak ; j += pomak) {\r\n\t\t\t\t\tif(tabela[i][trenutnaPozicija] != 0) // ukoliko se na pocetku desi da to polje nije slobodno\r\n\t\t\t\t\t\ttrenutnaPozicija += pomak;\r\n\t\t\t\t\telse if (tabela[i][j] != 0) { // pomjeri to polje u smjeru direkcija\r\n\t\t\t\t\t\ttabela[i][trenutnaPozicija] = tabela[i][j];\r\n\t\t\t\t\t\ttabela[i][j] = 0;\r\n\t\t\t\t\t\ttrenutnaPozicija += pomak;\r\n\t\t\t\t\t\tbilo_promjene = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttrenutnaPozicija = pocetna;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// pomjeranje gore i dole\r\n\t\telse {\r\n\t\t\tpocetna = direkcija; // pocetna je ili 3 ili 0\r\n\t\t\tpomak = 1 - (2*direkcija)/3; // pomak je ili -1 ili 1\r\n\t\t\ttrenutnaPozicija = pocetna;\r\n\t\t\t\r\n\t\t\t// ovaj dio vrsi samo pomjeranje polja\r\n\t\t\tfor(int j = 0 ; j < 4 ; j++) {\r\n\t\t\t\tfor(int i = pocetna ; i != pocetna + 4 * pomak ; i += pomak) {\r\n\t\t\t\t\tif(tabela[trenutnaPozicija][j] != 0) // ukoliko se na pocetku desi da to polje nije slobodno\r\n\t\t\t\t\t\ttrenutnaPozicija += pomak;\r\n\t\t\t\t\telse if (tabela[i][j] != 0) { // pomjeri to polje u smjeru direkcija\r\n\t\t\t\t\t\ttabela[trenutnaPozicija][j] = tabela[i][j];\r\n\t\t\t\t\t\ttabela[i][j] = 0;\r\n\t\t\t\t\t\ttrenutnaPozicija += pomak;\r\n\t\t\t\t\t\tbilo_promjene = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttrenutnaPozicija = pocetna;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn bilo_promjene;\r\n\t}",
"public List<String> obtenerHiperenlaces() throws IOException {\r\n // Los hiperenlaces debemos guardarlos en un arrayList\r\n ArrayList<String> hipenlaces = new ArrayList<>();\r\n File doc = new File(\"Jsoup_Link.txt\");\r\n doc.delete();\r\n File newdoc = new File(\"Jsoup_Link.txt\");\r\n //nuevo documento donde se escribiran los enlaces\r\n FileWriter fw = new FileWriter(newdoc, false);\r\n Elements links;\r\n links = doc.select(\"a[href]\");\r\n //Con este bucle for conseguimos introducir los links \r\n //en el array y escribirlos en el doc.\r\n for (Element link : links) {\r\n\r\n hipenlaces.add(link.attr(\"href\"));\r\n fw.write(link.attr(\"href\") + nextline);\r\n }\r\n \r\n //Borra los elementos nulos del ArrayList\r\n hipenlaces.removeAll(Arrays.asList(null, \"\"));\r\n\r\n fw.close();\r\n \r\n //devuelve el arraylist\r\n return hipenlaces;\r\n }",
"public static ArrayList<Point2D> przesunPunktyOtoczki(ArrayList<Point2D> wierzcholki, Canvas canvas) {\n ArrayList<Point2D> otoczka = new ArrayList();\n double w = canvas.getWidth();\n double h = canvas.getHeight();\n for (Point2D punkt : wierzcholki) {\n otoczka.add((new Point2D(punkt.getX() + w / 2, h - punkt.getY() - h / 2)));\n }\n\n return otoczka;\n }",
"public void uradiPotez(int direkcija) {\r\n\t\tboolean promjena1 = pomjeri(direkcija);\r\n\t\tboolean promjena2 = spoji(direkcija);\r\n\t\tif(promjena1 || promjena2) { //ukoliko nije bilo promjene ni u pomjeranju ni spajanju, ne generise novo polje\r\n\t\t\tpomjeri(direkcija);\r\n\t\t\tgenerisiPolje();\r\n\t\t}\r\n\t}",
"private static void listarDirectorio(String directorio) {\n\t\tFile f = new File(directorio);\n\t\tFile[] ficheros = f.listFiles();\n\t\tSystem.out.printf(\"CURRENT DIRECTORY: %s%n\", directorio);\n\t\tfor (int i = 0; i < ficheros.length; i++) {\n\t\t\t// es fichero\n\t\t\tif (ficheros[i].isFile()) {\n\t\t\t\tSystem.out.printf(\"-- FILE %s%n\", \n\t\t\t\t\t\tficheros[i].getName());\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < ficheros.length; i++) {\n\t\t\t// es directorio\n\t\t\tif (ficheros[i].isDirectory()) {\n\t\t\t\tSystem.out.printf(\"-- DIR %s%n\", \n\t\t\t\t\t\tficheros[i].getName());\n\t\t\t}\n\t\t}\n\t}",
"@Test\n\tpublic void test(){\n\t\tFile srcFile = new File(\"E:\\\\Workspaces\\\\MyPro\\\\ssh\\\\WebRoot\\\\products\\\\2\\\\男鞋\");\n//\t\tSystem.out.println(ss);\n\t\tthis.getAllJavaFilePaths(srcFile);\n\t}",
"@GetMapping(\"/getallfiles\")\n public String getListFiles(Model model) {\n model.addAttribute(\"files\",\n files.stream()\n .map(fileName -> MvcUriComponentsBuilder\n .fromMethodName(FileUploadController.class, \"getFile\", fileName).build().toString())\n .collect(Collectors.toList()));\n model.addAttribute(\"totalFiles\", \"TotalFiles: \" + files.size());\n return \"listFiles\";\n }",
"public static ArrayList<Point2D> losujPunkty(int ile, Canvas canvas) {\n double w = canvas.getWidth();\n double h = canvas.getHeight();\n ArrayList<Point2D> wylosowane = new ArrayList<>();\n for (int i = 0; i < ile; i++) {\n double x = Math.random() * w;\n double y = Math.random() * h;\n Point2D nowy = new Point2D(x, y);\n wylosowane.add(nowy);\n }\n\n return wylosowane;\n }",
"private String[] filtrarArchivosTmp(String[] listadoImagenes) {\n\t\tString extensionArchivo;\n\t\tint contadorArchivosNoTmp = 0;\n\t\tfor(String s: listadoImagenes) {\n\t\t\textensionArchivo = s.substring(s.length()-3,s.length());\n\t\t\tif(!extensionArchivo.equals(\"tmp\")) {contadorArchivosNoTmp++;}\n\t\t}\n\t\t\n\t\t//Armo nuevo array filtrando archivos .tmp\n\t\tString listadoImagenesSinTmp[] = new String[contadorArchivosNoTmp];\n\t\tint contador = 0;\n\t\tfor(int i=0 ; i<listadoImagenes.length ; i++) {\n\t\t\tString s = listadoImagenes[i];\n\t\t\textensionArchivo = s.substring(s.length()-3,s.length());\n\t\t\tif(!extensionArchivo.equals(\"tmp\")) {\n\t\t\t\tlistadoImagenesSinTmp[contador] = listadoImagenes[i];\n\t\t\t\tcontador++;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn listadoImagenesSinTmp;\n\t}",
"private static String files()\n\t{\n\t\tString path = dirpath + \"\\\\Server\\\\\";\n\t\tFile folder = new File(path);\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\tString msg1 = \"\";\n\n\t\tfor (int i = 0; i < listOfFiles.length; i++)\n\t\t{\n\t\t\tif (listOfFiles[i].isFile())\n\t\t\t{\n\t\t\t\tmsg1 = msg1 + \"&\" + listOfFiles[i].getName();\n\t\t\t}\n\t\t}\n\t\tmsg1 = msg1 + \"#\" + path + \"\\\\\";\n\t\treturn msg1;\n\t}",
"public static Card dohvatiPozadinu(){\r\n\t\tFile dir = new File(\"images\");\r\n\t\tFile[] lista = dir.listFiles();\r\n\t\tCard kartaPozadine = null;\r\n\t\tfor (File file : lista){\r\n\t\t\tif (file.isFile()){\r\n\t\t\t\tif (file.toString().contains(\"pozadina_0.gif\")){\r\n\t\t\t\t\tString[] niz = file.getName().toString().split(\"\\\\.\");\r\n\t\t\t\t\tkartaPozadine =new Card(new ImageIcon(file.toString()),0);\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\treturn kartaPozadine;\r\n\t}",
"public void a(File file, List<WxAndQqScanPathInfo> list) {\n if (file != null && !this.p) {\n File[] listFiles = file.listFiles();\n if (listFiles != null) {\n int length = listFiles.length;\n int i2 = 0;\n while (i2 < length) {\n File file2 = listFiles[i2];\n if (!this.p) {\n if (file2 != null) {\n if (!file2.isDirectory()) {\n if (!\".nomedia\".equals(file2.getName()) && file2.length() >= 5 && file2 != null && file2.exists()) {\n CleanWxItemInfo cleanWxItemInfo = new CleanWxItemInfo();\n cleanWxItemInfo.setFileType(((WxAndQqScanPathInfo) list.get(0)).getType());\n cleanWxItemInfo.setFile(file2);\n cleanWxItemInfo.setDays(TimeUtil.changeTimeToDay(cleanWxItemInfo.getFile().lastModified()));\n cleanWxItemInfo.setFileSize(file2.length());\n switch (((WxAndQqScanPathInfo) list.get(0)).getType()) {\n case 1:\n o += cleanWxItemInfo.getFileSize();\n d.setTotalSize(d.getTotalSize() + cleanWxItemInfo.getFileSize());\n d.setTotalNum(d.getTotalNum() + 1);\n if (d.isChecked()) {\n cleanWxItemInfo.setChecked(true);\n d.setSelectSize(d.getSelectSize() + cleanWxItemInfo.getFileSize());\n d.setSelectNum(d.getSelectNum() + 1);\n }\n cleanWxItemInfo.setDays(TimeUtil.changeTimeToDay(0));\n a(d, cleanWxItemInfo);\n break;\n case 2:\n if (!file2.getAbsolutePath().endsWith(\"_cover\") && !new File(file2.getAbsolutePath() + \"_cover\").exists()) {\n if (!\"finishActivity\".equals(this.r) && !\"bigGarbageFragment\".equals(this.r)) {\n if (e.isFinished()) {\n j.setTotalNum(j.getTotalNum() + 1);\n j.setTotalSize(j.getTotalSize() + cleanWxItemInfo.getFileSize());\n a(j, cleanWxItemInfo);\n break;\n } else {\n o += cleanWxItemInfo.getFileSize();\n e.setTotalNum(e.getTotalNum() + 1);\n e.setTotalSize(e.getTotalSize() + cleanWxItemInfo.getFileSize());\n if (e.isChecked()) {\n cleanWxItemInfo.setChecked(true);\n e.setSelectNum(e.getSelectNum() + 1);\n e.setSelectSize(e.getSelectSize() + cleanWxItemInfo.getFileSize());\n }\n a(e, cleanWxItemInfo);\n break;\n }\n }\n } else {\n j.setTotalSize(j.getTotalSize() + cleanWxItemInfo.getFileSize());\n j.setTotalNum(j.getTotalNum() + 1);\n a(j, cleanWxItemInfo);\n break;\n }\n break;\n case 3:\n o += cleanWxItemInfo.getFileSize();\n f.setTotalSize(f.getTotalSize() + cleanWxItemInfo.getFileSize());\n f.setTotalNum(f.getTotalNum() + 1);\n if (f.isChecked()) {\n cleanWxItemInfo.setChecked(true);\n f.setSelectSize(f.getSelectSize() + cleanWxItemInfo.getFileSize());\n f.setSelectNum(f.getSelectNum() + 1);\n }\n a(f, cleanWxItemInfo);\n break;\n case 4:\n if (file2.getName().startsWith(\"snstblur_src_\")) {\n if (Constants.PRIVATE_LOG_CONTROLER) {\n break;\n } else {\n file2.delete();\n break;\n }\n } else {\n if (!file2.getName().startsWith(\"snst_\")) {\n if (file2.getName().startsWith(\"snsu_\") && new File(file2.getAbsolutePath().replace(\"snsu_\", \"snsb_\")).exists()) {\n break;\n }\n } else if (!new File(file2.getAbsolutePath().replace(\"snst_\", \"snsu_\")).exists()) {\n if (new File(file2.getAbsolutePath().replace(\"snst_\", \"snsb_\")).exists()) {\n break;\n }\n } else {\n break;\n }\n o += cleanWxItemInfo.getFileSize();\n g.setTotalSize(g.getTotalSize() + cleanWxItemInfo.getFileSize());\n g.setTotalNum(g.getTotalNum() + 1);\n if (g.isChecked()) {\n cleanWxItemInfo.setChecked(true);\n g.setSelectSize(g.getSelectSize() + cleanWxItemInfo.getFileSize());\n g.setSelectNum(g.getSelectNum() + 1);\n }\n a(g, cleanWxItemInfo);\n break;\n }\n case 5:\n if (file2.getName().endsWith(\".jpg_hevc\")) {\n if (Constants.PRIVATE_LOG_CONTROLER) {\n break;\n } else {\n file2.delete();\n break;\n }\n } else {\n if (file2.getName().startsWith(\"th_\")) {\n if (!file2.getName().endsWith(\"hd\")) {\n break;\n } else {\n break;\n }\n }\n h.setTotalSize(h.getTotalSize() + cleanWxItemInfo.getFileSize());\n h.setTotalNum(h.getTotalNum() + 1);\n a(h, cleanWxItemInfo);\n break;\n }\n case 6:\n if (!file2.getAbsolutePath().contains(\"download/appbrand\")) {\n if (file2.getName().endsWith(\".jpg\")) {\n if (!new File(file2.getAbsolutePath().replace(\".jpg\", \".mp4\")).exists() && !Constants.PRIVATE_LOG_CONTROLER) {\n file2.delete();\n break;\n }\n } else {\n i.setTotalSize(i.getTotalSize() + cleanWxItemInfo.getFileSize());\n i.setTotalNum(i.getTotalNum() + 1);\n a(i, cleanWxItemInfo);\n break;\n }\n } else {\n break;\n }\n case 8:\n k.setTotalSize(k.getTotalSize() + cleanWxItemInfo.getFileSize());\n k.setTotalNum(k.getTotalNum() + 1);\n a(k, cleanWxItemInfo);\n break;\n case 9:\n if (!file2.getName().endsWith(\".mp4\")) {\n l.setTotalSize(l.getTotalSize() + cleanWxItemInfo.getFileSize());\n l.setTotalNum(l.getTotalNum() + 1);\n l.getMineList().add(cleanWxItemInfo);\n a(l, cleanWxItemInfo);\n break;\n } else {\n m.setTotalSize(m.getTotalSize() + cleanWxItemInfo.getFileSize());\n m.setTotalNum(m.getTotalNum() + 1);\n m.getMineList().add(cleanWxItemInfo);\n a(m, cleanWxItemInfo);\n break;\n }\n case 10:\n n.setTotalSize(n.getTotalSize() + cleanWxItemInfo.getFileSize());\n n.setTotalNum(n.getTotalNum() + 1);\n a(n, cleanWxItemInfo);\n break;\n }\n }\n } else {\n try {\n if (file2.listFiles() == null || file2.listFiles().length == 0) {\n FileUtils.deleteFileAndFolder(file2);\n }\n } catch (Exception e2) {\n Logger.iCatch(Logger.TAG, Logger.ZYTAG, \"CleanWxClearNewActivity---wxFileScan ---- \", e2);\n }\n a(file2, list);\n }\n }\n i2++;\n } else {\n return;\n }\n }\n }\n }\n }",
"public ArrayList<String> verPuntajes(){\r\n\t\tFile archivo = new File(\"archivos/puntajes.txt\");\r\n\t\tArrayList<String> datos = new ArrayList<String>();\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tFileReader fr = new FileReader(archivo);\r\n\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\tString linea = \"\";\r\n\t\t\twhile ((linea = br.readLine()) != null) {\r\n\t\t\t\tdatos.add(linea);\t\t\t\t\r\n\t\t\t}\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn datos;\r\n\t}",
"public List<String> pntdirectorio(ReportePlazaDTO reportePlazaDTO) {\n List<CustomOutputFile> lista = new ArrayList<CustomOutputFile>();\n List<String> listaString = new ArrayList<String>();\n\n String qnaCaptura = reportePlazaDTO.getQnaCaptura();\n String qnaCaptura2 = \"\";\n\n if (new Integer(qnaCaptura) % 2 == 0) {\n qnaCaptura2 = String.valueOf((new Integer(qnaCaptura) - 1));\n } else {\n qnaCaptura2 = qnaCaptura;\n }\n\n lista = \n super.persistence().get(QueryTdPlazaDAO.class).findBypntDirectorio(qnaCaptura, \n qnaCaptura2);\n listaString.add(\"Plaza,Puesto,Cargo,Nombre,Primer Apellido,Segundo Apellido,Unidad,Fecha Alta Puesto,Vialidad,Nombre vialidad,Num ext, Num int,Asentamiento,Nom asentamiento,Localidad,Nom localidad,Mun-Del,Nom mun-del,Edo,Nom edo,Cod Post,Telefono,Ext,Email,Leyenda,Fec valida,Area responsable,Año,Fec actualiza,Nota\");\n\n if (lista != null) {\n for (CustomOutputFile row: lista) {\n listaString.add(row.getRegistro());\n }\n } else\n listaString = null;\n return listaString;\n\n }",
"private List<String> getDataFromApi() throws IOException {\n // Get a list of up to 10 files.\n List<String> fileInfo = new ArrayList<String>();\n FileList result = mService.files().list()\n .setMaxResults(10)\n .execute();\n List<File> files = result.getItems();\n if (files != null) {\n for (File file : files) {\n fileInfo.add(String.format(\"%s (%s)\\n\",\n file.getTitle(), file.getId()));\n }\n }\n return fileInfo;\n }",
"public static List<PolovniAutomobili> readAll() {\n List<PolovniAutomobili> listaUsera = new ArrayList<>();\n try {\n CONNECTION = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n String query = \"SELECT * FROM polovni WHERE 1\";\n try (Statement st = (Statement) CONNECTION.createStatement()) {\n ResultSet rs = st.executeQuery(query);\n while (rs.next()) {\n String imgUrl = rs.getString(\"imgUrl\");\n String naziv = rs.getString(\"naziv\");\n int godiste = rs.getInt(\"godiste\");\n int cena = rs.getInt(\"cena\");\n String url = rs.getString(\"url\");\n listaUsera.add(new PolovniAutomobili(imgUrl, naziv, godiste,cena,url));\n }\n }\n CONNECTION.close();\n } catch (SQLException ex) {\n System.out.println(\"MySql Connection error...\");\n ex.printStackTrace();\n }\n return listaUsera;\n }",
"private void listFileMyVideo() throws JSONException {\n\n listFileMyVideo = new JSONArray();\n\n int count = countFileMyVideo();\n\n for (int i = 0; count > i; i++) {\n\n JSONObject obj = new JSONObject();\n obj.put(\"name\", get_FileName(getPathMyVideo(), i));\n obj.put(\"path\", get_FilePath(getPathMyVideo(), i));\n\n listFileMyVideo.put(obj);\n }\n }",
"public void listFiles(String path) {\r\n String files;\r\n File folder = new File(path);\r\n File[] listOfFiles = folder.listFiles();\r\n\r\n for (int i = 0; i < listOfFiles.length; i++) {\r\n\r\n if (listOfFiles[i].isFile()) {\r\n files = listOfFiles[i].getName();\r\n if (files.endsWith(\".png\") || files.endsWith(\".PNG\")\r\n || files.endsWith(\".gif\") || files.endsWith(\".GIF\")) {\r\n //System.out.println(files);\r\n pathList.add(path+\"\\\\\");\r\n fileList.add(files);\r\n }\r\n }\r\n \r\n else {\r\n listFiles(path+\"\\\\\"+listOfFiles[i].getName());\r\n }\r\n }\r\n }",
"public boolean GetImgPagina(int cod, String filePathName) throws SQLException {\n try {\n\n Connection con = model.connectionDataBase.ConnectionDB.Connect();\n\n \n PreparedStatement stmt = con.prepareStatement(\"SELECT `immagine_pagina` FROM `pagine_opera` WHERE cod_pagina = ?\");\n\n stmt.setInt(1, cod);\n ResultSet rs = stmt.executeQuery();\n\n\n while (rs.next()) {\n InputStream in = rs.getBinaryStream(1);\n OutputStream f = new FileOutputStream(new File(filePathName));\n \n int n = 0;\n while ((n = in.read()) > -1) {\n f.write(n);\n }\n f.close();\n in.close();\n\n return true;\n }\n } catch(Exception ex){\n System.out.println(ex.getMessage());\n }\n return false;\n }",
"private void cargarFichaLepra_control() {\r\n\r\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\r\n\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\tparameters.put(\"nro_identificacion\", tbxNro_identificacion.getValue());\r\n\r\n\t\tficha_inicio_lepraService.setLimit(\"limit 25 offset 0\");\r\n\r\n\t\t// log.info(\"parameters>>>>\" + parameters);\r\n\t\tBoolean ficha_inicio = ficha_inicio_lepraService\r\n\t\t\t\t.existe_paciente_lepra(parameters);\r\n\t\t// log.info(\"ficha_inicio>>>>\" + ficha_inicio);\r\n\r\n\t\tif (ficha_inicio) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_SEGUIMIENTO_TRATAMIENTO_LEPRA,\r\n\t\t\t\t\tIRutas_historia.LABEL_SEGUIMIENTO_TRATAMIENTO_LEPRA,\r\n\t\t\t\t\tparametros);\r\n\t\t}\r\n\t}",
"java.util.List<entities.Torrent.FileInfo>\n getFileInfoList();",
"public static LinkedList<Film> izvrsi(Korisnik k, LinkedList<Korisnik> korisnici, LinkedList<Film> filmovi){\n\t\tint brojac = 0;\n\t\tdouble odstupanjeOdOcene=0;\n\t\tdouble odstupanjeOdPreklapanja = 0;\n\t\t\n\t\tLinkedList<Film> pomocna = new LinkedList<>();\n\t\t\n\t\tfor(int i=0;i<korisnici.size();i++){\n\t\t\tif(korisnici.get(i).equals(k)==false){\n\t\t\t\tfor(int j=0;j<k.getFilmovi().size();j++){\n\t\t\t\t\tfor(int m=0;m<korisnici.get(i).getFilmovi().size();m++){\n\t\t\t\t\t\tif(k.getFilmovi().get(j).equals(korisnici.get(i).getFilmovi().get(m))){\n\t\t\t\t\t\t\tbrojac++;\n\t\t\t\t\t\t\todstupanjeOdOcene += 10-Math.abs(k.getFilmovi().get(j).getOcena()-(double)korisnici.get(i).getFilmovi().get(m).getOcena());\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\todstupanjeOdPreklapanja = k.getFilmovi().size()-brojac;\n\t\t\tif(odstupanjeOdPreklapanja==0){\n\t\t\t\todstupanjeOdPreklapanja=brojac;\n\t\t\t}\n\t\t\tif(odstupanjeOdOcene==0){\n\t\t\t\tkorisnici.get(i).setKoeficijent(0);\n\t\t\t} else{\n\t\t\tkorisnici.get(i).setKoeficijent(odstupanjeOdOcene/odstupanjeOdPreklapanja);\n\t\t\t}\n\t\t\tbrojac=0;\n\t\t\todstupanjeOdOcene=0;\n\t\t\todstupanjeOdPreklapanja=0;\n\t\t}\n\t\t\n\t\tCollections.sort(korisnici,new Comparator<Korisnik>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Korisnik o1, Korisnik o2) {\n\t\t\t\tif(o1.getKoeficijent()>o2.getKoeficijent()){\n\t\t\t\t\treturn -1;\n\t\t\t\t} else if(o1.getKoeficijent()<o2.getKoeficijent()){\n\t\t\t\t\treturn 1;\n\t\t\t\t} else return 0;\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tfor(int i=0;i<korisnici.size();i++){\n\t\t\tfor(int j=0;j<korisnici.get(i).getFilmovi().size();j++){\n\t\t\t\tif(korisnici.get(i).getKoeficijent()!= 0 && k.getFilmovi().contains(korisnici.get(i).getFilmovi().get(j))==false\n\t\t\t\t\t\t&& pomocna.contains(korisnici.get(i).getFilmovi().get(j))==false && pomocna.size()<10){\n\t\t\t\t\tpomocna.add(korisnici.get(i).getFilmovi().get(j));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(pomocna.size()==10){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(pomocna.size()<10) {\n\t\t\tfor(int i=0;i<filmovi.size();i++){\n\t\t\t\tif(k.getFilmovi().contains(filmovi.get(i)) || pomocna.contains(filmovi.get(i)))\n\t\t\t\t\tcontinue;\n\t\t\t\telse\n\t\t\t\t\tpomocna.add(filmovi.get(i));\n\t\t\t\tif(pomocna.size()==10){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t}\n\t\t}\n\t\t\n\t\treturn pomocna;\n\t}",
"public void DownloadFiles(String url, String deskripsi, String judul) {\n String urlWeb = url;\n\n DownloadManager.Request request = new DownloadManager.Request(Uri.parse(urlWeb.replace(\"https://\", \"http://\")));\n request.setDescription(deskripsi);\n request.setTitle(judul);\n request.allowScanningByMediaScanner();\n request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);\n\n String namaFile = deskripsi + \"_\" + judul + \".mp3\";\n request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, namaFile);\n\n DownloadManager manager = (DownloadManager) getActivity().getSystemService(Context.DOWNLOAD_SERVICE);\n manager.enqueue(request);\n }",
"public void getFiles()\n\t{\n\t\tif(fileList.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"There is no file or file not found\");\n\t\t}\n\t\tfor(int i = 0; i < fileList.size(); i++)\n\t\t{\n\t\t\tSystem.out.println(\"File is at: \" + fileList.get(i));\n\t\t}\n\t}",
"public void ZbierzTowaryKlas() {\n\t\tSystem.out.println(\"ZbierzTowaryKlas\");\n\t\tfor(int i=0;i<Plansza.getTowarNaPlanszy().size();i++) {\n\t\t\tfor(Towar towar : Plansza.getTowarNaPlanszy()) {\n\t\t\t\t\n\t\t\t\tif(Plansza.getNiewolnikNaPLanszy().getXpolozenie()-1 <= towar.getXtowar() && Plansza.getNiewolnikNaPLanszy().getXpolozenie()+1 >= towar.getXtowar()) \n\t\t\t\t\tif(Plansza.getNiewolnikNaPLanszy().getYpolozenie()-1 <= towar.getYtowar() && Plansza.getNiewolnikNaPLanszy().getYpolozenie()+1 >= towar.getYtowar()) {\n\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().ZbieranieTowarow(towar);\n\t\t\t\t\t\t//Szansa Niewolnika na zdobycie dwoch razy wiecej towarow\n\t\t\t\t\t\tif(GeneratorRandom.RandomOd0(101) <= ZapisOdczyt.getNiewolnicySzansa()) {\n\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().ZbieranieTowarow(towar);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tPlansza.getTowarNaPlanszy().remove(towar);\n\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setLicznikTowarow(Plansza.getNiewolnikNaPLanszy().getLicznikTowarow()+1);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(Plansza.getRzemieslnikNaPlanszy().getXpolozenie()-1 <= towar.getXtowar() && Plansza.getRzemieslnikNaPlanszy().getXpolozenie()+1 >= towar.getXtowar()) \n\t\t\t\t\tif(Plansza.getRzemieslnikNaPlanszy().getYpolozenie()-1 <= towar.getYtowar() && Plansza.getRzemieslnikNaPlanszy().getYpolozenie()+1 >= towar.getYtowar()) {\n\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().ZbieranieTowarow(towar);\n\t\t\t\t\t\tPlansza.getTowarNaPlanszy().remove(towar);\n\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setLicznikTowarow(Plansza.getRzemieslnikNaPlanszy().getLicznikTowarow()+1);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(Plansza.getArystokrataNaPlanszy().getXpolozenie()-1 <= towar.getXtowar() && Plansza.getArystokrataNaPlanszy().getXpolozenie()+1 >= towar.getXtowar()) \n\t\t\t\t\tif(Plansza.getArystokrataNaPlanszy().getYpolozenie()-1 <= towar.getYtowar() && Plansza.getArystokrataNaPlanszy().getYpolozenie()+1 >= towar.getYtowar()) {\n\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().ZbieranieTowarow(towar);\n\t\t\t\t\t\tPlansza.getTowarNaPlanszy().remove(towar);\n\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setLicznikTowarow(Plansza.getArystokrataNaPlanszy().getLicznikTowarow()+1);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"java.util.List<java.lang.Double> getFileList();",
"static void testFichier(String rep){\n\t\tFile f = new File(rep);\n\t\t\n\t\t// Si le rep existe\n\t\tif(f.exists()){\n\t\t\t// on prend le contenu du rep sous forme de liste\n\t\t\tString[] contenu = f.list();\n\t\t\t// on parcours les fichiers/dossiers\n\t\t\tfor(int i=0; i<contenu.length; i++)\n\t\t\t{\n\t\t\t\tFile f2 = new File(rep,contenu[i]);\n\t\t\t\t// si c'est un sous répertoire\n\t\t\t\tif(f2.isDirectory()){\n\t\t\t\t\t// on affiche le nom du rep\n\t\t\t\t\tSystem.out.println(\"Dossier \" + contenu[i]);\n\t\t\t\t\t// Et on parcours son contenu par récursivité\n\t\t\t\t\ttestFichier(rep+\"/\"+contenu[i]);\n\t\t\t\t}\n\t\t\t\t// si c'est un fichier\n\t\t\t\telse\n\t\t\t\t\t// on affiche son nom\n\t\t\t\t\tSystem.out.println(\"\\tFichier \" + contenu[i]);\n\t\t\t}\n\t\t}\n\t}",
"List<String> getFiles(String path) throws IOException;",
"public File[] elements() {\n File plik = new File(katalog);\n katalog = plik.getAbsolutePath();\n if (katalog.endsWith(\".\")) {\n katalog = katalog.substring(0, katalog.length() - 1);\n }\n return plik.listFiles();\n }",
"public static List<String> getFiles(String path) {\n\t try {\n\t\t\tURI uri = getResource(path).toURI();\n\t\t String absPath = getResource(\"..\").getPath();\n\t\t\tPath myPath;\n\t\t\tif (uri.getScheme().equals(\"jar\")) {\n\t\t\t FileSystem fileSystem = FileSystems.newFileSystem(uri, Collections.<String, Object>emptyMap());\n\t\t\t myPath = fileSystem.getPath(path);\n\t\t\t \n\t\t\t} else {\n\t\t\t myPath = Paths.get(uri);\n\t\t\t}\n\t\t\t\n\t\t\t List<String> l = Files.walk(myPath)\t\n\t\t\t \t\t\t\t\t .map(filePath -> pathAbs2Rel(absPath, filePath))\n\t\t\t \t .collect(Collectors.toList());\n\t\t\t return l;\n\t\t} catch (URISyntaxException | IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t return null;\n\t \n\t}",
"private void get_file_List() {\n\tString file_name=null;\r\n\tfor (int i = 0; i < listOfFiles.length; i++) \r\n\t {\r\n\t \r\n\t if (listOfFiles[i].isFile()) \r\n\t {\r\n\t\t file_name = listOfFiles[i].getName();\r\n\t if (file_name.endsWith(\".xml\") || file_name.endsWith(\".XML\"))\r\n\t {\r\n\t file_list.add(file_name) ;\r\n\t }\r\n\t }\r\n\t }\r\n\t\r\n}",
"public void showFile() throws FileNotFoundException, IOException{\r\n ArrayList<String> arxiu = new ArrayList<>();\r\n \r\n BufferedReader br = new BufferedReader(new FileReader(fitxerUsuaris));\r\n \r\n String usuari;\r\n \r\n while((usuari = br.readLine()) != null){\r\n arxiu.add(usuari);\r\n }\r\n \r\n for (int i = 0; i < arxiu.size(); i++) {\r\n System.out.println(arxiu.get(i));\r\n }\r\n }",
"public List<String> pntestadistico(ReportePlazaDTO reportePlazaDTO) {\n List<CustomOutputFile> lista = new ArrayList<CustomOutputFile>();\n List<String> listaString = new ArrayList<String>();\n\n String qnaCaptura = reportePlazaDTO.getQnaCaptura();\n String qnaCaptura2 = \"\";\n\n if (new Integer(qnaCaptura) % 2 == 0) {\n qnaCaptura2 = String.valueOf((new Integer(qnaCaptura) - 1));\n } else {\n qnaCaptura2 = qnaCaptura;\n }\n\n lista = \n super.persistence().get(QueryTdPlazaDAO.class).findBypntEstadistico(qnaCaptura, \n qnaCaptura2);\n listaString.add(\"RFC,Plaza,Periodo,Unidad,Descripcion puesto,Puesto,Tipo,Tipo pza,Adscripcion,Observaciones,Observa,Hipervinculo,Fec val,Area val,Año,Fec act,Nota\");\n\n if (lista != null) {\n for (CustomOutputFile row: lista) {\n listaString.add(row.getRegistro());\n }\n } else\n listaString = null;\n return listaString;\n\n }",
"public List<RssGeneratedFile> selectRssFileList( )\n {\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_RSS_FILE_LIST );\n daoUtil.executeQuery( );\n\n List<RssGeneratedFile> list = new ArrayList<RssGeneratedFile>( );\n\n while ( daoUtil.next( ) )\n {\n RssGeneratedFile rssFile = new RssGeneratedFile( );\n rssFile.setId( daoUtil.getInt( 1 ) );\n rssFile.setPortletId( daoUtil.getInt( 2 ) );\n rssFile.setName( daoUtil.getString( 3 ) );\n rssFile.setState( daoUtil.getInt( 4 ) );\n rssFile.setUpdateDate( daoUtil.getTimestamp( 5 ) );\n rssFile.setDescription( daoUtil.getString( 6 ) );\n rssFile.setWorkgroup( daoUtil.getString( 7 ) );\n rssFile.setTypeResourceRss( daoUtil.getString( 8 ) );\n rssFile.setMaxItems( daoUtil.getInt( 9 ) );\n rssFile.setFeedType( daoUtil.getString( 10 ) );\n rssFile.setEncoding( daoUtil.getString( 11 ) );\n\n list.add( rssFile );\n }\n\n daoUtil.free( );\n\n return list;\n }",
"List<BufferedImage> listarHuellas(Integer fcdc_id) throws SQLException, IOException;",
"private List<File> getContents(String whichFiles) {\n List<File> result = new ArrayList<File>();\n Files f1 = mService.files();\n Files.List request = null;\n\n do {\n try { \n request = f1.list();\n // get the language folders from drive\n request.setQ(whichFiles);\n FileList fileList = request.execute();\n \n result.addAll(fileList.getItems());\n request.setPageToken(fileList.getNextPageToken());\n } catch (UserRecoverableAuthIOException e) {\n startActivityForResult(e.getIntent(), REQUEST_AUTHORIZATION);\n } catch (IOException e) {\n e.printStackTrace();\n if (request != null) \n request.setPageToken(null);\n }\n } while ((request.getPageToken() != null) \n && (request.getPageToken().length() > 0));\n \n return result;\n }",
"public static void Auslesen()\r\n\t{\n\t\tLargeObjectManager lobj;\r\n\t\ttry {\r\n\t\t\tconn= DriverManager.getConnection(DB_URL,USER,PASS);\r\n\t\t\tlobj = ((org.postgresql.PGConnection)conn).getLargeObjectAPI();\r\n\t\t\tPreparedStatement ps = conn.prepareStatement(\"SELECT bild FROM bilder WHERE bild = ?\");\r\n\t\t\tps.setString(1, \"bild2.jpg\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t // Open the large object for reading\r\n\t\t\t\tString name = rs.getString(1);\r\n\t\t\t int oid = rs.getInt(2);\r\n\t\t\t LargeObject obj = lobj.open(oid, LargeObjectManager.READ);\r\n\r\n\t\t\t // Read the data\r\n\t\t\t byte buf[] = new byte[obj.size()];\r\n\t\t\t obj.read(buf, 0, obj.size());\r\n\t\t\t // Do something with the data read here\r\n\t\t\t \r\n\t\t\t String pfad = \"C:/Temp\";\r\n\t\t\t\tFile file = createFile(pfad, \"bild2.jpg\");\r\n\t\t\t\tFiles.copy(obj.getInputStream(), file.toPath());\r\n\t\t\t\r\n\t\t\t \r\n\t\t\t // Close the object\r\n\t\t\t obj.close();\r\n\t\t\t}\r\n\t\t\trs.close();\r\n\t\t\tps.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}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\r\n\t\t\r\n\t}",
"@Test(timeout = 4000)\n public void test23() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n ArrayList<Object> arrayList0 = new ArrayList<Object>();\n File file0 = fileUtil0.getAccessories(\"YP=8V~@ch)3vts}p8\", arrayList0);\n assertNull(file0);\n }",
"public static String cargarPreguntas(String fileName){\n String line = null; \n try {\n //Para lectura del archivo\n FileReader fileReader =\n new FileReader(fileName); \n \n //BufferedReader para optimización de recursos\n BufferedReader bufferedReader =\n new BufferedReader(fileReader);\n \n// Lee línea por línea, verifica que tengan algo de texto\n while(((line = bufferedReader.readLine()) != null)) {\n if ((line.length() > 0) && !(line.startsWith(\"//\"))){\n// Para ignorar las líneas de comentario en el archivo de texto\n //if (!(line.startsWith(\"//\"))){\n// Crea una lista de Strings para cada línea a evaluar\n List<String> listaLinea = new ArrayList<>(Arrays.asList(line.split(\";\")));\n// Impresión de prueba del ArrayList(descomentar)\n// System.out.println(listaLinea);\n \n //Obtiene lista de Respuestas, en tipo String\n List <String >resp = listaLinea.subList(1,listaLinea.size());\n //Creación de Respuestas (bajo el debido constructor) en un HashSet\n HashSet<Respuesta> respuestas = new HashSet(); \n for (int i = 0; i < resp.size();i++){\n if (i == 0){\n //Identifica la respuesta correcta\n respuestas.add(new Respuesta(resp.get(i), true));\n }\n else{\n //Identifica las respuestas incorrectas\n respuestas.add(new Respuesta(resp.get(i), false));\n } \n }\n //System.out.println(resp); Impresión de prueba (descomentar)\n \n //Agrega Preguntas y Respuestas a nuestro HashSet y HashMap\n Almacenamiento.getPreguntas().add(new Pregunta(listaLinea.get(0)));\n Almacenamiento.getMapaPR().put(new Pregunta(listaLinea.get(0)), respuestas); \n //}\n }\n }\n //Impresiones de prueba, descomentar.\n// for(Pregunta p: Almacenamiento.getPreguntas()){\n// System.out.println(p.toString()); \n// } \n// Almacenamiento.getMapaPR().forEach((k,v)-> System.out.println(k+\", \"+v));\n \n // Siempre cerrar archivo, para optimizar recursos\n bufferedReader.close(); \n }\n //Detalle de exception impreso en consola\n catch(FileNotFoundException ex) {\n System.out.println(\n \"No se pudo abrir archivo '\" +\n fileName + \"'\"); \n }\n //Detalle de exception impreso en consola\n catch(IOException ex) {\n System.out.println(\n \"Error leyendo archivo '\"\n + fileName + \"'\"); \n }\n return null;\n }"
]
| [
"0.6361666",
"0.6341713",
"0.61500233",
"0.6089464",
"0.60821956",
"0.606075",
"0.60573435",
"0.6036577",
"0.5968363",
"0.5946225",
"0.5937256",
"0.5933286",
"0.5929844",
"0.59194565",
"0.5889543",
"0.58604354",
"0.58440256",
"0.5798579",
"0.5794226",
"0.57822335",
"0.5760002",
"0.5753902",
"0.57468736",
"0.57368696",
"0.5734554",
"0.57270855",
"0.5721574",
"0.5701147",
"0.5698562",
"0.5697674",
"0.5658358",
"0.5645491",
"0.564078",
"0.56386936",
"0.5619935",
"0.5602239",
"0.5593175",
"0.5593128",
"0.5580235",
"0.5570643",
"0.5567795",
"0.5564981",
"0.55630356",
"0.5553377",
"0.5550498",
"0.55499196",
"0.54993534",
"0.5496694",
"0.54905397",
"0.5480895",
"0.546311",
"0.5456029",
"0.5455739",
"0.54468054",
"0.5445066",
"0.5441632",
"0.5437833",
"0.54207844",
"0.5407102",
"0.53950065",
"0.5389433",
"0.5377672",
"0.5368396",
"0.53651226",
"0.53587943",
"0.53463006",
"0.53440696",
"0.5342807",
"0.5340668",
"0.53216076",
"0.5319287",
"0.5310922",
"0.53054464",
"0.5302781",
"0.53012544",
"0.5299428",
"0.5295688",
"0.52913153",
"0.5268832",
"0.5268684",
"0.5260988",
"0.5255874",
"0.5247176",
"0.5241979",
"0.52403444",
"0.5239462",
"0.52302706",
"0.52223146",
"0.5214763",
"0.5213603",
"0.520965",
"0.5206496",
"0.5202288",
"0.5198091",
"0.5196204",
"0.51935494",
"0.5190701",
"0.51894873",
"0.51880306",
"0.5185947",
"0.5181828"
]
| 0.0 | -1 |
replace all url() with base64 | private static String processCss(String input, URL baseUrl) {
//StringBuffer sb = new StringBuffer(input.length());
StringBuffer sb = new StringBuffer();
// (url\s{0,}\(\s{0,}['"]{0,1})([^\)'"]*)(['"]{0,1}\))
String regex = "(url\\s{0,}\\(\\s{0,}['\"]{0,1})([^\\'\")]*)(['\"]{0,1}\\))";
// input.replaceAll(regex, "$1"+"URL"+"$2$3");
// return input;
Pattern p = Pattern.compile(regex, Pattern.DOTALL);
Matcher m = p.matcher(input);
while(m.find()) {
try {
URL url;
if(m.group(2).startsWith("http")) {
url = new URL(m.group(2));
} else if(m.group(2).startsWith("data:")) {
url = null;
} else {
url = new URL(baseUrl, m.group(2));
}
if(url != null) {
Logger.warn(m.group() + " => " + url.toString());
try {
String b64 = toBase64(url);
m.appendReplacement(sb, Matcher.quoteReplacement(m.group(1)+b64+m.group(3)));
} catch (IOException e) {
Logger.error(e.toString());
}
}
} catch (MalformedURLException e) {
Logger.error(e.toString());
}
}
m.appendTail(sb);
return sb.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String base64Encode(String str) throws StoreFactoryException;",
"default String codificarBase64(String contenido) {\n\t\tbyte[] encoded = Base64.getEncoder().encode(contenido.getBytes(StandardCharsets.UTF_8));\n\t\treturn new String(encoded);\n\t}",
"public abstract String encodeURL(CharSequence url);",
"public static String encodeTobase64(Bitmap image){\n if(image != null) {\n Bitmap image2 = image;\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n image2.compress(Bitmap.CompressFormat.PNG, 100, baos);\n byte[] b = baos.toByteArray();\n String imageEncoded = Base64.encodeToString(b, Base64.DEFAULT);\n\n Log.d(\"Image Log:\", imageEncoded);\n return imageEncoded;\n }\n else{\n return \"\";\n }\n }",
"private static String descifrarBase64(String arg) {\n Base64.Decoder decoder = Base64.getDecoder();\n byte[] decodedByteArray = decoder.decode(arg);\n\n return new String(decodedByteArray);\n }",
"public String toUrlSafe() {\n// try {\n //todo: key encoder\n return Base64.getEncoder().encodeToString(new Gson().toJson(this).getBytes());\n// return URLEncoder.encode(\"\", UTF_8.name());\n// return URLEncoder.encode(TextFormat.printToString(toPb()), UTF_8.name());\n// } catch (UnsupportedEncodingException e) {\n// throw new IllegalStateException(\"Unexpected encoding exception\", e);\n// }\n }",
"private static String encodeurl(String url) \n { \n\n try { \n String prevURL=\"\"; \n String decodeURL=url; \n while(!prevURL.equals(decodeURL)) \n { \n prevURL=decodeURL; \n decodeURL=URLDecoder.decode( decodeURL, \"UTF-8\" ); \n } \n return decodeURL.replace('\\\\', '/'); \n } catch (UnsupportedEncodingException e) { \n return \"Issue while decoding\" +e.getMessage(); \n } \n }",
"private static String encodeURI(String url) {\n\t\tStringBuffer uri = new StringBuffer(url.length());\n\t\tint length = url.length();\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tchar c = url.charAt(i);\n\n\t\t\tswitch (c) {\n\t\t\t\tcase '!':\n\t\t\t\tcase '#':\n\t\t\t\tcase '$':\n\t\t\t\tcase '%':\n\t\t\t\tcase '&':\n\t\t\t\tcase '\\'':\n\t\t\t\tcase '(':\n\t\t\t\tcase ')':\n\t\t\t\tcase '*':\n\t\t\t\tcase '+':\n\t\t\t\tcase ',':\n\t\t\t\tcase '-':\n\t\t\t\tcase '.':\n\t\t\t\tcase '/':\n\t\t\t\tcase '0':\n\t\t\t\tcase '1':\n\t\t\t\tcase '2':\n\t\t\t\tcase '3':\n\t\t\t\tcase '4':\n\t\t\t\tcase '5':\n\t\t\t\tcase '6':\n\t\t\t\tcase '7':\n\t\t\t\tcase '8':\n\t\t\t\tcase '9':\n\t\t\t\tcase ':':\n\t\t\t\tcase ';':\n\t\t\t\tcase '=':\n\t\t\t\tcase '?':\n\t\t\t\tcase '@':\n\t\t\t\tcase 'A':\n\t\t\t\tcase 'B':\n\t\t\t\tcase 'C':\n\t\t\t\tcase 'D':\n\t\t\t\tcase 'E':\n\t\t\t\tcase 'F':\n\t\t\t\tcase 'G':\n\t\t\t\tcase 'H':\n\t\t\t\tcase 'I':\n\t\t\t\tcase 'J':\n\t\t\t\tcase 'K':\n\t\t\t\tcase 'L':\n\t\t\t\tcase 'M':\n\t\t\t\tcase 'N':\n\t\t\t\tcase 'O':\n\t\t\t\tcase 'P':\n\t\t\t\tcase 'Q':\n\t\t\t\tcase 'R':\n\t\t\t\tcase 'S':\n\t\t\t\tcase 'T':\n\t\t\t\tcase 'U':\n\t\t\t\tcase 'V':\n\t\t\t\tcase 'W':\n\t\t\t\tcase 'X':\n\t\t\t\tcase 'Y':\n\t\t\t\tcase 'Z':\n\t\t\t\tcase '[':\n\t\t\t\tcase ']':\n\t\t\t\tcase '_':\n\t\t\t\tcase 'a':\n\t\t\t\tcase 'b':\n\t\t\t\tcase 'c':\n\t\t\t\tcase 'd':\n\t\t\t\tcase 'e':\n\t\t\t\tcase 'f':\n\t\t\t\tcase 'g':\n\t\t\t\tcase 'h':\n\t\t\t\tcase 'i':\n\t\t\t\tcase 'j':\n\t\t\t\tcase 'k':\n\t\t\t\tcase 'l':\n\t\t\t\tcase 'm':\n\t\t\t\tcase 'n':\n\t\t\t\tcase 'o':\n\t\t\t\tcase 'p':\n\t\t\t\tcase 'q':\n\t\t\t\tcase 'r':\n\t\t\t\tcase 's':\n\t\t\t\tcase 't':\n\t\t\t\tcase 'u':\n\t\t\t\tcase 'v':\n\t\t\t\tcase 'w':\n\t\t\t\tcase 'x':\n\t\t\t\tcase 'y':\n\t\t\t\tcase 'z':\n\t\t\t\tcase '~':\n\t\t\t\t\turi.append(c);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tStringBuffer result = new StringBuffer(3);\n\t\t\t\t\tString s = String.valueOf(c);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tbyte[] data = s.getBytes(\"UTF8\");\n\t\t\t\t\t\tfor (int j = 0; j < data.length; j++) {\n\t\t\t\t\t\t\tresult.append('%');\n\t\t\t\t\t\t\tString hex = Integer.toHexString(data[j]);\n\t\t\t\t\t\t\tresult.append(hex.substring(hex.length() - 2));\n\t\t\t\t\t\t}\n\t\t\t\t\t\turi.append(result.toString());\n\t\t\t\t\t} catch (UnsupportedEncodingException ex) {\n\t\t\t\t\t\t// should never happen\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn uri.toString();\n\t}",
"static String convertToBase64(byte[] image){\n return !Objects.isNull(image)\n ? Base64.getEncoder().encodeToString(image)\n : \"\";\n }",
"@Override\n\tpublic String encodeURL(String url) {\n\t\treturn null;\n\t}",
"public String emitAsImageBase64() {\n BufferedImage img = emitAsBufferedImage();\n ByteArrayOutputStream os = new ByteArrayOutputStream();\n try {\n ImageIO.write(img, \"png\", os);\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n Base64 b64 = new Base64();\n String result = b64.encode(os.toByteArray());\n try {\n os.close();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n return result;\n }",
"@Override\n\tpublic String encodeUrl(String url) {\n\t\treturn null;\n\t}",
"private static String encodeBase64(String stringToEncode){\r\n\t\treturn Base64.getEncoder().encodeToString(stringToEncode.getBytes());\t\r\n\t}",
"public static String bitmapEncodeTobase64(Bitmap image) {\n Bitmap immage = image;\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n immage.compress(Bitmap.CompressFormat.PNG, 100, baos);\n byte[] b = baos.toByteArray();\n String imageEncoded = Base64.encodeToString(b, Base64.DEFAULT);\n return imageEncoded;\n }",
"public String encodeToUrlString() throws IOException {\n return encodeWritable(this);\n }",
"public CodePointIterator base64Encode() {\n return base64Encode(Base64Alphabet.STANDARD, true);\n }",
"private static String encodeToBase64(byte[] data) {\n return Base64.encodeToString(data, BASE64_EFLAGS);\n }",
"@Override\n public String encodeURL(String arg0) {\n return null;\n }",
"@Override\n public String encodeUrl(String arg0) {\n return null;\n }",
"public static String encodeToBase64(Bitmap image) {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n image.compress(Bitmap.CompressFormat.PNG, 100, baos);\n byte[] b = baos.toByteArray();\n return Base64.encodeToString(b, Base64.DEFAULT);\n }",
"private Base64(){}",
"public static String getImage(Drawable drawable,String path) {\n File cheakfile = new File( path );\n String base64String = null;\n\n if(drawable!=null) {\n //\n File file = new File(path);\n Bitmap bitmap=((BitmapDrawable)drawable).getBitmap();\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.PNG, 100 /*ignored for PNG*/, bos);\n byte[] bitmapdata = bos.toByteArray();\n base64String = Base64.encodeToString(bitmapdata, Base64.DEFAULT);\n \n\n //write the bytes in file\n // FileOutputStream fos;\n // try {\n // fos = new FileOutputStream(file);\n // fos.write(bitmapdata);\n // } catch (IOException e) {\n // // TODO Auto-generated catch block\n // e.printStackTrace();\n // }\n // \n }\n\n return base64String;\n }",
"public static String convertImageToBase64(String path) {\n\n Bitmap btmp = BitmapFactory.decodeFile(path);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n btmp.compress(Bitmap.CompressFormat.JPEG, 100, baos);\n byte[] byteArrayImage = baos.toByteArray();\n\n return Base64.encodeToString(byteArrayImage, Base64.DEFAULT);\n }",
"public String getBase64EncodedPNG()\n\t{\n\t\tString base64Png = null;\n\t\tByteArrayOutputStream output = new ByteArrayOutputStream();\n\t\ttry\n\t\t{\n\t\t\tif (getBlackWhiteBitmap().compress(Bitmap.CompressFormat.PNG, 100, output))\n\t\t\t{\n\t\t\t\tbyte[] imgData = output.toByteArray();\n\t\t\t\tbase64Png = Base64.encodeToString(imgData, Base64.DEFAULT);\n\t\t\t}\n\t\t}\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn base64Png;\n\t}",
"public String encodeUrl(String s) {\n\t\treturn null;\n\t}",
"@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\r\n super.onActivityResult(requestCode, resultCode, data);\r\n\r\n ImageView image = (ImageView) findViewById(R.id.editprofile_image);\r\n try {\r\n if (requestCode == requestCode && resultCode == RESULT_OK && null != data) {\r\n Uri selectedImage = data.getData();\r\n Log.d(\"d\", \"Image URI: \" + selectedImage);\r\n\r\n Bitmap bm = MediaStore.Images.Media.getBitmap(this.getContentResolver(), selectedImage);\r\n image.setImageBitmap(bm);\r\n\r\n //Encoding image to base64\r\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\r\n bm.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream);\r\n byte[] byteArray = byteArrayOutputStream .toByteArray();\r\n to64 = Base64.encodeToString(byteArray, Base64.DEFAULT);\r\n Log.d(\"d\", \"Encoded String: \" + to64);\r\n\r\n }\r\n }catch (IOException e){\r\n Toast.makeText(this, \"An error occurred.\", Toast.LENGTH_LONG).show();\r\n }\r\n\r\n }",
"JwtParserBuilder base64UrlDecodeWith(Decoder<String, byte[]> base64UrlDecoder);",
"public String encodeURL(String s) {\n\t\treturn null;\n\t}",
"public static String base64Encode(String str) {\n sun.misc.BASE64Encoder encoder = new sun.misc.BASE64Encoder();\n byte[] bytes = str.getBytes();\n return encoder.encode(bytes);\n\n }",
"public String fixForScheme(String url) {\n\t\tStringBuffer returnUrl = new StringBuffer(url);\n\t\tif(StringUtils.contains(url, \"returnurl=\"))\n\t\t{\n\t\t\treturnUrl = new StringBuffer(StringUtils.substring(url,0, \n\t\t\t\t\tStringUtils.indexOf(url, \"returnurl=\")));\n\t\t\t\n\t\t\treturnUrl.append(\"returnurl=\");\n\t\t\tString returnurl = StringUtils.substring(url, \n\t\t\t\t\tStringUtils.indexOf(url, \"returnurl=\")+10);\n\t\t\t\n\t\t\ttry {\n\t\t\t\treturnUrl.append(URLEncoder.encode(new String(Base64.encodeBase64(returnurl.getBytes())),\"UTF-8\"));\n\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn returnUrl.toString();\n\t}",
"public static String getStringBase64Bitmap(Bitmap bitmap){\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, bos);\n byte[] bitmapBytes = bos.toByteArray();\n String encodedImage = Base64.encodeToString(bitmapBytes, Base64.DEFAULT);\n Log.i(\"getStringBase64Bitmap\",encodedImage);\n return encodedImage;\n }",
"public String base64Decode(String str) throws StoreFactoryException;",
"public byte[] encode(byte[] bytes) {\n/* 199 */ return encodeUrl(WWW_FORM_URL_SAFE, bytes);\n/* */ }",
"public void encodeImagetoString() {\n new AsyncTask<Void, Void, String>() {\n\n protected void onPreExecute() {\n\n }\n\n ;\n\n @Override\n protected String doInBackground(Void... params) {\n\n //bitmap = Bitmap.createScaledBitmap(bitmap, original_width, original_height, true);\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n // Must compress the Image to reduce image size to make upload easy\n bitmap.compress(Bitmap.CompressFormat.PNG, 50, stream);\n byte[] byte_arr = stream.toByteArray();\n // Encode Image to String\n encodedString = Base64.encodeToString(byte_arr, 0);\n return \"\";\n }\n\n @Override\n protected void onPostExecute(String msg) {\n\n // Put converted Image string into Async Http Post param\n params.add(new BasicNameValuePair(\"image\", encodedString));\n // Trigger Image upload\n new upload_image().execute();\n }\n }.execute(null, null, null);\n }",
"public static String bitMapToBase64String(Bitmap bitmap){\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, byteStream);\n byte[] byteArray = byteStream.toByteArray();\n String baseString = Base64.encodeToString(byteArray,Base64.DEFAULT);\n return baseString;\n }",
"public static Bitmap decodeToBase64(String input) {\n byte[] decodedByte = Base64.decode(input, 0);\n return BitmapFactory.decodeByteArray(decodedByte, 0, decodedByte.length);\n }",
"private static String normalizeB64String(String s) {\n while(s.length() % 4 != 0)\n s += \"=\";\n return s;\n }",
"private String convertUploadedFileToBase64(MultipartFile file) throws IOException {\n return Base64.getEncoder().encodeToString(file.getBytes());\n }",
"@Override\n @SuppressWarnings(\"all\")\n public String encodeUrl(String arg0) {\n\n return null;\n }",
"private String convertintobase64(Bitmap bitmap2) {\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tbitmap2.compress(Bitmap.CompressFormat.PNG, 100, baos);\n\t\tbyte[] b = baos.toByteArray();\n\t\tString temp = Base64.encodeToString(b, Base64.DEFAULT | Base64.NO_WRAP);\n\t\tSystem.out.println(\"encoded string is:\" + temp);\n\t\treturn temp;\n\t}",
"public static String base64EncodeString(String input) throws Exception\n {\n return base64Encode(input.getBytes(\"UTF-8\"));\n }",
"public InputStream mo12944a(String str) {\n if (str.startsWith(\"data:image\")) {\n int indexOf = str.indexOf(44);\n if (indexOf == -1) {\n throw new IllegalArgumentException(\"Missing comma in data URL.\");\n } else if (str.substring(0, indexOf).endsWith(\";base64\")) {\n return new ByteArrayInputStream(Base64.decode(str.substring(indexOf + 1), 0));\n } else {\n throw new IllegalArgumentException(\"Not a base64 image data URL.\");\n }\n } else {\n throw new IllegalArgumentException(\"Not a valid image data URL.\");\n }\n }",
"public String getEncodedImage() {\n String base64String = Base64.getEncoder().encodeToString(profilePictureBytes);\n return base64String;\n }",
"@SuppressWarnings(\"unused\")\n private void toDataURL(final JSONArray args, final CallbackContext callbackContext) throws JSONException {\n this.map.snapshot(new GoogleMap.SnapshotReadyCallback() {\n \n @Override\n public void onSnapshotReady(Bitmap image) {\n float density = Resources.getSystem().getDisplayMetrics().density;\n image = PluginUtil.resizeBitmap(image,\n (int)(image.getWidth() / density),\n (int)(image.getHeight() / density));\n \n ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); \n image.compress(Bitmap.CompressFormat.PNG, 100, outputStream);\n byte[] byteArray = outputStream.toByteArray();\n String imageEncoded = \"data:image/png;base64,\" + \n Base64.encodeToString(byteArray, Base64.NO_WRAP);\n \n callbackContext.success(imageEncoded);\n }\n });\n \n }",
"public String emitAsImageBase64(int width,int height) {\n BufferedImage img = emitAsBufferedImage(width,height);\n ByteArrayOutputStream os = new ByteArrayOutputStream();\n try {\n ImageIO.write(img, \"png\", os);\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n Base64 b64 = new Base64();\n String result = b64.encode(os.toByteArray());\n try {\n os.close();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n return result;\n }",
"@Override\n protected boolean shouldEncodeUrls() {\n return isShouldEncodeUrls();\n }",
"private String encodeBase64(String msg) {\n\t\tbyte[] bytesEncoded = Base64.encodeBase64(msg.getBytes());\n\t\t//System.out.println(\"encoded value is \" + new String(bytesEncoded));\n\n\t\treturn new String(bytesEncoded);\n\t}",
"public static String encodeURL(String url) {\n\n\t\tint len = url.length();\n\n\t\t// add a little (6.25%) to leave room for some expansion during encoding\n\t\tlen += len >>> 4;\n\n\t\treturn appendURL(new StringBuffer(len), url).toString();\n\t}",
"private String encodeURILikeJavascript(String s) {\n log.info(\"Entering encodeURILikeJavascript\");\n String result = null;\n\n try {\n result = URLEncoder.encode(s, \"UTF-8\")\n .replaceAll(\"\\\\+\", \"%20\")\n .replaceAll(\"\\\\%21\", \"!\")\n .replaceAll(\"\\\\%27\", \"'\")\n .replaceAll(\"\\\\%28\", \"(\")\n .replaceAll(\"\\\\%29\", \")\")\n .replaceAll(\"\\\\%7E\", \"~\");\n } catch (UnsupportedEncodingException e) {\n result = s;\n }\n\n return result;\n }",
"Uri encryptedPath();",
"public String getImageBase64() {\n return this.imageBase64;\n }",
"public String convertImage(ImageView itemImage){\n Bitmap bmp = ((BitmapDrawable)itemImage.getDrawable()).getBitmap();\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n bmp.compress(Bitmap.CompressFormat.PNG, 100, stream);\n byte[] byteArray = stream.toByteArray();\n String imageFile = Base64.encodeToString(byteArray, Base64.DEFAULT);\n return imageFile;\n }",
"public String encodeURL(String url) {\n return manager.encodeUrl(this, url);\n }",
"public String encode(String longUrl) {\n String key = \"\";\n do {\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < 6; i++) {\n int r = rand.nextInt(charSet.length());\n sb.append(charSet.charAt(r));\n }\n key = sb.toString();\n } while (map.containsKey(key));\n \n map.put(BASE_HOST + key, longUrl);\n return BASE_HOST + key;\n }",
"default byte[] decodificarBase64(String archivoBase64) {\n\t\treturn Base64.getDecoder().decode(archivoBase64);\n\t}",
"public static String getBase64FromImage(ImageView imageView) {\n\n\n imageView.buildDrawingCache();\n Bitmap bitmap = imageView.getDrawingCache();\n //Bitmap bitmap = ((BitmapDrawable) imageView.getDrawable()).getBitmap();\n return getBase64FromBitmap(bitmap);\n }",
"public static String encode(String anyURI){\n int len = anyURI.length(), ch;\n StringBuffer buffer = new StringBuffer(len*3);\n \n // for each character in the anyURI\n int i = 0;\n for (; i < len; i++) {\n ch = anyURI.charAt(i);\n // if it's not an ASCII character, break here, and use UTF-8 encoding\n if (ch >= 128)\n break;\n if (gNeedEscaping[ch]) {\n buffer.append('%');\n buffer.append(gAfterEscaping1[ch]);\n buffer.append(gAfterEscaping2[ch]);\n }\n else {\n buffer.append((char)ch);\n }\n }\n \n // we saw some non-ascii character\n if (i < len) {\n // get UTF-8 bytes for the remaining sub-string\n byte[] bytes = null;\n byte b;\n try {\n bytes = anyURI.substring(i).getBytes(\"UTF-8\");\n } catch (java.io.UnsupportedEncodingException e) {\n // should never happen\n return anyURI;\n }\n len = bytes.length;\n \n // for each byte\n for (i = 0; i < len; i++) {\n b = bytes[i];\n // for non-ascii character: make it positive, then escape\n if (b < 0) {\n ch = b + 256;\n buffer.append('%');\n buffer.append(gHexChs[ch >> 4]);\n buffer.append(gHexChs[ch & 0xf]);\n }\n else if (gNeedEscaping[b]) {\n buffer.append('%');\n buffer.append(gAfterEscaping1[b]);\n buffer.append(gAfterEscaping2[b]);\n }\n else {\n buffer.append((char)b);\n }\n }\n }\n \n // If encoding happened, create a new string;\n // otherwise, return the orginal one.\n if (buffer.length() != len)\n return buffer.toString();\n else\n return anyURI;\n }",
"public DataURL setBase64(boolean base64){\n this.base64 = base64;\n return this;\n }",
"public String encode(String uri) {\n return uri;\n }",
"public static String unEscapeURL(String src) {\n\t StringBuffer bf = new StringBuffer();\n\t char[] s = src.toCharArray();\n\t for (int k = 0; k < s.length; ++k) {\n\t char c = s[k];\n\t if (c == '%') {\n\t if (k + 2 >= s.length) {\n\t bf.append(c);\n\t continue;\n\t }\n\t int a0 = PRTokeniser.getHex(s[k + 1]);\n\t int a1 = PRTokeniser.getHex(s[k + 2]);\n\t if (a0 < 0 || a1 < 0) {\n\t bf.append(c);\n\t continue;\n\t }\n\t bf.append((char)(a0 * 16 + a1));\n\t k += 2;\n\t }\n\t else\n\t bf.append(c);\n\t }\n\t return bf.toString();\n\t}",
"public static Bitmap decodeBase64(String input) \n\t\t{\n\t\t byte[] decodedByte = Base64.decode(input, 0);\n\t\t return BitmapFactory.decodeByteArray(decodedByte, 0, decodedByte.length); \n\t\t}",
"public static String replaceURLEscapeChars(String value) {\n\t\tvalue = replace(value, \"#\", \"%23\");\n\t\tvalue = replace(value, \"$\", \"%24\");\n\t\tvalue = replace(value, \"%\", \"%25\");\n\t\tvalue = replace(value, \"&\", \"%26\");\n\t\tvalue = replace(value, \"@\", \"%40\");\n\t\tvalue = replace(value, \"'\", \"%60\");\n\t\tvalue = replace(value, \"/\", \"%2F\");\n\t\tvalue = replace(value, \":\", \"%3A\");\n\t\tvalue = replace(value, \";\", \"%3B\");\n\t\tvalue = replace(value, \"<\", \"%3C\");\n\t\tvalue = replace(value, \"=\", \"%3D\");\n\t\tvalue = replace(value, \">\", \"%3E\");\n\t\tvalue = replace(value, \"?\", \"%3F\");\n\t\tvalue = replace(value, \"[\", \"%5B\");\n\t\tvalue = replace(value, \"\\\\\", \"%5C\");\n\t\tvalue = replace(value, \"]\", \"%5D\");\n\t\tvalue = replace(value, \"^\", \"%5E\");\n\t\tvalue = replace(value, \"{\", \"%7B\");\n\t\tvalue = replace(value, \"|\", \"%7C\");\n\t\tvalue = replace(value, \"}\", \"%7D\");\n\t\tvalue = replace(value, \"~\", \"%7E\");\n\t\treturn value;\n\t}",
"public static String convertUrlToPunycodeIfNeeded(String url) {\n if (!Charset.forName(\"US-ASCII\").newEncoder().canEncode(url)) {\n if (url.toLowerCase().startsWith(\"http://\")) {\n url = \"http://\" + IDN.toASCII(url.substring(7));\n } else if (url.toLowerCase().startsWith(\"https://\")) {\n url = \"https://\" + IDN.toASCII(url.substring(8));\n } else {\n url = IDN.toASCII(url);\n }\n }\n return url;\n }",
"public static Bitmap decodeBase64(String input){\n byte[] decodedByte = Base64.decode(input, 0);\n return BitmapFactory.decodeByteArray(decodedByte,0,decodedByte.length);\n }",
"public String getEncoded64ImageStringFromBitmap(Bitmap bitmap) {\n\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, stream);\n byte[] byteFormat = stream.toByteArray();\n // get the base 64 string\n //String imgString = Base64.encodeToString(byteFormat, Base64.NO_WRAP);\n String imgString = Base64.encodeToString(byteFormat, Base64.DEFAULT);\n\n return imgString;\n }",
"public static String encodeUrl(String base, String parentCode, String code, String targetCode, String token) {\n\t\t/**\n\t\t * A Function for Base64 encoding urls\n\t\t **/\n\n\t\t// Encode Parent and Code\n\t\tString encodedParentCode = new String(Base64.getEncoder().encode(parentCode.getBytes()));\n\t\tString encodedCode = new String(Base64.getEncoder().encode(code.getBytes()));\n\t\tString url = base + \"/\" + encodedParentCode + \"/\" + encodedCode;\n\n\t\t// Add encoded targetCode if not null\n\t\tif (targetCode != null) {\n\t\t\tString encodedTargetCode = new String(Base64.getEncoder().encode(targetCode.getBytes()));\n\t\t\turl = url + \"/\" + encodedTargetCode;\n\t\t}\n\n\t\t// Add access token if not null\n\t\tif (token != null) {\n\t\t\turl = url +\"?token=\" + token;\n\t\t}\n\t\treturn url;\n\t}",
"public byte[] decodeContent(String contentDataString){\t\t\n return Base64.decodeBase64(contentDataString);\n}",
"public static String encodeBase64(String string) {\n\t\tif (string == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn Base64.getEncoder().encodeToString(string.getBytes(UTF_8));\n\t}",
"protected String opaque(final Request request) {\n return new Base64Helper().encode( name+ \"@\" + request.url.host());\n }",
"public String fromImageToString(BitmapDrawable personPhoto){\n Bitmap photoBitmap = personPhoto.getBitmap();\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n photoBitmap.compress(Bitmap.CompressFormat.JPEG, 100, stream);\n byte[] photoByteFormat = stream.toByteArray();\n String encodedImage = Base64.encodeToString(photoByteFormat, Base64.NO_WRAP);\n return encodedImage;\n }",
"public static String stringToBase64String(String text) {\n if (text == null) return null;\n return new String(Base64.encodeBase64(text.getBytes()));\n }",
"String convertImageToBase64String(final BufferedImage img) {\n final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n try {\n ImageIO.write(img, \"png\", byteArrayOutputStream);\n return Base64.getEncoder().encodeToString(byteArrayOutputStream.toByteArray());\n } catch (IOException e) {\n logger.error(\"cannot convert image to base 64\", e);\n }\n return null;\n }",
"public static final byte[] encodeUrl(BitSet urlsafe, byte[] bytes) {\n/* 127 */ if (bytes == null) {\n/* 128 */ return null;\n/* */ }\n/* 130 */ if (urlsafe == null) {\n/* 131 */ urlsafe = WWW_FORM_URL_SAFE;\n/* */ }\n/* */ \n/* 134 */ ByteArrayOutputStream buffer = new ByteArrayOutputStream();\n/* 135 */ for (byte c : bytes) {\n/* 136 */ int b = c;\n/* 137 */ if (b < 0) {\n/* 138 */ b = 256 + b;\n/* */ }\n/* 140 */ if (urlsafe.get(b)) {\n/* 141 */ if (b == 32) {\n/* 142 */ b = 43;\n/* */ }\n/* 144 */ buffer.write(b);\n/* */ } else {\n/* 146 */ buffer.write(37);\n/* 147 */ char hex1 = Utils.hexDigit(b >> 4);\n/* 148 */ char hex2 = Utils.hexDigit(b);\n/* 149 */ buffer.write(hex1);\n/* 150 */ buffer.write(hex2);\n/* */ } \n/* */ } \n/* 153 */ return buffer.toByteArray();\n/* */ }",
"public static void main(String[] args) throws IOException {\n String strImg=\"iVBORw0KGgoAAAANSUhEUgAAADwAAAAeCAYAAABwmH1PAAAAAXNSR0IArs4c6QAAAARnQU1BAACx\\n\" +\n \"jwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGMSURBVFhH7ZUxbsIwFIYZK7F17h06darEzsLQ\\n\" +\n \"E1RsXIAdMXIANrgAAzMT4go5kBs7/sOLY+e9tGksWxk+yXJ+XvI923hWFIUampfZh8H3LDaTcO5M\\n\" +\n \"wrkzCfs5q8Nqrg6X5vzn25eBzlX4836E2ctafZe5mt3Zn2MQCN/UaVO9JPRRTXE+/0SYtbLPTNWk\\n\" +\n \"30h3C9/3aqsLWzgBiHN5XFuy2rYpm716kPnHcVH+bqFOd5rlCQtDVnfRjjuFSR7inLCs9ljCFIlw\\n\" +\n \"yfvy1YA8xDW+vEFSO7SlnSZIGFQYQLxuQDkXFJfWtjkcge3x5s8x/Iuwm6fyLXFB7etOS9Ltiz+7\\n\" +\n \"tbo6WY5RhF2ouB531ra12itabeu+Kx1FmELFQSPTOr/ArnLPqymqML2eIN6SH3qF8VLfw5oRhGkW\\n\" +\n \"4npM5U0DTOYPZzimsKEjS8Wre3ceaIAc2ZaODBV36duAJIQBxEPyGq4BSQlTOHHgiicrDKTiIHlh\\n\" +\n \"IBXPRhhw4tkJg5C4WFh0XyfAJJw7k3DeFOoHaIAJVpYI2HsAAAAASUVORK5CYII=\";\n\n\n\n\n String base64Img=null;\n HttpRequester httprequest = new HttpRequester();\n\n CloseableHttpClient httpClient =null;\n String url=\"https://creditcard.ecitic.com/citiccard/cppnew/entry.do?func=entryebank&ebankPage=mainpage\";\n httpClient = HttpClients.createDefault();\n CookieStore cookieStore = new BasicCookieStore();\n HttpContext localContext = new BasicHttpContext();\n localContext.setAttribute(\"http.cookie-store\", cookieStore);\n RequestConfig.custom().setConnectTimeout(20000);\n RequestConfig.custom().setSocketTimeout(20000);\n RequestConfig.custom().setConnectionRequestTimeout(20000);\n RequestConfig requestConfig = RequestConfig.custom().build();\n Map<String, String> requestHeaderMap=new HashMap<String, String>();\n requestHeaderMap.put(\"Accept-Encoding\", \"gzip, deflate\");\n requestHeaderMap.put(\"Host\", \"creditcard.ecitic.com\");\n requestHeaderMap.put(\"User-Agent\", \"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0\");\n requestHeaderMap.put(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\");\n requestHeaderMap.put(\"Connection\", \"Keep-Alive\");\n requestHeaderMap.put(\"Cache-Control\", \"private\");\n requestHeaderMap.put(\"Accept-Language\", \"zh-CN\");\n// if (!StringUtil.isEmpty(userIp)&&!userIp.equals(\"127.0.0.1\")) {\n// requestHeaderMap.put(\"X-Forwarded-For\", userIp);\n// }\n// logger.info(bean.getCuserId()+\"zhongxin userIp=\"+userIp);\n String content= HpClientUtil.httpGet(url, requestHeaderMap, httpClient, localContext, \"GBK\");\n\n String channel=content.substring(content.indexOf(\"var channel\"), content.indexOf(\"var source\"));\n String source =content.substring(content.indexOf(\"var source\"), content.indexOf(\"var from\"));\n channel=channel.substring(channel.indexOf(\"\\\"\")+1, channel.lastIndexOf(\"\\\"\"));\n source=source.substring(source.indexOf(\"\\\"\") + 1, source.lastIndexOf(\"\\\"\"));\n String vcodeUrl=\"https://creditcard.ecitic.com/citiccard/cppnew/jsp/valicode.jsp?time=\"+System.currentTimeMillis();\n\n\n BufferedImage localBufferedImage=null;\n localBufferedImage=HpClientUtil.getRandomImageOfJPEG(vcodeUrl, requestHeaderMap, httpClient, localContext, requestConfig);\n base64Img= BankHelper.GetImageBase64(localBufferedImage, \"jpeg\");\n System.out.println(base64Img);\n url = \"http://192.168.3.50:8080/captcha/hack?captcha=\";\n\n try {\n // url = java.net.URLDecoder.decode(url, \"utf-8\");\n strImg= java.net.URLEncoder.encode(base64Img, \"utf-8\");\n url = url +strImg + \"&bankid=2&imgtype=1\" ;\n HttpRespons hr = httprequest.sendGet(url);\n //获取招商银行的登录sessionID\n content=hr.getContent();\n System.out.println(content);\n JSONObject json=JSONObject.parseObject(content);\n System.out.println(json.getString(\"text\"));\n\n\n\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n System.out.println(url);\n GenerateImage(base64Img);\n }",
"String getBaseUri();",
"public static String base64Encode(byte[] input) {\n return DatatypeConverter.printBase64Binary(input);\n }",
"public final static String transformUrl(String url) {\n \n int c = url.indexOf('?');\n if (c > -1) {\n url = url.substring(0, c);\n }\n \n // temporary work around to enable authorization on opendap URLs\n url = url.replace(\"dodsC\", \"fileServer\").replace(\".ascii\", \"\").replace(\".dods\", \"\").replace(\".das\", \"\").replace(\".ddds\", \"\");\n \n return url;\n }",
"private String encodeTokenString(String tokenPortion) {\n log.info(\"Entering encodeTokenString\");\n String base64EncodedTokenString = Base64.getEncoder().encodeToString(tokenPortion.getBytes());\n String replacedEncodedTokenString = base64EncodedTokenString.replaceAll(\"={1,2}$\", \"\");\n return encodeURILikeJavascript(replacedEncodedTokenString);\n }",
"static private String ToUrlEncoded(String word) {\n\t\tString urlStr = null;\n\t\ttry {\n\t\t\turlStr = URLEncoder.encode(word,CharSet);\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn urlStr;\n\t}",
"private static byte[] decodeBase64(String data) {\n return Base64.decode(data, BASE64_DFLAGS);\n }",
"public static Bitmap decodeBase64(String input) {\n byte[] decodedByte = Base64.decode(input, 0);\n return BitmapFactory\n .decodeByteArray(decodedByte, 0, decodedByte.length);\n }",
"static String hashURL(String url){\n\t\treturn url.replace('/', 's').replace(':','c');\n\t}",
"private String encodeUri(String uri) {\n\t\t\tString newUri = \"\";\n\t\t\tStringTokenizer st = new StringTokenizer(uri, \"/ \", true);\n\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\tString tok = st.nextToken();\n\t\t\t\tif (\"/\".equals(tok)) {\n\t\t\t\t\tnewUri += \"/\";\n\t\t\t\t} else if (\" \".equals(tok)) {\n\t\t\t\t\tnewUri += \"%20\";\n\t\t\t\t} else {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tnewUri += URLEncoder.encode(tok, \"UTF-8\");\n\t\t\t\t\t} catch (UnsupportedEncodingException ignored) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn newUri;\n\t\t}",
"private String encode(String str) {\n verifyNotNull(str, ERROR_MESSAGE);\n byte[] bytes = str.getBytes();\n return Base64.getEncoder()\n .withoutPadding()\n .encodeToString(bytes);\n }",
"public static Bitmap decodeBase64(String input) {\r\n byte[] decodedBytes = Base64.decode(input, 0);\r\n return BitmapFactory.decodeByteArray(decodedBytes, 0, decodedBytes.length);\r\n }",
"private String byteToBase64(final byte[] bytes) {\n String str = DatatypeConverter.printBase64Binary(bytes);\n return str;\n }",
"private String saveDownloadedImage(Bitmap bmp) {\n if (bmp != null) {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n bmp.compress(Bitmap.CompressFormat.JPEG, 90, baos);\n byte[] imgBytes = baos.toByteArray();\n String base64String = Base64.encodeToString(imgBytes,\n Base64.DEFAULT);\n\n //Return the encoded image as String\n return base64String;\n }\n return null;\n }",
"@Override\n public String encodeURL(String url) {\n return this._getHttpServletResponse().encodeURL(url);\n }",
"private Base64(){\n\t}",
"static String base64encode(byte[] bytes)\n {\n StringBuilder builder = new StringBuilder(((bytes.length + 2)/ 3) * 4);\n for (int i = 0; i < bytes.length; i += 3)\n {\n byte b0 = bytes[i];\n byte b1 = i < bytes.length - 1 ? bytes[i + 1] : 0;\n byte b2 = i < bytes.length - 2 ? bytes[i + 2] : 0;\n builder.append(BASE64_CHARS[(b0 & 0xFF) >> 2]);\n builder.append(BASE64_CHARS[((b0 & 0x03) << 4) | ((b1 & 0xF0) >> 4)]);\n builder.append(i < bytes.length - 1 ? BASE64_CHARS[((b1 & 0x0F) << 2) | ((b2 & 0xC0) >> 6)] : \"=\");\n builder.append(i < bytes.length - 2 ? BASE64_CHARS[b2 & 0x3F] : \"=\");\n }\n return builder.toString();\n }",
"public static Bitmap decodeBase64(String input)\n {\n byte[] decodedBytes = Base64.decode(input, 0);\n return BitmapFactory.decodeByteArray(decodedBytes, 0, decodedBytes.length);\n }",
"public static byte[] altBase64ToByteArray(String s) {\n return base64ToByteArray(s, true);\n }",
"@Override\n protected String doInBackground(Void... params) {\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n // Must compress the Image to reduce image size to make upload easy\n bitmap.compress(Bitmap.CompressFormat.PNG, 50, stream);\n byte[] byte_arr = stream.toByteArray();\n // Encode Image to String\n encodedString = Base64.encodeToString(byte_arr, 0);\n return \"\";\n }",
"static byte[] base64ToByteArray(String s) {\r\n byte[] alphaToInt = base64ToInt;\r\n int sLen = s.length();\r\n int numGroups = sLen/4;\r\n if (4*numGroups != sLen)\r\n throw new IllegalArgumentException(\r\n \"String length must be a multiple of four.\");\r\n int missingBytesInLastGroup = 0;\r\n int numFullGroups = numGroups;\r\n if (sLen != 0) {\r\n if (s.charAt(sLen-1) == '=') {\r\n missingBytesInLastGroup++;\r\n numFullGroups--;\r\n }\r\n if (s.charAt(sLen-2) == '=')\r\n missingBytesInLastGroup++;\r\n }\r\n byte[] result = new byte[3*numGroups - missingBytesInLastGroup];\r\n\r\n // Translate all full groups from base64 to byte array elements\r\n int inCursor = 0, outCursor = 0;\r\n for (int i=0; i<numFullGroups; i++) {\r\n int ch0 = base64toInt(s.charAt(inCursor++), alphaToInt);\r\n int ch1 = base64toInt(s.charAt(inCursor++), alphaToInt);\r\n int ch2 = base64toInt(s.charAt(inCursor++), alphaToInt);\r\n int ch3 = base64toInt(s.charAt(inCursor++), alphaToInt);\r\n result[outCursor++] = (byte) ((ch0 << 2) | (ch1 >> 4));\r\n result[outCursor++] = (byte) ((ch1 << 4) | (ch2 >> 2));\r\n result[outCursor++] = (byte) ((ch2 << 6) | ch3);\r\n }\r\n\r\n // Translate partial group, if present\r\n if (missingBytesInLastGroup != 0) {\r\n int ch0 = base64toInt(s.charAt(inCursor++), alphaToInt);\r\n int ch1 = base64toInt(s.charAt(inCursor++), alphaToInt);\r\n result[outCursor++] = (byte) ((ch0 << 2) | (ch1 >> 4));\r\n\r\n if (missingBytesInLastGroup == 1) {\r\n int ch2 = base64toInt(s.charAt(inCursor++), alphaToInt);\r\n result[outCursor++] = (byte) ((ch1 << 4) | (ch2 >> 2));\r\n }\r\n }\r\n // assert inCursor == s.length()-missingBytesInLastGroup;\r\n // assert outCursor == result.length;\r\n return result;\r\n }",
"public static String toBase64(byte[] data)\n {\n return Base64.encodeToString(data, Base64.NO_WRAP);\n }",
"public final String urlEncode() {\n\t\treturn urlEncode(UTF_8);\n\t}",
"static Image forData(String imageType, byte[] data) {\n\t\treturn () -> String.format(\"data:image/%s;base64,%s\", imageType, Base64.encodeBase64String(data));\n\t}",
"Uri decryptedPath();",
"public static String getUrlFromMD5(String md5) {\n // https://yixunfiles-ali.yixun.arhieason.com/MD5.FORMAT?x-oss-process=image/format,png\n // https://7xofx2.com2.z0.glb.qiniucdn.com/MD5.FORMAT?imageView2/0/format/png\n String formatString = md5.substring(md5.indexOf(\"_\") + 1);\n String baseUrl = ISARHttpServerURL.CDN_PIC_FULL;\n String[] stringArray = baseUrl.split(\"\\\\?\");\n String domainString = stringArray[0].replace(\"MD5\", md5).replace(\"FORMAT\", formatString);\n String argsString = stringArray[1];\n return domainString + \"?\" + argsString;\n }",
"public String getImageBase64(String imagePath) {\n\t\tString base64Image = \"\";\n\t\tFile file = new File(imagePath);\n\t\ttry (FileInputStream imageInFile = new FileInputStream(file)) {\n\t\t\t// Reading a Image file from file system\n\t\t\tbyte imageData[] = new byte[(int) file.length()];\n\t\t\timageInFile.read(imageData);\n\t\t\tbase64Image = Base64.getEncoder().encodeToString(imageData);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Image not found\" + e);\n\t\t} catch (IOException ioe) {\n\t\t\tSystem.out.println(\"Exception while reading the Image \" + ioe);\n\t\t}\n\t\treturn base64Image;\n\t}"
]
| [
"0.61537874",
"0.61199534",
"0.6118563",
"0.60236156",
"0.60220456",
"0.5969834",
"0.5948016",
"0.5946031",
"0.59329516",
"0.5929207",
"0.58962166",
"0.58330923",
"0.5751143",
"0.57446134",
"0.5726292",
"0.5709433",
"0.5677416",
"0.5667532",
"0.5655728",
"0.560121",
"0.55730593",
"0.55649656",
"0.55631787",
"0.5557261",
"0.5551802",
"0.5537047",
"0.55301577",
"0.5506792",
"0.5505628",
"0.55026275",
"0.54911137",
"0.5479417",
"0.54689574",
"0.54651475",
"0.54577684",
"0.5457498",
"0.545481",
"0.5454085",
"0.54408723",
"0.54392534",
"0.5430889",
"0.5425462",
"0.5416502",
"0.54106253",
"0.53903425",
"0.53848773",
"0.53847396",
"0.53684187",
"0.53569484",
"0.5349458",
"0.53365624",
"0.5316805",
"0.53147787",
"0.53087056",
"0.53050786",
"0.5301028",
"0.52970934",
"0.52890146",
"0.5275453",
"0.5275172",
"0.5273245",
"0.5272398",
"0.526144",
"0.5257748",
"0.52509224",
"0.5244111",
"0.5213809",
"0.5212341",
"0.5199633",
"0.51913214",
"0.51868135",
"0.5180537",
"0.5179413",
"0.5175882",
"0.51687115",
"0.51642627",
"0.5157512",
"0.5156133",
"0.51543385",
"0.51337045",
"0.51264846",
"0.512516",
"0.512194",
"0.5121686",
"0.51203793",
"0.5115627",
"0.5115377",
"0.51123685",
"0.51092124",
"0.5106376",
"0.51058686",
"0.510062",
"0.5100451",
"0.50949043",
"0.509265",
"0.50926167",
"0.5088869",
"0.5088295",
"0.50839996",
"0.50803775"
]
| 0.57254684 | 15 |
TODO Autogenerated method stub | @Override
public Client createClient(Client client)
throws RemoteException {
client=clientManager.create(client);
return client;
} | {
"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 |
Table Column and fields description | public interface TorrentFieldInterface extends ProtocolConstants, TorrentConstants {
public static String COLUMN_RES_DESC = "tblTorrentList.columnModel.column.titles";
public static String names[] = {
"№", "Name",
"Size","Progress",
"Status",
"Seed","Leech",
"Dn speep","Up speed",
"Upload"
};
public static final String[] fields = {
FIELD_ID, FIELD_NAME,
FIELD_TOTALSIZE, FIELD_DONEPROGRESS,
FIELD_STATUS,
FIELD_SEEDERS, FIELD_LEECHERS,
FIELD_RATEDOWNLOAD_VIS, FIELD_RATEUPLOAD_VIS,
FIELD_UPLOADEDEVER_VIS
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"FieldDesc getColumnDesc(int i);",
"public TableDataColumn(Creation creation){\r\n\t\tsuper();\r\n\t\tthis.creation = creation;\r\n\t\tattributs.add(new AttributDescribe(false, (\"NAME_COLUMN\"+(getRowCount()+1)), \"VARCHAR2\", \"20\", false, false));\r\n\t}",
"public interface Column{\n\t\tpublic abstract String asc();\n\t\tpublic abstract String desc();\n\t}",
"private String _columnInfo(int i, DBField f, boolean isDefined)\n {\n String ndx = StringTools.format(i,\"00\");\n String name = StringTools.leftAlign(f.getName(),22);\n String desc = isDefined? (\": \" + f.getTitle(null)) : \"\";\n String type = f.getSqlType();\n if (f.isPrimaryKey()) { type += \" key\"; }\n if (f.isAlternateKey()) { type += \" altkey\"; }\n if (f.isAutoIncrement()) { type += \" auto\"; }\n if (f.isUTF8()) { type += \" utf8\"; }\n type = StringTools.leftAlign(type, 32);\n return ndx + \") \" + name + \" \" + type + desc;\n }",
"protected String getTableColumn()\n\t\t{\n\t\t\treturn Column ;\n\t\t}",
"public String getTabledesc() {\n return tabledesc;\n }",
"@Override\r\n\tprotected void createTableColumns(Table table) {\r\n\t\t// 1st column\r\n\t\tTableColumn column = new TableColumn(table, SWT.CENTER, 0);\r\n\t\tcolumn.setText(\"\");\r\n\t\tcolumn.setWidth(25);\r\n\r\n\t\tfor (int i = 1; i < columnNames.length; i++) {\r\n\t\t\t// n-te column with task Description\r\n\t\t\tcolumn = new TableColumn(table, SWT.LEFT, i);\r\n\t\t\tcolumn.setText((String) columnNames[i]);\r\n\t\t\tcolumn.setWidth(140);\r\n\t\t}\r\n\t}",
"@Override\n public ColumnInfo getColumnInfo() {\n return columnInfo;\n }",
"@Override\r\n\tpublic String getType() {\n\t\treturn \"column\";\r\n\t}",
"@Override\n\t\t\tpublic ColumnMetaData getColumnMetaData() {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tthrow new UnsupportedOperationException(\n\t\t\t\t\t\t\"If you want to use val() to create a real\"\n\t\t\t\t\t\t\t\t+ \" column within a tuple, give it a name (i.e. use val(obj, name))!\");\n\t\t\t}",
"private void printColSchema() {\n System.out.print(\"Table Name: \");\n String tableName = sc.nextLine();\n ArrayList<String> result = sqlMngr.colSchema(tableName);\n System.out.println(\"\");\n System.out.println(\"------------\");\n System.out.println(\"Total number of fields: \" + result.size() / 2);\n for (int i = 0; i < result.size(); i += 2) {\n System.out.println(\"-\");\n System.out.println(\"Field Name: \" + result.get(i));\n System.out.println(\"Field Type: \" + result.get(i + 1));\n }\n System.out.println(\"------------\");\n System.out.println(\"\");\n }",
"private String ColumnDefinition(SimpleNode treeRoot) {\n String statement;\n SimpleNode node;\n String nodeType;\n\n String columnName = \"\";\n String columnType = \"\";\n String columnParams = \"\";\n\n for (int i = 0; i < treeRoot.jjtGetNumChildren(); i++) {\n node = ((SimpleNode) treeRoot.jjtGetChild(i));\n nodeType = node.toString();\n if (\"ColumnName\".equals(nodeType)) {\n columnName = node.jjtGetFirstToken().image;\n } else if (\"ColumnDataType\".equals(nodeType)) {\n // check if column is surrogate and if it is, add it to table surrogate columns\n if (node.jjtGetChild(0).toString().equals(\"SurrogateDataType\")) {\n columnType = Settings.SurrogateColumnType;\n _tableInfo.addSurrogate(columnName, 1); // first value will be 1\n } else {\n /*\n\t\t\t\t\t * Data type can consist of more than one token.\n\t\t\t\t\t * Example: NUMBER(6)\n */\n columnType = SimpleNodeCompatibility.getSourceString(node);\n }\n } else if (\"PrimaryKeyInlineConstraint\".equals(nodeType)) {\n // add column to primary key list\n _keys.add(columnName);\n } else {\n /*\n\t\t\t\t * Parameter can consist of more than one token.\n\t\t\t\t * Example: NOT NULL\n */\n columnParams = SimpleNodeCompatibility.getSourceString(node);\n }\n }\n\n statement = columnName + \" \" + columnType + \" \" + columnParams;\n\n return statement;\n }",
"public StrColumn getDetails() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"details\", StrColumn::new) :\n getBinaryColumn(\"details\"));\n }",
"public StrColumn getDetails() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"details\", StrColumn::new) :\n getBinaryColumn(\"details\"));\n }",
"public StrColumn getDetails() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"details\", StrColumn::new) :\n getBinaryColumn(\"details\"));\n }",
"com.google.protobuf.ByteString getColumnBytes();",
"@Override\n public String getName() {\n return columnInfo.getName();\n }",
"public interface Column extends Field {\n\n\t/**\n\t * Get the index of the column within the tabular data set. This is\n\t * always 1 based. If a value of 0 is returned that is interpreted as\n\t * this column does not a fixed position and will be assigned an index.\n\t * \n\t * @return The index.\n\t */\n\tpublic int getIndex();\n\t\n}",
"public interface Table\n extends Tabular\n{\n /** @return the names of the columns in this table or an empty list if no columns have been defined, never null */\n List<String> getColumns();\n\n /**\n * Define the name of a column\n *\n * @param index the position in the header starting with 0\n * @param name the name to be used for this column\n * @return this to allow chaining\n */\n Table setColumn(int index, String name);\n\n /**\n * Determine the name of a column if the position is known.\n *\n * @param index the position in the header starting with 0\n * @return the column name at the given position, null if unknown\n */\n String getColumn(int index);\n\n /**\n * Determine the index of a column if the name is known.\n *\n * @param column the case insensitive name of the respective column\n * @return the index of the column in the headings, -1 if the column is unknown\n */\n int indexOf(String column);\n\n /**\n * Retrieve the value of the given row and column\n *\n * If the row is out of bounds or the column is unknown will simply return <code>null</code> to indicate that no value\n * has been set.\n *\n * @param column the column name in the table\n * @param row the row number in the table starting with 0\n * @return the associated value of that cell, can be null\n */\n\n String getValue(String column, int row);\n\n /**\n * Retrieve the configuration parameters of this table.\n *\n * As there can be many implementations of a table and these implementations are configured in a different manner,\n * this is the place where these parameters can be retrieved in a uniform manner and passed to other layers, e.g. to\n * configure appropriate writers and readers or simply to setup the respective factories.\n *\n * @return the not-null list of (key, value) pairs that configure this particular table\n */\n Map<String, String> getParameters();\n}",
"@Override\r\n\tpublic void buildGridColumnDescription() {\n\r\n\t}",
"java.lang.String getColumn();",
"private CellTable<CQLFunctionArgument> addColumnToTable(CellTable<CQLFunctionArgument> table,\n\t\t\tListHandler<CQLFunctionArgument> sortHandler) {\n\t\tif (table.getColumnCount() != TABLE_ROW_COUNT) {\n\t\t\tcom.google.gwt.user.client.ui.Label searchHeader = new com.google.gwt.user.client.ui.Label(\n\t\t\t\t\t\"Added Arguments List\");\n\t\t\tsearchHeader.getElement().setId(\"searchHeader_Label\");\n\t\t\tsearchHeader.setStyleName(\"measureGroupingTableHeader\");\n\t\t\tsearchHeader.getElement().setAttribute(\"tabIndex\", \"0\");\n\t\t\tcom.google.gwt.dom.client.TableElement elem = table.getElement().cast();\n\t\t\tTableCaptionElement caption = elem.createCaption();\n\t\t\tcaption.appendChild(searchHeader.getElement());\n\t\t\t\n\t\t\tMultiSelectionModel<CQLFunctionArgument> selectionModel = new MultiSelectionModel<CQLFunctionArgument>();\n\t\t\ttable.setSelectionModel(selectionModel);\n\t\t\tColumn<CQLFunctionArgument, SafeHtml> nameColumn = new Column<CQLFunctionArgument, SafeHtml>(\n\t\t\t\t\tnew SafeHtmlCell()) {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic SafeHtml getValue(CQLFunctionArgument object) {\n\t\t\t\t\tStringBuilder title = new StringBuilder();\n\t\t\t\t\tStringBuilder value = new StringBuilder(object.getArgumentName());\n\t\t\t\t\t\n\t\t\t\t\ttitle = title.append(\"Name : \").append(value);\n\t\t\t\t\t/*\n\t\t\t\t\t * return\n\t\t\t\t\t * CellTableUtility.getColumnToolTip(value.toString(),\n\t\t\t\t\t * title.toString());\n\t\t\t\t\t */\n\t\t\t\t\treturn getDataTypeColumnToolTip(value.toString(), title, object.isValid());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t};\n\t\t\ttable.addColumn(nameColumn, SafeHtmlUtils.fromSafeConstant(\"<span title=\\\"Name\\\">\" + \"Name\" + \"</span>\"));\n\t\t\t\n\t\t\tColumn<CQLFunctionArgument, SafeHtml> dataTypeColumn = new Column<CQLFunctionArgument, SafeHtml>(\n\t\t\t\t\tnew SafeHtmlCell()) {\n\t\t\t\t@Override\n\t\t\t\tpublic SafeHtml getValue(CQLFunctionArgument object) {\n\t\t\t\t\tStringBuilder title = new StringBuilder();\n\t\t\t\t\tStringBuilder value = new StringBuilder(object.getArgumentType());\n\t\t\t\t\tif (value.toString().equalsIgnoreCase(CQLWorkSpaceConstants.CQL_MODEL_DATA_TYPE)) {\n\t\t\t\t\t\tvalue = value.append(\":\").append(object.getQdmDataType());\n\t\t\t\t\t\tif (object.getAttributeName() != null) {\n\t\t\t\t\t\t\tvalue = value.append(\".\").append(object.getAttributeName());\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (value.toString().equalsIgnoreCase(CQLWorkSpaceConstants.CQL_OTHER_DATA_TYPE)) {\n\t\t\t\t\t\tvalue = value.append(\":\").append(object.getOtherType());\n\t\t\t\t\t}\n\t\t\t\t\ttitle = title.append(\"Datatype : \").append(value);\n\t\t\t\t\treturn CellTableUtility.getColumnToolTip(value.toString(), title.toString());\n\t\t\t\t}\n\t\t\t};\n\t\t\ttable.addColumn(dataTypeColumn,\n\t\t\t\t\tSafeHtmlUtils.fromSafeConstant(\"<span title=\\\"Datatype\\\">\" + \"Datatype\" + \"</span>\"));\n\t\t\t\n\t\t\tString colName = \"Modify\";\n\t\t\t\n\t\t\t// Modify by Delete Column\n\t\t\ttable.addColumn(\n\t\t\t\t\tnew Column<CQLFunctionArgument, CQLFunctionArgument>(getCompositeCellForQDMModifyAndDelete()) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic CQLFunctionArgument getValue(CQLFunctionArgument object) {\n\t\t\t\t\t\t\treturn object;\n\t\t\t\t\t\t}\n\t\t\t\t\t}, SafeHtmlUtils.fromSafeConstant(\"<span title='\" + colName + \"'> \" + colName + \"</span>\"));\n\t\t\t\n\t\t\ttable.setColumnWidth(0, 25.0, Unit.PCT);\n\t\t\ttable.setColumnWidth(1, 35.0, Unit.PCT);\n\t\t\ttable.setColumnWidth(2, 10.0, Unit.PCT);\n\t\t}\n\t\treturn table;\n\t}",
"public static void printColumnDetails(ColumnMetadata columns)\n {\n writeMessage(\"**** COLUMN:\");\n writeMessage(\" TABLE_CAT: \" + columns.getTableCat());\n writeMessage(\" TABLE_SCHEM: \"\n + columns.getTableSchema());\n writeMessage(\" TABLE_NAME: \" + columns.getTableName());\n writeMessage(\" COLUMN_NAME: \"\n + columns.getColumnName());\n writeMessage(\" DATA_TYPE: \" + columns.getDataType());\n writeMessage(\" TYPE_NAME: \" + columns.getTypeName());\n writeMessage(\" COLUMN_SIZE: \" + columns.getColumnSize());\n writeMessage(\" BUFFER_LENGTH: \"\n + columns.getBufferLength());\n writeMessage(\" DECIMAL_DIGITS: \"\n + columns.getDecimalDigits());\n writeMessage(\" NUM_PREC_RADIX: \"\n + columns.getNumPrecRadix() );\n writeMessage(\" NULLABLE: \" + columns.getNullable());\n writeMessage(\" REMARKS: \" + columns.getRemarks());\n writeMessage(\" COLUMN_DEF: \" + columns.getColumnDefault());\n writeMessage(\" SQL_DATA_TYPE: \"\n + columns.getSqlDataType());\n writeMessage(\" SQL_DATETIME_SUB: \"\n + columns.getSqlDateTimeSub());\n writeMessage(\" CHAR_OCTET_LENGTH: \"\n + columns.getCharOctetLength());\n writeMessage(\" ORDINAL_POSITION: \"\n + columns.getOrdinalPosition());\n writeMessage(\" IS_NULLABLE: \"\n + columns.getIsNullable());\n /*\n writeMessage(\" SCOPE_CATALOG: \"\n + columns.getString(\"SCOPE_CATALOG\"));\n writeMessage(\" SCOPE_SCHEMA: \"\n + columns.getString(\"SCOPE_SCHEMA\"));\n writeMessage(\" SCOPE_TABLE: \"\n + columns.getString(\"SCOPE_TABLE\"));\n writeMessage(\" SOURCE_DATA_TYPE: \"\n + columns.getString(\"SOURCE_DATA_TYPE\"));\n */\n writeMessage(\" IS_AUTOINCREMENT: \"\n + columns.getIsAutoIncrement());\n }",
"public abstract List<ColumnSpecification> metadata();",
"private static TextColumnBuilder getColumnByNameField(String nameField){ \n return drColumns.get(nameField);\n }",
"public interface Columns {\r\n public static final String USERNAME = \"username\";\r\n public static final String EMAIL = \"email\";\r\n public static final String PW = \"password\";\r\n public static final String TIME = \"create_time\";\r\n public static final String AUTHORITY = \"authority_id\";\r\n }",
"Column createColumn();",
"@Override\n public String getLabel() {\n return columnInfo.getLabel();\n }",
"protected boolean getTableDesc()\n\t\t{\n\t\t\treturn Desc ;\n\t\t}",
"public interface Columns {\r\n public static final String LOGIN_ID = \"login_id\";\r\n public static final String PASSWORD = \"password\";\r\n public static final String ADDRESS = \"address\";\r\n public static final String FEE = \"fee\";\r\n public static final String GRACE_PERIOD = \"grace_period\";\r\n public static final String USEREMAIL = \"user_email\";\r\n }",
"java.lang.String getField1002();",
"public String getTableSummary() {\n return \"A summary description of table data\";\n }",
"String getColumnField(String javaField) throws NullPointerException;",
"public interface BlogColumns {\n\n /**\n * Url of the blog\n * <P>Type: TEXT</P>\n */\n String URL = \"url\";\n\n /**\n * Admin user name\n * <P>Type: TEXT</P>\n */\n String USER = \"user\";\n\n /**\n * Admin password\n * <P>Type: TEXT</P>\n */\n String PASS = \"pass\";\n }",
"public String getColumnName();",
"@Override\n\tpublic void getFields(List<String> table) {\n\t\t\n\t}",
"private String getAllColumnName() {\n\t\t\n\t\tStringBuilder builder = new StringBuilder();\n\t\t// .append(COLUMN_id).append(\"=?,\").\n\t\tbuilder.append(\"user_id\").append(\"=?,\");\n\t\tbuilder.append(\"lib_book_id\").append(\"=?,\");\n\t\tbuilder.append(\"lending_date\").append(\"=?,\");\n\t\tbuilder.append(\"return_date\").append(\"=?,\");\n\t\tbuilder.append(\"returned_date\").append(\"=?,\");\n\t\tbuilder.append(\"status\").append(\"=?\");\n\t\t\n\t\treturn builder.toString();\n\t}",
"@Override\r\n public String getColumnName(int col) {\r\n return title[col];\r\n }",
"public interface TableMetaData {\n\n\t/** Adds normal column. */\n\tpublic void addColumn(final ColumnMetaData column);\n\n\t/** Adds primary key column. */\n\tpublic void addPrimaryKey(final ColumnMetaData column);\n\n\t/** Returns map of column meta data, keyed by the column label (the alias if provided in the query, otherwise the name). */\n\tpublic Map<String, ColumnMetaData> getColumns();\n\n\t/** Returns database name. */\n\tpublic String getDatabaseName();\n\n\t/** Returns ordered list of columns that are primary keys. */\n\tpublic List<ColumnMetaData> getPrimaryKeys();\n\n\t/**\n\t * Returns fully qualified table name in database-specific form for use in SQL statements. MySQL uses the form\n\t * <code>database.table</code>, for example <code>sakila.film</code>. PostgreSQL uses the form\n\t * <code>database.schema.table</code>, for example <code>sakila.public.film</code>.\n\t */\n\tpublic String getQualifiedTableName();\n\n\t/** Returns row alias. */\n\tpublic String getRowAlias();\n\t\n\t/** Returns row set alias. */\n\tpublic String getRowSetAlias();\n\t\n\t/**\n\t * Returns row alias.\n\t * \n * @deprecated As of 0.8.11 use {@link #getRowAlias()}\n\t */\n\t@Deprecated\n\tpublic String getTableAlias();\n\n\t/** Returns table name. */\n\tpublic String getTableName();\n\n\t/** Returns role of table in the SQL Resource. */\n\tpublic TableRole getTableRole();\n\n\t/** Returns true if the SQL Resource role is child. */\n\tpublic boolean isChild();\n\n\t/** Returns true if the SQL Resource role is parent. */\n\tpublic boolean isParent();\n\n\t/** Sets all the row and row set aliases. */\n\tpublic void setAliases(final String alias, final String rowAlias, final String rowSetAlias);\n\n\t/** Sets attributes. */\n\tpublic void setAttributes(final String tableName, final String qualifedTableName,\n\t\t\tfinal String databaseName, final TableRole tableRole);\n\n\t/**\n\t * Sets table alias.\n\t * \n * @deprecated As of 0.8.11 use {@link #setAliases(String, String, String)}\n\t */\n\t@Deprecated\n\tpublic void setTableAlias(final String tableAlias);\n\t\n\t/** Represents all of the roles a table may plan in a SQL Resource. */\n\t@XmlType(namespace = \"http://restsql.org/schema\")\n\tpublic enum TableRole {\n\t\tChild, ChildExtension, Join, Parent, ParentExtension, Unknown;\n\t}\n}",
"private void initColumns() {\n columnNames = new LinkedList<String>();\n columnNames.add(\"table.ededb.datatable.action\");\n columnNames.add(\"table.ededb.datatable.filename\");\n columnNames.add(\"table.ededb.datatable.mime\");\n columnNames.add(\"table.ededb.datatable.size\");\n columnNames.add(\"table.ededb.datatable.localcopy\");\n }",
"public interface TableDefinition extends BaseColumns {\n\n String tableName();\n\n String createStatement();\n\n String dropStatement();\n \n}",
"public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }",
"public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }",
"public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }",
"public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }",
"public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }",
"public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }",
"public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }",
"public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }",
"public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }",
"public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }",
"public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }",
"@Override\n public String toString() {\n String details = \"\";\n\n if (this.columnType.getValue() != ColumnType._ANY) {\n details += \" typu '\" + this.columnType.getValue().toString() + \"'\";\n }\n if (!this.columnName.getValue().isEmpty()) {\n details += \" s názvem '\" + this.columnName.getValue() + \"'\";\n }\n if (this.columnIsPrimary.getValue() != YesNoType._ANY) {\n details += \", které \" + (this.columnIsPrimary.getValue() == YesNoType.YES ? \"jsou\" : \"nejsou\") + \" primárním klíčem,\";\n }\n\n return \"Počet sloupců\" + details + \" v každé tabulce \" + this.countOp.getValue() + \" \" + this.count.getValue();\n }",
"public String getEmphcolumn()\n {\n return emphColumn;\n }",
"String getColumnName();",
"public StrColumn getDetails() {\n return delegate.getColumn(\"details\", DelegatingStrColumn::new);\n }",
"public StrColumn getDetails() {\n return delegate.getColumn(\"details\", DelegatingStrColumn::new);\n }",
"public StrColumn getDetails() {\n return delegate.getColumn(\"details\", DelegatingStrColumn::new);\n }",
"public StrColumn getDetails() {\n return delegate.getColumn(\"details\", DelegatingStrColumn::new);\n }",
"@Override\n\tpublic String[] getTableColumns() {\n\t\treturn null;\n\t}",
"Table getTable();",
"@Override\n public List<String> getColumnLabels() {\n return columns;\n }",
"public interface DatabaseColumns extends BaseColumns {\n String CANDIDATES = \"Candidates\";\n String NAME = \"CandidateName\";\n String NUMBER = \"VotesNumber\";\n}",
"Col createCol();",
"@Override // a2.j.d.c.y3, com.google.common.collect.Table\n public /* bridge */ /* synthetic */ Map column(Object obj) {\n return super.column(obj);\n }",
"public void fetColumnList() {\n try {\n table.getColumns().clear();\n if (rsAllEntries != null) {\n //SQL FOR SELECTING ALL OF CUSTOMER\n for (int i = 0; i < rsAllEntries.getMetaData().getColumnCount(); i++) {\n //We are using non property style for making dynamic table\n final int j = i;\n TableColumn col = new TableColumn();\n switch (rsAllEntries.getMetaData().getColumnName(i + 1)) {\n case \"order_number\":\n col.setText(\"Order Number\");\n break;\n case \"product_type\":\n col.setText(\"Produt Type\");\n break;\n case \"worker\":\n col.setText(\"Worker\");\n break;\n case \"planned_time\":\n col.setText(\"Planned Time\");\n break;\n case \"actual_time\":\n col.setText(\"Actual Time\");\n break;\n case \"order_status\":\n col.setText(\"Order Status\");\n break;\n default:\n col.setText(rsAllEntries.getMetaData().getColumnName(i + 1)); //if column name in SQL Database is not found, then TableView column receive SQL Database current column name (not readable)\n break;\n }\n\n col.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<ObservableList, String>, ObservableValue<String>>() {\n public ObservableValue<String> call(TableColumn.CellDataFeatures<ObservableList, String> param) {\n return new SimpleStringProperty(param.getValue().get(j).toString());\n }\n });\n\n table.getColumns().removeAll(col);\n table.getColumns().addAll(col);\n }\n } else {\n warning.setText(\"No columns to display\");\n }\n } catch (SQLException e) {\n System.out.println(\"Failure getting column data from SQL \");\n }\n }",
"public StrColumn getRevisionDescription() {\n return delegate.getColumn(\"revision_description\", DelegatingStrColumn::new);\n }",
"java.lang.String getField1064();",
"public static Object[] getColumnNames()\n\t{\n\t\treturn new Object[]{\"id\", \"name\", \"price\", \"onSale\"};\n\t}",
"public abstract int getColumn();",
"com.google.protobuf.ByteString\n getColumnBytes();",
"Column baseColumn();",
"public Table() {\n this.tableName = \"\";\n this.rows = new HashSet<>();\n this.columnsDefinedOrder = new ArrayList<>();\n }",
"SqlColumns(String columnName){\n\t\t\t this.columnName = columnName; \n\t\t}",
"private void addColumnDetails()\n {\n Vector cols = m_recProf.getColumnProfiles();\n for (int i = 0 ; i < cols.size() ; i++)\n {\n ColumnProfile c = (ColumnProfile)cols.elementAt(i);\n addColumnDetail(c, i);\n }\n }",
"@Override\n public String getColumnName(int iCol) {\n return ARR_STR_HEADERS[iCol];\n }",
"public String desc() {\n return this.column + \" DESC\";\n }",
"public String desc() {\n return this.column + \" DESC\";\n }",
"public String toString()\n\t{\n\t\tif (SanityManager.DEBUG)\n\t\t{\n\t\t\treturn \"columnName: \" + columnName + \"\\n\" +\n\t\t\t\t\"defaultText: \" + defaultText + \"\\n\" +\n\t\t\t\tsuper.toString();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t}",
"@Override\r\n\tpublic final String getColumnDescription(int id) {\r\n\t\tString code = null;\r\n\t\tswitch (id) {\r\n\t\tcase COLUMN_VHMNAME:\r\n\t\t\tcode = \"config.domain\";\r\n\t\t\tbreak;\r\n\t\tcase COLUMN_TOMAIL1:\r\n\t\t\tcode = \"admin.emailNotify.toEmail1\";\r\n\t\t\tbreak;\r\n\t\tcase COLUMN_TOMAIL2:\r\n\t\t\tcode = \"admin.emailNotify.toEmail2\";\r\n\t\t\tbreak;\r\n\t\tcase COLUMN_TOMAIL3:\r\n\t\t\tcode = \"admin.emailNotify.toEmail3\";\r\n\t\t\tbreak;\r\n\t\tcase COLUMN_TOMAIL4:\r\n\t\t\tcode = \"admin.emailNotify.toEmail4\";\r\n\t\t\tbreak;\r\n\t\tcase COLUMN_TOMAIL5:\r\n\t\t\tcode = \"admin.emailNotify.toEmail5\";\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn MgrUtil.getUserMessage(code);\r\n\t}",
"@Override\n protected List<IColumn<PrismContainerValueWrapper<AssignmentType>, String>> initBasicColumns() {\n List<IColumn<PrismContainerValueWrapper<AssignmentType>, String>> columns = new ArrayList<>();\n\n columns.add(new IconColumn<PrismContainerValueWrapper<AssignmentType>>(Model.of(\"\")) {\n\n private static final long serialVersionUID = 1L;\n\n @Override\n protected DisplayType getIconDisplayType(IModel<PrismContainerValueWrapper<AssignmentType>> rowModel) {\n return WebComponentUtil.createDisplayType(WebComponentUtil.createDefaultBlackIcon(\n AssignmentsUtil.getTargetType(rowModel.getObject().getRealValue())));\n }\n\n });\n\n columns.add(new AbstractColumn<PrismContainerValueWrapper<AssignmentType>, String>(createStringResource(\"PolicyRulesPanel.nameColumn\")){\n private static final long serialVersionUID = 1L;\n\n @Override\n public void populateItem(Item<ICellPopulator<PrismContainerValueWrapper<AssignmentType>>> cellItem,\n String componentId, final IModel<PrismContainerValueWrapper<AssignmentType>> rowModel) {\n String name = AssignmentsUtil.getName(rowModel.getObject(), getParentPage());\n if (StringUtils.isBlank(name)) {\n name = createStringResource(\"AssignmentPanel.noName\").getString();\n }\n cellItem.add(new Label(componentId, Model.of(name)));\n }\n });\n return columns;\n }",
"public abstract void newColumn();",
"@SuppressWarnings({ \"unchecked\", \"null\" })\n public static void createTableDefinition() throws Exception{\n\n if(OBJECT.isAnnotationPresent(Table.class)){\n Annotation annotation = OBJECT.getAnnotation(Table.class);\n Method method = annotation.getClass().getMethod(\"name\");\n Object object = method.invoke(annotation);\n\n TABLE_NAME = object.toString().toUpperCase();\n\n CREATE_STATEMENT = new StringBuilder();\n FOREIGN_KEY = new StringBuilder();\n COLUMNS = new StringBuilder();\n LIST_FIELD_MODEL = new ArrayList<FieldModel>();\n\n }else{\n CREATE_STATEMENT = null;\n throw new Exception(\"Annotation @Table not declared in class \"+OBJECT.getSimpleName());\n }\n\n\n FIELD_DEFINITION = OBJECT.getDeclaredFields();\n\n ARRAY_COLUMNS = new String[FIELD_DEFINITION.length];\n\n for (int i = 0; i < FIELD_DEFINITION.length ; i++){\n Field field = FIELD_DEFINITION[i];\n Annotation annotation = null;\n Method methodName = null;\n Method methodSize = null;\n Object objectName = null;\n Object sizeField = null;\n String type;\n String primaryKeyText = \"\";\n\n\n if(field.isAnnotationPresent(Column.class)){\n annotation = field.getAnnotation(Column.class);\n methodName = annotation.getClass().getMethod(\"name\");\n methodSize = annotation.getClass().getMethod(\"size\");\n sizeField = methodSize.invoke(annotation);\n objectName = methodName.invoke(annotation);\n if(objectName == null || objectName.toString() == \"\"){\n objectName = field.getName();\n }\n\n\n }else{\n CREATE_STATEMENT = null;\n throw new Exception(\"Annotation @Column not declared in the field --> \"+field.getName());\n }\n\n if(field.isAnnotationPresent(PrimaryKey.class)){\n PK = objectName.toString();\n\n Annotation pKey_annotation = field.getAnnotation(PrimaryKey.class);\n Method pkey_methodAutoIncrement = pKey_annotation.getClass().getMethod(\"autoIncrement\");\n Object pkey_autoIncrement = pkey_methodAutoIncrement.invoke(pKey_annotation);\n\n primaryKeyText = \" PRIMARY KEY \";\n\n if(Boolean.valueOf(pkey_autoIncrement.toString())){\n primaryKeyText = primaryKeyText + \" AUTOINCREMENT \";\n }\n\n }\n if(field.isAnnotationPresent(Codigo.class)){\n setCOD(objectName.toString());\n }\n if(field.isAnnotationPresent(ForeignKey.class)){\n Annotation fkey_annotation = field.getAnnotation(ForeignKey.class);\n Method fkey_methodTableReference = fkey_annotation.getClass().getMethod(\"tableReference\");\n Object fkey_tableReferenceName = fkey_methodTableReference.invoke(fkey_annotation);\n\n Method fkey_methodOnUpCascade = fkey_annotation.getClass().getMethod(\"onUpdateCascade\");\n Object fkey_OnUpCascadeValue = fkey_methodOnUpCascade.invoke(fkey_annotation);\n\n Method fkey_methodOnDelCascade = fkey_annotation.getClass().getMethod(\"onDeleteCascade\");\n Object fkey_OnDelCascadeValue = fkey_methodOnDelCascade.invoke(fkey_annotation);\n\n Method fkey_methodColumnReference = fkey_annotation.getClass().getMethod(\"columnReference\");\n Object fkey_columnReference = fkey_methodColumnReference.invoke(fkey_annotation);\n\n String columnReference = fkey_columnReference.toString();\n if(columnReference == \"\"){\n columnReference = \"_id\";\n }\n\n FOREIGN_KEY.append(\", FOREIGN KEY (\"+objectName.toString()+\") REFERENCES \"+fkey_tableReferenceName.toString().toUpperCase()+\" (\"+columnReference+\")\");\n\n if(Boolean.valueOf(fkey_OnUpCascadeValue.toString())){\n FOREIGN_KEY.append(\" ON UPDATE CASCADE \");\n }\n if(Boolean.valueOf(fkey_OnDelCascadeValue.toString())){\n FOREIGN_KEY.append(\" ON DELETE CASCADE \");\n }\n\n\n }\n\n\n if(field.getType() == int.class || field.getType() == Integer.class || field.getType() == Long.class || field.getType() == long.class){\n type = \" INTEGER \";\n }else\tif(field.getType() == String.class || field.getType() == char.class ){\n type = \" TEXT \";\n }else\tif(field.getType() == Double.class || field.getType() == Float.class || field.getType() == double.class){\n type = \" REAL \";\n }else if(field.getType() == BigDecimal.class){\n type = \" REAL \";\n }else if(field.getType() == Date.class){\n type = \" TIMESTAMP \";\n }\n else if(field.getType() == java.sql.Timestamp.class){\n type = \" TIMESTAMP \";\n }else if(field.getType() == Boolean.class || field.getType() == boolean.class){\n type = \" BOOLEAN \";\n }else{\n type = \" NONE \";\n }\n if(!sizeField.equals(\"\") ){\n type = type+\"(\"+sizeField.toString()+\") \";\n setSIZE(Integer.parseInt(sizeField.toString()));\n }\n // Log.d(\"afalOG\", \"TAMANHO\" + type+sizeField.toString());\n if(i == FIELD_DEFINITION.length-1){\n if(objectName != null){\n CREATE_STATEMENT.append(objectName.toString()+\" \"+type+primaryKeyText);\n COLUMNS.append(objectName.toString());\n }else{\n CREATE_STATEMENT = null;\n throw new Exception(\"Property 'name' not declared in the field --> \"+field.getName());\n }\n }else{\n if(objectName != null){\n CREATE_STATEMENT.append(objectName.toString()+\" \"+type+primaryKeyText+\", \");\n COLUMNS.append(objectName.toString()+\" , \");\n }else{\n CREATE_STATEMENT = null;\n throw new Exception(\"Property 'name' not declared in the field --> \"+field.getName());\n }\n }\n ARRAY_COLUMNS[i] = objectName.toString();\n if(! primaryKeyText.contains(\"AUTOINCREMENT\")){\n FieldModel fieldModel = new FieldModel();\n fieldModel.setColumnName(objectName.toString());\n fieldModel.setFieldName(field.getName());\n LIST_FIELD_MODEL.add(fieldModel);\n }\n }\n\n if(FOREIGN_KEY.toString() != \"\"){\n CREATE_STATEMENT.append(FOREIGN_KEY);\n }\n CREATE_STATEMENT.append(\");\");\n\n\n if(getPK() == \"\"){\n StringBuilder sb = new StringBuilder();\n sb.append(\"CREATE TABLE \" + TABLE_NAME + \" (\");\n sb.append(BaseColumns._ID +\" INTEGER PRIMARY KEY AUTOINCREMENT, \" );\n sb.append(CREATE_STATEMENT);\n\n String[] columns = new String[ARRAY_COLUMNS.length+1];\n columns[0] = BaseColumns._ID;\n for(int i = 0; i < ARRAY_COLUMNS.length; i++){\n columns[i+1] = ARRAY_COLUMNS[i];\n }\n\n ARRAY_COLUMNS = columns;\n\n CREATE_STATEMENT = sb;\n }else{\n StringBuilder sb = new StringBuilder();\n sb.append(\"CREATE TABLE \" + TABLE_NAME + \" (\");\n sb.append(CREATE_STATEMENT);\n\n CREATE_STATEMENT = sb;\n }\n }",
"@Override\n public void addTableColumn(final Connection _con,\n final String _tableName,\n final String _columnName,\n final ColumnType _columnType,\n final String _defaultValue,\n final int _length,\n final int _scale,\n final boolean _isNotNull)\n throws SQLException {\n\n String defaultValue = _defaultValue;\n\n if (_isNotNull && (defaultValue == null)) {\n switch (_columnType) {\n case INTEGER:\n case REAL:\n defaultValue = \"0\";\n break;\n case DATETIME:\n case STRING_LONG:\n case STRING_SHORT:\n defaultValue = \"''\";\n break;\n }\n }\n\n super.addTableColumn(_con, _tableName, _columnName, _columnType,\n defaultValue, _length, _scale, _isNotNull);\n }",
"Column getCol();",
"java.lang.String getField1016();",
"private JComponent createInfoTable() {\r\n\t\tm_model = new JETATableModel();\r\n\r\n\t\tString[] names = new String[2];\r\n\t\tnames[0] = I18N.getLocalizedMessage(\"Property\");\r\n\t\tnames[1] = I18N.getLocalizedMessage(\"Value\");\r\n\t\tm_model.setColumnNames(names);\r\n\r\n\t\tClass[] coltypes = new Class[2];\r\n\t\tcoltypes[0] = String.class;\r\n\t\tcoltypes[1] = String.class;\r\n\t\tm_model.setColumnTypes(coltypes);\r\n\r\n\t\treturn new javax.swing.JScrollPane(TableUtils.createBasicTablePanel(m_model, true));\r\n\t}",
"String getColumn();",
"protected void setDescriptionColumn(SQLUpdatableStatementIfc sql,\n OrderTransactionIfc orderTransaction)\n { // begin setDescriptionColumn()\n String description = null;\n AbstractTransactionLineItemIfc[] lineItems =\n orderTransaction.getLineItems();\n if (lineItems.length > 0)\n {\n description = lineItems[0].getItemDescription(LocaleMap.getLocale(LocaleMap.DEFAULT));\n }\n\n if (!Util.isEmpty(description))\n {\n sql.addColumn(ARTSDatabaseIfc.FIELD_ORDER_DESCRIPTION,\n makeSafeString(description));\n }\n\n }",
"boolean isNeedColumnInfo();",
"public String getAddColumnString() {\n \t\tthrow new UnsupportedOperationException( \"No add column syntax supported by \" + getClass().getName() );\n \t}",
"public String getFieldDescription()\n {\n return m_strDescription;\n }",
"ColumnInfoTransformer getColumnInfoTransformer();",
"public AllTablesHaveColumnsRule() {\n super();\n\n this.countOp = this.addProperty(new ChoiceProperty<>(\n \"count_op\",\n ComparisonOperator.class, ComparisonOperator.GTE, ComparisonOperator.getChoices(),\n \"Počet sloupců\", \"Operátor pro ověření počtu řádků v tabulkách\", this.getGenericLabel()\n ));\n this.count = this.addProperty(new Property<>(\n \"count\",\n Integer.class, 1,\n \"...\", \"Všechny tabulky v databázi musí obsahovat zadaný počet sloupců\", this.getGenericLabel()\n ));\n\n this.columnType = this.addProperty(new ChoiceProperty<>(\n \"column_type\",\n ColumnType.class, ColumnType._ANY, ColumnType.getChoices(),\n \"Typ sloupce\", \"Ověří, zda v tabulce existuje sloupec daného typu a názvu\", this.getGenericLabel()\n ));\n this.columnName = this.addProperty(new Property<>(\n \"column_name\",\n String.class, \"\",\n \"Název sloupce\", \"Ověří, zda v tabulce existuje sloupec daného typu a názvu\", this.getGenericLabel()\n ));\n this.columnIsPrimary = this.addProperty(new ChoiceProperty<>(\n \"column_primary\",\n YesNoType.class, YesNoType._ANY, YesNoType.getChoices(),\n \"Primární klíč\", \"Ověří, zda je sloupec součástí primárního klíče\", this.getGenericLabel()\n ));\n }",
"@Override\n\tprotected String getColumn()\n\t{\n\t\treturn null;\n\t}",
"public String getFieldColumn() {\n return fieldColumn;\n }",
"public CellTable<Attribute> getTable() {\n\n\t\tretrieveData();\n\n\t\t// Table data provider.\n\t\tdataProvider = new ListDataProvider<Attribute>(list);\n\n\t\t// Cell table\n\t\ttable = new PerunTable<Attribute>(list);\n\n\t\t// Connect the table to the data provider.\n\t\tdataProvider.addDataDisplay(table);\n\n\t\t// Sorting\n\t\tListHandler<Attribute> columnSortHandler = new ListHandler<Attribute>(dataProvider.getList());\n\t\ttable.addColumnSortHandler(columnSortHandler);\n\n\t\t// set empty content & loader\n\t\ttable.setEmptyTableWidget(loaderImage);\n\n\t\t// checkbox column column\n\t\tif (checkable) {\n\t\t\t// table selection\n\t\t\ttable.setSelectionModel(selectionModel, DefaultSelectionEventManager.<Attribute> createCheckboxManager(0));\n\t\t\ttable.addCheckBoxColumn();\n\t\t}\n\n\t\t// Create ID column.\n\t\ttable.addIdColumn(\"Attr ID\", null, 90);\n\n\t\t// Name column\n\t\tColumn<Attribute, Attribute> nameColumn = JsonUtils.addColumn(new PerunAttributeNameCell());\n\n\t\t// Description column\n\t\tColumn<Attribute, Attribute> descriptionColumn = JsonUtils.addColumn(new PerunAttributeDescriptionCell());\n\n\t\t// Value column\n\t\tColumn<Attribute, Attribute> valueColumn = JsonUtils.addColumn(new PerunAttributeValueCell());\n\t\tvalueColumn.setFieldUpdater(new FieldUpdater<Attribute, Attribute>() {\n\t\t\tpublic void update(int index, Attribute object, Attribute value) {\n\t\t\t\tobject = value;\n\t\t\t\tselectionModel.setSelected(object, object.isAttributeValid());\n\t\t\t}\n\t\t});\n\n\t\t// updates the columns size\n\t\tthis.table.setColumnWidth(nameColumn, 200.0, Unit.PX);\n\n\t\t// Sorting name column\n\t\tnameColumn.setSortable(true);\n\t\tcolumnSortHandler.setComparator(nameColumn, new AttributeComparator<Attribute>(AttributeComparator.Column.TRANSLATED_NAME));\n\n\t\t// Sorting description column\n\t\tdescriptionColumn.setSortable(true);\n\t\tcolumnSortHandler.setComparator(descriptionColumn, new AttributeComparator<Attribute>(AttributeComparator.Column.TRANSLATED_DESCRIPTION));\n\n\t\t// Add sorting\n\t\tthis.table.addColumnSortHandler(columnSortHandler);\n\n\t\t// Add the columns.\n\t\tthis.table.addColumn(nameColumn, \"Name\");\n\t\tthis.table.addColumn(valueColumn, \"Value\");\n\t\tthis.table.addColumn(descriptionColumn, \"Description\");\n\n\t\treturn table;\n\n\t}",
"public void creatTable(String tableName,LinkedList<String> columnsName,LinkedList<String> columnsType );",
"public int getColumn(){\n return this.column;\n }",
"public void setDescription(ArrayList descriptionColumn) {\n ArrayList<String> descriptionArray = new ArrayList<String>();\n this.descriptionArray = descriptionColumn;\n }",
"@Override\r\n\tprotected String getTable() {\n\t\treturn TABLE;\r\n\t}"
]
| [
"0.7076007",
"0.6989467",
"0.6911733",
"0.6820711",
"0.67792666",
"0.6599976",
"0.6561488",
"0.6470061",
"0.6451229",
"0.6387135",
"0.63812804",
"0.6348178",
"0.6330351",
"0.6330351",
"0.6330351",
"0.62774986",
"0.62704057",
"0.62694645",
"0.6263221",
"0.6249448",
"0.62161356",
"0.62119937",
"0.62052214",
"0.6203869",
"0.6197126",
"0.61921424",
"0.61907125",
"0.61848223",
"0.61800647",
"0.6178364",
"0.61609244",
"0.61589843",
"0.61558425",
"0.6147171",
"0.61434186",
"0.6137082",
"0.61031914",
"0.60998344",
"0.6096853",
"0.60787123",
"0.6075366",
"0.6070059",
"0.6070059",
"0.6070059",
"0.6070059",
"0.6070059",
"0.6070059",
"0.6070059",
"0.6070059",
"0.6070059",
"0.6070059",
"0.6070059",
"0.60665375",
"0.6066238",
"0.6056987",
"0.6042405",
"0.6042405",
"0.6042405",
"0.6042405",
"0.60258865",
"0.6021855",
"0.60208166",
"0.6005628",
"0.5988434",
"0.59699726",
"0.596502",
"0.5963406",
"0.5960657",
"0.59604573",
"0.5953477",
"0.595014",
"0.5942391",
"0.5940582",
"0.5939454",
"0.59280455",
"0.59269434",
"0.59233254",
"0.59233254",
"0.59193665",
"0.5916364",
"0.59162396",
"0.5913254",
"0.5913197",
"0.5908724",
"0.5905213",
"0.58973145",
"0.5895973",
"0.58776915",
"0.58702594",
"0.58669436",
"0.5864097",
"0.5863541",
"0.5860508",
"0.58595264",
"0.58586556",
"0.5858011",
"0.58551955",
"0.58506554",
"0.58498204",
"0.5841703",
"0.5839707"
]
| 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.