query
stringlengths 8
1.54M
| document
stringlengths 9
312k
| negatives
sequencelengths 19
20
| metadata
dict |
---|---|---|---|
Create a probability vector for multinomial distribution creates a symmetry around zero by construction | private double [] uniformDiscreteProbs(int numStates)
{
double [] uniformProbs = new double[2 * numStates];
for(int i = 0; i < 2 * numStates; i++)
uniformProbs[i] = (1.0 / (2 * numStates));
return uniformProbs;
} | [
"private void initializeProbabilityVector(MatrixLib p) {\n double sum = 0.0;\n for (int i = 0; i < p.numRows(); i++) {\n double ele = p.elementAt(i, 0);\n if (ele < 0) {\n throw new IllegalArgumentException(\"Probability \" + ele\n + \" for element \" + i + \" is negative.\");\n }\n sum += ele;\n }\n if (sum < 1e-9) {\n throw new IllegalArgumentException(\"Probabilities sum to approx zero\");\n }\n this.k = p.numRows();\n this.p = new double[k];\n this.pCDF = new double[k];\n this.p[0] = p.elementAt(0, 0) / sum;\n this.pCDF[0] = this.p[0];\n for (int i = 1; i < p.numRows(); i++) {\n this.p[i] = p.elementAt(i, 0) / sum;\n this.pCDF[i] = pCDF[i - 1] + this.p[i];\n }\n }",
"public void testMultinomialSeeding () {\n \n try {\n // first set up a vector of probabilities\n int len = 100;\n SparseDoubleVector probs = new SparseDoubleVector (len, 0.0);\n for (int i = 0; i < len; i += 2) {\n probs.setItem (i, i); \n }\n probs.normalize ();\n \n // now, set up a distribution\n IRandomGenerationAlgorithm<IDoubleVector> myRNG1 = new Multinomial (27, new MultinomialParam (1024, probs));\n IRandomGenerationAlgorithm<IDoubleVector> myRNG2 = new Multinomial (2777, new MultinomialParam (1024, probs));\n \n // and check the mean...\n DenseDoubleVector expectedMean = new DenseDoubleVector (len, 0.0);\n for (int i = 0; i < len; i++) {\n expectedMean.setItem (i, probs.getItem (i) * 1024);\n }\n \n double res1 = computeDiffFromMean (myRNG1, expectedMean, 500);\n double res2 = computeDiffFromMean (myRNG2, expectedMean, 500);\n \n assertTrue (\"Failed check for multinomial seeding\", Math.abs (res1 - res2) > 10e-10);\n \n } catch (Exception e) {\n fail (\"Got some sort of exception when I was testing the multinomial.\"); \n }\n \n }",
"public MultinomialDistribution(int size) {\n\t\tsuper(size);\n\t\tvector = LinearVectorFactory.getVector(this.size);\n\t\tsum = 0;\n\t}",
"public MultinomialRV(int n, double[] p)\n {\n this.n = n;\n this.p = new double[p.length];\n for (int i=0; i<p.length; i++)\n this.p[i] = p[i];\n }",
"public ProbabilityDistribution() {\n\t\trandom_ = new Random();\n\t\titemProbs_ = new MutableKeyMap<T, Double>();\n\t}",
"public BernoulliDistribution(){\n\t\tthis(0.5);\n\t}",
"public BernoulliDistribution(double p){\n\t\tsuper(1, p);\n\t}",
"public Vector defaultProbabilities(Vector v) {\n\t\tint i = v.size();\n\n\t\tVector vector = new Vector();\n\t\tint count = vector.size();\n\t\twhile (count < i) {\n\t\t\tvector.addElement(new java.lang.Double(DFL_VAL_PROBABILITY));\n\t\t\tcount = vector.size();\n\t\t}\n\t\treturn vector;\n\t}",
"public static float[] getBinomialKernelSigmaZeroPointFive() {\n //1 -1 norm=0.5\n return new float[]{0.5f, 0.0f, -0.5f};\n }",
"public LogNormalDistribution(){\n\t\tthis(0, 1);\n\t}",
"private void setMultinomial(Node huginVar) throws ExceptionHugin {\n int indexNode = this.huginBN.getNodes().indexOf(huginVar);\n Variable amidstVar = this.amidstBN.getVariables().getVariableById(indexNode);\n int numStates = amidstVar.getNumberOfStates();\n\n double[] huginProbabilities = huginVar.getTable().getData();\n double[] amidstProbabilities = new double[numStates];\n for (int k = 0; k < numStates; k++) {\n amidstProbabilities[k] = huginProbabilities[k];\n }\n Multinomial dist = this.amidstBN.getConditionalDistribution(amidstVar);\n dist.setProbabilities(amidstProbabilities);\n }",
"public Monom(){\r\n\t\tthis.set_coefficient(0);\r\n\t\tthis.set_power(0);\r\n\t}",
"private double[] getPseudoRandomProportionalProbabilities(){\n double probabilities[] = new double[nodesToVisit.length];\n double actionChoiceSum = acs.getActionChoiceSum(getCurrentNode(), nodesToVisit);\n\n for(int i = 0; i <= probabilities.length - 1; i++){\n if(nodesToVisit[i] != null){\n probabilities[i] = acs.getActionChoice(getCurrentNode(), nodesToVisit[i]) / actionChoiceSum;\n }\n else{\n probabilities[i] = 0;\n }\n }\n\n return probabilities;\n }",
"@Test\n public void testP() {\n System.out.println(\"p\");\n NegativeBinomialDistribution instance = new NegativeBinomialDistribution(3, 0.3);\n instance.rand();\n assertEquals(0.027, instance.p(0), 1E-7);\n assertEquals(0.0567, instance.p(1), 1E-7);\n assertEquals(0.07938, instance.p(2), 1E-7);\n assertEquals(0.09261, instance.p(3), 1E-7);\n assertEquals(0.05033709, instance.p(10), 1E-7);\n }",
"public static double probability(int item, double[] output) {\n\t\tdouble sum = 0;\n\t\tfor (int i = 0; i < output.length; i++)\n\t\t\tsum+=output[i];\n\t\treturn output[item]/sum;\n\t}",
"public double inverse(double probability) {\r\n if (probability <= 0.0) {\r\n return 0.0; // < 0 is not entirely correct (TODO)\r\n }\r\n if (probability >= 1.0) {\r\n return Double.MAX_VALUE; // > 1 is not entirely correct (TODO)\r\n }\r\n return scale_lambda * Math.pow(-Math.log1p(-probability), inverse_shape);\r\n }",
"public NormalRandomVectorGenerator(){\n\t\t_RVG = new NormalRandomVariableGenerator();\n\t}",
"public void setProbability(double v) {\n probability = v;\n }",
"public Polynomial(ArrayList<Monomial> m){\n monos = new ArrayList<>();\n for (Monomial term: m){\n monos.add(term);\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is an abstract method where vehicle picks a service bay from the end of the list. | @Override
public void pickServiceBay(Garage garage) throws NoAvailableBayException {
int i = garage.getSize() - 1;
for (; i >= 0; i--) {
ServiceBay sb = garage.getBayAt(i);
try {
sb.occupy(this);
break;
} catch (BayOccupiedException e) {
// skip this line.
} catch (BayCarMismatchException e) {
// skip this line.
}
}
if (i == -1) {
throw new NoAvailableBayException();
}
} | [
"public synchronized void take(Station s, Bicycle b, Bank_Card bank_card) throws Exception{\r\n\t\tif(!s.equals(this.last_routine.getSource())){System.out.println(\"CHOOSE THE STATION OF YOUR ROUTINE\");throw new Exception(\"WRONG STATION\");}\r\n\t\tif(this.bicycle!=null){System.out.println(\"Already Got a Bicycle\");throw new Exception(\"ALREADY GOT A BIKE\");}\r\n\t\ts.remove_user(this);\r\n\t\tif(!s.isState()){System.out.println(\"offline - out of order!\");throw new Exception(\"OFFLINE\");}\r\n\t\tthis.setPosition(s.getPosition());\r\n\t\tif(b instanceof Bicycle_Mech){\r\n\t\t\tif(s.count_mech() == 0){System.out.println(\"no more mech bicycles available\");}\r\n\t\t\telse{\r\n\t\t\t\tfor(Map.Entry<Slot,Bicycle_Mech> me:s.getPlaces_mech().entrySet()){\r\n\t\t\t\t\tif(me.getValue()!=null){\r\n\t\t\t\t\t\tthis.bicycle = me.getValue();s.getPlaces_mech().put(me.getKey(), null);\r\n\t\t\t\t\t\ts.setRent_times(s.getRent_times()+1);s.notify_users();\r\n\t\t\t\t\t\tthis.bicycle.setNumber_rides(this.bicycle.getNumber_rides()+1);\r\n\t\t\t\t\t\tif(bank_card.getOwner().equals(this)){this.bicycle.setBank_card_to_use(bank_card);}\r\n\t\t\t\t\t\tif(!bank_card.getOwner().equals(this)){System.out.println(\"choose a right bank card\");throw new Exception(\"WRONG BANK CARD USER\");}\t\r\n\t\t\t\t\t\tthis.bicycle.setUser(this);\r\n\t\t\t\t\t\tthis.setPosition(s.getPosition());\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}\r\n\t\t}\r\n\t\tif(b instanceof Bicycle_Elec){\r\n\t\t\tif(s.count_elec() == 0){System.out.println(\"no more elec bicycles available\");}\r\n\t\t\telse{\r\n\t\t\t\tfor(Map.Entry<Slot,Bicycle_Elec> me:s.getPlaces_elec().entrySet()){\r\n\t\t\t\t\tif(me.getValue()!=null){\r\n\t\t\t\t\t\tthis.bicycle = me.getValue();s.getPlaces_elec().put(me.getKey(), null);\r\n\t\t\t\t\t\ts.setRent_times(s.getRent_times()+1);s.notify_users();\r\n\t\t\t\t\t\tthis.bicycle.setNumber_rides(this.bicycle.getNumber_rides()+1);\r\n\t\t\t\t\t\tif(bank_card.getOwner().equals(this)){this.bicycle.setBank_card_to_use(bank_card);}\r\n\t\t\t\t\t\tif(!bank_card.getOwner().equals(this)){System.out.println(\"choose a right bank card\");throw new Exception(\"WRONG BANK CARD USER\");}\t\r\n\t\t\t\t\t\tthis.bicycle.setUser(this);\r\n\t\t\t\t\t\tthis.setPosition(s.getPosition());\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}\r\n\t\t}\r\n\t}",
"public ServiceBay getBayAt(int index) {\n\t\treturn bay[index];\n\n\t}",
"public abstract Bid chooseFirstCounterBid();",
"public abstract Bid chooseCounterBid();",
"public abstract Bid chooseOpeningBid();",
"public ServiceBay getBayAt(int index) {\n\t\tif(index < 0 || index > getSize()) {\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n\t\treturn bay[index];\n\t}",
"Builder addItemOffered(Service value);",
"public ServiceB(int quantity) {\n\t\tthis.quantity = quantity;\n\t}",
"public interface DurableSeatHoldingService extends SeatHoldingService {\n\n}",
"public Bike removeBike () {\n categorizeBikes(); // categorize all bikes based on their status\n Scanner in = new Scanner(System.in);\n System.out.println(\"\\nBikes with following numbers are available: \" + availableBikeIDs);\n System.out.print(\"\\nEnter the bike number you want to rent: \");\n System.out.println();\n int selectedID = in.nextInt();\n int ind = 0;\n for (Bike b : availableBikes) {\n if (b.getBikeID() == selectedID) {\n ind = this.bikes.indexOf(b); // get the index of selected bike\n //availableBikes.remove(b); // remove selected bike from available bikes\n }\n }\n\n return this.bikes.remove(ind); // remove and return selected bike\n }",
"public void add(AvailableService toAdd) {\n requireNonNull(toAdd);\n if (contains(toAdd)) {\n throw new DuplicateServiceException();\n }\n internalList.add(toAdd);\n }",
"private BookableService createTestService(){\n try {\n\n String serviceName = SERVICE_NAME_2;\n BookableService createdService = repairShopService.createService(\"Place holder\", COST, DURATION);\n createdService.setName(serviceName);\n createdService.setId(EXISTING_SERVICE_ID_2);\n\n return createdService;\n }\n catch (BookableServiceException e){\n e.printStackTrace();\n return null;\n }\n }",
"public int selectBarber() {\t\t\r\n\t\tUserInterface.println(\"These are the barbers that work here:\\n\");\r\n\t\tUserInterface.println(mBookKeeper.listBarbers());\r\n\t\t\r\n\t\tUserInterface.println(\"\\nWhich one do you pick?\");\r\n\t\t\r\n\t\tString barber = UserInterface.getInput();\r\n\t\t\t\r\n\t\tif(barber.equalsIgnoreCase(\"cancel\")) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t\t\r\n\t\tif(mBookKeeper.selectBarber(barber))\r\n\t\t\tUserInterface.println(mBookKeeper.getBarber() + \" is now the active barber.\");\r\n\t\telse\r\n\t\t\tUserInterface.println(\"Barber does not exist. \\nSelecting \" + mBookKeeper.getBarber() + \" instead!\");\r\n\t\t\r\n\t\tmBarber = mBookKeeper.getBarber();\r\n\t\t\r\n\t\treturn 0;\r\n\t}",
"private ServiceInfo getRandomService(List<ServiceInfo> serviceList) {\n\t\tif (serviceList == null || serviceList.size() == 0) {\n\t\t\treturn null;\n\t\t}\n\t\treturn serviceList.get(RandomUtils.nextInt(0, serviceList.size()));\n\t}",
"public Bay(Integer bayID){\n this.bayID = bayID;\n baySchedule = new ArrayList<Product>();\n availableDate = new Date(0);\n }",
"public void startOnBike() {\n\t\tthis.bike = user.getBike();\n\t\tthis.timeBikeTaken = System.currentTimeMillis();\n\t}",
"public synchronized void park(Station s) throws Exception{\r\n\t\tif(!s.equals(this.last_routine.getDestination())){System.out.println(\"CHOOSE THE STATION OF YOUR ROUTINE\");throw new Exception(\"WRONG STATION\");}\r\n\t\ts.remove_user(this);\r\n\t\tif(!s.isState()){System.out.println(\"offline - out of order!\");throw new Exception(\"OFFLINE\");}\r\n\t\tif(this.bicycle == null){System.out.println(\"no bicycle to park\");}\r\n\t\tthis.bicycle.setTotal_time_spent(this.bicycle.getTotal_time_spent()+this.bicycle.count_bike_time(this.last_routine.getSource(), this.last_routine.getDestination()));\r\n\t\tthis.setPosition(s.getPosition());\r\n\t\tif(this.bicycle instanceof Bicycle_Mech){\r\n\t\t\tif(s.getPlaces_mech().size()-s.count_mech() == 0){System.out.println(\"no more mech bicycle slots available\");}\r\n\t\t\telse{\r\n\t\t\t\tif(s instanceof Station_Plus && this.card!=null){this.card.setCredits(this.card.getCredits()+5);}\r\n\t\t\t\tfor(Map.Entry<Slot,Bicycle_Mech> me:s.getPlaces_mech().entrySet()){\r\n\t\t\t\t\tif(me.getValue()==null){\r\n\t\t\t\t\t\ts.getPlaces_mech().put(me.getKey(), (Bicycle_Mech)this.bicycle);s.setReturn_times(s.getReturn_times()+1);\r\n\t\t\t\t\t\tif(this.card!=null){System.out.println(this.getUserName() + \" Credits remaining: \" + this.getCard().getCredits());}\r\n\t\t\t\t\t\tSystem.out.println(this.getUserName() + \" PAY: \" + this.pay(this.last_routine, this.bicycle, this.bicycle.getBank_card_to_use()));\r\n\t\t\t\t\t\tthis.last_routine = null;\r\n\t\t\t\t\t\ts.notify_users();\r\n\t\t\t\t\t\tthis.bicycle.setUser(null);\r\n\t\t\t\t\t\tthis.bicycle.setBank_card_to_use(null);\r\n\t\t\t\t\t\tthis.bicycle = null;\r\n\t\t\t\t\t\tthis.setPosition(s.getPosition());\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}\r\n\t\t}\r\n\t\tif(this.bicycle instanceof Bicycle_Elec){\r\n\t\t\tif(s.getPlaces_elec().size()-s.count_elec() == 0){System.out.println(\"no more elec bicycle slots available\");}\r\n\t\t\telse{\r\n\t\t\t\tif(s instanceof Station_Plus && this.card!=null){this.card.setCredits(this.card.getCredits()+5);}\r\n\t\t\t\tfor(Map.Entry<Slot,Bicycle_Elec> me:s.getPlaces_elec().entrySet()){\r\n\t\t\t\t\tif(me.getValue()==null){\r\n\t\t\t\t\t\ts.getPlaces_elec().put(me.getKey(), (Bicycle_Elec)this.bicycle);s.setReturn_times(s.getReturn_times()+1);\r\n\t\t\t\t\t\tif(this.card!=null){System.out.println(this.getUserName() + \" Credits remaining: \" + this.getCard().getCredits());}\r\n\t\t\t\t\t\tSystem.out.println(this.getUserName() + \" PAY: \" + this.pay(this.last_routine, this.bicycle,this.bicycle.getBank_card_to_use()));\r\n\t\t\t\t\t\tthis.last_routine = null;\r\n\t\t\t\t\t\ts.notify_users();\r\n\t\t\t\t\t\tthis.bicycle.setUser(null);\r\n\t\t\t\t\t\tthis.bicycle.setBank_card_to_use(null);\r\n\t\t\t\t\t\tthis.bicycle = null;\r\n\t\t\t\t\t\tthis.setPosition(s.getPosition());\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}\r\n\t\t}\r\n\t}",
"public void addBike (Bike bike) {\n if (this.bikes.size() <= 4) { // add limitation on number of parked bikes to 5\n this.bikes.add(bike);\n } else {\n System.err.printf(\"%nNo free space to park bike \" +\n \"with ID '%d' in station %d!%n\", bike.getBikeID(), this.stationID);\n }\n }",
"public void placeBid(Bid b,int currentClientID,int accountNumber){\n try {\n if(b.getItem()!=null) breakDownBid(b);\n this.currentClientID=currentClientID;\n this.currentBidderID=accountNumber;\n bids.put(b);\n }catch(InterruptedException i){\n i.printStackTrace();\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set one ghost to start the "Scared" state. | public void setGhostScared(String ghostName, int defaultScaredTime) {
final int[] scaredTime = {defaultScaredTime};
ghostScaredTimes.put(ghostName, scaredTime[0]);
Timer countDownGhostBuster = new Timer();
countDownGhostBuster.scheduleAtFixedRate(new TimerTask() {
/**
* The action to be performed by this timer task.
*/
public void run() {
scaredTime[0]--;
ghostScaredTimes.put(ghostName, scaredTime[0]);
}
}, 1000, 1000);
if (ghostScaredTimers.get(ghostName) != null) {
ghostScaredTimers.get(ghostName).cancel();
}
ghostScaredTimers.put(ghostName, countDownGhostBuster);
} | [
"public void moveGhost() {\n\t\t\tswitch (_mode) {\n\t\t\tcase Chase:\n\t\t\t\tthis.chase();\n\t\t\t\tbreak;\n\t\t\tcase Scatter:\n\t\t\t\tthis.scatter();\n\t\t\t\tbreak;\n\t\t\tcase Frightened:\n\t\t\t\tthis.frightened();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}",
"private void setupGhostPen() {\n\t\tKeyFrame kf = new KeyFrame(Duration.seconds(Constants.DURATION), new GhostPenHandler()); //incremental changes made each time TimeHandler is called\n\t\t_ghostPenTimeline = new Timeline(kf);\n\t\t_ghostPenTimeline.setCycleCount(Animation.INDEFINITE);\n\t\t_ghostPenTimeline.play();\n\t}",
"static void startGame() {\n Sheepdog.theState = Sheepdog.gameState.startGAME;\n loadImages();\n }",
"public void setStart()\n {\n currentState = 0;\n preDone = false;\n }",
"public void setSheared(boolean sheared)\n {\n setPokemonAIState(SHEARED, sheared);\n }",
"public void resetGhost(String ghostName) {\n ghostScaredTimers.get(ghostName).cancel();\n ghostScaredTimers.put(ghostName, null);\n ghostScaredTimes.put(ghostName, 0);\n }",
"public void startNewLevel() {\n\n lastGameResult.set(true);\n\n pacMan.hide();\n pacMan.dotEatenCount = 0;\n\n for (Ghost g : ghosts) {\n g.hide();\n }\n\n flashingCount = 0;\n flashingTimeline.playFromStart();\n }",
"private void setRunning(PImage proc) {\n\t\tcurrentPID = proc.getPID();\n\t\tproc.setState(2);\n\t}",
"private void generateGhost() {\r\n\t\ttry {\r\n\t\t\tghost = (FallingPiece)falling.clone();\r\n\t\t} catch (CloneNotSupportedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\twhile(moveIfNoConflict(ghost.moveDown(), ghost));\t\t\r\n\t\tfor (BlockDrawable block : ghost.allBlocks())\r\n\t\t\tblock.setGhost(true);\r\n\t}",
"public void beginGame() {\r\n data.gameState = 3;\r\n data.gameStartFlag = true;\r\n setChanged();\r\n notifyObservers(data);\r\n data.gameStartFlag = false; //Set the gameStart flag to false so the relevant update lines aren't ever run a second time\r\n }",
"private void startNewGame() {\n this.setStartingValues();\n this.clearGrid();\n }",
"public void startTurn() {\n nMovesBeforeGrabbing = 1;\n nMovesBeforeShooting = 0;\n\n if (damages.size() > 2)\n nMovesBeforeGrabbing = 2;\n\n if (damages.size() > 5)\n nMovesBeforeShooting = 1;\n\n playerStatus.isActive = true;\n }",
"public void enterHatchingState() {\n\n\t}",
"public void startGame() {\n\t\t// clear out any existing entities and intialise a new set\n\n\t\tSetStateNumber(1);\n\t\tCreateState();\n\n\t\t// blank out any keyboard settings we might currently have\n\n\t\tgame.leftPressed = false;\n\t\tgame.rightPressed = false;\n\t\tgame.firePressed = false;\n\t}",
"protected void setGripperState(int grip) {\r\n if(grip == KSGripperStates.GRIP_OPEN)\r\n gripperState = grip;\r\n else if(grip == KSGripperStates.GRIP_CLOSED)\r\n gripperState = grip;\r\n }",
"public void setFirstMove(boolean b) {\n firstMove = b;\n }",
"@Override\n public void doAction() {\n this.game.setComputerStartsFirst(false);\n }",
"void setGameStarted(boolean state) {\n gameStarted = state;\n }",
"private void setNextStone() {\n stones.remove(0);\n currentStone = stones.get(0);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Invoke an action expected to raise a Python exception and check the message. The return value may be the subject of further assertions. | public static <E extends PyException> E assertRaises(
Class<E> expected, Executable action,
String expectedMessage) {
E e = assertThrows(expected, action);
assertEquals(expectedMessage, e.getMessage());
return e;
} | [
"public void testActionPerformed() {\n try {\n handler.actionPerformed(null, EventValidation.SUCCESSFUL);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }",
"@Test\n public void testInvokeScriptCausesException() {\n final TestRunner runner = TestRunners.newTestRunner(new InvokeScriptedProcessor());\n runner.setProperty(scriptingComponent.getScriptingComponentHelper().SCRIPT_ENGINE, \"ECMAScript\");\n runner.setProperty(ScriptingComponentUtils.SCRIPT_BODY, getFileContentsAsString(\n TEST_RESOURCE_LOCATION + \"javascript/testInvokeScriptCausesException.js\")\n );\n runner.assertValid();\n runner.enqueue(\"test content\".getBytes(StandardCharsets.UTF_8));\n assertThrows(AssertionError.class, () -> runner.run());\n }",
"public static interface ExceptionAction {\n /** Execute the action.\n * Can throw an exception.\n * @return any object, then returned from {@link Mutex#readAccess(Mutex.ExceptionAction) or {@link Mutex#writeAccess(Mutex.ExceptionAction)}\n * @exception Exception any exception the body needs to throw\n */\n public Object run () throws Exception;\n }",
"@Expect(IllegalArgument)\n public void test4() {\n try {\n// if (true) {\n// throw new IllegalArgumentException(\"gaga\");\n// }\n handleSuccess();\n } catch(Exception e) {\n handleException(e);\n }\n }",
"void assertExceptionIsThrown(\n String sql,\n String expectedMsgPattern);",
"@Test\n public void failedBuyDueToInsufficientFunds(){\n try{\n currentState.handleAction(new SelectResourcesAction(\"Ernestino\", \"Chest\", gold, 2));\n }catch(FSMTransitionFailedException e){\n throw new RuntimeException();\n }\n\n assertThrows(FSMTransitionFailedException.class, ()-> currentState.handleAction(new ConfirmAction(\"Ernestino\")));\n }",
"public interface ThrowableAction {\n\n /**\n * Calls action.\n *\n * @throws Throwable when exception occurs\n */\n void call() throws Throwable;\n}",
"AssertThat<T> throwing(RuntimeException e);",
"protected void assertExceptionCaught() {\r\n this.assertExceptionCaught(\"Expected an exception.\");\r\n }",
"public FaultException raise(Throwable e, Object argument);",
"@Test\n public void wrongResourcesSelected(){\n try{\n currentState.handleAction(new SelectResourcesAction(\"Ernestino\", \"Chest\", shield, 1));\n }catch(FSMTransitionFailedException e){\n throw new RuntimeException();\n }\n\n assertThrows(FSMTransitionFailedException.class, ()-> currentState.handleAction(new ConfirmAction(\"Ernestino\")));\n }",
"public InvalidActionException(String message){\n super(message);\n }",
"@Test(expected = WorkflowExecutionException.class)\n public void testExecuteWorkflowExecutionException() {\n action.execute(state);\n action.execute(state);\n }",
"private void ensureThrows(Consumer<ClusterState> action, ClusterState stateTo) {\n Class<? extends Throwable> cause = SecurityException.class;\n String errMsg = \"Authorization failed [perm=\" + ADMIN_CLUSTER_STATE;\n\n if (Initiator.THIN_CLIENT == initiator) {\n cause = ClientAuthorizationException.class;\n errMsg = \"User is not authorized to perform this operation\";\n }\n else if (Initiator.REMOTE_CONTROL == initiator)\n cause = GridClientException.class;\n\n assertThrowsAnyCause(\n null,\n () -> {\n action.accept(stateTo);\n\n return null;\n },\n cause,\n errMsg\n );\n }",
"public FaultException raise(Throwable e);",
"@Test\n public void confirmRequestFromInvalidPlayer(){\n assertThrows(FSMTransitionFailedException.class, ()->currentState.handleAction(new ConfirmAction(\"Augusta\")));\n }",
"protected void assertExceptionCaught(String message) {\r\n assertTrue(message, exceptionCaught);\r\n }",
"private void checkException(Runnable function, Class<?> expectedEx){\n try {\n function.run();\n assert false;\n }catch (Exception e){\n assert e.getClass() == expectedEx;\n }\n }",
"public void testExecute_ActionExecutionException() {\n action = new UpdateSizeAction(new GraphEdge(), newSize);\n\n try {\n action.execute();\n fail(\"ActionExecutionException expected.\");\n } catch (ActionExecutionException e) {\n //good\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update media in the database with the given content values. Apply the changes to the rows specified in the selection and selection arguments (which could be 0 or 1 or more pets). Return the number of rows that were successfully updated. | private int updateMedia(Uri uri, ContentValues values, String selection, String[] selectionArgs, String tableName) {
// TODO SANITY CHECKING HERE!!!!!!!!!!!!!!!!!!!!!!!!!
/*
// If the {@link PetEntry#COLUMN_PET_NAME} key is present,
// check that the name value is not null.
if (values.containsKey(PetEntry.COLUMN_PET_NAME)) {
String name = values.getAsString(PetEntry.COLUMN_PET_NAME);
if (name == null) {
throw new IllegalArgumentException("Pet requires a name");
}
}
* */
// If there are no values to update, then don't try to update the database
if (values.size() == 0) {
return 0;
}
// Otherwise, get writeable database to update the data
SQLiteDatabase database = mDbHelper.getWritableDatabase();
// Returns the number of database rows affected by the update statement
return database.update(tableName, values, selection, selectionArgs);
} | [
"private int updateFavoriteMovies(Uri uri, ContentValues values, String selection, String[] selectionArgs) {\n\n // Update the selected pets in the pets database table with the given ContentValues\n // If the {@link PetEntry#COLUMN_PET_NAME} key is present,\n // check that the name value is not null.\n if (values.containsKey(MovieContract.MovieEntry.COLUMN_MOVIE_ID)) {\n String movieId = values.getAsString(MovieContract.MovieEntry.COLUMN_MOVIE_ID);\n if (movieId == null) {\n throw new IllegalArgumentException(\"Movie requires an id.\");\n }\n }\n\n // If the {@link PetEntry#COLUMN_PET_GENDER} key is present,\n // check that the gender value is valid.\n if (values.containsKey(MovieContract.MovieEntry.COLUMN_TITLE)) {\n Integer title = values.getAsInteger(MovieContract.MovieEntry.COLUMN_TITLE);\n if (title == null) {\n throw new IllegalArgumentException(\"Movie requires a title.\");\n }\n }\n\n // If the {@link PetEntry#COLUMN_PET_WEIGHT} key is present,\n // check that the weight value is valid.\n if (values.containsKey(MovieContract.MovieEntry.COLUMN_POSTER_PATH)) {\n //Check that the weight is greater than or equal to 0kg\n Integer posterPath = values.getAsInteger(MovieContract.MovieEntry.COLUMN_POSTER_PATH);\n if (posterPath == null) {\n throw new IllegalArgumentException(\"Movie requires a poster path.\");\n }\n }\n\n // If there are no values to update, then don't try to update the database\n if (values.size() == 0) {\n return 0;\n }\n\n // Otherwise, get writeable database to update the data\n SQLiteDatabase database = mDbHelper.getWritableDatabase();\n\n // Returns the number of database rows affected by the update statement\n return database.update(MovieContract.MovieEntry.TABLE_NAME, values, selection, selectionArgs);\n }",
"public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) \n {\n return 0;\n }",
"@Override\n public int update(Uri uri, ContentValues contentValues, String selection, String[] selectionArgs) {\n final int match = sUriMatcher.match(uri);\n\n switch (match) {\n case DATA:\n return updatecgpa(contentValues, uri, selection, selectionArgs);\n case DATA_ID:\n //selection variable holds the where clause\n selection = gpaEntry._ID + \" =? \";\n\n //the selectionArgs holds an array of values for the selection clause\n selectionArgs = new String[]{String.valueOf(ContentUris.parseId(uri))};\n\n return updatecgpa(contentValues, uri, selection, selectionArgs);\n default:\n throw new IllegalArgumentException(\"Insertion is not supported \" + uri);\n\n }\n }",
"public void updateQuantity() {\r\n // Create a ContentValues object where column names are the keys,\r\n // and product attributes from the editor are the values.\r\n ContentValues values = new ContentValues();\r\n values.put(ProductEntry.COLUMN_PRODUCT_QUANTITY, quantity);\r\n Uri currentPrtUri = ContentUris.withAppendedId(ProductEntry.CONTENT_URI, id);\r\n\r\n if (quantity > 0) {\r\n int rowsAffected = getContentResolver().update(currentPrtUri, values, null, null);\r\n // Show a toast message depending on whether or not the update was successful.\r\n if (rowsAffected == 0) {\r\n // If no rows were affected, then there was an error with the update.\r\n Toast.makeText(MainActivity.this, getString(R.string.update_fail),\r\n Toast.LENGTH_SHORT).show();\r\n } else {\r\n // Otherwise, the update was successful and we can display a toast.\r\n Toast.makeText(MainActivity.this, getString(R.string.row_updated),\r\n Toast.LENGTH_SHORT).show();\r\n }\r\n }\r\n }",
"public void updateContent(String spaceId, String contentId);",
"@Override\n public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {\n return database.update(DBOpenHelper.TABLE_NOTES, values, selection, selectionArgs);\n }",
"public void update(long image_id, long new_audio_id)\n{\n String[] columns = new String[] {_ID, IMAGE_ID, AUDIO_ID} ;\n String where_clause = IMAGE_ID + \" = \" + image_id ;\n\n Cursor c = m_db.query(true, AUDIO_TAGS_TABLE, columns, where_clause,\n null, null, null, null, null) ;\n ((Activity) m_context).startManagingCursor(c) ;\n if (c == null || c.getCount() == 0) // insert new entry\n {\n ContentValues v = new ContentValues(2) ;\n v.put(IMAGE_ID, image_id) ;\n v.put(AUDIO_ID, new_audio_id) ;\n m_db.insert(AUDIO_TAGS_TABLE, null, v) ;\n }\n else // update existing entry\n {\n c.moveToFirst() ;\n\n delete_audio_from_system(c.getLong(c.getColumnIndex(AUDIO_ID))) ;\n\n ContentValues v = new ContentValues(2) ;\n v.put(IMAGE_ID, image_id) ;\n v.put(AUDIO_ID, new_audio_id) ;\n m_db.update(AUDIO_TAGS_TABLE, v,\n _ID + \"=\" + c.getLong(c.getColumnIndex(_ID)), null) ;\n }\n}",
"public boolean updateChoice(Choice choice) {\n Connection conn = null;\n PreparedStatement stmt = null;\n\n try {\n conn = DriverManager.getConnection(__jdbcUrl);\n\n stmt = conn.prepareStatement(\"update choices set question_fk=?, correct=?, content=?,\" +\n \" where choice_id=?\");\n stmt.setInt(1, choice.getQuestion_fk());\n stmt.setBoolean(2, choice.isCorrect());\n stmt.setString(3,choice.getContent());\n stmt.setInt(4,choice.getChoice_id());\n int updatedRows = stmt.executeUpdate();\n return updatedRows > 0;\n }\n catch (Exception se) {\n se.printStackTrace();\n return false;\n }\n finally {\n DbUtils.closeConnections(null, stmt, conn);\n }\n }",
"private int updateWorkout(Uri uri, ContentValues values, String selection, String[] selectionArgs) {\n // If there are no values to update, then don't update the database\n if (values.size() == 0) {\n return 0;\n }\n\n // Otherwise, get a writable database to update the data.\n SQLiteDatabase database = mDbHelper.getWritableDatabase();\n\n // Perform the update on the database and get the number of rows affected.\n int rowsUpdated = database.update(WorkoutEntry.TABLE_NAME,\n values, selection, selectionArgs);\n\n /*\n If 1 or more rows were updated, then notify all listeners that the data at the\n given URI has changed.\n */\n if (rowsUpdated != 0) {\n getContext().getContentResolver().notifyChange(uri, null);\n }\n\n // Returns the number of database rows affected by the update statement.\n return rowsUpdated;\n }",
"public void modifyrecords(String description, String recommendation, int quantity) throws SQLException\n {\n PreparedStatement modify=c.prepareStatement(\"update provision p set p.recommendation=?, p.quantity=? where exists(select * from safari s, material m where s.id=? and m.description=? and p.neededby=s.id and p.needs=m.id)\");\n modify.setString(1,recommendation);\n modify.setInt(2,quantity);\n modify.setInt(3,safariid);\n modify.setString(4,description);\n int k=modify.executeUpdate();\n if(k>0)\n {\n System.out.println(\"Updated\");\n }\n else\n {\n System.out.println(\"Not updated\");\n }\n \n }",
"public boolean updateMessageContent (int mid, String content) {\n boolean updateResult = false;\n String sql = \"UPDATE message SET is_read = 0 , content = ?, time = NOW() WHERE mid = ?\";\n \ttry {\t\t\t\n this.statement = connection.prepareStatement(sql);\n this.statement.setString(1, content);\n this.statement.setInt(2, mid);\n this.statement.executeUpdate();\n updateResult = true;\n this.statement.close();\n\t}\n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return updateResult; \n }",
"@Override\n public void update() {\n try {\n PreparedStatement updateMetal = DatabaseManager.getSingleton().getConnection()\n .prepareStatement(\"UPDATE Metal SET dissolvedById = ?, moles = ? WHERE elementId = ?;\");\n updateMetal.setInt(1, metal.getDissolvedById());\n updateMetal.setDouble(2, metal.getMoles());\n updateMetal.setInt(3, metal.getMetalId());\n\n PreparedStatement updateElement = DatabaseManager.getSingleton().getConnection()\n .prepareStatement(\"UPDATE Element SET atomicNumber = ?, atomicMass = ? WHERE elementId = ?;\");\n updateMetal.setInt(1, metal.getAtomicNumber());\n updateMetal.setDouble(2, metal.getAtomicMass());\n updateMetal.setInt(3, metal.getMetalId());\n\n PreparedStatement updateChemical = DatabaseManager.getSingleton().getConnection()\n .prepareStatement(\"UPDATE Chemical SET name = ?, inventory = ? WHERE chemicalId = ?;\");\n updateChemical.setString(1, metal.getName());\n updateChemical.setDouble(2, metal.getInventory());\n updateChemical.setInt(3, metal.getMetalId());\n\n updateMetal.execute();\n updateElement.execute();\n updateChemical.execute();\n } catch (SQLException | DatabaseException e) {\n e.printStackTrace();\n System.out.println(\"Failed to update\");\n }\n }",
"int updateByPrimaryKey(Product_picture record);",
"int updateByPrimaryKey(SecondSlideshow record);",
"public synchronized static SQLiteDatabase updateDB(String dbName,\n ContentValues content,\n String where,\n String[] args) {\n \n if (data != null) {\n data.update(dbName, content, where, args);\n data.close();\n }\n data = db.getWritableDatabase();\n \n return data;\n }",
"@Override\n public int update(Uri uri, ContentValues values, String where,\n\t String[] whereArgs) {\n\tint count;\n\tSQLiteDatabase db = dbHelper.getWritableDatabase();\n\tswitch (URI_MATCHER.match(uri)) {\n\tcase NOTES:\n\t count = db.update(\"wikinotes\", values, where, whereArgs);\n\t break;\n\n\tcase NOTE_NAME:\n\t values\n\t\t .put(WikiNote.Notes.MODIFIED_DATE, System\n\t\t .currentTimeMillis());\n\t count = db.update(\"wikinotes\", values, where, whereArgs);\n\t break;\n\n\tdefault:\n\t throw new IllegalArgumentException(\"Unknown URL \" + uri);\n\t}\n\n\tgetContext().getContentResolver().notifyChange(uri, null);\n\treturn count;\n }",
"public boolean updatePostContent(long postId, final String content) throws SQLException {\n Connection conn = null;\n PreparedStatement stmt = null;\n Timer.Context ctx = metrics.updatePostTimer.time();\n try {\n conn = connectionSupplier.getConnection();\n stmt = conn.prepareStatement(updatePostContentSQL);\n stmt.setString(1, content);\n stmt.setLong(2, postId);\n return stmt.executeUpdate() > 0;\n } finally {\n ctx.stop();\n SQLUtil.closeQuietly(conn, stmt);\n }\n }",
"void updateContent();",
"public static int update (String Table, ArrayList Values, String where, int what) {\n try {\n String values = \"\";\n for (int i = 0; i < Values.size() - 2; i += 2) {\n values = values.concat(String.valueOf(Values.get(i)) + \"='\" + String.valueOf(Values.get(i + 1)) + \"', \");\n }\n values = values.concat(String.valueOf(Values.get(Values.size() - 2)) + \"='\" + String.valueOf(Values.get(Values.size() - 1)) + \"'\");\n PreparedStatement statement = DB_Backend.getConnection().prepareStatement(\"UPDATE \" + Table + \" SET \" + values + \" WHERE \" + where + \"= ? LIMIT 1\");\n statement.setInt(1,what);\n int update = statement.executeUpdate();\n return update;\n } catch (SQLException ex) {\n Logger.getLogger(DB_InsertUpdate.class.getName()).log(Level.SEVERE, null, ex);\n return -1;\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper method to find the defining component of a SelectItem so passthrough attributes can be rendered. | public UIComponent getSelectItemComponent(SelectItem item) {
if (item instanceof WrapperSelectItem) {
WrapperSelectItem wrapper = (WrapperSelectItem) item;
return wrapper.getComponent();
}
return null;
} | [
"public Object getSelectItem() {\n\t\treturn selectItem;\n\t}",
"public interface SelectItem {\n\n /**\n * @return A star is used as select item\n */\n boolean isStar();\n\n /**\n * @return Namespace and star is used as select item in order to select operations\n */\n boolean isAllOperationsInSchema();\n\n UriInfoResource getResourcePath();\n\n /**\n * @return Before resource path segments which should be selected a type filter may be used.\n * For example: ...Suppliers?$select=Namespace.PreferredSupplier/AccountRepresentative\n */\n Type getStartTypeFilter();\n\n}",
"protected abstract Widget doFindInputItem(Object element);",
"public ItemSelectType() {\n this.setEmcLabel(\"Item Sel. Type\");\n this.setMandatory(true);\n }",
"public interface SelectElement extends Editor {\n\t\t\n\tpublic String getParamName();\n\t\n\tpublic void renderOption(OptionItem option);\n\n\tpublic boolean isSelected(OptionItem option);\n\t\n\tpublic Object getOptions();\n\t\n\tpublic void setOptions(Object model);\n\t\n\tpublic int getOptionIndex(OptionItem option);\n\n\tpublic void reset();\n\n}",
"public Selectable getValuableElement();",
"SelectAlternative getSelectAlternative();",
"private Select getSelect() {\n\t\tParkarLogger.traceEnter();\n\t\tString infoMsg = \"getSelect: \" + \" [ \" + locatorKey + \" : \" + locator + \" ]\";\n\t\tSelect select = new Select(element);\n\t\tlogger.info(infoMsg);\n\t\tParkarLogger.traceLeave();\n\t\treturn select;\n\t}",
"public interface Selectable {\n\tString getIdentifyingValue();\n\n\tString getDisplayValue();\n}",
"protected void addFindElementSelectionPropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add(new ItemPropertyDescriptor(\n\t\t\t((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\tgetResourceLocator(),\n\t\t\tgetString(\"_UI_CollectionUnit_findElementSelection_feature\"),\n\t\t\tgetString(\"_UI_PropertyDescriptor_description\", \"_UI_CollectionUnit_findElementSelection_feature\", \"_UI_CollectionUnit_type\"),\n\t\t\tWebuiPackage.Literals.COLLECTION_UNIT__FIND_ELEMENT_SELECTION,\n\t\t\ttrue, false, true, null,\n\t\t\tgetString(\"_UI_BusinessPropertyCategory\"),\n\t\t\tnull) {\n\t\t\t\t@Override\n\t\t\t\tpublic Collection<?> getChoiceOfValues(Object object) {\n\t\t\t\t\tif (object instanceof IndexUnit) {\n\t\t\t\t\t\treturn getSelections((IndexUnit) object);\n\t\t\t\t\t}\n\t\t\t\t\treturn Collections.emptySet();\n\t\t\t\t}\n\t\t});\n\t}",
"public void setSelectItem(Object selectItem) {\n\t\tthis.selectItem = selectItem;\n\t}",
"public abstract String selectedItemIdentifier();",
"IProductInfo getM_piSelectedItem();",
"private void renderSelectOptions(FacesContext context,\n UIComponent component, Set lookupSet,\n List selectItemList) throws IOException {\n ResponseWriter writer = context.getResponseWriter();\n\n for (Iterator it = selectItemList.iterator(); it.hasNext();) {\n SelectItem selectItem = (SelectItem) it.next();\n\n if (selectItem instanceof SelectItemGroup) {\n writer.startElement(OPTGROUP_ELEM, component);\n writer.writeAttribute(HTML.LABEL_ATTR, selectItem.getLabel(),\n null);\n SelectItem[] selectItems = ((SelectItemGroup) selectItem).getSelectItems();\n renderSelectOptions(context, component, lookupSet,\n Arrays.asList(selectItems));\n writer.endElement(OPTGROUP_ELEM);\n } else {\n String itemStrValue = getConvertedStringValue(context, component, selectItem);\n\n writer.write(TABULATOR);\n writer.startElement(HTML.OPTION_ELEM, component);\n if (itemStrValue != null) {\n writer.writeAttribute(HTML.value_ATTRIBUTE, itemStrValue, null);\n }\n\n if (lookupSet.contains(itemStrValue)) { //TODO/FIX: we always compare the String vales, better fill lookupSet with Strings only when useSubmittedValue==true, else use the real item value Objects\n writer.writeAttribute(HTML.SELECTED_ATTR,\n HTML.SELECTED_ATTR, null);\n }\n\n boolean disabled = selectItem.isDisabled();\n if (disabled) {\n writer.writeAttribute(HTML.DISABLED_ATTR,\n HTML.DISABLED_ATTR, null);\n }\n\n String labelClass;\n boolean componentDisabled = isTrue(component.getAttributes().get(\"disabled\"));\n\n if (componentDisabled || disabled) {\n labelClass = (String) component.getAttributes().get(\"disabledClass\");\n } else {\n labelClass = (String) component.getAttributes().get(\"enabledClass\");\n }\n if (labelClass != null) {\n writer.writeAttribute(HTML.class_ATTRIBUTE, labelClass, \"labelClass\");\n }\n\n boolean escape;\n\n escape = getBooleanAttribute(component, \"escape\",\n true); //default is to escape\n if (escape) {\n writer.writeText(selectItem.getLabel(), null);\n } else {\n writer.write(selectItem.getLabel());\n }\n\n writer.endElement(HTML.OPTION_ELEM);\n }\n }\n }",
"com.sagas.meta.model.MetaDropDownField getDropDownField();",
"public interface HasOptionStyleProvider<I> extends Component {\n\n /**\n * Sets the style provider that is used to produce custom class names for option items.\n *\n * @param optionStyleProvider style provider\n */\n void setOptionStyleProvider(@Nullable Function<? super I, String> optionStyleProvider);\n /**\n * @return the currently used item style provider\n */\n @Nullable\n Function<? super I, String> getOptionStyleProvider();\n}",
"public Sellable getSellableItem() {\n return item;\n }",
"public Component select( Object hint )\n throws ComponentException\n {\n final Component component = (Component)m_components.get( hint );\n\n if( null != component )\n {\n return component;\n }\n else\n {\n throw new ComponentException( hint.toString(), \"Unable to provide implementation.\" );\n }\n }",
"public Element getSelectInput(String xpath) {\n\t\t// does this field have a vocabLayout??\n\t\tString normalizedXPath = RendererHelper.normalizeXPath(xpath);\n\t\tif (rhelper.hasVocabLayout(normalizedXPath)) {\n\t\t\tElement layoutSingleSelect = df.createElement(\"vl__vocabLayoutSingleSelect\").addAttribute(\"elementPath\",\n\t\t\t\t\t\"valueOf(\" + xpath + \")\");\n\t\t\treturn layoutSingleSelect;\n\t\t}\n\n\t\treturn super.getSelectInput(xpath);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Filter current user's following people's mood events by a specific mood state. | public void filterByFoMoodState(String selectedMoodState){
// for each mood event in the list
for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){
// get the mood event's mood state
stateOfMood = moodListBeforeFilterFo.getMoodEvent(i).getMoodState();
// if it equals the selected mood state, then add it to the new list
if (stateOfMood.equals(selectedMoodState)) {
moodListAfterFilter.add(moodListBeforeFilterFo.getMoodEvent(i));
}
}
} | [
"public void filterByMyMoodState(String selectedMoodState){\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterMy.getCount(); i++ ){\n // get the mood event's mood state\n stateOfMood = moodListBeforeFilterMy.getMoodEvent(i).getMoodState();\n // if it equals the selected mood state, then add it to the new list\n if (stateOfMood.equals(selectedMoodState)) {\n moodListAfterFilter.add(moodListBeforeFilterMy.getMoodEvent(i));\n }\n }\n }",
"public void setFilter(EmotionalState emotionalState) {\n moodFilter.setValue(emotionalState);\n }",
"public ArrayList<MoodEvent> getMoodListAfterFilter(){\n return moodListAfterFilter;\n }",
"public void setMood(String mood) {\n this.mood = mood;\n }",
"public void filterByMyMostRece() {\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterMy.getCount(); i++ ){\n // get the mood's date\n dateOfMood = moodListBeforeFilterMy.getMoodEvent(i).getDateOfRecord();\n // if it within the range, then add it to the new list\n if (dateOfMood.compareTo(lowerBoundDATE) >= 0 && dateOfMood.compareTo(currentDATE) <= 0) {\n moodListAfterFilter.add(moodListBeforeFilterMy.getMoodEvent(i));\n }\n }\n }",
"public void filterByFoMostRece(){\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){\n // get the mood's date\n dateOfMood = moodListBeforeFilterFo.getMoodEvent(i).getDateOfRecord();\n // if it within the range, then add it to the new list\n if (dateOfMood.compareTo(lowerBoundDATE) >= 0 && dateOfMood.compareTo(currentDATE) <= 0) {\n moodListAfterFilter.add(moodListBeforeFilterFo.getMoodEvent(i));\n }\n }\n }",
"public LiveData<List<MoodEvent>> getMoodHistory() {\n if (moodHistory == null) {\n moodHistory = Transformations.switchMap(moodFilter, filter ->\n Transformations.map(moodEventRepository.getMoodHistory(), moodEvents -> {\n if (filter == null) {\n return moodEvents;\n }\n List<MoodEvent> filteredMoodEvents = new ArrayList<>();\n for (MoodEvent moodEvent : moodEvents) {\n if (moodEvent.getEmotionalState() == filter) {\n filteredMoodEvents.add(moodEvent);\n }\n }\n return filteredMoodEvents;\n }));\n }\n\n return moodHistory;\n }",
"public void updateMoodEvent(MoodEvent moodEvent){\r\n moodListManager.updateMoodEvent(moodEvent);\r\n }",
"public void filterByMyReason(String enteredReason){\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterMy.getCount(); i++ ){\n // get the mood event's trigger text\n keyOfReason = moodListBeforeFilterMy.getMoodEvent(i).getTriggerText();\n // if it contains the entered key of reason, then add it to the new list\n if (keyOfReason != null && keyOfReason.toLowerCase().contains(enteredReason.toLowerCase())) {\n moodListAfterFilter.add(moodListBeforeFilterMy.getMoodEvent(i));\n }\n }\n }",
"public void filterByMyDisplayAll(){\n // add them into the new list\n for (int i = 0; i < moodListBeforeFilterMy.getCount(); i++ ){\n moodListAfterFilter.add(moodListBeforeFilterMy.getMoodEvent(i));\n }\n }",
"public void filterByFoReason(String enteredReason){\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){\n // get the mood event's trigger text\n keyOfReason = moodListBeforeFilterFo.getMoodEvent(i).getTriggerText();\n // if it contains the entered key of reason, then add it to the new list\n if (keyOfReason != null && keyOfReason.toLowerCase().contains(enteredReason.toLowerCase())) {\n moodListAfterFilter.add(moodListBeforeFilterFo.getMoodEvent(i));\n }\n }\n }",
"public void updateRecentMoodToFollowers(){\r\n followingManager.updateRecentMoodToFollowers();\r\n }",
"public void filterByFoDisplayAll(){\n // add them into the new list\n for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){\n moodListAfterFilter.add(moodListBeforeFilterFo.getMoodEvent(i));\n }\n }",
"public void addMoodEvent(MoodEvent moodEvent) {\r\n moodListManager.addMoodEvent(moodEvent);\r\n }",
"public void filterUser() {\n for (int i = userList.size() - 1; i >= 0; i--) {\n User user = userList.get(i);\n if (user.getFriendStatus() == null ||\n (user.getFriendStatus().getStatus() == 1 &&\n user.getFriendStatus().getIdUserRequest() == presenter.getCurrentUser().getId())) {\n\n } else {\n userList.remove(i);\n }\n\n }\n }",
"@Override\n protected void getFilterRecent() {\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n builder.setTitle(\"Show Only Moods From Recent Week?\");\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n moodController.setFilterRecent(true, true);\n moodList = moodController.getMoodList(userList, true);\n adapter = new MoodAdapter(getActivity(), R.layout.mood_list_item, moodList);\n displayMoodList.setAdapter(adapter);\n adapter.notifyDataSetChanged();\n }\n });\n builder.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n moodController.setFilterRecent(false, true);\n moodList = moodController.getMoodList(userList, true);\n adapter = new MoodAdapter(getActivity(), R.layout.mood_list_item, moodList);\n displayMoodList.setAdapter(adapter);\n adapter.notifyDataSetChanged();\n dialog.cancel();\n }\n });\n builder.show();\n }",
"public void setMoodList(ArrayList<Mood> moodList) {\n this.moodList = moodList;\n }",
"private List<Status> filterWhitelistMentions(List<Status> unfilteredMentions) {\n\t\tif (unfilteredMentions.size() == 0) {\n\t\t\treturn unfilteredMentions;\n\t\t}\n\t\tList<Status> mentions = new ArrayList<Status>();\n\t\tlong[] validUserIds = loadValidUserIds();\n\t\tArrays.sort(validUserIds);\n\t\tfor (Status status : unfilteredMentions) {\n\t\t\tif (Arrays.binarySearch(validUserIds, status.getUser().getId()) >= 0) {\n\t\t\t\tmentions.add(status);\n\t\t\t}\n\t\t}\n\t\treturn mentions;\n\t}",
"public void handleMentions() {\n\t\tList<Status> mentions = tweeter.getMentions();\n\t\tmentions = filterWhitelistMentions(mentions);\n\t\tmentions = filterNewMentions(mentions);\n\t\tfor (Status status : mentions) {\n\t\t\thandleMention(status);\n\t\t}\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the types of aggregate to calculate. | public void setAggregateType(AggregateType aggregateType) {
this.aggregateType = aggregateType;
} | [
"public void setAggregateFunction(Type aggregateFunction) {\n this.aggregate = aggregateFunction;\n }",
"String getAggregateType();",
"@Resource\n public void setAggregateFactories(List<AggregateFactory<?>> aggregateFactories) {\n for (AggregateFactory<?> factory : aggregateFactories) {\n this.aggregateFactories.put(factory.getTypeIdentifier(), factory);\n }\n }",
"public Type getAggregateFunction() {\n return this.aggregate;\n }",
"public void setTypes(Types types);",
"@Test\n @SuppressWarnings(\"unchecked\")\n public <T> void testAggregate() {\n // Union of both statistics.\n StorelessUnivariateStatistic statU = getUnivariateStatistic();\n if (!(statU instanceof AggregatableStatistic<?>)) {\n return;\n }\n\n // Aggregated statistic.\n AggregatableStatistic<T> aggregated = (AggregatableStatistic<T>) getUnivariateStatistic();\n StorelessUnivariateStatistic statAgg = (StorelessUnivariateStatistic) aggregated;\n\n final RandomDataGenerator randomDataGenerator = new RandomDataGenerator(100);\n // Create Set A\n StorelessUnivariateStatistic statA = getUnivariateStatistic();\n for (int i = 0; i < 10; i++) {\n final double val = randomDataGenerator.nextGaussian();\n statA.increment(val);\n statU.increment(val);\n }\n\n aggregated.aggregate((T) statA);\n assertEquals(statA.getN(), statAgg.getN(), getTolerance());\n assertEquals(statA.getResult(), statAgg.getResult(), getTolerance());\n\n // Create Set B\n StorelessUnivariateStatistic statB = getUnivariateStatistic();\n for (int i = 0; i < 4; i++) {\n final double val = randomDataGenerator.nextGaussian();\n statB.increment(val);\n statU.increment(val);\n }\n\n aggregated.aggregate((T) statB);\n assertEquals(statU.getN(), statAgg.getN(), getTolerance());\n assertEquals(statU.getResult(), statAgg.getResult(), getTolerance());\n }",
"public void setAggregateOn(PropertyDefinitionBase aggregateOn) {\n\t\tthis.aggregateOn = aggregateOn;\n\t}",
"void setAxisTypes(AxisType... axisTypes);",
"void setAggregationStrategy(AggregationStrategy aggregationStrategy);",
"public void setTypes(Collection<? extends Object> types) {\r\n\t\tsetArcTypes(types);\r\n\t}",
"void addAggregationProperty(String columnId, AggregationInfo.Type type);",
"public static <T> AggregateFunctionBuilder<T> forType(DataType<T> type){\r\n return new AggregateFunctionBuilder<T>(type);\r\n }",
"void addAggregationProperty(Table.Column columnId, AggregationInfo.Type type);",
"void setTypes(TypeDescription[] aTypes);",
"private void aggregate () {\n if (agg != null) {\n List atoms = new LinkedList();\n try {\n agg.aggregate(rawResultSet.getAllAtoms(), atoms);\n }\n catch (Exception eek) {\n eek.printStackTrace();\n }\n aggResultSet.replaceAggregated(atoms);\n }\n }",
"public AggregateAttribute(int attrIndex, int aggregateType) {\n this.attrIndex = attrIndex;\n this.aggregateType = aggregateType;\n this.aggregateValDataType = 0;\n switch (aggregateType) {\n case Attribute.MIN:\n aggregateVal = null;\n break;\n case Attribute.MAX:\n aggregateVal = null;\n break;\n case Attribute.COUNT:\n aggregateVal = 0;\n break;\n case Attribute.AVG:\n aggregateVal = 0;\n totalSum = 0;\n totalCount = 0;\n break;\n }\n }",
"@Override\n\tpublic boolean isAggregate() {\n\t\treturn true;\n\t}",
"public AggregationQuery(\n final CommonQueryOptions commonQueryOptions,\n final AggregateTypeQueryOptions<P, R, T> dataTypeQueryOptions,\n final IndexQueryOptions indexQueryOptions,\n final QueryConstraints queryConstraints) {\n super(commonQueryOptions, dataTypeQueryOptions, indexQueryOptions, queryConstraints);\n }",
"public String aggregationType() {\n return this.aggregationType;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method corresponds to the database table map_room_build_apdt | MapRoomBuildApdt selectByPrimaryKey(Integer id); | [
"public void doBuild() throws TorqueException\n {\n dbMap = Torque.getDatabaseMap(\"cream\");\n\n dbMap.addTable(\"OPPORTUNITY\");\n TableMap tMap = dbMap.getTable(\"OPPORTUNITY\");\n\n tMap.setPrimaryKeyMethod(TableMap.NATIVE);\n\n\n tMap.addPrimaryKey(\"OPPORTUNITY.OPPORTUNITY_ID\", new Integer(0));\n tMap.addColumn(\"OPPORTUNITY.OPPORTUNITY_CODE\", \"\");\n tMap.addColumn(\"OPPORTUNITY.STATUS\", new Integer(0));\n tMap.addColumn(\"OPPORTUNITY.PRIORITY\", new Integer(0));\n tMap.addColumn(\"OPPORTUNITY.OPPORTUNITY_TYPE\", new Integer(0));\n tMap.addColumn(\"OPPORTUNITY.OPPORTUNITY_NAME\", \"\");\n tMap.addForeignKey(\n \"OPPORTUNITY.OPPORTUNITY_CAT_ID\", new Integer(0) , \"OPPORTUNITY_CATEGORY\" ,\n \"OPPORTUNITY_CAT_ID\");\n tMap.addForeignKey(\n \"OPPORTUNITY.LEAD_SOURCE_ID\", new Integer(0) , \"LEAD_SOURCE\" ,\n \"LEAD_SOURCE_ID\");\n tMap.addColumn(\"OPPORTUNITY.ISSUED_DATE\", new Date());\n tMap.addColumn(\"OPPORTUNITY.EXPECTED_DATE\", new Date());\n tMap.addColumn(\"OPPORTUNITY.CLOSED_DATE\", new Date());\n tMap.addForeignKey(\n \"OPPORTUNITY.CUSTOMER_ID\", new Integer(0) , \"CUSTOMER\" ,\n \"CUSTOMER_ID\");\n tMap.addForeignKey(\n \"OPPORTUNITY.PROJECT_ID\", new Integer(0) , \"PROJECT\" ,\n \"PROJECT_ID\");\n tMap.addForeignKey(\n \"OPPORTUNITY.CURRENCY_ID\", new Integer(0) , \"CURRENCY\" ,\n \"CURRENCY_ID\");\n tMap.addColumn(\"OPPORTUNITY.CURRENCY_AMOUNT\", new BigDecimal(0));\n tMap.addColumn(\"OPPORTUNITY.SALES_STAGE\", new Integer(0));\n tMap.addColumn(\"OPPORTUNITY.PROBABILITY\", new Integer(0));\n tMap.addColumn(\"OPPORTUNITY.SUBJECT\", \"\");\n tMap.addColumn(\"OPPORTUNITY.NEXT_STEPS\", \"\");\n tMap.addColumn(\"OPPORTUNITY.NOTES\", \"\");\n tMap.addColumn(\"OPPORTUNITY.CREATED\", new Date());\n tMap.addColumn(\"OPPORTUNITY.MODIFIED\", new Date());\n tMap.addColumn(\"OPPORTUNITY.CREATED_BY\", \"\");\n tMap.addColumn(\"OPPORTUNITY.MODIFIED_BY\", \"\");\n }",
"List<MapRoomBuildApdt> selectByExample(MapRoomBuildApdtExample example);",
"@Select({\r\n \"select\",\r\n \"ORG_CD, BRANCH_CD, SITE_CD, XPOS, YPOS, ZIPCODE, SIDO, GUGUN, DONG, START_BUNJI, \",\r\n \"END_BUNJI, DETAIL_ADDR, H_NICE_START_TIME, H_NICE_END_TIME, H_OPER_START_TIME, \",\r\n \"H_OPER_END_TIME, ALARM, AIRFRESHENER, NICEEYE, FINGERLOCK, SAFE_TYPE, IN_PLACE_YN, \",\r\n \"BOOTH_SET_YN, BOOTH_FIX_YN, POS_ALARM_YN, FRONT_BRANCH_YN, FRONT_BRANCH_TYPE, \",\r\n \"FRONT_BRANCH_MNG_TYPE, STORE_TYPE, STORE_DETAIL_TYPE, OPER_DETAIL_CD, BOOTH_MADE_CD, \",\r\n \"BOOTH_MADE_TYPE, BOOTH_MADE_YEAR, NOTICE_HOLDER_CNT, NEW_ADDR, SET_BUILDING, \",\r\n \"OUT_SIGN_TYPE, FIRST_MANAGE_DATE, SET_FLOOR, SEND_PERIOD, SET_AGENT_YN, COOL_HEAT_TYPE, \",\r\n \"WASTE_BASKET_TYPE, POST_HOLDER_CNT, FIRE_EX_CNT, SPEC_CRUSH_CNT, BANKBOOK_DEVICE_CNT, \",\r\n \"BILL_MANAGE_CNT, CCTV_TYPE, WIRELESS_MODEM_YN, MODEM_RELAY_YN, IC_MODULE_YN, \",\r\n \"SPECS_YN, SHOCK_PACK_YN, SIGN_YN, TOPER_YN, REG_ID, REG_DT, EDIT_ID, EDIT_DT\",\r\n \"from OP.T_CM_SITE_01\",\r\n \"where ORG_CD = #{orgCd,jdbcType=VARCHAR}\",\r\n \"and BRANCH_CD = #{branchCd,jdbcType=VARCHAR}\",\r\n \"and SITE_CD = #{siteCd,jdbcType=VARCHAR}\"\r\n })\r\n @Results({\r\n @Result(column=\"ORG_CD\", property=\"orgCd\", jdbcType=JdbcType.VARCHAR, id=true),\r\n @Result(column=\"BRANCH_CD\", property=\"branchCd\", jdbcType=JdbcType.VARCHAR, id=true),\r\n @Result(column=\"SITE_CD\", property=\"siteCd\", jdbcType=JdbcType.VARCHAR, id=true),\r\n @Result(column=\"XPOS\", property=\"xpos\", jdbcType=JdbcType.DECIMAL),\r\n @Result(column=\"YPOS\", property=\"ypos\", jdbcType=JdbcType.DECIMAL),\r\n @Result(column=\"ZIPCODE\", property=\"zipcode\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"SIDO\", property=\"sido\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"GUGUN\", property=\"gugun\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"DONG\", property=\"dong\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"START_BUNJI\", property=\"startBunji\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"END_BUNJI\", property=\"endBunji\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"DETAIL_ADDR\", property=\"detailAddr\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"H_NICE_START_TIME\", property=\"hNiceStartTime\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"H_NICE_END_TIME\", property=\"hNiceEndTime\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"H_OPER_START_TIME\", property=\"hOperStartTime\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"H_OPER_END_TIME\", property=\"hOperEndTime\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"ALARM\", property=\"alarm\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"AIRFRESHENER\", property=\"airfreshener\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"NICEEYE\", property=\"niceeye\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"FINGERLOCK\", property=\"fingerlock\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"SAFE_TYPE\", property=\"safeType\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"IN_PLACE_YN\", property=\"inPlaceYn\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"BOOTH_SET_YN\", property=\"boothSetYn\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"BOOTH_FIX_YN\", property=\"boothFixYn\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"POS_ALARM_YN\", property=\"posAlarmYn\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"FRONT_BRANCH_YN\", property=\"frontBranchYn\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"FRONT_BRANCH_TYPE\", property=\"frontBranchType\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"FRONT_BRANCH_MNG_TYPE\", property=\"frontBranchMngType\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"STORE_TYPE\", property=\"storeType\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"STORE_DETAIL_TYPE\", property=\"storeDetailType\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"OPER_DETAIL_CD\", property=\"operDetailCd\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"BOOTH_MADE_CD\", property=\"boothMadeCd\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"BOOTH_MADE_TYPE\", property=\"boothMadeType\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"BOOTH_MADE_YEAR\", property=\"boothMadeYear\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"NOTICE_HOLDER_CNT\", property=\"noticeHolderCnt\", jdbcType=JdbcType.OTHER),\r\n @Result(column=\"NEW_ADDR\", property=\"newAddr\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"SET_BUILDING\", property=\"setBuilding\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"OUT_SIGN_TYPE\", property=\"outSignType\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"FIRST_MANAGE_DATE\", property=\"firstManageDate\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"SET_FLOOR\", property=\"setFloor\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"SEND_PERIOD\", property=\"sendPeriod\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"SET_AGENT_YN\", property=\"setAgentYn\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"COOL_HEAT_TYPE\", property=\"coolHeatType\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"WASTE_BASKET_TYPE\", property=\"wasteBasketType\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"POST_HOLDER_CNT\", property=\"postHolderCnt\", jdbcType=JdbcType.OTHER),\r\n @Result(column=\"FIRE_EX_CNT\", property=\"fireExCnt\", jdbcType=JdbcType.OTHER),\r\n @Result(column=\"SPEC_CRUSH_CNT\", property=\"specCrushCnt\", jdbcType=JdbcType.OTHER),\r\n @Result(column=\"BANKBOOK_DEVICE_CNT\", property=\"bankbookDeviceCnt\", jdbcType=JdbcType.OTHER),\r\n @Result(column=\"BILL_MANAGE_CNT\", property=\"billManageCnt\", jdbcType=JdbcType.OTHER),\r\n @Result(column=\"CCTV_TYPE\", property=\"cctvType\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"WIRELESS_MODEM_YN\", property=\"wirelessModemYn\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"MODEM_RELAY_YN\", property=\"modemRelayYn\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"IC_MODULE_YN\", property=\"icModuleYn\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"SPECS_YN\", property=\"specsYn\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"SHOCK_PACK_YN\", property=\"shockPackYn\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"SIGN_YN\", property=\"signYn\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"TOPER_YN\", property=\"toperYn\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"REG_ID\", property=\"regId\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"REG_DT\", property=\"regDt\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"EDIT_ID\", property=\"editId\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"EDIT_DT\", property=\"editDt\", jdbcType=JdbcType.TIMESTAMP)\r\n })\r\n TCmSite01 selectByPrimaryKey(TCmSite01Key key);",
"@Select({\n \"select\",\n \"id, activity_id, user_id, create_time, create_by, name, age, head_img, grade, \",\n \"phone, address\",\n \"from activity_signup\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @Results(id=\"signupMap\",value={\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"activity_id\", property=\"activityId\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"user_id\", property=\"userId\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"create_time\", property=\"createTime\", jdbcType=JdbcType.TIMESTAMP),\n @Result(column=\"create_by\", property=\"createBy\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"head_img\", property=\"headImg\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"grade\", property=\"grade\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"phone\", property=\"phone\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"address\", property=\"address\", jdbcType=JdbcType.VARCHAR)\n })\n ActivitySignup selectByPrimaryKey(Integer id);",
"@Select({\n \"select\",\n \"division_sn_code, div_version, start_date, end_date, pre_jobs, version_date, \",\n \"version_man_code\",\n \"from eng_division_plan\",\n \"where division_sn_code = #{divisionSnCode,jdbcType=VARCHAR}\",\n \"and div_version = #{divVersion,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"division_sn_code\", property=\"divisionSnCode\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"div_version\", property=\"divVersion\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"start_date\", property=\"startDate\", jdbcType=JdbcType.DATE),\n @Result(column=\"end_date\", property=\"endDate\", jdbcType=JdbcType.DATE),\n @Result(column=\"pre_jobs\", property=\"preJobs\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"version_date\", property=\"versionDate\", jdbcType=JdbcType.DATE),\n @Result(column=\"version_man_code\", property=\"versionManCode\", jdbcType=JdbcType.VARCHAR)\n })\n EngDivisionPlan selectByPrimaryKey(EngDivisionPlanKey key);",
"org.lindbergframework.schema.LinpMappingDocument.LinpMapping.SqlMapping getSqlMapping();",
"org.lindbergframework.schema.LinpMappingDocument.LinpMapping.SqlMapping addNewSqlMapping();",
"public interface ConfigInfoBetaMapper extends Mapper {\n \n /**\n * Update beta configuration information.\n * UPDATE config_info_beta SET content=?, md5=?, beta_ips=?, src_ip=?,src_user=?,gmt_modified=?,app_name=?\n * WHERE data_id=? AND group_id=? AND tenant_id=? AND (md5=? or md5 is null or md5='')\n *\n * @return The sql of updating beta configuration information.\n */\n default String updateConfigInfo4BetaCas() {\n return \"UPDATE config_info_beta SET content = ?,md5 = ?,beta_ips = ?,src_ip = ?,src_user = ?,gmt_modified = ?,app_name = ? \"\n + \"WHERE data_id = ? AND group_id = ? AND tenant_id = ? AND (md5 = ? OR md5 is null OR md5 = '')\";\n }\n \n /**\n * Query all beta config info for dump task.\n * The default sql:\n * SELECT t.id,data_id,group_id,tenant_id,app_name,content,md5,gmt_modified,beta_ips,encrypted_data_key\n * FROM ( SELECT id FROM config_info_beta ORDER BY id LIMIT startRow,pageSize ) g, config_info_beta t WHERE g.id = t.id\n *\n * @param startRow The start index.\n * @param pageSize The size of page.\n * @return The sql of querying all beta config info for dump task.\n */\n String findAllConfigInfoBetaForDumpAllFetchRows(int startRow, int pageSize);\n \n /**\n * 获取返回表名.\n *\n * @return 表名\n */\n default String getTableName() {\n return TableConstant.CONFIG_INFO_BETA;\n }\n}",
"GoodsYwMapping selectByPrimaryKey(Long mapId);",
"private void createAttributeMappingTable() {\n\t\tString table;\n\t\tString sql;\n\t\t\n\t\tConnectionManager.initParametersFromFile();\n\t\t\n\t\tfor (Feature feature : featureInstanceVectorListMap.keySet()) {\n\t\t\t\n\t\t\ttable \t= \"SIGNATURE_DISCOVERY_\" + feature.toString() + \"_MAPPING\";\n\t\t\t\n\t /*\n\t * Drop table first\n\t */\n\t \tsql = \"DROP TABLE \" + table;\n\t \tSystem.out.println(sql);\n\t try {\n\t ConnectionManager.executeStatement(sql);\n\t } catch (Exception e) {\n\t// \te.printStackTrace();\n\t// \tConnectionManager.close();\n\t// \treturn;\n\t }\t\t\n\t\t\t\n\t\t\t/*\n\t\t\t * Create table\n\t\t\t */\n\t sql \t= \"CREATE TABLE \" + table + \" \";\n\t sql \t+= \"(\";\n\t sql \t+= \"Code VARCHAR,\";\n\t sql \t+= \"Activity VARCHAR\";\n\t sql \t+= \")\";\n\t \n\t System.out.println(sql);\n\t \n\t try {\n\t ConnectionManager.executeStatement(sql);\n\t } catch (Exception e) {\n\t \te.printStackTrace();\n\t \tConnectionManager.close();\n\t \treturn;\n\t }\n\t \n\t /*\n\t * Insert data into table\n\t */\n\t System.out.println(\"INSERT INTO \" + table);\n\t \n\t for (String activityName : activityCharMap.keySet()) {\n\t \t// only take activity name, not traceID\n\t \tif (activityName.contains(\"-\")) {\n\t\t sql = \"INSERT INTO \" + table + \" VALUES('\" + activityCharMap.get(activityName).trim() + \"','\" + activityName.trim();\n\t\t sql += \"')\";\n\t//\t System.out.println(sql);\n\t\t try {\n\t\t ConnectionManager.executeStatement(sql);\n\t\t } catch (Exception e) {\n\t\t \te.printStackTrace();\n\t\t }\t \n\t \t} \n\t }\n\t\t}\n \n ConnectionManager.close();\n\t}",
"public interface GeneratedDTimingsDao extends Dao<DTimings, java.lang.Long> {\n\n\t/** Column name for primary key attribute is \"id\" */\n\tstatic final String COLUMN_NAME_ID = \"id\";\n\n\t/** Column name for parent raceKey is \"raceKey\" */\n\tstatic final String COLUMN_NAME_RACEKEY = \"raceKey\";\n\n\n\t/** Column name for field bibNumber is \"bibNumber\" */\n\tstatic final String COLUMN_NAME_BIBNUMBER = \"bibNumber\";\n\t/** Column name for field createdBy is \"createdBy\" */\n\tstatic final String COLUMN_NAME_CREATEDBY = \"createdBy\";\n\t/** Column name for field createdDate is \"createdDate\" */\n\tstatic final String COLUMN_NAME_CREATEDDATE = \"createdDate\";\n\t/** Column name for field updatedBy is \"updatedBy\" */\n\tstatic final String COLUMN_NAME_UPDATEDBY = \"updatedBy\";\n\t/** Column name for field updatedDate is \"updatedDate\" */\n\tstatic final String COLUMN_NAME_UPDATEDDATE = \"updatedDate\";\n\n\t/** The list of attribute names */\n\tstatic final List<String> COLUMN_NAMES = Arrays.asList(\t\tCOLUMN_NAME_BIBNUMBER,\n\t\tCOLUMN_NAME_CREATEDBY,\n\t\tCOLUMN_NAME_CREATEDDATE,\n\t\tCOLUMN_NAME_UPDATEDBY,\n\t\tCOLUMN_NAME_UPDATEDDATE);\n\t/** The list of Basic attribute names */\n\tstatic final List<String> BASIC_NAMES = Arrays.asList(\t\tCOLUMN_NAME_BIBNUMBER,\n\t\tCOLUMN_NAME_CREATEDBY,\n\t\tCOLUMN_NAME_CREATEDDATE,\n\t\tCOLUMN_NAME_UPDATEDBY,\n\t\tCOLUMN_NAME_UPDATEDDATE);\n\t/** The list of attribute names */\n\tstatic final List<String> MANY_TO_ONE_NAMES = Arrays.asList();\n\n\n\t// ----------------------- parent finder -------------------------------\n\t/**\n\t * query-by method for parent field raceKey\n\t * @param raceKey the specified attribute\n\t * @return an Iterable of DTimingss with the specified parent\n\t */\n\tIterable<DTimings> queryByRaceKey(Object raceKey);\n\t\t\n\t/**\n\t * query-keys-by method for parent field raceKey\n\t * @param raceKey the specified attribute\n\t * @return an Iterable of DTimingss with the specified parent\n\t */\n\tIterable<java.lang.Long> queryKeysByRaceKey(Object raceKey);\n\n\t/**\n\t * query-page-by method for parent field raceKey\n\t * @param raceKey the specified attribute\n * @param pageSize the number of domain entities in the page\n * @param cursorString non-null if get next page\n\t * @return a Page of DTimingss for the specified raceKey (parent)\n\t */\n\tCursorPage<DTimings, java.lang.Long> queryPageByRaceKey(java.lang.Object raceKey,\n int pageSize, String cursorString);\n\n\t// ----------------------- field finders -------------------------------\n\t/**\n\t * query-by method for field bibNumber\n\t * @param bibNumber the specified attribute\n\t * @return an Iterable of DTimingss for the specified bibNumber\n\t */\n\tIterable<DTimings> queryByBibNumber(java.lang.String bibNumber);\n\t\t\n\t/**\n\t * query-keys-by method for field bibNumber\n\t * @param bibNumber the specified attribute\n\t * @return an Iterable of DTimingss for the specified bibNumber\n\t */\n\tIterable<java.lang.Long> queryKeysByBibNumber(java.lang.String bibNumber);\n\n\t/**\n\t * query-page-by method for field bibNumber\n\t * @param bibNumber the specified attribute\n * @param pageSize the number of domain entities in the page\n * @param cursorString non-null if get next page\n\t * @return a Page of DTimingss for the specified bibNumber\n\t */\n\tCursorPage<DTimings, java.lang.Long> queryPageByBibNumber(java.lang.String bibNumber,\n int pageSize, String cursorString);\n\n\n\t/**\n\t * query-by method for field createdBy\n\t * @param createdBy the specified attribute\n\t * @return an Iterable of DTimingss for the specified createdBy\n\t */\n\tIterable<DTimings> queryByCreatedBy(java.lang.String createdBy);\n\t\t\n\t/**\n\t * query-keys-by method for field createdBy\n\t * @param createdBy the specified attribute\n\t * @return an Iterable of DTimingss for the specified createdBy\n\t */\n\tIterable<java.lang.Long> queryKeysByCreatedBy(java.lang.String createdBy);\n\n\t/**\n\t * query-page-by method for field createdBy\n\t * @param createdBy the specified attribute\n * @param pageSize the number of domain entities in the page\n * @param cursorString non-null if get next page\n\t * @return a Page of DTimingss for the specified createdBy\n\t */\n\tCursorPage<DTimings, java.lang.Long> queryPageByCreatedBy(java.lang.String createdBy,\n int pageSize, String cursorString);\n\n\n\t/**\n\t * query-by method for field createdDate\n\t * @param createdDate the specified attribute\n\t * @return an Iterable of DTimingss for the specified createdDate\n\t */\n\tIterable<DTimings> queryByCreatedDate(java.util.Date createdDate);\n\t\t\n\t/**\n\t * query-keys-by method for field createdDate\n\t * @param createdDate the specified attribute\n\t * @return an Iterable of DTimingss for the specified createdDate\n\t */\n\tIterable<java.lang.Long> queryKeysByCreatedDate(java.util.Date createdDate);\n\n\t/**\n\t * query-page-by method for field createdDate\n\t * @param createdDate the specified attribute\n * @param pageSize the number of domain entities in the page\n * @param cursorString non-null if get next page\n\t * @return a Page of DTimingss for the specified createdDate\n\t */\n\tCursorPage<DTimings, java.lang.Long> queryPageByCreatedDate(java.util.Date createdDate,\n int pageSize, String cursorString);\n\n\n\t/**\n\t * query-by method for field updatedBy\n\t * @param updatedBy the specified attribute\n\t * @return an Iterable of DTimingss for the specified updatedBy\n\t */\n\tIterable<DTimings> queryByUpdatedBy(java.lang.String updatedBy);\n\t\t\n\t/**\n\t * query-keys-by method for field updatedBy\n\t * @param updatedBy the specified attribute\n\t * @return an Iterable of DTimingss for the specified updatedBy\n\t */\n\tIterable<java.lang.Long> queryKeysByUpdatedBy(java.lang.String updatedBy);\n\n\t/**\n\t * query-page-by method for field updatedBy\n\t * @param updatedBy the specified attribute\n * @param pageSize the number of domain entities in the page\n * @param cursorString non-null if get next page\n\t * @return a Page of DTimingss for the specified updatedBy\n\t */\n\tCursorPage<DTimings, java.lang.Long> queryPageByUpdatedBy(java.lang.String updatedBy,\n int pageSize, String cursorString);\n\n\n\t/**\n\t * query-by method for field updatedDate\n\t * @param updatedDate the specified attribute\n\t * @return an Iterable of DTimingss for the specified updatedDate\n\t */\n\tIterable<DTimings> queryByUpdatedDate(java.util.Date updatedDate);\n\t\t\n\t/**\n\t * query-keys-by method for field updatedDate\n\t * @param updatedDate the specified attribute\n\t * @return an Iterable of DTimingss for the specified updatedDate\n\t */\n\tIterable<java.lang.Long> queryKeysByUpdatedDate(java.util.Date updatedDate);\n\n\t/**\n\t * query-page-by method for field updatedDate\n\t * @param updatedDate the specified attribute\n * @param pageSize the number of domain entities in the page\n * @param cursorString non-null if get next page\n\t * @return a Page of DTimingss for the specified updatedDate\n\t */\n\tCursorPage<DTimings, java.lang.Long> queryPageByUpdatedDate(java.util.Date updatedDate,\n int pageSize, String cursorString);\n\n\n\t\t \n\t// ----------------------- one-to-one finders -------------------------\n\n\t// ----------------------- many-to-one finders -------------------------\n\t\n\t// ----------------------- many-to-many finders -------------------------\n\n\t// ----------------------- uniqueFields finders -------------------------\n\t\n\t\n\t// ----------------------- populate / persist method -------------------------\n\n\t/**\n\t * Persist an entity given all attributes\n\t */\n\tDTimings persist(Object raceKey, \t\n\t\tjava.lang.Long id, \n\t\tjava.lang.String bibNumber);\t\n\n}",
"@Select({\n \"select\",\n \"id, status, power_one, power_two, power_three, temperature_one, temperature_two, \",\n \"temperature_three, value_one, value_two, value_three, value_four, device_name, \",\n \"device_key, tenant_id, alarm_value_one, alarm_value_two\",\n \"from cabinet_info\",\n \"where id = #{id,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"status\", property=\"status\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"power_one\", property=\"powerOne\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"power_two\", property=\"powerTwo\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"power_three\", property=\"powerThree\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"temperature_one\", property=\"temperatureOne\", jdbcType=JdbcType.DECIMAL),\n @Result(column=\"temperature_two\", property=\"temperatureTwo\", jdbcType=JdbcType.DECIMAL),\n @Result(column=\"temperature_three\", property=\"temperatureThree\", jdbcType=JdbcType.DECIMAL),\n @Result(column=\"value_one\", property=\"valueOne\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"value_two\", property=\"valueTwo\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"value_three\", property=\"valueThree\", jdbcType=JdbcType.DECIMAL),\n @Result(column=\"value_four\", property=\"valueFour\", jdbcType=JdbcType.DECIMAL),\n @Result(column=\"device_name\", property=\"deviceName\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"device_key\", property=\"deviceKey\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"tenant_id\", property=\"tenantId\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"alarm_value_one\", property=\"alarmValueOne\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"alarm_value_two\", property=\"alarmValueTwo\", jdbcType=JdbcType.INTEGER)\n })\n CabinetInfo selectByPrimaryKey(String id);",
"@Select({ \"select\", \"app_id, app_name, node, status, restart_times, up_time, template, owner, note, \",\n\t\t\t\"rest3, rest4, rest5, create_time, uuid\", \"from iiot_app_list\",\n\t\t\t\"where app_id = #{appId,jdbcType=INTEGER}\" })\n\t@Results({ @Result(column = \"app_id\", property = \"appId\", jdbcType = JdbcType.INTEGER, id = true),\n\t\t\t@Result(column = \"app_name\", property = \"appName\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"node\", property = \"node\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"status\", property = \"status\", jdbcType = JdbcType.INTEGER),\n\t\t\t@Result(column = \"restart_times\", property = \"restartTimes\", jdbcType = JdbcType.CHAR),\n\t\t\t@Result(column = \"up_time\", property = \"upTime\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"template\", property = \"template\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"owner\", property = \"owner\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"note\", property = \"note\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"rest3\", property = \"rest3\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"rest4\", property = \"rest4\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"rest5\", property = \"rest5\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"create_time\", property = \"createTime\", jdbcType = JdbcType.TIMESTAMP),\n\t\t\t@Result(column = \"uuid\", property = \"uuid\", jdbcType = JdbcType.CHAR) })\n\tIiotAppList selectByPrimaryKey(Integer appId);",
"public void generateInternalMapping() {// This method is used to generate\n\t\t// OJB Internal mapping\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter\n\t\t\t\t.write(\"<!-- *******************\"\n\t\t\t\t\t\t+ \"******* OJB INTERNAL MAPPING BEGINS HERE ****************** -->\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t<class-descriptor\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\tclass=\"\n\t\t\t\t+ \"\\\"org.apache.ojb.broker.util.sequence.HighLowSequence\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\ttable=\" + \"\\\"OJB_HL_SEQ\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t>\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t<object-cache class=\"\n\t\t\t\t+ \"\\\"org.apache.ojb.broker.cache.ObjectCacheEmptyImpl\\\"\" + \">\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t</object-cache>\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t<field-descriptor\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\tname=\" + \"\\\"name\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\tcolumn=\" + \"\\\"tablename\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\tjdbc-type=\" + \"\\\"VARCHAR\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\tprimarykey=\" + \"\\\"true\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t/>\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t<field-descriptor\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\tname=\" + \"\\\"maxKey\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\tcolumn=\" + \"\\\"MAX_KEY\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\tjdbc-type=\" + \"\\\"BIGINT\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t/>\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t<field-descriptor\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\tname=\" + \"\\\"grabSize\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\tcolumn=\" + \"\\\"GRAB_SIZE\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\tjdbc-type=\" + \"\\\"INTEGER\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t/>\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t<field-descriptor\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\t\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\tname=\" + \"\\\"version\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\tcolumn=\" + \"\\\"VERSION\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\tjdbc-type=\" + \"\\\"INTEGER\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\tlocking=\" + \"\\\"true\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t/>\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t</class-descriptor>\");\n\t\tprintWriter.write(\"\\n\");\n\t}",
"@Select({\n \"select\",\n \"JNLNO, TRANDATE, ACCOUNTDATE, CHECKTYPE, STATUS, DONETIME, FILENAME\",\n \"from B_UMB_CHECKING_LOG\",\n \"where JNLNO = #{jnlno,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"JNLNO\", property=\"jnlno\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"TRANDATE\", property=\"trandate\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"ACCOUNTDATE\", property=\"accountdate\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"CHECKTYPE\", property=\"checktype\", jdbcType=JdbcType.CHAR),\n @Result(column=\"STATUS\", property=\"status\", jdbcType=JdbcType.CHAR),\n @Result(column=\"DONETIME\", property=\"donetime\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"FILENAME\", property=\"filename\", jdbcType=JdbcType.VARCHAR)\n })\n BUMBCheckingLog selectByPrimaryKey(BUMBCheckingLogKey key);",
"@Select({\n \"select\",\n \"id, cate_back_id, cate_front, brand_id, type, title, subtitle, product_desc_id, \",\n \"specs_desc_id, support_desc_id, main_image_id, resource, status, created_at, \",\n \"modified_at, is_deleted\",\n \"from mt_product_spu\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"cate_back_id\", property=\"cateBackId\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"cate_front\", property=\"cateFront\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"brand_id\", property=\"brandId\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"title\", property=\"title\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"subtitle\", property=\"subtitle\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"product_desc_id\", property=\"productDescId\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"specs_desc_id\", property=\"specsDescId\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"support_desc_id\", property=\"supportDescId\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"main_image_id\", property=\"mainImageId\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"resource\", property=\"resource\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"status\", property=\"status\", jdbcType=JdbcType.TINYINT),\n @Result(column=\"created_at\", property=\"createdAt\", jdbcType=JdbcType.TIMESTAMP),\n @Result(column=\"modified_at\", property=\"modifiedAt\", jdbcType=JdbcType.TIMESTAMP),\n @Result(column=\"is_deleted\", property=\"isDeleted\", jdbcType=JdbcType.TINYINT)\n })\n Spu selectByPrimaryKey(Integer id);",
"public interface EmpDao {\n\n\n /**\n * 根据参数查询列表\n * @param map\n * @return\n */\n\n// select empno,ENAME,job,mgr,hiredate,sal,comm,deptno from emp\n @Select(\"<script>\" +\n \"select a.empno,a.ename,a.job,a.mgr,to_char(a.hiredate,'yyyy-mm-dd') hiredate,a.sal,a.comm,a.deptno,a.mgrname,a.dname,a.rn from \" +\n \"(select b.*,rownum rn from \" +\n \"(select e.*,d.dname from (select e1.*,e2.ename mgrname from emp e1 left join emp e2 on e1.mgr=e2.empno) e left join dept d on e.deptno=d.deptno \" +\n \"<where>\" +\n \"<if test='ename!=null'>and e.ename like '%'||#{ename}||'%' </if>\" +\n \"<if test='job!=null'>and e.job like '%'||#{job}||'%' </if>\" +\n \"</where>\" +\n \"order by empno desc) b where rownum < #{end}) a where a.rn > #{start}\" +\n \"</script>\")\n List<Map> getList(Map map);\n\n\n /**\n * 带条件查询总条数\n * @param map\n * @return\n */\n @Select(\"<script>\"+\n \"select count(*) from emp <where>\" +\n \"<if test='ename != null'> and ename like '%${ename}%'</if>\"+\n \"<if test='job != null'> and job like '%${job}%'</if>\"+\n \"</where></script>\")\n int getPageCount(Map map);\n /**\n * 添加\n * @param map\n * @return\n */\n// seq_emp_id.nextval,ename, job, hiredate, sal, comm,deptno\n @Insert(\"insert into emp values(seq_emp_id.nextval,#{ENAME},#{JOB},#{MGR},to_date(#{HIREDATE},'yyyy-mm-dd'),#{SAL},#{COMM},#{DEPTNO})\")\n int add(Map map);\n\n\n /**\n * 更新\n * @param map\n * @return\n */\n @Update(\"update emp set ename=#{ENAME},job=#{JOB},mgr=#{MGR},hiredate=to_date(#{HIREDATE},'yyyy-mm-dd'),sal=#{SAL},comm=#{COMM},deptno=#{DEPTNO} where empno=#{EMPNO}\")\n int update(Map map);\n\n /**\n * 删除\n * @param deptNo\n * @return\n */\n @Delete(\"delete from emp where empno=#{EMPNO}\")\n int delete(int deptNo);\n\n /**\n * 获取所有部门,用于页面数据绑定\n * @return\n */\n @Select(\"select deptno,dname from dept\")\n List<Map> getDeptType();\n\n /**\n * 获取所有职位,用于页面数据绑定\n * @return\n */\n @Select(\"select distinct(job) from emp\")\n List<Map> getJob();\n\n /**\n * 获取上司,用于页面数据绑定\n * @return\n */\n @Select(\"select empno,ename from emp where job='PRESIDENT' or job='MANAGER' or job='ANALYST'\")\n List<Map> getMgr();\n\n\n}",
"public void generateUserDefinedMapping() {// This method is used to\n\t\t// generate the user defined\n\t\t// mapping for OJB\n\t\tprintWriter\n\t\t\t\t.write(\"<!--********************\"\n\t\t\t\t\t\t+ \"*********OJB USER DEFINED MAPPING BEGINS HERE *********************************-->\");\n\t\tSolutionsAdapter sAdapter = saReader.getSA();\n\t\tDataObjectType dataObject = sAdapter.getDataObject();\n\t\tList listGroup = dataObject.getGroup();\n\t\tfor (Iterator groupIter = listGroup.iterator(); groupIter.hasNext();) {\n\t\t\tGroupList groupList = (GroupList) groupIter.next();\n\t\t\tList classList = groupList.getClasses();\n\t\t\tfor (int j = 0; j < classList.size(); j++) {\n\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\tprintWriter\n\t\t\t\t\t\t.write(\"<!--**************************** \"\n\t\t\t\t\t\t\t\t+ (j + 1)\n\t\t\t\t\t\t\t\t+ \" Object-Table Mapping *******************************************-->\");\n\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\tClassList classesList = (ClassList) classList.get(j);\n\t\t\t\tString className = classesList.getClassName();\n\t\t\t\tprintWriter.write(\"\\t\\t<class-descriptor \");\n\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\tprintWriter.write(\"\\t\\t\\tclass=\" + \"\\\"\" + className + \"\\\"\");// java\n\t\t\t\t// class\n\t\t\t\t// name\n\t\t\t\t// for\n\t\t\t\t// mapping\n\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\t// Specifies the table name for the class\n\t\t\t\tString onlyTableName = getTableName(className);\n\t\t\t\t// String onlyTableName =\n\t\t\t\t// className.substring(className.lastIndexOf(\".\")+1,className.length());\n\t\t\t\tprintWriter.write(\"\\t\\t\\ttable=\" + \"\\\"\" + onlyTableName + \"\\\"\");// table\n\t\t\t\t// name\n\t\t\t\t// for\n\t\t\t\t// mapping\n\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\tprintWriter.write(\"\\t\\t>\");// closing > of class descriptor\n\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\tList fieldList = classesList.getFields();\n\t\t\t\tfor (int k = 0; k < fieldList.size(); k++) {\n\t\t\t\t\tprintWriter.write(\"\\t\\t <field-descriptor\");\n\t\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\t\tFieldNameList listField = (FieldNameList) fieldList.get(k);\n\t\t\t\t\tprintWriter.write(\"\\t\\t\\tname=\" + \"\\\"\"\n\t\t\t\t\t\t\t+ listField.getFieldName() + \"\\\"\");\n\t\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\t\tList dodsMapList = listField.getDODSMap();\n\t\t\t\t\tfor (int l = 0; l < dodsMapList.size(); l++) {\n\t\t\t\t\t\tDSMapList dsType = (DSMapList) dodsMapList.get(l);\n\t\t\t\t\t\tprintWriter.write(\"\\t\\t\\tcolumn=\" + \"\\\"\"\n\t\t\t\t\t\t\t\t+ dsType.getFieldName() + \"\\\"\");\n\t\t\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\t\t\tString jdbcType = getJDBCType(listField.getFieldType());\n\t\t\t\t\t\tprintWriter.write(\"\\t\\t\\tjdbc-type=\" + \"\\\"\" + jdbcType\n\t\t\t\t\t\t\t\t+ \"\\\"\");// jdbc type\n\t\t\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\t\t\tif (dsType.getPrimaryKey().equals(\"true\")) {\n\t\t\t\t\t\t\tprintWriter\n\t\t\t\t\t\t\t\t\t.write(\"\\t\\t\\tprimarykey=\" + \"\\\"true\\\" \");\n\t\t\t\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\t\t\t\tprintWriter.write(\"\\t\\t\\tautoincrement=\"\n\t\t\t\t\t\t\t\t\t+ \"\\\"false\\\" \");\n\t\t\t\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// do nothing\n\t\t\t\t\t\t}\n\t\t\t\t\t\tprintWriter.write(\"\\t\\t/>\");// end tag for field\n\t\t\t\t\t\t// descriptor\n\t\t\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tprintWriter.write(\"\\t\\t</class-descriptor>\");// end tag for\n\t\t\t\t// class\n\t\t\t\t// descriptor\n\t\t\t}\n\t\t}\n\t}",
"MapHotelMapping selectByPrimaryKey(Integer id);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if is hardware verified. | public boolean isHardwareVerified() {
return hardwareVerified;
} | [
"boolean isFingerprintHardwarePresent();",
"@DISPID(12) //= 0xc. The runtime will prefer the VTID if present\n @VTID(28)\n boolean isVerify();",
"@SuppressWarnings(\"unused\")\n\tprivate void setHardwareVerified(boolean hardwareVerified) {\n\t\tthis.hardwareVerified = hardwareVerified;\n\t}",
"boolean hasFirmwarePresent();",
"boolean isAcquiring() throws DeviceException;",
"boolean verified() {\n return apkSigningKeyCertificateFingerprint().isPresent() && !errorMessage().isPresent();\n }",
"public boolean processCheckMachine();",
"private boolean checkExecution() {\n if (!checkPhoneStatusOK()) {\n return false;\n }\n if (!checkBatteryLevelOK()) {\n return false;\n }\n return true;\n }",
"boolean isVerified();",
"public static boolean hasTelephonyHardware(Context context) {\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.telephony\")) {\n Log.d(\"HardwareFeatureTest\", \"Device can make phone calls\");\n return true;\n }\n return false;\n }",
"boolean isDeviceSecurable();",
"public boolean isVerifyEnabled() {\n return verify;\n }",
"public boolean didTargetVerify() {\n // TODO: Remove this once host-verification can be forced to always fail?\n String output = executionResult.getFlattenedAll();\n if (output.contains(\"VerifyError\") || output.contains(\"Verification failed on class\")) {\n return false;\n }\n return true;\n }",
"private void checkFirmwareVersion() {\n if (this.getFirmwareVersion() < AluminatiData.minVictorSPXFirmwareVersion) {\n firmwareOK = false;\n DriverStation.reportWarning(this.toString() + \" has too old of firmware (may not work)\", false);\n } else {\n firmwareOK = true;\n }\n }",
"public boolean hasHardwareTokens() {\n List<TokenInfo> allTokens = getAllTokens();\n return allTokens.stream().anyMatch(tokenInfo -> !PossibleActionsRuleEngine.SOFTWARE_TOKEN_ID.equals(\n tokenInfo.getId()));\n }",
"@Override\n\tpublic boolean isHardware(){\n\t\treturn false;\n\t}",
"boolean isHardwareProfilingOn();",
"@Test\n public void hardwareTest() {\n // TODO: test hardware\n }",
"private boolean checkBackend() {\n \ttry{\n \t\tif(sendRequest(generateURL(0,\"1\")) == null ||\n \tsendRequest(generateURL(1,\"1\")) == null)\n \t\treturn true;\n \t} catch (Exception ex) {\n \t\tSystem.out.println(\"Exception is \" + ex);\n\t\t\treturn true;\n \t}\n\n \treturn false;\n \t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the saturdayEndTime2 value for this Account. | public void setSaturdayEndTime2(java.lang.String saturdayEndTime2) {
this.saturdayEndTime2 = saturdayEndTime2;
} | [
"public void setSaturdayStartTime2(java.lang.String saturdayStartTime2) {\n this.saturdayStartTime2 = saturdayStartTime2;\n }",
"public void setSaturdayEndTime1(java.lang.String saturdayEndTime1) {\n this.saturdayEndTime1 = saturdayEndTime1;\n }",
"public void setTuesdayEndTime2(java.lang.String tuesdayEndTime2) {\n this.tuesdayEndTime2 = tuesdayEndTime2;\n }",
"public void setFridayEndTime2(java.lang.String fridayEndTime2) {\n this.fridayEndTime2 = fridayEndTime2;\n }",
"public void setMondayEndTime2(java.lang.String mondayEndTime2) {\n this.mondayEndTime2 = mondayEndTime2;\n }",
"public java.lang.String getSaturdayEndTime2() {\n return saturdayEndTime2;\n }",
"public void setThursdayEndTime2(java.lang.String thursdayEndTime2) {\n this.thursdayEndTime2 = thursdayEndTime2;\n }",
"public void setWednesdayEndTime2(java.lang.String wednesdayEndTime2) {\n this.wednesdayEndTime2 = wednesdayEndTime2;\n }",
"public void setSundayEndTime1(java.lang.String sundayEndTime1) {\n this.sundayEndTime1 = sundayEndTime1;\n }",
"public void setSundayStartTime2(java.lang.String sundayStartTime2) {\n this.sundayStartTime2 = sundayStartTime2;\n }",
"public java.lang.String getSundayEndTime2() {\n return sundayEndTime2;\n }",
"public void setTuesdayEndTime1(java.lang.String tuesdayEndTime1) {\n this.tuesdayEndTime1 = tuesdayEndTime1;\n }",
"public void setFridayStartTime2(java.lang.String fridayStartTime2) {\n this.fridayStartTime2 = fridayStartTime2;\n }",
"public java.lang.String getTuesdayEndTime2() {\n return tuesdayEndTime2;\n }",
"public java.lang.String getSaturdayStartTime2() {\n return saturdayStartTime2;\n }",
"public java.lang.String getFridayEndTime2() {\n return fridayEndTime2;\n }",
"public void setFridayEndTime1(java.lang.String fridayEndTime1) {\n this.fridayEndTime1 = fridayEndTime1;\n }",
"public void setTuesdayStartTime2(java.lang.String tuesdayStartTime2) {\n this.tuesdayStartTime2 = tuesdayStartTime2;\n }",
"public void setMondayEndTime1(java.lang.String mondayEndTime1) {\n this.mondayEndTime1 = mondayEndTime1;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return the number of white key pegs by comparing this object and c. | public int getNumWhiteKeyPegs(Code c) {
return (getPeg1() == c.getPeg2() ? 1 : 0) + (getPeg1() == c.getPeg3() ? 1 : 0)
+ (getPeg1() == c.getPeg4() ? 1 : 0) + (getPeg2() == c.getPeg1() ? 1 : 0)
+ (getPeg2() == c.getPeg3() ? 1 : 0) + (getPeg2() == c.getPeg4() ? 1 : 0)
+ (getPeg3() == c.getPeg1() ? 1 : 0) + (getPeg3() == c.getPeg2() ? 1 : 0)
+ (getPeg3() == c.getPeg4() ? 1 : 0) + (getPeg4() == c.getPeg1() ? 1 : 0)
+ (getPeg4() == c.getPeg2() ? 1 : 0) + (getPeg4() == c.getPeg3() ? 1 : 0);
} | [
"public int getNumBlackKeyPegs(Code c) {\n\t\treturn (getPeg1() == c.getPeg1() ? 1 : 0) + (getPeg2() == c.getPeg2() ? 1 : 0)\n\t\t\t\t+ (getPeg3() == c.getPeg3() ? 1 : 0) + (getPeg4() == c.getPeg4() ? 1 : 0);\n\t}",
"public int numPieces(Color c)\n {\n int count = 0;\n for(Piece[] p : Grid)\n {\n for(Piece piece: p)\n {\n if(piece!=null)\n {\n if(piece.getColor()==c)\n count++;\n }\n }\n }\n return count;\n }",
"public void CountWhiteDisks(){\n int counter =0;\n for (int i=0; i<8; i++){\n for (int j=0; j<8; j++){\n if (gameboard[i][j]==W){\n counter++;\n }\n }\n }\n whitedisks = counter;\n }",
"public int countStones(char color) {\r\n\t\tif (color != 'B' && color != 'W') {\r\n\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\"Error! Invalid color. Expected B or W.\");\r\n\t\t}\r\n\r\n\t\tint counter = 0;\r\n\t\tfor (int i = 0; i < playBoard.length; i++) {\r\n\t\t\tfor (int j = 0; j < playBoard[0].length; j++) {\r\n\t\t\t\tif (playBoard[i][j] == color) {\r\n\t\t\t\t\tcounter++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn counter;\r\n\t}",
"private int redCheck() {\n ArrayList<Player> players = diceSubject.getPlayers();\n Player activePlayer = diceSubject.getActivePlayer();\n int count = 0;\n for(Player p: players) {\n if(!p.equals(activePlayer)) {\n count += p.countNumberOfReds();\n }\n }\n return count;\n }",
"int getBlackboardCount();",
"public int getOppColAmount(Player play, PropertyColourType c) {\r\n int x = 0;\r\n for (Property prop : play.getOwned()) {\r\n if (prop.getColour() == c) {\r\n x++;\r\n } \r\n }\r\n return x;\r\n }",
"public void CountBlackDisks(){\n int counter =0;\n for (int i=0; i<8; i++){\n for (int j=0; j<8; j++){\n if (gameboard[i][j]==B){\n counter++;\n }\n }\n }\n blackdisks = counter;\t\n }",
"public int getColAmount(Enum c) {\r\n int x = 0;\r\n for (Property prop : owned) {\r\n if (prop.getColour() == c) {\r\n x++;\r\n } \r\n }\r\n return x;\r\n }",
"public int getNumberOfStones(Color color) {\n\t\tint counter = 0;\n\t\tfor (Color c : board.values()) {\n\t\t\tif (c == color)\n\t\t\t\tcounter++;\n\t\t}\n\t\treturn counter;\n\t}",
"public int getWhiteMarblesCount()\r\n\t{\r\n\t\treturn whiteMarblesCount;\r\n\t}",
"private int walledPieces(Game game) {\n int count = 0;\n for (int y = 0; y < game.getCurrentPiece().getShape().getCurrentShape().length; y++) {\n boolean[] row = game.getCurrentPiece().getShape().getCurrentShape()[y];\n\n if (x == 0 && row[0]) count++;\n else if (x + row.length == game.getMap().getBlocks()[y].length && row[row.length - 1]) count++;\n }\n //\tSystem.out.printf(\"Walled pieces: %d\\n\", count);\n return count;\n }",
"public int getGameWhiteLanternCardCount() {\n\t\treturn gameWhiteLanternCardCount;\n\t}",
"public int getColoredProbesCount(int colorIndex);",
"int getBlackboardCount(Class cl);",
"int getS2CCardHoleCount();",
"public int contains_green_draw2(){\n int green_draw2s=0;\n for(int i=0;i<hand.length;i++){\n if(\"GD\".equals(hand[i])){\n green_draw2s+=1;\n hand[i]=\"0\";\n }\n }\n return green_draw2s;\n }",
"public int pixelCount()\n {\n int pixelCount = cat.getWidth() * cat.getHeight();\n return pixelCount;\n\n }",
"int[] countPegs(Token[] code, Token[] guess) {\n\t\tint[] bw = new int[2];\n\t\tbw[1] = countBlack(code, guess);\n\t\tbw[0] = Math.max(countWhite(code, guess) - bw[1], 0); // make sure white pegs stay >=0.\n\t\treturn bw;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get value from characteristic. | protected byte[] getValue() throws GattException {
try {
byte[] value = bluetoothGattCharacteristic.getValue();
if (value == null) {
throw new GattException(String.format("Value can not be " +
"got from characteristic %s.", getUuid()));
}
return value;
} catch (Exception e) {
throw new GattException(e);
}
} | [
"public String getCharacteristic() {\n return characteristic;\n }",
"io.dstore.values.IntegerValue getValueCharacteristicId();",
"public Object getCharacteristic(String name) throws DataExchangeException;",
"public byte getValue() {\n return value;\n }",
"public byte getValue() {\n return value;\n }",
"public char getValue() {\n return value;\n }",
"Object getSensorValue();",
"com.google.protobuf.ByteString getVal();",
"public int getValue() {\n Log.v(TAG,\"Getting Value\");\n BufferedReader br;\n String line = \"\";\n try {\n br = new BufferedReader(new FileReader(PATH + \"/gpio\" + pin + \"/value\"));\n line = br.readLine();\n br.close();\n\n\n } catch (Exception e) {\n Log.e(TAG,\"Error: \" + e.getMessage());\n\n }\n\n return Integer.parseInt(line);\n }",
"com.google.protobuf.Value getValue();",
"public BigInteger characteristic() {\n return coFac.characteristic();\n }",
"public Characteristic characteristic() {\n return characteristic;\n }",
"private V getValue() {\n return value;\n }",
"int getAttValue();",
"org.apache.calcite.avatica.proto.Common.TypedValue getValue();",
"public byte get();",
"Value getSendValue();",
"public Number getValue() {\n return (Number) getAttributeInternal(VALUE);\n }",
"FeatureValue getValue();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generate the unique key. This key must be unique inside the space of this component. This method must be invoked before the generateValidity() method. | long generateKey(); | [
"public String generateNewKey();",
"public long generateKey() {\n final StringBuffer hash = new StringBuffer(this.elementName);\n hash.append('<').append(this.count).append('>').append(this.blocknr);\n return HashUtil.hash(hash);\n }",
"public static synchronized String genUniqueKey(){\n Random random = new Random();\n Integer number = random.nextInt(900000) + 100000;\n\n return System.currentTimeMillis()+ String.valueOf(number);\n }",
"public KeyGenerator(){\n\t\tkey = \"\";\n\t\thashKey();\n\t}",
"public String getUniqueKey() {\n return getMethod() + getExternalEndpoint();\n }",
"public String GetKey() {\n return toString() + \"_\" + hashCode();\n }",
"java.lang.String getNewKeyUid();",
"private static Key generateKey() {\n return new SecretKeySpec(keyValue, ALGO);\n }",
"public String createTaskKey() {\n return String.valueOf(ID_WORKER_UTILS.nextId());\n }",
"public final void generateKey() {\r\n\t\tStringBuilder keyBuilder = new StringBuilder();\r\n\t\t// common case - id + label identify the node\r\n\t\tkeyBuilder.append(id).append(' ').append(label);\r\n\t\tif (relatedCategories.size() > 0) {\r\n\t\t\tkeyBuilder.append(\" (\");\r\n\t\t\tList<String> relatedCatIds = new LinkedList<String>(); \r\n\t\t\tfor (Category related : relatedCategories) {\r\n\t\t\t\trelatedCatIds.add(related.getId());\r\n\t\t\t}\r\n\t\t\tkeyBuilder.append(StringUtils.join(relatedCatIds, \", \")).\r\n\t\t\t\t\t\tappend(')');\r\n\t\t\tlogger.trace(keyBuilder.toString());\r\n\t\t}\r\n\r\n\t\t// exception case - Subjects node (i.e. a node without an id)\r\n\t\tif (StringUtils.isBlank(id) && null != parent && children.size() == 0) {\r\n\t\t\tkeyBuilder = new StringBuilder();\r\n\t\t\tkeyBuilder.append(parent.getKey()).append(\" Subjects: \").append(\r\n\t\t\t\t\tlabel);\r\n\t\t}\r\n\r\n\t\tthis.key = keyBuilder.toString().trim();\r\n\t}",
"public static String generateActivationKey() {\n return RandomStringUtils.randomNumeric(DEF_COUNT);\n }",
"public String generateKey(long duration) throws Exception;",
"public int getComponentUniqueKey() {\r\n return componentUniqueKey;\r\n }",
"@java.lang.Override\n public java.lang.String getNewKeyUid() {\n java.lang.Object ref = newKeyUid_;\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 newKeyUid_ = s;\n return s;\n }\n }",
"public static String generateUniqueString() {\n return Environment.get(UniqueID) + (counter++);\n }",
"private String generateId() {\n byte[] id = new byte[BACKUP_KEY_SUFFIX_LENGTH_BITS / BITS_PER_BYTE];\n mSecureRandom.nextBytes(id);\n return BACKUP_KEY_ALIAS_PREFIX + ByteStringUtils.toHexString(id);\n }",
"public static String generateResetKey() {\n return RandomStringUtils.randomNumeric(DEF_COUNT);\n }",
"default String generateId() {\n\t\treturn \"ier-\" + A3ServiceUtil.generateRandonAlphaNumberic(15, 15, \"\");\n\t}",
"public KeyGenerator(String key){\n\t\tthis.key = key;\n\t\thashKey();\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculates average processing time. | public double averageProcessTime() {
if (numCompleted < 1) {
return 0.0;
} else {
return (double)totalProcessTime / (double)numCompleted;
}
} | [
"public static double doAvgProcessingTime() {\n if (count >= 1) {\n return processingTimeTotal / count;\n } else {\n return -1;\n }\n }",
"public long calulateAverageTime()\r\n {\r\n long sum = 0;\r\n long avgTime = 0;\r\n\r\n //Get the sum of all the times \r\n for(long time : this.listOfTimes)\r\n {\r\n sum += time;\r\n }//end for \r\n\r\n //calculate the average time \r\n if(this.gamesCompleted>0)\r\n avgTime = sum / this.gamesCompleted;\r\n else\r\n avgTime = sum;\r\n\r\n return avgTime;\r\n }",
"public Float getAverageProcessingTime() {\n return this.AverageProcessingTime;\n }",
"public double calculateAvgWaittime() {\n double toReturn = 0;\n\n for (int i = 0; i < _completedProcesses.size(); i++) {\n toReturn += _completedProcesses.get(i).getWaitTime();\n }\n\n toReturn = toReturn /(1.0 * _completedProcesses.size());\n\n return toReturn;\n }",
"public double timeAverage ()\n {\n\tif (first || (SimulationProcess.CurrentTime() - startTime) == 0)\n\t return 0.0;\n\n\treturn ((total + area())/(SimulationProcess.CurrentTime() - startTime));\n }",
"public double getAverageTaskTime();",
"public double getAverageTimeGet() {\n try {\n Long[] tabTime = meterTimeGet.toArray(new Long[meterTimeGet.size()]);\n long total = 0;\n int nbProcess = 0;\n if (tabTime.length > 0) {\n while (true) {\n total += tabTime[tabTime.length - 1 - nbProcess];\n nbProcess++;\n if (nbProcess >= tabTime.length) {\n break;\n }\n if (nbProcess > getMeterTimeMaxSize()) {\n break;\n }\n }\n }\n if (nbProcess > 0) {\n return NumericalTools.round(total / nbProcess, 3);\n }\n } catch (Exception e) {\n log.error(\"Failed to compute average time Get !\", e);\n }\n return 0;\n\t}",
"public final long getAverageRequestProcessingTime() {\n return averageRequestProcessing.getCurrentAverageTime();\n }",
"public long getAverageReduceTime();",
"@DISPID(70)\r\n\t// = 0x46. The runtime will prefer the VTID if present\r\n\t@VTID(68)\r\n\tint averageCPUTime_Seconds();",
"@Override\n public long getAverageRunTime() {\n final int invocations = invocationCount.get();\n return invocations == 0 ?\n 0 : totalTime.get() / invocations;\n }",
"public double calculateAvgTurnaround() {\n double toReturn = 0;\n\n for (int i = 0; i < _completedProcesses.size(); i++) {\n toReturn += _completedProcesses.get(i).getTurnAroundTime();\n }\n\n toReturn = toReturn / (1.0 * _completedProcesses.size());\n\n return toReturn;\n }",
"public double averageTime ()\n\t{\n\t\treturn jobHistory / numberJobs;\n\t}",
"public double getAverageCompTime() { \r\n int averageTime=0;\r\n for (int i=0; i<macroClSum; i++){\r\n \taverageTime += (double)set[i].getCompTime() * (double)set[i].getNumerosity();\r\n }\r\n return averageTime/(double)microClSum;\r\n }",
"@DISPID(71)\r\n\t// = 0x47. The runtime will prefer the VTID if present\r\n\t@VTID(69)\r\n\tint averageCPUTime_Milliseconds();",
"public float averageTime() {\n\t\tfloat out = 0;\n\t\t\n\t\tIterator<SolveResult> iter = super.iterator();\n\t\t\n\t\twhile(iter.hasNext()) {\n\t\t\tout += iter.next().timeTaken;\n\t\t}\n\t\t\n\t\treturn out / super.size();\n\t}",
"private void calculateAverages() {\r\n\t\taverageResponse /= totalJobNumber;\r\n\t\taverageTurnaround /= totalJobNumber;\r\n\t\taverageWait /= totalJobNumber;\r\n\t\taverageThroughput = (totalJobNumber / totalJobTime);\r\n\t}",
"public static long getAverageHitTime() {\r\n if (_count == 0)\r\n return 0L;\r\n return _time / _count;\r\n }",
"public double averageWait()\r\n\t{\r\n\t\tint[] wait=waitTime();\r\n\t\tdouble totalWait=0;\r\n\t\tfor(int i=0;i<numProcess;i++)\r\n\t\t{\r\n\t\t\ttotalWait=totalWait+wait[i];\r\n\t\t}\r\n\t\treturn totalWait/numProcess;\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the content of a directory as HTML. Should be called only for directories (does not test if file is a directory). | public static String getDirectoryContentAsHtml(File file, String uri) {
StringBuilder dirContent = new StringBuilder("<html><head><title>Index of ");
dirContent.append(uri);
dirContent.append("</title></head><body><h1>Index of ");
dirContent.append(uri);
dirContent.append("</h1><hr><pre>");
File[] files = file.listFiles();
for (File subfile : files) {
dirContent.append(" <a href=\"" + subfile.getPath() + "\">" + subfile.getPath() + "</a>\n");
}
dirContent.append("<hr></pre></body></html>");
return dirContent.toString();
} | [
"public String FormatDirectory(File file, String path){\n\n\t\tString[] subFiles = file.list();\n\t\tString html = \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Strict//EN\\\" \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\\\">\";\n\t\tfor(int i=0;i<subFiles.length;i++){\n\t\t\thtml += \"<a href=\" + path + \"/\" + subFiles[i] + \">\" + subFiles[i] + \"</a></br>\";\n\t\t}\n\t\treturn html;\n\t}",
"public String getIndexContent(File directory,\n String filename,\n String permission) {\n if ((directory==null) || (!directory.exists()) ||\n\t(!directory.isDirectory())) {\n return \"\";\n }\n String fullName = directory.getName() + File.separator + filename;\n String file_content =\n \"<HTML><HEAD><TITLE>\" + fullName + \"</TITLE></HEAD><BODY>\";\n file_content += \"<B>\"+fullName+\"</B>\";\n\n if(permission != null) {\n file_content += \"<BR>\" + permission;\n }\n File[] children = directory.listFiles();\n\n Arrays.sort(children); // must sort to ensure index page always same\n\n for (int ii=0; ii<children.length; ii++) {\n File child = children[ii];\n String subLink = child.getName();\n if (child.isDirectory()) {\n subLink += File.separator + SimulatedContentGenerator.INDEX_NAME;\n }\n if (subLink.equals(DIR_CONTENT_NAME)) {\n subLink = \".\";\n }\n file_content += \"<BR><A HREF=\\\"\" + FileUtil.sysIndepPath(subLink) +\n\t\"\\\">\" + subLink + \"</A>\";\n }\n // insert a link to parent to ensure there are some duplicate links\n file_content += \"<BR><A HREF=\\\"../index.html\\\">\" + \"parent\" + \"</A>\";\n // insert a link to a fixed excluded URL to ensure there are some\n // duplicate excluded links\n file_content += \"<BR><A HREF=\\\"/xxxexcluded.html\\\">\" + \"excluded\" + \"</A>\";\n // insert a link to a fixed failing URL to ensure there are some\n // duplicate failing links\n file_content += \"<BR><A HREF=\\\"/xxxfail.html\\\">\" + \"fail\" + \"</A>\";\n file_content += \"</BODY></HTML>\";\n return file_content;\n }",
"public String printFromDirectory(IDirectory currentDir) {\r\n // Create a result variable to store the names of the contents of the\r\n // directory\r\n String result = \"\";\r\n\r\n // Get all the sub directories in currentDir\r\n ArrayList<IDirectory> subDirectories = new ArrayList<>();\r\n subDirectories = currentDir.getSubDirectories();\r\n // Get all the files in the directory\r\n ArrayList<IFile> files = new ArrayList<>();\r\n files = currentDir.getFiles();\r\n\r\n // Add names of the sub directories to the result\r\n for (IDirectory subDir : subDirectories) {\r\n result += subDir.getName() + \"\\n\";\r\n }\r\n // Add names of the files in the directory to the result\r\n for (IFile file : files) {\r\n result += file.getName() + \"\\n\";\r\n }\r\n\r\n // Return the names of all the contents\r\n return result;\r\n }",
"private static void listDirectoryContents(File dir, String indent) {\n String[] files; // names of files in the directory.\n System.out.println(indent + \"Directory \\\"\" + dir.getName() + \"\\\":\");\n indent += \" \"; // Increase the indentation for new level of recursion\n files = dir.list();\n for (int i = 0; i < files.length; i++) {\n // If it is a directory, recursively list its contents\n File f = new File(dir, files[i]);\n if (f.isDirectory())\n listDirectoryContents(f, indent);\n else\n System.out.println(indent + files[i]);\n }\n }",
"public void readHtmlData() {\r\n\t\tFile folder = new File(filePath);\r\n\t\tif (folder.exists() && folder.isDirectory()) {\r\n\t\t\tFile[] files = folder.listFiles();\r\n\t\t\tArrays.sort(files);\r\n\t\t\tfor (File file : files) {\r\n\t\t\t\tif (file.isFile()) {\r\n\t\t\t\t\tSystem.out.println(file.getName());\r\n\t\t\t\t\tparseSingleFile(file);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Folder Path cannot be found\");\r\n\t\t}\r\n\r\n\t}",
"public void outputFileContents(String directory) {\r\n\t\tif (factory == null) throw new IllegalStateException(\"Must set factory\");\r\n File dir = new File(directory);\r\n if (!dir.exists()) {\r\n System.err.println(directory + \" does not exist\");\r\n return;\r\n }\r\n if (!dir.isDirectory()) {\r\n System.err.println(directory + \" is not a directory\");\r\n return;\r\n }\r\n\r\n for (File file: dir.listFiles()) {\r\n \tif (file.isDirectory()) continue;\r\n \tprintFileContents(factory.createStringifier(file.getPath())); \r\n }\r\n\t}",
"private static List<File> getContents(File dir) {\n List<File> files = null;\n if (dir.exists() && dir.isDirectory()) {\n File[] subs = dir.listFiles(new XMLFilenameFilter());\n files = Arrays.asList(subs);\n } else {\n files = Collections.emptyList();\n }\n return files;\n }",
"private void browseDir() throws Exception {\n File folder = new File(sharedPath);\n ArrayList<String> files = new ArrayList<String>();\n ArrayList<String> directories = new ArrayList<String>();\n File[] listOfFiles = folder.listFiles();\n\n for (File file : listOfFiles) {\n if (file.isFile()) {\n files.add(file.getName());\n } else if (file.isDirectory()) {\n directories.add(file.getName());\n }\n }\n\n StringBuilder msgToClient = new StringBuilder();\n msgToClient.append(\"Directories:\\n\");\n msgToClient.append(\"-----------------------\\n\");\n for (int i = 0; i < directories.size(); i++) {\n msgToClient.append(\"\" + (i + 1) + \" : \" + directories.get(i) + \"\\n\");\n }\n msgToClient.append(\"\\n\\nFiles\\n\");\n msgToClient.append(\"-----------------------\\n\");\n for (int i = 0; i < files.size(); i++) {\n msgToClient.append(\"\" + (i + 1) + \" : \" + files.get(i) + \"\\n\");\n }\n outputStream.writeUTF(msgToClient.toString());\n return;\n }",
"public void readHtmlData() {\r\n\t\tFile folder = new File(filePath);\r\n\t\tif (folder.exists() && folder.isDirectory()) {\r\n\t\t\tFile[] files = folder.listFiles();\r\n\t\t\tfor (File file : files) {\r\n\t\t\t\tif (file.isFile()) {\r\n\t\t\t\t\tparseSingleFile(file);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Folder Path cannot be found\");\r\n\t\t}\r\n\r\n\t}",
"protected void serveFile(OutputStream out, File f) throws IOException {\n if (f.isDirectory()) {\n // TODO: check for a index.html inside the directory; also\n // consider redirecting if there is no slash in the end.\n // serveError(out, 403, \"Directory listing not allowed.\");\n StringBuilder html = new StringBuilder();\n html.append(\"<HTML><HEAD><TITLE>Directory \"+f.getPath()+\n \"</TITLE></HEAD>\\n<BODY><H1>Directory \"+f.getPath()+\n \"</H1>\\n<UL>\\n\");\n for (File file : f.listFiles()) {\n html.append(\"<LI><A HREF=\\\"\"+file.getPath()+\"\\\">\"+file.getName()+\"</A></LI>\");\n }\n html.append(\"</UL>\\n</BODY></HTML>\\n\");\n serveString(out, 200, null, html.toString(), \"text/html\");\n return;\n }\n\n // Try to open the file...\n FileInputStream fis;\n try {\n fis = new FileInputStream(f);\n } catch (IOException e) {\n if (!f.exists()) {\n serveError(out, 404, \"File \" + f.getAbsolutePath()\n + \" does not exist on server\");\n } else {\n serveError(out, 403, \"File \" + f.getAbsolutePath()\n + \" unreadable on server\");\n }\n return;\n }\n\n // Guess the MIME type of the file from its extension...\n String type = null;\n final int dot = f.getAbsolutePath().lastIndexOf('.');\n if (dot >= 0)\n type = extensions.getProperty(f.getAbsolutePath()\n .substring(dot + 1).toLowerCase());\n if (type == null)\n type = \"application/octet-stream\"; // some default..\n\n // send OK status, and headers\n sendStatus(out, 200);\n sendHeader(out, \"Date\", HTTPdate(new Date()));\n sendHeader(out, \"Last-Modified\", HTTPdate(new Date(f.lastModified())));\n sendHeader(out, \"Content-Type\", type);\n sendHeaders(out, null);\n\n // send the file content itself\n final byte[] buf = new byte[1024];\n int len;\n while ((len = fis.read(buf)) > 0)\n out.write(buf, 0, len);\n }",
"java.lang.String getDirectory();",
"@Test(expected = IsNotPlainFileException.class)\r\n public void readDirectory() {\r\n l.sessionChangeWorkingDirectory(u2Token, makeHomePath(u2));\r\n\r\n ReadFileService service = new ReadFileService(u2Token, dName);\r\n service.execute();\r\n }",
"void processDirectory(final File directory) throws IOException {\n for (final File file : directory.listFiles()) {\n if (!file.isHidden()) {\n final String name = file.getName();\n if (file.isDirectory()) {\n if (!name.startsWith(\"class-use\") && !name.startsWith(\"doc-files\")) {\n processDirectory(file);\n }\n } else if (name.endsWith(\".html\")) {\n if (name.startsWith(\"package-\")) {\n // Skip package-frame, package-tree, package-use, everything except package-summary.\n if (!name.startsWith(\"package-summary\")) {\n continue;\n }\n }\n load(file);\n hyphenation();\n save();\n }\n }\n }\n }",
"private static List<String> loadDocuments(String path) throws Exception {\n\t\tFile folder = new File(path);\n\t\tArrayList<String> documents = new ArrayList<String>();\n\t\tfor (final File fileEntry : folder.listFiles()) {\n\t\t\tSystem.out.println(fileEntry.getName());\n\t\t\tif (fileEntry.isFile() && !fileEntry.isHidden()) {\n\t\t\t\tString content = getTextFromHtml(fileEntry);\n\t\t\t\tdocuments.add(content);\n\t\t\t}\n\t\t}\n\t\treturn documents;\n\t}",
"public String listFiles() {\n FileListView f = terrier.getFiles4ProjectVersion(currentVersionId);\n return f.getHtml();\n }",
"private String addDirectoryMenu(Directory directory, String htmlString){\n StringBuilder builder=new StringBuilder();\n\n for (Directory dir:directory.getSubDirectories()){\n builder.append(htmlItem.navigationBarItem(dir.getName()+\".html\",dir.getName()));\n }\n\n return htmlString.replace(MENU,builder.toString());\n }",
"private void listDirectory() throws Exception {\r\n\t\t\tif(this.authenticated) {\r\n\t\t\t\t\r\n\t\t\t\t//Get the files in this directory\r\n\t\t\t\tFile[] files = new File(\".\").listFiles();\r\n\t\t\t\t\r\n\t\t\t\t//Create a string with the directory listing\r\n\t\t\t\tString listing = \"\";\r\n\t\t\t\tfor(File file : files) listing += file.getName() + \" \";\r\n\t\t\t\t\r\n\t\t\t\t//Send an allowed response code\r\n\t\t\t\tthis.outToClient.writeBytes(Server.SUCCESS + \"\\n\");\r\n\t\t\t\t\r\n\t\t\t\t//Send that listing to the client\r\n\t\t\t\tthis.outToClient.writeBytes(listing + \"\\n\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t//Send a failed response code\r\n\t\t\t\tthis.outToClient.writeBytes(Server.FAILURE + \"\\n\");\r\n\t\t\t}\r\n\t\t}",
"public File getDirectoryValue();",
"public static void getFoldersAndFiles(File name)\n {\n //check if the selected object is folder or file\n //if it is folder then list all subfolders and files\n if(name.isDirectory())\n {\n //get the list of folders and files\n String[] foldersAndFiles = name.list();\n System.out.println(\"Directory content:\\n\");\n for(String outputValues: foldersAndFiles)\n {\n System.out.println(outputValues);\n }\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Kudo an activity (kudo is given by the authenticated athlete). You can do this multiple times, but the activity only receives one kudos. | public void giveKudos(final Long activityId) throws NotFoundException; | [
"public List<StravaAthlete> listAllActivityKudoers(final Long activityId);",
"void kick(GroupChatUser user, Optional<String> reason);",
"public void confusionIntent(View v){\n if(!MultiplayerManager.getInstance().enoughTimeBetweenCommands()){\n showToast(\"Please wait a second before issueing another command\");\n return;\n }\n\n if(!myTurn){\n showToast(\"Wait for your turn imbecile\");\n return;\n }\n if(powerup_confusion){\n showTimedAlertDialog(\"CONFUSION activated!\", \"Opponent will move randomley next round\", 5);\n powerup_confusion = false;\n ImageView img = findImageButton(\"confusion_container\");\n img.setImageDrawable(getResources().getDrawable(R.drawable.confusion_disabled));\n MultiplayerManager.getInstance().SendMessage(\"opponent_confusion\");\n }\n }",
"public static void decrementUnchoked() {\n\t\tsynchronized(unchoked_lock) {\n\t\t\tunchoked_count--;\n\t\t}\n\t}",
"void setSudoAsId(Long sudoAsId) {\n this.sudoAsId = sudoAsId;\n }",
"public void kick(String channel, String user, String reason);",
"public void launchNoPlantsActivity(){\n FirebaseUser currentUser = mAuth.getCurrentUser();\n if (currentUser == null) {\n launchMainActivity();\n return;\n }\n String currentUserId = currentUser.getUid();\n Intent intent = new Intent(this, NoPlantsActivity.class);\n intent.putExtra(MainActivity.EXTRA_USER_ID, currentUserId);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n finish();\n }",
"private void doMute(IKandyCall pCall) {\n\n pCall.mute(new KandyCallResponseListener() {\n\n @Override\n public void onRequestSucceeded(IKandyCall call) {\n Log.i(TAG, \"doMute:onRequestSucceeded: true\");\n }\n\n @Override\n public void onRequestFailed(IKandyCall call, int responseCode, String err) {\n Log.i(TAG, \"doMute:onRequestFailed: \" + err + \" Response code: \" + responseCode);\n }\n });\n }",
"void deleteActivity(Long activityId, Long userId);",
"private void doUnMute(IKandyCall pCall) {\n pCall.unmute(new KandyCallResponseListener() {\n\n @Override\n public void onRequestSucceeded(IKandyCall call) {\n Log.i(TAG, \"doUnMute:onRequestSucceeded: true\");\n }\n\n @Override\n public void onRequestFailed(IKandyCall call, int responseCode, String err) {\n Log.i(TAG, \"doUnMute:onRequestFailed: \" + err + \" Response code: \" + responseCode);\n }\n });\n }",
"private void kickOffTweet() {\r\n\t\t// send message back to receiver\r\n \tif (mResultReceiver != null) {\r\n \t\tmResultReceiver.onRecieve(MSTWEET_STATUS_STARTING, \"\");\r\n \t}\r\n\t\tIntent svc = new Intent(mCallingActivity, MSTwitterService.class);\r\n\t\tsvc.putExtra(MSTwitterService.MST_KEY_SERVICE_TASK, MSTwitterService.MST_SERVICE_TASK_SENDTWEET);\r\n\t\tsvc.putExtra(MSTwitterService.MST_KEY_TWEET_TEXT, mText);\r\n\t\tsvc.putExtra(MSTwitterService.MST_KEY_TWEET_IMAGE_PATH, mImagePath);\r\n\t\tmCallingActivity.startService(svc);\r\n\t}",
"private void startPersonalActivity(String user_id) {\n }",
"int retweet(String user, int messageId) throws AccessControlException, IllegalArgumentException, IOException;",
"public void thePrivateJournal(View view)\n {\n /**\n Intent intent = new Intent(this, ChoosePrivateCanvas.class);\n intent.putExtra(\"username\", username);\n startActivity(intent);\n */\n }",
"private void assignTutorialIntent() {\n final PreferenceGroup category =\n (PreferenceGroup) findPreferenceByResId(R.string.pref_category_miscellaneous_key);\n final Preference prefTutorial = findPreferenceByResId(R.string.pref_tutorial_key);\n\n if ((category == null) || (prefTutorial == null)) {\n return;\n }\n\n final int touchscreenState = getResources().getConfiguration().touchscreen;\n if (touchscreenState == Configuration.TOUCHSCREEN_NOTOUCH) {\n category.removePreference(prefTutorial);\n return;\n }\n\n final Intent tutorialIntent = new Intent(this, AccessibilityTutorialActivity.class);\n tutorialIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n tutorialIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n prefTutorial.setIntent(tutorialIntent);\n }",
"public void joy(View view) {\n Util.addEmotion(Util.EXTRA_MESSAGE, MainActivity.this, \"JOY\");\n }",
"@Override\n public void onClick(View view) {\n User user = mFirebaseService.getUser();\n \n if(!user.getInterests().contains(category.getName())){\n user.addInterest(category.getName());\n mFirebaseService.updateUser(user);\n updateUI();\n }\n else{\n user.deleteInterest(category.getName());\n mFirebaseService.updateUser(user);\n updateUI();\n }\n }",
"@Override\n public void onClick(View arg0) {\n logoutFromTwitter();\n }",
"private static void removeTalker(User talker, AppCompatActivity activity) {\n mRefUsersTalk\n .child(mAuth.getCurrentUser().getUid())\n .child(talker.getId())\n .removeValue()\n .addOnSuccessListener(aVoid -> {\n\n //REMOVES CURRENT USER TO TALKER NODE\n mRefUsersTalk\n .child(talker.getId())\n .child(mAuth.getCurrentUser().getUid())\n .removeValue()\n .addOnSuccessListener(aVoid1 -> {\n showProgressDialog(false);\n Toast.makeText(activity.getApplicationContext(), \"Usuário removido com sucesso!\", Toast.LENGTH_SHORT)\n .show();\n\n backToMainActivity(activity);\n })\n .addOnFailureListener(Throwable::getLocalizedMessage);\n })\n .addOnFailureListener(Throwable::getLocalizedMessage);\n\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Contexts: packed_conformant_array_schema returns packed_conformant_array_schema Constraint: (bound=bound_specification name=ID) | protected void sequence_packed_conformant_array_schema(ISerializationContext context, packed_conformant_array_schema semanticObject) {
if (errorAcceptor != null) {
if (transientValues.isValueTransient(semanticObject, PascalPackage.Literals.PACKED_CONFORMANT_ARRAY_SCHEMA__BOUND) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, PascalPackage.Literals.PACKED_CONFORMANT_ARRAY_SCHEMA__BOUND));
if (transientValues.isValueTransient(semanticObject, PascalPackage.Literals.PACKED_CONFORMANT_ARRAY_SCHEMA__NAME) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, PascalPackage.Literals.PACKED_CONFORMANT_ARRAY_SCHEMA__NAME));
}
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
feeder.accept(grammarAccess.getPacked_conformant_array_schemaAccess().getBoundBound_specificationParserRuleCall_3_0(), semanticObject.getBound());
feeder.accept(grammarAccess.getPacked_conformant_array_schemaAccess().getNameIDTerminalRuleCall_6_0(), semanticObject.getName());
feeder.finish();
} | [
"protected void sequence_unpacked_conformant_array_schema(ISerializationContext context, unpacked_conformant_array_schema semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}",
"public static boolean isArray_id() {\n return false;\n }",
"com.microsoft.schemas.crm._2011.contracts.ArrayOfConstraintRelation addNewConstraints();",
"public ContractFunctionSelector addInt32Array() {\n return addParamType(\"int32[]\");\n }",
"public Rule<JDefinedClass, JDefinedClass> getRequiredArrayRule() { return new RequiredArrayRule(this); }",
"public void testConstructorWithMultiDimensionSimpleTypeArray() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_INT, \"2\", \"{{0,1}, {2,3}}\"));\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n ObjectSpecification array = specificationFactory.getObjectSpecification(\"array1\", null);\r\n\r\n assertEquals(\"SpecType should be array.\", ObjectSpecification.ARRAY_SPECIFICATION, array\r\n .getSpecType());\r\n assertNull(\"Identifier should be null.\", array.getIdentifier());\r\n assertEquals(\"Type should be 'int'.\", TYPE_INT, array.getType());\r\n assertEquals(\"Dimension should be 2.\", 2, array.getDimension());\r\n\r\n Object[] array1 = array.getParameters();\r\n Object[] subArray1 = (Object[]) array1[0];\r\n Object[] subArray2 = (Object[]) array1[1];\r\n\r\n ObjectSpecification[] values = {(ObjectSpecification) subArray1[0],\r\n (ObjectSpecification) subArray1[1], (ObjectSpecification) subArray2[0],\r\n (ObjectSpecification) subArray2[1]};\r\n\r\n assertEquals(\"Array should have 2 elements.\", 2, array1.length);\r\n assertEquals(\"Array[0] should have 2 elements.\", 2, subArray1.length);\r\n assertEquals(\"Array[1] should have 2 elements.\", 2, subArray2.length);\r\n\r\n for (int i = 0; i < 4; i++) {\r\n assertEquals(\"SpecType of array elements should be simple.\",\r\n ObjectSpecification.SIMPLE_SPECIFICATION, values[i].getSpecType());\r\n assertEquals(\"Elements should be 'int'.\", TYPE_INT, values[i].getType());\r\n assertEquals(\"Wrong element value.\", (String) (\"\" + i), values[i].getValue());\r\n }\r\n }",
"public void testConstructorWithSingleDimensionSimpleTypeArray() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_INT, \"1\", \"{1,2}\"));\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n ObjectSpecification array = specificationFactory.getObjectSpecification(\"array1\", null);\r\n\r\n assertEquals(\"SpecType should be array.\", ObjectSpecification.ARRAY_SPECIFICATION, array\r\n .getSpecType());\r\n assertNull(\"Identifier should be null.\", array.getIdentifier());\r\n assertEquals(\"Type should be 'int'.\", TYPE_INT, array.getType());\r\n assertEquals(\"Dimension should be 1.\", 1, array.getDimension());\r\n\r\n Object[] params = array.getParameters();\r\n ObjectSpecification param1 = (ObjectSpecification) params[0];\r\n ObjectSpecification param2 = (ObjectSpecification) params[1];\r\n\r\n assertEquals(\"Array should have 2 elements.\", 2, params.length);\r\n assertTrue(\"SpecType of array elements should be simple.\", param1.getSpecType().equals(\r\n ObjectSpecification.SIMPLE_SPECIFICATION)\r\n && param2.getSpecType().equals(ObjectSpecification.SIMPLE_SPECIFICATION));\r\n assertTrue(\"Elements should be 'int'.\", param1.getType().equals(TYPE_INT)\r\n && param2.getType().equals(TYPE_INT));\r\n assertEquals(\"Element should be 1.\", \"1\", param1.getValue());\r\n assertEquals(\"Element should be 2.\", \"2\", param2.getValue());\r\n }",
"boolean satisfiesConstraints( Object[] tuple );",
"String getConstraintSetId();",
"public interface Constraint {\n\n /**\n * Returns an array of parameter indizes representing the relevant parameters and their order for\n * this constraint. When calling {@link #confirmsWith(Object[])} the Object[] has to be ordered by\n * this array.\n * \n * @return An array representing the order and index of the involved parameters for this\n * constraint.\n */\n public int[] getInvolvedParameters();\n\n /**\n * Checks whether or not a specific input combination confirms with this constraint.\n * \n * @param inputCombination an Object[] representing the input combination. Has to be ordered in\n * the way defined by {@link #getInvolvedParameters()}.\n * @return whether or not the combination confirms with this constraint.\n */\n public abstract boolean confirmsWith(Object[] inputCombination);\n}",
"public ContractFunctionSelector addUint32Array() {\n return addParamType(\"uint32[]\");\n }",
"@DISPID(1610940427) //= 0x6005000b. The runtime will prefer the VTID if present\n @VTID(33)\n Constraints constraints();",
"ArrayTypeRule createArrayTypeRule();",
"public boolean supportsUniqueConstraints();",
"public int getConstraintSchemaPart() {\n return schemaPart;\n }",
"public BaseScalarBoundedArray(ScalarType elementType, int size) {\n super(Type.scalarArray);\n if (elementType==null)\n \tthrow new NullPointerException(\"elementType is null\");\n if (size<=0)\n \tthrow new IllegalArgumentException(\"size <= 0\");\n this.elementType = elementType;\n this.size = size;\n this.id = BaseScalar.idLUT[this.elementType.ordinal()] + \"<\" + size + \">\";\n }",
"@Test\n @IncludeIn(POSTGRESQL)\n public void array2() {\n Expression<int[]> expr = Expressions.template(int[].class, \"'{1,2,3}'::int[]\");\n int[] result = firstResult(expr);\n Assert.assertEquals(3, result.length);\n Assert.assertEquals(1, result[0]);\n Assert.assertEquals(2, result[1]);\n Assert.assertEquals(3, result[2]);\n }",
"public void testConstructorWithSingleDimensionComplexTypeArray() throws Exception {\r\n root\r\n .addChild(createArray(\"array1\", TYPE_OBJECT, \"1\", \"{object:ob1,object:ob2, object:ob1}\"));\r\n root.addChild(createObject(\"object:ob1\", TYPE_OBJECT));\r\n root.addChild(createObject(\"object:ob2\", TYPE_OBJECT));\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n ObjectSpecification array = specificationFactory.getObjectSpecification(\"array1\", null);\r\n\r\n assertEquals(\"SpecType should be array.\", ObjectSpecification.ARRAY_SPECIFICATION, array\r\n .getSpecType());\r\n assertNull(\"Identifier should be null.\", array.getIdentifier());\r\n assertEquals(\"Type should be 'A'.\", TYPE_OBJECT, array.getType());\r\n assertEquals(\"Dimension should be 1.\", 1, array.getDimension());\r\n\r\n Object[] array1 = array.getParameters();\r\n\r\n assertEquals(\"array1[0] should be object:ob1.\", specificationFactory\r\n .getObjectSpecification(\"object\", \"ob1\"), array1[0]);\r\n assertEquals(\"array1[1] should be object:ob2.\", specificationFactory\r\n .getObjectSpecification(\"object\", \"ob2\"), array1[1]);\r\n assertEquals(\"array1[2] should be object:ob1.\", specificationFactory\r\n .getObjectSpecification(\"object\", \"ob1\"), array1[2]);\r\n }",
"public static boolean isArray_entries_id() {\n return true;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Description:verify error messge on trying to post the ad without filling mandatory fields | public void verifyErrorMessageonTryingtoPostAdwithoutFillingMandatoryfields() throws Exception {
CreateStockTradusProPage createStockObj = new CreateStockTradusProPage(driver);
click(createStockObj.allMyStockOptioninSiderBar);
explicitWaitFortheElementTobeVisible(driver, createStockObj.LeavepageButtonInPostingForm);
click(createStockObj.LeavepageButtonInPostingForm);
waitTill(5000);
loadUrl(driver, "https://pro.tradus.com/lms/ads/create");
/*LoginTradusPROPage loginPage = new LoginTradusPROPage(driver);
loginPage.setAccountEmailAndPassword("automation.testing.sunfra@gmail.com", "tradus123");
jsClick(driver, loginPage.LoginButton);
explicitWaitFortheElementTobeVisible(driver, loginPage.overviewPageVerificationElement);
jsClick(driver, createStockObj.myStockOptioninSiderBar);
explicitWaitFortheElementTobeVisible(driver, createStockObj.createMyStockOptioninSiderBar);
jsClick(driver, createStockObj.createMyStockOptioninSiderBar);*/
explicitWaitFortheElementTobeVisible(driver, createStockObj.postingFormVerificationElement);
jsClick(driver, createStockObj.postYourAdButton);
explicitWaitFortheElementTobeVisible(driver, createStockObj.errorAlertInPostingForm);
Assert.assertTrue(
getText(createStockObj.errorAlertInPostingForm).replace("\n", ", ").trim()
.contains("You have to upload at least 1 image."),
"Proper error message is not displayed while posting Ad without filling any fields");
waitTill(2000);
createStockObj.uploadImageButtonInPostingForm.sendKeys(System.getProperty("user.dir") + "\\Tire.jpg");
explicitWaitFortheElementTobeVisible(driver, createStockObj.successToastInPostingForm);
waitTill(3000);
jsClick(driver, createStockObj.postYourAdButton);
explicitWaitFortheElementTobeVisible(driver, createStockObj.errorAlertInPostingForm);
Assert.assertTrue(
getText(createStockObj.errorAlertInPostingForm).replace("\n", ", ").trim()
.contains("There are empty or invalid fields, please check and fix them."),
"Proper error message is not displayed while posting Ad with image and without filling any fields");
waitTill(2000);
} | [
"@Test(priority = 9)\n\tpublic void verifyErrorMessagesUnderMandatoryFields() throws Exception {\n\t\tCreateStockTradusProPage createStockObj = new CreateStockTradusProPage(driver);\n\t\tLoginTradusPROPage loginPage = new LoginTradusPROPage(driver);\n\t\twaitTill(2000);\n\t\tloginPage.setAccountEmailAndPassword(\"automation.testing.sunfra@gmail.com\", \"tradus123\");\n\t\tjsClick(driver, loginPage.LoginButton);\n\t\texplicitWaitFortheElementTobeVisible(driver, loginPage.overviewPageVerificationElement);\n\t\tjsClick(driver, createStockObj.myStockOptioninSiderBar);\n\t\texplicitWaitFortheElementTobeVisible(driver, createStockObj.createMyStockOptioninSiderBar);\n\t\tjsClick(driver, createStockObj.createMyStockOptioninSiderBar);\n\t\tloadUrl(driver, \"https://pro.tradus.com/lms/ads/create\");\n\t\texplicitWaitFortheElementTobeVisible(driver, createStockObj.postingFormVerificationElement);\n\t\t/*waitTill(6000);\n\t\tactionClick(driver, createStockObj.createMyStockOptioninSiderBar);\n\t\twaitTill(3000);\n\t\tif (getCurrentUrl(driver).equalsIgnoreCase(\"https://pro.tradus.com/lms/ads/create\")) {\n\t\t\tclick(createStockObj.allMyStockOptioninSiderBar);\n\t\t\texplicitWaitFortheElementTobeVisible(driver, createStockObj.LeavepageButtonInPostingForm);\n\t\t\tclick(createStockObj.LeavepageButtonInPostingForm);\n\t\t\twaitTill(5000);\n\t\t\tloadUrl(driver, \"https://pro.tradus.com/lms/ads/create\");\n\t\t} else {\n\t\t\tloadUrl(driver, \"https://pro.tradus.com/lms/ads/create\");\n\t\t}*/\n\t\texplicitWaitFortheElementTobeVisible(driver, createStockObj.postingFormVerificationElement);\n\t\tcreateStockObj.uploadImageButtonInPostingForm.sendKeys(System.getProperty(\"user.dir\") + \"\\\\Tire.jpg\");\n\t\texplicitWaitFortheElementTobeVisible(driver, createStockObj.successToastInPostingForm);\n\t\twaitTill(3000);\n\t\tjsClick(driver, createStockObj.postYourAdButton);\n\t\texplicitWaitFortheElementTobeVisible(driver, createStockObj.errorAlertInPostingForm);\n\t\t\n\t\tWebElement[] mandatoryFields = { createStockObj.priceTypeFieldPostingForm, createStockObj.netPriceFieldPostingForm,\n\t\t\t\tcreateStockObj.descriptionAreainPostingForm, createStockObj.vehicleTypeFieldPostingForm,\n\t\t\t\tcreateStockObj.vehicleCategoryFieldPostingForm, createStockObj.vehicleSubCategoryFieldPostingForm,\n\t\t\t\tcreateStockObj.vehicleMakeFieldPostingForm, createStockObj.vehicleModelFieldPostingForm };\n\t\tWebElement[] errorText = { createStockObj.priceTypeFieldDangerText, createStockObj.netPriceFieldDangerText,\n\t\t\t\tcreateStockObj.vehicleDescriptionDangerText, createStockObj.vehicleTypeDangerText,\n\t\t\t\tcreateStockObj.vehicleCategoryDangerText, createStockObj.vehicleSubCategoryDangerText,\n\t\t\t\tcreateStockObj.vehicleMakeDangerText, createStockObj.vehicleModelDangerText };\n\t\t\n\t\tfor(int i=0;i<mandatoryFields.length;i++) {\n\t\t\tswitch(i) {\n\t\t\tcase 0:\n\t\t\t\tAssert.assertTrue(getText(errorText[i]).equals(\"The price type field is required\"),\"Correct error under price type is not displaying\");\n\t\t\t\tclick(createStockObj.priceTypeFieldPostingForm);\n\t\t\t\twaitTill(1000);\n\t\t\t\tactionClick(driver, createStockObj.priceTypeasFixed);\n\t\t\t\twaitTill(1000);\n\t\t\t\tAssert.assertTrue(getText(errorText[i]).isEmpty(),\"Alert still displays after filling price type\");\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tAssert.assertTrue(getText(errorText[i]).equals(\"The net price field is required\"),\"Correct error under net price is not displaying\");\n\t\t\t\tsendKeys(createStockObj.netPriceFieldPostingForm,\"1000\");\n\t\t\t\twaitTill(1000);\n\t\t\t\tactionClick(driver,createStockObj.netPriceLabelInPostingForm);\n\t\t\t\twaitTill(1000);\n\t\t\t\tAssert.assertTrue(getText(errorText[i]).isEmpty(),\"Alert still displays after filling price type\");\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tAssert.assertTrue(getText(errorText[i]).equals(\"The description (English) field is required\"),\"Correct error under Description is not displaying\");\n\t\t\t\tsendKeys(createStockObj.descriptionAreainPostingForm,\"Test Ad Test Ad Test Ad\");\n\t\t\t\twaitTill(1000);\n\t\t\t\tAssert.assertTrue(getText(errorText[i]).isEmpty(),\"Alert still displays after filling Description\");\n\t\t\t\tscrollToElement(driver,createStockObj.vehicleTypeFieldPostingForm);\n\t\t\t\twaitTill(4000);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tAssert.assertTrue(getText(errorText[i]).equals(\"The type field is required\"),\"Correct error under Vehicle Type is not displaying\");\n\t\t\t\tclick(createStockObj.vehicleTypeFieldPostingForm);\n\t\t\t\tactionClick(driver, createStockObj.vehicleTypeasSpareParts);\n\t\t\t\tAssert.assertTrue(getText(errorText[i]).isEmpty(),\"Alert still displays after filling Vehicle Type\");\n\t\t\t\twaitTill(2000);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tAssert.assertTrue(getText(errorText[i]).equals(\"The category field is required\"),\"Correct error under category Type is not displaying\");\n\t\t\t\tclick(createStockObj.vehicleCategoryFieldPostingForm);\n\t\t\t\twaitTill(1000);\n\t\t\t\tclick(createStockObj.categoryDropdownvalues\n\t\t\t\t\t\t.get(dynamicSelect(createStockObj.categoryDropdownvalues)));\n\t\t\t\twaitTill(1000);\n\t\t\t\tAssert.assertTrue(getText(errorText[i]).isEmpty(),\"Alert still displays after filling Vehicle Category\");\n\t\t\t\twaitTill(2000);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tif (!getAttribute(mandatoryFields[i], \"class\").contains(\"multiselect--disabled\")) {\n\t\t\t\t\tAssert.assertTrue(getText(errorText[i]).equals(\"The subcategory field is required\"),\"Correct error under subcategory Type is not displaying\");\n\t\t\t\t\tclick(createStockObj.vehicleSubCategoryFieldPostingForm);\n\t\t\t\t\twaitTill(1000);\n\t\t\t\t\tclick(createStockObj.subCategoryDropdownvalues\n\t\t\t\t\t\t\t.get(dynamicSelect(createStockObj.subCategoryDropdownvalues)));\n\t\t\t\t\twaitTill(1000);\n\t\t\t\t\tAssert.assertTrue(getText(errorText[i]).isEmpty(),\"Alert still displays after filling Vehicle sub-Category\");\n\t\t\t\t\twaitTill(2000);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 6:\n\t\t\t\tif (!getAttribute(mandatoryFields[i], \"class\").contains(\"multiselect--disabled\")) {\n\t\t\t\t\tAssert.assertTrue(getText(errorText[i]).equals(\"The make field is required\"),\n\t\t\t\t\t\t\t\"Correct error under make is not displaying for empty make field\");\n\t\t\t\t\tclick(createStockObj.vehicleMakeFieldPostingForm);\n\t\t\t\t\twaitTill(1000);\n\t\t\t\t\tclick(createStockObj.makeDropdownvalues\n\t\t\t\t\t\t\t.get(dynamicSelect(createStockObj.makeDropdownvalues)));\n\t\t\t\t\twaitTill(1000);\n\t\t\t\t\tAssert.assertTrue(getText(errorText[i]).isEmpty(),\n\t\t\t\t\t\t\t\"Alert still displays after filling Vehicle make\");\n\t\t\t\t\twaitTill(2000);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 7:\n\t\t\t\tif (!getAttribute(mandatoryFields[i], \"class\").contains(\"multiselect--disabled\")) {\n\t\t\t\t\tAssert.assertTrue(getText(errorText[i]).equals(\"The model field is required\"),\n\t\t\t\t\t\t\t\"Correct error under make is not displaying for empty model field\");\n\t\t\t\t\tclick(createStockObj.vehicleModelFieldPostingForm);\n\t\t\t\t\twaitTill(1000);\n\t\t\t\t\tclick(createStockObj.modelDropdownvalues\n\t\t\t\t\t\t\t.get(dynamicSelect(createStockObj.modelDropdownvalues)));\n\t\t\t\t\twaitTill(1000);\n\t\t\t\t\tAssert.assertTrue(getText(errorText[i]).isEmpty(),\n\t\t\t\t\t\t\t\"Alert still displays after filling Vehicle model\");\n\t\t\t\t\twaitTill(2000);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}",
"public void verifypublishingAdafterfillingAllFieldswithValidCredentials() throws Exception {\n\t\tCreateStockTradusProPage createStockObj = new CreateStockTradusProPage(driver);\n\t\t/*LoginTradusPROPage loginPage = new LoginTradusPROPage(driver);\n\t\tActions act = new Actions(driver);\n\t\tloginPage.setAccountEmailAndPassword(\"automation.testing.sunfra@gmail.com\", \"tradus123\");\n\t\tjsClick(driver, loginPage.LoginButton);\n\t\texplicitWaitFortheElementTobeVisible(driver, loginPage.overviewPageVerificationElement);\n\t\tjsClick(driver, createStockObj.myStockOptioninSiderBar);\n\t\texplicitWaitFortheElementTobeVisible(driver, createStockObj.createMyStockOptioninSiderBar);\n\t\tjsClick(driver, createStockObj.createMyStockOptioninSiderBar);*/\n\t\tloadUrl(driver, \"https://pro.tradus.com/lms/ads/create\");\n\t\texplicitWaitFortheElementTobeVisible(driver, createStockObj.postingFormVerificationElement);\n\t\tcreateStockObj.uploadImageButtonInPostingForm.sendKeys(System.getProperty(\"user.dir\") + \"\\\\Tire.jpg\");\n\t\texplicitWaitFortheElementTobeVisible(driver, createStockObj.successToastInPostingForm);\n\t\twaitTill(3000);\n\t\tclick(createStockObj.priceTypeFieldPostingForm);\n\t\twaitTill(1000);\n\t\tactionClick(driver, createStockObj.priceTypeasFixed);\n\t\twaitTill(1000);\n\t\tif (!getText(createStockObj.currencyFieldAutofillValue).equalsIgnoreCase(\"EUR\")) {\n\t\t\tclick(createStockObj.currencyTypeFieldPostingForm);\n\t\t\twaitTill(1000);\n\t\t\tactionClick(driver, createStockObj.currencyTypeasEuro);\n\t\t}\n\t\tsendKeys(createStockObj.netPriceFieldPostingForm, \"150\");\n\t\twaitTill(1000);\n\t\tjsClick(driver, createStockObj.priceNegotialbleCheckBoxinPosting);\n\t\tjsClick(driver, createStockObj.exchangePossibleCheckBoxinPosting);\n\t\tjsClick(driver, createStockObj.rentPossibleCheckBoxinPosting);\n\t\tjsClick(driver, createStockObj.leasePossibleCheckBoxinPosting);\n\t\tscrollToElement(driver, createStockObj.vehicleCategoryFieldPostingForm);\n\t\twaitTill(2000);\n\t\tclick(createStockObj.vehicleTypeFieldPostingForm);\n\t\tactionClick(driver, createStockObj.vehicleTypeasSpareParts);\n\t\tWebElement[] mandatoryAttributes = { createStockObj.vehicleCategoryFieldPostingForm,\n\t\t\t\tcreateStockObj.vehicleSubCategoryFieldPostingForm, createStockObj.vehicleMakeFieldPostingForm,\n\t\t\t\tcreateStockObj.vehicleModelFieldPostingForm, createStockObj.vehicleVersionFieldPostingForm };\n\t\tList<WebElement> elementsNotPresent = new ArrayList<WebElement>();\n\t\tfor (int i = 0; i < mandatoryAttributes.length; i++) {\n\t\t\twaitTill(4000);\n\t\t\tif (!getAttribute(mandatoryAttributes[i], \"class\").contains(\"multiselect--disabled\")) {\n\t\t\t\tclick(mandatoryAttributes[i]);\n\t\t\t\twaitTill(2000);\n\t\t\t\tswitch (i) {\n\t\t\t\tcase 0:\n\t\t\t\t\tclick(createStockObj.categoryDropdownvalues\n\t\t\t\t\t\t\t.get(dynamicSelect(createStockObj.categoryDropdownvalues)));\n\t\t\t\t\twaitTill(1000);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 1:\n\t\t\t\t\tclick(createStockObj.subCategoryDropdownvalues\n\t\t\t\t\t\t\t.get(dynamicSelect(createStockObj.subCategoryDropdownvalues)));\n\t\t\t\t\twaitTill(1000);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 2:\n\t\t\t\t\tclick(createStockObj.makeDropdownvalues.get(dynamicSelect(createStockObj.makeDropdownvalues)));\n\t\t\t\t\twaitTill(1000);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 3:\n\t\t\t\t\tclick(createStockObj.modelDropdownvalues.get(dynamicSelect(createStockObj.modelDropdownvalues)));\n\t\t\t\t\twaitTill(1000);\n\t\t\t\t\tif (getText(createStockObj.modelFieldAutofillValue).trim().equalsIgnoreCase(\"Other\")) {\n\t\t\t\t\t\tsendKeys(createStockObj.modelFieldOtherTextBox, \"55\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tclick(createStockObj.versionDropdownvalues\n\t\t\t\t\t\t\t.get(dynamicSelect(createStockObj.versionDropdownvalues)));\n\t\t\t\t\twaitTill(1000);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\telementsNotPresent.add(mandatoryAttributes[i]);\n\t\t\t}\n\t\t}\n\t\twaitTill(3000);\n\t\tWebElement[] postingSections = { createStockObj.TechnicalSpecSectionInPostingForm,\n\t\t\t\tcreateStockObj.engineandTransmiddionSectionInPostingForm, createStockObj.DimensionSectionInPostingForm,\n\t\t\t\tcreateStockObj.OptionsSectionInPostingForm, createStockObj.overViewSectionInPostingForm,\n\t\t\t\tcreateStockObj.additionalDetailsLabelInPostingForm };\n\t\tfor (int i = 0; i < postingSections.length; i++) {\n\t\t\tif (verifyElementPresent(postingSections[i])) {\n\t\t\t\tscrollToElement(driver, postingSections[i]);\n\t\t\t\tswitch (i) {\n\t\t\t\tcase 0:\n\t\t\t\t\tWebElement[] technicalSpecs = { createStockObj.netWeightAreainPostingForm,\n\t\t\t\t\t\t\tcreateStockObj.grossWeightAreainPostingForm };\n\t\t\t\t\tString[] technicalSpecData = { \"140\", \"155\" };\n\t\t\t\t\tfor (int x = 0; x < technicalSpecs.length; x++) {\n\t\t\t\t\t\tif (verifyElementPresent(technicalSpecs[x])) {\n\t\t\t\t\t\t\tsendKeys(technicalSpecs[x], technicalSpecData[x]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\telementsNotPresent.add(technicalSpecs[x]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tWebElement[] engineSpecs = { createStockObj.fuelTypeinPosting,\n\t\t\t\t\t\t\tcreateStockObj.engineModelinPosting };\n\t\t\t\t\tif (verifyElementPresent(engineSpecs[0])) {\n\t\t\t\t\t\tclick(createStockObj.fuelTypeinPosting);\n\t\t\t\t\t\tclick(createStockObj.fuelTypeDropdownvalues\n\t\t\t\t\t\t\t\t.get(dynamicSelect(createStockObj.fuelTypeDropdownvalues)));\n\t\t\t\t\t\twaitTill(1000);\n\t\t\t\t\t} else {\n\t\t\t\t\t\telementsNotPresent.add(engineSpecs[0]);\n\t\t\t\t\t}\n\t\t\t\t\tif (verifyElementPresent(engineSpecs[1])) {\n\t\t\t\t\t\tsendKeys(createStockObj.engineModelinPosting, \"BE40721SERT31\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\telementsNotPresent.add(engineSpecs[1]);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tWebElement[] dimensionSpecs = { createStockObj.heightAreainPostingForm,\n\t\t\t\t\t\t\tcreateStockObj.widthAreainPostingForm, createStockObj.lenghtAreainPostingForm };\n\t\t\t\t\tString[] dimensionSpecsData = { \"3\", \"2\", \"2.5\" };\n\t\t\t\t\tfor (int x = 0; x < dimensionSpecs.length; x++) {\n\t\t\t\t\t\tif (verifyElementPresent(dimensionSpecs[x])) {\n\t\t\t\t\t\t\tsendKeys(dimensionSpecs[x], dimensionSpecsData[x]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\telementsNotPresent.add(dimensionSpecs[x]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t/*case 3:\n\t\t\t\t\tif (verifyElementPresent(createStockObj.fitsToFollowingMachineAreainPostingForm)) {\n\t\t\t\t\t\tsendKeys(createStockObj.fitsToFollowingMachineAreainPostingForm, \"All\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\telementsNotPresent.add(createStockObj.fitsToFollowingMachineAreainPostingForm);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;*/\n\t\t\t\tcase 4:\n\t\t\t\t\tWebElement[] overviewSpecs = { createStockObj.sellerReferenceAreainPostingForm,\n\t\t\t\t\t\t\tcreateStockObj.constructionYearAreainPostingForm, createStockObj.mileageAreainPostingForm,\n\t\t\t\t\t\t\tcreateStockObj.hoursRunAreainPostingForm };\n\t\t\t\t\tString[] overviewSpecsData = { \"87956414\", \"2019\", \"4000\", \"360\" };\n\t\t\t\t\tfor (int x = 0; x < overviewSpecs.length; x++) {\n\t\t\t\t\t\tif (verifyElementPresent(overviewSpecs[x])) {\n\t\t\t\t\t\t\tsendKeys(overviewSpecs[x], overviewSpecsData[x]);\n\t\t\t\t\t\t\twaitTill(1000);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (verifyElementPresent(createStockObj.constructionMonthinPostingForm)) {\n\t\t\t\t\t\tclick(createStockObj.constructionMonthinPostingForm);\n\t\t\t\t\t\tclick(createStockObj.constructionMonthDropdownvalues\n\t\t\t\t\t\t\t\t.get(dynamicSelect(createStockObj.constructionMonthDropdownvalues)));\n\t\t\t\t\t\twaitTill(1000);\n\t\t\t\t\t}\n\t\t\t\t\tif (verifyElementPresent(createStockObj.conditioninPostingForm)) {\n\t\t\t\t\t\tclick(createStockObj.conditioninPostingForm);\n\t\t\t\t\t\tclick(createStockObj.conditionDropdownvalues\n\t\t\t\t\t\t\t\t.get(dynamicSelect(createStockObj.conditionDropdownvalues)));\n\t\t\t\t\t\twaitTill(1000);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tif (verifyElementPresent(createStockObj.VINAreainPostingForm)) {\n\t\t\t\t\t\tsendKeys(createStockObj.VINAreainPostingForm, \"400078596412\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\telementsNotPresent.add(createStockObj.VINAreainPostingForm);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\twaitTill(3000);\n\t\tsendKeys(createStockObj.descriptionAreainPostingForm, \"Test Ad Test Ad Test Ad\");\n\t\twaitTill(5000);\n\t\tjsClick(driver,createStockObj.postYourAdButton);\n\t\texplicitWaitFortheElementTobeVisible(driver, createStockObj.successToastInPostingForm);\n\t\tAssert.assertTrue(\n\t\t\t\tgetText(createStockObj.successToastInPostingForm).replace(\"\\n\", \", \").trim()\n\t\t\t\t\t\t.contains(\"Successful action, Your ad was posted.\"),\n\t\t\t\t\"Proper error message is not displayed while posting Ad with image and with all mandatory fields filled\");\n\t\twaitTill(3000);\n\t\tString pageURL=driver.getCurrentUrl();\n\t\tAssert.assertTrue(getCurrentUrl(driver).equals(pageURL)\n\t\t\t\t,\"Page is not navigating to All ads age after posting success\");\n\t\twaitTill(3000);\n\t}",
"@Test(expected = InvalidDataFormatException.class)//all data is in valid format\r\n\t\tpublic void testValidPostAdvertiseSuccess() throws InvalidDataFormatException {\r\n\t\t\tlogger.info(\"[START] testValidPostAdvertiseSuccess()\");\r\n\t\t\tassertNotNull(\"New Advertise Posted Successfully\", oasController.addData(new AdvertiseEntity(5,\"abc\",\"vehicle\",\"desc\",120,\"open\")));\r\n\t\t\tlogger.info(\"[END] testValidPostAdvertiseSuccess()\");\r\n\t\t}",
"@Override\n public void onAdError(BannerAd ad, String error) {\n Log.d(TAG, \"Something went wrong with the request: \" + error);\n fireEvent(EVENT_FYBER_BANNER_ERROR, data);\n }",
"@Override\n public void onAdError(String message) {\n \t\n \t\n }",
"@Test(description = \"AT-29589:TRA_01_47:Verify the error message if user enters < 3 characters in the description field\", priority = 48)\r\n\tvoid descerrorValidation() {\n\r\n\t\tif (Config.getInstance().getEnvironment().toLowerCase().contains(\"bbt\")) {\r\n\t\t\tSeleniumUtil.refresh(d);\r\n\t\t} else {\r\n\t\t\tSeleniumUtil.refresh(d);\r\n\t\t\tSeleniumUtil.waitForPageToLoad(2000);\r\n\t\t\t// add_manual_transaction.cancel().click();\r\n\t\t\tPageParser.forceNavigate(\"Transaction\", d);\r\n\t\t\tSeleniumUtil.waitForPageToLoad(2000);\r\n\t\t}\r\n\t\tSeleniumUtil.click(add_manual_transaction.addManualLink());\r\n\t\tSeleniumUtil.waitForElement(\"BBT\", 2000);\r\n\t\tadd_manual_transaction.description().sendKeys(PropsUtil.getDataPropertyValue(\"description2\"));\r\n\t\tAssert.assertEquals(add_manual_transaction.descErr().getText(),\r\n\t\t\t\tPropsUtil.getDataPropertyValue(\"descriptionErr\"));\r\n\r\n\t}",
"public void verifyRealTimeAds() {\r\n\t\ttestStepInfo(\"************************************* Ads**********************************************\");\r\n\t\t\r\n\t\tvalidateTopAds();\r\n\t\tvalidateRecAds();\r\n\t\tvalidateRailRecAds();\r\n\t\tvalidateTextAds();\r\n\t\tvalidateLogeAds();\r\n\t\t\r\n\t\t\r\n\r\n\t}",
"@Test(description = \"AT-29585,AT-29690:TRA_01_27:verify amount mandatory field validation\", priority = 28)\r\n\tpublic void verifyAmountMandatoryField() {\n\r\n\t\tif (PropsUtil.getEnvPropertyValue(\"MOBILEORWEB\").equalsIgnoreCase(\"MOBILE\")\r\n\t\t\t\t&& PropsUtil.getEnvPropertyValue(\"APPORBROWSER\").equalsIgnoreCase(\"APP\"))\r\n\r\n\t\t{\r\n\t\t\tadd_manual_transaction.MobileMore().click();\r\n\t\t\tadd_manual_transaction.mobileTransactionIcon().click();\r\n\t\t} else {\r\n\t\t\tif (Config.getInstance().getEnvironment().toLowerCase().contains(\"bbt\")) {\r\n\t\t\t\tPageParser.forceNavigate(\"Transaction\", d);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\tSeleniumUtil.refresh(d);\r\n\t\t\tSeleniumUtil.waitForPageToLoad(2000);\r\n\t\t\tPageParser.forceNavigate(\"Transaction\", d);\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\tSeleniumUtil.waitForPageToLoad(10000);\r\n\t\t\tSeleniumUtil.click(add_manual_transaction.addManualLink());\r\n\t\t\t\r\n\t\t\tSeleniumUtil.waitForPageToLoad();\r\n\t\t}\r\n\t\tSeleniumUtil.click(add_manual_transaction.add());\r\n\r\n\t\tSeleniumUtil.waitForPageToLoad();\r\n\t\tAssert.assertEquals(add_manual_transaction.amountErr().getText(), PropsUtil.getDataPropertyValue(\"Erorr\"));\r\n\r\n\t\t\r\n\r\n\t}",
"private void validateDetails() {\n\n clearErrors();\n Utils.hide_keyboard(getActivity());\n\n boolean valid = true;\n\n String cvv = cvvTv.getText().toString();\n String expiryDate = cardExpiryTv.getText().toString();\n String cardNo = cardNoTv.getText().toString();\n\n if (cvv.length() < 3) {\n valid = false;\n cvvTil.setError(\"Enter a valid cvv\");\n }\n\n if (expiryDate.length() != 5) {\n cardExpiryTil.setError(\"Enter a valid expiry date\");\n valid = false;\n }\n\n String cardNoStripped = cardNo.replaceAll(\"\\\\s\", \"\");\n\n if (cardNoStripped.length() < 12 ) {\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n else {\n try {\n Long parsed = Long.parseLong(cardNoStripped);\n }\n catch (Exception e) {\n e.printStackTrace();\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n }\n\n if (valid) {\n\n if (saveCardSwitch.isChecked()) {\n int cardLen = cardNoStripped.length();\n cardFirst6 = cardNoStripped.substring(0, 6);\n cardLast4 = cardNoStripped.substring(cardLen - 4, cardLen);\n shouldISaveThisCard = true;\n presenter.savePotentialCardDets(cardFirst6, cardLast4);\n }\n\n //make request\n PayloadBuilder builder = new PayloadBuilder();\n builder.setAmount(thetellerInitializer.getAmount() + \"\")\n .setNarration(thetellerInitializer.getNarration())\n .setCardno(cardNoStripped)\n .set3dUrl(thetellerInitializer.get3dUrl())\n .setEmail(thetellerInitializer.getEmail())\n .setCurrency(thetellerInitializer.getCurrency())\n .setMerchant_id(thetellerInitializer.getMerchant_id())\n .setCvv(cvv).setFirstname(thetellerInitializer.getfName())\n .setLastname(thetellerInitializer.getlName())\n .setIP(Utils.getDeviceImei(getActivity()))\n .setTxRef(thetellerInitializer.getTxRef())\n .setExpiryyear(expiryDate.substring(3,5))\n .setExpirymonth(expiryDate.substring(0,2))\n .setMeta(thetellerInitializer.getMeta())\n .setApiUser(thetellerInitializer.getApiUser())\n .setApiKey(thetellerInitializer.getApiKey())\n .setDevice_fingerprint(Utils.getDeviceImei(getActivity()))\n .setCardType(cardType);\n\n if (thetellerInitializer.getPayment_plan() != null) {\n builder.setPaymentPlan(thetellerInitializer.getPayment_plan());\n }\n\n body = builder.createPayload();\n\n presenter.chargeCard(body, thetellerConstants.API_KEY);\n }\n }",
"private void validadeFields() {\n\t\tboolean enabled = textDescription.getText().trim().length() > 0 &&\n\t\ttextExpectedResults.getText().trim().length() > 0;\n\t\tgetOkayButton().setEnabled(enabled);\n\t}",
"public void verifyPageRedirectingToCreateAdPageOnClickingPostButtonInThePopup() throws Exception {\n\t\t\tOverviewTradusPROPage overviewObj=new OverviewTradusPROPage(driver);\n\t\t\twaitTill(2000);\n\t\t\tLoginTradusPROPage loginPage = new LoginTradusPROPage(driver);\n\t\t\tloginPage.setAccountEmailAndPassword(\"harish.boyapati+0289@olx.com\", \"sunfra123\");\n\t\t\tjsClick(driver, loginPage.LoginButton);\n\t\t\twaitTill(5000);\n\t\t\tif(!verifyElementPresent(overviewObj.PostYourAdButtonOnWelcomePopup))\n\t\t\t{\n\t\t\t\tdriver.navigate().refresh();\n\t\t\t}\n\t\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.PostYourAdButtonOnWelcomePopup);\n\t\t\tjsClick(driver, overviewObj.PostYourAdButtonOnWelcomePopup);\n\t\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.createStockPageVerificationElement);\n\t\t\tAssert.assertTrue(getCurrentUrl(driver).equals(\"https://pro.tradus.com/lms/ads/create\"),\n\t\t\t\t\t\t\"Page not redirected to create ad page on clicking post button on welcome popup\");\n\t\t\tjsClick(driver, overviewObj.overviewOptioninSiderBar);\n\t\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.overviewPageVerificationElement);\n\t\t}",
"public void verifyPopupShouldNotDisplayAfterPublishingTheAd() throws Exception {\n\t\t\tCreateStockTradusProPage createStockObj= new CreateStockTradusProPage(driver);\n\t\t\tAllStockTradusPROPage AllStockPage= new AllStockTradusPROPage(driver);\n\t\t\tOverviewTradusPROPage overviewObj=new OverviewTradusPROPage(driver);\n\t\t\twaitTill(2000);\n\t\t\tLoginTradusPROPage loginPage = new LoginTradusPROPage(driver);\n\t\t\tloginPage.setAccountEmailAndPassword(\"harish.boyapati+0289@olx.com\", \"sunfra123\");\n\t\t\tjsClick(driver, loginPage.LoginButton);\n\t\t\twaitTill(5000);\n\t\t\tif(!verifyElementPresent(overviewObj.PostYourAdButtonOnWelcomePopup))\n\t\t\t{\n\t\t\t\tdriver.navigate().refresh();\n\t\t\t}\n\t\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.TradusWelcomeBox);\n\t\t\tjsClick(driver, overviewObj.PostYourAdButtonOnWelcomePopup);\n\t\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.createStockPageVerificationElement);\n\t\t\tcreateStockObj.uploadImageButtonInPostingForm.sendKeys(System.getProperty(\"user.dir\") + \"\\\\Tire.jpeg\");\n\t\t\texplicitWaitFortheElementTobeVisible(driver, createStockObj.successToastInPostingForm);\n\t\t\twaitTill(1000);\n\t\t\tscrollToElement(driver, createStockObj.priceSectionInPostingForm);\n\t\t\twaitTill(3000);\n\t\t\tclick(createStockObj.priceTypeFieldPostingForm);\n\t\t\twaitTill(1000);\n\t\t\tactionClick(driver, createStockObj.priceTypeasFixed);\n\t\t\twaitTill(1000);\n\t\t\tif (!getText(createStockObj.currencyFieldAutofillValue).equalsIgnoreCase(\"EUR\")) {\n\t\t\t\tclick(createStockObj.currencyTypeFieldPostingForm);\n\t\t\t\twaitTill(1000);\n\t\t\t\tactionClick(driver, createStockObj.currencyTypeasEuro);\n\t\t\t}\n\t\t\tsendKeys(createStockObj.netPriceFieldPostingForm, \"10000\");\n\t\t\twaitTill(1000);\n\t\t\tscrollToElement(driver, createStockObj.yourVehicleSectionInPostingForm);\n\t\t\twaitTill(2000);\n\t\t\tclick(createStockObj.vehicleTypeFieldPostingForm);\n\t\t\tactionClick(driver, createStockObj.vehicleTypeasSpareParts);\n\t\t\twaitTill(3000);\n\t\t\tclick(createStockObj.vehicleCategoryFieldPostingForm);\n\t\t\tactionClick(driver, createStockObj.vehicleCategoryasTires);\n\t\t\twaitTill(2000);\n\t\t\tclick(createStockObj.vehicleMakeFieldPostingForm);\n\t\t\tactionClick(driver, createStockObj.vehicleMakeasVolvo);\n\t\t\twaitTill(3000);\n\t\t\tclick(createStockObj.vehicleModelFieldPostingForm);\n\t\t\tactionClick(driver, createStockObj.vehicleModelas8700);\n\t\t\twaitTill(4000);\n\t\t\tsendKeys(createStockObj.descriptionAreainPostingForm, \"Ad\");\n\t\t\tjsClick(driver, createStockObj.postYourAdButton);\n\t\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.MyStockText);\n\t\t\tjsClick(driver, overviewObj.overviewOptioninSiderBar);\n\t\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.overviewPageVerificationElement);\n\t\t\twaitTill(5000);\n\t\t\tAssert.assertFalse(verifyElementPresent(overviewObj.TradusWelcomeBox),\n\t\t\t\t\t\"Welcome popup displaying even after clicking cross icon\");\n\t\t}",
"void postAd(AdUploadDto ad) throws AdNotUploadedException;",
"private void validateCardId(ATMSparrowMessage atmSparrowMessage, BankFusionEnvironment env) {\n\n try {\n IBOATMCardDetails atmCardDetails = (IBOATMCardDetails) env.getFactory().findByPrimaryKey(IBOATMCardDetails.BONAME,\n atmSparrowMessage.getCardNumber());\n }\n catch (BankFusionException bfe) {\n atmSparrowMessage.setAuthorisedFlag(ATMConstants.NOTAUTHORIZED_MESSAGE_FLAG);\n Object[] field = new Object[] { atmSparrowMessage.getCardNumber() };\n if (atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_0)\n || atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_6)) {\n // populateErrorDetails(ATMConstants.NOTAUTHORIZED_MESSAGE_FLAG,\n // ATMConstants.WARNING, 7510, BankFusionMessages.ERROR_LEVEL,\n populateErrorDetails(ATMConstants.NOTAUTHORIZED_MESSAGE_FLAG, ATMConstants.WARNING,\n ChannelsEventCodes.E_INVALID_CARD, BankFusionMessages.ERROR_LEVEL, atmSparrowMessage, field, env);\n }\n else if (atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_1)\n || atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_2)\n || atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_3)\n || atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_7)\n || atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_5)\n || atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_8)) {\n // populateErrorDetails(ATMConstants.NOTAUTHORIZED_MESSAGE_FLAG,\n // ATMConstants.CRITICAL, 7511, BankFusionMessages.ERROR_LEVEL,\n populateErrorDetails(ATMConstants.NOTAUTHORIZED_MESSAGE_FLAG, ATMConstants.CRITICAL,\n ChannelsEventCodes.E_INVALID_CARD_FORCE_POST_NOT_POSTED, BankFusionMessages.ERROR_LEVEL, atmSparrowMessage,\n field, env);\n }\n }\n }",
"private void checkInvalidInformation(EditPlanDirectToManaged editPlanPage) throws Exception {\n //\n Reporter.log(\"Verifying Error Messages on Edit Plan Page\", true);\n editPlanPage.invalidEditPlanUpdate();\n softAssert.assertTrue(editPlanPage.verifyEditPlanErrorMessage());\n\n //Re-Enter correct details\n editPlanPage.updateAnnualHouseHoldincome(Constants.DEFAULT_ANNUAL_HOUSEHOLD_INCOME);\n editPlanPage.updateRetirementAge(Constants.DEFAULT_RETIREMENT_AGE + \"\");\n }",
"protected void validateFault(TFault[] param){\n \n }",
"@Test(enabled=false)\n\tpublic void verifyGroupEventContactInformationPageFields_TCID_5032() throws InterruptedException, AWTException {\n\t\tSystem.out.println(\"----> 5032:Event:Verify the form validation in Group Party/Contact information in Contact information page\");\n\t\tkidsGroupEventPage.validateSearchLocation(\"\");//Enter location Example: \"North York, Ontario\" or \"IRVING, TX, USA\".\n\t\t//If Test case is not location specific enter blank as: \"\" \n\t\tkidsGroupEventPage.validateSelectStore();\n\t\tkidsGroupEventPage.validateChoosePackage(\"60min\");\n\t\tkidsGroupEventPage.validateSelectChildAdultAndDate(bookingdate);\n\t\tkidsGroupEventPage.validateSelectPackageORTimeSlot(\"60min\",\"\",0);//Base PKG, YES/NO to Upgrade,\n\t\t//ORDER OF THE PARAMETERS PASSING FOR METHOD CALLING ------------>\n\t\t//( sOrgName, sOrgPhone, sOrgExtn, sAdultName, sEnterPhoneNumberUsingRobot, sAdultEmail\n\t\tString errMsg1 = kidsGroupEventPage.validateGroupEventContactInformationPageFields(\"NO\", \"YES\", \"YES\", \"YES\", \"YES\", \"YES\");\n\t\tSystem.out.println(\"errMsg1\"+errMsg1);\n\t\t/*\tString errMsg2 = kidsGroupEventPage.validateGroupEventContactInformationPageFields(\"YES\", \"NO\", \"\", \"YES\", \"YES\", \"YES\");\n\t\tSystem.out.println(\"errMsg2\"+errMsg2);\n\t\tString errMsg4 = kidsGroupEventPage.validateGroupEventContactInformationPageFields(\"YES\", \"YES\", \"\", \"NO\", \"YES\", \"YES\");\n\t\tSystem.out.println(\"errMsg4\"+errMsg4);\n\t\tString errMsg5 = kidsGroupEventPage.validateGroupEventContactInformationPageFields(\"YES\", \"YES\", \"\", \"YES\", \"NO\", \"YES\");\n\t\tSystem.out.println(\"errMsg5\"+errMsg5);*/\n\t\tString errMsg6 = kidsGroupEventPage.validateGroupEventContactInformationPageFields(\"NO\", \"NO\", \"\", \"NO\", \"NO\", \"NO\");\n\t\tSystem.out.println(\"errMsg6\"+errMsg6);\n\n\t\t//Condition to validate all methods called return message text. \n\t\tif(errMsg1.contains(\"Please fill out all organization information.\")/* && errMsg2.contains(\"Please enter a valid phone number.\") && errMsg5.contains(\"Please enter a valid phone number.\") && errMsg6.contains(\"Please enter a valid email address.\")*/){\n\t\t\tAssert.assertTrue(true);\n\t\t}else{\n\t\t\tAssert.assertTrue(false);\n\t\t}\n\t}",
"@Test\n public void everything_correct() throws Exception {\n System.out.println(\"everything_correct\");\n HttpServletRequest req = null;\n HttpServletResponse resp = null;\n privateMessage_txt instance = new privateMessage_txt();\n instance.doPost(req, resp);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"@Test(description = \"AT-29586:TRA_01_32:verify the investment Curency field\", priority = 33)\r\n\tpublic void verifyInvestmentAmountMandatoryField() {\n\r\n\t\tif (PropsUtil.getEnvPropertyValue(\"MOBILEORWEB\").equalsIgnoreCase(\"WEB\"))\r\n\r\n\t\t{ if (Config.getInstance().getEnvironment().toLowerCase().contains(\"bbt\")) {\r\n\t\t\tPageParser.forceNavigate(\"Transaction\", d);\r\n\t\t\tSeleniumUtil.waitForPageToLoad(2000);\r\n\t\t }\r\n\t\telse{\r\n\t\t\td.navigate().refresh();\r\n\t\t SeleniumUtil.waitForPageToLoad(2000);\r\n\t\t\tPageParser.forceNavigate(\"Transaction\", d);\r\n\t\t\tSeleniumUtil.waitForPageToLoad(2000);\r\n\t\t\t}\r\n\t\tadd_manual_transaction.addManualLink().click();\r\n\t\tSeleniumUtil.waitForPageToLoad(2000);\r\n\t\t}\r\n\t\tSeleniumUtil.click(add_manual_transaction.TransactionType());\r\n\r\n\t\tSeleniumUtil.waitForPageToLoad();\r\n\t\tSeleniumUtil.click(add_manual_transaction.TtransactionList().get(2));\r\n\r\n\t\tSeleniumUtil.waitForPageToLoad();\r\n\t\tSeleniumUtil.click(add_manual_transaction.add());\r\n\t\tSeleniumUtil.waitForPageToLoad();\r\n\t\tAssert.assertEquals(add_manual_transaction.amountErr().getText(), PropsUtil.getDataPropertyValue(\"Erorr\"));\r\n\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a model type's definition from a required interface. | private String createModelTypeForRequiredInterface(
RequiredInterface requiredInterface) {
String answer = "modeltype " + requiredInterface.getName() + "{\n";
answer += " syntax \"platform:/resource" + requiredInterface.getEcoreRelativePath() + "\"\n}\n";
return answer;
} | [
"RequiredInterfaceDefinition createRequiredInterfaceDefinition();",
"InterfaceDefinition createInterfaceDefinition();",
"ProvidedInterfaceDefinition createProvidedInterfaceDefinition();",
"private String createModelTypeForProvidedInterface(\n\t\t\tProvidedInterface providedInterface) {\n\t\tString answer = \"modeltype \" + providedInterface.getName() + \"{\\n\";\n\t\tanswer += \" syntax \\\"platform:/resource\" + providedInterface.getEcoreRelativePath() + \"\\\"\\n}\\n\";\n\t\treturn answer;\n\t}",
"ModelType createModelType();",
"IFMLModel createIFMLModel();",
"TypeInterface createTypeInterface();",
"InputObjectTypeDefinition createInputObjectTypeDefinition();",
"InterfaceDescription createInterfaceDescription();",
"public interface ModelCreator {\n\tpublic int setEmail(String email);\n\tpublic int setFamilyName(String familyName);\n\tpublic int setGivenName(String givenName);\n\tpublic int setOrganisation(String organisation);\n}",
"D create(@Assisted(\"interfaceClass\") Class<?> interfaceClass,\n @Assisted(\"version\") String version);",
"ObjectTypeDefinition createObjectTypeDefinition();",
"public ModelDef getModelDefinition(Class<?> modelType, Set<LovRef> requiredLovs)\r\n\t{\r\n\t\tString modelName = getModelName(modelType);\r\n\t\t\r\n\t\t//create model def instance and set basic properties\r\n\t\tModelDef modelDef = new ModelDef();\r\n\t\tmodelDef.setName(modelName);\r\n\t\tmodelDef.setLabel(defUtils.getLabel(modelType, modelType.getSimpleName(), modelType.getName()));\r\n\t\t\r\n\t\tExtendableModel extendableModelAnnot = modelType.getAnnotation(ExtendableModel.class);\r\n\t\t\r\n\t\tif(extendableModelAnnot != null && IExtendableModel.class.isAssignableFrom(modelType))\r\n\t\t{\r\n\t\t\tmodelDef.setExtensionName(extendableModelAnnot.name());\r\n\t\t}\r\n\t\t\r\n\t\t//fetch field definitions and set it on model type def\r\n\t\tList<FieldDef> fieldDefLst = new ArrayList<>();\r\n\t\tClass<?> curCls = modelType;\r\n\t\t\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tif(curCls.getName().startsWith(\"java\"))\r\n\t\t\t{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tField fields[] = curCls.getDeclaredFields();\r\n\t\t\t\r\n\t\t\tfor(Field field : fields)\r\n\t\t\t{\r\n\t\t\t\t//ignore static fields\r\n\t\t\t\tif(Modifier.isStatic(field.getModifiers()))\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//if field is marked to be ignore, ignore\r\n\t\t\t\tif(field.getAnnotation(IgnoreField.class) != null)\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\tfieldDefLst.add(fieldDefBuilder.getFieldDef(modelType, field, requiredLovs));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcurCls = curCls.getSuperclass();\r\n\t\t}\r\n\t\t\r\n\t\tmodelDef.setFields(fieldDefLst);\r\n\t\tmodelDef.setDateFormat(configuration.getDateFormat().toPattern());\r\n\t\tmodelDef.setJsDateFormat(configuration.getJsDateFormat());\r\n\t\t\r\n\t\treturn modelDef;\r\n\t}",
"ImplementationDefinition createImplementationDefinition();",
"protected abstract IModel<T> createModel(T object);",
"ImplementationType createImplementationType();",
"Definition createDefinition();",
"TypeDefinition createTypeDefinition();",
"InterfaceDeclaration createInterfaceDeclaration();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the bid property. | public void setBid(double value) {
this.bid = value;
} | [
"public void setBid(Integer bid) {\n this.bid = bid;\n }",
"public void setBid(String bid) {\r\n this.bid = bid;\r\n }",
"public String getBid() {\r\n return bid;\r\n }",
"public String getBid() {\n return bid;\n }",
"public Integer getBid() {\n return bid;\n }",
"public void setBidId(int bidId) {\n\t\tthis.bidId = bidId;\n\t}",
"public void setBidId(Long bidId) {\n this.bidId = bidId;\n }",
"public void setBidPrice(double bidPrice) {\n\t\tthis.bidPrice = bidPrice;\n\t}",
"@OPERATION\n\tvoid bid(int bid)\n\t{\n\t\tif (isOpen)\n\t\t{\n\t\t\tif (bestBid == null || bestBid.getBid() > bid)\n\t\t\t{\n\t\t\t\tbestBid = new Bid(getOpUserName(), bid);\n\t\t\t}\n\t\t}\n\t}",
"public void setB(int value) {\n this.b = value;\n }",
"public void updateBid(Bid b) {\r\n this.edit(b);\r\n }",
"public void setB_(double b_) {\n\t\tthis.b_ = b_;\n\t}",
"public Long getBidId() {\n return bidId;\n }",
"public void setBId(int BId) {\n this.BId = BId;\n }",
"public void setWinningBid(int winningBid) {\n this.winningBid = winningBid;\n }",
"public Builder setBidPrice(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n bidPrice_ = value;\n onChanged();\n return this;\n }",
"public com.google.api.ads.adwords.axis.v201809.cm.Money getBid() {\n return bid;\n }",
"public void setBidNo(String bidNo) {\n this.bidNo = bidNo == null ? null : bidNo.trim();\n }",
"public String getBidNo() {\n return bidNo;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Receives parts of a multipart message from `source` socket and sends them to `destination` socket. Stops when the multipart message is over, i.e. there are no more messages to receive. | private static void forwardMessages(Socket source, Socket destination) {
while (true) {
byte[] msg = source.recv(0);
boolean hasMore = source.hasReceiveMore();
destination.send(msg, hasMore ? ZMQ.SNDMORE : 0);
if (!hasMore) break;
}
} | [
"private void transferFilePeer(){\n\n try{\n\n BufferedReader bf = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n StringBuilder sb = new StringBuilder();\n String message = bf.readLine();\n\n int i = 3;\n\n //get the fileName from the input stream\n while (message.charAt(i) != ')'){\n sb.append(message.charAt(i));\n i++;\n }\n\n String fileName = sb.toString();\n\n Path path = Paths.get(\"p2p/shared/\" + fileName);\n\n InputStream inputStream = Files.newInputStream(path);\n OutputStream outputStream = socket.getOutputStream();\n\n byte[] buffer = new byte[bufferSize];\n boolean readingFromBuffer = true;\n\n // read from the buffer and then write to output stream\n while (readingFromBuffer){\n int streamSize = inputStream.read(buffer);\n if(streamSize == - 1) {\n readingFromBuffer = false;\n } else {\n outputStream.write(buffer, 0, streamSize);\n }\n }\n\n //close the Socket and InputStream\n socket.close();\n inputStream.close();\n System.out.println(\"Completed file transmission to the requesting peer.\");\n\n } catch (IOException e){\n System.out.println(\"Error receiving file in data socket.\");\n System.exit(1);\n }\n }",
"private void readMessage(InputStream socketIn) throws IOException {\n\t\tif (!this._splittedPacket) {\n\t\t\t//read header message\n\t\t\tthis._message = NetworkProtocolMessage.readHeader(socketIn);//wait new message\n\t\t\t\n\t\t\t//assigne length packet a read\n\t\t\tint packetLen = this._message.getPacketLen();\n\t\t\t\n\t\t\tif (packetLen <= 0)\n\t\t\t\treturn ;\n\t\t\t\n\t\t\tif (socketIn.available() < packetLen) {\n\t\t\t\tpacketLen = socketIn.available();\n\t\t\t}\n\t\t\t\n\t\t\t//prepare part buffer and read\n\t\t\tbyte[] messagePartBuffer = new byte[packetLen];\n\t int readed = socketIn.read(messagePartBuffer);\n\t \n\t //prepare buffer of size readed size\n\t byte[] messageBuffer = new byte[readed];\n\t \n\t //copie length readed to final buffer\n\t System.arraycopy(messagePartBuffer, 0, messageBuffer, 0, readed);\n\t \n\t //set splitted packet if length is inf\n\t if (readed < this._message.getPacketLen()) {\n\t \tthis._splittedPacket = true;\n\t }\n\t \n\t //set buffer to 0 if readed is equal to zero\n\t if (readed == 0) {\n\t \tthis._message.setData(new byte[0]);\n\t \treturn ;\n\t }\n\t //set final buffer to defaultmessage\n\t this._message.setData(messageBuffer);\n\t \n\t\t} else {\n\t\t\t//loop if available is < or equals to zero\n\t\t\tif (socketIn.available() <= 0)\n\t\t\t\treturn ;\n\t\t\t//assig current length readed and packet total length\n\t\t\tint packetLen = this._message.getPacketLen();\n\t\t\tint partLen = packetLen - this._message.getData().length;\n\t\t\t\n\t\t\t//prepare part buffer and read\n\t\t\tbyte[] messagePartBuffer = new byte[partLen];\n\t int readed = socketIn.read(messagePartBuffer);\n\t \n\t //prepare buffer of size readed size with after readed\n\t byte[] messageBuffer = new byte[readed + this._message.getData().length];\n\t \n\t //copie length readed to final buffer\n\t System.arraycopy(this._message.getData(), 0, messageBuffer, 0, this._message.getData().length);\n\t System.arraycopy(messagePartBuffer, 0, messageBuffer, this._message.getData().length, readed);\n\t \n\t //set final buffer to defaultmessage\n\t this._message.setData(messageBuffer);\n\t \n\t //set this._splittedPacket to false if message totality readed\n\t\t\tif (messageBuffer.length >= packetLen) {\n\t\t this._splittedPacket = false;\n\t\t\t}\n\t\t}\n\t}",
"public static void transferStreams(InputStream source, OutputStream destination) throws IOException {\n \t\tsource = new BufferedInputStream(source);\n \t\tdestination = new BufferedOutputStream(destination);\n \t\ttry {\n \t\t\tbyte[] buffer = new byte[8192];\n \t\t\twhile (true) {\n \t\t\t\tint bytesRead = -1;\n \t\t\t\tif ((bytesRead = source.read(buffer)) == -1)\n \t\t\t\t\tbreak;\n \t\t\t\tdestination.write(buffer, 0, bytesRead);\n \t\t\t}\n \t\t} finally {\n \t\t\tdestination.flush();\n \t\t}\n \t}",
"void sendMultipartText(String destinationAddress, String scAddress, ArrayList<String> parts,\n ArrayList<PendingIntent> sentIntents, ArrayList<PendingIntent> deliveryIntents) {\n\n int ref = ++sConcatenatedRef & 0xff;\n\n for (int i = 0, count = parts.size(); i < count; i++) {\n // build SmsHeader\n byte[] data = new byte[3];\n data[0] = (byte) ref; // reference #, unique per message\n data[1] = (byte) count; // total part count\n data[2] = (byte) (i + 1); // 1-based sequence\n SmsHeader header = new SmsHeader();\n header.add(new SmsHeader.Element(SmsHeader.CONCATENATED_8_BIT_REFERENCE, data));\n PendingIntent sentIntent = null;\n PendingIntent deliveryIntent = null;\n\n if (sentIntents != null && sentIntents.size() > i) {\n sentIntent = sentIntents.get(i);\n }\n if (deliveryIntents != null && deliveryIntents.size() > i) {\n deliveryIntent = deliveryIntents.get(i);\n }\n\n SmsMessage.SubmitPdu pdus = SmsMessage.getSubmitPdu(scAddress, destinationAddress,\n parts.get(i), deliveryIntent != null, header.toByteArray());\n\n sendRawPdu(pdus.encodedScAddress, pdus.encodedMessage, sentIntent, deliveryIntent);\n }\n }",
"void recvMsg() throws IOException {\n msgFromClient.clear();\n int numOfReadBytes;\n numOfReadBytes = clientChannel.read(msgFromClient);\n if (numOfReadBytes == -1) {\n throw new IOException(\"Client has closed connection.\");\n }\n String recvdString = extractMessageFromBuffer();\n msgSplitter.appendRecvdString(recvdString);\n ForkJoinPool.commonPool().execute(this);\n }",
"public void receiveData(){\n try {\n // setting up input stream and output stream for the data being sent\n fromClient = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n fileCount++;\n outputFile = new FileOutputStream(\"java_20/server/receivedFiles/receivedFile\"+fileCount+\".txt\");\n char[] receivedData = new char[2048];\n String section = null;\n\n //read first chuck of data and start timer\n int dataRead = fromClient.read(receivedData,0,2048);\n startTimer();\n\n //Read the rest of the files worth of data\n while ( dataRead != -1){\n section = new String(receivedData, 0, dataRead);\n outputFile.write(section.getBytes());\n\n dataRead = fromClient.read(receivedData, 0, 2048);\n }\n\n //stop timers\n endTimer();\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }",
"@Override\n\tprotected void processConnection() {\n\t\t\n\t\twhile(true) {\n\t\t\t\n\t\t\ttry {\n\t\t\t\tint receiverID = (Integer) input.readObject();\n\t\t\t\tString message = (String) input.readObject();\n\t\t\t\t\n\t\t\t\tClientHandler recieverHandler = Server.clientConnections.get(receiverID);\n\t\t\t\tif(recieverHandler == null) {\n\t\t\t\t\tsendData(ERROR_CODE);\n\t\t\t\t\tsendData(\"Not available\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\trecieverHandler.sendData(clientID);\n\t\t\t\t\trecieverHandler.sendData(message);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(ClassNotFoundException classNotFoundException) {\n\t\t\t\tserver.serverGUI.showMessage(\"Unknown object type recieved.\");\n\t\t\t}\n\t\t\tcatch(IOException ioException) {\n\t\t\t\tserver.serverGUI.showMessage(\"Client terminated connection.\\n\");\n\t\t\t\tcloseConnection();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"private void reader() {\t\n\t\tint readsize = 0;\n\t\tbyte[] buf = new byte[SOCKET_MAXSIZE];\n\t\ttry{\n\t\t\tInputStream in = socket.getInputStream();\n\t\t\tByteBuffer recvData = null;\n\t\t\t\n\t\t\twhile (running && socket != null && socket.isConnected()) {\n\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\treadsize = in.read(buf,0, SOCKET_MAXSIZE);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tonDisconnected();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(0 >= readsize){\n\t\t\t\t\tonDisconnected();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// 没有可收数据\n\t\t\t\tif(null == recvData)\n\t\t\t\t{\n\t\t\t\t\t// 解析用バッファにread結果を設定\n\t\t\t\t\trecvData = ByteBuffer.allocate(readsize);\n\t\t\t\t\trecvData.put(buf, 0, readsize);\n\t\t\t\t\trecvData.position(0);\n\t\t\t\t}\n\t\t\t\t// 继续接收数据\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// 扩充解析缓冲\n\t\t\t\t\tByteBuffer readBuff = ByteBuffer.allocate(readsize + recvData.limit());\n\t\t\t\t\t// 把上回接收数据放入\n\t\t\t\t\treadBuff.put(recvData.array(), 0, recvData.limit());\n\t\t\t\t\t// 放入本回接收数据\n\t\t\t\t\treadBuff.put(buf, 0, readsize);\n\t\t\t\t\t// 解析用缓冲设置\n\t\t\t\t\trecvData = readBuff;\n\t\t\t\t}\n\t\t\t\tStompFrame frame = null;\n\t\t\t\tdo{\n\t\t\t\t\t// parsing raw data to StompFrame format\n\t\t\t\t\tframe = StompFrame.parse(recvData, recvData.position(), recvData.capacity());\n\t\t\t\t\t\n\t\t\t\t\t// 解析长度不足, 等待再接收数据后再处理\n\t\t\t\t\tif(frame.remainSize > 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else if(frame.parseSize == recvData.capacity()){\n\t\t\t\t\t\trecvData = null;\n\t\t\t\t\t}else{ // 继续解析下一条\n\t\t\t\t\t\t// 扩充解析缓冲\n\t\t\t\t\t\tByteBuffer readBuff = ByteBuffer.allocate(recvData.limit() - frame.parseSize);\n\t\t\t\t\t\t// 把已解析数据除去\n\t\t\t\t\t\treadBuff.put(recvData.array(), frame.parseSize, recvData.limit() - frame.parseSize);\n\t\t\t\t\t\t// 解析用缓冲设置\n\t\t\t\t\t\trecvData = readBuff;\n\t\t\t\t\t\trecvData.position(0);\n\t\t\t\t\t}\n\t\t\t\t\tpostMessage(frame);\n\t\t\t\t}while(recvData != null && recvData.hasRemaining());\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tonCriticalError(e);\n\t\t\te.printStackTrace();\n\t\t\tonDisconnected();\n\t\t\treturn;\n\t\t}\t\t\t\t\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t//(for download req c->p) [header | file_id (4) | start index (4) | stop index (4)]\n\t\t//(for download chunk p->c) [header | file_id (4) | start index (4) | data (?)]\n\t\ttry {\n\t\t\tSystem.out.println(\"Waiting for peer to send data @\" + peer_connection.getInetAddress());\n\t\t\tif (stop_index - start_index == 0)\n\t \t\tthrow new RuntimeException(\"BAD INTERVAL\");\n\t \tpeer_connection.setSoTimeout(Constants.PEER_TIMEOUT);\n\t \tOutputStream out = new BufferedOutputStream(peer_connection.getOutputStream());\n\t\t\tInputStream in = new BufferedInputStream(peer_connection.getInputStream());\n\t \t\n\t\t\t// send ack to peer\n\t\t\tbuf = Utility.addHeader(Constants.PEER, 12, id);\n\t \tbuf.putInt(Constants.HEADER_LEN, file_id);\n\t \tbuf.putInt(Constants.HEADER_LEN + 4, start_index);\n\t \tbuf.putInt(Constants.HEADER_LEN + 8, stop_index);\n\t \tout.write(buf.array());\n\t \tout.flush();\n\t \t\n\t\t\twhile(!shutdown_normally) {\n\t\t \tif ((buf=Utility.readIn(in, Constants.HEADER_LEN)) == null){\n\t\t \t\tin.close();\n\t\t \t\tout.close();\n\t\t \t\tthrow new IOException(\"read failed.\");\n\t\t \t}\n\t\t \tif (buf.getInt(0) == Constants.CLOSE_CONNECTION && buf.getInt(8) != peer_id){\n\t\t \t\tshutdown_normally = true;\n\t\t \t} else if (buf.getInt(0) != Constants.PEER || buf.getInt(8) != peer_id) {\n\t\t \t\tin.close();\n\t\t \t\tout.close();\n\t\t \t\tthrow new RuntimeException(\n\t\t \t\t\t\t\"Malformed header from peer @\" + peer_connection.getInetAddress());\n\t\t \t}\n\t\t \tint len = buf.getInt(4);\n\t\t \t// read payload\n\t\t \tif ((buf=Utility.readIn(in, Utility.getPaddedLength(len))) == null) {\n\t\t \t\tin.close();\n\t\t \t\tout.close();\n\t\t \t\tthrow new IOException(\"read failed.\");\n\t\t \t}\n\t\t \tif (buf.getInt(0) != file_id || buf.getInt(4) != start_index) {\n\t\t \t\tin.close();\n\t\t \t\tout.close();\n\t\t \t\tthrow new RuntimeException(\n\t\t \t\t\t\t\"Received a bad payload from peer @\" + peer_connection.getInetAddress());\n\t\t \t}\n\t\t \tSystem.out.println(\"Received data from peer. start: \"\n\t\t \t\t+start_index +\", stop: \"+stop_index +\" @\" + peer_connection.getInetAddress());\n\t\t \tbyte[] data = new byte[len - 8];\n\t\t \tfor (int i = 0; i < len - 8; i++){\n\t\t \t\tdata[i] = buf.get(i + 8);\n\t\t \t}\n\t\t \t// aquire lock, write bytes to file\n\t\t \tbytes_written = FileWriter.getInstance().writeToFile(filepath, data, start_index);\n\t\t \tshutdown_normally = true; // never gets close request from server\n\t\t\t}\n\t } catch (UnknownHostException e) {\n\t\t\t// IPAdress unknown\n\t\t\tif (!shutdown_normally)\n\t\t\t System.err.println(\"Peer - Failure! @\" + \n\t\t\tpeer_connection.getInetAddress() + \" (\" + e.getMessage() + \")\");\n\t\t} catch (SocketException e) {\n\t\t\t// bad port\n\t\t\tif (!shutdown_normally)\n\t\t\t\tSystem.err.println(\"Peer - Failure! @\" + \n\t\t\tpeer_connection.getInetAddress() + \" (\" + e.getMessage() + \")\");\n\t\t} catch (IOException e) {\n\t\t\t// Error in communication\n\t\t\tif (!shutdown_normally)\n\t\t\t\tSystem.err.println(\"Peer - Failure! @\" + \n\t\t\tpeer_connection.getInetAddress() + \" (\" + e.getMessage()+\")\");\n\t\t} catch (RuntimeException e){\n\t\t\tif (!shutdown_normally)\n\t\t\t\tSystem.err.println(\"Peer - Failure! @\" + \n\t\t\t\t\t\tpeer_connection.getInetAddress() + \" (\" + e.getMessage()+\")\");\n\t\t} finally {\n\t\t\tSystem.out.println(\"Closing peer connection @\" + peer_connection.getInetAddress());\n\t\t\tif (!peer_connection.isClosed())\n\t\t\t\ttry {\n\t\t\t\t\tpeer_connection.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t}\n\t}",
"@Override\n public void doDataReceived(ResourceDataMessage dataMessage) {\n if(outputStream == null) return;\n if(startTime == 0) startTime = System.nanoTime();\n if (this.getTunnel() == null)\n this.setTunnel(dataMessage.getNetworkMessage().getTunnel());\n\n EventManager.callEvent(new ResourceTransferDataReceivedEvent(this, dataMessage));\n\n try {\n if (dataMessage.getResourceData().length != 0) {\n //Saving received chunks\n byte[] chunk = dataMessage.getResourceData();\n written += chunk.length;\n double speedInMBps = NANOS_PER_SECOND / BYTES_PER_MIB * written / (System.nanoTime() - startTime + 1);\n System.out.println();\n logger.info(\"Receiving file: {} | {}% ({}MB/s)\", this.getResource().attributes.get(1), ((float) written / (float) fileLength) * 100f, speedInMBps);\n\n //add to 4mb buffer\n System.arraycopy(chunk, 0, buffer, saved, chunk.length);\n saved += chunk.length;\n if (buffer.length - saved < BUFFER_SIZE || written >= fileLength) {\n //save and clear buffer\n outputStream.write(buffer, 0, saved);\n saved = 0;\n }\n\n\n if (written >= fileLength) {\n this.close();\n }\n } else {\n //Empty chunk, ending the transfer and closing the file.\n logger.info(\"Empty chunk received for: {}, ending the transfer...\", this.getResource().attributes.get(1));\n\n //File fully received.\n this.close();\n }\n } catch (Exception e) {\n callError(e);\n }\n }",
"private void streamCopy(InputStream from, OutputStream to) {\r\n\t\ttry {\r\n\t\t\tint count = 0;\r\n\t\t\tbyte[] buffer = new byte[16*1024];\r\n\t\t\twhile ((count = from.read(buffer)) > 0) {\r\n\t\t\t\tto.write(buffer, 0, count);\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\tEventLogger.logConnectionException(logger, socket, e);\r\n\t\t}\r\n\t}",
"public void run() {\n\n ServerSocket ss = null;\n try {\n\n ss = new ServerSocket(port); // accept connection from other peers and send out blocks of images to others\n\n } catch (Exception e) {\n\n // e.printStackTrace();\n\n }\n\n while (true) {\n\n Socket s;\n\n try {\n\n s = ss.accept();\n\n new Thread(new uploader(s)).start(); // create an uploader thread for each incoming client\n\n } catch (Exception e){\n\n // e.printStackTrace();\n\n }\n\n }\n\n }",
"public abstract void send(String destination, File file);",
"public void handleRecv(GroupCommEventArgs arg) throws GroupCommException {\n\t\tlogger.entering(\"ReliablePt2Pt\", \"handleRecv\");\n\t\tbyte[] b = ((TByteArray) arg.removeFirst()).byteValue();\n\t\tConnection c = (Connection) arg.removeFirst();\n\n\t\tPID pid = tcp.getRemotePID(c);\n GroupCommMessage m = null;\n\t\ttry {\n\t\t\tm = (GroupCommMessage) serialize.unmarshall(b);\n\t\t} catch (Exception e) {\n\t\t\tif (getState(pid) == ST_CONNECTED) {\n\t\t\t\tlogger.log(\n\t\t\t\t\tLevel.INFO,\n\t\t\t\t\t\"Corrupted TCP stream from {0} while connected. Closing connection...\",\n\t\t\t\t\tpid);\n\t\t\t\t//Shutdown the sending stream\n\t\t\t\ttcp.disconnect(c);\n //Acxt as though the remote process has closed the connection\n\t\t\t\tclosed_broken(pid, c);\n //Suspect it at once\n GroupCommMessage suspect = new GroupCommMessage();\n suspect.tpack(new TInteger(SUSPECT));\n timer.schedule(suspect, false, 10);\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tlogger.log(\n\t\t\t\t\tLevel.INFO,\n\t\t\t\t\t\"Corrupted TCP stream from {0}. Exiting...\",\n\t\t\t\t\tpid);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\t\t//m = type::<payload>\n\t\tint type = ((TInteger) m.tunpack()).intValue();\n\t\t//m = <payload>\n\t\tswitch (getState(pid)) {\n\t\t\tcase ST_NULL :\n\t\t\t\t//Maybe I Connected and Disconnected too swiftly. Very weird!!\n\t\t\t\t//Disconnect from it\n\t\t\t\tlogger.log(\n\t\t\t\t\tLevel.INFO,\n\t\t\t\t\t\"Receiving data from unknown connection to {0}. WEIRD!! Disconnecting\",\n\t\t\t\t\tpid);\n\t\t\t\ttcp.disconnect(c);\n\t\t\t\tbreak;\n\t\t\tcase ST_CLOSED :\n\t\t\t\t//\t\t\t\tthrow new GroupCommException(\n\t\t\t\t//\t\t\t\t\t\"ReliablePt2Pt: handleRecv:\"\n\t\t\t\t//\t\t\t\t\t\t+ \"The remote process can't send messages on a closed connection\");\n\n\t\t\t\t//It might happen that the sending thread gets a \"broken\" event, more or less at the \n\t\t\t\t// same time that the receiving thread receives a message.\n\t\t\t\t//If sending thread overtakes receiving thread, we might receive a message \n\t\t\t\t// on a CLOSED connection\n\t\t\t\t// SO WE DISCARD IT...\n\t\t\t\tlogger.log(\n\t\t\t\t\tLevel.INFO,\n\t\t\t\t\t\"Receiving data from closed connection to {0}. WEIRD!! Disconnecting\",\n\t\t\t\t\tpid);\n\t\t\t\ttcp.disconnect(c);\n\t\t\t\tbreak;\n\t\t\tcase ST_CONNECTING :\n\t\t\t\t//I shouldn't be able to receive normal messages yet\n\t\t\t\tif (type != ACK)\n\t\t\t\t\tthrow new GroupCommException(\n\t\t\t\t\t\t\"ReliablePt2Pt: handleRecv:\"\n\t\t\t\t\t\t\t+ \"The remote process can't send messages on a not yet created connection\");\n\t\t\t\t//We may have a crossed connetion. Let's check it\n\t\t\t\tif (((TBoolean) m.tunpack()).booleanValue()) {\n\t\t\t\t\t//All right, just one connection\n\t\t\t\t\tlogger.log(\n\t\t\t\t\t\tLevel.FINE,\n\t\t\t\t\t\t\"Connection to {0} established\",\n\t\t\t\t\t\tpid);\n\t\t\t\t\tsetState(pid, ST_CONNECTED);\n\t\t\t\t\tmapConnection(pid, c);\n\t\t\t\t\ttcp.startSender(c);\n\t\t\t\t} else {\n\t\t\t\t\t//Oh no, a crossed connection, let's wait for the accept\n\t\t\t\t\tlogger.log(\n\t\t\t\t\t\tLevel.FINE,\n\t\t\t\t\t\t\"Crossed connection to {0} waiting for Accept\",\n\t\t\t\t\t\tpid);\n\t\t\t\t\tsetState(pid, ST_CROSS);\n\t\t\t\t\tmapConnection(pid, c);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase ST_CROSS :\n\t\t\t\tif (type == ACK) {\n\t\t\t\t\tif (((TBoolean) m.tunpack()).booleanValue())\n\t\t\t\t\t\tthrow new GroupCommException(\n\t\t\t\t\t\t\t\"ReliablePt2Pt: handleRecv:\"\n\t\t\t\t\t\t\t\t+ \"If I am in CROSS state, the ACK I receive can't be TRUE!!\");\n\t\t\t\t\tConnection c2 = getConnection(pid);\n\t\t\t\t\t//unmapConnection(pid); not necessary\n\t\t\t\t\t//Compare the two connections\n\t\t\t\t\tlogger.log(\n\t\t\t\t\t\tLevel.FINE,\n\t\t\t\t\t\t\"Comparing crossed connections to {0}....\",\n\t\t\t\t\t\tpid);\n\t\t\t\t\tif (c.compareTo(c2) < 0) {\n\t\t\t\t\t\tConnection caux = c2;\n\t\t\t\t\t\tc2 = c;\n\t\t\t\t\t\tc = caux;\n\t\t\t\t\t}\n\t\t\t\t\t//From here on, c2 has the smallest ID\n\t\t\t\t\t//So, I keep c\n\t\t\t\t\tlogger.log(Level.FINE, \"Connection chosen: {0}\", c);\n\t\t\t\t\tsetState(pid, ST_CONNECTED);\n\t\t\t\t\tmapConnection(pid, c);\n\t\t\t\t\tConnectionData cd = (ConnectionData) connections.get(pid);\n\t\t\t\t\tcd.connection2 = c2;\n\t\t\t\t\t//Sending CHOSEN message to be able to \n\t\t\t\t\t//cleanly close the connection that wasn't chosen\n\t\t\t\t\tGroupCommMessage chosenMsg = new GroupCommMessage();\n\t\t\t\t\tchosenMsg.tpack(new TInteger(CHOSEN));\n\t\t\t\t\t//chosenMsg = CHOSEN\n\t\t\t\t\ttcp.sendMessage(serialize.marshall(chosenMsg), c);\n\t\t\t\t\t//The connection whose Accept I handled, hasn't yet started the receiver...\n\t\t\t\t\t//... so it may be the chosen one, it may not\n\t\t\t\t\ttcp.startReceiver(c);\n\t\t\t\t} else if (type == CHOSEN) {\n\t\t\t\t\tthrow new GroupCommException(\n\t\t\t\t\t\t\"Received CHOSEN messages while in ST_CROSS.\"\n\t\t\t\t\t\t\t+ \"Impossible: receiver thread not started\");\n\t\t\t\t} else {\n\t\t\t\t\tthrow new GroupCommException(\"Received normal messages while in ST_CROSS!!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase ST_CONNECTED :\n\t\t\t\t//Message from connected process pid\n\t\t\t\tif (type == ACK)\n\t\t\t\t\tthrow new GroupCommException(\n\t\t\t\t\t\t\"ReliablePt2Pt: handleRecv: If I am \"\n\t\t\t\t\t\t\t+ \"in CONNECTED state, I can't receive ACK messages\");\n\t\t\t\tConnectionData cd = (ConnectionData) connections.get(pid);\n\t\t\t\tif (getConnection(pid) != c)\n\t\t\t\t\tthrow new GroupCommException(\n\t\t\t\t\t\t\"ReliablePt2Pt: handleRecv: \"\n\t\t\t\t\t\t\t+ \"Received a message from an unmapped connection\");\n\t\t\t\tif (type == CHOSEN) {\n\t\t\t\t\tif (cd.connection2 == null)\n\t\t\t\t\t\tthrow new GroupCommException(\n\t\t\t\t\t\t\t\"ReliablePt2Pt: handleRecv: \"\n\t\t\t\t\t\t\t\t+ \"Connection2 can't be null when receiving CHOSEN message\");\n\n\t\t\t\t\ttcp.startSender(cd.connection);\n\t\t\t\t\ttcp.disconnect(cd.connection2);\n\t\t\t\t\tcd.connection2 = null;\n\t\t\t\t} else { //Normal message TODO: add assertion!\n\t\t\t\t\tif (cd.connection2 != null)\n\t\t\t\t\t\tthrow new GroupCommException(\n\t\t\t\t\t\t\t\"ReliablePt2Pt: handleRecv: \"\n\t\t\t\t\t\t\t\t+ \"Connection2 must be null when receiving a normal message\");\n\t\t\t\t\tlogger.log(\n\t\t\t\t\t\tLevel.FINE,\n\t\t\t\t\t\t\"Data from: {0}\\n\\t Message: {1}\",\n\t\t\t\t\t\tnew Object[] { pid, m });\n\t\t\t\t\tGroupCommEventArgs args = new GroupCommEventArgs();\n\t\t\t\t\targs.addLast(m);\n\t\t\t\t\targs.addLast(pid);\n\t\t\t\t\ttrigger.trigger(Constants.PT2PTDELIVER, args);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase ST_HIDDEN :\n\t\t\t\tif (type == ACK)\n\t\t\t\t\tthrow new GroupCommException(\n\t\t\t\t\t\t\"ReliablePt2Pt: handleRecv: If I am \"\n\t\t\t\t\t\t\t+ \"in HIDDEN state, I can't receive ACK messages\");\n\t\t\t\tif (type == CHOSEN)\n\t\t\t\t\tthrow new GroupCommException(\n\t\t\t\t\t\t\"ReliablePt2Pt: handleRecv: If I am \"\n\t\t\t\t\t\t\t+ \"in HIDDEN state, I can't receive CHOSEN messages\");\n\t\t\t\ttcp.stopReceiver(c);\n\t\t\t\tcd = (ConnectionData) connections.get(pid);\n\t\t\t\tif (type == NORMAL) { //Not promiscuous\n\t\t\t\t\tlogger.log(\n\t\t\t\t\t\tLevel.FINE,\n\t\t\t\t\t\t\"Buffering data from: {0} (hidden)\\n\\t Message: {1}\",\n\t\t\t\t\t\tnew Object[] { pid, m });\n\t\t\t\t\t//It is a queue because of asynchrony of recv and stopReceiver\n\t\t\t\t\tcd.bufferIn.addLast(m);\n\t\t\t\t} else { //Promiscuous\n\t\t\t\t\t//Yes, we change order because this has to be the first message to be delivered\n\t\t\t\t\tlogger.log(\n\t\t\t\t\t\tLevel.FINE,\n\t\t\t\t\t\t\"Promicuous message from: {0} (hidden)\\n\\t Message: {1}\",\n\t\t\t\t\t\tnew Object[] { pid, m });\n\t\t\t\t\tcd.bufferIn.addFirst(m);\n\t\t\t\t\tdoJoin(pid);\n\t\t\t\t\t//Because this join is not a normal one, we shouldn't count it\n\t\t\t\t\tdecJoins(pid);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\tthrow new GroupCommException(\n\t\t\t\t\t\"ReliablePt2Pt: handleRecv:\"\n\t\t\t\t\t\t+ \"Hmmm, weird. State of pid unknown\");\n\t\t}\n\t\tlogger.exiting(\"ReliablePt2Pt\", \"handleRecv\");\n\t}",
"protected int processMIMEBoundaryData (byte[] buf, int offset, int len) throws IOException\n {\n final RFCHdrLineBufParseResult res=_mmDelimiter.processBuffer(buf, offset, len);\n if (res.getErrCode() != 0)\n return (res.getErrCode() > 0) ? (0 - res.getErrCode()) : res.getErrCode();\n\n // wait for next time\n if (res.isMoreDataRequired())\n {\n _streamOffset += len;\n // if more data required then entire buffer has been processed\n return len;\n }\n\n // found a MIME boundary - end current part and start a new one (if necessary)\n final int processedLen=(res.getOffset() - offset) + 1 /* for the LF */;\n _streamOffset += processedLen;\n\n // calculate data end at one character BEFORE the MIME boundary\n long dtEnd=_streamOffset // points to position AFTER the LF terminating the MIME boundary\n - 1L /* the LF */\n - _mmDelimiter.length() // the boundary itself\n - RFCMimeDefinitions.MIMEBoundaryDelimsBytes.length; // \"--\" prefix used to denote start of boundary\n // take into account the (optional) CR\n if (res.isCRDetected())\n dtEnd--;\n\n // subtract the \"--\" suffix used to signal last delimiter\n if (_mmDelimiter.isLastBoundary())\n dtEnd -= RFCMimeDefinitions.MIMEBoundaryDelimsBytes.length;\n\n if ((!_curPart.isRootPart()) && (!_curPart.isCompoundPart()))\n _curPart.setDataEndOffset(dtEnd);\n\n // check if hunting for direct sub-part - if so, then end it and restore its parent\n if (_directSubPart)\n {\n if (null == (_curPart=endDirectSubPart(_curPart, dtEnd)))\n return Integer.MIN_VALUE;\n }\n\n // continue treatment of \"normal\" sub-part\n if (null == (_curPart=closePart(_curPart, dtEnd, _mmDelimiter.isLastBoundary())))\n return Integer.MIN_VALUE;\n\n return processedLen;\n }",
"private int processDirectSubPartData (byte[] buf, int offset, int len) throws IOException\n {\n if (!_directSubPart)\n throw new StreamCorruptedException(\"Not direct sub-part data mode to process for ID=\" + getCurrentPartId());\n\n // if have the parent's MIME boundary, then use it to hunt for the end\n if (_mmDelimiter.isBoundarySet())\n return processMIMEBoundaryData(buf, offset, len);\n\n _streamOffset += len;\n return len;\n }",
"protected abstract void receive(final MessageInputStream mis);",
"public void receiveMsg() {\n Object message4 = jmsTemplate.receiveAndConvert(destination);\n logger.info(message4.toString());\n }",
"private void processConnection() throws IOException{\n try{\n messageFromServer = (String) input.readObject();\n }\n catch (ClassNotFoundException noClassFound){\n System.out.println(noClassFound);\n }\n\n System.out.println(\"Connection Check: \"+messageFromServer);\n\n do { //using do so that the program checks conditions at bottom of loop rather than top\n try {\n String toServer = \"\";\n System.out.println(\"Name of file to retrieve: \");\n toServer = reader.nextLine();\n\n\n sendData(toServer);\n messageFromServer = (String) input.readObject();\n System.out.println(\"Server: \" + messageFromServer);\n }\n catch (ClassNotFoundException noClassFound) {\n System.out.println(\"Client: Weird object in Client Process Connection\");\n }\n } while(!messageFromServer.equals(\"endit\"));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method checks if a Country Code is present in GET individual country response, return true if found | public boolean isCountryCodePresent (JsonPath jp, String countryCode) {
HashMap<Object,Object> fetchedCountry = jp.get("RestResponse.result");
if(fetchedCountry.get("alpha2_code").equals(countryCode)) {
return true;
}
return false;
} | [
"boolean hasCountriesAllowed();",
"public static boolean hasCountryInfo(String code)\n {\n return (CountryCode.getCountryInfo(code) != null)? true : false;\n }",
"boolean isCountryCodeCorrect(String countryCode);",
"public static Boolean countryExists(String country){\n DBCountry.getCountries();\n Boolean returnValue = false;\n\n for(Country returnedCountry : countries ){\n String selectedCountry = returnedCountry.getCountry();\n\n if(country.equals(selectedCountry)) {\n //DBCountry.existingCountry = returnedCountry;\n returnValue = true;\n break;\n }\n }\n return returnValue;\n }",
"@Test\n\tpublic void testContinentForCountryExists() {\n\t\tfor(Country l_Country : d_Map.getCountryList()) {\n\t\t\tint l_Flag=0;\n\t\t\tfor(Continent l_Continent : d_Map.getContinentList()) {\n\t\t\t\tif(l_Continent.getContinentName().equals(l_Country.getContinentName())) {\n\t\t\t\t\tl_Flag=1;break;\n\t\t\t\t}\n\t\t\t}\n\t\t\tassertEquals(1,l_Flag);\n\t\t}\n\t}",
"public boolean checkCountryFoundMessage(Response res, String countryCode) {\n\n\t\tString successMessage = \"Country found matching code [\" + countryCode + \"].\";\n\n\t\tJsonPath jp = ApiUtils.getJsonPath(res);\n\t\tArrayList<Object> fetchedCountryObject = jp.get(\"RestResponse.messages\");\n\n\t\tif(fetchedCountryObject.get(0).equals(successMessage)) {\n\n\t\t\treturn true;\n\t\t} else {\n\n\t\t\treturn false;\n\t\t}\n\n\t}",
"@Test\n\tpublic void testValidCountry() throws Exception {\n\t\tJSONObject json = rc.sendGet(TestProperties.getSearchPath() + \"?term=jim+jones&country=CA&limit=1\");\n\t\tJSONObject result = (JSONObject) json.getJSONArray(\"results\").get(0);\n\t\tString actualCountry = result.getString(\"country\");\n\t\tAssert.assertTrue(\"Return record failed for country\", actualCountry.equals(\"CAN\"));\n\t}",
"@Test\n\tpublic void validateSpecificCountries() {\n\t\tRestAssured.given()\n\t\t\t\t .get(\"/all\")\n\t\t\t\t .then()\n\t\t\t\t .statusCode(200)\n\t\t\t\t .body(\"RestResponse.result.alpha2_code\", hasItems(\"US\", \"DE\", \"GB\"));\n\t}",
"public boolean checkInexistentCountryFoundMessage(Response res, String countryCode) {\n\n\t\tString successMessage = \"No matching country found for requested code [\" + countryCode + \"].\";\n\n\t\tJsonPath jp = ApiUtils.getJsonPath(res);\n\t\tArrayList<Object> fetchedCountryObject = jp.get(\"RestResponse.messages\");\n\t\tif(fetchedCountryObject.get(0).equals(successMessage)) {\n\n\t\t\treturn true;\n\t\t} else {\n\n\t\t\treturn false;\n\t\t}\n\n\t}",
"boolean hasCountriesForbidden();",
"boolean isSetIso3166CountryCode();",
"boolean hasIpCountry();",
"@Test\n\tpublic void validateCountry() {\n\t\tRequestSpecification requestSpecification = new base().getRequestSpecification();\n\t\tgiven().get(Endpoint.GET_COUNTRY).then().statusCode(200).\n\t\tand().contentType(ContentType.JSON).\n\t\tand().body(\"name\", hasItem(\"India\")).\n\t\tand().body(\"find { d -> d.name == 'India' }.borders\", hasItem(\"CHN\"));\n\n\t}",
"public boolean isValidCountryKey(String countryKey);",
"public boolean isSetCountrycode() {\n return this.countrycode != null;\n }",
"private boolean existCountryOrPlace(String country, String name){\n \tboolean exist = false;\n \tfor(Place p : places){\n \t\tif(p.getName().equals(name)&&p.getCountry().equals(country)){\n \t\t\texist = true;\n \t\t}\n \t}\n \treturn exist;\n }",
"@Test\n public void testGetByCountry() {\n String country = \"pl\";\n LocaleCode expResult = LocaleCode.pl_PL;\n LocaleCode result = LocaleCode.getByCountry(country, false);\n assertEquals(expResult, result);\n result = LocaleCode.getByCountry(country, true);\n assertNull(result);\n result = LocaleCode.getByCountry(\"JP\", true);\n assertSame(LocaleCode.ja_JP, result);\n }",
"@Test\n\tpublic void validateEachCountry() {\n\t\tString[] country = { \"US\", \"DE\", \"GB\" };\n\n\t\tfor (int cnt = 0; cnt < country.length; cnt++) {\n\t\t\tRestAssured.given()\n\t\t\t\t\t .get(\"/iso2code/\" + country[cnt])\n\t\t\t\t\t .then()\n\t\t\t\t\t .statusCode(200)\n\t\t\t\t\t .body(\"\" + \"RestResponse.result.alpha2_code\", equalTo(country[cnt]));\n\t\t}\n\t}",
"public boolean hasErrorInCountry() {\n\n return (this.getCountryFeature() == null) ? false : true;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
First load of the game when PicturePoker is initially run. If a save file doesn't exist, it is automatically created, otherwise the number of coins is loaded | private int initialLoad() {
File saveFile = new File("save.txt");
int coins = 5;
try {
if (saveFile.createNewFile()) {
save(coins);
} else {
coins = load();
}
} catch (IOException e) {
}
return coins;
} | [
"public void loadgame() {\r\n GameChooser gc;\r\n gc = new GameChooser(this);\r\n game_load_test = true;\r\n //this.dispose();\r\n //System.exit(0);\r\n }",
"public void startSavedGame()\n {\n \n // get rid of nl character left in the stream\n // outFile.flush();\n \n // prompt user and get a file path\n System.out.println(\"\\nWhat is the file path?\");\n String filePath = keyboard.next();\n \n // call the getSavedGame( ) method in the GameControl class to load the game\n GameControl gc = new GameControl();\n gc.getSavedGame(filePath);\n\n // display the game menu for the loaded game\n MainMenuView mmv = new MainMenuView();\n mmv.displaySaveGameView();\n }",
"private void newGameInit()\n {\n clearSharedPref();\n pictureIds = randomizePictures();\n Arrays.fill(pictureVisibility, 1);\n points = 0;\n tries = 0;\n }",
"public void loadSavedGame(){\r\n \r\n }",
"public static void lastLoad()\n\t{\n\t\tMiniGame.closeMenu();\n\t\tFile input = new File(file.getAbsolutePath());\n\t\tString filename = input.getName();\n\t\tString extension = filename.substring(filename.lastIndexOf(\".\") + 1, filename.length());\n\t\t//-----------------------------------------------------\n\t\t\n\t\t\n\t\tif(input == null){ return; }//Handle Cancel Button Press\n\t\t//-----------------------------------------------------\n\t\t\n\t\tif (extension.equals(\"mze\"))\n\t\t{\n\t\t\tMiniGame.loadByteFile(input.getAbsolutePath());\n\t\t\tMiniGame.setIsDefault(false);\n\t\t\tMiniGame.setState(false);\n\t\t}\n\t\telse if(extension.equals(\"sav\"))\n\t\t{\n\t\t\ttry {\n\t\t\t\tMiniGame.setIsDefault(false);\n\t\t\t\tMiniGame.setState(false);\n\t\t\t\tMiniGame.getLeft().load(input, MiniGame.getRight(),\n\t\t\t\t\t\tMiniGame.getBoard());\n\t\t\t\t\n\t\t\t} catch (ClassNotFoundException | IOException e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Invalid Format!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t//-----------------------------------------------------\n\t\t\n\t\telse if(extension.equals(\"jpg\") || extension.equals(\"png\") || extension.equals(\"jpeg\"))\n\t\t{\n\t\t\tString location = file.getAbsolutePath();\n\t\t\tMiniGame.loadImage(location);\n\t\t\tMiniGame.setIsDefault(false);\n\t\t\tMiniGame.setState(false);\n\t\t\tif(filename.contains(\"default\") || filename.contains(\"dflt\"))\n\t\t\t{\n\t\t\t\tfor(int i = 0; i <16; i++)\n\t\t\t\t{\n\t\t\t\t\tMiniGame.getBoard().getTiles()[i].setIcon(null);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}",
"private void loadGameFromSaveFile(File saveFile) {\r\n\t\tisGameResume = true;\r\n\t\tplayersData = new ArrayList<>();\r\n\t\tplayersMap = new HashMap<>();\r\n\t\ttry(BufferedReader reader = new BufferedReader(new FileReader(saveFile))) {\r\n\t\t\tString line;\r\n\t\t\tint lineCounter = 1;\r\n\t\t\twhile(Objects.nonNull(line = reader.readLine())) {\r\n\t\t\t\tif(lineCounter == 1) {\r\n\t\t\t\t\tcurrentPlayerIndex = Integer.parseInt(line.split(\"=\")[1].trim());\r\n\t\t\t\t}else if(lineCounter == 2) {\r\n\t\t\t\t\tisGamePhase = line.split(\"=\")[1].trim();\r\n\t\t\t\t}else if(lineCounter == 3) {\r\n\t\t\t\t\tisInitialPhase = Boolean.parseBoolean(line.split(\"=\")[1].trim());\r\n\t\t\t\t}else if(lineCounter == 5) {\r\n\t\t\t\t\tcreateCardsFromSaveFile(line);\r\n\t\t\t\t}else if(lineCounter > 5) {\r\n\t\t\t\t\tcreatePlayersFromSaveFile(line, lineCounter);\r\n\t\t\t\t}\r\n\t\t\t\tlineCounter++;\r\n\t\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}",
"public void newload() throws FileNotFoundException\n\t{\n\t\t\n\t\tMiniGame.closeMenu(); //Close File Menu after selection\n\t\t\n\t\t\n\t\t//If the game's state has been changed ask for save before loading new file\n\t\t//----------------------------------------------------------------\n\t\tif(MiniGame.getStateChange() && !MiniGame.getWon() && !Save.getHasBeenSaved())\n\t\t{\n\t\t\tint choice = JOptionPane.showConfirmDialog(null, \"Save First?\", \n\t\t\t\t\tnull, JOptionPane.YES_NO_OPTION);\n\t\t\tif(choice == 0)\n\t\t\t{\n\t\t\t\tSave save = new Save();\n\t\t\t\ttry {\n\t\t\t\t\tsave.save();\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}\n\t\t\telse{}\n\t\t}\n\t\t//----------------------------------------------------------------\n\t\t\n\t\t\n\t\t\n\t\t//File chooser Set-Up\n\t\t//----------------------------------------------------------------\n\t\t\n\t\tfinal JFileChooser fc = new JFileChooser();\n\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\"SAV, JPG, PNG, MZE\", \"sav\", \"jpg\",\n\t\t\t\t\"png\",\"jpeg\", \"mze\",\"All\");\n\t\tFile currentdir = new File(System.getProperty(\"user.dir\"));\n\t\tfc.setCurrentDirectory(currentdir);\n\t\tfc.setFileFilter(filter);\n\t\tfc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\n\t\t int returnVal = fc.showOpenDialog(null);\n\t\t if(returnVal == JFileChooser.APPROVE_OPTION) \n\t\t {\n\t\t file = fc.getSelectedFile();\n\t\t }\n\t\t\n\t\t if(returnVal == JFileChooser.CANCEL_OPTION){return;}\n\t\t \n\t\tString filename = file.getName();\n\t\tString extension = filename.substring(filename.lastIndexOf(\".\") + 1, filename.length());\n\t\t//----------------------------------------------------------------\n\t\t\n\t\t\n\t\t//Based on extension use proper load implementation\n\t\tif(extension.equals(\"mze\"))\n\t\t{\n\t\t\tbyte [] bFile = new byte[(int)file.length()];\n\t\t\tFileInputStream finps = new FileInputStream(file);\n\t\t\ttry\n\t\t\t{\n\t\t\t\tfinps.read(bFile);\n\t\t\t\tfinps.close();\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tbyte[] test = {bFile[0],bFile[1],bFile[2],bFile[3]};\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tfor(byte b : test)\n\t\t\t{\n\t\t\t\tsb.append(String.format(\"%02X\", b));\n\t\t\t}\n\t\t\tif(!sb.toString().equals(\"CAFEDEED\") && !sb.toString().equals(\"CAFEBEEF\"))\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Invalid file type!\");\n\t\t\t\tfor(int i =0; i<8; i++)\n\t\t\t\t{\n\t\t\t\t\tMiniGame.getLeft().getLeft()[i].setIcon(null);\n\t\t\t\t\tMiniGame.getRight().getRight()[i].setIcon(null);\n\t\t\t\t}\n\t\t\t\tfor(int i = 0; i <16; i++)\n\t\t\t\t{\n\t\t\t\t\tMiniGame.getBoard().getTiles()[i].setIcon(null);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tString location = file.getAbsolutePath();\n\t\t\tMiniGame.loadByteFile(location);\n\t\t\tMiniGame.setIsDefault(false);\n\t\t\tMiniGame.setState(false);\n\t\t\t\n\t\t\t//If loaded file is a default file clear game board on load\n\t\t\tif(filename.contains(\"default\") || filename.contains(\"dflt\"))\n\t\t\t{\n\t\t\t\tfor(int i = 0; i <16; i++)\n\t\t\t\t{\n\t\t\t\t\tMiniGame.getBoard().getTiles()[i].setIcon(null);\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\n\t\telse if(extension.equals(\"sav\"))\n\t\t{\n\t\t\ttry {\n\t\t\t\tMiniGame.setIsDefault(false);\n\t\t\t\tMiniGame.setState(false);\n\t\t\t\tMiniGame.getLeft().load(file, MiniGame.getRight(), MiniGame.getBoard());\n\t\t\t\n\t\t\t} catch (ClassNotFoundException | IOException e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Invalid Format!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t//----------------------------------------------------------------\n\t\t\n\t\t\n\t\telse if(extension.equals(\"jpg\") || extension.equals(\"png\") || extension.equals(\"jpeg\"))\n\t\t{\n\t\t\tString location = file.getAbsolutePath();\n\t\t\tMiniGame.loadImage(location);\n\t\t\tMiniGame.setIsDefault(false);\n\t\t\tMiniGame.setState(false);\n\t\t\t{\n\t\t\t\tfor(int i = 0; i <16; i++)\n\t\t\t\t{\n\t\t\t\t\tMiniGame.getBoard().getTiles()[i].setIcon(null);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//----------------------------------------------------------------\n\t\t\n\t\t\n\t\telse\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null, \"Invalid File!\");\n\t\t\treturn;\n\t\t}\n\t\t\t\n\t}",
"private void loadGame(String fileName){\n\n }",
"void onLoadGame(SaveGame saveGame);",
"public static Player loadSave () {\n\t\ttry {\n\t\t\tBufferedReader in = new BufferedReader (new FileReader (\"TextFiles/SaveFiles/\" + FILE_NAME));\n\t\t\tint curLevel, money, num;\n\t\t\tcurLevel = Integer.parseInt(in.readLine());\n\t\t\tmoney = Integer.parseInt(in.readLine());\n\t\t\tnum = Integer.parseInt(in.readLine());\n\t\t\t\n\t\t\t//load the items\n\t\t\tInventory bag = new Inventory();\n\t\t\tfor (int i = 0; i < num; i++) {\n\t\t\t\tbag.addItem(loadItem(in));\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t//load the characters\n\t\t\tnum = Integer.parseInt(in.readLine());\n\t\t\tUnit[] characters = new Unit[num];\n\t\t\tfor (int i = 0 ;i < num; i++) {\n\t\t\t\tString type = in.readLine();\n\t\t\t\tint health,attack,defense,movement,range;\n\t\t\t\t\n\t\t\t\thealth = Integer.parseInt(in.readLine());\n\t\t\t\tattack = Integer.parseInt(in.readLine());\n\t\t\t\tdefense = Integer.parseInt(in.readLine());\n\t\t\t\tmovement = Integer.parseInt(in.readLine());\n\t\t\t\trange = Integer.parseInt(in.readLine());\n\t\t\n\t\t\t\t\tint level,exp;\n\t\t\t\t\tString name;\n\t\t\t\t\tboolean rankUp;\n\t\t\t\t\tEquipment loadout;\n\t\t\t\t\t\n\t\t\t\t\tname = in.readLine();\n\t\t\t\t\tlevel = Integer.parseInt(in.readLine());\n\t\t\t\t\texp = Integer.parseInt(in.readLine());\n\t\t\t\t\trankUp = Integer.parseInt(in.readLine()) == 1;\n\t\t\t\t\tloadout = new Equipment (loadItem(in),loadItem(in),loadItem(in),loadItem(in));\n\t\t\t\t\t\n\t\t\t\t\tif (type.equals(\"Knight\")) {\n\t\t\t\t\t\tcharacters[i] = new Knight (name, health, attack, defense, range, movement, level, exp, rankUp, loadout);\n\t\t\t\t\t} else if (type.equals(\"Ranger\")) {\n\t\t\t\t\t\tcharacters[i] = new Ranger (name, health, attack, defense, range, movement, level, exp, rankUp, loadout);\n\t\t\t\t\t} else if (type.equals(\"Sky Rider\")) {\n\t\t\t\t\t\tcharacters[i] = new SkyRider (name, health, attack, defense, range, movement, level, exp, rankUp, loadout);\n\t\t\t\t\t} else if (type.equals(\"Warrior\")) {\n\t\t\t\t\t\tcharacters[i] = new Warrior (name, health, attack, defense, range, movement, level, exp, rankUp, loadout);\n\t\t\t\t\t} else if (type.equals(\"Mage\")) {\n\t\t\t\t\t\tcharacters[i] = new Mage (name, health, attack, defense, range, movement, level, exp, rankUp, loadout);\n\t\t\t\t\t} else if (type.equals(\"Rogue\")) {\n\t\t\t\t\t\tcharacters[i] = new Rogue (name, health, attack, defense, range, movement, level, exp, rankUp, loadout);\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\tin.close();\n\t\t\treturn new Player(curLevel, characters, money, bag);\n\t\t} catch (IOException iox) {\n\t\t\tSystem.out.println(\"Error\");\n\t\t\treturn null;\n\t\t}\n\t}",
"private void getCoins() throws IOException{\r\n\t\tFile file = new File(\".coinSave\");\r\n\t\tif (! file.exists()) {\r\n\t\t\tfile.createNewFile();\r\n\t\t} else {\r\n\t\t\tFileReader fr = new FileReader(file);\r\n\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\tString str;\r\n\t\t\tstr = br.readLine();\r\n\t\t\t_hiddenCoins = Integer.parseInt(str);\r\n\t\t}\r\n\t}",
"public void loadSaveGameFromFile(File file) {\r\n\t\t//TODO\r\n\t}",
"private void save(int coins) {\r\n\t\ttry {\r\n\t\t\tFile save = new File(\"save.txt\");\r\n\t\t\tFileWriter fw = new FileWriter(save);\r\n\t\t\tfw.write(\"\" + coins);\r\n\t\t\tfw.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"Something went wrong saving.\");\r\n\t\t}\r\n\t}",
"public void load(int slot) throws IOException, InvalidPlayerNumberException{\n\t\tengine.save(0); //make backup\n\t\tengine.clearBoard();\n\t\ttry{\n\t\tengine.load(slot);\n\t\t}\n\t\tcatch (NullPointerException e){\n\t\t\tJOptionPane.showMessageDialog(frame, \"Load file doesn't contain a saved game\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\tengine.load(0);\n\t\t}\n\t\tupdateBoard();\n\t\tupdateScoreText();\n\t\tupdateTurnText(engine.getCurrentPlayer());\n\t}",
"public void loadPokemon()\n\t{\n\t\tString input =\"savedata/\"+idString+\".pkmn\";\n\n\t\ttry\n\t\t{\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(input));\n\n\t\t\tencryptionKey=0;\n\n\t\t\tPokemon temp=new Pokemon(Pokemon.Species.BULBASAUR);\n\n\t\t\tString test=in.readLine();\n\n\t\t\tif(VERSION.charAt(0)!=test.charAt(0))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Invalid Pokemon data\");\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\n\t\t\tfor(int i=0; i<partyPokemon.length; i++)\n\t\t\t{\n\t\t\t\ttest=in.readLine();\n\n\t\t\t\tif(test.equals(\"null\"))\n\t\t\t\t{\n\t\t\t\t\ttest=\"\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//Header\n\t\t\t\t\tif(VERSION.charAt(0)!=test.charAt(0))\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"Invalid Pokemon data\");\n\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t}\n\n\t\t\t\t\ttemp=new Pokemon(Pokemon.Species.BULBASAUR);\n\n\t\t\t\t\t//Strings\n\t\t\t\t\ttemp.species=Pokemon.Species.valueOf(in.readLine());\n\t\t\t\t\ttemp.nickname=in.readLine();\n\t\t\t\t\ttemp.originalTrainer=in.readLine();\n\t\t\t\t\ttemp.status=Pokemon.Status.valueOf(in.readLine());\n\t\t\t\t\ttemp.substatus=Pokemon.Substatus.valueOf(in.readLine());\n\t\t\t\t\ttemp.move[0]=Pokemon.Move.valueOf(in.readLine());\n\t\t\t\t\ttemp.move[1]=Pokemon.Move.valueOf(in.readLine());\n\t\t\t\t\ttemp.move[2]=Pokemon.Move.valueOf(in.readLine());\n\t\t\t\t\ttemp.move[3]=Pokemon.Move.valueOf(in.readLine());\n\n\t\t\t\t\t//Integers\n\t\t\t\t\ttemp.level=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.level;\n\t\t\t\t\ttemp.exp=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.exp;\n\t\t\t\t\ttemp.health=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.health;\n\t\t\t\t\ttemp.healthMax=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.healthMax;\n\t\t\t\t\ttemp.HP_EV=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.HP_EV;\n\t\t\t\t\ttemp.ATK_EV=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.ATK_EV;\n\t\t\t\t\ttemp.DEF_EV=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.DEF_EV;\n\t\t\t\t\ttemp.SPCL_EV=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.SPCL_EV;\n\t\t\t\t\ttemp.SPEED_EV=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.SPEED_EV;\n\t\t\t\t\ttemp.HP_IV=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.HP_IV;\n\t\t\t\t\ttemp.ATK_IV=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.ATK_IV;\n\t\t\t\t\ttemp.DEF_IV=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.DEF_IV;\n\t\t\t\t\ttemp.SPCL_IV=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.SPCL_IV;\n\t\t\t\t\ttemp.SPEED_IV=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.SPEED_IV;\n\t\t\t\t\ttemp.TRUE_PP[0]=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.TRUE_PP[0];\n\t\t\t\t\ttemp.TRUE_PP[1]=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\ttemp.TRUE_PP[2]=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\ttemp.TRUE_PP[3]=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\ttemp.TRUE_PPMAX[0]=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.TRUE_PPMAX[0];\n\t\t\t\t\ttemp.TRUE_PPMAX[1]=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\ttemp.TRUE_PPMAX[2]=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\ttemp.TRUE_PPMAX[3]=Integer.parseInt(in.readLine(),2);\n\n\t\t\t\t\t//Booleans\n\t\t\t\t\ttemp.IS_TRADED=Boolean.parseBoolean(in.readLine());\n\n\t\t\t\t\tpartyPokemon[i]=new Pokemon(temp.species, temp.move[0], temp.move[1], temp.move[2], temp.move[3], temp.level,\n\t\t\t\t\ttemp.HP_IV, temp.ATK_IV, temp.DEF_IV, temp.SPCL_IV, temp.SPEED_IV,\n\t\t\t\t\ttemp.nickname, temp.status, temp.idNumber, temp.originalTrainer);\n\n\t\t\t\t\tpartyPokemon[i].setEV(\"HP\",temp.HP_EV);\n\t\t\t\t\tpartyPokemon[i].setEV(\"ATK\",temp.ATK_EV);\n\t\t\t\t\tpartyPokemon[i].setEV(\"DEF\",temp.DEF_EV);\n\t\t\t\t\tpartyPokemon[i].setEV(\"SPCL\",temp.SPCL_EV);\n\t\t\t\t\tpartyPokemon[i].setEV(\"SPEED\",temp.SPEED_EV);\n\n\t\t\t\t\tpartyPokemon[i].health=temp.health;\n\t\t\t\t\tpartyPokemon[i].healthMax=temp.healthMax;\n\t\t\t\t\tpartyPokemon[i].exp=temp.exp;\n\n\t\t\t\t\tpartyPokemon[i].TRUE_PP[0]=temp.TRUE_PP[0];\n\t\t\t\t\tpartyPokemon[i].TRUE_PP[1]=temp.TRUE_PP[1];\n\t\t\t\t\tpartyPokemon[i].TRUE_PP[2]=temp.TRUE_PP[2];\n\t\t\t\t\tpartyPokemon[i].TRUE_PP[3]=temp.TRUE_PP[3];\n\n\t\t\t\t\tpartyPokemon[i].TRUE_PPMAX[0]=temp.TRUE_PPMAX[0];\n\t\t\t\t\tpartyPokemon[i].TRUE_PPMAX[1]=temp.TRUE_PPMAX[1];\n\t\t\t\t\tpartyPokemon[i].TRUE_PPMAX[2]=temp.TRUE_PPMAX[2];\n\t\t\t\t\tpartyPokemon[i].TRUE_PPMAX[3]=temp.TRUE_PPMAX[3];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor(int i=0; i<pcPokemon.length; i++)\n\t\t\t{\n\t\t\t\ttest=in.readLine();\n\n\t\t\t\tif(test.equals(\"null\"))\n\t\t\t\t{\n\t\t\t\t\ttest=\"\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//Header\n\t\t\t\t\tif(VERSION.charAt(0)!=test.charAt(0))\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"Invalid Pokemon data\");\n\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t}\n\n\t\t\t\t\ttemp=new Pokemon(Pokemon.Species.BULBASAUR);\n\n\t\t\t\t\t//Strings\n\t\t\t\t\ttemp.species=Pokemon.Species.valueOf(in.readLine());\n\t\t\t\t\ttemp.nickname=in.readLine();\n\t\t\t\t\ttemp.originalTrainer=in.readLine();\n\t\t\t\t\ttemp.status=Pokemon.Status.valueOf(in.readLine());\n\t\t\t\t\ttemp.substatus=Pokemon.Substatus.valueOf(in.readLine());\n\t\t\t\t\ttemp.move[0]=Pokemon.Move.valueOf(in.readLine());\n\t\t\t\t\ttemp.move[1]=Pokemon.Move.valueOf(in.readLine());\n\t\t\t\t\ttemp.move[2]=Pokemon.Move.valueOf(in.readLine());\n\t\t\t\t\ttemp.move[3]=Pokemon.Move.valueOf(in.readLine());\n\n\t\t\t\t\t//Integers\n\t\t\t\t\ttemp.level=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.level;\n\t\t\t\t\ttemp.exp=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.exp;\n\t\t\t\t\ttemp.health=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.health;\n\t\t\t\t\ttemp.healthMax=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.healthMax;\n\t\t\t\t\ttemp.HP_EV=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.HP_EV;\n\t\t\t\t\ttemp.ATK_EV=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.ATK_EV;\n\t\t\t\t\ttemp.DEF_EV=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.DEF_EV;\n\t\t\t\t\ttemp.SPCL_EV=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.SPCL_EV;\n\t\t\t\t\ttemp.SPEED_EV=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.SPEED_EV;\n\t\t\t\t\ttemp.HP_IV=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.HP_IV;\n\t\t\t\t\ttemp.ATK_IV=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.ATK_IV;\n\t\t\t\t\ttemp.DEF_IV=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.DEF_IV;\n\t\t\t\t\ttemp.SPCL_IV=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.SPCL_IV;\n\t\t\t\t\ttemp.SPEED_IV=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.SPEED_IV;\n\t\t\t\t\ttemp.TRUE_PP[0]=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.TRUE_PP[0];\n\t\t\t\t\ttemp.TRUE_PP[1]=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\ttemp.TRUE_PP[2]=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\ttemp.TRUE_PP[3]=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\ttemp.TRUE_PPMAX[0]=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\t\tencryptionKey+=temp.TRUE_PPMAX[0];\n\t\t\t\t\ttemp.TRUE_PPMAX[1]=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\ttemp.TRUE_PPMAX[2]=Integer.parseInt(in.readLine(),2);\n\t\t\t\t\ttemp.TRUE_PPMAX[3]=Integer.parseInt(in.readLine(),2);\n\n\t\t\t\t\t//Booleans\n\t\t\t\t\ttemp.IS_TRADED=Boolean.parseBoolean(in.readLine());\n\n\t\t\t\t\tpcPokemon[i]=new Pokemon(temp.species, temp.move[0], temp.move[1], temp.move[2], temp.move[3], temp.level,\n\t\t\t\t\ttemp.HP_IV, temp.ATK_IV, temp.DEF_IV, temp.SPCL_IV, temp.SPEED_IV,\n\t\t\t\t\ttemp.nickname, temp.status, temp.idNumber, temp.originalTrainer);\n\n\t\t\t\t\tpcPokemon[i].setEV(\"HP\",temp.HP_EV);\n\t\t\t\t\tpcPokemon[i].setEV(\"ATK\",temp.ATK_EV);\n\t\t\t\t\tpcPokemon[i].setEV(\"DEF\",temp.DEF_EV);\n\t\t\t\t\tpcPokemon[i].setEV(\"SPCL\",temp.SPCL_EV);\n\t\t\t\t\tpcPokemon[i].setEV(\"SPEED\",temp.SPEED_EV);\n\n\t\t\t\t\tpcPokemon[i].health=temp.health;\n\t\t\t\t\tpcPokemon[i].healthMax=temp.healthMax;\n\t\t\t\t\tpcPokemon[i].exp=temp.exp;\n\n\t\t\t\t\tpcPokemon[i].TRUE_PP[0]=temp.TRUE_PP[0];\n\t\t\t\t\tpcPokemon[i].TRUE_PP[1]=temp.TRUE_PP[1];\n\t\t\t\t\tpcPokemon[i].TRUE_PP[2]=temp.TRUE_PP[2];\n\t\t\t\t\tpcPokemon[i].TRUE_PP[3]=temp.TRUE_PP[3];\n\n\t\t\t\t\tpcPokemon[i].TRUE_PPMAX[0]=temp.TRUE_PPMAX[0];\n\t\t\t\t\tpcPokemon[i].TRUE_PPMAX[1]=temp.TRUE_PPMAX[1];\n\t\t\t\t\tpcPokemon[i].TRUE_PPMAX[2]=temp.TRUE_PPMAX[2];\n\t\t\t\t\tpcPokemon[i].TRUE_PPMAX[3]=temp.TRUE_PPMAX[3];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint keygen=Integer.parseInt(in.readLine());\n\n\t\t\tif(encryptionKey!=keygen)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Data has been manipulated. Exiting.\");\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Pokemon data has been manipulated or is not present.\");\n\t\t}\n\n\t\ttestEncryption(input);\n\n\t\tSystem.out.println(\"Pokemon loaded successfully.\");\n\t}",
"private void startNewGame() throws IOException {\n for(int i=0; i<MAX_TURNS; i++) {\n System.out.print(\"Turn: \" + (i + 1)\n + \"\\nRock, paper, scissors, shoot! \\t 1. Rock\\t 2. Paper\\t 3. Scissors\\nEnter your choice: \");\n GameResult turnResult = playTurn();\n switch (turnResult) {\n case WIN: System.out.println(\"You win!\");\n playerCurrentScore++;\n break;\n case LOSS:\n System.out.println(\"You lose!\");\n computerCurrentScore++;\n break;\n case TIE:\n System.out.println(\"It's a tie!\");\n break;\n }\n MyRockPaperScissorsHelper.showCurrentScore(playerCurrentScore, computerCurrentScore);\n }\n determineGameWinner();\n }",
"public void createNewGame(){\n \ttry{\n \t\tSynchronizer.initializeHighScore(\"highScore.txt\");\n \t\tthis.gameEngine.startYourEngines();\n \t}\n \tcatch(IOException e){}\n /*while(snakeAlive){ //While the snake is alive, the game continues\n\t\t this.snake.Movet(); //Allows the snake to move\n\t\t this.food.placeFood(); //Places the food while the snake is moving\n\t\t snakeAlive = this.synchronizer.getSnakeStillAlive(); //checks each time is the snake is alive\n\t }*/\n\t \n }",
"private void wrongLoad() {\r\n Toast.makeText(this, \"There is no saved game\", Toast.LENGTH_SHORT).show();\r\n }",
"public void loadSavedPlayer()\r\n\t{\r\n\t\tLoadSavedPlayer load = new LoadSavedPlayer(stage);\r\n\t\tload.show(game);\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
extract hairpins from a rna secondary structure. setCutOff() can change the minimal length of the hairpin | public ArrayList<PriMiRNA> extractHairpin(SimRNA rna){
ArrayList<PriMiRNA> pris=new ArrayList<PriMiRNA>();
String str=rna.getStr();
m=pattern.matcher(str);
while(m.find()){
int start1=str.lastIndexOf(")", m.start(1))+1;//replace m.start(1)
String left=str.substring(start1, m.end(1));//the 5' side of the stemloop
String right=m.group(3);//the 3' side of the stemloop
int n=b2Num(left)+b2Num(right);//compare the two sides of the stem
int slStart=0,slEnd=0,l=0,r=0;
//if str is like (..((...)).. return ..((...))..
if(n>0){
l=bIndex(left,"(",n)+1; //new start of left
left=left.substring(l); //new leftht
slStart=start1+l; //start of stemloop, count from 0
slEnd=m.end(3);//count from 1
}
//if str is like ..((...))..) return ..((...))..
else if(n<0){
r=bIndex(right,")",n)-1;
right=right.substring(0,r+1);
slStart=start1;
slEnd=m.start(3)+r+1;//count from 1
}
//if str is like ..((...)).. return ..((...))..
else{
slStart=start1;
slEnd=m.end(3);//count from 1
}
String subId=rna.getName()+"_mir_"; //the id of the stemloop
String subSeq=rna.getSeq().substring(slStart, slEnd); //seq of the stemloop
String subStr=left+m.group(2)+right; //structure of the stemloop
//filter the SL less than the threshold
if(subStr.length()<distance)
continue;
//create a new primiRNA
PriMiRNA pri=new PriMiRNA(subId,subSeq);
//if the stemloop has two or more loop
if(hasTwoLoop(pri)) continue;
if(pattern.matcher(pri.getStr()).matches() ==false) continue;
pri.setName(rna.getName());
pri.setStart(slStart+rna.getStart());
pri.setEnd(slEnd-1+rna.getStart());
pri.setId(pri.getId()+pri.getStart()+"-"+pri.getEnd());
pris.add(pri);
// priList.add(pri);
}
return pris;
} | [
"public short getHair_subdiv() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readShort(__io__address + 3918);\n\t\t} else {\n\t\t\treturn __io__block.readShort(__io__address + 3874);\n\t\t}\n\t}",
"IntOctagon[] cutout_from(IntOctagon p_d)\n {\n IntOctagon c = this.intersection(p_d);\n \n if (this.is_empty() || c.dimension() < this.dimension())\n {\n // there is only an overlap at the border\n IntOctagon [] result = new IntOctagon[1];\n result[0] = p_d;\n return result;\n }\n \n IntOctagon [] result = new IntOctagon[8];\n \n int tmp = c.llx - c.lx;\n \n result[0] = new\n IntOctagon(p_d.lx, tmp, c.lx, c.lx - c.ulx, p_d.ulx, p_d.lrx, p_d.llx, p_d.urx);\n \n int tmp2 = c.llx - c.ly;\n \n result[1] = new\n IntOctagon(p_d.lx, p_d.ly, tmp2, tmp, p_d.ulx, p_d.lrx, p_d.llx, c.llx);\n \n tmp = c.lrx + c.ly;\n \n result[2] = new\n IntOctagon(tmp2, p_d.ly, tmp, c.ly, p_d.ulx, p_d.lrx, p_d.llx, p_d.urx);\n \n tmp2 = c.rx - c.lrx;\n \n result[3] = new\n IntOctagon(tmp, p_d.ly, p_d.rx, tmp2, c.lrx, p_d.lrx, p_d.llx, p_d.urx);\n \n tmp = c.urx - c.rx;\n \n result[4] = new\n IntOctagon(c.rx, tmp2, p_d.rx, tmp, p_d.ulx, p_d.lrx, p_d.llx, p_d.urx);\n \n tmp2 = c.urx - c.uy;\n \n result[5] = new\n IntOctagon(tmp2, tmp, p_d.rx, p_d.uy, p_d.ulx, p_d.lrx, c.urx, p_d.urx);\n \n tmp = c.ulx + c.uy;\n \n result[6] = new\n IntOctagon(tmp, c.uy, tmp2, p_d.uy, p_d.ulx, p_d.lrx, p_d.llx, p_d.urx);\n \n tmp2 = c.lx - c.ulx;\n \n result[7] = new\n IntOctagon(p_d.lx, tmp2, tmp, p_d.uy, p_d.ulx, c.ulx, p_d.llx, p_d.urx);\n \n for (int i = 0; i < 8; ++i)\n {\n result[i] = result[i].normalize();\n }\n \n IntOctagon curr_1 = result[0];\n IntOctagon curr_2 = result[7];\n \n if (!(curr_1.is_empty() || curr_2.is_empty()) &&\n curr_1.rx - curr_1.left_x_value(curr_1.uy)\n > curr_2.upper_y_value(curr_1.rx) - curr_2.ly)\n {\n // switch the horizontal upper left divide line to vertical\n curr_1 = new IntOctagon(Math.min(curr_1.lx, curr_2.lx), curr_1.ly,\n curr_1.rx, curr_2.uy, curr_2.ulx, curr_1.lrx,curr_1.llx, curr_2.urx);\n \n curr_2 = new IntOctagon(curr_1.rx, curr_2.ly, curr_2.rx, curr_2.uy,\n curr_2.ulx, curr_2.lrx, curr_2.llx, curr_2.urx);\n \n result[0] = curr_1.normalize();\n result[7] = curr_2.normalize();\n }\n curr_1 = result[7];\n curr_2 = result[6];\n if (!(curr_1.is_empty() || curr_2.is_empty()) &&\n curr_2.upper_y_value(curr_1.rx) - curr_2.ly\n > curr_1.rx - curr_1.left_x_value(curr_2.ly))\n // switch the vertical upper left divide line to horizontal\n {\n curr_2 = new IntOctagon(curr_1.lx, curr_2.ly, curr_2.rx,\n Math.max(curr_2.uy, curr_1.uy), curr_1.ulx, curr_2.lrx, curr_1.llx, curr_2.urx);\n \n curr_1 = new IntOctagon(curr_1.lx, curr_1.ly, curr_1.rx, curr_2.ly,\n curr_1.ulx, curr_1.lrx, curr_1.llx, curr_1.urx);\n \n result[7] = curr_1.normalize();\n result[6] = curr_2.normalize();\n }\n curr_1 = result[6];\n curr_2 = result[5];\n if (!(curr_1.is_empty() || curr_2.is_empty()) &&\n curr_2.upper_y_value(curr_1.rx) - curr_1.ly\n > curr_2.right_x_value(curr_1.ly) - curr_2.lx)\n // switch the vertical upper right divide line to horizontal\n {\n curr_1 = new IntOctagon(curr_1.lx, curr_1.ly, curr_2.rx,\n Math.max(curr_2.uy, curr_1.uy), curr_1.ulx, curr_2.lrx, curr_1.llx, curr_2.urx);\n \n curr_2 = new IntOctagon(curr_2.lx, curr_2.ly, curr_2.rx, curr_1.ly,\n curr_2.ulx, curr_2.lrx, curr_2.llx, curr_2.urx);\n \n result[6] = curr_1.normalize();\n result[5] = curr_2.normalize();\n }\n curr_1 = result[5];\n curr_2 = result[4];\n if (!(curr_1.is_empty() || curr_2.is_empty()) &&\n curr_2.right_x_value(curr_2.uy) - curr_2.lx\n > curr_1.upper_y_value(curr_2.lx) - curr_2.uy)\n // switch the horizontal upper right divide line to vertical\n {\n curr_2 = new IntOctagon(curr_2.lx, curr_2.ly, Math.max(curr_2.rx, curr_1.rx),\n curr_1.uy, curr_1.ulx, curr_2.lrx, curr_2.llx, curr_1.urx);\n \n curr_1 = new IntOctagon(curr_1.lx, curr_1.ly, curr_2.lx, curr_1.uy,\n curr_1.ulx, curr_1.lrx, curr_1.llx, curr_1.urx);\n \n result[5] = curr_1.normalize();\n result[4] = curr_2.normalize();\n }\n curr_1 = result[4];\n curr_2 = result[3];\n if (!(curr_1.is_empty() || curr_2.is_empty()) &&\n curr_1.right_x_value(curr_1.ly) - curr_1.lx\n > curr_1.ly - curr_2.lower_y_value(curr_1.lx))\n // switch the horizontal lower right divide line to vertical\n {\n curr_1 = new IntOctagon(curr_1.lx, curr_2.ly, Math.max(curr_2.rx, curr_1.rx),\n curr_1.uy, curr_1.ulx, curr_2.lrx, curr_2.llx, curr_1.urx);\n \n curr_2 = new IntOctagon(curr_2.lx, curr_2.ly, curr_1.lx, curr_2.uy,\n curr_2.ulx, curr_2.lrx, curr_2.llx, curr_2.urx);\n \n result[4] = curr_1.normalize();\n result[3] = curr_2.normalize();\n }\n \n curr_1 = result[3];\n curr_2 = result[2];\n \n if (!(curr_1.is_empty() || curr_2.is_empty()) &&\n curr_2.uy - curr_2.lower_y_value(curr_2.rx)\n > curr_1.right_x_value(curr_2.uy) - curr_2.rx)\n // switch the vertical lower right divide line to horizontal\n {\n curr_2 = new IntOctagon(curr_2.lx, Math.min(curr_1.ly, curr_2.ly),\n curr_1.rx, curr_2.uy, curr_2.ulx, curr_1.lrx, curr_2.llx, curr_1.urx);\n \n curr_1 = new IntOctagon(curr_1.lx, curr_2.uy, curr_1.rx, curr_1.uy,\n curr_1.ulx, curr_1.lrx, curr_1.llx, curr_1.urx);\n \n result[3] = curr_1.normalize();\n result[2] = curr_2.normalize();\n }\n \n curr_1 = result[2];\n curr_2 = result[1];\n \n if (!(curr_1.is_empty() || curr_2.is_empty()) &&\n curr_1.uy - curr_1.lower_y_value(curr_1.lx)\n > curr_1.lx - curr_2.left_x_value(curr_1.uy))\n // switch the vertical lower left divide line to horizontal\n {\n curr_1 = new IntOctagon(curr_2.lx, Math.min(curr_1.ly, curr_2.ly),\n curr_1.rx, curr_1.uy, curr_2.ulx, curr_1.lrx, curr_2.llx, curr_1.urx);\n \n curr_2 = new IntOctagon(curr_2.lx, curr_1.uy, curr_2.rx, curr_2.uy,\n curr_2.ulx, curr_2.lrx, curr_2.llx, curr_2.urx);\n \n result[2] = curr_1.normalize();\n result[1] = curr_2.normalize();\n }\n \n curr_1 = result[1];\n curr_2 = result[0];\n \n if (!(curr_1.is_empty() || curr_2.is_empty()) &&\n curr_2.rx - curr_2.left_x_value(curr_2.ly)\n > curr_2.ly - curr_1.lower_y_value(curr_2.rx))\n // switch the horizontal lower left divide line to vertical\n {\n curr_2 = new IntOctagon(Math.min(curr_2.lx, curr_1.lx), curr_1.ly,\n curr_2.rx, curr_2.uy, curr_2.ulx, curr_1.lrx, curr_1.llx, curr_2.urx);\n \n curr_1 = new IntOctagon(curr_2.rx, curr_1.ly, curr_1.rx, curr_1.uy,\n curr_1.ulx, curr_1.lrx, curr_1.llx, curr_1.urx);\n \n result[1] = curr_1.normalize();\n result[0] = curr_2.normalize();\n }\n \n return result;\n }",
"private void makeSubcutaneousFatVOIfromIntensityProfiles() {\r\n \r\n int[] xLocsSubcutaneousVOI;\r\n int[] yLocsSubcutaneousVOI;\r\n int[] zVals;\r\n try {\r\n xLocsSubcutaneousVOI = new int [360 / angularResolution];\r\n yLocsSubcutaneousVOI = new int [360 / angularResolution];\r\n zVals = new int [360 / angularResolution];\r\n } catch (OutOfMemoryError error) {\r\n System.gc();\r\n MipavUtil.displayError(\"makeSubcutaneousFatVOIfromIntensityProfiles(): Can NOT allocate xLocsSubcutaneousVOI\");\r\n return;\r\n }\r\n \r\n for(int idx = 0; idx < 360 / angularResolution; idx++) {\r\n zVals[idx] = 0;\r\n }\r\n \r\n int numSamples;\r\n \r\n for(int idx = 0; idx < 360 / angularResolution; idx++) {\r\n numSamples = intensityProfiles[idx].size();\r\n \r\n int sampleIdx = numSamples - 10; // skip over the skin\r\n while (sampleIdx >= 0 &&\r\n intensityProfiles[idx].get(sampleIdx) < muscleThresholdHU &&\r\n intensityProfiles[idx].get(sampleIdx) > airThresholdHU) {\r\n sampleIdx--;\r\n }\r\n if (sampleIdx <= 0) {\r\n // could not find a valid subcutaneous fat point in the intensity profile\r\n// MipavUtil.displayError(\"findAbdomenVOI(): Can NOT find the subcutaneous fat VOI point in the intensity profile for angle: \" +idx * angularResolution);\r\n if (idx > 0) {\r\n // assign this subcutaneous fat VOI point to the previous point if one exists\r\n xLocsSubcutaneousVOI[idx] = xLocsSubcutaneousVOI[idx-1];\r\n yLocsSubcutaneousVOI[idx] = yLocsSubcutaneousVOI[idx-1];\r\n } else {\r\n // assign this subcutaneous fat VOI point to the abdomen VOI point\r\n xLocsSubcutaneousVOI[idx] = xProfileLocs[idx].get(numSamples - 1);\r\n yLocsSubcutaneousVOI[idx] = yProfileLocs[idx].get(numSamples - 1);\r\n }\r\n } else {\r\n // we found a point in the intensity profile that matches subcutaneous fat\r\n xLocsSubcutaneousVOI[idx] = xProfileLocs[idx].get(sampleIdx);\r\n yLocsSubcutaneousVOI[idx] = yProfileLocs[idx].get(sampleIdx);\r\n }\r\n \r\n } // end for (int idx = 0; ...)\r\n\r\n // make the VOI's and add the points to them\r\n subcutaneousVOI = new VOI((short)0, \"Subcutaneous area\");\r\n subcutaneousVOI.importCurve(xLocsSubcutaneousVOI, yLocsSubcutaneousVOI, zVals);\r\n\r\n }",
"private int[] findKnownSecondary(int atomAnchorRid, BitSet know) {\n int atomAnchorMasterRid = gumbo.atom.masterAtomId[ atomAnchorRid ];\n BitSet knowMaster = gumbo.atom.getMasterRidSet(know);\n// General.showDebug(\"findKnownSecondary anchor : \" + gumbo.atom.toString(atomAnchorRid));\n// General.showDebug(\"findKnownSecondary known : \" + gumbo.atom.toString(know));\n// General.showDebug(\"findKnownSecondary anchor master : \" + gumbo.atom.toString(atomAnchorMasterRid));\n// General.showDebug(\"findKnownSecondary known master : \" + gumbo.atom.toString(knowMaster));\n\n /** Store none preferred hydrogens as secondaries in case no other were found */\n ArrayList h_list = new ArrayList();\n// General.showDebug(gumbo.bond.toString(gumbo.bond.used));\n /** Starting at 1 for model 1 */\n int modelNumber = gumbo.model.number[ gumbo.atom.modelId[atomAnchorRid] ];\n for (int atomRidMasterKnown=knowMaster.nextSetBit(0);atomRidMasterKnown>=0;atomRidMasterKnown=knowMaster.nextSetBit(atomRidMasterKnown+1)) {\n BitSet bondRidList = gumbo.bond.getBondListForAtomRid( atomRidMasterKnown );\n// General.showDebug(\"Found number of bonds: \" + bondRidList.cardinality());\n int atomRidKnown = gumbo.atom.getAtomRidFromMasterRidAndModelNumber( atomRidMasterKnown, modelNumber);\n for (int bondRid=bondRidList.nextSetBit(0);bondRid>=0;bondRid=bondRidList.nextSetBit(bondRid+1)) {\n// General.showDebug(gumbo.bond.toString(bondRid));\n int atom2MasterRid = gumbo.bond.atom_A_Id[bondRid];\n if ( atom2MasterRid == atomRidMasterKnown ) {\n atom2MasterRid = gumbo.bond.atom_B_Id[bondRid];\n }\n int atom2Rid = gumbo.atom.getAtomRidFromMasterRidAndModelNumber( atom2MasterRid, modelNumber);\n// General.showDebug(\" to master atom: \" + gumbo.atom.toString(atom2MasterRid));\n// General.showDebug(\" to atom: \" + gumbo.atom.toString(atom2Rid));\n if ( atom2MasterRid != atomAnchorMasterRid ) {\n // Obviously atom 2 has real coordinates already.\n if ( gumbo.atom.elementId[atom2MasterRid] != Chemistry.ELEMENT_ID_HYDROGEN ) {\n// General.showDebug(\"findKnownSecondary results preferred:\");\n// General.showDebug(gumbo.atom.toString(atomRidMasterKnown));\n// General.showDebug(gumbo.atom.toString(atom2MasterRid));\n return new int[] { atomRidKnown, atom2Rid };\n } else {\n h_list.add( new int[] { atomRidKnown, atom2Rid } );\n }\n }\n }\n }\n if (h_list.size()>0) {\n int[] ar = (int[] ) h_list.get(0);\n// General.showDebug(\"findKnownSecondary results with proton:\");\n// General.showDebug(gumbo.atom.toString(ar[0]));\n// General.showDebug(gumbo.atom.toString(ar[1]));\n return ar;\n }\n// General.showDebug(\"findKnownSecondary --NO-- results.\");\n return null;\n }",
"private void extractNonManhattanTransistor(PolyBase poly, PrimitiveNode transistor, PolyMerge merge, PolyMerge originalMerge, Cell newCell)\n \t{\n \t\t// determine minimum width of polysilicon\n \t\tSizeOffset so = transistor.getProtoSizeOffset();\n \t\tdouble minWidth = transistor.getDefHeight() - so.getLowYOffset() - so.getHighYOffset();\n \n \t\t// reduce the geometry to a skeleton of centerlines\n \t\tList<Centerline> lines = findCenterlines(poly, tempLayer1, minWidth, merge, originalMerge);\n \t\tif (lines.size() == 0) return;\n \n \t\t// if just one line, it is simply an angled transistor\n \t\tif (lines.size() == 1)\n \t\t{\n \t\t\tCenterline cl = lines.get(0);\n \t\t\tdouble polySize = cl.start.distance(cl.end);\n \t\t\tdouble activeSize = cl.width;\n \t\t\tdouble cX = (cl.start.getX() + cl.end.getX()) / 2;\n \t\t\tdouble cY = (cl.start.getY() + cl.end.getY()) / 2;\n \t\t\tdouble sX = polySize + scaleUp(so.getLowXOffset() + so.getHighXOffset());\n \t\t\tdouble sY = activeSize + scaleUp(so.getLowYOffset() + so.getHighYOffset());\n \t\t\trealizeNode(transistor, Technology.NodeLayer.MULTICUT_CENTERED, cX, cY, sX, sY, cl.angle, null, merge, newCell, null);\n \t\t\treturn;\n \t\t}\n \n \t\t// serpentine transistor: organize the lines into an array of points\n \t\tEPoint [] points = new EPoint[lines.size()+1];\n \t\tfor(Centerline cl : lines)\n \t\t{\n \t\t\tcl.handled = false;\n \t\t}\n \t\tCenterline firstCL = lines.get(0);\n \t\tfirstCL.handled = true;\n \t\tpoints[0] = new EPoint(firstCL.start.getX(), firstCL.start.getY());\n \t\tpoints[1] = new EPoint(firstCL.end.getX(), firstCL.end.getY());\n \t\tint pointsSeen = 2;\n \t\twhile (pointsSeen < points.length)\n \t\t{\n \t\t\tboolean added = false;\n \t\t\tfor(Centerline cl : lines)\n \t\t\t{\n \t\t\t\tif (cl.handled) continue;\n \t\t\t\tEPoint start = new EPoint(cl.start.getX(), cl.start.getY());\n \t\t\t\tEPoint end = new EPoint(cl.end.getX(), cl.end.getY());\n \t\t\t\tif (start.equals(points[0]))\n \t\t\t\t{\n \t\t\t\t\t// insert \"end\" point at start\n \t\t\t\t\tfor(int i=pointsSeen; i>0; i--)\n \t\t\t\t\t\tpoints[i] = points[i-1];\n \t\t\t\t\tpoints[0] = end;\n \t\t\t\t\tpointsSeen++;\n \t\t\t\t\tcl.handled = true;\n \t\t\t\t\tadded = true;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\tif (end.equals(points[0]))\n \t\t\t\t{\n \t\t\t\t\t// insert \"start\" point at start\n \t\t\t\t\tfor(int i=pointsSeen; i>0; i--)\n \t\t\t\t\t\tpoints[i] = points[i-1];\n \t\t\t\t\tpoints[0] = start;\n \t\t\t\t\tpointsSeen++;\n \t\t\t\t\tcl.handled = true;\n \t\t\t\t\tadded = true;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\tif (start.equals(points[pointsSeen-1]))\n \t\t\t\t{\n \t\t\t\t\t// add \"end\" at the end\n \t\t\t\t\tpoints[pointsSeen++] = end;\n \t\t\t\t\tcl.handled = true;\n \t\t\t\t\tadded = true;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\tif (end.equals(points[pointsSeen-1]))\n \t\t\t\t{\n \t\t\t\t\t// add \"start\" at the end\n \t\t\t\t\tpoints[pointsSeen++] = start;\n \t\t\t\t\tcl.handled = true;\n \t\t\t\t\tadded = true;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (!added) break;\n \t\t}\n \n \t\t// make sure all points are handled\n \t\tif (pointsSeen != points.length) return;\n \n \t\t// compute information about the transistor and create it\n \t\tdouble lX = points[0].getX(), hX = points[0].getX();\n \t\tdouble lY = points[0].getY(), hY = points[0].getY();\n \t\tfor(int i=1; i<points.length; i++)\n \t\t{\n \t\t\tif (points[i].getX() < lX) lX = points[i].getX();\n \t\t\tif (points[i].getX() > hX) hX = points[i].getX();\n \t\t\tif (points[i].getY() < lY) lY = points[i].getY();\n \t\t\tif (points[i].getY() > hY) hY = points[i].getY();\n \t\t}\n \t\tdouble cX = (lX + hX) / 2;\n \t\tdouble cY = (lY + hY) / 2;\n \t\tfor(int i=0; i<points.length; i++)\n \t\t\tpoints[i] = new EPoint((points[i].getX()) / SCALEFACTOR, (points[i].getY()) / SCALEFACTOR);\n \t\trealizeNode(transistor, Technology.NodeLayer.MULTICUT_CENTERED, cX, cY, hX - lX, hY - lY, 0, points, merge, newCell, null);\n \t}",
"public void cut() {\n List<Tile> border = getPath();\n Set<Tile> borderSet = new HashSet<Tile>(border);\n Set<Tile> usedPoints = new HashSet<Tile>(borderSet);\n List<Set<Tile>> areas = new ArrayList<Set<Tile>>();\n int biggestAreaIndex = -1;\n\n /**\n * Walk through border, find opposite points\n */\n for (Point point : border) {\n final int x = point.x;\n final int y = point.y;\n\n /**\n * Movement was vertical, check left and right parts,\n * check top and bottom parts in any other case\n */\n for (int[] dxdy : new int[][]{{-1, 0}, {1, 0}, {0, -1}, {0, 1} }) {\n Set<Tile> area = new HashSet<Tile>();\n fill(getTile(x + dxdy[0], y + dxdy[1]), usedPoints, area);\n if (!area.isEmpty()) {\n areas.add(area);\n usedPoints.addAll(area);\n\n if (biggestAreaIndex < 0 || areas.get(biggestAreaIndex).size() < area.size()) {\n biggestAreaIndex = areas.size() - 1;\n }\n }\n }\n }\n\n Set<Tile> toFill = new HashSet<Tile>(borderSet);\n if (!areas.isEmpty()) {\n areas.remove(biggestAreaIndex);\n for (Set<Tile> area : areas) {\n toFill.addAll(area);\n }\n }\n\n for (Tile tile : toFill) {\n tile.state = TileState.WATER;\n fireChange(tile);\n }\n\n getPath().clear();\n }",
"@SuppressWarnings(\"unused\")\r\n private void makeSubcutaneousFat2DVOI() {\r\n\r\n // find the center of mass of the single label object in the sliceBuffer (abdomenImage)\r\n findAbdomenCM();\r\n int xcm = centerOfMass[0];\r\n int ycm = centerOfMass[1];\r\n \r\n VOIVector vois = abdomenImage.getVOIs();\r\n VOI theVOI = vois.get(0);\r\n\r\n // there should be only one VOI and one curve\r\n VOIContour curve = ((VOIContour)theVOI.getCurves().get(0));\r\n int[] xVals = new int [curve.size()];\r\n int[] yVals = new int [curve.size()];\r\n int[] zVals = new int [curve.size()];\r\n curve.exportArrays(xVals, yVals, zVals);\r\n \r\n int[] xValsSubcutaneousVOI = new int [curve.size()];\r\n int[] yValsSubcutaneousVOI = new int [curve.size()];\r\n \r\n \r\n // the intensity profile along a radial line for a given angle\r\n short[] profile;\r\n \r\n // the x, y location of all the pixels along a radial line for a given angle\r\n int[] xLocs;\r\n int[] yLocs;\r\n try {\r\n profile = new short[xDim];\r\n xLocs = new int[xDim];\r\n yLocs = new int[xDim];\r\n } catch (OutOfMemoryError error) {\r\n System.gc();\r\n MipavUtil.displayError(\"findAbdomenVOI(): Can NOT allocate profile\");\r\n return;\r\n }\r\n\r\n try {\r\n srcImage.exportData(0, sliceSize, sliceBuffer);\r\n } catch (IOException ex) {\r\n System.err.println(\"JCATsegmentAbdomen2D(): Error exporting data\");\r\n return;\r\n }\r\n\r\n\r\n // find a subcutaneous fat contour point for each abdominal contour point\r\n // we know the abdominal contour points are located at three degree increments\r\n double angleRad;\r\n int count;\r\n int contourPointIdx = 0;\r\n for (int angle = 0; angle < 360; angle += angularResolution) {\r\n count = 0;\r\n int x = xcm;\r\n int y = ycm;\r\n int yOffset = y * xDim;\r\n double scaleFactor; // reduces the number of trig operations that must be performed\r\n \r\n angleRad = Math.PI * angle / 180.0;\r\n if (angle > 315 || angle <= 45) {\r\n // increment x each step\r\n scaleFactor = Math.tan(angleRad);\r\n while (x < xVals[contourPointIdx]) {\r\n // store the intensity and location of each point along the radial line\r\n profile[count] = sliceBuffer[yOffset + x];\r\n xLocs[count] = x;\r\n yLocs[count] = y;\r\n count++;\r\n \r\n // walk out in x and compute the value of y for the given radial line\r\n x++;\r\n y = ycm - (int)((x - xcm) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n\r\n // profile contains all the source image intensity values along the line from\r\n // the center-of-mass to the abdomen VOI point\r\n // Find where the subcutaneous fat ends and the muscle starts\r\n \r\n // start at the end of the profile array since its order is from the\r\n // center-of-mass to the abdomen voi point\r\n \r\n int idx = count - 5; // skip over the skin\r\n while (idx >= 0 && profile[idx] < muscleThresholdHU && profile[idx] > airThresholdHU) {\r\n idx--;\r\n }\r\n if (idx <= 0) {\r\n MipavUtil.displayError(\"findAbdomenVOI(): Can NOT find visceral cavity in the intensity profile\");\r\n break;\r\n }\r\n xValsSubcutaneousVOI[contourPointIdx] = xLocs[idx];\r\n yValsSubcutaneousVOI[contourPointIdx] = yLocs[idx];\r\n \r\n } else if (angle > 45 && angle <= 135) {\r\n // decrement y each step\r\n scaleFactor = (Math.tan((Math.PI / 2.0) - angleRad));\r\n while (y > yVals[contourPointIdx]) {\r\n // store the intensity and location of each point along the radial line\r\n profile[count] = sliceBuffer[yOffset + x];\r\n xLocs[count] = x;\r\n yLocs[count] = y;\r\n count++;\r\n \r\n // walk to the top of the image and compute values of x for the given radial line\r\n y--;\r\n x = xcm + (int)((ycm - y) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n \r\n // profile contains all the source image intensity values along the line from\r\n // the center-of-mass to the newly computed abdomen VOI point\r\n // Find where the subcutaneous fat ends\r\n int idx = count - 5; // skip over the skin\r\n while (idx >= 0 && profile[idx] < muscleThresholdHU&& profile[idx] > airThresholdHU) {\r\n idx--;\r\n }\r\n if (idx == 0) {\r\n MipavUtil.displayError(\"findAbdomenVOI(): Can NOT find visceral cavity in the intensity profile\");\r\n return;\r\n }\r\n xValsSubcutaneousVOI[contourPointIdx] = xLocs[idx];\r\n yValsSubcutaneousVOI[contourPointIdx] = yLocs[idx];\r\n \r\n } else if (angle > 135 && angle <= 225) {\r\n // decrement x each step\r\n scaleFactor = Math.tan(Math.PI - angleRad);\r\n while (x > xVals[contourPointIdx]) {\r\n // store the intensity and location of each point along the radial line\r\n profile[count] = sliceBuffer[yOffset + x];\r\n xLocs[count] = x;\r\n yLocs[count] = y;\r\n count++;\r\n \r\n x--;\r\n y = ycm - (int)((xcm - x) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n \r\n // profile contains all the source image intensity values along the line from\r\n // the center-of-mass to the newly computed abdomen VOI point\r\n // Find where the subcutaneous fat ends\r\n int idx = count - 5; // skip over the skin\r\n while (idx >= 0 && profile[idx] < muscleThresholdHU&& profile[idx] > airThresholdHU) {\r\n idx--;\r\n }\r\n if (idx == 0) {\r\n MipavUtil.displayError(\"findAbdomenVOI(): Can NOT find visceral cavity in the intensity profile\");\r\n return;\r\n }\r\n xValsSubcutaneousVOI[contourPointIdx] = xLocs[idx];\r\n yValsSubcutaneousVOI[contourPointIdx] = yLocs[idx];\r\n \r\n } else if (angle > 225 && angle <= 315) {\r\n // increment y each step\r\n scaleFactor = Math.tan((3.0 * Math.PI / 2.0) - angleRad);\r\n while (y < yVals[contourPointIdx]) {\r\n // store the intensity and location of each point along the radial line\r\n profile[count] = sliceBuffer[yOffset + x];\r\n xLocs[count] = x;\r\n yLocs[count] = y;\r\n count++;\r\n \r\n y++;\r\n x = xcm - (int)((y - ycm) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n \r\n // profile contains all the source image intensity values along the line from\r\n // the center-of-mass to the newly computed abdomen VOI point\r\n // Find where the subcutaneous fat ends\r\n int idx = count - 5; // skip over the skin\r\n while (idx >= 0 && profile[idx] < muscleThresholdHU&& profile[idx] > airThresholdHU) {\r\n idx--;\r\n }\r\n if (idx == 0) {\r\n MipavUtil.displayError(\"findAbdomenVOI(): Can NOT find visceral cavity in the intensity profile\");\r\n return;\r\n }\r\n xValsSubcutaneousVOI[contourPointIdx] = xLocs[idx];\r\n yValsSubcutaneousVOI[contourPointIdx] = yLocs[idx];\r\n\r\n }\r\n \r\n contourPointIdx++;\r\n } // end for (angle = 0; ...\r\n\r\n\r\n // make the VOI's and add the points to them\r\n subcutaneousVOI = new VOI((short)0, \"Subcutaneous area\");\r\n subcutaneousVOI.importCurve(xValsSubcutaneousVOI, yValsSubcutaneousVOI, zVals);\r\n\r\n }",
"int getHair();",
"public List<Image> splitSpriteHologram()\n {\n int[][] spriteSheetCoords = {\n {0, 0, 48, 64}, {48, 0, 48, 64}, {96, 0, 48, 64},\n {0, 64, 48, 64}, {48, 64, 48, 64}, {96, 64, 48, 64},\n {0, 128, 48, 64}, {48, 128, 48, 64}, {96, 128, 48, 64},\n\n {0, 192, 48, 64}, {48, 192, 48, 64}, {96, 192, 48, 64},\n {0, 256, 48, 64}, {48, 256, 48, 64}, {96, 256, 48, 64},\n {0, 320, 48, 64}, {48, 320, 48, 64}, {96, 320, 48, 64},\n\n };\n\n BufferedImage img = null;\n try\n {\n img = ImageIO.read(getClass().getClassLoader().getResource(\"holo_card_final.png\"));\n\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n\n\n List<Image> imgArray = new ArrayList<>();\n for (int[] a : spriteSheetCoords)\n {\n\n Image img2 = img.getSubimage(a[0], a[1], a[2], a[3]);\n img2 = img2.getScaledInstance(HOLOGRAM_WIDTH, HOLOGRAM_HEIGHT, Image.SCALE_SMOOTH);\n imgArray.add(img2);\n }\n\n return imgArray;\n }",
"public static void neighborhoodMaxLowMem(String szinputsegmentation,String szanchorpositions,\n int nbinsize, int numleft, int numright, int nspacing, \n\t\t\t\t\tboolean busestrand, boolean busesignal, String szcolfields,\n\t\t\t\t\tint noffsetanchor, String szoutfile,Color theColor, \n\t\t\t\t\t String sztitle,String szlabelmapping, boolean bprintimage, \n boolean bstringlabels, boolean bbrowser) throws IOException\n {\n\n\n\tboolean bchrommatch = false;//added in 1.23 to check for chromosome matches\n\t//an array of chromosome names\n\tArrayList alchromindex = new ArrayList();\n\n\tString szLine;\n\n\t//stores the largest index value for each chromosome\n\tHashMap hmchromMax = new HashMap();\n\n\t//maps chromosome names to index values\n\tHashMap hmchromToIndex = new HashMap();\n\tHashMap hmLabelToIndex = new HashMap(); //maps label to an index\n\tHashMap hmIndexToLabel = new HashMap(); //maps index string to label\n\t//stores the maximum integer label value\n\tint nmaxlabel=0;\n\tString szlabel =\"\";\n\tBufferedReader brinputsegment = Util.getBufferedReader(szinputsegmentation);\n\n\tboolean busedunderscore = false;\n //the number of additional intervals to the left and right to include\n \n \t//the center anchor position\n\tint numintervals = 1+numleft+numright;\n\n\n\t//this loops reads in the segmentation \n\twhile ((szLine = brinputsegment.readLine())!=null)\n\t{\n\t //added v1.24\n\t if (bbrowser)\n\t {\n\t\tif ((szLine.toLowerCase(Locale.ENGLISH).startsWith(\"browser\"))||(szLine.toLowerCase(Locale.ENGLISH).startsWith(\"track\")))\n\t\t{\n\t\t continue;\n\t\t}\n\t }\n\n\t StringTokenizer st;\n\t if (bstringlabels)\n\t {\n\t st = new StringTokenizer(szLine,\"\\t\");\n\t }\n\t else\n\t {\n\t st = new StringTokenizer(szLine,\"\\t \");\n\t }\n\n\t //added in v1.24\n\t int numtokens = st.countTokens();\n\t if (numtokens == 0)\n\t { \n\t //skip blank lines\n\t continue;\n\t }\n\t else if (numtokens < 4)\n\t {\n\t throw new IllegalArgumentException(\"Line \"+szLine+\" in \"+szinputsegmentation+\" only had \"+numtokens+\" token(s). Expecting at least 4\");\n\t }\n\n\t String szchrom = st.nextToken().trim();\n //assumes segments are in standard bed format which to get to \n\t //0-based inclusive requires substract 1 from the end\n\t //int nbegin = Integer.parseInt(st.nextToken().trim())/nbinsize; \n\t st.nextToken().trim();\n\t int nend = (Integer.parseInt(st.nextToken().trim())-1)/nbinsize; \n\t szlabel = st.nextToken().trim();\n\t short slabel;\n\n\t if (bstringlabels)\n\t {\n\t int nunderscoreindex = szlabel.indexOf(\"_\");\n\n\t if (nunderscoreindex >=0)\n\t {\n\t String szprefix = szlabel.substring(0,nunderscoreindex);\n\n try\n\t\t {\n\t slabel = (short) (Short.parseShort(szprefix));\n\t\t if (slabel > nmaxlabel)\n\t\t {\n\t nmaxlabel = slabel;\n\t\t }\n\t\t busedunderscore = true;\n\t\t hmLabelToIndex.put(szlabel, Short.valueOf(slabel));\n\t\t hmIndexToLabel.put(\"\"+slabel, szlabel);\n\t\t }\n catch (NumberFormatException ex)\n\t\t {\n try\n\t\t {\n\t\t slabel = (short) (Short.parseShort(szprefix.substring(1)));\n\t\t if (slabel > nmaxlabel)\n\t\t {\n\t\t nmaxlabel = slabel;\n\t\t }\n\t\t busedunderscore = true;\n\t\t hmLabelToIndex.put(szlabel, Short.valueOf(slabel));\n\t\t hmIndexToLabel.put(\"\"+slabel, szlabel);\n\t\t }\n\t\t catch (NumberFormatException ex2)\n\t\t {\n\t\t if (busedunderscore)\n\t\t {\n\t\t throw new IllegalArgumentException(\"Not a valid ID before '_' in \"+szlabel+\", while valid ID found for other entries\");\n\t\t }\n\t\t }\n\t\t }\n\t }\n\n\t if (!busedunderscore)\n\t {\n\t //handle string labels\n\t Short objshort = (Short) hmLabelToIndex.get(szlabel);\n\n\t if (objshort == null)\n\t {\n\t\t nmaxlabel = hmLabelToIndex.size()+1;\n\t\t slabel = (short) nmaxlabel;\n\t\t hmLabelToIndex.put(szlabel, Short.valueOf(slabel));\n\t\t hmIndexToLabel.put(\"\"+nmaxlabel, szlabel);\n\t\t }\n\t }\n\t }\n\t else\n\t {\n try\n\t {\n\t slabel = (short) (Short.parseShort(szlabel));\n\t }\n\t catch (NumberFormatException ex)\n\t {\n try\n\t {\n slabel = (short) (Short.parseShort(szlabel.substring(1)));\n\t }\n\t catch (NumberFormatException ex2)\n\t {\n\t throw new IllegalArgumentException(\"In fourth column neither state number or ID found in segmentation file. Use '-labels' option to run overlap enrichment treating fourth column as labels\");\n\t }\n\t }\n\t \n\t //alsegments.add(new SegmentRec(szchrom,nbegin,nend,slabel));\n\n\t if (slabel > nmaxlabel)\n\t {\n\t nmaxlabel = slabel;\n\t }\n\t }\n\n\t Integer objMax = (Integer) hmchromMax.get(szchrom);\n\t if (objMax == null)\n\t {\n\t\t//System.out.println(\"on chrom \"+szchrom);\n\t\thmchromMax.put(szchrom,Integer.valueOf(nend));\n\t\thmchromToIndex.put(szchrom, Integer.valueOf(hmchromToIndex.size()));\n\t\talchromindex.add(szchrom);\n\t }\n\t else\n\t {\n\t\tint ncurrmax = objMax.intValue();\n\t\tif (ncurrmax < nend)\n\t\t{\n\t\t hmchromMax.put(szchrom, Integer.valueOf(nend));\t\t \n\t\t}\n\t }\n\t}\n\tbrinputsegment.close();\n\n\t//stores a tally for each position relative to an anchor how frequently the label was observed\n\tdouble[][] tallyoverlaplabel = new double[numintervals][nmaxlabel+1]; \n\n\t//stores a tally for the total signal associated with each anchor position\n\tdouble[] dsumoverlaplabel = new double[numintervals];\n\n //a tally on how frequently each label occurs\n double[] tallylabel = new double[nmaxlabel+1];\n\n\n\tint numchroms = alchromindex.size();\n\n //short[][] labels = new short[numchroms][];\n\n\t//allocates space store all the segment labels for each chromosome\n\tfor (int nchrom = 0; nchrom < numchroms; nchrom++)\n\t{\n \t //stores all the segments in the data\n\t //ArrayList alsegments = new ArrayList();\n\t brinputsegment = Util.getBufferedReader(szinputsegmentation);\n\t String szchromwant = (String) alchromindex.get(nchrom);\n\t //System.out.println(\"processing \"+szchromwant);\n\t int nsize = ((Integer) hmchromMax.get(alchromindex.get(nchrom))).intValue()+1;\n\t short[] labels = new short[nsize];\n\t //this loops reads in the segmentation \n\n\n\t //short[] labels_nchrom = labels[nchrom];\n\t for (int npos = 0; npos < nsize; npos++)\n {\n labels[npos] = -1;\n }\n\t\t\n\t while ((szLine = brinputsegment.readLine())!=null)\n\t {\n\t //int numlines = alsegments.size();\n\t StringTokenizer st;\n\t if (bstringlabels)\n\t {\n\t st = new StringTokenizer(szLine,\"\\t\");\n\t }\n\t else\n\t {\n\t st = new StringTokenizer(szLine,\"\\t \");\n\t }\n\n\t String szchrom = st.nextToken().trim();\n\t if (!szchromwant.equals(szchrom))\n\t\t continue;\n\n\t bchrommatch = true;\n //assumes segments are in standard bed format which to get to \n\t //0-based inclusive requires substract 1 from the end\n\t int nbegin = Integer.parseInt(st.nextToken().trim())/nbinsize;\n\t int nend = (Integer.parseInt(st.nextToken().trim())-1)/nbinsize; \n\t szlabel = st.nextToken().trim();\n\t short slabel = -1;\n\n\t if (bstringlabels)\n\t {\n\t int nunderscoreindex = szlabel.indexOf(\"_\");\n\n\t\t if (nunderscoreindex >=0)\n\t\t {\n\t\t String szprefix = szlabel.substring(0,nunderscoreindex);\n\n try\n\t\t {\n\t\t slabel = (short) (Short.parseShort(szprefix));\n\t\t busedunderscore = true;\n\t\t }\n catch (NumberFormatException ex)\n\t\t {\n try\n\t\t {\n\t\t slabel = (short) (Short.parseShort(szprefix.substring(1)));\n\t\t\t busedunderscore = true;\n\t\t }\n\t\t catch (NumberFormatException ex2)\n\t\t {\n\t\t\t if (busedunderscore)\n\t\t\t {\n\t\t\t throw new IllegalArgumentException(\"Not a valid ID before '_' in \"+szlabel+\", while valid ID found for other entries\");\n\t\t\t }\n\t\t }\n\t\t }\n\t\t }\n\n\t\t if (!busedunderscore)\n\t\t {\n\t //handle string labels\n\t\t Short objshort = (Short) hmLabelToIndex.get(szlabel);\n\t\t slabel = ((Short) objshort).shortValue();\n\t }\n\t }\n\t else\n\t {\n try\n\t {\n\t\t slabel = (short) (Short.parseShort(szlabel));\n\t }\n\t catch (NumberFormatException ex)\n\t {\n try\n\t\t {\n slabel = (short) (Short.parseShort(szlabel.substring(1)));\n\t\t }\n\t\t catch (NumberFormatException ex2)\n\t\t {\n\t\t throw new IllegalArgumentException(\"In fourth column neither state number or ID found in segmentation file. Use '-labels' option to run overlap enrichment treating fourth column as labels\");\n\t\t }\n\t }\n\t }\n\n\t //this loop stores into labels the full segmentation\n\t //and a count of how often each label occurs\n\t //for (int nindex = 0; nindex < numlines; nindex++)\n\t //{\n\t //SegmentRec theSegmentRec = (SegmentRec) alsegments.get(nindex);\n\t //int nchrom = ((Integer) hmchromToIndex.get(theSegmentRec.szchrom)).intValue();\n\t //short[] labels_nchrom = labels[nchrom];\n\t //int nbegin = theSegmentRec.nbegin;\n\t //int nend = theSegmentRec.nend;\n\t //short slabel = theSegmentRec.slabel;\n\t for (int npos = nbegin; npos <= nend; npos++)\n\t {\n\t labels[npos] = slabel;\n\t }\n\n\t if (slabel >= 0)\n\t {\n\t tallylabel[slabel]+=(nend-nbegin)+1; \n\t }\t \n\t }\n\t brinputsegment.close();\n\n\n\t RecAnchorIndex theAnchorIndex = getAnchorIndex(szcolfields, busestrand, busesignal);\n\n \t //reads in the anchor position \n BufferedReader brcoords = Util.getBufferedReader(szanchorpositions);\n\t while ((szLine = brcoords.readLine())!=null)\n {\n\t if (szLine.trim().equals(\"\")) continue;\n\t String[] szLineA = szLine.split(\"\\\\s+\");\n\n String szchrom = szLineA[theAnchorIndex.nchromindex]; \n\t if (!szchrom.equals(szchromwant)) \n continue;\n\n\t int nanchor = (Integer.parseInt(szLineA[theAnchorIndex.npositionindex])-noffsetanchor);\n\t boolean bposstrand = true;\n\t if (busestrand)\n\t {\n\t String szstrand = szLineA[theAnchorIndex.nstrandindex];\t \n\t if (szstrand.equals(\"+\"))\n\t {\n\t bposstrand = true;\n\t }\n else if (szstrand.equals(\"-\"))\n {\n \t bposstrand = false;\n\t }\n\t else\n\t {\n \t throw new IllegalArgumentException(szstrand +\" is an invalid strand. Strand should be '+' or '-'\");\n\t\t }\t \n\t }\n\n\t double damount;\n\n\t if ((busesignal)&&(theAnchorIndex.nsignalindex< szLineA.length))\n\t {\n\t damount = Double.parseDouble(szLineA[theAnchorIndex.nsignalindex]);\n\t }\n\t else\n {\n\t damount = 1;\n\t }\n\n\t //updates the tallys for the given anchor position\n\t //Integer objChrom = (Integer) hmchromToIndex.get(szchrom);\n //if (objChrom != null)\n\t //{\n\t // int nchrom = objChrom.intValue();\n\t\t //short[] labels_nchrom = labels[nchrom];\n\n\t if (bposstrand)\n\t {\n\t int ntallyindex = 0;\n\t for(int noffset= -numleft; noffset <= numright; noffset++)\n\t {\n\t\t int nposindex = (nanchor + nspacing*noffset)/nbinsize;\n\n\t\t if ((nposindex >=0)&&(nposindex < labels.length)&&(labels[nposindex]>=0))\n\t\t {\n\t tallyoverlaplabel[ntallyindex][labels[nposindex]] += damount;\t\t \n\t\t }\n\t\t ntallyindex++;\n\t\t }\n\t\t }\n\t else\n\t {\n\t int ntallyindex = 0;\n\t for(int noffset= numright; noffset >= -numleft; noffset--)\n\t {\n\t\t int nposindex = (nanchor + nspacing*noffset)/nbinsize;\n\n\t\t if ((nposindex >=0)&&(nposindex < labels.length)&&(labels[nposindex]>=0))\n\t\t {\n\t tallyoverlaplabel[ntallyindex][labels[nposindex]]+=damount;\t\t \n\t\t }\n\t\t ntallyindex++;\n\t\t }\n\t\t //}\n\t\t }\n\t }\n brcoords.close(); \t \n\t}\n\n\tif (!bchrommatch)\n\t{\n\t throw new IllegalArgumentException(\"No chromosome name matches found between \"+szanchorpositions+\n \" and those in the segmentation file.\");\n\t}\n\n\toutputneighborhood(tallyoverlaplabel,tallylabel,dsumoverlaplabel,szoutfile,nspacing,numright,\n numleft,theColor,ChromHMM.convertCharOrderToStringOrder(szlabel.charAt(0)),sztitle,0,\n szlabelmapping,szlabel.charAt(0), bprintimage, bstringlabels, hmIndexToLabel);\n }",
"public List<int[]> getSkyline(int[][] buildings) {\n List<int[]> res = new ArrayList<>();\n if (buildings == null || buildings.length == 0) {\n return res;\n }\n\n List<int[]> height = new ArrayList<>();\n\n for (int[] b : buildings) {\n int leftPoint = b[0];\n int rightPoint = b[1];\n int h = b[2];\n /*\n make left side point neg\n make right side point pos\n so we can differentiate the left side point and right side point, because we need to push left point and pop right pop from heap :\n When left side point is pushed, this may genreate the overlap point.\n When right side point is removed, this may also genreate the overlap point.\n */\n height.add(new int[]{leftPoint, -1 * h});\n height.add(new int[]{rightPoint, h});\n }\n\n // smaller one is at front\n Collections.sort(height, (a, b) -> {\n if (a[0] != b[0]) return a[0]-b[0];\n else return a[1]-b[1];\n });\n\n // larger one is at front, maxheap.\n Queue<Integer> heightQueue = new PriorityQueue<Integer>((a, b) -> (b - a));\n heightQueue.offer(0);\n int prevTop = 0;\n for (int[] h : height) {\n int index = h[0];\n int hg = h[1];\n // if this is left side, push this to max heap\n if (hg < 0) heightQueue.offer(-1 * hg);\n // if this is a right side, this is already here, remove this from max heap\n else heightQueue.remove(hg);\n // the current top is the max element in the heap\n int curTop = heightQueue.peek();\n\n /*\n the prev stores previous top element in maxheap(largest height). if peek == prev then this means the new added does not change the largest number in queue thus this height is not largest one, in this case, we do not need to store this. If the peek != prev, this means max heap's top is changed, so there must be an overlap point.\n if the peek != prev, then, this means, the top element in max heap is changed such as from red point [3,15] to [7, 12] when point (7,15) is removed, so we need to store this. Two cases:\n eg1: the overlap of [3,15] and [7, 12] is need to record because, when [7,15](right side) is removed, the heap's top changes from 15->12, so this is the point we want to record\n eg2: the overlap of [2,10] and [3,15] is need to record because, when [3,15](left side) is pushed, the heap's top changes from 12->15, so this is the point we want to record.\n */\n // important !! != in order to show from [3,15] to [7,12]\n if (curTop != prevTop) {\n res.add(new int[]{index, curTop});\n prevTop = curTop;\n }\n }\n return res;\n }",
"private void makeSubcutaneousFatVOIfromIntensityProfiles(int sliceNum) {\r\n \r\n int[] xLocsSubcutaneousVOI;\r\n int[] yLocsSubcutaneousVOI;\r\n int[] zVals;\r\n try {\r\n xLocsSubcutaneousVOI = new int [360 / angularResolution];\r\n yLocsSubcutaneousVOI = new int [360 / angularResolution];\r\n zVals = new int [360 / angularResolution];\r\n } catch (OutOfMemoryError error) {\r\n System.gc();\r\n MipavUtil.displayError(\"makeSubcutaneousFatVOIfromIntensityProfiles(): Can NOT allocate xLocsSubcutaneousVOI\");\r\n return;\r\n }\r\n \r\n for(int idx = 0; idx < 360 / angularResolution; idx++) {\r\n // fixSubcutaneiousFat2DVOI requires the zVal to be 0 (does VOI extraction on a 2D slice image)\r\n zVals[idx] = 0;\r\n }\r\n \r\n int numSamples;\r\n \r\n for(int idx = 0; idx < 360 / angularResolution; idx++) {\r\n numSamples = intensityProfiles[idx].size();\r\n \r\n int sampleIdx = numSamples - 10; // skip over the skin\r\n while (sampleIdx >= 0 &&\r\n intensityProfiles[idx].get(sampleIdx) < muscleThresholdHU &&\r\n intensityProfiles[idx].get(sampleIdx) > airThresholdHU) {\r\n sampleIdx--;\r\n }\r\n if (sampleIdx <= 0) {\r\n // could not find a valid subcutaneous fat point in the intensity profile\r\n// MipavUtil.displayError(\"findAbdomenVOI(): Can NOT find the subcutaneous fat VOI point in the intensity profile for angle: \" +idx * angularResolution);\r\n if (idx > 0) {\r\n // assign this subcutaneous fat VOI point to the previous point if one exists\r\n xLocsSubcutaneousVOI[idx] = xLocsSubcutaneousVOI[idx-1];\r\n yLocsSubcutaneousVOI[idx] = yLocsSubcutaneousVOI[idx-1];\r\n } else {\r\n // assign this subcutaneous fat VOI point to the abdomen VOI point\r\n xLocsSubcutaneousVOI[idx] = xProfileLocs[idx].get(numSamples - 1);\r\n yLocsSubcutaneousVOI[idx] = yProfileLocs[idx].get(numSamples - 1);\r\n }\r\n } else {\r\n // we found a point in the intensity profile that matches subcutaneous fat\r\n xLocsSubcutaneousVOI[idx] = xProfileLocs[idx].get(sampleIdx);\r\n yLocsSubcutaneousVOI[idx] = yProfileLocs[idx].get(sampleIdx);\r\n }\r\n \r\n } // end for (int idx = 0; ...)\r\n\r\n // make the VOI's and add the points to them\r\n subcutaneousVOI.importCurve(xLocsSubcutaneousVOI, yLocsSubcutaneousVOI, zVals);\r\n\r\n }",
"private List<Integer> getInitialCorners_ShortStrawOversegment()\n\t\t\tthrows InvalidParametersException {\n\n\t\t// Store the original stroke\n\t\tStroke resampledStroke = new Stroke(m_stroke);\n\n\t\t// Initial processing (filtering, resampling) on the stroke\n\t\tresampledStroke = cleanStroke(resampledStroke);\n\n\t\tdouble resampledSpacing = determineResampleSpacing(m_stroke.getPoints());\n\n\t\t// The stroke is too short to resample\n\t\tif (resampledStroke.getPathLength() < S_SHORT_STROKE_THRESHOLD\n\t\t\t\t|| resampledStroke.getNumPoints() < IShortStrawThresholds.S_MIN_PTS_THRESHOLD\n\t\t\t\t|| resampledSpacing < IShortStrawThresholds.S_SMALL_RESAMPLE_SPACING_THRESHOLD) {\n\t\t\t// Do nothing...\n\t\t}\n\n\t\t// Resample the stroke\n\t\telse {\n\t\t\tList<Point> points = resamplePoints(resampledStroke,\n\t\t\t\t\tresampledSpacing);\n\t\t\tresampledStroke = new Stroke(points);\n\t\t}\n\n\t\tfinal double MEDIAN_PERCENTAGE = 1.0;\n\n\t\t// Initialize necessary variables\n\t\tdouble[] straws = new double[resampledStroke.getNumPoints()];\n\t\tdouble[] sortedStraws = new double[resampledStroke.getNumPoints()\n\t\t\t\t- (IShortStrawThresholds.S_WINDOW * 2)];\n\n\t\t// Calculate the straws\n\t\tfor (int i = IShortStrawThresholds.S_WINDOW; i < resampledStroke\n\t\t\t\t.getNumPoints() - IShortStrawThresholds.S_WINDOW; i++) {\n\n\t\t\tstraws[i] = resampledStroke.getPoint(\n\t\t\t\t\ti - IShortStrawThresholds.S_WINDOW).distance(\n\t\t\t\t\tresampledStroke\n\t\t\t\t\t\t\t.getPoint(i + IShortStrawThresholds.S_WINDOW));\n\n\t\t\t// For finding the median\n\t\t\tsortedStraws[i - IShortStrawThresholds.S_WINDOW] = straws[i];\n\t\t}\n\n\t\t// Initialize the corner array, with the start point\n\t\tList<Integer> corners = new ArrayList<Integer>();\n\t\tcorners.add(0);\n\n\t\t// Calculate our local minimum thresholds\n\t\tArrays.sort(sortedStraws);\n\t\tdouble medianDist = sortedStraws[sortedStraws.length / 2];\n\t\tdouble threshold = MEDIAN_PERCENTAGE * medianDist;\n\n\t\t// Find the shortest straws\n\t\tfor (int i = IShortStrawThresholds.S_WINDOW; i < straws.length\n\t\t\t\t- IShortStrawThresholds.S_WINDOW; i++) {\n\n\t\t\t// If we are below the median threshold\n\t\t\tif (straws[i] < threshold) {\n\n\t\t\t\tdouble localMinimum = Double.POSITIVE_INFINITY;\n\t\t\t\tint localMinimumIndex = i;\n\n\t\t\t\t// Find only the local minimum\n\t\t\t\t/*\n\t\t\t\t * while (i < straws.length - IShortStrawThresholds.S_WINDOW &&\n\t\t\t\t * straws[i] < threshold) { if (straws[i] < localMinimum) {\n\t\t\t\t * localMinimum = straws[i]; localMinimumIndex = i; }\n\t\t\t\t * \n\t\t\t\t * i++; }\n\t\t\t\t */\n\n\t\t\t\t// Add the index of the local minimum to our list\n\t\t\t\tcorners.add(new Integer(localMinimumIndex));\n\t\t\t}\n\t\t}\n\n\t\t// Add the end point\n\t\tcorners.add(resampledStroke.getNumPoints() - 1);\n\n\t\t// Map the resampled corners to original points\n\t\tList<Integer> allCorners = getOriginalStrokeCorners(corners,\n\t\t\t\tresampledStroke, m_stroke);\n\n\t\treturn allCorners;\n\t}",
"public static List<List<CADWire>> makeAirfoilsCutAndFlap(LiftingSurface liftingSurface, List<CADEdge> airfoilsClean, double yInnerPct, double yOuterPct, \n\t\t\tdouble innerChordRatio, double outerChordRatio, FlapType flapType, boolean doMakeHorn, double lateralGap){\n\n\t\tList<List<CADWire>> airfoilsCutAndFlap = new ArrayList<>();\n\t\tList<CADWire> airfoilsCut = new ArrayList<>();\n\t\tList<CADWire> flap\t = new ArrayList<>();\n\t\tint numInterAirfoil = 2;\n\t\tdouble[] secVec = new double[numInterAirfoil +2];\n\t\tdouble[] chordVec = new double[numInterAirfoil +2];\n\n\t\tsecVec = MyArrayUtils.linspace(\n\t\t\t\tyInnerPct * liftingSurface.getSemiSpan().doubleValue(SI.METER), \n\t\t\t\tyOuterPct * liftingSurface.getSemiSpan().doubleValue(SI.METER), \n\t\t\t\tnumInterAirfoil + 2);\n\t\tSystem.out.println(\"secVec \" + Arrays.toString(secVec));\n\n\t\tchordVec = MyArrayUtils.linspace(\n\t\t\t\tinnerChordRatio, \n\t\t\t\touterChordRatio, \n\t\t\t\tnumInterAirfoil + 2);\n\t\tSystem.out.println(\"chordVec \" + Arrays.toString(chordVec));\n\t\tSystem.out.println(\"secVec.length \" + secVec.length);\n\n\n\t\tswitch (flapType) {\n\n\t\tcase SYMMETRIC:\n\t\t\tfor(int i = 0; i < secVec.length; i++) {\n\n\t\t\t\tdouble y_station = secVec[i];\n\t\t\t\tdouble ChordRatio = chordVec[i];\n\n\t\t\t\tdouble k1 = 0.1; // gap factor\n\t\t\t\tdouble k2 = 0.08; // airfoil trailing edge factor\n\t\t\t\tdouble k3 = 3.0; // flap leading edge factor\n\t\t\t\tdouble cGap = k1 * ChordRatio; // flap gap \n\t\t\t\tdouble deltaCGap1 = k2 * cGap; // airfoil TE\n\t\t\t\tdouble deltaCGap2 = k3 * cGap; // flap LE\n\n\t\t\t\tint panel = 0;\n\t\t\t\tfor(int n = 0; n < liftingSurface.getYBreakPoints().size()-1; n++) {\n\n\t\t\t\t\tif(y_station >= liftingSurface.getYBreakPoints().get(n).doubleValue(SI.METER) && \n\t\t\t\t\t\t\ty_station <= liftingSurface.getYBreakPoints().get(n+1).doubleValue(SI.METER)) {\n\t\t\t\t\t\tpanel = n;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tint[] intArray = new int[] {panel};\n\t\t\t\tSystem.out.println(\"panel \" + panel);\n\n\n\t\t\t\tAirfoil airfoilCoords = liftingSurface.getAirfoilList().get(intArray[0]);\n\t\t\t\tList<double[]> ptsAirfoil = AircraftUtils.populateCoordinateList(\n\t\t\t\t\t\ty_station, \n\t\t\t\t\t\tairfoilCoords, \n\t\t\t\t\t\tliftingSurface\n\t\t\t\t\t\t);\n\n\t\t\t\tCADGeomCurve3D cadCurveAirfoil = OCCUtils.theFactory.newCurve3D(ptsAirfoil, false);\n\t\t\t\tCADEdge edgeAirfoil = cadCurveAirfoil.edge();\n\t\t\t\tCADGeomCurve3D chord = getChordSegmentAtYActual(y_station, liftingSurface);\n\t\t\t\tdouble chordLength = chord.length();\n\t\t\t\tOCCEdge chordEdge = (OCCEdge) chord.edge();\n\t\t\t\tOCCEdge airfoilEdge = (OCCEdge) edgeAirfoil;\n\n\n\t\t\t\t//\t\t\t\tOCCEdge chordEdge = (OCCEdge) chord.edge();\n\t\t\t\t//\t\t\t\tOCCEdge airfoilEdge = (OCCEdge) airfoilsClean.get(i);\n\n\t\t\t\t//\t\t\t\tGeom_Curve chordGeomCurve = BRep_Tool.Curve(chordEdge.getShape(), new double[1], new double[1]);\n\t\t\t\t//\t\t\t\tGeom_Curve airfoilGeomCurve = BRep_Tool.Curve(airfoilEdge.getShape(), new double[1], new double[1]);\n\n\t\t\t\tGeom_Curve airfoilGeomCurve = BRep_Tool.Curve(airfoilEdge.getShape(), new double[1], new double[1]);\n\t\t\t\tGeom_Curve chordGeomCurve = BRep_Tool.Curve(chordEdge.getShape(), new double[1], new double[1]);\n\n\t\t\t\t// Creation of point C\n\t\t\t\tdouble cFlapParC = getParamsIntersectionPntsOnAirfoil(\n\t\t\t\t\t\tairfoilGeomCurve, \n\t\t\t\t\t\tchordGeomCurve, \n\t\t\t\t\t\tchordLength, \n\t\t\t\t\t\t(ChordRatio + cGap - deltaCGap1) * chordLength, \n\t\t\t\t\t\tchordEdge.vertices()[0].pnt(), \n\t\t\t\t\t\tliftingSurface.getType(), \n\t\t\t\t\t\tSideSelector.UPPER_SIDE\n\t\t\t\t\t\t)[0];\n\n\t\t\t\tgp_Pnt C = new gp_Pnt(airfoilGeomCurve.Value(cFlapParC).X(),\n\t\t\t\t\t\tairfoilGeomCurve.Value(cFlapParC).Y(),\n\t\t\t\t\t\tairfoilGeomCurve.Value(cFlapParC).Z());\n\t\t\t\t//\t\t\t\tSystem.out.println(\"Point C coordinates : \" + C.X() + \" \" + C.Y() + \" \" + C.Z());\n\t\t\t\t// Creation of point D\n\t\t\t\tdouble cFlapParD = getParamsIntersectionPntsOnAirfoil(\n\t\t\t\t\t\tairfoilGeomCurve, \n\t\t\t\t\t\tchordGeomCurve, \n\t\t\t\t\t\tchordLength, \n\t\t\t\t\t\t(ChordRatio + cGap - deltaCGap1) * chordLength, \n\t\t\t\t\t\tchordEdge.vertices()[0].pnt(), \n\t\t\t\t\t\tliftingSurface.getType(), \n\t\t\t\t\t\tSideSelector.LOWER_SIDE\n\t\t\t\t\t\t)[0];\n\n\t\t\t\tgp_Pnt D = new gp_Pnt(airfoilGeomCurve.Value(cFlapParD).X(),\n\t\t\t\t\t\tairfoilGeomCurve.Value(cFlapParD).Y(),\n\t\t\t\t\t\tairfoilGeomCurve.Value(cFlapParD).Z());\n\t\t\t\t//\t\t\t\tSystem.out.println(\"Point D coordinates : \" + D.X() + \" \" + D.Y() + \" \" + D.Z());\n\n\t\t\t\t// Creation of point E\n\t\t\t\tdouble cFlapParE = getParamsIntersectionPntsOnAirfoil(\n\t\t\t\t\t\tairfoilGeomCurve, \n\t\t\t\t\t\tchordGeomCurve, \n\t\t\t\t\t\tchordLength, \n\t\t\t\t\t\t(ChordRatio + cGap) * chordLength, \n\t\t\t\t\t\tchordEdge.vertices()[0].pnt(), \n\t\t\t\t\t\tliftingSurface.getType(), \n\t\t\t\t\t\tSideSelector.UPPER_SIDE\n\t\t\t\t\t\t)[0];\n\n\t\t\t\tgp_Pnt E = new gp_Pnt(airfoilGeomCurve.Value(cFlapParE).X(),\n\t\t\t\t\t\tairfoilGeomCurve.Value(cFlapParE).Y(),\n\t\t\t\t\t\tairfoilGeomCurve.Value(cFlapParE).Z());\n\t\t\t\t//\t\t\t\tSystem.out.println(\"Point E coordinates : \" + E.X() + \" \" + E.Y() + \" \" + E.Z());\n\n\t\t\t\t// Creation of point F\n\t\t\t\tdouble cFlapParF = getParamsIntersectionPntsOnAirfoil(\n\t\t\t\t\t\tairfoilGeomCurve, \n\t\t\t\t\t\tchordGeomCurve, \n\t\t\t\t\t\tchordLength, \n\t\t\t\t\t\t(ChordRatio + cGap) * chordLength, \n\t\t\t\t\t\tchordEdge.vertices()[0].pnt(), \n\t\t\t\t\t\tliftingSurface.getType(), \n\t\t\t\t\t\tSideSelector.LOWER_SIDE\n\t\t\t\t\t\t)[0];\n\n\t\t\t\tgp_Pnt F = new gp_Pnt(airfoilGeomCurve.Value(cFlapParF).X(),\n\t\t\t\t\t\tairfoilGeomCurve.Value(cFlapParF).Y(),\n\t\t\t\t\t\tairfoilGeomCurve.Value(cFlapParF).Z());\n\t\t\t\t//\t\t\t\tSystem.out.println(\"Point F coordinates : \" + F.X() + \" \" + F.Y() + \" \" + F.Z());\n\n\t\t\t\t// Splitting airfoil in point E and F\n\t\t\t\tdouble[] pntE = new double[] {E.X(), E.Y(), E.Z()};\n\t\t\t\tdouble[] pntF = new double[] {F.X(), F.Y(), F.Z()};\n\t\t\t\tCADGeomCurve3D airfoil1 = OCCUtils.theFactory.newCurve3D(OCCUtils.splitCADCurve(airfoilEdge, pntE).get(0));\n\t\t\t\tCADGeomCurve3D airfoil2 = OCCUtils.theFactory.newCurve3D(OCCUtils.splitCADCurve(airfoilEdge, pntE).get(1));\n\t\t\t\tCADEdge edgeAirfoil1 = airfoil1.edge();\n\t\t\t\tCADEdge edgeAirfoil2 = airfoil2.edge();\n\t\t\t\tList<OCCEdge> airfoilEdges = new ArrayList<>();\n\t\t\t\tairfoilEdges.add((OCCEdge) edgeAirfoil1);\n\t\t\t\tairfoilEdges.add((OCCEdge) edgeAirfoil2);\n\n\t\t\t\tTopoDS_Edge airfoilFirstCut = getLongestEdge(airfoilEdges);\n\n\t\t\t\tList<OCCEdge> splitAirfoil = OCCUtils.splitEdge(\n\t\t\t\t\t\tOCCUtils.theFactory.newCurve3D((CADEdge) OCCUtils.theFactory.newShape(airfoilFirstCut)),\n\t\t\t\t\t\tpntF\n\t\t\t\t\t\t);\n\t\t\t\tTopoDS_Edge finalAirfoilCut = getLongestEdge(splitAirfoil);\n\n\t\t\t\t// Get normal vectors in point C and D\n\t\t\t\tgp_Vec zyDir = liftingSurface.getType().equals(ComponentEnum.VERTICAL_TAIL) ? \n\t\t\t\t\t\tnew gp_Vec(0.0, 0.0, 1.0) : new gp_Vec(0.0, 1.0, 0.0);\n\t\t\t\t\t\tgp_Vec yzDir = liftingSurface.getType().equals(ComponentEnum.VERTICAL_TAIL) ? \n\t\t\t\t\t\t\t\tnew gp_Vec(0.0, -1.0, 0.0) : new gp_Vec(0.0, 0.0, 1.0);\n\n\t\t\t\t\t\t\t\tgp_Vec tangPntC = new gp_Vec();\n\t\t\t\t\t\t\t\tgp_Pnt PntC = new gp_Pnt();\n\t\t\t\t\t\t\t\tairfoilGeomCurve.D1(cFlapParC, PntC, tangPntC);\n\t\t\t\t\t\t\t\ttangPntC.Normalize();\n\t\t\t\t\t\t\t\tgp_Vec normPntC = tangPntC.Crossed(zyDir).Normalized();\n\n\t\t\t\t\t\t\t\tgp_Vec tangPntD = new gp_Vec();\n\t\t\t\t\t\t\t\tgp_Pnt PntD = new gp_Pnt();\n\t\t\t\t\t\t\t\tairfoilGeomCurve.D1(cFlapParD, PntD, tangPntD);\n\t\t\t\t\t\t\t\ttangPntD.Normalize();\n\t\t\t\t\t\t\t\tgp_Vec normPntD = tangPntD.Crossed(zyDir).Normalized();\n\n\t\t\t\t\t\t\t\t// Get tangent vector in point E and F\n\n\t\t\t\t\t\t\t\tgp_Vec tangPntE = new gp_Vec();\n\t\t\t\t\t\t\t\tgp_Pnt PntE= new gp_Pnt();\n\t\t\t\t\t\t\t\tairfoilGeomCurve.D1(cFlapParE, PntE, tangPntE);\n\t\t\t\t\t\t\t\ttangPntE.Normalize();\n\t\t\t\t\t\t\t\ttangPntE = tangPntE.Reversed();\n\n\t\t\t\t\t\t\t\tgp_Vec tangPntF = new gp_Vec();\n\t\t\t\t\t\t\t\tgp_Pnt PntF = new gp_Pnt();\n\t\t\t\t\t\t\t\tairfoilGeomCurve.D1(cFlapParF, PntF, tangPntF);\n\t\t\t\t\t\t\t\ttangPntF.Normalize();\n\n\t\t\t\t\t\t\t\t// Get point G and H\n\n\t\t\t\t\t\t\t\tgp_Pnt G = new gp_Pnt(normPntC.Scaled(deltaCGap1 * chordLength).Added(new gp_Vec(C.Coord())).XYZ());\n\t\t\t\t\t\t\t\tgp_Pnt H = new gp_Pnt(normPntD.Scaled(deltaCGap1 * chordLength).Added(new gp_Vec(D.Coord())).XYZ());\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tSystem.out.println(\"Point G coordinates : \" + G.X() + \" \" + G.Y() + \" \" + G.Z());\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tSystem.out.println(\"Point H coordinates : \" + H.X() + \" \" + H.Y() + \" \" + H.Z());\n\n\t\t\t\t\t\t\t\t// Curves creation\n\n\t\t\t\t\t\t\t\tList<double[]> upperTEPoints = new ArrayList<>();\n\t\t\t\t\t\t\t\tupperTEPoints.add(new double[]{E.Coord(1),E.Coord(2),E.Coord(3)});\n\t\t\t\t\t\t\t\tupperTEPoints.add(new double[]{G.Coord(1),G.Coord(2),G.Coord(3)});\n\n\t\t\t\t\t\t\t\tCADEdge airfoilUpperTE = OCCUtils.theFactory.newCurve3D(upperTEPoints,\n\t\t\t\t\t\t\t\t\t\tfalse, \n\t\t\t\t\t\t\t\t\t\tnew double[] {tangPntE.X(), tangPntE.Y(), tangPntE.Z()}, \n\t\t\t\t\t\t\t\t\t\tnew double[] {normPntC.X(), normPntC.Y(), normPntC.Z()},\n\t\t\t\t\t\t\t\t\t\tfalse).edge();\n\n\t\t\t\t\t\t\t\tList<double[]> lowerTEPoints = new ArrayList<>();\n\t\t\t\t\t\t\t\tlowerTEPoints.add(new double[]{F.Coord(1),F.Coord(2),F.Coord(3)});\n\t\t\t\t\t\t\t\tlowerTEPoints.add(new double[]{H.Coord(1),H.Coord(2),H.Coord(3)});\n\n\t\t\t\t\t\t\t\tCADEdge airfoilLowerTE = OCCUtils.theFactory.newCurve3D(lowerTEPoints,\n\t\t\t\t\t\t\t\t\t\tfalse, \n\t\t\t\t\t\t\t\t\t\tnew double[] {tangPntF.X(), tangPntF.Y(), tangPntF.Z()}, \n\t\t\t\t\t\t\t\t\t\tnew double[] {normPntD.X(), normPntD.Y(), normPntD.Z()},\n\t\t\t\t\t\t\t\t\t\tfalse).edge();\n\n\t\t\t\t\t\t\t\t// Creation of point I\n\n\t\t\t\t\t\t\t\tgp_Dir lsAxis = liftingSurface.getType().equals(ComponentEnum.VERTICAL_TAIL) ? new gp_Dir(0, 0, 1) : new gp_Dir(0, 1, 0);\t\t\t\n\t\t\t\t\t\t\t\tGeom_Curve circle = BRep_Tool.Curve(\n\t\t\t\t\t\t\t\t\t\tnew BRepBuilderAPI_MakeEdge(\n\t\t\t\t\t\t\t\t\t\t\t\tnew gp_Circ(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew gp_Ax2(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew gp_Pnt(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tchordEdge.vertices()[0].pnt()[0],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tchordEdge.vertices()[0].pnt()[1],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tchordEdge.vertices()[0].pnt()[2]),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlsAxis),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t(ChordRatio + cGap ) * chordLength)).Edge(), \n\t\t\t\t\t\t\t\t\t\tnew double[1], \n\t\t\t\t\t\t\t\t\t\tnew double[1]\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\tdouble[] chorPar = getParamIntersectionPnts(chordGeomCurve, circle);\n\t\t\t\t\t\t\t\tgp_Vec chorDir = new gp_Vec();\n\t\t\t\t\t\t\t\tgp_Pnt I = new gp_Pnt();\n\t\t\t\t\t\t\t\tchordGeomCurve.D1(chorPar[0], I, chorDir);\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tSystem.out.println(\"Point I coordinates : \" + I.X() + \" \" + I.Y() + \" \" + I.Z());\n\t\t\t\t\t\t\t\tgp_Vec normPntI = chorDir.Crossed(zyDir).Normalized();\n\n\t\t\t\t\t\t\t\t// Center curves creation\n\n\t\t\t\t\t\t\t\tList<double[]> MiddleUpperTEPoints = new ArrayList<>();\n\t\t\t\t\t\t\t\tMiddleUpperTEPoints.add(new double[]{G.Coord(1),G.Coord(2),G.Coord(3)});\n\t\t\t\t\t\t\t\tMiddleUpperTEPoints.add(new double[]{I.Coord(1),I.Coord(2),I.Coord(3)});\n\n\t\t\t\t\t\t\t\tCADEdge airfoilMiddleUpperTE = OCCUtils.theFactory.newCurve3D(MiddleUpperTEPoints,\n\t\t\t\t\t\t\t\t\t\tfalse, \n\t\t\t\t\t\t\t\t\t\tnew double[] {normPntC.X(), normPntC.Y(), normPntC.Z()}, \n\t\t\t\t\t\t\t\t\t\tnew double[] {normPntI.X(), normPntI.Y(), normPntI.Z()},\n\t\t\t\t\t\t\t\t\t\tfalse).edge();\n\n\t\t\t\t\t\t\t\tList<double[]> MiddleLowerTEPoints = new ArrayList<>();\n\t\t\t\t\t\t\t\tMiddleLowerTEPoints.add(new double[]{H.Coord(1),H.Coord(2),H.Coord(3)});\n\t\t\t\t\t\t\t\tMiddleLowerTEPoints.add(new double[]{I.Coord(1),I.Coord(2),I.Coord(3)});\n\n\t\t\t\t\t\t\t\tCADEdge airfoilMiddleLowerTE = OCCUtils.theFactory.newCurve3D(MiddleLowerTEPoints,\n\t\t\t\t\t\t\t\t\t\tfalse, \n\t\t\t\t\t\t\t\t\t\tnew double[] {normPntD.X(), normPntD.Y(), normPntD.Z()}, \n\t\t\t\t\t\t\t\t\t\tnew double[] {-normPntI.X(), -normPntI.Y(), -normPntI.Z()},\n\t\t\t\t\t\t\t\t\t\tfalse).edge();\n\n\t\t\t\t\t\t\t\t// New flap leading edge creation\n\n\t\t\t\t\t\t\t\t// Creation point A and B\n\n\t\t\t\t\t\t\t\tdouble cFlapParA = getParamsIntersectionPntsOnAirfoil(\n\t\t\t\t\t\t\t\t\t\tairfoilGeomCurve, \n\t\t\t\t\t\t\t\t\t\tchordGeomCurve, \n\t\t\t\t\t\t\t\t\t\tchordLength, \n\t\t\t\t\t\t\t\t\t\tChordRatio * chordLength, \n\t\t\t\t\t\t\t\t\t\tchordEdge.vertices()[0].pnt(), \n\t\t\t\t\t\t\t\t\t\tliftingSurface.getType(), \n\t\t\t\t\t\t\t\t\t\tSideSelector.UPPER_SIDE\n\t\t\t\t\t\t\t\t\t\t)[0];\n\n\t\t\t\t\t\t\t\tgp_Pnt A = new gp_Pnt(airfoilGeomCurve.Value(cFlapParA).X(),\n\t\t\t\t\t\t\t\t\t\tairfoilGeomCurve.Value(cFlapParA).Y(),\n\t\t\t\t\t\t\t\t\t\tairfoilGeomCurve.Value(cFlapParA).Z());\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tSystem.out.println(\"Point A coordinates : \" + A.X() + \" \" + A.Y() + \" \" + A.Z());\n\n\t\t\t\t\t\t\t\tdouble cFlapParB = getParamsIntersectionPntsOnAirfoil(\n\t\t\t\t\t\t\t\t\t\tairfoilGeomCurve, \n\t\t\t\t\t\t\t\t\t\tchordGeomCurve, \n\t\t\t\t\t\t\t\t\t\tchordLength, \n\t\t\t\t\t\t\t\t\t\tChordRatio * chordLength, \n\t\t\t\t\t\t\t\t\t\tchordEdge.vertices()[0].pnt(), \n\t\t\t\t\t\t\t\t\t\tliftingSurface.getType(), \n\t\t\t\t\t\t\t\t\t\tSideSelector.LOWER_SIDE\n\t\t\t\t\t\t\t\t\t\t)[0];\n\n\t\t\t\t\t\t\t\tgp_Pnt B = new gp_Pnt(airfoilGeomCurve.Value(cFlapParB).X(),\n\t\t\t\t\t\t\t\t\t\tairfoilGeomCurve.Value(cFlapParB).Y(),\n\t\t\t\t\t\t\t\t\t\tairfoilGeomCurve.Value(cFlapParB).Z());\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tSystem.out.println(\"Point B coordinates : \" + B.X() + \" \" + B.Y() + \" \" + B.Z());\n\n\t\t\t\t\t\t\t\t// Creation of point L and M\n\t\t\t\t\t\t\t\tdouble cFlapParL = getParamsIntersectionPntsOnAirfoil(\n\t\t\t\t\t\t\t\t\t\tairfoilGeomCurve, \n\t\t\t\t\t\t\t\t\t\tchordGeomCurve, \n\t\t\t\t\t\t\t\t\t\tchordLength, \n\t\t\t\t\t\t\t\t\t\t(ChordRatio - deltaCGap2) * chordLength, \n\t\t\t\t\t\t\t\t\t\tchordEdge.vertices()[0].pnt(), \n\t\t\t\t\t\t\t\t\t\tliftingSurface.getType(), \n\t\t\t\t\t\t\t\t\t\tSideSelector.UPPER_SIDE\n\t\t\t\t\t\t\t\t\t\t)[0];\n\n\t\t\t\t\t\t\t\tgp_Pnt L = new gp_Pnt(airfoilGeomCurve.Value(cFlapParL).X(),\n\t\t\t\t\t\t\t\t\t\tairfoilGeomCurve.Value(cFlapParL).Y(),\n\t\t\t\t\t\t\t\t\t\tairfoilGeomCurve.Value(cFlapParL).Z());\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tSystem.out.println(\"Point L coordinates : \" + L.X() + \" \" + L.Y() + \" \" + L.Z());\n\n\t\t\t\t\t\t\t\tdouble cFlapParM = getParamsIntersectionPntsOnAirfoil(\n\t\t\t\t\t\t\t\t\t\tairfoilGeomCurve, \n\t\t\t\t\t\t\t\t\t\tchordGeomCurve, \n\t\t\t\t\t\t\t\t\t\tchordLength, \n\t\t\t\t\t\t\t\t\t\t(ChordRatio - deltaCGap2) * chordLength, \n\t\t\t\t\t\t\t\t\t\tchordEdge.vertices()[0].pnt(), \n\t\t\t\t\t\t\t\t\t\tliftingSurface.getType(), \n\t\t\t\t\t\t\t\t\t\tSideSelector.LOWER_SIDE\n\t\t\t\t\t\t\t\t\t\t)[0];\n\n\t\t\t\t\t\t\t\tgp_Pnt M = new gp_Pnt(airfoilGeomCurve.Value(cFlapParM).X(),\n\t\t\t\t\t\t\t\t\t\tairfoilGeomCurve.Value(cFlapParM).Y(),\n\t\t\t\t\t\t\t\t\t\tairfoilGeomCurve.Value(cFlapParM).Z());\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tSystem.out.println(\"Point M coordinates : \" + M.X() + \" \" + M.Y() + \" \" + M.Z());\n\n\t\t\t\t\t\t\t\t// Splitting airfoil in point L and M\n\t\t\t\t\t\t\t\tdouble[] pntL = new double[] {L.X(), L.Y(), L.Z()};\n\t\t\t\t\t\t\t\tdouble[] pntM = new double[] {M.X(), M.Y(), M.Z()};\n\t\t\t\t\t\t\t\tCADGeomCurve3D flapUpper_1 = OCCUtils.theFactory.newCurve3D(OCCUtils.splitCADCurve(airfoilEdge, pntL).get(0));\n\t\t\t\t\t\t\t\tCADGeomCurve3D flapUpper_2 = OCCUtils.theFactory.newCurve3D(OCCUtils.splitCADCurve(airfoilEdge, pntL).get(1));\n\t\t\t\t\t\t\t\tCADEdge edge_flapUpper_1 = flapUpper_1.edge();\n\t\t\t\t\t\t\t\tCADEdge edge_flapUpper_2 = flapUpper_2.edge();\n\t\t\t\t\t\t\t\tList<OCCEdge> flapUpper_edges = new ArrayList<>();\n\t\t\t\t\t\t\t\tflapUpper_edges.add((OCCEdge) edge_flapUpper_1);\n\t\t\t\t\t\t\t\tflapUpper_edges.add((OCCEdge) edge_flapUpper_2);\n\n\t\t\t\t\t\t\t\tTopoDS_Edge flapFirstCut = getShortestEdge(flapUpper_edges);\n\n\t\t\t\t\t\t\t\tCADGeomCurve3D flapLower_1 = OCCUtils.theFactory.newCurve3D(OCCUtils.splitCADCurve(airfoilEdge, pntM).get(0));\n\t\t\t\t\t\t\t\tCADGeomCurve3D flapLower_2 = OCCUtils.theFactory.newCurve3D(OCCUtils.splitCADCurve(airfoilEdge, pntM).get(1));\n\t\t\t\t\t\t\t\tCADEdge edge_flapLower_1 = flapLower_1.edge();\n\t\t\t\t\t\t\t\tCADEdge edge_flapLower_2 = flapLower_2.edge();\n\t\t\t\t\t\t\t\tList<OCCEdge> flapLower_edges = new ArrayList<>();\n\t\t\t\t\t\t\t\tflapLower_edges.add((OCCEdge) edge_flapLower_1);\n\t\t\t\t\t\t\t\tflapLower_edges.add((OCCEdge) edge_flapLower_2);\n\n\t\t\t\t\t\t\t\tTopoDS_Edge flapSecondCut = getShortestEdge(flapLower_edges);\n\n\t\t\t\t\t\t\t\t// Get tangent vector in point L and M\n\n\t\t\t\t\t\t\t\tgp_Vec tangPntL = new gp_Vec();\n\t\t\t\t\t\t\t\tgp_Pnt PntL = new gp_Pnt();\n\t\t\t\t\t\t\t\tairfoilGeomCurve.D1(cFlapParL, PntL, tangPntL);\n\t\t\t\t\t\t\t\ttangPntL.Normalize();\n\t\t\t\t\t\t\t\ttangPntL = tangPntL.Reversed();\n\n\t\t\t\t\t\t\t\tgp_Vec tangPntM = new gp_Vec();\n\t\t\t\t\t\t\t\tgp_Pnt PntM = new gp_Pnt();\n\t\t\t\t\t\t\t\tairfoilGeomCurve.D1(cFlapParM, PntM, tangPntM);\n\t\t\t\t\t\t\t\ttangPntM.Normalize();\n\n\t\t\t\t\t\t\t\t// Creation of point P\n\n\t\t\t\t\t\t\t\tGeom_Curve circleFlap = BRep_Tool.Curve(\n\t\t\t\t\t\t\t\t\t\tnew BRepBuilderAPI_MakeEdge(\n\t\t\t\t\t\t\t\t\t\t\t\tnew gp_Circ(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew gp_Ax2(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew gp_Pnt(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tchordEdge.vertices()[0].pnt()[0],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tchordEdge.vertices()[0].pnt()[1],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tchordEdge.vertices()[0].pnt()[2]),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlsAxis),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tChordRatio * chordLength)).Edge(), \n\t\t\t\t\t\t\t\t\t\tnew double[1], \n\t\t\t\t\t\t\t\t\t\tnew double[1]\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\tdouble[] chorParFlap = getParamIntersectionPnts(chordGeomCurve, circleFlap);\n\t\t\t\t\t\t\t\tgp_Vec chorDirFlap = new gp_Vec();\n\t\t\t\t\t\t\t\tgp_Pnt P = new gp_Pnt();\n\t\t\t\t\t\t\t\tchordGeomCurve.D1(chorParFlap[0], P, chorDirFlap);\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tSystem.out.println(\"Point P coordinates : \" + P.X() + \" \" + P.Y() + \" \" + P.Z());\n\t\t\t\t\t\t\t\tgp_Vec normPntP= chorDirFlap.Crossed(zyDir).Normalized();\n\n\t\t\t\t\t\t\t\t// Flap LE curves creation\n\n\t\t\t\t\t\t\t\tList<double[]> upperLEPoints = new ArrayList<>();\n\t\t\t\t\t\t\t\tupperLEPoints.add(new double[]{L.Coord(1),L.Coord(2),L.Coord(3)});\n\t\t\t\t\t\t\t\tupperLEPoints.add(new double[]{P.Coord(1),P.Coord(2),P.Coord(3)});\n\n\t\t\t\t\t\t\t\tCADEdge flapUpperLE = OCCUtils.theFactory.newCurve3D(upperLEPoints,\n\t\t\t\t\t\t\t\t\t\tfalse, \n\t\t\t\t\t\t\t\t\t\tnew double[] {-tangPntL.X(), -tangPntL.Y(), -tangPntL.Z()}, \n\t\t\t\t\t\t\t\t\t\tnew double[] {normPntP.X(), normPntP.Y(), normPntP.Z()},\n\t\t\t\t\t\t\t\t\t\tfalse).edge();\n\n\t\t\t\t\t\t\t\tList<double[]> lowerLEPoints = new ArrayList<>();\n\t\t\t\t\t\t\t\tlowerLEPoints.add(new double[]{M.Coord(1),M.Coord(2),M.Coord(3)});\n\t\t\t\t\t\t\t\tlowerLEPoints.add(new double[]{P.Coord(1),P.Coord(2),P.Coord(3)});\n\n\t\t\t\t\t\t\t\tCADEdge flapLowerLE = OCCUtils.theFactory.newCurve3D(lowerLEPoints,\n\t\t\t\t\t\t\t\t\t\tfalse, \n\t\t\t\t\t\t\t\t\t\tnew double[] {-tangPntM.X(), -tangPntM.Y(), -tangPntM.Z()}, \n\t\t\t\t\t\t\t\t\t\tnew double[] {-normPntP.X(), -normPntP.Y(), -normPntP.Z()},\n\t\t\t\t\t\t\t\t\t\tfalse).edge();\t\t\t\n\n\t\t\t\t\t\t\t\tTopoDS_Edge flapTE = new TopoDS_Edge();\n\t\t\t\t\t\t\t\tgp_Pnt startPnt1 = BRep_Tool.Pnt(TopExp.FirstVertex(flapFirstCut));\n\t\t\t\t\t\t\t\tgp_Pnt endPnt1 = BRep_Tool.Pnt(TopExp.LastVertex(flapSecondCut));\n\t\t\t\t\t\t\t\tBRepBuilderAPI_MakeEdge buildFlapTE = new BRepBuilderAPI_MakeEdge(startPnt1,endPnt1);\n\t\t\t\t\t\t\t\tflapTE = buildFlapTE.Edge();\n\n\t\t\t\t\t\t\t\tgp_Trsf flapTrasl = new gp_Trsf();\n\n\t\t\t\t\t\t\t\tif(liftingSurface.getType().equals(ComponentEnum.VERTICAL_TAIL)) {\n\n\t\t\t\t\t\t\t\t\tif( i == 0 ) {\n\t\t\t\t\t\t\t\t\t\tflapTrasl.SetTranslation(new gp_Pnt(0, 0, yInnerPct * liftingSurface.getSemiSpan().doubleValue(SI.METER)), \n\t\t\t\t\t\t\t\t\t\t\t\tnew gp_Pnt(0, 0, yInnerPct * liftingSurface.getSemiSpan().doubleValue(SI.METER) + lateralGap));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\t{\n\t\t\t\t\t\t\t\t\t\tif( doMakeHorn == true) {\n\t\t\t\t\t\t\t\t\t\t\tflapTrasl.SetTranslation(new gp_Pnt(0, 0, yOuterPct * liftingSurface.getSemiSpan().doubleValue(SI.METER)), \n\t\t\t\t\t\t\t\t\t\t\t\t\tnew gp_Pnt(0, 0, yOuterPct * liftingSurface.getSemiSpan().doubleValue(SI.METER)));\n\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\tflapTrasl.SetTranslation(new gp_Pnt(0, 0, yOuterPct * liftingSurface.getSemiSpan().doubleValue(SI.METER)), \n\t\t\t\t\t\t\t\t\t\t\t\t\tnew gp_Pnt(0, 0, yOuterPct * liftingSurface.getSemiSpan().doubleValue(SI.METER) - lateralGap));\n\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tif ( i == 0 ) {\n\n\t\t\t\t\t\t\t\t\t\tflapTrasl.SetTranslation(new gp_Pnt(0, yInnerPct * liftingSurface.getSemiSpan().doubleValue(SI.METER), 0), \n\t\t\t\t\t\t\t\t\t\t\t\tnew gp_Pnt(0, yInnerPct * liftingSurface.getSemiSpan().doubleValue(SI.METER) + lateralGap, 0));\n\n\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tif( doMakeHorn == true) {\n\t\t\t\t\t\t\t\t\t\t\tflapTrasl.SetTranslation(new gp_Pnt(0, yOuterPct * liftingSurface.getSemiSpan().doubleValue(SI.METER),0), \n\t\t\t\t\t\t\t\t\t\t\t\t\tnew gp_Pnt(0, yOuterPct * liftingSurface.getSemiSpan().doubleValue(SI.METER),0));\n\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\tflapTrasl.SetTranslation(new gp_Pnt(0, yOuterPct * liftingSurface.getSemiSpan().doubleValue(SI.METER), 0), \n\t\t\t\t\t\t\t\t\t\t\t\t\tnew gp_Pnt(0, yOuterPct * liftingSurface.getSemiSpan().doubleValue(SI.METER) - lateralGap,0));\n\t\t\t\t\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tgp_Trsf wingTraslHorn = new gp_Trsf();\n\n\t\t\t\t\t\t\t\tif (doMakeHorn) {\n\n\t\t\t\t\t\t\t\t\tif(liftingSurface.getType().equals(ComponentEnum.VERTICAL_TAIL)) {\n\n\t\t\t\t\t\t\t\t\t\twingTraslHorn.SetTranslation(new gp_Pnt(0, 0, yOuterPct * liftingSurface.getSemiSpan().doubleValue(SI.METER)), \n\t\t\t\t\t\t\t\t\t\t\t\tnew gp_Pnt(0, 0, yOuterPct * liftingSurface.getSemiSpan().doubleValue(SI.METER) - lateralGap));\t\t\t\n\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\twingTraslHorn.SetTranslation(new gp_Pnt(0, yOuterPct * liftingSurface.getSemiSpan().doubleValue(SI.METER), 0), \n\t\t\t\t\t\t\t\t\t\t\t\tnew gp_Pnt(0, yOuterPct * liftingSurface.getSemiSpan().doubleValue(SI.METER) - lateralGap, 0));\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tTopoDS_Edge flapUpperLE_Edge = TopoDS.ToEdge(((OCCShape) flapUpperLE).getShape());\n\t\t\t\t\t\t\t\tTopoDS_Edge flapLowerLE_Edge = TopoDS.ToEdge(((OCCShape) flapLowerLE).getShape());\t\t\t\n\t\t\t\t\t\t\t\tTopoDS_Edge airfoilUpperTE_Edge = TopoDS.ToEdge(((OCCShape) airfoilUpperTE).getShape());\n\t\t\t\t\t\t\t\tTopoDS_Edge airfoilLowerTE_Edge = TopoDS.ToEdge(((OCCShape) airfoilLowerTE).getShape());\n\t\t\t\t\t\t\t\tTopoDS_Edge airfoilMiddleUpperTE_Edge = TopoDS.ToEdge(((OCCShape) airfoilMiddleUpperTE).getShape());\n\t\t\t\t\t\t\t\tTopoDS_Edge airfoilMiddleLowerTE_Edge = TopoDS.ToEdge(((OCCShape) airfoilMiddleLowerTE).getShape());\n\n\t\t\t\t\t\t\t\tif(i == 0 || i == secVec.length-1) {\n\n\t\t\t\t\t\t\t\t\tTopoDS_Edge finalFlap1 = TopoDS.ToEdge(new BRepBuilderAPI_Transform(flapFirstCut, flapTrasl).Shape());\n\t\t\t\t\t\t\t\t\tTopoDS_Edge finalFlap2 = TopoDS.ToEdge(new BRepBuilderAPI_Transform(flapSecondCut, flapTrasl).Shape());\n\t\t\t\t\t\t\t\t\tTopoDS_Edge finalFlapUpperLE = TopoDS.ToEdge(new BRepBuilderAPI_Transform(flapUpperLE_Edge, flapTrasl).Shape());\n\t\t\t\t\t\t\t\t\tTopoDS_Edge finalFlapLowerLE = TopoDS.ToEdge(new BRepBuilderAPI_Transform(flapLowerLE_Edge, flapTrasl).Shape());\n\t\t\t\t\t\t\t\t\tTopoDS_Edge finalFlapTE = TopoDS.ToEdge(new BRepBuilderAPI_Transform(flapTE, flapTrasl).Shape());\n\n\t\t\t\t\t\t\t\t\tflap.add(OCCUtils.theFactory.newWireFromAdjacentEdges((CADEdge) OCCUtils.theFactory.newShape(finalFlap1),\n\t\t\t\t\t\t\t\t\t\t\t(CADEdge) OCCUtils.theFactory.newShape(finalFlapUpperLE), \n\t\t\t\t\t\t\t\t\t\t\t(CADEdge) OCCUtils.theFactory.newShape(finalFlapLowerLE),\n\t\t\t\t\t\t\t\t\t\t\t(CADEdge) OCCUtils.theFactory.newShape(finalFlap2), \n\t\t\t\t\t\t\t\t\t\t\t(CADEdge) OCCUtils.theFactory.newShape(finalFlapTE)));\n\n\t\t\t\t\t\t\t\t\tif (doMakeHorn && i == secVec.length-1 ) {\n\n\t\t\t\t\t\t\t\t\t\tTopoDS_Edge finalAirfoilCutTrasl = TopoDS.ToEdge(new BRepBuilderAPI_Transform(finalAirfoilCut, wingTraslHorn).Shape());\n\t\t\t\t\t\t\t\t\t\tTopoDS_Edge airfoilUpperTE_EdgeTrasl = TopoDS.ToEdge(new BRepBuilderAPI_Transform(airfoilUpperTE_Edge, wingTraslHorn).Shape());\n\t\t\t\t\t\t\t\t\t\tTopoDS_Edge airfoilLowerTE_EdgeTrasl = TopoDS.ToEdge(new BRepBuilderAPI_Transform(airfoilLowerTE_Edge, wingTraslHorn).Shape());\n\t\t\t\t\t\t\t\t\t\tTopoDS_Edge airfoilMiddleUpperTE_EdgeTrasl = TopoDS.ToEdge(new BRepBuilderAPI_Transform(airfoilMiddleUpperTE_Edge, wingTraslHorn).Shape());\n\t\t\t\t\t\t\t\t\t\tTopoDS_Edge airfoilMiddleLowerTE_EdgeTrasl = TopoDS.ToEdge(new BRepBuilderAPI_Transform(airfoilMiddleLowerTE_Edge, wingTraslHorn).Shape());\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tairfoilsCut.add(OCCUtils.theFactory.newWireFromAdjacentEdges((CADEdge) OCCUtils.theFactory.newShape(finalAirfoilCutTrasl),\n\t\t\t\t\t\t\t\t\t\t\t\t(CADEdge) OCCUtils.theFactory.newShape(airfoilUpperTE_EdgeTrasl), \n\t\t\t\t\t\t\t\t\t\t\t\t(CADEdge) OCCUtils.theFactory.newShape(airfoilLowerTE_EdgeTrasl), \n\t\t\t\t\t\t\t\t\t\t\t\t(CADEdge) OCCUtils.theFactory.newShape(airfoilMiddleUpperTE_EdgeTrasl), \n\t\t\t\t\t\t\t\t\t\t\t\t(CADEdge) OCCUtils.theFactory.newShape(airfoilMiddleLowerTE_EdgeTrasl)));\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\t\t\t\tairfoilsCut.add(OCCUtils.theFactory.newWireFromAdjacentEdges((CADEdge) OCCUtils.theFactory.newShape(finalAirfoilCut),\n\t\t\t\t\t\t\t\t\t\t\t\t(CADEdge) OCCUtils.theFactory.newShape(airfoilUpperTE_Edge), \n\t\t\t\t\t\t\t\t\t\t\t\t(CADEdge) OCCUtils.theFactory.newShape(airfoilLowerTE_Edge), \n\t\t\t\t\t\t\t\t\t\t\t\t(CADEdge) OCCUtils.theFactory.newShape(airfoilMiddleUpperTE_Edge), \n\t\t\t\t\t\t\t\t\t\t\t\t(CADEdge) OCCUtils.theFactory.newShape(airfoilMiddleLowerTE_Edge)));\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\t\t\tairfoilsCut.add(OCCUtils.theFactory.newWireFromAdjacentEdges((CADEdge) OCCUtils.theFactory.newShape(finalAirfoilCut),\n\t\t\t\t\t\t\t\t\t\t\t(CADEdge) OCCUtils.theFactory.newShape(airfoilUpperTE_Edge),\n\t\t\t\t\t\t\t\t\t\t\t(CADEdge) OCCUtils.theFactory.newShape(airfoilLowerTE_Edge), \n\t\t\t\t\t\t\t\t\t\t\t(CADEdge) OCCUtils.theFactory.newShape(airfoilMiddleUpperTE_Edge), \n\t\t\t\t\t\t\t\t\t\t\t(CADEdge) OCCUtils.theFactory.newShape(airfoilMiddleLowerTE_Edge)));\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t}\n\t\t\tairfoilsCutAndFlap.add(airfoilsCut);\n\t\t\tairfoilsCutAndFlap.add(flap);\n\t\t\tbreak;\n\n\t\tcase NON_SYMMETRIC:\n\t\t\tfor(int i = 0; i < secVec.length; i++) {\n\n\t\t\t\tdouble y_station = secVec[i];\n\t\t\t\tdouble ChordRatio = chordVec[i];\n\n\t\t\t\t//\t\t\t\tdouble cLeap = 0.176; // c_leap chord ratio\n\t\t\t\t//\t\t\t\tdouble k1 = 0.48; // gap factor\n\t\t\t\t//\t\t\t\tdouble k2 = 0.1; //0.3; // airfoil trailing edge factor\n\t\t\t\t//\t\t\t\tdouble k3 = 0.115; // 2.3; // flap leading edge factor\n\t\t\t\t//\t\t\t\tdouble k4 = 0.02; // airfoil \n\t\t\t\t//\t\t\t\tdouble k5 = 0.38;//0.3;\n\t\t\t\tdouble cLeap = 0.12; // c_leap chord ratio\n\t\t\t\tdouble k1 = 0.15; // gap factor\n\t\t\t\tdouble k2 = 0.4; //0.3; // airfoil trailing edge factor\n\t\t\t\tdouble k3 = 0.05; // 2.3; // flap leading edge factor\n\t\t\t\tdouble k4 = 0.01; // airfoil \n\t\t\t\tdouble k5 = 0.5;//0.3;\n\t\t\t\t// Upper gap and delta for point P7\n\t\t\t\tdouble cGap = k1 * cLeap; // flap gap on upper side \n\t\t\t\tdouble deltaCGap2 = k4 * cGap; // airfoil TE for point P7\n\t\t\t\t// Lower gap for point P4\n\t\t\t\tdouble deltaCGap3 = k3 * ChordRatio; // k3 * c_gap; // flap lower gap definition, point P4\n\t\t\t\t// P6-P5 factor\n\t\t\t\tdouble deltaCGap1 = k2 * deltaCGap3;//k2 * c_gap; // flap gap on lower side for point P3 and P6\n\t\t\t\t// P8 factor\n\t\t\t\tdouble deltaCGap4 = k5 * deltaCGap3; // flap leading edge point P8\n\n\t\t\t\tint panel = 0;\n\t\t\t\tfor(int n = 0; n < liftingSurface.getYBreakPoints().size()-1; n++) {\n\n\t\t\t\t\tif(y_station >= liftingSurface.getYBreakPoints().get(n).doubleValue(SI.METER) && \n\t\t\t\t\t\t\ty_station <= liftingSurface.getYBreakPoints().get(n+1).doubleValue(SI.METER)) {\n\t\t\t\t\t\tpanel = n;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tint[] intArray = new int[] {panel};\n\t\t\t\tSystem.out.println(\"panel \" + panel);\n\n\n\t\t\t\tAirfoil airfoilCoords = liftingSurface.getAirfoilList().get(intArray[0]);\n\t\t\t\tList<double[]> ptsAirfoil = AircraftUtils.populateCoordinateList(\n\t\t\t\t\t\ty_station, \n\t\t\t\t\t\tairfoilCoords, \n\t\t\t\t\t\tliftingSurface\n\t\t\t\t\t\t);\n\n\t\t\t\tCADGeomCurve3D cadCurveAirfoil = OCCUtils.theFactory.newCurve3D(ptsAirfoil, false);\n\t\t\t\tCADEdge edgeAirfoil = cadCurveAirfoil.edge();\n\t\t\t\tCADGeomCurve3D chord = getChordSegmentAtYActual(y_station, liftingSurface);\n\t\t\t\tdouble chordLength = chord.length();\n\t\t\t\tOCCEdge chordEdge = (OCCEdge) chord.edge();\n\t\t\t\tOCCEdge airfoilEdge = (OCCEdge) edgeAirfoil;\n\n\t\t\t\tGeom_Curve chordGeomCurve = BRep_Tool.Curve(chordEdge.getShape(), new double[1], new double[1]);\n\t\t\t\tGeom_Curve airfoilGeomCurve = BRep_Tool.Curve(airfoilEdge.getShape(), new double[1], new double[1]);\n\n\t\t\t\t// Creation of point P1 and P2\n\t\t\t\t// P1\n\t\t\t\tdouble cLeapPar = getParamsIntersectionPntsOnAirfoil(\n\t\t\t\t\t\tairfoilGeomCurve, \n\t\t\t\t\t\tchordGeomCurve, \n\t\t\t\t\t\tchordLength, \n\t\t\t\t\t\tcLeap * chordLength, \n\t\t\t\t\t\tchordEdge.vertices()[0].pnt(), \n\t\t\t\t\t\tliftingSurface.getType(), \n\t\t\t\t\t\tSideSelector.UPPER_SIDE\n\t\t\t\t\t\t)[0];\n\n\t\t\t\tgp_Pnt P1 = new gp_Pnt(airfoilGeomCurve.Value(cLeapPar).X(),\n\t\t\t\t\t\tairfoilGeomCurve.Value(cLeapPar).Y(),\n\t\t\t\t\t\tairfoilGeomCurve.Value(cLeapPar).Z());\n\t\t\t\t//\t\t\t\tSystem.out.println(\"Point P1 coordinates : \" + P1.X() + \" \" + P1.Y() + \" \" + P1.Z());\n\n\t\t\t\t// P2\n\t\t\t\tdouble cFlapParP2 = getParamsIntersectionPntsOnAirfoil(\n\t\t\t\t\t\tairfoilGeomCurve, \n\t\t\t\t\t\tchordGeomCurve, \n\t\t\t\t\t\tchordLength, \n\t\t\t\t\t\t(cLeap + cGap) * chordLength, \n\t\t\t\t\t\tchordEdge.vertices()[0].pnt(), \n\t\t\t\t\t\tliftingSurface.getType(), \n\t\t\t\t\t\tSideSelector.UPPER_SIDE\n\t\t\t\t\t\t)[0];\n\n\t\t\t\tgp_Pnt P2 = new gp_Pnt(airfoilGeomCurve.Value(cFlapParP2).X(),\n\t\t\t\t\t\tairfoilGeomCurve.Value(cFlapParP2).Y(),\n\t\t\t\t\t\tairfoilGeomCurve.Value(cFlapParP2).Z());\n\t\t\t\t//\t\t\t\tSystem.out.println(\"Point P2 coordinates : \" + P2.X() + \" \" + P2.Y() + \" \" + P2.Z());\n\n\t\t\t\t// Creation of arc of circle of radius cf\n\n\t\t\t\tdouble cFlapPar = getParamsIntersectionPntsOnAirfoil(\n\t\t\t\t\t\tairfoilGeomCurve, \n\t\t\t\t\t\tchordGeomCurve, \n\t\t\t\t\t\tchordLength, \n\t\t\t\t\t\tChordRatio * chordLength, \n\t\t\t\t\t\tchordEdge.vertices()[0].pnt(), \n\t\t\t\t\t\tliftingSurface.getType(), \n\t\t\t\t\t\tSideSelector.UPPER_SIDE\n\t\t\t\t\t\t)[0];\n\n\t\t\t\tgp_Pnt A = new gp_Pnt(airfoilGeomCurve.Value(cFlapPar).X(),\n\t\t\t\t\t\tairfoilGeomCurve.Value(cFlapPar).Y(),\n\t\t\t\t\t\tairfoilGeomCurve.Value(cFlapPar).Z());\n\n\t\t\t\tdouble cFlapPar2 = getParamsIntersectionPntsOnAirfoil(\n\t\t\t\t\t\tairfoilGeomCurve, \n\t\t\t\t\t\tchordGeomCurve, \n\t\t\t\t\t\tchordLength, \n\t\t\t\t\t\tChordRatio * chordLength, \n\t\t\t\t\t\tchordEdge.vertices()[0].pnt(), \n\t\t\t\t\t\tliftingSurface.getType(), \n\t\t\t\t\t\tSideSelector.LOWER_SIDE\n\t\t\t\t\t\t)[0];\n\n\t\t\t\tgp_Pnt B = new gp_Pnt(airfoilGeomCurve.Value(cFlapPar2).X(),\n\t\t\t\t\t\tairfoilGeomCurve.Value(cFlapPar2).Y(),\n\t\t\t\t\t\tairfoilGeomCurve.Value(cFlapPar2).Z());\n\t\t\t\tgp_Pnt P3 = B;\n\t\t\t\t//\t\t\t\tSystem.out.println(\"Point P3 coordinates : \" + P3.X() + \" \" + P3.Y() + \" \" + P3.Z());\n\n\n\t\t\t\t// Tangent point P2 and normal point P3\n\t\t\t\tgp_Vec zyDir = liftingSurface.getType().equals(ComponentEnum.VERTICAL_TAIL) ? // auxiliary vectors, useful for wire construction\n\t\t\t\t\t\tnew gp_Vec(0.0, 0.0, 1.0) : new gp_Vec(0.0, 1.0, 0.0);\n\t\t\t\t\t\tgp_Vec yzDir = liftingSurface.getType().equals(ComponentEnum.VERTICAL_TAIL) ? \n\t\t\t\t\t\t\t\tnew gp_Vec(0.0, -1.0, 0.0) : new gp_Vec(0.0, 0.0, 1.0);\n\n\t\t\t\t\t\t\t\tgp_Vec tangPntP2 = new gp_Vec();\n\t\t\t\t\t\t\t\tgp_Pnt PntP2= new gp_Pnt();\n\t\t\t\t\t\t\t\tairfoilGeomCurve.D1(cFlapParP2, PntP2, tangPntP2);\n\t\t\t\t\t\t\t\ttangPntP2.Normalize();\n\t\t\t\t\t\t\t\ttangPntP2 = tangPntP2.Reversed();\n\t\t\t\t\t\t\t\tgp_Vec normPntP2 = tangPntP2.Crossed(zyDir).Normalized();\n\n\t\t\t\t\t\t\t\tgp_Vec tangPntP3 = new gp_Vec();\n\t\t\t\t\t\t\t\tgp_Pnt pntP3 = new gp_Pnt();\n\t\t\t\t\t\t\t\tairfoilGeomCurve.D1(cFlapPar2, pntP3, tangPntP3);\n\t\t\t\t\t\t\t\ttangPntP3.Normalize();\n\t\t\t\t\t\t\t\tgp_Vec normPntP3 = tangPntP3.Crossed(zyDir).Normalized();\n\n\t\t\t\t\t\t\t\t// Curve TE airfoil\n\n\t\t\t\t\t\t\t\tList<double[]> TEPoints = new ArrayList<>();\n\t\t\t\t\t\t\t\tTEPoints.add(new double[]{P2.Coord(1),P2.Coord(2),P2.Coord(3)});\n\t\t\t\t\t\t\t\tTEPoints.add(new double[]{P3.Coord(1),P3.Coord(2),P3.Coord(3)});\n\n\t\t\t\t\t\t\t\tCADEdge airfoilTE = OCCUtils.theFactory.newCurve3D(TEPoints,\n\t\t\t\t\t\t\t\t\t\tfalse, \n\t\t\t\t\t\t\t\t\t\tnew double[] {-tangPntP2.X(), -tangPntP2.Y(), -tangPntP2.Z()}, \n\t\t\t\t\t\t\t\t\t\tnew double[] {-normPntP3.X(), -normPntP3.Y(), -normPntP3.Z()},\n\t\t\t\t\t\t\t\t\t\tfalse).edge();\n\n\t\t\t\t\t\t\t\t// Creation of point P5 and P6\n\n\t\t\t\t\t\t\t\tdouble cFlapParP5 = getParamsIntersectionPntsOnAirfoil(\n\t\t\t\t\t\t\t\t\t\tairfoilGeomCurve, \n\t\t\t\t\t\t\t\t\t\tchordGeomCurve, \n\t\t\t\t\t\t\t\t\t\tchordLength, \n\t\t\t\t\t\t\t\t\t\t(ChordRatio + deltaCGap1) * chordLength, \n\t\t\t\t\t\t\t\t\t\tchordEdge.vertices()[0].pnt(), \n\t\t\t\t\t\t\t\t\t\tliftingSurface.getType(), \n\t\t\t\t\t\t\t\t\t\tSideSelector.LOWER_SIDE\n\t\t\t\t\t\t\t\t\t\t)[0];\n\n\t\t\t\t\t\t\t\tgp_Pnt P5 = new gp_Pnt(airfoilGeomCurve.Value(cFlapParP5).X(),\n\t\t\t\t\t\t\t\t\t\tairfoilGeomCurve.Value(cFlapParP5).Y(),\n\t\t\t\t\t\t\t\t\t\tairfoilGeomCurve.Value(cFlapParP5).Z());\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tSystem.out.println(\"Point P5 coordinates : \" + P5.X() + \" \" + P5.Y() + \" \" + P5.Z());\n\n\n\t\t\t\t\t\t\t\tgp_Vec tangPntP5 = new gp_Vec();\n\t\t\t\t\t\t\t\tgp_Pnt PntP5 = new gp_Pnt();\n\t\t\t\t\t\t\t\tairfoilGeomCurve.D1(cFlapParP5, PntP5, tangPntP5);\n\t\t\t\t\t\t\t\ttangPntP5.Normalize();\n\n\t\t\t\t\t\t\t\tgp_Pnt P6 = new gp_Pnt(normPntP3.Scaled(deltaCGap1 * chordLength).Added(new gp_Vec(P3.Coord())).XYZ());\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tSystem.out.println(\"Point P6 coordinates : \" + P6.X() + \" \" + P6.Y() + \" \" + P6.Z());\n\n\t\t\t\t\t\t\t\t// Creation of lower LE (P5-P6)\n\n\t\t\t\t\t\t\t\tList<double[]> lowerTEPoints = new ArrayList<>();\n\t\t\t\t\t\t\t\tlowerTEPoints.add(new double[]{P5.Coord(1),P5.Coord(2),P5.Coord(3)});\n\t\t\t\t\t\t\t\tlowerTEPoints.add(new double[]{P6.Coord(1),P6.Coord(2),P6.Coord(3)});\n\n\t\t\t\t\t\t\t\tCADEdge lowerAirfoilTE = OCCUtils.theFactory.newCurve3D(lowerTEPoints,\n\t\t\t\t\t\t\t\t\t\tfalse, \n\t\t\t\t\t\t\t\t\t\tnew double[] {tangPntP5.X(), tangPntP5.Y(), tangPntP5.Z()}, \n\t\t\t\t\t\t\t\t\t\tnew double[] {normPntP3.X(), normPntP3.Y(), normPntP3.Z()},\n\t\t\t\t\t\t\t\t\t\tfalse).edge();\n\n\t\t\t\t\t\t\t\t// Creation of point P7\n\n\t\t\t\t\t\t\t\tgp_Pnt P7 = new gp_Pnt(normPntP2.Scaled(- deltaCGap2 * chordLength).Added(new gp_Vec(P2.Coord())).XYZ());\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tSystem.out.println(\"Point P7 coordinates : \" + P7.X() + \" \" + P7.Y() + \" \" + P7.Z());\n\n\n\t\t\t\t\t\t\t\t// Creation of upper LE (P2-P7)\n\n\t\t\t\t\t\t\t\tList<double[]> upperTEPoints = new ArrayList<>();\n\t\t\t\t\t\t\t\tupperTEPoints.add(new double[]{P2.Coord(1),P2.Coord(2),P2.Coord(3)});\n\t\t\t\t\t\t\t\tupperTEPoints.add(new double[]{P7.Coord(1),P7.Coord(2),P7.Coord(3)});\n\n\t\t\t\t\t\t\t\tCADEdge upperAirfoilTE = OCCUtils.theFactory.newCurve3D(upperTEPoints,\n\t\t\t\t\t\t\t\t\t\tfalse, \n\t\t\t\t\t\t\t\t\t\tnew double[] {-normPntP2.X(), -normPntP2.Y(), -normPntP2.Z()}, \n\t\t\t\t\t\t\t\t\t\tnew double[] {-tangPntP2.X(), -tangPntP2.Y(), -tangPntP2.Z()},\n\t\t\t\t\t\t\t\t\t\tfalse).edge();\n\n\t\t\t\t\t\t\t\t// Creation of middle LE (P6-P7)\n\n\t\t\t\t\t\t\t\tList<double[]> middleTEPoints = new ArrayList<>();\n\t\t\t\t\t\t\t\tmiddleTEPoints.add(new double[]{P6.Coord(1),P6.Coord(2),P6.Coord(3)});\n\t\t\t\t\t\t\t\tmiddleTEPoints.add(new double[]{P7.Coord(1),P7.Coord(2),P7.Coord(3)});\n\n\t\t\t\t\t\t\t\tCADEdge middleAirfoilTE = OCCUtils.theFactory.newCurve3D(middleTEPoints,\n\t\t\t\t\t\t\t\t\t\tfalse, \n\t\t\t\t\t\t\t\t\t\tnew double[] {normPntP3.X(), normPntP3.Y(), normPntP3.Z()}, \n\t\t\t\t\t\t\t\t\t\tnew double[] {tangPntP2.X(), tangPntP2.Y(), tangPntP2.Z()},\n\t\t\t\t\t\t\t\t\t\tfalse).edge();\n\n\t\t\t\t\t\t\t\t// Splitting airfoil in point P2 and P5\n\n\t\t\t\t\t\t\t\tdouble[] pntP2 = new double[] {P2.X(), P2.Y(), P2.Z()};\n\t\t\t\t\t\t\t\tdouble[] pntP5 = new double[] {P5.X(), P5.Y(), P5.Z()};\n\t\t\t\t\t\t\t\tCADGeomCurve3D airfoil1 = OCCUtils.theFactory.newCurve3D(OCCUtils.splitCADCurve(airfoilEdge, pntP2).get(0));\n\t\t\t\t\t\t\t\tCADGeomCurve3D airfoil2 = OCCUtils.theFactory.newCurve3D(OCCUtils.splitCADCurve(airfoilEdge, pntP2).get(1));\n\t\t\t\t\t\t\t\tCADEdge edgeAirfoil1 = airfoil1.edge();\n\t\t\t\t\t\t\t\tCADEdge edgeAirfoil2 = airfoil2.edge();\n\t\t\t\t\t\t\t\tList<OCCEdge> airfoil_edges = new ArrayList<>();\n\t\t\t\t\t\t\t\tairfoil_edges.add((OCCEdge) edgeAirfoil1);\n\t\t\t\t\t\t\t\tairfoil_edges.add((OCCEdge) edgeAirfoil2);\n\n\t\t\t\t\t\t\t\tTopoDS_Edge airfoilFirstCut = getLongestEdge(airfoil_edges);\n\n\t\t\t\t\t\t\t\tList<OCCEdge> splitAirfoil = OCCUtils.splitEdge(\n\t\t\t\t\t\t\t\t\t\tOCCUtils.theFactory.newCurve3D((CADEdge) OCCUtils.theFactory.newShape(airfoilFirstCut)),\n\t\t\t\t\t\t\t\t\t\tpntP5\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tTopoDS_Edge finalAirfoilCut = getLongestEdge(splitAirfoil);\n\n\t\t\t\t\t\t\t\t// Creation of Flap leading edge\n\t\t\t\t\t\t\t\t// Creation of point P4 and tangent vector\n\n\t\t\t\t\t\t\t\tdouble cFlapParP4 = getParamsIntersectionPntsOnAirfoil(\n\t\t\t\t\t\t\t\t\t\tairfoilGeomCurve, \n\t\t\t\t\t\t\t\t\t\tchordGeomCurve, \n\t\t\t\t\t\t\t\t\t\tchordLength, \n\t\t\t\t\t\t\t\t\t\t(ChordRatio - deltaCGap3) * chordLength, \n\t\t\t\t\t\t\t\t\t\tchordEdge.vertices()[0].pnt(), \n\t\t\t\t\t\t\t\t\t\tliftingSurface.getType(), \n\t\t\t\t\t\t\t\t\t\tSideSelector.LOWER_SIDE\n\t\t\t\t\t\t\t\t\t\t)[0];\n\n\t\t\t\t\t\t\t\tgp_Pnt P4 = new gp_Pnt(airfoilGeomCurve.Value(cFlapParP4).X(),\n\t\t\t\t\t\t\t\t\t\tairfoilGeomCurve.Value(cFlapParP4).Y(),\n\t\t\t\t\t\t\t\t\t\tairfoilGeomCurve.Value(cFlapParP4).Z());\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tSystem.out.println(\"Point P4 coordinates : \" + P4.X() + \" \" + P4.Y() + \" \" + P4.Z());\n\n\t\t\t\t\t\t\t\tgp_Vec tangPntP4 = new gp_Vec();\n\t\t\t\t\t\t\t\tgp_Pnt PntP4 = new gp_Pnt();\n\t\t\t\t\t\t\t\tairfoilGeomCurve.D1(cFlapParP4, PntP4, tangPntP4);\n\t\t\t\t\t\t\t\ttangPntP4.Normalize();\n\n\t\t\t\t\t\t\t\t// Creation of point P8 and normal vector\n\n\t\t\t\t\t\t\t\tdouble cFlapParP8 = getParamsIntersectionPntsOnAirfoil(\n\t\t\t\t\t\t\t\t\t\tairfoilGeomCurve, \n\t\t\t\t\t\t\t\t\t\tchordGeomCurve, \n\t\t\t\t\t\t\t\t\t\tchordLength, \n\t\t\t\t\t\t\t\t\t\t(ChordRatio - deltaCGap3 + deltaCGap4) * chordLength, \n\t\t\t\t\t\t\t\t\t\tchordEdge.vertices()[0].pnt(), \n\t\t\t\t\t\t\t\t\t\tliftingSurface.getType(), \n\t\t\t\t\t\t\t\t\t\tSideSelector.LOWER_SIDE\n\t\t\t\t\t\t\t\t\t\t)[0];\n\n\t\t\t\t\t\t\t\tgp_Pnt P8 = new gp_Pnt(airfoilGeomCurve.Value(cFlapParP8).X(), \n\t\t\t\t\t\t\t\t\t\tairfoilGeomCurve.Value(cFlapParP8).Y(),\n\t\t\t\t\t\t\t\t\t\tairfoilGeomCurve.Value(cFlapParP8).Z());\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tSystem.out.println(\"Point P8 coordinates : \" + P8.X() + \" \" + P8.Y() + \" \" + P8.Z());\n\n\n\t\t\t\t\t\t\t\tgp_Vec tangPntP8 = new gp_Vec();\n\t\t\t\t\t\t\t\tgp_Pnt PntP8 = new gp_Pnt();\n\t\t\t\t\t\t\t\tairfoilGeomCurve.D1(cFlapParP8, PntP8, tangPntP8);\n\t\t\t\t\t\t\t\ttangPntP8.Normalize();\n\t\t\t\t\t\t\t\tgp_Vec normPntP8 = tangPntP8.Crossed(zyDir).Normalized();\n\n\t\t\t\t\t\t\t\t// Creation of point P9\n\n\t\t\t\t\t\t\t\tgp_Pnt P9 = new gp_Pnt(normPntP8.Scaled(deltaCGap4 * chordLength).Added(new gp_Vec(P8.Coord())).XYZ());\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tSystem.out.println(\"Point P9 coordinates : \" + P9.X() + \" \" + P9.Y() + \" \" + P9.Z());\n\n\t\t\t\t\t\t\t\t// Creation of P1 tangent vector\n\n\t\t\t\t\t\t\t\tgp_Vec tangPntP1 = new gp_Vec();\n\t\t\t\t\t\t\t\tgp_Pnt PntP1= new gp_Pnt();\n\t\t\t\t\t\t\t\tairfoilGeomCurve.D1(cLeapPar, PntP1, tangPntP1);\n\t\t\t\t\t\t\t\ttangPntP1.Normalize();\n\t\t\t\t\t\t\t\ttangPntP1 = tangPntP1.Reversed();\n\n\t\t\t\t\t\t\t\t// Creation of Flap leading edge curve\n\n\t\t\t\t\t\t\t\tList<double[]> upperLEPoints = new ArrayList<>();\n\t\t\t\t\t\t\t\tupperLEPoints.add(new double[]{P1.Coord(1),P1.Coord(2),P1.Coord(3)});\n\t\t\t\t\t\t\t\tupperLEPoints.add(new double[]{P9.Coord(1),P9.Coord(2),P9.Coord(3)});\n\n\t\t\t\t\t\t\t\tCADEdge upperFlapLE = OCCUtils.theFactory.newCurve3D(upperLEPoints,\n\t\t\t\t\t\t\t\t\t\tfalse, \n\t\t\t\t\t\t\t\t\t\tnew double[] {-tangPntP1.X(), -tangPntP1.Y(), -tangPntP1.Z()}, \n\t\t\t\t\t\t\t\t\t\tnew double[] {-normPntP8.X(), -normPntP8.Y(), -normPntP8.Z()},\n\t\t\t\t\t\t\t\t\t\tfalse).edge();\n\n\n\t\t\t\t\t\t\t\tList<double[]> lowerLEPoints = new ArrayList<>();\n\t\t\t\t\t\t\t\tlowerLEPoints.add(new double[]{P4.Coord(1),P4.Coord(2),P4.Coord(3)});\n\t\t\t\t\t\t\t\tlowerLEPoints.add(new double[]{P9.Coord(1),P9.Coord(2),P9.Coord(3)});\n\n\t\t\t\t\t\t\t\tCADEdge lowerFlapLE = OCCUtils.theFactory.newCurve3D(lowerLEPoints,\n\t\t\t\t\t\t\t\t\t\tfalse, \n\t\t\t\t\t\t\t\t\t\tnew double[] {-tangPntP4.X(), -tangPntP4.Y(), -tangPntP4.Z()}, \n\t\t\t\t\t\t\t\t\t\tnew double[] {normPntP8.X(), normPntP8.Y(), normPntP8.Z()},\n\t\t\t\t\t\t\t\t\t\tfalse).edge();\n\n\t\t\t\t\t\t\t\t// Splitting airfoil in point P1 and P4\n\t\t\t\t\t\t\t\tdouble[] pntP1 = new double[] {P1.X(), P1.Y(), P1.Z()};\n\t\t\t\t\t\t\t\tdouble[] pntP4 = new double[] {P4.X(), P4.Y(), P4.Z()};\n\t\t\t\t\t\t\t\tCADGeomCurve3D flapUpper_1 = OCCUtils.theFactory.newCurve3D(OCCUtils.splitCADCurve(airfoilEdge, pntP1).get(0));\n\t\t\t\t\t\t\t\tCADGeomCurve3D flapUpper_2 = OCCUtils.theFactory.newCurve3D(OCCUtils.splitCADCurve(airfoilEdge, pntP1).get(1));\n\t\t\t\t\t\t\t\tCADEdge edge_flapUpper_1 = flapUpper_1.edge();\n\t\t\t\t\t\t\t\tCADEdge edge_flapUpper_2 = flapUpper_2.edge();\n\t\t\t\t\t\t\t\tList<OCCEdge> flapUpper_edges = new ArrayList<>();\n\t\t\t\t\t\t\t\tflapUpper_edges.add((OCCEdge) edge_flapUpper_1);\n\t\t\t\t\t\t\t\tflapUpper_edges.add((OCCEdge) edge_flapUpper_2);\n\n\t\t\t\t\t\t\t\tTopoDS_Edge flapFirstCut = getShortestEdge(flapUpper_edges);\n\n\t\t\t\t\t\t\t\tCADGeomCurve3D flapLower1 = OCCUtils.theFactory.newCurve3D(OCCUtils.splitCADCurve(airfoilEdge, pntP4).get(0));\n\t\t\t\t\t\t\t\tCADGeomCurve3D flapLower2 = OCCUtils.theFactory.newCurve3D(OCCUtils.splitCADCurve(airfoilEdge, pntP4).get(1));\n\t\t\t\t\t\t\t\tCADEdge edgeFlapLower1 = flapLower1.edge();\n\t\t\t\t\t\t\t\tCADEdge edgeFlapLower2 = flapLower2.edge();\n\t\t\t\t\t\t\t\tList<OCCEdge> flapLowerEdges = new ArrayList<>();\n\t\t\t\t\t\t\t\tflapLowerEdges.add((OCCEdge) edgeFlapLower1);\n\t\t\t\t\t\t\t\tflapLowerEdges.add((OCCEdge) edgeFlapLower2);\n\n\t\t\t\t\t\t\t\tTopoDS_Edge flapSecondCut = getShortestEdge(flapLowerEdges);\n\n\t\t\t\t\t\t\t\tTopoDS_Edge flapTE = new TopoDS_Edge();\n\t\t\t\t\t\t\t\tgp_Pnt startPnt1 = BRep_Tool.Pnt(TopExp.FirstVertex(flapFirstCut));\n\t\t\t\t\t\t\t\tgp_Pnt endPnt1 = BRep_Tool.Pnt(TopExp.LastVertex(flapSecondCut));\n\t\t\t\t\t\t\t\tBRepBuilderAPI_MakeEdge buildFlapTE = new BRepBuilderAPI_MakeEdge(startPnt1,endPnt1);\n\t\t\t\t\t\t\t\tflapTE = buildFlapTE.Edge();\n\n\t\t\t\t\t\t\t\tgp_Trsf flapTrasl = new gp_Trsf();\n\t\t\t\t\t\t\t\tif ( i == 0 ) {\n\n\t\t\t\t\t\t\t\t\tflapTrasl.SetTranslation(new gp_Pnt(0, yInnerPct * liftingSurface.getSemiSpan().doubleValue(SI.METER), 0), \n\t\t\t\t\t\t\t\t\t\t\tnew gp_Pnt(0, yInnerPct * liftingSurface.getSemiSpan().doubleValue(SI.METER) + lateralGap, 0));\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\t\t\tflapTrasl.SetTranslation(new gp_Pnt(0, yOuterPct * liftingSurface.getSemiSpan().doubleValue(SI.METER), 0), \n\t\t\t\t\t\t\t\t\t\t\tnew gp_Pnt(0, yOuterPct * liftingSurface.getSemiSpan().doubleValue(SI.METER) - lateralGap, 0));\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tTopoDS_Edge flapUpperLE_Edge = TopoDS.ToEdge(((OCCShape) upperFlapLE).getShape());\n\t\t\t\t\t\t\t\tTopoDS_Edge flapLowerLE_Edge = TopoDS.ToEdge(((OCCShape) lowerFlapLE).getShape());\t\t\t\n\t\t\t\t\t\t\t\tTopoDS_Edge airfoilUpperTE_Edge = TopoDS.ToEdge(((OCCShape) upperAirfoilTE).getShape());\n\t\t\t\t\t\t\t\tTopoDS_Edge airfoilLowerTE_Edge = TopoDS.ToEdge(((OCCShape) lowerAirfoilTE).getShape());\n\t\t\t\t\t\t\t\tTopoDS_Edge airfoilMiddleTE_Edge = TopoDS.ToEdge(((OCCShape) middleAirfoilTE).getShape());\n\n\t\t\t\t\t\t\t\tTopoDS_Edge finalFlap1 = TopoDS.ToEdge(new BRepBuilderAPI_Transform(flapFirstCut, flapTrasl).Shape());\n\t\t\t\t\t\t\t\tTopoDS_Edge finalFlap2 = TopoDS.ToEdge(new BRepBuilderAPI_Transform(flapSecondCut, flapTrasl).Shape());\n\t\t\t\t\t\t\t\tTopoDS_Edge finalFlapUpperLE = TopoDS.ToEdge(new BRepBuilderAPI_Transform(flapUpperLE_Edge, flapTrasl).Shape());\n\t\t\t\t\t\t\t\tTopoDS_Edge finalFlapLowerLE = TopoDS.ToEdge(new BRepBuilderAPI_Transform(flapLowerLE_Edge, flapTrasl).Shape());\n\t\t\t\t\t\t\t\tTopoDS_Edge finalFlapTE = TopoDS.ToEdge(new BRepBuilderAPI_Transform(flapTE, flapTrasl).Shape());\n\n\t\t\t\t\t\t\t\tflap.add(OCCUtils.theFactory.newWireFromAdjacentEdges((CADEdge) OCCUtils.theFactory.newShape(finalFlap1),\n\t\t\t\t\t\t\t\t\t\t(CADEdge) OCCUtils.theFactory.newShape(finalFlapUpperLE), \n\t\t\t\t\t\t\t\t\t\t(CADEdge) OCCUtils.theFactory.newShape(finalFlapLowerLE),\n\t\t\t\t\t\t\t\t\t\t(CADEdge) OCCUtils.theFactory.newShape(finalFlap2), \n\t\t\t\t\t\t\t\t\t\t(CADEdge) OCCUtils.theFactory.newShape(finalFlapTE)));\n\n\t\t\t\t\t\t\t\tairfoilsCut.add(OCCUtils.theFactory.newWireFromAdjacentEdges((CADEdge) OCCUtils.theFactory.newShape(finalAirfoilCut),\n\t\t\t\t\t\t\t\t\t\t(CADEdge) OCCUtils.theFactory.newShape(airfoilUpperTE_Edge), \n\t\t\t\t\t\t\t\t\t\t(CADEdge) OCCUtils.theFactory.newShape(airfoilLowerTE_Edge), \n\t\t\t\t\t\t\t\t\t\t(CADEdge) OCCUtils.theFactory.newShape(airfoilMiddleTE_Edge)));\n\n\t\t\t}\t\t\t\t\n\t\t\tairfoilsCutAndFlap.add(airfoilsCut);\n\t\t\tairfoilsCutAndFlap.add(flap);\n\t\t\tbreak;\n\t\tcase FOWLER:\n\t\t\t// TODO\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\n\t\treturn airfoilsCutAndFlap;\t\n\t}",
"public void setHair_subdiv(short hair_subdiv) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeShort(__io__address + 3918, hair_subdiv);\n\t\t} else {\n\t\t\t__io__block.writeShort(__io__address + 3874, hair_subdiv);\n\t\t}\n\t}",
"public void unzip(){\n\t\tif(unzipIndex < unzipRange){\n\t\t\tupperHelix.addNucleotideToEnd(0,originalHelix.getNucleotide(0,unzipIndex));\n\t\t\toriginalHelix.removeNucleotide(0,unzipIndex);\n\t\t\tlowerHelix.addNucleotideToEnd(1,originalHelix.getNucleotide(1,unzipIndex));\n\t\t\toriginalHelix.removeNucleotide(1,unzipIndex);\n\t\t\tupperX=(int)(XS-Nucleotide.getImageSize()*(upperHelix.getLength()-1)*Math.cos(Math.toRadians(30)));\n\t\t\tupperY = (int)(YS-Nucleotide.getImageSize()*(upperHelix.getLength()+1)*Math.sin(Math.toRadians(30))-25);\n\n\t\t\tint h = Nucleotide.getImageSize()*unzipIndex;\n\t\t\tint lx = (int)(XS+h-30-Math.cos(Math.toRadians(30))*h);\n\t\t\tint ly = (int)(YS-25+Math.sin(Math.toRadians(30))*h);\n\t\t\tint ux = lx +Nucleotide.getImageSize()*2;\n\t\t\tint uy = (int)(YS+25-Math.sin(Math.toRadians(30))*h-Math.sin(Math.toRadians(60))*(70*2-5));\n\t\t\tSystem.out.println(\"X Y : \"+Integer.toString(lx)+\" \" + Integer.toString(ux));\n\t\t\tupperHelix.setPos(ux, uy,30);\n\t\t\tlowerHelix.setPos(lx,ly,-30);\n\t\t\tunzipIndex++;\n\t\t}\n\t}",
"private void fillSeaTile(Map<IntersectionCoordinate, Intersection> intersections) {\n PriorityQueue<IntersectionCoordinate> closestIntersections =\n new PriorityQueue<>(6, new IntersectionComparator());\n\n HexCoordinate upLeftTile = new HexCoordinate(_coordinate.getX(),\n _coordinate.getY(), _coordinate.getZ() + 1);\n HexCoordinate upRightTile = new HexCoordinate(_coordinate.getX(),\n _coordinate.getY() + 1, _coordinate.getZ() + 1);\n HexCoordinate rightTile = new HexCoordinate(_coordinate.getX(),\n _coordinate.getY() + 1, _coordinate.getZ());\n HexCoordinate lowerRightTile = new HexCoordinate(_coordinate.getX() + 1,\n _coordinate.getY() + 1, _coordinate.getZ());\n HexCoordinate lowerLeftTile = new HexCoordinate(_coordinate.getX() + 1,\n _coordinate.getY(), _coordinate.getZ());\n HexCoordinate leftTile = new HexCoordinate(_coordinate.getX() + 1,\n _coordinate.getY(), _coordinate.getZ() + 1);\n\n closestIntersections.add(new IntersectionCoordinate(_coordinate,\n upLeftTile, upRightTile));\n closestIntersections.add(new IntersectionCoordinate(_coordinate,\n upRightTile, rightTile));\n closestIntersections.add(new IntersectionCoordinate(_coordinate,\n rightTile, lowerRightTile));\n closestIntersections.add(new IntersectionCoordinate(_coordinate,\n lowerRightTile, lowerLeftTile));\n closestIntersections.add(new IntersectionCoordinate(_coordinate,\n lowerLeftTile, leftTile));\n closestIntersections.add(new IntersectionCoordinate(_coordinate,\n leftTile, upLeftTile));\n\n // Add the two intersections closest to the origin\n IntersectionCoordinate toAdd = closestIntersections.poll();\n assert (intersections.containsKey(toAdd));\n _intersections.add(intersections.get(toAdd));\n\n toAdd = closestIntersections.poll();\n assert (intersections.containsKey(toAdd));\n _intersections.add(intersections.get(toAdd));\n }",
"IntOctagon[] cutout_from(IntBox p_d)\n {\n IntOctagon c = this.intersection(p_d);\n \n if (this.is_empty() || c.dimension() < this.dimension())\n {\n // there is only an overlap at the border\n IntOctagon [] result = new IntOctagon[1];\n result[0] = p_d.to_IntOctagon();\n return result;\n }\n \n IntBox [] boxes = new IntBox[4];\n \n // construct left box\n \n boxes[0] = new IntBox(p_d.ll.x, c.llx - c.lx, c.lx, c.lx - c.ulx);\n \n // construct right box\n \n boxes[1] = new IntBox(c.rx, c.rx - c.lrx, p_d.ur.x, c.urx - c.rx);\n \n // construct lower box\n \n boxes[2] = new IntBox(c.llx - c.ly, p_d.ll.y, c.lrx + c.ly, c.ly);\n \n // construct upper box\n \n boxes[3] = new IntBox(c.ulx + c.uy, c.uy, c.urx - c.uy, p_d.ur.y);\n \n IntOctagon[] octagons = new IntOctagon[4];\n \n // construct upper left octagon\n \n IntOctagon curr_oct = new IntOctagon(p_d.ll.x, boxes[0].ur.y, boxes[3].ll.x,\n p_d.ur.y, -Limits.CRIT_INT, c.ulx, -Limits.CRIT_INT, Limits.CRIT_INT);\n octagons[0] = curr_oct.normalize();\n \n // construct lower left octagon\n \n curr_oct = new IntOctagon(p_d.ll.x, p_d.ll.y, boxes[2].ll.x, boxes[0].ll.y,\n -Limits.CRIT_INT, Limits.CRIT_INT, -Limits.CRIT_INT, c.llx);\n octagons[1] = curr_oct.normalize();\n \n // construct lower right octagon\n \n curr_oct = new IntOctagon(boxes[2].ur.x, p_d.ll.y, p_d.ur.x, boxes[1].ll.y,\n c.lrx, Limits.CRIT_INT, -Limits.CRIT_INT, Limits.CRIT_INT);\n octagons[2] = curr_oct.normalize();\n \n // construct upper right octagon\n \n curr_oct = new IntOctagon(boxes[3].ur.x, boxes[1].ur.y, p_d.ur.x, p_d.ur.y,\n -Limits.CRIT_INT, Limits.CRIT_INT, c.urx, Limits.CRIT_INT);\n octagons[3] = curr_oct.normalize();\n \n // optimise the result to minimum cumulative circumference\n \n IntBox b = boxes[0];\n IntOctagon o = octagons[0];\n if (b.ur.x - b.ll.x > o.uy - o.ly)\n {\n // switch the horizontal upper left divide line to vertical\n \n boxes[0] = new IntBox(b.ll.x, b.ll.y, b.ur.x, o.uy);\n curr_oct = new IntOctagon(b.ur.x, o.ly, o.rx, o.uy, o.ulx, o.lrx, o.llx, o.urx);\n octagons[0] = curr_oct.normalize();\n }\n \n b = boxes[3];\n o = octagons[0];\n if (b.ur.y - b.ll.y > o.rx - o.lx)\n {\n // switch the vertical upper left divide line to horizontal\n \n boxes[3] = new IntBox(o.lx, b.ll.y, b.ur.x, b.ur.y);\n curr_oct = new IntOctagon(o.lx, o.ly, o.rx, b.ll.y, o.ulx, o.lrx, o.llx, o.urx);\n octagons[0] = curr_oct.normalize();\n }\n b = boxes[3];\n o = octagons[3];\n if (b.ur.y - b.ll.y > o.rx - o.lx)\n {\n // switch the vertical upper right divide line to horizontal\n \n boxes[3] = new IntBox(b.ll.x, b.ll.y, o.rx, b.ur.y);\n curr_oct = new IntOctagon(o.lx, o.ly, o.rx, o.uy, o.ulx, o.lrx, o.llx, o.urx);\n octagons[3] = curr_oct.normalize();\n }\n b = boxes[1];\n o = octagons[3];\n if (b.ur.x - b.ll.x > o.uy - o.ly)\n {\n // switch the horizontal upper right divide line to vertical\n \n boxes[1] = new IntBox(b.ll.x, b.ll.y, b.ur.x, o.uy);\n curr_oct = new IntOctagon(o.lx, o.ly, b.ll.x, o.uy, o.ulx, o.lrx, o.llx, o.urx);\n octagons[3] = curr_oct.normalize();\n }\n b = boxes[1];\n o = octagons[2];\n if (b.ur.x - b.ll.x > o.uy - o.ly)\n {\n // switch the horizontal lower right divide line to vertical\n \n boxes[1] = new IntBox(b.ll.x, o.ly, b.ur.x, b.ur.y);\n curr_oct = new IntOctagon(o.lx, o.ly, b.ll.x, o.uy, o.ulx, o.lrx, o.llx, o.urx);\n octagons[2] = curr_oct.normalize();\n }\n b = boxes[2];\n o = octagons[2];\n if (b.ur.y - b.ll.y > o.rx - o.lx)\n {\n // switch the vertical lower right divide line to horizontal\n \n boxes[2] = new IntBox(b.ll.x, b.ll.y, o.rx, b.ur.y);\n curr_oct = new IntOctagon(o.lx, b.ur.y, o.rx, o.uy, o.ulx, o.lrx, o.llx, o.urx);\n octagons[2] = curr_oct.normalize();\n }\n b = boxes[2];\n o = octagons[1];\n if (b.ur.y - b.ll.y > o.rx - o.lx)\n {\n // switch the vertical lower left divide line to horizontal\n \n boxes[2] = new IntBox(o.lx, b.ll.y, b.ur.x, b.ur.y);\n curr_oct = new IntOctagon(o.lx, b.ur.y, o.rx, o.uy, o.ulx, o.lrx, o.llx, o.urx);\n octagons[1] = curr_oct.normalize();\n }\n b = boxes[0];\n o = octagons[1];\n if (b.ur.x - b.ll.x > o.uy - o.ly)\n {\n // switch the horizontal lower left divide line to vertical\n boxes[0] = new IntBox(b.ll.x, o.ly, b.ur.x, b.ur.y);\n curr_oct = new IntOctagon(b.ur.x, o.ly, o.rx, o.uy, o.ulx, o.lrx, o.llx, o.urx);\n octagons[1] = curr_oct.normalize();\n }\n \n IntOctagon[] result = new IntOctagon[8];\n \n // add the 4 boxes to the result\n for (int i = 0; i < 4; ++i)\n {\n result[i] = boxes[i].to_IntOctagon();\n }\n \n // add the 4 octagons to the result\n for (int i = 0; i < 4; ++i)\n {\n result[4 + i] = octagons[i];\n }\n return result;\n }",
"private LinearRing[] extractInteriorRing(Coordinate[] shellCoords) {\n\n\t // check for self-intersection\n\t // the shell coordinates can't have self-intersection, if a\n\t // self-intersection is found, the coordinates between then will\n\t // form an interior ring.\n\n\t // take into account that the first and last coordinate are the\n\t // same.\n\t int selfIntersectionStart = -1;\n\t int selfIntersectionEnd = -1;\n\t for (int i = 1; i < shellCoords.length\n\t\t && selfIntersectionStart == -1; i++) {\n\n\t\tCoordinate actualCoord = shellCoords[i];\n\t\tfor (int j = i + 1; j < shellCoords.length - 1; j++) {\n\n\t\t Coordinate selfIntersectionCoord = shellCoords[j];\n\t\t if (actualCoord.equals2D(selfIntersectionCoord)) {\n\t\t\t// here we have a self intersection coordinate.\n\t\t\tselfIntersectionStart = i;\n\t\t\tselfIntersectionEnd = j;\n\t\t\tbreak;\n\t\t }\n\t\t}\n\n\t }\n\t LinearRing[] shellAndHole = new LinearRing[2];\n\t List<Coordinate> shell = new LinkedList<Coordinate>();\n\t List<Coordinate> hole = new LinkedList<Coordinate>();\n\n\t for (int j = 0; j < shellCoords.length; j++) {\n\n\t\t// add the actual shell coordinate\n\t\tshell.add(shellCoords[j]);\n\t\tif (j == selfIntersectionStart) {\n\n\t\t // retrieve the interior ring.\n\t\t for (int i = selfIntersectionStart; i <= selfIntersectionEnd; i++) {\n\n\t\t\thole.add(shellCoords[i]);\n\t\t }\n\t\t // move the cursor to continue after the\n\t\t // self-intersection coordinate\n\t\t j = selfIntersectionEnd;\n\t\t}\n\t }\n\t shellAndHole[0] = this.geometryFactory.createLinearRing(shell\n\t\t .toArray(new Coordinate[shell.size()]));\n\t if (hole.size() != 0) {\n\t\tshellAndHole[1] = this.geometryFactory.createLinearRing(hole\n\t\t\t.toArray(new Coordinate[hole.size()]));\n\t } else {\n\t\tshellAndHole[1] = null;\n\t }\n\t return shellAndHole;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method creates and initializes an NbaVpmsAdaptor object to call VP/MS to execute the supplied entryPoint. | protected NbaVpmsModelResult getDataFromVpms(String entryPoint) throws NbaBaseException, NbaVpmsException {
NbaVpmsAdaptor vpmsProxy = null;
try {
NbaOinkDataAccess oinkData = new NbaOinkDataAccess(getWork().getNbaLob());
Map deOink = new HashMap();
deOink.put(NbaVpmsAdaptor.A_PROCESS_ID, NbaUtils.getBusinessProcessId(getUser()));
vpmsProxy = new NbaVpmsAdaptor(oinkData, NbaVpmsAdaptor.REQUIREMENTS);
vpmsProxy.setVpmsEntryPoint(entryPoint);
vpmsProxy.setSkipAttributesMap(deOink);
NbaVpmsModelResult modelResult = new NbaVpmsModelResult(vpmsProxy.getResults().getResult());
return modelResult;
} catch (java.rmi.RemoteException re) {
throw new AxaErrorStatusException(AxaStatusDefinitionConstants.VARIANCE_KEY_VPMS, NbaBaseException.getExceptionOrigin(re)); // APSL3874
} finally {
try {
if (vpmsProxy != null) {
vpmsProxy.remove();
}
} catch (RemoteException re) {
getLogger().logError(NbaBaseException.VPMS_REMOVAL_FAILED);
}
}
} | [
"public NbaVpmsResultsData getDataFromVpms(String entryPoint) throws NbaBaseException, NbaVpmsException {\n\t\tNbaVpmsAdaptor vpmsProxy = null; //SPR3362\n\t\ttry {\n\t\t\tNbaOinkDataAccess oinkData = new NbaOinkDataAccess(getWork().getNbaLob());\n\t\t\tMap deOink = new HashMap();\n\t\t\tdeOink.put(NbaVpmsAdaptor.A_PROCESS_ID, NbaUtils.getBusinessProcessId(getUser())); //SPR2639\n\t\t\tvpmsProxy = new NbaVpmsAdaptor(oinkData, NbaVpmsAdaptor.REQUIREMENTS); //SPR3362\n\t\t\tvpmsProxy.setVpmsEntryPoint(entryPoint);\n\t\t\tvpmsProxy.setSkipAttributesMap(deOink);\n\t\t\t//BEGIN NBA130\n\t\t\toinkData.setContractSource(nbaTxLife);\n\t\t\tNbaOinkRequest oinkRequest = new NbaOinkRequest();\n\t\t\tvpmsProxy.setANbaOinkRequest(oinkRequest);\n\t\t\toinkRequest.setRequirementIdFilter(requirementInfo.getId());\n\t\t\t//END NBA130\n\t\t\tNbaVpmsResultsData data = new NbaVpmsResultsData(vpmsProxy.getResults());\n\t\t\t//SPR3362 code deleted\n\t\t\treturn data;\n\t\t} catch (java.rmi.RemoteException re) {\n\t\t\tthrow new NbaVpmsException(\"Provider Communication Process Problem\" + NbaVpmsException.VPMS_EXCEPTION, re);\n\t\t\t//begin SPR3362\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (vpmsProxy != null) {\n\t\t\t\t\tvpmsProxy.remove();\n\t\t\t\t}\n\t\t\t} catch (RemoteException re) {\n\t\t\t\tgetLogger().logError(NbaBaseException.VPMS_REMOVAL_FAILED);\n\t\t\t}\n\t\t}\n\t\t//end SPR3362\n\t}",
"protected NbaVpmsResultsData getDataFromVpms(String entryPoint) throws NbaBaseException, NbaVpmsException {\t//SPR2992 changed method signature\n\t NbaVpmsAdaptor vpmsProxy = null; //SPR3362\n\t try {\n\t\t\tNbaOinkDataAccess oinkData = new NbaOinkDataAccess(getWork().getNbaLob());\n\t\t\tMap deOink = new HashMap();\n\t\t\tdeOink.put(NbaVpmsAdaptor.A_PROCESS_ID, NbaUtils.getBusinessProcessId(getUser())); //SPR2639\n\t\t\tvpmsProxy = new NbaVpmsAdaptor(oinkData, NbaVpmsAdaptor.REINSURANCE); //SPR3362\n\t\t\tvpmsProxy.setVpmsEntryPoint(entryPoint);\n\t\t\tvpmsProxy.setSkipAttributesMap(deOink);\n\t\t\tNbaVpmsResultsData data = new NbaVpmsResultsData(vpmsProxy.getResults());\n\t\t\t//SPR3362 code deleted\n\t\t\treturn data;\n\t\t} catch (java.rmi.RemoteException re) {\n\t\t\tthrow new NbaVpmsException(NbaVpmsException.VPMS_EXCEPTION, re);\n //begin SPR3362 \n\t\t} finally {\n\t\t\ttry {\n\t\t\t if (vpmsProxy != null) {\n\t\t\t\t\tvpmsProxy.remove();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t} catch (RemoteException re) {\n\t\t\t getLogger().logError(NbaBaseException.VPMS_REMOVAL_FAILED); \n\t\t\t}\n\t\t}\n\t\t//end SPR3362\n\t}",
"public native void InitForAnalysePage();",
"static native void init(AdapterMethodHandle self, MethodHandle target, int argnum);",
"public void launchIncomingCall() {\n }",
"protected abstract void startMvpPresenter();",
"static native void init(BoundMethodHandle self, Object target, int argnum);",
"public PBVAInit(MainController controller){\n\t\taddObserver(controller);\n\t}",
"static native void init(DirectMethodHandle self, Object ref, boolean doDispatch, Class<?> caller);",
"public NbaProcProviderMib() {\n\tsuper();\n}",
"private void initRunner() {\n commandRunner = new NativeCommandRunner();\n }",
"public CetusControlParameterProcess () {\r\n cetusVortalDelegate = new CetusVortalDelegate();\r\n }",
"protected abstract void setupMvpView();",
"ProcessAdapter createProcessAdapter();",
"void init(EventProcessHelper eventHelper);",
"private void initCommandCenter(){\n CommandCenter cmd = CommandCenter.getInstance();\n\n /**\n * Handle basic hello messages. These messages are heartbeats.\n */\n cmd.addHandler(new HelloCommandHandler());\n /**\n * Handle messages that ask us to send participants to the remote host.\n */\n cmd.addHandler(new SendParticipantsCommandHandler());\n /**\n * Handle the participant response.\n */\n cmd.addHandler(new ParticipantsResponseHandler());\n\n /**\n * Handle messages that ask us to send system data\n */\n cmd.addHandler(new SendSystemDataHandler());\n /**\n * Handle messages that contain system data.\n */\n cmd.addHandler(new SystemDataResponseHandler());\n /**\n * Handle messages from other phones.\n */\n cmd.addHandler(new ResponseMessageHandler(this));\n\n cmd.addHandler(new SyncDataCommandHandler(this));\n }",
"public native boolean init_engine();",
"private void initMVP() {\n mainPresenter = new MainPresenter(this, getActivity());\n }",
"private void initValets(){\n //valet in charge of getting movie database data\n mMovieValet = new MovieValet(this);\n //request favorite movie list from database\n mMovieValet.requestMovies(PosterHelper.NAME_ID_FAVORITE);\n\n //valet in charge of getting poster refresh database data\n mRefreshValet = new RefreshValet(this);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This interface defines the available certificate types as defined by PKCS11: X_509_PUBLIC_KEY, X_509_ATTRIBUTE or VENDOR_DEFINED. | public interface CertificateType {
/**
* The identifier for a X.509 public key certificate.
*/
static public final Long X_509_PUBLIC_KEY = new Long(PKCS11Constants.CKC_X_509);
/**
* The identifier for a X.509 attribute certificate.
*/
static public final Long X_509_ATTRIBUTE = new Long(
PKCS11Constants.CKC_X_509_ATTR_CERT);
/**
* The identifier for a WTL certificate.
*/
static public final Long WTLS = new Long(PKCS11Constants.CKC_WTLS);
/**
* The identifier for a vendor-defined certificate. Any Long object with a value bigger than
* this one is also a valid vendor-defined certificate type identifier.
*/
static public final Long VENDOR_DEFINED = new Long(PKCS11Constants.CKC_VENDOR_DEFINED);
} | [
"@AutoEscape\n\tpublic String getCertificateType();",
"public void setCertificateType(String certificateType);",
"public String getCertificateType() {\n return this.CertificateType;\n }",
"public String getCertType() {\n return certType;\n }",
"public String getCertificatetype() {\n return certificatetype;\n }",
"public interface X509Credential\n{\n\t/**\n\t * Returns the credential in a keystore.\n\t * @return the KeyStore\n\t */\n\tpublic KeyStore getKeyStore();\n\t\n\t/**\n\t * Returns a KeyManager which accompanies the KeyStore. \n\t * @return the KeyManager\n\t */\n\tpublic X509ExtendedKeyManager getKeyManager();\n\t\n\t/**\n\t * Returns a password which can be used to obtain PrivateKey entry\n\t * from the KeyStore returned by the {@link #getKeyStore()} method, \n\t * with the alias returned by the {@link #getKeyAlias()} method.\n\t * @return key password\n\t */\n\tpublic char[] getKeyPassword();\n\t\n\t/**\n\t * Returns an alias which can be used to obtain the PrivateKey entry\n\t * from the KeyStore returned by the {@link #getKeyStore()} method.\n\t * @return key alias\n\t */\n\tpublic String getKeyAlias();\n\t\n\t/**\n\t * Helper method to get private key from the underlying keystore\n\t * @return private key\n\t */\n\tpublic PrivateKey getKey();\n\n\t/**\n\t * Helper method to get certificate from the underlying keystore\n\t * @return certificate\n\t */\n\tpublic X509Certificate getCertificate();\n\n\t/**\n \t * Helper method to get certificate chain from the underlying keystore\n\t * @return certificate chain\n\t */\n\tpublic X509Certificate[] getCertificateChain();\n\t\n\t/**\n\t * @return RFC 2253 distinguished name of the certificate subject\n\t * @since 1.1.0\n\t */\n\tpublic String getSubjectName();\n}",
"public interface PU_DOT1X_TLS_CERT_UPLOAD_TYPE_E {\n public static final int PU_DOT1X_TLS_CA_CERT_UPLOAD_TYPE = 0;\n public static final int PU_DOT1X_TLS_CLIENT_CERT_UPLOAD_TYPE = 1;\n public static final int PU_DOT1X_TLS_CERT_UPLOAD_TYPE_MAX = 2;\n }",
"public AfdCertificateType certificateType() {\n return this.certificateType;\n }",
"public String getApplCertType() {\n return applCertType;\n }",
"public interface PU_DOT1X_TLS_CERT_UPLOAD_TYPE {\n public static final int PU_DOT1X_TLS_CA_CERT_UPLOAD_TYPE = 0;\n public static final int PU_DOT1X_TLS_CLIENT_CERT_UPLOAD_TYPE = 1;\n public static final int PU_DOT1X_TLS_CERT_UPLOAD_TYPE_MAX = 2;\n }",
"public LongAttribute getCertificateType() {\n return certificateType_;\n }",
"public Long getCertificateType() {\n return this.CertificateType;\n }",
"public String getCertiType() {\r\n return certiType;\r\n }",
"public interface CertService {\n\n /**\n * Retrieves the root certificate.\n * \n * @return\n * @throws CertException\n */\n public X509Certificate getRootCertificate() throws CertException;\n\n /**\n * Sets up a root service to be used for CA-related services like certificate request signing and certificate\n * revocation.\n * \n * @param keystore\n * @throws CertException\n */\n public void setRootService(RootService rootService) throws CertException;\n\n /**\n * Retrieves a KeyStore object from a supplied InputStream. Requires a keystore password.\n * \n * @param userId\n * @return\n */\n public KeyStore getKeyStore(InputStream keystoreIS, String password) throws CertException;\n\n /**\n * Retrieves existing private and public key from a KeyStore.\n * \n * @param userId\n * @return\n */\n public KeyPair getKeyPair(KeyStore ks, String keyAlias, String certificateAlias, String keyPassword)\n throws CertException;\n\n /**\n * Retrieves an existing certificate from a keystore using keystore's certificate alias.\n * \n * @param userId\n * @return\n */\n public X509Certificate getCertificate(KeyStore keystore, String certificateAlias) throws CertException;\n\n /**\n * Generates a private key and a public certificate for a user whose X.509 field information was enclosed in a\n * UserInfo parameter. Stores those artifacts in a password protected keystore. This is the principal method for\n * activating a new certificate and signing it with a root certificate.\n * \n * @param userId\n * @return KeyStore based on the provided userInfo\n */\n\n public KeyStore initializeUser(UserInfo userInfo, String keyPassword) throws CertException;\n\n /**\n * Wraps a certificate object into an OutputStream object secured by a keystore password\n * \n * @param keystore\n * @param os\n * @param keystorePassword\n * @throws CertException\n */\n public void storeCertificate(KeyStore keystore, OutputStream os, String keystorePassword) throws CertException;\n\n /**\n * Extracts the email address from a certificate\n * \n * @param certificate\n * @return\n * @throws CertException\n */\n public String getCertificateEmail(X509Certificate certificate) throws CertException;\n\n}",
"public interface PU_SDK_TLS_CERT_UPLOAD_TYPE {\n public static final int PU_SDK_TLS_CA_CERT_UPLOAD_TYPE = 0;\n public static final int PU_SDK_TLS_CLIENT_CERT_UPLOAD_TYPE = 1;\n public static final int PU_SDK_TLS_CERT_UPLOAD_TYPE_MAX = 2;\n }",
"liubaninc.m0.pki.CertificatesOuterClass.CertificatesOrBuilder getCertificatesOrBuilder();",
"private void checkKeyUsage(X509Certificate cert) throws GeneralSecurityException\n {\n try\n {\n Object bsVal = getExtensionValue(cert, X509Extensions.KeyUsage.getId(), KeyUsage.class);\n \n if (bsVal != null && bsVal instanceof KeyUsage)\n {\n KeyUsage keyUsage = (KeyUsage) bsVal;\n // SSLCA: CERT_SIGN; SSL_CA;+\n debug(\"KeyUsage=\" + keyUsage.intValue() + \";\" + keyUsage.getString());\n \n int flags = keyUsage.intValue();\n \n if ((flags & KeyUsage.cRLSign) == KeyUsage.cRLSign\n || (flags & KeyUsage.keyCertSign) == KeyUsage.keyCertSign)\n {\n // we okay\n }\n else\n throw new GeneralSecurityException(\"KeyUsage = not set for signing\");\n \n }\n } catch (IOException e)\n {\n throw new GeneralSecurityException(\"Basic Constraints CA = error reading extension\");\n }\n }",
"public java.lang.String getCertiType() {\n return certiType;\n }",
"public String getCertificateTypeName() {\n return certificateTypeName;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert the specified target to string (for DEBUG) | public static String toString(Object target) {
return toString(target, (String[]) null);
} | [
"java.lang.String getTarget();",
"public static String getTarget() {\n return TARGET;\n }",
"public static String getLogTarget()\n {\n return BaseBoot.getInstance().getGlobalConfig().getConfigProperty\n (LOGTARGET, LOGTARGET_DEFAULT);\n }",
"@NotNull\n public static String getTargetLabel(@NotNull IAndroidTarget target) {\n if (!target.isPlatform()) {\n return String.format(\"%1$s (API %2$s)\", target.getFullName(), target.getVersion().getApiString());\n }\n AndroidVersion version = target.getVersion();\n if (version.isPreview()) {\n return String.format(\"API %d+: %s\", target.getVersion().getApiLevel(), target.getName());\n }\n String name = SdkVersionInfo.getAndroidName(target.getVersion().getApiLevel());\n if (name != null) {\n return name;\n }\n String release = target.getProperty(\"ro.build.version.release\"); //$NON-NLS-1$\n if (release != null) {\n return String.format(\"API %1$d: Android %2$s\", version.getApiLevel(), release);\n }\n return String.format(\"API %1$d\", version.getApiLevel());\n }",
"String getTargetName();",
"public String getTarget() {\n return this.target;\n }",
"public String getTargetTypeAsString() {\n\t\tString type = null;\n\t\t\n\t\tswitch (targetType) {\n\t\tcase PROCEDURE:\n\t\t\ttype = \"procedure\";\n\t\t\tbreak;\n\t\tcase POLICY:\n\t\t\ttype = \"policy\";\n\t\t\tbreak;\n\t\tcase PROCESS:\n\t\t\ttype = \"process\";\n\t\t\tbreak;\n\t\tcase EXTERNAL:\n\t\t\ttype = \"external\";\n\t\t\tbreak;\n\t\tcase NOT_SET:\n\t\t\ttype = \"procedure\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\ttype = \"procedure\";\n\t\t\tbreak;\n\t\t}\n\t\treturn type;\n\t}",
"public String getShortTestClassName()\r\n {\r\n return target.getClass().getSimpleName();\r\n }",
"public String getDebuggingInfo() {\n if (hasTools()) {\n if (tileImprovementPlan == null) return \"No target\";\n final String action = tileImprovementPlan.getType().getNameKey();\n return tileImprovementPlan.getTarget().getPosition().toString()\n + \" \" + action;\n } else {\n if (colonyWithTools == null) return \"No target\";\n return \"Getting tools from \" + colonyWithTools.getName();\n }\n }",
"protected String getTargetTypeParameter() {\n if (!notEmpty(targetType)) {\n return null;\n }\n if (targetType.equals(\"exe\")) {\n return \"/exe\";\n } else if (targetType.equals(\"library\")) {\n return \"/dll\";\n } else {\n return null;\n }\n }",
"public String getTargetName() {\n return m_targetName;\n }",
"protected String getDestinationString() {\n return getClass().getName() + \".\" + getName(true);\n }",
"public java.lang.String getTargetPath() {\n java.lang.Object ref = targetPath_;\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 targetPath_ = s;\n return s;\n }\n }",
"public java.lang.String getTargetName() {\n return targetName;\n }",
"java.lang.String getTargetFile();",
"void setTarget(String targ) {\n _target = targ;\n }",
"public final String toDetailString() {\n if (isSourceArtifact()) {\n // Source Artifact: relPath == execPath, & real path is not under execRoot\n return \"[\" + root + \"]\" + getRootRelativePathString();\n } else {\n // Derived Artifact: path and root are under execRoot\n //\n // TODO(blaze-team): this is misleading because execution_root isn't unique. Dig the\n // workspace name out and print that also.\n return \"[[<execution_root>]\" + root.getExecPath() + \"]\" + getRootRelativePathString();\n }\n }",
"public java.lang.String getTargetFile() {\n java.lang.Object ref = targetFile_;\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 targetFile_ = s;\n return s;\n }\n }",
"public static OMElement serializeTarget(Target target) {\n\n OMElement targetElem = fac.createOMElement(\"target\", synNS);\n if (target.getToAddress() != null) {\n targetElem.addAttribute(\"to\", target.getToAddress(), nullNS);\n }\n\n if (target.getSoapAction() != null) {\n targetElem.addAttribute(\"soapAction\", target.getSoapAction(), nullNS);\n }\n\n if (target.getSequenceRef() != null) {\n targetElem.addAttribute(\"sequence\", target.getSequenceRef(), nullNS);\n }\n\n if (target.getEndpointRef() != null) {\n targetElem.addAttribute(\"endpoint\", target.getEndpointRef(), nullNS);\n }\n\n if (target.getSequence() != null) {\n SequenceMediatorSerializer serializer = new SequenceMediatorSerializer();\n serializer.serializeAnonymousSequence(targetElem, target.getSequence());\n }\n\n if (target.getEndpoint() != null) {\n targetElem.addChild(EndpointSerializer.getElementFromEndpoint(target.getEndpoint()));\n }\n\n return targetElem;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function adds associated entities to an example criterion | public void addAssoications(Criteria criteria, Candidate exampleInstance) {
} | [
"@Test\n public void testAdd() {\n assertEquals(3, prototype.getList().size());\n prototype.add(new Criterion(\"name4\", new IdCategory(Category.HEALTH), \"description\", \"help\"));\n assertEquals(4, prototype.getList().size());\n }",
"public void addExample(Example e){\n\t\tclassIndex(e.getLabel().bestClassName()).add(e);\n\t\tfor(Iterator<Feature> j=e.featureIterator();j.hasNext();){\n\t\t\tFeature f=j.next();\n\t\t\tfeatureIndex(f).add(e);\n\t\t\tsumFeatureValues++;\n\t\t}\n\t\texampleCount++;\n\t}",
"Builder addMainEntity(Thing value);",
"Builder addExampleOfWork(String value);",
"public void addEvidence(Object entity, Evidence evidence) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif (this.containsKey(entity)) {\r\n\t\t\tthis.get(entity).add(evidence);\r\n\t\t} else { // new entity\r\n\t\t\tArrayList<Evidence> tmp = new ArrayList<Evidence>();\r\n\t\t\ttmp.add(evidence);\r\n\t\t\tthis.put(entity, tmp);\r\n\t\t}\r\n\t}",
"Builder addExampleOfWork(CreativeWork value);",
"public void addToConditions(entity.ClassificationCondition element);",
"void addHasFeature(WrappedIndividual newHasFeature);",
"void add(T entity, C context);",
"void addIsPartOf(WrappedIndividual newIsPartOf);",
"org.hl7.fhir.ConceptMapEquivalence addNewEquivalence();",
"@Override\n public final void makeAddPrepareForCopy(final Map<String, Object> pAddParam,\n final GoodsLoss pEntity) throws Exception {\n //nothing\n }",
"@Override\n public void addClassification(ClassificationEntityExtension classification)\n {\n this.builder.addClassification(classification);\n }",
"public void addEntity(Entity e)\n {\n entities.add(e); \n }",
"public void addConceptAssertion(int individual, int concept);",
"private static void groupDataSetSamples(Map<EMailAddress, EntityTrackingEmailData> result,\n TrackedEntities trackedEntities)\n {\n for (AbstractExternalData dataSet : trackedEntities.getDataSets())\n {\n for (EMailAddress recipient : getDataSetTrackingRecipients(dataSet))\n {\n final EntityTrackingEmailData emailData =\n getOrCreateRecipientEmailData(result, recipient);\n emailData.addDataSet(dataSet);\n }\n }\n }",
"private void createEntities(List<Map<String, Object>> triplesRes, String index) {\n\n\n Map<String, Double> entitiesGain = new HashMap<>();\n Map<String, Object> entitiesExt = new HashMap<>();\n\n double prev_score = 0;\n double max_score = 0, min_score = 0;\n int i = 1;\n\n if (!triplesRes.isEmpty()) {\n max_score = Double.parseDouble(triplesRes.get(0).get(\"score\").toString());\n min_score = Double.parseDouble(triplesRes.get(triplesRes.size() - 1).get(\"score\").toString());\n }\n\n /* construct entities */\n for (Map<String, Object> triple : triplesRes) {\n\n double score = Double.parseDouble(triple.get(\"score\").toString());\n double norm_score = 1;\n\n String subject = triple.get(\"sub\").toString();\n String object = triple.get(\"obj\").toString();\n String sub_keys = triple.get(\"sub_keywords\").toString();\n String obj_keys = triple.get(\"obj_keywords\").toString();\n\n /* normalize score */\n if (max_score != min_score) {\n //norm_score = score / max_score;\n norm_score = (score - min_score) / (max_score - min_score);\n }\n\n /* Store entities based on subject OR/AND object */\n if (Controller.isResource(subject)) {\n /* apply aggregation penalty */\n double local_norm = norm_score * calculateAggregationPenalty(\"subjectKeywords\", sub_keys, index);\n\n /* calculate the 'ndcg-like, log-based' gain */\n double localGain = (Math.pow(2, local_norm) - 1) / (Math.log(i + 1) / Math.log(2));\n\n entitiesGain.compute(subject, (k, v) -> (v == null) ? localGain : v + localGain);\n entitiesExt.putIfAbsent(subject, triple.get(\"sub_ext\"));\n }\n\n if (Controller.isResource(object)) {\n /* apply aggregation penalty */\n double local_norm = norm_score * calculateAggregationPenalty(\"objectKeywords\", obj_keys, index);\n\n /* calculate the 'ndcg-like, log-based' gain */\n double localGain = (Math.pow(2, local_norm) - 1) / (Math.log(i + 1) / Math.log(2));\n\n entitiesGain.compute(object, (k, v) -> (v == null) ? localGain : v + localGain);\n entitiesExt.putIfAbsent(object, triple.get(\"obj_ext\"));\n }\n\n\n if (prev_score != score) {\n prev_score = score;\n i++;\n }\n\n }\n\n /* prepare response */\n this.results = new ArrayList<>();\n entitiesGain = entitiesGain.entrySet()\n .stream()\n .sorted(Map.Entry.comparingByValue(Comparator.reverseOrder()))\n .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));\n\n /* store max-score of entities for normalization */\n try {\n String[] max_e = entitiesGain.entrySet().toArray()[0].toString().split(\"=\");\n this.max_score = Double.parseDouble(max_e[max_e.length - 1]);\n\n } catch (Exception e) {\n System.err.println(\"Elas4RDF-rest, error when parsing entities - number format of score.\\n\\t\" + e.getMessage());\n }\n\n /* create the response */\n for (Map.Entry<String, Double> e : entitiesGain.entrySet()) {\n String entity = e.getKey();\n Double gain = e.getValue();\n Map<String, Object> entityRes = new HashMap<>();\n\n entityRes.put(\"entity\", entity);\n entityRes.put(\"gain\", Double.toString(gain));\n entityRes.put(\"score\", Double.toString(getNormScore(gain)));\n entityRes.put(\"ext\", entitiesExt.get(entity));\n\n this.results.add(entityRes);\n\n }\n\n }",
"@Override\n public void addExample(IExample example) {\n this.examples.put(example.getName(), example);\n }",
"void addHas_certainty(Object newHas_certainty);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the URI for the given relative path in the project folder | public static String getURIPathToFolder(String relativePath){
URL binUrl = JavaFxNodeToSvgConverterDemo.class.getClassLoader().getResource(".");
try {
URI binUri = binUrl.toURI();
URI wantedUri = binUri.resolve("../" + relativePath);
File file = new File(wantedUri);
String wantedFilePath = file.getAbsolutePath();
return wantedFilePath;
} catch (URISyntaxException exception) {
throw new IllegalStateException("Could not find path '" + relativePath + "'");
}
} | [
"String getRelativeInternalURL();",
"public abstract String getURL (String relativePath, boolean global);",
"public static java.net.URI getURI(String relativePath) {\n\t\tString absolutePath = Utils.getAbsolutePath(relativePath);\n\t\tURI emfUri = URI.createFileURI(absolutePath);\n\t\tjava.net.URI uri = null;\n\t\ttry {\n\t\t\turi = new java.net.URI(emfUri.toString());\n\t\t} catch (URISyntaxException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn uri;\n\t}",
"public static URI getEmfURI(String relativePath) {\n\t\tFile file = new File(relativePath);\n\t\tURI uri = file.isFile() ? URI.createFileURI(file.getAbsolutePath()): URI.createURI(relativePath);\n\t\t\n\t\treturn uri;\n\t}",
"public String resolvePath();",
"private String getAbsoluteURL(String relativeURI) {\n String sURL = \"\";\n try {\n String relativePath = relativeURI.replace(\"/\", File.separator);\n File furi = new File(RELATIVE_ROOT_FOR_URI + relativePath);\n sURL = furi.toURI().toURL().toExternalForm();\n } catch (MalformedURLException ex) {\n logger.error(\"Error while generating URL to externalForm\", ex);\n }\n return sURL;\n }",
"public PathFragment getRepositoryRelativePath() {\n PathFragment relativePath = getRootRelativePath();\n // External artifacts under legacy roots are still prefixed with \"external/<repo name>\".\n if (root.isLegacy() && relativePath.startsWith(LabelConstants.EXTERNAL_PATH_PREFIX)) {\n relativePath = relativePath.subFragment(2);\n }\n return relativePath;\n }",
"String getRelativePublicURL();",
"String getResourceURI();",
"String getRessourcePath();",
"private IPath convertToAbsolutePath(String projectRelativePath) {\n\t\treturn new Path(this.gprProject.getRootDirPath().toString())\n\t\t\t\t.append(projectRelativePath);\n\t}",
"public URI resolveBase(String path) {\n return URI.create(uriInfo.getBaseUri() + path);\n }",
"default String getRelativeUrl() {\n return getCurrentUrl().substring(LocalDriver.getUrlBase().length());\n }",
"String getAbsolutePathWithinSlingHome(String relativePath);",
"public static String getPath(String relativePath){\n String absolutePath = FacesContext.getCurrentInstance().getExternalContext().getRealPath(relativePath);\r\n// File file = new File(absolutePath);\r\n return absolutePath;\r\n }",
"public String getRepoUri(Path repoFile) {\n Path filePath = getRepoRoot().relativize(repoFile);\n return \"/rest/repo/file/\" + WebUtils.encodeURI(filePath.toString().replace('\\\\', '/'));\n }",
"String getUrlPath();",
"String getProjectFileBaseFolder();",
"public String getFullPath();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a map with the key set being every available data access plugin type. | public static Map<String, List<DataAccessPlugin>> getAllPlugins() {
final Map<String, List<DataAccessPlugin>> plugins = DataAccessPluginType.getTypes().stream()
.collect(Collectors.toMap(
type -> type,
type -> new ArrayList<>(),
(type1, type2) -> new ArrayList<>(),
LinkedHashMap::new
));
// Create the favourites category
plugins.computeIfAbsent(DataAccessPluginCoreType.FAVOURITES, key -> new ArrayList<>());
// Now fetch the DataAccessPlugin instances.
final Multimap<String, String> pluginNameToType = ArrayListMultimap.create();
final List<String> pluginOverrides = new ArrayList<>();
Lookup.getDefault().lookupAll(DataAccessPlugin.class).parallelStream()
// If plugin is disabled, ignore the plugin.
.filter(DataAccessPlugin::isEnabled)
// If a plugin type is invalid (that is, not registered as a DataAccessPluginType),
// and not in the users favourites, ignore the plugin.
.filter(plugin -> plugins.containsKey(plugin.getType())
|| DataAccessPreferenceUtilities.isfavourite(plugin.getName(), false))
.forEach(plugin -> {
// If the plugin is a user's favourite, add it to the favourite list
if (DataAccessPreferenceUtilities.isfavourite(plugin.getName(), false)) {
plugins.get(DataAccessPluginCoreType.FAVOURITES).add(plugin);
logDiscoveredDataAccessPlugin(plugin, DataAccessPluginCoreType.FAVOURITES);
// Register that this plugin has been added under favourites for when
// overriden plugins are being dealt with
pluginNameToType.put(plugin.getClass().getName(), DataAccessPluginCoreType.FAVOURITES);
}
// If plugin type is valid, add the plugin to the Data Access View.
if (plugins.containsKey(plugin.getType())) {
plugins.get(plugin.getType()).add(plugin);
logDiscoveredDataAccessPlugin(plugin);
// If plugin overrides another, record which plugin should be removed
// for later processing. Also record name to type so that it doesn't
// need to loop through every type to find it
pluginNameToType.put(plugin.getClass().getName(), plugin.getType());
pluginOverrides.addAll(plugin.getOverriddenPlugins());
}
});
// Remove any overridden plugins.
pluginOverrides.stream()
.forEach(pluginToRemoveName
-> // Gets all the plugin type lists it could be in basically itself
// and favourites at most
pluginNameToType.get(pluginToRemoveName)
.forEach(pluginToRemoveType -> {
// For the given plugin name and type get the list that the plugin will be in
final List<DataAccessPlugin> pluginList = plugins.get(pluginToRemoveType);
IntStream.range(0, pluginList.size())
.filter(index -> pluginList.get(index).getClass().getName()
.equals(pluginToRemoveName))
.findFirst()
.ifPresent(index -> {
// Remove the overriden plugin
pluginList.remove(index);
LOGGER.log(Level.INFO,
String.format("Removed data access plugin %s (%s) as it is overriden.",
pluginToRemoveName, pluginToRemoveType)
);
});
})
);
return plugins;
} | [
"Map<String, Plugin> getPluginsMap();",
"static HashMap<String, Pluggable> getPlugins(){\r\n\t\treturn new HashMap<String, Pluggable>(pluginMap);\r\n\t}",
"@Override\n public Map<String, List<DataAccessPlugin>> get() {\n final Map<String, List<DataAccessPlugin>> plugins = DataAccessPluginType.getTypes().stream()\n .collect(Collectors.toMap(\n type -> type,\n type -> new ArrayList<>(),\n (type1, type2) -> new ArrayList<>(),\n LinkedHashMap::new\n ));\n\n // Create the favourites category\n plugins.computeIfAbsent(DataAccessPluginCoreType.FAVOURITES, key -> new ArrayList<>());\n\n // Now fetch the DataAccessPlugin instances.\n final Multimap<String, String> pluginNameToType = ArrayListMultimap.create();\n final List<String> pluginOverrides = new ArrayList<>();\n Lookup.getDefault().lookupAll(DataAccessPlugin.class).parallelStream()\n // If plugin is disabled, ignore the plugin.\n .filter(DataAccessPlugin::isEnabled)\n // If a plugin type is invalid (that is, not registered as a DataAccessPluginType),\n // and not in the users favourites, ignore the plugin.\n .filter(plugin -> plugins.containsKey(plugin.getType())\n || DataAccessPreferenceUtilities.isfavourite(plugin.getName(), false))\n .forEach(plugin -> {\n // If the plugin is a user's favourite, add it to the favourite list\n if (DataAccessPreferenceUtilities.isfavourite(plugin.getName(), false)) {\n plugins.get(DataAccessPluginCoreType.FAVOURITES).add(plugin);\n logDiscoveredDataAccessPlugin(plugin, DataAccessPluginCoreType.FAVOURITES);\n \n // Register that this plugin has been added under favourites for when\n // overriden plugins are being dealt with\n pluginNameToType.put(plugin.getClass().getName(), DataAccessPluginCoreType.FAVOURITES);\n }\n \n // If plugin type is valid, add the plugin to the Data Access View.\n if (plugins.containsKey(plugin.getType())) {\n plugins.get(plugin.getType()).add(plugin);\n logDiscoveredDataAccessPlugin(plugin);\n\n // If plugin overrides another, record which plugin should be removed\n // for later processing. Also record name to type so that it doesn't\n // need to loop through every type to find it\n pluginNameToType.put(plugin.getClass().getName(), plugin.getType());\n pluginOverrides.addAll(plugin.getOverriddenPlugins());\n }\n });\n\n // Remove any overridden plugins.\n pluginOverrides.stream()\n .forEach(pluginToRemoveName -> \n // Gets all the plugin type lists it could be in basically itself\n // and favourites at most\n pluginNameToType.get(pluginToRemoveName)\n .forEach(pluginToRemoveType -> {\n // For the given plugin name and type get the list that the plugin will be in\n final List<DataAccessPlugin> pluginList = plugins.get(pluginToRemoveType);\n IntStream.range(0, pluginList.size())\n .filter(index -> pluginList.get(index).getClass().getName()\n .equals(pluginToRemoveName))\n .findFirst()\n .ifPresent(index -> {\n // Remove the overriden plugin\n pluginList.remove(index);\n LOGGER.log(Level.INFO,\n String.format(\"Removed data access plugin %s (%s) as it is overriden.\",\n pluginToRemoveName, pluginToRemoveType)\n );\n });\n })\n );\n \n return plugins;\n }",
"Map<String, Plugin> getPluginsByClassMap();",
"Map<ParameterInstance, SetType> getInstanceSetTypes();",
"MapType createMapType();",
"public static Map<String, List<Closure>> getDefaultInjectionMap() {\n\t Map<String, List<Closure>> injections = new HashMap<String, List<Closure>>();\n for(String defaultInjection : new String [] {\"initializers\",\"mapfilters\"}) {\n \tinjections.put(defaultInjection, new ArrayList<Closure>());\n }\n return injections;\n\t}",
"Map<Class<?>, Object> yangAugmentedInfoMap();",
"Map<GAVCoordinate, PluginMetadata> getInstalledPlugins();",
"public Map<Integer,Map<String,Object>> getPlugins(){\r\n Map<Integer,Map<String,Object>> pluginCollection = PluginsDB.getPlugins(getPluginTypeId());\r\n for(int key: pluginCollection.keySet()){\r\n pluginCollection.get(key).put(\"id\", key);\r\n if(pluginsList.containsKey(key)){\r\n pluginCollection.get(key).put(\"active\", pluginsList.get(key).getRunning());\r\n pluginCollection.get(key).put(\"pluginObject\", (WeatherPlugin)pluginsList.get(key));\r\n } else {\r\n pluginCollection.get(key).put(\"active\", false);\r\n pluginCollection.get(key).put(\"pluginObject\", null);\r\n }\r\n }\r\n return pluginCollection;\r\n }",
"public Map<String, WidgetType> loadWidgetTypes();",
"private void initJavaType() { // FIXME move this logic to core module\n\t\tif (javaTypeMap == null) {\n\t\t\tjavaTypeMap = new TreeMap<String, List<String>>();\n\t\t}\n\t\tif (!javaTypeMap.containsKey(\"1\")) {\n\t\t\tList<String> list = new ArrayList<String>();\n\t\t\tlist.add(\"java.lang.String\");\n\t\t\tlist.add(\"java.sql.Date\");\n\t\t\tlist.add(\"java.sql.Time\");\n\t\t\tlist.add(\"java.sql.Timestamp\");\n\t\t\tlist.add(\"java.lang.Byte\");\n\t\t\tlist.add(\"java.lang.Short\");\n\t\t\tlist.add(\"java.lang.Integer\");\n\t\t\tlist.add(\"java.lang.Long\");\n\t\t\tlist.add(\"java.lang.Float\");\n\t\t\tlist.add(\"java.lang.Double\");\n\t\t\tlist.add(\"java.math.BigDecimal\");\n\t\t\tlist.add(\"byte\");\n\t\t\tlist.add(\"short\");\n\t\t\tlist.add(\"int\");\n\t\t\tlist.add(\"long\");\n\t\t\tlist.add(\"float\");\n\t\t\tlist.add(\"double\");\n\t\t\tjavaTypeMap.put(\"1\", list);\n\t\t}\n\t\tif (!javaTypeMap.containsKey(\"2\")) {\n\t\t\tList<String> list = new ArrayList<String>();\n\t\t\tlist.add(\"java.lang.Byte\");\n\t\t\tlist.add(\"java.lang.Short\");\n\t\t\tlist.add(\"java.lang.Integer\");\n\t\t\tlist.add(\"java.lang.Long\");\n\t\t\tlist.add(\"java.lang.Float\");\n\t\t\tlist.add(\"java.lang.Double\");\n\t\t\tlist.add(\"java.math.BigDecimal\");\n\t\t\tlist.add(\"java.lang.String\");\n\t\t\tlist.add(\"byte\");\n\t\t\tlist.add(\"short\");\n\t\t\tlist.add(\"int\");\n\t\t\tlist.add(\"long\");\n\t\t\tlist.add(\"float\");\n\t\t\tlist.add(\"double\");\n\t\t\tjavaTypeMap.put(\"2\", list);\n\t\t}\n\t\tif (!javaTypeMap.containsKey(\"3\")) {\n\t\t\tList<String> list = new ArrayList<String>();\n\t\t\tlist.add(\"java.sql.Date\");\n\t\t\tlist.add(\"java.sql.Time\");\n\t\t\tlist.add(\"java.sql.Timestamp\");\n\t\t\tlist.add(\"java.lang.String\");\n\t\t\tjavaTypeMap.put(\"3\", list);\n\t\t}\n\t\tif (!javaTypeMap.containsKey(\"4\")) {\n\t\t\tList<String> list = new ArrayList<String>();\n\t\t\tjavaTypeMap.put(\"4\", list);\n\t\t}\n\t\tif (!javaTypeMap.containsKey(\"5\")) {\n\t\t\tList<String> list = new ArrayList<String>();\n\t\t\tif (database != null) {\n\t\t\t\tString jdbcVersion = database.getDatabase().getServer().getJdbcDriverVersion();\n\t\t\t\tif (isAfterJdbc111(jdbcVersion)) {\n\t\t\t\t\tlist.add(\"cubrid.sql.CUBRIDOIDImpl\");\t\t\t\t\t\n\t\t\t\t} else { \n\t\t\t\t\tlist.add(\"cubrid.sql.CUBRIDOID\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tlist.add(\"cubrid.sql.CUBRIDOID\");\n\t\t\t}\n\t\t\t\n\t\t\tjavaTypeMap.put(\"5\", list);\n\t\t}\n\t\tif (!javaTypeMap.containsKey(\"6\")) {\n\t\t\tList<String> list = new ArrayList<String>();\n\t\t\tlist.add(\"cubrid.jdbc.driver.CUBRIDResultSet\");\n\t\t\tjavaTypeMap.put(\"6\", list);\n\t\t}\n\t}",
"Map<GAVCoordinate, PluginDescriptor> getActivatedPlugins();",
"public static Map<String, IActionProvider> buildExtensionPoints()\n\t{\n\t final Map<String, IActionProvider> schemeMap = new HashMap<String, IActionProvider>();\n\n\t schemeMap.put(\"mailto\", new IActionProvider()\n\t\t{\n @Override\n public IActionValidator getValidator()\n {\n return new EMailCommandValidator();\n }\n\n @Override\n public IAutomatedAction getNotifier()\n {\n return new EmptyAction();\n }\n\t\t});\n\n schemeMap.put(\"smsto\", new IActionProvider()\n {\n @Override\n public IActionValidator getValidator()\n {\n return null;\n }\n\n @Override\n public IAutomatedAction getNotifier()\n {\n return new EmptyAction();\n }\n });\n \n schemeMap.put(\"cmd\", new IActionProvider()\n {\n @Override\n public IActionValidator getValidator()\n {\n return null;\n }\n\n @Override\n public IAutomatedAction getNotifier()\n {\n return new CommandActionImpl();\n }\n });\n\n\t\treturn schemeMap;\n\t}",
"private void initPlugins() {\n rdePlugins = new HashMap<String, RDEPlugin>();\n\n plugins = ATPluginFactory.getInstance().getRapidDataEntryPlugins();\n if (plugins != null) {\n for (ATPlugin plugin : plugins) {\n plugin.setEditorField(this);\n\n // get the plugin panels which may be JPanels or even JDialogs\n HashMap pluginPanels = plugin.getRapidDataEntryPlugins();\n for (Object key : pluginPanels.keySet()) {\n String panelName = (String) key;\n RDEPlugin rdePlugin = (RDEPlugin) pluginPanels.get(key);\n\n rdePlugins.put(panelName, rdePlugin);\n rapidDataentryScreens.addItem(panelName);\n }\n }\n }\n }",
"public LoadedTypeMap(){\n\t\tthis.loadedTypes = new HashMap<>();\n\t}",
"private Map<String, MenuActionPlugin> getPlugins() {\n\t\tMap<String, MenuActionPlugin> result = new HashMap<String, MenuActionPlugin>();\n\t\tMenuActionPluginLoader pluginLoader = new MenuActionPluginLoader(editorKit);\n\t\tfor (MenuActionPlugin plugin : pluginLoader.getPlugins()) {\n\t\t\tresult.put(plugin.getId(), plugin);\n\t\t}\n\t\treturn result;\n\t}",
"private static Map<String, SchemaTransformProvider> loadProviders() {\n ServiceLoader<SchemaTransformProvider> provider =\n ServiceLoader.load(SchemaTransformProvider.class);\n List<SchemaTransformProvider> list =\n StreamSupport.stream(provider.spliterator(), false).collect(Collectors.toList());\n list.addAll(SchemaIOTransformProviderWrapper.getAll());\n\n Map<String, SchemaTransformProvider> map = new HashMap<>();\n for (SchemaTransformProvider p : list) {\n map.put(p.identifier(), p);\n }\n\n return map;\n }",
"private static HashMap<String, String> initMapping()\n {\n HashMap<String, String> typeMapping = new HashMap<String, String>();\n\n typeMapping.put(\"boolean\", \"boolean\");\n typeMapping.put(\"float\", \"float\");\n typeMapping.put(\"double\", \"double\");\n typeMapping.put(\"byte\", \"byte\");\n typeMapping.put(\"unsignedByte\", \"short\");\n typeMapping.put(\"short\", \"short\");\n typeMapping.put(\"unsignedShort\", \"int\");\n typeMapping.put(\"int\", \"int\");\n typeMapping.put(\"integer\", \"java.math.BigDecimal\");\n typeMapping.put(\"positiveInteger\", \"java.math.BigInteger\");\n typeMapping.put(\"unsignedInt\", \"java.math.BigInteger\");\n typeMapping.put(\"long\", \"java.math.BigInteger\");\n typeMapping.put(\"unsignedLong\", \"java.math.BigDecimal\");\n typeMapping.put(\"decimal\", \"java.math.BigDecimal\");\n typeMapping.put(\"string\", \"String\");\n typeMapping.put(\"hexBinary\", \"byte[]\");\n typeMapping.put(\"base64Binary\", \"byte[]\");\n typeMapping.put(\"dateTime\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"time\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"date\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gDay\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gMonth\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gMonthDay\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gYear\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gYearMonth\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"duration\", \"javax.xml.datatype.Duration\");\n typeMapping.put(\"NOTATION\", \"javax.xml.namespace.QName\");\n typeMapping.put(\"QName\", \"javax.xml.namespace.QName\");\n typeMapping.put(\"anyURI\", \"String\");\n typeMapping.put(\"Name\", \"String\");\n typeMapping.put(\"NCName\", \"String\");\n typeMapping.put(\"negativeInteger\", \"java.math.BigDecimal\");\n typeMapping.put(\"NMTOKEN\", \"String\");\n typeMapping.put(\"nonNegativeInteger\", \"java.math.BigDecimal\");\n typeMapping.put(\"nonPositiveInteger\", \"java.math.BigDecimal\");\n typeMapping.put(\"normalizedString\", \"String\");\n typeMapping.put(\"token\", \"String\");\n typeMapping.put(\"any\", \"Object\");\n\n return typeMapping;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test the property 'launchesEventhandlerThreadpoolPriority' | @Test
public void launchesEventhandlerThreadpoolPriorityTest() {
// TODO: test launchesEventhandlerThreadpoolPriority
} | [
"@Test\n public void launchesEventhandlerThreadpoolMaxsizeTest() {\n // TODO: test launchesEventhandlerThreadpoolMaxsize\n }",
"@Test\n public void orgApacheFelixEventadminThreadPoolSizeTest() {\n // TODO: test orgApacheFelixEventadminThreadPoolSize\n }",
"int getThreadPriorityBoost();",
"private void checkEvent (JPDABreakpointEvent event) {\n assertNotNull (\n \"Breakpoint event: Context thread is null\", \n event.getThread ()\n );\n JPDAThread thread = event.getThread ();\n if (thread.getName ().startsWith (\"test-\")) {\n JPDAThreadGroup group = thread.getParentThreadGroup ();\n assertEquals (\n \"Wrong thread group\", \n \"testgroup\", \n group.getName ()\n );\n assertEquals (\n \"Wrong parent thread group\", \n \"main\", \n group.getParentThreadGroup ().getName ()\n );\n assertEquals (\n \"Wrong number of child thread groups\", \n 0, \n group.getThreadGroups ().length\n );\n JPDAThread [] threads = group.getThreads ();\n for (int i = 0; i < threads.length; i++) {\n JPDAThread jpdaThread = threads [i];\n if ( !jpdaThread.getName ().startsWith (\"test-\")) \n throw new AssertionError \n (\"Thread group contains an alien thread\");\n assertSame (\n \"Child/parent mismatch\", \n jpdaThread.getParentThreadGroup (), \n group\n );\n }\n hitCount++;\n }\n if (thread.getName ().startsWith (\"DestroyJavaVM\")) {\n // Wait a while to gather all events.\n try {\n Thread.sleep(500);\n } catch (InterruptedException iex) {}\n }\n }",
"@Test\n public void orgApacheFelixEventadminAsyncToSyncThreadRatioTest() {\n // TODO: test orgApacheFelixEventadminAsyncToSyncThreadRatio\n }",
"public void testPriority() {\n Domain d = Domain.getDefaultDomain(\"testdomain.dk\");\n DomainDAO.getInstance().create(d);\n Job job0 = Job.createJob(Long.valueOf(1L), highChan, d.getDefaultConfiguration(), 0);\n assertEquals(\"Job should have channel \" + \"FOCUSED\",\n \t\t\"FOCUSED\",\n job0.getChannel());\n Job job1 = Job.createSnapShotJob(Long.valueOf(1),\n \t\tlowChan,\n d.getDefaultConfiguration(), 2000L, -1L, \n Constants.DEFAULT_MAX_JOB_RUNNING_TIME, 0);\n assertEquals(\"Job should have channel \" + lowChan.getName(),\n \t\tlowChan.getName(),\n job1.getChannel());\n }",
"int getThreadHasPoll();",
"@Test(timeout = 10000)\n public void testJobPriorityChange() throws Exception {\n org.apache.hadoop.mapreduce.JobID jid = new JobID(\"001\", 1);\n JobPriorityChangeEvent test = new JobPriorityChangeEvent(jid, JobPriority.LOW);\n Assert.assertEquals(test.getJobId().toString(), jid.toString());\n Assert.assertEquals(test.getPriority(), LOW);\n }",
"public void XtestSetGetApplicationPriority()\n {\n fail(\"Unimplemented test\");\n }",
"@Injectable(\"event-dispatcher-priority\")\n public void setEventDispatcherThreadPriority(int nPriority)\n {\n m_nEventDispatcherThreadPriority = nPriority;\n }",
"public boolean schedule(Event event, long timeout, int priority) throws InterruptedException;",
"public EventLoop(int priority) {\n this.threadPriority = priority;\n }",
"public void setPriority(int p) { try{recievePacketsThread.setPriority(p);} catch(Exception e){e.printStackTrace();}}",
"private void raisePriority() {\n Thread cThr = Thread.currentThread();\n _priority = (byte)((cThr instanceof H2O.FJWThr) ? ((H2O.FJWThr)cThr)._priority+1 : super.priority());\n }",
"@Injectable(\"worker-priority\")\n public void setWorkerThreadPriority(int nPriority)\n {\n m_nWorkerPriority = nPriority;\n }",
"private void raisePriority() {\n Thread cThr = Thread.currentThread();\n _priority = (byte)((cThr instanceof H2O.FJWThr) ? ((H2O.FJWThr)cThr)._priority+1 : super.priority());\n }",
"void setThreadPriorityBoost(int boost);",
"@Test\n public void workerThreadsTest() {\n // TODO: test workerThreads\n }",
"protected ForkJoinWorkerThread(ForkJoinPool pool) {\n<<<<<<< HEAD\n super(pool.nextWorkerName());\n this.pool = pool;\n int k = pool.registerWorker(this);\n poolIndex = k;\n eventCount = ~k & SMASK; // clear wait count\n locallyFifo = pool.locallyFifo;\n Thread.UncaughtExceptionHandler ueh = pool.ueh;\n if (ueh != null)\n setUncaughtExceptionHandler(ueh);\n setDaemon(true);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
sequence of indices for horizontal seam | public int[] findHorizontalSeam() {
return null;
} | [
"public int[] findHorizontalSeam() {\n\t\tif (!transposed) {\n\t\t\ttranspose();\n\t\t}\n\t\treturn operateFindSeam();\n\t}",
"public int[] findHorizontalSeam() {\n if (!transposed) {\n transpose();\n }\n return findSeam();\n }",
"public int[] findHorizontalSeam() {\n isHorizontalCall = true;\n checkTransposed();\n int[] seam = findVerticalSeam();\n isHorizontalCall = false;\n return seam;\n }",
"public int[] findHorizontalSeam() {\n int[][] edgeTo = new int[height][width];\n double[][] distTo = new double[height][width];\n reset(distTo);\n for (int rows = 0; rows < height; rows++) {\n distTo[rows][0] = 1000;\n }\n // this is for relaxation.\n for (int columns = 0; columns < width - 1; columns++) {\n for (int rows = 0; rows < height; rows++) {\n relaxHorizontal(rows, columns, edgeTo, distTo);\n }\n }\n double minDist = Double.MAX_VALUE;\n int minRow = 0;\n for (int rows = 0; rows < height; rows++) {\n if (minDist > distTo[rows][width - 1]) {\n minDist = distTo[rows][width - 1];\n minRow = rows;\n }\n }\n int[] indices = new int[width];\n //to find the horizontal seam.\n for (int columns = width - 1, rows = minRow; columns >= 0; columns--) {\n indices[columns] = rows;\n rows -= edgeTo[rows][columns];\n }\n return indices;\n }",
"public int[] findHorizontalSeam(){\n horizontal = true; //indicate horizontal operation\r\n if (!transposed){transpose();} // transpose to use findVerticalSeam\r\n return findVerticalSeam();\r\n }",
"public int[] findVerticalSeam() {\n\t\tif (transposed) {\n\t\t\ttranspose();\n\t\t}\n\t\treturn operateFindSeam();\n\t}",
"public int[] findVerticalSeam() {\n return findSeam(false);\n }",
"public int[] findVerticalSeam() {\n if (!isTransposed) {\n transpose();\n }\n return findHorizontalSeamHelper();\n }",
"SmartList<Integer> getIndicesList();",
"public int[] findVerticalSeam() {\n double[][] energy = new double[height][width];\n int[][] edgeTo = new int[height][width];\n double[][] distTo = new double[height][width];\n reset(distTo);\n int[] indices = new int[height];\n if (width == 1 || height == 1) {\n return indices;\n }\n for (int i = 0; i < width; i++) {\n distTo[0][i] = 1000.0;\n }\n // this is for relaxation.\n for (int i = 0; i < height - 1; i++) {\n for (int j = 0; j < width; j++) {\n relaxVertical(i, j, edgeTo, distTo);\n }\n }\n // calculating from last rows\n // column wise\n double minDist = Double.MAX_VALUE;\n int minCol = 0;\n for (int columns = 0; columns < width; columns++) {\n if (minDist > distTo[height - 1][columns]) {\n minDist = distTo[height - 1][columns];\n minCol = columns;\n }\n }\n //indices values of shortest path.\n for (int rows = height -1, columns = minCol; rows >= 0; rows--) {\n indices[rows] = columns;\n columns -= edgeTo[rows][columns];\n }\n indices[0] = indices[1];\n return indices;\n }",
"private static int[] computeIndices() {\n \t\tint[] ret = new int[batch_size/numberOfProcessesPerBatch];\n \t\tfor (int i = 0; i < batch_size/numberOfProcessesPerBatch; i++) {\n \t\t\tret[i] = data_p[phase][i].index;\n \t\t}\n \t\treturn ret;\n \t}",
"public int[] findVerticalSeam() {\n if (transposed) {\n transpose();\n }\n return findSeam();\n }",
"Index getIndices(int index);",
"public List<Integer> getIndices(double offset, double width)\n {\n List<Integer> indices = new ArrayList<>();\n int begin = getIndex(offset);\n int range = getRange(offset, width);\n\n while (range > 0)\n {\n int index = begin % _totalPoints;\n indices.add(index);\n begin += 1;\n range -= 1;\n }\n\n return indices;\n }",
"public int[] findVerticalSeam() {\n int wid = energy.length;\n int het = energy[0].length;\n int[] vertSeam = new int[het];\n double[][] M = new double[wid][het];\n int[][] backtrack = new int[wid][het]; // log\n for (int x = 0; x < wid; x += 1) {\n M[x][0] = energy[x][0];\n backtrack[x][0] = x;\n }\n for (int y = 1; y < het; y += 1) {\n for (int x = 0; x < wid; x += 1) {\n double min = 0;\n if (x == 0) {\n min = M[x][y-1] < M[(x+1)%wid][y-1] ? M[x][y-1] : M[(x+1)%wid][y-1];\n backtrack[x][y] = M[0][y-1] < M[(x+1)%wid][y-1] ? 0 : (x+1)%wid;\n } else if (x == wid - 1) {\n min = M[wid-2][y-1] < M[wid-1][y-1] ? M[wid-2][y-1] : M[wid-1][y-1];\n backtrack[x][y] = M[wid-2][y-1] < M[wid-1][y-1] ? wid-2 : wid - 1;\n } else {\n min = Math.min(Math.min(M[x-1][y-1], M[x][y-1]), M[x+1][y-1]);\n backtrack[x][y] = findMin3(M[x-1][y-1], M[x][y-1], M[x+1][y-1], x - 1, x, x + 1);\n }\n M[x][y] = energy(x, y) + min;\n }\n }\n int index = findMinIndex(M);\n vertSeam[het - 1] = index;\n for (int y = het - 2; y >= 0; y -= 1) {\n vertSeam[y] = backtrack[index][y + 1];\n index = vertSeam[y];\n }\n return vertSeam;\n\n }",
"public List<Pair> calculateShipTileIndices() {\n List<Pair> shipTileIndices = new ArrayList<>();\n for (int i = 0; i < shipSize; i++) {\n if (orientation == Orientation.HORIZONTAL) {\n shipTileIndices.add(new Pair(startX + i, startY));\n } else {\n shipTileIndices.add(new Pair(startX, startY + i));\n }\n }\n return shipTileIndices;\n }",
"protected int [] getGeneIndices(int [] rows){\n int numGenes = 0;\n for(int i = 0; i < rows.length; i++)\n numGenes += clusters[rows[i]].length;\n int [] indices = new int [numGenes];\n int cnt = 0;\n for(int i = 0; i < rows.length; i++){\n for(int j = 0; j < clusters[rows[i]].length; j++){\n indices[cnt] = clusters[rows[i]][j];\n cnt++;\n }\n }\n return indices;\n }",
"java.util.List<java.lang.Integer> getOutputIndexList();",
"public void removeHorizontalSeam(int[] seam) {\n SeamCarver seamC = new SeamCarver(transpose(picture));\n seamC.removeVerticalSeam(seam);\n picture = transpose(seamC.picture());\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GENLAST:event_panel_preferences_left_proxyMouseClicked advanced button click | private void panel_preferences_left_advancedMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_panel_preferences_left_advancedMouseClicked
panel_preferences_left_general.setBorder(null);
panel_preferences_left_filters.setBorder(null);
panel_preferences_left_InternetUpdates.setBorder(null);
panel_preferences_left_scheduledScans.setBorder(null);
panel_preferences_left_fileLocations.setBorder(null);
panel_preferences_left_emailAlerts.setBorder(null);
panel_preferences_left_emailScanning.setBorder(null);
panel_preferences_left_limits.setBorder(null);
panel_preferences_left_reports.setBorder(null);
panel_preferences_left_proxy.setBorder(null);
panel_preferences_left_advanced.setBorder(border);
panel_preferences_left_mainMenu.setBorder(null);
CardLayout cardPanel = (CardLayout)panel_preferences_right.getLayout();
cardPanel.show(panel_preferences_right, "advanced");
} | [
"private void advancedBoxactionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_advancedBoxactionPerformed\r\n advancedClicked();\r\n }",
"private void btnAdvancedMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnAdvancedMouseClicked\n if(flagMode){\n pNormal.setVisible(true);\n pAdvanced.setVisible(false);\n btnAdvanced.setText(\"Clic para entrar en modo avanzado\");\n\n flagMode=false;\n flagModeView=true;\n }else{\n pNormal.setVisible(false);\n pAdvanced.setVisible(true);\n flagMode=true;\n flagModeView=false;\n btnAdvanced.setText(\"Clic para entrar en modo simple\");\n\n adFinder.requestFocus();\n\n }\n \n }",
"private void panel_preferences_left_reportsMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_panel_preferences_left_reportsMouseClicked\n \n panel_preferences_left_general.setBorder(null);\n panel_preferences_left_filters.setBorder(null);\n panel_preferences_left_InternetUpdates.setBorder(null);\n panel_preferences_left_scheduledScans.setBorder(null);\n panel_preferences_left_fileLocations.setBorder(null);\n panel_preferences_left_emailAlerts.setBorder(null);\n panel_preferences_left_emailScanning.setBorder(null);\n panel_preferences_left_limits.setBorder(null);\n panel_preferences_left_reports.setBorder(border);\n panel_preferences_left_proxy.setBorder(null);\n panel_preferences_left_advanced.setBorder(null);\n panel_preferences_left_mainMenu.setBorder(null);\n \n CardLayout cardPanel = (CardLayout)panel_preferences_right.getLayout();\n cardPanel.show(panel_preferences_right, \"reports\");\n }",
"public void leftClick();",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tParameters pars = PlanningTool.getInstance().getParameters();\n\t\tpars.nextOptCriteria();\n\t}",
"void pressedOnTheRessourcesPanel(Arrow staticArrow,MouseEvent e,Arrow[] arrow);",
"private void btnSiguienteMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnSiguienteMouseClicked\r\n \r\n if(PanelBalanceGeneral.getX() != 0){\r\n \r\n Contador++;\r\n Avanzar();\r\n \r\n if(PanelBalanceGeneral.getX() == 0){PanelActual = Paneles[1];}\r\n \r\n if(Contador-1 >= 0){\r\n \r\n btnAnterior.setToolTipText(Paneles[Contador-1]);\r\n btnSiguiente.setToolTipText(Paneles[Contador+1]);\r\n \r\n }\r\n \r\n }\r\n // TODO add your handling code here:\r\n }",
"@Override\n public void mousePressed(MouseEvent e)\n {\n mouseLeftClick = true;\n }",
"private void panel_preferences_left_mainMenuMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_panel_preferences_left_mainMenuMouseClicked\n \n panel_preferences_left_general.setBorder(null);\n panel_preferences_left_filters.setBorder(null);\n panel_preferences_left_InternetUpdates.setBorder(null);\n panel_preferences_left_scheduledScans.setBorder(null);\n panel_preferences_left_fileLocations.setBorder(null);\n panel_preferences_left_emailAlerts.setBorder(null);\n panel_preferences_left_emailScanning.setBorder(null);\n panel_preferences_left_limits.setBorder(null);\n panel_preferences_left_reports.setBorder(null);\n panel_preferences_left_proxy.setBorder(null);\n panel_preferences_left_advanced.setBorder(null);\n panel_preferences_left_mainMenu.setBorder(border);\n \n MainMenu m1 = new MainMenu();\n m1.setVisible(true);\n this.dispose();\n }",
"private void panel_preferences_left_filtersMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_panel_preferences_left_filtersMouseClicked\n \n panel_preferences_left_general.setBorder(null);\n panel_preferences_left_filters.setBorder(border);\n panel_preferences_left_InternetUpdates.setBorder(null);\n panel_preferences_left_scheduledScans.setBorder(null);\n panel_preferences_left_fileLocations.setBorder(null);\n panel_preferences_left_emailAlerts.setBorder(null);\n panel_preferences_left_emailScanning.setBorder(null);\n panel_preferences_left_limits.setBorder(null);\n panel_preferences_left_reports.setBorder(null);\n panel_preferences_left_proxy.setBorder(null);\n panel_preferences_left_advanced.setBorder(null);\n panel_preferences_left_mainMenu.setBorder(null);\n \n CardLayout cardPanel = (CardLayout)panel_preferences_right.getLayout();\n cardPanel.show(panel_preferences_right, \"filters\");\n }",
"private void panel_preferences_left_generalMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_panel_preferences_left_generalMouseEntered\n \n panel_preferences_left_general.setBackground(new Color(158,148,195));\n \n }",
"public void mousePressed(MouseEvent e) {\n\t VI.panelPressed(panel);\n\t }",
"private void panel_preferences_left_fileLocationsMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_panel_preferences_left_fileLocationsMouseClicked\n \n panel_preferences_left_general.setBorder(null);\n panel_preferences_left_filters.setBorder(null);\n panel_preferences_left_InternetUpdates.setBorder(null);\n panel_preferences_left_scheduledScans.setBorder(null);\n panel_preferences_left_fileLocations.setBorder(border);\n panel_preferences_left_emailAlerts.setBorder(null);\n panel_preferences_left_emailScanning.setBorder(null);\n panel_preferences_left_limits.setBorder(null);\n panel_preferences_left_reports.setBorder(null);\n panel_preferences_left_proxy.setBorder(null);\n panel_preferences_left_advanced.setBorder(null);\n panel_preferences_left_mainMenu.setBorder(null);\n \n CardLayout cardPanel = (CardLayout)panel_preferences_right.getLayout();\n cardPanel.show(panel_preferences_right, \"fileLocations\");\n }",
"private void panel_preferences_left_emailAlertsMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_panel_preferences_left_emailAlertsMouseClicked\n \n panel_preferences_left_general.setBorder(null);\n panel_preferences_left_filters.setBorder(null);\n panel_preferences_left_InternetUpdates.setBorder(null);\n panel_preferences_left_scheduledScans.setBorder(null);\n panel_preferences_left_fileLocations.setBorder(null);\n panel_preferences_left_emailAlerts.setBorder(border);\n panel_preferences_left_emailScanning.setBorder(null);\n panel_preferences_left_limits.setBorder(null);\n panel_preferences_left_reports.setBorder(null);\n panel_preferences_left_proxy.setBorder(null);\n panel_preferences_left_advanced.setBorder(null);\n panel_preferences_left_mainMenu.setBorder(null);\n \n CardLayout cardPanel = (CardLayout)panel_preferences_right.getLayout();\n cardPanel.show(panel_preferences_right, \"emailAlerts\");\n }",
"@Override\n\t\t\tpublic void onClick(ClickEvent event)\n\t\t\t{\n\t\t\t\tif (mainAppDisplay.getToggleButtonCreateQuickBlipIsDown())\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"@MainAppPresenter, @bind, @mainAppDisplay.getButtonCreateQuickBlip(), Button Down .\");\n\t\t\t\t\t\n\t\t\t\t\tdrawPointFeatureControl.activate();\n\t\t\t\t\t//clickSelectFeatureControl.deactivate();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"@MainAppPresenter, @bind, @mainAppDisplay.getButtonCreateQuickBlip(), Button Up .\");\n\n\t\t\t\t\tdrawPointFeatureControl.deactivate();\n\t\t\t\t\t//clickSelectFeatureControl.activate();\n\t\t\t\t}\n\t\t\t}",
"private void panel_preferences_left_emailScanningMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_panel_preferences_left_emailScanningMouseClicked\n \n panel_preferences_left_general.setBorder(null);\n panel_preferences_left_filters.setBorder(null);\n panel_preferences_left_InternetUpdates.setBorder(null);\n panel_preferences_left_scheduledScans.setBorder(null);\n panel_preferences_left_fileLocations.setBorder(null);\n panel_preferences_left_emailAlerts.setBorder(null);\n panel_preferences_left_emailScanning.setBorder(border);\n panel_preferences_left_limits.setBorder(null);\n panel_preferences_left_reports.setBorder(null);\n panel_preferences_left_proxy.setBorder(null);\n panel_preferences_left_advanced.setBorder(null);\n panel_preferences_left_mainMenu.setBorder(null);\n \n CardLayout cardPanel = (CardLayout)panel_preferences_right.getLayout();\n cardPanel.show(panel_preferences_right, \"emailScanning\");\n }",
"public void popupTriggered(MouseEvent e) {\n\t\t// for users to override\n\t}",
"@Override\r\n \tpublic void mouseReleased(MouseEvent e)\r\n \t{\r\n\t if (showDebug && e.isPopupTrigger()) {\r\n\t rightClickMenu.show(e.getComponent(),\r\n\t e.getX(), e.getY());\r\n\t }\r\n \t}",
"@Override\n\tpublic boolean onPreferenceClick(Preference pref)\n\t{\n\t\tthis.mCheckBox.performClick();\n\t\treturn true;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Assertion: HttpOpenFile.seek(n) will throw exepction when n = length_of_file. | public void testBoundarySeek() throws Exception
{
OpenFile dof = null;
try
{
// Open Default file.
dof = new DefaultOpenFile(TestDataFileHelper.getTestFilePath());
}
catch (Exception e)
{
fail("Exception occurred constructing DefaultOpenFile instance : " + e.getMessage());
}
try
{
// Verify file pointer points to BOF.
assertTrue("Expected initial position of 0, found " + dof.getFilePointer(), dof.getFilePointer() == 0);
// Seek just before EOF.
dof.seek(TestDataFileHelper.getTestFileLength() - 1);
assertTrue("Expected 1 byte remaining, found " + dof.available(), dof.available() == 1);
}
catch (Exception e)
{
dof.close();
fail("seek(EOF) threw IOExcepton " + e.getMessage());
}
try
{
// Verify seek(file_length) generates IOException.
dof.seek(TestDataFileHelper.getTestFileLength());
assertTrue("Expected 0 bytes remaining, found " + dof.available(), dof.available() == 0);
// fail("seek(EOF) failed to throw IOExcepton ");
}
catch (IOException e)
{
assertTrue(true);
}
finally
{
dof.close();
}
} | [
"@Test\n\tpublic void testRandomAccessFile() throws IOException {\n\t\tString fileName = archiveDownloadDir + \"/\" + UUID.randomUUID().toString();\n\t\tRandomAccessFile raf = new RandomAccessFile(fileName, \"rw\");\n\t\traf.setLength(DOWNLOAD_CHUNK_SIZE);\n\t\t// write at the start of file\n\t\traf.seek(0);\n\t\traf.write(\"At the start\".getBytes());\n\t\t// the middle\n\t\traf.seek(DOWNLOAD_CHUNK_SIZE/2);\n\t\traf.write(\"In the middle\".getBytes());\n\t\t// and at the end\n\t\traf.seek(DOWNLOAD_CHUNK_SIZE-10);\n\t\traf.write(\"At the end\".getBytes());\n\t}",
"public void testSeek() throws Exception\n {\n OpenFile dof = null;\n\n try\n {\n // Open Default file.\n dof = new DefaultOpenFile(TestDataFileHelper.getTestFilePath());\n }\n catch (Exception e)\n {\n fail(\"Exception occurred constructing DefaultOpenFile instance : \" + e.getMessage());\n }\n\n try\n {\n // Verify pointer points to BOF.\n assertTrue(\"Expected initial position of 0, found \" + dof.getFilePointer(), dof.getFilePointer() == 0);\n\n // Skip 3 spaces and verify position reflects seek.\n dof.seek(3);\n assertTrue(\"Expected post-seek position of 3, found \" + dof.getFilePointer(), dof.getFilePointer() == 3);\n }\n catch (IOException e)\n {\n fail(\"seek(valid value) threw unexpected Exception \" + e.getMessage());\n }\n finally\n {\n dof.close();\n }\n }",
"public void testLength() throws Exception\n {\n OpenFile dof = null;\n\n try\n {\n // Open Default file.\n dof = new DefaultOpenFile(TestDataFileHelper.getTestFilePath());\n }\n catch (Exception e)\n {\n fail(\"Exception occurred constructing DefaultOpenFile instance : \" + e.getMessage());\n }\n\n try\n {\n // Check length of file before reading any.\n assertTrue(\"Expected length of \" + TestDataFileHelper.getTestFileLength() + \", found \" + dof.length(),\n dof.length() == TestDataFileHelper.getTestFileLength());\n\n // Advance current position by reading and verify location.\n dof.read();\n assertTrue(\"Expected post-read length of \" + TestDataFileHelper.getTestFileLength() + \", found \"\n + dof.length(), dof.length() == TestDataFileHelper.getTestFileLength());\n }\n catch (IOException e)\n {\n fail(\"Unexpected IOExcepton while checking http file length \" + e.getMessage());\n }\n finally\n {\n dof.close();\n }\n }",
"public void testReverseSeek() throws Exception\n {\n OpenFile dof = null;\n\n try\n {\n // Open Default file.\n dof = new DefaultOpenFile(TestDataFileHelper.getTestFilePath());\n }\n catch (Exception e)\n {\n fail(\"Exception occurred constructing DefaultOpenFile instance : \" + e.getMessage());\n }\n\n try\n {\n // Verify file positioned at BOF.\n assertTrue(\"Expected initial position of 0, found \" + dof.getFilePointer(), dof.getFilePointer() == 0);\n\n // Read several lines, and verify pointer points to current\n // position.\n dof.read();\n dof.read();\n dof.read();\n\n assertTrue(\"Expected position of 3, found \" + dof.getFilePointer(), dof.getFilePointer() == 3);\n\n // Reset pointer and verify current position reflects seek.\n dof.seek(1);\n\n assertTrue(\"Expected initial position of 1, found \" + dof.getFilePointer(), dof.getFilePointer() == 1);\n }\n catch (IOException e)\n {\n fail(\"seek(negative valule) threw unexpected IOExcepton\" + e.getMessage());\n }\n finally\n {\n dof.close();\n }\n }",
"private boolean seekToPosition(long version) throws IOException {\n if (version < 0) {\n return false;\n }\n checkOpen();\n\n long position = version * RECORD_LENGTH;\n if (position >= file.length()) {\n return false;\n }\n\n file.seek(position);\n return true;\n }",
"public void testAvailable() throws Exception\n {\n OpenFile dof = null;\n\n try\n {\n // Open Default file.\n dof = new DefaultOpenFile(TestDataFileHelper.getTestFilePath());\n }\n catch (Exception e)\n {\n fail(\"Exception occurred constructing DefaultOpenFile instance : \" + e.getMessage());\n }\n\n try\n {\n // Verify whole file left at start.\n assertTrue(\"Expected remaining length of \" + TestDataFileHelper.getTestFileLength() + \", found \"\n + dof.available(), dof.available() == TestDataFileHelper.getTestFileLength());\n\n // Advance current position and verify remaining length.\n long skipLength = 5;\n long expectedRemaining = TestDataFileHelper.getTestFileLength() - skipLength;\n dof.seek(skipLength);\n assertTrue(\"Expected remaininglength of \" + expectedRemaining + \", found \" + dof.available(),\n dof.available() == expectedRemaining);\n\n // Advance position to EOF and verify nothing left available.\n\n dof.seek(TestDataFileHelper.getTestFileLength());\n\n assertTrue(\"Expected remaining length of 0, found \" + dof.available(), dof.available() == 0);\n }\n catch (IOException e)\n {\n e.printStackTrace();\n fail(\"Unexpected IOExcepton : \" + e.getMessage());\n }\n finally\n {\n dof.close();\n }\n }",
"@Test\n public void openReadWriteTruncExisting() throws Exception {\n String testFile = \"/openReadWriteTruncExisting\";\n try (CloseableFuseFileInfo closeableFuseFileInfo = new CloseableFuseFileInfo()) {\n FuseFileInfo info = closeableFuseFileInfo.get();\n createTestFile(testFile, info, FILE_LEN / 2);\n\n info.flags.set(OpenFlags.O_RDWR.intValue() | OpenFlags.O_TRUNC.intValue());\n Assert.assertEquals(0, mFuseFileSystem.open(testFile, info));\n try {\n ByteBuffer buffer = BufferUtils.getIncreasingByteBuffer(FILE_LEN);\n Assert.assertEquals(FILE_LEN, mFuseFileSystem.write(testFile, buffer, FILE_LEN, 0, info));\n buffer.clear();\n Assert.assertTrue(mFuseFileSystem.read(testFile, buffer, FILE_LEN, 0, info) < 0);\n } finally {\n Assert.assertEquals(0, mFuseFileSystem.release(testFile, info));\n }\n readAndValidateTestFile(testFile, info, FILE_LEN);\n }\n }",
"public void seek(long position) throws IOException;",
"public void testhasNextBytesFilePersistenceException() throws Exception {\r\n BytesIterator iterator = new InputStreamBytesIterator(new MockInputStream(), 10);\r\n try {\r\n iterator.hasNextBytes();\r\n fail(\"an exception occurs as inputStream is closed, throw FilePersistenceException\");\r\n } catch (FilePersistenceException e) {\r\n // good\r\n }\r\n }",
"public interface RandomAccessFile {\n // Read up to \"n\" bytes from the file starting at \"offset\".\n // If an error was encountered, returns a non-OK status.\n //\n // Safe for concurrent use by multiple threads.\n Pair<Status, String> read(int offset, int n);\n}",
"public void testNextBytesFilePersistenceException() {\r\n BytesIterator iterator = new InputStreamBytesIterator(new MockInputStream(), 10);\r\n try {\r\n iterator.nextBytes();\r\n fail(\"if an exception occurs while performing the operation, throw FilePersistenceException\");\r\n } catch (FilePersistenceException e) {\r\n // good\r\n }\r\n }",
"public int seek(int fd, int offset, int where);",
"@Test\n public void openWriteExistingWithTruncate() throws Exception {\n String testFile = \"/openWriteExistingWithTruncate\";\n try (CloseableFuseFileInfo closeableFuseFileInfo = new CloseableFuseFileInfo()) {\n FuseFileInfo info = closeableFuseFileInfo.get();\n createTestFile(testFile, info, FILE_LEN / 2);\n\n info.flags.set(OpenFlags.O_WRONLY.intValue());\n Assert.assertEquals(0, mFuseFileSystem.open(testFile, info));\n try {\n // truncate to original length is no-op\n Assert.assertEquals(0, mFuseFileSystem.truncate(testFile, FILE_LEN / 2));\n // truncate to a large value\n Assert.assertNotEquals(0, mFuseFileSystem.truncate(testFile, FILE_LEN));\n // delete file\n Assert.assertEquals(0, mFuseFileSystem.truncate(testFile, 0));\n Assert.assertEquals(0, mFuseFileSystem.truncate(testFile, FILE_LEN * 2));\n ByteBuffer buffer = BufferUtils.getIncreasingByteBuffer(FILE_LEN);\n Assert.assertEquals(FILE_LEN, mFuseFileSystem.write(testFile, buffer, FILE_LEN, 0, info));\n } finally {\n mFuseFileSystem.release(testFile, info);\n }\n info.flags.set(OpenFlags.O_RDONLY.intValue());\n Assert.assertEquals(0, mFuseFileSystem.open(testFile, info));\n try {\n ByteBuffer buffer = ByteBuffer.wrap(new byte[FILE_LEN]);\n Assert.assertEquals(FILE_LEN, mFuseFileSystem.read(testFile, buffer, FILE_LEN, 0, info));\n Assert.assertTrue(BufferUtils.equalIncreasingByteArray(FILE_LEN, buffer.array()));\n buffer = ByteBuffer.wrap(new byte[FILE_LEN]);\n Assert.assertEquals(FILE_LEN,\n mFuseFileSystem.read(testFile, buffer, FILE_LEN, FILE_LEN, info));\n for (byte cur : buffer.array()) {\n Assert.assertEquals((byte) 0, cur);\n }\n } finally {\n Assert.assertEquals(0, mFuseFileSystem.release(testFile, info));\n }\n }\n }",
"@Test(expected=IndexOutOfBoundsException.class)\n public void testCharAt_File() {\n System.out.println(\"charAt_File\");\n int index = 0; \n Charset cs = Charset.forName(UTF_8);\n InputStream stream = getInputStream(TypeOfStream.FILE, TypeOfContent.BYTE_0, cs);\n @SuppressWarnings(\"deprecation\")\n BufferedCharSequence instance = new BufferedCharSequence(stream, cs.newDecoder(), 0);\n instance.charAt(index);\n }",
"boolean getFileRange(String path, OutputStream stream, long startByteIndex, long endByteIndex) throws NotFoundException, IOException;",
"public void testClose() throws Exception\n {\n OpenFile dof = null;\n\n try\n {\n // Open Default file.\n dof = new DefaultOpenFile(TestDataFileHelper.getTestFilePath());\n }\n catch (Exception e)\n {\n fail(\"Exception occurred constructing DefaultOpenFile instance : \" + e.getMessage());\n }\n\n try\n {\n // Verify file is open by trying a seek.\n dof.seek(1);\n\n // Close file.\n dof.close();\n\n // Try seek again, and hopefully generate exception\n dof.seek(1);\n fail(\"Still able to do operations on closed file\");\n }\n catch (Exception e)\n {\n assertTrue(true);\n }\n finally\n {\n try\n {\n // No clear requirment as to whether this should fail.\n dof.close();\n // fail(\"Second attempt at close failed to throw exception.\");\n }\n catch (Exception e)\n {\n assertTrue(true);\n }\n }\n }",
"@Test\n public void openReadWriteNonExisting() throws Exception {\n String testFile = \"/openReadWriteNonExistingFile\";\n try (CloseableFuseFileInfo closeableFuseFileInfo = new CloseableFuseFileInfo()) {\n FuseFileInfo info = closeableFuseFileInfo.get();\n info.flags.set(OpenFlags.O_RDWR.intValue());\n Assert.assertEquals(0, mFuseFileSystem.open(testFile, info));\n try {\n ByteBuffer buffer = BufferUtils.getIncreasingByteBuffer(FILE_LEN);\n Assert.assertEquals(FILE_LEN, mFuseFileSystem.write(testFile, buffer, FILE_LEN, 0, info));\n buffer.clear();\n Assert.assertTrue(mFuseFileSystem.read(testFile, buffer, FILE_LEN, 0, info) < 0);\n } finally {\n Assert.assertEquals(0, mFuseFileSystem.release(testFile, info));\n }\n readAndValidateTestFile(testFile, info, FILE_LEN);\n }\n }",
"@Test\n\tpublic void testDownloadFile() {\n\t\tBigInteger bytesRead = downloader.downloadFile();\n\t\tassertEquals(634316, bytesRead.intValue());\n\t}",
"private void verifyOpen() throws IOException {\n if (byteBuffer == null) {\n throw new IOException(FSExceptionMessages.STREAM_IS_CLOSED);\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set the matrixed form by the 8 vector and 10 vector (by column) | public void set_matrix_8_10(final double x0, final double y0, final double x1, final double y1) {
x_8 = x0;
y_8 = y0;
x_10 = x1;
y_10 = y1;
} | [
"public void set_matrix_10_8(final double x0, final double y0, final double x1, final double y1) {\n x_10 = x0;\n y_10 = y0;\n x_8 = x1;\n y_8 = y1;\n }",
"@Test\n public void testSetMatrixColumn() {\n final Matrix33d mBase = getMatrix();\n final Matrix33d m = getMatrix();\n final Vector3d v = new Vector3d(D10, D11, D12);\n\n m.setMatrixColumn(v, 1);\n for (int i = 0; i < m.getA().length; i++) {\n if (i > 2 && i < 6) {\n // compare the row set to the vector values\n int vectorIndex = i - 3;\n assertEquals(m.getA()[i], v.a[vectorIndex]);\n } else {\n assertEquals(m.getA()[i], mBase.getA()[i]);\n }\n }\n }",
"public void set_matrix_9_10(final double x0, final double y0, final double x1, final double y1) {\n x_9 = x0;\n y_9 = y0;\n x_10 = x1;\n y_10 = y1;\n }",
"public void set_matrix_10_9(final double x0, final double y0, final double x1, final double y1) {\n x_10 = x0;\n y_10 = y0;\n x_9 = x1;\n y_9 = y1;\n }",
"private void buildMatrix() {\n\n int totalnumber=this.patents.size()*this.patents.size();\n\n\n\n int currentnumber=0;\n\n\n for(int i=0;i<this.patents.size();i++) {\n ArrayList<Double> temp_a=new ArrayList<>();\n for (int j=0;j<this.patents.size();j++) {\n if (i==j) temp_a.add(0.0); else if (i<j)\n {\n double temp = distance.distance(this.patents.get(i), this.patents.get(j));\n temp = (new BigDecimal(temp).setScale(2, RoundingMode.UP)).doubleValue();\n temp_a.add(temp);\n\n\n // simMatrix.get(i).set(j, temp);\n // simMatrix.get(j).set(i, temp);\n } else {\n temp_a.add(simMatrix.get(j).get(i));\n }\n currentnumber++;\n System.out.print(\"\\r\"+ProgressBar.barString((int)((currentnumber*100/totalnumber)))+\" \"+currentnumber);\n\n }\n simMatrix.add(temp_a);\n }\n System.out.println();\n\n }",
"private void initMatrixes() {\n a = new double[MAX][MAX];\n b = new double[MAX][MAX];\n c = new double[MAX][MAX];\n\n for(int i=0; i<MAX; i++) {\n for(int j=0; j<MAX; j++) {\n a[i][j] = (i+1)*(j+1);\n b[i][j] = (i+2)*(j+2);\n }\n } \n }",
"private static void createMatrix() {\n int k = inputDimension();\n matrix = new int[k][k];\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix.length; j++) {\n int sign = (int) (Math.random() * 100);\n int number = (int) (Math.random() * 10);\n matrix[i][j] = sign % 2 == 0 ? number : -number;\n }\n }\n }",
"public void addValoresMatrix() {\n\n for (int i = 0; i < matriz.getFilas(); i++) {\n for (int j = 0; j < matriz.getColumnas(); j++) {\n jTable1.setValueAt(matriz.getMatrix()[i][j], i, j);\n }\n }\n }",
"public void set_matrix_0_10(final double x0, final double y0, final double x1, final double y1) {\n x_0 = x0;\n y_0 = y0;\n x_10 = x1;\n y_10 = y1;\n }",
"private static int[] initB(int m,int n){\n int[][] mat=new int[m][n];\n int fact=1;\n for(int i=0;i<m;i++){\n for(int j=0;j<n;j++){\n mat[i][j]=(i+1)*(j+1);\n }\n } \n System.out.println(\"Matricea B :\");\n for(int i=0;i<m;i++){\n for(int j=0;j<n;j++) System.out.print(mat[i][j]+\" \");\n System.out.println();\n } \n return iMat2vect(mat); \n }",
"private static int[] initA(int m,int n){\n int[][] mat=new int[m][n];\n int fact=1;\n for(int i=0;i<m;i++){\n for(int j=0;j<n;j++){\n mat[i][j]=fact*(j+1);\n }\n fact*=10;\n } \n System.out.println(\"Matricea A :\");\n for(int i=0;i<m;i++){\n for(int j=0;j<n;j++) System.out.print(mat[i][j]+\" \");\n System.out.println();\n } \n return iMat2vect(mat); \n }",
"public void set_matrix_10_0(final double x0, final double y0, final double x1, final double y1) {\n x_10 = x0;\n y_10 = y0;\n x_0 = x1;\n y_0 = y1;\n }",
"public void transpose_8_10() {\n final double t = y_8;\n y_8 = x_10;\n x_10 = t;\n }",
"public void fillMatrix(){\n Random random = new Random();\n for (int i=0; i<array.length; i++){\n for (int j=0; j<array.length; j++){\n array [i][j] = random.nextInt(90)+10;\n }\n }\n }",
"public void conceptosMatrices() {\n int[][] matriz={\n {5,\t6,\t6},\n {5,\t6,\t2},\n {5,\t6,\t2},\n {5,\t6,\t2}\n };\n //declarar una matrizX sin datos pero de 3x3\n int[][] matrizX=new int[3][5];\n\n matrizX=new int[4][4];\n //Colocando valores en una matrizX en los indices 1,0 \n matrizX[1][0]=12;\n //obteniendo el valor o el elemento de los indices 1,0\n System.out.println(\"matrizX[1][0] su valor es:\"+matrizX[1][0]);\n //obteniendo el tamanho de la matriz en filas\n System.out.println(\"Obtener tamanho en filas:\"+matrizX.length); \n //obteniendo el tamanho de la matriz en columnas\n System.out.println(\"Obtener tamanho en filas:\"+matrizX[0].length);\n //declarando una matriz \n int[][] matrizXY;\n matrizXY=new int[matrizX[0].length][matrizX.length];\n\n }",
"static void llenar_Matriz(){\n for (int i = 0; i < N; i++)\n for (int j = 0; j < N; j++){\n A[i][j] = 2 * i + j;\n B[i][j] = 2 * i - j;\n C[i][j] = 0;\n }\n }",
"public void transpose_10_8() {\n final double t = y_10;\n y_10 = x_8;\n x_8 = t;\n }",
"public void set_matrix_10_3(final double x0, final double y0, final double x1, final double y1) {\n x_10 = x0;\n y_10 = y0;\n x_3 = x1;\n y_3 = y1;\n }",
"public void set_matrix_10_4(final double x0, final double y0, final double x1, final double y1) {\n x_10 = x0;\n y_10 = y0;\n x_4 = x1;\n y_4 = y1;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get the sections for the lab, tutorial and discussion | public List<String> getSections(){
return new ArrayList<>(Arrays.asList(lab, tutorial, discussion));
} | [
"List<Section> getSections();",
"public List<WebPage> getSections(HttpSession session) {\r\n\t\tUtilHttpSession hos = new UtilHttpSession(session);\r\n\t\tUsers user = getUser(hos.getloggedUserId());\r\n\t\tif(user.getProfile().getUpId().equals(1)){\r\n\t\t\treturn getSections();\r\n\t\t}\r\n\t\telse{\r\n\t\t\tList<WebPage> sections = new ArrayList<WebPage>();\r\n\t\t\tSet<AProfilePages> app = user.getProfile().getAProfilePageses();\r\n\t\t\tfor (Iterator<AProfilePages> iterator = app.iterator(); iterator.hasNext();) {\r\n\t\t\t\tAProfilePages profilePages = (AProfilePages) iterator.next();\r\n\t\t\t\tif(profilePages.getWebPage().getPageType().equals(PageType.SECTION())){\r\n\t\t\t\t\tsections.add((Section)getSection(profilePages.getWebPage().getWpId()));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn sections;\t\r\n\t\t}\r\n\t\t\r\n\t}",
"public ArrayList<ArrayList<String>> getSectionsInformation() {\n // If there is no composite medication information\n if (indiceCompositeMedication == -1){\n return null;\n }\n\n // Declare and Initialize variables\n ArrayList<ArrayList<String>> sections = new ArrayList<>();\n\n // Get information from third Child\n NodeList nList_sectionsFirstLevel = documentsEntrys.get(indiceCompositeMedication).getElementsByTagName(SECTION);\n\n // First level <section>\n for (int i = 0; i < nList_sectionsFirstLevel.getLength(); i++) {\n Element element_sectionFirstLevel = (Element) nList_sectionsFirstLevel.item(i);\n\n // Generate NodeList with second level <section><section>\n NodeList nodeList = element_sectionFirstLevel.getElementsByTagName(SECTION);\n\n\n // determinate if additional information exist. If it exist the last section will be hilarious\n int additionalInformation = 0;\n //if (indiceAdditionalNotes != -1) {\n // additionalInformation = 1;\n //}\n\n // Go through all sections\n for(int j = 0; j < (nodeList.getLength() - additionalInformation); j++) {\n // Initialize variables\n ArrayList<String> reference = new ArrayList<>();\n\n // Get Tags with 'title'\n Element elementTitle = (Element) nodeList.item(j);\n NodeList nList_title = elementTitle.getElementsByTagName(TITLE);\n if (nList_title.getLength() != 0){\n Element elementTitleTag = (Element) nList_title.item(0);\n reference.add(0, elementTitleTag.getAttribute(VALUE));\n } else {\n reference.add(0, EMPTYSTRING);\n }\n\n // Get Tags with 'reference'\n Element elementReference = (Element) nodeList.item(j);\n NodeList nList_reference = elementReference.getElementsByTagName(REFERENCE);\n // Go through all references\n for(int k = 0; k < nList_reference.getLength(); k++){\n Element elementReferenceTag = (Element) nList_reference.item(k);\n reference.add(k + 1, elementReferenceTag.getAttribute(VALUE));\n }\n\n // Get free text with tag 'display'\n Element elementText = (Element) nodeList.item(j);\n NodeList nList_text = elementText.getElementsByTagName(\"div\");\n\n if(nList_text.getLength() != 0) {\n String freeText = nList_text.item(0).getTextContent();\n reference.add(nList_reference.getLength() + 1, freeText);\n }\n\n sections.add(reference);\n }\n }\n\n return sections;\n }",
"public List<CourseSection> getViewableSectionsForCurrentUser();",
"public static Section[] getSections(IDocument scripterDoc){\n\t\tString content = scripterDoc.get();\n\t\tArrayList<TestCase> testCases = new ArrayList<TestCase>();\n\t\t\n\t\tif(currentSections == null){\n\t\t\tcurrentSections = new ArrayList<Section>();\n\t\t}\n\n\t\tfor(int i = 0; i < currentSections.size(); i++){\n\t\t\tcurrentSections.get(i).setIsDeleted(true);\n\t\t}\n\t\t\n\t\tint currentPos = 0;\n\t\twhile(currentPos < content.length()){\n\t\t\tint startIndex = content.indexOf(ScripterWordsProvider.TEST_TAG, currentPos);\n\t\t\tint endIndex = content.indexOf(ScripterWordsProvider.END_TEST_TAG, currentPos);\n\t\t\tif(endIndex > 0){\n\t\t\t\tendIndex += ScripterWordsProvider.END_TEST_TAG.length();\n\t\t\t\tint positionOfNewLine = content.indexOf(\"\\n\", endIndex);\n\t\t\t\tif(positionOfNewLine > -1){\n\t\t\t\t\tendIndex = positionOfNewLine + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(startIndex > -1 && endIndex > -1){\n\t\t\t\tif(startIndex < endIndex) {\n\t\t\t\t\tString titleValue = getTitle(content, startIndex, endIndex);\n\t\t\t\t\tif(titleValue != null && titleValue.length() > 0){\n\t\t\t\t\t\tint titleIndex = content.indexOf(titleValue, startIndex);\n\t\t\t\t\t\tTestCase testCase = new TestCase(titleValue);\n\t\t\t\t\t\ttestCase.setStartOffset(titleIndex + titleValue.length());\n\t\t\t\t\t\ttestCase.setEndOffset(endIndex);\n\t\t\t\t\t\t\n\t\t\t\t\t\tString testContent = content.substring(startIndex, endIndex);\n\t\t\t\t\t\tfor(int i = 0; i < currentSections.size(); i++){\n\t\t\t\t\t\t\tif(currentSections.get(i).getContent().equals(testContent)){\n\t\t\t\t\t\t\t\ttestCase.setIsNew(false);\n\t\t\t\t\t\t\t\tcurrentSections.get(i).setIsDeleted(false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(testCase.getIsNew()){\n\t\t\t\t\t\t\ttestCase.setContent(testContent);\n\t\t\t\t\t\t\tcurrentSections.add(testCase);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttestCases.add(testCase);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcurrentPos = endIndex;\n\t\t}\n\t\t\n\t\tint i = 0;\n\t\twhile(i < currentSections.size()){\n\t\t\tif(currentSections.get(i).getIsDeleted()){\n\t\t\t\tcurrentSections.remove(i);\n\t\t\t}\n\t\t\telse{\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn testCases.toArray(new TestCase[0]);\n\t}",
"public Vector<Section> getSections ()\r\n\t{\r\n\t\treturn (sections);\r\n\t}",
"private void parseMainSections(Document doc) {\n // look for section links on the main page - fail immediately if we can't find them!\n Elements sections = doc.getElementsByClass(\"category\");\n if (sections.size() == 0) {\n fail(\"unable to parse main forum page - 0 links found!\");\n return;\n }\n\n // parse each section to get its data, and add a 'forum' to the top level list\n for (Element section : sections) {\n Element link = section.select(\"a\").first();\n String title = link.text();\n String url = link.attr(\"abs:href\");\n\n addForumToList(forumSections, ForumRepository.TOP_LEVEL_PARENT_ID, url, title, \"\");\n }\n }",
"public static Map<String, Section> getSections() {\n\t\treturn sections;\n\t}",
"public List getSections() {\n\t\tif (reloadOnGet) {\n\t\t\tloadFile();\n\t\t}\n\n\t\treturn new Vector(sections.keySet());\n\t}",
"@Test\n\tpublic void testSectionsLoaded() throws Exception {\n\t\ttry {\n\t\t\tcmService.getSection(\"biology_101_01_lec01\");\n\t\t} catch (IdNotFoundException ide) {\n\t\t\tAssert.fail();\n\t\t}\n\t}",
"@Internal\n public Map<String, DashboardSection> getSections()\n {\n maybeAddDefaultSections();\n return fSections;\n }",
"public int[] getSections(String subject){\n int[] sections = {};\n\n return sections;\n }",
"@Test\n\tpublic void testReadSections() {\n\t\tTheaterInputOutputService theaterInputOutputService=new TheaterInputOutputService();\n\t\tassertEquals(theaterInputOutputService.getSectionList().size(),0);\n\t\ttheaterInputOutputService.readSections(\"6 6\", 1);\n\t\ttheaterInputOutputService.readSections(\"3 5 5 3\", 2);\n\t\ttheaterInputOutputService.readSections(\"4 6 6 4\", 3);\n\t\ttheaterInputOutputService.readSections(\"2 8 8 2\", 4);\n\t\ttheaterInputOutputService.readSections(\"6 6\", 5);\n\t\tassertEquals(theaterInputOutputService.getSectionList().size(),16);\n\t\tSection section=new Section(5,1 , 6);\n\t\tassertEquals(theaterInputOutputService.getSectionList().get(14),section);\n\t}",
"SectionList createSectionList();",
"public List<Section> getSections() {\n return Collections.unmodifiableList(sections);\n }",
"private Section createTestCasesSection() {\n String[][] questions = {\n {\"51\", \"90\", \"Unit test cases exists for all public methods in the design...\"},\n {\"52\", \"10\", \"The UnitTests source file calls each unit test...\"},\n };\n\n Section result = new Section();\n result.setId(5);\n result.setWeight(40);\n result.setName(\"Test Cases\");\n\n createAndAddQuestions(questions, result);\n\n return result;\n }",
"public void viewAllCourses()\n {\n System.out.println(\"Semester A\");\n viewASemesterCourses(\"A\");\n System.out.println(\"Semester B\");\n viewASemesterCourses(\"B\");\n System.out.println(\"Semester C\");\n viewASemesterCourses(\"C\");\n }",
"public synchronized String[] getSectionTitles() {\n if (props == null) {\n try {\n reload();\n } catch (Fault f) {\n // should this maybe be a JavaTestError?\n return null;\n }\n }\n\n // look for what we need from easiest to hardest source\n String names = PropertyArray.get(props, SECTIONS);\n\n if (names != null) {\n // it is cached\n return StringArray.split(names);\n } else if (sections != null) {\n // TR is not immutable yet, probably\n int numSections = getSectionCount();\n String[] data = new String[numSections];\n\n for (int i = 0; i < numSections; i++) {\n data[i] = sections[i].getTitle();\n }\n\n return data;\n } else {\n // hum, bad. No sections exist and this data isn't cached\n // the test probably has not run\n return null;\n }\n }",
"public List<SectionModel> getSections() {\n List<SectionModel> sectionModels = new ArrayList<>();\n Realm realm = Realm.getDefaultInstance();\n RealmResults<SectionRealmModel> results = realm.where(SectionRealmModel.class).findAll();\n for (SectionRealmModel sectionRealmModel : results)\n sectionModels.add(getSectionModel(sectionRealmModel));\n return sectionModels;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Unread the given number of previously read bytes. | public void unread(int len) {
if (this.off - len < 0)
throw new IndexOutOfBoundsException();
this.off -= len;
} | [
"private void localUnread(byte[] buffer, int off, int len) throws IOException\n {\n if (datapos < len) \n {\n throw new IOException(\"ByteArrayParserInputStream.unread(int): \" +\n \"cannot unread \" + len + \n \" bytes at buffer position \" + datapos);\n }\n datapos -= len;\n System.arraycopy(buffer, off, data, datapos, len);\n }",
"public int countUnread() throws ZXException{\r\n return countUnread(null);\r\n }",
"@NonNegative\n long getAndClearMissedReadCount();",
"public void setUnreadCount(int unreadCount) {\n this.unreadCount = unreadCount;\n }",
"@NonNegative\n long getAndClearReadCount();",
"public void unread(PushbackInputStream in) throws Exception {\r\n\t\tif (length != null)\r\n\t\t\tlength.unread(in);\r\n\t}",
"@Override\n public int getUnreadCount() {\n return this.unreadCount;\n }",
"long getReadsIncomplete();",
"public void clearUnreadMessageNumber() {\n this.mUnreadMessageNum = 0;\n }",
"public final void unreadFrame() throws IOException {\n if (wordpointer == -1 && bitindex == -1 && (framesize > 0)) {\n source.unread(frame_bytes,0,framesize);\n }\n }",
"@Override\n public long skip(long n) {\n synchronized (ByteArrayStreams.this) {\n checkState();\n if (pos + n > count) {\n n = count - pos;\n }\n if (n < 0) {\n return 0;\n }\n pos += n;\n return n;\n }\n }",
"public void resetReadCount()\n {\n bytesRead = 0;\n }",
"private int checkNegativeUnreads(int count) {\n if (count < 0) {\n Log.w(this.getClass().getName(), \"Negative unread count found and rounded up to zero.\");\n return 0;\n }\n return count;\n }",
"int getAllUnreadMessages();",
"public long skip(long n) throws java.io.IOException{\n return read(new byte[(int)n]); \n }",
"public void addUnreadMessageNumber() {\n this.mUnreadMessageNum++;\n }",
"public void setUnread(boolean unread) {\r\n this.unread = unread;\r\n }",
"private void unreadBuffer( StringBuffer buffer, CharReader reader ) throws IOException {\n\n\t\tString aux = buffer.toString();\n\t\tfor ( int x = (aux.length() - 1); x >= 0; x-- ) {\n\t\t\treader.unreadChar( aux.charAt( x ) );\n\t\t}\n\t}",
"public byte[] readBytes(int inNumberMessages) throws IOException;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Downloads CSV file based on tickerName | private String downloadFile(String theTicker) throws MalformedURLException, IOException
{
String preUrl = "http://chart.finance.yahoo.com/table.csv?s=" + theTicker + "&a=3&b=12&c=1996&d=0&e=31&f=2017&g=d&ignore=.csv";
String fileLocString = "StockFiles\\" + theTicker + ".csv";
File currentFile = new File (fileLocString); // creates the file object to be used two lines down
URL currentUrl = new URL (preUrl); //creates a url to use on next line
FileUtils.copyURLToFile(currentUrl, currentFile); //actually downloads the file
return fileLocString;
} | [
"private static Path tickerPath(String ticker) {\n\t\treturn FileSystems.getDefault().getPath(\"src\", \"main\", \"resources\", \"ticker\", ticker.toLowerCase() + \".csv\");\n\t}",
"static void getAllSymbolsData()\n {\n try{\n BufferedReader br = new BufferedReader(new FileReader(\"data/tickers.csv\"));\n\n String sCurrentLine;\n int record= 0;\n while ((sCurrentLine = br.readLine()) != null) {\n String [] arr = sCurrentLine.split(\",\");\n String ticker = arr[0].substring(1, arr[0].length() - 1);\n ArrayList<Row> temp = getStockData(ticker);\n if( temp.size()> 90) {\n PrintWriter writer = new PrintWriter(\"data/stockData/\"+ticker, \"UTF-8\");\n for(Row row: temp) {\n writer.println(row);\n }\n writer.close();\n System.out.println(++record + \" \" + arr[0].substring(1, arr[0].length() - 1) + \" \" + temp.size());\n }\n }\n }\n catch(Exception e)\n {\n System.out.print(\"\");\n }\n\n }",
"public void getAllCompanyInfo() throws FileNotFoundException, IOException\r\n {\r\n \r\n String tickerFileLoc = \"companylist.csv\";\r\n CSVReader nameReader = new CSVReader(new FileReader(tickerFileLoc));\r\n \r\n String[] nextLine;\r\n String tempFileLoc;\r\n int x = 0;\r\n \r\n while ((nextLine = nameReader.readNext()) != null)\r\n {\r\n HashMap<String, SingleDayQuote> oneDay = new HashMap<>();\r\n if (x == 0){x++;continue;} //skips CSV category header\r\n if (x > 6){break;} //temporary, to prevent downloading more than 6 companys info\r\n \r\n String tempTicker = nextLine[0];\r\n tempFileLoc = \"StockFiles\\\\\" + tempTicker + \".csv\";\r\n \r\n //downloadFile(tempTicker);\r\n \r\n Company tempCompany = new Company(tempTicker, pullInfo(tempFileLoc));\r\n allCompanys.put(tempTicker, tempCompany);\r\n \r\n \r\n x++;\r\n }\r\n \r\n }",
"public void downloadRateSheetHistory()\n\t{\n\t\tclick_button(\"Download CSV Button\", downloadCSVButton);\n\t\tfixed_wait_time(5);\n\t\t\n\t\tif(isFileDownloaded(\"rateSheetHistory.csv\"))\n\t\t\toReport.AddStepResult(\"\", \"Clicked on Download CSV icon, Verified that filtered results are downloaded\", \"PASS\");\n\t\telse\n\t\t\toReport.AddStepResult(\"\", \"Clicked on Download CSV icon, but that filtered results are not downloaded\", \"FAIL\");\n\t\t\n\t\tcsvToExcel();\n\t\t@SuppressWarnings(\"static-access\")\n\t\tint recordsCount = oExcelData.getRowCount(getTheNewestFile(oParameters.GetParameters(\"downloadFilepath\"), \"xlsx\"));\n\t\toParameters.SetParameters(\"recordsInExcel\", String.valueOf(recordsCount));\n\t\t\n\t\tdeleteFile(\"C:/CCM/Downloads/rateSheetHistory.csv\");\n\t\t\n\t\tdeleteFile(\"C:/CCM/Downloads/rateSheetHistory.xlsx\");\n\t\t\n/*\t\tFile csvFile = new File(oParameters.GetParameters(\"downloadFilepath\")+\"/rateSheetHistory.csv\");\n\t\tcsvFile.delete();\n\t\t\n\t\tFile xlsxFile = new File(oParameters.GetParameters(\"downloadFilepath\")+\"/rateSheetHistory.xlsx\");\n\t\txlsxFile.delete();*/\n\t\t\n\t\tif(oParameters.GetParameters(\"UserFilteredRecords\").equals(oParameters.GetParameters(\"recordsInExcel\")))\n\t\t\toReport.AddStepResult(\"\", \"Clicked on Download CSV icon, Verified that filtered results are displayed in excel sheet \", \"PASS\");\n\t\telse\n\t\t\toReport.AddStepResult(\"\", \"Clicked on Download CSV icon, But that filtered results are not displayed in excel sheet \", \"FAIL\");\t\t\n\t}",
"@Override\n protected List<ChannelDAO> doInBackground(URL... urls) {\n return fetchChannelCSV(urls[0]);\n }",
"URI getCsv();",
"private List<ChannelDAO> fetchChannelCSV(URL url) {\n // open new connection and get content\n try {\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));\n\n // parse the input and transform the csv content into a map\n List<ChannelDAO> channelList = new ArrayList<ChannelDAO>();\n String line = reader.readLine();\n while (line != null) {\n channelList.add(ChannelDAO.parse(line));\n line = reader.readLine();\n }\n\n return channelList;\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return new ArrayList<ChannelDAO>(0);\n }",
"@Override\r\n public String getCompanyListing(String ticker) {\r\n\r\n String data = fetchData(ticker);\r\n return data.trim();\r\n }",
"public static List<YahooStock> retrieveYahooStocks(String symbol) {\n\t\tURL yahooFinanceUrl2 = null;\n\t\tURLConnection urlConnection;\n\t\tList<YahooStock> yahooStockList = null;\n\t\ttry {\n\t\t\t//yahooFinanceUrl1 = new URL(\"http://download.finance.yahoo.com/d/quotes.csv?s=\" + symbol + \"&f=sl1d1t1c1ohgv&e=.csv\");\n\t\t\tyahooFinanceUrl2 = new URL(\"http://finance.yahoo.com/d/quotes.csv?s=\" + symbol + \"&f=sl1d1t1c1ohgv&e=.csv\");\n\t\t} catch (MalformedURLException mue) {\n\t\t\tmue.printStackTrace();\n\t\t} \n\t\ttry {\n\t\t\turlConnection = yahooFinanceUrl2.openConnection();\n\t\t\tBufferedReader dataIn = new BufferedReader(new InputStreamReader(urlConnection.getInputStream())); \n\t\t\tString inputLine; \n\t\t\tyahooStockList = new ArrayList<YahooStock>();\n\t\t\twhile ((inputLine = dataIn.readLine()) != null) {\n\t\t\t\tString[] yahooStockInfo = inputLine.split(\",\");\n\t\t\t\tYahooStock yahooStock = new YahooStock();\n\t\t\t\tyahooStock.setSymbol(yahooStockInfo[0].replaceAll(\"\\\"\", \"\"));\n\t\t\t\tyahooStock.setLastTrade(Double.valueOf(yahooStockInfo[1]));\n\t\t\t\tyahooStock.setTradeDate(yahooStockInfo[2]);\n\t\t\t\tyahooStock.setTradeTime(yahooStockInfo[3]);\n\t\t\t\tyahooStock.setChange(Double.valueOf(yahooStockInfo[4]));\n\t\t\t\tyahooStock.setOpen(Double.valueOf(yahooStockInfo[5]));\n\t\t\t\tyahooStock.setHigh(Double.valueOf(yahooStockInfo[6]));\n\t\t\t\tyahooStock.setLow(Double.valueOf(yahooStockInfo[7]));\n\t\t\t\tyahooStock.setVolume(Double.valueOf(yahooStockInfo[8]));\n\t\t\t\tyahooStock.setSmallChartUrl(\"http://ichart.finance.yahoo.com/t?s=\" + yahooStock.getSymbol());\n\t\t\t\tyahooStock.setLargeChartUrl(\"http://chart.finance.yahoo.com/w?s=\" + yahooStock.getSymbol());\n\t\t\t\tyahooStockList.add(yahooStock);\n\t\t\t} \n\t\t\tdataIn.close(); \n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t} \n\t\treturn yahooStockList; \t\n\t}",
"public void download(String stickerCategoryId, StickerStorage storage);",
"public void setTicker(java.lang.String ticker) {\n this.ticker = ticker;\n }",
"@GetMapping(\"/api/download/csv/\")\n public void downloadFile(HttpServletResponse response) throws IOException {\n response.setContentType(\"text/csv\");\n response.setHeader(\"Content-Disposition\", \"attachment; filename=customers.csv\");\n uploadsService.loadFile(response.getWriter());\n }",
"@Scheduled(cron=\"0 51 22 * * *\")\n public void downloadStockData() throws IOException {\n System.out.println(\"Downloading Stock Quotes....\");\n \tDownloadData.main(null);\n }",
"@GetMapping(\"/csv\")\n public ResponseEntity<Resource> csv() {\n String fileName = Path.of(\"assets\", \"sample\", \"csv.csv\").toString();\n return downloadFile(fileName);\n }",
"List<String[]> downloadUrl(String myurl) throws IOException {\r\n\t\tInputStream is = null;\r\n\r\n\t\ttry {\r\n\t\t\tURL url = new URL(myurl);\r\n\t\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\r\n\t\t\tconn.setReadTimeout(10000 /* milliseconds */);\r\n\t\t\tconn.setConnectTimeout(15000 /* milliseconds */);\r\n\t\t\tconn.setRequestMethod(\"GET\");\r\n\t\t\tconn.setDoInput(true);\r\n\t\t\t// Starts the query\r\n\t\t\tconn.connect();\r\n\t\t\tint response = conn.getResponseCode();\r\n\t\t\tLog.d(TAG, \"The response is: \" + response);\r\n\t\t\tis = conn.getInputStream();\r\n\r\n\t\t\tCSVReader reader = new CSVReader(new InputStreamReader(is, \"UTF-8\"));\r\n\t\t\ttry {\r\n\t\t\t\tList<String[]> lines = reader.readAll();\r\n\t\t\t\treturn lines;\r\n\t\t\t} finally {\r\n\t\t\t\treader.close();\r\n\t\t\t}\r\n\r\n\t\t\t// Makes sure that the InputStream is closed after the app is\r\n\t\t\t// finished using it.\r\n\t\t} finally {\r\n\t\t\tif (is != null) {\r\n\t\t\t\tis.close();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@RequestMapping(value = {\"downloadCsvFile\"})\r\n\tpublic void downloadCsvFile(@Valid DownLoadFilePara downLoadFilePara,\r\n\t\t\tHttpServletResponse response, HttpServletRequest request, \r\n\t\t\tRedirectAttributes redirect, ModelMap model) throws Exception {\r\n\t\tSampleModel sample = new SampleModel();\r\n\t\tsample.setNavi(\"file\");\r\n\r\n\t\tString realPath = null;\r\n\t\tif(downLoadFilePara.getOption() == null || downLoadFilePara.getOption().equals(\"0\")) {\r\n\t\t\t// Down Load file\r\n\t\t\tthis.handleFileDownload(downLoadFilePara.getFileName(), \"csv\", sampleService.makeCsvFile(), response);\t\t\t\r\n\t\t} else {\r\n\t\t\trealPath = request.getSession().getServletContext().getRealPath(\"/\");\r\n\t\t\tthis.handleFileSave(downLoadFilePara.getFileName(), \"csv\", sampleService.makeCsvFile(), realPath+\"files/\");\t\t\t\r\n\t\t}\r\n\t\tmodel.addAttribute(\"model\", sample);\r\n\t\t// Add parameter for Redirect URL\r\n\t\t// redirect.addFlashAttribute(\"filePath\", \"/\" + downLoadFilePara.getFileName());\r\n\t\t// return \"redirect:/sample/file/downloadFiles\";\r\n\t}",
"@Secured({ AuthoritiesConstants.PROFESSOR })\n @RequestMapping(value = \"/submissions/download\", method = RequestMethod.GET, produces = \"text/csv\")\n public void download(HttpServletResponse response) throws IOException {\n\n List<Submissions> listSubmissions = new ArrayList<>();\n\n List<Submissions> submissions1 = submissionsRepository.findAll();\n submissions1.forEach(subm -> {\n listSubmissions.add(subm);\n });\n response.setContentType(\"text/plain; charset=utf-8\");\n response.setHeader(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\\\"\" + \"download.csv\" + \"\\\"\");\n\n WriteCsvToResponse.writeSubmissionList(response.getWriter(), listSubmissions);\n }",
"List<Ticker> getTickers() throws IOException;",
"private List<String> getData(String date, String link) {\n\t\tList<String> list = new ArrayList<>();\n\t\ttry {\n\t\t\tURL url = new URL(link + date + \".csv\");\n\n\t\t\tHttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\t\t\tconnection.setRequestMethod(\"GET\");\n\t\t\ttry (BufferedReader input = new BufferedReader(new InputStreamReader(connection.getInputStream()))) {\n\t\t\t\tString line;\n\t\t\t\twhile ((line = input.readLine()) != null) {\n\t\t\t\t\tlist.add(line);\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tconnection.disconnect();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tlogger.error(\"Error in getting the data\");\n\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Metodo obtenerSubbodegasPorArticulo, utilizado para obtener subbodegas por articulo | Collection<BodegaDTO> obtenerSubbodegasPorProveedor(Integer codigoCompania, String codigoProveedor); | [
"public abstract List<Subproducto> listarSubproducto(EntityManager sesion, Subproducto subproducto);",
"public Collection<String> obtenerCodigosArticulosSubClasificaciones(SubClasificacionDTO subClasificacion) throws SICException;",
"SubProduct readSubProduct(int id);",
"public Nodo DondeEsMasBaratoSubir(){\n Nodo Futuro = new Nodo(inicial.getX()+1, inicial.getY());\n Nodo Destino1 = new Nodo(inicial.getX(), inicial.getY()+1);\n Nodo Destino2 = new Nodo(Futuro.getX(), Futuro.getY()+1);\n\n int heuristica1 = heuristica(inicial, Destino1);\n int heuristica2 = heuristica(Futuro, Destino2);\n\n if (heuristica1 <= heuristica2){\n return inicial;\n }\n else{\n return Futuro;\n }\n\n }",
"public abstract Collection<BodegaDTO> obtenerSubbodegasPorFuncionario(BodegaVO bodegaVO,FuncionarioDTO funcionarioDTO) throws SICException;",
"List<CategoriaCarta> obtenerListadoDeCategoriasSuperiores();",
"public lista sublista (int inicio) {\n return this.sublista(inicio, this.dimension());\n }",
"public Collection<VistaProveedorDTO> buscarProveedorPorSubbodega(OrdenCompraContingenciaPedidoAsistidoVO parametrosBusqueda, Integer firstResult, Integer maxResult) ;",
"public ProductCatSubcat getProductCatSubcat(int prno);",
"public Collection<AreaTrabajoDTO> obtenerAreaSublugarTrabajo(Integer codigoCompania, Integer centroDistribucion);",
"BodegaDTO obtenerSubbodegaPorBodegaProveedor(Integer codigoCompania,String codigoBodega, String codigoProveedor);",
"public List findSubcatByNo(int catno);",
"java.util.List<Googleplay.LineItem> \n getSubItemList();",
"public void testObtenerSubcategoriasDeUnaCategoria() {\n System.out.println(\"obetenerSubcategoriasDeUnaCategoria\");\n Categoria categoria = new Categoria(1);\n List<Categoria> result = servicioCategoria.obtenerSubcategoriasDeUnaCategoria(categoria);\n for (Categoria categoria1 : result) {\n System.out.println(categoria1.getNombre());\n }\n assertNotNull(result);\n }",
"protected int obtenerElementosSubArbolDerecho(VerticeArbolBinario<T> vertice) {\n if (!vertice.hayDerecho()) return 1;\n return obtenerNumeroElementos(vertice.derecho()) + 1;\n }",
"cl.sii.siiDte.boletas.EnvioBOLETADocument.EnvioBOLETA.SetDTE.Caratula.SubTotDTE[] getSubTotDTEArray();",
"java.util.List<Googleplay.LineItem> \n getSubItemList();",
"private MovimentoGestione retrieveMovimentoGestioneSub() {\n\t\t// Ordine SUBIMPEGNO -> SUBACCERTAMENTO\n\t\treturn ObjectUtils.firstNonNull(getSubImpegno(), getSubAccertamento());\n\t}",
"private List<Object[]> getAssemblySubProductList() {\n // Write query to find all subproducts of assembly product and assign to below list\n List<Object[]> subProductList = new ArrayList();\n return subProductList;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the list of CustomerInfo records associated with this customer model. | public List<CustomerInfo> getCustomerInfos ()
{
return new ArrayList<CustomerInfo>(allCustomerInfos);
} | [
"public List<Customer> viewCustomers() {\n\t\tList<Customer> customer = customerRepository.findAll();\n\t\treturn customer;\n\t}",
"@Override\r\n\tpublic List<Customer> viewAllCustomer() {\r\n\r\n\t\treturn customerRepository.findAll();\r\n\t}",
"public ArrayList<Customer> getCustomers()\r\n {\r\n return this.Customers;\r\n }",
"public ObservableList<Customer> getCustomerData() {\n return customerData;\n }",
"@GetMapping(\"/api/customer\")\n\tpublic ResponseEntity<List<CustomerDetails>> getAllCustomerDetails() {\n\n\t\tList<CustomerDetails> customerDetaillist = customerService.getAllCustomerDetails();\n\n\t\treturn ResponseEntity.ok().body(customerDetaillist);\n\n\t}",
"@Override\n\t@Transactional\n\tpublic List<Customer> getCustomers() {\n\t\treturn customerDataAccessObject.getCustomers();\n\t}",
"public List<CustomerAccountIF> getCustomerAccounts() {\n return this.customerAccountDao.getAllAccounts(userInfo);\n }",
"public static List<CustomerItems> getCustomerItems() {\n\n\t\tList<CustomerItems> showCustomerItems = null;\n\n\t\ttry {\n\t\t\tshowCustomerItems = CustomerItemsDAO.showCustomerItemsDetails();\n\n\t\t} catch (SQLException | ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn showCustomerItems;\n\t}",
"public List<CustomerBean> getAllCustomers() {\n\t\tList<CustomerBean> customers = null;\n\t\ttry {\n\t\t\t//obtain database connection and create the statement\n\t\t\tStatement statement = DataBase.getConnection().createStatement();\n\t\t\t//form the select query\n\t\t\tString sql = \"select customerid, name, address, phone1, phone2 from customer\";\n\t\t\t//obtain the results by executing the query\n\t\t\tResultSet resultSet = statement.executeQuery(sql);\n\t\t\tif(resultSet.next()) {\n\t\t\t\tcustomers = new ArrayList<CustomerBean>();\n\t\t\t}\n\t\t\tdo {\n\t\t\t\ttry {\n\t\t\t\t\treentrantLock.lock();\n\t\t\t\t\t//instantiate the CustomerBean and populate the values\n\t\t\t\t\tCustomerBean customer = new CustomerBean();\n\t\t\t\t\tcustomer.setCustomerID(resultSet.getString(\"customerid\"));\n\t\t\t\t\tcustomer.setName(resultSet.getString(\"name\"));\n\t\t\t\t\tcustomer.setAddress(resultSet.getString(\"address\"));\n\t\t\t\t\tcustomer.setPhone1(resultSet.getString(\"phone1\"));\n\t\t\t\t\tcustomer.setPhone2(resultSet.getString(\"phone2\"));\n\t\t\t\t\t//add the records to in memory list\n\t\t\t\t\tcustomers.add(customer);\n\t\t\t\t} finally {\n\t\t\t\t\treentrantLock.unlock();\n\t\t\t\t}\n\t\t\t} while(resultSet.next());\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn customers;\n\t}",
"@Accessor(qualifier = \"Customers\", type = Accessor.Type.GETTER)\n\tpublic Collection<B2BCustomerModel> getCustomers()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(CUSTOMERS);\n\t}",
"public List<Customer> retrieveCustomers() {\n Session session = sessionFactory.openSession();\n session.beginTransaction();\n\n List<Customer> customers = session.createCriteria(Customer.class).list();\n\n session.getTransaction().commit();\n session.close();\n return customers;\n }",
"public com.turkcelltech.cpgw.ws.CustomerInfo getCustomerInfo() {\n return customerInfo;\n }",
"List<Customer> getCustomerList();",
"public Map<String, Customer> getCustomer(){\r\n\t\treturn treeData;\r\n\t}",
"List<Customer> getAllCustomer();",
"public void listCustomers() {\r\n\t\tSystem.out.println(store.listCustomers());\r\n\t}",
"public List<CustomerInfo> getCustomerInfoList (PowerType pt)\n {\n return customerInfos.get(pt);\n }",
"@GetMapping(\"/getallcustomer\")\r\n\tpublic List<Customer> getAllCustomerData()\r\n\t{\r\n\t\treturn cr.findAll();\r\n\t}",
"private List<CustomerViewModel> getCustomersFromDB() {\n\t\ttry {\n\t\t\treturn db.selectCustomers();\n\t\t} catch (SQLException e) {\n\t\t\tJOptionPane.showMessageDialog(customerListViewPanel, \n\t\t\t\t\t\"Error loading customers: \" + e.getMessage(), \n\t\t\t\t\t\"Error loading customers\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn new ArrayList<>();\n\t\t}\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Verify that the hashcode for two different devices is NOT the same. | @Test
public void hashCodeTest2() {
Device device2 = new Device("other", token);
assertNotEquals(device.hashCode(), device2.hashCode());
} | [
"public static void ensureHashcodesNotEqual(Object o1, Object o2) {\n int object1Hashcode = o1.hashCode();\n int object2Hashcode = o2.hashCode();\n assertFalse(\"Objects which are not equal should ideally not have the same \" +\n \"hash codes. Were : \"\n + object1Hashcode + \" and \" + object2Hashcode,\n object1Hashcode == object2Hashcode);\n }",
"@Test\n public void testRecordsWithDifferentIDsProduceDifferentHashCodes() throws Exception {\n setRecordFieldValue(otherRecord, \"id\", 42L);\n int hashcodeA = record.hashCode();\n int hashcodeB = otherRecord.hashCode();\n\n assertThat(hashcodeA == hashcodeB, is(false));\n }",
"@Test\n public void hashCodeTest() {\n Device device2 = new Device(deviceID, token);\n assertEquals(device.hashCode(), device2.hashCode());\n }",
"@Test\n public void testHashcodeReturnsSameValueForIdenticalRecords() {\n int hashcodeA = record.hashCode();\n int hashcodeB = otherRecord.hashCode();\n\n assertThat(hashcodeA == hashcodeB, is(true));\n }",
"@Test\n public void equalsOtherTest2() {\n Device device2 = new Device(\"other\", token);\n assertNotEquals(device, device2);\n }",
"@Test\n public void equalsOtherTest() {\n Device device2 = new Device(deviceID, \"other\");\n assertNotEquals(device, device2);\n }",
"@Test\n public void equals_twoDifferentInstancesDifferentIds_returnsFalse() {\n // given\n UUIDTimeoutId instance1 = UUIDTimeoutId.generateNewId();\n UUIDTimeoutId instance2 = UUIDTimeoutId.generateNewId();\n\n // when\n boolean isEqual = instance1.equals(instance2);\n\n // then\n assertThat(\"Expected ids not to be equal.\", isEqual, equalTo(false));\n }",
"@Test\n public void hashCode_twoDifferentInstancesSameId_haveSameHashCode() {\n // given\n UUID uuid = UUID.randomUUID();\n UUIDTimeoutId instance1 = new UUIDTimeoutId(uuid);\n UUIDTimeoutId instance2 = new UUIDTimeoutId(uuid);\n\n // when\n int hc1 = instance1.hashCode();\n int hc2 = instance2.hashCode();\n\n // then\n assertThat(\"Expected both hash codes to be equal\", hc1, equalTo(hc2));\n }",
"@Test\n public void equals_DifferentUserId_Test() {\n Assert.assertFalse(bq1.equals(bq2));\n }",
"@Test\n public void testRecordsWithDifferentEndValProduceDifferentHashCodes() throws Exception {\n setRecordFieldValue(otherRecord, \"end\", new Date(otherRecord.getEnd().getTime() + 100));\n int hashcodeA = record.hashCode();\n int hashcodeB = otherRecord.hashCode();\n\n assertThat(hashcodeA == hashcodeB, is(false));\n }",
"public boolean testNonIdentityFieldHashcode() throws Exception {\n Logger.getLogger(getClass())\n .debug(\"Test non identity field hashcode - \" + clazz.getName());\n Object o1 = createObject(1);\n Object o2 = createObject(1);\n setFields(o2, true, true, 2);\n if (o1.hashCode() != o2.hashCode()) {\n Logger.getLogger(getClass()).info(\"o1 = \" + o1.hashCode() + \", \" + o1);\n Logger.getLogger(getClass()).info(\"o2 = \" + o2.hashCode() + \", \" + o2);\n }\n return o1.hashCode() == o2.hashCode();\n }",
"@Test\n public void equalsOtherTest3() {\n assertFalse(device.equals(null));\n }",
"@Test\n public void testRecordsWithDifferentStartValProduceDifferentHashCodes() throws Exception {\n setRecordFieldValue(otherRecord, \"start\", new Date(otherRecord.getStart().getTime() + 100));\n int hashcodeA = record.hashCode();\n int hashcodeB = otherRecord.hashCode();\n\n assertThat(hashcodeA == hashcodeB, is(false));\n }",
"@Test\n public void equals_differentAddresses_returnsFalse() throws UnknownHostException {\n // setup for test\n IpAddress src = new IpAddress(16_777_216L, false);\n IpAddress tgt = new IpAddress(33_554_432L, false);\n\n // execute test method\n boolean result = src.equals(tgt);\n\n // validate result\n assertFalse(result);\n }",
"private void checkNotEqual(UnknownFieldSet s1, UnknownFieldSet s2) {\n String equalsError = String.format(\"%s should not be equal to %s\", s1, s2);\n assertWithMessage(equalsError).that(s1).isNotEqualTo(s2);\n assertWithMessage(equalsError).that(s2).isNotEqualTo(s1);\n\n assertWithMessage(\"%s should have a different hash code from %s\", s1, s2)\n .that(s1.hashCode())\n .isNotEqualTo(s2.hashCode());\n }",
"@Test\n public void testDiffHash() throws Exception {\n Stream s1 = new Stream.Builder(\"foo\").addSchema(testSchema).build();\n Stream s2 = new Stream.Builder(\"foo1\").addSchema(testSchema).build();\n Stream s3 = new Stream.Builder(\"foo\").build();\n\n Assert.assertNotEquals(s1.hashCode(), s2.hashCode());\n Assert.assertNotEquals(s1.hashCode(), s3.hashCode());\n }",
"@Test\n public void testForEqualAndHashWithDifferentItem() throws FoodNetworkException {\n FoodItem foodItem1 = new FoodItem(\"orange\", MealType.Lunch, 12L, \"0.42\");\n FoodItem foodItem2 = new FoodItem(\"apple\", MealType.Dinner, 12L, \"0.42\");\n assertNotEquals(foodItem1, foodItem2);\n assertNotEquals(foodItem1.hashCode(), foodItem2.hashCode());\n }",
"public static void ensureHashcodesEqual(Object o1, Object o2) {\n int object1Hashcode = o1.hashCode();\n int object2Hashcode = o2.hashCode();\n assertTrue(\"Objects which are equal should have the same hash codes. Were : \"\n + object1Hashcode + \" and \" + object2Hashcode,\n object1Hashcode == object2Hashcode);\n }",
"private static boolean equalityTest5(String a, String b)\n {\n return a.hashCode() == b.hashCode();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ This test signs up a new user, logs that user in, verifies that they can access the home page, then logs out and verifies that the home page is no longer accessible. | @Test
public void testUserLifeCycle() throws InterruptedException {
driver.get("http://localhost:" + port + "/signup");
helper.signup(user);
assertEquals("Login", driver.getTitle());
helper.login(user);
Assertions.assertEquals("Home", driver.getTitle());
helper.logout();
Assertions.assertEquals("Login", driver.getTitle());
} | [
"@Test\n\tpublic void signupUserAndAccessHomePage() {\n\t\tcreateUserAndLogin();\n\t\tAssertions.assertEquals(\"http://localhost:\" + this.port + \"/home\", driver.getCurrentUrl());\n\t\tdriver.findElement(By.id(\"logoutForm\")).submit();\n\t\tdriver.get(\"http://localhost:\" + this.port + \"/home\");\n\t\tAssertions.assertEquals(\"http://localhost:\" + this.port + \"/login\", driver.getCurrentUrl());\n\t}",
"@Test\n public void UserCreation() throws Exception {\n openDemoSite(driver);\n driver.findElement(By.xpath(\"//li/a[@title=\\\"Admin area\\\"]\")).click();\n driver.findElement(By.xpath(\"//input[@name='login']\")).sendKeys(\"Email\");\n driver.findElement(By.xpath(\"//input[@name='password']\")).sendKeys(\"Password\");\n driver.findElement(By.xpath(\"//button[@type='submit']\")).click();\n Assert.assertTrue(\"Admin should be logged in\", false);\n driver.findElement(By.xpath(\"//a[@title=\\\"Users list\\\"]\")).click();\n driver.findElement(By.xpath(\"//button[@class='btn regular-button']\")).click();\n driver.findElement(By.xpath(\"//input[@id='login']\")).sendKeys(\"Email\");\n driver.findElement(By.xpath(\"//input[@id='password']\")).sendKeys(\"Password\");\n driver.findElement(By.xpath(\"//input[@id='password-conf']\")).sendKeys(\"Confirm password\");\n driver.findElement(By.xpath(\"//div/button[@type='submit']/span[text()='Create account']\")).click();\n\n }",
"@Test\r\n public void login() {\r\n driver.get(homeURL);\r\n WebElement signinButton = findSignInButton();\r\n if(signinButton==null){\r\n if(findViewProfileButton()!=null){\r\n fail(\"Unable to log-in: Sign-in button not found (view profile button was found) on \" + driver.getCurrentUrl());\r\n }\r\n fail(\"Unable to log-in: Sign-in button not found on \" + driver.getCurrentUrl());\r\n }\r\n signinButton.click();\r\n WebElement usernameField = findUsernameInput();\r\n if(usernameField == null){\r\n fail(\"Unable to log-in: username input field not found on \" + driver.getCurrentUrl());\r\n }\r\n usernameField.sendKeys(username);\r\n WebElement pwField = findPasswordInput();\r\n if (pwField == null) {\r\n fail(\"Unable to log-in: password input field not found on \" + driver.getCurrentUrl());\r\n }\r\n pwField.sendKeys(password);\r\n WebElement submitButton = findLoginSubmitButton();\r\n if (submitButton == null) {\r\n fail(\"Unable to log-in: submit button not found on \" + driver.getCurrentUrl());\r\n }\r\n submitButton.click();\r\n WebElement viewProfButton = findViewProfileButton();\r\n if (viewProfButton==null) {\r\n fail(\"After sign-in submition: View Profile Button not found on \" + driver.getCurrentUrl());\r\n }\r\n }",
"@Test\r\n\tpublic void verifyLoginToApplication() throws Exception {\n\tLoginPage login = new LoginPage(driver);\t\t\t\t\r\n\tlogin.login(\"sampleuserauto1\", \"SampAuto1\");\t\r\n\t\r\n\t//Verify Home page\r\n\tlogin.verifyHomePage();\r\n\t\r\n\t\r\n\t}",
"@Test\n\tpublic void portalTestFinishesWhileLoggedInAsRegularUser() throws Exception {\n\t\tVoodooUtils.voodoo.log.info(\"Running portalTestFinishesWhileLoggedInAsRegularUser()...\");\n\n\t\t// Log into Portal\n\t\tportal.loginScreen.navigateToPortal();\n\t\tportal.login(portalUser);\n\n\t\tVoodooUtils.voodoo.log.info(\"If this message appears, that means we logged in successfully without error.\");\n\t\tportal.navbar.userAction.assertVisible(true);\n\n\t\tsugar().loginScreen.navigateToSugar();\n\t\tsugar().alerts.waitForLoadingExpiration(30000);\n\t\tsugar().logout();\n\t\tsugar().login(sugar().users.getQAUser());\n\n\t\tVoodooUtils.voodoo.log.info(\"portalTestFinishesWhileLoggedInAsRegularUser() completed.\");\n\t}",
"@Test(description = \"User logs in with username and password - correct credentials\", groups = {\"smoke\"},priority = 1)\n\tpublic void validLogin(){\t\t\n\t\tlogoutPageobj.clickLogoutLink(\"Portal\");\n\t\tsetcurrentContext(null, null, false);\n\t}",
"@Test\n\tpublic void notExistingUser()\n\t{\n\t\tString username = \"notExistingUser\";\n\t\tString password = \"anyPass\";\n\n\t\tloginPage = new LoginPage(driver);\n\t\tloginPage.toLogin(this.port, driver, wait);\n\n\t\tAssertions.assertEquals(\"Login\", driver.getTitle());\n\n\t\tloginPage.login(username, password);\n\n\t\tAssertions.assertTrue(driver.getCurrentUrl().contains(\"error\"));\n\t}",
"@Test\n\tpublic void testLogout()\n\t{\n\t\t\n\t}",
"@Test\n\tpublic void testLogout() {\n\t\tmanager.logout();\n\t\tassertNull(manager.getCurrentUser());\n\t}",
"@Test\n public void testSignupPageAccessability() {\n driver.get(\"http://localhost:\" + this.port + \"/signup\");\n Assertions.assertEquals(\"Sign Up\", driver.getTitle());\n }",
"@Test(enabled=true)\n\tpublic void verifySuccessfullyCreateFolderAndDeleted()\n\t{\t\t\n\t\thomepg = new LoginPage(driver);\n\t\tlandingpg = new LandingPage(driver);\n\t\thomepg.login();\n\t\tlandingpg.addNewFolder();\n\t\tlandingpg.deleteFolder();\n\t\thomepg.logOut();\n\t}",
"@Test\n\tpublic void signUpAlreadyExistingUser()\n\t{\n\t\tString firstname = \"Testname\";\n\t\tString lastname = \"TestLastname\";\n\n\t\tString username = \"Test.User883\";\n\t\tString password = \"testpass\";\n\n\t\tsignUpPage = new SignUpPage(driver);\n\t\tsignUpPage.toSignUp(port, driver, wait);\n\t\tsignUpPage.signUp(firstname, lastname, username, password);\n\n\t\tWebElement signUpError = driver.findElement(By.id(\"signUpError\"));\n\t\tAssertions.assertTrue(signUpError.isDisplayed());\n\t}",
"@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyAddNewUserLandingPage() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the Add new User Landing page and their Overlay\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.AddUsersWhatisThisverlay()\n\t\t.AddNewUserNavigationVerification(); //have to update navigation link\n\t}",
"@Test\n public void createNewUserByExternalTokenAndCheckIt() throws Exception {\n UserLogin userLogin = new UserLogin();\n userLogin.setUserToken(UUID.randomUUID().toString());\n boolean isThrow = false;\n try {\n UserResponse userResponse = loginsService.checkLoginSignInSignUp(userLogin, \"SignUp\");\n } catch (ApplicationException e) {\n isThrow = true;\n }\n assertThat(isThrow);\n\n //Add login and expect new user successful registration\n userLogin.setUserLogin(\"val@gmail.com\");\n UserResponse userResponse = loginsService.checkLoginSignInSignUp(userLogin, \"SignUp\");\n assertThat(userResponse.getUserMail().equals(userLogin.getUserLogin()));\n assertThat(userResponse.getUserPoints()).size().isEqualTo(5);\n }",
"@Test\n public void test8() {\n userFury.login(\"13ab\");\n assertFalse(userFury.getLoggedIn());\n\n assertEquals(1, userFury.getFailedLoginAttempts());\n\n userFury.login(\"sdljf3\");\n assertFalse(userFury.getLoggedIn());\n\n assertEquals(2, userFury.getFailedLoginAttempts());\n\n userFury.login(\"13ab\");\n assertFalse(userFury.getLoggedIn());\n\n assertEquals(3, userFury.getFailedLoginAttempts());\n\n admin.login(\"34ab\");\n assertTrue(admin.getLoggedIn());\n\n admin.addAccount(userFury);\n String expectedAccountName = \"Fury\";\n String actualAccountName = admin.getAccounts().get(0).getName();\n assertTrue(!admin.getAccounts().isEmpty());\n\n admin.resetAccount(userFury, \"seed\");\n System.out.println(admin);\n String expectedPassword = \"seed\";\n assertTrue(userFury.checkPassword(expectedPassword));\n }",
"@BeforeMethod\n\tpublic void NavigateToCreateUserTest() {\n\t\ttry {\n\t\t\tassertTrue(CreateUserCukes.clickCreateUserTab(wd));\n\t\t\tassertTrue(CreateUserCukes.loadedCreateUserTab(wd));\n\n\t\t} catch (Throwable e) {\n\t\t\tfail(\"Error: Failed to navigate to Create User tab\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Test\n\tpublic void testLogin() {\n\t\tmanager.login(id, pass);\n\t\tassertEquals(\"Wolf\", manager.getCurrentUser().getFirstName());\n\t\tmanager.logout();\n\t\tassertNull(manager.getCurrentUser());\n\t\tmanager.login(\"jhnguye4\", \"wolfpack\");\n\t\tmanager.logout();\n\t}",
"@Test \n\tvoid testIfAUserCanLoginandLogout() throws Exception {\n\t\tmockMvc\n\t\t.perform(formLogin(\"/login\")\n\t\t\t\t.user(\"admin\")\n\t\t\t\t.password(\"pass\"));\n\t\t\n\t\tmockMvc\n .perform(logout())\n .andExpect(status().isFound())\n .andExpect(redirectedUrl(\"/login?logout\"));\n\t}",
"@Test\r\n public void testNewUserDetails() {\r\n String operation = \"saveUserDetails\";\r\n GolfUserControllerData golfUserControllerData = new GolfUserControllerData();\r\n GolfUser golfUserDetails = null;\r\n \r\n String email = \"1234567@hotmail.com\";\r\n String fname = \"FName\";\r\n String lname = \"LName\";\r\n String userID = \"\";\r\n String userName = \"123456\";\r\n String pswd = \"ABCDE\";\r\n String role = \"ADMIN\";\r\n \r\n System.out.println(\"runRequest saveUserDetails - testNewUserDetails\");\r\n \r\n golfUserControllerData.setOperation(operation);\r\n golfUserControllerData.setUserEmail(email);\r\n golfUserControllerData.setUserFirstName(fname);\r\n golfUserControllerData.setUserLastName(lname);\r\n golfUserControllerData.setUserID(userID);\r\n golfUserControllerData.setUserName(userName);\r\n golfUserControllerData.setUserPwd(pswd);\r\n golfUserControllerData.setUserRole(role);\r\n\r\n saveUser(golfUserControllerData);\r\n \r\n // Now select and check the new user was saved\r\n boolean success = CurrentUser.setCurrentUser(golfUserControllerData.getUserName(), golfUserControllerData.getUserPwd());\r\n \r\n golfUserDetails = CurrentUser.getCurrentUser();\r\n \r\n // clean up\r\n deleteUser(golfUserControllerData);\r\n \r\n assertEquals(golfUserDetails.getUserEmail(), golfUserControllerData.getUserEmail());\r\n assertEquals(golfUserDetails.getUserFirstName(), golfUserControllerData.getUserFirstName());\r\n assertEquals(golfUserDetails.getUserLastName(), golfUserControllerData.getUserLastName());\r\n assertEquals(golfUserDetails.getUserName(), golfUserControllerData.getUserName());\r\n assertEquals(golfUserDetails.getUserPwd(), golfUserControllerData.getUserPwd());\r\n assertEquals(golfUserDetails.getUserRole(), golfUserControllerData.getUserRole()); \r\n \r\n assertEquals(true, success);\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
public Long getUserDetailsId(String authCode) throws BlockbusterException; | public UserAuthDetails getUserAuthDetails(String authCode) throws BlockbusterException; | [
"long getUserid();",
"long getCodeId();",
"String getAuthenticationID();",
"public Integer getAuthCode() {\n return authCode;\n }",
"java.lang.String getUserID();",
"public String getAuthCode() {\n return authCode;\n }",
"public String getUserID();",
"public String getAuthCode() {\n\t\treturn authCode;\n\t}",
"public String getUserCode() {\n return userCode;\n }",
"int getOpenidAccountid();",
"abstract public String getAuthenticationId();",
"String getManualAuthCode();",
"public Long getAuthId() {\r\n return authId;\r\n }",
"public static native long ChannelDetails_get_user_id(long this_ptr);",
"public String getAuthCode()\n\t{\n\t\tif(response.containsKey(\"AUTH_CODE\")) {\n\t\t\treturn response.get(\"AUTH_CODE\");\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"public Long getAuthId() {\n return authId;\n }",
"public String getUsercode() {\n return usercode;\n }",
"long getUserId();",
"String getTheirPartyId();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get the parameter for reservation record list | public void getRsvRecordList(Hashtable parameter) throws cwException {
if (parameter == null)
parameter = new Hashtable();
this.getCurrentUser(parameter);
/**
* parameter
* add the key with prefix "param_" for FE
*/
parameter.put("start_date", getTimestampParameter("start_date"));
parameter.put("end_date", getTimestampParameter("end_date"));
if (getStringParameter("own_type") != null)
parameter.put("own_type", getStringParameter("own_type"));
// fac_id list
parameter.put("fac_id", getStrArrayParameter("fac_id", this.DELIMITER));
parameter.put("param_fac_id", getStringParameter("fac_id"));
// status list
if (getStrArrayParameter("status", this.DELIMITER) != null) {
parameter.put("status", getStrArrayParameter("status", this.DELIMITER));
parameter.put("param_status", getStringParameter("status"));
}
// download the reservation record
if (getStringParameter("download") != null) {
parameter.put("download", new Integer(getIntParameter("download")));
parameter.put("filename", getStringParameter("filename"));
}
} | [
"String getValParam();",
"public List<Reservation> selectionTousReservation();",
"public Long getReservation() {\n return reservation;\n }",
"public List<TblReservation>getAllDataReservationByPeriode(Date startDate,Date endDate,\r\n RefReservationStatus reservationStatus,\r\n TblTravelAgent travelAgent,\r\n RefReservationOrderByType reservationType,\r\n TblReservation reservation);",
"public Long getReservationid()\n {\n return reservationid; \n }",
"public int getReservationNumber(){\n return reservationNumber;\n }",
"public List<Evento> consultarEventosActivos(@Param(\"reserva\") long reserva);",
"public String getReservationName(){\n return reservationName;\n }",
"java.lang.String getParam();",
"public String getp_recpt_no() {\n return (String)getNamedWhereClauseParam(\"p_recpt_no\");\n }",
"List<PermitDetailsVO> getListOfPermitRecords(String prNo, String typeofPermit);",
"String getParam();",
"public String getReservationType(){\n return reservationType;\n }",
"private long getReserveRecNo() {\n\t\tfinal int selectedRow = this.clientUI.getSelectedRowNo();\n\t\treturn this.model.getRecNo(selectedRow);\n\t}",
"com.google.cloud.commerce.consumer.procurement.v1.Parameter getParameters(int index);",
"public Integer getReservationtypeid()\n {\n return reservationtypeid; \n }",
"public JList getReservationList() {\n return reservationList;\n }",
"private AttributeValue getInParam(final ResourceParameter param, final Record rec) {\n final List<AttributeValue> listRecord = rec.getAttributeValues();\n boolean found = false;\n AttributeValue attr = null;\n for (final Iterator<AttributeValue> it = listRecord.iterator(); it.hasNext() && !found;) {\n attr = it.next();\n if (attr.getName().equals(param.getValue())) {\n found = true;\n }\n }\n if (found) {\n return attr;\n } else {\n return null;\n }\n }",
"java.lang.String getParameterValue();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the attribute value for CREATED_DATE using the alias name CreatedDate. | public Date getCreatedDate() {
return (Date)getAttributeInternal(CREATEDDATE);
} | [
"public Date getDateCreated() {\n return (Date)getAttributeInternal(DATECREATED);\n }",
"public Date getDateCreated()\n {\n return (Date)getAttributeInternal(DATECREATED);\n }",
"public Timestamp getCreatedDate() {\r\n return (Timestamp) getAttributeInternal(CREATEDDATE);\r\n }",
"public Timestamp getCreatedDate() {\n return (Timestamp) getAttributeInternal(CREATEDDATE);\n }",
"public Date getCreatedOn() {\n return (Date)getAttributeInternal(CREATEDON);\n }",
"public Date getCreatedon()\n {\n return (Date)getAttributeInternal(CREATEDON);\n }",
"public Date getCreatedDate1() {\n return (Date)getAttributeInternal(CREATEDDATE1);\n }",
"public Date getCreateDate() {\n return (Date)getAttributeInternal(CREATEDATE);\n }",
"public java.lang.CharSequence getDATECREATED() {\n return DATE_CREATED;\n }",
"public Date getCreatedAt() {\n return (Date) getAttributeInternal(CREATEDAT);\n }",
"public java.lang.CharSequence getDATECREATED() {\n return DATE_CREATED;\n }",
"public Date getCreatedAt() {\n return (Date) getAttributeInternal(CREATEDAT);\n }",
"public Date getDATE_CREATED() {\r\n return DATE_CREATED;\r\n }",
"public Date getCreatedAt() {\n return (Date)getAttributeInternal(CREATEDAT);\n }",
"public Date getCreated() {\n\t\treturn NdrUtils.parseNdrDateString(this.getCreatedDate());\n\t}",
"public java.util.Date getCreatedDate(\r\n ) {\r\n return this._createdDate;\r\n }",
"public Timestamp getCreatedOn() {\r\n return (Timestamp) getAttributeInternal(CREATEDON);\r\n }",
"public Date getCreationDate()\n {\n return (Date)getAttributeInternal(CREATIONDATE);\n }",
"public Timestamp getDatecreation() {\n return (Timestamp) getAttributeInternal(DATECREATION);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Declarator__Group__1" $ANTLR start "rule__Declarator__Group__1__Impl" ../org.ow2.mindEd.idt.editor.textual.ui/srcgen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3895:1: rule__Declarator__Group__1__Impl : ( ( rule__Declarator__DcAssignment_1 ) ) ; | public final void rule__Declarator__Group__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3899:1: ( ( ( rule__Declarator__DcAssignment_1 ) ) )
// ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3900:1: ( ( rule__Declarator__DcAssignment_1 ) )
{
// ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3900:1: ( ( rule__Declarator__DcAssignment_1 ) )
// ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3901:1: ( rule__Declarator__DcAssignment_1 )
{
if ( state.backtracking==0 ) {
before(grammarAccess.getDeclaratorAccess().getDcAssignment_1());
}
// ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3902:1: ( rule__Declarator__DcAssignment_1 )
// ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3902:2: rule__Declarator__DcAssignment_1
{
pushFollow(FollowSets000.FOLLOW_rule__Declarator__DcAssignment_1_in_rule__Declarator__Group__1__Impl8244);
rule__Declarator__DcAssignment_1();
state._fsp--;
if (state.failed) return ;
}
if ( state.backtracking==0 ) {
after(grammarAccess.getDeclaratorAccess().getDcAssignment_1());
}
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__Declarator__Group__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3888:1: ( rule__Declarator__Group__1__Impl )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3889:2: rule__Declarator__Group__1__Impl\r\n {\r\n pushFollow(FollowSets000.FOLLOW_rule__Declarator__Group__1__Impl_in_rule__Declarator__Group__18217);\r\n rule__Declarator__Group__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__DirectDeclarator__Group__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:4169:1: ( rule__DirectDeclarator__Group__1__Impl )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:4170:2: rule__DirectDeclarator__Group__1__Impl\r\n {\r\n pushFollow(FollowSets000.FOLLOW_rule__DirectDeclarator__Group__1__Impl_in_rule__DirectDeclarator__Group__18770);\r\n rule__DirectDeclarator__Group__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Declarator__Group__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3859:1: ( rule__Declarator__Group__0__Impl rule__Declarator__Group__1 )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3860:2: rule__Declarator__Group__0__Impl rule__Declarator__Group__1\r\n {\r\n pushFollow(FollowSets000.FOLLOW_rule__Declarator__Group__0__Impl_in_rule__Declarator__Group__08157);\r\n rule__Declarator__Group__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FollowSets000.FOLLOW_rule__Declarator__Group__1_in_rule__Declarator__Group__08160);\r\n rule__Declarator__Group__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__DirectDeclarator__Group_0_1__2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:4261:1: ( rule__DirectDeclarator__Group_0_1__2__Impl )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:4262:2: rule__DirectDeclarator__Group_0_1__2__Impl\r\n {\r\n pushFollow(FollowSets000.FOLLOW_rule__DirectDeclarator__Group_0_1__2__Impl_in_rule__DirectDeclarator__Group_0_1__28954);\r\n rule__DirectDeclarator__Group_0_1__2__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__AbstractDeclarator__Group__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3949:1: ( rule__AbstractDeclarator__Group__1__Impl )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3950:2: rule__AbstractDeclarator__Group__1__Impl\r\n {\r\n pushFollow(FollowSets000.FOLLOW_rule__AbstractDeclarator__Group__1__Impl_in_rule__AbstractDeclarator__Group__18338);\r\n rule__AbstractDeclarator__Group__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void ruleDeclarator() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:580:2: ( ( ( rule__Declarator__Group__0 ) ) )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:581:1: ( ( rule__Declarator__Group__0 ) )\r\n {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:581:1: ( ( rule__Declarator__Group__0 ) )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:582:1: ( rule__Declarator__Group__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getDeclaratorAccess().getGroup()); \r\n }\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:583:1: ( rule__Declarator__Group__0 )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:583:2: rule__Declarator__Group__0\r\n {\r\n pushFollow(FollowSets000.FOLLOW_rule__Declarator__Group__0_in_ruleDeclarator1181);\r\n rule__Declarator__Group__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getDeclaratorAccess().getGroup()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__DirectDeclarator__Group_0_1__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:4213:1: ( ( '(' ) )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:4214:1: ( '(' )\r\n {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:4214:1: ( '(' )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:4215:1: '('\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getDirectDeclaratorAccess().getLeftParenthesisKeyword_0_1_0()); \r\n }\r\n match(input,58,FollowSets000.FOLLOW_58_in_rule__DirectDeclarator__Group_0_1__0__Impl8863); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getDirectDeclaratorAccess().getLeftParenthesisKeyword_0_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__AbstractDeclarator__Group__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3960:1: ( ( ( rule__AbstractDeclarator__DcAssignment_1 )? ) )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3961:1: ( ( rule__AbstractDeclarator__DcAssignment_1 )? )\r\n {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3961:1: ( ( rule__AbstractDeclarator__DcAssignment_1 )? )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3962:1: ( rule__AbstractDeclarator__DcAssignment_1 )?\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getAbstractDeclaratorAccess().getDcAssignment_1()); \r\n }\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3963:1: ( rule__AbstractDeclarator__DcAssignment_1 )?\r\n int alt34=2;\r\n int LA34_0 = input.LA(1);\r\n\r\n if ( (LA34_0==58||LA34_0==60) ) {\r\n alt34=1;\r\n }\r\n switch (alt34) {\r\n case 1 :\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3963:2: rule__AbstractDeclarator__DcAssignment_1\r\n {\r\n pushFollow(FollowSets000.FOLLOW_rule__AbstractDeclarator__DcAssignment_1_in_rule__AbstractDeclarator__Group__1__Impl8365);\r\n rule__AbstractDeclarator__DcAssignment_1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getAbstractDeclaratorAccess().getDcAssignment_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Declarators__Group__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3775:1: ( ( ( rule__Declarators__Group_1__0 )* ) )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3776:1: ( ( rule__Declarators__Group_1__0 )* )\r\n {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3776:1: ( ( rule__Declarators__Group_1__0 )* )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3777:1: ( rule__Declarators__Group_1__0 )*\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getDeclaratorsAccess().getGroup_1()); \r\n }\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3778:1: ( rule__Declarators__Group_1__0 )*\r\n loop33:\r\n do {\r\n int alt33=2;\r\n int LA33_0 = input.LA(1);\r\n\r\n if ( (LA33_0==55) ) {\r\n alt33=1;\r\n }\r\n\r\n\r\n switch (alt33) {\r\n \tcase 1 :\r\n \t // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3778:2: rule__Declarators__Group_1__0\r\n \t {\r\n \t pushFollow(FollowSets000.FOLLOW_rule__Declarators__Group_1__0_in_rule__Declarators__Group__1__Impl7999);\r\n \t rule__Declarators__Group_1__0();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return ;\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop33;\r\n }\r\n } while (true);\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getDeclaratorsAccess().getGroup_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Declarators__Group__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3764:1: ( rule__Declarators__Group__1__Impl )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3765:2: rule__Declarators__Group__1__Impl\r\n {\r\n pushFollow(FollowSets000.FOLLOW_rule__Declarators__Group__1__Impl_in_rule__Declarators__Group__17972);\r\n rule__Declarators__Group__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__DirectDeclarator__Group_0_1__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:4272:1: ( ( ')' ) )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:4273:1: ( ')' )\r\n {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:4273:1: ( ')' )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:4274:1: ')'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getDirectDeclaratorAccess().getRightParenthesisKeyword_0_1_2()); \r\n }\r\n match(input,59,FollowSets000.FOLLOW_59_in_rule__DirectDeclarator__Group_0_1__2__Impl8982); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getDirectDeclaratorAccess().getRightParenthesisKeyword_0_1_2()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Declarators__Group_1__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3827:1: ( rule__Declarators__Group_1__1__Impl )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3828:2: rule__Declarators__Group_1__1__Impl\r\n {\r\n pushFollow(FollowSets000.FOLLOW_rule__Declarators__Group_1__1__Impl_in_rule__Declarators__Group_1__18096);\r\n rule__Declarators__Group_1__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__DirectDeclarator__Group__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:4140:1: ( rule__DirectDeclarator__Group__0__Impl rule__DirectDeclarator__Group__1 )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:4141:2: rule__DirectDeclarator__Group__0__Impl rule__DirectDeclarator__Group__1\r\n {\r\n pushFollow(FollowSets000.FOLLOW_rule__DirectDeclarator__Group__0__Impl_in_rule__DirectDeclarator__Group__08710);\r\n rule__DirectDeclarator__Group__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FollowSets000.FOLLOW_rule__DirectDeclarator__Group__1_in_rule__DirectDeclarator__Group__08713);\r\n rule__DirectDeclarator__Group__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__DirectDeclarator__Group_0_1__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:4201:1: ( rule__DirectDeclarator__Group_0_1__0__Impl rule__DirectDeclarator__Group_0_1__1 )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:4202:2: rule__DirectDeclarator__Group_0_1__0__Impl rule__DirectDeclarator__Group_0_1__1\r\n {\r\n pushFollow(FollowSets000.FOLLOW_rule__DirectDeclarator__Group_0_1__0__Impl_in_rule__DirectDeclarator__Group_0_1__08832);\r\n rule__DirectDeclarator__Group_0_1__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FollowSets000.FOLLOW_rule__DirectDeclarator__Group_0_1__1_in_rule__DirectDeclarator__Group_0_1__08835);\r\n rule__DirectDeclarator__Group_0_1__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__AssignmentExpression__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:9417:1: ( rule__AssignmentExpression__Group__1__Impl )\n // InternalReflex.g:9418:2: rule__AssignmentExpression__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__AssignmentExpression__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Decl__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMGPL.g:1394:1: ( rule__Decl__Group__1__Impl )\n // InternalMGPL.g:1395:2: rule__Decl__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Decl__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Definition__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:520:1: ( ( ( rule__Definition__InputAssignment_1 ) ) )\n // InternalWh.g:521:1: ( ( rule__Definition__InputAssignment_1 ) )\n {\n // InternalWh.g:521:1: ( ( rule__Definition__InputAssignment_1 ) )\n // InternalWh.g:522:2: ( rule__Definition__InputAssignment_1 )\n {\n before(grammarAccess.getDefinitionAccess().getInputAssignment_1()); \n // InternalWh.g:523:2: ( rule__Definition__InputAssignment_1 )\n // InternalWh.g:523:3: rule__Definition__InputAssignment_1\n {\n pushFollow(FOLLOW_2);\n rule__Definition__InputAssignment_1();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getDefinitionAccess().getInputAssignment_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__DirectDeclarator__Group_0_1__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:4244:1: ( ( ( rule__DirectDeclarator__DecAssignment_0_1_1 ) ) )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:4245:1: ( ( rule__DirectDeclarator__DecAssignment_0_1_1 ) )\r\n {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:4245:1: ( ( rule__DirectDeclarator__DecAssignment_0_1_1 ) )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:4246:1: ( rule__DirectDeclarator__DecAssignment_0_1_1 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getDirectDeclaratorAccess().getDecAssignment_0_1_1()); \r\n }\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:4247:1: ( rule__DirectDeclarator__DecAssignment_0_1_1 )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:4247:2: rule__DirectDeclarator__DecAssignment_0_1_1\r\n {\r\n pushFollow(FollowSets000.FOLLOW_rule__DirectDeclarator__DecAssignment_0_1_1_in_rule__DirectDeclarator__Group_0_1__1__Impl8924);\r\n rule__DirectDeclarator__DecAssignment_0_1_1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getDirectDeclaratorAccess().getDecAssignment_0_1_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__AbstractDeclarator__Group__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3920:1: ( rule__AbstractDeclarator__Group__0__Impl rule__AbstractDeclarator__Group__1 )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3921:2: rule__AbstractDeclarator__Group__0__Impl rule__AbstractDeclarator__Group__1\r\n {\r\n pushFollow(FollowSets000.FOLLOW_rule__AbstractDeclarator__Group__0__Impl_in_rule__AbstractDeclarator__Group__08278);\r\n rule__AbstractDeclarator__Group__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FollowSets000.FOLLOW_rule__AbstractDeclarator__Group__1_in_rule__AbstractDeclarator__Group__08281);\r\n rule__AbstractDeclarator__Group__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use CGameNotifications_UpdateNotificationSettings_Response.newBuilder() to construct. | private CGameNotifications_UpdateNotificationSettings_Response(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} | [
"private CGameNotifications_UpdateNotificationSettings_Request(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private CGameNotifications_UpdateSession_Response(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"SteamMsgGameNotifications.GameNotificationSettings getGameNotificationSettings(int index);",
"com.google.apps.alertcenter.v1beta1.SettingsOrBuilder getSettingsOrBuilder();",
"com.bingo.server.msg.Settings.SettingsRequestOrBuilder getSettingsRequestOrBuilder();",
"com.google.apps.alertcenter.v1beta1.Settings getSettings();",
"private GameNotificationSettings(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private CGameNotifications_UpdateSession_Request(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public Pokemon.ContactSettingsProtoOrBuilder getSettingsOrBuilder() {\n if (settingsBuilder_ != null) {\n return settingsBuilder_.getMessageOrBuilder();\n } else {\n return settings_;\n }\n }",
"com.openmdmremote.harbor.HRPCProto.SettingsOrBuilder getSettingsOrBuilder();",
"public static MozuClient<com.mozu.api.contracts.productadmin.SearchSettings> updateSettingsClient(com.mozu.api.contracts.productadmin.SearchSettings settings, String responseFields) throws Exception\n\t{\n\t\tMozuUrl url = com.mozu.api.urls.commerce.catalog.admin.SearchUrl.updateSettingsUrl(responseFields);\n\t\tString verb = \"PUT\";\n\t\tClass<?> clz = com.mozu.api.contracts.productadmin.SearchSettings.class;\n\t\tMozuClient<com.mozu.api.contracts.productadmin.SearchSettings> mozuClient = (MozuClient<com.mozu.api.contracts.productadmin.SearchSettings>) MozuClientFactory.getInstance(clz);\n\t\tmozuClient.setVerb(verb);\n\t\tmozuClient.setResourceUrl(url);\n\t\tmozuClient.setBody(settings);\n\t\treturn mozuClient;\n\n\t}",
"private void updateNotificationOptions()\n {\n //Get shared preferences editor\n SharedPreferences.Editor editor = PreferenceManager.getDefaultSharedPreferences(this).edit();\n\n //Get messaging service\n FirebaseMessaging notifications = FirebaseMessaging.getInstance();\n\n //For each notification option (switch)\n for (int i = 0; i < vwNotificationPanel.getChildCount(); i += 3)\n {\n //Get notification switch\n SwitchCompat swNotificationOption = (SwitchCompat) vwNotificationPanel.getChildAt(i);\n\n //If user wants to receive this notification\n if (swNotificationOption.isChecked()) {\n //Subscribe to notification topic\n notifications.subscribeToTopic(tracker.getID() + \"_\" + swNotificationOption.getTag().toString());\n\n //Save option on shared preferences\n editor.putBoolean(currentUser.getUid() + tracker.getID() + \"_\" + swNotificationOption.getTag().toString(), true);\n } else {\n //Unsubscribe to notification topic\n notifications.unsubscribeFromTopic(tracker.getID() + \"_\" + swNotificationOption.getTag().toString());\n\n //Remove option from shared preferences\n editor.putBoolean(currentUser.getUid() + tracker.getID() + \"_\" + swNotificationOption.getTag().toString(), false);\n }\n }\n\n //Commit changes to shared preferences\n editor.apply();\n }",
"public static MozuClient<com.mozu.api.contracts.productadmin.SearchSettings> updateSettingsClient(com.mozu.api.contracts.productadmin.SearchSettings settings) throws Exception\n\t{\n\t\treturn updateSettingsClient( settings, null);\n\t}",
"public PagedCallSettings.Builder<\n ListNotificationConfigsRequest,\n ListNotificationConfigsResponse,\n ListNotificationConfigsPagedResponse>\n listNotificationConfigsSettings() {\n return listNotificationConfigsSettings;\n }",
"private CGameNotifications_CreateSession_Response(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"com.bingo.server.msg.Settings.SettingsRequest getSettingsRequest();",
"com.bingo.server.msg.Settings.GetSettingsRequestOrBuilder getGetSettingsRequestOrBuilder();",
"public UnaryCallSettings.Builder<GetNotificationConfigRequest, NotificationConfig>\n getNotificationConfigSettings() {\n return getNotificationConfigSettings;\n }",
"private CFovasVideo_ClientGetOPFSettings_Response(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
gets the size of the JFrame | public Dimension getSize() {
return windowSize;
} | [
"public static int getWidthOfGui() {\r\n return 800; }",
"@Override\n\tpublic int getJPanelLength() throws RemoteException {\n\t\treturn WINDOWSIZE;\n\t}",
"private void sizeFrame()\r\n\t{\r\n//\t\tmainBox.revalidate();\r\n//\t\tDimension pSize = mainBox.getPreferredSize();\r\n//\t\tsetSize((int) pSize.getWidth() + 75, (int) pSize.getHeight() + 50);\r\n//\t\trevalidate();\r\n//\t\trepaint();\r\n\t}",
"public Dimension getPreferredSize() {\n Dimension size = super.getPreferredSize();\n size.width += extraWindowWidth;\n return size;\n }",
"public Dimension getSize()\n {\n return canvas.getSize();\n }",
"public Dimension getSize() { return buttonSize; }",
"public static int getHeightOfGui() {\r\n return 600; }",
"private void setPanelSize() {\n this.setPreferredSize(new Dimension(WIDTH,HEIGHT));\n }",
"public int getFormHeight();",
"public int getFrameSize() {\n\t\treturn sfb;\n\t}",
"protected int initialWidth () \r\n {\r\n return GUI_WIDTH;\r\n }",
"public add_prizes() {\n this.setResizable(false);\n this.setVisible(true);\n initComponents();\n Toolkit tk=Toolkit.getDefaultToolkit();\n int xsize=900;\n int ysize=720;\n this.setSize(xsize,ysize);\n }",
"private void setGuiSizeToWorldSize() {\n worldPanel.setPreferredSize(new Dimension(worldPanel.getWorld()\n .getWidth(), worldPanel.getWorld().getHeight()));\n worldPanel.setSize(new Dimension(worldPanel.getWorld().getWidth(),\n worldPanel.getWorld().getHeight()));\n this.getParentFrame().pack();\n }",
"protected @NotNull Point2D getSize() {\n return DEFAULT_DIALOG_SIZE;\n }",
"public abstract Dimension getDrawSize(Widget widget) throws GUIException;",
"public void setFrameSize();",
"public static JLabel getSizeLabel() {\r\n\t\treturn sizeLabel;\r\n\t}",
"public void setSizePlayingFields()\r\n {\n setPreferredSize(new Dimension(109*8,72*8));//powieżchnia o 2 m z każdej strony większa niz boisko 106 i 69 pomnożone o 8\r\n //większe boisko żeby było widać\r\n setMaximumSize(getMaximumSize());\r\n setBackground(Color.green);\r\n }",
"protected int initialHeight () \r\n {\r\n return GUI_HEIGHT;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete an example or a category. This function will also if entry is ICategory, remove all the code examples from the category. if entry is IExample, remove itself from any categories and dependencies list. if entry is User, do nothing. | public int delete(IEntry entry, IUser user) {
//not owner
if (!entry.getOwner().equals(user))
return 1;
//user is owner
if (entry instanceof ICategory) {
if(((ICategory) entry).getExampleList().size()!=0)
{
ICategory categoryEntry = (ICategory)entry;
List<IExample> examples = categoryEntry.getExampleList();
categoryEntry.removeAllExamples();
for (IExample example : examples) {
db.store(example);
}
}
}
else if (entry instanceof IExample) {
IExample exampleEntry = (IExample) entry;
if(exampleEntry.getCategories().size()!=0)
{
List<ICategory> categories = exampleEntry.getCategories();
exampleEntry.removeFromAllCategories();
for (ICategory category : categories) {
db.store(category);
}
}
if(getDependerOf(exampleEntry).size()!=0)
removeAllDependency(exampleEntry);
}
else if(entry instanceof IUser) {
// TODO Allow deletion for users
//System.out.println("You want to delete a user? Not yet implemented");
}
else {
// TODO ?
//System.out.println("something else?");
}
db.delete(entry);
return 0;
} | [
"public void deleteGlossaryEntry(Field entryToDelete);",
"public void deleteEntriesAndTypesByCategoryAndAction(String category, String action);",
"void deleteCategory(Category category);",
"void removeCategory(Category category);",
"public void removeCategory(Category category);",
"void deleteCategory(int categoryId) throws ExceptionType;",
"void delete(Category category);",
"void removeCategory(GwtCategory gwtCategory)throws SquareException;",
"void deleteCategoryById(int categoryId);",
"void deleteCategory(Integer id);",
"public boolean removeEntry (String entry) throws ApplicationException;",
"void deleteCategory(long id);",
"@Delete\n void delete(SpeciesCategory speciesCategory);",
"public void deleteGlossaryEntry(final Field entryToDelete) {\n\t\tif (_glossary.contains(entryToDelete)) {\n\t\t\t_glossary.removeChild(entryToDelete);\n\t\t}\n\t}",
"void deleteCategoryByName(String categoryName);",
"public ua.org.gostroy.guestbook.model.Entry3 remove(long entryId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\tua.org.gostroy.guestbook.NoSuchEntry3Exception;",
"static public void removeEntry(Entry entry){ getEntryList().removeEntry(entry); }",
"public static void delete_log_entry (LogEntry entry) {\n\n\t\t// Check conditions\n\n\t\tif (!( entry != null && entry.get_id() != null )) {\n\t\t\tthrow new IllegalArgumentException(\"LogEntry.delete_log_entry: Invalid parameters\");\n\t\t}\n\n\t\t// Get the MongoDB data store\n\n\t\tDatastore datastore = MongoDBUtil.getDatastore();\n\n\t\t// Run the delete\n\n\t\tdatastore.delete(entry);\n\t\t\n\t\treturn;\n\t}",
"public void deleteEntry(Entry e) {\n entries.remove(e.getName());\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of setPrecision method, of class DefaultPrecisionRecallPair. | @Test
public void testSetPrecision()
{
double precision = DefaultPrecisionRecallPair.DEFAULT_PRECISION;
DefaultPrecisionRecallPair instance = new DefaultPrecisionRecallPair();
assertEquals(precision, instance.getPrecision(), 0.0);
precision = 0.1;
instance.setPrecision(precision);
assertEquals(precision, instance.getPrecision(), 0.0);
boolean exceptionThrown = false;
try
{
precision = -0.1;
instance.setPrecision(precision);
}
catch (IllegalArgumentException e)
{
exceptionThrown = true;
}
finally
{
assertTrue(exceptionThrown);
}
exceptionThrown = false;
try
{
precision = 1.1;
instance.setPrecision(precision);
}
catch (IllegalArgumentException e)
{
exceptionThrown = true;
}
finally
{
assertTrue(exceptionThrown);
}
} | [
"@Test\n public void testGetPrecision()\n {\n this.testSetPrecision();\n }",
"void setPrecision(double precision);",
"void setPrecision(java.lang.String precision);",
"public void setPrecision(int value) {\n this.precision = value;\n }",
"@Test\n public void testGetFirst()\n {\n double precision = 0.1;\n DefaultPrecisionRecallPair instance = new DefaultPrecisionRecallPair();\n instance.setPrecision(precision);\n assertEquals(precision, instance.getFirst(), 0.0);\n }",
"public void setPricePrecision(int pricePrecision)\n\t{\n\t\tthis.pricePrecision = pricePrecision;\n\t}",
"@Test\n public void testSetRecall()\n {\n double recall = DefaultPrecisionRecallPair.DEFAULT_RECALL;\n DefaultPrecisionRecallPair instance = new DefaultPrecisionRecallPair();\n assertEquals(recall, instance.getRecall(), 0.0);\n\n recall = 0.2;\n instance.setRecall(recall);\n assertEquals(recall, instance.getRecall(), 0.0);\n\n boolean exceptionThrown = false;\n try\n {\n recall = -0.1;\n instance.setRecall(recall);\n }\n catch (IllegalArgumentException e)\n {\n exceptionThrown = true;\n }\n finally\n {\n assertTrue(exceptionThrown);\n }\n\n exceptionThrown = false;\n try\n {\n recall = 1.1;\n instance.setRecall(recall);\n }\n catch (IllegalArgumentException e)\n {\n exceptionThrown = true;\n }\n finally\n {\n assertTrue(exceptionThrown);\n }\n }",
"public void setRatePrecision(Integer ratePrecision) {\n this.ratePrecision = ratePrecision;\n }",
"void setMaxPrecision(int value);",
"double getPrecision();",
"Object getPrecision();",
"int getPrecision();",
"public void setRelativePrecision (double relativePrecision)\n {\n this.relativePrecision = relativePrecision;\n\n }",
"@Test\n public void testConstructors()\n {\n double precision = DefaultPrecisionRecallPair.DEFAULT_PRECISION;\n double recall = DefaultPrecisionRecallPair.DEFAULT_RECALL;\n DefaultPrecisionRecallPair instance = new DefaultPrecisionRecallPair();\n assertEquals(precision, instance.getPrecision(), 0.0);\n assertEquals(recall, instance.getRecall(), 0.0);\n\n precision = 0.1;\n recall = 0.2;\n instance = new DefaultPrecisionRecallPair(precision, recall);\n assertEquals(precision, instance.getPrecision(), 0.0);\n assertEquals(recall, instance.getRecall(), 0.0);\n }",
"void xsetPrecision(org.apache.xmlbeans.XmlString precision);",
"boolean isSetPrecision();",
"private PrecisionAndRecall() {\n\n }",
"public void setPrecision(Integer precision) throws DBException {\n _precision = precision;\n }",
"public static int getPrecision()\r\n\t{\treturn PRECISION;\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns foreign data wrapper of given name or null if the foreign data wrapper has not been found. | public PgForeignDataWrapper getForeignDW(final String name) {
return fdws.get(name);
} | [
"private SchemaWrapper findSchemaWrapperInTree( String name )\n {\n List<TreeNode> schemaWrappers = ( ( TreeNode ) viewer.getInput() ).getChildren();\n for ( TreeNode sw : schemaWrappers )\n {\n if ( ( ( SchemaWrapper ) sw ).getSchema().getName().toLowerCase().equals( name.toLowerCase() ) )\n {\n return ( SchemaWrapper ) sw;\n }\n }\n \n return null;\n }",
"public BusinessObject findChildByName(String name) {\n\t\tif (children == null) return null;\n\t\tBusinessObject child = children.get(name.toLowerCase());\n\t\tif (child == null) return null;\n\t\treturn child.getReferencedObject();\n\t}",
"public Dataset findDataset( String name ) {\n if ( name == null )\n return null;\n if ( dataset.getName() != null && name.equals( dataset.getName() ) ) {\n return dataset;\n }\n return findDataset( name, dataset.getDatasets() );\n }",
"public Constraint getFKConstraint(String fkName) { // FIXME use \"findXxx\" instead of getXxx\n\t\tif (constraints == null) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tfor (Constraint fk : constraints) {\n\t\t\t\tif (fk.getType().equals(ConstraintType.FOREIGNKEY.getText())\n\t\t\t\t\t\t&& fkName.equals(fk.getName())) {\n\t\t\t\t\treturn fk;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public DigitalDoc getFromName(String nome){\n\t\tfor(DigitalDoc d: libreria){\n\t\t\tif(d.name().equals(nome))\n\t\t\t\treturn d;\n\t\t}\n\t\treturn null;\n\t}",
"public Datum getDatum(String name) {\n java.util.Vector<Datum> list = getDatumList();\n for(Datum datum : list){\n if(datum.toString().equals(name)) return datum ;\n }\n return null ;\n }",
"private ForeignKeyElement getMatchingFK (\n\t\t\t\tMappingRelationshipElement mapping)\n\t\t\t{\n\t\t\t\tMappingClassElement mappingClass = mapping.\n\t\t\t\t\tgetDeclaringClass();\n\t\t\t\tString databaseRoot = getSchemaForClass(getClassName());\n\t\t\t\tList pairNames = mapping.getColumns();\n\t\t\t\tList tables = mappingClass.getTables();\n\t\t\t\t\t\n\t\t\t\tif (tables != null)\n\t\t\t\t{\n\t\t\t\t\tfor (Iterator i = tables.iterator(); i.hasNext();)\n\t\t\t\t\t{\n\t\t\t\t\t\tString tableName = ((MappingTableElement)i.next()).\n\t\t\t\t\t\t\tgetName();\n\t\t\t\t\t\tTableElement table = getTable(tableName, databaseRoot);\n\t\t\t\t\t\tForeignKeyElement fk = getMatchingFK(pairNames, table);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (fk != null)\n\t\t\t\t\t\t\treturn fk;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn null;\n\t\t\t}",
"@Deprecated\n public ForeignKey getForeignKey(String name) {\n return getForeignKey(DBIdentifier.newForeignKey(name));\n }",
"@Nullable\n <T> Field<T> field(Name name, DataType<T> dataType);",
"public static DBFactory<? extends DBRecord<?>> getFactoryByName(String utableName)\n {\n String utn = DBFactory.getActualTableName(utableName);\n for (Iterator<DBFactory<? extends DBRecord<?>>> i = DBFactory.factoryList.iterator(); i.hasNext();) {\n DBFactory<? extends DBRecord<?>> fact = i.next();\n if (fact.getUntranslatedTableName().equals(utn)) { \n return fact; \n }\n }\n return null;\n }",
"public DataSource findAttachmentByName(final String name)\n {\n DataSource dataSource;\n\n for (final DataSource element : getAttachmentList()) {\n dataSource = element;\n if (name.equalsIgnoreCase(dataSource.getName()))\n {\n return dataSource;\n }\n }\n\n return null;\n }",
"public DBField getField(String name) \n {\n String n = this.getMappedFieldName(name);\n return (n != null)? this.fieldMap.get(n) : null;\n }",
"@Nullable\n <T> Field<T> field(String name, DataType<T> dataType);",
"public Object getData(String k) {\n\t\tif (find(k)) {\r\n\t\t\treturn find(table[hash(k)], k);\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"protected DataHolder getDataHolder(List<DataHolder> dhs, String name) {\n\t\tDataHolder dh = null;\n\t\tString sindex = null;\n\t\tString sname = null;\n\t\tint index = -1;\n\t\t\n\t\tif (dhs == null || dhs.size() <= 0) return null;\n\t\tif (null == name || \"\".equals(name)) return null;\n\t\t//简单变量\n\t\tif (!name.matches(\".*?\\\\[\\\\d+\\\\]\")) {\n\t\t\tsname = name;\n\t\t} else { //list变量\n\t\t\tsname = name.replaceFirst(\"\\\\[\\\\d*\\\\].*\", \"\");\n\t\t\tsindex = name.replaceFirst(\".*?\\\\[.*?\",\"\");\n\t\t\tsindex = sindex.replaceFirst(\"\\\\].*\",\"\");\n\t\t\tindex = Integer.parseInt(sindex);\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < dhs.size(); i++) {\n\t\t\tdh = dhs.get(i);\n\t\t\tif (sname.equalsIgnoreCase(dh.getName()))\n\t\t\t\tbreak;\n\t\t\telse\n\t\t\t\tdh = null;\n\t\t}\n\t\t\n\t\tif (dh == null)\n\t\t\treturn null;\n\t\tif (index < 0) return dh;\n\t\t\n\t\tCollectionHolder ch = (CollectionHolder)dh;\n\t\tif (ch.getVars().size() < index || index<1) {\n\t\t\tgetLogger().debug(\"index \" + index + \" is out of boundary!\");\n\t\t\treturn null;\n\t\t}\n\t\treturn ch.getVars().get(index-1);\n\t}",
"protected RdbData getForeignKeyData(Class className, String columnName, String fkGetMethod) {\r\n try {\r\n String key = className + \".\" + columnName;\r\n if (hasTransientData(key)) {\r\n return (RdbData) getTransientData(key);\r\n }\r\n if (!Register.getRegister().isRegistered(className)) {\r\n className.getConstructor(new Class[0]).newInstance(new Object[0]);\r\n }\r\n\r\n RdbData rdbData = null;\r\n Object foreignKey = getClass().getMethod(fkGetMethod, (Class[]) null).invoke(this, (Object[]) null);\r\n if (foreignKey != null) {\r\n Class[] args = {\r\n String.class, SQLManagerIF.class, String.class, String.class};\r\n rdbData = (RdbData) className.getConstructor(args).newInstance(new Object[]{foreignKey.toString(), getSQLManager(), getLogonUsername(),\r\n getConnectionPool()});\r\n }\r\n setTransientData(key, rdbData);\r\n return rdbData;\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n return null;\r\n }",
"public Object getData(String pName) {\n\t\tfor(int i = 0; i < this.Fields.length; i++) {\n\t\t\tif(!UObject.equal(pName, this.FieldNames[i])) continue;\n\t\t\tField F = this.Fields[i];\n\n\t\t\ttry { return F.get(this.Obj); }\n\t\t\tcatch(IllegalAccessException E) { }\n\t\t\tcatch(NullPointerException E) { } \n\t\t\treturn null;\n\t\t}\n\t\treturn false;\n\t}",
"DataNameReference createDataNameReference();",
"public synchronized DataMap getDataMap(String mapName) {\n if (mapName == null) {\n return null;\n }\n\n Iterator it = maps.iterator();\n while (it.hasNext()) {\n DataMap map = (DataMap) it.next();\n if (mapName.equals(map.getName())) {\n return map;\n }\n }\n\n return null;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Scan class names from the given package name. | public static Set<Class<?>> scanClassNames(final String packageName)
throws IOException, ClassNotFoundException
{
return scanClassNames(packageName, false);
} | [
"public interface PackageScanner {\n String FILE_SUFFIX = \".class\";\n\n /**\n * Find target element blow package except two class name.\n *\n * @param packageName\n * @param except\n * @param except2\n * @return\n * @throws IOException\n */\n Set<String> classNames(String packageName, String except, String except2) throws Exception;\n\n /**\n * Find target element blow package except single class name.\n *\n * @param packageName\n * @param except\n * @return\n * @throws IOException\n */\n Set<String> classNames(String packageName, String except) throws Exception;\n\n /**\n * Scanning target class blow package except @param except and @param except2 class.\n *\n * @param packageName\n * @param except\n * @param except2\n * @return\n */\n Set<?> scan(String packageName, Class<?> except, Class<?> except2) throws Exception;\n\n /**\n * Scanning target class blow package except @param except class.\n *\n * @param packageName\n * @param except\n * @return\n */\n Set<?> scan(String packageName, Class<?> except) throws Exception;\n\n /**\n * Instantiation a class set.\n *\n * @param classNames\n * @return\n */\n Set<?> instantiation(Set<String> classNames, Class<?> tClass) throws IOException;\n}",
"public List findClasses(JCPackage pkg, String name, boolean exactMatch);",
"public static List<String> scanPackage(String[] packages, Predicate<String> filter) {\n FastClasspathScanner scanner = new FastClasspathScanner(packages);\n scanner.scan();\n List<String> classes = new ArrayList<>();\n \n scanner.getNamesOfAllClasses().stream().filter(filter).forEach(cls -> {\n classes.add(cls);\n });\n \n return classes;\n }",
"public Set<Class<?>> scanPackageAnnotatedClasses(final Package pPackage) throws IOException {\n String path = pPackage.getName().replace('.', '/');\n Enumeration<URL> resources = Thread.currentThread().getContextClassLoader().getResources(path);\n Set<Class<?>> clazzes = new HashSet<Class<?>>();\n\n while (resources.hasMoreElements()) {\n clazzes.addAll(scanURLAnnotatedClasses(resources.nextElement(), pPackage.getName()));\n }\n return clazzes;\n }",
"public static Collection<Class> getClassesForPackage(String packageName)\n throws Exception {\n String packagePath = packageName.replace(\".\", \"/\");\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n Set<URL> jarUrls = new HashSet<URL>();\n\n while (classLoader != null) {\n if (classLoader instanceof URLClassLoader) {\n for (URL url : ((URLClassLoader) classLoader).getURLs()) {\n if (url.getFile().endsWith(\".jar\")) // may want better way to detect jar files\n {\n jarUrls.add(url);\n } // if\n } // for\n } // if\n\n classLoader = classLoader.getParent();\n } // while\n\n Set<Class> classes = new HashSet<Class>();\n\n for (URL url : jarUrls) {\n JarInputStream stream = new JarInputStream(url.openStream()); // may want better way to open url connections\n JarEntry entry = stream.getNextJarEntry();\n\n while (entry != null) {\n String name = entry.getName();\n\n if (name.endsWith(\".class\") && name.substring(0,\n packagePath.length()).equals(packagePath)) {\n classes.add(Class.forName(name.substring(0,\n name.length() - 6).replace(\"/\", \".\")));\n } // if\n\n entry = stream.getNextJarEntry();\n } // while\n\n stream.close();\n } // for\n\n return classes;\n }",
"public static List<String> getClassNamesFromPackage(String argPackageName,\r\n\t\t\tboolean argIterateInnerClasses) {\r\n\t\tList<ClassLoader> classLoadersList = new LinkedList<ClassLoader>();\r\n\t\tclassLoadersList.add(ClasspathHelper.contextClassLoader());\r\n\t\tclassLoadersList.add(ClasspathHelper.staticClassLoader());\r\n\t\tConfigurationBuilder configurationBuilder = null;\r\n\t\tif (argIterateInnerClasses) {\r\n\t\t\tconfigurationBuilder = new ConfigurationBuilder().setScanners(\r\n\t\t\t\t\tnew SubTypesScanner(false), new ResourcesScanner())\r\n\t\t\t\t\t.setUrls(\r\n\t\t\t\t\t\t\tClasspathHelper.forClassLoader(classLoadersList\r\n\t\t\t\t\t\t\t\t\t.toArray(new ClassLoader[0])));\r\n\t\t} else {\r\n\t\t\tconfigurationBuilder = new ConfigurationBuilder().setScanners(\r\n\t\t\t\t\tnew SubTypesScanner(false), new ResourcesScanner())\r\n\t\t\t\t\t.setUrls(\r\n\t\t\t\t\t\t\tClasspathHelper.forPackage(argPackageName,\r\n\t\t\t\t\t\t\t\t\tnew ClassLoader[0]));\r\n\t\t}\r\n\t\tReflections reflections = new Reflections(configurationBuilder);\r\n\t\tSet<Class<? extends Object>> classes = reflections\r\n\t\t\t\t.getSubTypesOf(Object.class);\r\n\t\tif (Precondition.checkNotEmpty(classes)) {\r\n\t\t\tList<String> simpleClassNamesList = new ArrayList<String>();\r\n\t\t\tIterator<Class<? extends Object>> s = classes.iterator();\r\n\t\t\tlogger.info(\"Loading Class Names: \");\r\n\t\t\twhile (s.hasNext()) {\r\n\t\t\t\tClass<? extends Object> st = s.next();\r\n\t\t\t\tif (!st.isInterface()) {\r\n\t\t\t\t\tString simpleClassName = st.getName();\r\n\t\t\t\t\tsimpleClassNamesList.add(simpleClassName);\r\n\t\t\t\t\tlogger.info(\"Class Names: \" + simpleClassName);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn simpleClassNamesList;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"private List<Class<?>> getClasses(String packageName) throws Exception {\n File directory = null;\n try {\n ClassLoader cld = getClassLoader();\n URL resource = getResource(packageName, cld);\n directory = new File(resource.getFile());\n } catch (NullPointerException ex) {\n throw new ClassNotFoundException(packageName + \" (\" + directory\n + \") does not appear to be a valid package\");\n }\n return collectClasses(packageName, directory);\n }",
"private static List<Class> findClasses(File directory, String packageName) throws ClassNotFoundException {\r\n List<Class> classes = new ArrayList<Class>();\r\n if (!directory.exists()) {\r\n return classes;\r\n }\r\n File[] files = directory.listFiles();\r\n for (File file : files) {\r\n if (file.isDirectory()) {\r\n assert !file.getName().contains(\".\");\r\n classes.addAll(findClasses(file, packageName + \".\" + file.getName()));\r\n } else if (file.getName().endsWith(\".class\")) {\r\n classes.add(\r\n Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6))\r\n );\r\n }\r\n }\r\n return classes;\r\n }",
"private static List<Class<?>> findClasses(File directory, String packageName) throws ClassNotFoundException {\n List<Class<?>> classes = new ArrayList<Class<?>>();\n if (!directory.exists()) {\n return classes;\n }\n File[] files = directory.listFiles();\n for (File file : files) {\n if (file.isDirectory()) {\n assert !file.getName().contains(\".\");\n classes.addAll(findClasses(file, packageName + \".\" + file.getName()));\n } else if (file.getName().endsWith(\".class\")) {\n classes.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6)));\n }\n }\n return classes;\n }",
"private static List<Class> findClasses(File directory, String packageName, boolean scanChild) throws ClassNotFoundException {\n\t List<Class> classes = new ArrayList<Class>();\n\t if (!directory.exists()) {\n\t return classes;\n\t }\n\t File[] files = directory.listFiles();\n\t for (File file : files) {\n\t \tif(scanChild){\n\t\t if (file.isDirectory()) {\n\t\t assert !file.getName().contains(\".\");\n\t\t classes.addAll(findClasses(file, packageName + \".\" + file.getName(), true));\n\t\t } else if (file.getName().endsWith(\".class\")) {\n\t\t classes.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6)));\n\t\t }\n\t \t} else {\n\t\t if (file.isDirectory()) {\n\t\t \tcontinue;\n\t\t } else if (file.getName().endsWith(\".class\")) {\n\t\t classes.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6)));\n\t\t }\n\t \t}\n\t }\n\t return classes;\n\t}",
"private static List<Class<?>> findClasses(File directory, String packageName) throws ClassNotFoundException {\n\t\tList<Class<?>> classes = new ArrayList<Class<?>>();\n\t\tif (!directory.exists()) {\n\t\t\treturn classes;\n\t\t}\n\t\tFile[] files = directory.listFiles();\n\t\tfor (File file : files) {\n\t\t\tif (file.isDirectory()) {\n\t\t\t\tassert !file.getName().contains(\".\");\n\t\t\t\tclasses.addAll(findClasses(file, packageName + \".\" + file.getName()));\n\t\t\t} else if (file.getName().endsWith(\".class\")) {\n\t\t\t\tclasses.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6)));\n\t\t\t}\n\t\t}\n\t\treturn classes;\n\t}",
"private static List<Class> findClasses(final File directory, final String packageName) throws ClassNotFoundException {\n final List<Class> classes = new ArrayList<>();\n if (!directory.exists()) {\n return classes;\n }\n final File[] files = directory.listFiles();\n for (final File file : files) {\n if (file.isDirectory()) {\n assert !file.getName().contains(\".\");\n classes.addAll(findClasses(file, packageName + \".\" + file.getName()));\n } else if (file.getName().endsWith(\".class\")) {\n classes.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6)));\n }\n }\n return classes;\n }",
"private static Class[] getClasses(String packageName, boolean scanChild) throws ClassNotFoundException, IOException {\n\t ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n\t assert classLoader != null;\n\t String path = packageName.replace('.', '/');\n\t Enumeration<URL> resources = classLoader.getResources(path);\n\t List<File> dirs = new ArrayList<File>();\n\t while (resources.hasMoreElements()) {\n\t URL resource = resources.nextElement();\n\t dirs.add(new File(resource.getFile()));\n\t }\n\t ArrayList<Class> classes = new ArrayList<Class>();\n\t for (File directory : dirs) {\n\t classes.addAll(findClasses(directory, packageName, scanChild));\n\t }\n\t return classes.toArray(new Class[classes.size()]);\n\t}",
"@SneakyThrows\n private Stream<Class<?>> findClasses(File directory, String packageName) {\n\n val lookForClasses =\n Function2.of(ReflectionUtils::lookForClasses)\n .apply(packageName);\n\n return Optional.of(directory)\n .filter(File::exists)\n .map(File::listFiles)\n .stream()\n .flatMap(Arrays::stream)\n .flatMap(lookForClasses);\n }",
"public void scanClasspath() {\n List<String> classNames = new ArrayList<>(Collections.list(dexFile.entries()));\n\n ClassLoader classLoader = org.upacreekrobotics.dashboard.ClasspathScanner.class.getClassLoader();\n\n for (String className : classNames) {\n if (filter.shouldProcessClass(className)) {\n try {\n Class klass = Class.forName(className, false, classLoader);\n\n filter.processClass(klass);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (NoClassDefFoundError e) {\n e.printStackTrace();\n }\n }\n }\n }",
"private static List<Class<?>> getClasses(String packageName)\n throws Exception {\n ClassLoader classLoader = Thread.currentThread()\n .getContextClassLoader();\n assert classLoader != null;\n String path = packageName.replace('.', '/');\n Enumeration<URL> resources = classLoader.getResources(path);\n List<File> dirs = new ArrayList<File>();\n while (resources.hasMoreElements()) {\n URL resource = resources.nextElement();\n dirs.add(new File(resource.getFile()));\n }\n List<Class<?>> classes = new ArrayList<Class<?>>();\n for (File directory : dirs) {\n classes.addAll(findClasses(directory, packageName));\n }\n return classes;\n }",
"public void scanClasses(Collection<String> clazzes) {\n\t\tfor (String clazz : clazzes) {\n\t\t\ttry {\n\t\t\t\tClass<?> c = Class.forName(clazz);\n\t\t\t\tscanClass(c);\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"private static List<String> scanDirectory( final File dir, final String pattern )\n {\n final List<String> classNames = new ArrayList<String>();\n DirectoryScanner scanner = new DirectoryScanner();\n scanner.setBasedir( dir );\n scanner.addDefaultExcludes();\n scanner.setIncludes( new String[] { pattern } );\n\n scanner.scan();\n\n for ( String fileNameOfClass : scanner.getIncludedFiles() )\n {\n classNames.add( fileNameOfClass );\n }\n return classNames;\n }",
"protected List<String> packagesToScan() {\n\t\treturn singletonList(\"com\");\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Guarantee that only one instance of the AgentExecutor is built. | private static AgentExecutor createDefaultInstance() {
synchronized (sAgentExecutorMap) {
AgentExecutor agentExecutor = sAgentExecutorMap.get(DEFAULT_AGENT_EXECUTOR_ID);
if (agentExecutor == null) {
agentExecutor = builder(DEFAULT_AGENT_EXECUTOR_ID).build();
Log.d(TAG, "Built Default " + String.valueOf(agentExecutor));
sAgentExecutorMap.put(DEFAULT_AGENT_EXECUTOR_ID, agentExecutor);
}
return agentExecutor;
}
} | [
"public AgentExecutor getAgentExecutor() {\n return mAgentExecutor;\n }",
"public static Agent agent() {\n return new Agent(coreMemory());\n }",
"public static DirectCallExecutor newExecutor() {\n\t\treturn NEVER_PAUSING_EXECUTOR;\n\t}",
"private void scavengeOldAgentObjects() {\n _executor.submit(new Runnable() {\n @Override\n public void run() {\n try {\n Thread.sleep(2000L);\n } catch (final InterruptedException ignored) {\n } finally {\n System.gc();\n }\n }\n });\n }",
"private static synchronized void instanceCreated(OrderedExecutor exe) {\n instances.add(exe);\n }",
"Agent createAgent();",
"Executor getExecutor();",
"public abstract java.util.concurrent.Executor getExecutor();",
"public Agent createNewAgent() throws MaceException{\r\n\t\tAgent agent = new Agent(\"n\" + maxAgentId, Agent.AGENT_BUYER);\r\n\t\taddAgent(agent);\r\n\t\tmaxAgentId++;\r\n\t\treturn agent;\r\n\t}",
"Executor asExecutor();",
"public interface AgentSim {\n\t\n\t/**\n\t * Add simulated UseableObjects to the ObjectPool before simulation starts.\n\t * @return true if successful\n\t */\n\tpublic boolean prepareObjects();\n\t\n\t/**\n\t * Add agents to the AgentPool before simulation starts.\n\t * @return true if successful\n\t */\n\tpublic boolean prepareAgents();\n\t\n\t\n\t/**\n\t * Invoke the necessary methods and threads to start the simulation.\n\t * @return true if successful\n\t */\n\tpublic boolean startSim();\n\t\n\t/**\n\t * Prepare the objects and conditions necessary to run the simulation, then run the simulation.\n\t * @return true if successful\n\t */\n\tpublic boolean prepareAndStartSim();\n\t\n\t/**\n\t * Accessor for the AgentPool containing Agents in this simulation.\n\t * @return the AgentPool in this simulation\n\t */\n\tpublic AgentPool getAgentPool();\n\t\n\t/**\n\t * Accessor for the ObjectPool containing Objects in this simulation.\n\t * @return the ObjectPool in this simulation\n\t */\n\tpublic ObjectPool getObjectPool();\n\t\n}",
"private void createAgent() {\n logger.info(\"Creating agent\");\n iteration = 0;\n aiManager = new AIManager(configDialogInfo);\n aiManager.getAgent().addObserver(\"gameEngine\", this);\n AIBirth.generate(aiManager.getAgent());\n aiManager.start();\n }",
"public static AgentExecutor getInstance(String identifier) {\n if (DEFAULT_AGENT_EXECUTOR_ID.equals(identifier)) {\n return getDefault();\n }\n return sAgentExecutorMap.get(identifier);\n }",
"public void submitAddAgent (){\n\t\t\n\t}",
"public static AgentExecutor getDefault() {\n AgentExecutor agentExecutor = sAgentExecutorMap.get(DEFAULT_AGENT_EXECUTOR_ID);\n if (agentExecutor == null) {\n agentExecutor = createDefaultInstance();\n }\n return agentExecutor;\n }",
"protected A getAgent() {\n\n\t\tif (this.agent == null) {\n\t\t\tthis.agent = this.getServiceAgent();\n\t\t\tif (this.agent == null) {\n\t\t\t\tthrow new IllegalStateException(\"agent cannot be null\");\n\t\t\t}\n\t\t}\n\t\treturn this.agent;\n\t}",
"public static psi15_mainAgent getInstance() {\n return ma;\n }",
"public void testNewSingleThreadExecutor1() {\n final ExecutorService e = Executors.newSingleThreadExecutor();\n try (PoolCleaner cleaner = cleaner(e)) {\n e.execute(new NoOpRunnable());\n e.execute(new NoOpRunnable());\n e.execute(new NoOpRunnable());\n }\n }",
"public static AkkaSystemExecutor getExecutor() {\n return instance;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generated Property Setter for attribute RELATIONSHIPS | @Override
public void setRelationships(com.gensym.util.Sequence relationships) throws G2AccessException {
setAttributeValue (SystemAttributeSymbols.RELATIONSHIPS_, relationships);
} | [
"void setAttribute(PropertyNoun newattr);",
"@Override\n public com.gensym.util.Sequence getRelationships() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.RELATIONSHIPS_);\n return (com.gensym.util.Sequence)retnValue;\n }",
"@Test\r\n public void testSetRefereeRelationship() {\r\n System.out.println(\"setRefereeRelationship\");\r\n RefereeRelationship refereeRelationship = null;\r\n Referee instance = new Referee();\r\n instance.setRefereeRelationship(refereeRelationship);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }",
"PropertyRealization createPropertyRealization();",
"private void handlePropertyAsAttribute(Attributes attributes, List<String> ignoredAttributes,\n AdvancedInheritableItem parentNode, String buildConf) {\n for (int i = 0; i < attributes.getLength(); i++) {\n if (!ignoredAttributes.contains(attributes.getQName(i))) {\n String propertyName = attributes.getQName(i);\n String value = IvyContext.getContext().getSettings().substitute(attributes.getValue(i));\n PropertyDescriptor property = new PropertyDescriptor(propertyName);\n property.setValue(value);\n property.setBuildConfigurations(buildConf);\n if (parentNode != null) {\n property.setInheritScope(parentNode.getInheritScope());\n property.setInheritable(parentNode.isInheritable());\n }\n easyAntModuleDescriptor.getProperties().put(propertyName, property);\n }\n }\n }",
"public String getTargetRelationship() {\n return targetRelationship;\n }",
"public void addRelationAttrProp(String propName, String attrName, String value) {\n if (relationAttrProps.get(propName) == null) {\n relationAttrProps.put(propName, new HashMap<String, String>());\n }\n if (attrName != null && value != null) {\n relationAttrProps.get(propName).put(attrName, value);\n }\n }",
"public static void set_RelationAttributeStereotype(String s, String v) throws RuntimeException\n {\n read_if_needed_();\n UmlCom.send_cmd(CmdFamily.javaSettingsCmd, JavaSettingsCmd._setJavaRelationAttributeStereotypeCmd, s, v);\n UmlCom.check();\n \n UmlStereotype st = (UmlStereotype) UmlSettings._map_relation_attribute_stereotypes.get(s);\n \n if (st == null)\n st = UmlSettings.add_rel_attr_stereotype(s);\n st.java = v;\n }",
"public void setRelationship(Relationship r) {\n\t\trelationship = r;\n\t}",
"public IProperty recontextualizeProperty(IProperty value);",
"public static void addClassesAsDataProperties(OWLOntology sourceAttributeOntology, OWLOntology targetOntology) {\n\t\tOWLOntologyManager manager = OWLManager.createOWLOntologyManager();\n\t\tOWLDataFactory factory = manager.getOWLDataFactory();\n\t\tSet<String> processedProperties = new HashSet<String>();\n\n\t\t// Get targetOntology Namespace\n\t\tOWLXMLDocumentFormat owlFormat = new OWLXMLDocumentFormat();\n\t\tOWLOntologyXMLNamespaceManager namespaceManager = new OWLOntologyXMLNamespaceManager(targetOntology, owlFormat);\n\t\tString targetOntologyNamespace = namespaceManager.getDefaultNamespace();\n\t\t\n\t\t// Get all SubclassOf relations \n\t\tSet<OWLSubClassOfAxiom> namedSubclassOf = OntologyData.getOntologySubclassOfPairs(sourceAttributeOntology);\n\t\tfor(OWLSubClassOfAxiom axiom_ : namedSubclassOf) {\n\t\t\t// Get Classes as Data Properties and subproperty assertions\n\t\t\tOWLClass subClass = axiom_.getSubClass().asOWLClass();\n\t\t\tString subClassName = subClass.getIRI().getShortForm();\n\t\t\tOWLDataProperty subProperty = factory.getOWLDataProperty(IRI.create(targetOntologyNamespace + StringUtils.uncapitalize(subClassName)));\t\n\t\t\t\n\t\t\tOWLClass superClass = axiom_.getSuperClass().asOWLClass();\n\t\t\tString superClassName = superClass.getIRI().getShortForm();\n\t\t\tOWLDataProperty superProperty = factory.getOWLDataProperty(IRI.create(targetOntologyNamespace + StringUtils.uncapitalize(superClassName)));\n\t\t\t\n\t\t\tOWLSubDataPropertyOfAxiom axiom = factory.getOWLSubDataPropertyOfAxiom(subProperty, superProperty);\n\t\t\tmanager.applyChange(new AddAxiom(targetOntology, axiom));\t\n\t\t\t\n\t\t\t// Synonyms\t\n\t\t\taddEquivalentClassesAsDataProperties(subClass, sourceAttributeOntology, targetOntology);\n\t\t\taddEquivalentClassesAsDataProperties(superClass, sourceAttributeOntology, targetOntology);\n\t\t\t\n\t\t\t// Annotations for subProperty\n\t\t\tif(!processedProperties.contains(subClassName)) {\n\t\t\t\timportAnnotationsForTransformedEntity(subClass, subProperty, sourceAttributeOntology, targetOntology);\n\t\t\t\tprocessedProperties.add(subClassName);\n\t\t\t}\n\n\t\t\t// Annotations for superProperty\n\t\t\tif(!processedProperties.contains(superClassName)) {\n\t\t\t\timportAnnotationsForTransformedEntity(superClass, superProperty, sourceAttributeOntology, targetOntology);\t\t\n\t\t\t\tprocessedProperties.add(superClassName);\n\t\t\t}\n\t\t}\n\t}",
"DefinedProperty relAddProperty( long relId, int propertyKey, Object value );",
"public void setTargetRelationship(String tmp) {\n this.targetRelationship = tmp;\n }",
"public String getRelationship() {\n return relationship;\n }",
"public interface AttributeValueConceptRefSetMember extends ConceptRefSetMember,\n AttributeValueRefSetMember<Concept> {\n // nothing extra\n}",
"DefinedProperty relChangeProperty( long relId, int propertyKey, Object value );",
"IGLProperty clone();",
"RDFProperty getProtegeAllowedParentProperty();",
"String getTargetProperty();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Database__ValueAssignment_2" $ANTLR start "rule__Tab__ValueAssignment_2" ../eu.artist.migration.mdt.database.sql.editor.ui/srcgen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1985:1: rule__Tab__ValueAssignment_2 : ( RULE_ID ) ; | public final void rule__Tab__ValueAssignment_2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1989:1: ( ( RULE_ID ) )
// ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1990:1: ( RULE_ID )
{
// ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1990:1: ( RULE_ID )
// ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1991:1: RULE_ID
{
before(grammarAccess.getTabAccess().getValueIDTerminalRuleCall_2_0());
match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__Tab__ValueAssignment_23941);
after(grammarAccess.getTabAccess().getValueIDTerminalRuleCall_2_0());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__Database__ValueAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1974:1: ( ( RULE_ID ) )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1975:1: ( RULE_ID )\n {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1975:1: ( RULE_ID )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1976:1: RULE_ID\n {\n before(grammarAccess.getDatabaseAccess().getValueIDTerminalRuleCall_2_0()); \n match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__Database__ValueAssignment_23910); \n after(grammarAccess.getDatabaseAccess().getValueIDTerminalRuleCall_2_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Column__ValueAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:2004:1: ( ( RULE_ID ) )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:2005:1: ( RULE_ID )\n {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:2005:1: ( RULE_ID )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:2006:1: RULE_ID\n {\n before(grammarAccess.getColumnAccess().getValueIDTerminalRuleCall_2_0()); \n match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__Column__ValueAssignment_23972); \n after(grammarAccess.getColumnAccess().getValueIDTerminalRuleCall_2_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Tab__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1621:1: ( ( ( rule__Tab__ValueAssignment_2 ) ) )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1622:1: ( ( rule__Tab__ValueAssignment_2 ) )\n {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1622:1: ( ( rule__Tab__ValueAssignment_2 ) )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1623:1: ( rule__Tab__ValueAssignment_2 )\n {\n before(grammarAccess.getTabAccess().getValueAssignment_2()); \n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1624:1: ( rule__Tab__ValueAssignment_2 )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1624:2: rule__Tab__ValueAssignment_2\n {\n pushFollow(FOLLOW_rule__Tab__ValueAssignment_2_in_rule__Tab__Group__2__Impl3219);\n rule__Tab__ValueAssignment_2();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getTabAccess().getValueAssignment_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Database__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1492:1: ( ( ( rule__Database__ValueAssignment_2 ) ) )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1493:1: ( ( rule__Database__ValueAssignment_2 ) )\n {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1493:1: ( ( rule__Database__ValueAssignment_2 ) )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1494:1: ( rule__Database__ValueAssignment_2 )\n {\n before(grammarAccess.getDatabaseAccess().getValueAssignment_2()); \n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1495:1: ( rule__Database__ValueAssignment_2 )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1495:2: rule__Database__ValueAssignment_2\n {\n pushFollow(FOLLOW_rule__Database__ValueAssignment_2_in_rule__Database__Group__2__Impl2969);\n rule__Database__ValueAssignment_2();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getDatabaseAccess().getValueAssignment_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Assignment__ValueAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMGPL.g:4889:1: ( ( ruleExpr ) )\n // InternalMGPL.g:4890:2: ( ruleExpr )\n {\n // InternalMGPL.g:4890:2: ( ruleExpr )\n // InternalMGPL.g:4891:3: ruleExpr\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getAssignmentAccess().getValueExprParserRuleCall_2_0()); \n }\n pushFollow(FOLLOW_2);\n ruleExpr();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getAssignmentAccess().getValueExprParserRuleCall_2_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__TIAssignment__Instance_typeAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBSQL2Java.g:3513:1: ( ( RULE_ID ) )\n // InternalBSQL2Java.g:3514:2: ( RULE_ID )\n {\n // InternalBSQL2Java.g:3514:2: ( RULE_ID )\n // InternalBSQL2Java.g:3515:3: RULE_ID\n {\n before(grammarAccess.getTIAssignmentAccess().getInstance_typeIDTerminalRuleCall_2_0()); \n match(input,RULE_ID,FOLLOW_2); \n after(grammarAccess.getTIAssignmentAccess().getInstance_typeIDTerminalRuleCall_2_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__ParaValue__IdAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:40450:1: ( ( RULE_ID ) )\n // InternalDsl.g:40451:2: ( RULE_ID )\n {\n // InternalDsl.g:40451:2: ( RULE_ID )\n // InternalDsl.g:40452:3: RULE_ID\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getParaValueAccess().getIdIDTerminalRuleCall_2_0()); \n }\n match(input,RULE_ID,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getParaValueAccess().getIdIDTerminalRuleCall_2_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Column__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1750:1: ( ( ( rule__Column__ValueAssignment_2 ) ) )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1751:1: ( ( rule__Column__ValueAssignment_2 ) )\n {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1751:1: ( ( rule__Column__ValueAssignment_2 ) )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1752:1: ( rule__Column__ValueAssignment_2 )\n {\n before(grammarAccess.getColumnAccess().getValueAssignment_2()); \n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1753:1: ( rule__Column__ValueAssignment_2 )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1753:2: rule__Column__ValueAssignment_2\n {\n pushFollow(FOLLOW_rule__Column__ValueAssignment_2_in_rule__Column__Group__2__Impl3469);\n rule__Column__ValueAssignment_2();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getColumnAccess().getValueAssignment_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Context__ItAssignment_2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:18040:1: ( ( RULE_ID ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:18041:1: ( RULE_ID )\r\n {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:18041:1: ( RULE_ID )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:18042:1: RULE_ID\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getContextAccess().getItIDTerminalRuleCall_2_0()); \r\n }\r\n match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__Context__ItAssignment_236257); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getContextAccess().getItIDTerminalRuleCall_2_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__TypeDef__NameAssignment_2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:9306:1: ( ( RULE_ID ) )\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:9307:1: ( RULE_ID )\r\n {\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:9307:1: ( RULE_ID )\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:9308:1: RULE_ID\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getTypeDefAccess().getNameIDTerminalRuleCall_2_0()); \r\n }\r\n match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__TypeDef__NameAssignment_218656); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getTypeDefAccess().getNameIDTerminalRuleCall_2_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Assignment__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMGPL.g:3079:1: ( ( ( rule__Assignment__ValueAssignment_2 ) ) )\n // InternalMGPL.g:3080:1: ( ( rule__Assignment__ValueAssignment_2 ) )\n {\n // InternalMGPL.g:3080:1: ( ( rule__Assignment__ValueAssignment_2 ) )\n // InternalMGPL.g:3081:2: ( rule__Assignment__ValueAssignment_2 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getAssignmentAccess().getValueAssignment_2()); \n }\n // InternalMGPL.g:3082:2: ( rule__Assignment__ValueAssignment_2 )\n // InternalMGPL.g:3082:3: rule__Assignment__ValueAssignment_2\n {\n pushFollow(FOLLOW_2);\n rule__Assignment__ValueAssignment_2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getAssignmentAccess().getValueAssignment_2()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Right__ClassAssignment_0_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:2788:1: ( ( ( RULE_ID ) ) )\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:2789:1: ( ( RULE_ID ) )\n {\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:2789:1: ( ( RULE_ID ) )\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:2790:1: ( RULE_ID )\n {\n before(grammarAccess.getRightAccess().getClassClassCrossReference_0_2_0()); \n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:2791:1: ( RULE_ID )\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:2792:1: RULE_ID\n {\n before(grammarAccess.getRightAccess().getClassClassIDTerminalRuleCall_0_2_0_1()); \n match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__Right__ClassAssignment_0_25596); \n after(grammarAccess.getRightAccess().getClassClassIDTerminalRuleCall_0_2_0_1()); \n\n }\n\n after(grammarAccess.getRightAccess().getClassClassCrossReference_0_2_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__ChangeValueExpression__ExpAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:40615:1: ( ( ruleExpression ) )\n // InternalDsl.g:40616:2: ( ruleExpression )\n {\n // InternalDsl.g:40616:2: ( ruleExpression )\n // InternalDsl.g:40617:3: ruleExpression\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getChangeValueExpressionAccess().getExpExpressionParserRuleCall_2_0()); \n }\n pushFollow(FOLLOW_2);\n ruleExpression();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getChangeValueExpressionAccess().getExpExpressionParserRuleCall_2_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__ColorResource__Group__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../hu.bme.mit.androtext.androres.ui/src-gen/hu/bme/mit/androtext/androres/ui/contentassist/antlr/internal/InternalAndroResDsl.g:1312:1: ( ( ( rule__ColorResource__ValueAssignment_2 ) ) )\r\n // ../hu.bme.mit.androtext.androres.ui/src-gen/hu/bme/mit/androtext/androres/ui/contentassist/antlr/internal/InternalAndroResDsl.g:1313:1: ( ( rule__ColorResource__ValueAssignment_2 ) )\r\n {\r\n // ../hu.bme.mit.androtext.androres.ui/src-gen/hu/bme/mit/androtext/androres/ui/contentassist/antlr/internal/InternalAndroResDsl.g:1313:1: ( ( rule__ColorResource__ValueAssignment_2 ) )\r\n // ../hu.bme.mit.androtext.androres.ui/src-gen/hu/bme/mit/androtext/androres/ui/contentassist/antlr/internal/InternalAndroResDsl.g:1314:1: ( rule__ColorResource__ValueAssignment_2 )\r\n {\r\n before(grammarAccess.getColorResourceAccess().getValueAssignment_2()); \r\n // ../hu.bme.mit.androtext.androres.ui/src-gen/hu/bme/mit/androtext/androres/ui/contentassist/antlr/internal/InternalAndroResDsl.g:1315:1: ( rule__ColorResource__ValueAssignment_2 )\r\n // ../hu.bme.mit.androtext.androres.ui/src-gen/hu/bme/mit/androtext/androres/ui/contentassist/antlr/internal/InternalAndroResDsl.g:1315:2: rule__ColorResource__ValueAssignment_2\r\n {\r\n pushFollow(FOLLOW_rule__ColorResource__ValueAssignment_2_in_rule__ColorResource__Group__2__Impl2703);\r\n rule__ColorResource__ValueAssignment_2();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n\r\n after(grammarAccess.getColorResourceAccess().getValueAssignment_2()); \r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void ruleDescription() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalLPDSL.g:491:2: ( ( ( rule__Description__ValueAssignment ) ) )\r\n // InternalLPDSL.g:492:2: ( ( rule__Description__ValueAssignment ) )\r\n {\r\n // InternalLPDSL.g:492:2: ( ( rule__Description__ValueAssignment ) )\r\n // InternalLPDSL.g:493:3: ( rule__Description__ValueAssignment )\r\n {\r\n before(grammarAccess.getDescriptionAccess().getValueAssignment()); \r\n // InternalLPDSL.g:494:3: ( rule__Description__ValueAssignment )\r\n // InternalLPDSL.g:494:4: rule__Description__ValueAssignment\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__Description__ValueAssignment();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n\r\n after(grammarAccess.getDescriptionAccess().getValueAssignment()); \r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__AttrAss__ValueAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMGPL.g:4634:1: ( ( ruleExpr ) )\n // InternalMGPL.g:4635:2: ( ruleExpr )\n {\n // InternalMGPL.g:4635:2: ( ruleExpr )\n // InternalMGPL.g:4636:3: ruleExpr\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getAttrAssAccess().getValueExprParserRuleCall_2_0()); \n }\n pushFollow(FOLLOW_2);\n ruleExpr();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getAttrAssAccess().getValueExprParserRuleCall_2_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__ChangeListValue__ExpAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:40645:1: ( ( ruleExpression ) )\n // InternalDsl.g:40646:2: ( ruleExpression )\n {\n // InternalDsl.g:40646:2: ( ruleExpression )\n // InternalDsl.g:40647:3: ruleExpression\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getChangeListValueAccess().getExpExpressionParserRuleCall_2_0()); \n }\n pushFollow(FOLLOW_2);\n ruleExpression();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getChangeListValueAccess().getExpExpressionParserRuleCall_2_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__S_Equation__ValueAssignment_2() throws RecognitionException {\n int rule__S_Equation__ValueAssignment_2_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 1074) ) { return ; }\n // InternalGaml.g:17961:1: ( ( ruleExpression ) )\n // InternalGaml.g:17962:1: ( ruleExpression )\n {\n // InternalGaml.g:17962:1: ( ruleExpression )\n // InternalGaml.g:17963:1: ruleExpression\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getS_EquationAccess().getValueExpressionParserRuleCall_2_0()); \n }\n pushFollow(FollowSets000.FOLLOW_2);\n ruleExpression();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getS_EquationAccess().getValueExpressionParserRuleCall_2_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 1074, rule__S_Equation__ValueAssignment_2_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Module__NameAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:10119:1: ( ( RULE_ID ) )\n // InternalOCLlite.g:10120:2: ( RULE_ID )\n {\n // InternalOCLlite.g:10120:2: ( RULE_ID )\n // InternalOCLlite.g:10121:3: RULE_ID\n {\n before(grammarAccess.getModuleAccess().getNameIDTerminalRuleCall_2_0()); \n match(input,RULE_ID,FOLLOW_2); \n after(grammarAccess.getModuleAccess().getNameIDTerminalRuleCall_2_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method formatting log message | public String formatMessage(LogRecord record) {
java.util.Date d = new java.util.Date(record.getMillis());
StringBuilder message = new StringBuilder(record.getLevel() + ": " + d + " ");
message.append(record.getSourceClassName() + ".");
message.append(record.getSourceMethodName() + "()\n");
message.append(record.getMessage() + "\n");
Throwable t = record.getThrown();
if (t != null && record.getLevel() == Level.WARNING) {
message.append("Exception: " + t.getMessage() + "\n");
for (StackTraceElement ste : t.getStackTrace())
message.append(ste + "\n");
}
return message.append("\n").toString();
} | [
"java.lang.String getLogformat();",
"String formatMessage(LogMessage ioM);",
"public abstract String formatInfo(String message);",
"public String formatLogEntry( LogEntry logEntry, String message){\n // precondition(false, \"Must override this\");\n return null;\n }",
"public String format(LogRecord record) {\n String formattedString = null;\n String message = record.getMessage();\n StringBuffer messageBuffer = new StringBuffer();\n if (message != null) {\n messageBuffer.append(\"\\n<record>\\n<timestamp>\" + record.getMillis()\n + \"</timestamp>\");\n StringTokenizer tk = new StringTokenizer(message, \";\");\n for (int i = 0; (i <= 5) && tk.hasMoreTokens(); i++) {\n String token = tk.nextToken();\n switch (i) {\n case 0:\n messageBuffer.append(\"\\n<agent>\" + token + \"</agent>\");\n break;\n case 1:\n messageBuffer = messageBuffer.append(\n \"\\n<authentication-type>\" + token\n + \"</authentication-type>\");\n break;\n case 2:\n messageBuffer = messageBuffer.append(\"\\n<user>\" + token\n + \"</user>\");\n break;\n case 3:\n messageBuffer.append(\"\\n<client-ip>\" + token\n + \"</client-ip>\");\n break;\n case 4:\n messageBuffer.append(\"\\n<web-resource-ip>\" + token\n + \"</web-resource-ip>\");\n break;\n case 5:\n messageBuffer.append(\"\\n<servlet>\" + token\n + \"</servlet>\");\n break;\n }\n }\n while (tk.hasMoreTokens()) {\n String token = tk.nextToken();\n messageBuffer.append(\"\\n<role>\" + token + \"</role>\");\n }\n\n messageBuffer.append(\"\\n</record>\");\n formattedString = messageBuffer.toString();\n }\n\n return formattedString;\n }",
"public String format(LogRecord record) {\n StringBuffer buffer = new StringBuffer(1000);\n buffer.append(formatMessage(record));\n buffer.append(\"\\n\");\n return buffer.toString();\n }",
"java.lang.String getLogMessage();",
"@Override\n public String format(final LogRecord logRecord) {\n return format(logRecord.getLevel().getName(), logRecord.getMessage(),\n logRecord.getLoggerName());\n }",
"public synchronized String format(LogRecord record) {\n StringBuilder sb = new StringBuilder();\n\n sb.append(ISO_8601_DATE_FORMAT.format(record.getMillis()));\n sb.append(\"\\tThread-\");\n sb.append(THREAD_ID_FORMAT.format(record.getThreadID()));\n sb.append(\"\\t\");\n sb.append(record.getLevel().getLocalizedName());\n sb.append(\"\\t\");\n if (record.getSourceClassName() != null) {\n sb.append(getSimpleClassName(record.getSourceClassName()));\n } else {\n sb.append(record.getLoggerName());\n }\n if (record.getSourceMethodName() != null) {\n sb.append(\".\");\n sb.append(record.getSourceMethodName());\n }\n sb.append(\"\\t\");\n String message = formatMessage(record);\n sb.append(message);\n sb.append(lineSeparator);\n //noinspection ThrowableResultOfMethodCallIgnored\n if (record.getThrown() != null) {\n try {\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n //noinspection ThrowableResultOfMethodCallIgnored\n record.getThrown().printStackTrace(pw);\n pw.close();\n sb.append(sw.toString());\n } catch (Exception ignore) {\n // Ignore\n }\n }\n return sb.toString();\n }",
"public abstract String formatDebug(String message);",
"@Override\n\tpublic String format(LogRecord record) {\n\t\tStringBuffer buf = new StringBuffer(1000);\n\t\tbuf.append(\"<tr>/n\");\n\t\t\n\t\t// color any levels >= WARNING in red\n\t\tif(record.getLevel().intValue() >= Level.WARNING.intValue()) {\n\t\t\tbuf.append(\"\\t<td style=\\\"color:red\\\">\");\n\t\t\tbuf.append(\"<strong>\");\n\t\t\tbuf.append(record.getLevel());\n\t\t\tbuf.append(\"</strong>\");\n\t\t}\n\t\telse {\n\t\t\tbuf.append(\"\\t<td>\");\n\t\t\tbuf.append(record.getLevel());\n\t\t}\n\t\t\n\t\tbuf.append(\"</td>\\n\");\n\t\tbuf.append(\"\\t<td>\");\n\t\tbuf.append(calcDate(record.getMillis()));\n\t\tbuf.append(\"</td>\\n\");\n\t\t\n\t\tbuf.append(\"\\t<td>\");\n\t\tbuf.append(formatMessage(record));\n\t\tbuf.append(\"</td>\\n\");\n\t\t\n\t\tbuf.append(\"</tr>\\n\");\n\t\t\n\t\treturn buf.toString();\n\t}",
"private void formatAndLog(Level level, String format, Object arg1, Object arg2) {\n\t\tFormattingTuple tp = MessageFormatter.format(format, arg1, arg2);\n\t\tlog(level, tp.getMessage(), tp.getThrowable());\n\t}",
"private void formatMessage()\r\n {\r\n if (!isFormatted())\r\n {\r\n StringBuilder msg = new StringBuilder(message.toUpperCase());\r\n int i=0;\r\n\r\n while (i<msg.length())\r\n {\r\n // check char at position i, if not character or digit, delete it, otherwise increase i\r\n if (Character.isLetterOrDigit(msg.charAt(i)))\r\n {\r\n i++;\r\n }\r\n else\r\n {\r\n msg.deleteCharAt(i);\r\n }\r\n }\r\n\r\n message = msg.toString(); // set message to modified msg\r\n }\r\n\r\n }",
"private static StringBuilder formatMessage(LogData logData, Option option) {\n SimpleMessageFormatter formatter =\n new SimpleMessageFormatter(logData.getTemplateContext(), logData.getArguments());\n StringBuilder out = formatter.build();\n if (logData.getArguments().length > formatter.getExpectedArgumentCount()) {\n // TODO(dbeaumont): Do better and look at adding formatted values or maybe just a count?\n out.append(EXTRA_ARGUMENT_MESSAGE);\n }\n if (option == Option.WITH_LOG_SITE) {\n prependLogSite(out, logData.getLogSite());\n }\n return out;\n }",
"@Override\r\n\tpublic String toString() {\r\n\t\t// Convert tabs, so we lines are nicely tab-aligned\r\n\t\t// Assumes: level & tag don't have tabs, and after message we don't care\r\n\t\tString _msg = msg.replace('\\t', ' ');\r\n\t\treturn // Environment.get().get(Printer.INDENT)+\r\n\t\tPrinter.format(\"[{0}]\\t{1}\\t#{2}\\t{3}\\t{4}\\t{5}\\t{6}\", \r\n\t\t\t\ttime, level, tag, _msg, details, Log.getContextMessage(), thread);\r\n\t}",
"String getFormattedMessage();",
"private String format(LogEvent event) {\n\t\tString id = event.getId();\n\t\tString message = event.getMessage();\n\t\tString timeStamp = event.getTimestamp();\n\t\tString thread = event.getThread();\n\t\tString logger = event.getLogger();\n\t\tString level = event.getLevel();\n\t\tString errorDetails = event.getErrorDetails();\n\t\tString json = \"FAILED\";\n\t\ttry {\n\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\tObjectNode user = mapper.createObjectNode();\n\t\t\tuser.put(\"id\", id);\n\t\t\tuser.put(\"message\", message);\n\t\t\tuser.put(\"timestamp\", timeStamp);\n\t\t\tuser.put(\"thread\", thread);\n\t\t\tuser.put(\"logger\", logger);\n\t\t\tuser.put(\"level\", level);\n\t\t\tuser.put(\"errorDetails\", errorDetails);\n\t\t\tjson = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(user);\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn json;\n\t}",
"public abstract void format (\r\n final StringBuffer sb,\r\n final LogRecord record,\r\n final Loggable loggable,\r\n final List<String> trackingIdSequence,\r\n final Throwable thrown,\r\n final Object parameter);",
"public interface Formatter {\r\n\r\n /**\r\n * Format the given object into a string based upon the given category.\r\n *\r\n * @param event The object to format into a string.\r\n * @param category The category of the event to be used in optional condition\r\n * formatting.\r\n * @param cause The exception that caused the log entry. Can be null.\r\n *\r\n * @return String representation of the event as it will be written to the \r\n * log stream.\r\n */\r\n public String format( Object event, String category, Throwable cause );\r\n\r\n\r\n\r\n\r\n /**\r\n * Setup the formatter.\r\n *\r\n * <p>This method will return a series of bytes that should be placed ath the \r\n * beginning of a log stream. For example, an XML formatter may return a \r\n * header and a root node to the caller to be placed at the beginning of the \r\n * log stream to ensure a valid XML document.</p>\r\n * \r\n * @return bytes to be placed in the beginning of a log stream\r\n */\r\n public byte[] initialize();\r\n\r\n\r\n\r\n\r\n /**\r\n * Terminate the formatter.\r\n *\r\n * <p>This method will return a series of bytes that should be placed at the \r\n * end of a log stream. For example, a HTML formatter may return a footer and \r\n * closing tags at the end of the log stream to ensure a complete and valid\r\n * document.</p>\r\n * \r\n * @return bytes to be placed in the end of a log stream\r\n */\r\n public byte[] terminate();\r\n\r\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates the source code of the whiteboxed class. | TypeSpec generateSource() {
List<Constructor> constructors = visibilityFilter.getConstructors();
List<Method> methods = visibilityFilter.getMethods();
TypeSpec.Builder whiteBoxedClass = TypeSpec
.classBuilder(name)
.addModifiers(Modifier.PUBLIC, Modifier.FINAL)
.addField(Object.class, "object", Modifier.PRIVATE);
for (Constructor constructor : constructors) {
whiteBoxedClass.addMethod(getConstructorSpec(constructor));
}
for (Method method : methods) {
whiteBoxedClass.addMethod(getMethodSpec(method));
}
return whiteBoxedClass.build();
} | [
"public String toString() {\n\t\tStringBuilder classCode = new StringBuilder();\n\n\t\t/* Header guarding uwu */\n\t\tString guardName = \"GUARD_\"+this.getPackageless();\n\t\tclassCode.append(\"#ifndef \");\n\t\tclassCode.append(guardName);\n\t\tclassCode.append(\"\\n\");\n\t\tclassCode.append(\"#define \");\n\t\tclassCode.append(guardName);\n\t\tclassCode.append(\"\\n\");\n\n\t\t//Include required files\n\t\tclassCode.append(\"#include \\\"\");\n\t\t/*\n\t\t We should get the JNIUtil.h relatively to avoid conflicts and issues\n\t\t*/\n\t\t for(char c : this.getSourcePath().toCharArray()) {\n\t\t\tif(c == '/' || c == '\\\\') {\n\t\t\t\t// Add ../ to the include to go up one dir\n\t\t\t\tclassCode.append(\"../\");\n\t\t\t}\n\t\t}\n\t\tclassCode.append(\"JNIUtil.h\\\"\");\n\t\tclassCode.append(\"\\n\");\n\t\tclassCode.append(\"\\n\");\n\n\t\t//Code time\n\t\tclassCode.append(\"class \");\n\t\tclassCode.append(this.getPackageless());\n\t\tclassCode.append(\" : public _jobject {\");\n\t\tclassCode.append(\"\\n\");\n\t\tclassCode.append(\"public:\");\n\t\tclassCode.append(\"\\n\");\n\n\t\t/* Generate field accessors & modifiers */\n\t\tfor(MappedField f : this.fields) {\n\t\t\tclassCode.append(f.toString());\n\t\t}\n\n\t\t/* TODO: Generate function calls */\n\n\t\tclassCode.append(\"};\");\n\t\t//Close header guard\n\t\tclassCode.append(\"\\n\");\n\t\tclassCode.append(\"#endif\");\n\t\tclassCode.append(\" //\");\n\t\tclassCode.append(guardName);\n\t\tclassCode.append(\"\\n\");\n\n\n\t\treturn classCode.toString();\n\t}",
"public void generateByteCode(Optimizer opt) {}",
"private void doGenerateCode( )\n\t{\n\t\tgenerateCode = new Action( ) \n\t\t{\n\t\t\tpublic void run( )\n\t\t\t{\n\t\t\t\tgenerateClass( );\n\t\t\t}\n\t\t};\n\t\tgenerateCode.setText( SASConstants.DATAOBJECT_TREE_MENU_GENERATE_s );\n\t\tgenerateCode\n\t\t\t\t.setToolTipText( SASConstants.DATAOBJECT_TREE_MENU_GENERATE_s );\n\t\tgenerateCode.setImageDescriptor( PlatformUI.getWorkbench( )\n\t\t\t\t.getSharedImages( )\n\t\t\t\t.getImageDescriptor( ISharedImages.IMG_TOOL_NEW_WIZARD ) );\n\t}",
"private static void generateClass() {\n try {\n CtClass ct = POOL.makeClass(\"com.syj.javassist.SsistGenerateClass\");//创建类\n ct.setInterfaces(new CtClass[]{POOL.makeInterface(\"java.lang.Cloneable\")});//让类实现Cloneable接口\n CtField field = new CtField(CtClass.intType,\"id\",ct);\n field.setModifiers(AccessFlag.PUBLIC);\n ct.addField(field);\n //添加构造函数\n CtConstructor constructor = CtNewConstructor.make(\"public SsistGenerateClass (int id) {this.id = id;}\",ct);\n ct.addConstructor(constructor);\n\n //添加方法\n CtMethod helloM = CtNewMethod.make(\"public void hello(String des) { System.out.println(des);}\",ct);\n ct.addMethod(helloM);\n\n ct.writeFile();//将生成的.class文件保存到磁盘\n //下面的代码为验证代码\n Field[] fields = ct.toClass().getFields();\n System.out.println(\"属性名称:\" + fields[0].getName() + \" 属性类型:\" + fields[0].getType());\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private static String generateForBuilderClass(String className) {\n return NEW_LINE + JAVA_DOC_FIRST_LINE + BUILDER_CLASS_JAVA_DOC + className + PERIOD + NEW_LINE\n + JAVA_DOC_END_LINE;\n }",
"public void viewsource()\n {\n String name = this.getClass().getName();\n\t\tString slashname = null;\n\t\tString native_fs_name = null;\n \tString dirname = null; \n\t\t//package . to /\n\t\tslashname = name.replace('.','/');\n\t\tnative_fs_name = name.replace('.',File.separatorChar);\n \t//this finds a file on the filesystem from a class object..not need here\n\n \t\n \tjava.net.URL url = this.getClass().getProtectionDomain().getCodeSource().getLocation(); \t\n\t\tdirname = new File(url.getFile()).getAbsolutePath();\n\t\n \tif(dirname.charAt(dirname.length() -1) != File.separatorChar)\n \t\tdirname = dirname + String.valueOf(File.separatorChar);\n \t\t\n \tString abspath = dirname+native_fs_name+\".java\";\n\n \tif(url.toString().endsWith(\".jar\"))\n \t{\n \t\ttry{\n \t\t\t_viewsourcejar(slashname,URLDecoder.decode(url.getFile(),\"UTF-8\"));\n \t\t}catch(UnsupportedEncodingException esee)\n \t\t{\n \t\t\tSystem.err.println(\"(mxj) problem decoding jar URL. Unable to decompile.\");\n \t\t}\n \t\treturn;\n \t}\n \t \t\n \tfinal File f = new File(abspath);\n \tif(!f.exists())\n \t{\n \t\t\t_flash_watch = WATCHME;\n \t\t\t_flash_me();\t\t\t\n \t\t//We need to create the java file!\n \t\tSystem.out.println(\"(mxj) Unable to locate \"+abspath+\". Decompiling with JODE\");\n \t\ttry{\n \t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(f)); \n \t\t\tMXJDecompiler.getInstance().decompile(name,MaxSystem.getClassPath(),bw);\n \t\t}catch(IOException e)\n \t\t{\n\t\t\t\tf.delete();\n \t\t\tSystem.err.println(\"(mxj) Unable to decompile \"+name);\n \t\t\tSystem.err.println(\"message: \"+e.getMessage());\n \t\t\t_flash_watch = null;\n \t\t\treturn;\n \t\t}\n \t\t_flash_watch = null;\t\n \t}\t\n \t \t \t\t\n \tif(_source_editor != null)\n \t{\n \t\t_flash_watch = WATCHME;\n \t\t\t_flash_me();\n \t\t_source_editor.setBufferFromFile(f);\n \t\t_source_editor.setVisible(true);\n \t\t_flash_watch = null;\n \t}\n \telse\n \t{\n \t\tSwingUtilities.invokeLater\n\t\t\t(\n\t\t\t\tnew Runnable()\n\t\t\t\t\t{\n\t\t\t\t\t\tpublic void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t_flash_watch = WATCHME;\n\t\t\t\t\t\t\t\t_flash_me();\n\t\t\t\t\t\t\t\t_source_editor = new MXJEditor();\n\t\t\t\t\t\t\t\t_source_editor.setBufferFromFile(f);\n \t\t\t\t\t\t\t_source_editor.setVisible(true);\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t_flash_watch = null;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}catch(Exception e)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t_flash_watch = null;\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\t}\n\t\t\t\t\t}\n\t\t\t);\n \t\t\n \t}\t\t\t\n \t}",
"void generate() {\r\n \t\r\n }",
"private void makeSourceFile(String name, ClassFile cf) throws IOException {\n int ln = 1;\n File f = new File(rootDir + \"/gen/\" + name);\n PrintWriter w = new PrintWriter(new FileWriter(f));\n /* add source file attribute */\n SourceFileAttribute attr = new SourceFileAttribute(cf);\n attr.setSourceFile(name.substring(name.lastIndexOf('/') + 1));\n cf.add(attr);\n /* output class name */\n ClassFileInfo info = cf.getClassFileInfo();\n w.println(\"class \" + info.getName());\n ln++;\n Iterator it = cf.getAllMethods().iterator();\n while (it.hasNext()) {\n MethodFileInfo mfi = (MethodFileInfo) it.next();\n w.println(\" method \" + mfi.getName() + mfi.getSignature());\n ln++;\n CodeAttribute code = mfi.getCodeAttribute();\n LineNumberTableAttribute lt = new LineNumberTableAttribute(cf);\n code.addAttribute(lt);\n Iterator it2 = code.getAllInstructions().iterator();\n while (it2.hasNext()) {\n Instruction ins = (Instruction) it2.next();\n w.println(\" \" + ins.toString());\n lt.addLineInfo(ins.getPc(), ln);\n ln++;\n }\n }\n w.flush();\n w.close();\n }",
"void generated(File[] classes);",
"public void partVertxCodeGeneration() {\n//\n//\t\t\t<!-- Vert.X Code Generation -->\n//\t\t\t<plugin>\n//\t\t\t\t<artifactId>maven-compiler-plugin</artifactId>\n//\t\t\t\t<version>${maven-compiler-plugin.version}</version>\n//\t\t\t\t<configuration>\n//\t\t\t\t\t<source>1.8</source>\n//\t\t\t\t\t<target>1.8</target>\n//\t\t\t\t\t<annotationProcessors>\n//\t\t\t\t\t\t<annotationProcessor>io.vertx.codegen.CodeGenProcessor</annotationProcessor>\n//\t\t\t\t\t</annotationProcessors>\n//\t\t\t\t</configuration>\n//\t\t\t</plugin>\n//\t\t</plugins>\n//\t</build>\n//\t<profiles>\n\t}",
"public String getSourceCode(String className) {\n if (!classMap.keySet().contains(className)) {\n throw new NoSuchElementException(\"Failed to find class name!\\n\");\n }\n CodeBuilder codeB = new CodeBuilder(className, classMap.get(className), packageName);\n return codeB.getCode(); \n }",
"public void generateCode(String[] sourceCode) {\n LexicalAnalyser lexicalAnalyser = new LexicalAnalyser(Helper.getInstructionSet());\n SynaticAnalyser synaticAnalyser = new SynaticAnalyser(console);\n HashMap<Integer, Instruction> intermediateRepresentation =\n synaticAnalyser.generateIntermediateRepresentation(\n lexicalAnalyser.generateAnnotatedToken(sourceCode));\n\n if (intermediateRepresentation == null) {\n this.console.reportError(\"Terminating code generation\");\n return;\n }\n\n printCode(intermediateRepresentation);\n\n FileUtility.saveJavaProgram(null, new JavaProgramTemplate(intermediateRepresentation));\n }",
"public void buildSandwich();",
"@Test\n public void generateSQLCode() throws Exception {\n System.out.println(\"generateSQLCode\");\n\n File sourceFile = null;\n File targetJavaSourceFile = null;\n String packagename = \"\";\n String classname = \"\";\n String baseclass = \"\";\n SQLCodeGenerator instance = new SQLCodeGenerator();\n\n instance.generateSQLCode(new File(srcPath+\"SQLCode.sqlg\"), new File(outPath+\"SQLCode.java.txt\"), \"org.tamuno.sqlgen.test.results\", \"SQLCode\", null, false);\n //assertTrue(TamunoUtils.loadTextFile(new File(outPath+\"SQLCode.java.txt\"))!=null);\n }",
"private void installBasicClasses() {\n \tAbstractSymbol filename \n \t = AbstractTable.stringtable.addString(\"<basic class>\");\n \t\n \t// The following demonstrates how to create dummy parse trees to\n \t// refer to basic Cool classes. There's no need for method\n \t// bodies -- these are already built into the runtime system.\n \n \t// IMPORTANT: The results of the following expressions are\n \t// stored in local variables. You will want to do something\n \t// with those variables at the end of this method to make this\n \t// code meaningful.\n \n \t// The Object class has no parent class. Its methods are\n \t// cool_abort() : Object aborts the program\n \t// type_name() : Str returns a string representation \n \t// of class name\n \t// copy() : SELF_TYPE returns a copy of the object\n \n \tclass_c Object_class = \n \t new class_c(0, \n \t\t TreeConstants.Object_, \n \t\t TreeConstants.No_class,\n \t\t new Features(0)\n \t\t\t .appendElement(new method(0, \n \t\t\t\t\t TreeConstants.cool_abort, \n \t\t\t\t\t new Formals(0), \n \t\t\t\t\t TreeConstants.Object_, \n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.type_name,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.Str,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.copy,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.SELF_TYPE,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \t\n \t// The IO class inherits from Object. Its methods are\n \t// out_string(Str) : SELF_TYPE writes a string to the output\n \t// out_int(Int) : SELF_TYPE \" an int \" \" \"\n \t// in_string() : Str reads a string from the input\n \t// in_int() : Int \" an int \" \" \"\n \n \tclass_c IO_class = \n \t new class_c(0,\n \t\t TreeConstants.IO,\n \t\t TreeConstants.Object_,\n \t\t new Features(0)\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.out_string,\n \t\t\t\t\t new Formals(0)\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg,\n \t\t\t\t\t\t\t\t TreeConstants.Str)),\n \t\t\t\t\t TreeConstants.SELF_TYPE,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.out_int,\n \t\t\t\t\t new Formals(0)\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg,\n \t\t\t\t\t\t\t\t TreeConstants.Int)),\n \t\t\t\t\t TreeConstants.SELF_TYPE,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.in_string,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.Str,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.in_int,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.Int,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \n \t// The Int class has no methods and only a single attribute, the\n \t// \"val\" for the integer.\n \n \tclass_c Int_class = \n \t new class_c(0,\n \t\t TreeConstants.Int,\n \t\t TreeConstants.Object_,\n \t\t new Features(0)\n \t\t\t .appendElement(new attr(0,\n \t\t\t\t\t TreeConstants.val,\n \t\t\t\t\t TreeConstants.prim_slot,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \n \t// Bool also has only the \"val\" slot.\n \tclass_c Bool_class = \n \t new class_c(0,\n \t\t TreeConstants.Bool,\n \t\t TreeConstants.Object_,\n \t\t new Features(0)\n \t\t\t .appendElement(new attr(0,\n \t\t\t\t\t TreeConstants.val,\n \t\t\t\t\t TreeConstants.prim_slot,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \n \t// The class Str has a number of slots and operations:\n \t// val the length of the string\n \t// str_field the string itself\n \t// length() : Int returns length of the string\n \t// concat(arg: Str) : Str performs string concatenation\n \t// substr(arg: Int, arg2: Int): Str substring selection\n \n \tclass_c Str_class =\n \t new class_c(0,\n \t\t TreeConstants.Str,\n \t\t TreeConstants.Object_,\n \t\t new Features(0)\n \t\t\t .appendElement(new attr(0,\n \t\t\t\t\t TreeConstants.val,\n \t\t\t\t\t TreeConstants.Int,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new attr(0,\n \t\t\t\t\t TreeConstants.str_field,\n \t\t\t\t\t TreeConstants.prim_slot,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.length,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.Int,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.concat,\n \t\t\t\t\t new Formals(0)\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg, \n \t\t\t\t\t\t\t\t TreeConstants.Str)),\n \t\t\t\t\t TreeConstants.Str,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.substr,\n \t\t\t\t\t new Formals(0)\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg,\n \t\t\t\t\t\t\t\t TreeConstants.Int))\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg2,\n \t\t\t\t\t\t\t\t TreeConstants.Int)),\n \t\t\t\t\t TreeConstants.Str,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \n \t/* Do somethind with Object_class, IO_class, Int_class,\n Bool_class, and Str_class here */\n nameToClass.put(TreeConstants.Object_.getString(), Object_class);\n nameToClass.put(TreeConstants.IO.getString(), IO_class);\n nameToClass.put(TreeConstants.Int.getString(), Int_class);\n nameToClass.put(TreeConstants.Bool.getString(), Bool_class);\n nameToClass.put(TreeConstants.Str.getString(), Str_class);\n adjacencyList.put(TreeConstants.Object_.getString(), new ArrayList<String>() );\n adjacencyList.put(TreeConstants.IO.getString(), new ArrayList<String>() );\n adjacencyList.put(TreeConstants.Int.getString(), new ArrayList<String>() );\n adjacencyList.put(TreeConstants.Bool.getString(), new ArrayList<String>() );\n adjacencyList.put(TreeConstants.Str.getString(), new ArrayList<String>() );\n // Do the same for other basic classes\n basicClassList = new Classes(0);\n basicClassList.appendElement(Object_class);\n basicClassList.appendElement(IO_class);\n basicClassList.appendElement(Int_class);\n basicClassList.appendElement(Bool_class);\n basicClassList.appendElement(Str_class);\n \n }",
"private List<String> runCode(JasminBytecode code) throws AssembleException {\n // Turn the Jasmin code into a (hopefully) working class file\n if (code == null) {\n throw new AssembleException(\"No valid Jasmin code to assemble\");\n }\n AssembledClass aClass = AssembledClass.assemble(code);\n // Run the class and return the output\n SandBox s = new SandBox();\n s.runClass(aClass);\n return s.getOutput();\n }",
"private void installBasicClasses() {\n\tAbstractSymbol filename \n\t = AbstractTable.stringtable.addString(\"<basic class>\");\n\t\n\t// The following demonstrates how to create dummy parse trees to\n\t// refer to basic Cool classes. There's no need for method\n\t// bodies -- these are already built into the runtime system.\n\n\t// IMPORTANT: The results of the following expressions are\n\t// stored in local variables. You will want to do something\n\t// with those variables at the end of this method to make this\n\t// code meaningful.\n\n\t// The Object class has no parent class. Its methods are\n\t// cool_abort() : Object aborts the program\n\t// type_name() : Str returns a string representation \n\t// of class name\n\t// copy() : SELF_TYPE returns a copy of the object\n\n\tclass_c Object_class = \n\t new class_c(0, \n\t\t TreeConstants.Object_, \n\t\t TreeConstants.No_class,\n\t\t new Features(0)\n\t\t\t .appendElement(new method(0, \n\t\t\t\t\t TreeConstants.cool_abort, \n\t\t\t\t\t new Formals(0), \n\t\t\t\t\t TreeConstants.Object_, \n\t\t\t\t\t new no_expr(0)))\n\t\t\t .appendElement(new method(0,\n\t\t\t\t\t TreeConstants.type_name,\n\t\t\t\t\t new Formals(0),\n\t\t\t\t\t TreeConstants.Str,\n\t\t\t\t\t new no_expr(0)))\n\t\t\t .appendElement(new method(0,\n\t\t\t\t\t TreeConstants.copy,\n\t\t\t\t\t new Formals(0),\n\t\t\t\t\t TreeConstants.SELF_TYPE,\n\t\t\t\t\t new no_expr(0))),\n\t\t filename);\n\t\n\t// The IO class inherits from Object. Its methods are\n\t// out_string(Str) : SELF_TYPE writes a string to the output\n\t// out_int(Int) : SELF_TYPE \" an int \" \" \"\n\t// in_string() : Str reads a string from the input\n\t// in_int() : Int \" an int \" \" \"\n\n\tclass_c IO_class = \n\t new class_c(0,\n\t\t TreeConstants.IO,\n\t\t TreeConstants.Object_,\n\t\t new Features(0)\n\t\t\t .appendElement(new method(0,\n\t\t\t\t\t TreeConstants.out_string,\n\t\t\t\t\t new Formals(0)\n\t\t\t\t\t\t .appendElement(new formalc(0,\n\t\t\t\t\t\t\t\t TreeConstants.arg,\n\t\t\t\t\t\t\t\t TreeConstants.Str)),\n\t\t\t\t\t TreeConstants.SELF_TYPE,\n\t\t\t\t\t new no_expr(0)))\n\t\t\t .appendElement(new method(0,\n\t\t\t\t\t TreeConstants.out_int,\n\t\t\t\t\t new Formals(0)\n\t\t\t\t\t\t .appendElement(new formalc(0,\n\t\t\t\t\t\t\t\t TreeConstants.arg,\n\t\t\t\t\t\t\t\t TreeConstants.Int)),\n\t\t\t\t\t TreeConstants.SELF_TYPE,\n\t\t\t\t\t new no_expr(0)))\n\t\t\t .appendElement(new method(0,\n\t\t\t\t\t TreeConstants.in_string,\n\t\t\t\t\t new Formals(0),\n\t\t\t\t\t TreeConstants.Str,\n\t\t\t\t\t new no_expr(0)))\n\t\t\t .appendElement(new method(0,\n\t\t\t\t\t TreeConstants.in_int,\n\t\t\t\t\t new Formals(0),\n\t\t\t\t\t TreeConstants.Int,\n\t\t\t\t\t new no_expr(0))),\n\t\t filename);\n \n\n\t// The Int class has no methods and only a single attribute, the\n\t// \"val\" for the integer.\n\n\tclass_c Int_class = \n\t new class_c(0,\n\t\t TreeConstants.Int,\n\t\t TreeConstants.Object_,\n\t\t new Features(0)\n\t\t\t .appendElement(new attr(0,\n\t\t\t\t\t TreeConstants.val,\n\t\t\t\t\t TreeConstants.prim_slot,\n\t\t\t\t\t new no_expr(0))),\n\t\t filename);\n\n\t// Bool also has only the \"val\" slot.\n\tclass_c Bool_class = \n\t new class_c(0,\n\t\t TreeConstants.Bool,\n\t\t TreeConstants.Object_,\n\t\t new Features(0)\n\t\t\t .appendElement(new attr(0,\n\t\t\t\t\t TreeConstants.val,\n\t\t\t\t\t TreeConstants.prim_slot,\n\t\t\t\t\t new no_expr(0))),\n\t\t filename);\n\n\t// The class Str has a number of slots and operations:\n\t// val the length of the string\n\t// str_field the string itself\n\t// length() : Int returns length of the string\n\t// concat(arg: Str) : Str performs string concatenation\n\t// substr(arg: Int, arg2: Int): Str substring selection\n\n\tclass_c Str_class =\n\t new class_c(0,\n\t\t TreeConstants.Str,\n\t\t TreeConstants.Object_,\n\t\t new Features(0)\n\t\t\t .appendElement(new attr(0,\n\t\t\t\t\t TreeConstants.val,\n\t\t\t\t\t TreeConstants.Int,\n\t\t\t\t\t new no_expr(0)))\n\t\t\t .appendElement(new attr(0,\n\t\t\t\t\t TreeConstants.str_field,\n\t\t\t\t\t TreeConstants.prim_slot,\n\t\t\t\t\t new no_expr(0)))\n\t\t\t .appendElement(new method(0,\n\t\t\t\t\t TreeConstants.length,\n\t\t\t\t\t new Formals(0),\n\t\t\t\t\t TreeConstants.Int,\n\t\t\t\t\t new no_expr(0)))\n\t\t\t .appendElement(new method(0,\n\t\t\t\t\t TreeConstants.concat,\n\t\t\t\t\t new Formals(0)\n\t\t\t\t\t\t .appendElement(new formalc(0,\n\t\t\t\t\t\t\t\t TreeConstants.arg, \n\t\t\t\t\t\t\t\t TreeConstants.Str)),\n\t\t\t\t\t TreeConstants.Str,\n\t\t\t\t\t new no_expr(0)))\n\t\t\t .appendElement(new method(0,\n\t\t\t\t\t TreeConstants.substr,\n\t\t\t\t\t new Formals(0)\n\t\t\t\t\t\t .appendElement(new formalc(0,\n\t\t\t\t\t\t\t\t TreeConstants.arg,\n\t\t\t\t\t\t\t\t TreeConstants.Int))\n\t\t\t\t\t\t .appendElement(new formalc(0,\n\t\t\t\t\t\t\t\t TreeConstants.arg2,\n\t\t\t\t\t\t\t\t TreeConstants.Int)),\n\t\t\t\t\t TreeConstants.Str,\n\t\t\t\t\t new no_expr(0))),\n\t\t filename);\n\n\t/* Do somethind with Object_class, IO_class, Int_class,\n Bool_class, and Str_class here */\n coolTree = new Node<AbstractSymbol>(TreeConstants.Object_);\n coolTree.addChild(TreeConstants.IO); \n coolTree.addChild(TreeConstants.Int); \n coolTree.addChild(TreeConstants.Bool); \n coolTree.addChild(TreeConstants.Str); \n \n allClasses.addElement(Object_class);\n allClasses.addElement(IO_class);\n allClasses.addElement(Int_class);\n allClasses.addElement(Bool_class);\n allClasses.addElement(Str_class);\n }",
"public ImperativeCodeGenerator() {\r\n }",
"void generateDesign();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
sets the rank of the runners based on the time and in the age group | @Override
public void setRanking(String name) {
getRealm().executeTransactionAsync(realm -> {
RealmResults<Runner> runnerListForAgeGroup1 = realm.where(Race.class)
.equalTo(Race.NAME, name)
.findFirst().getRunnersList().where().beginGroup().between(Runner.AGE, 0, 15).endGroup().findAll().sort(Runner.TIME, Sort.ASCENDING);
RealmResults<Runner> runnerListForAgeGroup2 = realm.where(Race.class)
.equalTo(Race.NAME, name)
.findFirst().getRunnersList().where().beginGroup().between(Runner.AGE, 16, 29).endGroup().findAll().sort(Runner.TIME, Sort.ASCENDING);
RealmResults<Runner> runnerListForAgeGroup3 = realm.where(Race.class)
.equalTo(Race.NAME, name)
.findFirst().getRunnersList().where().beginGroup().greaterThan(Runner.AGE, 29).endGroup().findAll().sort(Runner.TIME, Sort.ASCENDING);
setRank(runnerListForAgeGroup1, realm);
setRank(runnerListForAgeGroup2, realm);
setRank(runnerListForAgeGroup3, realm);
});
} | [
"private void setRank(RealmResults<Runner> runners, Realm realm){\n for(int i = 0; i < runners.size() ; i++){\n if(i != 0 && runners.get(i).getTime() == runners.get(i - 1).getTime()){\n runners.get(i).setRank(runners.get(i - 1).getRank());\n } else {\n runners.get(i).setRank(i + 1);\n }\n }\n realm.copyToRealm(runners);\n }",
"public void setRank(int value);",
"public void increaseRank()\n {\n rank++;\n }",
"private void setRank(int rank) {\r\n\r\n this.rank = rank;\r\n }",
"public void setRank(int num)\r\n {\r\n //Check if the new rank is less than 0 before setting the new rank \r\n if(num < 0)\r\n {\r\n //Outouts a warning message\r\n System.out.println(\"WARNING:You cannot assign a negative time\");\r\n }\r\n else \r\n {\r\n this.rank = num;\r\n }//end if\r\n }",
"private void customizeForAge()\n {\n // NOTE the userTrainingPlan has already been initialized\n if (ageGroup == 1) // youngesters! run longer!\n {\n for (int week = 0; week < userTrainingPlan.length; week++ )\n {\n for (int day = 0; day < userTrainingPlan[week].length; day++ )\n {\n double [] givenDay = userTrainingPlan[week][day];\n givenDay[0] *= 1.1; // increase mileage by 10%\n givenDay[1] *= 0.9; // decrease pace by 10%\n }\n }\n }\n else if (ageGroup == 2) {} // same as default, do nothing\n else if (ageGroup == 3) // older! run shorter + slower!\n {\n for (int week = 0; week < userTrainingPlan.length; week++ )\n {\n for (int day = 0; day < userTrainingPlan[week].length; day++ )\n {\n double [] givenDay = userTrainingPlan[week][day];\n givenDay[0] *= 0.9; // decrease each mileage by 10%\n givenDay[1] *= 1.1; // increase each pace by 10%\n }\n }\n }\n else if (ageGroup == 4) // oldest! run much shorter, much slower\n {\n for (int week = 0; week < userTrainingPlan.length; week++ )\n {\n for (int day = 0; day < userTrainingPlan[week].length; day++ )\n {\n double [] givenDay = userTrainingPlan[week][day];\n givenDay[0] *= 0.8; // decrease each mileage by 20%\n givenDay[1] *= 1.2; // increase each pace by 20%\n }\n }\n }\n }",
"public void setPlayerRank(int rank){\n playerRank = rank;\n }",
"void addRank_of_person_at_death(Person newRank_of_person_at_death);",
"public void setRank(int value) {\n this.rank = value;\n }",
"public void setRank(int newRank) {\t \r\n \t\tthis.rank = newRank;\r\n }",
"public List<Rank> getRanking() {\n\t\tArrayList<Rank> rankingSequence = new ArrayList<>();\n\n\t\t/*\n\t\t * For each participant 1) Go through each race loop 2) Get the lane where\n\t\t * lane.number = participant.lane 3) baseSpeed += lane.power. baseSpeed <= 0\n\t\t * means the lap is not run and the horse is out of the race. 4) time +=\n\t\t * DISTANCE / baseSpeed\n\t\t */\n\t\trace.getStartList().forEach(participant -> {\n\t\t\tRank rank = new Rank(0, participant.getName(), DISTANCE / participant.getBaseSpeed());\n\t\t\trace.getPowerUps().stream().forEach(loop -> loop.getLanes().stream()\n\t\t\t\t\t.filter(lane -> lane.getNumber() == participant.getLane()).forEach(lane -> {\n\t\t\t\t\t\tint loopSpeed = participant.getBaseSpeed() + lane.getPowerValue();\n\t\t\t\t\t\tif (loopSpeed <= 0) {\n\t\t\t\t\t\t\trank.setTime(rank.getTime() + Double.MAX_VALUE); // Time set to the highest possible value.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Horse is last place.\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tparticipant.setBaseSpeed(participant.getBaseSpeed() + lane.getPowerValue());\n\t\t\t\t\t\t\trank.setTime(rank.getTime() + (DISTANCE / participant.getBaseSpeed()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}));\n\t\t\trankingSequence.add(rank); // Add rank to collection\n\t\t});\n\n\t\tCollections.sort(rankingSequence); // Sort with lowest times first\n\t\trankingSequence.removeIf(rank -> rank.getTime() >= Double.MAX_VALUE); // Remove participants who do not complete\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the\n\t\t// race\n\n\t\t// Each participant is given rank according to times.If they complete at same\n\t\t// time,they have equal rank.\n\t\tint finalPosition = 1;\n\t\trankingSequence.get(0).setPosition(finalPosition);\n\t\tfor (int indexPosition = 1; indexPosition < rankingSequence.size(); indexPosition++) {\n\t\t\tif (rankingSequence.get(indexPosition).getTime() == rankingSequence.get(indexPosition - 1).getTime()) {\n\t\t\t\trankingSequence.get(indexPosition).setPosition(finalPosition);\n\t\t\t} else {\n\t\t\t\trankingSequence.get(indexPosition).setPosition(++finalPosition);\n\t\t\t}\n\t\t}\n\t\t// Display first 3 positions only\n\t\treturn rankingSequence.stream().filter(rank -> rank.getPosition() <= 3).collect(toList());\n\t}",
"public void setRank(int rank) {\n this.rank = rank;\n }",
"void setRank(KingdomUser user, KingdomRank rank);",
"public void setRank(Integer rank){\r\n\t\tthis.rank = rank;\r\n\t}",
"Rank(int value) {\r\n this.value = value;\r\n }",
"public void updateRanking() \n {\n graph.vertexLabelList[walkvertex].rank.updateRanking(stepOnWalk, diffuseValue);\n diffuseValue*=rankingProbability;\n }",
"Rank(int value) {\n this.value = value;\n }",
"void setRankOption(int value);",
"long getRank();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a reader builder for RequestForQuotation. | @Nonnull public static UBL23ReaderBuilder<RequestForQuotationType> requestForQuotation(){return UBL23ReaderBuilder.create(RequestForQuotationType.class);} | [
"@Nonnull\n public static UBL23WriterBuilder <RequestForQuotationType> requestForQuotation ()\n {\n return UBL23WriterBuilder.create (RequestForQuotationType.class);\n }",
"@Nonnull public static UBL23ReaderBuilder<QuotationType> quotation(){return UBL23ReaderBuilder.create(QuotationType.class);}",
"@Nonnull\n public static UBL22ValidatorBuilder <RequestForQuotationType> requestForQuotation ()\n {\n return UBL22ValidatorBuilder.create (RequestForQuotationType.class);\n }",
"private GetQuoteRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"@Nonnull\n public static UBL23WriterBuilder <QuotationType> quotation ()\n {\n return UBL23WriterBuilder.create (QuotationType.class);\n }",
"@Nonnull public static UBL23ReaderBuilder<EnquiryType> enquiry(){return UBL23ReaderBuilder.create(EnquiryType.class);}",
"@Nonnull\n public static UBL22ValidatorBuilder <QuotationType> quotation ()\n {\n return UBL22ValidatorBuilder.create (QuotationType.class);\n }",
"private Request.@NonNull Builder createApiReqBuilder() throws AuthException, IOException {\n return new Request.Builder()\n .header(\"User-Agent\", userAgent)\n .header(\"Authorization\", \"Bearer \" + tokenProvider.getAccessToken());\n }",
"private ReadRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"@Nonnull public static UBL23ReaderBuilder<SelfBilledInvoiceType> selfBilledInvoice(){return UBL23ReaderBuilder.create(SelfBilledInvoiceType.class);}",
"private knock_rq(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"@Nonnull public static UBL23ReaderBuilder<InvoiceType> invoice(){return UBL23ReaderBuilder.create(InvoiceType.class);}",
"@Nonnull\n public static UBLPEReaderBuilder <InvoiceType> invoice ()\n {\n return UBLPEReaderBuilder.create (InvoiceType.class);\n }",
"public static StringReaderBuilder getInstance() {\r\n\t\tif(srb==null) {\r\n\t\t\tsrb = new StringReaderBuilder();\r\n\t\t\treturn srb;\r\n\t\t} else {\r\n\t\t\treturn srb;\r\n\t\t}\r\n\t}",
"public static Request builder() {\n return new Request();\n }",
"@Nonnull public static UBL23ReaderBuilder<CatalogueRequestType> catalogueRequest(){return UBL23ReaderBuilder.create(CatalogueRequestType.class);}",
"private GetRegionRequestData(Builder builder) {\n super(builder);\n }",
"@Nonnull public static UBL23ReaderBuilder<ProofOfReexportationRequestType> proofOfReexportationRequest(){return UBL23ReaderBuilder.create(ProofOfReexportationRequestType.class);}",
"@Nonnull public static UBL23ReaderBuilder<OrderCancellationType> orderCancellation(){return UBL23ReaderBuilder.create(OrderCancellationType.class);}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Flatten the shape to 1 dimension. | public <U extends TNumber> Operand<U> flatten(Shape<U> shape, Class<U> type) {
return Shapes.flatten(scope, shape, type);
} | [
"@Override\n public Array1D<N> flatten() {\n return myDelegate.wrapInArray1D();\n }",
"private NDArray flattenForFullyConnected(final NDArray ndArray) {\n //Get the current shape of the ndArray\n final Shape shape = ndArray.getShape();\n //Get the batch size (the first dimension) of the shape\n final long batchSize = shape.get(0);\n //Get the remaining size\n final long dataSize = shape.size() / batchSize;\n //Reshape the array, so we have one batch dimension and only one for the data\n return ndArray.reshape(batchSize, dataSize);\n }",
"Matrix flatten() throws MatrixException;",
"public void flatten() {\n for(int i = firstNull + 1; i <= lastElement; i++) {\n if(data[i] != null) {\n data[firstNull] = data[i];\n data[i] = null;\n if(i == lastElement)\n lastElement = firstNull;\n findNextNull();\n }\n }\n }",
"public StarList flatten ( ) {\r\n\t\tStarList new_list = new StarList();\r\n\r\n\t\tfor (int i = 0 ; i < size() ; i++) {\r\n\t\t\tStar star = (Star)elementAt(i);\r\n\t\t\tnew_list.addUnpacked(star);\r\n\t\t}\r\n\r\n\t\treturn new_list;\r\n\t}",
"public FlatData flatten() {\n\t\tString data;\n\t\tdouble[] coords = coordinateTools.localToCoordinates(this);\n\t\tdata = this.getClass().getName() + \":\";\n\t\tdata += coords[0] + \"#\" + coords[1];\n\t\treturn new FlatData(data);\n\t}",
"public Sublayer[] getFlattenedLayers()\r\n {\r\n Sublayer[] flat = new Sublayer[4];\r\n\r\n for (int i = 0; i < layers.length; i++)\r\n {\r\n if (layers[i].hasSublayers())\r\n {\r\n flat[i] = Sublayer.merge(layers[i].getSubs().toArray(\r\n new Sublayer[layers[i].getSubs().size()]));\r\n } else\r\n {\r\n flat[i] = null;\r\n }\r\n\r\n }\r\n\r\n return flat;\r\n }",
"private static <T extends TNumber> Operand<T> flattenOuterDims(Scope scope, Operand<T> logits) {\n Operand<TInt64> one = Constant.scalarOf(scope, 1L);\n\n Shape shape = logits.shape();\n int ndims = shape.numDimensions();\n if (!shape.hasUnknownDimension()) {\n long product = 1L;\n boolean productValid = true;\n for (int i = ndims - 2; i >= 0; i--) {\n long d = shape.size(i);\n if (d == Shape.UNKNOWN_SIZE) {\n productValid = false;\n break;\n }\n product *= d;\n }\n if (productValid) {\n return Reshape.create(scope, logits, Constant.arrayOf(scope, product, shape.size(-1)));\n }\n }\n\n Operand<TInt64> rank = Cast.create(scope, Rank.create(scope, logits), TInt64.class);\n Operand<TInt64> rankMinusOne = Sub.create(scope, rank, one);\n\n Operand<TInt64> lastDimSize =\n Slice.create(\n scope,\n org.tensorflow.op.core.Shape.create(scope, logits, TInt64.class),\n rankMinusOne,\n one);\n Operand<TInt64> concat =\n Concat.create(\n scope,\n Arrays.asList(Constant.arrayOf(scope, -1L), lastDimSize),\n Constant.scalarOf(scope, 0));\n return Reshape.create(scope, logits, concat);\n }",
"public static List<Dimension> makeDimensionsAnon(int[] shape) {\n List<Dimension> newDimensions = new ArrayList<>();\n if ((shape == null) || (shape.length == 0)) { // scalar\n return newDimensions;\n }\n for (int len : shape) {\n newDimensions.add(Dimension.builder().setIsVariableLength(len == -1).setLength(len).setIsShared(false).build());\n }\n return newDimensions;\n }",
"public void squeeze() {\n\n if (dimVector.size() == 1)\n return;\n\n\n Vector<DArrayDimension> squeezeCandidates = new Vector<DArrayDimension>();\n\n for (DArrayDimension dim : dimVector) {\n if (dim.getSize() == 1)\n squeezeCandidates.add(dim);\n }\n\n if (squeezeCandidates.size() == dimVector.size())\n squeezeCandidates.remove(squeezeCandidates.size() - 1);\n\n\n // LogStream.out.println(\"DArray.squeeze(): Removing \"+\n // squeezeCandidates.size()+\" dimensions of size 1.\");\n\n\n dimVector.removeAll(squeezeCandidates);\n\n }",
"public <T extends TType, U extends TNumber> Operand<T> flatten(Operand<T> operand,\n Class<U> type) {\n return Shapes.flatten(scope, operand, type);\n }",
"public <T extends TType> Operand<T> flatten(Operand<T> operand) {\n return Shapes.flatten(scope, operand);\n }",
"@NotNull\n @Generated\n @Selector(\"flattenedClone\")\n public native SCNNode flattenedClone();",
"public void clearLastShape() {\n // decrement shape count if it is not already zero\n if(shapeCount > 0)\n --shapeCount;\n }",
"float[] flatten2DimArray(float[][] twoDimArray) {\n float[] flatArray = new float[twoDimArray.length * twoDimArray[0].length];\n for (int row = 0; row < twoDimArray.length; row++) {\n int offset = row * twoDimArray[row].length;\n System.arraycopy(twoDimArray[row], 0, flatArray, offset, twoDimArray[row].length);\n }\n return flatArray;\n }",
"@Override\n public Shape[][] getInitialArray() {\n return allShapes;\n }",
"public Shape transformToUserSpace(Shape shape) {\n return transform.createTransformedShape(shape);\n }",
"public double[] allDimensions() {\n return this.shape.allDimensions();\n }",
"public void reshape(int size)\n {\n quadraticTerm.reshape(size, size);\n linearTerm.reshape(size, 1);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Specifies that the other DDC origin tissue column be returned in this detail query. | public void addColumnDdcTissueOriginOther() {
addColumnInPrimarySection(ColumnMetaData.KEY_SECTION_TISSUE_ORIGIN_OTHER);
} | [
"public void addColumnDdcTissueOrigin() {\n addColumnInPrimarySection(ColumnMetaData.KEY_SECTION_TISSUE_ORIGIN);\n }",
"public void addColumnSampleTissueOriginOther() {\n addColumnInSample(ColumnMetaData.KEY_SAMPLE_TISSUE_ORIGIN_OTHER);\n }",
"public void addColumnDdcTissueFindingOther() {\n addColumnInPrimarySection(ColumnMetaData.KEY_SECTION_TISSUE_FINDING_OTHER);\n }",
"public void addColumnSampleTissueOrigin() {\n addColumnInSample(ColumnMetaData.KEY_SAMPLE_TISSUE_ORIGIN_CUI);\n }",
"public ScGridColumn<AcUspsDomesticInvoiceThsOriginAdjustment> newOriginAirportCodeColumn()\n {\n return newOriginAirportCodeColumn(\"Origin Airport Code\");\n }",
"public ScGridColumn<AcUspsDomesticInvoiceThsOriginAdjustment> newPostCorrOrigIndColumn()\n {\n return newPostCorrOrigIndColumn(\"Post Corr Orig Ind\");\n }",
"public ScGridColumn<AcDomesticCandidateRouteLeg> newOriginAirportCodeColumn()\n {\n return newOriginAirportCodeColumn(\"Origin Airport Code\");\n }",
"public ScGridColumn<AcUspsDomesticSupply> newOriginAirportCodeColumn()\n {\n return newOriginAirportCodeColumn(\"Origin Airport Code\");\n }",
"public ScGridColumn<AcUspsDomesticSupplyAdjustment> newOriginAirportCodeColumn()\n {\n return newOriginAirportCodeColumn(\"Origin Airport Code\");\n }",
"public ScGridColumn<AcConsignmentTransport> newOriginLocationCodeColumn()\n {\n return newOriginLocationCodeColumn(\"Origin Location Code\");\n }",
"public ScGridColumn<AcGlobalDomesticActualMarketCache> newOriginAirportCodeColumn()\n {\n return newOriginAirportCodeColumn(\"Origin Airport Code\");\n }",
"public ScGridColumn<AcUpuTagSummaryVo> newOriginOfficeOfExchangeQualifierColumn()\n {\n return newOriginOfficeOfExchangeQualifierColumn(\"Origin Office Of Exchange Qualifier\");\n }",
"public String detailOriginOrReturn();",
"public void addColumnDdcTissueFinding() {\n addColumnInPrimarySection(ColumnMetaData.KEY_SECTION_TISSUE_FINDING);\n }",
"public BigDecimal getRELATED_TO() {\r\n return RELATED_TO;\r\n }",
"public QueryLociSetter() {\n super(\"org.tair.db.locusdetail\", 2147483647);\n }",
"public ScGridColumn<AcUspsDomesticInvoiceThsOriginAdjustment> newDestinationAirportCodeColumn()\n {\n return newDestinationAirportCodeColumn(\"Destination Airport Code\");\n }",
"public ScGridColumn<AcUpuTagSummaryVo> newOriginLocationCodeColumn()\n {\n return newOriginLocationCodeColumn(\"Origin Location Code\");\n }",
"public String getColumntwo() {\n return columntwo;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
create a new composition in the workspace for each composition controller encountered | private void createCompositions(){
CompositionController t=rootController.getCompositionControllerStart();
CompositionViewController firstComposition=null;
compositionTabs.getTabs().clear();
while(t!=null){
CompositionViewController compositionViewController=new CompositionViewController(t,workspace,CompositionViewController.getNewTabName());
//keep track of the first composition view controller
if(firstComposition==null){
firstComposition=compositionViewController;
}
createItemsIn(compositionViewController);
workspace.getCompositionViewControllers().add(compositionViewController);
compositionTabs.getTabs().add(compositionViewController.getTab());
t=t.getNext();
}
if(firstComposition!=null){
workspace.setCurrentComposition(firstComposition);
//select the tab in the tab pane if it exists
compositionTabs.getSelectionModel().select(firstComposition.getTab());
}
} | [
"private void createControllers(){\n controllerList = new ArrayList<>();\n controllerList.add(new ButtonCommandPanelController(gui, parser));\n controllerList.add(new VariableHistoryBoxController(gui, variableHistory));\n controllerList.add(new PaletteController(gui, model));\n controllerList.add(new DrawerController(gui, model,parser));\n controllerList.add(new CustomCommandBoxController(gui, variableHistory, parser));\n controllerList.add(new CommandHistoryBoxController(gui, commandHistory, parser));\n controllerList.add(new CommandBoxController(gui, parser));\n }",
"public void createContents(){\n\t\t// Creates control for ScrolledCompositeController lifeCycleItemSCSCLC\n\t\tlifeCycleItemSCSCLC = new ScrolledCompositeController(\"lifeCycleItemSC\", coreController, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tsetDirtyManagement(false);\n\t\t\t\t\tgetComposite().setLayout(new MigLayout(\"wrap 2\",\"[align right]10[fill,grow]\",\"[]\"));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t// Creates control for LabelController coreClassName$1LBL\n\t\tcoreClassName$1LBL = new LabelController(\"coreClassName$1\", lifeCycleItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"container\", \"coreClassName\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateCoreClassName(this);\n\t\t// Creates control for LabelController dirtyManagement$1LBL\n\t\tdirtyManagement$1LBL = new LabelController(\"dirtyManagement$1\", lifeCycleItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"containerTree\", \"dirtyManagement\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateDirtyManagement(this);\n\t\tcreateEntityURIContainerTreePART$1(this);\n\t\tcreateEntityURI(this);\n\t\t// Creates control for LabelController additionalCode$1LBL\n\t\tadditionalCode$1LBL = new LabelController(\"additionalCode$1\", lifeCycleItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"container\", \"additionalCode\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateAdditionalCode(this);\n\t}",
"public void createNew() {\n\t\tchooseTemplateScreen = new ChooseTemplate(con,primaryStage);\n\t\tchooseTemplateScreen.setPreviousScreen(mainMenuScreen);\n\t\tpreferencesScreen = new Preferences(con,primaryStage);\n\t\tpreferencesScreen.setPreviousScreen(chooseTemplateScreen);\n\t\tdesignGardenScreen = new DesignGarden(con,primaryStage);\n\t\tdesignGardenScreen.setPreviousScreen(preferencesScreen);\n\t\t\n\t\tfinalViewScreen.setPreviousScreen(designGardenScreen);\n\t\trecommendationsScreen.setPreviousScreen(designGardenScreen);\n\t\tseasonViewScreen = new SeasonView(con);\n\t\tinfoTipsScreen = new InfoTips();\n\t\t\n\t}",
"public Opponent create(Workspace workspace, String description);",
"private void objectInstantiater()\n\t{\n\t\tfor (String module : modulesToInstanmoduletiate) {\n\t\t\tif(module.equals(\"TestNameField\") )\n\t\t\t{\n\t\t\t\t testNameField = new TestNameField();\n\t\t\t\t controller_module_list.add(testNameField.getStackPane());\n\t\t\t}\n\t\t\tif(module.equals(\"TestNameLabel\"))\n\t\t\t{\n\t\t\t\ttestNameLabel = new TestNameLabel();\n\t\t\t\tcontroller_module_list.add(testNameLabel.getStackPane());\n\t\t\t}\n\t\t\tif(module.equals(\"LEDModule\"))\n\t\t\t{\n\t\t\t\tlM = new LEDModule();\n\t\t\t\tcontroller_module_list.add(lM.getStackPane());\n\t\t\t}\n\t\t\tif(module.equals(\"VideoViewModule\"))\n\t\t\t{\n\t\t\t vm = new VideoViewModule();\n\t\t\t controller_module_list.add(vm.getStackPane());\n\t\t\t}\n\n\t\t\t\n\t\t}\n\t}",
"public void createCompositionSheet() {\n Line staffLine;\n for(int i=0; i<127; i++) {\n staffLine = new Line(0,i*10,2000,i*10);\n this.composition.getChildren().add(staffLine);\n }\n }",
"Composition createComposition();",
"private void iniciarControladores() {\n\t\tRepositorioChamada rc = new RepositorioChamada();\n\t\tchamada = new ControllerChamada(rc);\n\t\t\n\t\tRepositorioCaixa ra = new RepositorioCaixa();\n\t\tcaixa = new ControllerCaixa(ra);\n\t}",
"private void connectControllers(){\n try{\n //Setup Controller Environment\n if(!controllerNames.isEmpty()){\n cs = ControllerEnvironment.getDefaultEnvironment().getControllers(); //Get the current connected controllers\n } \n else{\n System.out.println(\"Please configure controller(s) in preference file\");\n close();\n }\n\n for (int i = 0; ((i < cs.length) && (i < 8)); i++){\n if(cs[i].getName().contains(\"PLAYSTATION(R)3\")){\n for (int j = 0; j<controllerNames.size();j++){\n if (cs[i].getName().contains(controllerNames.get(j))){\n if(controllers[j] == null){\n foundController = true;\n //Create a new controller object\n RemoteController t = new RemoteController (io, cs[i],baseArray[j]);\n //Store the controller thread reference\n controllers[j] = t;\n //Allocate a thread to each new controller\n t.start();\n }\n }\n }\n }\n }\n }\n catch(Exception e){\n System.out.println(\"Failed to create controllers \" + e.getMessage());\n }\n }",
"private void renderControllers(){\n for(Controller controller : controllerList){\n controller.initializeScreenComponents();\n controller.setUpConnections();\n controller.addToGUI();\n }\n }",
"Controllers createControllers();",
"private void createBuildingComponents() {\n if (this.buildings == null || this.buildings.size() == 0) return;\n\n this.buildingContainer.getChildren().clear();\n\n for (BuildingInterface building : this.buildings) {\n SelectableBuildingComponent buildingComponent = new SingleSelectableBuildingComponent();\n buildingComponent.setModel(building);\n buildingComponent.setController(this);\n buildingComponent.load();\n\n this.buildingComponents.add(buildingComponent);\n this.buildingContainer.getChildren().add(buildingComponent);\n }\n }",
"public void newController(){\n if(game==null){\n newGame();\n }\n this.controller = new Controller(game);\n }",
"public WorkspaceController() {\n this.workspace = new Workspace();\n pom = new ProcedureOutputManager(workspace);\t//*****\n }",
"private void createProjectComposite() {\r\n\t\tGridLayout gridLayout2 = new GridLayout();\r\n\t\tgridLayout2.numColumns = 2;\r\n\t\tprojectComposite = new Composite(composite, SWT.NONE);\r\n\t\tprojectComposite.setLayout(gridLayout2);\r\n\t\tprojectComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));\r\n\t\toutputChooserTreeViewer = new TreeViewer(projectComposite, SWT.BORDER);\r\n\t\toutputChooserTreeViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));\r\n\t\toutputChooserTreeViewer.setContentProvider(new ProjectContentProvider());\r\n\t\toutputChooserTreeViewer.setLabelProvider(new DecoratingLabelProvider(\r\n\t\t\t\t\t\t\t\tnew WorkbenchLabelProvider(), \r\n\t\t\t\t\t\t\t\tPlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()));\r\n\t\toutputChooserTreeViewer.setInput(ResourcesPlugin.getWorkspace().getRoot());\r\n\t\toutputChooserTreeViewer.getTree().addSelectionListener(new SelectionListener() {\r\n\r\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent arg0) {\r\n\t\t\t}\r\n\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\t\r\n\t\t\t\tvalidatePage();\r\n\t\t\t}\r\n\t\t});\r\n\t\toutputChooserTreeViewer.addSelectionChangedListener(new ISelectionChangedListener() {\r\n\r\n\t\t\tpublic void selectionChanged(SelectionChangedEvent arg0) {\r\n\t\t\t\tTreeSelection selection = (TreeSelection) outputChooserTreeViewer.getSelection();\r\n\t\t\t\tif (selection != null) {\r\n\t\t\t\t\tObject selected = selection.getFirstElement();\r\n\t\t\t\t\tif (selected != null) {\r\n\t\t\t\t\t\tif (selected instanceof IContainer) {\r\n\t\t\t\t\t\t\tNewPIWizardSettings.getInstance().outputContainer = (IContainer) selected;\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\r\n\t\tcreateButtonComposite();\r\n\t}",
"private void initializeControllers() {\n\t\tmultiDeckView.setMouseAdapter(new DeucesDeckController(DeucesSolitaire.this, doubleDeck, wastePile));\n\t\tmultiDeckView.setMouseMotionAdapter(new SolitaireMouseMotionAdapter(DeucesSolitaire.this));\n\t\tmultiDeckView.setUndoAdapter(new SolitaireUndoAdapter(DeucesSolitaire.this));\n\t\t\n\t\t// Set up Mouse Controller for the WastePileView\n\t\twastePileRowView.setMouseAdapter(new DeucesWastePileController(DeucesSolitaire.this, wastePileRowView));\n\t\twastePileRowView.setMouseMotionAdapter(new SolitaireMouseMotionAdapter(DeucesSolitaire.this));\n\t\twastePileRowView.setUndoAdapter(new SolitaireUndoAdapter(DeucesSolitaire.this));\n\t\t\n\t\t// Set up the Mouse Controller for the TableauPiles\n\t\tfor(int i = 0; i < TOTAL_COLUMN_COUNT; i++) {\n\t\t\tcolumnViews[i].setMouseAdapter(new DeucesTableauPileController(DeucesSolitaire.this, columnViews[i]));\n\t\t\tcolumnViews[i].setMouseMotionAdapter(new SolitaireMouseMotionAdapter(DeucesSolitaire.this));\n\t\t\tcolumnViews[i].setUndoAdapter(new SolitaireUndoAdapter(DeucesSolitaire.this));\n\t\t}\n\t\t\n\t\t// Set up the Mouse Controller for the FoundationPiles\n\t\tfor(int i = 0; i < TOTAL_PILE_COUNT; i++) {\n\t\t\tpileViews[i].setMouseAdapter(new DeucesFoundationPileController(DeucesSolitaire.this, pileViews[i]));\n\t\t\tpileViews[i].setMouseMotionAdapter(new SolitaireMouseMotionAdapter(DeucesSolitaire.this));\n\t\t\tpileViews[i].setUndoAdapter(new SolitaireUndoAdapter(DeucesSolitaire.this));\n\t\t}\n\t\t\n\t\t// Set up Mouse Controllers for the IntegerViews\n\t\tscoreView.setMouseMotionAdapter(new SolitaireMouseMotionAdapter(DeucesSolitaire.this));\n\t\tscoreView.setMouseAdapter(new SolitaireReleasedAdapter(DeucesSolitaire.this));\n\t\tscoreView.setUndoAdapter(new SolitaireUndoAdapter(DeucesSolitaire.this));\n\t\t\n\t\twastePileCountView.setMouseMotionAdapter(new SolitaireMouseMotionAdapter(DeucesSolitaire.this));\n\t\twastePileCountView.setMouseAdapter(new SolitaireReleasedAdapter(DeucesSolitaire.this));\n\t\twastePileCountView.setUndoAdapter(new SolitaireUndoAdapter(DeucesSolitaire.this));\n\t\t\n\t\tstockPileCountView.setMouseMotionAdapter(new SolitaireMouseMotionAdapter(DeucesSolitaire.this));\n\t\tstockPileCountView.setMouseAdapter(new SolitaireReleasedAdapter(DeucesSolitaire.this));\n\t\tstockPileCountView.setUndoAdapter(new SolitaireUndoAdapter(DeucesSolitaire.this));\n\t}",
"private void createComponents() {\n\t\tsetTitle(I18N.getLocalizedMessage(\"Print Preview\"));\n\t\tcreateToolBar();\n\t\tcreateStatusBar();\n\t\tcreateView();\n\t\tsetController(new PrintPreviewController(this));\n\t\tshowCloseLink();\n\t}",
"protected static void createPartition(JChannel ... channels) {\n for(JChannel ch: channels) {\n View view=View.create(ch.getAddress(), 5, ch.getAddress());\n GMS gms=ch.getProtocolStack().findProtocol(GMS.class);\n gms.installView(view);\n }\n }",
"public void placePreviewedObjects() {\n for (var preview : this.previewedModelsSupplier.get()) {\n System.out.println(\"Placing at \" + preview.getPosition());\n Direction direction = Direction.getDirectionFromDegree((int) preview.getRotation().getY());\n GameObject.newInstance(Player.getSelectedGameObject(),\n preview.getPosition().toTerrainPosition(), direction, true);\n }\n resetPreviewedPositions();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Output only. A permanent fixed identifier for source. .google.cloud.functions.v2beta.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; | com.google.cloud.functions.v2beta.SourceProvenance getSourceProvenance(); | [
"com.google.cloud.functions.v2beta.SourceProvenanceOrBuilder getSourceProvenanceOrBuilder();",
"public java.lang.String getProvenance() {\n java.lang.Object ref = provenance_;\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 provenance_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"org.hl7.fhir.Provenance getProvenance();",
"io.grafeas.v1.BuildProvenance getProvenance();",
"java.lang.String getProvenance();",
"public void setProvenance(influent.idl.FL_Provenance value) {\n this.provenance = value;\n }",
"void setProvenance(org.hl7.fhir.Provenance provenance);",
"public ProvenanceInfo getProvenance() {\n return provenance_;\n }",
"@java.lang.Override\n public java.lang.String getSourceVersionId() {\n java.lang.Object ref = sourceVersionId_;\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 sourceVersionId_ = s;\n return s;\n }\n }",
"public com.google.protobuf.ByteString\n getSourceVersionIdBytes() {\n java.lang.Object ref = sourceVersionId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n sourceVersionId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"io.grafeas.v1.BuildProvenanceOrBuilder getProvenanceOrBuilder();",
"io.grafeas.v1.InTotoProvenance getIntotoProvenance();",
"org.hl7.fhir.Provenance addNewProvenance();",
"public Builder setProvenance(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n provenance_ = value;\n onChanged();\n return this;\n }",
"com.google.protobuf.ByteString getSourceId();",
"public final String getSourceVersionId() {\n return this.sourceVersionId;\n }",
"public influent.idl.FL_Cluster.Builder setProvenance(influent.idl.FL_Provenance value) {\n validate(fields()[2], value);\n this.provenance = value;\n fieldSetFlags()[2] = true;\n return this; \n }",
"public String getSource_id() {\n\t\treturn source_id;\n\t}",
"java.lang.String getSourceVersionId();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fetch Roster list for jID from Openfire. | private void fetchRosterFromOpenfire() {
if(!Utility.VcardLoadedOnce){
if(NetworkAvailabilityReceiver.isInternetAvailable(ThatItApplication.getApplication())
&& MainService.mService.connection.isConnected()
&& MainService.mService.connection.isAuthenticated()){
Log.e("fetchRosterFromOpenfire", "fetchRosterFromOpenfire");
FilterUsersWithParse(rostListener, ParseCallbackListener.OPERATION_ON_START);
}else{
getRosterfromDatabase();
if(!NetworkAvailabilityReceiver.isInternetAvailable(ThatItApplication.getApplication())){
Utility.showMessage(getResources().getString(R.string.Network_Availability));
}else{
joinAndSetGroupAdapter();
}
}
} else {
getRosterfromDatabase();
joinAndSetGroupAdapter();
}
} | [
"ch.epfl.dedis.proto.RosterProto.Roster getRoster();",
"public List<MeetingGrap> getByUid(String uid);",
"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 }",
"@GET\n @Path(\"list\")\n public String list() {\n System.out.println(\"Invoked Games.List()\");\n JSONArray response = new JSONArray();\n try {\n PreparedStatement ps = Main.db.prepareStatement(\"SELECT GameDescription, GameDate FROM Games\");\n ResultSet results = ps.executeQuery();\n System.out.println(\"results: \"+ results);\n int countUsers = results.getInt(1);\n System.out.println(\"no of users: \"+ countUsers);\n while (results.next()==true) {\n JSONObject row = new JSONObject();\n row.put(\"GameDescription\", results.getString(1));\n row.put(\"GameDate\", results.getString(2));\n response.add(row);\n }\n return response.toString();\n } catch (Exception exception) {\n System.out.println(\"Database error: \" + exception.getMessage());\n return \"{\\\"Error\\\": \\\"Unable to list items. Error code xx.\\\"}\";\n }\n }",
"@Override\n public List<UserRoom> getUserRoomList() {\n logger.info(\"Start getUserRoomList\");\n List<UserRoom> userRoomList = new ArrayList<>();\n try {\n connection = DBManager.getConnection();\n preparedStatement = connection.prepareStatement(Requests.SELECT_FROM_USER_ROOM);\n rs = preparedStatement.executeQuery();\n while (rs.next()) {\n userRoomList.add(myResultSet(rs));\n }\n } catch (SQLException sqlException) {\n Logger.getLogger(sqlException.getMessage());\n } finally {\n closing(connection, preparedStatement, rs);\n }\n logger.info(\"Completed getUserRoomList\");\n return userRoomList;\n }",
"public List<String> getRosterList() {\n // TODO check if player name is related to a player profile\n List<String> rosterList = java.util.Arrays.asList(roster.split(\"\\\\s*,\\\\s*\"));\n return rosterList;\n }",
"List<T> membershipRoster(String membershipName);",
"java.util.List<Gogirl.ShowRoomInfo> getRoomlistList();",
"private void getIDOLS(int index){\n\t\t\n\t\tDefaultHttpClient httpClient = new DefaultHttpClient();\n\t\t\n\n\t\tString params = \"?sort=firstNameAsc&fields=name,-resources,jive.username\"; \n\t\tString url = urlBase+\"/api/core/v3/people/\"+this.myUsers[index].id +\"/@followers\"+params;\n\t\tHttpGet getRequest = new HttpGet(url);\n\t\t\n\t\t\n\t\t\t\t \n\t\tgetRequest.setHeader(\"Authorization\", \"Basic \" + this.auth);\n\t\t\n\t\t\n\t\tSystem.out.println(\"\\nAdding IDOLs for: \" + this.myUsers[index].login); \n\t\t\n\t\ttry {\n\t\t\tHttpResponse response = httpClient.execute(getRequest);\n\t\t\tString json_output = readStream(response.getEntity().getContent());\n\t\t // Remove throwline if present\n\t\t\tjson_output = removeThrowLine(json_output);\n\t\t getIdolElements(index, json_output);\n\n\t \n\t\t} catch (ClientProtocolException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"java.util.List<protobuf.clazz.Protocol.PlayerResultResponse> \n getGameRoomRecordsList();",
"public List<Game> getFullGameList() {\n List<Game> listOfGames = null;\n Session session = sessionFactory.openSession();\n // Try to return the user by the given nickname\n try {\n session.beginTransaction();\n // if mode equals ALL then get full list of games\n listOfGames = session.createCriteria(Game.class).list();\n \n session.getTransaction().commit();\n session.flush();\n } \n catch (HibernateException e) { return null; } \n finally { session.close(); }\n // Return userID if seted\n return listOfGames;\n }",
"List<String> getChatRoomListing() throws RemoteException;",
"public String[] viewRoster(Course c)\r\n\t{\r\n\t\ttry {\r\n\t\t\ts = conn.createStatement();\r\n\t\t\t\r\n\t\t\tquery = \"select * from Enrollment where course_name='\" + c.name + \"'\";\r\n\t\t\trs = s.executeQuery(query);\r\n\t\t\t\r\n\t\t\trs.first();\r\n\t\t\tString line = rs.getString(\"roster\");\r\n\t\t\tString[] usernames = line.split(\",\");\r\n\t\t\t\r\n\t\t\treturn usernames;\r\n\t\t} catch (SQLException e) {System.out.println(\"Roster viewing failed: \" + e); return null;}\r\n\t}",
"public List<List<DutyRosterItem>> getRosterAsList() {\n return new ArrayList<>(new TreeMap<>(roster).values());\n }",
"public Roster getListofFriends(){\n\n\t\treturn friendsList;\n\t}",
"@Override\n public List<AChatroom> getJoinedRooms(String username) {\n List<Integer> roomIdList = userService.allJoinedRooms(username);\n List<AChatroom> roomList = new ArrayList<>();\n for (int id: roomIdList) {\n roomList.add(chatroomService.get(id));\n }\n return roomList;\n }",
"synchronized public ArrayList<String> requestRoomList() {\n ArrayList<String> roomNames = new ArrayList<>();\n\n for (Room r : roomHandler.getPublicRoomList()) {\n roomNames.add(r.getName());\n }\n return roomNames;\n }",
"Observable<List<JobRating>> getJobRating(int jobId);",
"public String[][] getRoster(){\r\n\t\treturn roster;\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
constructor for the ListController class | public ListController(ConsoleLogger log) {
this.log = log;
} | [
"public ListaSEController() {\n }",
"public ItemController(){\n\t\titemList = new ArrayList<Item>();\n\t}",
"public CounterController(CounterList aCounterList) \n\t{\n\t\tcounterList = aCounterList;\n\t}",
"public ModelList() {\n }",
"public ShelterListController() {\n this(\"\", true, true, true, true, true, true);\n }",
"public List(){\n\t\tthis(\"list\", new DefaultComparator());\n\t}",
"public ListModel() {\r\n\tsuper(new BorderLayout());\r\n\t// create a list model\r\n\tthis.m_listModel = new DefaultListModel<String>();\r\n\r\n\tsetupListGui();\r\n\tadd(m_scrollAccountList, BorderLayout.CENTER);\r\n\tm_observers = new ArrayList<Observer>();\r\n\r\n }",
"private BlockListController()\r\n\t{\r\n\t\tblockListFactory = new BlockListFactory();\r\n\t}",
"public OrderListController() {\n selectedOrderList = new ArrayList();\n }",
"public MyList() {\n this(\"List\");\n }",
"private Lists() { }",
"public BankRemittanceListController() {\n\t\t// Default empty constructor.\n\t}",
"public ListCommand() {\n super();\n }",
"public UserList() {\n }",
"public TodoList() {\n this(\"todo_list\", null);\n }",
"public AppointmentTableController(DoublyLinkedList list) {\n\t\tthis.list = list;\n\t\tthis.model = new AppointmentTableModel();\n\t\tthis.view = new AppointmentTableView(this);\n\t\t\n\t}",
"public ListCommand() {\n\t\tsuper();\n\t}",
"public Controller()\n\t{\n\t\tthis.actuators = new ArrayList<>();\n\t\tthis.sensors = new ArrayList<>();\n\t\tthis.facades = new HashMap<>();\n\t}",
"public static void getListControllerInstance(ListController listController) {\n\t\tlc = listController;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is to pick up some binary numbers that do not meet the requirement,such as 1110,0001,0000,1111 | public static List<String> pickUpBinaryNumbers(List<String> list, int num){
for(int j = 0; j < list.size(); j++){
int num1 = 0 , num2 = 0;
char[] ch=list.get(j).toCharArray();
for(int i = 0; i < ch.length; i++){
if(ch[i] == '0')
num1++;
else if(ch[i] == '1')
num2++;
}
if(num1 != num || num2 != num){
list.remove(j);
j--;
}
}
return list;
} | [
"public void testNBitInteger() {\n\n\t}",
"private static String[] getValidMiniFloatBitSequences(){\r\n int nbrValues = (int)Math.pow(2, MINI_FLOAT_SIZE);\r\n\r\n String[] result = new String[nbrValues];\r\n for(int i = 0; i < nbrValues; i++){\r\n\r\n String full = String.format(\"%\" + Integer.SIZE + \"s\", Integer.toBinaryString(i))\r\n .replace(' ', '0');\r\n result[i] = full.substring(Integer.SIZE - MINI_FLOAT_SIZE, Integer.SIZE);\r\n }\r\n return result;\r\n }",
"static String fakeBin(String numberString) {\n\n\n return numberString.replaceAll(\"[0-4]\", \"0\").replaceAll(\"[5-9]\", \"1\");\n }",
"private static String[] getValidMiniFloatBitSequences() {\r\n int nbrValues = (int) Math.pow(2, MINI_FLOAT_SIZE);\r\n\r\n String[] result = new String[nbrValues];\r\n for (int i = 0; i < nbrValues; i++) {\r\n\r\n String full = String.format(\"%\" + Integer.SIZE + \"s\", Integer.toBinaryString(i)).replace(' ', '0');\r\n result[i] = full.substring(Integer.SIZE - MINI_FLOAT_SIZE, Integer.SIZE);\r\n }\r\n return result;\r\n }",
"private int checkBits(int[] bitsResult) {\n int sum = 0;\n for (int i = 0; i < 4; i++) {\n sum += bitsResult[i];\n }\n return sum;\n }",
"private static int convertToBinary(int num)\n\t{\n\t\tArrayList<Integer> digits = new ArrayList<Integer>();\n\t\tint c = 0;\n\t\t//\"shopping cart\" method\n\t\t//adds 1's where necessary to create the sum\n\t\twhile(num > 0)\n\t\t{\n\t\t\tint greatest = getGreatestPower(num);\n\t\t\tnum -= Math.pow(2, greatest);\n\t\t\t//first iteration creates the array with the proper length\n\t\t\tif(c == 0)\n\t\t\t{\n\t\t\t\tdigits.add(1);\n\t\t\t\tfor(int i=0; i<greatest; i++)\n\t\t\t\t\tdigits.add(0);\n\t\t\t}\n\t\t\t//other iterations simply set the correct 0's to 1's\n\t\t\telse\n\t\t\t\tdigits.set(digits.size() - (greatest + 1), 1);\n\t\t\tc++;\n\t\t}\n\t\treturn ArrayToInt(digits);\n\t}",
"private int[] parseBits(int[] peaks){from the number of peaks array decode into an array of bits (2=bit-1, 1=bit-0, 0=no bit)\n\t\t// \n\t\tint i =0;\n\t\tint lowCounter = 0;\n\t\tint highCounter = 0;\n\t\tint nBits = peaks.length /SLOTS_PER_BIT;\n\t\tint[] bits = new int[nBits];\n\t\t//i = findNextZero(peaks,i); // do not search for silence\n\t\ti = findNextNonZero(peaks,i);\n\t\tint nonZeroIndex = i;\n\t\tif (i+ SLOTS_PER_BIT >= peaks.length) //non-zero not found\n\t\t\treturn bits;\n\t\tdo {\n\t\t\t//int nPeaks = peaks[i]+peaks[i+1]+peaks[i+2]+peaks[i+3];\n\t\t\tint nPeaks = 0;\n\t\t\tfor (int j = 0; j < SLOTS_PER_BIT; j++) {\n\t\t\t\tnPeaks+= peaks[i+j];\n\t\t\t}\n\t\t\tint position = i/SLOTS_PER_BIT;\n\t\t\tbits[position] = BIT_NONE_SYMBOL;\n\t\t\t\n\t\t\tif (nPeaks>= LOW_BIT_N_PEAKS) {\n\t\t\t\t//Log.w(TAG, \"parseBits NPEAK=\" + nPeaks);\n\t\t\t\tbits[position] = BIT_LOW_SYMBOL;\n\t\t\t\tlowCounter++;\n\t\t\t}\n\t\t\tif (nPeaks>=HIGH_BIT_N_PEAKS ) {\n\t\t\t\tbits[position] = BIT_HIGH_SYMBOL;\n\t\t\t\thighCounter++;\n\t\t\t}\n\n\t\t\ti=i+SLOTS_PER_BIT;\n\t\t\t\n\t\t\t\n\t\t} while (SLOTS_PER_BIT+i<peaks.length);\n\t\tlowCounter = lowCounter - highCounter;\n\t\treturn bits;\n\t}",
"private byte[] intToBits(int number, int n) {\n\t\tbyte[] bits = new byte[n];\n\t\t\n\t\tString bitString = Integer.toBinaryString(number);\n\t\twhile (bitString.length() < n) {\n\t\t\tbitString = \"0\" + bitString;\n\t\t}\n\t\t\n\t\tfor(int i = 0, maxLen = bits.length; i < maxLen; i++) {\n\t\t\tbits[i] = (byte) (bitString.charAt(i) == 1 ? 1 : 0);\n\t\t}\n\t\t\n\t\treturn bits;\n\t}",
"private int maskForConstantBits() {\n\t\tint join = lower ^ upper;\n\t\tint mask = 0;\n\t\tfor (int testBit = Integer.MIN_VALUE; testBit != 0 && (join & testBit) == 0; testBit >>>= 1) {\n\t\t\tmask |= testBit;\n\t\t}\n\t\treturn mask;\n\t}",
"static void findTwoMissingNumber(int a[]) {\n int miss1 = 0;\n int miss2;\n int miss1miss2 = 0;\n\n int size = a.length;\n for (int i = 0; i < size; i++) {\n miss1miss2 ^= ((i + 1) ^ a[i]);\n }\n\n miss1miss2 ^= (size + 1);\n miss1miss2 ^= (size + 2);\n\n int diff = miss1miss2 & (-miss1miss2);\n\n for (int i = 0; i < size; i++) {\n if (((i + 1) & diff) > 0)\n miss1 ^= (i + 1);\n\n if ((a[i] & diff) > 0)\n miss1 ^= a[i];\n }\n\n if (((size + 1) ^ diff) > 0)\n miss1 ^= (size + 1);\n\n if (((size + 2) ^ diff) > 0)\n miss1 ^= (size + 2);\n\n miss2 = miss1miss2 ^ miss1;\n\n System.out.println(miss1);\n System.out.println(miss2);\n }",
"int bitRange(int num, int s, int n)\n {\n return (num >> s) & ~(-1 << n);\n }",
"public int findMissingInt(int[] A, int n, int bit_index, int miss_number){\n\tif(bit_index >= Math.log(n)/Math.log(2))\n\t\treturn miss_number;\n\tint missing_number = 0;\n\tint cnt_1s = count(A, 1, bit_index);\n\tint cnt_0s = count(A, 0, bit_index);\n\tif(n%2 == 0){\n\t\tif(cnt_1s+1 > cnt_0s)//even are missing\n\t\t\treturn findMissingInt(getPart(A, 0), n, bit_index+1, miss_number<<1);\n\t\telse{//odd missing\n\t\t\treturn findMissingInt(getPart(A, 1), n, bit_index+1, miss_number<<1+1);\n\t}else{\n\t\tif(cnt_1s > cnt_0s)//even missing\n\t\t\treturn findMissingInt(getPart(A, 0), n, bit_index+1, miss_number<<1);\n\t\telse//odd missing\n\t\t\treturn findMissingInt(getPart(A, 1), n, bit_index+1, miss_number<<1+1);\n\t}\n}\n\n/**\n * however the book use an ArrayList, saves much effort!\n */\nprivate int[] getPart(int[] A, int parity){// get all the odd/even elements in array A\n}",
"static int check(int x, int a, int b) \n\t{ \n\t\t// sum of digits is 0 \n\t\tif (x == 0) \n\t\t{ \n\t\t\treturn 0; \n\t\t} \n\n\t\twhile (x > 0) \n\t\t{ \n\n\t\t\t// if any of digits in sum is \n\t\t\t// other than a and b \n\t\t\tif (x % 10 != a & x % 10 != b) \n\t\t\t{ \n\t\t\t\treturn 0; \n\t\t\t} \n\n\t\t\tx /= 10; \n\t\t} \n\n\t\treturn 1; \n\t}",
"@Test\n public void test2(){\n\n String s =\"1000000000000001\";\n //s = BinaryCalculate.BinaryArithmeticalRightShift(s,1);\n s = BinaryCalculate.BinaryLogicRightShift(s,1);\n int a = BitConversion.fromBinaryStringToInt(s);\n System.out.println(a);\n }",
"@Test\n\tpublic void test01() {\n\t\tint sum = ((Integer.parseInt(\"80\", 16) + Integer.parseInt(\"02\", 16) + Integer.parseInt(\"FF\", 16) + Integer.parseInt(\"C2\", 16)) ^ 0xFFFFFFFF) & 0xFF;\n\t\tSystem.out.println(sum);\n\t\tSystem.out.println(Integer.toHexString(sum));\n\t\tSystem.out.println(Integer.parseInt(\"BC\", 16));\n\t}",
"public static String decodeBitsAdvanced(String bitsInput) {\n \t \n \t \n \t String bits = bitsInput.replaceAll(\"(^[0]+)|([0]+$)\", \"\");\n \t \n \t //bits = bits.replaceAll(\"010\", \"00\");\n \t //bits = bits.replaceAll(\"101\", \"11\");\n \t \n \t int minZero = 100;\n Matcher matcher0 = Pattern.compile(\"0+\").matcher(bits);\n while (matcher0.find()) {\n \t minZero = Math.min(minZero,matcher0.group().length());\n } \n \n ArrayList<String> allMatches = new ArrayList<String>();\n \t\n Matcher matcher = Pattern.compile(\"1+|0+\").matcher(bits);\n while (matcher.find()) {\n allMatches.add(matcher.group());\n }\n \t\n \tString[] bit1 = bits.split(\"[0]+\");\n \tdouble numZ = bits.replaceAll(\"0\", \"\").length();\n if (numZ == 0 ) {return \" \";}\n \tArrays.sort(bit1);\n \tdouble unitLength = 0.0;\n if (bit1[0].length() == bit1[bit1.length-1].length()) \n \t {\n \t\tunitLength = bit1[0].length();\n if (unitLength < (minZero*2)) {unitLength = unitLength*1.2;}\n \t }\n \telse \n \t {\n \tdouble num1 = bits.replaceAll(\"0\", \"\").length();\n \tunitLength = (1.1)*num1/bit1.length;\n \t }\n \t\n \tString curr = \"\";\n \tStringBuilder result = new StringBuilder();\n \tfor (String word: allMatches) \n \t{ if (word.contains(\"0\")) \n \t {\n \t\tif (word.length() > (Math.max(Math.min(minZero,unitLength*4),unitLength*2.33))) {curr = \" \";}\n \t\telse if (word.length() >= (Math.max(minZero,unitLength))) {curr = \" \";}\n \t\telse {curr = \"\";}\n \t }\n \telse \n \t {\n \t\tif (word.length() >= (unitLength*1.05)) {curr = \"-\";}\n \t\telse {curr = \".\";}\n \t }\n \tresult.append(curr); \n \t}\n \tSystem.out.println(\"result:\"+unitLength+\":\"+bitsInput+\":\"+result.toString()+\":\"+decodeMorse(result.toString()));\n \treturn result.toString();\n }",
"private boolean validNbit(String input) {\n\t\treturn input.matches(\"[0-9A-F]+\");\n\t}",
"private int negativeBinaryToInt(String binary) {\n int n = binary.length() - 1;\n int w = -bitToInt(binary.charAt(0)) * (int) Math.pow(2, n);\n for (int i = n, j = 0; i > 0; i--, j++) {\n w += (int) Math.pow(2, j) * (binary.charAt(i) == '1' ? 1 : 0);\n }\n return w;\n }",
"private int positiveBinToInt(String binary) {\n int w = 0;\n for (int i = binary.length() - 1, j = 0; i > 0; i--, j++) {\n w += (int) Math.pow(2, j) * bitToInt(binary.charAt(i));\n }\n return w;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Click on Member Services link to open the Member Services page | public KPAUIMemberServicesPage openMemberServicesPage() {
sleep(1);
getFooterLegalAndCustomerServiceContactUsLink().click();
return new KPAUIMemberServicesPage(driver);
} | [
"public OPEN_POSITIONS clickServicesLink() {\n\t if(services.isDisplayed())\n services.click();\n return this;\n }",
"public KPAUIPregnancyPage clickPregnancyServicesLink(){\n getPregnancyServicesLink().click();\n return new KPAUIPregnancyPage(driver);\n }",
"public KPAUITourOnlineServicesPage openQuickLinksTourOnlineServicesPage() {\n getFooterNavQuickLinksTourOnlineServicesLink().click();\n return new KPAUITourOnlineServicesPage(driver);\n}",
"public MembersMenuPage clickMenuMembers(){\n menuMembers.click();\n return new MembersMenuPage();\n }",
"public void click_contactUsLink(){\n\t\tlog.info(\"clicking on the the ContactUS link\");\n\t\tdriver.findElement(contactUs_link).click();\n\t}",
"public void clickonAddInternalSalesPerson() {\n\t\tlink.click();\n\t\tdriver.switchTo().frame(\"Menu\");\n\t\taddInternalSalesPersonTab.click();\n\t\tdriver.switchTo().defaultContent();\n\t}",
"public CheckingAccountPage clickOpenCheckingAccount()\n\t{ \n\t\t//Click on link Current Account\n objCommon.click(webbtnOpenCheckingAccount);\n\t\t \n\t\treturn new CheckingAccountPage(driver, Dictionary,Environment,Reporter);\n\t}",
"public void clickonMortServProviderEO() {\n\t\tMortServProviderEOlink.click();\r\n\t}",
"public void OpenOwnerPage(){\n\n driver.get(\"localhost:8080\");\n\n driver.manage().window().maximize();\n\n WebElement findOwner = driver.findElementByXPath(\"//a[@href='/owners/find']\");\n //WebElement findOwner = driver.findElement(By.partialLinkText(\"Find owners\"));\n\n findOwner.click();\n\n }",
"public void clickAccountLink(){\n\t\ttry{\n\t\t\tlink_account.click();\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public ContactsPage click_on_contacts_link()\n\t\t{\n\t\t\tUtilities.switch_to_frame(\"mainpanel\");\n\t\t\tcontacts_link.click();\n\t\t\treturn new ContactsPage();\t\t\n\t\t}",
"public void AdminLink(){\n\t\tAdminLink.click();\n\t}",
"public void goToSupport(){\n\t\tdriver.findElement(By.cssSelector(\".signing>a:nth-child(2)\")).click();\n\t\t//driver.findElement(By.cssSelector(\"#block-block-3 > div > div > div.zgh-utilities > div.zgh-accounts > a.zgh-login\")).click();\n\t\t\n\t}",
"HtmlPage clickSiteLink();",
"public void clickFindOwnersLink() {\n LOGGER.info(\"Clicking on Find Owners link from main menu\");\n click(findOwnersLink);\n waitForFullPageOrJsAjaxToLoad();\n }",
"public void clickUserIDLink() {\n getUserIDLink().click();\n }",
"public void clickOnHotelsTab(){\n \thotelLink.click();\n }",
"public void clickContactUsLink()\n\t{\n \telementUtils.performElementClick(wbContactUsLink);\n\t}",
"public void clickAdminLink(){\n\t\tthis.adminLink.click();\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
se modifica los datos del resultado | @Override
public Resultado modificar() {
LOG.info("Se modificó el resultado");
return resultado;
} | [
"@Override\r\n\tpublic Resultado modificar() {\n\t\tLOG.info(\"Se modificaron los datos del resultado\");\r\n\t\treturn resultado;\r\n\t}",
"public void cargarResultados() {\n\t\t//Completar\n\t\tthis.columnas = new String[] {\"Cosecha\",\"Tipo Cultivo\",\"Fecha\",\"Kilos\",\"Altura\",\"Humedad\"};\n\t\t\n\t\tresultadosCosecha = new int[][] {\n\t\t\t{1, 1, 20170101, 20, 200, 78}, \n\t\t\t{2, 1, 20170801, 19, 194, 85}, \n\t\t\t{3, 2, 20170901, 25, 262, 85},\n\t\t\t{4, 2, 20171201, 12, 140, 64},\n\t\t\t{5, 3, 20180101, 26, 217, 93},\n\t\t\t{6, 3, 20180201, 34, 261, 91}\n\t\t\t};\n\t}",
"public void actualizarDatos() {\n Operacion operacion = new Operacion();\n String sql = \"update producto set producto= '\" + this.producto + \"' where id_producto= '\" + this.id_producto + \"'\";\n operacion.ejecutar(sql);\n }",
"public List<ParticipanteCohorteFamiliaCasoData> getParticipanteCohorteFamiliaCasosDatos(String filtro, String orden) throws SQLException {\n \tList<ParticipanteCohorteFamiliaCasoData> mParticipanteCohorteFamiliaCasosDatos = new ArrayList<ParticipanteCohorteFamiliaCasoData>();\n Cursor cursor = crearCursor(CasosDBConstants.PARTICIPANTES_CASOS_TABLE, filtro, null, orden);\n if (cursor != null && cursor.getCount() > 0) {\n cursor.moveToFirst();\n mParticipanteCohorteFamiliaCasosDatos.clear();\n do{\n \tParticipanteCohorteFamiliaCasoData pd = new ParticipanteCohorteFamiliaCasoData();\n \tParticipanteCohorteFamiliaCaso mParticipanteCohorteFamiliaCaso = null;\n mParticipanteCohorteFamiliaCaso = ParticipanteCohorteFamiliaCasoHelper.crearParticipanteCohorteFamiliaCaso(cursor);\n CasaCohorteFamiliaCaso caso = this.getCasaCohorteFamiliaCaso(CasosDBConstants.codigoCaso + \"='\" +cursor.getString(cursor.getColumnIndex(CasosDBConstants.codigoCaso))+\"'\", null);\n mParticipanteCohorteFamiliaCaso.setCodigoCaso(caso);\n ParticipanteCohorteFamilia participante = this.getParticipanteCohorteFamilia(MainDBConstants.participante + \"=\" +cursor.getInt(cursor.getColumnIndex(CasosDBConstants.participante)), null);\n //mostrar solo registros con contraparte en la tabla de participantes y que esten activos\n if (participante!=null && participante.getParticipante()!=null && participante.getParticipante().getProcesos().getEstPart().equals(1)) {\n mParticipanteCohorteFamiliaCaso.setParticipante(participante);\n pd.setParticipante(mParticipanteCohorteFamiliaCaso);\n List<VisitaSeguimientoCaso> mVisitaSeguimientoCasos = new ArrayList<VisitaSeguimientoCaso>();\n mVisitaSeguimientoCasos = getVisitaSeguimientoCasos(CasosDBConstants.codigoCasoParticipante + \" = '\" + mParticipanteCohorteFamiliaCaso.getCodigoCasoParticipante() + \"'\", MainDBConstants.fechaVisita);\n pd.setNumVisitas(mVisitaSeguimientoCasos.size());\n if (mVisitaSeguimientoCasos.size() > 0)\n pd.setFechaUltimaVisita(mVisitaSeguimientoCasos.get(mVisitaSeguimientoCasos.size() - 1).getFechaVisita());\n mParticipanteCohorteFamiliaCasosDatos.add(pd);\n }\n } while (cursor.moveToNext());\n }\n if (!cursor.isClosed()) cursor.close();\n \n return mParticipanteCohorteFamiliaCasosDatos;\n }",
"public void cargarTodosLosRegistros () {\n libro = new LibroDAO().obtenerTodosLosLibros();\n DefaultTableModel modelo = (DefaultTableModel)jtLibro.getModel();\n for (Libro registro : libro)\n modelo.addRow(registro.toArray());\n\n //Actualizo la tabla.\n jtLibro.updateUI();\n }",
"public void rubahData() {\n int ok = JOptionPane.showConfirmDialog(this,\n \"Anda Yakin Ingin Mengubah Data\\n Dengan No Anggota = '\" + txtNoAnggota.getText()\n + \"'\", \"Konfirmasi \", JOptionPane.YES_NO_OPTION);\n // Apabila tombol Yes ditekan\n if (ok == 0) {\n try {\n Anggota entity = new Anggota(); // Entity\n\n entity.setNoAnggota(txtNoAnggota.getText()); \n\n entity.setNama(txtNama.getText()); \n\n entity.setAlamat(txtAlamat.getText()); \n\n implement.update(entity); // brgServis Objek dari barangImplement yang punya method Insert (barang brg)\n\n if (entity.getRow_execute() > 0) {\n JOptionPane.showMessageDialog(this, \"Data Berhasil diubah\"); \n statusAwal();\n }\n } catch (SQLException se) {\n } // Silahkan tambahkan Sendiri informasi Eksepsi\n }\n }",
"public void mostrarEstudiantes(){\n \n Object infoEstudiantes [][]= modelo.getEstudiantes(\"MOSTRAR\", \"\");\n String carreras [][] = modelo.getCarreras();\n \n //----------------------------------------------------------------------\n //Código que guarda en el array el nombre_carrera correspondiente al id_carrera que esta como llave foranea en estudiante\n for (int i = 0; i < infoEstudiantes.length; i++) {\n int x=0;\n while(x<carreras.length){\n if(infoEstudiantes[i][5].toString().equals(carreras[x][0])){\n infoEstudiantes[i][5]=carreras[x][1];\n } \n x++; \n }\n } \n //----------------------------------------------------------------------\n \n //Pintar datos en el JTable\n String tituloCampos [] ={\"ID\", \"CÓDIGO\", \"NOMBRE\", \"FECHA\", \"GÉNERO\", \"CARRERA\", \"INTERESES\"};\n formulario.getTablaModelo().setDataVector(infoEstudiantes, tituloCampos);\n formulario.getTablaDatos().setModel(formulario.getTablaModelo()); \n }",
"public void CargarProveedores() {\n DefaultTableModel modelo = (DefaultTableModel) vista.Proveedores.jTable1.getModel();\n modelo.setRowCount(0);\n res = Conexion.Consulta(\"select * From proveedores\");\n try {\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getInt(1));\n v.add(res.getString(2));\n v.add(res.getString(3));\n v.add(res.getString(4));\n modelo.addRow(v);\n vista.Proveedores.jTable1.setModel(modelo);\n }\n } catch (SQLException e) {\n }\n }",
"public boolean chUpdate() {\n int res;\n String[] cols, parts;\n String tmpQuery, nomtab;\n Sistema objS = new Sistema();\n\n error.chBdActiva(\"update\");\n if (error.getDslerr() != 0) {\n return false;\n }\n\n query = query.toLowerCase();\n parts = query.split(\"update \");\n if (parts.length == 1) { //no hay update\n return false;\n }\n parts = parts[1].split(\" set \");\n nomtab = parts[0]; //nombre de la tabla\n res = error.chTablaExiste(\"update\", nomtab);\n if (error.getDslerr() != 0) {\n return false;\n }\n\n tmpQuery = query;\n query = \"select * from \" + nomtab; //va preparando el select\n parts[0] = parts[1]; //parts en la posición 0 debe contener las columnas del update\n\n if (parts[1].contains(\"where\")) {\n parts = parts[1].split(\" where \"); //obtiene columnas del where\n query += \" where \" + parts[1]; //coloca las condiciones del where\n }\n\n parts = parts[0].split(\", \");\n if (!chSelect()) {\n System.out.println(\"HUBO UN ERROR AL INTENTAR \");\n return false;\n }\n\n if (!objS.actualiza(LtabResAll.getListRegistro(), parts, RUTA + nomtab+\".dat\")) {\n return false;\n }\n System.out.println(\"SE HAN ACTULIZADO \" + LtabResAll.getListRegistro().size() + \" REGISTROS\");\n return true;\n }",
"private void Datos(){\n if(v3.usuario.size()>0){\n jTextField1.setText(v3.usuario.get(j1).nombre);\n jTextField2.setText(Integer.toString(v3.usuario.get(j1).oro));\n }else{\n \n }\n }",
"public void atualizarData(){\r\n\t\tSystem.out.println(\"Go to hell!\");\r\n\t\tif(presencas != null){\r\n\t\t\tfor (Presenca p : presencas) {\r\n\t\t\t\tp.setData(presenca.getData());\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void modificacion(Paqs obj, int opc)\n {\n try\n {\n conexionBD = ConexionBD.getConection();\n switch (opc)\n {\n case 1: //Caso de modificar un paquete recibido\n //1ero modifico los datos del paquete de la tabla paquetes\n sentencia = conexionBD.prepareStatement(\"UPDATE paquetes SET peso = ?, altura = ?, ancho = ?, profundidad = ?, precio = ? WHERE num_guia = ?\");\n sentencia.setDouble(1, obj.getPeso());\n sentencia.setDouble(2, obj.getAltura());\n sentencia.setDouble(3, obj.getAncho());\n sentencia.setDouble(4, obj.getProfundidad());\n sentencia.setDouble(5, obj.getPrecio());\n sentencia.setInt(6, obj.getNum_guia());\n int f = sentencia.executeUpdate();\n if (f > 0)\n {\n System.out.println(\"Modificaciones del paquete guardados con exito\");\n } else\n {\n System.out.println(\"Modificaciones del paquete NO REALIZADOS\");\n }\n //2do modificacion del nombre del emisor\n sentencia = conexionBD.prepareStatement(\"UPDATE paquetes SET peso = ?, altura = ?, ancho = ?, profundidad = ?, precio = ? WHERE num_guia = ?\");\n break;\n case 2: //Caso de enviar un paquete recibido\n sentencia = conexionBD.prepareStatement(\"UPDATE paquetes SET fecha_ent = ? WHERE num_guia = ?\");\n sentencia.setString(1, obj.getFchEnt());\n sentencia.setInt(2, obj.getNum_guia());\n int ff = sentencia.executeUpdate();\n if (ff > 0)\n {\n System.out.println(\"Paquete enviado con exito\");\n } else\n {\n System.out.println(\"NO se pudo ENVIAR el paquete\");\n }\n break;\n }\n } catch (Exception e)\n {\n } finally\n {\n try\n {\n conexionBD.close();\n } catch (Exception e)\n {\n }\n }\n }",
"@Override\r\n\tpublic void guardar() {\n\t\tLOG.info(\"El resultado fue guardado..\");\r\n\t}",
"private void setDatosBasicosOrdenCompra() throws Exception {\n\t\tint currentUser = getSessionManager().getWebSiteUser().getUserID();\n\n\t\tsetRow_id(_dsOrdenesCompra.getOrdenesCompraOrdenCompraId());\n\n\t\t// obtengo las intancias de aprobación correspondientes agrupadas\n\t\t// por usuario para mostrar las observaciones de todos los firmantes\n\t\t_dsAuditoria\n\t\t\t\t.setOrderBy(AuditaEstadosCircuitosModel.AUDITA_ESTADOS_CIRCUITOS_FECHA\n\t\t\t\t\t\t+ \" DESC\");\n\t\t_dsAuditoria\n\t\t\t\t.retrieve(AuditaEstadosCircuitosModel.AUDITA_ESTADOS_CIRCUITOS_OBSERVACIONES\n\t\t\t\t\t\t+ \" IS NOT NULL AND \"\n\t\t\t\t\t\t+ AuditaEstadosCircuitosModel.AUDITA_ESTADOS_CIRCUITOS_NOMBRE_TABLA\n\t\t\t\t\t\t+ \" = 'inventario.ordenes_compra' AND \"\n\t\t\t\t\t\t+ AuditaEstadosCircuitosModel.AUDITA_ESTADOS_CIRCUITOS_REGISTRO_ID\n\t\t\t\t\t\t+ \" = \" + getRow_id());\n\t\tif (_dsAuditoria.getRowCount() == 0)\n\t\t\t_datatable1.setVisible(false);\n\t\telse\n\t\t\t_datatable1.setVisible(true);\n\n\t\t// Nùmero de OC y estado en el tìtulo\n\t\tString titulo = \"Orden de compra Nº\" + getRow_id();\n\t\tif (_dsOrdenesCompra.getEstadoNombre() != null)\n\t\t\ttitulo += \" (\" + _dsOrdenesCompra.getEstadoNombre() + \")\";\n\t\t_detailformdisplaybox1.setHeadingCaption(titulo);\n\n\t\t_dsOrdenesCompra.setCurrentWebsiteUserId(currentUser);\n\n\t\t// Recupera esquema de configuración para la cadena de firmas\n\t\t_dsOrdenesCompra.setEsquemaConfiguracionId(Integer\n\t\t\t\t.parseInt(getPageProperties().getProperty(\n\t\t\t\t\t\t\"EsquemaConfiguracionIdOrdenesCompra\")));\n\n\t\t_monto_total2.setExpression(_dsDetalleSC,\n\t\t\t\tDetalleSCModel.DETALLE_SC_MONTO_TOTAL_PEDIDO);\n\t\t_monto_total2.setDisplayFormatLocaleKey(\"CurrencyFormatConSigno\");\n\n\t\t// Neto\n\t\t_dsOrdenesCompra.setNetoOrdenCompra(_dsOrdenesCompra\n\t\t\t\t.getAtributoNetoOrdenCompra());\n\t\t// Descuento\n\t\t_dsOrdenesCompra.setDescuentoOrdenCompra(_dsOrdenesCompra\n\t\t\t\t.getAtributoDescuentoOrdenCompra());\n\t\t// IVA\n\t\t_dsOrdenesCompra.setIvaOrdenCompra(_dsOrdenesCompra\n\t\t\t\t.getAtributoIvaOrdenCompra());\n\t\t// Total OC\n\t\t_dsOrdenesCompra.setTotalOrdenCompra(_dsOrdenesCompra\n\t\t\t\t.getAtributoTotalOrdenCompra());\n\n\t\t// Muestra observaciones realizadas a la OC para el estado adecuado\n\t\tString estado = _dsOrdenesCompra.getOrdenesCompraEstado();\n\t\tif (\"0008.0002\".equalsIgnoreCase(estado)\n\t\t\t\t|| \"0008.0004\".equalsIgnoreCase(estado)\n\t\t\t\t|| \"0008.0005\".equalsIgnoreCase(estado)\n\t\t\t\t|| \"0008.0006\".equalsIgnoreCase(estado)) {\n\t\t\t// _dsOrdenesCompra.recuperaObservaciones();\n\t\t\t_observacionesTd.setEnabled(true);\n\t\t\t_observacionesTd.setVisible(true);\n\t\t} else {\n\t\t\t_observacionesTd.setEnabled(false);\n\t\t\t_observacionesTd.setVisible(false);\n\t\t}\n\n\t\t// setea comprador\n\t\tint comprador = _dsOrdenesCompra.getOrdenesCompraUserIdComprador();\n\t\tif (comprador == 0)\n\t\t\t_dsOrdenesCompra.setOrdenesCompraUserIdComprador(currentUser);\n\n\t\t// setea la URL del reporte a generar al presionar el botón de impresión\n\t\t_imprimirOrdenCompraBUT2.setHref(armarUrlReporte(BIRT_FRAMESET_PATH, \"PDF\", \"orden_compra\",\n\t\t\t\t\"&orden_compra_id_parameter=\" + getRow_id()));\n\t\t_imprimirOrdenCompraBUT3.setHref(armarUrlReporte(BIRT_FRAMESET_PATH, \"PDF\",\n\t\t\t\t\"orden_compra_full_o\", \"&orden_compra_id_parameter=\" + getRow_id()));\n\t\t_imprimirOrdenCompraBUT4.setHref(armarUrlReporte(BIRT_FRAMESET_PATH, \"PDF\",\n\t\t\t\t\"orden_compra_full_d\", \"&orden_compra_id_parameter=\" + getRow_id()));\n\t\t_imprimirOrdenCompraBUT5.setHref(armarUrlReporte(BIRT_FRAMESET_PATH, \"PDF\",\n\t\t\t\t\"orden_compra_full_t\", \"&orden_compra_id_parameter=\" + getRow_id()));\n\n\t\t// setea la URL de lista de firmantes y transiciones de estado\n\t\t_verFirmantes.setHref(\"ListaFirmantes.jsp?orden_id=\" + getRow_id());\n\n\t\t// setea la URL de lista de solicitantes\n\t\t_verSolicitantes.setHref(\"ListaSolicitantes.jsp?orden_id=\" + getRow_id());\n\n\t\t// setea el boton de seleccion/deseleccion segun corresponda\n\t\tif (_dsDetalleSC.getRowCount() == 0)\n\t\t\tseleccionarTodo = true;\n\n\t\tString seleccion = (seleccionarTodo ? \"text.seleccion\" : \"text.deseleccion\");\n\t\t_desSeleccionaTodoBUT1.setDisplayNameLocaleKey(seleccion);\n\t\t_desSeleccionaTodoBUT1.setOnClick(\"CheckAll(\" + seleccionarTodo + \");\");\n\n\t\t// setea el nro. de oc en tango si la propiedad correspondiente esta\n\t\t// seteada\n\t\tString nroOrdenCompra = AtributosEntidadModel.getValorAtributoObjeto(\n\t\t\t\tN_ORDEN_CO, _dsOrdenesCompra.getOrdenesCompraOrdenCompraId(),\n\t\t\t\t\"TABLA\", \"ordenes_compra\");\n\t\tif (nroOrdenCompra == null)\n\t\t\tnroOrdenCompra = \"-\";\n\n\t\t_nroOcTango2.setText(nroOrdenCompra);\n\n\t\t// oculta o muestra botones \"Agregar\", \"Eliminar\" y \"Cancelar\" en función\n\t\t// del estado de la OC\n\t\tboolean ifModificable = _dsOrdenesCompra.isModificable();\n\t\t_articulosAgregarBUT1.setVisible(ifModificable);\n\t\t_articulosEliminarBUT1.setVisible(ifModificable);\n\t\t_articulosCancelarBUT1.setVisible(ifModificable);\t\t\n\t\t\n\t\t// deshabilita los campos de entrada de datos segun el estado de la OC\n\t\t_nombre_completo_comprador2.setEnabled(ifModificable);\n\t\t_proveedor2.setEnabled(ifModificable);\n\t\t_fecha_estimada_entrega2.setEnabled(ifModificable);\n\t\t_lkpCondicionesCompra.setEnabled(ifModificable);\n\t\t_descuentoGlobal2.setEnabled(ifModificable);\n\t\t_buttonCopiaDescuento.setEnabled(ifModificable);\n\t\t_descuento2.setEnabled(ifModificable);\n\t\t_observaciones2.setEnabled(ifModificable);\n\t\t_cantidad_pedida2.setEnabled(ifModificable);\n\t\t_unidad_medida2.setEnabled(ifModificable);\n\t\t_monto_unitario1.setEnabled(ifModificable);\n\t\t\n\t\t\n\t\t// links para impresion\n\t\tboolean isEmitida = \"0008.0006\".equalsIgnoreCase(_dsOrdenesCompra.getOrdenesCompraEstado());\n\t\t_imprimirOrdenCompraBUT4.setVisible(isEmitida);\n\t\t_imprimirOrdenCompraBUT5.setVisible(isEmitida);\n\t}",
"public void llenadoDeTablas() {\n \n DefaultTableModel modelo1 = new DefaultTableModel();\n modelo1 = new DefaultTableModel();\n modelo1.addColumn(\"ID Usuario\");\n modelo1.addColumn(\"NOMBRE\");\n UsuarioDAO asignaciondao = new UsuarioDAO();\n List<Usuario> asignaciones = asignaciondao.select();\n TablaPerfiles.setModel(modelo1);\n String[] dato = new String[2];\n for (int i = 0; i < asignaciones.size(); i++) {\n dato[0] = (Integer.toString(asignaciones.get(i).getId_usuario()));\n dato[1] = asignaciones.get(i).getNombre_usuario();\n\n modelo1.addRow(dato);\n }\n }",
"public void colocarComentariosResultado()\r\n\t{\r\n\t\tresultadoprueba.colocarTextoComentarios(\"\");\r\n\t}",
"private void consultarAjustes() throws Exception {\n Connection conn = Menu.CONEXION.getConnection();\n String sqlSent\n = \"Select \"\n + \" a.movdocu,\"\n + \" c.movdesc, \"\n + \" b.descrip, \"\n + \" (a.movcoun * a.movcant) as costo, \"\n + \" c.movfech, \"\n + \" a.movtido \"\n + \"from inmovimd a \"\n + \"Inner join intiposdoc b on a.movtido = b.movtido \"\n + \"Inner join inmovime c on a.movdocu = c.movdocu and a.movtido = c.movtido \"\n + \"Where (a.movtido = 11 or (a.movtido IN(6,9,12,15,16) and a.movtimo = 'S')) \"\n + \"and c.movfech between ? and ?\";\n PreparedStatement ps;\n ResultSet rs;\n double total = 0.00;\n Ut.clearJTable(tblEntradas);\n Ut.clearJTable(tblSalidas);\n\n ps = conn.prepareStatement(sqlSent,\n ResultSet.TYPE_SCROLL_SENSITIVE,\n ResultSet.CONCUR_READ_ONLY);\n ps.setTimestamp(1, this.fechaIn);\n ps.setTimestamp(2, this.fechaFi);\n\n rs = CMD.select(ps);\n if (rs != null && rs.first()) {\n // Cargo las entradas\n int tableRows = tblEntradas.getModel().getRowCount();\n int row = 0;\n rs.beforeFirst();\n while (rs.next()) {\n if (rs.getInt(\"movtido\") != 11) {\n continue;\n } // end if\n if (tableRows >= row) {\n Ut.resizeTable(tblEntradas, 1, \"Filas\"); // Agrego una fila\n } // end if\n this.tblEntradas.setValueAt(Ut.dtoc(rs.getDate(\"movfech\")), row, 0);\n this.tblEntradas.setValueAt(rs.getString(\"movdocu\"), row, 1);\n this.tblEntradas.setValueAt(Ut.setDecimalFormat(rs.getDouble(\"costo\") + \"\", \"#,##0.00\"), row, 2);\n total += rs.getDouble(\"costo\");\n this.tblEntradas.setValueAt(rs.getString(\"descrip\"), row, 3);\n row++;\n } // end while\n this.txtEntradas.setText(Ut.setDecimalFormat(total + \"\", \"#,##0.00\"));\n\n // Cargo las salidas\n total = 0.0;\n tableRows = tblSalidas.getModel().getRowCount();\n row = 0;\n rs.beforeFirst();\n while (rs.next()) {\n if (rs.getInt(\"movtido\") == 11) {\n continue;\n } // end if\n if (tableRows >= row) {\n Ut.resizeTable(tblSalidas, 1, \"Filas\"); // Agrego una fila\n } // end if\n this.tblSalidas.setValueAt(Ut.dtoc(rs.getDate(\"movfech\")), row, 0);\n this.tblSalidas.setValueAt(rs.getString(\"movdocu\"), row, 1);\n this.tblSalidas.setValueAt(Ut.setDecimalFormat(rs.getDouble(\"costo\") + \"\", \"#,##0.00\"), row, 2);\n total += rs.getDouble(\"costo\");\n this.tblSalidas.setValueAt(rs.getString(\"descrip\"), row, 3);\n row++;\n } // end while\n } // end if\n ps.close();\n conn.close();\n this.txtSalidas.setText(Ut.setDecimalFormat(total + \"\", \"#,##0.00\"));\n }",
"public void selectCadastroAlfabetico(int codigo) throws SQLException{\r\n con = ConectaBd.getConnection();\r\n Statement stmt = con.createStatement();\r\n\r\n sqlselectCadastroAlfabetico = \"SELECT CD_REGISTRO,SITUACAO,NOME,TEL1,TEL2,PROFISSAO,SEXO,ESTADO_CIVIL,RG\"\r\n + \",CPF,DT_NASCIMENTO,NM_MAE,NM_PAI,NM_EMER,TEL_EMER,PARENTESCO,END_RUA,END_NUMERO\"\r\n + \",END_BAIRRO,END_CIDADE,END_ESTADO,END_CEP \"\r\n + \"FROM TB_ALUNOS WHERE SITUACAO = 1 AND CD_REGISTRO = \"+codigo+\" \"\r\n + \"ORDER BY 3 \";\r\n \r\n rs = stmt.executeQuery(sqlselectCadastroAlfabetico);\r\n //System.out.println(\"Logo quando recebe o sql no rs :\"+rs.getRow()); //teste\r\n \r\n //O rs começa com 0 mas o primeiro registro válido é o next que no caso é o 1. O 0 não retorna nada do sql\r\n while(rs.next()){ //while e if para que eu consiga manipular as linhas retornadas\r\n //System.out.println(\"Entrei no While :\"+rs.getRow()); //teste\r\n if(rs.getRow() == this.linha_atual_select){\r\n //if(rs.next()){ //if caso retorno somente 1 row\r\n //System.out.println(\"Primeira linha do rs.next numero :\"+rs.getRow()); //teste\r\n \r\n cadastro.setCd_registro(rs.getInt(\"CD_REGISTRO\"));\r\n cadastro.setSituacao(rs.getBoolean(\"SITUACAO\"));\r\n cadastro.setNome(rs.getString(\"NOME\"));\r\n cadastro.setTel1(rs.getString(\"TEL1\"));\r\n cadastro.setTel2(rs.getString(\"TEL2\"));\r\n cadastro.setProfissao(rs.getString(\"PROFISSAO\"));\r\n cadastro.setSexo(rs.getString(\"SEXO\"));\r\n cadastro.setEstado_civil(rs.getInt(\"ESTADO_CIVIL\"));\r\n cadastro.setRg(rs.getString(\"RG\"));\r\n cadastro.setCpf(rs.getString(\"CPF\"));\r\n cadastro.setDt_nascimento(rs.getString(\"DT_NASCIMENTO\"));\r\n cadastro.setNm_mae(rs.getString(\"NM_MAE\"));\r\n cadastro.setNm_pai(rs.getString(\"NM_PAI\"));\r\n cadastro.setNm_emer(rs.getString(\"NM_EMER\"));\r\n cadastro.setTel_emer(rs.getString(\"TEL_EMER\"));\r\n cadastro.setParentesco(rs.getInt(\"PARENTESCO\"));\r\n cadastro.setEnd_rua(rs.getString(\"END_RUA\"));\r\n cadastro.setEnd_numero(rs.getString(\"END_NUMERO\"));\r\n cadastro.setEnd_bairro(rs.getString(\"END_BAIRRO\"));\r\n cadastro.setEnd_cidade(rs.getString(\"END_CIDADE\"));\r\n cadastro.setEnd_estado(rs.getInt(\"END_ESTADO\"));\r\n cadastro.setEnd_cep(rs.getString(\"END_CEP\"));\r\n \r\n this.linha_atual_select = rs.getRow();\r\n \r\n //System.out.println(\"Linha atual do select :\"+rs.getRow());//teste\r\n } \r\n }\r\n }",
"public void actualizarProduto(String codigo, int prezo) throws SQLException{\n Connection conn = Conexion();\n try{\n Statement st = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);\n ResultSet rs = st.executeQuery(\"select produtos.* from produtos\");\n \n while(rs.next()){\n System.out.println(rs.getString(\"codigo\"));\n if (rs.getString(1).equals(codigo)) {\n rs.updateInt(\"precio\", prezo);\n rs.updateRow();\n }\n\n }\n System.out.println(\"Prezo do produto actaulizado\");\n } catch (SQLException ex) {\n Logger.getLogger(BaseRelacionalB.class.getName()).log(Level.SEVERE, null, ex);\n System.out.println(\"Erro no actualizado do produto\");\n\n }\n\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to test that a file is loaded corretly, so that a valid scanner object is returned | @Test
public void testFileConnection() {
Scanner scan = TextReader.loadStudentWishesFromFile("students.csv");
assertThat(scan, is(not(nullValue())));
scan = TextReader.loadStudentWishesFromFile("notfound.txt");
assertThat(scan, is(nullValue()));
} | [
"@Test\n public void testGetFileScanner() throws Exception {\n //get file scanner cannot be accurately tested as it is dependant on user input\n System.out.println(\"getFileScanner\");\n Scanner expResult = null;\n Scanner result = BTRouterPatch.getFileScanner();\n System.out.println(\"result = \" + result);\n assertEquals(expResult, result);\n }",
"private void loadFile() throws FileNotFoundException {\n\t\tif (path == null)\n\t\t\tthrow new FileNotFoundException(\"You have got me a null path.\");\n\t\ts = new Scanner(new File(path));\n\t}",
"@Test\n public void loadFileSuccessfulWithTypesInfoTest() {\n loadFileSuccessfulTest(true);\n }",
"private void init( String filePath )\r\n \t{\r\n \t\t// Initialize the file\r\n \t\tif( this.inputFile == null )\r\n \t\t\tthis.inputFile = new File( filePath );\r\n \t\t\r\n \t\t// Create a scanner to easily check file contents\r\n \t\ttry \r\n \t\t{\r\n \t\t\tthis.scanner = new Scanner( inputFile );\r\n \t\t} \r\n \t\tcatch (FileNotFoundException e) \r\n \t\t{\r\n \t\t\tSystem.out.println( \"ParserError-init: Scanner couldn't find file!\" );\r\n \t\t\te.printStackTrace();\r\n \t\t\tSystem.exit( 1 );\r\n \t\t}\r\n \t}",
"@Test\r\n public void testReadFile() {\r\n System.out.println(\"readFile and updateFile\");\r\n InparseManager instance = ((InparseManager) new ParserGenerator().getNewApplicationInparser());\r\n \r\n try {\r\n File file = File.createTempFile(\"TempInpFile\", null);\r\n instance.setlocalPath(file.getAbsolutePath());\r\n } catch (IOException ex) {\r\n Logger.getLogger(ApplicationInparserTest.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n instance.updateFile();\r\n instance.readFile();\r\n instance.parse();\r\n boolean assemblersFound = !((Applications)(((InparseManager)instance).getParseResults())).getAssemblers().isEmpty();\r\n assertEquals(true,assemblersFound);\r\n }",
"public abstract boolean loadThisFile(File file);",
"@Test\n public void loadFileUnSuccessfulWithTypesInfoTest() {\n loadFileUnSuccessfulTest(true);\n }",
"@Test\n public void loadFileSuccessfulWithNoTypesInfoTest() {\n loadFileSuccessfulTest(false);\n }",
"private void validateReflexMapFile(String mapToCheck) throws FileNotFoundException\n {\n //Initialize the map scanner\n reflexValidator = new Scanner(new File(mapToCheck));\n\n if (reflexValidator.next().contains(\"reflex\"))\n {\n reflexValidated = true;\n System.out.println(\"\\nThis is a valid Reflex Arena map file\");\n }\n\n else\n {\n System.out.println(\"\\nThis is not a Reflex Arena map file\");\n }\n }",
"public void testLoad() throws Exception {\r\n System.out.println(\"load\");\r\n File _file = null;\r\n String _host = \"\";\r\n //FileLoader.load(_file, _host);\r\n\r\n \r\n }",
"@Test\n public void loadFileUnSuccessfulWithNoTypesInfoTest() {\n loadFileUnSuccessfulTest(false);\n }",
"public void testLoadFile() throws Exception\n {\n // Do not run this test if mattes are not supported on this platform.\n if (!soundSupported) return;\n\n // Try invalid data\n CannedCallerContext cc = new CannedCallerContext();\n final Exception[] exc = new Exception[1];\n cc.runInContextSync(new Runnable()\n {\n public void run()\n {\n\n // Try invalid data\n hsound = new HSound();\n try\n {\n\n try\n {\n hsound.load((String) null);\n fail(\"Expected an exception\");\n }\n catch (IllegalArgumentException expected)\n {\n }\n catch (IOException expected)\n {\n }\n catch (NullPointerException expected)\n {\n }\n\n try\n {\n hsound.load(\"unfound.data\");\n fail(\"Expected an IOException for unfound data\");\n }\n catch (IOException expected)\n {\n }\n\n hsound.load(TestSupport.getBaseDirectory() + \"/mpeenv.ini\");\n // this should fail silently if data is not a valid sound\n\n // Load a sound and start it looping\n startPlayback();\n delay(3000);\n // Load another sound, should stop previous sound\n\n hsound.load(TestSupport.getBaseDirectory() + \"/mpeenv.ini\");\n assertQuestions(\"testLoad: ->Should stop previously played sound\", new String[] {\n \"Did the sound play for a period?\", \"Did the sound stop playing?\" });\n // Play new sound\n checkPlay(\"a single cymbal\");\n }\n catch (Exception excCaught)\n {\n exc[0] = excCaught;\n }\n }\n });\n\n if (exc[0] != null)\n {\n throw exc[0];\n }\n }",
"public static void validateInput()\n {\n while(true)\n {\n try\n {\n inputPath = inputChooser.getSelectedFile().getAbsolutePath();\n break;\n }\n catch(NullPointerException e)\n {\n JOptionPane.showMessageDialog(null, \"No file chosen. Select a valid input file\");\n // goes back to choosing file. every time, input file changes before checking if a file was chosen\n inputChooser = chooseFile(inputChooser, \"input\");\n continue;\n }\n }\n \n inputPath = inputChooser.getSelectedFile().getAbsolutePath();\n inputFile = new File(inputPath); \n \n // makes you choose a new file while file not found\n while(true)\n {\n try\n {\n reader = new Scanner(new FileReader(inputFile));\n break;\n }\n catch(FileNotFoundException e)\n {\n JOptionPane.showMessageDialog(null, \"File not found. Select a valid input file\");\n // goes back to choosing file. every time, input file changes before checking if it is a file\n inputChooser = chooseFile(inputChooser, \"input\");\n continue;\n }\n }\n\n }",
"@Test\n void testReaderNonExistentFile() {\n JsonReader in = new JsonReader(\"./data/noSuchFile.json\");\n try {\n book = in.read();\n fail(\"File doesn't exist so the read method should fail.\");\n } catch (IOException e) {\n // expected\n }\n }",
"@Test\n void test_invalid_file() {\n JsonElement contents = null;\n try {\n contents = JsonImporter.load(\"WeatherTestFile.json\");\n fail(\"Exception not thrown on missing file\");\n } catch (FileNotFoundException e) {\n assertNull(contents);\n }\n }",
"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}",
"public HammerTest loadTest(File file) throws IOException {\n if (!file.isFile()) {\n HammerLog.error(\"ERROR: Not a file.\");\n return null;\n }\n\n HammerTest test;\n\n String name = null;\n TestType type = TestType.EF;\n String code;\n String sourceFile = null;\n ArrayList<String> IOs = new ArrayList<>();\n\n FileReader fr = new FileReader(file);\n BufferedReader br = new BufferedReader(fr);\n\n Pattern title = Pattern.compile(\"\\\\[(.*)\\\\]\");\n String sectionName = \"\";\n StringBuilder builder = new StringBuilder();\n\n boolean cantFindSource = false;\n\n for (String line = br.readLine();\n line != null;\n line = br.readLine()) {\n\n Matcher matcher = title.matcher(line);\n if (matcher.find()) {\n // Found section title\n sectionName = matcher.group(1);\n continue;\n }\n\n switch (sectionName) {\n case \"Source\":\n sourceFile = line;\n sectionName = \"\";\n break;\n\n case \"Code\":\n builder.append(line);\n builder.append(\"\\n\");\n break;\n\n case \"Test\":\n IOs.add(line);\n break;\n\n case \"Name\":\n name = line;\n HammerLog.debug(\"Test name: \" + name);\n sectionName = \"\";\n break;\n\n case \"Type\":\n switch (line) {\n case \"Earfuck\":\n type = TestType.EF;\n break;\n case \"EAR\":\n type = TestType.EAR;\n break;\n case \"LOBE\":\n type = TestType.LOBE;\n break;\n }\n sectionName = \"\";\n }\n }\n\n br.close();\n\n if (sourceFile != null) {\n HammerLog.debug(\"Found source file: \" + sourceFile);\n sourceFile = file.getParent() + File.separator + sourceFile;\n HammerLog.debug(\"Loading source file: \" + sourceFile);\n try {\n fr = new FileReader(sourceFile);\n br = new BufferedReader(fr);\n builder = new StringBuilder();\n for (String line = br.readLine();\n line != null;\n line = br.readLine()) {\n builder.append(line);\n builder.append(\"\\n\");\n }\n code = builder.toString();\n br.close();\n }\n catch (FileNotFoundException e) {\n cantFindSource = true;\n code = \"\";\n }\n } else {\n code = builder.toString();\n }\n\n HammerLog.log(\"Test code: \" + code, HammerLog.LogLevel.DEV);\n\n test = new HammerTest(name, type, code);\n\n if (cantFindSource) {\n test.setupFailed = true;\n test.failureMessage = \"Could not locate source file: \" + sourceFile;\n }\n\n for (String IO : IOs) {\n String[] split = IO.split(\"\\\\s+\");\n if (split.length >= 2) {\n if (split[0].equals(\"//\")) {\n // Comment\n continue;\n }\n int value = Integer.parseInt(split[1]);\n switch (split[0]) {\n case \">\":\n test.giveInput(value);\n break;\n case \"<\":\n test.expectOutput(value);\n break;\n }\n }\n else if (split.length >= 1) {\n switch (split[0]) {\n case \"=\":\n test.reset();\n break;\n }\n }\n }\n\n return test;\n }",
"private static Scanner prepareFileScanner(final String filePath) {\n try {\n return new Scanner(new File(filePath), StandardCharsets.UTF_8.toString());\n } catch (FileNotFoundException e) {\n throw new IllegalArgumentException(\"first command line argument has to be valid path to valid and openable file\", e);\n }\n }",
"public void readInput()\r\n {\r\n try {\r\n Scanner reader = new Scanner(new File(input));\r\n String line;\r\n \r\n while (reader.hasNextLine()){ //will only run so long as there is a line in the file\r\n line = reader.nextLine(); \r\n checkInput(line.trim());\r\n } \r\n } catch(FileNotFoundException e) {\r\n System.out.println(\"File was not found!\");\r\n }\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets jpmProductSaleNew's information based on primary key. An ObjectRetrievalFailureException Runtime Exception is thrown if nothing is found. | public JpmProductSaleNew getJpmProductSaleNew(final Long uniNo); | [
"Product getProductDetails(int idproduct) throws DataBaseException;",
"Product getProduct(String identifier) throws ProductNotFoundException;",
"public Product loadProductFromId(int productId) {\n ResultSet rs = database.getProduct(productId);\n Product newProduct = null;\n\n try {\n if (rs.next()) {\n newProduct = new Product(rs.getString(\"name\"), rs.getString(\"description\"), rs.getString(\"type\"), new Money(rs.getString(\"price\")), productId, rs.getBoolean(\"currentlyselling\"));\n } else {\n throw new NoSuchProductException(productId);\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n if (newProduct == null) {\n throw new NoSuchProductException(productId);\n }\n return newProduct;\n }",
"Product getProduct(long id);",
"public NewProduct getNewProductById(int id) {\n String sql = \"SELECT id, user_id, description, date, time_of_day, mealtime, quantity FROM unverified_product_entry WHERE id = ?\";\n NewProduct newProduct = jdbcTemplate.queryForObject(sql, rowMapper, id);\n return newProduct;\n }",
"NewsItem obtainNewsItemById(long id) throws ObjectRetrievalFailureException;",
"public SgfensPedidoProducto findByPrimaryKey(SgfensPedidoProductoPk pk) throws SgfensPedidoProductoDaoException;",
"List<Purchase> retrieveForProductID(Long productID) throws SQLException, DAOException;",
"TraProduct selectByPrimaryKey(String productid);",
"public Product load(ProductPK pk) throws DaoException;",
"public List getJpmProductSaleNews(JpmProductSaleNew jpmProductSaleNew);",
"public ProductDetails getProductDetails(Long productId) {\n\t\t// TODO Auto-generated method stub\t\t\n\t\t//do http get call\n ResponseEntity<String> productDetails = doRestTemplateCall(ConstantsUtil.BASE_URL+productId+ConstantsUtil.URL_ENDPOINT);\n ProductDetails pdtDetailsResponse = new ProductDetails();\n //To handle redirect from http to https\n HttpHeaders httpHeaders = productDetails.getHeaders();\n HttpStatus statusCode = productDetails.getStatusCode();\n if (statusCode.equals(HttpStatus.MOVED_PERMANENTLY) || statusCode.equals(HttpStatus.FOUND) || statusCode.equals(HttpStatus.SEE_OTHER)) {\n if (httpHeaders.getLocation() != null) {\n \tproductDetails = doRestTemplateCall(httpHeaders.getLocation().toString());\n } else {\n throw new RuntimeException();\n }\n }\n if(null!= productDetails) { //to check if productdetail response is received \n log.info(\"product details found:\"+productDetails.getBody());\n \n JsonNode node;\n ObjectMapper objectMapper = new ObjectMapper();\n try {\n\t\t\tnode = objectMapper.readValue(productDetails.getBody(), JsonNode.class);\n\t\t\tif(!myRetailAppDao.isProductDetailsPresent(productId))\t //check if product data is present in MongoDB\n\t\t\t\tmyRetailAppDao.saveToMongoDB(productDetails.getBody()); // if not, save product data to MongoDB\n\t\t\telse\n\t\t\t\tlog.info(\"Data for prductId \"+productId+\" is already present in DB, skipping insert\");\n\t\t\tJsonNode title = null;\n\t\t\t//get product title from the nested json\n\t\t\ttitle = node.get(ConstantsUtil.PRODUCT).get(ConstantsUtil.ITEM).get(ConstantsUtil.PDT_DESC).get(ConstantsUtil.TITLE);\n\t\t\tlog.info(\"title:\"+title.asText());\n\t\t\t//set the product details response\n\t\t\tpdtDetailsResponse.setName(title.asText());\n\t\t\tpdtDetailsResponse.setId(productId);\n\t\t\tCurrentPrice currentPrice = new CurrentPrice();\n\t\t\tPriceAndCurrency priceAndCurr = myRetailAppDao.getPriceAndCurrency(productId); //get price and currency details\n\t\t\tcurrentPrice.setCurrency_code(CurrencyMap.getCurrencyCode(priceAndCurr.getCurrency()));\n\t\t\tcurrentPrice.setValue(priceAndCurr.getPrice()); \n\t\t\tpdtDetailsResponse.setCurrentPrice(currentPrice);\n\t\t\t\n\t\t\tlog.info(\"pdtDetailsResponse:\"+pdtDetailsResponse.toString());\n\t\t} catch (IOException e) {\n\t\t\tlog.error(\"Error while calling external api for title\",e);\n\t\t}\n }\n \n \treturn pdtDetailsResponse;\n\t}",
"public void retrieveProductFromDatabase(){\r\n // retrieve product from the database here\r\n System.out.println(\"Product Retrieved using ID --> \" + this.productId);\r\n \r\n }",
"public Product getProductByID(int id);",
"Product getProductById(Long id);",
"SugoGoodsProduct selectByPrimaryKey(Integer id);",
"public abstract Object getObject(Class classObj, long Id) throws SaplDaoException;",
"public ProductBO getProductDetails(Long productId) throws Exception { \n\t\tPriceDO priceDO = priceRepository.getProductPrice(productId);\n\t\tProductSO productSO = productService.getProductDetails(productId);\n\t\treturn populateProductBO(priceDO,productSO);\n\t}",
"Product getProductById(Integer productId);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method calculates the total possible revenue of the bundle based on the price of the book, quantity of books, and cost of the bundle | public double getTotalRevenue(){
double totalRevenue = this.book.getPrice()*this.quantity;
DecimalFormat df = new DecimalFormat("#.##");
totalRevenue = Double.parseDouble(df.format(totalRevenue));
return totalRevenue;
} | [
"private void calculateTotalRevenue(){\n for(WorkRequest wr: organization.getWorkQueue().getWorkRequestList()){\n totalrevenue += wr.getProduct().getSellingPrice();\n }\n \n totalRevenueFromRecycledProducts = totalrevenue;\n lblsellRecycleprd.setText(String.valueOf(totalrevenue));\n \n for(Organization o : enterprise.getOrganizationDirectory().getOrganizationList()){\n if(o instanceof UserOrganization){\n //buying products from user\n for(WorkRequest wr: o.getWorkQueue().getWorkRequestList()){\n totalrevenue -= wr.getProduct().getSellingPrice();\n }\n //selling used products to user\n for(UserAccount ua : o.getUserAccountDirectory().getUserAccountList()){\n for(OrderItem oi :ua.getOrderList().getOrderItemList()){\n totalrevenue += oi.getProduct().getSellingPrice();\n totalProductSold++;\n }\n }\n }\n }\n \n lblProductSold.setText(String.valueOf(totalProductSold));\n lblTotalRevenue.setText(String.valueOf(totalrevenue));\n }",
"public static void calculatePrice(){\n double basePrice = 3.00;\n double pricePerIngredient = 0.50;\n double pricePerBurrito = basePrice + pricePerIngredient * ingredientsPerBurrito;\n double totalOrderPrice = pricePerBurrito * numberOfBurrito;\n System.out.println();\n System.out.printf(\"The price per burrito is $ %.2f%n\", pricePerBurrito);\n System.out.printf(\"The total price for your entire order is $ %.2f%n\", totalOrderPrice);\n }",
"private double getRevenueForProduct(List<Transaction> transactions) {\n double revenueGenerated = 0;\n\n for(Transaction transaction : transactions) {\n revenueGenerated += transaction.getValue();\n }\n\n return revenueGenerated;\n }",
"private static double calculateRevenueForTheMonth(int price, int[] startDate, int[] endDate, int[] dateInput) {\n\tint numberOfDays;\n\t// Compute the number of days that must be paid depending on the start date, the\n\t// end date and the input date.\n\tif (endDate[0] == startDate[0] && endDate[1] == startDate[1]) {\n\t numberOfDays = endDate[2] - startDate[2] + 1;\n\t} else if (startDate[0] == dateInput[0] && startDate[1] == dateInput[1]) {\n\t numberOfDays = dateInput[2] - startDate[2] + 1;\n\t} else if (endDate[0] == dateInput[0] && endDate[1] == dateInput[1]) {\n\t numberOfDays = endDate[2];\n\t} else {\n\t numberOfDays = dateInput[2];\n\t}\n\t// General formula that compute the price depending on the number of days that\n\t// must be paid, the price of the rent for the month\n\t// and the number of days in the month. price/dateInput[2] represent the price\n\t// for one day.\n\treturn (double) numberOfDays * price / dateInput[2];\n }",
"public double revenue() {\r\n double revenue = 0;\r\n for (Sale getSIOD : getSaleInOneDay()) {\r\n revenue = revenue + getSIOD.getPrice() * getSIOD.getQuantity();\r\n }\r\n oneDayRevenue.put(date, revenue);\r\n return revenue;\r\n }",
"float getRevenue();",
"public void calculateCost()\r\n\t{\r\n\t\tReceiptItem currItem = firstItem;\r\n\r\n\t\t// while the we are not at the end of the list\r\n\t\twhile (currItem != null)\r\n\t\t{\r\n\t\t\t// add each items taxes to the total tax amount\r\n\t\t\tsalesTaxes += currItem.getItemTaxes();\r\n\r\n\t\t\t// add each items total cost to the total cost amount\r\n\t\t\ttotal += currItem.getTotalItemCost();\r\n\r\n\t\t\t// get the next item\r\n\t\t\tcurrItem = currItem.getNextItem();\r\n\t\t}\r\n\t}",
"public double calculateSetSubTotal(int books) {\n double result = 0.00;\n\n if (books == 5) {\n result = 5 * 8 * .75;\n } else if (books == 4) {\n result = 4 * 8 * .8;\n } else if (books == 3) {\n result = 3 * 8 * .9;\n } else if (books == 2) {\n result = 2 * 8 * .95;\n } else if (books == 1) {\n result = 1 * 8;\n }\n return result;\n }",
"public double calPriceListReferenceBook(ReferenceBook[] listRB, int numOfReBook) {\n double totalPrice = 0;\n\n for (int i = 0; i < numOfReBook; i++) {\n totalPrice += listRB[i].calPriceReferenceBook();\n }\n return totalPrice;\n }",
"@Override\n public USMoney calculatePrice() {\n USMoney sumPrice = new USMoney();\n for (int i = 0; i < curArrayIndex; i++) {\n sumPrice = sumPrice.add(items[i].getPrice());\n if (items[i].isFragile()) {\n sumPrice.addTo(10, 0);\n }\n }\n sumPrice.addTo(100, 0);\n return sumPrice;\n }",
"public double calculateTotal(Map<Integer, Integer> order) {\n // final cost\n double cost = 0.00;\n // number of subsets\n int subsets = numberOfSubsets(order);\n // try using a map to store it instead, key is subset, value is how many books in that set\n Map<Integer, Integer> subsetCounts = new HashMap<>();\n\n // create the map with the subset book counts\n for (int i = 0; i < subsets; i++) {\n int subsetCount = 0;\n //go through each key-value pair in the order and add/subtract to subsetCounts/order to make subtotals\n for (int j = 0; j < order.size(); j++) {\n if (order.get(j) > 0) {\n // if there's more than 1 copy of that book in their order, add 1 to the currentSet\n subsetCount++;\n // put new count value (minus 1 that we just took out) back into the map\n int newBookCount = order.get(j) - 1;\n order.put(j, newBookCount);\n }\n }\n // add subset number and count to map\n subsetCounts.put(i, subsetCount);\n }\n\n\n // pass map to method to get back extra discounts for 5/3 to 4/4 sets\n cost -= checkForExtraDiscounts(subsetCounts);\n\n // add all subtotals to total\n for (Map.Entry<Integer, Integer> entry : subsetCounts.entrySet()) {\n cost += calculateSetSubTotal(entry.getValue());\n }\n\n return cost;\n }",
"public void calcEarningsPerStock() {\n\t\tthis.earningsPerStock = (this.income * Company.BILLION_MODIFIER) / this.volume;\n\t}",
"public double calculatetotalStockPurchaseCost(){\n double cost = 0;\n for(StockPurchase onePurchase:purchaseList){\n\n cost = cost + onePurchase.getTotalCost();\n }\n return cost;\n }",
"public double getRevenueForApp() {\n\t\t//Total revenue : (total downloads * price of app) – 30% cut imposed \n\t\tdouble revenue = getTotalDownloads()*getPrice();\n\t\tdouble totalRevenue = 0.7*revenue;\n\t\treturn totalRevenue;\n\t}",
"private void calculateEarnings()\n {\n // get user input\n int items = Integer.parseInt( itemsSoldJTextField.getText() );\n double price = Double.parseDouble( priceJTextField.getText() );\n Integer integerObject = \n ( Integer ) commissionJSpinner.getValue();\n int commissionRate = integerObject.intValue();\n \n // calculate total sales and earnings\n double sales = items * price;\n double earnings = ( sales * commissionRate ) / 100;\n \n // display the results\n DecimalFormat dollars = new DecimalFormat( \"$0.00\" );\n grossSalesJTextField.setText( dollars.format( sales ) );\n earningsJTextField.setText( dollars.format( earnings ) );\n\n }",
"private String getBillPrice() {\n double cost = 0.00;\n\n for (MenuItem item : bill.getItems()) {\n cost += (item.getPrice() * item.getQuantity());\n cost += item.getExtraIngredientPrice();\n cost -= item.getRemovedIngredientsPrice();\n }\n\n return String.format(\"%.2f\", cost);\n }",
"public double calculatePrice(){\n double sum = 0;\n for (Ingredient i: ingredients) {\n sum += (i.getPrice()*i.getAmount());\n }\n return sum;\n }",
"private Double calculate(Map<Integer, Integer> groupedBooks) {\r\n // map size -> number of different books\r\n Double discount = DISCOUNTS.get(groupedBooks.size());\r\n Double price = ZERO;\r\n \r\n Iterator<Integer> it = groupedBooks.keySet().iterator();\r\n\r\n while (it.hasNext()) {\r\n Integer k = it.next();\r\n if (groupedBooks.get(k) == 1) {\r\n \tit.remove(); // remove the book when the map has only one\r\n } else {\r\n groupedBooks.put(k, groupedBooks.get(k) - 1); // Or subtract one to the counter of this book\r\n }\r\n price += ONE_BOOK;\r\n }\r\n\r\n price *= discount;\r\n\r\n return price;\r\n }",
"public void calculateCost() {\n \tdouble costToShipPack;\n \tint numOfPacks = 1;\n \t\n \tfor(Package p: this.packages) {\n \t\tcostToShipPack = 3 + (p.calcVolume() - 1);\n \t\tthis.totalAmounts.put(\"Package \"+numOfPacks, costToShipPack);\n \t\tnumOfPacks++;\n \t}\n \t\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is implemented from the oAW PostProcessor interface. It is called after the file is closed. Does nothing. | public void afterClose(FileHandle file) {
/* PROTECTED REGION ID(java.implementation._Wcbk4A_0EeKuTrE1zpGjjg) ENABLED START */
// do nothing ...
/* PROTECTED REGION END */
} | [
"@Override\r\n public void finalize()\r\n {\r\n \tthis.savetofile();\r\n \ttry\r\n \t{super.finalize();}\r\n \tcatch(Throwable e)\r\n \t{e.printStackTrace();}\r\n }",
"public void endFlatFile() {\n }",
"void fileEnd();",
"public void finalize() {\r\n fileName = null;\r\n fileDir = null;\r\n fileHeader = null;\r\n\r\n fileInfo = null;\r\n image = null;\r\n vr = null;\r\n\r\n if (rawFile != null) {\r\n\r\n try {\r\n rawFile.close();\r\n } catch (final IOException ex) {\r\n // closing.. ignore errors\r\n }\r\n\r\n rawFile.finalize();\r\n }\r\n\r\n if (raFile != null) {\r\n\r\n try {\r\n raFile.close();\r\n } catch (final IOException ex) {\r\n // closing.. ignore errors\r\n }\r\n\r\n raFile = null;\r\n }\r\n\r\n rawFile = null;\r\n nameSQ = null;\r\n jpegData = null;\r\n\r\n try {\r\n super.finalize();\r\n } catch (final Throwable er) {\r\n // ignore errors during memory cleanup..\r\n }\r\n }",
"@Override\n public void close() throws IOException {\n flush();\n // For debugging...\n // if (numberOfThrottleBacks > 0) {\n // System.err.println(\"In BlockCompressedOutputStream, had to throttle back \" +\n // numberOfThrottleBacks +\n // \" times for file \" + codec.getOutputFileName());\n // }\n codec.writeBytes(BGZFStreamConstants.EMPTY_GZIP_BLOCK);\n codec.close();\n // Can't re-open something that is not a regular file, e.g. a named pipe or an output stream\n if (this.file == null || !this.file.isFile()) return;\n if (BGZFInputStream.checkTermination(this.file) != BGZFInputStream.FileTermination.HAS_TERMINATOR_BLOCK) {\n throw new IOException(\"Terminator block not found after closing BGZF file \" + this.file);\n }\n }",
"public void close() {\n\tif (cgFile != null) {\n\t try {\n\t\tif (fileUpdate) {\n\t\t writeFileDirectory() ;\n\t\t writeFileHeader() ;\n\t\t}\n\t\tcgFile.close() ;\n\t }\n\t catch (IOException e) {\n\t\t// Don't propagate this exception.\n\t\tSystem.out.println(\"\\nException: \" + e.getMessage()) ;\n\t\tSystem.out.println(\"failed to close \" + fileName) ;\n\t }\n\t}\n\tcgFile = null ;\n\tcgBuffer = null ;\n\tdirectory = null ;\n\tobjectSizes = null ;\n }",
"public void finish() {\n logCurrentState();\n\n //close log file\n try {\n file.flush();\n file.close();\n } catch (IOException e) {\n throw Util.unexpected(e);\n }\n }",
"public void finalize()\n\t{\n\t\tif (!isClosed) {\n\t\t\t// System.out.println(\"SimWriter: finalize() - writing closing bracket to file...\");\n\t\t\twList.writeToFile(\"\\n ]\", 0);\n\t\t\tisClosed = true;\n\t\t}\n\t\t//System.out.println(\"SimWriter: finalize() done\");\n\t}",
"public void close(){\r\n\t\tif (this.fileWriter != null){\r\n\t\t\ttry {\r\n\t\t\t\tthis.fileWriter.flush();\r\n\t\t\t\tthis.fileWriter.close();\r\n\t\t\t\tthis.fileWriter = null;\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tlogger.error(\"Cannot close the file handle \"+this.myfilename+\". Your results might be lost. Cause: \"+e.getMessage());\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\r\n\t\t}\r\n\t}",
"void nextFile()\n {\n currentFileName = null;\n close();\n }",
"@Override\n public void close() throws IOException {\n System.out.println(\"FlightPathLogger closing file..\");\n System.out.println(\"Written \" + (this.lineNbr - 1) + \" lines!\");\n this.file.close();\n }",
"protected void fileClosed(){\n notifyFileClosed();\n }",
"protected void closeFile() {\n \t\tif (outFile != null) {\n \t\t\tif (writer != null) {\n \t\t\t\ttry {\n \t\t\t\t\twriter.close();\n \t\t\t\t} catch (IOException e) {\n \t\t\t\t\t// we cannot log here; just print the stacktrace.\n \t\t\t\t\te.printStackTrace();\n \t\t\t\t}\n \t\t\t\twriter = null;\n \t\t\t}\n \t\t}\n \t}",
"private void saveFile() throws IOException {\n\t\tthis.fs.close();\n\t\tthis.acknowledge();\n\t\tthis.logger.debug(\"Finished closing file\");\n\t}",
"private void closeFile(){\t\r\n\t\ttry {\r\n\t\t\tthis.out.flush();\r\n\t\t\tthis.out.close();\r\n\t\t\tthis.fw.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"Unable to close file\");\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\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}",
"@Override\r\n\tpublic void close() throws Exception {\r\n\t\t//emptying buffer\r\n\t\tb = null;\r\n\t\t\r\n\t\t//closing FileInputStream\r\n\t\ts.close();\r\n\t}",
"public void close() {\r\n\t\tif (testfile != null) {\r\n\t\t\tFileOutputStream out = null;\r\n\t\t\ttry {\r\n\t\t\t\tout = new FileOutputStream(testfile);\r\n\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tbase.write(out);\r\n\t\t} else {\r\n\t\t\tByteArrayOutputStream originalOutputStream = new ByteArrayOutputStream();\r\n\t\t\tbase.write(originalOutputStream);\r\n\t\t\tbyte[] byteArray = originalOutputStream.toByteArray();\r\n\t\t\tInputStream originalInputStream = new ByteArrayInputStream(byteArray);\r\n\t\t\ttry {\r\n\t\t\t\tfile.setContents(originalInputStream, IResource.FORCE, null);\r\n\t\t\t} catch (CoreException e) {\r\n\t\t\t\tActivator.log(\"Unable to save the \" + ontologyType.name().toLowerCase() + \" ontology file\", e);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"public void specialFileClosed()\n {\n this.specialFileIsOpen=false;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
prompts to enter an address | private static void promptAddress() {
System.out.print("Please enter an address: ");
} | [
"private void getSetUserAddress()\n\t{\n\t\tSystem.out.print(\"7. Please enter your address in the form: House#, Street, City, State.: \");\n\t\tuser.setAddress(scanObj.nextLine());\n\t}",
"private void setConfirmAddress(){\n if (sendAddressTask != null) {\n return;\n }\n\n boolean cancel = false;\n View focusView = null;\n // Reset errors.\n\n inputAddress.setError(null);\n\n vAddress = inputAddress.getText().toString();\n\n // check code input if empty\n if (TextUtils.isEmpty(vAddress)) {\n inputAddress.setError(getString(R.string.required_field_text));\n focusView = inputAddress;\n cancel = true;\n }\n // check code input for invalid xters\n else if (!StringHandler.isValidTextInput(vAddress)) {\n inputAddress.setError(getString(R.string.error_invalid_input_xters));\n focusView = inputAddress;\n cancel = true;\n }\n\n // if and error occurs, set focus on field\n if (cancel) {\n focusView.requestFocus();\n }\n // if no errors, proceed with sending code to server for verification\n else {\n sendAddressTask = new SendAddressTask(vAddress);\n sendAddressTask.execute();\n }\n\n }",
"private void promptHostName() {\n this.host = (InetAddress) IO.promptInput(\n \"Please provide the host address (localhost): \",\n new HostValidator()\n );\n }",
"java.lang.String getAddressconfirm();",
"public void enterAddress() throws IOException {\n\t\tLoginSignupCompanyPage sp = new LoginSignupCompanyPage(driver);\n\t\tlog.info(\"Verifying the Address is available or not\");\n\t\tAssert.assertTrue(enterAddress.isDisplayed());\n\n\t\tenterAddress.sendKeys(BasePage.getCellData(xlsxName, sheetName, 14, 0));\n\n\t}",
"String promptManualLocationInput();",
"public String inputIPAddress() {\n Scanner in = new Scanner(System.in);\n\n String message = \"Enter IP address you want to connect to: \";\n System.out.print(message);\n\n String address = in.nextLine();\n\n if (address.isEmpty()) {\n System.out.println(\"Empty IP address. Using localhost (127.0.0.1)\");\n address = \"127.0.0.1\";\n }\n\n return address;\n }",
"public static void searchAndPrintCustomerByAddressMenu() {\r\n Scanner in = new Scanner(System.in);\r\n String input;\r\n for (; ; ) {\r\n System.out.print(\r\n \"Enter the address of the registered customer you want to print\\n\"\r\n + \"To cancel, press \\\"enter\\\": \");\r\n input = in.nextLine();\r\n if (input.equals(\" \")) {\r\n System.out.println(\"Process cancelled. Returning to previous menu...\");\r\n return;\r\n }\r\n searchAndPrintRegisteredCustomerByAddress(input);\r\n break;\r\n }\r\n }",
"Address getSelectedAddress();",
"private String getServerAddress() \n {\n return JOptionPane.showInputDialog(\n frame, //frame\n \"Enter IP Address of the Server:\", //Question\n \"Welcome to the Chatter\", //box(frame)'s title on top\n JOptionPane.QUESTION_MESSAGE); //put '?' on message\n }",
"public void AddressMenu() {\n\t\t\t\n\t\taddressMenu();\n\t\t\n\t\tScanner keyboard = new Scanner( System.in );\n\t\tString input = keyboard.nextLine().toLowerCase();\n\t\t\n\t\twhile(input != \"0\"){\n\t\t\t\n\t\t\t switch(input){\n\t case \"0\" : System.out.println(\"You close the App\"); \n\t \t\t\tSystem.exit(0);\n\t break;\n\t \n\t case \"c\": \n\t \n\t break;\n\t \n\t case \"r\" : \n\n\t \t\n\t \tbreak;\n\t case \"u\" : \n\t \t\n\t \tbreak;\n\t \n\t case \"d\" : \n\t \t try {\n\t\t\t\t\t\tnew IdentityJDBCDAO().delete(new Identity());\n\t\t\t\t\t} catch (IdentityDeleteException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\n\t\t\t\t\t}\n\t \tbreak;\n\t \t\n\t case \"3\" : mainMenuOption();\n\t \tbreak;\n\t \n\t default :\tSystem.out.println(\"Invalid selection\"); \n\t \t\t\tmainMenuOption();\n\t break;\t\n\t\t\t }\n\t\t break;\n\t\t}\n\t}",
"public static Apt promptForApt(){\n String streetAddress, aptNumber, zip, city;\n double price, squareFootage;\n streetAddress = promptStreetAddress();\n aptNumber = promptAptNumber();\n zip = promptZip();\n city = promptCity();\n price = promptPrice();\n squareFootage = promptSquareFootage();\n return new Apt(streetAddress, aptNumber, zip, city, price, squareFootage);\n }",
"@Step(\"Enter the shipping Address details in checkout page\")\r\n\tpublic void enterAddress(String addressType) {\r\n\t\tString address[] = testData.addressDataReader(addressType);\r\n\t\tString firstName = address[0];\r\n\t\tString street = address[1];\r\n\t\tString city = address[2];\r\n\t\tString state = address[3];\r\n\t\tString zip = address[4];\r\n\t\tString phoneNumber = address[5];\r\n\t\tgetElement(driver, addressFirstName, 15).sendKeys(firstName);\r\n\t\tgetElement(driver, addressStreet, 5).sendKeys(street);\r\n\t\tgetElement(driver, addressCity, 5).sendKeys(city);\r\n\t\tgetElement(driver, addressState, 5).sendKeys(state);\r\n\t\tgetElement(driver, addressZIP, 5).sendKeys(zip);\r\n\t\tscrollAndSearchElement(driver, addressPhoneNumber, 10, Direction.UP, 1).sendKeys(phoneNumber);\r\n\t\tscrollAndSearchElement(driver, continueBtn, 10, Direction.UP, 5).click();\r\n\t}",
"public void accept()\r\n{\n\r\nAddress.accept();// example of utilisation relationship\r\n//System.out.println(\"enter the dob\");\r\n//dob=input.next();\r\n//System.out.println(\"enter the gender\");\r\n//gender=input.next();\r\n}",
"private void checkForServerAddress() {\n final SharedPreferences settings = getSharedPreferences(ApplicationConstants.MIFOS_APPLICATION_PREFERENCES, MODE_PRIVATE);\n if (!settings.contains(ApplicationConstants.MIFOS_SERVER_ADDRESS_KEY)) {\n mUIUtils.promptForTextInput(getString(R.string.dialog_server_address), getString(R.string.server_name_template), new UIUtils.DialogCallbacks() {\n @Override\n public void onCommit(Object inputData) {\n SharedPreferences.Editor editor = settings.edit();\n editor.putString(ApplicationConstants.MIFOS_SERVER_ADDRESS_KEY, (String) inputData);\n editor.commit();\n mUIUtils.displayLongMessage(getString(R.string.toast_first_address_set));\n }\n\n @Override\n public void onCancel() {\n mUIUtils.displayLongMessage(getString(R.string.toast_first_address_canceled));\n }\n });\n }\n }",
"@Step(\"Enter Address Line 1 Name {addressLine}\")\n\tpublic void setAddressLine(String addressLine) {\n\t\tcompanyInfo.getInpAddressLine().sendKeys(addressLine);\n\t}",
"public static void main(String[] args) {\n\t\tAddressBook adBook=loadAddressBook();\r\n\t\t//Address ad = adBook.getTempAddress();\r\n\t\t@SuppressWarnings(\"resource\")\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter the temporary address\");\r\n\t\tSystem.out.println(\"Enter the house name\");\r\n\t\tadBook.getTempAddress().setHouseName(sc.nextLine());\r\n\t\tSystem.out.println(\"Enter the street\");\r\n\t\tadBook.getTempAddress().setStreet(sc.nextLine());\r\n\t\tSystem.out.println(\"Enter the city\");\r\n\t\tadBook.getTempAddress().setCity(sc.nextLine());\r\n\t\tSystem.out.println(\"Enter the state\");\r\n\t\tadBook.getTempAddress().setState(sc.nextLine());\r\n\t\tSystem.out.println(\"Enter the phone number\");\r\n\t\tadBook.setPhoneNumber(sc.nextLine());\r\n\t\tSystem.out.println(\"Temporary address\");\r\n\t\tSystem.out.println(\"House name:\"+adBook.getTempAddress().getHouseName());\r\n\t\tSystem.out.println(\"Street:\"+adBook.getTempAddress().getStreet());\r\n\t\tSystem.out.println(\"City:\"+adBook.getTempAddress().getCity());\r\n\t\tSystem.out.println(\"State:\"+adBook.getTempAddress().getState());\r\n\t\tSystem.out.println(\"Phone number:\"+adBook.getPhoneNumber());\r\n\t}",
"public void promptAttendeeID(){\n System.out.println(\"Please enter attendee ID\");\n }",
"private void launchIntent() {\n\n // Assigns the EditText reference to the address input.\n EditText address_1 = (EditText)findViewById(R.id.address_input_1);\n String location = new String();\n\n // Retrieves the address from the user's input.\n try {\n location = address_1.getText().toString();\n location = location.replace(\" \", \"+\");\n }\n\n // NullPointerException handler.\n catch (NullPointerException e) {\n\n // A Toast message appears, notifying the user about the error.\n toastyPopUp(\"ERROR: NULLPOINTEREXCEPTION ENCOUNTERED WHILE RETRIEVING ADDRESS INPUT.\");\n }\n\n // Launches the customized Google Maps intent directly in navigation mode.\n Intent i = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(\"google.navigation:q=\" + location));\n i.setClassName(\"com.google.android.apps.maps\", \"com.google.android.maps.MapsActivity\");\n startActivity(i);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method initializes menuToolsFilter | private ZapMenuItem getMenuToolsFilter() {
if (menuToolsFilter == null) {
menuToolsFilter = new ZapMenuItem("menu.tools.filter");
menuToolsFilter.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(java.awt.event.ActionEvent e) {
FilterDialog dialog = new FilterDialog(getView().getMainFrame());
dialog.setAllFilters(filterFactory.getAllFilter());
dialog.showDialog(false);
boolean startThread = false;
for (Filter filter : filterFactory.getAllFilter()) {
if (filter.isEnabled()) {
startThread = true;
break;
}
}
if (startThread) {
if (timerFilterThread == null) {
timerFilterThread = new TimerFilterThread(filterFactory.getAllFilter());
timerFilterThread.start();
}
} else if (timerFilterThread != null) {
timerFilterThread.setStopped();
timerFilterThread = null;
}
}
});
}
return menuToolsFilter;
} | [
"public MenuFilter() {\r\n // TODO Auto-generated constructor stub\r\n }",
"public void setMenuFilter(ObjectMenuFilter filter);",
"private void setupFilterPopupMenus() {\r\n\t\t\r\n\t\t// setup swoop ontology filter menu\r\n\t\tthis.swoFilterMenu = new JPopupMenu();\r\n\t\tthis.swoRedFMenu = (JMenuItem) this.initComponent(JMenuItem.class, \"Remove Redundant Changes\");\r\n\t\tthis.swoRepFMenu = (JMenuItem) this.initComponent(JMenuItem.class, \"Remove Repository Changes\");\r\n\t\tthis.swoLocFMenu = (JMenuItem) this.initComponent(JMenuItem.class, \"Remove Local Changes\");\r\n\t\tthis.swoFilterMenu.add(swoRedFMenu);\r\n\t\tthis.swoFilterMenu.add(swoRepFMenu);\r\n\t\tthis.swoFilterMenu.add(swoLocFMenu);\r\n\t\t\r\n\t\t// setup repository ontology filter menu\r\n\t\tthis.repFilterMenu = new JPopupMenu();\r\n\t\tthis.repRedFMenu = (JMenuItem) this.initComponent(JMenuItem.class, \"Remove Redundant Changes\");\r\n\t\tthis.repFilterMenu.add(repRedFMenu);\t\t\r\n\t}",
"private void initFilter() {\n\t\tJLabel filterLabel = new JLabel(Labels.getString(\"mapfilter.title\"));\n\t\tfilterLabel.putClientProperty(ELFStyle.KEY, ELFStyle.LABEL_SHORT);\n\n\t\tfilterPanel.add(filterLabel);\n\n\t\tboolean first = true;\n\t\tButtonGroup group = new ButtonGroup();\n\t\tfor (final EMapFilter filter : EMapFilter.values()) {\n\t\t\tJToggleButton bt = new JToggleButton(filter.getName());\n\t\t\tbt.putClientProperty(ELFStyle.KEY, ELFStyle.TOGGLE_BUTTON_STONE);\n\t\t\tbt.addActionListener(e -> {\n\t\t\t\tcurrentFilter = filter;\n\t\t\t\tsearchChanged();\n\t\t\t});\n\n\t\t\tif (first) {\n\t\t\t\tfirst = false;\n\t\t\t\tbt.setSelected(true);\n\t\t\t}\n\n\t\t\tgroup.add(bt);\n\t\t\tfilterPanel.add(bt);\n\t\t}\n\t}",
"public VistaMenu() {\n initComponents();\n almacen = new AlmacenaFiltro();\n almacen.setMenu(this);\n crearFiltro = new VistaCrearFiltro();\n crearFiltro.setMenu(this);\n editarFiltro = new VistaEditarFiltro();\n editarFiltro.setMenu(this);\n }",
"private void initializeContextMenus() {\n\t\tinitializeMenuForListView();\n\t\tinitializeMenuForPairsListView();\n\t}",
"private JMenu createFilterMenu() {\r\n\t\tJMenu filterMenu = new JMenu(\"Filter\");\r\n\t\t\r\n\t\tfilterMenu.add(new JLabel(\"<html><b>Image filters</b></html>\"));\r\n\t\tJMenuItem blurItem = createMenuItem(0, BLUR_ACTION, null, 0, null);\r\n\t\tfilterMenu.add(blurItem);\r\n\t\tJMenuItem sharpenItem = createMenuItem(0, SHARPEN_ACTION, null, 0, null);\r\n\t\tfilterMenu.add(sharpenItem);\r\n\t\tJMenuItem embossItem = createMenuItem(0, EMBOSS_ACTION, null, 0, null);\r\n\t\tfilterMenu.add(embossItem);\r\n\t\tfilterMenu.add(new JLabel(\"<html><b>Edge detection filters</b></html>\"));\r\n\t\tJMenuItem sobelItem = createMenuItem(0, SOBEL_ACTION, null, 0, null);\r\n\t\tfilterMenu.add(sobelItem);\r\n\t\tJMenuItem laplaceItem = createMenuItem(0, LAPLACE_ACTION, null, 0, null);\r\n\t\tfilterMenu.add(laplaceItem);\r\n\t\t\r\n\t\treturn filterMenu;\r\n\t}",
"private void initMenu()\n {\n bar = new JMenuBar();\n fileMenu = new JMenu(\"File\");\n crawlerMenu = new JMenu(\"Crawler\"); \n aboutMenu = new JMenu(\"About\");\n \n bar.add(fileMenu);\n bar.add(crawlerMenu);\n bar.add(aboutMenu);\n \n exit = new JMenuItem(\"Exit\");\n preferences = new JMenuItem(\"Preferences\");\n author = new JMenuItem(\"Author\");\n startCrawlerItem = new JMenuItem(\"Start\");\n stopCrawlerItem = new JMenuItem(\"Stop\");\n newIndexItem = new JMenuItem(\"New index\");\n openIndexItem = new JMenuItem(\"Open index\");\n \n stopCrawlerItem.setEnabled(false);\n \n fileMenu.add(newIndexItem);\n fileMenu.add(openIndexItem);\n fileMenu.add(exit);\n aboutMenu.add(author);\n crawlerMenu.add(startCrawlerItem);\n crawlerMenu.add(stopCrawlerItem);\n crawlerMenu.add(preferences);\n \n author.addActionListener(this);\n preferences.addActionListener(this);\n exit.addActionListener(this);\n startCrawlerItem.addActionListener(this);\n stopCrawlerItem.addActionListener(this);\n newIndexItem.addActionListener(this);\n openIndexItem.addActionListener(this);\n \n frame.setJMenuBar(bar);\n }",
"public void initializeDBMenu() {\r\n \r\n JMenu menuElementy = mainMenu.getMenu(1);\r\n menuElementy.setVisible(true);\r\n \r\n JMenuItem addTable = new JMenuItem(\"Dodaj tabelę\");\r\n JMenuItem addView = new JMenuItem(\"Dodaj perspektywę\");\r\n JMenuItem addFunction = new JMenuItem(\"Dodaj funkcję\");\r\n JMenuItem addProcedure = new JMenuItem(\"Dodaj procedurę\");\r\n JMenuItem addTrigger = new JMenuItem(\"Dodaj wyzwalacz\");\r\n \r\n menuElementy.removeAll();\r\n menuElementy.add(addTable);\r\n menuElementy.add(addView);\r\n menuElementy.add(addFunction);\r\n menuElementy.add(addProcedure);\r\n menuElementy.add(addTrigger);\r\n }",
"public ResearchMenu() {\n initComponents();\n }",
"private void initActionToolChooser(){\n toolChooser = findViewById(R.id.toolbar);\n toolChooser.setOnClickListener(v -> {\n toolbox = new ActionToolbox();\n toolbox.showToolbox(v, R.menu.toolbox);\n });\n }",
"void initContextMenu() {\n super.editMenuItem.setOnAction(event -> {\n cm.hide();\n if (table.getSelectionModel().getSelectedItem() != null) {\n editWifi(table.getSelectionModel().getSelectedItem());\n }\n });\n\n super.showOnMap.setOnAction(event -> {\n cm.hide();\n if (table.getSelectionModel().getSelectedItem() != null) {\n showHotspotsOnMap(table.getSelectionModel().getSelectedItem());\n }\n });\n\n super.deleteMenuItem.setOnAction(event -> {\n cm.hide();\n if (table.getSelectionModel().getSelectedItem() != null) {\n deleteWifi(table.getSelectionModel().getSelectedItem());\n }\n });\n }",
"private void initFilters() {\n // Distance spinner\n Spinner distFilters = (Spinner) filterLayout.findViewById(R.id.upcomingMode);\n ArrayAdapter<CharSequence> distAdapter = ArrayAdapter.createFromResource(this,\n R.array.dists_array, android.R.layout.simple_spinner_item);\n distAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n distFilters.setAdapter(distAdapter);\n\n // Date range spinner\n Spinner dateFilters = (Spinner) filterLayout.findViewById(R.id.dateFilter);\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,\n R.array.dates_array, android.R.layout.simple_spinner_item);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n dateFilters.setAdapter(adapter);\n }",
"public void setUpEditMenu() {\n add(editMenu);\n\n //editMenu.add(cutItem);\n //editMenu.add(copyItem);\n //editMenu.add(pasteItem);\n //editMenu.addSeparator();\n clearAllItems.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n world.deleteAllEntities();\n }\n });\n editMenu.add(clearAllItems);\n editMenu.addSeparator();\n JMenuItem loadVectors = new JMenuItem(\"Load stimulus vectors...\");\n loadVectors.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n SFileChooser chooser = new SFileChooser(\".\", \"Load vectors\");\n File theFile = chooser.showOpenDialog();\n if (theFile != null) {\n double[][] vecs = Utils.getDoubleMatrix(theFile);\n world.loadStimulusVectors(vecs);\n }\n }\n });\n editMenu.add(loadVectors);\n\n }",
"private void initFilters()\r\n\t{\r\n\t\tlpf = new LowPassFilter();\r\n\t\tlpf.setTimeConstant(this.lpfTimeConstant);\r\n\r\n\t\tmeanFilter = new MeanFilter();\r\n\t\tmeanFilter.setTimeConstant(this.meanFilterTimeConstant);\r\n\t}",
"public ToolsMenu() {\n\t\tsuper(\"Tools\");\n\t}",
"public startingMenu() {\r\n initComponents();\r\n }",
"public MenuItemLogic() {\n list = new ArrayList<MenuItemElement>();\n }",
"public FilterPanel() {\n\t\t\tsuper();\n\t\t\tthis.initComponents();\n\t\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method returns the list of pillar objects where each object contains SubtopicList and KpiList under that particular pillar | @Override
public List<Pillars> getPillarList(Locale locale) {
return pillarService.getPillarList(locale);
} | [
"@Override\r\n\tpublic List<Pilot> getAllPilots() {\r\n\t\tList<Pilot> cloned = new ArrayList<>(pilots);\r\n\t\treturn cloned;\r\n\t}",
"java.util.List<com.felania.msldb.SmjBarParentObjectOuterClass.SmjBarParentObject> \n getParentObjectList();",
"public List getTopicPublisherList(String topicName)\n {\n List resultList = new ArrayList();\n for(int ii = 0; ii < topicPublisherList.size(); ii++)\n {\n TopicPublisher publisher = (TopicPublisher)topicPublisherList.get(ii);\n try\n {\n if(publisher.getTopic().getTopicName().equals(topicName))\n {\n resultList.add(publisher);\n }\n }\n catch(JMSException exc)\n {\n \n }\n }\n return Collections.unmodifiableList(resultList);\n }",
"public List<ParksId> getAllParks(){\n\n List<ParksId> parks = new ArrayList<ParksId>();\n\n Cursor cursor = database.query(TABLE_PARKS, listColumnsParks, null, null, null, null, null);\n cursor.moveToFirst();\n\n while (!cursor.isAfterLast()){\n\n ParksId p = new ParksId();\n\n // set park members\n p.set_id(cursor.getInt(0));\n p.set_lowEngFull(cursor.getString(1));\n p.set_lowFreFull(cursor.getString(2));\n\n // add park to list and move cursor\n parks.add(p);\n cursor.moveToNext();\n }\n\n cursor.close();\n return parks;\n }",
"public List<Node> getPowerPillList();",
"public ArrayList<Newspaper> getPapers()\r\n\t{\r\n\t\tArrayList<Newspaper> retual = new ArrayList<Newspaper>();\r\n\t\tArrayList<String> keys = new ArrayList<String>();\r\n\t\tfor(int i =0; i < newspaperRetractions.size(); i++)\r\n\t\t{\r\n\t\t\tkeys.add((String) newspaperRetractions.keySet().toArray()[i]);\r\n\t\t}\r\n\t\twhile(keys.size()>0)\r\n\t\t{\r\n\t\t\tretual.add(newspaperRetractions.get(keys.remove(0)));\r\n\t\t}\r\n\t\treturn retual;\r\n\t}",
"List<Park> getAllParks();",
"public List<Topic> getTopicList() {\n return topicList;\n }",
"List<LinkedList<Cards>> getPiles();",
"public ArrayList<Pill> getPills() {\n return pills;\n }",
"public static ArrayList<ArrayList<Node>> getTopicNodes(Node root, int level) {\n ArrayList<ArrayList<Node>> allTopics = new ArrayList<ArrayList<Node>>();\n ArrayList<Node> topic = new ArrayList<Node>();\n Node node = root.getFirstChild();\n while (node != null) {\n if (node instanceof Heading) {\n Heading heading = (Heading) node;\n if (level == 0 || heading.getLevel() == level) {\n if (!topic.isEmpty()) {\n allTopics.add(topic);\n }\n topic = new ArrayList<Node>();\n }\n }\n topic.add(node);\n node = node.getNext();\n }\n if (!topic.isEmpty()) {\n allTopics.add(topic);\n }\n return allTopics;\n }",
"public List<NoteToken> getElts(){\r\n List<NoteToken> returnList = new ArrayList<NoteToken>();\r\n for (Iterator<Bars> i = BarsList.iterator(); i.hasNext();){\r\n returnList.addAll(i.next().getElts());\r\n }\r\n return returnList;\r\n }",
"PictureListPresentationModel getList();",
"java.util.List<com.znl.proto.M2.TipInfo> \n getTipInfosList();",
"PList createPList();",
"public abstract List<Simple> getTrayectosPack();",
"public List<Topic> getAllTopics(){\r\n\t\treturn topics;\r\n\t}",
"java.util.List<com.mock.trading.pb.TradePb.bar_pb> \n getBarsList();",
"private List<JPanel> getPaneles() {\n List<JPanel> lista_pn = new ArrayList<>();\n Stack<JPanel> pila = new Stack<>();\n pila.push(this);\n\n while (!pila.isEmpty()) {\n JPanel pn = pila.firstElement();\n pila.remove(pn);\n int v = pila.size();\n Component[] com = pn.getComponents();\n for (Component aux : com) {\n if (aux instanceof JPanel) {\n pila.push((JPanel) aux);\n }\n }\n if (pila.size() == v) {\n lista_pn.add(pn);\n }\n }\n return lista_pn;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Double rotate binary tree node: first left child with its right child; then node k3 with new left child. For AVL trees, this is a double rotation for case 2. Update heights, then return new root. | protected AvlNode<T> doubleWithLeftChild(AvlNode<T> k3)
{
k3.left = rotateWithRightChild(k3.left);
return rotateWithLeftChild(k3);
} | [
"private Node doubleWithLeftChild(Node k3) {\r\n k3.left = rotateWithRightChild( k3.left );\r\n return rotateWithLeftChild( k3 );\r\n }",
"private Node doubleWithLeftChild(Node k3){\n k3.left = rotateWithRightChild( k3.left );\n return rotateWithLeftChild( k3 );\n }",
"private AvlNode<T> doubleWithLeftChild(AvlNode<T> k3) {\n k3.left = rotateWithRightChild(k3.left);\n return rotateWithLeftChild(k3);\n }",
"private AvlNode<AnyType> doubleWithLeftChild( AvlNode<AnyType> k3 )\n {\n k3.left = rotateWithRightChild( k3.left );\n return rotateWithLeftChild( k3 );\n }",
"private Node doubleWithRightChild(Node k1) {\r\n k1.right = rotateWithLeftChild( k1.right );\r\n return rotateWithRightChild( k1 );\r\n }",
"private Node doubleWithRightChild(Node k1){\n k1.right = rotateWithLeftChild( k1.right );\n return rotateWithRightChild( k1 );\n }",
"private Node rotateWithRightChild(Node k1){\n Node k2 = k1.right;\n k1.right = k2.left;\n k2.left = k1;\n k1.height = max( height( k1.left ), height( k1.right ) ) + 1;\n k2.height = max( height( k2.right ), k1.height ) + 1;\n return k2;\n }",
"private Node rotateWithRightChild(Node k1) {\r\n Node k2 = k1.right;\r\n k1.right = k2.left;\r\n k2.left = k1;\r\n k1.height = max( height( k1.left ), height( k1.right ) ) + 1;\r\n k2.height = max( height( k2.right ), k1.height ) + 1;\r\n return k2;\r\n }",
"private void LLRotation(IAVLNode node)\r\n\t{\r\n\t\tIAVLNode parent = node.getParent(); \r\n\t\tIAVLNode leftChild = node.getLeft(); \r\n\t\tIAVLNode rightGrandChild = node.getLeft().getRight(); \r\n\t\t\t\t\t\t\t\t\t\t \r\n\t\tif(node != root) \r\n\t\t{\r\n\t\t\tif(node == parent.getLeft()) \r\n\t\t\t\tparent.setLeft(leftChild);\r\n\t\t\telse \r\n\t\t\t\tparent.setRight(leftChild);\r\n\t\t}\r\n\t\tnode.setLeft(rightGrandChild); // rightGrandChild is now node's left child\r\n\t\trightGrandChild.setParent(node); // node becomes rightGrandChild's parent\r\n\t\tleftChild.setRight(node); // node is now leftChild's right child\r\n\t\tnode.setParent(leftChild); // node's parent is now leftChild\r\n\t\tleftChild.setParent(parent); // leftChild's parent is now node's old parent\r\n\t\t\r\n\t\t//updating sizes and heights\r\n\t\tnode.setSize(sizeCalc(node)); // updating node's size \r\n\t\tleftChild.setSize(sizeCalc(leftChild)); //updating leftChild's size\r\n\t\tleftChild.setHeight(HeightCalc(leftChild)); // updating leftChild's height\r\n\t\tnode.setHeight(HeightCalc(node)); // updating node's height\r\n\r\n\t\tif (node == root)\r\n\t\t\tthis.root = leftChild;\r\n\t}",
"private static Node rotate(Node root) {\n\n if (root.balance == 2) {\n\n if (root.right.balance == 1) {\n root = rotateLeft(root);\n } else if (root.right.balance == -1) {\n root = rotateRightLeft(root);\n }\n\n } else if (root.balance == -2) {\n\n if (root.left.balance == -1) {\n root = rotateRight(root);\n } else if (root.left.balance == 1) {\n root = rotateLeftRight(root);\n }\n\n }\n\n return root;\n }",
"TreeNodeAVL rightRotate(TreeNodeAVL z){\n TreeNodeAVL node1=z.left;\n TreeNodeAVL node2=node1.right;\n\n //perform rotation\n node1.right=z;\n z.left=node2;\n\n //update heights\n z.height=Math.max(height(z.left),height(z.right))+1;\n node1.height=Math.max(height(node1.left),height(node1.right))+1;\n\n //return the new node\n return node1;\n\n }",
"private void doubleRotateLeftDel (WAVLNode z) {\n\t WAVLNode a = z.right.left;\r\n\t WAVLNode y = z.right;\r\n\t WAVLNode c = z.right.left.left;\r\n\t WAVLNode d = z.right.left.right;\r\n\t if(z.parent!=null) {\r\n\t\t if(parentside(z.parent, z).equals(\"left\")) {\r\n\t\t\t z.parent.left=a;\r\n\r\n\t }\r\n\t else {\r\n\t\t\t z.parent.right=a;\r\n\r\n\t }\r\n\t\t \r\n\t }\r\n\t else {\r\n\t\t this.root=a;\r\n\t }\r\n\t a.left=z;\r\n\t a.right=y;\r\n\t a.rank=a.rank+2;\r\n\t a.parent=z.parent;\r\n\t y.parent=a;\r\n\t y.left=d;\r\n\t y.rank--;\r\n\t z.parent=a;\r\n\t z.right=c;\r\n\t z.rank=z.rank-2;\r\n\t c.parent=z;\r\n\t d.parent=y;\r\n\t z.sizen=z.right.sizen+z.left.sizen+1;\r\n\t y.sizen=y.right.sizen+y.left.sizen+1;\r\n\t a.sizen=a.right.sizen+a.left.sizen+1;\r\n }",
"private void doubleRotateRightDel (WAVLNode z) {\n\t WAVLNode a = z.left.right;\r\n\t WAVLNode y = z.left;\r\n\t WAVLNode c = z.left.right.right;\r\n\t WAVLNode d = z.left.right.left;\r\n\t if(z.parent!=null) {\r\n\t\t if(parentside(z.parent, z).equals(\"left\")) {\r\n\t\t\t z.parent.left=a;\r\n\r\n\t }\r\n\t else {\r\n\t\t\t z.parent.right=a;\r\n\r\n\t }\r\n\t\t \r\n\t }\r\n\t else {\r\n\t\t this.root=a;\r\n\t }\r\n\t a.right=z;\r\n\t a.left=y;\r\n\t a.rank=a.rank+2;\r\n\t a.parent=z.parent;\r\n\t y.parent=a;\r\n\t y.right=d;\r\n\t y.rank--;\r\n\t z.parent=a;\r\n\t z.left=c;\r\n\t z.rank=z.rank-2;\r\n\r\n\t c.parent=z;\r\n\t d.parent=y;\r\n\t z.sizen=z.right.sizen+z.left.sizen+1;\r\n\t y.sizen=y.right.sizen+y.left.sizen+1;\r\n\t a.sizen=a.right.sizen+a.left.sizen+1;\r\n }",
"private void RRRotation(IAVLNode node)\r\n\t{\r\n\t\tIAVLNode parent = node.getParent(); \r\n\t\tIAVLNode rightChild = node.getRight() ; \r\n\t\tIAVLNode leftGrandChild = node.getRight().getLeft(); \r\n\t\t\r\n\t\tif(node != root) \r\n\t\t{\r\n\t\t\tif(node == parent.getLeft())\r\n\t\t\t\tparent.setLeft(rightChild);\r\n\t\t\telse \r\n\t\t\t\tparent.setRight(rightChild);\r\n\t\t}\r\n\t\t\r\n\t\tnode.setRight(leftGrandChild); //leftGrandChild is now node's right child\r\n\t\tleftGrandChild.setParent(node); //node is now leftGrandChild's parent\r\n\t\trightChild.setLeft(node); // node is now rightChild's left child\r\n\t\tnode.setParent(rightChild); // node's parent is now leftChild\r\n\t\trightChild.setParent(parent); // leftChild's parent is now node's old parent\r\n\t\t\r\n\t\t//updating sizes and heights\r\n\t\tnode.setSize(sizeCalc(node)); // updating node's size\r\n\t\trightChild.setSize(sizeCalc(rightChild)); //updating rightChild's size\r\n\t\trightChild.setHeight(HeightCalc(rightChild)); // updating rightChild's height\r\n\t\tnode.setHeight(HeightCalc(node)); // updating node's height\r\n\t\t\r\n\t\tif (node == root) \r\n\t\t\tthis.root = rightChild;\r\n\t}",
"VizTreeNode leftRotate(VizTreeNode x)\n {\n VizTreeNode y = x.right;\n VizTreeNode T2 = y.left;\n\n // Perform rotation\n y.left = x;\n x.right = T2;\n\n // Update heights\n x.height = max(getHeight(x.left), getHeight(x.right)) + 1;\n y.height = max(getHeight(y.left), getHeight(y.right)) + 1;\n\n // Return new root\n return y;\n }",
"Node rightRotate(Node y) \n { \n Node x = y.left; \n Node T2 = x.right; \n \n // Perform rotation \n x.right = y; \n y.left = T2; \n \n // Update heights \n y.height = max(height(y.left), height(y.right)) + 1; \n x.height = max(height(x.left), height(x.right)) + 1; \n \n // Return new root \n return x; \n }",
"Node rightRotate(Node x)\n\t{\n\t\tNode y=x.left;\n\t\tNode T2=y.right;\n\t\t\n\t\t//rotate\n\t\t\n\t\ty.right=x;\n\t\tx.left=T2;\n\t\t\n\t\t//update heights\n\t\ty.height=max(height(y.left),height(y.left) +1 ) ;\n\t\tx.height=max(height(x.left),height(x.left) +1 ) ;\n\t\t\n\t\t// new root\n\t\treturn y;\n\t}",
"VizTreeNode rightRotate(VizTreeNode y)\n {\n VizTreeNode x = y.left;\n VizTreeNode T2 = x.right;\n\n // Perform rotation\n x.right = y;\n y.left = T2;\n\n // Update heights\n y.height = max(getHeight(y.left), getHeight(y.right)) + 1;\n x.height = max(getHeight(x.left), getHeight(x.right)) + 1;\n\n // Return new root\n return x;\n }",
"private void rightRotation() {\n\t\tE elem = getData();\n\t\tBalancedBinarySearchTree<E> t = getLeft();\n\t\tsetData(t.getData());\n\t\tsetLeft(t.getLeft());\n\t\tt.setData(elem);\n\t\tt.setLeft(t.getRight());\n\t\tt.setRight(getRight());\n\t\tsetRight(t);\n\t\tt.computeHeight();\n\t\tcomputeHeight();\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The log filter of the observation. | public String getLogFilter() {
return this.logFilter;
} | [
"public Observation withLogFilter(String logFilter) {\n setLogFilter(logFilter);\n return this;\n }",
"public Observation withLogFilter(LogFilter logFilter) {\n this.logFilter = logFilter.toString();\n return this;\n }",
"double logNorm(IFilter<Category<MR>> filter);",
"double logNorm(IFilter<ERESULT> filter);",
"public LogFilter() {}",
"public void setLogFilter(String logFilter) {\n this.logFilter = logFilter;\n }",
"protected AbstractLog() {\n _filter = LambdaUtil.TRUE;\n }",
"public double logLikelihoodObservation() {\r\n double logLikelihood = 0.0;\r\n int T = this.scaling.length;\r\n for (int t = 0; t < T; t++) {\r\n logLikelihood += Math.log(this.scaling[t]);\r\n }\r\n return -1.0 * logLikelihood;\r\n }",
"public Filter getFilter() {\n\t\treturn (filter);\n\t}",
"public Filter getFilter() {\n return this.filter;\n }",
"public final double getLogZero() {\n \treturn logZero;\n }",
"Filter getFilter();",
"public EventChannelFilter filter() {\n return this.filter;\n }",
"public NDArray getLogits() {\n return logits;\n }",
"public void addFilter(LogFilter filter) {\n Util.nullpo(filter);\n lFilters.add(filter);\n }",
"public ButterworthLPFilterEffect() {\n\t\tcutoff.addObserver(this);\n\t\t/*\n\t\t * To create the necessary coefficients with the initial value of\n\t\t * cutoff.\n\t\t */\n\t\tupdate(cutoff, null);\n\t}",
"void filterChanged(Filter filter);",
"protected JUnitAbsractFilteringLoggerMock(final Filter<LoggingRecord> filter) {\n\t\t\tsuper(filter);\n\t\t}",
"public ImageFilter getFilter() {\r\n\t\treturn filter;\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__QualifiedName__Group_1__0__Impl" $ANTLR start "rule__QualifiedName__Group_1__1" InternalScoping.g:578:1: rule__QualifiedName__Group_1__1 : rule__QualifiedName__Group_1__1__Impl ; | public final void rule__QualifiedName__Group_1__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalScoping.g:582:1: ( rule__QualifiedName__Group_1__1__Impl )
// InternalScoping.g:583:2: rule__QualifiedName__Group_1__1__Impl
{
pushFollow(FOLLOW_2);
rule__QualifiedName__Group_1__1__Impl();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__QualifiedName__Group_1__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../hu.bme.mit.androtext.androres.ui/src-gen/hu/bme/mit/androtext/androres/ui/contentassist/antlr/internal/InternalAndroResDsl.g:2804:1: ( rule__QualifiedName__Group_1__1__Impl )\r\n // ../hu.bme.mit.androtext.androres.ui/src-gen/hu/bme/mit/androtext/androres/ui/contentassist/antlr/internal/InternalAndroResDsl.g:2805:2: rule__QualifiedName__Group_1__1__Impl\r\n {\r\n pushFollow(FOLLOW_rule__QualifiedName__Group_1__1__Impl_in_rule__QualifiedName__Group_1__15631);\r\n rule__QualifiedName__Group_1__1__Impl();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__QualifiedName__Group_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:15058:1: ( rule__QualifiedName__Group_1__0__Impl rule__QualifiedName__Group_1__1 )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:15059:2: rule__QualifiedName__Group_1__0__Impl rule__QualifiedName__Group_1__1\n {\n pushFollow(FOLLOW_rule__QualifiedName__Group_1__0__Impl_in_rule__QualifiedName__Group_1__030382);\n rule__QualifiedName__Group_1__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__QualifiedName__Group_1__1_in_rule__QualifiedName__Group_1__030385);\n rule__QualifiedName__Group_1__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__QualifiedName__Group_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:13483:1: ( rule__QualifiedName__Group_1__1__Impl )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:13484:2: rule__QualifiedName__Group_1__1__Impl\n {\n pushFollow(FOLLOW_rule__QualifiedName__Group_1__1__Impl_in_rule__QualifiedName__Group_1__127192);\n rule__QualifiedName__Group_1__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__QualifiedName__Group_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:15089:1: ( rule__QualifiedName__Group_1__1__Impl )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:15090:2: rule__QualifiedName__Group_1__1__Impl\n {\n pushFollow(FOLLOW_rule__QualifiedName__Group_1__1__Impl_in_rule__QualifiedName__Group_1__130446);\n rule__QualifiedName__Group_1__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__QualifiedName__Group__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:26145:1: ( rule__QualifiedName__Group__1__Impl )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:26146:2: rule__QualifiedName__Group__1__Impl\r\n {\r\n pushFollow(FOLLOW_rule__QualifiedName__Group__1__Impl_in_rule__QualifiedName__Group__152506);\r\n rule__QualifiedName__Group__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__QualifiedName__Group_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:14192:1: ( rule__QualifiedName__Group_1__1__Impl )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:14193:2: rule__QualifiedName__Group_1__1__Impl\n {\n pushFollow(FOLLOW_rule__QualifiedName__Group_1__1__Impl_in_rule__QualifiedName__Group_1__128633);\n rule__QualifiedName__Group_1__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__QualifiedName__Group_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalScoping.g:555:1: ( rule__QualifiedName__Group_1__0__Impl rule__QualifiedName__Group_1__1 )\n // InternalScoping.g:556:2: rule__QualifiedName__Group_1__0__Impl rule__QualifiedName__Group_1__1\n {\n pushFollow(FOLLOW_3);\n rule__QualifiedName__Group_1__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__QualifiedName__Group_1__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__QualifiedName__Group_1__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:16492:1: ( rule__QualifiedName__Group_1__1__Impl )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:16493:2: rule__QualifiedName__Group_1__1__Impl\r\n {\r\n pushFollow(FOLLOW_rule__QualifiedName__Group_1__1__Impl_in_rule__QualifiedName__Group_1__133176);\r\n rule__QualifiedName__Group_1__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__QualifiedName__Group__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:16440:1: ( ( ( rule__QualifiedName__Group_1__0 )* ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:16441:1: ( ( rule__QualifiedName__Group_1__0 )* )\r\n {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:16441:1: ( ( rule__QualifiedName__Group_1__0 )* )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:16442:1: ( rule__QualifiedName__Group_1__0 )*\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getQualifiedNameAccess().getGroup_1()); \r\n }\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:16443:1: ( rule__QualifiedName__Group_1__0 )*\r\n loop119:\r\n do {\r\n int alt119=2;\r\n int LA119_0 = input.LA(1);\r\n\r\n if ( (LA119_0==30) ) {\r\n int LA119_2 = input.LA(2);\r\n\r\n if ( (LA119_2==RULE_ID) ) {\r\n int LA119_3 = input.LA(3);\r\n\r\n if ( (synpred153_InternalCheck()) ) {\r\n alt119=1;\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n switch (alt119) {\r\n \tcase 1 :\r\n \t // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:16443:2: rule__QualifiedName__Group_1__0\r\n \t {\r\n \t pushFollow(FOLLOW_rule__QualifiedName__Group_1__0_in_rule__QualifiedName__Group__1__Impl33077);\r\n \t rule__QualifiedName__Group_1__0();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return ;\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop119;\r\n }\r\n } while (true);\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getQualifiedNameAccess().getGroup_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__QualifiedName__Group_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:1356:1: ( rule__QualifiedName__Group_1__1__Impl )\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:1357:2: rule__QualifiedName__Group_1__1__Impl\n {\n pushFollow(FOLLOW_rule__QualifiedName__Group_1__1__Impl_in_rule__QualifiedName__Group_1__12810);\n rule__QualifiedName__Group_1__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__QualifiedName__Group_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:14161:1: ( rule__QualifiedName__Group_1__0__Impl rule__QualifiedName__Group_1__1 )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:14162:2: rule__QualifiedName__Group_1__0__Impl rule__QualifiedName__Group_1__1\n {\n pushFollow(FOLLOW_rule__QualifiedName__Group_1__0__Impl_in_rule__QualifiedName__Group_1__028569);\n rule__QualifiedName__Group_1__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__QualifiedName__Group_1__1_in_rule__QualifiedName__Group_1__028572);\n rule__QualifiedName__Group_1__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__QualifiedName__Group_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.iworkz.qon.ui/src-gen/org/iworkz/qon/ui/contentassist/antlr/internal/InternalQonDsl.g:4040:1: ( rule__QualifiedName__Group_1__1__Impl )\n // ../org.iworkz.qon.ui/src-gen/org/iworkz/qon/ui/contentassist/antlr/internal/InternalQonDsl.g:4041:2: rule__QualifiedName__Group_1__1__Impl\n {\n pushFollow(FOLLOW_rule__QualifiedName__Group_1__1__Impl_in_rule__QualifiedName__Group_1__18059);\n rule__QualifiedName__Group_1__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__QualifiedName__Group_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.iworkz.qon.ui/src-gen/org/iworkz/qon/ui/contentassist/antlr/internal/InternalQonDsl.g:4009:1: ( rule__QualifiedName__Group_1__0__Impl rule__QualifiedName__Group_1__1 )\n // ../org.iworkz.qon.ui/src-gen/org/iworkz/qon/ui/contentassist/antlr/internal/InternalQonDsl.g:4010:2: rule__QualifiedName__Group_1__0__Impl rule__QualifiedName__Group_1__1\n {\n pushFollow(FOLLOW_rule__QualifiedName__Group_1__0__Impl_in_rule__QualifiedName__Group_1__07997);\n rule__QualifiedName__Group_1__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__QualifiedName__Group_1__1_in_rule__QualifiedName__Group_1__08000);\n rule__QualifiedName__Group_1__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__QualifiedName__Group_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:11054:1: ( rule__QualifiedName__Group_1__0__Impl rule__QualifiedName__Group_1__1 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:11055:2: rule__QualifiedName__Group_1__0__Impl rule__QualifiedName__Group_1__1\n {\n pushFollow(FOLLOW_rule__QualifiedName__Group_1__0__Impl_in_rule__QualifiedName__Group_1__022189);\n rule__QualifiedName__Group_1__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__QualifiedName__Group_1__1_in_rule__QualifiedName__Group_1__022192);\n rule__QualifiedName__Group_1__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__QualifiedName__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:14129:1: ( rule__QualifiedName__Group__1__Impl )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:14130:2: rule__QualifiedName__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__QualifiedName__Group__1__Impl_in_rule__QualifiedName__Group__128507);\n rule__QualifiedName__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__QualifiedName__Group_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.gemoc.gel.xtext.ui/src-gen/org/gemoc/gel/ui/contentassist/antlr/internal/InternalGEL.g:6198:1: ( rule__QualifiedName__Group_1__1__Impl )\n // ../org.gemoc.gel.xtext.ui/src-gen/org/gemoc/gel/ui/contentassist/antlr/internal/InternalGEL.g:6199:2: rule__QualifiedName__Group_1__1__Impl\n {\n pushFollow(FOLLOW_rule__QualifiedName__Group_1__1__Impl_in_rule__QualifiedName__Group_1__112518);\n rule__QualifiedName__Group_1__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__QualifiedName__Group_1__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:15561:1: ( rule__QualifiedName__Group_1__1__Impl )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:15562:2: rule__QualifiedName__Group_1__1__Impl\r\n {\r\n pushFollow(FOLLOW_rule__QualifiedName__Group_1__1__Impl_in_rule__QualifiedName__Group_1__131458);\r\n rule__QualifiedName__Group_1__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__QualifiedName__Group_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:11085:1: ( rule__QualifiedName__Group_1__1__Impl )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:11086:2: rule__QualifiedName__Group_1__1__Impl\n {\n pushFollow(FOLLOW_rule__QualifiedName__Group_1__1__Impl_in_rule__QualifiedName__Group_1__122253);\n rule__QualifiedName__Group_1__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__QualifiedName__Group_1__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:26177:1: ( rule__QualifiedName__Group_1__0__Impl rule__QualifiedName__Group_1__1 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:26178:2: rule__QualifiedName__Group_1__0__Impl rule__QualifiedName__Group_1__1\r\n {\r\n pushFollow(FOLLOW_rule__QualifiedName__Group_1__0__Impl_in_rule__QualifiedName__Group_1__052568);\r\n rule__QualifiedName__Group_1__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__QualifiedName__Group_1__1_in_rule__QualifiedName__Group_1__052571);\r\n rule__QualifiedName__Group_1__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks whether the 'field161' field has been set | public boolean hasField161() {
return fieldSetFlags()[161];
} | [
"public boolean hasField141() {\n return fieldSetFlags()[141];\n }",
"public boolean hasField121() {\n return fieldSetFlags()[121];\n }",
"public boolean hasField1040() {\n return fieldSetFlags()[1040];\n }",
"public boolean hasField151() {\n return fieldSetFlags()[151];\n }",
"public boolean hasField131() {\n return fieldSetFlags()[131];\n }",
"public boolean hasField132() {\n return fieldSetFlags()[132];\n }",
"public boolean hasField163() {\n return fieldSetFlags()[163];\n }",
"public boolean hasField146() {\n return fieldSetFlags()[146];\n }",
"public boolean hasField159() {\n return fieldSetFlags()[159];\n }",
"public boolean hasField158() {\n return fieldSetFlags()[158];\n }",
"public boolean hasField148() {\n return fieldSetFlags()[148];\n }",
"public boolean hasField994() {\n return fieldSetFlags()[994];\n }",
"public boolean hasField954() {\n return fieldSetFlags()[954];\n }",
"public boolean hasField1015() {\n return fieldSetFlags()[1015];\n }",
"public boolean hasField138() {\n return fieldSetFlags()[138];\n }",
"public boolean hasField943() {\n return fieldSetFlags()[943];\n }",
"public boolean hasField130() {\n return fieldSetFlags()[130];\n }",
"public boolean hasField811() {\n return fieldSetFlags()[811];\n }",
"public boolean hasField51() {\n return fieldSetFlags()[51];\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test method for 'setText(String)', given null, should be treated as empty string. | public void testSetTextString_null() {
textField.setText(null);
assertEquals("Text should be treated as empty string.", textField.getText(), "");
} | [
"public void testSetText_NullText() throws Exception {\n try {\n textInputBox.setText(null);\n fail(\"Expect IllegalArgumentException.\");\n } catch (IllegalArgumentException iae) {\n // expect\n }\n }",
"public void testSetText_EmptyText1() throws Exception {\n try {\n textInputBox.setText(\"\");\n fail(\"Expect IllegalArgumentException.\");\n } catch (IllegalArgumentException iae) {\n // expect\n }\n }",
"public void testSetText_EmptyText2() throws Exception {\n try {\n textInputBox.setText(\" \\t \\n \");\n fail(\"Expect IllegalArgumentException.\");\n } catch (IllegalArgumentException iae) {\n // expect\n }\n }",
"@MediumTest\n\t public void testInfoTextViewText_isEmpty() {\n\t assertEquals(\"\", mtextView1.getText());\n\t }",
"@Test\r\n public void testSetText() {\r\n assertEquals(\"test\", box.getText());\r\n box.setText(\"test2\");\r\n assertEquals(\"test2\", box.getText());\r\n }",
"public void testNotifyTextChange_null() {\n textField.addTextChangedListener(listener);\n textField.notifyTextChange(null);\n assertEquals(\"text should change accordingly.\", textField.getText(), \"\");\n }",
"public void testSetTextBlankIntialState() throws Exception {\n model = new DefaultCheckboxModel();\n model.setText(\"\");\n assertNull(\"Value sh/b null\",\n model.getValueHolder().getPropertyValue(\"value\"));\n }",
"private void checkForNull(String text) {\n if (text == null || text.equals(\"\")){\n throw new IllegalArgumentException();\n }\n }",
"public boolean isEmpty(){return getText().equals(\"\"); }",
"@Test\n public void shouldNameEditTextShowNoErrorWhenValidData() {\n onView(withId(R.id.txtName)).perform(click(), closeSoftKeyboard(), replaceText(\"test\"));\n onView(withId(R.id.txtName)).check(matches(hasErrorText(isEmptyOrNullString())));\n }",
"@Test public void testToElementText_Null() throws IOException {\r\n String got = escapeText(null);\r\n assertEquals(\"\", got);\r\n }",
"private void setText1(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n text1_ = value;\n }",
"public void testSetTextString() {\n String newText = \"newText\";\n textField.setText(newText);\n assertEquals(\"Text should be set correctly.\", textField.getText(), newText);\n }",
"public void testPostQuestionNullText() throws NetworkException,\n\t\t\tJSONException, IOException {\n\t\ttry {\n\t\t\tQuestion question = TestHelpers.createDummyQuestion(0);\n\t\t\tquestion.setText(null);\n\t\t\tquestionService.postQuestion(question);\n\t\t\tfail(\"Posting question with empty text is disallowed.\");\n\t\t} catch (IllegalArgumentException e) {\n\t\t}\n\t}",
"@Test(description = \"Implements ATC 1-1\")\n public void isEmpty() {\n String str = \" foo \";\n Assert.assertTrue(str.isEmpty(),\n ErrorMessage.get(ErrorMessageKeys.EMPTY_STRING));\n }",
"public void setNoneText(String noneText) {\r\n this.noneText = noneText;\r\n }",
"public void testGetText() {\n assertEquals(\"Text should be got correctly.\", textField.getText(), text);\n }",
"private boolean setText(View viewToBeDeleted, TextView view, String text) {\n if (text == null || NULL_STRINGS.contains(text)) {\n viewToBeDeleted.setVisibility(View.GONE);\n return false;\n } else {\n view.setText(text.trim());\n return true;\n }\n }",
"@Override\n public String setText(Selector obj, String text) throws UiObjectNotFoundException {\n return null; //To change body of implemented methods use File | Settings | File Templates.\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Writes a byte array to a file creating the file if it does not exist. NOTE: As from v1.3, the parent directories of the file will be created if they do not exist. | public static void writeByteArrayToFile( final File file, final byte[] data ) throws IOException
{
writeByteArrayToFile( file, data, false );
} | [
"static void writeContents(File file, byte[] bytes) {\n try {\n if (file.isDirectory()) {\n throw\n new IllegalArgumentException(\"cannot overwrite directory\");\n }\n Files.write(file.toPath(), bytes);\n } catch (IOException excp) {\n throw new IllegalArgumentException(excp.getMessage());\n }\n }",
"public static final void writeToFile(File file, byte[] data) {\n if (file == null || data == null) {\n return;\n }\n ensureParent(file);\n FileOutputStream fos = null;\n try {\n fos = new FileOutputStream(file);\n fos.write(data);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n IoUtils.closeQuietly(fos);\n }\n }",
"public static void write(File file, byte[] data){\n\t\tFileOutputStream fileOuputStream = null;\n\n try {\n fileOuputStream = new FileOutputStream(file);\n fileOuputStream.write(data);\n\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (fileOuputStream != null) {\n try {\n fileOuputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\t}",
"public static void writeBinaryFile(File file, byte[] data) throws IOException\n {\n file.createNewFile();\n FileOutputStream out = new FileOutputStream(file);\n out.write(data);\n out.close();\n }",
"void writeBytes(int fileOffset, byte[] buffer, int bufferOffset, int dataLength) throws IOException;",
"public static String writeFile(byte[] array, String outputFileName) throws IOException {\n InputStream in = new ByteArrayInputStream(array);\n try {\n return writeStreamToFile(in, outputFileName);\n } finally {\n in.close();\n }\n }",
"@Test\n public void outOfOrderWrite() throws Exception {\n AlluxioURI filePath = new AlluxioURI(PathUtils.uniqPath());\n // A length greater than 0.5 * BUFFER_BYTES and less than BUFFER_BYTES.\n int length = (BUFFER_BYTES * 3) / 4;\n try (FileOutStream os = mFileSystem.createFile(filePath, CreateFilePOptions.newBuilder()\n .setWriteType(mWriteType.toProto()).setRecursive(true).build())) {\n // Write something small, so it is written into the buffer, and not directly to the file.\n os.write((byte) 0);\n // Write a large amount of data (larger than BUFFER_BYTES/2, but will not overflow the buffer.\n os.write(BufferUtils.getIncreasingByteArray(1, length));\n }\n if (mWriteType.getAlluxioStorageType().isStore()) {\n checkFileInAlluxio(filePath, length + 1);\n }\n if (mWriteType.getUnderStorageType().isSyncPersist()) {\n checkFileInUnderStorage(filePath, length + 1);\n }\n }",
"void writeByteArray(ByteArray array);",
"public static void writeBytesToFile( byte[] ba, String fn ) throws IOException\r\n {\r\n File f = new File( fn );\r\n f.createNewFile();\r\n\r\n FileOutputStream fos = null;\r\n ByteArrayInputStream bis = null;\r\n\r\n try\r\n {\r\n fos = new FileOutputStream( f );\r\n bis = new ByteArrayInputStream( ba );\r\n transferBytesToEndOfStream( bis, fos, CLOSE_IN | CLOSE_OUT );\r\n System.gc();\r\n }\r\n catch( FileNotFoundException e )\r\n {\r\n throw new RuntimeException( \"File not found when writing: \", e );\r\n // should never happen\r\n }\r\n\r\n }",
"static void writeByte(byte[] bytes){ \n\t try { \n\t \n\t // Initialize a pointer \n\t // in file using OutputStream \n\t OutputStream os = new FileOutputStream(file); \n\t \n\t // Starts writing the bytes in it \n\t os.write(bytes); \n\t System.out.println(\"Successfully\"+ \" byte inserted\"); \n\t // Close the file \n\t os.close(); \n\t } \n\t \n\t catch (Exception e) { \n\t System.out.println(\"Exception: \" + e); \n\t } \n\t }",
"public void appendFile(byte[] content) throws IOException {\r\n\t\tappendFile(false, content);\r\n\t}",
"public void writeFile() throws IOException {\n EncryptUtil.writeFile(this.data, this.path);\n }",
"public abstract void write(byte[] b);",
"public void write(byte b[]) throws IOException;",
"public abstract OutputStream createOutputStream() throws IOException, FileCreationException;",
"public static void writeBytes(final String aFileName,\n final byte[] aValue) throws IOException {\n writeBytes(aFileName, aValue, false);\n }",
"public abstract int write(byte[] bytes) throws IOException;",
"public static void writeFile(\n FileSystem fs, Path p, byte[] bytes, long blockSize)\n throws IOException {\n if (fs.exists(p)) {\n fs.delete(p, true);\n }\n try (InputStream is = new ByteArrayInputStream(bytes);\n FSDataOutputStream os = fs.create(\n p, false, 4096, fs.getDefaultReplication(p), blockSize)) {\n IOUtils.copyBytes(is, os, bytes.length);\n }\n }",
"public void writeBytes(byte[] b) throws IOException {\n\t\tbaos.writeBytes(b);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if is history chess manual. | public static boolean isHistoryChessManual(ChessManual chessManual) {
if (chessManual == null || chessManual.getSgfUrl() == null) {
return false;
}
ArrayList<ChessManual> chessManuals = getHistoryChessManualCaches();
for (ChessManual cManual : chessManuals) {
if (chessManual.equals(cManual)) {
return true;
}
}
return false;
} | [
"@DISPID(10) //= 0xa. The runtime will prefer the VTID if present\n @VTID(24)\n boolean isHistory();",
"public static boolean isFavoriteChessManual(ChessManual chessManual) {\r\n\t\tif (chessManual == null || chessManual.getSgfUrl() == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tArrayList<ChessManual> chessManuals = getFavoriteChessManualCaches();\r\n\t\tfor (ChessManual cManual : chessManuals) {\r\n\t\t\tif (chessManual.equals(cManual)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@DISPID(10) //= 0xa. The runtime will prefer the VTID if present\n @VTID(25)\n void isHistory(\n boolean pVal);",
"public boolean isCanGoBack() {\r\n return !history.isEmpty();\r\n }",
"public boolean canUndo() {\r\n\t\tif (aiExists && ai.getTurn() == WHITE){\r\n\t\t\treturn moveHistory.size() > 1;\r\n\t\t}\r\n\t\treturn !moveHistory.isEmpty();\r\n\t}",
"private boolean historyWorkflow(String workflow) {\n boolean worthHistory = false;\n String [] validWorkflows = {\"ViewModels\", \"ViewModel\", \"ViewStrains\", \"ViewStrain\", \"ViewUser\", \"ViewGenes\", \"ViewGene\", \"ViewGeneticBackgroundValues\", \"ViewAvailableGeneticBackgrounds\", \"ViewRepositories\", \"DisseminationUpdate\", \"SearchKeywordFast\", \"ViewSimpleLogs\", \"ViewPhenotypeOntology\", \"ViewStrainAllele\"};\n for(int i=0; i < validWorkflows.length; i++){\n if(workflow.compareTo(validWorkflows[i])==0){\n worthHistory = true;\n return worthHistory;\n }\n }\n return worthHistory;\n }",
"public boolean historyExists() {\n return schemaHistory.exists();\n }",
"boolean isSetFamilyHistory();",
"public static ArrayList<ChessManual> getHistoryChessManualCaches() {\r\n\t\tif (shouldUpdateHistoryCache) {\r\n\t\t\tmHistoryChessManualCaches = getAllHistoryChessManual();\r\n\t\t\tshouldUpdateHistoryCache = false;\r\n\t\t}\r\n\t\treturn mHistoryChessManualCaches;\r\n\t}",
"public boolean hasPrevious() {\n return history.size() > 0 && pointer > 0;\n }",
"public boolean useHistoryAnomaly() {\n return false;\n }",
"public boolean checkVehicleHistory() throws Exception {\n List<MovingViolationInfo> movingViolationInfoList\n = localPerspectiveDriver.getVehicleHistory().getMovingViolationInfoList();\n for (int i = 0; i < movingViolationInfoList.size(); i++) {\n if (computeMonth(movingViolationInfoList.get(i).getDateInfo().toString()) <= 6) {\n return false;\n }\n }\n List<Crash> crashList\n = localPerspectiveDriver.getVehicleHistory().getCrashList();\n for (int i = 0; i < crashList.size(); i++) {\n if (computeMonth(crashList.get(i).getDate().toString()) <= 6) {\n return false;\n }\n }\n return true;\n }",
"boolean hasPwdHistory();",
"private boolean checkExpression(String expression, boolean history) {\n try {\n Statement stat = conn.createStatement();\n ResultSet rs;\n if(history)\n rs = stat.executeQuery(\"SELECT * FROM history WHERE expression = '\" + expression + \"';\");\n else\n rs = stat.executeQuery(\"SELECT * FROM expressions WHERE expression = '\" + expression + \"';\");\n return rs.next();\n } catch (SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n System.exit(0);\n return false;\n }\n }",
"boolean hasHideFromWatchHistory();",
"protected boolean showHistory(final FrameContainer target) {\n final String descriptor;\n \n if (target instanceof Channel) {\n descriptor = target.getName();\n } else if (target instanceof Query) {\n final Parser parser = target.getConnection().getParser();\n descriptor = parser.getClient(((PrivateChat) target).getHost()).getNickname();\n } else {\n // Unknown component\n return false;\n }\n \n final Path log = Paths.get(getLogFile(descriptor));\n \n if (!Files.exists(log)) {\n // File doesn't exist\n return false;\n }\n \n final ReverseFileReader reader;\n\n try {\n reader = new ReverseFileReader(log);\n } catch (IOException | SecurityException ex) {\n return false;\n }\n\n final HistoryWindow window = new HistoryWindow(\"History\", reader, target, urlBuilder,\n eventBus, colourManagerFactory, historyLines);\n windowManager.addWindow(target, window);\n \n return true;\n }",
"public Boolean inHistory(Integer attempt) { return this.history.contains(attempt); }",
"public boolean getHistoryVisibility() {\n return historyVisible;\n }",
"public synchronized static ChessManual getHistoryChessManual(\r\n\t\t\tChessManual chessManual) {\r\n\t\tif (TextUtils.isEmpty(chessManual.getSgfUrl())) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tCursor cursor = null;\r\n\t\tSQLiteDatabase db = mDbOpenHelper.getReadableDatabase();\r\n\t\tString sql = \"select * from \" + DBOpenHelper.HISTORY_TABLE_NAME\r\n\t\t\t\t+ \" where sgfUrl = ?\";\r\n\t\tif (db == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tChessManual newChessManual = null;\r\n\t\ttry {\r\n\t\t\tcursor = db.rawQuery(sql, new String[] { chessManual.getSgfUrl() });\r\n\t\t\tif (cursor != null && cursor.moveToFirst()) {\r\n\t\t\t\tnewChessManual = new ChessManual();\r\n\t\t\t\tnewChessManual.setId(cursor.getInt(0));\r\n\t\t\t\tnewChessManual.setSgfUrl(cursor.getString(1));\r\n\t\t\t\tnewChessManual.setBlackName(cursor.getString(2));\r\n\t\t\t\tnewChessManual.setWhiteName(cursor.getString(3));\r\n\t\t\t\tnewChessManual.setMatchName(cursor.getString(4));\r\n\t\t\t\tnewChessManual.setMatchResult(cursor.getString(5));\r\n\t\t\t\tnewChessManual.setMatchTime(cursor.getString(6));\r\n\t\t\t\tnewChessManual.setCharset(cursor.getString(7));\r\n\t\t\t\tnewChessManual.setSgfContent(cursor.getString(8));\r\n\t\t\t\tnewChessManual.setType(cursor.getInt(9));\r\n\t\t\t\tnewChessManual.setGroupId(cursor.getInt(10));\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tif (cursor != null) {\r\n\t\t\t\tcursor.close();\r\n\t\t\t}\r\n\t\t\tif (db != null) {\r\n\t\t\t\tdb.close();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn newChessManual;\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of passOrPlay method, of class Game. | @Test
public void testPassOrPlay() {
System.out.println("passOrPlay");
Game instance = new Game(new euchreGUI(), new Deck());
instance.passOrPlay();
} | [
"@Test\n public void testPickItUpOrPass() {\n System.out.println(\"pickItUpOrPass\");\n Game instance = new Game(new euchreGUI(), new Deck());\n instance.startGame(1, 1, 1);\n instance.pickItUpOrPass();\n }",
"public void pass() {\n\t\tgame.pass();\n\n\t}",
"@Test\n public void testInGame() {\n Player player;\n boolean expResult,result;\n \n \n player = new Player(1, Player.PlayerType.advanced_ai, \"aa1\", conn);\n expResult = true;\n result = player.inGame();\n assertEquals(expResult, result);\n \n player = new Player(1, Player.PlayerType.ai, \"a1\", conn);\n expResult = true;\n result = player.inGame();\n assertEquals(expResult, result);\n \n player = new Player(1, Player.PlayerType.human, \"h11\", conn);\n expResult = true;\n result = player.inGame();\n assertEquals(expResult, result);\n \n player = new Player(1, Player.PlayerType.none, \"n11\", conn);\n expResult = false;\n result = player.inGame();\n assertEquals(expResult, result);\n \n \n System.out.println(\"inGame: PASED\");\n }",
"@Test\n public void testSelectTrumpOrPass() {\n System.out.println(\"selectTrumpOrPass\");\n Game instance = new Game(new euchreGUI(), new Deck());\n instance.startGame(1, 1, 1);\n instance.selectTrumpOrPass();\n }",
"@Test\r\n\tpublic void testPassedGo() {\r\n\t\tBoard board = new Board(validSquareLocations); // board needs to have squares for this to be tested\r\n\t\tboolean actualPassedGo;\r\n\t\tactualPassedGo = board.passedGo(validCurrentPosition, validDieValue);\r\n\t\tassertEquals(actualPassedGo, expectedPassedGo);\r\n\t}",
"@Test\r\n public void ss(){\r\n playGame.play();\r\n }",
"@Test\n public void testPlayerPassed() {\n System.out.println(\"playerPassed\");\n Game instance = new Game(new euchreGUI(), new Deck());\n instance.playerPassed();\n }",
"@Test\n public final void testPlayer2Win() {\n checkPlayerWin(player2);\n }",
"@Test\n public void testStartGame() {\n System.out.println(\"startGame\");\n GameLogic instance = new GameLogic();\n boolean expresult1 = instance.GAME_ON;\n boolean expresult2 = instance.LOSER;\n instance.startGame();\n \n assertFalse(expresult1);\n assertFalse(expresult2);\n assertTrue(instance.GAME_ON);\n assertFalse(instance.LOSER);\n \n \n }",
"@Test\n public final void testPlayer1Win() {\n checkPlayerWin(player1);\n }",
"@Test\n public void testTakeTurn() {\n// System.out.println(\"takeTurn\");\n// GameSession instance = null;\n// instance.takeTurn();\n// // TODO review the generated test code and remove the default call to fail.\n// fail(\"The test case is a prototype.\");\n }",
"@Test\n public void testWhoIsOnTurn() {\n Assertions.assertEquals('O', GameUtil.whoIsOnTurn(0), \"Test - 0 returns player O\");\n Assertions.assertEquals('X', GameUtil.whoIsOnTurn(1), \"Test - 1 returns player X\");\n Assertions.assertEquals('O', GameUtil.whoIsOnTurn(2), \"Test - 2 returns player O\");\n Assertions.assertEquals('X', GameUtil.whoIsOnTurn(3), \"Test - 3 returns player X\");\n Assertions.assertEquals('O', GameUtil.whoIsOnTurn(4), \"Test - 4 returns player O\");\n Assertions.assertEquals('X', GameUtil.whoIsOnTurn(5), \"Test - 5 returns player X\");\n Assertions.assertEquals('O', GameUtil.whoIsOnTurn(6), \"Test - 6 returns player O\");\n Assertions.assertEquals('X', GameUtil.whoIsOnTurn(7), \"Test - 7 returns player X\");\n Assertions.assertEquals('O', GameUtil.whoIsOnTurn(8), \"Test - 8 returns player O\");\n }",
"@Test\n\tpublic void testStartGame2() {\n\t\tKablewie tester = new Kablewie();\t\t\n\t\tassertEquals(\"Test if input is not valid\",true,tester.startGame(\n\t\t\t\tm_interactingClass.createBoard(),\n\t\t\t\tm_interactingClass.createPlayer(),\n\t\t\t\tm_interactingClass.createMainMenu()));\t\n\n\t}",
"public void nextPlayerPass();",
"boolean isGameComplete();",
"@Test\n\tpublic void testStartLoadedGame2() {\n\t\tKablewie tester = new Kablewie();\t\n\t\tString time = \"00:00:07\";\n\t\tassertEquals(\"Test if input is not valid\",true,tester.startLoadedGame(\n\t\t\t\tm_interactingClass.createBoard(),\n\t\t\t\tm_interactingClass.createPlayer(),time));\t\n\n\t}",
"@Test\n public void testIsGameOver() {\n this.testGame.startGame(this.deck, 8, 4, false);\n assertEquals(false, this.testGame.isGameOver());\n }",
"@Test\n public void testGameOver() {\n System.out.println(\"gameOver\");\n Game instance = new Game(pioche, plateau, p1, p2);\n boolean expResult = false;\n boolean result = instance.gameOver();\n assertEquals(expResult, result);\n }",
"public abstract boolean gameRule(Fight fight);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
_pdbx_phasing_MAD_set_site.atom_type_symbol records the name of site obtained from MAD phasing. | public StrColumn getAtomTypeSymbol() {
return delegate.getColumn("atom_type_symbol", DelegatingStrColumn::new);
} | [
"public String getAtom_type() {\n return atom_type;\n }",
"public String getSymbolType() {\n return symbolType;\n }",
"public SymbolType getSymbolType() {\n return symbolType;\n }",
"public void setAtom_type(String atom_type) {\n this.atom_type = atom_type;\n }",
"public SymbolType symbolType();",
"public void setPymntTypNm( String pymntTypNm )\n {\n this.pymntTypNm = pymntTypNm;\n }",
"public void setSymbolType(String symbolType) {\n this.symbolType = symbolType == null ? null : symbolType.trim();\n }",
"int getSymptomTypeValue();",
"Type(char symbol)\n {\n this.symbol = symbol;\n }",
"public BNFSymbolType getType() {\n\t\treturn type;\n\t}",
"public java.lang.String getSiteType() {\n return siteType;\n }",
"public String getpymttype() {\n return (String) getAttributeInternal(PYMTTYPE);\n }",
"java.lang.String getAsmType();",
"com.google.cloud.tpu.v1.Symptom.SymptomType getSymptomType();",
"SymbolName getSymbolName();",
"TerminalSymbol getType();",
"public abstract SiteType getType();",
"public java.lang.String getSigmaSymbol() {\n java.lang.Object ref = sigmaSymbol_;\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 sigmaSymbol_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getSigmaSymbolBytes() {\n java.lang.Object ref = sigmaSymbol_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n sigmaSymbol_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Registers a listener that will be called when the dock divider changes its visibility or when the docked stack gets added/removed. | void registerDockedStackListener(IDockedStackListener listener); | [
"public void dockNodeDocked(DockNodeEvent e) {}",
"public void dockNodeFloated(DockNodeEvent e) {}",
"void registerLabelVisibilityListener(Listener listener);",
"interface Listener {\n void onVisibilityChanged(boolean showLabels);\n }",
"public void register(VisibilityChange callback) {\n visibilityChange = callback;\n }",
"public void dockNodeClosed(DockNodeEvent e) {}",
"void addChangeListener( RegistryListener listener );",
"public interface csIDockPaneListener {\n /**\n * Hide pane.\n * @param pane The pane\n */\n public void hidePane( csDockPane pane );\n /**\n * Close pane.\n * @param pane The pane\n */\n public void closePane( csDockPane pane );\n /**\n * Dock pane.\n * @param pane The pane\n */\n public void dockPane( csDockPane pane, boolean dock );\n /**\n * Maximize pane. (=hide all other panes)\n * @param pane The pane\n */\n public void maximizePane( csDockPane pane );\n /**\n * Show or hide scrollbars.\n * @param showScrollbars Pass 'true' if scrollbars shall be shown.\n */\n public void scrollbars( boolean showScrollbars );\n}",
"public synchronized void addMIBJPanelEvent(org.netsnmp.swingui.MIBJPanelListener listener) {\n if (listenerList == null ) {\n listenerList = new javax.swing.event.EventListenerList();\n }\n listenerList.add(org.netsnmp.swingui.MIBJPanelListener.class, listener);\n }",
"void addTypeHierarchyChangedListener(ITypeHierarchyChangedListener listener);",
"public void addSidePaneListener(SidePaneListener l) {\n if (initListenerList(true)) {\n if (!JideSwingUtilities.isListenerRegistered(listenerList, SidePaneListener.class, l)) {\n listenerList.add(SidePaneListener.class, l);\n }\n }\n }",
"@Override\n public void setListener(@NonNull final ExpandableLayoutListener listener) {\n this.listener = listener;\n }",
"public void registerListeners() {\n this.modelListener = changeEvent -> {\n if (AnimationConfigurationManager.getInstance().isAnimationAllowed(\n AnimationFacet.GHOSTING_ICON_ROLLOVER, comp)) {\n trackModelChange(AnimationFacet.GHOSTING_ICON_ROLLOVER, buttonModel.isRollover());\n }\n if (AnimationConfigurationManager.getInstance().isAnimationAllowed(\n AnimationFacet.GHOSTING_BUTTON_PRESS, comp)) {\n trackModelChange(AnimationFacet.GHOSTING_BUTTON_PRESS, buttonModel.isPressed());\n }\n };\n this.buttonModel.addChangeListener(this.modelListener);\n this.comp.putClientProperty(GHOST_LISTENER_KEY, this);\n }",
"void addListener(IViewListener listener);",
"public void addContainerListener(ContainerListener listener);",
"public void register() {\n\t\tworkbenchWindow.getPartService().addPartListener(this);\n\t}",
"final public void addChartDrillDownListener(\n ChartDrillDownListener listener)\n {\n addFacesListener(listener);\n }",
"protected void installListeners()\n {\n menuBar.addContainerListener(containerListener);\n menuBar.addPropertyChangeListener(propertyChangeListener);\n }",
"public void registerFoldListener(final FoldListener foldListener)\n {\n JHelpFoldable2D.this.mutex.lock();\n this.listeners.add(foldListener);\n JHelpFoldable2D.this.mutex.unlock();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check rover position within boundary. | @Test
public void checkRoverPositionOutOfBoundary() {
// First set the position and direction
r.setPosX(4);
r.setPosY(4);
r.setInputSignal("MMMMMMMMMMMMMM");
r.move();
Assert.assertTrue(r.getResult().equals(Constants.OUT_OF_BOUNDARY));
} | [
"private boolean isMoveToLocationWithinPlateauBoundary() {\r\n\t\tfinal int maxX = plateau.getUpperRight().getXcoordinate();\r\n\t\tfinal int maxY = plateau.getUpperRight().getYcoordinate();\r\n\t\tfinal int minX = plateau.getLowerLeft().getXcoordinate();\r\n\t\tfinal int minY = plateau.getLowerLeft().getYcoordinate();\r\n\t\tfinal int currentX = getMoveToLocation().getXcoordinate();\r\n\t\tfinal int currentY = getMoveToLocation().getYcoordinate();\r\n\t\treturn currentX >= minX && currentX <= maxX && currentY < maxY && currentY >= minY;\r\n\t}",
"private boolean isObstacleThereR(){\n leftSensor = leftUsDist(); \n if(leftSensor<Constants.OBSTACLE_DIST){\n return true;\n }\n return false;\n }",
"protected abstract void checkIfPosIsHole();",
"private boolean checkBoundaries(int xPos, int yPos)\n\t{\n\t\tboolean isOutside = false;\n\t\tif ((xPos >= FRAME_SIZE || xPos <= 0)\n\t\t\t\t|| (yPos >= FRAME_SIZE || yPos <= 0))\n\t\t{\n\t\t\tisOutside = true;\n\t\t}\n\t\treturn isOutside;\n\t}",
"private boolean IfInRange(Taxi t, Request r){\n\t\tif(t.getCurrentPlace_x() >= r.getStart_x() - 2 && t.getCurrentPlace_x() <= r.getStart_x() + 2 &&\n\t\t\tt.getCurrentPlace_y() >= r.getStart_y() - 2 && t.getCurrentPlace_y() <= r.getStart_y() + 2)\n\t\t\treturn true;\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}",
"protected abstract boolean checkLocation( StitchingFromMotion2D.Corners corners );",
"@Override\n public boolean carInside(int room_width,int room_length) {\t\n \treturn (getPosition().x >= 0) && (getPosition().x < room_length) && (getPosition().y >= 0) && (getPosition().y < room_width );\n }",
"public boolean checkBallOutLeftRight() {\n //if ball is out of left and right\n if (x <= -radius || x >= GameView.width + radius) {\n out = true;\n return true;\n }\n return false;\n }",
"private boolean checkHitRight() {\n return getXCoordinate() + getWidth() >= getPongGameManager().getScreenWidth();\n }",
"private void checkRanges(float [] obj_pos){\n //Euclidean distance\n float distance = (float)Math.sqrt(((obj_pos[0]-x)*(obj_pos[0]-x)) + ((obj_pos[1]-y)*(obj_pos[1]-y)) +\n ((obj_pos[2]-z)*(obj_pos[2]-z)));\n if (distance <= mining_range){\n addBelief(\"within_range(Asteroid)\");\n\n }\n }",
"private boolean checkBoundaries(int x, int y){\n Container.get().getMapSize();\n if(x<Container.get().getMapSize() && x>=0 && y<Container.get().getMapSize() && y>=0){\n return true;\n }\n return false;\n }",
"public boolean inBox(double xLo, double xHi, double yLo, double yHi)\n {\n // check to see if it lies in the bounds\n return (xcoord >= xLo && xcoord <= xHi && ycoord >= yLo && ycoord <= yHi);\n }",
"boolean isWithinBounds(BlockPos pos);",
"public boolean atWestBoundary(){\n if(position.x < 0 ){\n return true;\n }\n return false;\n }",
"private static boolean withinArea(Point dronePos) {\r\n\t\tvar droneLat = dronePos.latitude();\r\n\t\tvar droneLon = dronePos.longitude();\r\n\t\treturn droneLat<latUB && droneLat>latLB && droneLon<lonUB && droneLon>lonLB;\r\n\t}",
"public abstract boolean isInside(int x, int y);",
"private boolean inside(int x, int y, Box b){\n\t\tif (x >= b.x && x < b.x+b.width){\n\t\t\tif (y >= b.y && y < b.y+b.width){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"@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 insideOf(Point p) {\n double e = 0.0001;\n //check if it contains the x and y values that are withing the rect.\n Line bottomSide = new Line(downLeft, downRight);\n Line leftSide = new Line(upperLeft, downLeft);\n if ((bottomSide.contains(p, \"x\")) && (leftSide.contains(p, \"y\"))) {\n return true;\n }\n return false;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given an outbound message and an input stream, creates and return an XMLStreamWriter for the supported payload type. | public XMLStreamWriter getXMLStreamWriter(OutboundMessage msg, List<Class> paramTypes,
OutputStream out) throws ServiceException; | [
"OutputStream createStream(String location);",
"@Override\n\tpublic XMLStreamWriter asXMLStreamWriter(SerializeOpts opts) throws SaxonApiException, IOException {\n\t\tSerializer ser = Util.getSerializer(opts);\n\t\tser.setOutputStream(asOutputStream(opts));\n\n\n\n\t\t StreamWriterToReceiver sw = ser.getXMLStreamWriter();\n\t\t // DAL: Saxon 9.6 is more picky about namespaces\n\t\t sw.setCheckValues(false);\n\t\treturn sw;\n\n\n\n\n\t}",
"public StreamHandler createStreamHandler (OutputStream outStream) {\r\n\t\t\t\t\t\r\n\t\tStreamHandler streamHandler = null;\r\n\r\n\t\ttry {\r\n\t\t\t\t \t\r\n\t\t\tstreamHandler = new StreamHandler(outStream, new SimpleFormatter());\r\n\t\t\t\t\t\t\r\n\t\t} catch (SecurityException e) {\r\n\t\t\t\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\t\t \r\n\t\t\treturn streamHandler;\r\n\t}",
"private void createOutputStream() {\n try {\n output = new DataOutputStream(socket.getOutputStream());\n } catch (IOException e) {\n throw new StreamException(\"Couldn't create output stream\");\n }\n }",
"public XStream getXStreamWriter() {\n\n XStream xstream = new XStream();//new Sun14ReflectionProvider(new FieldDictionary(sorter)));\n\n customizeXstream(xstream);\n\n return xstream;\n }",
"public abstract AbstractLineWriter newWriter(OutputStream datastream)\r\n\t\t\tthrows IOException;",
"public String addStream(long deviceId, int channelId, String streamName, String outputType, String source, String sourceType) throws org.apache.thrift.TException;",
"public abstract AbstractLineWriter newWriter(OutputStream datastream)\n\t\t\tthrows IOException;",
"public XMLStreamReader2 createStax2Reader(InputStream in)\n throws XMLStreamException\n {\n return wrapIfNecessary(_staxFactory.createXMLStreamReader(in));\n }",
"@NotNull\n RecordId writeStream(@NotNull InputStream stream) throws IOException;",
"StreamType streamType();",
"public boolean XMLwrite( OutputStream stream, int mode );",
"public interface SSMLBytesStream {\n\t/**\n\t * Get the (default) encoding.\n\t * This is the default encoding for writeTo() methods (except the 3-parameters).\n\t * @return An explicit encoding for writeTo() methods\n\t * or <code>null</code> (=> use the machine default and no encoding in the xml declaration)\n\t */\n\tCharset getEncoding();\n\n\t/**\n\t * Write the SSML byte[]\n\t * with the <?xml ... ?> declaration\n\t * using the default encoding (if any).\n\t * @throws IOException\n\t * @return\tnumber of written bytes\n\t */\n\tint writeTo(OutputStream out) throws IOException;\n\n\t/**\n\t * A SSMLBytesStream with the possibility to manage the xml declaration and encoding. \n\t *\n\t */\n\tpublic interface SSMLBytesStreamPlus extends SSMLBytesStream {\n\n\t\t/**\n\t\t * Write the SSML byte[]\n\t\t * using a specific encoding.\n\t\t * @param withXmlDecl\tprepend the <?xml ... ?> declaration (with encoding).\n\t\t * @param enc\t(optional) explicit SSML encoding.\n\t\t * \tIf <code>null</code> the default machine encoding will be used.\n\t\t * @throws IOException\n\t\t * @return\tnumber of written bytes\n\t\t */\n\t\tint writeTo(OutputStream out, boolean withXmlDecl, Charset enc) throws IOException;\n\n\t\t/**\n\t\t * Write the SSML byte[]\n\t\t * using the default encoding (if any).\n\t\t * @param withXmlDecl\tprepend the <?xml ... ?> declaration (with encoding).\n\t\t * @throws IOException\n\t\t * @return\tnumber of written bytes\n\t\t */\n\t\tint writeTo(OutputStream out, boolean withXmlDecl) throws IOException;\n\t}\n\n}",
"OutboundMessage createOutboundMessage();",
"public java.io.OutputStream openOutputStreamElement(\n java.lang.String streamName) throws java.io.IOException {\n \treturn null;\n }",
"public com.vodafone.global.er.decoupling.binding.request.PayloadType createPayloadType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.PayloadTypeImpl();\n }",
"public void setOutboundPayload(Payload.Outbound newOutboundPayload);",
"public interface FileWriterStreamFactory extends FileWriter {\n /**\n * Get an output stream for the file fileName.\n * @param parentAbsolutePath the parent directory.\n * @param fileName the file to write to.\n * @param exclusive if true, throw exception if file already exist.\n * @param append if true, append stream at the end of file.\n * @param additionalArgs adaptor specific arguments\n * @return an output stream.\n * @throws BadParameterException if parentAbsolutePath is not a directory.\n * @throws AlreadyExistsException if fileName already exists and exclusive and append are both false.\n * @throws ParentDoesNotExist if parentAbsolutePath does not exist.\n */\n public OutputStream getOutputStream(String parentAbsolutePath, String fileName, boolean exclusive, boolean append, String additionalArgs)\n throws PermissionDeniedException, BadParameterException, AlreadyExistsException, ParentDoesNotExist, TimeoutException, NoSuccessException;\n}",
"GenericSink createGenericSink();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
rpc error2(.hadoop.common.EmptyRequestProto) returns (.hadoop.common.EmptyResponseProto); | public abstract void error2(
com.google.protobuf.RpcController controller,
org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request,
com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto> done); | [
"public abstract void error2(\n com.google.protobuf.RpcController controller,\n org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request,\n com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto> done);",
"public abstract void error(\n com.google.protobuf.RpcController controller,\n org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request,\n com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto> done);",
"protodef.b_error.info getError();",
"public abstract void error(\n com.google.protobuf.RpcController controller,\n org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request,\n com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto> done);",
"com.google.rpc.StatusOrBuilder getErrorOrBuilder();",
"protodef.b_error.infoOrBuilder getErrorOrBuilder();",
"public abstract void ping2(\n com.google.protobuf.RpcController controller,\n org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request,\n com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto> done);",
"com.google.rpc.Status getError();",
"com.spark.dialect.generated.proto.PbExample.PbExampleResponse.STATUS getStatus();",
"public abstract void ping2(\n com.google.protobuf.RpcController controller,\n org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request,\n com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto> done);",
"net.iGap.proto.ProtoResponse.Response getResponse();",
"grpc.UploadNoticeServiceOuterClass.ProcessingResponse.Result getResult();",
"void reportHeartbeatRpcFailure();",
"private EmptyResponseProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"in.trujobs.proto.GetJobPostDetailsResponse.Status getStatus();",
"cn.iopig.feed.scale.grpc.ErrCode getErrCode();",
"com.cst14.im.protobuf.ProtoClass.StatusCode getResponseState();",
"public abstract void ping(\n com.google.protobuf.RpcController controller,\n org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request,\n com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto> done);",
"messages.Statusmessage.StatusMessageOrBuilder getStatusOrBuilder();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ This method creates the IntakeOwnerForm gui. | public void createIntakeOwnerForm(){
Stage ownerForm = new Stage();
Parent root;
try {
root = FXMLLoader.load(getClass().getClassLoader().getResource("IntakeOwnerFormGUI.fxml"));
OwnerController ownerController = new OwnerController();
ownerController.setPetIDNumber(cageCard.getPetID());
Scene scene = new Scene (root, 740, 600);
ownerForm.setScene(scene);
ownerForm.show();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} | [
"public OwnerViewForm() {\n initComponents();\n }",
"public CreateAccount_GUI() {\n initComponents();\n }",
"public EnterDetailsGUI() {\n initComponents();\n }",
"public InventoryGUI () {\n\t\tthis.buildGUI();\n\t}",
"private void makeGUI()\n {\n mainFrame = new JFrame();\n mainFrame.setPreferredSize(new Dimension(750,400));\n aw = new AccountWindow();\n mainFrame.add(aw);\n mainFrame.setVisible(true);\n mainFrame.pack();\n }",
"public OffertoryGUI() {\n initComponents();\n setTypes();\n }",
"public AccountGUI() {\n initComponents();\n setVisible(true);\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n pack();\n setResizable(false);\n }",
"public AddGUI() {\n initComponents();\n setSize(1250, 1080);\n this.setTitle(\"Election Candidates Record Management\");\n }",
"public InfluenceGUI() {\n \n \n super(); \n modelCounter=0;\n init();\n \n \n\n }",
"private void createAndShowGUI(Properties appProperties) {\n //Create and set up the window.\n viewerFrame = new ViewerFrame(\"Ephrin - Proteomics Project Tracker\", instance, retrieveSortOptions(),\n retrieveCategories(), retrieveRecordUnits());\n }",
"public BuyUI() {\n initComponents();\n }",
"private void createPersonForm() {\n windowPerson = new Window();\n createWindowCenter(windowPerson, widthPersonWin, heightPersonWin, constants.person());\n windowPerson.addItem(addFormPerson(\"[\" + constants.name() + \"]\", \"-\", \"-\", true, ADD));\n configureFormWindow(windowPerson);\n errorMessage.setVisible(false);\n windowPerson.addItem(errorMessage);\n }",
"protected void createAndShowGUI() {\n\t //Create and set up the window.\n\t\t \tjframe.setTitle(\"Tags Catalog\");\n\t jframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); \n\t jframe.pack();\n\t jframe.setVisible(true);\n\t }",
"private void createGUI() {\n\t\tPreferenceScreen screen = getPreferenceManager().createPreferenceScreen(this);\n\t\tsetPreferenceScreen(screen);\n\n\t\tcreateProviderCategory(screen);\n\t\tcreateUICategory(screen);\n\t\tcreateFeatureDetectionCategory(screen);\n\t\tcreateLivePreviewCategory(screen);\n\t}",
"public ViewMyInfoOwner() {\n initComponents();\n ManageLabels();\n }",
"private void buildDialog()\n {\n setMinimumSize( new Dimension( 640, 480 ) );\n\n final JComponent settingsPane = createSettingsPane();\n final JComponent ioPane = createIOPane();\n\n final JPanel contentPane = new JPanel( new GridBagLayout() );\n contentPane.add( settingsPane, //\n new GridBagConstraints( 0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.NORTH, GridBagConstraints.NONE, new Insets( 2,\n 0, 2, 0 ), 0, 0 ) );\n\n contentPane.add( ioPane, //\n new GridBagConstraints( 1, 0, 1, 1, 1.0, 1.0, GridBagConstraints.NORTH, GridBagConstraints.BOTH, new Insets( 2,\n 0, 2, 0 ), 0, 0 ) );\n\n final JButton closeButton = ToolUtils.createCloseButton();\n\n final JComponent buttonPane = SwingComponentUtils.createButtonPane( closeButton );\n\n SwingComponentUtils.setupDialogContentPane( this, contentPane, buttonPane );\n\n pack();\n }",
"public InvUI() {\n initComponents();\n }",
"public HetmetprojectGUI() {\n initComponents();\n \n \n \n }",
"private void buildGui() {\r\n\t\tif ( repProc.replay.trackerEvents == null ) {\r\n\t\t\taddNorth( new XLabel( \"Precise Build Order information is available only from replay version 2.0.8. This replay has version \"\r\n\t\t\t + repProc.replay.header.versionString( false ) + \".\" ).boldFont().allBorder( 10 ).color( Color.RED ) );\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif ( repProc.replay.getBalanceData() == null ) {\r\n\t\t\taddNorth(\r\n\t\t\t new XLabel( \"Precise Build Order information requires Balance Data which is not available for this replay version. This replay has version \"\r\n\t\t\t + repProc.replay.header.versionString( false ) + \".\" ).boldFont().allBorder( 10 ).color( Color.RED ) );\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\ttable = new XTable();\r\n\t\taddCenter( table.createWrapperBox( true, table.createToolBarParams( this ) ) );\r\n\t\t\r\n\t\trebuildTableData();\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Install a given resource in a given URL. | public void install(URL resource, URL dest, String format, String version) throws Exception; | [
"public void install(InputStream resource, URL dest, String format, String version) throws Exception;",
"public void install(URL resource, URL dest, String format, String version, InputStreamFactory factory) throws Exception;",
"public Manifest install( URL url ) throws RepositoryException\n {\n String path = url.getFile();\n\n try\n {\n File temp = File.createTempFile( \"avalon-\", \"-bar\" );\n temp.delete();\n m_loader.getResource( url.toString(), temp, true );\n temp.deleteOnExit();\n StringBuffer buffer = new StringBuffer();\n Manifest manifest = expand( temp.toURL(), buffer );\n\n //\n // need a logging solution\n //\n\n System.out.println( buffer.toString() );\n return manifest;\n }\n catch( RepositoryException e )\n {\n throw e;\n }\n catch( Throwable e )\n {\n final String error = \n \"Cannot install target: \" + url;\n throw new RepositoryException( error, e );\n }\n }",
"void installBundle(String artifactUrl, String connection)\n throws Exception;",
"public DeploymentPackageBuilder addResourceProcessor(URL url) throws Exception {\n return addBundleArtifact(url, true);\n }",
"public void submitResourceInstall(JobArea jobArea, Session session, ResourceJob resource) throws Exception;",
"public void install () throws IOException\n {\n if (SysProps.noInstall()) {\n log.info(\"Skipping install due to 'no_install' sysprop.\");\n } else if (isUpdateAvailable()) {\n log.info(\"Installing \" + _toInstallResources.size() + \" downloaded resources:\");\n for (Resource resource : _toInstallResources) {\n resource.install(true);\n }\n _toInstallResources.clear();\n _readyToInstall = false;\n log.info(\"Install completed.\");\n\n // do resource cleanup\n final List<String> cleanupPatterns = _app.cleanupPatterns();\n if (!cleanupPatterns.isEmpty()) {\n cleanupResources(cleanupPatterns);\n }\n } else {\n log.info(\"Nothing to install.\");\n }\n }",
"public void installUpdate()\n\t{\n\t\tif (!downloaded) {\n\t\t\tLog.e(TAG,\"Download failed, nothing to install\");\n\t\t\treturn;\n\t\t}\n\t\tUri u = Uri.fromFile(downloadLoc);\n\t\tLog.v(TAG,\"Attempting to install \" + u.toString());\n\t\tIntent promptInstall = new Intent(Intent.ACTION_VIEW)\n\t .setDataAndType(u, \"application/vnd.android.package-archive\")\n\t\t.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\tctx.startActivity(promptInstall); \n\t}",
"void addURL(URL url);",
"public void install() {\n getFile().getWorkspace().addResourceChangeListener(this);\n installed = true;\n }",
"public static void install(ResourceSet rset) {\n\t\tURIConverter delegate = rset.getURIConverter();\n\n\t\tif (!(Proxy.isProxyClass(delegate.getClass()) && (Proxy\n\t\t\t.getInvocationHandler(delegate) instanceof DelegationHandler))) {\n\t\t\t\n\t\t\trset.setURIConverter((URIConverter) Proxy.newProxyInstance(\n\t\t\t\tZeligsoftURIConverter.class.getClassLoader(), URI_CONVERTER,\n\t\t\t\tnew DelegationHandler(delegate)));\n\t\t}\n\t\t\n\t\tPathmapURIHelper.install(rset);\n\t}",
"void installApp(String appPath);",
"public static void addURL(URL u) throws IOException {\r\n\t LOG.info(\"Adding file to the classpath: \" + u);\r\n\t JarLoader.addToClassPath(new File(u.getFile()));\r\n\t}",
"public void install(String system, Map<String, String> properties);",
"public static void addURL(URL u) throws IOException {\n if (!(ClassLoader.getSystemClassLoader() instanceof URLClassLoader)) {\n return;\n }\n\n URLClassLoader sysLoader = (URLClassLoader) ClassLoader.getSystemClassLoader();\n URL[] urls = sysLoader.getURLs();\n for (int i = 0; i < urls.length; i++) {\n if (StringUtils.equalsIgnoreCase(urls[i].toString(), u.toString())) {\n log.debug(\"URL {} is already in the CLASSPATH\", u);\n return;\n }\n }\n Class<URLClassLoader> sysclass = URLClassLoader.class;\n try {\n Method method = sysclass.getDeclaredMethod(\"addURL\", parameters);\n method.setAccessible(true);\n method.invoke(sysLoader, new Object[] {u});\n } catch (Throwable t) {\n t.printStackTrace();\n throw new IOException(\"Error, could not add URL to system classloader\");\n }\n }",
"public static void saveFile(String url, String file) throws IOException {\r\n\t\t\r\n\t\tSystem.out.println(\"Installing \" + url + \" to \" + file + \"...\");\r\n\t\tURL urle = new URL(url);\r\n\t\t\r\n\t\tSystem.out.println(\"Openning Stream...\");\r\n\t InputStream in = urle.openStream();\r\n\t \r\n\t System.out.println(\"Setting Output Stream...\");\r\n\t FileOutputStream fos = new FileOutputStream(new File(file));\r\n\t \r\n\t int length = -1;\r\n\t byte[] buffer = new byte[1024];\r\n\t \r\n\t System.out.println(\"Reading bytes...\");\r\n\t while ((length = in.read(buffer)) > -1){\r\n\t fos.write(buffer, 0, length);\r\n\t }\r\n\t \r\n\t System.out.println(\"Closing Streams...\");\r\n\t fos.close();\r\n\t in.close();\r\n\t \r\n\t \r\n\t System.out.println(\"File \" + file + \" Installed!\");\r\n\t}",
"protected void downloadContent(final URL url, File installDir) throws IOException, CommandFailedException {\n File archive = new File(installDir, INSTALLED_BINARY);\n Files.copy(new InputSupplier<InputStream>() {\n @Override\n public InputStream getInput() throws IOException {\n return url.openStream();\n }\n }, archive);\n }",
"@Override\n public void install() {\n }",
"public boolean install(Installable obj);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to receive data from a client. A connection must be made prior to using this method. | public Object receiveData(int clientSocketNumber) throws ClassNotFoundException, IOException {
return server.receiveData(clientSocketNumber);
} | [
"private void read(SocketChannel client) throws IOException {\n ByteBuffer readBuffer = ByteBuffer.allocate(1024);\n \n int numRead = client.read(readBuffer);\n byte[] data = new byte[numRead];\n System.arraycopy(readBuffer.array(), 0, data, 0, numRead);\n \n System.out.println(\"Received message:\");\n System.out.println(new String(data));\n readBuffer.clear();\n }",
"@SuppressWarnings(\"unused\")\n @UsedByNative\n public abstract ResponseToClient receiveFromClient(byte[] data);",
"public void readFromClient() {\n Thread t = new Thread(() -> {\n while (connected) {\n try {\n Message fromClient;\n synchronized (C2SMessages){\n if (C2SMessages.size() > 0){\n fromClient = (Message) C2SMessages.get(0);\n C2SMessages.remove(0);\n if( !(fromClient instanceof PingMessage) ) {\n if (myTurn) {\n answer = fromClient;\n answerReady = true;\n synchronized (lock){\n lock.notifyAll();\n }\n } else {\n send(new WrongTurnMessage());\n }\n }\n }\n if (C2SMessages.isEmpty())\n C2SMessages.wait();\n }\n } catch (NullPointerException | IllegalArgumentException | InterruptedException e) {\n System.out.println(\"[LOCAL-HANDLER] \"+userNickname+\"-local connection closed\");\n closeConnection();\n notifyDisconnection(this);\n break;\n }\n }\n });\n t.start();\n }",
"private void receiveClientMessage() throws IOException {\n mRemoteClientMessage = lengthValueRead(in, ClientMessage.class);\n \n if (mRemoteClientMessage == null) {\n setExchangeStatus(Status.ERROR);\n setErrorMessage(\"Remote client message was not received.\");\n throw new IOException(\"Remote client message not received.\");\n }\n\n if (mRemoteClientMessage.messages == null) {\n setExchangeStatus(Status.ERROR);\n setErrorMessage(\"Remote client messages field was null\");\n throw new IOException(\"Remote client messages field was null\");\n }\n\n mMessagesReceived = mRemoteClientMessage.messages;\n }",
"private void inputFromClient() {\n //Thread to output to screen chat from client\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n //we need to have an infinite WHILE loop to wait for client to send data\n //then we write the data onto screen\n String dataFromClient;\n try {\n while (true) {\n dataFromClient = fromClient.readUTF(); //read the data from the client\n textArea_output.append(dataFromClient + \"\\n\");\n }\n } catch (Exception ex) { //catch any other exceptions, this means that the fromClient failed for some reason\n textArea_output.append(\"Client socket has lost connection\\n\");\n }\n }\n });\n //DONT FORGET TO START THE THREAD\n thread.start();\n }",
"public synchronized ClientMessage readClientMessage(){\n while ( !currClient.isUpdatingClientMessage() ) {\n try {\n wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n\n currClient.setUpdateClientMessage(false);\n return currClient.getClientMessage();\n }",
"public void readFromClient() {\n Thread t = new Thread(() -> {\n while (connected) {\n try {\n socket.setSoTimeout(5000);\n String fromClient = socketIn.readLine();\n if (!fromClient.equals(\"\")) {\n if (myTurn) {\n answer = fromClient;\n answerReady = true;\n synchronized (this) {\n notifyAll();\n }\n } else {\n send(wrongTurnMessage);\n System.out.println(\"[SERVER] Wrong turn message\");\n }\n }\n } catch (IOException | NullPointerException | IllegalArgumentException e) {\n System.out.println(\"[SERVER] Client unreachable\");\n //e.printStackTrace();\n notifyDisconnection(this);\n break;\n }\n }\n });\n t.start();\n }",
"public void run()\n\t{\n\t\t// Keep the connection with the client open\n\t\ttry\n\t\t{\n\t\t\twhile(true)\n\t\t\t{\t\n\t\t\t\t// Get input stream from the socket\n\t\t\t\tInputStream stream = socket.getInputStream();\n\n\t\t\t\t// Read the header\n\t\t\t\tbyte[] header = new byte[ChatProtocol.HEADER_SIZE];\n\t\t\t\tint read = -1;\n\n\t\t\t\twhile ((read = stream.read(header)) != ChatProtocol.HEADER_SIZE)\n\t\t\t\t{\n\t\t\t\t\t// Read header\n\t\t\t\t}\n\n\t\t\t\t// Check whether it's a heartbeat\n\t\t\t\tif (header[1] == ChatProtocol.HEARTBEAT)\n\t\t\t\t{\n\t\t\t\t\tClientSend.heartbeat(socket);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Get the payload length\n\t\t\t\tint payloadLen = ByteBuffer.wrap(Arrays.copyOfRange(header, ChatProtocol.CODE_SIZE, ChatProtocol.HEADER_SIZE)).getInt();\n\t\t\t\tbyte[] data = new byte[payloadLen];\n\t\t\t\tread = -1;\n\n\t\t\t\twhile((read = stream.read(data)) != payloadLen)\n\t\t\t\t{\n\t\t\t\t\t// Read payload\n\t\t\t\t}\n\n\t\t\t\tswitch(header[1])\n\t\t\t\t{\n\t\t\t\t\tcase(ChatProtocol.CREATE_ACCOUNT_SUCCESS):\tClientReceive.createAccountSuccess(socket, data);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase(ChatProtocol.PUSH_MESSAGE_NOTIFICATION):\tClientReceive.pushMessageSuccess(socket, data);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase(ChatProtocol.CREATE_ACCOUNT_FAILURE):\tClientReceive.createAccountFailure(socket, data);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase(ChatProtocol.LOGIN_SUCCESS):\tClientReceive.loginSuccess(socket, data);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase(ChatProtocol.LOGIN_FAILURE):\tClientReceive.loginFailure(socket, data);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase(ChatProtocol.DELETE_ACCOUNT_SUCCESS): ClientReceive.deleteAccountSuccess(socket, data);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase(ChatProtocol.LIST_ALL_ACCOUNTS_SUCCESS): ClientReceive.listAllAccountsSuccess(socket, data);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase(ChatProtocol.SEND_MESSAGE_SUCCESS): ClientReceive.sendMessageSuccess(socket, data);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase(ChatProtocol.PULL_ALL_MESSAGES_SUCCESS): ClientReceive.pullAllMessagesSuccess(socket, data);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: ClientReceive.generalFailure(socket, data);\n\t\t\t\t}\n\n\t\t\t\tsynchronized(this)\n\t\t\t\t{\n\t\t\t\t\tthis.notify();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Print the exception\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}",
"public byte[] receive()\n throws TCPSocketException\n {\n if (! this.isClosed() && this.isConnected())\n {\n try\n {\n int numberOfBytesRead = 0;\n byte[] message = new byte[Integer.BYTES];\n\n /* read [size_of_message] */\n numberOfBytesRead = tcpSocketReader.read(message, 0, Integer.BYTES);\n\n if (Integer.BYTES == numberOfBytesRead)\n {\n int numberOfTotalBytesRead = 0;\n int numberOfRemainingBytes = 0;\n\n numberOfRemainingBytes = ByteBuffer.wrap(message).getInt();\n message = new byte[numberOfRemainingBytes];\n\n /* read [message] */\n while (0 != numberOfRemainingBytes)\n {\n numberOfBytesRead = tcpSocketReader.read(message, numberOfTotalBytesRead,\n numberOfRemainingBytes);\n numberOfRemainingBytes -= numberOfBytesRead;\n numberOfTotalBytesRead += numberOfBytesRead;\n }\n\n return message;\n }\n else\n {\n throw new TCPSocketException(\"Not enough bytes read: Received \" + numberOfBytesRead\n + \" expected \" + Integer.BYTES);\n }\n }\n catch (IOException ex)\n {\n /* catch the IOException and throw it as a TCPSocketException */\n throw new TCPSocketException(ex);\n }\n }\n else\n {\n throw new TCPSocketException(\"Socket not connected\");\n }\n }",
"private static String readResponse(Socket client) throws IOException\n {\n BufferedReader br=null;\n\n try\n {\n br=new BufferedReader(new InputStreamReader(client.getInputStream()));\n\n StringBuffer sb=new StringBuffer();\n String line;\n\n while ((line=br.readLine())!=null)\n {\n sb.append(line);\n sb.append('\\n');\n }\n\n return sb.toString();\n }\n finally\n {\n if (br!=null)\n {\n br.close();\n }\n }\n }",
"public void run()\n\t{\n\t\ttry {\n\n\t\t\t// Instantiate a DataInputStream object around the\n\t\t\t// inputStream associated with the Socket object\n\t\t\t// being used to communicate with the client.\n\t\t\tDataInputStream inFromClient = \n\t\t\t\tnew DataInputStream( socket.getInputStream() );\n\n\t\t\t// Read in the numbers being sent by the client and\n\t\t\t// display them on the console.\n\t\t\t\n\t\t\t// Read two ints\n\t\t\tSystem.out.println(\"int 1 = \" \n\t\t\t\t\t+ inFromClient.readInt() );\n\t\t\tSystem.out.println(\"int 2 = \" \n\t\t\t\t\t+ inFromClient.readInt() );\n\n\t\t\t// Read two floats\n\t\t\tSystem.out.println(\"float 1 = \" \n\t\t\t\t\t+ inFromClient.readFloat() );\n\t\t\tSystem.out.println(\"float 2 = \" \n\t\t\t\t\t+ inFromClient.readFloat() );\n\n\t\t\t// Read two doubles\n\t\t\tSystem.out.println(\"double 1 = \" \n\t\t\t\t\t+ inFromClient.readDouble() );\n\t\t\tSystem.out.println(\"double 2 = \" \n\t\t\t\t\t+ inFromClient.readDouble() );\n\t\t\t\n\t\t\t// Read two longs\n\t\t\tSystem.out.println(\"long 1 = \" \n\t\t\t\t\t+ inFromClient.readLong() );\n\t\t\tSystem.out.println(\"long 2 = \" \n\t\t\t\t\t+ inFromClient.readLong() );\n\t\t\t\n\t\t\t// Display closing message.\n\t\t\tSystem.out.println(\"All data received.\\n\"\n\t\t\t\t\t+ \"Closing connection. Bye\\n\\n\");\t\t\n\n\t\t\t// Close the Socket connection with the client.\n\t\t\tsocket.close();\n\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tSystem.err.println( \n\t\t\t\t\t\"Error in communication with client \" \n\t\t\t\t\t+ clientNumber );\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public void sendDataToClient() {\n\t\tForward head = dueResponses.poll();\n\t\tif (head != null) {\n\t\t\tint clientId = head.getClientId();\n\t\t\tDataBlock dataBlock = head.getDataBlock();\n//\t\t\tSystem.out.println(\"Client \" + getId() + \" sending data \" + dataBlock.getData() + \" to client \" + (clientId+1));\n//\t\t\tSimLogger.getInstance().myLogger.log(Level.INFO, \"LOG: Client \" + getId() + \" sending data \" + dataBlock.getData() + \" to client \" + (clientId+1));\n\t\t\tclients[clientId].receiveData(dataBlock);\n\t\t}\n\t}",
"int tcpclient_read(urg_tcpclient_t cli, ByteBuffer userbuf, int req_size, int timeout);",
"private synchronized String receiveResponse() {\n\t\t\n\t\tlog.debug(\"Waiting for response from the device.\");\n\t\t\n\t\t//Initialize the buffers\n\t\tStringBuffer recievedData = new StringBuffer();\n\t\tchar currentChar = ' ';\n\n\t\ttry {\n\t\t\tdo {\n\t\t\t\t\n\t\t\t\t//If there are bytes available, read them\n\t\t\t\tif (this.inputStream.available() > 0) {\n\t\t\t\t\t\n\t\t\t\t\t//Append the read byte to the buffer\n\t\t\t\t\tcurrentChar = (char)this.inputStream.read();\n\t\t\t\t\trecievedData.append(currentChar);\n\t\t\t\t}\n\t\t\t} while (currentChar != ASCII_COMMAND_PROMPT); //Continue until we reach a prompt character\n\n\t\t} catch (IOException ioe) {\n\t\t\tlog.error(\"Exception when receiving data from the device:\", ioe);\n\t\t}\n\n\t\tString recievedString = recievedData.toString();\n\t\t\n\t\t//Remove the echoed command if ECHO_COMMAND is true\n\t\tif (echoCommand) {\n\t\t\trecievedString = recievedString.replace(this.lastCommand, \"\");\n\t\t}\n\t\t\n\t\t//Remove extra characters and trim the string\n\t\trecievedString = recievedString.replace(\"\\r\", \"\");\n\t\trecievedString = recievedString.replace(\">\", \"\");\n\t\trecievedString = recievedString.trim();\n\t\n\t\tlog.info(\"Received string from device: \" + recievedString);\n\t\t\n\t\t//Return the received data\n\t\treturn recievedString;\n\t\n\t}",
"@Override\n public void run() {\n while(true)\n {\n try {\n InputStreamReader istreamreader = new InputStreamReader(SOCKET.getInputStream());\n BufferedReader bf = new BufferedReader(istreamreader);\n String get = bf.readLine();\n if(CLIENTORSERVER.equals(\"Server\")){\n Server.readMessage(get, this);\n }\n else if (CLIENTORSERVER.equals(\"Client\")) {\n Client.readMessage(get);\n }\n\n }\n catch (IOException e) {\n e.printStackTrace();\n break;\n }\n }\n }",
"private String readFromServer() throws ConnectionLostException {\r\n\t\ttry {\r\n\t\t\tString msg = in.readLine();\r\n\t\t\tSystem.out.println(\"SOCKET|READ: \" + msg);\r\n\t\t\treturn msg;\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new ConnectionLostException();\r\n\t\t}\r\n\t}",
"public String recvMessage() throws IOException {\n\t\n String fromServer = null;\n fromServer = inFromServer.readLine();\n String recvMsg = fromServer;\n \n return recvMsg;\n }",
"private void readClient() {\n BufferedReader reader = null;\n\n double x;\n double y;\n double destX;\n double destY;\n Date time = new Date(); // if date is not provided, set it as the current time.\n int persons;\n String lang;\n int luggage;\n\n try {\n reader = new BufferedReader(new InputStreamReader(new FileInputStream(new File(CLIENT_FILE))));\n String readLine;\n String[] split;\n\n reader.readLine(); // skip the header readLine\n readLine = reader.readLine();\n split = readLine.split(\",\");\n x = Double.parseDouble(split[0].trim());\n y = Double.parseDouble(split[1].trim());\n destX = Double.parseDouble(split[2].trim());\n destY = Double.parseDouble(split[3].trim());\n try {\n time = Client.TIME_FORMAT.parse(split[4].trim());\n } catch (ParseException e) {\n System.err.println(e.getMessage());\n }\n persons = Integer.parseInt(split[5].trim());\n lang = String.valueOf(split[6].trim());\n luggage = Integer.parseInt(split[7].trim());\n\n this.client = new Client(x, y, destX, destY, time, persons, lang, luggage);\n\n String query_client = \"client(\" + x + \", \" + y + \", \" + destX +\n \", \" + destY + \", \" + split[4].trim().replace(\":\", \"\") + \", \" + persons +\n \", \" + lang + \", \" + luggage + \")\";\n prolog.asserta(query_client);\n } catch (IOException e) {\n System.err.println(e.getMessage());\n } finally {\n if (reader != null) {\n try {\n reader.close();\n } catch (IOException e) {\n System.err.println(e.getMessage());\n }\n }\n }\n }",
"private void processConnection() throws IOException\n\t{\n\t\t//Variable to hold data from client.\n\t\tObject data_from_client = null;\n\n\t\tdo // process messages sent from client\n\t\t{ \n\t\t\ttry // read message and display it\n\t\t\t{\n\t\t\t\t/* TODO: Fill in code here. Use instanceof to detect the type of the Object sent by the client.\n\t\t\t\t\t1. Get an Object from the client through the input stream.\n\t\t\t\t\t2. If the Object is null, send a terminate message back to the client and terminate the connection.\n\t\t\t\t\t3. Otherwise if the Object is an Integer, print out the integer times two.\n\t\t\t\t\t4. If the Object is a Double, print out the double divided by two.\n\t\t\t\t\t5. If the Object is a String, print it twice.\n\t\t\t\t\t6. In any case (other than when the Object is null), send the message \"Acknowledged receipt of data.\" back to the client.\n\t\t\t\t*/\n\t\t\t\t\n\t\t\t}\n\t\t\tcatch (ClassNotFoundException classNotFoundException) \n\t\t\t{\n\t\t\t\tSystem.out.println(\"\\nUnknown object type received\");\n\t\t\t}\n\t\t\t\n\t\t\t//TODO: Change the condition of this do-while loop to terminate the connection if the client sent a null object.\n\t\t} while(true); //Terminate connection if given null\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Run print receipt sequence boolean. | public boolean runPrintReceiptSequence() {
//connect to printer
if (!initializeObject()) {
return false;
}
//create receipt
if (!createReceiptData(isfirst,isconfirmed,candidate)) {
finalizeObject();
return false;
}
//print
if (!printData()) {
finalizeObject();
return false;
}
return true;
} | [
"public boolean isPrinted();",
"public void printReceipt(){\n\t\t//TO DO\n\t\t\n\t}",
"private boolean isPrint(final TestStepFinished event) {\n\t\treturn event.result.isOk(true) && !Arrays.asList(Result.Type.SKIPPED).contains(event.result.getStatus())\n\t\t\t\t&& event.testStep instanceof PickleStepTestStep\n\t\t\t\t&& ((PickleStepTestStep) event.testStep).getStepText().contains(\"print\");\n\t}",
"public void printerOutput() {\n\t\tSystem.out.println(\"Receipt was printed.\");\n\t}",
"public boolean shouldPrintCommand() {\n\t\treturn true;\n\t}",
"public boolean isPrint() {\n return print;\n }",
"public void printReceipt(){\n sale.updateExternalSystems();\n sale.printReceipt(totalCost, amountPaid, change);\n }",
"public void setIsPrinted(boolean IsPrinted);",
"public void setPrintedAct(Boolean printedAct) {\n this.printedAct = printedAct;\n }",
"public boolean printScreen()\n {\n return printScreen(1);\n }",
"public void startPrinting()\n {\n printerSimulator.startPrintingProcess();\n }",
"private boolean enablePrint(boolean found)\n {\n if(found)\n {\n printJMenuItem.setEnabled(true);\n }\n else\n {\n printJMenuItem.setEnabled(false);\n }\n \n return found;\n }",
"@Test\r\n\tpublic void testPrint() {\r\n\t\tboolean b;\r\n\t\tb=mc.input(\"!print\");\r\n\t\tassertTrue(b);\r\n\t}",
"public static void printReceipt (Receipt receipt) {\n System.out.println(receipt.receiptPrintOut());\n }",
"public void setPrint( final boolean print ) {\n this.print = print;\n }",
"public boolean getToPrint() {\r\n return this.toPrint;\r\n }",
"public boolean shouldPrintSession();",
"public void _print(){\n boolean result = true ;\n\n final String file = \"XPrintable.prt\" ;\n final String fileName = utils.getOfficeTempDirSys((XMultiServiceFactory)tParam.getMSF())+file ;\n final String fileURL = utils.getOfficeTemp((XMultiServiceFactory)tParam.getMSF()) + file ;\n\n XSimpleFileAccess fAcc = null ;\n try {\n Object oFAcc =\n ((XMultiServiceFactory)tParam.getMSF()).createInstance\n (\"com.sun.star.ucb.SimpleFileAccess\") ;\n fAcc = (XSimpleFileAccess) UnoRuntime.queryInterface\n (XSimpleFileAccess.class, oFAcc) ;\n if (fAcc == null) throw new StatusException\n (Status.failed(\"Can't create SimpleFileAccess service\")) ;\n if (fAcc.exists(fileURL)) {\n log.println(\"Old file exists and will be deleted\");\n fAcc.kill(fileURL);\n }\n } catch (com.sun.star.uno.Exception e) {\n log.println(\"Error accessing file '\" + fileURL + \"'\");\n e.printStackTrace(log);\n }\n\n try {\n PropertyValue[] PrintOptions = new PropertyValue[2];\n PropertyValue firstProp = new PropertyValue();\n firstProp.Name = \"FileName\";\n log.println(\"Printing to :\"+fileName);\n firstProp.Value = fileName;\n firstProp.State = com.sun.star.beans.PropertyState.DEFAULT_VALUE;\n PrintOptions[0] = firstProp;\n PrintOptions[1] = new PropertyValue();\n PrintOptions[1].Name = \"Wait\";\n PrintOptions[1].Value = new Boolean(true);\n oObj.print(PrintOptions);\n }\n catch (com.sun.star.lang.IllegalArgumentException ex) {\n log.println(\"couldn't print\");\n ex.printStackTrace(log);\n result = false ;\n }\n\n try {\n boolean fileExists = fAcc.exists(fileURL);\n \n log.println(\"File \"+fileName+\" exists = \"+fileExists);\n\n if (result) {\n result &= fileExists ;\n }\n } catch (com.sun.star.uno.Exception e) {\n log.println(\"Error while while checking file '\" +\n fileURL + \"': \");\n e.printStackTrace(log);\n result = false ;\n }\n\n tRes.tested(\"print()\", result) ;\n\n }",
"public void printReceipt(Receipt receipt) {\n System.out.println(receipt.createReceiptString());\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
check all slot radio on. | public static boolean isAllSlotRadioOn(Context context) {
boolean isAllRadioOn = true;
final TelephonyManager tm =
(TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
final int numSlots = tm.getSimCount();
for (int i = 0; i < numSlots; ++i) {
final SubscriptionInfo sir = Utils.findRecordBySlotId(context, i);
if (sir != null) {
isAllRadioOn = isAllRadioOn && isRadioOn(sir.getSubscriptionId());
}
}
Log.d(TAG, "isAllSlotRadioOn()... isAllRadioOn: " + isAllRadioOn);
return isAllRadioOn;
} | [
"public void checkAll() {\n\t\tboolean change = false;\n\t\tfor (int i = 0; i < buttons.size(); i++) {\n\t\t\tAbstractButton button = buttons.get(i);\n\t\t\tchange = setSelected(button, true, i) || change;\n\t\t}\n\t\tif (change) {\n\t\t\trepaint();\n\t\t}\n\t}",
"public void checkRadioButton() {\n\t\tLOGGER.debug(\"checkRadioButtons\");\n\t\tcolumnsButton.setSelection(true);\n\t\trowsButton.setSelection(false);\n\t\twrapButton.setSelection(false);\n\t}",
"public boolean checkAll()\r\n { \r\n \r\n \r\n for(Button_Cards i : cards)\r\n {\r\n \r\n \r\n for(Button_Cards j : cards)\r\n {\r\n \r\n \r\n \r\n if(i.getId()==j.getId() && i.getHasBeenSelected() && j.getHasBeenSelected() && i.getMatched()==false && j.getMatched()==false && i!=j )\r\n {\r\n \r\n i.doClick();\r\n \r\n j.doClick();\r\n \r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }",
"private boolean CheckAllRadioQuestionsAnswered() {\n for (int i = 0; i < radioGroupArray.length; i++) {\n if (radioGroupArray[i].getCheckedRadioButtonId() == -1) {\n return false;\n }\n }\n return true;\n }",
"private boolean CheckButtons() {\n if (evShabatButtonPressed.arrivedEvent()) {\n evShabatButtonPressed.waitEvent();\n // For a case that evShabat came but we have a selected button either:\n if (evButtonPressed.arrivedEvent()) {\n button = (JRadioButton) evButtonPressed.waitEvent();\n button.setSelected(false);\n }\n restOfWeekMode = false;\n stateMode = StateMode.ACK_WAITING;\n return true;\n } else if (evButtonPressed.arrivedEvent()) {\n button = (JRadioButton) evButtonPressed.waitEvent();\n buttonPressed(button);\n return true;\n }\n return false;\n }",
"public void setAllIsStart(boolean val, ViewGroup parent){\n for(int i = 0; i < this.getCount() - 1; i++){\n locationList.get(i).setStart(val);\n RadioButton btn = ((RadioButton) parent.findViewById(Integer.parseInt(\"110\" + String.valueOf(i))));\n if(btn != null) {\n btn.setChecked(val);\n }\n }\n }",
"public void setAllIsDest(boolean val, ViewGroup parent){\n for(int i = 0; i < this.getCount() - 1; i++){\n locationList.get(i).setDestination(val);\n RadioButton btn = ((RadioButton)parent.findViewById(Integer.parseInt(\"111\" + String.valueOf(i))));\n if(btn != null){\n btn.setChecked(val);\n }\n }\n }",
"public boolean areAllSlotsDetected(){\n\t\tboolean r = true;\n\t\tfor(int i=0; i<slotDetected.length; i++){\n\t\t\tif(!slotDetected[i]){\n\t\t\t\tr = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn r;\n\t}",
"private void checkMultipleChoice(){\n \t\t\t\n \t\t\t// this is the answer string containing all the checked answers\n \t\t\tString answer = \"\";\n \t\t\t\t\n \t\t\tif(checkboxLayout.getChildCount()>=1){\n \t\t\t\n \t\t\t\t// iterate through the child check box elements of the linear view\n \t\t\t\tfor (int i = 0; i < checkboxLayout.getChildCount();i++){\n \t\t\t\t\t\n \t\t\t\t\tCheckBox choiceCheckbox = (CheckBox) checkboxLayout.getChildAt(i);\n \t\t\t\t\t\n \t\t\t\t\t// if that check box is checked, its answer will be stored\n \t\t\t\t\tif (choiceCheckbox.isChecked()){\n \t\t\t\t\t\t\n \t\t\t\t\t\tString choiceNum = choiceCheckbox.getTag().toString();\n \t\t\t\t\t\tString choiceText = choiceCheckbox.getText().toString();\n \t\t\t\t\t\t\n \t\t\t\t\t\t// append the answer to the answer text string\n \t\t\t\t\t\tif (i == checkboxLayout.getChildCount()-1)answer = answer + choiceNum +\".\" + choiceText;\n \t\t\t\t\t\telse{ answer = answer + choiceNum +\".\"+ choiceText + \",\"; }\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//setting the response for that survey question\n \t\t\teventbean.setChoiceResponse(answer);\n \t\t\t\n \t\t\t}\n \t\t}",
"public void checkSingleButtons() throws com.sun.star.uno.Exception, java.lang.Exception\n {\n prepareTestStep( false );\n\n insertRadio( 20, 30, \"group 1\", \"group 1\", \"\" );\n insertRadio( 20, 38, \"group 2\", \"group 2\", \"\" );\n insertRadio( 20, 46, \"group 3\", \"group 3\", \"\" );\n insertRadio( 20, 54, \"group 4\", \"group 4\", \"\" );\n\n // switch to alive mode\n m_document.getCurrentView( ).toggleFormDesignMode( );\n\n checkRadio( \"group 1\", \"\" );\n verifySingleRadios( 1, 0, 0, 0 );\n\n checkRadio( \"group 4\", \"\" );\n verifySingleRadios( 1, 0, 0, 1 );\n\n checkRadio( \"group 2\", \"\" );\n verifySingleRadios( 1, 1, 0, 1 );\n\n checkRadio( \"group 3\", \"\" );\n verifySingleRadios( 1, 1, 1, 1 );\n\n cleanupTestStep();\n }",
"private void setRadioOnCheckedChangedEvent() {\n ((RadioButton) findViewById(R.id.radio_akb48)).setOnCheckedChangeListener(this);\n ((RadioButton) findViewById(R.id.radio_ske48)).setOnCheckedChangeListener(this);\n ((RadioButton) findViewById(R.id.radio_nmb48)).setOnCheckedChangeListener(this);\n ((RadioButton) findViewById(R.id.radio_hkt48)).setOnCheckedChangeListener(this);\n }",
"private void setCheckBoxChecked() {\n grupoRespuestasUnoMagnitudes.check(radioChecked[0]);\n grupoRespuestasDosMagnitudes.check(radioChecked[1]);\n grupoRespuestasTresMagnitudes.check(radioChecked[2]);\n grupoRespuestasCuatroMagnitudes.check(radioChecked[3]);\n grupoRespuestasCincoMagnitudes.check(radioChecked[4]);\n grupoRespuestasSeisMagnitudes.check(radioChecked[5]);\n grupoRespuestasSieteMagnitudes.check(radioChecked[6]);\n grupoRespuestasOchoMagnitudes.check(radioChecked[7]);\n grupoRespuestasNueveMagnitudes.check(radioChecked[8]);\n grupoRespuestasDiezMagnitudes.check(radioChecked[9]);\n }",
"public boolean checkRadio() {\n\n //find radio buttons and store them as RadioButtons\n RadioButton rating0_rad = (RadioButton) findViewById(R.id.rating0_rad),\n rating1_rad = (RadioButton) findViewById(R.id.rating1_rad),\n rating2_rad = (RadioButton) findViewById(R.id.rating2_rad),\n rating3_rad = (RadioButton) findViewById(R.id.rating3_rad),\n rating4_rad = (RadioButton) findViewById(R.id.rating4_rad),\n rating5_rad = (RadioButton) findViewById(R.id.rating5_rad);\n\n\n //checks each radio button individually if they're checked,\n // makes rating = checked radio button's number\n if (rating0_rad.isChecked()) {\n rating = 0;\n return true;\n } else if (rating1_rad.isChecked()) {\n rating = 1;\n return true;\n } else if (rating2_rad.isChecked()) {\n rating = 2;\n return true;\n } else if (rating3_rad.isChecked()) {\n rating = 3;\n return true;\n } else if (rating4_rad.isChecked()) {\n rating = 4;\n return true;\n } else if (rating5_rad.isChecked()) {\n rating = 5;\n return true;\n }\n\n //if none of the radio buttons are checked\n return false;\n }",
"private void checkAllQuestions() {\n checkQuestionOneAnswer ();\n checkQuestionTwoAnswers ();\n checkQuestionThreeAnswers ();\n checkQuestionFourAnswers ();\n checkQuestionFiveAnswers ();\n checkQuestionSexAnswers ();\n checkQuestionSevenAnswers ();\n checkQuestionEighthAnswers ();\n checkQuestionNineAnswers ();\n checkQuestionTenAnswers ();\n }",
"public boolean isEnabled( int slot );",
"public static void isValidRdoBtns(JPanel pnl) {\n boolean checkOK = false;\n for (int i = 0; i < pnl.getComponentCount(); i++) {\n if (((JRadioButton) pnl.getComponent(i)).isSelected()) {\n checkOK = true;\n break;\n }\n }\n if (!checkOK) {\n throw new IllegalArgumentException();\n }\n }",
"public void selectShopSmartChecklist(){\n\t\t\t\tList<WebElement> goalsList\t= driver.findElements(chooseYourGoalsList);\n\t\t\t\tint size = goalsList.size();\n\t\t\t\tfor(int i = 0;i<size;i++)\n\t\t\t\t{\n\t\t\t\t\tgoalsList.get(i).click();\n\t\t\t\t\tReporter.log(\"Clicked on the radio button to select different goals..\");\n\t\t\t\t}\n\t\t\t}",
"private void enableRadioButtons(){\n\n this.acOffRadioButton.setEnabled(true);\n\n this.heatOffRadioButton.setEnabled(true);\n\n this.lightsOnRadioButton.setEnabled(true);\n this.lightsOffRadioButton.setEnabled(true);\n\n this.leftDoorsOpenRadioButton.setEnabled(true);\n this.leftDoorsCloseRadioButton.setEnabled(true);\n\n this.rightDoorsOpenRadioButton.setEnabled(true);\n this.rightDoorsCloseRadioButton.setEnabled(true);\n }",
"private boolean checkRadioButton() throws UiException {\n boolean in = incoming.isSelected();\n boolean out = outgoing.isSelected();\n\n if (!(in ^ out)) {\n throw new UiException();\n }\n\n return out;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Used to verify picked number on right panel | public boolean verify_NumberDisplayedOnPanel() {
boolean value = false;
//System.out.println(element("NumberType").getText());
if (element("NumberType").isDisplayed() && element("NumberPrice").isDisplayed()
&& element("BookNow_Btn").isDisplayed()) {
value = true;
} else {
value = false;
}
return value;
} | [
"public boolean verify_NumUnderDrpDwn() {\n\t boolean value=false;\n\t \n\t if (element(\"Number_Dropdown\").isDisplayed()) {\n\t\t\tvalue = true;\n\t\t\tSystem.out.println(element(\"Number_Dropdown\").getText() + \"is the number\");\n\t\t} else {\n\t\t\tvalue = false;\n\t\t\tSystem.out.println(element(\"Number_Dropdown\").getText() + \"number not displayed\");\n\t\t}\n\t \n\t return value;\n }",
"private void checkNumber(int buttonNum) {\n if(counter==buttonNum && testStarted==true){\n if (buttonNum == 25) {\n testComplete = true;\n this.stopTimer();\n this.setEnabledStart(false); // Hide Start button because test complete\n }\n errorLabel.setText(\"\");\n counter++;\n }\n else if(testStarted == false){\n // Display test not started error\n errorLabel.setText(\"Press Start to begin the test.\"); \n }\n else{\n // Display wrong number error\n errorLabel.setText(\"Wrong number. Try again.\");\n // Have error message time-out afer 2.5 seconds\n int delay = 2500; //milliseconds\n ActionListener taskPerformer = new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent evt) {\n errorLabel.setText(\"\");\n }\n };\n new Timer(delay, taskPerformer).start();\n }\n }",
"public int checkAllertBox() {\n mouseX = (float) ((currentPos.x * 1.0f - window.getWidth() / 2f) / (window.getWidth() / 2f));\n mouseY = (float) ((currentPos.y * 1.0f - window.getHeight() / 2f) / (window.getHeight() / 2f));\n\n float checkLeftButtonOnLeft = -0.475f * boxRatio * 0.8f;\n float checkLeftButtonOnRight = -0.075f * boxRatio * 0.8f;\n\n float checkRightButtonOnLeft = 0.075f * boxRatio * 0.8f;\n float checkRightButtonOnRight = 0.475f * boxRatio * 0.8f;\n\n int checkButton = 0;\n\n if (checkLeftButtonOnLeft < mouseX && mouseX < checkLeftButtonOnRight && mouseY > -0.079f && mouseY < -0.003f) {\n checkButton = 11;\n }\n\n if (checkLeftButtonOnLeft < mouseX && mouseX < checkLeftButtonOnRight && mouseY > -0.079f && mouseY < -0.003f && isLeftButtonPressed()) {\n checkButton = 12;\n }\n\n if (checkRightButtonOnLeft < mouseX && mouseX < checkRightButtonOnRight && mouseY > -0.079f && mouseY < -0.003f) {\n checkButton = 21;\n }\n\n if (checkRightButtonOnLeft < mouseX && mouseX < checkRightButtonOnRight && mouseY > -0.079f && mouseY < -0.003f && isLeftButtonPressed()) {\n checkButton = 22;\n }\n\n return checkButton;\n }",
"public void alertR2Grade() {\n final Dialog d = new Dialog(Add_information.this);\n d.setTitle(\"Choose your R2-character\");\n d.setContentView(R.layout.alertdialog_r2grade);\n r2grade_btn = (TextView) d.findViewById(confirmr2);\n\n final NumberPicker np = (NumberPicker) d.findViewById(R.id.numberPicker1);\n np.setMaxValue(6); // max value 6\n np.setMinValue(1); // min value 1\n np.setValue(3);\n np.setWrapSelectorWheel(false);\n np.setOnValueChangedListener(new NumberPicker.OnValueChangeListener() {\n @Override\n public void onValueChange(NumberPicker picker, int oldVal, int newVal) {\n R2Grade = newVal;\n }\n });\n r2grade_btn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n UserInfo.userInfo.setR2Grade(R2Grade);\n if (R2Grade == 0){\n R2Grade = 3;\n }\n Toast.makeText(getApplicationContext(), \"Grade \" + R2Grade + \" registered\", Toast.LENGTH_SHORT).show();\n d.dismiss(); // dismiss the alertdialog_r2grade\n }\n });\n d.show();\n\n\n }",
"public void verifyConfirmationNumberDisplayed(final IRSTestData testData) {\n Log.logScriptInfo(\"*******************Verifying Confirmation Number Details On Print Page*******************\");\n Log.altVerify(true, lblConfirmationNumber().isVisible(),\n \"Confirmation Number Label is Displayed\");\n Log.altVerify(true,\n lblConfirmationNumbervalue(testData.getConfirmationNum()).isVisible(),\n \"Confirmation Number Displayed on Print Page Matches\");\n }",
"void showAlertForMultipleNumber();",
"private int numero_caracter(){\n int numero_caracter = 0;\n if(rbtn4.isSelected()){\n numero_caracter = 4;\n }if(rbtn8.isSelected()){\n numero_caracter = 8;\n }if(rbtn16.isSelected()){\n numero_caracter = 16;\n }\n return numero_caracter;\n }",
"@Test\n void moderatorCodeModeratorView() {\n // Expect that the label's text is equals to the moderator code of the Question Board\n FxAssert.verifyThat(\"#moderatorCode\", LabeledMatchers.hasText(getModCodeOpen().toString()));\n }",
"public Command checkNumber(int number){\n if(number == rand){\n return Command.WIN;\n }\n if(number > rand && number < max){\n max = number - 1;\n return Command.LESS;\n }\n if(number < rand && number > min){\n min = number + 1;\n return Command.LARGER;\n } else{\n return Command.NOT_CORRECT;\n }\n }",
"public void validateGamerDoorSelection() {\r\n\t\t\r\n\t\tif (gameState.getGameStateMap().containsKey(gamerSelectedDoor)) {\r\n\t\t\t\r\n\t\t\t gamerSelectedDoorValue = gameState.getGameStateMap().get(gamerSelectedDoor);\r\n\t\t\t \r\n\t\t}\t\t\r\n\t\tif(gamerSelectedDoorValue.equalsIgnoreCase(objectNameBehindTheDoorToWin)) {\t\t\r\n\t\t\tmatchedSelection = \"true\";\r\n\t\t System.out.println(\"Congratulations! Your selected door value is matching winning prize \"+ objectNameBehindTheDoorToWin);\r\n\t\t} else \r\n\t\t\tSystem.out.println(\"Sorry! Your selected door value is not matching winning prize \"+ objectNameBehindTheDoorToWin);\r\n\t\t\r\n\t}",
"protected boolean verifySelection()\n {\n return true;\n }",
"public void checkSelection(){\n for(int i = 0;i< team.size();i++){\n team.get(i).checkSelectedTeam(mouseX, mouseY);\n team.get(i).checkAddedTroops(mouseX, mouseY);\n team.get(i).checkRemovedTroops(mouseX, mouseY);\n team.get(i).checkAttacking(mouseX, mouseY);\n }\n //Checks if the user wants to run the simulation with the given variables.\n if(mouseX > RiskSimulator.width * 2/8 && mouseX < RiskSimulator.width * 2/8 + RiskSimulator.width / 2 &&\n mouseY > RiskSimulator.height * 6/8 && mouseY < RiskSimulator.height * 6/8 + RiskSimulator.height / 4 - 50){\n mode = 2;\n }\n }",
"public static void showSelection() {\n\t\tSystem.out.println(\"Please select the correct number to indicate what you would like to buy:\");\n\t\tSystem.out.println(\"1. Twizzlers\");\n\t\tSystem.out.println(\"2. Butterfinger\");\n\t\tSystem.out.println(\"3. M&Ms\");\n\t\tSystem.out.println(\"4. Hersheys\");\n\t\tSystem.out.println(\"5. Skittles\");\n\t\tSystem.out.println(\"6. exit\");\n\t}",
"int getLeftboxnum();",
"private void wrongAnswer(){\n HexButton button = game.getTriangleLastClicked();\n button.SetColor(0);\n choose();\n this.updateUI();\n }",
"public void setRandomNumbers(){\n Random rand = new Random();\n Button lButton = (Button) findViewById(R.id.l_Button);\n Button rButton = (Button) findViewById(R.id.r_Button);\n int numRight = rand.nextInt(10);\n int numLeft;\n //Makes sure the number is not the same, we wouldn't Want that :)\n while (true)\n {\n numLeft = rand.nextInt(10);\n if (numLeft != numRight)\n break;\n }\n lButton.setText(Integer.toString(numLeft));\n rButton.setText(Integer.toString(numRight));\n }",
"public void checkCorrect() {\n\t\t \n\t\t if(rb1.isSelected()) {\n\t\t\t if(rb1.getText() == answer) {\n\t\t\t\t showCorrectDialog();\n\t\t\t }\n\t\t\t else\n\t\t\t\t showIncorrectDialog();\n\t\t }\n\t\t else if(rb2.isSelected()) {\n\t\t\t if(rb2.getText() == answer) {\n\t\t\t\t showCorrectDialog();\n\t\t\t }\n\t\t\t else\n\t\t\t\t showIncorrectDialog();\n\t\t }\n\t\t else if(rb3.isSelected()) {\n\t\t\t if(rb3.getText() == answer) {\n\t\t\t\t showCorrectDialog();\n\t\t\t }\n\t\t\t else\n\t\t\t\t showIncorrectDialog();\n\t\t }\n\t\t else if(rb4.isSelected()) {\n\t\t\t if(rb4.getText() == answer) {\n\t\t\t\t showCorrectDialog();\n\t\t\t }\n\t\t\t else\n\t\t\t\t showIncorrectDialog();\n\t\t }\n\t }",
"public void clickDigit(View view){\n button = (Button) view;\n\n //Defines \"+/-\" button, it allows the user to enter a negative number\n //or to change the sign of an existing number\n if (button.getText().equals(\"+/-\")) {\n if (!result.isEmpty() && !result.equals(\"0\")) {\n if (num2.isEmpty()) {\n result = changeSign(result);\n resultView.setText(formatResult());\n } else {\n resultView.setText(num2 = changeSign(num2));\n }\n }\n }\n //Checking to see if an operator has been selected.\n //If not, the digit or decimal entered are appended to result\n //Then displayed on the TextView\n else if (!operatorSelected) {\n //This if statement ensures the user doesn't enter multiple decimals\n if (!button.getText().equals(\".\") || !result.contains(\".\")) {\n result += button.getText().toString();\n Log.d(result, \"num 1 is assigned\");\n }\n resultView.setText(result);\n }\n //If an operator has been selected, the digit or decimal entered are appended to num2\n //Then displayed on the TextView\n else {\n //This if statement ensures the user doesn't enter multiple decimals\n if (!button.getText().equals(\".\") || !num2.contains(\".\")) {\n num2 += button.getText().toString();\n Log.d(num2, \"num 2 is assigned\");\n }\n resultView.setText(num2);\n }\n }",
"@FXML\n public void clickConfirmPlayerNum(ActionEvent actionEvent) {\n Main.totalNumOfPlayers = Integer.parseInt(txf_playerNumbers.getText());\n\n btn_reducePlayerNumber.setVisible(false);\n btn_plusPlayerNumber.setVisible(false);\n btn_confirmPlayerNum.setVisible(false);\n\n if (!btn_confirmLoadFile.isVisible()) {\n btn_infoSwitcher.setVisible(true);\n btn_infoSwitcher.setText(\"Map Info\");\n displayPlayerInfo();\n btn_nextStep.setVisible(true);\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determine if the web service was created from WSDL | public boolean isFromWSDL(String serviceName); | [
"boolean hasGenericWebService();",
"protected boolean isWSDLProvidedForProxyService(AxisService service) {\n boolean isWSDLProvided = false;\n if (service.getParameterValue(WSDLConstants.WSDL_4_J_DEFINITION) != null ||\n service.getParameterValue(WSDLConstants.WSDL_20_DESCRIPTION) != null) {\n isWSDLProvided = true;\n }\n return isWSDLProvided;\n }",
"boolean visit(WSDLDefinitions w);",
"public void testWSDL() throws Throwable {\r\n TargetDescriptor descriptor = new TargetDescriptor(AllTests.url() + \"allinone\", 2000);\r\n HTTPServiceCaller caller = new HTTPServiceCaller(descriptor);\r\n caller.getHTTPCallConfig().setMethod(HTTPMethod.GET);\r\n Map<String, String> params = new HashMap<String, String>();\r\n params.put(\"_function\", \"_WSDL\");\r\n HTTPCallRequest request = new HTTPCallRequest(params);\r\n HTTPCallResult result = caller.call(request);\r\n String wsdlResult = result.getString();\r\n assertNotNull(wsdlResult);\r\n assertTrue(\"Incorrect XML received: \" + wsdlResult, wsdlResult.startsWith(\"<?xml version=\\\"1.0\\\"\"));\r\n assertTrue(\"Incorrect WSDL definition received: \" + wsdlResult, wsdlResult.trim().endsWith(\"definitions>\"));\r\n Element definitions = ElementFormatter.parse(wsdlResult);\r\n assertEquals(\"allinone\", definitions.getAttribute(\"name\"));\r\n new ElementList(definitions, \"types\").getUniqueChildElement();\r\n new ElementList(definitions, \"portType\").getUniqueChildElement();\r\n new ElementList(definitions, \"binding\").getUniqueChildElement();\r\n new ElementList(definitions, \"service\").getUniqueChildElement();\r\n }",
"boolean visit(WSDLDocument w);",
"private static final boolean isSpecialwebservice(String name) {\n\t\t \n\t\t if (name == null) {\n\t\t\t return false;\n\t\t }\n\t\t return name.startsWith(\"navajo\") || name.equals(\"InitNavajoStatus\") || name.equals(\"navajo_logon\");\n\t }",
"public static boolean isWSDLType(String typeName)\r\n {\r\n return typeName == null ? false :\r\n WSDL_MESSAGE.equals(typeName)\r\n || WSDL_PORT_TYPE.equals(typeName)\r\n || WSDL_OPERATION.equals(typeName)\r\n || WSDL_PART.equals(typeName)\r\n || WSDL_SERVICE.equals(typeName)\r\n || XSD_TYPE_DEFINITION.equals(typeName)\r\n || XSD_ELEMENT_DECLARATION.equals(typeName)\r\n || BPEL_PARTNER_LINK_TYPE.equals(typeName)\r\n || BPEL_ROLE.equals(typeName)\r\n || BPEL_PROPERTY.equals(typeName);\r\n }",
"private boolean isWsdlAvailable( AbstractApplicationInfo agentInfo ) {\n\n String urlString = \"http://\" + agentInfo.getAddress() + \"/agentapp/agentservice?wsdl\";\n try {\n URL url = new URL(urlString);\n HttpURLConnection httpConnection = (HttpURLConnection) url.openConnection();\n httpConnection.setConnectTimeout(10000);\n httpConnection.setRequestMethod(\"GET\");\n httpConnection.connect();\n\n if (httpConnection.getResponseCode() == 200) {\n log.info(agentInfo.getDescription() + \" is available for remote connections\");\n return true;\n } else {\n log.warn(agentInfo.getDescription() + \" is not available for remote connections. Accessing \"\n + urlString + \" returns '\" + httpConnection.getResponseCode() + \": \"\n + httpConnection.getResponseMessage() + \"'\");\n return false;\n }\n } catch (Exception e) {\n log.warn(agentInfo.getDescription()\n + \" is not available for remote connections. We cannot access \" + urlString\n + \". Error message is '\" + e.getMessage() + \"'\");\n return false;\n }\n }",
"public boolean isSetSoap()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(SOAP$2) != 0;\n }\n }",
"boolean visit(WSDLMessage w);",
"private void callWebService(String wsdlurl) {\n\t\t\n\t}",
"protected abstract boolean shouldRun(GenericWsdlOption wsdlOption, File doneFile, URI wsdlURI);",
"WSDLPortType createWSDLPortType();",
"boolean providesFunction(String aName) throws WSDLException;",
"public static boolean isWebInfExist() {\n\t\t\treturn isWebinfExist;\n\t\t}",
"boolean readWSDLDescription(URL aSrc) throws IOException;",
"public String checkWebService () throws Exception {\r\n\t\tString res = (String)wsInvoke(\"checkWebService\",null);\r\n\t\tthrowLastWsException();\r\n\t\treturn res;\r\n\t}",
"public interface WSDLDocInterface extends XSDDocInterface {\r\n\r\n\t/**\r\n\t * Gets the all wsdl operations.\r\n\t *\r\n\t * @return the all operations\r\n\t */\r\n\tpublic List<OperationHolder> getAllOperations();\r\n\t\r\n\t/**\r\n\t * Gets the service name.\r\n\t *\r\n\t * @return the service name\r\n\t */\r\n\tpublic String getServiceName();\r\n\t\r\n\t\r\n\r\n\t\r\n\t/**\r\n\t * Gets all the port types defined in WSDL.\r\n\t *\r\n\t * @return the port types\r\n\t */\r\n\tpublic List<PortType> getPortTypes();\r\n\t\r\n\t/**\r\n\t * Gets the package name of the WSDL.\r\n\t * Package name is the local part of the WSDL Service URL.\r\n\t * @return the package name\r\n\t */\r\n\tpublic String getPackageName();\r\n\t\r\n\t/**\r\n\t * Gets the complete remote address of the service endpoint.\r\n\t *\r\n\t * @return the complete remote path\r\n\t */\r\n\tpublic String getCompleteRemotePath();\r\n\t\r\n\t/**\r\n\t * Gets the annotations on the WSDL.\r\n\t * Typically returns the annotation defined on the service element.\r\n\t * @return the annotations\r\n\t */\r\n\tpublic ParsedAnnotationInfo getAnnotations();\r\n\t\r\n\r\n}",
"private boolean getWSInformationFromUDDI(ServiceVO service){\n\t\tWSDLService wsdlService = uddi.getInquiry().getWSDLServiceByKey(service.getUddiWsdl());\n\t\tif(wsdlService != null){\n\t\t\tlogger.debug(\"WSDLService -> \" + wsdlService.getName());\n\t\t\tMap<String, String> wsdlValues = getWSInformationFromWSDL(wsdlService.getWsdl(), service.getPortTypeName(), service.getMethodName());\n\t\t\tsetWsdlValues(wsdlValues, service);\n\t\t\treturn !wsdlValues.isEmpty();\n\t\t}else{\n\t\t\tlogger.debug(\"No se pudo cargar la informaci\\u00F3n del servicio [ {0} ] vía UDDI - WSRR\", service.getDescription());\n\t\t}\n\t\treturn false;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Build a PacketLargeFactory object from the data contained within the Packet250CustomPayload packet | @Override
public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player) {
PacketLargeFactory packetLargeFactory = PacketTypeHandler.buildPacket(packet.data);
// Execute the appropriate actions based on the PacketLargeFactory type
packetLargeFactory.execute(manager, player);
} | [
"private static byte[] makePacket(byte pkID, byte[] data){\n //Logger.log(\"Length of data:\"+data.length);\n ByteBuffer packetFactory = ByteBuffer.allocate(5+data.length);\n packetFactory.put(pkID);\n packetFactory.putInt((int)(data.length));\n packetFactory.put(data);\n return byteBuffer2byte(packetFactory);\n }",
"private void constructPackets() {\r\n\t\t\r\n\t\t// clear the list of packets; we're building a new message using packets!\r\n messagePackets.clear();\r\n \r\n // divide msg length by packet size, w/ trick to round up\r\n int msgCount = (allBytes.length + PACKETSIZE - 4) / (PACKETSIZE - 3);\r\n \r\n // first byte is counter; 0 provides meta info about msg\r\n // right now it's just how many packets to expect\r\n \r\n // first byte is which message this is for the receiver to understand\r\n // second/third bytes are current packet\r\n // fourth/fifth bytes are message size\r\n // 6+ is the digest truncated to 15 bytes\r\n\r\n /* The first BlePacket includes:\r\n * 1 byte - this BleMessage's identifying number,\r\n * 2 bytes - the current packet counter, \r\n * 2 bytes - the number of BlePackets,\r\n * n bytes - the message digest\r\n */ \r\n \r\n // build the message size tag, which is the number of BlePackets represented in two bytes\r\n byte[] msgSize = new byte[2];\r\n msgSize[0] = (byte)(msgCount >> 8);\r\n msgSize[1] = (byte)(msgCount & 0xFF);\r\n \r\n\r\n byte[] firstPacket = Bytes.concat(new byte[]{(byte)(messageNumber & 0xFF)}, new byte[]{(byte)0x00, (byte)0x00}, msgSize, PayloadDigest);\r\n\r\n // create a BlePacket of index 0 using the just created payload\r\n addPacket(0, firstPacket);\r\n \r\n // now start building the rest\r\n int msgSequence = 1;\r\n\t\t\t\t\t\r\n // loop over the payload and build packets, starting at index 1\r\n\t\twhile (msgSequence <= msgCount) {\r\n\t\t\t\r\n\t\t\t/* based on the current sequence number and the message packet size\r\n\t\t\t * get the read index in the MessageBytes array */\r\n\t\t\tint currentReadIndex = ((msgSequence - 1) * (PACKETSIZE - 3));\r\n\t\t\r\n\t\t\t// leave room for the message counters (the -3 at the end)\r\n\t\t\tbyte[] val = Arrays.copyOfRange(allBytes, currentReadIndex, currentReadIndex + PACKETSIZE - 3);\r\n\r\n\t\t\t// the current packet counter is the message sequence, in two bytes\r\n\t byte[] currentPacketCounter = new byte[2];\r\n\t currentPacketCounter[0] = (byte)(msgSequence >> 8);\r\n\t currentPacketCounter[1] = (byte)(msgSequence & 0xFF);\r\n \r\n\t // build the payload for the packet using the identifying parent BleMessage number, the current BlePacket counter, and the BlePacket bayload\r\n\t val = Bytes.concat(new byte[]{(byte)(messageNumber & 0xFF)}, currentPacketCounter, val);\r\n\r\n\t // add this packet to our list of packets\r\n\t addPacket(msgSequence, val);\r\n\r\n\t // increment our counter for the next round\r\n\t msgSequence++;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// now that we've built up what all our packets are, clone these into a pending packets array\r\n\t\tpendingPackets = messagePackets.clone();\r\n\r\n\t\t// once we've built all the packets up, indicate we have packets pending send\r\n\t\tpendingPacketStatus = true;\r\n\t\t\r\n\t}",
"public static AbstractPacket newFromBytes(byte[] bytes) {\n try {\n if ((bytes == null) || (bytes.length < PacketHeader.getSize())) {\n CommsLog.log(CommsLog.Entry.Category.PROBLEM, \"Unable to generate a packet from the byte array; byte array was not big enough to hold a header\");\n }\n AbstractPacket packet = null;\n ByteBuffer reader = ByteBuffer.wrap(bytes);\n\n byte[] headerBytes = new byte[PacketHeader.getSize()];\n reader.get(headerBytes);\n PacketHeader header = PacketHeader.newFromBytes(headerBytes);\n\n if (header == null) {\n CommsLog.log(CommsLog.Entry.Category.PROBLEM, \"Unable to generate a packet header from the byte array\");\n return null;\n }\n\n packet = AbstractPacket.newFromHeader(header);\n if (packet == null) {\n CommsLog.log(CommsLog.Entry.Category.PROBLEM, \"Unable to generate a packet from the packet header\");\n return null;\n }\n\n int len = reader.remaining();\n if (len > 0) {\n byte[] packetBytes = new byte[len];\n reader.get(packetBytes);\n packet.parse(packetBytes);\n }\n reader.clear();\n return packet;\n } catch (Exception e) {\n return null;\n }\n }",
"public T build(PacketReader reader) throws ArtemisPacketException;",
"public PacketBuilder() {\n\t\tthis(1024);\n\t}",
"public abstract DatagramPacket buildPacket();",
"public LcpPacketFactory(PppParser parent) {\n parent.super(0xc021);\n packetFactories = new LcpPacketMap(this);\n configFactories = new LcpConfigMap(this);\n\n // Register LCP configuration option factories\n new LcpConfigMruFactory(this);\n new LcpConfigAccmFactory(this);\n new LcpConfigAuthFactory(this);\n new LcpConfigQualityFactory(this);\n new LcpConfigMagicNumFactory(this);\n new LcpConfigPfcFactory(this);\n new LcpConfigAcfcFactory(this);\n\n // Register LCP packet parser factories\n new LcpPacketConfigureFactory(this, configFactories, Types.REQ);\n new LcpPacketConfigureFactory(this, configFactories, Types.ACK);\n new LcpPacketConfigureFactory(this, configFactories, Types.NAK);\n new LcpPacketConfigureFactory(this, configFactories, Types.REJ);\n new LcpPacketTerminateFactory(this, LcpPacketTerminateFactory.Types.REQ);\n new LcpPacketTerminateFactory(this, LcpPacketTerminateFactory.Types.ACK);\n \n }",
"public interface FilePacketFactory<T extends FilePacket> extends\r\n PacketFactory<T> {\r\n\r\n\t/**\r\n\t * @param buffer\r\n\t * @param position\r\n\t * @param device\r\n\t * @return\r\n\t */\r\n\tpublic T newPacket(BitBuffer buffer, Protocol dlt, long position);\r\n\r\n}",
"private DAPMessage constructFrom(DatabaseTableRecord record) {\n return DAPMessage.fromXML(record.getStringValue(CommunicationNetworkServiceDatabaseConstants.DAP_MESSAGE_DATA_COLUMN_NAME));\n }",
"public void BuildMessageFromPackets(int packetCounter, byte[] packetPayload) {\r\n\t\tthis.addPacket(packetCounter, packetPayload);\r\n\t\t\r\n\t\t/* if we've got all the packets for this message,\r\n\t\t * set our pending packet flag to false (flag set in above addPacket method)\r\n\t\t */\r\n\t\tif (!pendingPacketStatus) {\r\n\t\t\t// now that we've got all the packets, build the raw bytes for this message\r\n\t\t\tallBytes = dePacketize();\r\n\t\t}\r\n\t\t\r\n\t}",
"public static PacketBase produce(byte[] buf, int offset, int len)\n\t{\n\t\tif(PacketConfig.kPacketBaseLen > len)\n\t\t{\n\t\t\tSystem.out.println(\"haha1\");\n\t\t\treturn null;\n\t\t}\n\t\tint packetLen = Serializer.deserializeInt(buf, offset + PacketConfig.kLenPos);\n\t\tSystem.out.println(\"packetLen = \" + packetLen);\n\t\tif( len <= buf.length )\n\t\t{\n\t\t\tSystem.out.println(\"len <= NetConfig.inputBufLen : \" + \"len = \" + len);\n\t\t\tif( packetLen > buf.length)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"packetLen > NetConfig.inputBufLen : \" + \"packetLen = \" + packetLen);\n\t\t\t\tWarningPacket packet = new WarningPacket(packetLen);\n\t\t\t\tSystem.out.println(\"packet too long!\");\n\t\t\t\treturn packet;\n\t\t\t}\n\t\t}\n\t\tif(packetLen > len)\n\t\t{\n\t\t\tSystem.out.println(\"haha2\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tPacketBase packet = null;\n\t\tchar type = Serializer.deserializeChar(buf, offset + PacketConfig.kTypePos);\n\t\t\n\t\tswitch(type)\n\t\t{\n\t\t\t// to be added\n\t\t\tcase PacketConfig.kUserRegRspPacketType:\n\t\t\t{\n\t\t\t\tSystem.out.println(\"receive kUserRegRspPacketType\");\n\t\t\t\tUserRegRspPacket userRegRspPacket = new UserRegRspPacket();\n\t\t\t\tuserRegRspPacket.deserialize(buf, offset);\n\t\t\t\tpacket = userRegRspPacket;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcase PacketConfig.kUserLoginRspPacketType:\n\t\t\t{\n\t\t\t\tSystem.out.println(\"receive kUserLoginRspPacketType\");\n\t\t\t\tUserLoginRspPacket userLoginRspPacket = new UserLoginRspPacket();\n\t\t\t\tSystem.out.println(\"UserLoginRspPacket userLoginRspPacket = new UserLoginRspPacket();\");\n\t\t\t\tuserLoginRspPacket.deserialize(buf, offset);\n\t\t\t\tSystem.out.println(\"userLoginRspPacket.deserialize(buf, offset);\");\n\t\t\t\tpacket = userLoginRspPacket;\n\t\t\t\tSystem.out.println(\"packet = userLoginRspPacket;\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcase PacketConfig.kAllAppInfoRspPacketType:\n\t\t\t{\n\t\t\t\tSystem.out.println(\"receive kAllAppInfoRspPacketType\");\n\t\t\t\tAllAppInfoRspPacket allAppInfoRspPacket = new AllAppInfoRspPacket();\n\t\t\t\tallAppInfoRspPacket.deserialize(buf, offset);\n\t\t\t\tpacket = allAppInfoRspPacket;\n\t\t\t\tbreak;\n\t\t\t}\t\n\t\t\t\n\t\t\tcase PacketConfig.kCustomizeAppInfoRspPacketType:\n\t\t\t{\n\t\t\t\tSystem.out.println(\"receive kCustomizeAppInfoRspPacketType\");\n\t\t\t\tCustomizeAppInfoRspPacket customizeAppInfoRspPacket = new CustomizeAppInfoRspPacket();\n\t\t\t\tcustomizeAppInfoRspPacket.deserialize(buf, offset);\n\t\t\t\tpacket = customizeAppInfoRspPacket;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcase PacketConfig.kCustomizeAppRspPacketType:\n\t\t\t{\n\t\t\t\tSystem.out.println(\"receive kCustomizeAppRspPacketType\");\n\t\t\t\tCustomizeAppRspPacket customizeAppRspPacket = new CustomizeAppRspPacket();\n\t\t\t\tcustomizeAppRspPacket.deserialize(buf, offset);\n\t\t\t\tpacket = customizeAppRspPacket;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcase PacketConfig.kSaveSceneRspPacketType:\n\t\t\t{\n\t\t\t\tSystem.out.println(\"receive kSaveSceneRspPacketType\");\n\t\t\t\tSaveSceneRspPacket saveSceneRspPacket = new SaveSceneRspPacket();\n\t\t\t\tsaveSceneRspPacket.deserialize(buf, offset);\n\t\t\t\tpacket = saveSceneRspPacket;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcase PacketConfig.kUnmountPacketType:\n\t\t\t{\n\t\t\t\tSystem.out.println(\"receive kUnmountPacketType*\");\n\t\t\t\tUnmountPacket unmountPacket = new UnmountPacket();\n\t\t\t\tunmountPacket.deserialize(buf, offset);\n\t\t\t\tpacket = unmountPacket;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcase PacketConfig.kMountPacketType:\n\t\t\t{\n\t\t\t\tSystem.out.println(\"receive kMountPacketType\");\n\t\t\t\tMountPacket mountPacket = new MountPacket();\n\t\t\t\tmountPacket.deserialize(buf, offset);\n\t\t\t\tpacket = mountPacket;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcase PacketConfig.kWorksetInfoRspPacketType:\n\t\t\t{\n\t\t\t\tSystem.out.println(\"receive kWorksetInfoRspPacketType\");\n\t\t\t\tWorksetInfoRspPacket worksetInfoRspPacket = new WorksetInfoRspPacket();\n\t\t\t\tworksetInfoRspPacket.deserialize(buf, offset);\n\t\t\t\tpacket = worksetInfoRspPacket;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcase PacketConfig.kRestoreSceneRspPacketType:\n\t\t\t{\n\t\t\t\tSystem.out.println(\"receive kRestoreSceneRspPacket\");\n\t\t\t\tRestoreSceneRspPacket restoreSceneRspPacket = new RestoreSceneRspPacket();\n\t\t\t\trestoreSceneRspPacket.deserialize(buf, offset);\n\t\t\t\tpacket = restoreSceneRspPacket;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcase PacketConfig.kUnCustomizeAppRspPacketType:\n\t\t\t{\n\t\t\t\tSystem.out.println(\"receive kUnCustomizeAppRspPacketType\");\n\t\t\t\tUnCustomizeAppRspPacket unCustomizeAppRspPacket = new UnCustomizeAppRspPacket();\n\t\t\t\tunCustomizeAppRspPacket.deserialize(buf, offset);\n\t\t\t\tpacket = unCustomizeAppRspPacket;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcase PacketConfig.kGetUserDirRspPacketType:\n\t\t\t{\n\t\t\t\tSystem.out.println(\"receive kGetUserDirRspPacketType\");\n\t\t\t\tGetUserDirRspPacket getUserDirRspPacket = new GetUserDirRspPacket();\n\t\t\t\tgetUserDirRspPacket.deserialize(buf, offset);\n\t\t\t\tpacket = getUserDirRspPacket;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcase PacketConfig.kGetFileListPacketRspType:\n\t\t\t{\n\t\t\t\tSystem.out.println(\"receive kGetFileListRspPacketType\");\n\t\t\t\tGetFileListRspPacket getFileListRspPacket = new GetFileListRspPacket();\n\t\t\t\tgetFileListRspPacket.deserialize(buf, offset);\n\t\t\t\tpacket = getFileListRspPacket;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// added by dhm 2011 7.17\n\t\t\tcase PacketConfig.kGetGradePacketRspType:\n\t\t\t{\n\t\t\t\tSystem.out.println(\"receive kGetGradePacketRspType\");\n\t\t\t\tGetGradeRspPacket getGradeRspPacket = new GetGradeRspPacket();\n\t\t\t\tgetGradeRspPacket.deserialize(buf, offset);\n\t\t\t\tpacket = getGradeRspPacket;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcase PacketConfig.kScoringPacketRspType:\n\t\t\t{\n\t\t\t\tSystem.out.println(\"receive kScoringRspPacketType\");\n\t\t\t\tScoringRspPacket scoringRspPacket = new ScoringRspPacket ();\n\t\t\t\tscoringRspPacket.deserialize(buf, offset);\n\t\t\t\tpacket = scoringRspPacket;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tdefault:\n\t\t\t{\n\t\t\t\tSystem.out.println(\"fatal error, unhandled packet!!!!!!!!!!!!!!!!!!!!!!!!!!\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"return packet\");\n\t\treturn packet;\n\t}",
"CustomTag createCustomTag(byte[] tagData);",
"public static RadiusPacket createPacket(final int code) throws CodecException {\n\t\tfinal Class<? extends RadiusPacket> clazz = PacketFactory.registeredPackets.get(Integer.valueOf(code));\n\t\tif (clazz == null) throw new CodecException(\"unknown packet code: \" + code);\n\t\ttry {\n\t\t\treturn clazz.newInstance();\n\t\t} catch (final Exception ex) {\n\t\t\tthrow new RuntimeException(\"error creating packet for code: \" + code, ex);\n\t\t}\n\t}",
"public static byte[] createPacket(byte[] data) {\r\n byte[] header = createHeader(seqNo);\r\n byte[] packet = new byte[data.length + header.length]; // data + header\r\n System.arraycopy(header, 0, packet, 0, header.length);\r\n System.arraycopy(data, 0, packet, header.length, data.length);\r\n seqNo = seqNo + 1;\r\n return packet;\r\n }",
"public CBSPacket(byte[] payload) {\n super(payload);\n }",
"private FullExtTcpPacket createPacket(\n long dataSizeByte,\n long sequenceNumber,\n long ackNumber,\n boolean ACK,\n boolean SYN,\n boolean ECE\n ) {\n return new FullExtTcpPacket(\n flowId, dataSizeByte, sourceId, destinationId,\n 100, 80, 80, // TTL, source port, destination port\n sequenceNumber, ackNumber, // Seq number, Ack number\n false, false, ECE, // NS, CWR, ECE\n false, ACK, false, // URG, ACK, PSH\n false, SYN, false, // RST, SYN, FIN\n congestionWindow, 0 // Window size, Priority\n );\n }",
"public Packet createPacket() {\n\t\treturn new Packet((ByteBuffer) buffer.flip());\n\t}",
"private PacketContainer newCreatePacket() {\n PacketContainer packet = newUpdatePacket();\n\n // set mode - byte\n packet.getIntegers().write(GTEQ_1_13 ? 0 : 1, UpdateType.CREATE.getCode());\n\n // add player info - array of String(40)\n List<String> players = new ArrayList<>(getPlayers());\n\n // set players - ProtocolLib handles setting 'Entity Count'\n packet.getSpecificModifier(Collection.class).write(0, players);\n \n return packet;\n }",
"private static DatagramPacket createPacket(byte[] data, SocketAddress remote) {\r\n\t\tDatagramPacket packet = new DatagramPacket(data, data.length, remote);\r\n\t\treturn packet;\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks whether the current user has been granted privileges to delete the specified node. | boolean canDelete(Node node); | [
"boolean hasPermission(String node);",
"private boolean checkDeletePermissions(String bucketName, String objectPath, User user)\n throws UnauthorizedException {\n BlobMetadata metadata = BlobManager.getBlobMetadata(bucketName, objectPath);\n if (metadata == null) {\n return false;\n }\n\n if (getUserId(user).equals(metadata.getOwnerId())) {\n // User is the owner.\n return true;\n }\n\n throw new UnauthorizedException(\"You don't have permissions to delete this object\");\n }",
"public boolean handleDeleteNode(Node node);",
"protected void checkDeletePermission(T entity) {\n check(entity, \"delete\");\n }",
"boolean canDeleteAuthorizable(Session session, String principalID);",
"private boolean cantDeleteNode(Node node) {\n return node.hasPage() || !node.getCheckedOut() || node.getParent() == null;\n }",
"public boolean delete(User user);",
"@TransactionAttribute(TransactionAttributeType.REQUIRED)\n\tprotected void removeAdmin(BaseNode node, long userId) throws UnauthorizedException {\n\t\tnode.getAdmins().remove(getUser(userId));\n\t\tem.merge(node);\n\t}",
"boolean canDeleteChildren(Node node);",
"public boolean isOkToDelete() {\r\n // TODO - implement User.isOkToDelete\r\n throw new UnsupportedOperationException();\r\n }",
"public void test_delete_failToDeleteWhenNotRoot() \r\n throws GrouperException,\r\n SessionException\r\n {\r\n GrouperSession nrs = GrouperSession.start(subjX);\r\n try {\r\n rSubjX.delete(nrs);\r\n fail(\"failed to throw expected InsufficientPrivilegeException\");\r\n }\r\n catch (InsufficientPrivilegeException eExpected) {\r\n assertTrue(\"threw expected InsufficientPrivilegeException\", true);\r\n }\r\n finally {\r\n nrs.stop();\r\n }\r\n }",
"public boolean deletePrivilege( ACLPrivilege privilege )\r\n {\r\n for( int i=0; i<privileges.size(); i++)\r\n {\r\n if( ((ACLPrivilege)privileges.get(i)).getPrivilege().equals(privilege.getPrivilege()) )\r\n {\r\n privileges.removeElement( privilege );\r\n this.modified = true;\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"@Override\n\tprotected boolean isDeleteAllowed(CollectableGenericObjectWithDependants clct) {\n\t\tfinal boolean result;\n\n\t\tif(isHistoricalView()) {\n\t\t\tLOG.debug(\"isDeleteAllowed: historical view\");\n\t\t\tresult = false;\n\t\t}\n\t\telse if(!MetaDataClientProvider.getInstance().getEntity(getEntityName()).isEditable())\n\t\t\treturn false;\n\t\telse\n\t\t\tresult = hasCurrentUserDeletionRights(clct, false);\n\t\tLOG.debug(\"isDeleteAllowed == \" + result);\n\n\t\treturn result;\n\t}",
"public boolean isPermissionGranted(NodeRef nodeRef, String authority, String permission, String provider);",
"public boolean canDelete(T entity) {\n return hasOption(EntityControllerOption.DELETE)\n && can(entity, \"delete\");\n }",
"public boolean deletePrivilege( String privilege )\r\n {\r\n for( int i=0; i<privileges.size(); i++)\r\n {\r\n if( ((ACLPrivilege)privileges.get(i)).getPrivilege().equals(privilege))\r\n {\r\n privileges.removeElement( privilege );\r\n this.modified = true;\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"public static boolean deleteNode(DataBroker dataBroker,\n InstanceIdentifier<?> genericNode,\n LogicalDatastoreType store) {\n LOG.info(\"Received a request to delete node {}\", genericNode);\n boolean result = false;\n final WriteTransaction transaction = dataBroker.newWriteOnlyTransaction();\n transaction.delete(store, genericNode);\n try {\n transaction.submit().checkedGet();\n result = true;\n } catch (final TransactionCommitFailedException e) {\n LOG.error(\"Unable to remove node with Iid {} from store {}\", genericNode, store, e);\n }\n return result;\n }",
"public boolean canDelete(SagaPlayer sagaPlayer) {\n\t\treturn true;\n\t}",
"public static <T> boolean removeByAdminOnly(T jdo) {\n\n UserData user = UserData.findLoggedInUserPrivileges(); \n if (user.canAdmin() == false) {\n return false;\n }\n\n Boolean success = null;\n PersistenceManager pm = PMF.get().getPersistenceManager();\n Transaction tx = pm.currentTransaction();\n try {\n tx.begin();\n pm.deletePersistent(jdo);\n tx.commit();\n success = true;\n } catch (Exception e) {\n log.log(Level.SEVERE, \"RequestFactoryUtils.removeAdminKeyOnly() Error: remove(): jdo=\" + jdo, e);\n e.printStackTrace();\n } finally {\n if (tx.isActive()) {\n tx.rollback();\n }\n pm.close();\n }\n \n return success;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the modifiedByID value for this Team. | public void setModifiedByID(java.lang.String modifiedByID) {
this.modifiedByID = modifiedByID;
} | [
"public java.lang.String getModifiedByID() {\r\n return modifiedByID;\r\n }",
"public void setIdEntidadRespondioModified(boolean idEntidadRespondioModified)\r\n\t{\r\n\t\tthis.idEntidadRespondioModified = idEntidadRespondioModified;\r\n\t}",
"public void setModifyed(Long modifyed) {\n this.modifyed = modifyed;\n }",
"public void setSoftwareIdModified(boolean softwareIdModified)\n\t{\n\t\tthis.softwareIdModified = softwareIdModified;\n\t}",
"public void setIdEmpresaModified(boolean idEmpresaModified)\r\n\t{\r\n\t\tthis.idEmpresaModified = idEmpresaModified;\r\n\t}",
"public void setIdRolesModified(boolean idRolesModified)\r\n\t{\r\n\t\tthis.idRolesModified = idRolesModified;\r\n\t}",
"public void setLastModifiedById(java.lang.String lastModifiedById) {\r\n this.lastModifiedById = lastModifiedById;\r\n }",
"public void setModifiedBy(int tmp) {\n this.modifiedBy = tmp;\n }",
"public void setIdUsuarioCapturoModified(boolean idUsuarioCapturoModified)\r\n\t{\r\n\t\tthis.idUsuarioCapturoModified = idUsuarioCapturoModified;\r\n\t}",
"public void setModifiedWho(final String aModifiedWho) {\n modifiedWho = aModifiedWho;\n }",
"public void setIdDatosUsuarioModified(boolean idDatosUsuarioModified)\r\n\t{\r\n\t\tthis.idDatosUsuarioModified = idDatosUsuarioModified;\r\n\t}",
"public void setLastModifiedById(java.lang.String lastModifiedById) {\n this.lastModifiedById = lastModifiedById;\n }",
"public void setUpdatedById(long updatedById);",
"public void setIdFormularioEventoModified(boolean idFormularioEventoModified)\r\n\t{\r\n\t\tthis.idFormularioEventoModified = idFormularioEventoModified;\r\n\t}",
"public void setIdDispositivoModified(boolean idDispositivoModified)\r\n\t{\r\n\t\tthis.idDispositivoModified = idDispositivoModified;\r\n\t}",
"public void setModifiedUserId(int modifiedUserId) {\n this.modifiedUserId = modifiedUserId;\n }",
"public void setModified(Act act, boolean modified) {\r\n this.modified.put(act.getObjectReference(), modified);\r\n }",
"public void setIdEstatusModified(boolean idEstatusModified)\r\n\t{\r\n\t\tthis.idEstatusModified = idEstatusModified;\r\n\t}",
"public void setModifyId(Long modifyId) {\n this.modifyId = modifyId;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
After Places and Rules have been added, there are only StringidtoINodemappings for the original inserted nodes, but not for the ones that were inserted automatically For beeing able to properly add arcs to the rule, we need those mappings | private static void fillMapsWithMappings(int ruleId,
Map<String, INode> idToINodeInL, Map<String, INode> idToINodeInK,
Map<String, INode> idToINodeInR) {
ITransformation transformation = TransformationComponent
.getTransformation();
// fill with mappings of Ls nodes
for (String xmlId : idToINodeInL.keySet()) {
INode node = idToINodeInL.get(xmlId);
List<INode> mappings = transformation.getMappings(ruleId, node);
for (int i = 0; i < mappings.size(); i++) {
INode respectiveNode = mappings.get(i);
if (respectiveNode != null) {
if (i == 0) {
idToINodeInL.put(xmlId, respectiveNode);
} else if (i == 1) {
idToINodeInK.put(xmlId, respectiveNode);
} else if (i == 2) {
idToINodeInR.put(xmlId, respectiveNode);
}
}
}
}
// fill with mappings of Ks nodes
for (String xmlId : idToINodeInK.keySet()) {
INode node = idToINodeInK.get(xmlId);
List<INode> mappings = transformation.getMappings(ruleId, node);
for (int i = 0; i < mappings.size(); i++) {
INode respectiveNode = mappings.get(i);
if (respectiveNode != null) {
if (i == 0) {
idToINodeInL.put(xmlId, respectiveNode);
} else if (i == 1) {
idToINodeInK.put(xmlId, respectiveNode);
} else if (i == 2) {
idToINodeInR.put(xmlId, respectiveNode);
}
}
}
}
// fill with mappings of Rs nodes
for (String xmlId : idToINodeInR.keySet()) {
INode node = idToINodeInR.get(xmlId);
List<INode> mappings = transformation.getMappings(ruleId, node);
for (int i = 0; i < mappings.size(); i++) {
INode respectiveNode = mappings.get(i);
if (respectiveNode != null) {
if (i == 0) {
idToINodeInL.put(xmlId, respectiveNode);
} else if (i == 1) {
idToINodeInK.put(xmlId, respectiveNode);
} else if (i == 2) {
idToINodeInR.put(xmlId, respectiveNode);
}
}
}
}
} | [
"private void mapTree(){\r\n if (stopAlgorithm){\r\n return;\r\n }\r\n t2 = 0;\r\n pm.updateTo(t2);\r\n pm.setMessage(\"Mapping Tree\");\r\n pm.setTitle(\"Mapping Tree\");\r\n pm.start();\r\n Enumeration en2 = selectedRoot.depthFirstEnumeration();\r\n HashMap affyhash=AnnotationParser.getGotable();\r\n if (affyhash != null) {\r\n while (en2.hasMoreElements()) {\r\n DefaultMutableTreeNode node = (DefaultMutableTreeNode) en2.\r\n nextElement();\r\n if (node.isLeaf())\r\n pm.updateTo(t2++);\r\n if (stopAlgorithm){\r\n return;\r\n }\r\n GoTerm currentTerm = (GoTerm) node.getUserObject();\r\n if (currentTerm != null){\r\n Vector<String> ids = (Vector<String>) affyhash.get(currentTerm.getId());\r\n currentTerm.addGeneNamesFromList(ids);\r\n if (currentTerm.hasAlternateIds()) {\r\n String[] gids = currentTerm.getAlternateIds();\r\n for (String gid : gids) {\r\n ids = (Vector<String>) affyhash.get(gid);\r\n if (ids != null) {\r\n for (String aid : ids){\r\n currentTerm.addGeneName(aid.trim());\r\n if (stopAlgorithm)\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n pm.stop();\r\n }",
"void remap()\n\t\t{\n\t\t\tif(nextMap == null)\n\t\t\t\treturn;\n\t\t\tnextMap = newNodeMap(nextMap);\n\t\t\tfor(Node<T> node : nextMap.values())\n\t\t\t\tnode.remap();\n\t\t}",
"private static Map<String, INode> addPlacesToRule(int id,\n \t\t\tList<Place> lPlaces, List<Place> kPlaces, List<Place> rPlaces,\n \t\t\tIRulePersistence handler, Map<String, INode> idToINodeInL,\n \t\t\tMap<String, INode> idToINodeInK, Map<String, INode> idToINodeInR)\n \t\t\tthrows EngineException {\n \t\tMap<String, INode> result = new HashMap<String, INode>();\n \t\t/*\n \t\t * All places must be in K. To determine where the places must be added,\n \t\t * we have to find out: Are they also in L AND in K or just in one of\n \t\t * them? And if they are only in one of them - in which?\n \t\t */\n \t\tfor (Place place : kPlaces) {\n \t\t\tRuleNet toAddto;\n \t\t\tif (getIdsOfPlaceList(lPlaces).contains(place.getId())) {\n \t\t\t\tif (getIdsOfPlaceList(rPlaces).contains(place.getId())) {\n \t\t\t\t\ttoAddto = RuleNet.K;\n \t\t\t\t} else {\n \t\t\t\t\ttoAddto = RuleNet.L;\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\ttoAddto = RuleNet.R;\n \t\t\t}\n \t\t\tINode createdPlace = handler.createPlace(id, toAddto,\n \t\t\t\t\tpositionToPoint2D(place.getGraphics().getPosition()));\n \t\t\thandler.setPlaceColor(id, createdPlace, place.getGraphics()\n \t\t\t\t\t.getColor().toAWTColor());\n \t\t\thandler.setPname(id, createdPlace, place.getPlaceName().getText());\n \t\t\thandler.setMarking(id, createdPlace,\n \t\t\t\t\tInteger.valueOf(place.getInitialMarking().getText()));\n \t\t\tif (toAddto == RuleNet.L) {\n \t\t\t\tidToINodeInL.put(place.id, createdPlace);\n \t\t\t} else if (toAddto == RuleNet.K) {\n \t\t\t\tidToINodeInK.put(place.id, createdPlace);\n \t\t\t} else {\n \t\t\t\tidToINodeInR.put(place.id, createdPlace);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}",
"private void createTanslation(){\n \tid2index = new HashMap<>();\n \tindex2id = new HashMap<>();\n \t// create the translation from id to index\n \tCollection<T> nodes = graph.getNodes();\n \tint index = 0;\n \tfor(T node : nodes) {\n \t\tindex2id.put(index, node.getId());\n \t\tid2index.put(node.getId(), index);\n \t\t++index;\n \t}\n }",
"public void correctMaps() {\n geneIdMap.clear();\n geneNameMap.clear();\n for (DSGeneMarker item : this) {\n Integer geneId = new Integer(item.getGeneId());\n if (geneId != null && geneId.intValue() != -1) {\n geneIdMap.addItem(geneId, item);\n }\n \n if (mapGeneNames) {\n String geneName = item.getGeneName();\n String label = item.getLabel();\n if (geneName != null && (!\"---\".equals(geneName))) {\n if (label != null && geneName.equals(\"\")) {\n geneNameMap.addItem(label, item);\n } else {\n geneNameMap.addItem(geneName, item);\n }\n }\n }\n \n }\n }",
"private void addMapping2Structures(){\n\t\t\n\t\t\n\t\tmappings2Review_step2.clear();\n\t\t\n\t\t\n\t\t//Fixed mappings can only be classes (so far)\n\t\tfor (MappingObjectStr map : fixed_mappings){\n\t\t\t\t\n\t\t\tif (map.getTypeOfMapping()==Utilities.CLASSES) {\n\t\t\t\t\n\t\t\t\taddClassMapping(map, true);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Class mappings from user interaction and property/instance mappings\n\t\tfor (MappingObjectStr map : candidate_mappings){\n\t\t\t\n\t\t\tif (map.getTypeOfMapping()==Utilities.CLASSES) {\n\t\t\t\t\n\t\t\t\taddClassMapping(map, false);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if (map.getTypeOfMapping()==Utilities.OBJECTPROPERTIES) {\n\t\t\t\t\t\n\t\t\t\taddObjectPropertyMapping(map);\n\t\t\t\t\n\t\t\t}\n\t\t\telse if (map.getTypeOfMapping()==Utilities.DATAPROPERTIES) {\n\t\t\t\t\n\t\t\t\taddDataPropertyMapping(map);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if (map.getTypeOfMapping()==Utilities.INSTANCES) {\n\t\t\t\t\t\n\t\t\t\taddInstanceMapping(map);\t\t\t\n\t\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//Do nothing\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\n\t\t\n\t\t\n\t\tLogOutput.printAlways(\"Numb of reliable mappings: \" + num_anchors);\n\t\tLogOutput.printAlways(\"Numb of other mappings: \" + num_mappings2review);\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"com.sun.java.xml.ns.j2Ee.VariableMappingType addNewVariableMapping();",
"com.sun.java.xml.ns.j2Ee.VariableMappingType insertNewVariableMapping(int i);",
"private void initializeNodes() {\n for (NasmInst inst : nasm.listeInst) {\n Node newNode = graph.newNode();\n inst2Node.put(inst, newNode);\n node2Inst.put(newNode, inst);\n if (inst.label != null) {\n NasmLabel label = (NasmLabel) inst.label;\n label2Inst.put(label.toString(), inst);\n }\n }\n }",
"private void populateOutputsInTree() {\n\t\tfor (ServiceNode s: serviceMap.values()) {\n\t\t\tfor (String outputVal : s.getOutputs())\n\t\t\t\ttaxonomyMap.get(outputVal).services.add(s);\n\t\t}\n\n\t\t// Now add the outputs of the input node\n\t\tfor (String outputVal : inputNode.getOutputs())\n\t\t\ttaxonomyMap.get(outputVal).services.add(inputNode);\n\t}",
"private static void createElementMappingForNodes(final Node n1, final Node n2,\n final Map<Node, Node> mapping)\n {\n mapping.put(n1, n2);\n final NodeList childNodes1 = n1.getChildNodes();\n final NodeList childNodes2 = n2.getChildNodes();\n final int count = Math.min(childNodes1.getLength(), childNodes2.getLength());\n for (int i = 0; i < count; i++)\n {\n createElementMappingForNodes(childNodes1.item(i),\n childNodes2.item(i), mapping);\n }\n }",
"public void addAreasToMap(){\n\t\tfor (Pair<Rectangle2D.Double,String> log:logicalAreas){\n\t\t\tfor (Node n:map){\n\t\t\t\tif (nodeToRect(n).intersects(log.getKey())){\n\t\t\t\t\tn.setLogical(log.getValue());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (Pair<Rectangle2D.Double,String> phys:physicalAreas){\n\t\t\tfor (Node s:map){\n\t\t\t\tif (nodeToRect(s).intersects(phys.getKey())){\n\t\t\t\t\ts.setPhysical(phys.getValue());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"org.lindbergframework.schema.LinpMappingDocument.LinpMapping addNewLinpMapping();",
"static void init_mappings()\n {\n }",
"public void buildMappings() {\n \t\tsecondPassCompile();\n \t}",
"private void addMappings(SourceMappingWriter output, JsSourceMap mappings) {\n Set<Range> rangeSet = mappings.keySet();\n\n Range[] ranges = rangeSet.toArray(new Range[rangeSet.size()]);\n Arrays.sort(ranges, Range.DEPENDENCY_ORDER_COMPARATOR);\n\n for (Range r : ranges) {\n SourceInfo info = mappings.get(r);\n\n if (info == SourceOrigin.UNKNOWN || info.getFileName() == null || info.getStartLine() < 0) {\n // skip a synthetic with no Java source\n continue;\n }\n if (r.getStartLine() == 0 || r.getEndLine() == 0) {\n // skip a bogus entry\n // JavaClassHierarchySetupUtil:prototypesByTypeId is pruned here. Maybe others too?\n continue;\n }\n\n output.addMapping(r, info, getJavaName(info));\n }\n output.flush();\n }",
"private void addEidMap(String[] words) {\n\t\t// add eidMap <dtnEid> <ipnEid>\n\t\t// 0 1 2 3\n\t\tif (words.length != 4) {\n\t\t\tSystem.err.println(\"Incorrect number of arguments\");\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tEidMap.getInstance().addMapping(words[2], words[3]);\n\t\t} catch (BPException e) {\n\t\t\tSystem.err.println(e.getMessage());\n\t\t}\n\t}",
"private void recreateStaticMaps()\n {\n\n ConcurrentHashMap<PSHierarchyNode.NodeType, ConcurrentHashMap<IPSGuid, String>> newNodeIdToPathMap = initializeHierarchyNodes();\n ConcurrentHashMap<IPSGuid, IPSGuid> newObjectIdToNodeIdMap = getAllHierarchyNodesGuidProperties();\n\n nodeIdToPathMap = newNodeIdToPathMap;\n objectIdToNodeIdMap = newObjectIdToNodeIdMap;\n\n }",
"private void replaceAllArcs(Cell cell, ArcInst oldAi, ArcProto ap, boolean connected, boolean thiscell)\n \t\t{\n EditWindow wnd = EditWindow.getCurrent();\n if (wnd == null) return;\n \t\t\tList highs = wnd.getHighlighter().getHighlightedEObjs(true, true);\n \t\t\tFlagSet marked = Geometric.getFlagSet(1);\n \n \t\t\t// mark the pin nodes that must be changed\n \t\t\tfor(Iterator it = cell.getNodes(); it.hasNext(); )\n \t\t\t{\n \t\t\t\tNodeInst ni = (NodeInst)it.next();\n \t\t\t\tni.clearBit(marked);\n \t\t\t\tni.setTempObj(null);\n \t\t\t}\n \t\t\tfor(Iterator it = cell.getArcs(); it.hasNext(); )\n \t\t\t{\n \t\t\t\tArcInst ai = (ArcInst)it.next();\n \t\t\t\tai.clearBit(marked);\n \t\t\t}\n \n \t\t\tfor(Iterator it = highs.iterator(); it.hasNext(); )\n \t\t\t{\n \t\t\t\tGeometric geom = (Geometric)it.next();\n \t\t\t\tif (!(geom instanceof ArcInst)) continue;\n \t\t\t\tArcInst ai = (ArcInst)geom;\n \t\t\t\tif (ai.getProto() != oldAi.getProto()) continue;\n \t\t\t\tai.setBit(marked);\n \t\t\t}\n \t\t\tif (connected)\n \t\t\t{\n \t\t\t\tNetlist netlist = cell.getUserNetlist();\n \t\t\t\tfor(Iterator it = cell.getArcs(); it.hasNext(); )\n \t\t\t\t{\n \t\t\t\t\tArcInst ai = (ArcInst)it.next();\n \t\t\t\t\tif (ai.getProto() != oldAi.getProto()) continue;\n \t\t\t\t\tif (!netlist.sameNetwork(ai, oldAi)) continue;\n \t\t\t\t\tai.setBit(marked);\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (thiscell)\n \t\t\t{\n \t\t\t\tfor(Iterator it = cell.getArcs(); it.hasNext(); )\n \t\t\t\t{\n \t\t\t\t\tArcInst ai = (ArcInst)it.next();\n \t\t\t\t\tif (ai.getProto() != oldAi.getProto()) continue;\n \t\t\t\t\tai.setBit(marked);\n \t\t\t\t}\n \t\t\t}\n \t\t\tfor(Iterator it = cell.getNodes(); it.hasNext(); )\n \t\t\t{\n \t\t\t\tNodeInst ni = (NodeInst)it.next();\n \t\t\t\tif (ni.getProto() instanceof Cell) continue;\n \t\t\t\tif (ni.getNumExports() != 0) continue;\n \t\t\t\tif (ni.getFunction() != NodeProto.Function.PIN) continue;\n \t\t\t\tboolean allArcs = true;\n \t\t\t\tfor(Iterator cIt = ni.getConnections(); cIt.hasNext(); )\n \t\t\t\t{\n \t\t\t\t\tConnection con = (Connection)cIt.next();\n \t\t\t\t\tif (!con.getArc().isBit(marked)) { allArcs = false; break; }\n \t\t\t\t}\n \t\t\t\tif (allArcs) ni.setBit(marked);\n \t\t\t}\n \n \t\t\t// now create new pins where they belong\n \t\t\tPrimitiveNode pin = ((PrimitiveArc)ap).findOverridablePinProto();\n \t\t\tdouble xS = pin.getDefWidth();\n \t\t\tdouble yS = pin.getDefHeight();\n \t\t\tList dupPins = new ArrayList();\n \t\t\tfor(Iterator it = cell.getNodes(); it.hasNext(); )\n \t\t\t{\n \t\t\t\tNodeInst ni = (NodeInst)it.next();\n \t\t\t\tif (!ni.isBit(marked)) continue;\n \t\t\t\tdupPins.add(ni);\n \t\t\t}\n \t\t\tfor(Iterator it = dupPins.iterator(); it.hasNext(); )\n \t\t\t{\n \t\t\t\tNodeInst ni = (NodeInst)it.next();\n \n \t\t\t\tNodeInst newNi = NodeInst.makeInstance(pin, ni.getAnchorCenter(), xS, yS, 0, cell, null, 0);\n \t\t\t\tif (newNi == null) return;\n \t\t\t\tnewNi.clearBit(marked);\n \t\t\t\tni.setTempObj(newNi);\n \t\t\t}\n \n \t\t\t// now create new arcs to replace the old ones\n \t\t\tList dupArcs = new ArrayList();\n \t\t\tfor(Iterator it = cell.getArcs(); it.hasNext(); )\n \t\t\t{\n \t\t\t\tArcInst ai = (ArcInst)it.next();\n \t\t\t\tif (ai.isBit(marked)) dupArcs.add(ai);\n \t\t\t}\n \t\t\tfor(Iterator it = dupArcs.iterator(); it.hasNext(); )\n \t\t\t{\n \t\t\t\tArcInst ai = (ArcInst)it.next();\n \n \t\t\t\tNodeInst ni0 = ai.getHead().getPortInst().getNodeInst();\n \t\t\t\tPortInst pi0 = null;\n \t\t\t\tif (ni0.getTempObj() != null)\n \t\t\t\t{\n \t\t\t\t\tni0 = (NodeInst)ni0.getTempObj();\n \t\t\t\t\tpi0 = ni0.getOnlyPortInst();\n \t\t\t\t} else\n \t\t\t\t{\n \t\t\t\t\t// need contacts to get to the right level\n \t\t\t\t\tpi0 = makeContactStack(ai, 0, ap);\n \t\t\t\t\tif (pi0 == null) return;\n \t\t\t\t}\n \t\t\t\tNodeInst ni1 = ai.getTail().getPortInst().getNodeInst();\n \t\t\t\tPortInst pi1 = null;\n \t\t\t\tif (ni1.getTempObj() != null)\n \t\t\t\t{\n \t\t\t\t\tni1 = (NodeInst)ni1.getTempObj();\n \t\t\t\t\tpi1 = ni1.getOnlyPortInst();\n \t\t\t\t} else\n \t\t\t\t{\n \t\t\t\t\t// need contacts to get to the right level\n \t\t\t\t\tpi1 = makeContactStack(ai, 1, ap);\n \t\t\t\t\tif (pi1 == null) return;\n \t\t\t\t}\n \n \t\t\t\tdouble wid = ap.getDefaultWidth();\n \t\t\t\tif (ai.getWidth() > wid) wid = ai.getWidth();\n \t\t\t\tArcInst newAi = ArcInst.makeInstance(ap, wid, pi0, ai.getHead().getLocation(),\n \t\t\t\t\tpi1, ai.getTail().getLocation(), null);\n \t\t\t\tif (newAi == null) return;\n \t\t\t\tnewAi.copyPropertiesFrom(ai);\n \t\t\t\tnewAi.clearBit(marked);\n \t\t\t}\n \n \t\t\t// now remove the previous arcs and nodes\n \t\t\tList killArcs = new ArrayList();\n \t\t\tfor(Iterator it = cell.getArcs(); it.hasNext(); )\n \t\t\t{\n \t\t\t\tArcInst ai = (ArcInst)it.next();\n \t\t\t\tif (ai.isBit(marked)) killArcs.add(ai);\n \t\t\t}\n \t\t\tfor(Iterator it = killArcs.iterator(); it.hasNext(); )\n \t\t\t{\n \t\t\t\tArcInst ai = (ArcInst)it.next();\n \t\t\t\tai.kill();\n \t\t\t}\n \n \t\t\tList killNodes = new ArrayList();\n \t\t\tfor(Iterator it = cell.getNodes(); it.hasNext(); )\n \t\t\t{\n \t\t\t\tNodeInst ni = (NodeInst)it.next();\n \t\t\t\tif (ni.isBit(marked)) killNodes.add(ni);\n \t\t\t}\n \t\t\tfor(Iterator it = killNodes.iterator(); it.hasNext(); )\n \t\t\t{\n \t\t\t\tNodeInst ni = (NodeInst)it.next();\n \t\t\t\tni.kill();\n \t\t\t}\n \t\t\tmarked.freeFlagSet();\n \t\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.