query
stringlengths 8
1.54M
| document
stringlengths 9
312k
| negatives
sequencelengths 19
20
| metadata
dict |
---|---|---|---|
Sets the value of the itHasFreeShipping property. | public void setItHasFreeShipping(int value) {
this.itHasFreeShipping = value;
} | [
"public void setIsFreeShipping(Boolean isFreeShipping) {\n this.isFreeShipping = isFreeShipping;\n }",
"public Boolean getIsFreeShipping() {\n return isFreeShipping;\n }",
"public int getItHasFreeShipping() {\n return itHasFreeShipping;\n }",
"public void setShipping(Address ship)\r\n\t{\r\n\t\tshipping = ship;\r\n\t}",
"void setShippingAddress(final boolean shippingAddress);",
"public void setShipping_fee(BigDecimal shipping_fee) {\n this.shipping_fee = shipping_fee;\n }",
"public void setAsFree()\r\n {\r\n this.isFree_ = true;\r\n }",
"public void setShippingCost(float shippingCost) {this.shippingCost = shippingCost;}",
"void setShippingMode(java.lang.String shippingMode);",
"public void setShippingCost(double shippingCost) {\n\t\tthis.shippingCost = shippingCost;\n\t}",
"void setShipping(BigDecimal shipping);",
"public void setFree(Boolean free)\n\t{\n\t\tthis.free = free;\n\t}",
"public void setShippingInfo(Map pShippingInfo) {\n mShippingInfo = pShippingInfo;\n }",
"public void setShippingKey(final String shippingKey);",
"public PaymentRequest setShipping(Shipping shipping) {\r\n this.shipping = shipping;\r\n return this;\r\n }",
"private void setFree(final boolean free) {\n\t\tthis.free = free;\n\t}",
"public void setShipping_amount(java.lang.String shipping_amount) {\n this.shipping_amount = shipping_amount;\n }",
"public void setShippingCost(BigDecimal shippingCost) {\n this.shippingCost = shippingCost;\n }",
"public void setShippingGroup(ShippingGroup pShippingGroup) {\n mShippingGroup = pShippingGroup;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use AvatarOptionMsg.newBuilder() to construct. | private AvatarOptionMsg(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
} | [
"private PlayerAvatar(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private iAvatarInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private Avatar(Builder builder) {\n super(builder);\n }",
"private ProfileOptions(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private MakeFriendsReqMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private AUVCommand(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"POGOProtos.Rpc.PlayerAvatarProtoOrBuilder getAvatarOrBuilder();",
"private GetFriendRspMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private NanoPBOptions(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private ProfileMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public OptionDialogBuilder(String title, String message) {\n\t\tthis.title = title;\n\t\tthis.message = message;\n\t\tthis.options = new ArrayList<>();\n\t\tthis.messageType = OptionDialog.PLAIN_MESSAGE;\n\t}",
"com.google.protobuf.ByteString getAvatar();",
"private SCLobbyChatMessageResult(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private MakeFriendsRspMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private CSLobbyChatMessageRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private UpdateCandidateExperienceProfileRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }",
"private OptResponseProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private CreateOptions(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private GetFriendReqMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Implementation of the abstract method that builds the grid column model for InternationalString. | @Override
protected ColumnModel<InternationalString> buildColumnModel() {
List<ColumnConfig<InternationalString, ?>> columnsConfigs = new ArrayList<ColumnConfig<InternationalString, ?>>();
languageCodeColumnConfig = new ColumnConfig<InternationalString, LanguageCode>(
IS_PROPS.langCode(), 15, "Language Code");
titleColumnConfig = new ColumnConfig<InternationalString, String>(
IS_PROPS.value(), 85, "Title");
columnsConfigs.add(languageCodeColumnConfig);
columnsConfigs.add(titleColumnConfig);
return new ColumnModel<InternationalString>(
columnsConfigs);
} | [
"public InternationalStringEditableGrid(String gridTitle) {\r\n super(gridTitle, new ListStore<InternationalString>(IS_PROPS.key())/*, buildColumnModel()*/);\r\n// setCheckBoxSelectionModel();\r\n }",
"private void setupColumns() {\n \t\n\t\tcountryColumn = new TextColumn<Measurement>() {\n\t\t @Override\n\t\t public String getValue(Measurement measurement) {\n\t\t return measurement.getCountry();\n\t\t }\n\t };\n\t \n\t cityColumn = new TextColumn<Measurement>() {\n\t\t @Override\n\t\t public String getValue(Measurement measurement) {\n\t\t return measurement.getCity();\n\t\t }\n\t };\n\t \n\t dateColumn = new TextColumn<Measurement>() {\n\t\t @Override\n\t\t public String getValue(Measurement measurement) {\n\t\t return dateFormat.format(measurement.getDate());\n\t\t }\n\t };\n\t \n\t avgColumn = new TextColumn<Measurement>() {\n\t\t @Override\n\t\t public String getValue(Measurement measurement) {\n\t\t \tfloat avg = Math.round(measurement.getAvg() * 1000f) / 1000f;\n\t\t return Float.toString(avg);\n\t\t }\n\t };\n\t \n\t errorColumn = new TextColumn<Measurement>() {\n\t\t @Override\n\t\t public String getValue(Measurement measurement) {\n\t\t \tfloat err = Math.round(measurement.getError() * 1000f) / 1000f;\n\t\t return Float.toString(err);\n\t\t }\n\t };\n\t \n\t latColumn = new TextColumn<Measurement>() {\n\t\t @Override\n\t\t public String getValue(Measurement measurement) {\n\t\t \tfloat lat = Math.round(measurement.getCoords().getLat() * 1000f) / 1000f;\n\t\t return Float.toString(lat);\n\t\t }\n\t };\n\t \n\t lonColumn = new TextColumn<Measurement>() {\n\t\t @Override\n\t\t public String getValue(Measurement measurement) {\n\t\t \tfloat lon = Math.round(measurement.getCoords().getLon() * 1000f) / 1000f;\n\t\t return Float.toString(lon);\n\t\t }\n\t };\n\n\t // Set the width of each column.\n\t measurementTable.setColumnWidth(countryColumn, 150, Unit.PX);\n\t measurementTable.setColumnWidth(cityColumn, 150, Unit.PX);\n\t measurementTable.setColumnWidth(dateColumn, 150, Unit.PX);\n\t measurementTable.setColumnWidth(avgColumn, 150, Unit.PX);\n\t measurementTable.setColumnWidth(errorColumn, 150, Unit.PX);\n\t measurementTable.setColumnWidth(latColumn, 150, Unit.PX);\n\t measurementTable.setColumnWidth(lonColumn, 150, Unit.PX);\n\t \n\t countryColumn.setSortable(true);\n\t cityColumn.setSortable(true);\n\t dateColumn.setSortable(true);\n\t avgColumn.setSortable(true);\n\t errorColumn.setSortable(true);\n\t latColumn.setSortable(true);\n\t lonColumn.setSortable(true);\n\t \n\t measurementTable.addColumn(countryColumn, \"Country\");\n\t measurementTable.addColumn(cityColumn, \"City\");\n\t measurementTable.addColumn(dateColumn, \"Date\");\n\t measurementTable.addColumn(avgColumn, \"Average\");\n\t measurementTable.addColumn(errorColumn, \"Error\");\n\t measurementTable.addColumn(latColumn, \"Latitude\");\n\t measurementTable.addColumn(lonColumn, \"Longitude\");\n\t \n\t columnNames.add(\"country\");\n\t columnNames.add(\"city\");\n\t columnNames.add(\"Date\");\n\t columnNames.add(\"avg\");\n\t columnNames.add(\"error\");\n\t columnNames.add(\"lat\");\n\t columnNames.add(\"lon\");\n\t}",
"public ScGridColumn<AcMobileDeviceTransmitSummaryVo> newMobileDeviceLabelColumn()\n {\n return newMobileDeviceLabelColumn(\"Mobile Device Label\");\n }",
"public ScGridColumn<AcItem> newRelinquishCustodyLocalTsColumn()\n {\n return newRelinquishCustodyLocalTsColumn(\"Relinquish Custody Local Ts\");\n }",
"public ScGridColumn<AcItem> newDisplayLabelColumn()\n {\n return newDisplayLabelColumn(\"Display Label\");\n }",
"public abstract List<String> newReportColumns();",
"public ScGridColumn<AcItem> newKilogramSourceColumn()\n {\n return newKilogramSourceColumn(\"Kilogram Source\");\n }",
"public String constructLgIssueLookup()\r\n {\r\n try\r\n {\r\n String[] name = null, colType = null, titles = null;\r\n\r\n // Design the Grid by defining the column model and column names\r\n name = new String[] {\"tfsLgVO.REQUISITION_NBR\", \"lgStatusDesc\", \"tfsLgVO.CIF\", \"cifDesc\",\r\n \"cyBriefDesc\", \"tfsLgVO.AMOUNT\", \"tfsLgVO.DOC_DATE\", \"tfsLgVO.VALIDITY_FROM\",\r\n \"tfsLgVO.VALIDITY_TO\", \"tfsDocTypeDesc\", \"cyDecimalPt\"};\r\n\r\n colType = new String[] {\"number\", \"text\", \"number\", \"text\", \"text\", \"number\", \"date\", \"date\",\r\n \"date\", \"text\", \"number\"};\r\n\r\n titles = new String[] {getText(\"Request_No_key\"), getText(\"Status_key\"), getText(\"CIF_key\"),\r\n getText(\"Party_Name_key\"), getText(\"Currency_key\"), getText(\"Amount_key\"),\r\n getText(\"Doc_date_key\"), getText(\"ValidityFrom_key\"), getText(\"ValidityTill_key\"),\r\n getText(\"Type_key\"), getText(\"Decimal_points_key\")};\r\n\r\n // Defining the Grid\r\n LookupGrid grid = new LookupGrid();\r\n grid.setCaption(getText(\"LG_Request_key\"));\r\n grid.setRowNum(\"5\");\r\n grid.setUrl(\"/pathdesktop/LetterGuaranteeLookup_fillLgIssueLookup\");\r\n\r\n List<LookupGridColumn> lgGridColumn = returnStandarColSpecs(name, colType, titles);\r\n\r\n for(int i = 0; i < name.length; i++)\r\n {\r\n if(\"tfsLgVO.REQUISITION_NBR\".equals(lgGridColumn.get(i).getName()))\r\n {\r\n lgGridColumn.get(i).setLeadZeros(\"10\");\r\n }\r\n else if(\"tfsLgVO.AMOUNT\".equals(lgGridColumn.get(i).getName()))\r\n {\r\n lgGridColumn.get(i).setFormatter(\"currencyFmatter\");\r\n lgGridColumn.get(i).setFormatCol(\"cyDecimalPt\");\r\n }\r\n else if(\"cyDecimalPt\".equals(lgGridColumn.get(i).getName()))\r\n {\r\n lgGridColumn.get(i).setHidden(true);\r\n }\r\n }\r\n lookup(grid, lgGridColumn, null, criteria);\r\n }\r\n catch(Exception e)\r\n {\r\n log.error(e, \"Error in constructLgIssueLookup of LetterGuaranteeLookupAction\");\r\n handleException(e, null, null);\r\n }\r\n\r\n return SUCCESS;\r\n }",
"@objid (\"d9104cce-fec4-47f8-bc0e-ece2572772fa\")\n private void createColumns(final StyleEditPanelUI ui) {\n final String[] columnTitles = {\n DiagramStyles.I18N.getString(\"StylesViewer.Property\"),\n DiagramStyles.I18N.getString(\"StylesViewer.Value\") };\n final int[] columnInitialWidths = { 150, 150 };\n \n // First column is for the style key name\n this.col1 = createTreeViewerColumn(ui,\n columnTitles[0],\n columnInitialWidths[0]);\n \n if (this.tableMode) {\n this.col1.setLabelProvider(new KeyTableLabelProvider(\n () -> getModel().getStyleTreeModel(),\n () -> getModel().getStyleData()));\n } else {\n this.col1.setLabelProvider(new KeyTreeLabelProvider(\n () -> getModel().getStyleTreeModel(),\n () -> getModel().getStyleData()));\n \n }\n \n // Second column is for the style key type\n ViewerColumn col2 = createTreeViewerColumn(ui, columnTitles[1], columnInitialWidths[1]);\n col2.setLabelProvider(new StyleCellLabelProvider(\n this.viewer,\n this.tableMode,\n () -> getModel().getStyleTreeModel()));\n col2.setEditingSupport(new StylePropertyEditingSupport(this.viewer));\n }",
"public ScGridColumn<AcItem> newAcceptCustodyLocalTsColumn()\n {\n return newAcceptCustodyLocalTsColumn(\"Accept Custody Local Ts\");\n }",
"public ScGridColumn<AcUspsInternationalCandidateRouteDetailVo> newUspsInternationalCandidateRouteLegsColumn()\n {\n return newUspsInternationalCandidateRouteLegsColumn(\"Usps International Candidate Route Legs\");\n }",
"private DecoratedGridCellValueAdaptor<String> makeDialectCell() {\n PopupDialectDropDownEditCell pudd = new PopupDialectDropDownEditCell( isReadOnly );\n return new DecoratedGridCellValueAdaptor<String>( pudd,\n eventBus );\n }",
"public ScGridColumn<AcCommonCustodySummaryVo> newContinuedOnKilogramColumn()\n {\n return newContinuedOnKilogramColumn(\"Continued On Kilogram\");\n }",
"private void populateLangTable() {\n TreeTableColumn<String, String> languages = new TreeTableColumn<>(\"Languages\");\n languages.setMaxWidth(150);\n languages.setMinWidth(150);\n languages.setCellValueFactory(new ViewRequestControllerOUTDATED.selfFactoryTest<String>());\n\n trtbl_languages.getColumns().addAll(languages);\n }",
"public ScGridColumn<AcCommonCustodySummaryVo> newDepartedKilogramColumn()\n {\n return newDepartedKilogramColumn(\"Departed Kilogram\");\n }",
"public ScGridColumn<AcUpuTagSummaryVo> newMailSubClassCodeColumn()\n {\n return newMailSubClassCodeColumn(\"Mail Sub Class Code\");\n }",
"public ScGridColumn<AcUpuTagSummaryVo> newMailCategoryCodeColumn()\n {\n return newMailCategoryCodeColumn(\"Mail Category Code\");\n }",
"public ScGridColumn<AcItemMovementVo> newFlightsDisplayLabelColumn()\n {\n return newFlightsDisplayLabelColumn(\"Flights Display Label\");\n }",
"public ScGridColumn<AcUspsInternationalUnfleshedOutSkeletonRouteVo> newUspsInternationalSkeletonRouteLegDepartureLocalTmColumn()\n {\n return newUspsInternationalSkeletonRouteLegDepartureLocalTmColumn(\"Usps International Skeleton Route Leg Departure Local Tm\");\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new animation timer and calls act on the actors stored in the list | public void createTimer() {
timer = new AnimationTimer() {
@Override
public void handle(long now) {
act(now);
List<Actor> actors = getObjects(Actor.class);
for (Actor anActor: actors) {
anActor.act(now);
}
}
};
} | [
"private void animate() {\n Timer spinTimer = new Timer();\n spinTimer.schedule(new TimerTask() {\n \n @Override\n public void run() {\n if(isAlive()) {\n switch (animationCounter) {\n case 5:\n newSprite(Sprite.ASTEROID2);\n break;\n case 10:\n newSprite(Sprite.ASTEROID3);\n break;\n case 15:\n newSprite(Sprite.ASTEROID4);\n break;\n case 20:\n newSprite(Sprite.ASTEROID5);\n break;\n case 25:\n newSprite(Sprite.ASTEROID6);\n break;\n case 30:\n newSprite(Sprite.ASTEROID7);\n break;\n case 35:\n newSprite(Sprite.ASTEROID8);\n animationCounter = 0;\n break;\n }\n animationCounter++;\n if(!isAlive()) {\n this.cancel();\n }\n }\n }\n }, 0, 20);\n }",
"public void makeTimer(){\n\t\n\t\tframeIndex = 0;\n\t\n\t\t//Create a new interpolator\n\t\tInterpolator lint = new Interpolator();\n\t\n\t\t//interpolate between all of the key frames in the list to fill the array\n\t\tframes = lint.makeFrames(keyFrameList);\n\t\n\t\t//timer delay is set in milliseconds, so 1000/fps gives delay per frame\n\t\tint delay = 1000/fps; \n\t\n\t\n\t\tActionListener taskPerformer = new ActionListener() {\n\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tif(frameIndex == frames.length){ frameIndex = 0;}\n\n\t\t\t\tframes[frameIndex].display();\n\t\t\t\tframes[frameIndex].clearDisplay();\n\t\t\t\tframeIndex++;\n\t\t\t}\n\t\t};\n\n\t\ttimer = new Timer(delay, taskPerformer);\t\n\t}",
"TimerActions createTimerActions();",
"TimerAction createTimerAction();",
"public void act() \n {\n //plays animation with a delay between frames\n explosionSound.play();\n i = (i+1)%(frames.length); \n setImage(frames[i]);\n if(i == 0) getWorld().removeObject(this);\n }",
"public AnimationTimer() {\n // Go for default at 200 msec / frame\n timer = new Timer(200, new TimerListener());\n timer.setRepeats(true);\n\n eyePoints[0] = new Point();\n eyePoints[1] = new Point();\n }",
"public void play()\n{\n // If timer is null, create it\n if(_timer==null)\n _timer = new javax.swing.Timer(getInterval(), new ActionListener() {\n public void actionPerformed(ActionEvent e) { update(); }});\n\n // If animator not running, start timer\n if(!isRunning()) {\n \n // Record time animator was at and time started\n _playStartTime = getTime();\n _startTime = System.currentTimeMillis();\n \n // Start timer\n _timer.start();\n \n // Send animatorStarted notification\n for(Listener listener : getListeners(Listener.class)) listener.animatorStarted(this);\n }\n}",
"private void setupAnimationTimer() {\n new AnimationTimer() {\n @Override\n public void handle(long l) {\n view.movePlayer();\n view.updateView();\n }\n }.start();\n\n // Timeline for UI stuff\n uiTimeline = new Timeline();\n\n KeyFrame keyStart = new KeyFrame(\n Duration.seconds(0),\n e -> view.updateUI((1160 / distance) * 0.005)\n );\n KeyFrame keyEnd = new KeyFrame(Duration.millis(5));\n\n uiTimeline.getKeyFrames().addAll(keyStart, keyEnd);\n uiTimeline.setCycleCount(Timeline.INDEFINITE);\n uiTimeline.setAutoReverse(false);\n\n countdownTimer = new Timeline(\n new KeyFrame(\n Duration.seconds(distance - (1160 / distance) * 0.005),\n e -> journeyComplete()\n )\n );\n\n // Timeline for asteroids\n Timeline asteroidTimer = new Timeline(\n new KeyFrame(Duration.millis(2000), e -> model.AsteroidPool.spawn())\n );\n asteroidTimer.setCycleCount(Timeline.INDEFINITE);\n asteroidTimer.play();\n }",
"private void updateAnimations() {\n // Copy the animation requests to avoid concurrent modifications.\n AnimationHandleImpl[] curAnimations = new AnimationHandleImpl[animationRequests.size()];\n curAnimations = animationRequests.toArray(curAnimations);\n\n // Iterate over the animation requests.\n Duration duration = new Duration();\n for (AnimationHandleImpl requestId : curAnimations) {\n // Remove the current request.\n animationRequests.remove(requestId);\n\n // Execute the callback.\n requestId.getCallback().execute(duration.getStartMillis());\n }\n\n // Reschedule the timer if there are more animation requests.\n if (animationRequests.size() > 0) {\n /*\n * In order to achieve as close to 60fps as possible, we calculate the new\n * delay based on the execution time of this method. The delay will be\n * less than 16ms, assuming this method takes more than 1ms to complete.\n */\n timer.schedule(Math.max(MIN_FRAME_DELAY, DEFAULT_FRAME_DELAY - duration.elapsedMillis()));\n }\n }",
"Animation createAnimation();",
"private void createAnimation () {\n // KeyFrame frame = new KeyFrame(Duration.millis(MILLISECOND_DELAY), e -> myManager.step());\n // myAnimation = new Timeline();\n // myAnimation.setCycleCount(Timeline.INDEFINITE);\n // myAnimation.getKeyFrames().add(frame);\n }",
"public void act() { \n check = borde(flag);\n if(check == true )\n restaura();\n moveRandom(move);\n if(animationE % 3 == 0){\n checkanimation();\n } \n animationE++; \n alive=checkfire();\n if(alive == true){\n enemyoff();\n } \n \n }",
"public void start(){ \n actTime=0;\n pause=false;\n \n if(isFinished){ \n \t AnimationManager.addAnimation(this);\n \t isFinished = false;\n }\n }",
"void startAnimation() {\r\n initAnimation();\r\n sAnimations.get().add(this);\r\n if (mStartDelay > 0 && mListeners != null) {\r\n // Listeners were already notified in start() if startDelay is 0; this is\r\n // just for delayed animations\r\n ArrayList<AnimatorListener> tmpListeners = (ArrayList<AnimatorListener>) mListeners\r\n .clone();\r\n int numListeners = tmpListeners.size();\r\n for (int i = 0; i < numListeners; ++i) {\r\n tmpListeners.get(i).onAnimationStart(this);\r\n }\r\n }\r\n }",
"public void act() \n {\n returnScore();\n returnTimer();\n }",
"public void act() {\n spawnTimer++;\n checkScore(scoreCounter.getValue());\n setCurrentScore();\n \n if (PoliceUnits == 300) {\n getPoliceUnits().add(1);\n PoliceUnits = 0;\n } else {\n ++PoliceUnits;\n }\n if (FirefighterUnits == 800) {\n getFirefighterUnits().add(1);\n FirefighterUnits = 0;\n } else {\n ++FirefighterUnits;\n }\n }",
"public void start() {\n if (animationTimer != null) {\n animationTimer.cancel();\n }\n animationTimer = new Timer();\n animationTimer.scheduleAtFixedRate(new AnimationTask(), 0, 25);\n }",
"public void act()\n {\n time();\n score(0);\n if(time % 100 == 0)\n {\n addZombies(2);\n }\n }",
"private static void agentsAction() {\n\t\tfor (Agent agent : agentList) {\n\t\t\tagent.perceive();\n\t\t\tagent.decide();\n\t\t\tagent.act();\n\t\t\tif(displayLogs) {\n\t\t\t\tSystem.out.println(agent.toString());\n\t\t\t}\n\t\t\tif (agent.isDead() && timer != null) {\n\t\t\t\ttimer.cancel();\n\t\t\t\ttimer = null;\n\t\t\t}\n\t\t}\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
theme color app label | public String getColorAppLabel() { return colorAppLabel;} | [
"public String getColorAppText() { return colorAppText;}",
"public String _buildtheme() throws Exception{\n_theme.Initialize(\"pagetheme\");\r\n //BA.debugLineNum = 91;BA.debugLine=\"theme.AddABMTheme(ABMShared.MyTheme)\";\r\n_theme.AddABMTheme(_abmshared._mytheme);\r\n //BA.debugLineNum = 94;BA.debugLine=\"theme.AddLabelTheme(\\\"lightblue\\\")\";\r\n_theme.AddLabelTheme(\"lightblue\");\r\n //BA.debugLineNum = 95;BA.debugLine=\"theme.Label(\\\"lightblue\\\").ForeColor = ABM.COLOR_LI\";\r\n_theme.Label(\"lightblue\").ForeColor = _abm.COLOR_LIGHTBLUE;\r\n //BA.debugLineNum = 96;BA.debugLine=\"End Sub\";\r\nreturn \"\";\r\n}",
"boolean labelColor(String mode);",
"public void modeColor(Graphics2D g2d) { g2d.setColor(RTColorManager.getColor(\"label\", \"default\")); }",
"public String getColorAppBt() { return colorAppBt;}",
"private void setColourTheme() {\n\t\tjpMain.setBorder(new EmptyBorder(0, 10, 10, 10));\n\t\tjpMain.setBackground(new Color(50, 50, 50));\n\n\t\tjpCenter.setBackground(new Color(90, 90, 90));\n\t\tjpCenterNorth.setBackground(new Color(90, 90, 90));\n\t\tjpCenterSouth.setBackground(new Color(90, 90, 90));\n\t\tjpEast.setBackground(new Color(90, 90, 90));\n\t\tjpEastCenter.setBackground(new Color(90, 90, 90));\n\t\tjpEastSouth.setBackground(new Color(90, 90, 90));\n\t\tjpCreateRoom.setBackground(new Color(90, 90, 90));\n\t\tjpEastNorth.setBackground(new Color(90, 90, 90));\n\n\t\tjlPassword.setForeground(new Color(255, 255, 255));\n\t\tjlPassword.setFont(new Font(\"Monospaced\", Font.BOLD, 15));\n\n\t\tjlblPrivateRooms.setForeground(new Color(255, 255, 255));\n\t\tjlblPrivateRooms.setFont(new Font(\"Monospaced\", Font.BOLD, 15));\n\n\t\tjlblPublicRooms.setForeground(new Color(255, 255, 255));\n\t\tjlblPublicRooms.setFont(new Font(\"Monospaced\", Font.BOLD, 15));\n\n\t\tjlConfirmPassword.setForeground(new Color(255, 255, 255));\n\t\tjlConfirmPassword.setFont(new Font(\"Monospaced\", Font.BOLD, 15));\n\n\t\tif (!jbPublic.isEnabled()) {\n\t\t\tjbPublic.setBackground(new Color(110, 110, 110));\n\t\t\tjbPrivate.setBackground(new Color(160, 160, 160));\n\n\t\t\tjbPublic.setForeground(new Color(20, 20, 20));\n\t\t\tjbPrivate.setForeground(new Color(255, 255, 255));\n\t\t} else {\n\t\t\tjbPrivate.setBackground(new Color(110, 110, 110));\n\t\t\tjbPublic.setBackground(new Color(160, 160, 160));\n\n\t\t\tjbPrivate.setForeground(new Color(20, 20, 20));\n\t\t\tjbPublic.setForeground(new Color(255, 255, 255));\n\t\t}\n\n\t\tjbPublic.setFont(new Font(\"Garamond\", Font.BOLD, 15));\n\t\tjbPrivate.setFont(new Font(\"Garamond\", Font.BOLD, 15));\n\n\t\tjbCreateRoom.setBackground(new Color(160, 160, 160));\n\t\tjbCreateRoom.setForeground(new Color(255, 255, 255));\n\t\tjbCreateRoom.setFont(new Font(\"Garamond\", Font.BOLD, 15));\n\t}",
"public void autoUpdateColorLabels()\n\t{\n\t\tEvent topEvent = this.myData.getTopEvent();\n\t\tif ( topEvent != null )\n\t\t\tthis.myTopColorLabel.setBackground( Colors.getEventColor( topEvent ));\n\t\telse\n\t\t\tthis.myTopColorLabel.setBackground( Colors.GRAY );\n\n\t\tEvent botEvent = this.myData.getBotEvent();\n\t\tif ( botEvent != null )\n\t\t\tthis.myBotColorLabel.setBackground( Colors.getEventColor( botEvent ));\n\t\telse\n\t\t\tthis.myBotColorLabel.setBackground( Colors.GRAY );\n\t}",
"BPMNLabelStyle createBPMNLabelStyle();",
"private void setDefaultTextColor(Context context) {\n\n }",
"public void setLblColor(Color value) {\n lblColor = value;\n }",
"void setTextColor(GralColor color);",
"private void updateTextColor() {\n if (mLauncher == null) {\n return;\n }\n ItemInfo info = (ItemInfo) getTag();\n if (info == null || mSupportCard) {\n return;\n }\n int color = getDyncTitleColor(info);\n mIconTitleColor = color;\n setPaintShadowLayer(color);\n if (getPaint().getColor() != color) {\n setTextColor(color);\n }\n\n }",
"public Color getLblColor() {\n return lblColor;\n }",
"protected void makeIntensityLabelColorOptions(final GridBagConstraints gbc, final GridBagLayout gbl) {\r\n final JLabel l1 = new JLabel(\"Intensity label color:\");\r\n l1.setFont(MipavUtil.font12);\r\n l1.setForeground(Color.black);\r\n\r\n gbc.insets = new Insets(0, 0, 0, 5);\r\n gbc.gridwidth = 1;\r\n gbc.anchor = GridBagConstraints.WEST;\r\n gbl.setConstraints(l1, gbc);\r\n displayColorPanel.add(l1);\r\n\r\n intensityLabelColorButton = new JButton();\r\n intensityLabelColorButton.setActionCommand(\"intensityLabelColor\");\r\n intensityLabelColorButton.addActionListener(this);\r\n\r\n intensityLabelBackgroundButton = new JButton();\r\n intensityLabelBackgroundButton.setActionCommand(\"intensityLabelBackground\");\r\n intensityLabelBackgroundButton.addActionListener(this);\r\n\r\n gbc.insets = new Insets(0, 0, 0, 0);\r\n gbc.anchor = GridBagConstraints.WEST;\r\n gbl.setConstraints(intensityLabelColorButton, gbc);\r\n displayColorPanel.add(intensityLabelColorButton);\r\n\r\n gbc.gridwidth = GridBagConstraints.REMAINDER;\r\n gbl.setConstraints(intensityLabelBackgroundButton, gbc);\r\n displayColorPanel.add(intensityLabelBackgroundButton);\r\n\r\n String prefColor = Preferences.getProperty(Preferences.PREF_INTENSITY_LABEL_COLOR);\r\n\r\n if (prefColor != null) {\r\n intensityLabelColor = MipavUtil.extractColor(prefColor);\r\n intensityLabelColorButton.setBackground(intensityLabelColor);\r\n } else {\r\n Preferences.setProperty(Preferences.PREF_INTENSITY_LABEL_COLOR, MipavUtil.makeColorString(Color.yellow));\r\n intensityLabelColorButton.setBackground(Color.yellow);\r\n intensityLabelColor = Color.yellow;\r\n }\r\n\r\n prefColor = Preferences.getProperty(Preferences.PREF_INTENSITY_LABEL_BACKGROUND_COLOR);\r\n\r\n if (prefColor != null) {\r\n intensityLabelBackgroundColor = MipavUtil.extractColor(prefColor);\r\n intensityLabelBackgroundButton.setBackground(intensityLabelBackgroundColor);\r\n } else {\r\n Preferences.setProperty(Preferences.PREF_INTENSITY_LABEL_BACKGROUND_COLOR, MipavUtil\r\n .makeColorString(Color.black));\r\n intensityLabelBackgroundButton.setBackground(Color.black);\r\n intensityLabelBackgroundColor = Color.black;\r\n }\r\n\r\n }",
"public String getLabelColor()\n {\n return myLabelColor;\n }",
"private void resetLabelColor(){\n setLabelColorStandard(nameLabel, normalColor);\n setLabelColorStandard(xLabel, Color.red);\n setLabelColorStandard(yLabel, Color.blue);\n setLabelColorStandard(zLabel, Color.green);\n setLabelColorStandard(rotXLabel, Color.red);\n setLabelColorStandard(rotYLabel, Color.blue);\n setLabelColorStandard(rotZLabel, Color.green);\n setLabelColorStandard(scaleLabel, normalColor);\n }",
"public void setLabelColor(String labelColor)\n {\n myLabelColor = labelColor;\n }",
"private String _textColorCmd(String color){\n String cmdStart = \"-fx-text-fill: \";\r\n String cmdEnd = \"\";\r\n return cmdStart + color + cmdEnd;\r\n }",
"java.lang.String getTheme();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Play Selected Song Convert selected index in Jlist (listSong) to Arraylist index (listSong in class action) | public void play(int idx) {
try {
if (action.statusPlay == 1) {
action.stopMusic();
timer.cancel();
timespend = 0;
}
index = idx;
arl = getList();
int lastIndex = arl.size();
if (index > lastIndex){
index = 0;
}
else if (index < 0) {
index = lastIndex;
}
timer.cancel();
listSong.setSelectedIndex(index);
action.playMusic(index);
btnVolume.setEnabled(true);
vlmSlide.setEnabled(true);
seekBar.setEnabled(true);
lblSong.setText("Now Playing : " + action.getTitle());
second = 1;
startCount();
}
catch (Exception e) {
}
} | [
"public void playSong(int songIndex);",
"@Override\n public void onClick(View v) {\n\n\n\n List<AudioModel> l = new ArrayList<>();\n for (int i = 0; i < aList.size(); i++) {\n if (aList.get(i) instanceof AudioModel)\n l.add((AudioModel) aList.get(i));\n }\n\n\n Intent in = new Intent(context, PlayingSongActivity.class);\n in.putExtra(\"Position\", 0);\n in.putExtra(\"Audio\", Parcels.wrap(l));\n in.putExtra(\"ActivityName\", \"PlayListItemAdapter\");\n context.startActivity(in);\n\n\n\n }",
"private void displaySong()\n {\n mediaV.mediaPlayerProperty().addListener(new ChangeListener<MediaPlayer>() {\n @Override\n public void changed(ObservableValue<? extends MediaPlayer> observable, MediaPlayer oldValue, MediaPlayer newValue) {\n\n ObservableList<String> songNames;\n songNames= newListview.getSelectionModel().getSelectedItems();\n\n textfieldCurrentlyPlaying.setText(songNames.toString());\n }\n });\n }",
"public void play() throws ArrayIndexOutOfBoundsException\n {\n play(musicTable.getSelectedRow());\n }",
"private void playTheListPressed() {\n\n\t\tif(l.size() != 0){\n\t\t\tcancelPlayingList.setEnabled(true);\n\t\t\tExtendedFrame.tabsPane.setSelectedIndex(0);\n\t\t\tJOptionPane.showMessageDialog(null,\"Once the current item has finished playing, click the play button to play the next item. Repeat it.\");\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tSwingWorker<Void,Void> w = new SwingWorker(){\n\t\t\t\t@Override\n\t\t\t\tprotected Void doInBackground() throws Exception {\n\t\t\t\t\tfor(int index = 0;index<l.size();index++){\n\t\t\t\t\t\tString apath = \"\" + paths.get(l.get(index));\n\t\t\t\t\t\t//System.out.println(apath);\n\t\t\t\t\t\tVideoPlayer.filePath = apath;\n\t\t\t\t\t\tVideoPlayer.startPlaying();\n\t\t\t\t\t\tfinished = false;\n\n\t\t\t\t\t\twhile((VideoPlayer.mediaPlayer.isPlaying())||(VideoPlayer.timeSlider.getValue() != VideoPlayer.mediaPlayer.getLength())){\n\t\t\t\t\t\t\t// do nothing\n\t\t\t\t\t\t\t// once it stops loop again\n\t\t\t\t\t\t}\n\t\t\t\t\t\tVideoPlayer.mediaPlayer.addMediaPlayerEventListener(new MediaPlayerEventAdapter() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void finished(MediaPlayer e) {\n\t\t\t\t\t\t\t\tif(VideoPlayer.timeSlider.getValue() == e.getLength()){\n\t\t\t\t\t\t\t\t\tfinished = true;\n\t\t\t\t\t\t\t\t\tVideoPlayer.mediaPlayer.stop();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t}\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\t@Override\n\t\t\t\tprotected void done() {\n\t\t\t\t}\n\t\t\t};\n\t\t\tw.execute();\n\t\t}\n\t}",
"@FXML\n private void selectedSong() {\n if(isFav){\n String s = songList.getSelectionModel().getSelectedItem(); // selection song from favorite playlist //\n songFile = FavoriteSong(s); \n } \n else{\n String s = songList.getSelectionModel().getSelectedItem(); // selection song from music playlist //\n if(s!=null && !s.isEmpty()){\n int selectedSong = songList.getSelectionModel().getSelectedIndex();\n songFile = songs[selectedSong];\n }\n }\n playButtonAction();\n }",
"public int getCurrentSongIndex();",
"public void changePlayList(){\r\n try {\r\n //Goes back to the first Playlist if true\r\n if (playListIndex > numOfPlayList)\r\n playListIndex = 0;\r\n\r\n //temp is set equal to the current Playlist\r\n temp = (Playlist) list.get(playListIndex);\r\n //Changes the playList text to the name of the current Playlist\r\n playList.setLabel(temp.getName());\r\n \r\n //Occurs if no Playlist are present\r\n } catch (Exception IndexOutOfBoundsExpection) {\r\n // TODO Auto-generated catch block\r\n //Changes the playList text to \"No Playlists\"\r\n playList.setLabel(\"No Playlists\");\r\n }\r\n }",
"public void songPicked(View view) {\n int position = Integer.parseInt(view.getTag().toString());\n Intent mainIntent = new Intent(this, MainActivity.class);\n mainIntent.putExtra(\"song\", songList.get(position).getFile());\n startActivity(mainIntent);\n }",
"@Override\r\n public void actionPerformed(ActionEvent e) {\r\n int index = list.getSelectedIndex();\r\n if (index != -1) {\r\n listModel.remove(index);\r\n songList.removeSong(index);\r\n int size = listModel.getSize();\r\n\r\n if (size == 0) {\r\n deleteButton.setEnabled(false);\r\n } else {\r\n if (index == listModel.getSize()) {\r\n index--;\r\n }\r\n list.setSelectedIndex(index);\r\n list.ensureIndexIsVisible(index);\r\n\r\n }\r\n playSound();\r\n }\r\n }",
"public void play() {\n\t\tfor (int i = 0; i < this.songList.size() - 1; i++) {\n\t\t\tthis.songList.get(i).play();\n\t\t}\n\t}",
"private void createSongList() {\r\n listModel = new DefaultListModel<>();\r\n list = new JList<>(listModel);\r\n list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r\n list.setSelectedIndex(0);\r\n list.setVisibleRowCount(10);\r\n list.setFont(new Font(\"DIALOG\", Font.PLAIN, 14));\r\n JScrollPane listScrollPane = new JScrollPane(list);\r\n\r\n add(listScrollPane, BorderLayout.CENTER);\r\n }",
"public static void next(){\n \n mediaPlayer.stop();\n \n if(nowPlayingIndex < currentPlayingList.size() - 1){\n Song songToPlay = currentPlayingList.get(nowPlayingIndex + 1);\n String songFile = new File(songToPlay.getLocation()).toURI().toString();\n \n Media media = new Media(songFile);\n MusicPlayer.mediaPlayer = new MediaPlayer(media);\n MusicPlayer.mediaPlayer.play();\n \n MusicPlayer.setNowPlaying(songToPlay);\n \n addProgressListener();\n }\n //Play song at top of list, since were at the end\n else{\n Song songToPlay = currentPlayingList.get(0);\n String songFile = new File(songToPlay.getLocation()).toURI().toString();\n \n Media media = new Media(songFile);\n MusicPlayer.mediaPlayer = new MediaPlayer(media);\n MusicPlayer.mediaPlayer.play();\n \n MusicPlayer.setNowPlaying(songToPlay);\n \n addProgressListener();\n }\n mainController.nowPlayingArtist.setText(MusicPlayer.getPlayingSong().getArtist());\n mainController.nowPlayingSong.setText(MusicPlayer.getPlayingSong().getTitle());\n mainController.timeRemaining.setText(MusicPlayer.getPlayingSong().getLength());\n }",
"public void playSelectSong() {\n isStart = false;\n if (getCurrentSong() == 0) {\n audioList.get(getCurrentSong()).setSelect(true);\n playListAdapter.notifyItemChanged(getCurrentSong());\n }\n isPauseResume = false;\n if (player != null) {\n player.stopMedia();\n }\n if (!isDestroyed()) {\n playAudio(audioList.get(getCurrentSong()).getData());\n }\n /*new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n if (!isDestroyed()) {\n playAudio(audioList.get(getCurrentSong()).getData());\n }\n }\n }, DELAY_TIME);*/\n }",
"public void updateCurrentSongIndex(int index) {\n\t\tthis.currentSongIndex = index;\n\t}",
"public static void play(int i) {\n if (i == -1) {\n //todo : play ( resume ) the current song\n } else {\n index = i;\n //todo : stop playing the selected song\n }\n setPlaying(true);\n editor.putString(\"title\", getSong().getName());\n editor.putString(\"artist\", getSong().getArtist().getName());\n editor.putInt(\"progress\", getSong().getProgress());\n editor.putInt(\"cover\", getSong().getArtist().getCover());\n editor.putBoolean(\"play\", isPlaying());\n editor.apply();\n }",
"public void selectedplaylistplay(ActionEvent event) {\r\n String restore = selectp.getValue();\r\n String path = hmap.get(restore);\r\n if (playing) {\r\n mp.stop();\r\n }\r\n if (pa) {\r\n pl = true;\r\n pa = false;\r\n }\r\n\r\n playing = true;\r\n playlies(path);\r\n }",
"public AudioPlayer(ArrayList<String> song_list){\n this.song_list = song_list;\n }",
"public void setCurrentSongIndex(File songFile);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the name of the cookie for the player id. | public void setIdCookieName(String idCookieName)
{
this.idCookieName = idCookieName;
} | [
"public void setPlayerCookieName(String playerCookieName)\r\n {\r\n this.playerCookieName = playerCookieName;\r\n }",
"abstract public void setCookie(String name, String value);",
"public void setCookie(String cookie);",
"@Updatable\n public String getCookieName() {\n return cookieName;\n }",
"public void setCookieId(String cookieId) {\n this.cookieId = cookieId;\n }",
"public void setCookie(String name, String value) {\n if (cookies.containsKey(name)) {\n cookies.get(name).value = value;\n } else {\n Cookie cookie = new Cookie();\n cookie.name = name;\n cookie.value = value;\n cookies.put(name, cookie);\n }\n }",
"public String setCookieString(String name, String value)\n\t{\n\t\treturn \"Set-Cookie: \"+name+\"=\"+value+\"\\n\";\n\t}",
"public void setAuthCookieName(String name) {\n authCookieName = name;\n }",
"public void setName(String name){\n\t\tthis.playerName = name;\n\t}",
"Response addCookie(String name, String value);",
"public void createPersistentCookie(Player player, HttpServletResponse response)\r\n {\r\n log.debug(\"Setting persistent cookies for \" + player.getIdentity());\r\n // Set the player cookie\r\n Cookie playerCookie = new Cookie(this.playerCookieName, player.getUsername());\r\n playerCookie.setMaxAge(Integer.MAX_VALUE);\r\n playerCookie.setPath(\"/\");\r\n response.addCookie(playerCookie);\r\n\r\n // Set the id cookie\r\n Cookie idCookie = new Cookie(this.idCookieName, player.getId().toString());\r\n idCookie.setMaxAge(Integer.MAX_VALUE);\r\n idCookie.setPath(\"/\");\r\n response.addCookie(idCookie);\r\n }",
"void addCookie(String domain, String name, String value);",
"public static void setPlayerName(String name) { mPlayerName = name; }",
"public void setName(String name) {\r\n if (name != null) {\r\n this.player_name = name;\r\n }\r\n }",
"public String getCookieId() {\n return cookieId;\n }",
"public void setCookie(final String cookie) {\n this.cookie = cookie;\n }",
"void updateCookie(String cookie);",
"public T cookie(String name, Object value) {\n if (name != null) {\n Cookie cookie = new DefaultCookie(name, value == null ? null : value.toString());\n cookies.add(cookie);\n }\n return _this;\n }",
"public void deleteCookie(final String name);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this method gets all the reference numbers of the arraylist choices | public ArrayList<Integer> getChoices()
{
return choices;
} | [
"private List<Integer> getSelectedIndexes() {\n\t\tList<Integer> result = new LinkedList<Integer>();\n\t\tfor (int i = 0; i < this.checked.size(); i++) {\n\t\t\tif (this.checked.get(i))\n\t\t\t\tresult.add(i);\n\t\t}\n\t\treturn result;\n\t}",
"private ArrayList<BasicCheckBox> getChooseIndices(String sheet) {\r\n if (sheet.equals(\"diversity\"))\r\n return app.getOptionsPane().getDiversityPanel().getCheckBoxesList();\r\n if (sheet.equals(\"function\"))\r\n return app.getOptionsPane().getFunctionalPanel().getCheckBoxesList();\r\n if (sheet.equals(\"footprint\"))\r\n return app.getOptionsPane().getFootprintsPanel().getCheckBoxesList();\r\n\r\n return null;\r\n }",
"public ArrayList<Integer> getSelectedResidues() {\n \tint maxSize = toggleSeqSelect.length;\n \tArrayList<Integer> result = new ArrayList(maxSize);\n \t\n \tfor (int i = 0; i < maxSize; i++) {\n \t\tif (toggleSeqSelect[i])\n \t\t\tresult.add(i + 1);\n \t}\n \t\n \tresult.trimToSize();\n \treturn result;\n }",
"protected int[] getSelectedIndices() {\n\treturn this.list.getSelectedIndices();\n }",
"public List<Integer> getCheckedPosList();",
"public int[] getSelectedIndices() ;",
"public int[] getIndexReference(){\r\n \treturn this.index;\r\n \t}",
"public void populateColorIndexList() {\n int index = 0; // will never be more than 1\n\n // we know only two color checkboxes are checked\n for (int i = 0; i < ThreeRow.COLOR_LIST.length; i++)\n {\n // if checked, then assign i to colorIndexList[index]\n if (checkBoxList[i].isChecked()) {\n // Log.v(LOGGING_TAG, \"chk checked: \" + i);\n // add to list\n colorIndexList[index] = i;\n index++;\n }\n }\n }",
"public int[] getSelectedGraphs();",
"int getRequestedValues(int index);",
"ReferenceList getListForms( );",
"public ArrayList<Integer> getSelectedAtoms() {\n \tint maxSize = toggleAtomSelect.length;\n \tArrayList<Integer> result = new ArrayList(maxSize);\n \t\n \tfor (int i = 0; i < maxSize; i++) {\n \t\tif (toggleAtomSelect[i])\n \t\t\tresult.add(i + 1);\n \t}\n \t\n \tresult.trimToSize();\n \treturn result;\n }",
"private ArrayList<Integer> getFunctionalIds() {\r\n ArrayList<Integer> functionalList = new ArrayList<>();\r\n LinkedList<String> selectedList = (LinkedList<String>) spinner_functional_area.getSelectedStrings();\r\n for (EOCountryData countryData : functionalObjList) {\r\n for (String str : selectedList) {\r\n if (countryData.getName().equalsIgnoreCase(str)) {\r\n functionalList.add(countryData.getId());\r\n }\r\n }\r\n }\r\n return functionalList;\r\n }",
"int[] getSelectedAuthorsBookIndexes();",
"protected ArrayList<String> getRefList()\n \t{\n \t\tHashMap<String, String> idRefPairs = this.getIdRefPairs();\n \t\tArrayList<String> refList = new ArrayList<String>();\n \t\tString thisId = this.getPathwayElement().getGroupId();\n \t\trefList.add(thisId);\n \t\tboolean hit = true;\n \n \t\twhile (hit)\n \t\t{\n \t\t\thit = false;\n \t\t\t// search for hits in hash map; add to refList\n \t\t\tfor (String id : idRefPairs.keySet())\n \t\t\t{\n \t\t\t\tif (refList.contains(idRefPairs.get(id)))\n \t\t\t\t{\n \t\t\t\t\trefList.add(id);\n \t\t\t\t\thit = true;\n \t\t\t\t}\n \t\t\t}\n \t\t\t// remove hits from hash map\n \t\t\tfor (int i = 0; i < refList.size(); i++)\n \t\t\t{\n \t\t\t\tidRefPairs.remove(refList.get(i));\n \t\t\t}\n \t\t}\n \t\treturn refList;\n \t}",
"public int[] getSelectionIndices() {\n \t\tif (!this.dropdownList.isDisposed()) {\n \t\t\treturn this.dropdownList.getSelectionIndices();\n \t\t} else {\n \t\t\tjava.util.List<String> itemList = Arrays.asList(this.items);\n \t\t\tString[] selectedItems = getTextAsArray();\n \t\t\tint[] result = new int[selectedItems.length];\n \t\t\tfor (int i = 0; i < selectedItems.length; i++) {\n \t\t\t\tresult[i] = itemList.indexOf(selectedItems[i]);\n \t\t\t}\n \t\t\treturn result;\n \t\t}\n \t}",
"private static ArrayList<String> generateRangeRefs(\r\n ArrayList<String> multRefsList, String currentWorksheetkNumber)\r\n throws FileNotFoundException {\r\n ArrayList<String> topologicallyList = generateTopologicalList();\r\n ArrayList<String> result = new ArrayList<>();\r\n\r\n for (int i = 0; i < multRefsList.size(); i++) {\r\n if (i % 2 == 0) {\r\n // Anfangszelle\r\n\r\n String[] numberOfStartRef = multRefsList.get(i).split(\r\n regularCapitalExpression);\r\n String[] numberOfEndRef = multRefsList.get(i + 1).split(\r\n regularCapitalExpression);\r\n\r\n String[] capitalLetterOfStartRef = multRefsList.get(i).split(\r\n regularNumberExpression);\r\n String[] capitalLetterOfEndRef = multRefsList.get(i + 1).split(\r\n regularNumberExpression);\r\n\r\n result.addAll(generateRange(\r\n topologicallyList.indexOf(capitalLetterOfStartRef[0]),\r\n topologicallyList.indexOf(capitalLetterOfEndRef[0]),\r\n Integer.parseInt(numberOfStartRef[1]),\r\n Integer.parseInt(numberOfEndRef[1]), topologicallyList,\r\n currentWorksheetkNumber));\r\n } else {\r\n // Nothing - This is the targeted cell\r\n }\r\n }\r\n return result;\r\n }",
"public static void getboardNumList()\n\t{\n\t\t//Create a list from 0 to totalNumBoards-1\n\t\tboardNums = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < totalNumBoards; i++)\n\t\t\tboardNums.add(i);\n\t\t\n\t\t//Randomly shuffle the list. Note this currently uses the same\n\t\t// random generator as the level selection itself.\n\t\tCollections.shuffle(boardNums, levelRand);\n\t}",
"private void retrieveNumberPickerInteractions(Protocol protocol) {\n \n ArrayList<String> touchInteractionsFromTouchFile = \n ISenseStressAnalyzer.mTouchReader\n .retrieveTouchEventPerExercisePerRepetition(protocol, \n order, STRESSOR_STRING, stress, repetition);\n \n mNumberPickerInteractionsList = new ArrayList<>();\n \n for (int i = 0; i < touchInteractionsFromTouchFile.size(); i++) {\n \n if (touchInteractionsFromTouchFile.get(i).split(\",\")[0].equals(\"0\")) {\n \n mNumberPickerInteractionsList.add(\n createNumberPickerInteraction(touchInteractionsFromTouchFile, \n i)); \n }\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get one jeu by id. | @Override
@Transactional(readOnly = true)
public JeuDTO findOne(Long id) {
log.debug("Request to get Jeu : {}", id);
Jeu jeu = jeuRepository.findOne(id);
return jeuMapper.toDto(jeu);
} | [
"public Usinas findOne(String id) {\n log.debug(\"Request to get Usinas : {}\", id);\n return usinasRepository.findOne(id);\n }",
"Amigo getById( int id );",
"Foodie getById(String id);",
"public Jugador getJugador(int id_jugador){\n \n boolean encontrado = false;\n int i = 0;\n Jugador j_aux = null;\n \n while(i < jugadores.size() && encontrado == false){\n \n j_aux = jugadores.get(i);\n \n if(j_aux.getId_jugador() == id_jugador){\n \n encontrado = true;\n \n }\n \n i++;\n \n }\n \n return j_aux;\n \n }",
"@Transactional(readOnly = true)\n public Epas findOne(Long id) {\n log.debug(\"Request to get Epas : {}\", id);\n return epasRepository.findOne(id);\n }",
"@GetMapping(\"/jelos/{id}\")\n @Timed\n public ResponseEntity<Jelo> getJelo(@PathVariable Long id) {\n log.debug(\"REST request to get Jelo : {}\", id);\n Jelo jelo = jeloRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(jelo));\n }",
"public static Guitar findOne(int id) {\n Guitar result = null;\n session = HibernateUtil.getSessionFactory().openSession();\n try {\n Criteria criteria = session.createCriteria(Guitar.class);\n criteria.add(Restrictions.eq(\"id\", id));\n result = (Guitar) criteria.uniqueResult();\n } catch (HibernateException e) {\n e.printStackTrace();\n } finally {\n session.close();\n\n }\n return result;\n\n }",
"@RequestMapping(value = \"/jugadoress/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Jugadores> getJugadores(@PathVariable Long id) {\n log.debug(\"REST request to get Jugadores : {}\", id);\n Jugadores jugadores = jugadoresRepository.findOne(id);\n return Optional.ofNullable(jugadores)\n .map(result -> new ResponseEntity<>(\n result,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }",
"@Override\n public JogoVelha getJogo(int idJogo) throws RemoteException{\n Dados l_dadosJogo;\n \n // Recebe dados da Sala\n l_dadosJogo = dadosJogoList.get(idJogo);\n \n // Retorna dados do Jogo\n return l_dadosJogo.getJogo();\n }",
"@Override\n @Transactional(readOnly = true)\n public OkuSefer findOne(Long id) {\n log.debug(\"Request to get OkuSefer : {}\", id);\n return okuSeferRepository.findOne(id);\n }",
"RiceCooker getById(long id);",
"public Client findById(Integer id) {\n Optional<Client> obj = repository.findById(id);\n return obj.orElse(null);\n // Implementar mensagem de objeto não encontrado\n }",
"T getObject(int id);",
"public ObjetoPersistente getObjeto_ID(Long id, String clase) {\n\n EntityManager em = Fachada_Persistencia.getInstance().getEntityManager();\n return (ObjetoPersistente) em.createQuery(\"Select o FROM \" + clase + \" o where o.id =\" + id).getSingleResult();\n\n }",
"public ObjetivoMejora getById(Long id) {\n\t\ttry {\n\t\t\tlogger.debug(\"Get ObjetivoMejora by id: \" + id);\n\t\t\treturn objetivoMejoraMapper.getById(id);\n\t\t} catch (DataAccessException e) {\n\t\t\tthrow new MineducException(\"Error al obtener ObjetivoMejoraDirecta\", e);\n\t\t}\n\t}",
"@Override\n @Transactional(readOnly = true)\n public OkuSofor findOne(Long id) {\n log.debug(\"Request to get OkuSofor : {}\", id);\n return okuSoforRepository.findOne(id);\n }",
"Produto get(Integer id);",
"Product get(final String id);",
"public Montaje getMontaje(Integer id);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is the main method which reads in a users radius and height of a cylinder, computes the volume and surface area and outputs the values to 4 decimal places. | public static void main(String[] args) {
//The radius and height of the cylinder.
double radius;
double height;
//The area and volume of the cylinder.
double area;
double volume;
DecimalFormat df = new DecimalFormat();
df.setMaximumFractionDigits(4);
Scanner scan = new Scanner(System.in);
System.out.println("Please enter in the radius and height "
+ "of a cylinder (radius first): ");
radius = scan.nextDouble();
height = scan.nextDouble();
scan.close();
volume = Math.PI * Math.pow(radius, 2) * height;
area = 2 * Math.PI * radius * (radius + height);
System.out.println("The surface area of your cylinder is: "
+ df.format(area));
System.out.println("The volume of your cylinder is: "
+ df.format(volume));
System.out.println("Question two was called and ran sucessfully.");
} | [
"public static void main(String[] args) {\r\n // Parameters for the cylinder.\r\n double radius;\r\n double height;\r\n double volume;\r\n \r\n // Create scanner instance to read user input.\r\n Scanner scan = new Scanner(System.in);\r\n \r\n // Get the radius from user.\r\n System.out.println(\"Input the radius of cylinder: \");\r\n radius = scan.nextDouble();\r\n \r\n // Get the height from user.\r\n System.out.println(\"Input the height of cylinder: \");\r\n height = scan.nextDouble();\r\n \r\n // Calculate the volume of the cylinder.\r\n volume = Math.PI * radius * radius * height;\r\n \r\n System.out.println(\"The volume of the cylinder is: \" + volume);\r\n \r\n // Close the scanner instance.\r\n scan.close();\r\n \r\n // Program end message.\r\n System.out.println(\"Question four was called and ran sucessfully.\");\r\n }",
"public static double cylinderVolume(double radius, double height){\n return Math.PI * square(radius) * height;\n }",
"@Test\n public void testCalculateVolume() throws QuestControlException {\n System.out.println(\"calculateVolume\");\n \n /**************************\n * Test case #1 \n **************************/\n \n System.out.println(\"\\tTest case #1\");\n double radius = 15.0;\n double height = 40.0;\n QuestControl instance = new QuestControl();\n double expResult = 28274.33;\n double result = instance.calculateVolume(radius, height);\n assertEquals(expResult, result, 28174.33);\n \n /**************************\n * Test case #2 \n **************************/\n \n System.out.println(\"\\tTest case #2\");\n radius = 20.0;\n height = 62.0;\n expResult = 77872;\n result = instance.calculateVolume(radius, height);\n assertEquals(expResult, result, 77872);\n \n /**************************\n * Test case #3 \n **************************/\n \n System.out.println(\"\\tTest case #2\");\n radius = 10.0;\n height = 39.0;\n expResult = 12246;\n result = instance.calculateVolume(radius, height);\n assertEquals(expResult, result, 12246); \n \n }",
"public static void main(String[] args) {\n\n Scanner scan = new Scanner(System.in);\n\n System.out.println(\"What is the length of the room in feet?\");\n\n int roomLength = scan.nextInt();\n\n System.out.println(\"What is the width of the room in feet?\");\n\n int roomWidth = scan.nextInt();\n\n System.out.printf(\"You entered dimensions of %d feet by %d feet%n\", roomLength, roomWidth);\n\n double areaFeet = roomLength * roomWidth;\n double areaMeters = (roomLength * feetToMetersConversionRate) * (roomWidth * feetToMetersConversionRate);\n\n System.out.println(\"The area is...\");\n System.out.printf(\"%f square feet%n\", areaFeet);\n System.out.printf(\"%f square meters%n\", areaMeters);\n\n }",
"public static void sphere()\r\n {\r\n //Obtain the radius of the sphere\r\n System.out.println(\"Please enter the radius of the sphere.\");\r\n r = kb.nextDouble();\r\n \r\n //Calculate the Volume of the sphere\r\n d = r*2;\r\n V=(Math.PI*Math.pow(d, 3))/6;\r\n V=V*100;\r\n V=Math.round(V);\r\n V=V/100;\r\n \r\n //Output the Volume of the sphere\r\n System.out.println(\"The volume of the sphere is: \"+V);\r\n }",
"public static double cylinderSurfaceArea(double height, double diameter){\n\t\tdouble area = ((circleArea(diameter)*2)+(circumferenceCircle(diameter)*height));\n\t\treturn area;\n\t}",
"public double getCylinderSurfaceArea();",
"public static double coneVolume(double r, double h)\r\n{\r\ndouble volume = (1/3.0)*Math.PI*(r*r)*h;\r\nreturn volume;\r\n}",
"public double cylinderVolume() {\n this.volume = Math.PI * this.radius * this.radius * this.height;\n return this.volume;\n }",
"public static void calcSurfaceArea(){\n\t\tint height = 5;\n\t\tint diameter = 4;\n\t\tdouble circumference = Math.PI * diameter;\n\t\tdouble topArea = Math.PI * Math.pow((diameter/2),2);\n\t\tdouble wallsArea = circumference * height;\n\t\tdouble surfaceArea = 2 * topArea + wallsArea;\n\t\tSystem.out.println(\"Surface Area is: \" + Double.parseDouble(new DecimalFormat(\"#.##\").format(surfaceArea)));\n\t}",
"public static void cube()\r\n {\r\n //Obtain the length of the sides of the cube\r\n System.out.println(\"Please enter the length of each side.\");\r\n l = kb.nextDouble();\r\n \r\n //Calculate the Volume of the cube\r\n V = Math.pow(l,3);\r\n V=V*100;\r\n V=Math.round(V);\r\n V=V/100;\r\n \r\n //Ouput\r\n System.out.println(\"The volume of the cube is: \"+V);\r\n }",
"public static void main (String [] args)\n\t{\n\t\tdouble radius;\n\t\tint choice;\n\t\t\n\t\t\n\t\tSystem.out.print(\"What is the radius of the circle?: \");\t\t\n\t\tScanner scan = new Scanner(System.in);\n\t\tradius = scan.nextDouble();\n\t\t\t\t\n\t\tSystem.out.printf(\"What Would you like to compute? \"\n\t\t\t\t+ \"\\n 1) Diameter \"\n\t\t\t\t+ \"\\n 2) Circumference \"\n\t\t\t\t+ \"\\n 3) Area \\n \");\t\t\n\t\t\n\t\tScanner input = new Scanner(System.in);\n\t\tchoice = input.nextInt();\t\t\n\t\t\n\t\twhile (choice != 1 && choice != 2 && choice != 3)\n\t\t{\n\t\t\tSystem.out.println(\"Please Enter 1 2 or 3 for Choices: \");\t\t\t\n\t\t\tchoice = input.nextInt();\t\t\t\t\n\t\t}\t\t\n\t\t\n\t\tif (choice == 1)\n\t\t{\n\t\t\tSystem.out.printf(\"The Diameter is: %.2f \", radius * 2 );\n\t\t}\n\t\t\n\t\tif (choice == 2)\n\t\t{\n\t\t\tSystem.out.printf(\"The Circumference is: %.2f \", (radius * 2 * Math.PI) );\n\t\t}\n\t\t\n\t\tif (choice == 3)\n\t\t{\n\t\t\tSystem.out.printf(\"The Area is: %.2f \", (radius * radius) * Math.PI );\n\t\t}\n\t\tscan.close();\n\t\tinput.close();\n\t}",
"public static void main(String[] args)\n {\n Scanner scan = new Scanner(System.in);\n \n System.out.println(\"Enter a side length for your cube:\");\n double s = scan.nextDouble();\n \n if (s > 0)\n {\n double volume = Math.pow(s, 3);\n System.out.println(\"Volume:\" + volume);\n }\n \n else\n System.out.println(\"Invalid entry\");\n \n \n /** Objective #2: Write an application to determine the number of solutuions to a quadratic equation, \n * The program accepts a, b and c from a user, and tells the user how many solutions, if any, exist\n * \n * Precodition: The user enters numbers, and not a special characters or letters\n * Postcondition: If there are two solutions, the program outputs \"two solutions.\" If there is \n * one solution, the program outputs \"one solution\" and if there are\n * no solutions, the program outputs \"no solution\"\n */\n \n System.out.println(\"Enter a:\");\n double a = scan.nextDouble();\n \n System.out.println(\"Enter b:\");\n double b = scan.nextDouble();\n \n System.out.println(\"Enter c:\");\n double c = scan.nextDouble();\n \n double discriminant = b*b - 4*a*c;\n if (discriminant <= 0)\n System.out.println(\"No real solutions.\");\n else if (discriminant == 0)\n System.out.println(\"One solution.\");\n else\n System.out.println(\"Two solutions.\");\n \n \n \n \n }",
"public static void main(String[] args) {\n double width;\n double height;\n\n double area;\n double perimeter;\n\n if (args.length != 0){\n if (args.length != 2){\n System.out.println(\"Invalid number of arguments was provided.\");\n return;\n }\n else {\n width = Double.parseDouble(args[0]);\n height = Double.parseDouble(args[1]);\n }\n }\n else {\n Scanner sc = new Scanner(System.in);\n width = getDimensions(\"width\", sc);\n height = getDimensions(\"height\", sc);\n\n sc.close();\n }\n\n area = calculateArea(height, width);\n perimeter = calculatePerimeter(height, width);\n\n System.out.printf(\"You have specified a rectangle of width %.2f and height %.2f.\" +\n \"It's area is %.2f and its perimeter is %.2f\", width, height, area, perimeter);\n }",
"public static void recPrism()\r\n {\r\n //Obtain the measurements of the prism\r\n System.out.println(\"Please enter the length of the prism.\");\r\n l = kb.nextDouble();\r\n System.out.println(\"Please enter the width of the prism.\");\r\n w = kb.nextDouble();\r\n System.out.println(\"Please enter the height of the prism.\"); \r\n h = kb.nextDouble();\r\n \r\n //Calculate the Volume of the prism\r\n V=w*l*h;\r\n V=V*100;\r\n V=Math.round(V);\r\n V=V/100;\r\n \r\n //Output\r\n System.out.println(\"The volume of the prism is: \"+V);\r\n }",
"@Test\r\n public void testRectangleVolumeCalc() throws JadeExceptionClass {\r\n System.out.println(\"Test Case #1\");\r\n double length = 23.0;\r\n double width = 8.0;\r\n double height = 4.0;\r\n rectangleControl instance = new rectangleControl();\r\n double expResult = 736.0;\r\n double result = instance.rectangleVolumeCalc(length, width, height);\r\n assertEquals(expResult, result, 1.0);\r\n System.out.println(\"Test Case #2\");\r\n length = 0;\r\n width = 43;\r\n height = 28;\r\n expResult = -1;\r\n result = instance.rectangleVolumeCalc(length, width, height);\r\n assertEquals(expResult, result, 1.0);\r\n System.out.println(\"Test Case #3\");\r\n length = -10;\r\n width = 50;\r\n height = 9;\r\n expResult = -1;\r\n result = instance.rectangleVolumeCalc(length, width, height);\r\n assertEquals(expResult, result, 1.0);\r\n System.out.println(\"Test Case #4\");\r\n length = 1100;\r\n width = 5;\r\n height = 6;\r\n expResult = -1;\r\n result = instance.rectangleVolumeCalc(length, width, height);\r\n assertEquals(expResult, result, 1.0);\r\n System.out.println(\"Test Case #5\");\r\n length = 50;\r\n width = 50;\r\n height = 1;\r\n expResult = 2500;\r\n result = instance.rectangleVolumeCalc(length, width, height);\r\n assertEquals(expResult, result, 1.0);\r\n System.out.println(\"Test Case #6\");\r\n length = 1;\r\n width = 50;\r\n height = 50;\r\n expResult = 2500;\r\n result = instance.rectangleVolumeCalc(length, width, height);\r\n assertEquals(expResult, result, 1.0);\r\n System.out.println(\"Test Case #7\");\r\n length = 50;\r\n width = 1;\r\n height = 50;\r\n expResult = 2500;\r\n result = instance.rectangleVolumeCalc(length, width, height);\r\n assertEquals(expResult, result, 1.0);\r\n }",
"double circumference() {\n return 2 * 3.14159 * radius;\r\n }",
"public double surfaceArea() \n {\n // calculate and store the surface area of the sphere\n double area = 4 * Math.PI * radius * radius;\n \n return area;\n }",
"public static void main(String[] args) {\r\n\t\t\r\n\t\t\r\n\t\t//I'm just declaring all the variables I need right now so I don't need to later.\r\n\t\tdouble miles;\r\n\t\t\r\n\t\tdouble feet;\r\n\t\t\r\n\t\tdouble inches;\r\n\t\t\r\n\t\tdouble meters; \r\n\t\t\r\n\t\t//Here I am printing the prompt for the user to input values I will need to convert to meters\r\n\t\tSystem.out.println(\"Enter miles:\");\r\n\t\t\t\t\r\n\t\t\tScanner userInput = new Scanner (System.in);\r\n\t\t\tmiles = userInput.nextDouble();\r\n\t\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"Enter feet:\");\r\n\t\t\r\n\t\t\tScanner userInput2 = new Scanner (System.in);\r\n\t\t\tfeet = userInput2.nextDouble();\r\n\t\t\t\r\n\t\t\t\r\n\t\tSystem.out.println(\"Enter inches:\");\r\n\t\t\r\n\t\t\tScanner userInput3 = new Scanner (System.in);\r\n\t\t\tinches = userInput3.nextDouble();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t/*this is where I am converting all my values to feet, which will then convert to\r\n\t\t\t\t * meters.\r\n\t\t\t\t * \r\n\t\t\t\t * I am declaring new variables to represent converted values and also\r\n\t\t\t\t */\r\n\t\t\t\tdouble convertedMiles;\r\n\t\t\t\tconvertedMiles = miles*5280;\r\n\t\t\t\r\n\t\t\t\tdouble convertedFeet;\r\n\t\t\t\tconvertedFeet = feet*1;\r\n\t\t\t\r\n\t\t\t\tdouble convertedInches;\r\n\t\t\t\tconvertedInches = inches/12;\r\n\t\t\t\t\r\n\t\t//this statement is where I add together all my converted values to reach my total in feet\r\n\t\t//and then I divide by 3.3 to get to my meters, as specified in the directions\r\n\t\tmeters = (convertedMiles + convertedFeet + convertedInches)/3.3;\r\n\t\t\r\n\t\t//This statement declares a new variable that will convert from meters to a rounded version\r\n\t\t//so that I can have a variable that is rounded to the nearest tenth.\r\n\t\tdouble metersRounded = (double)Math.round((meters)*10)/10;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(miles + \" mile(s), \" + feet + \" foot(or feet) \" + inches + \r\n\t\t\t\t\t\t \" inch(es) = \" + metersRounded + \" meter(s).\");\r\n\t\t\r\n\t\tuserInput.close();\r\n\t\tuserInput2.close();\r\n\t\tuserInput3.close();\r\n\t\t\r\n\t\t\r\n\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XFeatureCall__Group_2__2" $ANTLR start "rule__XFeatureCall__Group_2__2__Impl" ../org.xtext.lwc.instances.ui/srcgen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:9026:1: rule__XFeatureCall__Group_2__2__Impl : ( ( rule__XFeatureCall__Group_2_2__0 ) ) ; | public final void rule__XFeatureCall__Group_2__2__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:9030:1: ( ( ( rule__XFeatureCall__Group_2_2__0 )* ) )
// ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:9031:1: ( ( rule__XFeatureCall__Group_2_2__0 )* )
{
// ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:9031:1: ( ( rule__XFeatureCall__Group_2_2__0 )* )
// ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:9032:1: ( rule__XFeatureCall__Group_2_2__0 )*
{
if ( state.backtracking==0 ) {
before(grammarAccess.getXFeatureCallAccess().getGroup_2_2());
}
// ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:9033:1: ( rule__XFeatureCall__Group_2_2__0 )*
loop58:
do {
int alt58=2;
int LA58_0 = input.LA(1);
if ( (LA58_0==39) ) {
alt58=1;
}
switch (alt58) {
case 1 :
// ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:9033:2: rule__XFeatureCall__Group_2_2__0
{
pushFollow(FOLLOW_rule__XFeatureCall__Group_2_2__0_in_rule__XFeatureCall__Group_2__2__Impl18231);
rule__XFeatureCall__Group_2_2__0();
state._fsp--;
if (state.failed) return ;
}
break;
default :
break loop58;
}
} while (true);
if ( state.backtracking==0 ) {
after(grammarAccess.getXFeatureCallAccess().getGroup_2_2());
}
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__XFeatureCall__Group_2_2__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:9116:1: ( rule__XFeatureCall__Group_2_2__1__Impl )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:9117:2: rule__XFeatureCall__Group_2_2__1__Impl\n {\n pushFollow(FOLLOW_rule__XFeatureCall__Group_2_2__1__Impl_in_rule__XFeatureCall__Group_2_2__118391);\n rule__XFeatureCall__Group_2_2__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__XFeatureCall__Group_2_2__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:24115:1: ( rule__XFeatureCall__Group_2_2__1__Impl )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:24116:2: rule__XFeatureCall__Group_2_2__1__Impl\r\n {\r\n pushFollow(FOLLOW_rule__XFeatureCall__Group_2_2__1__Impl_in_rule__XFeatureCall__Group_2_2__148521);\r\n rule__XFeatureCall__Group_2_2__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__XFeatureCall__Group__2__Impl() 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:8874:1: ( ( ( rule__XFeatureCall__Group_2__0 )? ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:8875:1: ( ( rule__XFeatureCall__Group_2__0 )? )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:8875:1: ( ( rule__XFeatureCall__Group_2__0 )? )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:8876:1: ( rule__XFeatureCall__Group_2__0 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXFeatureCallAccess().getGroup_2()); \n }\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:8877:1: ( rule__XFeatureCall__Group_2__0 )?\n int alt56=2;\n int LA56_0 = input.LA(1);\n\n if ( (LA56_0==20) ) {\n alt56=1;\n }\n switch (alt56) {\n case 1 :\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:8877:2: rule__XFeatureCall__Group_2__0\n {\n pushFollow(FOLLOW_rule__XFeatureCall__Group_2__0_in_rule__XFeatureCall__Group__2__Impl17920);\n rule__XFeatureCall__Group_2__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXFeatureCallAccess().getGroup_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__XFeatureCall__Group_2_2__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:9085:1: ( rule__XFeatureCall__Group_2_2__0__Impl rule__XFeatureCall__Group_2_2__1 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:9086:2: rule__XFeatureCall__Group_2_2__0__Impl rule__XFeatureCall__Group_2_2__1\n {\n pushFollow(FOLLOW_rule__XFeatureCall__Group_2_2__0__Impl_in_rule__XFeatureCall__Group_2_2__018329);\n rule__XFeatureCall__Group_2_2__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XFeatureCall__Group_2_2__1_in_rule__XFeatureCall__Group_2_2__018332);\n rule__XFeatureCall__Group_2_2__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__XFeatureCall__Group_2_2__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:14429:1: ( rule__XFeatureCall__Group_2_2__1__Impl )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:14430:2: rule__XFeatureCall__Group_2_2__1__Impl\r\n {\r\n pushFollow(FOLLOW_rule__XFeatureCall__Group_2_2__1__Impl_in_rule__XFeatureCall__Group_2_2__129129);\r\n rule__XFeatureCall__Group_2_2__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__XFeatureCall__Group_2__2() 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:9018:1: ( rule__XFeatureCall__Group_2__2__Impl rule__XFeatureCall__Group_2__3 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:9019:2: rule__XFeatureCall__Group_2__2__Impl rule__XFeatureCall__Group_2__3\n {\n pushFollow(FOLLOW_rule__XFeatureCall__Group_2__2__Impl_in_rule__XFeatureCall__Group_2__218201);\n rule__XFeatureCall__Group_2__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XFeatureCall__Group_2__3_in_rule__XFeatureCall__Group_2__218204);\n rule__XFeatureCall__Group_2__3();\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__XFeatureCall__Group_2_2__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:13437:1: ( rule__XFeatureCall__Group_2_2__1__Impl )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:13438:2: rule__XFeatureCall__Group_2_2__1__Impl\r\n {\r\n pushFollow(FOLLOW_rule__XFeatureCall__Group_2_2__1__Impl_in_rule__XFeatureCall__Group_2_2__127284);\r\n rule__XFeatureCall__Group_2_2__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__XFeatureCall__Group_1_2__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:11422:1: ( rule__XFeatureCall__Group_1_2__1__Impl )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:11423:2: rule__XFeatureCall__Group_1_2__1__Impl\n {\n pushFollow(FOLLOW_rule__XFeatureCall__Group_1_2__1__Impl_in_rule__XFeatureCall__Group_1_2__123140);\n rule__XFeatureCall__Group_1_2__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__XFeatureCall__Group__2() 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:8862:1: ( rule__XFeatureCall__Group__2__Impl rule__XFeatureCall__Group__3 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:8863:2: rule__XFeatureCall__Group__2__Impl rule__XFeatureCall__Group__3\n {\n pushFollow(FOLLOW_rule__XFeatureCall__Group__2__Impl_in_rule__XFeatureCall__Group__217890);\n rule__XFeatureCall__Group__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XFeatureCall__Group__3_in_rule__XFeatureCall__Group__217893);\n rule__XFeatureCall__Group__3();\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__XFeatureCall__Group_2__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:8989:1: ( rule__XFeatureCall__Group_2__1__Impl rule__XFeatureCall__Group_2__2 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:8990:2: rule__XFeatureCall__Group_2__1__Impl rule__XFeatureCall__Group_2__2\n {\n pushFollow(FOLLOW_rule__XFeatureCall__Group_2__1__Impl_in_rule__XFeatureCall__Group_2__118141);\n rule__XFeatureCall__Group_2__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XFeatureCall__Group_2__2_in_rule__XFeatureCall__Group_2__118144);\n rule__XFeatureCall__Group_2__2();\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__XFeatureCall__Group_2__2__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:14343:1: ( ( ( rule__XFeatureCall__Group_2_2__0 )* ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:14344:1: ( ( rule__XFeatureCall__Group_2_2__0 )* )\r\n {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:14344:1: ( ( rule__XFeatureCall__Group_2_2__0 )* )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:14345:1: ( rule__XFeatureCall__Group_2_2__0 )*\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXFeatureCallAccess().getGroup_2_2()); \r\n }\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:14346:1: ( rule__XFeatureCall__Group_2_2__0 )*\r\n loop108:\r\n do {\r\n int alt108=2;\r\n int LA108_0 = input.LA(1);\r\n\r\n if ( (LA108_0==52) ) {\r\n alt108=1;\r\n }\r\n\r\n\r\n switch (alt108) {\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:14346:2: rule__XFeatureCall__Group_2_2__0\r\n \t {\r\n \t pushFollow(FOLLOW_rule__XFeatureCall__Group_2_2__0_in_rule__XFeatureCall__Group_2__2__Impl28969);\r\n \t rule__XFeatureCall__Group_2_2__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 loop108;\r\n }\r\n } while (true);\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXFeatureCallAccess().getGroup_2_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__XFeatureCall__Group__2__Impl() 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:23842:1: ( ( ( rule__XFeatureCall__Group_2__0 )? ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:23843:1: ( ( rule__XFeatureCall__Group_2__0 )? )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:23843:1: ( ( rule__XFeatureCall__Group_2__0 )? )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:23844:1: ( rule__XFeatureCall__Group_2__0 )?\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXFeatureCallAccess().getGroup_2()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:23845:1: ( rule__XFeatureCall__Group_2__0 )?\r\n int alt168=2;\r\n int LA168_0 = input.LA(1);\r\n\r\n if ( (LA168_0==51) ) {\r\n alt168=1;\r\n }\r\n switch (alt168) {\r\n case 1 :\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:23845:2: rule__XFeatureCall__Group_2__0\r\n {\r\n pushFollow(FOLLOW_rule__XFeatureCall__Group_2__0_in_rule__XFeatureCall__Group__2__Impl47987);\r\n rule__XFeatureCall__Group_2__0();\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.getXFeatureCallAccess().getGroup_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__XFeatureCall__Group_1_2__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:13028:1: ( rule__XFeatureCall__Group_1_2__1__Impl )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:13029:2: rule__XFeatureCall__Group_1_2__1__Impl\n {\n pushFollow(FOLLOW_rule__XFeatureCall__Group_1_2__1__Impl_in_rule__XFeatureCall__Group_1_2__126394);\n rule__XFeatureCall__Group_1_2__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__XFeatureCall__Group_2__2__Impl() 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:24029:1: ( ( ( rule__XFeatureCall__Group_2_2__0 )* ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:24030:1: ( ( rule__XFeatureCall__Group_2_2__0 )* )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:24030:1: ( ( rule__XFeatureCall__Group_2_2__0 )* )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:24031:1: ( rule__XFeatureCall__Group_2_2__0 )*\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXFeatureCallAccess().getGroup_2_2()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:24032:1: ( rule__XFeatureCall__Group_2_2__0 )*\r\n loop171:\r\n do {\r\n int alt171=2;\r\n int LA171_0 = input.LA(1);\r\n\r\n if ( (LA171_0==133) ) {\r\n alt171=1;\r\n }\r\n\r\n\r\n switch (alt171) {\r\n \tcase 1 :\r\n \t // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:24032:2: rule__XFeatureCall__Group_2_2__0\r\n \t {\r\n \t pushFollow(FOLLOW_rule__XFeatureCall__Group_2_2__0_in_rule__XFeatureCall__Group_2__2__Impl48361);\r\n \t rule__XFeatureCall__Group_2_2__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 loop171;\r\n }\r\n } while (true);\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXFeatureCallAccess().getGroup_2_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__XFeatureCall__Group__2() 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:12774:1: ( rule__XFeatureCall__Group__2__Impl rule__XFeatureCall__Group__3 )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:12775:2: rule__XFeatureCall__Group__2__Impl rule__XFeatureCall__Group__3\n {\n pushFollow(FOLLOW_rule__XFeatureCall__Group__2__Impl_in_rule__XFeatureCall__Group__225893);\n rule__XFeatureCall__Group__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XFeatureCall__Group__3_in_rule__XFeatureCall__Group__225896);\n rule__XFeatureCall__Group__3();\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__XFeatureCall__Group_2__2() 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:24017:1: ( rule__XFeatureCall__Group_2__2__Impl rule__XFeatureCall__Group_2__3 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:24018:2: rule__XFeatureCall__Group_2__2__Impl rule__XFeatureCall__Group_2__3\r\n {\r\n pushFollow(FOLLOW_rule__XFeatureCall__Group_2__2__Impl_in_rule__XFeatureCall__Group_2__248331);\r\n rule__XFeatureCall__Group_2__2__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__XFeatureCall__Group_2__3_in_rule__XFeatureCall__Group_2__248334);\r\n rule__XFeatureCall__Group_2__3();\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__XFeatureCall__Group__2__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:14156:1: ( ( ( rule__XFeatureCall__Group_2__0 )? ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:14157:1: ( ( rule__XFeatureCall__Group_2__0 )? )\r\n {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:14157:1: ( ( rule__XFeatureCall__Group_2__0 )? )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:14158:1: ( rule__XFeatureCall__Group_2__0 )?\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXFeatureCallAccess().getGroup_2()); \r\n }\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:14159:1: ( rule__XFeatureCall__Group_2__0 )?\r\n int alt105=2;\r\n int LA105_0 = input.LA(1);\r\n\r\n if ( (LA105_0==20) ) {\r\n alt105=1;\r\n }\r\n switch (alt105) {\r\n case 1 :\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:14159:2: rule__XFeatureCall__Group_2__0\r\n {\r\n pushFollow(FOLLOW_rule__XFeatureCall__Group_2__0_in_rule__XFeatureCall__Group__2__Impl28595);\r\n rule__XFeatureCall__Group_2__0();\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.getXFeatureCallAccess().getGroup_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__XFeatureCall__Group__2__Impl() 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:13164:1: ( ( ( rule__XFeatureCall__Group_2__0 )? ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:13165:1: ( ( rule__XFeatureCall__Group_2__0 )? )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:13165:1: ( ( rule__XFeatureCall__Group_2__0 )? )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:13166:1: ( rule__XFeatureCall__Group_2__0 )?\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXFeatureCallAccess().getGroup_2()); \r\n }\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:13167:1: ( rule__XFeatureCall__Group_2__0 )?\r\n int alt82=2;\r\n int LA82_0 = input.LA(1);\r\n\r\n if ( (LA82_0==23) ) {\r\n alt82=1;\r\n }\r\n switch (alt82) {\r\n case 1 :\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:13167:2: rule__XFeatureCall__Group_2__0\r\n {\r\n pushFollow(FOLLOW_rule__XFeatureCall__Group_2__0_in_rule__XFeatureCall__Group__2__Impl26750);\r\n rule__XFeatureCall__Group_2__0();\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.getXFeatureCallAccess().getGroup_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__XFeatureCall__Group_4__2() 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:9206:1: ( rule__XFeatureCall__Group_4__2__Impl )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:9207:2: rule__XFeatureCall__Group_4__2__Impl\n {\n pushFollow(FOLLOW_rule__XFeatureCall__Group_4__2__Impl_in_rule__XFeatureCall__Group_4__218573);\n rule__XFeatureCall__Group_4__2__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 }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
converts a longitude/latitude long value in DDMMSS/DDDMMSS format to just seconds. | private long toSeconds(long x) {
boolean neg = false;
if (x < 0) {
neg = true;
}
x = Math.abs(x);
long sec = x % 100;// get first two digits
x = x / 100;// move over two places
long min = x % 100;// get next two digits
x = x / 100;// move to places
long answer = (x * 3600 + min * 60 + sec);// conversion equation
if (neg) { // check if negative needs to be applied.
return answer * -1;
}
return answer;
} | [
"public String date2SecondsString(long time);",
"public static double convertFromMillisToSec(long time) {\n return ((double) time / 1000);\n }",
"private static long convertToSeconds(String time) {\n String[] timeArgs = time.trim().split(\":\");\n long hours = Long.parseLong(timeArgs[0]);\n long minutes = Long.parseLong(timeArgs[1]);\n long seconds = Long.parseLong(timeArgs[2]);\n\n return hours * 3600 + minutes * 60 + seconds;\n }",
"static double convertToSeconds(String time) {\r\n\t\t\tint position = time.indexOf(':');\r\n\t\t\tString min = time.substring(0, position);\r\n\t\t\tString sec = time.substring(position + 1);\r\n\t\t\tint minFinal = Integer.valueOf(min);\r\n\t\t\tdouble secFinal = Double.valueOf(sec);\r\n\t\t\tdouble finalTime = minFinal * SECONDS_PER_MINUTE + secFinal;\r\n\t\t\treturn finalTime;\r\n\t\t\t\r\n\t\t\t\r\n\t\t}",
"public abstract long toSeconds(long duration);",
"private double milliSecsToSecs(long milliseconds) {\n int millisecsPerSec = 1000;\n return (double) milliseconds / millisecsPerSec;\n }",
"private String intTime(long l){\r\n String s=\"\";\r\n s+=(char)(((l/1000)/60)+'0')+\":\"+(char)((((l/1000)%60)/10)+'0')+(char)((((l/1000)%60)%10)+'0'); \r\n return s;\r\n }",
"private static int convertTimeToSecs(String time){\n if (time == null) return 0;\n String hours = time.substring(0, 2);\n String mins = time.substring(3,5);\n return Integer.parseInt(hours)*3600 + Integer.parseInt(mins)*60;\n }",
"public static double convertFromNanoToSec(long time) {\n return ((double) time / 1000000000);\n }",
"private String secondsToMinutesAndSeconds(double seconds) {\n\t\tint numberOfminutes = (int) (seconds / 60);\n\t\tint numberOfSeconds = (int) (seconds % 60);\n\t\tif (numberOfSeconds < 10) {\n\t\t\treturn numberOfminutes + \":0\" + numberOfSeconds;\n\t\t} else {\n\t\t\treturn numberOfminutes + \":\" + numberOfSeconds;\n\t\t}\n\t}",
"private String convertToDuration(Long songDuration){\n long seconds = songDuration/1000;\n long minutes = seconds / 60;\n seconds = seconds % 60;\n return minutes +\":\"+seconds;\n }",
"public static long convertTimeMillisecondsAsLongToSeconds(long milliseconds) {\n\t\t\t\tint MILLISECONDS_IN_A_SECOND = 1000;\n\t\t\t\tDouble d = Double.valueOf(milliseconds) / Double.valueOf(MILLISECONDS_IN_A_SECOND);\n\t\t\t\treturn Math.round(d);\n\t\t\t}",
"private static double toSeconds(int hours, int minutes, double seconds){\n return hours*3600 + minutes*60 + seconds;\n }",
"public String convertMsToSec(long ms) {\n return String.format(\"%s sec %s ms\", ms / 1000, ms % 1000);\n }",
"public static int HHMMSSToSeconds(String time)\n {\n if(time == null)\n {\n return 0;\n }\n\n\n Pattern pattern = Pattern.compile(\"(\\\\d{1,2})\\\\:(\\\\d{1,2})\\\\:(\\\\d{1,2})(?:\\\\.(\\\\d{1,3}))?\");\n Matcher matcher = pattern.matcher(time);\n if(matcher.find() == false){\n return 0;\n }\n\n int hours = Integer.parseInt(matcher.group(1));\n int minutes = Integer.parseInt(matcher.group(2));\n int seconds = Integer.parseInt(matcher.group(3));\n int milseconds = 0;\n if(matcher.groupCount() > 4) {\n milseconds = Integer.parseInt(matcher.group(4));\n }\n\n return (hours * 3600 + minutes * 60 + seconds) * 1000 + milseconds;\n }",
"public static long convertTimeMillisecondsAsStringToSeconds(String milliseconds) {\n\t\t\t\tint MILLISECONDS_IN_A_SECOND = 1000;\n\t\t\t\tDouble d = Double.valueOf(milliseconds) / Double.valueOf(MILLISECONDS_IN_A_SECOND);\n\t\t\t\treturn Math.round(d);\n\t\t\t}",
"private String longitudeConversion() {\n int lon = record[5];\n if (lon >= 0) {\n lon = lon & 255;\n }\n lon = (lon << 8) + (record[4] & 255);\n float flon = Float.parseFloat(\"\" + lon + \".\" + (((record[7] & 255) << 8) + (record[6] & 255)));\n int degs = (int) flon / 100;\n float min = flon - degs * 100;\n String retVal = \"\" + (degs + min / 60);\n\n if (retVal.compareTo(\"200.0\") == 0) {\n return \"\";\n } else {\n return retVal;\n }\n }",
"private double toMinutes(long ms) {\n double minutes = ms / 60000.0;\n minutes = minutes * 100.0;\n minutes = Math.floor(minutes);\n minutes = minutes / 100.0;\n return minutes;\n }",
"private String latitudeConversion() {\n int lat = record[1];\n if (lat >= 0) {\n lat = lat & 255;\n }\n lat = (lat << 8) + (record[0] & 255);\n float flat = Float.parseFloat((\"\" + lat + \".\" + (((record[3] & 255) << 8) + (record[2] & 255))));\n int degs = (int) flat / 100;\n float min = flat - degs * 100;\n String retVal = \"\" + (degs + min / 60);\n\n if (retVal.compareTo(\"200.0\") == 0) {\n return \"\";\n } else {\n return retVal;\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
An algorithm for computing clusters (community structure) in graphs based on edge betweenness. [Note: The betweenness of an edge measures the extent to which that edge lies along shortest paths between all pairs of nodes.] Edges which are least central to communities are progressively removed until the communities have been adequately separated. | public Set<Set<Entity>> getEdgeBetweennessClusters(double ratioEdgesToRemove)
{
int numEdgesToRemove = (int) (getNumberOfEdges() * ratioEdgesToRemove);
EdgeBetweennessClusterer<Entity, EntityGraphEdge> betweenClusterer = new EdgeBetweennessClusterer<Entity, EntityGraphEdge>(
numEdgesToRemove);
List<Set<Entity>> clusters = new ArrayList<Set<Entity>>(
betweenClusterer.transform(directedGraph));
logger.info("Number of edge-betweenness clusters: " + clusters.size());
Collections.sort(clusters, sortListBySizeDescending);
Iterator<Set<Entity>> clusterIter = clusters.iterator();
Set<Set<Entity>> clusterSet = new HashSet<Set<Entity>>();
while (clusterIter.hasNext()) {
Set<Entity> nodeCluster = clusterIter.next();
Set<Entity> entCluster = new HashSet<Entity>();
for (Entity node : nodeCluster) {
entCluster.add(node);
}
logger.info("Cluster's size: " + entCluster.size());
clusterSet.add(entCluster);
}
return clusterSet;
} | [
"static double clusterVerticesOneStep(Mesh mesh) {\n\t\t\n\t\t// for each pair of the vertices\n\t\tdouble mindis = 1.0e+30;\n\t\tfor(int i = 0; i < mesh.getNumVertices(); i++) {\n\t\t\tVertex v1 = mesh.getVertex(i);\n\t\t\tfor(int j = (i + 1); j < mesh.getNumVertices(); j++) {\n\t\t\t\tVertex v2 = mesh.getVertex(j);\n\t\t\t\n\t\t\t\t// for each pair of the nodes\n\t\t\t\tdouble maxdis = 0.0;\n\t\t\t\tfor(int ii = 0; ii < v1.nodes.size(); ii++) {\n\t\t\t\t\tNode n1 = (Node)v1.nodes.get(ii);\n\t\t\t\t\tfor(int jj = 0; jj < v2.nodes.size(); jj++) {\n\t\t\t\t\t\tNode n2 = (Node)v2.nodes.get(jj);\n\t\t\t\t\t\tif(n1.getDisSim2(n2.getId()) > maxdis) {\n\t\t\t\t\t\t\tmaxdis = n1.getDisSim2(n2.getId());\n\t\t\t\t\t\t\tif(maxdis > mindis) {\n\t\t\t\t\t\t\t\tii = v1.nodes.size(); break;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// update mindis\n\t\t\t\tif(mindis > maxdis) {\n\t\t\t\t\tmindis = maxdis;\n\t\t\t\t\t//System.out.println(\" updated mindis=\" + mindis);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Determine the threshold\n\t\tdouble threshold = mindis * clusteringThreshold;\n\t\t\n\t\t// Combine close two vertices \n\t\tfor(int i = 0; i < mesh.getNumVertices(); i++) {\n\t\t\tVertex v1 = mesh.getVertex(i);\n\t\t\tfor(int j = (i + 1); j < mesh.getNumVertices(); j++) {\n\t\t\t\tVertex v2 = mesh.getVertex(j);\n\t\t\t\n\t\t\t\t// for each pair of the nodes\n\t\t\t\tdouble maxdis = -1.0;\n\t\t\t\tfor(int ii = 0; ii < v1.nodes.size(); ii++) {\n\t\t\t\t\tNode n1 = (Node)v1.nodes.get(ii);\n\t\t\t\t\tfor(int jj = 0; jj < v2.nodes.size(); jj++) {\n\t\t\t\t\t\tNode n2 = (Node)v2.nodes.get(jj);\n\t\t\t\t\t\tif(n1.getDisSim2(n2.getId()) > maxdis) {\n\t\t\t\t\t\t\tmaxdis = n1.getDisSim2(n2.getId());\n\t\t\t\t\t\t\tif(maxdis > threshold) {\n\t\t\t\t\t\t\t\tii = v1.nodes.size(); break;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(maxdis > threshold) continue;\n\t\t\t\t\n\t\t\t\t//System.out.println(\" combine: i=\" + i + \" j=\" + j + \" names=\" + authors + \" maxdis=\" + maxdis + \" th=\" + threshold);\n\t\t\t\t\n\t\t\t\t// combine the two vertices\n\t\t\t\tfor(int jj = 0; jj < v2.nodes.size(); jj++) {\n\t\t\t\t\tNode n2 = (Node)v2.nodes.get(jj);\n\t\t\t\t\tv1.nodes.add(n2);\n\t\t\t\t\tn2.setVertex(v1);\n\t\t\t\t}\n\t\t\t\tmesh.removeOneVertex(v2);\n\t\t\t\tj--;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn threshold;\n\t}",
"public void MultiCenterEsauWilliamsAlgorithm(){\n this.graph.setIncreasingDistanceForEachNode();\n this.graph.setDistanceFromHub();\n while(!this.terminate){\n Edge e = getMinTradeOff();\n if(e == null){\n break;\n }\n System.out.println(\"Min trade off edge is \"+e);\n Vertex p1 = this.findParent(e.from);\n Vertex p2 = this.findParent(e.to);\n if(!p1.equals(p2)){\n if(this.union(e)){\n this.graph.cmst.add(e);\n this.graph.cmstWeight += e.cost;\n this.graph.visited.add(e.from);\n this.graph.visited.add(e.to);\n }\n }else{\n System.out.println(e.from+\" and \"+e.to+ \" are already connected\");\n }\n System.out.println(this.graph.cmst);\n System.out.println();\n System.out.println();\n Set<Integer> keySet = this.graph.vertex.keySet();\n for (Integer key: keySet){\n System.out.println(\"Size of Subtree Node \"+ key +\" is: \" + this.graph.vertex.get(key).subTreeGroup.size());}\n }\n if(this.graph.cmst.size() != this.graph.vertex.size() - 1){\n System.out.println(\"Size of CMST\" + this.graph.cmst.size());\n System.out.println(\"Size of Vertex\" + this.graph.vertex.size());\n System.out.println(\"The graph is disconnected\");\n }\n System.out.println(\"The minimum cost is \"+this.graph.cmstWeight);\n System.out.println(\"the Tree has following edges\"+graph.cmst);\n\n// Set<Integer> keySet = this.graph.vertex.keySet();\n// for (Integer key: keySet){\n// System.out.println(\"Size of Subtree Node \"+ key +\"is:\" + this.graph.vertex.get(key).subTreeGroup.size());\n// }\n }",
"@Test\r\n\tpublic void testDivideAndMergeConnectedComponents() throws OcdAlgorithmException {\r\n\t\tCustomGraph graph = OcdTestGraphFactory.getSimpleTwoComponentsGraph();\r\n\t\tGraphProcessor processor = new GraphProcessor();\r\n\t\tMap<CustomGraph, Map<Node, Node>> componentMap = processor.divideIntoConnectedComponents(graph);\r\n\t\tMap<Cover, Map<Node, Node>> coverMap = new HashMap<Cover, Map<Node, Node>>();\r\n\t\tCover currentCover;\r\n\t\tOcdAlgorithm algo = new SskAlgorithm();\r\n\t\tfor(Map.Entry<CustomGraph, Map<Node, Node>> entry : componentMap.entrySet()) {\r\n\t\t\tcurrentCover = algo.detectOverlappingCommunities(entry.getKey());\r\n\t\t\tcoverMap.put(currentCover, entry.getValue());\r\n\t\t}\r\n\t\tCover cover = processor.mergeComponentCovers(graph, coverMap);\r\n\t\tSystem.out.println(\"Divide and merge of simple two components\");\r\n\t\tSystem.out.println(cover.toString());\r\n\t}",
"private void calculateBestCommunity(Iterable<LouvainMessage> messages, int iteration) {\n\n\t\tLouvainNodeState state = getValue();\n\n\t\t// group messages by communities.\n\t\tHashMap<String, LouvainMessage> communityMap = new HashMap<String, LouvainMessage>();\n\t\tfor (LouvainMessage message : messages) {\n\n\t\t\tString communityId = message.getCommunityId();\n\t\t\tlong weight = message.getEdgeWeight();\n\t\t\tLouvainMessage newmess = new LouvainMessage(message);\n\n\t\t\tif (communityMap.containsKey(communityId)) {\n\t\t\t\tLouvainMessage m = communityMap.get(communityId);\n\t\t\t\tm.setEdgeWeight(m.getEdgeWeight() + weight);\n\t\t\t} else {\n\t\t\t\tcommunityMap.put(communityId, newmess);\n\t\t\t}\n\t\t}\n\n\t\t// calculate change in Q for each potential community\n\t\tString bestCommunityId = getValue().getCommunity();\n\t\tString startingCommunityId = bestCommunityId;\n\t\tBigDecimal maxDeltaQ = new BigDecimal(\"0.0\");\n\t\tfor (Map.Entry<String, LouvainMessage> entry : communityMap.entrySet()) {\n\t\t\tBigDecimal deltaQ = q(startingCommunityId, entry.getValue().getCommunityId(), entry.getValue().getCommunitySigmaTotal(), entry.getValue().getEdgeWeight(), state.getNodeWeight(), state.getInternalWeight());\n\t\t\tif (deltaQ.compareTo(maxDeltaQ) > 0 || (deltaQ.equals(maxDeltaQ) && entry.getValue().getCommunityId().compareTo(bestCommunityId) < 0)) {\n\t\t\t\tbestCommunityId = entry.getValue().getCommunityId();\n\t\t\t\tmaxDeltaQ = deltaQ;\n\t\t\t}\n\t\t}\n\n\t\t// ignore switches based on iteration (prevent certain cycles)\n\t\tif ((state.getCommunity().compareTo(bestCommunityId) > 0 && iteration % 2 == 0) || (state.getCommunity().compareTo(bestCommunityId) < 0 && iteration % 2 != 0)) {\n\t\t\tbestCommunityId = state.getCommunity();\n\t\t\t// System.out.println(\"Iteration: \"+iteration+\" Node: \"+getId()+\" held stable to prevent cycle\");\n\t\t}\n\n\t\t// update community and change count\n\t\tif (!state.getCommunity().equals(bestCommunityId)) {\n\t\t\t// long old = state.getCommunity();\n\t\t\tLouvainMessage c = communityMap.get(bestCommunityId);\n\t\t\tif (!bestCommunityId.equals(c.getCommunityId())) {\n\t\t\t\tthrow new IllegalStateException(\"Community mapping contains wrong Id\");\n\t\t\t}\n\t\t\tstate.setCommunity(c.getCommunityId());\n\t\t\tstate.setCommunitySigmaTotal(c.getCommunitySigmaTotal());\n\t\t\tstate.setChanged(1L);\n\t\t\t// System.out.println(\"Iteration: \"+iteration+\" Node: \"+getId()+\" changed from \"+old+\" -> \"+state.getCommunity()+\" dq: \"+maxDeltaQ);\n\t\t}\n\n\t\t// send our node weight to the community hub to be summed in next\n\t\t// superstep\n\t\tthis.sendMessage(new Text(state.getCommunity()), new LouvainMessage(state.getCommunity(), state.getNodeWeight() + state.getInternalWeight(), 0, getId().toString()));\n\t}",
"private void replaceNodeEdgesWithCommunityEdges(Iterable<LouvainMessage> messages) {\n\n\t\t// group messages by communities.\n\t\tHashMap<String, LouvainMessage> communityMap = new HashMap<String, LouvainMessage>();\n\t\tfor (LouvainMessage message : messages) {\n\n\t\t\tString communityId = message.getCommunityId();\n\n\t\t\tif (communityMap.containsKey(communityId)) {\n\t\t\t\tLouvainMessage m = communityMap.get(communityId);\n\t\t\t\tm.setEdgeWeight(m.getEdgeWeight() + message.getEdgeWeight());\n\t\t\t} else {\n\t\t\t\tLouvainMessage newmess = new LouvainMessage(message);\n\t\t\t\tcommunityMap.put(communityId, newmess);\n\t\t\t}\n\t\t}\n\n\t\tArrayList<Edge<Text, LongWritable>> edges = new ArrayList<Edge<Text, LongWritable>>(communityMap.size() + 1);\n\t\tfor (Map.Entry<String, LouvainMessage> entry : communityMap.entrySet()) {\n\t\t\tedges.add(EdgeFactory.create(new Text(entry.getKey()), new LongWritable(entry.getValue().getEdgeWeight())));\n\t\t}\n\t\tthis.setEdges(edges);\n\t}",
"public void findCommunities() {\n\n\t\t// We copy the community of scale to scale+1\n\t\tfor (Object o : G) {\n\t\t\tNode i = (Node) o;\n\t\t\ti.addCommunity(scale + 1, i.getCommunity(scale));\n\t\t}\n\t\tscale++;\n\t\tG.setScaleMax(scale);\n\n\t\tString old_community;\n\t\tString current_community;\n\t\tString best_community = \"\";\n\t\tdouble dQ_max = 0;\n\t\tdouble dQ = 0;\n\t\t// double old_Q;\n\t\t// do {\n\t\t// old_Q = Q;\n\t\tfor (Object oi : G) {\n\t\t\tNode i = (Node) oi;\n\t\t\t// Node iH = (Node) nodesH.toArray()[k];\n\t\t\tdQ_max = 0;\n\t\t\tfor (Object oj : G) {\n\t\t\t\tNode j = (Node) oj;\n\t\t\t\tif (i != j && i.getCommunity(scale) != j.getCommunity(scale)) {\n\t\t\t\t\t// We put i into the community C of j\n\t\t\t\t\told_community = i.getCommunity(scale);\n\t\t\t\t\tcurrent_community = j.getCommunity(scale);\n\t\t\t\t\ti.editCommunity(scale, current_community);\n\t\t\t\t\t// We compute the modularity gain.\n\t\t\t\t\tdQ = computeModularityGain(i, current_community);\n\t\t\t\t\t// We keep the community with the highest gain.\n\t\t\t\t\tif (dQ > dQ_max) {\n\t\t\t\t\t\tdQ_max = dQ;\n\t\t\t\t\t\tbest_community = current_community;\n\t\t\t\t\t}\n\t\t\t\t\t// We put i back into its old community.\n\t\t\t\t\ti.editCommunity(scale, old_community);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// We put i into the best community.\n\t\t\tif (dQ_max > 0) {\n\t\t\t\ti.editCommunity(scale, best_community);\n\t\t\t\t// iH.editCommunity(scale, best_community);\n\t\t\t}\n\t\t}\n\t\tcomputeModularity();\n\t\t// } while (old_Q != Q);\n\t}",
"protected int compatibilityGraphEdges() throws IOException {\n\n \n // initialise with dummies\n //int largestGraphSize = Math.max( source.getAtomCount(), target.getAtomCount() );\n \tint nodesCount = graphNodes.size();\n \n for (int a = 0; a < nodesCount; a++ ) {\n \t\n \tfor (int b = a + 1; b < nodesCount; b++ ) {\n \t\t\n \t\tEdgeType et = edgesMatch(\n \t\tsource, \n \t\ttarget, \n \t\tsource.getBond( graphNodes.get(a)[0] ), \n \t\ttarget.getBond( graphNodes.get(a)[1] ), \n \t\tsource.getBond( graphNodes.get(b)[0] ), \n \t\ttarget.getBond( graphNodes.get(b)[1] ),\n \t\ttrue\n \t);\n \t\tboolean matches = (et == EdgeType.CEDGE || et == EdgeType.DEDGE);\n \n \n // label/weight matching\n if( ! matches )\n \tcontinue;\n \n \n if( useTopologicalDistance ) {\n\t int topoDifference = Math.abs( pathDistancesHsMol[ graphNodes.get(a)[0] ][ graphNodes.get(b)[0] ] - pathDistancesQMol[ graphNodes.get(a)[1] ][ graphNodes.get(b)[1] ] );\n\t \n\t \t\t// special case for topological distance constraint thing (in general)\n\t if ( topoDifference > topologicalDistanceLimit ) {\n\t \tcontinue;\n\t }\n }\n \n \n \n addEdge( a, b, et );\n \t}\n }\n \n \n // connected common subgraph constraint goes here\n /* for (int a = 0; a < edges.size(); a++ ) {\n \t\n \tboolean violates = true;\n \tIBond bondA1 = source.getBond( graphNodes.get(a)[0] );\n \tIBond bondA2 = target.getBond( graphNodes.get(a)[1] );\n \t\n \t\n \tfor (int b = a + 1; b < edges.size(); b++ ) {\n \t\t\n \t\t\n \t\tIBond bondB1 = source.getBond( graphNodes.get(b)[0] );\n \tIBond bondB2 = target.getBond( graphNodes.get(b)[1] );\n \n \t\t// valid if at least one pair of connected bonds has a matching pair of connected bonds\n \t\tif( ! (bondA1.isConnectedTo(bondB1) && bondA2.isConnectedTo(bondB2)) ) {\n \t\t\tviolates = false;\n \t\t\tedges.get(a).remove( new Integer(b) );\n \t\t\t//break;\n \t\t}\n \t}\n \t\n \tif( violates ) {\n \t\t//edges.get(a).clear();\n \t\t//System.err.println(\"violates\");\n \t\t//edges.get(b).clear();\n \t\tfor (int b = a + 1; b < graphNodes.size(); b++ ) {\n\t \t\t edges.get(a).remove(b); \n\t edges.get(b).remove(a);\n \t\t}\n \t}\n }*/\n \n return 0;\n }",
"private Set<Integer>[] getKernelDAG(List<Integer>[] adjacent) {\n Set<Integer>[] adjacentComponents = (HashSet<Integer>[]) new HashSet[sccCount];\n for (int i = 0; i < adjacentComponents.length; i++) {\n adjacentComponents[i] = new HashSet<>();\n }\n\n for (int vertexId = 0; vertexId < adjacent.length; vertexId++) {\n int currentComponent = sccIds[vertexId];\n\n for (int neighbor : adjacent[vertexId]) {\n if (currentComponent != sccIds[neighbor]) {\n adjacentComponents[currentComponent].add(sccIds[neighbor]);\n }\n }\n }\n return adjacentComponents;\n }",
"public List<PathPiece> getEdgeWithNeighbourCluster(DirectedEdge e) {\n List<PathPiece> list = new ArrayList<PathPiece>();\n\n list.addAll(getEdgesOfCluster(e.getEnd(), row, col));\n\n if (e.getEnd().getRow() == getBottomFrontier()) // south todo wrap\n // around\n\n list.addAll(getEdgesOfCluster(e.getEnd(), row + 1, col));\n\n if (e.getEnd().getRow() == getTopFrontier()) // north todo wrap around\n\n list.addAll(getEdgesOfCluster(e.getEnd(), row - 1, col));\n\n if (e.getEnd().getCol() == getLeftFrontier()) // west todo wrap around\n\n list.addAll(getEdgesOfCluster(e.getEnd(), row, col - 1));\n\n if (e.getEnd().getCol() == getRightFrontier()) // east todo wrap around\n\n list.addAll(getEdgesOfCluster(e.getEnd(), row, col + 1));\n\n LOGGER_ASTAR.debug(\"%s neighbour cluster found\", list.size());\n for (PathPiece t : list)\n LOGGER_ASTAR.debug(\" => %s\", t);\n return list;\n }",
"@SuppressWarnings(\"static-access\")\n private double oneGreedySweep(){\n double totalQualityChange=0;\n int updateTried=0;\n int updateMade=0;\n double deltaQremove = 0;\n int oldCommunity=-1;\n perm.newPermutation();\n int e=-1;\n double deltaQ = 0;\n double deltaQmax = 0;\n int cmax=-1; // non existent community\n for (int i=0; i<graph.getNumberStubs();i++) {\n e=perm.next();\n int eglobal = (graph.isDirected()?e:e<<1);\n oldCommunity = communityOfElement[e];\n deltaQremove = -quality.delta(e, oldCommunity, communityOfElement);\n\n if (deltaQremove>0) { // better to put in own single Edge community\n cmax=EdgePartition.NEWCOMMUNITYLABEL; \n //deltaQ=deltaQremove;\n deltaQmax=deltaQremove;\n }\n else { // better not to put in own single Edge community\n //deltaQ = 0;\n deltaQmax=0;\n cmax = oldCommunity;\n }\n // find out all the distinct neighbouring community labels\n TreeSet<Integer> nc = new TreeSet<Integer> ();\n int elast = (graph.isDirected()?eglobal+1:eglobal+2); \n for (int eg=eglobal; eg<elast;eg++)\n {\n int v=graph.getVertexFromStub(eg);\n int kout = graph.getVertexOutDegree(v);\n for (int e2=0; e2<kout;e2++) {\n int enn = graph.getStub(v,e2);\n if (enn==e2) continue;\n int cnn = communityOfElement[enn];\n nc.add(cnn);\n }\n }\n\n \n if (nc.size() ==0) continue; // edge has no neigbouring edges\n\n // Now find out if its better to join a distinct community of one of the neighbours\n Iterator<Integer> citer = nc.iterator();\n int c=-1;\n while(citer.hasNext()){\n c=citer.next();\n if (c==oldCommunity) continue; \n //deltaQ = quality.delta(e, c, communityOfElement)+deltaQremove;\n System.out.println(\"*** THIS NEEDS TO BE CHANGED ***\");\n if (UNSET<0) throw new RuntimeException(\"*** THIS NEEDS TO BE CHANGED ***\");\n if (deltaQ < deltaQmax) continue;\n cmax=c;\n deltaQmax = deltaQ;\n }\n updateTried++;\n \n if (cmax!=oldCommunity) { // can increase quality by changing communities\n totalQualityChange+=deltaQmax;\n if (cmax==EdgePartition.NEWCOMMUNITYLABEL) cmax=getEmptyCommunity();\n communityOfElement[e]=cmax;\n updateMade++;\n }\n }\n greedyUpdateRecord.update(updateTried, updateMade);\n return totalQualityChange;\n }",
"public void connectClusters() {\n\t\tif (clusters.size() == 2) { // once have only two clusters\n\t\t\tSystem.out.println(\"DONE!\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t\tcluster close1 = clusters.get(0),\n\t\t\t\tclose2 = clusters.get(1);\n\t\tdouble closestCluster = computeDistance(close1, close2);\n\t\t\n\t\tfor (int i=0; i<clusters.size(); i++) {\n\t\t\tcluster c1 = clusters.get(i);\n\t\t\t\n\t\t\tfor (int j=0; j<clusters.size(); j++) { // go through all the clusters and find closest\n\t\t\t\tif (i!=j) {\n\t\t\t\t\tcluster c2 = clusters.get(j);\n\t\t\t\t\tdouble dist = computeDistance(c1,c2);\n\t\t\t\t\tif (dist < closestCluster) {\n\t\t\t\t\t\tclose1 = c1;\n\t\t\t\t\t\tclose2 = c2;\n\t\t\t\t\t\tclosestCluster = dist;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tmakeCluster(close1, close2);\n\t\t\n\t}",
"@Value.Parameter public abstract ICompleteness.Immutable criticalEdges();",
"public Graph<List<List<Person>>, DefaultEdge> generateGraph() {\n Graph<List<List<Person>>, DefaultEdge> generatedGraph = new DefaultUndirectedGraph<>(DefaultEdge.class);\n List<List<List<Person>>> iterationNodes = new ArrayList<>();\n Map<Person, Boolean> hasHosted = new HashMap<>();\n\n // Fill the hash map with all people from the community and set the host status to false.\n for (int i = 0; i < this.COMMUNITY.size(); i++) {\n hasHosted.put(this.COMMUNITY.get(i), Boolean.FALSE);\n }\n\n // We will iterate @var iterations times.\n // This means that we will have @var iterations nodes.\n for (int i = 0; i < iterations; i++) {\n List<List<Person>> iteration = new ArrayList<>(); // All the groups in that iteration\n Map<Person, Boolean> available = new HashMap<>();\n\n // Fill hash map with all the people and set them as available each iteration.\n for (Person value : this.COMMUNITY) {\n available.put(value, Boolean.TRUE);\n }\n\n for (int j = 0; j < numOfGroups; j++) {\n // An array of the group with the host being at index 0.\n List<Person> group = new ArrayList<>();\n\n for (int k = 0; k < GROUP_SIZE; k++) {\n // Finds the next available person / couple to add to the group.\n for (Person person : this.COMMUNITY) {\n if (available.get(person)) {\n // Set the host\n if (k == 0) {\n if (!hasHosted.get(person) && available.get(person)) {\n // The person has a spouse\n if (person.hasSpouse()) {\n group.add(person);\n group.add(person.getSpouse());\n hasHosted.put(person, Boolean.TRUE);\n available.put(person, Boolean.FALSE);\n k++; // Since there is a spouse the group size increases + 1 making + 2\n break; // Stop the search\n } else {\n group.add(person);\n hasHosted.put(person, Boolean.TRUE);\n available.put(person, Boolean.FALSE);\n break; // Stop the search\n }\n }\n } else {\n if (!person.hasSpouse()) {\n group.add(person);\n available.put(person, Boolean.FALSE);\n break; // Stop the search\n } else if (person.hasSpouse() && k + 2 < GROUP_SIZE) {\n // Adding a couple to the group as the group still has the capacity\n group.add(person);\n available.put(person, Boolean.FALSE);\n group.add(person.getSpouse());\n k++;\n break; // Stop the search\n }\n }\n }\n }\n }\n iteration.add(group);\n }\n\n // Append the remaining people to the last group\n if (available.containsValue(Boolean.TRUE)) {\n for (Person person : this.COMMUNITY) {\n if (available.get(person)) {\n if (person.hasSpouse()) {\n iteration.get(iteration.size() - 1).add(person);\n iteration.get(iteration.size() - 1).add(person.getSpouse());\n available.put(person, Boolean.FALSE);\n } else {\n iteration.get(iteration.size() - 1).add(person);\n available.put(person, Boolean.FALSE);\n }\n }\n }\n }\n iterationNodes.add(iteration);\n }\n\n // Generate the actual graph\n List<List<Person>> prevNode = null;\n for (List<List<Person>> node : iterationNodes) {\n generatedGraph.addVertex(node);\n if (prevNode != null) {\n // Connect the two nodes together\n generatedGraph.addEdge(node, prevNode);\n }\n prevNode = node;\n }\n return generatedGraph;\n }",
"public static ArrayList<Set<String>> getConnectedComponentsInDistrict(\n District district,\n HashMap<String, PrecinctNeighborRelation> precinctNeighborRelationMap) {\n // ( precinctGeoId : PrecinctNeighborRelation } pair in precinctNeighborRelationMap\n\n // first, build from -> to_list hash map\n HashMap<String, ArrayList<String>> fromToList = new HashMap<>();\n for(PrecinctNeighborRelation pnr : precinctNeighborRelationMap.values()) {\n ArrayList<NeighborData> ndList = pnr.getNeighborDataList();\n ArrayList<String> toGeoidList = new ArrayList<>();\n for(NeighborData nd : ndList)\n toGeoidList.add(nd.getToGeoId());\n fromToList.put(pnr.getFromGeoId(), toGeoidList);\n }\n\n Set<Precinct> precinctsOfDistrict = district.getPrecincts();\n\n ArrayList<String> pgeoidsOfDistrict = new ArrayList<>();\n ArrayList<Set<String>> connectedComponentList = new ArrayList<>();\n HashMap<String, Set<String>> referenceToItsSet = new HashMap<>();\n\n for(Precinct p : precinctsOfDistrict) {\n Set<String> connectedComponent = new HashSet<>();\n connectedComponent.add(p.getGeoId());\n connectedComponentList.add(connectedComponent);\n referenceToItsSet.put(p.getGeoId(), connectedComponent);\n pgeoidsOfDistrict.add(p.getGeoId());\n }\n\n for(Precinct p : precinctsOfDistrict) {\n ArrayList<String> toGeoidList = fromToList.get(p.getGeoId());\n Set<String> itsSet = referenceToItsSet.get(p.getGeoId());\n for(String neighborGeoid : toGeoidList) {\n // if the neighbor is in same district\n // if itsSet not yet contains the neighbor\n if(pgeoidsOfDistrict.contains(neighborGeoid)\n && !itsSet.contains(neighborGeoid)) {\n // neighbors set will be removed from the memory\n Set<String> neighborsSet = referenceToItsSet.get(neighborGeoid);\n for(String elementFromNeighborSet : neighborsSet) {\n referenceToItsSet.put(elementFromNeighborSet, itsSet);\n itsSet.add(elementFromNeighborSet);\n }\n connectedComponentList.remove(neighborsSet);\n }\n }\n }\n\n // stubbed\n// Set<Precinct> oneset = new HashSet<>();\n// ArrayList<Set<Precinct>> listSizeOne = new ArrayList<>();\n// listSizeOne.add(oneset);\n if(connectedComponentList.size() > 1) {\n //System.out.println(\"District: \" + district.getGeoId() + \" has \" + connectedComponentList.size() + \" components\");\n }\n return connectedComponentList;\n }",
"public void createIncGraph(){\n\t\tigraph = new ArrayList<CompNode>(0);\r\n\t\tint index=0;\r\n\t\tfor(int i=0;i<hvmcList.length;i++){\r\n\t\t\tCopyVM temp = hvmcList[i]; \r\n\t\t\tigraph.add(new CompNode(temp.vmid,temp.pmid, temp.cost));\r\n\t\t\tigraph.get(index).index=index;\r\n\t\t\tindex++;\r\n\t\t}\r\n\t\tigraph.trimToSize();\r\n\t\tint firstbin = igraph.size();\r\n\t\tfor(int i=0;i<pmcount;i++){\r\n\t\t\tigraph.add(new CompNode(firstpm+i));\r\n\t\t\tigraph.trimToSize();\r\n\t\t\tigraph.get(igraph.size()-1).index=index;\r\n\t\t\tindex++;\r\n\t\t}\r\n\t\tigraph.trimToSize();\r\n\t\t//graph is now populated with nodes, now make edges\r\n\t\t//ie add to the CompNode Objects neighbors list where the neighbors list is full of indeces.\r\n\t\tfor(int i=0;i<igraph.size();i++){\r\n\t\t\tCompNode temp = igraph.get(i);\r\n\t\t\tfor(int j=0;j<igraph.size();j++){\r\n\t\t\t\tif(i==j){\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (temp.vmid==(0-1) && igraph.get(j).vmid==(0-1)){\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t//if vmid are the same for VMs\r\n\t\t\t\tif (temp.vmid!=(0-1)&&igraph.get(j).vmid!=(0-1)){\r\n\t\t\t\t\tif(temp.vmid!=(0-1)&&temp.vmid==igraph.get(j).vmid){\r\n\t\t\t\t\t\ttemp.nbors.add(j);\r\n\t\t\t\t\t\tigraph.get(j).nbors.add(i);\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t// if cost is not the same then it is not compatible\r\n\t\t\t\t//or if this PM has original copy\r\n\t\t\t\tif(temp.vmid!=(0-1)&&igraph.get(j).vmid==(0-1)){\r\n\t\t\t\t\tint vmnum=temp.vmid;\r\n\t\t\t\t\tint pmnum=temp.pmid;\r\n\t\t\t\t\tint cost=temp.cost;\r\n\t\t\t\t\tint tempdistance = distance(htree,htree[igraph.get(j).pmid],htree[orgnl[vmnum]],k);\r\n\t\t\t\t\tif(cost!=tempdistance){\r\n\t\t\t\t\t\ttemp.nbors.add(j);\r\n\t\t\t\t\t\tigraph.get(j).nbors.add(i);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(htree[igraph.get(j).pmid].checkVm(vmnum)==true){\r\n\t\t\t\t\t\ttemp.nbors.add(j);\r\n\t\t\t\t\t\tigraph.get(j).nbors.add(i);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tif(temp.vmid==(0-1)&&igraph.get(j).vmid!=(0-1)){\r\n\t\t\t\t\tint vmnum=igraph.get(j).vmid;\r\n\t\t\t\t\tint pmnum=igraph.get(j).pmid;\r\n\t\t\t\t\tint cost= igraph.get(j).cost;\r\n\t\t\t\t\tint tempdistance = distance(htree,htree[temp.pmid],htree[orgnl[vmnum]],k);\r\n\t\t\t\t\tif(cost!=tempdistance){\r\n\t\t\t\t\t\ttemp.nbors.add(j);\r\n\t\t\t\t\t\tigraph.get(j).nbors.add(i);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(htree[temp.pmid].checkVm(igraph.get(j).vmid)==true){\r\n\t\t\t\t\t\ttemp.nbors.add(j);\r\n\t\t\t\t\t\tigraph.get(j).nbors.add(i);\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 monogamousPartnership2() {\r\n\t\tint size = individuals.size();\r\n\t\tint expectedEdges = (int) avgNbor * (size/2);\r\n\t\tint numEdgesToBeMade = expectedEdges - edgelist.size();\r\n\t\tif( numEdgesToBeMade > 0 ){\r\n\t\t\tArrayList<PartnershipAgent> singles = new ArrayList<PartnershipAgent>();\r\n\t\t\t// make a list of singles\r\n\t\t\tfor( int i = 0; i < size; i++ ){\r\n\t\t\t\tPartnershipAgent node = individuals.get( i );\r\n\t\t\t\tif( node.getOutDegree() == 0 ){\r\n\t\t\t\t\tsingles.add( node );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// form partnerships between singles\r\n\t\t\tfor( int i = 0; i < numEdgesToBeMade; i++ ){\r\n\t\t\t\tPartnershipAgent fromNode = singles.get( i );\r\n\t\t\t\tPartnershipAgent toNode = singles.get( singles.size() - 1 - i );\r\n\t\t\t\tfromNode.makeContactToFrom(toNode, edgelist);\t\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void main(String[] args) throws Exception {\r\n\r\n try (BufferedReader br = new BufferedReader(new FileReader(args[0]))) {\r\n MinPQ<Clustering.Event> pq = new MinPQ<Clustering.Event>();\r\n\r\n String countstring = br.readLine();\r\n int N = Integer.parseInt(countstring);\r\n Clustering[] clusters = new Clustering[3 * N];\r\n int current = 0;\r\n for (String in = br.readLine(); in != null; in = br.readLine()) {\r\n String[] data = in.split(\"\"\\\\s+\"\");\r\n double x = Double.parseDouble(data[0]);\r\n double y = Double.parseDouble(data[1]);\r\n Point2D nowpoint = new Point2D(x, y);\r\n clusters[current] = new Clustering(nowpoint);\r\n current++;\r\n }\r\n \r\n for (int i = 0; i < N; i++) {\r\n for (int j = (i + 1); j < N; j++) {\r\n pq.insert(new Clustering.Event(clusters[i].Dist(clusters[j]), clusters[i], clusters[j]));\r\n }\r\n }//initialize\r\n\r\n while (N > 3) {\r\n Clustering.Event event = pq.delMin();\r\n Clustering a = event.a;\r\n Clustering b = event.b;\r\n if (a.isValid == 0 || b.isValid == 0) {\r\n continue;\r\n }\r\n Clustering newcluster = a.combine(b);\r\n clusters[current] = newcluster;\r\n int count = 0;\r\n for(int i = 0; i < current; i++){\r\n if(clusters[i] == a) {clusters[i] = null;\r\n count++;}\r\n if(clusters[i] == b) {clusters[i] = null;\r\n count++;}\r\n if(count == 2) break;\r\n }\r\n \r\n for (int i = 0; i < current; i++) {\r\n if(clusters[i] != null && clusters[i].isValid == 1)\r\n pq.insert(new Clustering.Event(clusters[current].Dist(clusters[i]), clusters[current], clusters[i]));\r\n }\r\n current++;\r\n N = N - 1;\r\n }//making clustering\r\n\r\n Clustering[] finalclusters = new Clustering[3];\r\n int ind = 0;\r\n\r\n for (int i = 0; i < current; i++) {\r\n if (clusters[i] != null) {\r\n finalclusters[ind++] = clusters[i];\r\n }\r\n }\r\n\r\n Arrays.sort(finalclusters);\r\n\r\n\r\n\r\n double minimum = finalclusters[0].minDist(finalclusters[1]);\r\n for (int i = 0; i < 3; i++) {\r\n for (int j = i + 1; j < 3; j++) {\r\n if (finalclusters[i].minDist(finalclusters[j]) < minimum) {\r\n minimum = finalclusters[i].minDist(finalclusters[j]);\r\n }\r\n }\r\n }//find the minimum\r\n\r\n for (int i = 0; i < 3; i++) {\r\n int size = finalclusters[i].size;\r\n double x = finalclusters[i].centroid.x();\r\n double y = finalclusters[i].centroid.y();\r\n System.out.println(size + \"\" \"\" + String.format(\"\"%.2f\"\", x) + \"\" \"\" + String.format(\"\"%.2f\"\", y));\r\n }\r\n System.out.print(String.format(\"\"%.2f\"\", minimum));\r\n }\r\n }",
"abstract int commonClusters(int[] clusterTable, int[] range);",
"private HashSet<Cluster> transitivity(HashSet<Cluster> obj1clusters,\n\t\t\tHashSet<Cluster> relclusters, HashSet<Cluster> obj2clusters) {\n\t\tHashSet<Cluster> clusters = new HashSet<Cluster>();\n\t\t\n\t\tArrayList<Integer> ignoreUs = new ArrayList<Integer>();\n\t\t\n\t\t// loop through lines\n\t\t// two objects are clustered iff for both: arg1 is in the same cluster as arg2, etc.\n\t\tfor(int i = 0; i < lines.size(); i++){\n\t\t\tif (ignoreUs.contains(i)){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tignoreUs.add(i);\n\t\t\t\n\t\t\tCluster c = new Cluster();\n\t\t\tString iLine = GeneralUtility.join(lines.get(i), \" :::: \", 0, lines.get(i).length-1);\n\t\t\tc.addStringNoConvert(iLine);\n\t\t\t\n\t\t\tfor (int j = i+1; j < lines.size(); j++){\n\t\t\t\tif (ignoreUs.contains(j)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString jLine = GeneralUtility.join(lines.get(j), \" :::: \", 0, lines.get(j).length-1);\n\t\t\t\t\n\t\t\t\t// Check obj1clusters, relclusters, obj2clusters to see if \n\t\t\t\t// iLine and jLine are in the same clusters in each.\n\t\t\t\t// If so, add these lines i and j to clusters. Then add j to ignoreus\n\t\t\t\tboolean objs1 = stringsInSameCluster(iLine, jLine, obj1clusters);\n\t\t\t\tboolean rels = stringsInSameCluster(iLine, jLine, relclusters);\n\t\t\t\tboolean objs2 = stringsInSameCluster(iLine, jLine, obj2clusters);\n\t\t\t\tif (objs1 && rels && objs2){\n\t\t\t\t\tc.addStringNoConvert(jLine);\n\t\t\t\t\tignoreUs.add(j);\n\t\t\t\t}\n\t\t\t}\n\t\t\tclusters.add(c);\n\t\t\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\treturn clusters;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Verify ads in mobile article. | public void verifyAdsInMobileArticle() {
try {
scrollBy(0, 500);
boolean ads=elementPresent("Ad Placeholder#xpath=//div[@class='article-mobile-ad ng-scope ng-isolate-scope']");
if(ads==true)
{
String adPlaceHolder = "Ad Placeholder#xpath=//div[@class='article-mobile-ad ng-scope ng-isolate-scope']";
int adCount = getElementCount(adPlaceHolder);
testStepPassed("Verifing (" + adCount + ") Ads in the Aritcle Page");
int adsNum=1;
for (adsNum = 1; adsNum <= adCount; adsNum++) {
adCount = getElementCount(adPlaceHolder);
verifyAd(adsNum);
}
}
else
{
getCurrentPageURL();
testStepFailed("Ads are not displayed in Article page");
}
} catch (Exception e) {
// TODO Auto-generated catch block
writeToLogFile("ERROR", "Exception: " + e.toString());
}
} | [
"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}",
"public void validateMobileAdsInHomePage() {\r\n\t\t\t\ttestStepInfo(\"************************************ Ads **************************************\");\r\n\t\t\t\ttry {\r\n\t\t\t\t\tscrollBy(0, 600);\r\n\t\t\t\t\twaitTime(5);\r\n\t\t\t\t\twaitForElement(OR.ads_Mob_Home_Page_Top_ads);\r\n\t\t\t\t\tboolean topAds = elementPresent(OR.ads_Mob_Home_Page_Top_ads);\r\n\t\t\t\t\tif (topAds == true) {\r\n\t\t\t\t\t\ttestStepPassed(\"Mobile Rec Ads is present\");\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\ttestStepFailed(\"Mobile Rec Ads is not present\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvalidateBottomAds(OR.txt_GalleryCheck_mobileAdOnGallery);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\twriteToLogFile(\"ERROR\", \"Exception: \" + e.toString());\r\n\t\t\t\t}\r\n\t\t\t}",
"public void CheckMobileAd(String strXpath){\r\n\t\ttry{\r\n\t\ttestStepInfo(\"*********************************Mobile Sticky Ad Check**********************************\");\r\n\t\tboolean galleryAds=elementPresent(strXpath);\r\n\t\tif(galleryAds==true){\r\n\t\t\ttestStepPassed(\"Mobile Gallery Check (Mobile Gallery sticky ad is displayed on the page\");\r\n\t\t}\r\n\t\telse{\r\n\t\t\ttestStepFailed(\"Mobile Gallery Check (Mobile Gallery sticky ad is not displayed on the page\");\r\n\t\t}\r\n\t\t}catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\twriteToLogFile(\"ERROR\", \"Exception: \" + e.toString());\r\n\t\t}\r\n\t}",
"public void verifyBVPageAdsInDesktop() {\r\n\t\ttry{\r\n\t\t\ttestStepInfo(\"****************************Ads on Brand Voice Page********************************************\");\r\n\t\t\t\r\n\t\t\tscrollBy(0, 900);\r\n\t\t\tList<WebElement> allAdLinks = driver\r\n\t\t\t\t\t.findElements(By\r\n\t\t\t\t\t\t.xpath(\"//iframe[contains(@id,'google_ads_iframe')]\"));\r\n\t\t\tif(allAdLinks.size()==3){\r\n\t\t\ttestStepPassed(\"BV Page validation (BV Ads - Top, Rec, loge ads are displayed)\");\r\n\t\t\t}\r\n\t\t\telse if(allAdLinks.size()==4){\r\n\t\t\t\ttestStepPassed(\"BV Page validation (BV Ads - Top, Rec, loge and mobile ads are displayed)\");\r\n\t\t\t\t}\r\n\t\t\telse if(allAdLinks.size()==2){\r\n\t\t\t\ttestStepInfo(\"BV Page validation (BV Ads - Two ads of Top, Rec, loge ads are displayed)\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\ttestStepFailed(\"BV Page validation (BV Ads - Top, Rec, loge ads are not displayed)\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\twriteToLogFile(\"ERROR\", \"Exception: \" + e.toString());\r\n\t\t}\r\n\t}",
"public void verifyAdsInDesktopArticle() {\r\n\t\tint topAdArticleNo = 0;\r\n\t\tint adRailArticleNo = 0;\r\n\t\tfor (int i = 0; i <= 15; i++) {\r\n\r\n\t\t\tif (driver.getPageSource().contains(\r\n\t\t\t\t\t\"top-ad-article-\" + topAdArticleNo)\r\n\t\t\t\t\t|| driver.getPageSource().contains(\r\n\t\t\t\t\t\t\t\"ad-rail-article-\" + adRailArticleNo)) {\r\n\t\t\t\tif (driver.getPageSource().contains(\r\n\t\t\t\t\t\t\"top-ad-article-\" + topAdArticleNo)\r\n\t\t\t\t\t\t&& driver.getPageSource().contains(\r\n\t\t\t\t\t\t\t\t\"ad-rail-article-\" + adRailArticleNo)) {\r\n\t\t\t\t\ttestStepPassed(\"Top Ad\");\r\n\t\t\t\t\ttakeAdScreenshot(\"Ad \" + topAdArticleNo\r\n\t\t\t\t\t\t\t+ \"#id=top-ad-article-\" + topAdArticleNo,\r\n\t\t\t\t\t\t\t\"topAdArticleNo\" + (topAdArticleNo + 1) + \",\"\r\n\t\t\t\t\t\t\t\t\t+ \"SideAds\" + (adRailArticleNo + 1));\r\n\t\t\t\t\tif (driver.getPageSource().contains(\r\n\t\t\t\t\t\t\t\"ad-rail-article-\" + adRailArticleNo)) {\r\n\t\t\t\t\t\tint railAdCount = driver\r\n\t\t\t\t\t\t\t\t.findElements(\r\n\t\t\t\t\t\t\t\t\t\tBy.xpath(\"//*[@id='ad-rail-article-\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ adRailArticleNo\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ \"']/div[@ng-repeat-start='ad_unit in ad_units']\"))\r\n\t\t\t\t\t\t\t\t.size();\r\n\t\t\t\t\t\ttestStepPassed(\"Rail Ad Count: \" + railAdCount);\r\n\t\t\t\t\t\tfor (int j = 0; j < railAdCount; j++) {\r\n\t\t\t\t\t\t\ttakeAdScreenshot(\r\n\t\t\t\t\t\t\t\t\tdriver.findElements(\r\n\t\t\t\t\t\t\t\t\t\t\tBy.xpath(\"//*[@id='ad-rail-article-\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ adRailArticleNo\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"']/div[@ng-repeat-start='ad_unit in ad_units']\"))\r\n\t\t\t\t\t\t\t\t\t\t\t.get(j), \"SideAds\"\r\n\t\t\t\t\t\t\t\t\t\t\t+ (adRailArticleNo + 1));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttopAdArticleNo++;\r\n\t\t\t\t\tadRailArticleNo++;\r\n\t\t\t\t} else if (driver.getPageSource().contains(\r\n\t\t\t\t\t\t\"top-ad-article-\" + topAdArticleNo)) {\r\n\t\t\t\t\ttakeAdScreenshot(\"Ad \" + topAdArticleNo\r\n\t\t\t\t\t\t\t+ \"#id=top-ad-article-\" + topAdArticleNo,\r\n\t\t\t\t\t\t\t\"topAdArticleNo\" + (topAdArticleNo + 1));\r\n\t\t\t\t\ttopAdArticleNo++;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t} else {\r\n\t\t\t\t((JavascriptExecutor) driver)\r\n\t\t\t\t\t\t.executeScript(\"window.scrollBy(0,100)\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"public void validateHeadLineArticleInMobile() {\r\n\t\t\ttestStepInfo(\"******************************************** Article Page********************************************************\");\r\n\t\t\twaitTime(3);\r\n\t\t\t/*boolean headLine = elementPresent(OR.txt_Mob_Reg_Home_Page_TopStories_Title);\r\n\t\t\tboolean galleryTitle=elementPresent(\"Gallery Title#xpath=//p[@class='image-title']\");\r\n\t\t\tif (headLine == true ||galleryTitle==true) {*/\r\n\t\t\t\tString getTitle = driver.getTitle();\r\n\t\t\t\t//String headLineArticle = getText(OR.txt_Mob_Reg_Home_Page_TopStories_Title);\r\n\t\t\t\t//String galleryName = getText(OR.txt_Mob_Reg_Home_Page_TopStories_Title);\r\n\t\t\t\tif(!getTitle.equals(\"404\"))\r\n\t\t\t\t{\r\n\t\t\t\t\ttestStepPassed(getTitle );\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tgetCurrentPageURL();\r\n\t\t\t\t\ttestStepFailed(\"Error:404 on Forbes Page\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tclickOnBackButton();\r\n\t\t\t/*} else {\r\n\t\t\t\ttestStepFailed(\"Failed to navigate to Article \");\r\n\t\t\t}*/\r\n\t\t}",
"public void verifyAdDisplayedInHomePage() {\r\n\r\n\t\tboolean topAds = elementPresent(OR.adsHomePageTopAds);\r\n\t\tif (topAds == true) {\r\n\t\t\ttestStepInfo(\"*********************************Top Ad***********************************************\");\r\n\t\t\twaitForElement(OR.adsHomePageTopAds);\r\n\t\t\t//takeAdScreenshot(OR.adsHomePageTopAds, \"Top Ads\");\r\n\t\t\ttestStepPassed(\"Top Ads is displayed\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttestStepFailed(\"Top Ads is not displayed\");\r\n\t\t}\r\n\t\tboolean recAds = elementPresent(OR.adsHomePageRecAds);\r\n\t\tif (recAds == true) {\r\n\t\t\ttestStepInfo(\"*********************************Rec Ad***********************************************\");\r\n\t\t\twaitForElement(OR.adsHomePageRecAds);\r\n\t\t\t//takeAdScreenshot(OR.adsHomePageRecAds, \"Rec Ads\");\r\n\t\t\ttestStepPassed(\"Rec Ads is displayed\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttestStepFailed(\"Rec Ads is not displayed\");\r\n\t\t}\r\n\t\tboolean topxAds = elementPresent(OR.adsHomePageTopxAds);\r\n\t\tif (topxAds == true) {\r\n\t\t\ttestStepInfo(\"*********************************Topx Ad***********************************************\");\r\n\t\t\twaitForElement(OR.adsHomePageTopxAds);\r\n\t\t\t//takeAdScreenshot(OR.adsHomePageTopxAds, \"Topx Ads\");\r\n\t\t\ttestStepPassed(\"Topx Ads is displayed\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttestStepFailed(\"Topx Ads is not displayed\");\r\n\t\t}\r\n\r\n\t}",
"@Test(enabled=true)\n public void testMobileAppsLink() {\n String actual = objFooterPage.verifyMobileAppLink();\n String expected = \"Home Depot Mobile\";\n Assert.assertTrue(actual.contains(expected));\n System.out.println(\"testMobileAppsLink test passed\");\n }",
"boolean hasResponsiveSearchAdRecommendation();",
"@Test(suiteName = \"NowPlaying\", testName = \"DMCA Restricted\", description = \"Validating On Demand DMCA Restricted\", enabled = true, groups = {\n\t\t\t\"MOBANDEVER-250\" })\n\tpublic void onDemanddmcaRestrictedShowLogo() {\n\t\tCommon common = new Common(driver);\n\t\tCommon.log(\"verifying On Demand DMCA restricted Show Logo MOBANDEVER-250\");\n\t\ttry {\n\t\t\tgetPageFactory().getEvehome().clickonMusic();\n\t\t\tcommon.scrollUntilTextExists(\"Dance/Electronic\");\n\t\t\tgetPageFactory().getEvehome().clickMucisSubRock();\n\t\t\tgetPageFactory().getdmca().verifyOnDemandDMCA();\n\t\t\tgetPageFactory().getEvehome().validateNPLScreen();\n\t\t} catch (AndriodException ex) {\n\t\t\tCommon.errorlog(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t\tAssert.fail(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t}\n\t}",
"@Test(suiteName = \"NowPlaying\", testName = \"DMCA Restricted\", description = \"Validating On Demand DMCA Restricted\", enabled = true, groups = {\n\t\t\t\"MOBANDEVER-252\" })\n\tpublic void verifyonDemanddmcaRestrictedAlbumArt() {\n\t\tCommon common = new Common(driver);\n\t\tCommon.log(\"verifying On Demand DMCA restricted Album Art MOBANDEVER-252\");\n\t\ttry {\n\t\t\tgetPageFactory().getEvehome().clickonMusic();\n\t\t\tcommon.scrollUntilTextExists(\"Dance/Electronic\");\n\t\t\tgetPageFactory().getEvehome().clickMucisSubRock();\n\t\t\tgetPageFactory().getdmca().verifyOnDemandDMCA();\n\t\t\tgetPageFactory().getCategory().nowPlayingArt();\n\t\t\tgetPageFactory().getEvehome().clickminimize();\n\t\t} catch (AndriodException ex) {\n\t\t\tCommon.errorlog(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t\tAssert.fail(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t}\n\t}",
"public boolean verify_SocialMedia_Link() throws InterruptedException {\n\t\tboolean value = false;\n\n\t\tHelper.scrollDown();\n\t\tThread.sleep(3000);\n\n\t\tboolean Google_Status_Before = element(\"GoogleLink\").isEnabled();\n\t\tboolean Twitter_Status_Before = element(\"TwitterLink\").isEnabled();\n\t\t\n\t\telement(\"AgreeCheckbox\").click();\n\t\tThread.sleep(4000);\n\t\tboolean Google_Status_After = element(\"GoogleLink\").isEnabled();\n\t\tboolean Twitter_Status_After = element(\"TwitterLink\").isEnabled();\n\t\tSystem.out.println(Google_Status_Before + \"Status of google link before click\");\n\t\tSystem.out.println(Google_Status_After + \"Status of google link after\");\n\t\tSystem.out.println(Twitter_Status_Before + \"Status of twitter link before\");\n\t\tSystem.out.println(Twitter_Status_After + \"Status of twitter link after\");\n\n\t\tif (Google_Status_Before == Google_Status_After && Twitter_Status_Before == Twitter_Status_After) {\n\t\t\tvalue = true;\n\t\t} else {\n\t\t\tvalue = false;\n\t\t}\n\n\t\treturn value;\n\t}",
"public boolean verify_ACSEmulator_Page() {\n\t\tWebDriverWait wait = new WebDriverWait(session.driver, 30);\n\t\tWebElement status = wait.until(ExpectedConditions\n\t\t\t\t.presenceOfElementLocated(By.xpath(\"//td[text()='411111xxxxxx1111']\")));\n\t\treturn status.isDisplayed();\n\t}",
"public boolean verify_CardDetailPage() {\n\t\tWebDriverWait wait = new WebDriverWait(session.driver, 30);\n\t\tWebElement status = wait.until(ExpectedConditions\n\t\t\t\t.presenceOfElementLocated(By.xpath(\"//span[contains(text(),'YOUR STUFF')]\")));\n\t\treturn status.isDisplayed();\n\t}",
"@DeviceOnly\n @LargeTest\n public void test_004_msisdnSms_1() throws Exception {\n final String ocFileName = \"asimov-signed-MSISDN_SMS_rooted_no_http_https.apk\";\n final String appPath = appFolder + File.separator + ocFileName;\n\n MsisdnSendingSmsValidationTask msisdnSendingSmsValidationTask = new MsisdnSendingSmsValidationTask();\n msisdnSendingSmsValidationTask.setChangeTimestampToGMT(false);\n MsisdnValidationSuccessTask msisdnValidationSuccessTask = new MsisdnValidationSuccessTask();\n msisdnValidationSuccessTask.setChangeTimestampToGMT(false);\n\n LogcatUtil logcatUtil = new LogcatUtil(getContext(), msisdnSendingSmsValidationTask, msisdnValidationSuccessTask);\n logcatUtil.start();\n\n try {\n long timestamp = System.currentTimeMillis();\n\n reinstallOcc(appPath);\n\n logcatUtil.stop();\n\n logger.trace(msisdnSendingSmsValidationTask.toString());\n logger.trace(msisdnValidationSuccessTask.toString());\n\n MsisdnSendingSmsValidationWrapper msisdnSendingSmsValidationLogEntry = msisdnSendingSmsValidationTask.getEntryAfterTimestamp(timestamp);\n String phoneToSend = msisdnSendingSmsValidationLogEntry.getPhoneToSend();\n assertEquals(\"Msisdn validation: phonenumber is wrong! Must be \" + TFConstantsIF.MSISDN_VALIDATION_PHONENUMBER + \" but is \" + phoneToSend,\n TFConstantsIF.MSISDN_VALIDATION_PHONENUMBER, phoneToSend);\n logger.trace(\"4-1 \" + msisdnSendingSmsValidationLogEntry);\n MsisdnValidationSuccessWrapper msisdnValidationSuccessLogEntry = msisdnValidationSuccessTask.getEntryAfter(msisdnSendingSmsValidationLogEntry.getEntryNumber());\n assertNotNull(\"Msisdn validation has not been done!\", msisdnValidationSuccessLogEntry);\n logger.trace(\"4-2 \" + msisdnValidationSuccessLogEntry);\n\n } catch (Exception e) {\n logger.error(ExceptionUtils.getStackTrace(e));\n throw new Exception(e.getMessage());\n } finally {\n logcatUtil.stop();\n }\n }",
"@Override\n public void onAdLoaded() {\n Log.d(\"ADS\",\"Ad is loaded!\");\n }",
"public void verifyAdsInLsits() {\r\n\t\t\t\ttestStepInfo(\"************************************** Topx Ads ********************************************\");\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tscrollBy(0, 1000);\r\n\t\t\t\t\tint adsCount = 1;\r\n\t\t\t\t\tfor (adsCount = 1; adsCount <= 1; adsCount++) {\r\n\t\t\t\t\t\tscrollBy(0, 300);\r\n\t\t\t\t\t\tString varXpath = \"Topx Ads#xpath=//tbody[@id='list-table-body']//tr[@class='ad'][\" + adsCount + \"]\";\r\n\r\n\t\t\t\t\t\tscrollToElement(varXpath);\r\n\r\n\t\t\t\t\t\t// clickOn(varXpath);\r\n\t\t\t\t\t\twaitTime(1);\r\n\r\n\t\t\t\t\t\ttakeAdScreenshot(varXpath, \"Topx Ads\");\r\n\t\t\t\t\t\ttestStepPassed(\"Topx Ads displayed \" + adsCount);\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\twriteToLogFile(\"ERROR\", \"Exception: \" + e.toString());\r\n\t\t\t\t}\r\n\r\n\t\t\t}",
"protected abstract void internalLoadAd(InMobiNativeWrapper inMobiNativeWrapper);",
"boolean hasResponsiveSearchAdAssetRecommendation();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Builds the SQLite WHERE clause that matches all matchColumns to two different queries. | private static String buildTwoWordWhereClause(String[] matchColumns) {
StringBuilder sb = new StringBuilder(" (");
final int count = matchColumns.length;
for (int n = 0; n < count; n++) {
sb.append(matchColumns[n]);
sb.append(" like ? OR ");
sb.append(matchColumns[n]);
sb.append(" like ?");
if (n < count - 1) {
sb.append(" OR ");
}
}
sb.append(") AND enabled = 1");
return sb.toString();
} | [
"private static String buildSingleWordWhereClause(String[] matchColumns) {\n StringBuilder sb = new StringBuilder(\" (\");\n final int count = matchColumns.length;\n for (int n = 0; n < count; n++) {\n sb.append(matchColumns[n]);\n sb.append(\" like ? \");\n if (n < count - 1) {\n sb.append(\" OR \");\n }\n }\n sb.append(\") AND enabled = 1\");\n return sb.toString();\n }",
"public QueryBuilderResult buildQuery(com.magnet.mmx.protocol.UserQuery.SearchRequest matchQuery, String appId, PaginationInfo pinfo) {\n SearchAction.Operator operator = matchQuery.getOperator();\n if (operator == null) {\n operator = SearchAction.Operator.OR;\n }\n String sqlOperator = null;\n if (operator == SearchAction.Operator.OR) {\n sqlOperator = SPACE + OR + SPACE;\n } else {\n sqlOperator = SPACE + AND + SPACE;\n }\n boolean added = false;\n if (matchQuery.getTags() != null && !matchQuery.getTags().isEmpty()) {\n String fragment = processTags(matchQuery.getTags());\n if (added) {\n whereClauseBuilder.append(sqlOperator);\n whereClauseBuilder.append(\"(\").append(fragment).append(\")\");\n } else {\n added = true;\n whereClauseBuilder.append(fragment);\n }\n }\n if (matchQuery.getDisplayName() != null && !matchQuery.getDisplayName().isEmpty()) {\n SearchAction.Match match = matchQuery.getDisplayNameMatch();\n String fragment = processDisplayName(matchQuery.getDisplayName(), match);\n if (added) {\n whereClauseBuilder.append(sqlOperator);\n whereClauseBuilder.append(\"(\").append(fragment).append(\")\");\n } else {\n added = true;\n whereClauseBuilder.append(fragment);\n }\n }\n if (matchQuery.getEmail() != null && !matchQuery.getEmail().isEmpty()) {\n SearchAction.Match match = matchQuery.getEmailMatch();\n String fragment = processEmail(matchQuery.getEmail(), match);\n if (added) {\n whereClauseBuilder.append(sqlOperator);\n whereClauseBuilder.append(\"(\").append(fragment).append(\")\");\n } else {\n added = true;\n whereClauseBuilder.append(fragment);\n }\n }\n if (matchQuery.getPhone() != null) {\n SearchAction.Match phoneMatch = matchQuery.getPhoneMatch();\n String fragment = processPhone(matchQuery.getPhone(), phoneMatch);\n if (added) {\n whereClauseBuilder.append(sqlOperator);\n whereClauseBuilder.append(\"(\").append(fragment).append(\")\");\n } else {\n added = true;\n whereClauseBuilder.append(fragment);\n }\n }\n if (!added) {\n throw new ResolutionException(\"No criterion defined in the device query\");\n }\n\n String appIdFragment = processAppId(appId);\n\n String tableList = buildTableList();\n queryBuilder.append(SELECT)\n .append(SPACE)\n .append(DISTINCT)\n .append(SPACE)\n .append(BASE_TABLE_NAME).append(DOT)\n .append(STAR)\n .append(SPACE)\n .append(FROM)\n .append(SPACE)\n .append(tableList).append(SPACE)\n .append(WHERE)\n .append(SPACE)\n .append(OPEN_BRACKET)\n .append(whereClauseBuilder)\n .append(CLOSE_BRACKET)\n .append(SPACE)\n .append(AND)\n .append(SPACE)\n .append(OPEN_BRACKET)\n .append(appIdFragment)\n .append(CLOSE_BRACKET);\n\n if (pinfo != null) {\n String pagination = processPaginationFragment(pinfo);\n queryBuilder.append(SPACE).append(pagination);\n }\n\n countQueryBuilder.append(SELECT)\n .append(SPACE)\n .append(COUNT_FRAGMENT)\n .append(SPACE)\n .append(FROM)\n .append(SPACE)\n .append(tableList).append(SPACE)\n .append(WHERE)\n .append(SPACE);\n\n if (added) {\n countQueryBuilder.append(OPEN_BRACKET)\n .append(whereClauseBuilder)\n .append(CLOSE_BRACKET)\n .append(SPACE)\n .append(AND)\n .append(SPACE);\n }\n countQueryBuilder.append(OPEN_BRACKET)\n .append(appIdFragment)\n .append(CLOSE_BRACKET);\n\n return new QueryBuilderResult(queryBuilder.toString(), countQueryBuilder.toString(), paramList);\n }",
"public ResultSet findWhere(String table, List<String> extraSelect, List<Triple<String, String, String>> whereFields, List<String> additionalOrders) {\n try {\n String frepl = String.join(\" AND \", whereFields.stream().map(f -> f.getA() + \" \" + f.getB() + \" ?\").collect(Collectors.toList()));\n String exsel = extraSelect.isEmpty() ? \"\" : extraSelect.stream().map(s -> \", \" + s).reduce(\"\", (a, b) -> a + b);\n String addtl = String.join(\" \", additionalOrders);\n String query = \"SELECT * \" + exsel + \" FROM \" + table + (!whereFields.isEmpty() ? \" WHERE \" + frepl : \"\") + \" \" + addtl;\n PreparedStatement stmt = conn.prepareStatement(query);\n for (int i = 1; i <= whereFields.size(); ++i) {\n Triple<String, String, String> t = whereFields.get(i - 1);\n stmt.setString(i, t.getC());\n }\n return stmt.executeQuery();\n } catch (Exception e) {}\n return null;\n }",
"public static String mergeSQLWhereClauses(String... clauses) {\n String result = \"\";\n boolean first = true;\n\n for (String clause : clauses) {\n if (clause != null) {\n result += (first ? \" WHERE \" : \" AND \") + clause;\n first = false;\n }\n }\n return result;\n\n }",
"private String createWhereClause(){\n\n int source = getIntValue(SOURCE, RuleTable.RuleType.DEFAULT);\n int state = getIntValue(SUGGESTED_STATE, RuleTable.SuggState.INVALID);\n int enabled = getIntValue(ENABLED, -1);\n\n StringBuilder sb = new StringBuilder();\n sb.append(RuleTable.Columns.KEY + LIKE + Q + get(KEY) + LIKE_WILD + Q);\n\n if(source != RuleTable.RuleType.DEFAULT){\n sb.append(AND + RuleTable.Columns.SOURCE + EQUALS + Q + source + Q);\n }\n\n if(state != RuleTable.SuggState.INVALID){\n sb.append(AND + RuleTable.Columns.SUGGESTED_STATE + EQUALS + Q + state + Q);\n }\n\n if(enabled != -1){\n sb.append(AND + RuleTable.Columns.ENABLED + EQUALS + Q + enabled + Q);\n }\n\n if(LOG_DEBUG) Log.d(TAG, \"deleteSmartRule where clause= \" + sb.toString());\n\n return sb.toString();\n }",
"private String getIdentiesWhereQuery(ColumnData[] columns, String[] values) {\n\n IdentityData[] identityData = findIdentityData(columns, values);\n\n if (identityData.length == 0) {\n return \"\";\n }\n\n String q = \"\";\n for (int i = 0; i < identityData.length; i++) {\n\n String c = identityData[i].column;\n String v = escapeForSql(identityData[i].value);\n\n if (databaseType == 1) {\n q += \"(`\" + c + \"`='\" + v + \"')\";\n } else if (databaseType == 2) {\n q += \"([\" + c + \"]='\" + v + \"')\";\n }\n\n if (i < identityData.length - 1) {\n q += \" AND \";\n }\n\n }\n\n return q;\n }",
"protected String asParameterisedWhereClause(List<String> listOfColumns, List<Object> listOfValues) {\n\t\t\n\t\tint numColumns = listOfColumns.size();\n\t\tint numValues = listOfValues.size();\n\t\t\n\t\tif (numColumns != numValues) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\"listOfColumns (\"+listOfColumns.size()+\") does not have the \"\n\t\t\t\t+\"same size as listOfValues (\"+listOfValues.size()+\")!\"\n\t\t\t);\n\t\t}\t\t\n\t\t\n\t\tStringBuffer whereClause = new StringBuffer();\n\t\tfor(int i=0; i<numColumns; i++) {\n\t\t\t\n\t\t\t// Join the individual conditions with \"and\", but don't start the\n\t\t\t// where clause with an \"and\".\n\t\t\t//\n\t\t\tString joiner;\n\t\t\tif (i==0) {\n\t\t\t\tjoiner=\"\";\n\t\t\t} else {\n\t\t\t\tjoiner=\" and \";\n\t\t\t}\n\t\t\t\n\t\t\t// Tests for null values have to be done with \"is\" and not with\n\t\t\t// \"=?\". The latter would always evaluate to false.\n\t\t\t//\n\t\t\tif (listOfValues.get(i) == null) {\n\t\t\t\twhereClause.append(joiner + listOfColumns.get(i) + \" is ?\");\n\t\t\t} else {\n\t\t\t\twhereClause.append(joiner + listOfColumns.get(i) + \"=?\");\n\t\t\t}\t\t\t\n\t\t}\n\t\treturn whereClause.toString();\n\t}",
"private static void generateEquals(String[] columns, final StringBuilder sqlBuilder, Object[] parameters)\n\t{\n\t\tint len = columns.length;\n\t\tfor (int i = 0; i < len; i++)\n\t\t{\n\t\t\tif (parameters[i] == null || \"\".equals(parameters[i]))\n\t\t\t{\n\t\t\t\tsqlBuilder.append(SQL_AND).append(\"('1'=? OR \").append(columns[i]).append(\"='' OR \").append(columns[i]).append(\" IS NULL)\");\n\t\t\t\tparameters[i] = \"\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsqlBuilder.append(SQL_AND).append(columns[i]).append(\"=?\");\n\t\t\t}\n\t\t}\n\t}",
"private static Object[] generateSqlWhere(String[] pkColumns, String[] ukColumns, Object[] pkParameters,\n\t\t\tObject[] ukParameters, final StringBuilder sqlBuilder)\n\t{\n\t\t//Precondition: Either ukParameters or pkParameters is not empty at least. \n\t\tObject[] parameters = null;\n\t\t//If domain model only has PK.\n\t\tif (ukParameters == null)\n\t\t{\n\t\t\tparameters = pkParameters;\n\t\t\t//Generate union SQL where clause\n\t\t\tgenerateEquals(pkColumns, sqlBuilder, parameters);\n\t\t}\t\t\n\t\t//If domain model only has UK.\n\t\telse if (pkParameters == null)\n\t\t{\n\t\t\tparameters = ukParameters;\n\t\t\t//Generate union SQL where clause\n\t\t\tgenerateEquals(ukColumns, sqlBuilder, parameters);\t\t\t\t\n\t\t}\n\t\t//If domain model have both UK and PK.\n\t\telse \n\t\t{\n\t\t\tString selectPart = sqlBuilder.toString();\n\t\t\t//Generate SQL where clause for PK\n\t\t\tgenerateEquals(pkColumns, sqlBuilder, pkParameters);\n\t\t\tsqlBuilder.append(\" UNION ALL \").append(selectPart);\n\t\t\t//Generate union SQL where clause for UK\n\t\t\t//For example, \n\t\t\t// select * from R3APPTYP where PK \n\t\t\t// UNION\n\t\t\t// select * from R3APPTYP where UK \n\t\t\tgenerateEquals(ukColumns, sqlBuilder, ukParameters);\t\t\t\n\t\t\tparameters = new Object[pkParameters.length + ukParameters.length];\n\t\t\tSystem.arraycopy(pkParameters, 0, parameters, 0, pkParameters.length);\n\t\t\tSystem.arraycopy(ukParameters, 0, parameters, pkParameters.length, ukParameters.length);\n\t\t}\n\t\treturn parameters;\n\t}",
"private String conditionFormator3(String table, List<String> columns, String[] values) {\n\t\tString str = \"\";\n\t\tList<String> cols = getColumns(table);\n\t\tboolean[] typs = getTypes(table);\n\t\tfor (int i = 0; i < columns.size(); i++) {\n\t\t\tif (typs[cols.indexOf(columns.get(i))]) {\n\t\t\t\tstr += (values[i]);\n\t\t\t} else {\n\t\t\t\tstr += (\"'\" + values[i] + \"'\");\n\t\t\t}\n\t\t\tstr += \" AND \";\n\t\t}\n\t\treturn str.substring(0, str.length() - 4);\n\t}",
"String genWhereConditionsFromFilters(TableFields tableFields, String filters);",
"default String constructSearchQuery(Map<String, String[]> parameters) {\n StringBuilder query = new StringBuilder(\"SELECT * FROM film WHERE \");\n if (parameters.containsKey(\"min-duration\")) {\n query.append(\"duration >= \").append(parameters.get(\"min-duration\")[0]).append(\" AND \");\n } else {\n query.append(\"TRUE AND \");\n }\n if (parameters.containsKey(\"max-duration\")) {\n query.append(\"duration <= \").append(parameters.get(\"max-duration\")[0]).append(\" AND \");\n } else {\n query.append(\"TRUE AND \");\n }\n if (parameters.containsKey(\"min-year\")) {\n query.append(\"release_year >= \").append(parameters.get(\"min-year\")[0]).append(\" AND \");\n } else {\n query.append(\"TRUE AND \");\n }\n if (parameters.containsKey(\"max-year\")) {\n query.append(\"release_year <= \").append(parameters.get(\"max-year\")[0]).append(\" AND \");\n } else {\n query.append(\"TRUE AND \");\n }\n if (parameters.containsKey(\"genre\")) {\n for (String genre : parameters.get(\"genre\")) {\n query\n .append(\"idfilm IN (SELECT idfilm FROM film_genre WHERE genrename = '\")\n .append(genre).append(\"') AND \");\n }\n } else {\n query.append(\"TRUE AND \");\n }\n if (parameters.containsKey(\"director\")) {\n query.append(\"iddirector IN (SELECT iddirector FROM director WHERE \");\n for (String director : parameters.get(\"director\")) {\n query.append(\"name = '\").append(director).append(\"' OR \");\n }\n query.append(\"FALSE ) AND \");\n }\n query.append(\"TRUE ORDER BY idfilm \");\n return query.toString();\n }",
"protected abstract void doAddWhereClause(List<QueryClause> conditionList, ColumnRealName columnRealName, ConditionValue cvalue,\n ColumnFunctionCipher cipher, ConditionOption option);",
"public String whereClause() {\n Map<String, ArrayList<String>> map = filter.getFilterArray();\n String query = \"\";\n if (map.size() != 0) {\n query += \"WHERE \";\n if (map.containsKey(\"dateRange\")) {\n String[] two = map.get(\"dateRange\").get(0).split(\"\\\\+\");\n query += \"ImpressionDate between '\" + two[0] + \" 00:00:00' and '\" + two[1] + \" 23:59:00'\";\n }\n if (map.containsKey(\"gender\")) {\n if (!query.endsWith(\"WHERE \")) {\n query += \" AND \";\n }\n if (map.get(\"gender\").size() == 1) {\n query += \"Gender = '\" + map.get(\"gender\").get(0) + \"'\";\n }\n if (map.get(\"gender\").size() != 1) {\n query += \"(\";\n query += \"Gender = '\" + map.get(\"gender\").get(0) + \"'\";\n\n for (int i = 0; i < map.get(\"gender\").size(); i++) {\n if(i == 0)\n continue;\n else\n query += \" OR Gender = '\" + map.get(\"gender\").get(i) + \"'\";\n }\n query += \") \";\n }\n }\n\n if (map.containsKey(\"age\")) {\n if (!query.endsWith(\"WHERE \")) {\n query += \" AND \";\n }\n if (map.get(\"age\").size() == 1) {\n query += \"Age = '\" + map.get(\"age\").get(0) + \"'\";\n }\n if (map.get(\"age\").size() != 1) {\n query += \"(\";\n query += \"Age = '\" + map.get(\"age\").get(0) + \"'\";\n\n for (int i = 0; i < map.get(\"age\").size(); i++) {\n if(i == 0)\n continue;\n else\n query += \" OR Age = '\" + map.get(\"age\").get(i) + \"'\";\n }\n query += \") \";\n }\n }\n\n if (map.containsKey(\"income\")) {\n if (!query.endsWith(\"WHERE \")) {\n query += \" AND \";\n }\n if (map.get(\"income\").size() == 1) {\n query += \"Income = '\" + map.get(\"income\").get(0) + \"'\";\n }\n if (map.get(\"income\").size() > 1) {\n query += \"(\";\n query += \"Income = '\" + map.get(\"income\").get(0) + \"'\";\n\n for (int i = 0; i < map.get(\"income\").size(); i++) {\n if(i == 0)\n continue;\n else\n query += \" OR Income = '\" + map.get(\"income\").get(i) + \"'\";\n }\n query += \") \";\n }\n }\n if (map.containsKey(\"context\")) {\n if (!query.endsWith(\"WHERE \")) {\n query += \" AND \";\n }\n if (map.get(\"context\").size() == 1) {\n query += \"Context = '\" + map.get(\"context\").get(0) + \"'\";\n }\n if (map.get(\"context\").size() > 1) {\n query += \"(\";\n query += \"Context = '\" + map.get(\"context\").get(0) + \"'\";\n\n for (int i = 0; i < map.get(\"context\").size(); i++) {\n if(i == 0)\n continue;\n else\n query += \" OR Context = '\" + map.get(\"context\").get(i) + \"'\";\n }\n query += \") \";\n }\n }\n query += \";\";\n }\n return query;\n }",
"private String conditionFormator4(String table, List<String> columns, String[] values) {\n\t\tString str = \"\";\n\t\tList<String> cols = getColumns(table);\n\t\tboolean[] typs = getTypes(table);\n\t\tfor (int i = 0; i < columns.size(); i++) {\n\t\t\tif (typs[cols.indexOf(columns.get(i))]) {\n\t\t\t\tstr += (columns.get(i) + \"=\" + values[i]);\n\t\t\t} else {\n\t\t\t\tstr += (columns.get(i) + \"='\" + values[i] + \"'\");\n\t\t\t}\n\t\t\tstr += \" AND \";\n\t\t}\n\t\treturn str.substring(0, str.length() - 4);\n\t}",
"String buildSQLQuery(String table, String fields, String where, String order, String addition){\r\n\t\tif(fields == null)\r\n\t\t\tfields = \"*\";\r\n\r\n\t\tString sql = \"select \" + fields + \" from \" + table;\r\n\r\n\t\tif(where != null)\r\n\t\t\tsql = sql + \" where \" + where;\r\n\r\n\t\tif(order != null)\r\n\t\t\tsql = sql + \" order by \" + order;\r\n\t\t\r\n\t\tif(addition != null)\r\n\t\t\tsql = sql + \" \" + addition;\r\n\r\n\t\treturn sql;\r\n\t}",
"private String createWhere() {\n String where = \"\";\n if (getPeriodCode() != INTNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + PERIOD_CODE + \"=\" + getPeriodCode(\"\");\n } // if getPeriodCode\n if (getSequenceNumber() != INTNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + SEQUENCE_NUMBER + \"=\" + getSequenceNumber(\"\");\n } // if getSequenceNumber\n if (getNotes() != CHARNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + NOTES + \"='\" + getNotes() + \"'\";\n } // if getNotes\n if (dbg) System.out.println (\"<br>where = \" + where); // debug\n return (!where.equals(\"\") ? where : null);\n }",
"public String getWhereClause(MapSqlParameterSource parameters){\n String whereClause = \" where\";\n if(checkDate!=null){\n whereClause = whereClause + \" date=(:checkDate)\";\n parameters.addValue(\"checkDate\", new java.sql.Date(getCheckDate().getTime()));\n }else if (startDate!=null && endDate!=null){\n whereClause = whereClause + \" date between (:startDate) and (:endDate)\";\n parameters.addValue(\"startDate\", new java.sql.Date(getStartDate().getTime()));\n parameters.addValue(\"endDate\", new java.sql.Date(getEndDate().getTime()));\n }\n if (channels.length>0 && !\"-1\".equals(channels[0])) {\n whereClause = whereClause + \" AND channel in (:channels) \";\n parameters.addValue(\"channels\", Arrays.asList(channels));\n }\n if (zoneids.length>0 && !\"-1\".equals(zoneids[0])) {\n whereClause += \" AND zoneid in (:zoneids) \";\n parameters.addValue(\"zoneids\",Arrays.asList(zoneids));\n }\n if (\" where\".equals(whereClause)){\n return \"\";\n }\n else{\n return whereClause;\n }\n }",
"private Set<SearchResult> anyWordQuery(String[] matchColumns, int baseRank) {\n final String whereClause = buildTwoWordWhereClause(matchColumns);\n final String[] selection = buildAnyWordSelection(matchColumns.length * 2);\n\n return query(whereClause, selection, baseRank);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns current value of the signal | public float getSignalValue(int index); | [
"public double getSignal() {return _signal;}",
"public double getSignal() {\r\n return signals.lastEntry().getValue();\r\n }",
"public double getSignal(){\n\t\t\treturn SIGNAL; //a constant for olfactory\n\t\t}",
"void computeCurrentValue();",
"@Override\n public double getOutputCurrent() {\n return pdp.getCurrent(pdpChannel);\n }",
"public Double currentValue() {\n return this.currentValue;\n }",
"public double getCurrent() {\n\t\treturn (intakeSRX.getOutputCurrent() + this.intakeBottomSRX.getOutputCurrent());\n\t}",
"public jigl.signal.Signal getSignal() {\n\t\treturn jsignal;\n\t}",
"Object getSensorValue();",
"Signal getSignal();",
"public double[] getSignalValue(int i) {\n\t\treturn fxSignals.get(i).getValue();\n\t}",
"public double getValue()\n\t{\n\t\treturn ifD1.getValue();// X100 lux\n\t}",
"double getSignalPeriod();",
"public float getMaxSignal();",
"@Override\n\tpublic long getCurrentValue() {\n\t\treturn sequence.get();\n\t}",
"public double getCurrent() {\n return elevatorSpark.getOutputCurrent();\n }",
"public int getCurrentValue() {\n\t\treturn this.currentValue;\n\t}",
"public double getValue() {\n return ((double)slider.getValue())/scale;\n }",
"int getCurrentTempEvolutionValue();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Renders an "access denied" message and stops the execution of the script. The mode parameters controls the layout of the message: ACCESS_DENY_OBJECT render the message when denying access to a specific object ACCESS_DENY_PAGE render a complete access denied page | public static void access_deny(int mode){
throw new ExitException(mode);
} | [
"public void denyAccess() {\r\n\t\tGraphene.waitAjax().until().element(approveAccessButton).is().present();\r\n\t\tdenyAccessButton.click();\r\n\t}",
"@GetMapping(\"/access-denied\")\n\tpublic String displayAccessDeniedPage() {\n\t\treturn \"error/access-denied\";\n\t}",
"public void setDenied() {\r\n\t\tstatus = \"Denied\";\r\n\t}",
"protected String handleRejection(ActionInvocation invocation,\n HttpServletResponse response)\n throws Exception {\n\n// response.sendError(HttpServletResponse.SC_FORBIDDEN);\n return \"invalidAdminAccess\";\n }",
"public void disableChat(Reason denycode);",
"public void disableChat(Reason denyReason);",
"private void denyAccess(){\n\t\ttry {\n\t\t\tResourceRequestLocalServiceUtil.updateStatus(resourceRequestId, false);\n\t\t} catch (NoSuchResourceRequestException e) {\n\t\t\tResourceUtility.printErrorMessage(\"Response Bean\");\n\t\t\te.printStackTrace();\n\t\t} catch (PortalException e) {\n\t\t\tResourceUtility.printErrorMessage(\"Response Bean\");\n\t\t\te.printStackTrace();\n\t\t} catch (SystemException e) {\n\t\t\tResourceUtility.printErrorMessage(\"Response Bean\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n\tpublic boolean isDenied();",
"public static String noPermission() {\n return colorFormat(\"&cJe hebt geen permissie om dit te doen.\");\n }",
"@RequestMapping(\"/access-denied\")\n public String error(Model model) {\n model.addAttribute(\"url\", \"/\");\n model.addAttribute(\"exception\",\n new SpringException(\"Access Denied - You do not have access to this resource.\"));\n return \"security/error-page\";\n }",
"public String formNotAllowed()\r\n {\r\n return formError(\"403 Access Denied\",\"Access is not allowed\");\r\n }",
"NoResultAction changeCurrentMode(Mode mode) {\n return new AllowAction(getModeUsage().changeCurrentMode(mode));\n }",
"@RequestMapping(value = { \"/denied\" }, method = RequestMethod.GET)\n\tpublic String accessDenied() {\n\t\t//logger.debug(\"User entered home page\");\n\t\treturn \"denied\";\n\t}",
"protected void sendNoPermMessage() {\n\t\t// ChatComponent\n\t\tPlayer player = getPlayer();\n\t\tArrayList<String> messages = new ArrayList<>();\n\t\tplayer.sendMessage(ChatColor.GREEN + \"[MultiUse] \" + ChatColor.YELLOW\n\t\t\t\t+ \"You do not have permission to use this command.\");\n\t}",
"PermissionRequest onDenied(Action<List<String>> denied);",
"private void sendForbidden(HttpServletResponse response)\n {\n try\n {\n response.sendError(HttpServletResponse.SC_FORBIDDEN);\n }\n catch (IllegalStateException | IOException exc)\n {\n // Don't care.\n }\n }",
"private void sendSecurityProblems(HttpRequest request,\n\t\t\tHttpResponse response, L2pSecurityException e) {\n\t\tresponse.clearContent();\n\t\tresponse.setStatus( HttpResponse.STATUS_FORBIDDEN );\n\t\tresponse.setContentType( \"text/plain\" );\n\t\tresponse.println ( \"You don't have access to the method you requested\" );\n\t\tconnector.logError(\"Security exception in invocation request \" + request.getPath());\n\t\t\n\t\tif ( System.getProperty(\"http-connector.printSecException\") != null\n\t\t\t\t&& System.getProperty( \"http-connector.printSecException\").equals ( \"true\" ) )\n\t\t\te.printStackTrace();\n\t}",
"@RequestMapping(value = \"/denied\", method = RequestMethod.GET)\r\n\tpublic String getDeniedPage() {\r\n\t\treturn \"403\";\r\n\t}",
"@Override\n protected void onError(\n HttpServletRequest req, HttpServletResponse resp, AuthorizationCodeResponseUrl errorResponse)\n throws ServletException, IOException {\n resp.getWriter().print(\"<p>You Denied Authorization.</p>\");\n resp.setStatus(200);\n resp.addHeader(\"Content-Type\", \"text/html\");\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Ataca con un decepticon a un accionable cualquiera. Parametros: tablero: tablero del juego. atacante: decepticon que ataca. atacado: accionable que es atacado. potencia: potencia del atacante. | public void atacar(Tablero tablero, Decepticon atacante, Accionable atacado,Potencia potencia); | [
"public void atacar(Tablero tablero, Autobot atacante, Accionable atacado, Potencia potencia);",
"public void reabrirContrato() {\n int i;\n if (hospedesCadastrados.isEmpty()) {\n System.err.println(\"Nao existe hospedes cadastrados\\n\");\n } else {\n listarHospedes();\n int cpf = verifica();\n for (i = 0; i < hospedesCadastrados.size(); i++) {\n if (hospedesCadastrados.get(i).getCpf() == cpf) {//hospede\n if (hospedesCadastrados.get(i).getContrato().isSituacao()) {//verifica se o contrato já estpa aberto\n System.err.println(\"O contrado desse hospede já encontra-se aberto\");\n\n } else {//caso o contrato encontre-se fechado\n hospedesCadastrados.get(i).getContrato().setSituacao(true);\n System.err.println(\"Contrato reaberto, agora voce pode reusufruir de nossos servicos!\");\n }\n }\n }\n }\n }",
"public UbicadorDeRecolectables(int alto, int ancho) {\n\t\tthis.altoTablero = alto;\n\t\tthis.anchoTablero = ancho;\n\t}",
"public void iniciarTabuleiro(JogoTrilha tabuleiro){\n String corInicial = \"vazia\";\n \n for(int i = 0; i < nomeCasa.size(); i++){\n casas.put(nomeCasa.get(i), new Casa(nomeCasa.get(i)));\n casas.get(nomeCasa.get(i)).setCor(corInicial);\n } \n }",
"public void cargarTablaFiltro(JTable table, int tipo, String restriccion) {\n\t\t\n\t\tString filtro = restriccion + \"-\" + tipo; \n\t\tList<CocheTaller> coches = mecanicoController.filtrarCocheTaller(filtro);\n\t\tString[] columnNames = {\"Marticula\", \"Marca\", \"Modelo\", \"DNI Cliente\", \"Mecanico\", \"Coste\", \"Estado\"};\n\t\t\n\t\tif (!coches.isEmpty()) {\n\t\t\t DefaultTableModel model = new DefaultTableModel();\n\t\t\t table.setModel(model);\n\t\t\t model.setColumnIdentifiers(columnNames);\n\t\t\t \n\t\t\t for (CocheTaller c : coches) {\n\t\t\t\t Object[] o = new Object[7];\n\t\t\t\t o[0] = c.getMatricula();\n\t\t\t\t o[1] = c.getMarca();\n\t\t\t\t o[2] = c.getModelo();\n\t\t\t\t o[3] = c.getDniCliente();\n\t\t\t\t o[4] = c.getMecanico();\n\t\t\t\t o[5] = c.getCoste() + \"€\";\n\t\t\t\t o[6] = mecanicoController.traducirEstado(c.getEstado());\n\t\t\t\t model.addRow(o);\n\t\t\t\t }\n\t\t} else {\n\t\t\tlogger.error(\"No se dispone ningun vehiculo con ese filtrado.\");\n\t\t}\n\t}",
"public void attaccoVinto(){\n if(territorioAttaccato == null) return;\n TerritorioPlancia tpla = planciadigioco.getTerritorio(territorioAttaccato);\n tpla.setProprietario(giocTurno);\n listagiocatori.get(giocTurno).addTerr(territorioAttaccato);\n listagiocatori.get(giocattaccato).remTerr(territorioAttaccato);\n }",
"private void verificaUnicitaAccertamento() {\n\t\t\n\t\t//chiamo il servizio ricerca accertamento per chiave\n\t\tRicercaAccertamentoPerChiave request = model.creaRequestRicercaAccertamento();\n\t\tRicercaAccertamentoPerChiaveResponse response = movimentoGestioneService.ricercaAccertamentoPerChiave(request);\n\t\tlogServiceResponse(response);\n\t\t// Controllo gli errori\n\t\tif(response.hasErrori()) {\n\t\t\t//si sono verificati degli errori: esco.\n\t\t\taddErrori(response);\n\t\t} else {\n\t\t\t//non si sono verificatui errori, ma devo comunque controllare di aver trovato un accertamento su db\n\t\t\tcheckCondition(response.getAccertamento() != null, ErroreCore.ENTITA_NON_TROVATA.getErrore(\"Movimento Anno e numero\", \"L'impegno indicato\"));\n\t\t\tmodel.setAccertamento(response.getAccertamento());\n\t\t}\n\t}",
"public static Accion estado(int estado, char character){\r\n\t\tswitch(estado){\r\n\t\tcase 0:\r\n\t\t\tif(character == ' ' || character == '\t' || character == '\\b' || character == '\\t' || character == '\\n'){ //Espacio o tabulador\r\n\t\t\t\treturn new Accion(0,0); //Leemos y vamos al estado 0\r\n\t\t\t}\r\n\t\t\tif(Character.toString(character).matches(\"[a-zA-Z]\")){//Cualquier letra (id o Palres) \r\n\t\t\t\treturn new Accion(2,1); //Leemos y concatenamos y vamos al estado 11\r\n\t\t\t}\r\n\t\t\tif(Character.toString(character).matches(\"[0-9]\")){//Numeros\r\n\t\t\t\treturn new Accion(2,2); //Leemos y concatenamos y vamos al estado 9\r\n\t\t\t}\r\n\t\t\tif (character == '{' || character == '}' || character == '(' ||\r\n\t\t\t\t\tcharacter == ')' ||character == ';' || character == ',') {\r\n\t\t\t\treturn new Accion(1,3);\r\n\t\t\t}\r\n\t\t\tif (character == '/') {\r\n\t\t\t\treturn new Accion(0,4);\r\n\t\t\t}\r\n\t\t\tif (character == '+') {\r\n\t\t\t\treturn new Accion(0,7);\r\n\t\t\t}\r\n\t\t\tif (character == '!') {\r\n\t\t\t\treturn new Accion (0,12);\r\n\t\t\t}\r\n\t\t\tif (character == '=') {\r\n\t\t\t\treturn new Accion (1,11);\r\n\t\t\t}\r\n\t\t\tif (character == '\"') {\r\n\t\t\t\treturn new Accion (2,10);\r\n\t\t\t}\r\n\t\t\t//Si encontramos un caracter especial (retorno de carro) lo ignoramos\r\n\t\t\tif(character == '\\r'){\r\n\t\t\t\treturn new Accion(0,0); //Leemos y vamos al estado 0\r\n\t\t\t}\r\n\t\t\tif (character == '\\0') {\r\n\t\t\t\tescribirToken(\"EOF\", \" \",AnManager.contadorLineas);\r\n\t\t\t\t//return new Accion(0,0); \r\n\t\t\t}\r\n\t\t\t//El caracter no concuerda: Error\r\n\t\t\tErrores.escribirError(\"Analizador lexico\",\"No se reconoce el caracter ( \"+character+\" )\" , AnManager.contadorLineas );\r\n\t\t\treturn new Accion(0,0); //Leemos car�cter err�neo y continuamos\r\n\t\t\t\r\n\t\tcase 1:\r\n\t\t\tif(Character.toString(character).matches(\"[\\\\w\\\\d]\")){//Numeros y letras\r\n\t\t\t\treturn new Accion(2,1); //Leemos y concatenamos y vamos al estado 11\r\n\t\t\t}else{\r\n\t\t\t\treturn new Accion(3,0); //No leemos, comprobamos palRes/id y vamos al estado 0\r\n\t\t\t}\r\n\t\tcase 2:\r\n\t\t\tif(Character.toString(character).matches(\"[0-9]\")){//Numeros\r\n\t\t\t\treturn new Accion(2,2); //Leemos y concatenamos y vamos al estado 9\r\n\t\t\t}else{\r\n\t\t\t\treturn new Accion(1,16); //No Leemos y vamos al estado 0\r\n\t\t\t}\r\n\t\tcase 3:\r\n\t\t\tif (character == ';') {\r\n\t\t\t\tescribirToken(\"PuntoComa\", \" \",AnManager.contadorLineas);\r\n\t\t\t\treturn new Accion (0,0);\r\n\t\t\t}\r\n\t\t\tif (character == ',') {\r\n\t\t\t\tescribirToken(\"Coma\", \" \",AnManager.contadorLineas);\r\n\t\t\t\treturn new Accion (0,0);\r\n\t\t\t}\r\n\t\t\tif (character == '{') {\r\n\t\t\t\tescribirToken(\"al\", \" \",AnManager.contadorLineas);\r\n\t\t\t\treturn new Accion (0,0);\r\n\t\t\t}\r\n\t\t\tif (character == '}') {\r\n\t\t\t\tescribirToken(\"cl\", \" \",AnManager.contadorLineas);\r\n\t\t\t\treturn new Accion (0,0);\r\n\t\t\t}\r\n\t\t\tif (character == '(') {\r\n\t\t\t\tescribirToken(\"ap\", \" \",AnManager.contadorLineas);\r\n\t\t\t\treturn new Accion (0,0);\r\n\t\t\t}\r\n\t\t\tif (character == ')') {\r\n\t\t\t\tescribirToken(\"cp\", \" \",AnManager.contadorLineas);\r\n\t\t\t\treturn new Accion (0,0);\r\n\t\t\t}\r\n\t\tcase 4:\r\n\t\t\tif(character == '/'){//Fin comentario\r\n\t\t\t\treturn new Accion(1,5); //Leemos y vamos al estado 5. Ignoramos comentario\r\n\t\t\t}else{\r\n\t\t\t\treturn new Accion(1,6); //Leemos y vamos al estado 5\r\n\t\t\t}\r\n\t\tcase 5:\r\n\t\t\tif (character == '\\n') {\r\n//\t\t\t\tescribirToken(\"EOL\", \"\",AnManager.contadorLineas); //GenTokensalto de linea\r\n\t\t\t\treturn new Accion (0,0);\r\n\t\t\t}\r\n\t\t\t//escribirToken(\"DobleBarra\", \">\", AnManager.contadorLineas);\r\n\t\t\treturn new Accion(0,5);\r\n\t\tcase 6:\r\n\t\t\tescribirToken(\"div\", \" \", AnManager.contadorLineas);\r\n\t\t\treturn new Accion(1,0);\r\n\t\tcase 7:\r\n\t\t\tif (character == '+') {\r\n\t\t\t\treturn new Accion (1,9);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn new Accion (1,8);\r\n\t\t\t}\r\n\t\tcase 8:\r\n\t\t\tescribirToken(\"suma\", \" \", AnManager.contadorLineas);\r\n\t\t\treturn new Accion (1,0);\r\n\t\tcase 9:\r\n\t\t\tescribirToken(\"Preincremento\", \" \", AnManager.contadorLineas);\r\n\t\t\treturn new Accion (0,0);\r\n\t\tcase 10:\r\n\t\t\tif (character == '\"') {\r\n\t\t\t\treturn new Accion (5,0);\r\n\t\t\t\t//return new Accion (2,15);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn new Accion(2,10); \r\n\t\t\t}\r\n\t\tcase 11:\r\n\t\t\tescribirToken(\"igual\", \"\", AnManager.contadorLineas);\r\n\t\t\treturn new Accion(0,0);\r\n\t\tcase 12:\r\n\t\t\tif (character == '=') {\r\n\t\t\t\treturn new Accion(1,13);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn new Accion(1,14);\r\n\t\t\t}\r\n\t\tcase 13:\r\n\t\t\tescribirToken(\"distinto\", \"\", AnManager.contadorLineas);\r\n\t\t\treturn new Accion (0,0);\r\n\t\tcase 14:\r\n\t\t\tescribirToken(\"negacion\", \"\", AnManager.contadorLineas);\r\n\t\t\treturn new Accion (1,0);\r\n\t\tcase 15:\r\n\t\t\treturn new Accion (5,0);//Generar token cadena\r\n\t\tcase 16:\r\n\t\t\treturn new Accion (4,0);//Generar token numero\r\n\t\t\r\n\t\tdefault:\r\n\t\t\treturn new Accion (1,0);\r\n\t\t}\r\n\t}",
"public void abrirAdyacentes()\r\n {\r\n for(int i = 0; i < _Adyacentes.length ; i++)\r\n {\r\n if(_Adyacentes[i] != null)\r\n {\r\n if(_Adyacentes[i].isOculta())\r\n {\r\n _Adyacentes[i].abrir(); //abrirception!\r\n } \r\n } \r\n }\r\n }",
"public void comprobarEficaciaAccion() throws IOException{\n if((fVerif.SetVerificacionEficaciaAccion(FechaComprobacionEficacia, ObservacionesEficacia, ComprobacionSeleccionadaEficacia, AccionSeleccionada.getId()))== -1){\n FacesContext.getCurrentInstance().addMessage(\"form_seguimiento_accion:btn_comprobar_eficacia\", new FacesMessage(SEVERITY_FATAL, \"No se pudo comprobar eficacia\", \"No se pudo comprobar eficacia\" ));\n FacesContext.getCurrentInstance().renderResponse();\n }else{\n // regresar a la pagina listar acciones\n String url = FacesContext.getCurrentInstance().getExternalContext().getRequestContextPath();\n FacesContext.getCurrentInstance().getExternalContext().redirect(url+\"/Views/Acciones/General/SeguimientoAccion.xhtml?id=\"+AccionSeleccionada.getId());\n }\n }",
"public void ordenarTablero() {\n Pieza.setCantMovimientosSinCambios(0);\n setTurno(1);\n suspenderJuego = false;\n //Limpiar el tablero\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n tablero[x][y].setPieza(null);\n }\n }\n int color = -1;\n for (int i = 0; i <= 1; i++) {\n tablero[0][i * 7].setPieza(new Torre(color));\n tablero[1][i * 7].setPieza(new Caballo(color));\n tablero[2][i * 7].setPieza(new Alfil(color));\n tablero[3][i * 7].setPieza(new Reina(color));\n Rey rey = new Rey(color);\n setRey(rey, color);\n tablero[4][i * 7].setPieza(rey);\n tablero[5][i * 7].setPieza(new Alfil(color));\n tablero[6][i * 7].setPieza(new Caballo(color));\n tablero[7][i * 7].setPieza(new Torre(color));\n for (int j = 0; j < 8; j++) {\n tablero[j][i == 0 ? 1 : 6].setPieza(new Peon(color));\n }\n color *= -1;\n }\n rePintarTablero();\n if (turnoComputadora == getTurno()) {\n jugarMaquinaSola(getTurno());\n }\n }",
"public void coordinarAtaque(Autobot atacante, Accionable atacado, int rangoDeAtaque, int ataque) {\r\n\t\tCoordenada coordInic = this.obtenerCoordenadaDeElemento(atacante);\r\n\t\tCoordenada coordFinal = this.obtenerCoordenadaDeElemento(atacado);\r\n\t\tif(coordInic.distancia(coordFinal)>rangoDeAtaque)\r\n\t\t\tthrow new FueraDeRangoException();\r\n\t\tthis.observarA(atacado);\r\n\t\tatacado.serAtacado(atacante, ataque);\r\n\t\t\r\n\t}",
"public String clonar(Combatiente objetivo, String habilidad, int dueno) throws Exception{\n String saludo = \"\";\n try{\n String tipo = objetivo.getTipo();\n if(tipo.equals(\"dragon\")){\n Acompanante acompanante = new Jefe (tipo);\n combatientes.set(puestoDisponible(), acompanante); \n saludo = acompanante.saludar();\n acompanante.setEspecial(habilidad);\n acompanante.dueno = dueno;\n }\n else if(tipo.equals(\"mascota\")){\n Acompanante acompanante = new Mascota(tipo);\n combatientes.set(puestoDisponible(), acompanante); \n saludo = acompanante.saludar();\n acompanante.setEspecial(habilidad);\n acompanante.dueno = dueno;\n }\n else if(tipo.equals(\"valquiria\") || tipo.equals(\"brujo\")){\n Acompanante acompanante = new Enemigo(tipo);\n combatientes.set(puestoDisponible(), acompanante); \n saludo = acompanante.saludar(); \n acompanante.setEspecial(habilidad);\n acompanante.dueno = dueno;\n }\n else{\n saludo = \"false\"; //Si no se pudo clonar\n }\n \n } catch(Exception e){\n String s = \"Mundo.clonar: \" + e.getMessage() + \" TIENE QUE SELECCIONAR UN ENEMIGO O MASCOTA\";\n throw new Exception(s);\n }\n return saludo;\n }",
"public void llenarTabla() {\n\n String matriz[][] = new String[lPComunes.size()][2];\n\n for (int i = 0; i < AccesoFichero.lPComunes.size(); i++) {\n matriz[i][0] = AccesoFichero.lPComunes.get(i).getPalabra();\n matriz[i][1] = AccesoFichero.lPComunes.get(i).getCodigo();\n\n }\n\n jTableComun.setModel(new javax.swing.table.DefaultTableModel(\n matriz,\n new String[]{\n \"Palabra\", \"Morse\"\n }\n ) {// Bloquea que las columnas se puedan editar, haciendo doble click en ellas\n @SuppressWarnings(\"rawtypes\")\n Class[] columnTypes = new Class[]{\n String.class, String.class\n };\n\n @SuppressWarnings({\"unchecked\", \"rawtypes\"})\n @Override\n public Class getColumnClass(int columnIndex) {\n return columnTypes[columnIndex];\n }\n boolean[] columnEditables = new boolean[]{\n false, false\n };\n\n @Override\n public boolean isCellEditable(int row, int column) {\n return columnEditables[column];\n }\n });\n\n }",
"void Cadastro( char tipo, float preco, int cod, int qtdestoque, String nome, String autor, String editora, int anopub){\n\n /* Adiciona o novo Livro no vetor de produtos */\n produtos.add( new Livro( tipo, preco, cod, qtdestoque, nome, autor, editora, anopub));\n System.out.println(\"Sucesso Livro Adicionado\\n\");\n\n }",
"protected void escribirTabla(Document doc, PaginaTabla pagina,\n\t\t\tOutputStream baos) throws Exception {\n\t\tint numColumnas = getEncabezadosColumnas().size();\n\t\t/*\n\t\t * int numColumnasReales = numColumnas; if (columnasOcultas != null) {\n\t\t * numColumnasReales = numColumnas - columnasOcultas.length; }\n\t\t */\n\n\t\tPdfPTable datatable = null;\n\t\ttry {\n\t\t\t/** Definie estilos para la tabla */\n\n\t\t\tdatatable = new PdfPTable(numColumnas - 1);\n\t\t\t// Data texto = null;\n\t\t\tString texto = null;\n\t\t\tPhrase valorCelda;\n\t\t\t// datatable.setDefaultCellBorderWidth(2);\n\t\t\t// datatable.setBorder(0);\n\t\t\t// datatable.setBorderColor(Color.GRAY);\n\t\t\t// datatable.setWidth(100f);\n\t\t\t// datatable.setVerticalAlignment(Element.ALIGN_MIDDLE);\n\t\t\t// datatable.setSpaceInsideCell(2);\n\n\t\t\t/** Llenar datos en tabla */\n\t\t\tIterator iEncabezados = getEncabezadosColumnas().iterator();\n\t\t\tFont letraEncabezado = FontFactory.getFont(\n\t\t\t\t\tgetTipoLetraEncabezados(), getTamanoLetraEncabezados());\n\n\t\t\t// datatable.setHorizontalAlignment(Element.ALIGN_CENTER);\n\t\t\t// datatable.setLastHeaderRow(0);\n\t\t\tFont letra = FontFactory.getFont(getTipoLetra(), getTamanoLetra());\n\t\t\t/** Llena lo titulos de las columnas */\n\t\t\tList ocultas = new ArrayList();\n\t\t\tfor (int i = 0; i < numColumnas && iEncabezados.hasNext(); i++) {\n\t\t\t\tString valida = ((Data) iEncabezados.next()).getDisplayName();\n\t\t\t\tif (isOculta(valida)) {\n\t\t\t\t\ttexto = valida;\n\t\t\t\t\tocultas.add(new Integer(i));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\ttexto = valida;\n\t\t\t\tvalorCelda = new Phrase(texto, letraEncabezado);\n\t\t\t\t// encabezados.add(texto);\n\t\t\t\tPdfPCell celda = new PdfPCell(valorCelda);\n\t\t\t\tdatatable.addCell(celda);\n\t\t\t}// while encabezados\n\t\t\t// datatable.setLastHeaderRow(0);\n\t\t\t/** Llena las Celdas */\n\t\t\tList subFilas;\n\t\t\t/** Machetazo porque sublist no funciona bien con un solo elemento */\n\t\t\tif (pagina.getPosInicial() == pagina.getPosFinal()) {\n\t\t\t\tsubFilas = new ArrayList();\n\t\t\t\tsubFilas.add(getFilas().get(pagina.getPosInicial()));\n\t\t\t} else {\n\t\t\t\tsubFilas = getFilas().subList(pagina.getPosInicial(),\n\t\t\t\t\t\tpagina.getPosFinal() + 1); // Se le suma porque es\n\t\t\t\t// exclusivo al final,\n\t\t\t\t// entonces para que no bote\n\t\t\t\t// la última fila.\n\t\t\t}\n\t\t\tIterator iFilas = subFilas.iterator();\n\t\t\tboolean x = iFilas.hasNext();\n\t\t\twhile (iFilas.hasNext()) {\n\t\t\t\tObject o = iFilas.next();\n\t\t\t\tif (o instanceof Hashtable) {\n\t\t\t\t\tHashtable celdas = ((Hashtable) o);\n\t\t\t\t\t// Iterator namesColumns = celdas.keySet().iterator();\n//\t\t\t\t\tString[] columnNames = new String[] { \"dependenciaRemite\",\n//\t\t\t\t\t\t\t\"numRad\", \"descripcionAnexos\", \"dependenciaRecibe\",\n//\t\t\t\t\t\t\t\"fechaRad\", \"\" };\n\t\t\t\t\t//TODO. verificar las columnas para los tipos de comunicacion\n\t\t\t\t\tString[] columnNames = new String[] { \"Origen\",\n\t\t\t\t\t\t\t\"Radicado\", \"Anexos\", \"Destinatario\",\n\t\t\t\t\t\t\t\"FechaRadicado\", \"\" };\n\n\t\t\t\t\t\n\t\t\t\t\tfor (int i = 0; i < columnNames.length; i++) { // i <\n\t\t\t\t\t\t// numColumnas\n\t\t\t\t\t\t\n\t\t\t\t\t\tString valida = columnNames[i];\n\t\t\t\t\t\t//\n\t\t\t\t\t\tvalida= (i!=3)?valida:\"DependenciaDestino\";\n\t\t\t\t\t\tif (isOculta(valida)) {\n\t\t\t\t\t\t\ttexto = valida;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// + if (namesColumns.hasNext()) {\n\t\t\t\t\t\tif (valida.length() > 0) {\n\t\t\t\t\t\t\ttexto = valida;\n\t\t\t\t\t\t\tvalorCelda = null;\n\t\t\t\t\t\t\tif (celdas.get(texto) instanceof Date) {\n\t\t\t\t\t\t\t\tString fecha = ((Date) celdas.get(texto))\n\t\t\t\t\t\t\t\t\t\t.toGMTString();\n\t\t\t\t\t\t\t\tvalorCelda = new Phrase(fecha, letra);\n\t\t\t\t\t\t\t} else if (texto.length() > 0) {\n\t\t\t\t\t\t\t\tif (celdas.get(texto) != null)\n\t\t\t\t\t\t\t\t\tvalorCelda = new Phrase(celdas.get(texto)\n\t\t\t\t\t\t\t\t\t\t\t.toString(), letra);\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tvalorCelda = null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (valorCelda != null)\n\t\t\t\t\t\t\t\tdatatable.addCell(valorCelda);\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdatatable.addCell(\"\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}// for i\n\t\t\t}// while iFilas.hasNext()\n\t\t\tdoc.add(datatable);\n\t\t} catch (Exception e) {\n\t\t\tdatatable = null;\n\t\t\tthrow e;\n\t\t}\n\t}",
"public void dibujar_tableros_lado_a_lado(Tablero tableroRival) {\n\t\tfinal int SEPARACION_TABLEROS = 13,NUM_ESPACIOS, NUM_CASILLAS, NUM_BORDES, SEPARACION = 2, BORDE_x_CASILLA = 3, BORDE_x_ACIERTO = 2;\n\t\tListIterator<Comb_y_result> itTabl1, itTabl2; // Iterador para las combinaciones\n\t\tComb_y_result comb_y_resultado_tabl1, comb_y_resultado_tabl2;\n\n\t\titTabl1 = itTabl2 = null;\n\n\t\tNUM_CASILLAS = cifrado.tamanio();\n\t\tNUM_BORDES = SEPARACION + NUM_CASILLAS * BORDE_x_CASILLA;\n\t\tNUM_ESPACIOS = NUM_CASILLAS * BORDE_x_CASILLA + NUM_CASILLAS;\n\n\t\tif (comb_y_resultados.size() == 0 && cifrado.tamanio() > 0) {\n\t\t\tfor (int i = 0; i < NUM_BORDES / 2; i++) {\n\t\t\t\tSystem.out.printf(\" \");// Tantos _ como caracteres ocupe el ancho del tablero (cada casilla son tres _\n\t\t\t\t\t\t\t\t\t\t// y cada acierto dos, el borde izquierdo son otros dos y las separacion dos mas\n\t\t\t}\n\t\t\tSystem.out.print(\"IA 1\");\n\n\t\t\tfor (int i = 0; i < NUM_BORDES + NUM_ESPACIOS - 5; i++) {\n\t\t\t\tSystem.out.printf(\" \");// Tantos _ como caracteres ocupe el ancho del tablero (cada casilla son tres _\n\t\t\t\t\t\t\t\t\t\t// y cada acierto dos, el borde izquierdo son otros dos y las separacion dos mas\n\t\t\t}\n\t\t\tSystem.out.println(\"IA 2\");\n\n\t\t\tfor (int i = 0; i < NUM_BORDES; i++) {\n\t\t\t\tSystem.out.printf(\"_\");// Tantos _ como caracteres ocupe el ancho del tablero (cada casilla son tres _\n\t\t\t\t\t\t\t\t\t\t// y cada acierto dos, el borde izquierdo son otros dos y las separacion dos mas\n\t\t\t}\n\n\t\t\tfor (int i = 0; i < NUM_ESPACIOS; i++) {\n\t\t\t\tSystem.out.printf(\" \");// Tantos espacios lo que ocupa un tablero para la separación entre tableros\n\t\t\t}\n\n\t\t\tfor (int i = 0; i < NUM_BORDES; i++) {\n\t\t\t\tSystem.out.printf(\"_\");// Tantos _ como caracteres ocupe el ancho del tablero (cada casilla son tres _\n\t\t\t\t\t\t\t\t\t\t// y cada acierto dos, el borde izquierdo son otros dos y las separacion dos mas\n\t\t\t}\n\t\t\tSystem.out.println();\n\n\t\t\tcifrado.dibujar_elemento();\n\n\t\t\tSystem.out.printf(Color.ROJO.getCod_Color() + \"Cifrado\" + Color.RESETEAR.getCod_Color());\n\n\t\t\tfor (int i = 0; i < NUM_ESPACIOS - 9; i++) {\n\t\t\t\tSystem.out.printf(\" \");// Tantos espacios lo que ocupa un tablero para la separación entre tableros\n\t\t\t}\n\n\t\t\ttableroRival.getCifrado().dibujar_elemento();\n\t\t\tSystem.out.printf(Color.ROJO.getCod_Color() + \"Cifrado\" + Color.RESETEAR.getCod_Color());\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.printf(\"|\");\n\t\t\tfor (int i = 0; i < SEPARACION - 1 + NUM_CASILLAS * BORDE_x_CASILLA; i++) {\n\t\t\t\tSystem.out.printf(\"-\"); // Numero de espacios desde el borde izquierdo hasta la primera separación\n\t\t\t}\n\t\t\tSystem.out.printf(\"|\");\n\t\t\tfor (int i = 0; i < SEPARACION - 1 + NUM_CASILLAS * BORDE_x_ACIERTO; i++) {\n\t\t\t\tSystem.out.printf(\" \"); // Numero de espacios desde la separación hasta el borde derecho\n\t\t\t}\n\t\t\tSystem.out.printf(\"|\");\n\n\t\t\tfor (int i = 0; i < SEPARACION_TABLEROS ; i++) {\n\t\t\t\tSystem.out.printf(\" \");// Tantos espacios lo que ocupa un tablero para la separación entre tableros\n\t\t\t}\n\n\t\t\tSystem.out.printf(\"|\");\n\t\t\tfor (int i = 0; i < SEPARACION - 1 + NUM_CASILLAS * BORDE_x_CASILLA; i++) {\n\t\t\t\tSystem.out.printf(\"-\"); // Numero de espacios desde el borde izquierdo hasta la primera separación\n\t\t\t}\n\t\t\tSystem.out.printf(\"|\");\n\t\t\tfor (int i = 0; i < SEPARACION - 1 + NUM_CASILLAS * BORDE_x_ACIERTO; i++) {\n\t\t\t\tSystem.out.printf(\" \"); // Numero de espacios desde la separación hasta el borde derecho\n\t\t\t}\n\t\t\tSystem.out.printf(\"|\");\n\t\t\t\n\t\t\tSystem.out.println();\n\n\t\t} else {\n\t\t\titTabl1 = comb_y_resultados.listIterator(comb_y_resultados.size() - 1);\n\t\t\titTabl2 = tableroRival.getComb_y_result().listIterator(comb_y_resultados.size() - 1);\n\t\t\t\n\t\t\tif (itTabl1.hasNext() && itTabl2.hasNext()) {\n\t\t\t\t\n\t\t\t\tcomb_y_resultado_tabl1 = itTabl1.next();\n\t\t\t\tcomb_y_resultado_tabl2 = itTabl2.next();\n\t\t\t\t\n\t\t\t\t// Dibuja las combinaciones\n\t\t\t\tcomb_y_resultado_tabl1.dibujar_elemento();\n\t\t\t\tfor (int i = 0; i < SEPARACION_TABLEROS ; i++) {\n\t\t\t\t\tSystem.out.printf(\" \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcomb_y_resultado_tabl2.dibujar_elemento();\n\t\t\t\tSystem.out.printf(\"Nº\" + (itTabl1.nextIndex()));\n\t\t\t\tSystem.out.println();\n\n\t\t\t\t// Dibuja una linea con la estructura del tablero pero sin una combinación, para\n\t\t\t\t// separar combinaciones\n\t\t\t\t//Para el tablero 1\n\t\t\t\tSystem.out.printf(\"|\");\n\t\t\t\tfor (int i = 0; i < SEPARACION - 1 + NUM_CASILLAS * BORDE_x_CASILLA; i++) {\n\t\t\t\t\tSystem.out.printf(\" \"); // Numero de espacios desde el borde izquierdo hasta la primera separación\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"|\");\n\t\t\t\tfor (int i = 0; i < SEPARACION - 1 + NUM_CASILLAS * BORDE_x_ACIERTO; i++) {\n\t\t\t\t\tSystem.out.printf(\" \"); // Numero de espacios desde la separación hasta el borde derecho\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"|\");\n\n\t\t\t\tfor (int i = 0; i < SEPARACION_TABLEROS ; i++) {\n\t\t\t\t\tSystem.out.printf(\" \");// Tantos espacios lo que ocupa un tablero para la separación entre tableros\n\t\t\t\t}\n\n\t\t\t\tSystem.out.printf(\"|\");\n\t\t\t\tfor (int i = 0; i < SEPARACION - 1 + NUM_CASILLAS * BORDE_x_CASILLA; i++) {\n\t\t\t\t\tSystem.out.printf(\" \"); // Numero de espacios desde el borde izquierdo hasta la primera separación\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"|\");\n\t\t\t\tfor (int i = 0; i < SEPARACION - 1 + NUM_CASILLAS * BORDE_x_ACIERTO; i++) {\n\t\t\t\t\tSystem.out.printf(\" \"); // Numero de espacios desde la separación hasta el borde derecho\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"|\");\n\t\t\t\t\n\t\t\t\tSystem.out.println();\n\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t}",
"public int crearPropiedadCasa(int CantidadDormitorios, int CantidadBanios, String DireccionPropiedad, float PrecioPropiedad,\r\n float MetrosConstruidosPropiedad, float MetrosTerrenoPropiedad, int NumeroPadronPropiedad, List<Integer> Caracteristicas,\r\n boolean EnAlquiler, boolean EnVenta, int IdUsuario){\r\n Propiedad propiedad = new Inmueble(EnumTipoInmueble.Casa,CantidadDormitorios, CantidadBanios, DireccionPropiedad,\r\n PrecioPropiedad, MetrosConstruidosPropiedad, MetrosTerrenoPropiedad, NumeroPadronPropiedad,\r\n EnumEstadoPropiedad.Privada, cCar.ListarCaracteristicas(Caracteristicas), EnAlquiler, EnVenta);\r\n try{\r\n Usuario usr = cUsr.GetUsuario(IdUsuario);\r\n propiedad.setUsuarioPropiedad(usr);\r\n return mProp.CrearPropiedad(propiedad);\r\n }catch(NullPointerException ex){}\r\n return -1;\r\n }",
"public void asignarAdyacentes(Casillas[][] tablero)\r\n {\r\n // para recorrer cada una de las casillas adyacentes\r\n // revisamos las casillas que estan una posicion a la izquierda (-1)\r\n // hasta la que esta a la derecha(+1)\r\n int cont = 0; // para saber en que posicion estamos del vector adyacentes\r\n int limite_posx = tablero[_PosY].length; // maximo numero de columnas\r\n int limite_posy = tablero.length;// maximo numero de fila\r\n for(int i = -1; i <= 1;i++) //loop desde la izquierda hasta la derecha\r\n {\r\n for(int j = -1; j <= 1; j++)\r\n {\r\n if(i == 0 && j == 0) // en el caso de que estemos en la casilla\r\n { // del medio, la descontamos porque no la queremos\r\n cont--; // en el vector de adyacentes\r\n }\r\n else\r\n { // validamos que este dentro de los limites de la matriz\r\n if(_PosY + i >= 0 && _PosX + j >= 0 && _PosY + i < limite_posy && _PosX + j < limite_posx)\r\n // si esta, asignamos\r\n _Adyacentes[cont] = tablero[_PosY + i][_PosX + j];\r\n else // si no esta, es null\r\n _Adyacentes[cont] = null;\r\n }\r\n cont++;\r\n }\r\n }\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Invokes a httpmethod and takes care of some error handling. | private void invokeTheMethod(HttpMethodBase method, HttpClient httpClient) throws Exception {
log.debug("method=" + method.getURI());
//create the connection manager and add it to the client
HttpConnectionManager man = new SimpleHttpConnectionManager();
man.setParams(new HttpConnectionParam());
httpClient.setHttpConnectionManager(man);
log.trace("Outgoing request headers: " + Arrays.toString(method.getRequestHeaders()));
//make the call
int statusCode = httpClient.executeMethod(method);
if (statusCode != HttpStatus.SC_OK) {
log.error(method.getStatusLine());
//if its unavailable then throw updateCSWRecords connection exception
if (statusCode == HttpStatus.SC_SERVICE_UNAVAILABLE)
throw new ConnectException();
//if the response is not OK then throw an error
throw new Exception("Returned status line: " + method.getStatusLine());
}
} | [
"public static HttpResponseMessage executeHttpMethod(HttpMethod method) {\n\n HttpResponseMessage responseMessage = null;\n\n try {\n System.out.println(\"Method invocation on URI: \\n\");\n System.out.println(method.getURI().toString());\n // Execute Request\n LowLevelRestApi.httpClient.executeMethod(method);\n responseMessage = LowLevelRestApi.extractResponseInformation(method);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n\n // Release Connection anyway\n method.releaseConnection();\n }\n\n // Extract response information and return\n return responseMessage;\n }",
"Response invokeService(Request request) throws Throwable;",
"private <T> void executeThroughOkHttp(final ApiMethod<T> method, final ApiCallback<T> callback, final Handler handler) {\n OkHttpClient client = getOkHttpClient();\n String jsonRequest = method.toJsonString();\n\n if (LOG_REQUESTS) LogUtils.LOGD(TAG, \"HTTP request: \" + jsonRequest);\n\n try {\n Request request = new Request.Builder()\n .url(hostInfo.getJsonRpcHttpEndpoint())\n .post(RequestBody.create(jsonRequest, MEDIA_TYPE_JSON))\n .build();\n Response response = sendOkHttpRequest(client, request);\n final T result = method.resultFromJson(parseJsonResponse(handleOkHttpResponse(response)));\n\n if (callback != null) {\n postOrRunNow(handler, () -> callback.onSuccess(result));\n }\n } catch (final ApiException e) {\n // Got an error, call error handler\n if (callback != null) {\n postOrRunNow(handler, () -> callback.onError(e.getCode(), e.getMessage()));\n }\n } catch (final IllegalArgumentException e) {\n LogUtils.LOGD(TAG, \"Illegal argument exception on sending HTTP request: \" + e);\n // This happens because the host URL isn't valid\n if (callback != null) {\n String desc = \"Illegal argument exception on sending HTTP request: \" + e.getMessage() +\n \". Please check the media center URL.\";\n postOrRunNow(handler, () -> callback.onError(ApiException.HTTP_HOST_URL_INVALID, desc));\n }\n }\n }",
"HttpMethod httpMethod();",
"public static int executeHTTPMethod(HttpMethod method, URL targetURL, String username,\n String password) throws IOException {\n\n MultiThreadedHttpConnectionManager connectionManager =\n new MultiThreadedHttpConnectionManager();\n HttpClient httpClient = new HttpClient(connectionManager);\n // We should not use method.setURI and set the complete URI here.\n // If we do so commons-httpclient will not use our custom socket factory.\n // Hence we set the path and query separatly\n method.setPath(targetURL.getPath());\n method.setQueryString(targetURL.getQuery());\n method.setRequestHeader(\"Host\", targetURL.getHost());\n method.getParams().setCookiePolicy(CookiePolicy.IGNORE_COOKIES);\n\n // If a username and a password is provided we support basic auth\n if ((username != null) && (password != null)) {\n Credentials creds = new UsernamePasswordCredentials(username, password);\n int port = targetURL.getPort();\n httpClient.getState()\n .setCredentials(new AuthScope(targetURL.getHost(), port), creds);\n }\n\n return httpClient.executeMethod(method);\n }",
"public void setMethod(HTTPMethod method);",
"@Api(1.1)\n public Response execute() throws HaloNetException {\n return mBuilder.mClient.request(mRequest);\n }",
"public Response execute() throws VkApiException {\n Map<String, String> stringParams = getVkApiParamsConverter().toStringParams(getParams());\n log.debug(\"Sending: method={}, url={}, params={}\", getMethod(), getUrl(), stringParams);\n\n HttpClient vkApiHttpClient = getVkApiHttpClient();\n vkApiHttpClient.setMethod(getMethod());\n vkApiHttpClient.setUrl(getUrl());\n vkApiHttpClient.setParams(stringParams);\n\n try {\n String body = vkApiHttpClient.execute();\n log.debug(\"Received: {}\", body);\n\n if (getVkApiResponseValidator().isValid(body)) {\n return getJsonConverter().convert(body, getResponseType());\n }\n\n throw new VkApiResponseException(body);\n } catch (IOException e) {\n throw new VkApiException(e);\n }\n }",
"@Test\n public void getMethod() throws BonitaException, InterruptedException {\n stubFor(get(urlEqualTo(\"/\"))\n .willReturn(aResponse().withStatus(HttpStatus.SC_OK)));\n\n checkResultIsPresent(executeConnector(buildMethodParametersSet(GET)));\n }",
"void dispatchRequest(String urlPath) throws Exception;",
"protected HttpResponse executeRequest(RPCRequest invocation) throws Exception {\n\t\treturn getHttpInvokerRequestExecutor().executeRequest(getServiceUrl(), invocation);\n\t}",
"private CloseableHttpResponse execute(HttpMessage httpAction) {\n\t\tCloseableHttpResponse response = null;\n\t\tCloseableHttpClient httpClient = HttpClients.custom()\n\t\t\t\t.disableRedirectHandling().build();\n\n\t\ttry {\n\t\t\tresponse = httpClient.execute((HttpUriRequest) httpAction);\n\t\t} catch (IOException ex) {\n\t\t\tSystem.err.println(\"Unable to execute HTTP action: \"\n\t\t\t\t\t+ ex.getMessage());\n\t\t}\n\n\t\treturn response;\n\t}",
"HTTPMethod(String httpMethod) {\n this.httpMethod = httpMethod;\n }",
"private HttpResponse executeWrapper(HttpRequestBase base) throws IOException {\n try {\n setAuthenticationOnMethod(base);\n return this.client.execute(base);\n } catch (IOException ex) {\n base.abort();\n throw new IOException(ex);\n } catch (AuthenticationException e) {\n base.abort();\n throw new IOException(e);\n }\n }",
"protected abstract ClassicHttpResponse execute(ClassicHttpRequest request, HttpClientContext context) throws IOException;",
"private HttpResponse executeHttpGet(String apiUrl) throws OAuthMessageSignerException,\r\n\t\t\tOAuthExpectationFailedException, OAuthCommunicationException, IOException {\r\n\t\tHttpGet httprequest = new HttpGet(apiUrl);\r\n\t\tgetOAuthConsumer().sign(httprequest);\r\n\t\tHttpClient client = new DefaultHttpClient();\r\n\t\tHttpResponse httpresponse = client.execute(httprequest);\r\n\t\tint statusCode = httpresponse.getStatusLine().getStatusCode();\r\n\t\tSystem.out.println(statusCode + \":\" + httpresponse.getStatusLine().getReasonPhrase());\r\n\t\treturn httpresponse;\r\n\t}",
"public String webGet(String methodName, Map<String, String> params) {\r\n \t\r\n \tString url = webServiceUrl + methodName + getQueryString(params); \t\r\n\r\n httpGet = new HttpGet(url);\r\n Log.e(\"WebGetURL: \",url);\r\n\r\n try {\r\n response = httpClient.execute(httpGet);\r\n } catch (Exception e) {\r\n Log.e(\"Groshie:\", e.getMessage());\r\n }\r\n\r\n // we assume that the response body contains the error message\r\n try {\r\n ret = EntityUtils.toString(response.getEntity());\r\n } catch (IOException e) {\r\n Log.e(\"Groshie:\", e.getMessage());\r\n }\r\n\r\n return ret;\r\n }",
"public int executeURI(HttpMethod method, Header[] headers, String uri)\n throws IOException {\n method.setURI(new URI(uri, true));\n for (Map.Entry<String, String> e: extraHeaders.entrySet()) {\n method.addRequestHeader(e.getKey(), e.getValue());\n }\n if (headers != null) {\n for (Header header: headers) {\n method.addRequestHeader(header);\n }\n }\n long startTime = System.currentTimeMillis();\n int code = httpClient.executeMethod(method);\n long endTime = System.currentTimeMillis();\n if (LOG.isDebugEnabled()) {\n LOG.debug(method.getName() + \" \" + uri + \" \" + code + \" \" +\n method.getStatusText() + \" in \" + (endTime - startTime) + \" ms\");\n }\n return code;\n }",
"public <T> T call(BattlenetApiRequest<T> method) throws IOException, BattlenetApiParsingException {\n if (method == null) {\n throw new BattlenetApiParsingException(\"Can't execute a null Battle.NET API request.\");\n }\n String result = execute(getRegion(), getLocale(), method);\n if (isEmpty(result)) {\n throw new BattlenetApiParsingException(format(\"Execution of method %s returned an empty result.\", method.getClass().getName()));\n }\n return resultParser.parse(result, method.getResultType());\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Multiplies a double variable by the value of a UnitP one. Eventual errors will be managed as defined by the double type. | public static UnitP Multiplication(double first, UnitP second)
{
return OperationsPublic.PerformUnitOperation
(
first, second, Operations.Multiplication,
OperationsOther.GetOperationString(first, second, Operations.Multiplication)
);
} | [
"void multiply(double value);",
"public static UnitP Multiplication(UnitP first, double second)\n {\n return OperationsPublic.PerformUnitOperation\n (\n first, second, Operations.Multiplication, \n OperationsOther.GetOperationString(first, second, Operations.Multiplication)\n );\n }",
"public void mul(T x, double a);",
"@Test\n\tpublic void testMultiplyDouble() \n\t{\n\t\tdouble scalar = 39.7;\n\t\t\n\t\tassertEquals(12.0*39.7,c.multiply(scalar).getX(),0);\n\t\tassertEquals(34.0*39.7,c.multiply(scalar).getY(),0);\n\t}",
"public void multiply()\r\n {\r\n resultDoubles = Operations.multiply(leftOperand, rightOperand);\r\n resultResetHelper();\r\n }",
"void mul(double val) {\r\n\t\tresult = result * val;\r\n\t}",
"public void multiply()\n {\n operation = \"multiply\";\n previousValue = currentValue;\n currentValue = 0;\n afterD = false;\n value = 1;\n }",
"public void multiply(MyDouble val) {\n this.setValue(this.getValue() * val.getValue());\n }",
"public Vector multiply(final double s);",
"String getUnitMult();",
"@Test\n public void testDouble_Multiply() throws XACML3EntitlementException {\n FunctionArgument double1 = new DataValue(DataType.XACMLDOUBLE, 1D, true);\n FunctionArgument double2 = new DataValue(DataType.XACMLDOUBLE, 10000000222D, true);\n FunctionArgument double3 = new DataValue(DataType.XACMLDOUBLE, 10000000420D, true);\n FunctionArgument double4 = new DataValue(DataType.XACMLDOUBLE, 2D, true);\n\n DoubleMultiply doubleMultiply = new DoubleMultiply();\n // Place Objects in Argument stack for accumulation.\n doubleMultiply.addArgument(double1);\n doubleMultiply.addArgument(double2);\n FunctionArgument result = doubleMultiply.evaluate(null);\n assertNotNull(result);\n assertEquals(result.asDouble(null).doubleValue(), 10000000222D);\n\n doubleMultiply = new DoubleMultiply();\n // Place Objects in Argument stack for accumulation.\n doubleMultiply.addArgument(double1);\n doubleMultiply.addArgument(double2);\n doubleMultiply.addArgument(double3);\n doubleMultiply.addArgument(double4);\n result = doubleMultiply.evaluate(null);\n assertNotNull(result);\n assertEquals(result.asDouble(null).doubleValue(), (1D * 10000000222D * 10000000420D * 2D));\n\n }",
"void multiplyBy(double constant) throws MatrixException;",
"public T mulNew(T x, double a);",
"@DISPID(2649)\n @PropPut\n void setPictureUnit2(\n double rhs);",
"@Override\r\n\tpublic Number multiply(Number num) {\r\n\t\tNumberDouble n= new NumberDouble(number*num.getNum());\r\n\t\treturn n;\r\n\t}",
"public void mul(double value) {\r\n this.set(this.getX() * value,\r\n this.getY() * value,\r\n this.getZ() * value);\r\n }",
"void userDouble();",
"public void multiply (double constant) {\n List<Double> temp = new ArrayList<Double>();\n temp.add(constant);\n Polynomial constantP = new Polynomial(temp);\n this.multiply(constantP);\n }",
"void setABinaryDouble(Double a);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Unsets the "SearchRecurrenceStart" element | void unsetSearchRecurrenceStart(); | [
"void unsetSearchRecurrenceRule();",
"void setNilSearchRecurrenceStart();",
"void unsetRecurrenceDuration();",
"void xsetSearchRecurrenceStart(org.apache.xmlbeans.XmlDateTime searchRecurrenceStart);",
"void setSearchRecurrenceStart(java.util.Calendar searchRecurrenceStart);",
"public void resetSearchSelection() {\n this.quantSearchSelection = null;\n SelectionChanged(\"reset_quant_searching\");\n }",
"public void unsetRecurrenceType()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(RECURRENCETYPE$6, 0);\n }\n }",
"private void resetInteractiveSearch() { \n userLRSearchHandler.clearSearch();\n DsUtil.hideLabel(ULRS_FILTER_TOOLS);\n DsUtil.hideLabel(ULRS_FILTER_NAVIGATION); \n DsUtil.hideLabel(ULRS_RESULTS_SCREEN);\n DsUtil.hideLabel(ULRS_TYPING);\n DsUtil.hideLabel(SEARCH_HEADER);\n DsUtil.showLabel(DEFAULT_HEADER);\n DsUtil.showLabel(ULRS_DIV);\n DsUtil.setFocus(ULRS_FIELD);\n DsUtil.setTextBoxText(ULRS_FIELD,\"\");\n DsUtil.setTextBoxText(ULRS_HEADER_FIELD,\"\");\n DsUtil.removeAllWidgetsFromRootPanel(RootPanel.get(ULRS_RESULTS));\n }",
"public void unsetStartDateTime()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(STARTDATETIME$10, 0);\n }\n }",
"void setNilSearchRecurrenceRule();",
"public void unsetStartDate()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(STARTDATE$8, 0);\n }\n }",
"public void reset() {\n this.index = this.startIndex;\n }",
"public void unsetStartIndex()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(STARTINDEX$10);\n }\n }",
"void unsetSearchWindowStart();",
"public void reset() {\n endRange = set.getRangeCount() - 1;\n range = 0;\n endElement = -1;\n nextElement = 0;\n if (endRange >= 0) {\n loadRange(range);\n }\n stringIterator = null;\n if (set.strings != null) {\n stringIterator = set.strings.iterator();\n if (!stringIterator.hasNext()) stringIterator = null;\n }\n }",
"public void clear(){\n stopCriteria.clear();\n }",
"public void clearSearch() {\n clearSearch(true);\n }",
"public void reset() {\n _walker.moveToStart();\n _operators.clear();\n }",
"public NodeIterator reset() {\n\t_pos = _start;\n\t_node = _start - 1;\n\treturn(this);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Perform validation, set defaults, and deliver built instance of AgentPolicy. | AgentPolicy build(); | [
"public Builder( Policy policy ) {\n\t\t\tthis.policy = policy;\n\t\t}",
"AgentPolicyBuilder setJobPriority(JobPriority jobPriority);",
"public Policy(gw.pl.persistence.core.BundleProvider bundleProvider) {\n this((java.lang.Void)null);\n com.guidewire.pl.system.entity.proxy.BeanProxy.initNewBeanInstance(this, bundleProvider.getBundle(), java.util.Arrays.asList());\n }",
"private Policy populatePolicyObject()\n {\n \tDriver driverObj = new Driver();\n driverObj.setDriverName(name);\n driverObj.setAge(age);\n driverObj.setNumberOfAccidents(numAccidents);\n driverObj.setNumberOfTickets(numTickets);\n driverObj.setCreditScore(creditScore);\n driverObj.setSsn(\"555-55-555\");\n driverObj.setDlNumber(\"7\");\n Policy policyObj = new Policy();\n policyObj.setVehicleYear(vehicleYear);\n policyObj.setDriver(driverObj);\n policyObj.setPolicyType(policyType);\n return policyObj;\n }",
"public Policy() {\n }",
"public void setPolicy(PO newPolicy);",
"public void setPolicy(Policy policy) {\n this.policy = policy;\n \n \n }",
"public RoleManagementPolicyApprovalRule() {\n }",
"PolicyHolder addPolicyHolder(Integer agentId , PolicyHolder pHolder);",
"public DistributionPolicyInternal() {}",
"public void processPolicy( Policy policy ) throws Exception\r\n {\r\n \r\n // default is optional\r\n // String anonymous = AnonymousTypeConfig.OPTIONAL.toString();\r\n //\t if (StringUtils.isNullOrEmpty(interfaceAnonymous) || policyFlag)\r\n //\t\t interfaceAnonymous = AnonymousTypeConfig.OPTIONAL.toString() ;\r\n //\t if (StringUtils.isNullOrEmpty(interfaceWsaVersion)|| policyFlag)\r\n //\t\t interfaceWsaVersion = WsaVersionTypeConfig.NONE.toString();\r\n \t if (!policyFlag) {\r\n \t\t interfaceAnonymous = AnonymousTypeConfig.OPTIONAL.toString() ;\r\n \t\t interfaceWsaVersion = WsaVersionTypeConfig.NONE.toString();\r\n \t }\r\n \t policyFlag = true;\r\n \r\n if( policy != null )\r\n {\r\n List<Addressing> addressingList = policy.getAddressingList();\r\n for( Addressing addressing : addressingList )\r\n {\r\n policyFlag = true;\r\n \t String optional = addressing.getOptional().toString();\r\n if( StringUtils.isNullOrEmpty( optional ) || optional.equals( \"false\" )\r\n || ( optional.equals( \"true\" ) && SoapUI.getSettings().getBoolean( WsaSettings.ENABLE_FOR_OPTIONAL ) ) )\r\n {\r\n \tinterfaceWsaVersion = WsaVersionTypeConfig.X_200508.toString();\r\n }\r\n Policy innerPolicy = addressing.getPolicy();\r\n if( innerPolicy != null )\r\n {\r\n List<AnonymousResponses> anonymousList = innerPolicy.getAnonymousResponsesList();\r\n List<NonAnonymousResponses> nonAnonymousList = innerPolicy.getNonAnonymousResponsesList();\r\n if( anonymousList.size() > 0 && nonAnonymousList.size() > 0 )\r\n {\r\n throw new Exception(\r\n \"Wrong addressing policy, anonymousResponses and nonAnonymousResponses can not be specified together\" );\r\n }\r\n if( anonymousList.size() > 0 )\r\n {\r\n AnonymousResponses anonResp = anonymousList.get( 0 );\r\n interfaceAnonymous = AnonymousTypeConfig.REQUIRED.toString();\r\n }\r\n else\r\n {\r\n if( nonAnonymousList.size() > 0 )\r\n {\r\n NonAnonymousResponses nonAnonResp = nonAnonymousList.get( 0 );\r\n interfaceAnonymous = AnonymousTypeConfig.PROHIBITED.toString() ;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n setAnonymous(interfaceAnonymous);\r\n setWsaVersion( interfaceWsaVersion );\r\n \t\t\r\n \t}",
"public BinaryAcceptancePolicy() {\n }",
"public MessagePolicy() {\n info = new ArrayList();\n optionals = new ArrayList();\n }",
"@Override\n protected VendorPolicy createVendorPolicy() {\n // get class name\n String className = this.getConfigurationValue(FaxBridge.VENDOR_POLICY_CLASS_NAME);\n\n if (className == null) {\n className = EmptyVendorPolicy.class.getName();\n }\n\n // create new instance\n VendorPolicy vendorPolicy = (VendorPolicy) ReflectionHelper.createInstance(className);\n\n // log info\n Logger logger = this.getLogger();\n logger.logInfo(new Object[] { \"Created new vendor policy of type: \", className }, null);\n\n return vendorPolicy;\n }",
"public PolicyAssignmentProperties() {\n }",
"public ProtectionPolicy() {\n }",
"Policy getPolicy();",
"@Fluent\n PolicyService createPolicy(List<CreatePolicyRequest> request , User user , Handler<AsyncResult<JsonObject>> handler);",
"public BenevolentPolicy(Domain domain, SSBWAgent agent, int numberNeighbors){\r\n\t\tthis.domain = domain;\r\n\t\tthis.agent =agent;\r\n\t\tthis.numberNeighbors = numberNeighbors;\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the file name for a chunk nest | public static File getChunkFile(GChunk chunk)
{
return new File(new File(Worlds.getWorld(chunk.getWorld()).getWorldFolder(), "nest"), "n." + chunk.getX() + "." + chunk.getZ() + ".n");
} | [
"private String getChunkName(ScriptContext context) {\n\t\tif (context != null) {\n\t\t\tObject fileName = context.getAttribute(FILENAME);\n\t\t\tif (fileName != null) {\n\t\t\t\treturn fileName.toString();\n\t\t\t}\n\t\t}\n\t\treturn \"null\";\n\t}",
"public String getChunkFileName() {\n return chunkFileName;\n }",
"public String getFileName() {\n\t\t\n\t\tString result = null;\n\t\t\n\t\tif(this.exists() && !this.isDirectory())\n\t\t\tresult = this.get(this.lenght - 1);\n\t\t\n\t\treturn result;\n\t}",
"public String getFileName() {\n if(part == null) {\n return null;\n }\n return part.getFileName();\n }",
"private String getTmpChunkListFileName(int the_size){\n\t\tString file_name = \"\";\n\t\tfile_name = tmpDir+\"/chunk_list_\"+the_size+\".txt\";\n\t\treturn file_name;\n\t}",
"private static String getFileName(int blockSize) {\n\t\treturn \"gridFile_\" + blockSize + \".ser\";\n\t}",
"public String getFileName() {\n return isUnknown() ? \"\" : callerElement.getFileName();\n }",
"java.lang.String getFilename();",
"private String getCollisionTmpFileName(int the_size) {\n\t\tString file_name = \"\";\n\t\tfile_name = tmpDir+\"/chunk_collision_\"+the_size+\".txt\";\n\t\treturn file_name;\n\t}",
"public final String getFileName(final Part part) {\n for (String cd : part.getHeader(\"content-disposition\").split(\";\")) {\n if (cd.trim().startsWith(\"filename\")) {\n return cd.substring(cd.indexOf('=') + 1).trim()\n .replace(\"\\\"\", \"\");\n }\n }\n return null;\n }",
"public String getFileName() {\n return getCellContent(FILE).split(FILE_LINE_SEPARATOR)[0];\n }",
"private String fileName(ModuleReference mref) {\n URI uri = mref.location().orElse(null);\n if (uri != null) {\n if (uri.getScheme().equalsIgnoreCase(\"file\")) {\n Path file = Path.of(uri);\n return file.getFileName().toString();\n } else {\n return uri.toString();\n }\n } else {\n return \"<unknown>\";\n }\n }",
"public static String nomeFile(String path) {\n\t\tString nome = path;\n\t\tString tagSlash = \"/\";\n\t\tString tagPoint = \".\";\n\t\tint pos = 0;\n\n\t\tif (!path.equals(\"\")) {\n\t\t\tif (path.contains(tagSlash)) {\n\t\t\t\tpos = path.lastIndexOf(tagSlash);\n\t\t\t\tnome = path.substring(pos);\n\t\t\t}// end of if cycle\n\t\t\tif (path.contains(tagPoint)) {\n\t\t\t\tpos = path.lastIndexOf(tagPoint);\n\t\t\t\tnome = path.substring(pos);\n\t\t\t}// end of if cycle\n\t\t}// end of if cycle\n\n\t\treturn nome;\n\t}",
"private String generateComponentName(String currentName, String fileName, int depth){\n if (depth == 0) return \"\";\n if (currentName.isEmpty()) return fileName;\n return currentName + \".\" + fileName;\n }",
"abstract protected String getStepFileName(int stepCounter);",
"public final String getFullFileName() {\n String fullFileName = basePath + File.separator + this.scale + File.separator\n + this.tileX + File.separator + this.tileY + \".asc\";\n return fullFileName;\n }",
"public String getFilename() {\n return tokenStream.getFilename();\n }",
"public String fileName() {\n int ind = path.lastIndexOf('/');\n return path.substring(ind + 1, path.length());\n }",
"private String getDisplayName(File level) {\r\n return level.getName().substring(0, level.getName().lastIndexOf('.'));\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a message wrapper for the given object and message type | public static String createWrapper(Object o, MessageType type) {
WrapperMessage message = new WrapperMessage();
message.setMessageType(type);
message.setMessageBody(serializeObject(o));
Gson gson = new Gson();
return gson.toJson(message);
} | [
"public <T extends GeneratedMessage> Wrapper wrap(T message, Type type);",
"ObjectMessage createObjectMessage();",
"protected abstract Message createMessage(Object object, MessageProperties messageProperties);",
"MessagesType createMessagesType();",
"public abstract Message createMessage(Navajo tb, String name, String type);",
"public Message newMessage(String type, String addr) {\n\tMessage message = null;\n\n\tif (type.equals(MessageConnection.TEXT_MESSAGE)) {\n\n\t message = new TextObject(addr);\n\t} else {\n\t if (type.equals(MessageConnection.BINARY_MESSAGE)) {\n\n message = new BinaryObject(addr);\n\t } else {\n throw new IllegalArgumentException(\n \"Message type not supported\");\n\t }\n\t}\n\n\n\treturn message;\n }",
"Message createMessage();",
"MessageType createMessageType();",
"<T extends Message> T newMessage(Class<T> clazz) throws HL7Exception;",
"public static Object wrapMessage(Object message) {\n\n Object msg = message;\n int messageId = 0;\n\n // If we specify message id from OneMessageWrapper then use it.\n // Otherwise just use a message id of 0. Ease of use on server.\n if (message instanceof OneMessageWrapper) {\n OneMessageWrapper wrapper = (OneMessageWrapper) message;\n msg = wrapper.getData();\n messageId = wrapper.getMessageId();\n }\n\n OneMessage.Builder builder = OneMessage.newBuilder().setMessageId(messageId);\n\n if (msg instanceof FindGameRoomsRequest) {\n return builder.setType(OneMessage.Type.FIND_GAME_ROOMS_REQUEST)\n .setFindGameRoomsRequest((FindGameRoomsRequest) msg).build();\n } else if (msg instanceof FindGameRoomsResponse) {\n return builder.setType(OneMessage.Type.FIND_GAME_ROOMS_RESPONSE)\n .setFindGameRoomsResponse((FindGameRoomsResponse) msg).build();\n } else if (msg instanceof FindGamesRequest) {\n return builder.setType(OneMessage.Type.FIND_GAMES_REQUEST).setFindGamesRequest((FindGamesRequest) msg)\n .build();\n } else if (msg instanceof FindGamesResponse) {\n return builder.setType(OneMessage.Type.FIND_GAMES_RESPONSE).setFindGamesResponse((FindGamesResponse) msg)\n .build();\n } else if (msg instanceof JoinGameRequest) {\n return builder.setType(OneMessage.Type.JOIN_GAME_REQUEST).setJoinGameRequest((JoinGameRequest) msg).build();\n } else if (msg instanceof JoinGameResponse) {\n return builder.setType(OneMessage.Type.JOIN_GAME_RESPONSE).setJoinGameResponse((JoinGameResponse) msg)\n .build();\n } else if (msg instanceof StartGameRequest) {\n return builder.setType(OneMessage.Type.START_GAME_REQUEST).setStartGameRequest((StartGameRequest) msg)\n .build();\n } else if (msg instanceof LoginRequest) {\n return builder.setType(OneMessage.Type.LOGIN_REQUEST).setLoginRequest((LoginRequest) msg).build();\n } else if (msg instanceof SignupRequest) {\n return builder.setType(OneMessage.Type.SIGNUP_REQUEST).setSignupRequest((SignupRequest) msg).build();\n } else if (msg instanceof GenericResponse) {\n return builder.setType(OneMessage.Type.GENERIC_RESPONSE).setGenericResponse((GenericResponse) msg).build();\n } else if (msg instanceof ResetPasswordRequest) {\n return builder.setType(OneMessage.Type.RESET_PASSWORD_REQUEST)\n .setResetPasswordRequest((ResetPasswordRequest) msg).build();\n } else if (msg instanceof LoginResponse) {\n return builder.setType(OneMessage.Type.LOGIN_RESPONSE).setLoginResponse((LoginResponse) msg).build();\n } else if (msg instanceof PlayCardRequest) {\n return builder.setType(OneMessage.Type.PLAY_CARD_REQUEST).setPlayCardRequest((PlayCardRequest) msg).build();\n } else if (msg instanceof GameEndedResponse) {\n return builder.setType(OneMessage.Type.GAME_ENDED_RESPONSE).setGameEndedResponse((GameEndedResponse) msg)\n .build();\n } else if (msg instanceof RoundEndedResponse) {\n return builder.setType(OneMessage.Type.ROUND_ENDED_RESPONSE)\n .setRoundEndedResponse((RoundEndedResponse) msg).build();\n } else if (msg instanceof RoundStartedResponse) {\n return builder.setType(OneMessage.Type.ROUND_STARTED_RESPONSE)\n .setRoundStartedResponse((RoundStartedResponse) msg).build();\n } else if (msg instanceof TrickEndedResponse) {\n return builder.setType(OneMessage.Type.TRICK_ENDED_RESPONSE)\n .setTrickEndedResponse((TrickEndedResponse) msg).build();\n } else if (msg instanceof ScoreUpdateResponse) {\n return builder.setType(OneMessage.Type.SCORE_UPDATE_RESPONSE)\n .setScoreUpdateResponse((ScoreUpdateResponse) msg).build();\n } else if (msg instanceof PlaySingleCardResponse) {\n return builder.setType(OneMessage.Type.PLAY_SINGLE_CARD_RESPONSE)\n .setPlaySingleCardResponse((PlaySingleCardResponse) msg).build();\n } else if (msg instanceof PassCardsResponse) {\n return builder.setType(OneMessage.Type.PASS_CARDS_RESPONSE).setPassCardsResponse((PassCardsResponse) msg)\n .build();\n } else if (msg instanceof ReplacePlayerResponse) {\n return builder.setType(OneMessage.Type.REPLACE_PLAYER_RESPONSE)\n .setReplacePlayerResponse((ReplacePlayerResponse) msg).build();\n } else {\n return null;\n }\n }",
"public Message createMessage();",
"AutoBean<Message> makeMessage();",
"public Message createMessage(char type) {\n return new StatMessage(type);\n }",
"public <T extends org.ros.internal.message.Message> T buildMessage(String typeString) {\n return messageFactory.newFromType(typeString);\n }",
"InboundMessage createInboundMessage();",
"UserMessage createUserMessage();",
"public static Message makeMessage(byte[] buffer) \n {\n\t short type = (short)((buffer[0] & 0xff <<8)|buffer[1] & 0xff); \n\t switch (type) {\n case CONNECT_TYPE: { System.out.println(\"msg received CONNECT_TYPE\");\n return new Connect(buffer); }\n case ACKCONNECT_TYPE: { System.out.println(\"msg received ACKCONNECT_TYPE\");\n return new AckConnect(buffer); }\n case OPEN_TYPE: { System.out.println(\"msg received OPEN_TYPE\");\n return new Open(buffer); }\n\t\t\t case ACKOPEN_TYPE: \n \t \t\t case ACKLOCK_TYPE:\n \t \t\t case ACKEDIT_TYPE: \n\t \t\t case SERVRELEASE_TYPE: { System.out.println(\"msg received ACK*\");\n return new Ack(buffer); }\n case REQLOCK_TYPE: { System.out.println(\"msg received REQLOCK_TYPE\");\n return new ReqLock(buffer); }\n case RELEASE_TYPE: { System.out.println(\"msg received RELEASE_TYPE\");\n return new Release(buffer); }\n case MOVE_TYPE: { System.out.println(\"msg received MOVE_TYPE\");\n return new Move(buffer); }\n case REQCONTENTS_TYPE: { System.out.println(\"msg received REQCONTENTS_TYPE\");\n return new ReqContents(buffer); }\n case CONTENTS_TYPE: { System.out.println(\"msg received CONTENTS_TYPE\");\n return new Contents(buffer); }\n case SYNC_TYPE: { System.out.println(\"msg received SYNC_TYPE\");\n return new Sync(buffer); }\n case STATUS_TYPE: { System.out.println(\"msg received STATUS_TYPE\");\n return new Status(buffer); }\n case EDIT_TYPE: { System.out.println(\"msg received EDIT_TYPE\");\n return new Edit(buffer); }\n\t\t case CLOSE_TYPE: { System.out.println(\"msg received CLOSE_TYPE\");\n return new Close(buffer); }\n case ERROR_TYPE: { System.out.println(\"msg received ERROR_TYPE\");\n return new Error(buffer); }\n default: { System.out.println(\"Error: Invalid message type\");\n return null; }\n\t\t}\n }",
"OutboundMessage createOutboundMessage();",
"public Message newMessage(String type) {\n\tString address = null;\n\n\t/*\n * Provide the default address from the original open.\n */\n\n\tif (((m_mode & Connector.WRITE) > 0) && (host != null)) {\n\t address = ADDRESS_PREFIX + host;\n\t if (m_iport != 0) {\n\t\taddress = address + \":\" + String.valueOf(m_iport);\n\t }\n\t}\n\n\treturn newMessage(type, address);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a subscription and a tab for it. | public void createSubscription(final Color color, final boolean subscribe, final TabbedSubscriptionDetails subscriptionDetails,
final MqttAsyncConnection connection, final ConnectionController connectionController, final Object parent)
{
logger.info("Creating subscription for " + subscriptionDetails.getTopic());
final MqttSubscription subscription = new MqttSubscription(subscriptionDetails.getTopic(),
subscriptionDetails.getQos(), color,
connection.getProperties().getConfiguredProperties().getMinMessagesStoredPerTopic(),
connection.getPreferredStoreSize(), uiEventQueue, eventBus,
connection.getStore().getFormattingManager(),
UiProperties.getSummaryMaxPayloadLength(configurationManager.getUiPropertyFile()));
subscription.setConnection(connection);
subscription.setDetails(subscriptionDetails);
// Add a new tab
final SubscriptionController subscriptionController = createSubscriptionTab(
false, subscription.getStore(), subscription, connection, connectionController);
subscriptionController.getTab().setContextMenu(ContextMenuUtils.createSubscriptionTabContextMenu(
connection, subscription, eventBus, this, configurationManager, subscriptionController));
subscriptionController.setConnectionController(connectionController);
subscriptionController.setFormatting(configurationManager.getConfiguration().getFormatting());
subscriptionController.setTabStatus(new TabStatus());
subscriptionController.getTabStatus().setVisibility(PaneVisibilityStatus.NOT_VISIBLE);
subscriptionController.init();
subscriptionController.onSubscriptionStatusChanged(new SubscriptionStatusChangeEvent(subscription));
subscription.setSubscriptionController(subscriptionController);
final SpyPerspective perspective = viewManager.getPerspective();
subscriptionController.setViewVisibility(ViewManager.getDetailedViewStatus(perspective), ViewManager.getBasicViewStatus(perspective));
subscriptionController.getTabStatus().setVisibility(PaneVisibilityStatus.ATTACHED);
subscriptionController.getTabStatus().setParent(connectionController.getSubscriptionTabs());
final TabPane subscriptionTabs = connectionController.getSubscriptionTabs();
subscriptionTabs.getTabs().add(subscriptionController.getTab());
subscriptionTabs.getTabs().get(ALL_SUBSCRIPTIONS_TAB_INDEX).setDisable(false);
if (subscribe)
{
logger.debug("Trying to subscribe {}", subscription.getTopic());
connection.subscribe(subscription);
}
else
{
connection.addSubscription(subscription);
subscription.setActive(false);
}
} | [
"public void createSubscription(Subscription sub);",
"public void createSubscription(SubscriptionData subscription, List<EntitlementEvent> initialEvents, InternalCallContext context);",
"void addNewSubscription(Subscription newSubscription);",
"protected SubscriptionController createSubscriptionTab(final boolean allTab, \n\t\t\tfinal ManagedMessageStoreWithFiltering<FormattedMqttMessage> observableMessageStore, final MqttSubscription subscription,\n\t\t\tfinal MqttAsyncConnection connection, final ConnectionController connectionController)\n\t{\n\t\t// Load a new tab and connection pane\n\t\tfinal FXMLLoader loader = FxmlUtils.createFxmlLoaderForProjectFile(\"SubscriptionPane.fxml\");\n\n\t\tfinal AnchorPane subscriptionPane = FxmlUtils.loadAnchorPane(loader);\n\t\tfinal SubscriptionController subscriptionController = ((SubscriptionController) loader.getController());\n\t\t\n\t\tfinal Tab tab = new Tab();\n\t\tif (subscription != null)\n\t\t{\n\t\t\teventBus.subscribeWithFilterOnly(subscriptionController, subscriptionController::onSubscriptionStatusChanged, SubscriptionStatusChangeEvent.class, subscription);\n\t\t\t// eventManager.registerSubscriptionStatusObserver(subscriptionController, subscription);\n\t\t}\n\t\t\n\t\tsubscriptionController.setStore(observableMessageStore);\n\t\tsubscriptionController.setEventBus(eventBus);\n\t\tsubscriptionController.setConfingurationManager(configurationManager);\n\t\tif (connection != null)\n\t\t{\n\t\t\tsubscriptionController.setFormattingManager(connection.getStore().getFormattingManager());\n\t\t\tsubscriptionController.setConnectionProperties(connection.getProperties());\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsubscriptionController.setFormattingManager(new FormattingManager(new MqttScriptManager(null, null, null)));\n\t\t}\n\t\tsubscriptionController.setTab(tab);\n\t\tsubscriptionController.toggleMessagePayloadSize(connectionController.getResizeMessageContentMenu().isSelected());\n\t\t\t\t\n\t\ttab.setClosable(false);\n\t\ttab.setContent(subscriptionPane);\n\n\t\tif (subscription != null)\n\t\t{\n\t\t\ttab.setStyle(StylingUtils.createBaseRGBString(subscription.getColor()));\n\t\t}\n\n\t\tif (allTab)\n\t\t{\n\t\t\tsubscriptionControllers.put(ALL_SUBSCRIPTIONS_TAB_TITLE, subscriptionController);\t\t\t\t\t\t\n\t\t\ttab.setGraphic(new Label(ALL_SUBSCRIPTIONS_TAB_TITLE));\n\t\t\ttab.getGraphic().getStyleClass().add(\"subscribed\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlogger.debug(\"Mapping subscription topic {} to controller\", subscription.getTopic());\n\t\t\tsubscriptionControllers.put(subscription.getTopic(), subscriptionController);\t\t\t\t\t\t\n\t\t\ttab.setGraphic(new Label(subscription.getTopic()));\n\t\t\ttab.getGraphic().getStyleClass().add(\"unsubscribed\");\n\t\t\ttab.setTooltip(new Tooltip(\"Status: \" + \"unsubscribed\"));\n\t\t}\t\t\n\t\t\n\t\treturn subscriptionController;\n\t}",
"WebPushSubscription addSubscriptions(String userEmail, Subscription subscription, UUID uuid);",
"OperationResponse registerSubscription() throws IOException, ServiceException;",
"public StoredSubscription(Subscription s) {\n setSubscription(s);\n }",
"void createProfile(Context context, Subscriber subscriber)\r\n throws AAAClientException;",
"@PostMapping(\"/subscriptions\")\n @Timed\n public ResponseEntity<Subscription> createSubscription(@Valid @RequestBody Subscription subscription) throws URISyntaxException {\n log.debug(\"REST request to save Subscription : {}\", subscription);\n if (subscription.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"idexists\", \"A new subscription cannot already have an ID\")).body(null);\n }\n Subscription result = subscriptionService.save(subscription);\n return ResponseEntity.created(new URI(\"/api/subscriptions/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"public com.google.cloud.pubsublite.proto.Subscription createSubscription(\n com.google.cloud.pubsublite.proto.CreateSubscriptionRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateSubscriptionMethod(), getCallOptions(), request);\n }",
"public SubscriptionsRecord() {\n super(Subscriptions.SUBSCRIPTIONS);\n }",
"@RequestMapping(value = \"/subscriptions\", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)\n\t@Timed\n\tpublic ResponseEntity<Subscription> create(@Valid @RequestBody Subscription subscription) throws URISyntaxException {\n\t\tlog.debug(\"REST request to save Subscription : {}\", subscription);\n\t\tif (subscription.getId() != null) {\n\t\t\treturn ResponseEntity.badRequest().header(\"Failure\", \"A new subscription cannot already have an ID\").body(null);\n\t\t}\n\t\tSubscription result = doSave(subscription);\n\t\treturn ResponseEntity.created(new URI(\"/api/subscriptions/\" + result.getId()))\n\t\t\t\t.headers(HeaderUtil.createEntityCreationAlert(\"subscription\", result.getId().toString())).body(result);\n\t}",
"protected abstract SubscriptionStore createSubscriptionStore();",
"protected abstract void setupSubscriptions();",
"public SubscriptionRegistration create(long SUSCRIBER_ID);",
"@Override\n public void sendCreatedSubscriptionNotification(Subscription subscription,\n String username) {\n BaseSubscriptionNotificationRequest<Subscription> req = new SubscriptionNotificationRequest();\n req.setUserId(username);\n req.setCategory(\"Subscription\");\n\n String msg = \"Subscription \" + subscription.getName()\n + \" has been created.\";\n req.setMessage(msg);\n req.setSubscription(subscription);\n req.setPriority(3);\n sendRequest(req);\n }",
"ResourceManager withSubscription(String subscriptionId);",
"protected void registerSubscription(Subscription subscription) {\n compositeSubscription.add(subscription);\n }",
"boolean add(Client client, Subscription subscription);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper to create properties form one more key value pairs formatted as "[key]=[Value]". | public Properties props(String... propStrs) {
Properties props = new Properties();
for (String propStr : propStrs) {
String[] split = propStr.split("=");
if (split.length == 2) {
props.put(split[0].trim(), split[1].trim());
} else {
log.warn(propStr + " is not a key value pair");
}
}
return props;
} | [
"private static Map<String, String> createPropertiesAttrib() {\r\n Map<String, String> map = new HashMap<String, String>();\r\n map.put(\"Property1\", \"Value1SA\");\r\n map.put(\"Property3\", \"Value3SA\");\r\n return map;\r\n }",
"public static Properties createProperty(Vector key, Vector val, String seq) {\n\n int sz = (key.size() < val.size()) ? key.size() : val.size();\n Properties prop = new Properties();\n StringBuffer sb = new StringBuffer();\n\n for (int i = 0; i < sz; i++) {\n prop.setProperty(key.elementAt(i).toString(), val.elementAt(i).toString());\n sb.append(key.elementAt(i)).append(SEPARATOR);\n }\n\n if (seq != null) {\n prop.setProperty(seq, sb.toString());\n }\n\n return prop;\n }",
"protected abstract Property createProperty(String key, Object value);",
"Properties createProperties();",
"private void createProperties() {\n\t\tproperties.clear();\n\t\tProperty property;\n\t\tString[] columnNames = JmsLogsPlugin.getDefault().getPluginPreferences()\n\t\t.getString(LogViewPreferenceConstants.P_STRING).split(\"\\\\?\")[0].split(\";\"); //$NON-NLS-1$\n\t\tfor (int i = 0; i < columnNames.length; i++) {\n\t\t\tproperty = new Property();\n\t\t\tproperty.setProperty((String) columnNames[i].split(\",\")[0]); //$NON-NLS-1$\n\t\t\tproperty.setValue(\"\"); //$NON-NLS-1$\n\t\t\tproperties.add(property);\n\t\t}\n\t}",
"public static Property createProperty(String key, String value) {\n Property prop = new Property();\n prop.setKey(key);\n prop.setValue(value);\n\n return prop;\n }",
"public static String createPropertyLabel(StringPairList pairs) {\r\n String label = new String(\"\");\r\n label += \"<html>\";\r\n String key = new String();\r\n String value = new String();\r\n for (int i=0; i < pairs.size(); i++) {\r\n StringPair pair = pairs.getPair(i);\r\n \tkey = pair.a;\r\n \tvalue = pair.b;\r\n label += \"<b>\" + key + \": \";\r\n label += \"</b>\" + value;\r\n if (i < (pairs.size() - 1))\r\n label += \"<br>\";\r\n }\r\n return label;\r\n }",
"private Map<String, String> preparePropertyMap(final List<String> inValues) {\r\n if (!inValues.isEmpty()) {\r\n final Map<String, String> theMappedProperties = new LinkedHashMap<>();\r\n for (final String theProperty : inValues) {\r\n final String[] theKeyValue = theProperty.split(\"-\");\r\n theMappedProperties.put(theKeyValue[0], theKeyValue[1]);\r\n }\r\n return theMappedProperties;\r\n }\r\n return new LinkedHashMap<>(0);\r\n }",
"protected void appendProperty( StringBuffer sb, String key, String value ){\n sb.append( \" \").append(\"-D\").append( key ).append( \"=\" ).append( value );\n }",
"@Test\n\tpublic void testRegularConversionWithCommaAndWhitespace() {\n\t\t\n\t\tProperties storedProps = new Properties();\n\t\tstoredProps.setProperty(\"key1\", \"value1\");\n\t\tstoredProps.setProperty(\"key2\", \"value2\");\n\t\t\n\t\tprops = PropertiesConverter.stringToProperties(\"key1=value1, key2=value2\");\n\t\t\n\t\tassertEquals(storedProps, props);\n\t}",
"private String serialisePropertyMap(Map<String, String> pPropertyMap){\n StringBuilder lResult = new StringBuilder();\n lResult.append(\"{\");\n \n for(Map.Entry<String, String> lEntry : pPropertyMap.entrySet()){ \n lResult.append(lEntry.getKey());\n lResult.append(\"=\");\n lResult.append(\"\\\"\" + lEntry.getValue() + \"\\\"\");\n lResult.append(\", \");\n }\n \n lResult.replace(lResult.length() - 2, lResult.length(), \"}\");\n return lResult.toString();\n \n }",
"public static String makeEzPropertyString(String propName, Map<String, String> values) {\n final StringBuilder prop = new StringBuilder();\n prop.append(propName).append(\":[\");\n\n int count = 1;\n for (final Map.Entry entry : values.entrySet()) {\n prop.append(\"[visibility:\\\"\").append(entry.getKey()).append(\"\\\",\").append(\"value:\\\"\")\n .append(entry.getValue()).append(\"\\\"]\");\n if (count < values.size()) {\n prop.append(',');\n }\n count++;\n }\n prop.append(']');\n return prop.toString();\n }",
"@Test\n\tpublic void testShortConversionWithCommas() {\n\t\t\n\t\tProperties storedProps = new Properties();\n\t\tstoredProps.setProperty(\"key1\", \"value1\");\n\t\tstoredProps.setProperty(\"key2\", \"value2\");\n\t\t\n\t\tString value = PropertiesConverter.propertiesToString(storedProps);\n\t\t\n\t\tassertTrue(\"Wrong value: \"+value, value.contains(\"key1=value1\"));\n\t\tassertTrue(\"Wrong value: \"+value, value.contains(\"key2=value2\"));\n\t\tassertEquals(1, StringUtils.countOccurrencesOf(value, \",\"));\n\t}",
"@Test\n\tpublic void testRegularConversionWithCommaAndNewline() {\n\t\t\n\t\tProperties storedProps = new Properties();\n\t\tstoredProps.setProperty(\"key1\", \"value1\");\n\t\tstoredProps.setProperty(\"key2\", \"value2\");\n\t\t\n\t\tprops = PropertiesConverter.stringToProperties(\"key1=value1\\n key2=value2\");\n\t\t\n\t\tassertEquals(storedProps, props);\n\t}",
"private String getServiceProperties(Properties properties) {\n String s = \"<ul>\";\n Enumeration<Object> e = properties.keys();\n while (e.hasMoreElements()) {\n String key = (String) e.nextElement();\n String value = properties.get(key).toString();\n s += \"<li>\" + key + \" = \" + value + \"</li>\";\n }\n s += \"</ul>\";\n return s;\n }",
"PropertyValue createPropertyValue();",
"public static void addProperty(String [] propertyValues){\r\n Property oneProperty = new Property();\r\n oneProperty = setPropertyAttributes(oneProperty, propertyValues);\r\n propertyLogImpl.add(oneProperty);\r\n }",
"public static ModelNode properties(String... properties) {\n ModelNode modelNode = new ModelNode();\n if (properties != null) {\n List<String> p = Lists.newArrayList(properties);\n for (Iterator<String> iterator = p.iterator(); iterator.hasNext();) {\n String key = iterator.next();\n if (iterator.hasNext()) {\n String value = iterator.next();\n if (value != null) {\n modelNode.get(key).set(value);\n }\n }\n }\n }\n return modelNode;\n }",
"private static Map<String, PropertyInfo> createPropertyMap()\r\n {\r\n Map<String, PropertyInfo> map = New.map();\r\n PropertyInfo samplingTime = new PropertyInfo(\"http://www.opengis.net/def/property/OGC/0/SamplingTime\", Date.class,\r\n TimeKey.DEFAULT);\r\n PropertyInfo lat = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Latitude\", Float.class, LatitudeKey.DEFAULT);\r\n PropertyInfo lon = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Longitude\", Float.class, LongitudeKey.DEFAULT);\r\n PropertyInfo alt = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Altitude\", Float.class, AltitudeKey.DEFAULT);\r\n map.put(samplingTime.getProperty(), samplingTime);\r\n map.put(lat.getProperty(), lat);\r\n map.put(lon.getProperty(), lon);\r\n map.put(alt.getProperty(), alt);\r\n map.put(\"lat\", lat);\r\n map.put(\"lon\", lon);\r\n map.put(\"alt\", alt);\r\n return Collections.unmodifiableMap(map);\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Number__Group_1__0" $ANTLR start "rule__Number__Group_1__0__Impl" ../de.nie.fin.ui/srcgen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:15601:1: rule__Number__Group_1__0__Impl : ( ( rule__Number__Alternatives_1_0 ) ) ; | public final void rule__Number__Group_1__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:15605:1: ( ( ( rule__Number__Alternatives_1_0 ) ) )
// ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:15606:1: ( ( rule__Number__Alternatives_1_0 ) )
{
// ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:15606:1: ( ( rule__Number__Alternatives_1_0 ) )
// ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:15607:1: ( rule__Number__Alternatives_1_0 )
{
if ( state.backtracking==0 ) {
before(grammarAccess.getNumberAccess().getAlternatives_1_0());
}
// ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:15608:1: ( rule__Number__Alternatives_1_0 )
// ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:15608:2: rule__Number__Alternatives_1_0
{
pushFollow(FOLLOW_rule__Number__Alternatives_1_0_in_rule__Number__Group_1__0__Impl31548);
rule__Number__Alternatives_1_0();
state._fsp--;
if (state.failed) return ;
}
if ( state.backtracking==0 ) {
after(grammarAccess.getNumberAccess().getAlternatives_1_0());
}
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__Number__Group_1__0__Impl() 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:15133:1: ( ( ( rule__Number__Alternatives_1_0 ) ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:15134:1: ( ( rule__Number__Alternatives_1_0 ) )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:15134:1: ( ( rule__Number__Alternatives_1_0 ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:15135:1: ( rule__Number__Alternatives_1_0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getNumberAccess().getAlternatives_1_0()); \n }\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:15136:1: ( rule__Number__Alternatives_1_0 )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:15136:2: rule__Number__Alternatives_1_0\n {\n pushFollow(FOLLOW_rule__Number__Alternatives_1_0_in_rule__Number__Group_1__0__Impl30536);\n rule__Number__Alternatives_1_0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getNumberAccess().getAlternatives_1_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__Number__Group_1_1__1__Impl() 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:15224:1: ( ( ( rule__Number__Alternatives_1_1_1 ) ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:15225:1: ( ( rule__Number__Alternatives_1_1_1 ) )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:15225:1: ( ( rule__Number__Alternatives_1_1_1 ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:15226:1: ( rule__Number__Alternatives_1_1_1 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getNumberAccess().getAlternatives_1_1_1()); \n }\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:15227:1: ( rule__Number__Alternatives_1_1_1 )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:15227:2: rule__Number__Alternatives_1_1_1\n {\n pushFollow(FOLLOW_rule__Number__Alternatives_1_1_1_in_rule__Number__Group_1_1__1__Impl30717);\n rule__Number__Alternatives_1_1_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getNumberAccess().getAlternatives_1_1_1()); \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__Number__Group_1_1__1__Impl() 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:26343:1: ( ( ( rule__Number__Alternatives_1_1_1 ) ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:26344:1: ( ( rule__Number__Alternatives_1_1_1 ) )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:26344:1: ( ( rule__Number__Alternatives_1_1_1 ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:26345:1: ( rule__Number__Alternatives_1_1_1 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getNumberAccess().getAlternatives_1_1_1()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:26346:1: ( rule__Number__Alternatives_1_1_1 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:26346:2: rule__Number__Alternatives_1_1_1\r\n {\r\n pushFollow(FOLLOW_rule__Number__Alternatives_1_1_1_in_rule__Number__Group_1_1__1__Impl52903);\r\n rule__Number__Alternatives_1_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.getNumberAccess().getAlternatives_1_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__Number__Group_1__0__Impl() 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:26252:1: ( ( ( rule__Number__Alternatives_1_0 ) ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:26253:1: ( ( rule__Number__Alternatives_1_0 ) )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:26253:1: ( ( rule__Number__Alternatives_1_0 ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:26254:1: ( rule__Number__Alternatives_1_0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getNumberAccess().getAlternatives_1_0()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:26255:1: ( rule__Number__Alternatives_1_0 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:26255:2: rule__Number__Alternatives_1_0\r\n {\r\n pushFollow(FOLLOW_rule__Number__Alternatives_1_0_in_rule__Number__Group_1__0__Impl52722);\r\n rule__Number__Alternatives_1_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.getNumberAccess().getAlternatives_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__Number__Group_1__0__Impl() 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:13527:1: ( ( ( rule__Number__Alternatives_1_0 ) ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:13528:1: ( ( rule__Number__Alternatives_1_0 ) )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:13528:1: ( ( rule__Number__Alternatives_1_0 ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:13529:1: ( rule__Number__Alternatives_1_0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getNumberAccess().getAlternatives_1_0()); \n }\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:13530:1: ( rule__Number__Alternatives_1_0 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:13530:2: rule__Number__Alternatives_1_0\n {\n pushFollow(FOLLOW_rule__Number__Alternatives_1_0_in_rule__Number__Group_1__0__Impl27282);\n rule__Number__Alternatives_1_0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getNumberAccess().getAlternatives_1_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__Number__Group_1_1__1__Impl() 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:13618:1: ( ( ( rule__Number__Alternatives_1_1_1 ) ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:13619:1: ( ( rule__Number__Alternatives_1_1_1 ) )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:13619:1: ( ( rule__Number__Alternatives_1_1_1 ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:13620:1: ( rule__Number__Alternatives_1_1_1 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getNumberAccess().getAlternatives_1_1_1()); \n }\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:13621:1: ( rule__Number__Alternatives_1_1_1 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:13621:2: rule__Number__Alternatives_1_1_1\n {\n pushFollow(FOLLOW_rule__Number__Alternatives_1_1_1_in_rule__Number__Group_1_1__1__Impl27463);\n rule__Number__Alternatives_1_1_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getNumberAccess().getAlternatives_1_1_1()); \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__Number__Group_1_1__1__Impl() 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:15696:1: ( ( ( rule__Number__Alternatives_1_1_1 ) ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:15697:1: ( ( rule__Number__Alternatives_1_1_1 ) )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:15697:1: ( ( rule__Number__Alternatives_1_1_1 ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:15698:1: ( rule__Number__Alternatives_1_1_1 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getNumberAccess().getAlternatives_1_1_1()); \r\n }\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:15699:1: ( rule__Number__Alternatives_1_1_1 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:15699:2: rule__Number__Alternatives_1_1_1\r\n {\r\n pushFollow(FOLLOW_rule__Number__Alternatives_1_1_1_in_rule__Number__Group_1_1__1__Impl31729);\r\n rule__Number__Alternatives_1_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.getNumberAccess().getAlternatives_1_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__Number__Group_1__0__Impl() 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:14236:1: ( ( ( rule__Number__Alternatives_1_0 ) ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:14237:1: ( ( rule__Number__Alternatives_1_0 ) )\n {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:14237:1: ( ( rule__Number__Alternatives_1_0 ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:14238:1: ( rule__Number__Alternatives_1_0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getNumberAccess().getAlternatives_1_0()); \n }\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:14239:1: ( rule__Number__Alternatives_1_0 )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:14239:2: rule__Number__Alternatives_1_0\n {\n pushFollow(FOLLOW_rule__Number__Alternatives_1_0_in_rule__Number__Group_1__0__Impl28723);\n rule__Number__Alternatives_1_0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getNumberAccess().getAlternatives_1_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__Number__Group_1_1__1__Impl() 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:14327:1: ( ( ( rule__Number__Alternatives_1_1_1 ) ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:14328:1: ( ( rule__Number__Alternatives_1_1_1 ) )\n {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:14328:1: ( ( rule__Number__Alternatives_1_1_1 ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:14329:1: ( rule__Number__Alternatives_1_1_1 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getNumberAccess().getAlternatives_1_1_1()); \n }\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:14330:1: ( rule__Number__Alternatives_1_1_1 )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:14330:2: rule__Number__Alternatives_1_1_1\n {\n pushFollow(FOLLOW_rule__Number__Alternatives_1_1_1_in_rule__Number__Group_1_1__1__Impl28904);\n rule__Number__Alternatives_1_1_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getNumberAccess().getAlternatives_1_1_1()); \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__Number__Group_1_1__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:15210:1: ( ( ( rule__Number__Alternatives_1_1_1 ) ) )\r\n // InternalDroneScript.g:15211:1: ( ( rule__Number__Alternatives_1_1_1 ) )\r\n {\r\n // InternalDroneScript.g:15211:1: ( ( rule__Number__Alternatives_1_1_1 ) )\r\n // InternalDroneScript.g:15212:2: ( rule__Number__Alternatives_1_1_1 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getNumberAccess().getAlternatives_1_1_1()); \r\n }\r\n // InternalDroneScript.g:15213:2: ( rule__Number__Alternatives_1_1_1 )\r\n // InternalDroneScript.g:15213:3: rule__Number__Alternatives_1_1_1\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__Number__Alternatives_1_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.getNumberAccess().getAlternatives_1_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__Number__Group_3__1__Impl() 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:3897:1: ( ( ( rule__Number__Alternatives_3_1 ) ) )\n // ../org.iworkz.qon.ui/src-gen/org/iworkz/qon/ui/contentassist/antlr/internal/InternalQonDsl.g:3898:1: ( ( rule__Number__Alternatives_3_1 ) )\n {\n // ../org.iworkz.qon.ui/src-gen/org/iworkz/qon/ui/contentassist/antlr/internal/InternalQonDsl.g:3898:1: ( ( rule__Number__Alternatives_3_1 ) )\n // ../org.iworkz.qon.ui/src-gen/org/iworkz/qon/ui/contentassist/antlr/internal/InternalQonDsl.g:3899:1: ( rule__Number__Alternatives_3_1 )\n {\n before(grammarAccess.getNumberAccess().getAlternatives_3_1()); \n // ../org.iworkz.qon.ui/src-gen/org/iworkz/qon/ui/contentassist/antlr/internal/InternalQonDsl.g:3900:1: ( rule__Number__Alternatives_3_1 )\n // ../org.iworkz.qon.ui/src-gen/org/iworkz/qon/ui/contentassist/antlr/internal/InternalQonDsl.g:3900:2: rule__Number__Alternatives_3_1\n {\n pushFollow(FOLLOW_rule__Number__Alternatives_3_1_in_rule__Number__Group_3__1__Impl7784);\n rule__Number__Alternatives_3_1();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getNumberAccess().getAlternatives_3_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__Number__Group_3__0__Impl() 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:3868:1: ( ( ( rule__Number__Alternatives_3_0 ) ) )\n // ../org.iworkz.qon.ui/src-gen/org/iworkz/qon/ui/contentassist/antlr/internal/InternalQonDsl.g:3869:1: ( ( rule__Number__Alternatives_3_0 ) )\n {\n // ../org.iworkz.qon.ui/src-gen/org/iworkz/qon/ui/contentassist/antlr/internal/InternalQonDsl.g:3869:1: ( ( rule__Number__Alternatives_3_0 ) )\n // ../org.iworkz.qon.ui/src-gen/org/iworkz/qon/ui/contentassist/antlr/internal/InternalQonDsl.g:3870:1: ( rule__Number__Alternatives_3_0 )\n {\n before(grammarAccess.getNumberAccess().getAlternatives_3_0()); \n // ../org.iworkz.qon.ui/src-gen/org/iworkz/qon/ui/contentassist/antlr/internal/InternalQonDsl.g:3871:1: ( rule__Number__Alternatives_3_0 )\n // ../org.iworkz.qon.ui/src-gen/org/iworkz/qon/ui/contentassist/antlr/internal/InternalQonDsl.g:3871:2: rule__Number__Alternatives_3_0\n {\n pushFollow(FOLLOW_rule__Number__Alternatives_3_0_in_rule__Number__Group_3__0__Impl7724);\n rule__Number__Alternatives_3_0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getNumberAccess().getAlternatives_3_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__Number__Group_1__1__Impl() 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:26280:1: ( ( ( rule__Number__Group_1_1__0 )? ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:26281:1: ( ( rule__Number__Group_1_1__0 )? )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:26281:1: ( ( rule__Number__Group_1_1__0 )? )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:26282:1: ( rule__Number__Group_1_1__0 )?\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getNumberAccess().getGroup_1_1()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:26283:1: ( rule__Number__Group_1_1__0 )?\r\n int alt184=2;\r\n int LA184_0 = input.LA(1);\r\n\r\n if ( (LA184_0==61) ) {\r\n int LA184_1 = input.LA(2);\r\n\r\n if ( ((LA184_1>=RULE_INT && LA184_1<=RULE_DECIMAL)) ) {\r\n alt184=1;\r\n }\r\n }\r\n switch (alt184) {\r\n case 1 :\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:26283:2: rule__Number__Group_1_1__0\r\n {\r\n pushFollow(FOLLOW_rule__Number__Group_1_1__0_in_rule__Number__Group_1__1__Impl52779);\r\n rule__Number__Group_1_1__0();\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.getNumberAccess().getGroup_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__Number__Group_1__1__Impl() 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:15161:1: ( ( ( rule__Number__Group_1_1__0 )? ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:15162:1: ( ( rule__Number__Group_1_1__0 )? )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:15162:1: ( ( rule__Number__Group_1_1__0 )? )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:15163:1: ( rule__Number__Group_1_1__0 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getNumberAccess().getGroup_1_1()); \n }\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:15164:1: ( rule__Number__Group_1_1__0 )?\n int alt108=2;\n int LA108_0 = input.LA(1);\n\n if ( (LA108_0==16) ) {\n int LA108_1 = input.LA(2);\n\n if ( ((LA108_1>=RULE_INT && LA108_1<=RULE_DECIMAL)) ) {\n alt108=1;\n }\n }\n switch (alt108) {\n case 1 :\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:15164:2: rule__Number__Group_1_1__0\n {\n pushFollow(FOLLOW_rule__Number__Group_1_1__0_in_rule__Number__Group_1__1__Impl30593);\n rule__Number__Group_1_1__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getNumberAccess().getGroup_1_1()); \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__Number__Group_1_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:26301:1: ( rule__Number__Group_1_1__0__Impl rule__Number__Group_1_1__1 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:26302:2: rule__Number__Group_1_1__0__Impl rule__Number__Group_1_1__1\r\n {\r\n pushFollow(FOLLOW_rule__Number__Group_1_1__0__Impl_in_rule__Number__Group_1_1__052814);\r\n rule__Number__Group_1_1__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__Number__Group_1_1__1_in_rule__Number__Group_1_1__052817);\r\n rule__Number__Group_1_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__Number__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:26240:1: ( rule__Number__Group_1__0__Impl rule__Number__Group_1__1 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:26241:2: rule__Number__Group_1__0__Impl rule__Number__Group_1__1\r\n {\r\n pushFollow(FOLLOW_rule__Number__Group_1__0__Impl_in_rule__Number__Group_1__052692);\r\n rule__Number__Group_1__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__Number__Group_1__1_in_rule__Number__Group_1__052695);\r\n rule__Number__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 }",
"public final void rule__Number__Group_1__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:26269:1: ( rule__Number__Group_1__1__Impl )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:26270:2: rule__Number__Group_1__1__Impl\r\n {\r\n pushFollow(FOLLOW_rule__Number__Group_1__1__Impl_in_rule__Number__Group_1__152752);\r\n rule__Number__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__Number__Group_1_1__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:26332:1: ( rule__Number__Group_1_1__1__Impl )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:26333:2: rule__Number__Group_1_1__1__Impl\r\n {\r\n pushFollow(FOLLOW_rule__Number__Group_1_1__1__Impl_in_rule__Number__Group_1_1__152876);\r\n rule__Number__Group_1_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__Number__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:15121:1: ( rule__Number__Group_1__0__Impl rule__Number__Group_1__1 )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:15122:2: rule__Number__Group_1__0__Impl rule__Number__Group_1__1\n {\n pushFollow(FOLLOW_rule__Number__Group_1__0__Impl_in_rule__Number__Group_1__030506);\n rule__Number__Group_1__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__Number__Group_1__1_in_rule__Number__Group_1__030509);\n rule__Number__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 }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returning all the details of credit card having given cardNo and customerId. | @GetMapping(path="/customers/{customerId}/creditcard/{cardNo}", produces= {"application/json"})
public CreditCardDetails getDetails(@PathVariable("customerId") String customerId,@PathVariable("cardNo")String cardNo){
return creditCardServices.getCreditCardDetails(cardNo,customerId);
} | [
"@Override\r\n\tpublic CustomerCard getCustomerCard(Long cardId,String cardNumber) {\r\n\t\tQuery query=getSessionFactory().getCurrentSession().createQuery(\"from CustomerCard as cc where cc.cardId!=:cardId and cc.cardNumber=:cardNumber and cc.status!=:status\");\r\n\t\tquery.setParameter(\"cardId\", cardId);\r\n\t\tquery.setParameter(\"cardNumber\",cardNumber);\r\n\t\tquery.setParameter(\"status\", 3);\r\n\t\tList<CustomerCard> list= query.list();\t\r\n\t\treturn list.size()>0 ? list.get(0) :null;\r\n\t}",
"@Override\r\n\tpublic CustomerCard getCustomerCard(String cardNo) {\r\n\t\tQuery query=getSessionFactory().getCurrentSession().createQuery(\"from CustomerCard as cc where cc.cardNumber=:cardNo and cc.status=:=status\");\r\n\t\tquery.setParameter(\"cardNo\",cardNo);\r\n\t\tquery.setParameter(\"status\", 2);\r\n\t\tList<CustomerCard> list= query.list();\t\r\n\t\treturn list.size()>0 ? list.get(0) :null;\r\n\t}",
"CardDto getCustomerCardDetails(Long cardId) throws EOTException;",
"public static String findCreditCardsByCustomer(Customer cust) {\r\n\t\tint custId = cust.getId();\r\n\t\treturn \t\"SELECT * \" +\r\n\t\t\t\t\"FROM credit_card CR \" +\r\n\t\t\t\t\"WHERE (CR.cr_number, CR.exp) IN \" +\r\n\t\t\t\t\t\"(SELECT U.cr_number, U.cr_exp \" +\r\n\t\t\t\t\t\"FROM uses_card U \" +\r\n\t\t\t\t\t\"WHERE U.cid=\" + custId + \")\";\r\n\t}",
"public Customer getFullCustomerDetail(String customerId) throws RecordNotFoundException;",
"public CreditCard search(int donorID, String ccNumber) {\n for (Object creditCardObject : creditCardNumbers) {\n CreditCard creditCard = (CreditCard) creditCardObject;\n if (creditCard.getCreditCardId().equals(ccNumber) && creditCard.getDonorId()==donorID) {\n return creditCard;\n }\n }\n return null;\n }",
"CustomerBO findCustomer(String fidelityCardId);",
"@RequestMapping(value = \"/customers/{phoneNo}/calldetails\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic List<CallDetailsDTO> getCustomerCallDetails(@PathVariable long phoneNo) {\n\n\t\tlogger.info(\"Calldetails request for customer {}\", phoneNo);\n\n\t\treturn callDetailsService.getCustomerCallDetails(phoneNo);\n\t}",
"@GetMapping(value = \"/showAllCards/{mobileno}\", produces = \"application/json\")\n\t\tpublic String showAllCardsByMobileno(@PathVariable String mobileno)\n\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tOptional<CardDetails> cadDetailsList = cservice.getCarddetailsByMobileno(mobileno);\n\t\t\treturn cadDetailsList.get().getCardno();\n\t\t\t}\n\t\t\tcatch(Exception ex)\n\t\t\t{\n\t\t\t\treturn \"NO CARD AVAILABLE --- ADD A CARD\";\n\t\t\t}\n }",
"@GetMapping(value = \"/customers/{phoneNo}/calldetails\", produces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic List<CallDetailsDTO> getCustomerCallDetails(@PathVariable long phoneNo) {\n\t\tlogger.info(\"Calldetails request for customer {}\", phoneNo);\n\t\treturn custService.getCustomerCallDetails(phoneNo);\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic QueryResponse getAllCards(String customerId) throws BaseException {\n\n\t\tlogger.debug(\"Enter CardService::getAllCards\");\n\t\t\n\t\tif (StringUtils.isBlank(customerId)) {\n\t\t\tlogger.error(\"IllegalArgumentException {}\", customerId);\n\t\t\tthrow new IllegalArgumentException(\"customerId cannot be empty or null\");\n\t\t}\n\n\t\t// prepare API url\n\t\tString apiUrl = requestContext.getBaseUrl().replaceAll(\"payments\", \"customers\") + \"{id}/cards\"\n\t\t\t\t.replaceAll(\"\\\\{format\\\\}\", \"json\").replaceAll(\"\\\\{\" + \"id\" + \"\\\\}\", customerId.toString());\n\t\tlogger.info(\"apiUrl - \" + apiUrl);\n\t\t\n\t\t// assign TypeReference for deserialization\n\t\tTypeReference<List<Card>> typeReference = new TypeReference<List<Card>>() {\n\t\t};\n\n\t\t// prepare service request\n\t\tRequest request = new Request.RequestBuilder(MethodType.GET, apiUrl).typeReference(typeReference)\n\t\t\t\t.context(requestContext).build();\n\n\t\t// make API call\n\t\tResponse response = sendRequest(request);\n\n\t\t// retrieve response\n\t\tList<Card> cards = (List<Card>) response.getResponseObject();\n\t\tQueryResponse queryResponse = new QueryResponse.Builder().cards(cards).build();\n\n\t\t// set additional attributes\n\t\tprepareResponse(request, response, queryResponse);\n\t\treturn queryResponse;\n\t}",
"private JsonObject getCreditCard() {\r\n\t\tJsonObject json = new JsonObject();\r\n\t\tCustomer customer = (Customer) ObjectContainer.currentUserLogin;\r\n\t\tjson.addProperty(\"customerID\", customer.getCustomerId());\r\n\t\tMessage msg = new Message(MessageType.GET_CREDIT_CARD_DETAILS_BY_ID, json.toString());\r\n\t\tClientUI.accept(msg);\r\n\t\treturn ObjectContainer.currentMessageFromServer.getMessageAsJsonObject();\r\n\t}",
"public void setCreditCardNo(String creditCardNo) {\n this.creditCardNo = creditCardNo;\n }",
"public Customer getCustomers(int customerId) {\n for(Customer customer:customers){\n if(customer.getId() == customerId){\n return customer;\n }\n }\n return null;\n }",
"public List<UserActiveSimCard> getUserActiveSimCardDetails(String custmerId) {\n\t\tMap<String, String> params = new HashMap<String, String>();\n\t\tSystem.out.println(\"UserActiveSimCard customerID****\"+custmerId);\n\t\tparams.put(\"customerID\", custmerId); \n\t\tUserActiveSimDetailsWebService userTokenWebService = new UserActiveSimDetailsWebService(params); \n\t\tUserActiveSimCardRs userTokenInfoRs = (UserActiveSimCardRs) userTokenWebService.getResponseObject();\n\t\treturn userTokenInfoRs.getUserActiveSimCard();\n\t}",
"public Card getCard(String customerId, String cardId) throws BaseException {\n\n\t\tlogger.debug(\"Enter CardService::getCard\");\n\t\t\n\t\tif (StringUtils.isBlank(customerId)) {\n\t\t\tlogger.error(\"IllegalArgumentException {}\", customerId);\n\t\t\tthrow new IllegalArgumentException(\"customerId cannot be empty or null\");\n\t\t}\n\n\t\tif (StringUtils.isBlank(cardId)) {\n\t\t\tlogger.error(\"IllegalArgumentException {}\", cardId);\n\t\t\tthrow new IllegalArgumentException(\"cardId cannot be empty or null\");\n\t\t}\n\n\t\t// prepare API url\n\t\tString apiUrl = requestContext.getBaseUrl().replaceAll(\"payments\", \"customers\") + \"{id}/cards/{card_id}\"\n\t\t\t\t.replaceAll(\"\\\\{format\\\\}\", \"json\").replaceAll(\"\\\\{\" + \"id\" + \"\\\\}\", customerId.toString())\n\t\t\t\t.replaceAll(\"\\\\{\" + \"card_id\" + \"\\\\}\", cardId);\n\t\tlogger.info(\"apiUrl - \" + apiUrl);\n\n\t\t// assign TypeReference for deserialization\n\t\tTypeReference<Card> typeReference = new TypeReference<Card>() {\n\t\t};\n\n\t\t// prepare service request\n\t\tRequest request = new Request.RequestBuilder(MethodType.GET, apiUrl).typeReference(typeReference)\n\t\t\t\t.context(requestContext).build();\n\n\t\t// make API call\n\t\tResponse response = sendRequest(request);\n\n\t\t// retrieve response\n\t\tCard cardResponse = (Card) response.getResponseObject();\n\n\t\t// set additional attributes\n\t\tprepareResponse(request, response, cardResponse);\n\t\treturn cardResponse;\n\t}",
"public Customer getCustomerBasicInformation(String custId);",
"public CreditCard getSelectedCardDetailsOnCheckout() {\n String[] cardDetails = Elements.findElement(RCPage.SHIPPING_AND_PAYMENT +\n (macys() ? \".credit_card_details\" : \".payment_credit_card_summary\")).getText().split(\"\\\\r?\\\\n\");\n String cardType = cardDetails[0];\n String maskedCardNumber = cardDetails[1];\n return CreditCards.getValidCards().stream()\n .filter(card -> card.getCardType().name.equalsIgnoreCase(cardType) &&\n (macys() ? card.getCardNumber() : StringUtils.right(card.getCardNumber(), 8))\n .replaceAll(\"\\\\d(?=\\\\d{4})\", \"*\").equals(maskedCardNumber)).findFirst()\n .orElseThrow(() -> new DataException(String.format(\"No valid cards of type %s \" + \"found\", cardType)));\n }",
"public CreditCard searchCard(String cardNumber) {\r\n\t\tfor (Iterator<CreditCard> iterator = creditCards.iterator(); iterator.hasNext();) {\r\n\t\t\tCreditCard creditCard = iterator.next();\r\n\t\t\tif ((creditCard.getCardNumber()).equals(cardNumber)) {\r\n\t\t\t\treturn creditCard;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
HMV node stroke width will be interpolated between a source and a destination value depending on its probability value. | public double getNodeStrokeDestinationWidth() {
return (_nodeStrokeDestinationWidth);
} | [
"public void setNodeStrokeDestinationWidth(double value) {\n _nodeStrokeDestinationWidth = value;\n }",
"public void setEdgeStrokeDestinationWidth(double value) {\n _edgeStrokeDestinationWidth = value;\n }",
"public void setEdgeStrokeSourceWidth(double value) {\n _edgeStrokeSourceWidth = value;\n }",
"public DoubleProperty getWidthProperty();",
"ReadOnlyDoubleProperty widthProperty();",
"public Edge(Cell source, Cell target) {\n\n this.source = source;\n this.target = target;\n this.addedMidPoints = false;\n midLineX = new SimpleDoubleProperty(0);\n\n DoubleBinding endX = source.translateXProperty().add(source.widthProperty().divide(2.0));\n DoubleBinding endY = source.translateYProperty().add(source.heightProperty());\n\n DoubleBinding startX = target.translateXProperty().add(target.widthProperty().divide(2.0));\n DoubleBinding startY = target.translateYProperty().add(0);\n\n path = new DirectedPath(startX, startY, endX, endY);\n checkAndAddMidPoints(startY, endY);\n path.addPoint(endX, endY.add(TreeLayout.V_SPACING / 4.));\n\n source.translateXProperty().addListener((observable, oldValue, newValue) -> {\n checkAndAddMidPoints(startY, endY);\n });\n\n target.translateYProperty().addListener((observable, oldValue, newValue) -> {\n checkAndAddMidPoints(startY, endY);\n });\n\n source.translateXProperty().addListener((observable, oldValue, newValue) -> {\n checkAndAddMidPoints(startY, endY);\n });\n target.translateYProperty().addListener((observable, oldValue, newValue) -> {\n checkAndAddMidPoints(startY, endY);\n });\n\n // Change the X of the midpoints depending on whether the target is above, below, or at the same\n // level as the source\n midLineX.bind(new When(target.rowLocationProperty.subtract(source.rowLocationProperty).lessThan(0))\n .then(new When(target.columnLocationProperty.subtract(source.columnLocationProperty).greaterThan(0))\n .then(endX.add(TreeLayout.H_SPACING / 2.))\n .otherwise(new When(target.columnLocationProperty.subtract(source.columnLocationProperty).lessThan(0))\n .then(startX.add(TreeLayout.H_SPACING / 2.))\n .otherwise(startX)))\n .otherwise(new When(target.columnLocationProperty.subtract(source.columnLocationProperty).greaterThan(0))\n .then(endX.add(TreeLayout.H_SPACING / 2.))\n .otherwise(new When(target.columnLocationProperty.subtract(source.columnLocationProperty).lessThan(0))\n .then(startX.add(TreeLayout.H_SPACING / 2.))\n .otherwise(startX))));\n\n if(source.getCellType() != Cell.CellType.BOTH || target.getCellType() != Cell.CellType.BOTH){\n path.setDashed(true);\n }\n getChildren().add(path);\n\n visible = new SimpleBooleanProperty(false);\n visibleProperty().bind(source.visibleProperty().and(target.visibleProperty())\n .and(allVisible.or(visible)));\n\n source.edges.add(this);\n target.edges.add(this);\n\n }",
"double setPenWidth(double pixels);",
"public DoubleProperty getHeightProperty();",
"public int getStrokeWeight() {\r\n return strokeWeight;\r\n }",
"void setLineWidth(float width) { }",
"void setNodeHeight(double value);",
"public float getStrokeWeight() {\n return strokeWeight;\n }",
"double getEdgeWeight();",
"public static Property<Float> lineGapWidth(Float value) {\n return new PaintProperty<>(\"line-gap-width\", value);\n }",
"public final Pen changeWidth(float width) {\n Color resultColor = this.color;\n LineStyle style = LineStyleUtils.getLineStyle(stroke);\n BasicStroke resultStroke = LineStyleUtils.getStroke(style, width);\n return new Pen(resultStroke, resultColor);\n }",
"protected double computePrefWidth(double aHeight) { return getWidth(); }",
"public static Property<Float> textHaloWidth(Float value) {\n return new PaintProperty<>(\"text-halo-width\", value);\n }",
"Double getWebThickness();",
"private void updateColourDistance() {\n int r1 = lowValueColour.getRed();\n int g1 = lowValueColour.getGreen();\n int b1 = lowValueColour.getBlue();\n int r2 = highValueColour.getRed();\n int g2 = highValueColour.getGreen();\n int b2 = highValueColour.getBlue();\n\n colourValueDistance = Math.abs(r1 - r2);\n colourValueDistance += Math.abs(g1 - g2);\n colourValueDistance += Math.abs(b1 - b2);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialises the segment parameters that are not directly defined during creation or reinitialisation of this ExposureSegment | protected void initSegment()
{
((AtmosphericPressure)ambientPressureAtStart).setHeight(heightAtStart);
((AtmosphericPressure)ambientPressureAtEnd).setHeight(heightAtEnd);
} | [
"protected void initSupportedIntensityMeasureParams() {\n\n // Create saParam:\n DoubleDiscreteConstraint periodConstraint = new DoubleDiscreteConstraint();\n for (int i = 0; i < period.length; i++) {\n periodConstraint.addDouble(new Double(period[i]));\n }\n periodConstraint.setNonEditable();\n\tsaPeriodParam = new PeriodParam(periodConstraint);\n\tsaDampingParam = new DampingParam();\n\tsaParam = new SA_Param(saPeriodParam, saDampingParam);\n\tsaParam.setNonEditable();\n\n\t// Create PGA Parameter (pgaParam):\n\tpgaParam = new PGA_Param();\n\tpgaParam.setNonEditable();\n\n\n // Add the warning listeners:\n saParam.addParameterChangeWarningListener(listener);\n pgaParam.addParameterChangeWarningListener(listener);\n\n // Put parameters in the supportedIMParams list:\n supportedIMParams.clear();\n supportedIMParams.addParameter(saParam);\n supportedIMParams.addParameter(pgaParam);\n\n }",
"protected void initProteinParms() {\n this.kmerSize = 8;\n this.inFile = null;\n this.idColumn = \"1\";\n this.protColumn = \"aa_sequence\";\n }",
"private void initParameters() {\n\n // Remove all existing parameters\n _parameters.clear(SECRET_KEY);\n _httpParams.clear(SECRET_KEY);\n\n // Since XINS 1.0.1: Use XINS 1.0 standard calling convention\n _httpParams.set(SECRET_KEY, \"_convention\", \"_xins-std\");\n\n // Add the diagnostic context ID to the parameter list, if there is one\n String contextID = NDC.peek();\n if (contextID != null && contextID.length() > 0) {\n _httpParams.set(SECRET_KEY, CONTEXT_ID_HTTP_PARAMETER_NAME, contextID);\n }\n\n // Add the function to the parameter list\n _httpParams.set(SECRET_KEY, \"_function\", _functionName);\n\n // XXX: For backwards compatibility, also add the parameter \"function\"\n // to the list of HTTP parameters. This is, however, very likely to\n // change in the future.\n _httpParams.set(SECRET_KEY, \"function\", _functionName);\n\n // Reset _asString so it will be re-initialized as necessary\n _asString = null;\n }",
"protected void initOtherParams() {\n\n // init other params defined in parent class\n super.initOtherParams();\n\n // the Component Parameter\n // first is default, the rest are all options (including default)\n componentParam = new ComponentParam(Component.AVE_HORZ, Component.AVE_HORZ);\n\n // the stdDevType Parameter\n StringConstraint stdDevTypeConstraint = new StringConstraint();\n stdDevTypeConstraint.addString(StdDevTypeParam.STD_DEV_TYPE_TOTAL);\n stdDevTypeConstraint.addString(StdDevTypeParam.STD_DEV_TYPE_NONE);\n stdDevTypeConstraint.addString(StdDevTypeParam.STD_DEV_TYPE_INTER);\n stdDevTypeConstraint.addString(StdDevTypeParam.STD_DEV_TYPE_INTRA);\n stdDevTypeConstraint.setNonEditable();\n stdDevTypeParam = new StdDevTypeParam(stdDevTypeConstraint);\n\n // add these to the list\n otherParams.addParameter(componentParam);\n otherParams.addParameter(stdDevTypeParam);\n\n }",
"protected void initSupportedIntensityMeasureParams() {\n\n\t\t// Create saParam:\n\t\tDoubleDiscreteConstraint periodConstraint = new DoubleDiscreteConstraint();\n\t\tTreeSet set = new TreeSet();\n\t\tEnumeration keys = coefficientsBJF.keys();\n\t\twhile (keys.hasMoreElements()) {\n\t\t\tBJF_1997_AttenRelCoefficients coeff = (BJF_1997_AttenRelCoefficients)\n\t\t\tcoefficientsBJF.get(keys.nextElement());\n\t\t\tif (coeff.period >= 0) {\n\t\t\t\tset.add(new Double(coeff.period));\n\t\t\t}\n\t\t}\n\t\tIterator it = set.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tperiodConstraint.addDouble( (Double) it.next());\n\t\t}\n\t\tperiodConstraint.setNonEditable();\n\t\tsaPeriodParam = new PeriodParam(periodConstraint);\n\t\tsaDampingParam = new DampingParam();\n\t\tsaParam = new SA_Param(saPeriodParam, saDampingParam);\n\t\tsaParam.setNonEditable();\n\n\t\t// Create PGA Parameter (pgaParam):\n\t\tpgaParam = new PGA_Param();\n\t\tpgaParam.setNonEditable();\n\n\t\t// Create PGV Parameter (pgvParam):\n\t\tpgvParam = new PGV_Param();\n\t\tpgvParam.setNonEditable();\n\n\t\t// The MMI parameter\n\t\tmmiParam = new MMI_Param();\n\n\t\t// Add the warning listeners:\n\t\tsaParam.addParameterChangeWarningListener(listener);\n\t\tpgaParam.addParameterChangeWarningListener(listener);\n\t\tpgvParam.addParameterChangeWarningListener(listener);\n\n\t\t// create supported list\n\t\tsupportedIMParams.clear();\n\t\tsupportedIMParams.addParameter(saParam);\n\t\tsupportedIMParams.addParameter(pgaParam);\n\t\tsupportedIMParams.addParameter(pgvParam);\n\t\tsupportedIMParams.addParameter(mmiParam);\n\n\t}",
"public Segment() {\n }",
"private void setSegmentParams( Segment segment,\n ParamElement[] params ) throws SedParsingException\n {\n for(int pii=0; pii < params.length; pii++)\n {\n String paramUtype = params[pii].getAttribute(VOTableKeywords._UTYPE);\n int utypeIdx = VOTableKeywords.getUtypeFromString( paramUtype, this.namespace );\n \n switch (utypeIdx)\n {\n case VOTableKeywords.DATAMODEL:\n // validate against the data model\n break;\n case VOTableKeywords.TYPE:\n segment.setType( this.newTextParam( params[ pii ] ));\n break;\n case VOTableKeywords.LENGTH:\n break;\n case VOTableKeywords.TIMESI:\n segment.setTimeSI( this.newTextParam( params[ pii ] ));\n break;\n case VOTableKeywords.SPECTRALSI:\n segment.setSpectralSI( this.newTextParam( params[ pii ] ));\n break;\n case VOTableKeywords.FLUXSI:\n segment.setFluxSI( this.newTextParam( params[ pii ] ));\n break;\n default:\n this.setCustomParam (segment, params[pii]);\n break;\n }\n }\n }",
"protected void initOtherParams() {\n\n\t\t// init other params defined in parent class\n\t\tsuper.initOtherParams();\n\n\t\t// the Component Parameter\n\t\t// first is default, the rest are all options (including default)\n\t\tcomponentParam = new ComponentParam(Component.AVE_HORZ, Component.AVE_HORZ,\n\t\t\t\tComponent.RANDOM_HORZ, Component.GREATER_OF_TWO_HORZ);\n\n\t\t// the stdDevType Parameter\n\t\tStringConstraint stdDevTypeConstraint = new StringConstraint();\n\t\tstdDevTypeConstraint.addString(StdDevTypeParam.STD_DEV_TYPE_TOTAL);\n\t\tstdDevTypeConstraint.addString(StdDevTypeParam.STD_DEV_TYPE_INTER);\n\t\tstdDevTypeConstraint.addString(StdDevTypeParam.STD_DEV_TYPE_INTRA);\n\t\tstdDevTypeConstraint.addString(StdDevTypeParam.STD_DEV_TYPE_NONE);\n\t\tstdDevTypeConstraint.setNonEditable();\n\t\tstdDevTypeParam = new StdDevTypeParam(stdDevTypeConstraint);\n\n\t\t// add these to the list\n\t\totherParams.addParameter(componentParam);\n\t\totherParams.addParameter(stdDevTypeParam);\n\n\t}",
"public UriSegment(String uriSegment) {\n this.pattern = extractPattern(uriSegment);\n this.paramId = extractParamId();\n this.paramClass = extractParamClass();\n this.paramField = extractParamField();\n this.paramMethod = extractParamMethod();\n this.segments = new HashSet<>();\n }",
"public SegmentedClassification()\r\n\t{\r\n\t\tidentifier = null;\r\n\t\tclassifications = null;\r\n\t\tmisc_info_info = null;\r\n\t\tmisc_info_key = null;\r\n\t\trole = null;\r\n\t\tsub_classifications = null;\r\n\t\tstart = Double.NaN;\r\n\t\tstop = Double.NaN;\r\n\t}",
"@Override\n public void setInitParams()\n {\n betaFF = 0.48; params.add(betaFF); estParams.add(0);\n betaGF = 0.01 * betaFF; params.add(betaGF); estParams.add(1);\n betaGG = 0.24; params.add(betaGG); estParams.add(2);\n betaFG = betaGF; params.add(betaFG); fixedParams.add(3);\n \n alphaFocal = 0.068; params.add(alphaFocal); estParams.add(4);\n alphaGlobal = 0.0; params.add(alphaGlobal); fixedParams.add(5);\n deltaFocal = 0.455; params.add(deltaFocal); estParams.add(6);\n deltaGlobal = 0.455; params.add(deltaGlobal); fixedParams.add(7);\n NFocal = 10.0e06; params.add(NFocal); fixedParams.add(8);\n NGlobal = 25.0e06; params.add(NGlobal); fixedParams.add(9);\n mu = 1/(60.0*365.25); params.add(mu); fixedParams.add(10);\n nu = 1.0/7.0; params.add(nu); fixedParams.add(11);\n \n initSFocal = 0.2918; params.add(initSFocal); estParams.add(12); //estimated as the fraction, not the absolute number\n initSGlobal = 0.5913; params.add(initSGlobal); fixedParams.add(13);\n \n //initIFocal = 0.00019436; params.add(initIFocal); estParams.add(13); // was 0.0005;\n //initIGlobal = 0.00028877;\n \n fNoise = 0.0; params.add(fNoise); fixedParams.add(14);\n kappa = 0.999; params.add(kappa); fixedParams.add(15);\n muBirth = 0.0168/365.25; //set muBirth = mu for now\n \n \n }",
"protected void init() {\n \t\r\n ratios.put(1, 32.0f);\r\n ratios.put(2, 16.0f);\r\n ratios.put(3, 8.0f);\r\n ratios.put(4, 4.0f);\r\n ratios.put(5, 2.0f);\r\n ratios.put(6, 1.0f);\r\n }",
"protected void initIndependentParamLists() {\n\n\t\t// params that the mean depends upon\n\t\tmeanIndependentParams.clear();\n\t\tmeanIndependentParams.addParameter(distanceJBParam);\n\t\tmeanIndependentParams.addParameter(willsSiteParam);\n\t\tmeanIndependentParams.addParameter(magParam);\n\t\tmeanIndependentParams.addParameter(fltTypeParam);\n\t\tmeanIndependentParams.addParameter(componentParam);\n\n\t\t// params that the stdDev depends upon\n\t\tstdDevIndependentParams.clear();\n\t\tstdDevIndependentParams.addParameter(stdDevTypeParam);\n\t\tstdDevIndependentParams.addParameter(componentParam);\n\t\tstdDevIndependentParams.addParameter(magParam);\n\n\t\t// params that the exceed. prob. depends upon\n\t\texceedProbIndependentParams.clear();\n\t\texceedProbIndependentParams.addParameter(distanceJBParam);\n\t\texceedProbIndependentParams.addParameter(willsSiteParam);\n\t\texceedProbIndependentParams.addParameter(magParam);\n\t\texceedProbIndependentParams.addParameter(fltTypeParam);\n\t\texceedProbIndependentParams.addParameter(componentParam);\n\t\texceedProbIndependentParams.addParameter(stdDevTypeParam);\n\t\texceedProbIndependentParams.addParameter(this.sigmaTruncTypeParam);\n\t\texceedProbIndependentParams.addParameter(this.sigmaTruncLevelParam);\n\n\t\t// params that the IML at exceed. prob. depends upon\n\t\timlAtExceedProbIndependentParams.addParameterList(\n\t\t\t\texceedProbIndependentParams);\n\t\timlAtExceedProbIndependentParams.addParameter(exceedProbParam);\n\n\t}",
"private void createSegments () {\n // this call will remove each segment from the MarkerChangeListener list\n // of the start and end Marker objects of the segment. If we don't do\n // this the segments will not be garbage collected.\n stopSegmentsListening ();\n\n segments = new FeatureSegmentVector ();\n\n final Location location = getLocation ();\n\n final RangeVector ranges = location.getRanges ();\n\n for (int i = 0 ; i < ranges.size () ; ++i) {\n final Range this_range = ranges.elementAt (i);\n\n segments.add (makeSegment (this_range));\n }\n\n startSegmentsListening ();\n }",
"private void initializeDataMappings() {\n this.deviceIdStruct = new DeviceIdStruct();\n this.eventList = new EventList();\n this.header = new Header();\n this.parameterList = new ParameterList();\n this.methodList = new MethodList();\n this.fault = new Fault();\n }",
"private void initAdjSegList() {\n adjSegList = new ArrayList[vertices];\n\n for(int i = 0; i < vertices; i++) {\n adjSegList[i] = new ArrayList<>();\n }\n }",
"protected void initVars() {}",
"public void setSegment(Segment seg) {\r\n\t\tthis.segment = seg;\r\n\t}",
"public SegmentInformationTable()\n\t{\n\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of UnivariateGaussian using a weighted Maximum Likelihood estimate based on the given data | @Override
public StudentTDistribution.PDF learn(
final Collection<? extends WeightedValue<? extends Double>> data )
{
return WeightedMaximumLikelihoodEstimator.learn(
data, this.defaultVariance );
} | [
"public MultivariateGaussian createWeightDistribution();",
"public UnivariateGaussian evaluateAsGaussian(\n final Vectorizable input);",
"GaussianType createGaussianType();",
"public static WeightedMA getBackwardGaussianWeightedInstance(\n final int windowsize) {\n double sigma = (windowsize - 1) / 4.0;\n return getGaussianWeightedInstance(windowsize, windowsize - 1,\n sigma * sigma);\n }",
"public static WeightedMA getForwardGaussianWeightedInstance(\n final int windowsize) {\n double sigma = (windowsize - 1) / 4.0;\n return getGaussianWeightedInstance(windowsize, 0, sigma * sigma);\n }",
"public LinearGaussian(double[] values) {\n\t\tsuper();\n\t\tthis.values = values;\n\t\t\n\t\t/*calculate mean*/\n\t\tmean = Utilities.averageValueOfArray(values);\n\t\tvariance = Utilities.averageValueOfArray(varianceArray());\n\t}",
"public Gaussian() {\n\t}",
"@Factory\n public static GaussianDistribution normalDistribution() {\n return INSTANCE;\n }",
"public void testGetWeightPrior()\n {\n System.out.println(\"getWeightPrior\");\n BayesianRobustLinearRegression instance = this.createInstance();\n MultivariateGaussian prior = instance.getWeightPrior();\n assertNotNull( prior );\n }",
"public GaussFit(final double x[], final double y[])\n {\n final int N = checkArguments(x, y);\n\n // Perform the fit\n final CostFunction func = new Gaussian();\n final LevenbergMarquardt lm = new LevenbergMarquardt(N, 1);\n lm.setPoints(x, 0);\n lm.setCostFunction(func);\n lm.setValues(y);\n\n // LevenbergMarquardt needs some reasonable estimates for the\n // amplitude and center, which we get from the maximum of\n // the function\n final MinMaxFinder max = new MinMaxFinder(x, y);\n base = max.getMin();\n amp = max.getMax();\n center = max.getMaxPosition();\n // Assume the Gaussian uses about half of the x range\n sigma = (x[x.length-1] - x[0]) / 2.0;\n\n lm.setGuess(new double[] { amp, center, sigma });\n\n // solve it.\n lm.solve();\n\n // get params.\n amp = lm.getParameter(0);\n // For our data, the center position is a time, i.e. > 0\n center = Math.abs(lm.getParameter(1));\n // Fit might return sigma or -sigma, since that results\n // in the same gaussian function\n sigma = Math.abs(lm.getParameter(2));\n }",
"public void setGaussWeights(float peak, float low, int itmin, int itmax, int ntf) {\n float[] w = zerofloat(ntf);\n float center = (itmax+itmin)/2.0f;\n float width = (itmax-itmin)/2.0f;\n for (int i=0; i<ntf; ++i) {\n w[i] = peak*exp(-(i-center)*(i-center)/(2.0f*width*width))+low;\n }\n _w1D = w;\n _weights = true;\n }",
"public void setGaussWeights(float peak, float low, int itmin, int itmax, \n int ixmin, int ixmax, int ntf, int nx) {\n float[][] w = zerofloat(ntf,nx);\n float centert = (itmax+itmin)/2.0f;\n float centerx = (ixmax+ixmin)/2.0f;\n float widtht = (itmax-itmin)/2.0f;\n float widthx = (ixmax-ixmin)/2.0f;\n float x = 0.0f;\n float t = 0.0f;\n for (int ix=0; ix<nx; ++ix) {\n for (int it=0; it<ntf; ++it) {\n x = (ix-centerx)*(ix-centerx)/(2.0f*widthx*widthx); \n t = (it-centert)*(it-centert)/(2.0f*widtht*widtht); \n w[ix][it] = peak*exp(-(x+t))+low;\n }\n }\n _w2D = w;\n _weights = true;\n }",
"public interface MultivariateDistribution extends Cloneable, Serializable {\n /**\n * Computes the log of the probability density function. If the probability of\n * the input is zero, the log of zero would be {@link Double#NEGATIVE_INFINITY}.\n * Instead, -{@link Double#MAX_VALUE} is returned.\n *\n * @param x the array for the vector the get the log probability of\n * @return the log of the probability.\n * @throws ArithmeticException if the vector is not the correct length, or the\n * distribution has not yet been set\n */\n default public double logPdf(double... x) {\n return logPdf(DenseVector.toDenseVec(x));\n }\n\n /**\n * Computes the log of the probability density function. If the probability of\n * the input is zero, the log of zero would be {@link Double#NEGATIVE_INFINITY}.\n * Instead, -{@link Double#MAX_VALUE} is returned.\n *\n * @param x the vector the get the log probability of\n * @return the log of the probability.\n * @throws ArithmeticException if the vector is not the correct length, or the\n * distribution has not yet been set\n */\n public double logPdf(Vec x);\n\n /**\n * Returns the probability of a given vector from this distribution. By\n * definition, the probability will always be in the range [0, 1].\n *\n * @param x the array of the vector the get the log probability of\n * @return the probability\n * @throws ArithmeticException if the vector is not the correct length, or the\n * distribution has not yet been set\n */\n default public double pdf(double... x) {\n return pdf(DenseVector.toDenseVec(x));\n }\n\n /**\n * Returns the probability of a given vector from this distribution. By\n * definition, the probability will always be in the range [0, 1].\n *\n * @param x the vector the get the log probability of\n * @return the probability\n * @throws ArithmeticException if the vector is not the correct length, or the\n * distribution has not yet been set\n */\n default public double pdf(Vec x) {\n return Math.exp(logPdf(x));\n }\n\n /**\n * Sets the parameters of the distribution to attempt to fit the given list of\n * vectors. All vectors are assumed to have the same weight.\n *\n * @param <V> the vector type\n * @param dataSet the list of data points\n * @return <tt>true</tt> if the distribution was fit to the data, or\n * <tt>false</tt> if the distribution could not be fit to the data set.\n */\n default public <V extends Vec> boolean setUsingData(List<V> dataSet) {\n return setUsingData(dataSet, false);\n }\n\n /**\n * Sets the parameters of the distribution to attempt to fit the given list of\n * vectors. All vectors are assumed to have the same weight.\n *\n * @param <V> the vector type\n * @param dataSet the list of data points\n * @param parallel {@code true} if the training should be done using\n * multiple-cores, {@code false} for single threaded.\n * @return <tt>true</tt> if the distribution was fit to the data, or\n * <tt>false</tt> if the distribution could not be fit to the data set.\n */\n public <V extends Vec> boolean setUsingData(List<V> dataSet, boolean parallel);\n\n /**\n * Sets the parameters of the distribution to attempt to fit the given list of\n * data points. The {@link DataPoint#getWeight() weights} of the data points\n * will be used.\n *\n * @param dataPoints the list of data points to use\n * @return <tt>true</tt> if the distribution was fit to the data, or\n * <tt>false</tt> if the distribution could not be fit to the data set.\n */\n default public boolean setUsingDataList(List<DataPoint> dataPoints) {\n return setUsingData(dataPoints.stream().map(d -> d.getNumericalValues()).collect(Collectors.toList()));\n }\n\n /**\n * Sets the parameters of the distribution to attempt to fit the given list of\n * data points. The {@link DataPoint#getWeight() weights} of the data points\n * will be used.\n *\n * @param dataSet the data set to use\n * @return <tt>true</tt> if the distribution was fit to the data, or\n * <tt>false</tt> if the distribution could not be fit to the data set.\n */\n default public boolean setUsingData(DataSet dataSet) {\n return setUsingData(dataSet, false);\n }\n\n /**\n * Sets the parameters of the distribution to attempt to fit the given list of\n * data points. The {@link DataPoint#getWeight() weights} of the data points\n * will be used.\n *\n * @param dataSet the data set to use\n * @param parallel the source of threads for computation\n * @return <tt>true</tt> if the distribution was fit to the data, or\n * <tt>false</tt> if the distribution could not be fit to the data set.\n */\n default public boolean setUsingData(DataSet dataSet, boolean parallel) {\n return setUsingData(dataSet.getDataVectors(), parallel);\n }\n\n public MultivariateDistribution clone();\n\n /**\n * Performs sampling on the current distribution.\n *\n * @param count the number of iid samples to draw\n * @param rand the source of randomness\n * @return a list of sample vectors from this distribution\n */\n public List<Vec> sample(int count, Random rand);\n}",
"public Gaussian() {\r\n this(1, 0, 1);\r\n }",
"public static double RandGaussian () {\n\treturn (generador.genrand_gaussian());\n }",
"public void testSetWeightPrior()\n {\n System.out.println(\"setWeightPrior\");\n\n BayesianRobustLinearRegression instance = this.createInstance();\n MultivariateGaussian prior = instance.getWeightPrior();\n assertNotNull( instance );\n instance.setWeightPrior(null);\n assertNull( instance.getWeightPrior() );\n instance.setWeightPrior(prior);\n assertSame( prior, instance.getWeightPrior() );\n }",
"double gaussianPdf(double x, double mu, double sigma) {\n \t return pdf((x - mu) / sigma) / sigma;\n \t }",
"public static RegressionPrior gaussian(double[] priorVariances) {\n verifyPriorVariances(priorVariances);\n return new GaussianRegressionPrior(priorVariances);\n }",
"public GaussianFactor()\n {\n this.var=\"\";\n instantiate(0,1,Double.NEGATIVE_INFINITY,Double.POSITIVE_INFINITY);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
POST /aurestobills : Create a new auRestoBill. | @PostMapping("/au-resto-bills")
@Timed
public ResponseEntity<AuRestoBill> createAuRestoBill(@RequestBody AuRestoBill auRestoBill) throws URISyntaxException {
log.debug("REST request to save AuRestoBill : {}", auRestoBill);
if (auRestoBill.getId() != null) {
return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, "idexists", "A new auRestoBill cannot already have an ID")).body(null);
}
AuRestoBill result = auRestoBillRepository.save(auRestoBill);
auRestoBillSearchRepository.save(result);
return ResponseEntity.created(new URI("/api/au-resto-bills/" + result.getId()))
.headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))
.body(result);
} | [
"@PostMapping(\"/getBill\")\n\tpublic Bill createBill(@RequestBody Bill bill) {\n\t\treturn billController.calculateBill(bill);\n\t}",
"Bill createBill();",
"public static void createBillSummary() {\n \t\tSystem.out.println(\"\\n_______________ Bill Sumary INSERT _______________\");\n\n \t\tString uri = baseUri + \"/sobjects/Bill_Summary_Detail__c/\";\n \t\ttry {\n \t\t\t// get DB Connection\n \t\t\tConnection conn = getDBConnection();\n \t\t\tStatement stmt = conn.createStatement();\n \t\t\t\n \t\t\tString sql = \"SELECT Consumer_ID,to_char(Statement_Date_and_Time,'YYYY-MM-DD') Statement_Date_and_Time, Statement_Balance FROM BILL_SUMMARY\";\n \t\t\tResultSet rs = stmt.executeQuery(sql);\n \t\t\twhile (rs.next()) {\n \t\t\t\t// create the JSON object containing the new lead details.\n \t\t\t\tJSONObject lead = new JSONObject();\n \t\t\t\tlead.put(\"Statement_Date_and_Time__c\", rs.getString(\"Statement_Date_and_Time\"));\n \t\t\t\tlead.put(\"Statement_Balance__c\", rs.getString(\"Statement_Balance\"));\n \t\t\t\tlead.put(\"Consumer_ID__c\", rs.getString(\"Consumer_ID\"));\n\n \t\t\t\tSystem.out.println(\"JSON for lead record to be inserted:\\n\" + lead.toString(1));\n\n \t\t\t\t// Construct the objects needed for the request\n \t\t\t\tHttpClient httpClient = HttpClientBuilder.create().build();\n\n \t\t\t\tHttpPost httpPost = new HttpPost(uri);\n \t\t\t\thttpPost.addHeader(oauthHeader);\n \t\t\t\thttpPost.addHeader(prettyPrintHeader);\n \t\t\t\t// The message we are going to post\n \t\t\t\tStringEntity body = new StringEntity(lead.toString(1));\n \t\t\t\tbody.setContentType(\"application/json\");\n \t\t\t\thttpPost.setEntity(body);\n\n \t\t\t\t// Make the request\n \t\t\t\tHttpResponse response = httpClient.execute(httpPost);\n\n \t\t\t\t// Process the results\n \t\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n \t\t\t\tString statusMessage = response.getStatusLine().getReasonPhrase();\n \t\t\t\tif (statusCode == 201) {\n \t\t\t\t\tString response_string = EntityUtils.toString(response.getEntity());\n \t\t\t\t\tJSONObject json = new JSONObject(response_string);\n \t\t\t\t\t// Store the retrieved lead id to use when we update the lead.\n \t\t\t\t\tleadId = json.getString(\"id\");\n \t\t\t\t\tSystem.out.println(\"New Lead id from response: \" + leadId);\n \t\t\t\t} else {\n \t\t\t\t\tSystem.out.println(\n \t\t\t\t\t\t\t\"Insertion unsuccessful. Status code returned is \" + statusCode + \" \" + statusMessage);\n \t\t\t\t}\n \t\t\t}\n \t\t\trs.close();\n \t\t\tconn.close();\n \t\t} catch (JSONException e) {\n \t\t\tSystem.out.println(\"Issue creating JSON or processing results\");\n \t\t\te.printStackTrace();\n \t\t} catch (IOException ioe) {\n \t\t\tioe.printStackTrace();\n \t\t} catch (NullPointerException npe) {\n \t\t\tnpe.printStackTrace();\n \t\t} catch (SQLException se) {\n \t\t\t// Handle errors for JDBC\n \t\t\tse.printStackTrace();\n \t\t} catch (Exception e) {\n \t\t\t// Handle errors for Class.forName\n \t\t\te.printStackTrace();\n \t\t}\n \t}",
"au.gov.asic.types.fss.InvoiceType.AsicPaymentDetails.PostBillpay addNewPostBillpay();",
"@PostMapping\n public ResponseEntity<Boat> createBoat(@RequestBody Boat boat) {\n logger.info(\"Creating new boat with name: {}, quantity: {}\",\n boat.getName(), boat.getDescription());\n\n // Create the new boat\n Boat newBoat = boatService.save(boat);\n\n try {\n // Build a created response\n return ResponseEntity\n .created(new URI(\"/api/v1/boats\" ))\n //.eTag(Integer.toString(newBoat.getVersion()))\n .body(newBoat);\n } catch (URISyntaxException e) {\n return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).build();\n }\n }",
"Billing createBilling();",
"public Bill() {\n }",
"public static List<Boleto> create(List<Boleto> boletos) throws Exception {\n return Rest.post(data, boletos, null);\n }",
"cl.sii.siiDte.boletas.EnvioBOLETADocument.EnvioBOLETA addNewEnvioBOLETA();",
"@PostMapping(\"/bebidas\")\n @Timed\n public ResponseEntity<Bebida> createBebida(@RequestBody Bebida bebida) throws URISyntaxException {\n log.debug(\"REST request to save Bebida : {}\", bebida);\n if (bebida.getId() != null) {\n throw new BadRequestAlertException(\"A new bebida cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n Bebida result = bebidaRepository.save(bebida);\n return ResponseEntity.created(new URI(\"/api/bebidas/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"@PostMapping(\"/band-pruebas\")\n @Timed\n public ResponseEntity<BandPrueba> createBandPrueba(@RequestBody BandPrueba bandPrueba) throws URISyntaxException {\n log.debug(\"REST request to save BandPrueba : {}\", bandPrueba);\n if (bandPrueba.getId() != null) {\n throw new BadRequestAlertException(\"A new bandPrueba cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n BandPrueba result = bandPruebaService.save(bandPrueba);\n return ResponseEntity.created(new URI(\"/api/band-pruebas/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"@Test\n @Transactional\n void createBillsWithExistingId() throws Exception {\n bills.setId(1L);\n BillsDTO billsDTO = billsMapper.toDto(bills);\n\n int databaseSizeBeforeCreate = billsRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restBillsMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(billsDTO)))\n .andExpect(status().isBadRequest());\n\n // Validate the Bills in the database\n List<Bills> billsList = billsRepository.findAll();\n assertThat(billsList).hasSize(databaseSizeBeforeCreate);\n }",
"@POST(\"lugares/\")\n Call<Lugar> create(@Body Lugar lugar);",
"au.gov.asic.types.fss.InvoiceType.AsicPaymentDetails.Bpay addNewBpay();",
"Long addWayBill(WayBill wayBill);",
"@Test\n public void createBaasBusinessUsingPostTest() throws ApiException {\n CreateBaasBusinessCO baasBusinessCO = null;\n BaasBusinessVO response = api.createBaasBusinessUsingPost(baasBusinessCO);\n\n // TODO: test validations\n }",
"@PostMapping(\"/tour-bubbls\")\n public ResponseEntity<TourBubblDTO> createTourBubbl(@Valid @RequestBody TourBubblDTO tourBubblDTO) throws URISyntaxException {\n log.debug(\"REST request to save TourBubbl : {}\", tourBubblDTO);\n if (tourBubblDTO.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(\"tourBubbl\", \"idexists\", \"A new tourBubbl cannot already have an ID\")).body(null);\n }\n TourBubblDTO result = tourBubblService.save(tourBubblDTO);\n return ResponseEntity.created(new URI(\"/api/tour-bubbls/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(\"tourBubbl\", result.getId().toString()))\n .body(result);\n }",
"public static List<Boleto> create(List<Boleto> boletos, Project user) throws Exception {\n return Rest.post(data, boletos, user);\n }",
"com.bagnet.nettracer.ws.core.pojo.xsd.WSForwardItinerary addNewBaggageItinerary();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
play(Hand hand1, Hand hand2) FLUSH VS | @Test
public void play_FlushVsFlush() throws Exception {
Hand hand1 = new Hand();
hand1.addCard(new Card(Card.SUIT_HEARTS, Card.CARD_3));
hand1.addCard(new Card(Card.SUIT_HEARTS, Card.CARD_4));
hand1.addCard(new Card(Card.SUIT_HEARTS, Card.CARD_8));
hand1.addCard(new Card(Card.SUIT_HEARTS, Card.CARD_9));
hand1.addCard(new Card(Card.SUIT_HEARTS, Card.CARD_KING));
Hand hand2 = new Hand();
hand2.addCard(new Card(Card.SUIT_CLUBS, Card.CARD_5));
hand2.addCard(new Card(Card.SUIT_CLUBS, Card.CARD_7));
hand2.addCard(new Card(Card.SUIT_CLUBS, Card.CARD_8));
hand2.addCard(new Card(Card.SUIT_CLUBS, Card.CARD_JACK));
hand2.addCard(new Card(Card.SUIT_CLUBS, Card.CARD_ACE));
assertEquals(hand2, FiveCardDraw.play(hand1, hand2));
} | [
"@Test\n public void play_RoyalFlushVsStraightFlush() throws Exception {\n Hand hand1 = new Hand();\n hand1.addCard(new Card(Card.SUIT_DIAMONDS, Card.CARD_10));\n hand1.addCard(new Card(Card.SUIT_DIAMONDS, Card.CARD_JACK));\n hand1.addCard(new Card(Card.SUIT_DIAMONDS, Card.CARD_QUEEN));\n hand1.addCard(new Card(Card.SUIT_DIAMONDS, Card.CARD_KING));\n hand1.addCard(new Card(Card.SUIT_DIAMONDS, Card.CARD_ACE));\n Hand hand2 = new Hand();\n hand2.addCard(new Card(Card.SUIT_CLUBS, Card.CARD_8));\n hand2.addCard(new Card(Card.SUIT_CLUBS, Card.CARD_9));\n hand2.addCard(new Card(Card.SUIT_CLUBS, Card.CARD_10));\n hand2.addCard(new Card(Card.SUIT_CLUBS, Card.CARD_JACK));\n hand2.addCard(new Card(Card.SUIT_CLUBS, Card.CARD_QUEEN));\n assertEquals(hand1, FiveCardDraw.play(hand1, hand2));\n }",
"public void playRound() {\n\t\tSystem.out.println(hands[0].peek() + \" vs \" + hands[1].peek());\n\t\tif (hands[0].peek().compareTo(hands[1].peek()) > 0) {\n\t\t\tSystem.out.println(\"Player 1 wins the round!\");\n\t\t\thands[0].put(hands[1].remove());\n\t\t\thands[0].put(hands[0].remove());\n\t\t}\n\t\telse if (hands[1].peek().compareTo(hands[0].peek()) > 0) {\n\t\t\tSystem.out.println(\"Player 2 wins the round!\");\n\t\t\thands[1].put(hands[0].remove());\n\t\t\thands[1].put(hands[1].remove());\n\t\t} else { // WAR!\n\t\t\tStack<Card> pile = new Stack<Card>();\n\t\t\tCard curUp1 = hands[0].remove(); // the current up card of player 1\n\t\t\tCard curUp2 = hands[1].remove(); // the current up card of player 2\n\t\t\t// put the current up cards in the pile\n\t\t\tpile.put(curUp1);\n\t\t\tpile.put(curUp2);\n\t\t\t// WAR while the up cards are equal and both hands are not empty\n\t\t\twhile (curUp1.compareTo(curUp2) == 0\n\t\t\t\t\t&& !(hands[0].isEmpty() && hands[1].isEmpty())) {\n\t\t\t\tSystem.out.println(\"WAR!\");\n\t\t\t\t/* each player puts down 4 cards (or less, if they don't \n\t\t\t\t * have 4 cards), with the last one face up */\n\t\t\t\tfor (int i = 0; i < 4; i++) { \n\t\t\t\t\tif (!hands[0].isEmpty()) {\n\t\t\t\t\t\tpile.put(hands[0].peek());\n\t\t\t\t\t\tcurUp1 = hands[0].remove();\n\t\t\t\t\t} \n\t\t\t\t\tif (!hands[1].isEmpty()) {\n\t\t\t\t\t\tpile.put(hands[1].peek());\n\t\t\t\t\t\tcurUp2 = hands[1].remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(curUp1 + \" vs \" + curUp2);\n\t\t\t}\n\t\t\tif (curUp1.compareTo(curUp2) > 0) { // player 1 wins war\n\t\t\t\taddToHand(pile, hands[0]);\n\t\t\t\tSystem.out.println(\"Player 1 wins the war!\");\n\t\t\t} else if (curUp2.compareTo(curUp1) > 0) { // player 2 wins war\n\t\t\t\taddToHand(pile, hands[1]);\n\t\t\t\tSystem.out.println(\"Player 2 wins the war!\");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Player 1: \" + hands[0].size() + \" cards, \" \n\t\t\t\t+ \"Player 2: \" + hands[1].size() + \" cards\");\n\t\tSystem.out.println();\n\t\t\n\t}",
"public void play()\n\t{\n\t\tplay(1);\n\t}",
"private void humanPlay() {\n\t\twhile (p1.requestHit()\n\t\t\t\t&& p1Hand.checkBust() == false\n\t\t\t\t&& p1Hand.check21() == false) {\n\t\t\tString newCard = deck.draw();\n\t\t\tp1Hand.anotherDraw(newCard);\n\t\t\tSystem.out.println(\"You drew a \" + newCard);\n\t\t\tSystem.out.println(\"You have \" + p1Hand.getHand());\n\t\t\tif (p1Hand.checkBust() || p1Hand.check21()) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\tSystem.out.println(\"What would you like to do?\");\n\t\t\t}\n\t\t}\n\t}",
"@Test\n public void play_OnePairVsOnePair() throws Exception {\n Hand hand1 = new Hand();\n hand1.addCard(new Card(Card.SUIT_SPADES, Card.CARD_6));\n hand1.addCard(new Card(Card.SUIT_HEARTS, Card.CARD_7));\n hand1.addCard(new Card(Card.SUIT_DIAMONDS, Card.CARD_8));\n hand1.addCard(new Card(Card.SUIT_HEARTS, Card.CARD_8));\n hand1.addCard(new Card(Card.SUIT_DIAMONDS, Card.CARD_ACE));\n Hand hand2 = new Hand();\n hand2.addCard(new Card(Card.SUIT_DIAMONDS, Card.CARD_6));\n hand2.addCard(new Card(Card.SUIT_CLUBS, Card.CARD_7));\n hand2.addCard(new Card(Card.SUIT_SPADES, Card.CARD_9));\n hand2.addCard(new Card(Card.SUIT_CLUBS, Card.CARD_9));\n hand2.addCard(new Card(Card.SUIT_DIAMONDS, Card.CARD_10));\n assertEquals(hand2, FiveCardDraw.play(hand1, hand2));\n }",
"@Override\n public void playTurn() {\n checkLethal();\n \n tableAttackToKill();\n tableAttackToKill();\n \n playHand();\n \n tableAttackToKill();\n tableAttackToKill();\n \n playTableRandomly();\n }",
"@Test\n public void play_TwoPairVsTwoPair() throws Exception {\n Hand hand1 = new Hand();\n hand1.addCard(new Card(Card.SUIT_SPADES, Card.CARD_2));\n hand1.addCard(new Card(Card.SUIT_HEARTS, Card.CARD_2));\n hand1.addCard(new Card(Card.SUIT_DIAMONDS, Card.CARD_3));\n hand1.addCard(new Card(Card.SUIT_HEARTS, Card.CARD_3));\n hand1.addCard(new Card(Card.SUIT_DIAMONDS, Card.CARD_5));\n Hand hand2 = new Hand();\n hand2.addCard(new Card(Card.SUIT_SPADES, Card.CARD_8));\n hand2.addCard(new Card(Card.SUIT_HEARTS, Card.CARD_8));\n hand2.addCard(new Card(Card.SUIT_DIAMONDS, Card.CARD_9));\n hand2.addCard(new Card(Card.SUIT_HEARTS, Card.CARD_9));\n hand2.addCard(new Card(Card.SUIT_DIAMONDS, Card.CARD_10));\n assertEquals(hand2, FiveCardDraw.play(hand1, hand2));\n }",
"@Test\n\tpublic void testFlushP2Win() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"TEST: Player 2 Flush Win\");\n\t\tSystem.out.println(\"------------------------------\");\n\t\t\n\t\tGame tester = new Game();\n\t\t\n\t\tHand t1 = new Hand();\n\t\tHand t2 = new Hand();\n\t\t\n\t\tCard[] cards1 = new Card[5];\n\t\tCard[] cards2 = new Card[5];\n\t\t\n\t\tfor(int i = 0; i < 5; i++)\n\t\t{\n\t\t\tcards1[i] = new Card();\n\t\t\tcards2[i] = new Card();\n\t\t}\n\t\t\n\t\t// Test player 1\n\t\tcards1[0].setValue('5');\n\t\tcards1[1].setValue('6');\n\t\tcards1[2].setValue('7');\n\t\tcards1[3].setValue('8');\n\t\tcards1[4].setValue('9');\n\t\t\n\t\tcards1[0].setSuit(\"C\");\n\t\tcards1[1].setSuit(\"S\");\n\t\tcards1[2].setSuit(\"H\");\n\t\tcards1[3].setSuit(\"C\");\n\t\tcards1[4].setSuit(\"C\");\n\t\t\n\t\t// Test player 2\n\t\tcards2[0].setValue('2');\n\t\tcards2[1].setValue('2');\n\t\tcards2[2].setValue('2');\n\t\tcards2[3].setValue('5');\n\t\tcards2[4].setValue('3');\n\t\t\n\t\tcards2[0].setSuit(\"H\");\n\t\tcards2[1].setSuit(\"H\");\n\t\tcards2[2].setSuit(\"H\");\n\t\tcards2[3].setSuit(\"H\");\n\t\tcards2[4].setSuit(\"H\");\n\t\t\n\t\tt1.setHandSize(5);\n\t\tt2.setHandSize(5);\n\n\t\tt1.setHandCards(cards1);\n\t\tt2.setHandCards(cards2);\n\t\t\n\t\ttester.setUpGame();\n\t\ttester.dealPlayerHands();\n\t\ttester.getPlayers()[0].setHand(t1);\n\t\ttester.getPlayers()[1].setHand(t2);\n\t\ttester.sortHandsByValue();\n\t\ttester.outputPlayerHands();\n\t\ttester.findWinner();\n\t\ttester.outputPlayerHandType();\n\t\ttester.outputWinner();\n\t\t\n\t\tassertTrue(!tester.getPlayers()[0].getWinner());\n\t\tassertTrue(tester.getPlayers()[1].getWinner());\n\t\t\n\t\tassertTrue(tester.getPlayers()[1].getHand().getHandType() == \"Flush\");\n\t}",
"public void play() {\n\t\t// setting up\n\t\tdeck = new Deck();\n\t\tdeck.shuffle();\n\t\tint turn = 0;\n\t\tRandom rand = new Random();\n\t\tCardRank previousCardRank = null;\n\t\tboolean snapTime = false;\n\t\t\n\t\t// the turning card loop, which ends when two cards with the same value/rank are revealed\n\t\t// or when no cards are left in the deck\n\t\twhile (!snapTime) {\n\t\t\tString currentPlayer = (turn % 2 == 0) ? player1 : player2;\n\t\t\t\n\t\t\tint timeout = 1000 + rand.nextInt(1000);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tTimeUnit.MILLISECONDS.sleep((long) timeout);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tCard nextCard = deck.turnCard();\n\t\t\t\n\t\t\t// possible draw if no cards are left in the deck\n\t\t\tif (nextCard == null) {\n\t\t\t\tSystem.out.println(\"No cards left in the deck! It's a draw!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tSystem.out.println(currentPlayer + \" turns card \\'\" + nextCard + \"\\'\");\n\t\t\t\n\t\t\tturn++;\n\t\t\t\n\t\t\t// trigger the end of the turning card loop\n\t\t\tif (nextCard.getCardRank() == previousCardRank) {\n\t\t\t\tsnapTime = true;\n\t\t\t}\n\t\t\tpreviousCardRank = nextCard.getCardRank();\n\t\t}\n\t\t\n\t\t// simulate the time needed for both players to say \"SNAP!\"\n\t\tint snapTimeoutP1 = 500 + rand.nextInt(1000);\n\t\tint snapTimeoutP2 = 500 + rand.nextInt(1000);\n\t\t\n\t\t// rare draw situation, if the two players say \"SNAP!\" at the same time\n\t\tif (snapTimeoutP1 == snapTimeoutP2) {\n\t\t\ttry {\n\t\t\t\tTimeUnit.MILLISECONDS.sleep((long) snapTimeoutP1);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tSystem.out.println(\"SNAP! It's a draw!\");\n\t\t}\n\t\t// in most cases, a player will say \"SNAP!\" first, and they will be the winner\n\t\telse {\n\t\t\tString result = String.format(\"SNAP! %s is the winner!\", (snapTimeoutP1 < snapTimeoutP2) ? player1 : player2);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tTimeUnit.MILLISECONDS.sleep((long) Math.min(snapTimeoutP1, snapTimeoutP2));\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}\n\t}",
"public void playForward() {\n\tplay(PLAYER_FORWARD);\n }",
"@Test\n public void play_HighCardVsHighCard() throws Exception {\n Hand hand1 = new Hand();\n hand1.addCard(new Card(Card.SUIT_CLUBS, Card.CARD_3));\n hand1.addCard(new Card(Card.SUIT_SPADES, Card.CARD_6));\n hand1.addCard(new Card(Card.SUIT_HEARTS, Card.CARD_7));\n hand1.addCard(new Card(Card.SUIT_DIAMONDS, Card.CARD_9));\n hand1.addCard(new Card(Card.SUIT_HEARTS, Card.CARD_10));\n Hand hand2 = new Hand();\n hand2.addCard(new Card(Card.SUIT_DIAMONDS, Card.CARD_3));\n hand2.addCard(new Card(Card.SUIT_DIAMONDS, Card.CARD_6));\n hand2.addCard(new Card(Card.SUIT_CLUBS, Card.CARD_7));\n hand2.addCard(new Card(Card.SUIT_SPADES, Card.CARD_9));\n hand2.addCard(new Card(Card.SUIT_CLUBS, Card.CARD_JACK));\n assertEquals(hand2, FiveCardDraw.play(hand1, hand2));\n }",
"public void win() {\n try {\n win.play(1.0);\n } catch (Exception e) {\n }\n }",
"void undoPlay();",
"public void playWorkoutOver() {\n playEffect(WORKOUT_OVER_INDEX);\n }",
"public Player hand(Player turn, Player p1, Player p2, GameCriterion gc) throws RuntimeException {\n\t\thandCount += 1;\n\t\tAbstractCard c1 = p1.top();\n\t\tAbstractCard c2 = p2.top();\n\t\tint result = 0;\n\t\t\n\t\tif (!this.tie) {\n\t\t\tif (turn.equals(p1)) {\n\t\t\t\tlogger.info(p1 + \" selects attribute.\");\n\t\t\t\tattribute = p1.selectAttribute(c1);\n\t\t\t} else {\n\t\t\t\tlogger.info(p2 + \" selects attribute.\");\n\t\t\t\tattribute = p2.selectAttribute(c2);\n\t\t\t}\n\t\t}\t\t\n\n\t\tresult = gc.fight(c1, c2, attribute);\n\t\ttiePool.add(c1);\n\t\ttiePool.add(c2);\n\t\t\n\t\tif (result == GameCriterion.P1) {\n\t\t\tlogger.info(\"Pool cards won by \" + p1);\n\t\t\tp1.saveCards(tiePool);\n\t\t\ttiePool.clear();\n\t\t\tthis.tie = false;\n\t\t\tturn = p1;\n\t\t} else if (result == GameCriterion.P2) {\n\t\t\tlogger.info(\"Pool cards won by \" + p2);\n\t\t\tp2.saveCards(tiePool);\n\t\t\ttiePool.clear();\n\t\t\tthis.tie = false;\n\t\t\tturn = p2;\n\t\t} else if (result == GameCriterion.EQ) {\n\t\t\tlogger.info(\"[TIE] Cards added to tie pool.\");\n\t\t\tthis.tie = true;\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"Something happened @ hand\");\n\t\t}\n\t\t\n\t\tthis.getGameRecord().addHand(c1, c2, turn, attribute);\n\t\t\n\t\treturn turn;\n\t\t\n\t}",
"public void resetHand()\r\n\t{\r\n\t\thandCount = 0;\r\n\t\tstand = false;\r\n\t}",
"public void straightFlushTest()\n {\n System.out.println(\"\\f\");\n Card c1=new Card (\"red\",\"diamonds\",3,true);\n Card c2=new Card (\"red\",\"diamonds\",4,true);\n Card c3=new Card (\"red\",\"diamonds\",5,true);\n Card c4=new Card (\"red\",\"diamonds\",13,true);\n Card c5=new Card (\"red\",\"diamonds\",1,true);\n Card c6=new Card (\"red\",\"diamonds\",2,true);\n Card c7=new Card (\"red\",\"diamonds\",10,true);\n Card c8=new Card (\"red\",\"spades\",3,true);\n Card c9=new Card (\"red\",\"hearts\",3,true);\n PokerHand p=new PokerHand();\n p.add(0,c1);\n p.add(1,c2);\n p.add(2,c3);\n p.add(3,c4);\n p.add(4,c5);\n p.add(5,c6);\n p.add(6,c7);\n\n System.out.println(p.evaluate());\n System.out.println(p);\n System.out.println(\"\");\n p.set(0,c7);\n\n System.out.println(p.evaluate());\n System.out.println(p);\n\n System.out.println(\"\");\n p.set(0,c1);\n p.set(1,c2);\n p.set(2,c3);\n p.set(3,c8);\n p.set(4,c5);\n p.set(5,c6);\n p.set(6,c7);\n System.out.println(p);\n System.out.println(p.evaluate());\n \n System.out.println(\"\");\n p.set(6,c9);\n System.out.println(p);\n System.out.println(p.evaluate());\n }",
"private void playSound() {\n\t\tif(snoozeCounter==0) alarmSound.playAlarm();\n\t\telse alarmSound.playSnooze();\n\t}",
"public void playRound(){\n int roundScoreOne = 0;\n int roundScoreTwo = 0 ;\n this.handOne.drawNewHandFrom(gameDeck);\n this.handTwo.drawNewHandFrom(gameDeck);\n roundScoreOne = this.scoreHand(handOne, handTwo);\n roundScoreTwo = this.scoreHand(handTwo, handOne);\n\n System.out.println(\"Your hand: \");\n System.out.println(handOne.toString());\n System.out.println(\"Score: \" + roundScoreOne + \"\\n\");\n\n System.out.println(\"Opponent's hand: \");\n System.out.println(handTwo.toString());\n System.out.println(\"Score: \" + roundScoreTwo + \"\\n\");\n\n if (roundScoreOne > roundScoreTwo) {\n int updateAmount = roundScoreOne - roundScoreTwo;\n this.playerScore += updateAmount;\n System.out.println(\"You score \" + updateAmount + \" points !\");\n System.out.println(\"You: \" + playerScore);\n System.out.println(\"Opponent: \" + oppoScore);\n } else if (roundScoreTwo > roundScoreOne) {\n int updateAmount = roundScoreTwo - roundScoreOne;\n this.oppoScore += updateAmount;\n System.out.println(\"Opponent scores \" + updateAmount + \" points !\");\n System.out.println(\"You: \" + playerScore);\n System.out.println(\"Opponent: \" + oppoScore);\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use SCChatMessageResult.newBuilder() to construct. | private SCChatMessageResult(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
} | [
"private SCLobbyChatMessageResult(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private SCInteractionResult(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"public CommandResult(String message) {\n this.message = message;\n }",
"private SCCommandResult(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private SCTeamCreateResult(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private SCMembersResult(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private SendChatMessageRspMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public PersonsResult(String message) {\n this.message = message;\n this.success = false;\n }",
"private CSChatMessageRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private SCSyncTransResult(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private SCFollowClientResult(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private NotifyChatMessageRspMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"@Override\n public ResponsibilityResultMessage<TResult> createMessage() {\n return new ResponsibilityResultMessage<TResult>();\n }",
"private SCTeamKickResult(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"public PersonResult(String message){\n super(message);\n }",
"private SCSyncPlayerInfoResult(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private SCTeamInviteResult(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private ResultMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"public FillResult(String msg) {\n message = msg;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rulescheduleType" $ANTLR start "entryRulegenerateStatement" InternalMASL.g:4314:1: entryRulegenerateStatement returns [EObject current=null] : iv_rulegenerateStatement= rulegenerateStatement EOF ; | public final EObject entryRulegenerateStatement() throws RecognitionException {
EObject current = null;
EObject iv_rulegenerateStatement = null;
try {
// InternalMASL.g:4314:58: (iv_rulegenerateStatement= rulegenerateStatement EOF )
// InternalMASL.g:4315:2: iv_rulegenerateStatement= rulegenerateStatement EOF
{
if ( state.backtracking==0 ) {
newCompositeNode(grammarAccess.getGenerateStatementRule());
}
pushFollow(FOLLOW_1);
iv_rulegenerateStatement=rulegenerateStatement();
state._fsp--;
if (state.failed) return current;
if ( state.backtracking==0 ) {
current =iv_rulegenerateStatement;
}
match(input,EOF,FOLLOW_2); if (state.failed) return current;
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
} | [
"public final EObject rulescheduleStatement() throws RecognitionException {\n EObject current = null;\n\n Token this_SCHEDULE_0=null;\n Token this_DELTA_5=null;\n EObject this_expression_1 = null;\n\n EObject lv_g_2_0 = null;\n\n EObject lv_e_4_0 = null;\n\n EObject lv_e_6_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalMASL.g:4161:2: ( (this_SCHEDULE_0= RULE_SCHEDULE this_expression_1= ruleexpression ( (lv_g_2_0= rulegenerateStatement ) ) rulescheduleType ( (lv_e_4_0= ruleexpression ) ) (this_DELTA_5= RULE_DELTA ( (lv_e_6_0= ruleexpression ) ) )? ) )\n // InternalMASL.g:4162:2: (this_SCHEDULE_0= RULE_SCHEDULE this_expression_1= ruleexpression ( (lv_g_2_0= rulegenerateStatement ) ) rulescheduleType ( (lv_e_4_0= ruleexpression ) ) (this_DELTA_5= RULE_DELTA ( (lv_e_6_0= ruleexpression ) ) )? )\n {\n // InternalMASL.g:4162:2: (this_SCHEDULE_0= RULE_SCHEDULE this_expression_1= ruleexpression ( (lv_g_2_0= rulegenerateStatement ) ) rulescheduleType ( (lv_e_4_0= ruleexpression ) ) (this_DELTA_5= RULE_DELTA ( (lv_e_6_0= ruleexpression ) ) )? )\n // InternalMASL.g:4163:3: this_SCHEDULE_0= RULE_SCHEDULE this_expression_1= ruleexpression ( (lv_g_2_0= rulegenerateStatement ) ) rulescheduleType ( (lv_e_4_0= ruleexpression ) ) (this_DELTA_5= RULE_DELTA ( (lv_e_6_0= ruleexpression ) ) )?\n {\n this_SCHEDULE_0=(Token)match(input,RULE_SCHEDULE,FOLLOW_8); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tnewLeafNode(this_SCHEDULE_0, grammarAccess.getScheduleStatementAccess().getSCHEDULETerminalRuleCall_0());\n \t\t\n }\n if ( state.backtracking==0 ) {\n\n \t\t\tnewCompositeNode(grammarAccess.getScheduleStatementAccess().getExpressionParserRuleCall_1());\n \t\t\n }\n pushFollow(FOLLOW_57);\n this_expression_1=ruleexpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tcurrent = this_expression_1;\n \t\t\tafterParserOrEnumRuleCall();\n \t\t\n }\n // InternalMASL.g:4175:3: ( (lv_g_2_0= rulegenerateStatement ) )\n // InternalMASL.g:4176:4: (lv_g_2_0= rulegenerateStatement )\n {\n // InternalMASL.g:4176:4: (lv_g_2_0= rulegenerateStatement )\n // InternalMASL.g:4177:5: lv_g_2_0= rulegenerateStatement\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getScheduleStatementAccess().getGGenerateStatementParserRuleCall_2_0());\n \t\t\t\t\n }\n pushFollow(FOLLOW_58);\n lv_g_2_0=rulegenerateStatement();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getScheduleStatementRule());\n \t\t\t\t\t}\n \t\t\t\t\tset(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"g\",\n \t\t\t\t\t\tlv_g_2_0,\n \t\t\t\t\t\t\"org.xtuml.bp.ui.xtext.MASL.generateStatement\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n }\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n\n \t\t\tnewCompositeNode(grammarAccess.getScheduleStatementAccess().getScheduleTypeParserRuleCall_3());\n \t\t\n }\n pushFollow(FOLLOW_8);\n rulescheduleType();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tafterParserOrEnumRuleCall();\n \t\t\n }\n // InternalMASL.g:4201:3: ( (lv_e_4_0= ruleexpression ) )\n // InternalMASL.g:4202:4: (lv_e_4_0= ruleexpression )\n {\n // InternalMASL.g:4202:4: (lv_e_4_0= ruleexpression )\n // InternalMASL.g:4203:5: lv_e_4_0= ruleexpression\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getScheduleStatementAccess().getEExpressionParserRuleCall_4_0());\n \t\t\t\t\n }\n pushFollow(FOLLOW_59);\n lv_e_4_0=ruleexpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getScheduleStatementRule());\n \t\t\t\t\t}\n \t\t\t\t\tadd(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"e\",\n \t\t\t\t\t\tlv_e_4_0,\n \t\t\t\t\t\t\"org.xtuml.bp.ui.xtext.MASL.expression\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n }\n\n }\n\n\n }\n\n // InternalMASL.g:4220:3: (this_DELTA_5= RULE_DELTA ( (lv_e_6_0= ruleexpression ) ) )?\n int alt53=2;\n int LA53_0 = input.LA(1);\n\n if ( (LA53_0==RULE_DELTA) ) {\n alt53=1;\n }\n switch (alt53) {\n case 1 :\n // InternalMASL.g:4221:4: this_DELTA_5= RULE_DELTA ( (lv_e_6_0= ruleexpression ) )\n {\n this_DELTA_5=(Token)match(input,RULE_DELTA,FOLLOW_8); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\tnewLeafNode(this_DELTA_5, grammarAccess.getScheduleStatementAccess().getDELTATerminalRuleCall_5_0());\n \t\t\t\n }\n // InternalMASL.g:4225:4: ( (lv_e_6_0= ruleexpression ) )\n // InternalMASL.g:4226:5: (lv_e_6_0= ruleexpression )\n {\n // InternalMASL.g:4226:5: (lv_e_6_0= ruleexpression )\n // InternalMASL.g:4227:6: lv_e_6_0= ruleexpression\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\t\tnewCompositeNode(grammarAccess.getScheduleStatementAccess().getEExpressionParserRuleCall_5_1_0());\n \t\t\t\t\t\n }\n pushFollow(FOLLOW_2);\n lv_e_6_0=ruleexpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\t\tif (current==null) {\n \t\t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getScheduleStatementRule());\n \t\t\t\t\t\t}\n \t\t\t\t\t\tadd(\n \t\t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\t\"e\",\n \t\t\t\t\t\t\tlv_e_6_0,\n \t\t\t\t\t\t\t\"org.xtuml.bp.ui.xtext.MASL.expression\");\n \t\t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\t\n }\n\n }\n\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n\n \tleaveRule();\n\n }\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public final String entryRulescheduleType() throws RecognitionException {\n String current = null;\n\n AntlrDatatypeRuleToken iv_rulescheduleType = null;\n\n\n try {\n // InternalMASL.g:4280:52: (iv_rulescheduleType= rulescheduleType EOF )\n // InternalMASL.g:4281:2: iv_rulescheduleType= rulescheduleType EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getScheduleTypeRule()); \n }\n pushFollow(FOLLOW_1);\n iv_rulescheduleType=rulescheduleType();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_rulescheduleType.getText(); \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public final EObject entryRulescheduleStatement() throws RecognitionException {\n EObject current = null;\n\n EObject iv_rulescheduleStatement = null;\n\n\n try {\n // InternalMASL.g:4148:58: (iv_rulescheduleStatement= rulescheduleStatement EOF )\n // InternalMASL.g:4149:2: iv_rulescheduleStatement= rulescheduleStatement EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getScheduleStatementRule()); \n }\n pushFollow(FOLLOW_1);\n iv_rulescheduleStatement=rulescheduleStatement();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_rulescheduleStatement; \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public final String entryRuleCreateStatement() throws RecognitionException {\r\n String current = null;\r\n\r\n AntlrDatatypeRuleToken iv_ruleCreateStatement = null;\r\n\r\n\r\n try {\r\n // InternalDsl.g:5829:55: (iv_ruleCreateStatement= ruleCreateStatement EOF )\r\n // InternalDsl.g:5830:2: iv_ruleCreateStatement= ruleCreateStatement EOF\r\n {\r\n newCompositeNode(grammarAccess.getCreateStatementRule()); \r\n pushFollow(FOLLOW_1);\r\n iv_ruleCreateStatement=ruleCreateStatement();\r\n\r\n state._fsp--;\r\n\r\n current =iv_ruleCreateStatement.getText(); \r\n match(input,EOF,FOLLOW_2); \r\n\r\n }\r\n\r\n }\r\n\r\n catch (RecognitionException re) {\r\n recover(input,re);\r\n appendSkippedTokens();\r\n }\r\n finally {\r\n }\r\n return current;\r\n }",
"public final EObject rulegenerateStatement() throws RecognitionException {\n EObject current = null;\n\n Token this_GENERATE_0=null;\n Token this_LPAREN_2=null;\n Token this_RPAREN_4=null;\n Token this_TO_5=null;\n EObject this_argumentList_3 = null;\n\n EObject lv_e_6_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalMASL.g:4327:2: ( (this_GENERATE_0= RULE_GENERATE rulequalifiedEventName this_LPAREN_2= RULE_LPAREN this_argumentList_3= ruleargumentList this_RPAREN_4= RULE_RPAREN (this_TO_5= RULE_TO ( (lv_e_6_0= ruleexpression ) ) )? ) )\n // InternalMASL.g:4328:2: (this_GENERATE_0= RULE_GENERATE rulequalifiedEventName this_LPAREN_2= RULE_LPAREN this_argumentList_3= ruleargumentList this_RPAREN_4= RULE_RPAREN (this_TO_5= RULE_TO ( (lv_e_6_0= ruleexpression ) ) )? )\n {\n // InternalMASL.g:4328:2: (this_GENERATE_0= RULE_GENERATE rulequalifiedEventName this_LPAREN_2= RULE_LPAREN this_argumentList_3= ruleargumentList this_RPAREN_4= RULE_RPAREN (this_TO_5= RULE_TO ( (lv_e_6_0= ruleexpression ) ) )? )\n // InternalMASL.g:4329:3: this_GENERATE_0= RULE_GENERATE rulequalifiedEventName this_LPAREN_2= RULE_LPAREN this_argumentList_3= ruleargumentList this_RPAREN_4= RULE_RPAREN (this_TO_5= RULE_TO ( (lv_e_6_0= ruleexpression ) ) )?\n {\n this_GENERATE_0=(Token)match(input,RULE_GENERATE,FOLLOW_4); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tnewLeafNode(this_GENERATE_0, grammarAccess.getGenerateStatementAccess().getGENERATETerminalRuleCall_0());\n \t\t\n }\n if ( state.backtracking==0 ) {\n\n \t\t\tnewCompositeNode(grammarAccess.getGenerateStatementAccess().getQualifiedEventNameParserRuleCall_1());\n \t\t\n }\n pushFollow(FOLLOW_7);\n rulequalifiedEventName();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tafterParserOrEnumRuleCall();\n \t\t\n }\n this_LPAREN_2=(Token)match(input,RULE_LPAREN,FOLLOW_51); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tnewLeafNode(this_LPAREN_2, grammarAccess.getGenerateStatementAccess().getLPARENTerminalRuleCall_2());\n \t\t\n }\n if ( state.backtracking==0 ) {\n\n \t\t\tnewCompositeNode(grammarAccess.getGenerateStatementAccess().getArgumentListParserRuleCall_3());\n \t\t\n }\n pushFollow(FOLLOW_9);\n this_argumentList_3=ruleargumentList();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tcurrent = this_argumentList_3;\n \t\t\tafterParserOrEnumRuleCall();\n \t\t\n }\n this_RPAREN_4=(Token)match(input,RULE_RPAREN,FOLLOW_60); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tnewLeafNode(this_RPAREN_4, grammarAccess.getGenerateStatementAccess().getRPARENTerminalRuleCall_4());\n \t\t\n }\n // InternalMASL.g:4356:3: (this_TO_5= RULE_TO ( (lv_e_6_0= ruleexpression ) ) )?\n int alt55=2;\n int LA55_0 = input.LA(1);\n\n if ( (LA55_0==RULE_TO) ) {\n alt55=1;\n }\n switch (alt55) {\n case 1 :\n // InternalMASL.g:4357:4: this_TO_5= RULE_TO ( (lv_e_6_0= ruleexpression ) )\n {\n this_TO_5=(Token)match(input,RULE_TO,FOLLOW_8); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\tnewLeafNode(this_TO_5, grammarAccess.getGenerateStatementAccess().getTOTerminalRuleCall_5_0());\n \t\t\t\n }\n // InternalMASL.g:4361:4: ( (lv_e_6_0= ruleexpression ) )\n // InternalMASL.g:4362:5: (lv_e_6_0= ruleexpression )\n {\n // InternalMASL.g:4362:5: (lv_e_6_0= ruleexpression )\n // InternalMASL.g:4363:6: lv_e_6_0= ruleexpression\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\t\tnewCompositeNode(grammarAccess.getGenerateStatementAccess().getEExpressionParserRuleCall_5_1_0());\n \t\t\t\t\t\n }\n pushFollow(FOLLOW_2);\n lv_e_6_0=ruleexpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\t\tif (current==null) {\n \t\t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getGenerateStatementRule());\n \t\t\t\t\t\t}\n \t\t\t\t\t\tset(\n \t\t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\t\"e\",\n \t\t\t\t\t\t\tlv_e_6_0,\n \t\t\t\t\t\t\t\"org.xtuml.bp.ui.xtext.MASL.expression\");\n \t\t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\t\n }\n\n }\n\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n\n \tleaveRule();\n\n }\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public final EObject entryRuleGenerate() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleGenerate = null;\n\n\n try {\n // InternalDsl.g:9196:49: (iv_ruleGenerate= ruleGenerate EOF )\n // InternalDsl.g:9197:2: iv_ruleGenerate= ruleGenerate EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getGenerateRule()); \n }\n pushFollow(FOLLOW_1);\n iv_ruleGenerate=ruleGenerate();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleGenerate; \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public final String entryRuleType() throws RecognitionException {\n String current = null;\n\n AntlrDatatypeRuleToken iv_ruleType = null;\n\n\n try {\n // ../fr.imta.tp.calcDSL/src-gen/fr/imta/tp/parser/antlr/internal/InternalCalcDSL.g:208:2: (iv_ruleType= ruleType EOF )\n // ../fr.imta.tp.calcDSL/src-gen/fr/imta/tp/parser/antlr/internal/InternalCalcDSL.g:209:2: iv_ruleType= ruleType EOF\n {\n newCompositeNode(grammarAccess.getTypeRule()); \n pushFollow(FOLLOW_ruleType_in_entryRuleType411);\n iv_ruleType=ruleType();\n\n state._fsp--;\n\n current =iv_ruleType.getText(); \n match(input,EOF,FOLLOW_EOF_in_entryRuleType422); \n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"StartingRule createStartingRule();",
"public final void entryRuleGenerate() throws RecognitionException {\n try {\n // InternalDsl.g:2880:1: ( ruleGenerate EOF )\n // InternalDsl.g:2881:1: ruleGenerate EOF\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getGenerateRule()); \n }\n pushFollow(FOLLOW_1);\n ruleGenerate();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getGenerateRule()); \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }",
"public final EObject entryRuleType() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleType = null;\n\n\n try {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2094:2: (iv_ruleType= ruleType EOF )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2095:2: iv_ruleType= ruleType EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getTypeRule()); \n }\n pushFollow(FOLLOW_ruleType_in_entryRuleType4992);\n iv_ruleType=ruleType();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleType; \n }\n match(input,EOF,FOLLOW_EOF_in_entryRuleType5002); if (state.failed) return current;\n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"public final EObject entryRuleType() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleType = null;\n\n\n try {\n // ../com.telefonica.ietf.nemo/src-gen/com/telefonica/ietf/nemo/parser/antlr/internal/InternalNemoDSL.g:319:2: (iv_ruleType= ruleType EOF )\n // ../com.telefonica.ietf.nemo/src-gen/com/telefonica/ietf/nemo/parser/antlr/internal/InternalNemoDSL.g:320:2: iv_ruleType= ruleType EOF\n {\n newCompositeNode(grammarAccess.getTypeRule()); \n pushFollow(FOLLOW_ruleType_in_entryRuleType660);\n iv_ruleType=ruleType();\n\n state._fsp--;\n\n current =iv_ruleType; \n match(input,EOF,FOLLOW_EOF_in_entryRuleType670); \n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"StatementRule createStatementRule();",
"public final void entryRuleAstSchedule() throws RecognitionException {\n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:1013:1: ( ruleAstSchedule EOF )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:1014:1: ruleAstSchedule EOF\n {\n before(grammarAccess.getAstScheduleRule()); \n pushFollow(FOLLOW_ruleAstSchedule_in_entryRuleAstSchedule2101);\n ruleAstSchedule();\n\n state._fsp--;\n\n after(grammarAccess.getAstScheduleRule()); \n match(input,EOF,FOLLOW_EOF_in_entryRuleAstSchedule2108); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }",
"public final EObject entryRuleGenCodeStatement() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleGenCodeStatement = null;\n\n\n try {\n // InternalDsl.g:12877:57: (iv_ruleGenCodeStatement= ruleGenCodeStatement EOF )\n // InternalDsl.g:12878:2: iv_ruleGenCodeStatement= ruleGenCodeStatement EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getGenCodeStatementRule()); \n }\n pushFollow(FOLLOW_1);\n iv_ruleGenCodeStatement=ruleGenCodeStatement();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleGenCodeStatement; \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public final EObject entryRulecreateExpression() throws RecognitionException {\n EObject current = null;\n\n EObject iv_rulecreateExpression = null;\n\n\n try {\n // InternalMASL.g:7182:57: (iv_rulecreateExpression= rulecreateExpression EOF )\n // InternalMASL.g:7183:2: iv_rulecreateExpression= rulecreateExpression EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getCreateExpressionRule()); \n }\n pushFollow(FOLLOW_1);\n iv_rulecreateExpression=rulecreateExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_rulecreateExpression; \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public final EObject entryRulePatternStatement() throws RecognitionException {\n EObject current = null;\n\n EObject iv_rulePatternStatement = null;\n\n\n try {\n // InternalAgreeParser.g:1066:2: (iv_rulePatternStatement= rulePatternStatement EOF )\n // InternalAgreeParser.g:1067:2: iv_rulePatternStatement= rulePatternStatement EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getPatternStatementRule()); \n }\n pushFollow(FollowSets000.FOLLOW_1);\n iv_rulePatternStatement=rulePatternStatement();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_rulePatternStatement; \n }\n match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n }\n return current;\n }",
"public final void entryRuleType() throws RecognitionException {\r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:118:1: ( ruleType EOF )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:119:1: ruleType EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getTypeRule()); \r\n }\r\n pushFollow(FOLLOW_ruleType_in_entryRuleType188);\r\n ruleType();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getTypeRule()); \r\n }\r\n match(input,EOF,FOLLOW_EOF_in_entryRuleType195); 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 return ;\r\n }",
"public final EObject entryRuleType() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleType = null;\n\n\n try {\n // InternalPlayMorphiaModel.g:385:45: (iv_ruleType= ruleType EOF )\n // InternalPlayMorphiaModel.g:386:2: iv_ruleType= ruleType EOF\n {\n newCompositeNode(grammarAccess.getTypeRule()); \n pushFollow(FOLLOW_1);\n iv_ruleType=ruleType();\n\n state._fsp--;\n\n current =iv_ruleType; \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"E12Rule createE12Rule();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of addAnalysis method, of class AnalysisDB. | @Test
public void testAddAnalysis() {
ConnectionDB.requestInsert("insert into category values('Truc')");
ConnectionDB.requestInsert("insert into specie values('Lala','Truc')");
//Analysis priseSang = new Analysis();
//boolean resultat = AnalysisDB.addAnalysis(priseSang);
} | [
"@Test\r\n public void testAddAnalysis() {\r\n System.out.println(\"addAnalysis\");\r\n Analysis a = new Analysis(BigDecimal.ONE, BigDecimal.ONE, BigDecimal.ONE, null, 1, null, null, 1);\r\n assertEquals(0, w.analysies.size());\r\n w.addAnalysis(a);\r\n assertEquals(1, w.analysies.size());\r\n }",
"@Test\r\n public void testAddresults() throws Exception {\r\n System.out.println(\"addresults\");\r\n Casefile casefileCurrent = null;\r\n BigInteger idModelanalysis = null;\r\n String methodname = \"\";\r\n String mesureName = \"\";\r\n String rawresult = \"\";\r\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\r\n SamplesManager instance = (SamplesManager)container.getContext().lookup(\"java:global/classes/SamplesManager\");\r\n Analysis expResult = null;\r\n Analysis result = instance.addresults(casefileCurrent, idModelanalysis, methodname, mesureName, rawresult);\r\n assertEquals(expResult, result);\r\n container.close();\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 }",
"public void storeAnalysis(){\n\t}",
"public void addAnalysisByPatient(Analysis analysis, Patient patient){\n try {\n analysisDAO.addAnalysis(analysis, patient);\n log.info(analysisDAO);\n log.info(\"Analyzes was added!\");\n } catch (PersistenceException e) {\n e.printStackTrace();\n log.info(\"Analyzes was not added!\");\n }\n }",
"@Test\n public void testCheckAnalysisDuplicates() {\n System.out.println(\"checkAnalysisDuplicates\");\n Analysis ana = null;\n boolean expResult = false;\n boolean result = AnalysisDB.checkAnalysisDuplicates(ana);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"@Test\n public void add()\n {\n Record record = new Record(\"Record Test\", \"Path Test\", 0, 0, 0);\n assertTrue(dbManager.add(record));\n }",
"@Test\n public void testAdd() {\n System.out.println(\"testing add\");\n Arithmetic arithmetic = new Arithmetic(); \n \n assertEquals(\"unexpected result of addition\", 8, arithmetic.add(3,5));\n assertEquals(\"unexpected result of addition\", 6, arithmetic.add(0,6));\n assertEquals(\"unexpected result of addition\", -14, arithmetic.add(0,-14));\n assertEquals(\"unexpected result of addition\", 0, arithmetic.add(-5,5));\n assertEquals(\"unexpected result of addition\", -6, arithmetic.add(-12,6));\n \n }",
"public void testAddSample() {\r\n\t\tDatabase b = new Database();\r\n\t\tSamples s= b.searchSample(\"1\");\r\n\t\tb.storage.addSample(s);\r\n\t\tassertTrue(b.storage.listSample().size()==1);\r\n\t}",
"@Test\n public void testAdd() {\n System.out.println(\"add\");\n int cod = 0;\n int semestre = 0;\n String nombre = \"\";\n int cod_es = 0;\n cursoDAO instance = new cursoDAO();\n boolean expResult = false;\n boolean result = instance.add(cod, semestre, nombre, cod_es);\n assertEquals(expResult, result);\n \n }",
"ch.crif_online.www.webservices.crifsoapservice.v1_00.ScoreAnalysis addNewScoreAnalysis();",
"@Test\n\tpublic void testAdd() {\n\t\tDatabase T = new Database();\n\t\tT.add(\"amount\", \"900\");\n\t\tassertEquals(T.get().get(\"amount\"),\"900\");\n\t}",
"@Test\n public void testGetAnalysis_0args() {\n System.out.println(\"getAnalysis\");\n String[] expResult = null;\n String[] result = AnalysisDB.getAnalysis();\n assertArrayEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"@Test (dataProvider=\"testdata\")\r\n\r\n\r\n\r\n\t //public void testAdd(Integer exp, Inputs i) {\r\n\r\n\t public void testAdd(Integer exp, int a, int b) {\n\r\n\t assertEquals( exp, (Integer) calci.add(a,b));\r\n\r\n\t //fail(\"expected exceotion didn't occur\");\r\n\r\n\t //assertTrue(false);\r\n\r\n\t }",
"@Test\n\tvoid addReportDataToDBTest() {\n\t\tparkName = \"Haifa Park\";\n\t\tboolean condition = false;\n\t\tdate = new Date(120, 4, 1);\n\t\texpected = \"1 2 3 4 5 6 1 23 2 8 9 2 3 2 4 3 2 2 1 1 1 5 32 6 12 7 23 8 12 5 32 6 12 5 2 5\";\n\n\t\tString[] str = expected.split(\" \");\n\n\t\tif (ReportsController.CheckReportExistInDB(reportType, date, parkName))\n\t\t\tassertTrue(condition);\n\n\t\tReportsController.addReportToDB(reportType, date, new ArrayList<>(Arrays.asList(str)), parkName);\n\n\t\tresult = ReportsController.getReport(date, reportType, parkName);\n\n\t\tassertEquals(expected, result);\n\n\t}",
"private void executeAnalysisAndSaveResultsIntoDB() {\r\n\t\t\r\n\t\tSystem.out.println(\"Runnable: AsyncAnalysisRequestHandler: executeAnalysisAndSaveResultsIntoDB()\");\r\n\t\t\r\n\t\tlong initialTime = System.currentTimeMillis();\r\n\t\t\r\n\t\tAnalysisCentre analysisCentre = new AnalysisCentre();\r\n\t\tArrayList<BaseStock> resultStocks = analysisCentre.getAnalysisResultStocks(analysisDTO);\r\n\t\t\r\n\t\tString ownerUserName = analysisDTO.getOwnerUserName();\r\n\t\tString uuid = analysisDTO.getUuid();\r\n\t\t\r\n\t\tAnalysisResultsStorageDTO analysisResultsStorage = new AnalysisResultsStorageDTO(ownerUserName, uuid, resultStocks);\r\n\t\tAnalysisPersistence analysisPersistence = new AnalysisPersistence();\r\n\t\tanalysisPersistence.saveAnalysisResults(analysisResultsStorage);\r\n\t\t\r\n\t\tlong finalTime = System.currentTimeMillis();\r\n\t\tSystem.out.println(\"TE: \" + (finalTime - initialTime) + \" RS: \" + (resultStocks.size()));\r\n\t}",
"public ch.crif_online.www.webservices.crifsoapservice.v1_00.ScoreAnalysis addNewScoreAnalysis()\n {\n synchronized (monitor())\n {\n check_orphaned();\n ch.crif_online.www.webservices.crifsoapservice.v1_00.ScoreAnalysis target = null;\n target = (ch.crif_online.www.webservices.crifsoapservice.v1_00.ScoreAnalysis)get_store().add_element_user(SCOREANALYSIS$24);\n return target;\n }\n }",
"@SuppressWarnings(\"deprecation\")\n\t@Test\n public void testAdd() throws IOException {\n \t\n \tMatrix a = null;\n \tint m1[][]={{3,2,1},{1,2,3},{2,3,5}};\n \tint m2[][]={{1,2,3},{1,2,3},{2,0,1}};\n \tint m3[][]={{1,1,0},{2,1,1},{0,1,3}};\n \tint m4[][]={{5,5,4},{4,5,7},{4,4,9}};\n \t\n \t\n \n int result1[][]=a.add(m1,3,3,m2,3,3);\n int result2[][]=a.add(result1,3,3,m3,3,3);\n \n assertEquals(m4, result2);\n \n }",
"public void registerAnalysis( ICrystalAnalysis analysis){\n analyses.add(analysis);\n enabledAnalyses.add(analysis.getName());\n }",
"AbstractAnalysis getAnalysis();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
copy z (m), the successor of x, and put it instead of z, put z instead of x, delete m | private WAVLNode swap (WAVLNode x, WAVLNode z) {
WAVLNode ret = EXT_NODE;
WAVLNode m = new WAVLNode(); // create a copy of z
m.right=z.right;
m.left=z.left;
m.rank=z.rank;
m.parent=z.parent;
m.sizen=z.sizen;
m.info=z.info;
m.key=z.key;
WAVLNode aba = x.parent;
String side=null;
if (x.parent!=null) { //if x is not the root
side = parentside(x.parent, x); // keep the side of x related to x's parent
}
if(parentside(z.parent, z).equals("left")) { // put the copy of z in the correct side of z's parent
z.parent.left=m;
}
else {
z.parent.right=m;
}
// replace x with z
x.left.parent=z;
x.right.parent=z;
z.right=x.right;
z.left=x.left;
z.sizen=x.sizen;
z.rank=x.rank;
z.parent=x.parent;
if(aba!=null) { // if x is not the root
if(side.equals("left")) {// put z in the correct size of x's parent
aba.left=z;
}
else {
aba.right=z;
}
}
else { // x is the root, change root pointer to z
this.root=z;
}
return m;
} | [
"Position<Pair<K, V>> restructure(Position<Pair<K, V>> x) {\r\n Position<Pair<K, V>> y = parent(x);\r\n Position<Pair<K, V>> z = parent(y);\r\n if ((x == right(y)) == (y == right(z))) {\r\n rotate(y);\r\n return y;\r\n } else {\r\n rotate(x);\r\n rotate(x);\r\n return x;\r\n }\r\n }",
"public void removeFromZ(int z){\n\t\tcurrentSet().Z.remove(new Integer(z));\n\t\tcurrentSet().inZ[z] = false;\n\t}",
"private void treeDelete(Node z)\n {\n Node y;\n Node x;\n\n // Locate the node that actually needs to be removed.\n if (z.left == nil || z.right == nil)\n y = z;\n else\n y = successorNode(z);\n\n // Locate the subtree that needs to be joined back to the main tree. Note that if that y\n // will always have only one child. If z had two children, y is z's successor which, in that\n // case, would only have one child.\n // \n if (y.left != nil)\n x = y.left;\n else\n x = y.right;\n\n // Attach rest to the main tree (Part I).\n x.parent = y.parent;\n\n // Attach rest to the main tree (Part II).\n if (y.parent == nil)\n root = x;\n else if (y == y.parent.left)\n y.parent.left = x;\n else\n y.parent.right = x;\n\n // Copy key if necessary.\n if (y != z)\n z.key = y.key;\n\n // Update the count!\n count--;\n }",
"private WAVLNode successorForDel(WAVLNode x) {\n\t x.right.sizen--;\r\n\t x=x.right;\r\n\t while(x.left!=EXT_NODE) {\r\n\t\t x=x.left;\r\n\t\t x.sizen--;\r\n\t }\r\n\t return x;\r\n }",
"private Node deleteMinx(Node h) { \n if (h.left == null)\n return null;\n\n if (!isRed(h.left) && !isRed(h.left.left))\n h = moveRedLeft(h);\n\n h.left = deleteMin(h.left);\n return balance(h);\n }",
"public void compress(){\r\n\t\tfor(int i = 0; i <= (this.size+1)/2; i++){\r\n\t\t\tthis.remove(i+1);\r\n\t\t}\r\n\t}",
"private void rotate(Position<Pair<K, V>> p) {\r\n Node<Pair<K, V>> x = validate(p);\r\n Node<Pair<K, V>> y = x.getParent();\r\n Node<Pair<K, V>> z = y.getParent();\r\n\r\n if (z == null) {\r\n root = x;\r\n x.setParent(null);\r\n } else\r\n relink(z, x, y == z.getLeft());\r\n\r\n if (x == y.getLeft()) {\r\n relink(y, x.getRight(), true);\r\n relink(x, y, false);\r\n } else {\r\n relink(y, x.getLeft(), false);\r\n relink(x, y, true);\r\n }\r\n }",
"public static void moveOver(int[][]array, int x, int z)\r\n\t{\r\n\t\tint[] nextNum= array[x];\r\n\t\tfor(int y=x; y<z; y++)\r\n\t\t{\r\n\t\t\tint[] dummy = array[y+1];\r\n\t\t\tarray[y+1]= nextNum;\r\n\t\t\tnextNum = dummy;\r\n\t\t}\r\n\t}",
"@Override\n public void execute() {\n Collections.swap(m, a, b);\n }",
"private Node delete(Node x, int time) {\n\t\tif (x == null) return null;\n\n\t\tif (x.getTime() == time) {\n\t\t\tif (x.getLeft() == null && x.getRight() == null) return null;\n\t\t\tif (x.getLeft() == null || x.getRight() == null) {\n\t\t\t\treturn (x.getLeft() == null) ? x.getRight() : x.getLeft();\n\t\t\t}\n\t\t\t// Copy successor's data into x\n\t\t\tNode s = succ(x.getTime());\n\t\t\tx.setTime(s.getTime());\n\t\t\tx.setReq_index(s.getReq_index());\n\t\t\t// Then delete successor\n\t\t\tx.setRight(delete(x.getRight(), s.getTime()));\n\t\t\treturn x;\n\t\t}\n\t\tif (time < x.getTime()) {\n\t\t\tx.setLeft(delete(x.getLeft(), time));\n\t\t}\n\t\telse {\n\t\t\tx.setRight(delete(x.getRight(), time));\n\t\t}\n\t\treturn x;\n\t}",
"public static void moveOver(Comparable[]array, int x, int z)\r\n\t{\r\n\t\tComparable nextNum= array[x];\r\n\t\tfor(int y=x; y<z; y++)\r\n\t\t{\r\n\t\t\tComparable dummy = array[y+1];\r\n\t\t\tarray[y+1]= nextNum;\r\n\t\t\tnextNum = dummy;\r\n\t\t}\r\n\t}",
"public Position<Entry<K, V>> restructure(Position<Entry<K, V>> x)\n {\n Position<Entry<K, V>> y = parent(x);\n Position<Entry<K, V>> z = parent(y);\n\n if ((x == right(y)) == (y == right(z)))\n { // matching alignments\n rotate(y); // single rotation (of y)\n return y; // y is new subtree root\n }\n else\n { // opposite alignments\n // double rotation (of x)\n rotate(x);\n rotate(x);\n return x; // x is new subtree root\n }\n }",
"void copy(Node x) {\n\t\tthis.side = x.side;\n\t\tthis.height = x.height;\n\t\t\n\t\tthis.key = side*side*height;\n\t\t\n\t\tthis.calcMax();\n\t}",
"private Node<Value> delMin(Node<Value> x)\r\n {\r\n if (x.left == null) return x.right;\r\n x.left = delMin(x.left);\r\n return x;\r\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 static void reduceMonty(int[] x, int[] m, int mDash) // mDash = -m^(-1) mod b\n {\n\n int n = m.length;\n\n for (int i = n - 1; i >= 0; --i)\n {\n int x0 = x[n - 1];\n\n long t = (x0 * mDash) & IMASK;\n\n long carry = t * (m[n - 1] & IMASK) + (x0 & IMASK);\n// assert (int)carry == 0;\n carry >>>= 32;\n\n for (int j = n - 2; j >= 0; --j)\n {\n carry += t * (m[j] & IMASK) + (x[j] & IMASK);\n x[j + 1] = (int)carry;\n carry >>>= 32;\n }\n\n x[0] = (int)carry;\n// assert carry >>> 32 == 0;\n }\n\n if (compareTo(0, x, 0, m) >= 0)\n {\n subtract(0, x, 0, m);\n }\n }",
"private void cut(Node<V> x, Node<V> y)\r\n\t{\r\n\t\tx.left.right = x.right;\r\n\t\tx.right.left = x.left;\r\n\t\ty.degree--;\r\n\r\n\t\tif(y.child == x)\r\n\t\t{\r\n\t\t\ty.child = x.right;\r\n\t\t}\r\n\r\n\t\tif(y.degree == 0)\r\n\t\t{\r\n\t\t\ty.child = null;\r\n\t\t}\r\n\r\n\t\tx.left = min;\r\n\t\tx.right = min.right;\r\n\t\tmin.right = x;\r\n\t\tx.right.left = x;\r\n\r\n\t\tx.p = null;\r\n\r\n\t\tx.mark = false;\r\n\t}",
"public void delete(Node x) {\n if (!redoDone)\n redoStack.clear();\n else\n redoDone = false;\n BSTTrackingData log = new BSTTrackingData(x, x.left, x.right, x.parent, null, 'd');\n Boolean isRoot = x == root;\n Node toRemove = x;\n Node succ = null;\n if (x.left != null & x.right != null) { //if Case 3 - PartA change toRemove to the successor and remove it from the tree\n succ = successorForDelete(x); //use side function to get the successor (adjusted to improve retrack runtime)\n toRemove = succ;\n log.setSuccParent(succ.parent); //update log accordingly\n }\n stack.push(log);\n deleteUpToChild(toRemove); //function to handle removal of node with up to 1 child.\n if (succ != null) { //Case 3 part B - Place the successor in x's location in the tree.\n //update parent\n succ.parent = x.parent;\n if (isRoot) {\n root = succ;\n } else {\n if (x.parent.right == x) x.parent.right = succ;\n else x.parent.left = succ;\n }\n //update both children\n succ.right = x.right;\n if (x.right != null)\n x.right.parent = succ;\n succ.left = x.left;\n if (x.left != null)\n x.left.parent = succ;\n }\n\n }",
"private void duplicate(int[] x2, int[] z2, int[] x1, int[] z1) {\r\n\t\tint[] u = fieldUZ;\r\n\t\tint[] v = fieldTX;\r\n\t\tint[] w = fieldTZ;\r\n\t\tAddBigNbrModN(x1, z1, w, TestNbr, NumberLength); // w = x1+z1\r\n\t\tMontgomeryMult(w, w, u); // u = (x1+z1)^2\r\n\t\tSubtractBigNbrModN(x1, z1, w, TestNbr, NumberLength); // w = x1-z1\r\n\t\tMontgomeryMult(w, w, v); // v = (x1-z1)^2\r\n\t\tMontgomeryMult(u, v, x2); // x2 = u*v = (x1^2 - z1^2)^2\r\n\t\tSubtractBigNbrModN(u, v, w, TestNbr, NumberLength); // w = u-v = 4*x1*z1\r\n\t\tMontgomeryMult(fieldAA, w, u);\r\n\t\tAddBigNbrModN(u, v, u, TestNbr, NumberLength); // u = (v+b*w)\r\n\t\tMontgomeryMult(w, u, z2); // z2 = (w*u)\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GET /marketboxes/:id : get the "id" marketBox. | @GetMapping("/market-boxes/{id}")
@Timed
public ResponseEntity<MarketBox> getMarketBox(@PathVariable Long id) {
log.debug("REST request to get MarketBox : {}", id);
MarketBox marketBox = marketBoxService.findOne(id);
return ResponseUtil.wrapOrNotFound(Optional.ofNullable(marketBox));
} | [
"@GetMapping(\"/market-boxes\")\n @Timed\n public List<MarketBox> getAllMarketBoxes() {\n log.debug(\"REST request to get all MarketBoxes\");\n return marketBoxService.findAll();\n }",
"@GetMapping(\"/stock-in-boxes/{id}\")\n @Timed\n public ResponseEntity<StockInBoxDTO> getStockInBox(@PathVariable Long id) {\n log.debug(\"REST request to get StockInBox : {}\", id);\n StockInBoxDTO stockInBoxDTO = stockInBoxService.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(stockInBoxDTO));\n }",
"public Box getBox(int id) {\n return boxes.get(id);\n }",
"@DeleteMapping(\"/market-boxes/{id}\")\n @Timed\n public ResponseEntity<Void> deleteMarketBox(@PathVariable Long id) {\n log.debug(\"REST request to delete MarketBox : {}\", id);\n marketBoxService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"private Box getBox(List<Box> boxes, int id){\n for(Box box:boxes){\n if(box.getId()==id){\n return box;\n }\n }\n return null;\n }",
"@PostMapping(\"/market-boxes\")\n @Timed\n public ResponseEntity<MarketBox> createMarketBox(@RequestBody MarketBox marketBox) throws URISyntaxException {\n log.debug(\"REST request to save MarketBox : {}\", marketBox);\n if (marketBox.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"idexists\", \"A new marketBox cannot already have an ID\")).body(null);\n }\n MarketBox result = marketBoxService.save(marketBox);\n return ResponseEntity.created(new URI(\"/api/market-boxes/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"@GetMapping(\"/entryblock/{id}\")\n\tpublic EntryBlock getEntryBlockById(@PathVariable long id){\n\t\tOptional<EntryBlock> entryBlock = entryBlockRepo.findById(id);\n\n\t\tif (!entryBlock.isPresent()) \n\t\t\tResponseEntity.notFound().build();\n\n\t\treturn entryBlock.get();\n\t}",
"public MysteryBox getMysteryBox(int mbid) throws SQLException {\n PreparedStatement ps;\n ResultSet rs;\n ps = connection.prepareStatement(\"SELECT * FROM Mystery_Box WHERE (mbid = ?)\");\n ps.setInt(1, mbid);\n rs = ps.executeQuery();\n if (rs.next()) {\n int mysbid = rs.getInt(\"mbid\");\n int no_items = rs.getInt(\"no_items\");\n Date mdate = rs.getDate(\"mdate\");\n String theme = rs.getString(\"theme\");\n float cost = rs.getFloat(\"cost\");\n return new MysteryBox(mysbid, no_items, mdate, theme, cost);\n }\n ps.close();\n return null;\n }",
"public default <T> MarketDataBox<T> getValue(MarketDataId<T> id) {\n return findValue(id)\n .orElseThrow(() -> new MarketDataNotFoundException(Messages.format(\n \"Market data not found for '{}' of type '{}'\", id, id.getClass().getSimpleName())));\n }",
"public Market getLatestMarketInfo(int marketId) throws NoSnapshotsInDatabaseException, MarketNotFoundException {\n List<Market> latestMarkets = snapshotService.getLatestSnapshot().getMarkets();\n for (Market latestMarket : latestMarkets) {\n if (latestMarket.getId() == marketId) {\n return latestMarket;\n }\n }\n throw new MarketNotFoundException(\"No Market with PredictIt marketId: '\" + marketId + \"' was found in the latest Snapshot data. Market may be closed, check url of Market.\");\n }",
"@GetMapping(\"/resume/blocks/{id}\")\n @Timed\n public ResponseEntity<ResumeBlock> getResumeBlock(@PathVariable Long id) {\n log.debug(\"REST request to get ResumeBlock : {}\", id);\n ResumeBlock resumeBlock = resumeBlockRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(resumeBlock));\n }",
"public static Markets getMarketById(int index) {\n\t\treturn markets[index]; \n\t}",
"public abstract <T> Optional<MarketDataBox<T>> findValue(MarketDataId<T> id);",
"@GetMapping(\"/stock-in-boxes\")\n @Timed\n public ResponseEntity<List<StockInBoxDTO>> getAllStockInBoxes(@ApiParam Pageable pageable)\n throws URISyntaxException {\n log.debug(\"REST request to get a page of StockInBoxes\");\n Page<StockInBoxDTO> page = stockInBoxService.findAll(pageable);\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/stock-in-boxes\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }",
"@DeleteMapping(\"/stock-in-boxes/{id}\")\n @Timed\n public ResponseEntity<Void> deleteStockInBox(@PathVariable Long id) {\n log.debug(\"REST request to delete StockInBox : {}\", id);\n stockInBoxService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"public FoodBox getFoodById(int id);",
"int getMarketId();",
"ArrayList<Box> getBoxes(long drawingId) {\n ArrayList<Box> boxes = new ArrayList<>();\n\n if (drawingId != -1) {\n DrawingDatabaseHelper.BoxCursor cursor = mHelper.queryBoxes(drawingId);\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n boxes.add(cursor.getBox());\n cursor.moveToNext();\n }\n cursor.close();\n } else {\n Log.e(TAG, \"Box requested with no associated drawing. \", new Exception());\n }\n return boxes;\n }",
"public Box getBox(Position position)\n {\n return boxes[position.getX()][position.getY()];\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A class that implements this interface can tell if a given element should strip whitespace nodes from it's children. | public interface WhitespaceStrippingElementMatcher
{
/**
* Get information about whether or not an element should strip whitespace.
* @see <a href="http://www.w3.org/TR/xslt#strip">strip in XSLT Specification</a>
*
* @param support The XPath runtime state.
* @param targetElement Element to check
*
* @return true if the whitespace should be stripped.
*
* @throws TransformerException
*/
public boolean shouldStripWhiteSpace(
XPathContext support, Element targetElement) throws TransformerException;
/**
* Get information about whether or not whitespace can be stripped.
* @see <a href="http://www.w3.org/TR/xslt#strip">strip in XSLT Specification</a>
*
* @return true if the whitespace can be stripped.
*/
public boolean canStripWhiteSpace();
} | [
"public boolean isIgnoreElementContentWhitespace() {\n return ignoreElementContentWhitespace;\n }",
"public boolean canStripWhiteSpace();",
"private boolean stripElement(JCTree element, JCModifiers modifiers) {\n for (JCAnnotation a : modifiers.getAnnotations()) {\n String annotationName = a.getAnnotationType().toString().trim();\n if (stripAnnotationClasses.contains(annotationName)) {\n removeElement(element);\n return true;\n } else if (includeAnnotationClasses.contains(annotationName)) {\n removeElement(a);\n return false;\n }\n }\n // Strip an un-annotated element iff it's an unincluded outer class.\n boolean isClass = (element.getKind() == Tree.Kind.CLASS);\n if (isClass && !insideClass && !includeAnnotationClasses.isEmpty()) {\n removeElement(element);\n return true;\n }\n return false;\n }",
"public boolean elementOnlyContent();",
"public boolean isCharacterElementContentWhitespace(int nodeHandle) {return false;}",
"@Override\n public boolean hasAsElement(Object element) {\n // Re-implementation for reasons of efficiency.\n return getRootElement().equals(element);\n }",
"public boolean isWhiteSpace() {\n return node.getNodeType() == Node.TEXT_NODE && node.getTextContent().trim().length() == 0;\n }",
"private boolean elementHasSiblings(ARGState element) {\n return Iterables.getOnlyElement(element.getParents()).getChildren().size() > 1;\n }",
"protected boolean processElement() {\n // Check abort status.\n if (marlinContext.isAbort()) {\n if (logger.isDebugEnabled()) {\n logger.debug(this + \": startElement: aborting\");\n }\n\n return false;\n }\n \n // Check the ignore depth. Doing this here means that we will not do any\n // checking of ignored elements but is more efficient.\n if (marlinContext.getIgnoreDepth() > 0) {\n if (logger.isDebugEnabled()) {\n logger.debug(\n this + \": startElement: ignoring: depth = \" +\n marlinContext.getIgnoreDepth());\n }\n\n marlinContext.increaseIgnoreDepth();\n return false;\n }\n \n // We've got here so this element must be processed.\n return true;\n }",
"public void testXMLWhitespacePreservation() throws Exception {\n final String testString = \" la dee da\\t\";\n\n // test default\n assertXMLWhiteSpacePreservation(testString, testString, new Log());\n\n final Log logTrimmed = new Log();\n logTrimmed.setTrimWhitespace(true);\n assertXMLWhiteSpacePreservation(testString.trim(), testString, logTrimmed);\n\n final Log logWhitespacePreserved = new Log();\n logWhitespacePreserved.setTrimWhitespace(false);\n assertXMLWhiteSpacePreservation(testString, testString, logWhitespacePreserved);\n }",
"public boolean getTrimEmptyElements()\n {\n return configuration.trimEmpty;\n }",
"public boolean isIgnorableWhitespace() {\n\n if (needsSyncData()) {\n synchronizeData();\n }\n return internalIsIgnorableWhitespace();\n\n }",
"boolean hasChildNodes();",
"protected boolean processedElement() { \n // Check abort status.\n if (marlinContext.isAbort()) {\n if (logger.isDebugEnabled()) {\n logger.debug(this + \": endElement: aborting\");\n }\n\n return false;\n }\n \n // Check the ignore depth. Doing this here means that we will not do any\n // checking of ignored elements but is more efficient.\n if (marlinContext.getIgnoreDepth() > 0) {\n marlinContext.decreaseIgnoreDepth();\n if (marlinContext.getIgnoreDepth() > 0) {\n if (logger.isDebugEnabled()) {\n logger.debug(this + \": endElement: ignoring: depth = \" + \n marlinContext.getIgnoreDepth());\n }\n\n return false;\n } else {\n if (logger.isDebugEnabled()) {\n logger.debug(this + \": endElement: skipped\");\n }\n }\n }\n \n // If we get here then we did process the element.\n return true;\n }",
"boolean canNestElements();",
"private boolean hasTextOnlyChildren(final Node node) {\n\n Node child = node;\n\n if (child == null) {\n return false;\n }\n\n child = child.getFirstChild();\n while (child != null) {\n final int type = child.getNodeType();\n\n if (type == Node.ENTITY_REFERENCE_NODE) {\n return hasTextOnlyChildren(child);\n }\n\n if (type != Node.TEXT_NODE && type != Node.CDATA_SECTION_NODE) {\n return false;\n }\n child = child.getNextSibling();\n }\n return true;\n }",
"public boolean isTrimSpace() {\n\t\treturn trimSpace;\n\t}",
"public boolean isStripExtraWhiteSpace() {\n\t\treturn stripExtraWhiteSpace;\n\t}",
"public boolean trimNegativeBranches() {\n return root.trimNegativeBranches();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find out if this URLWatcher is watching a given URL. | public boolean isWatching(URL u) {
URLItem ui=getURLItem(u);
return(ui != null);
} | [
"boolean hasWatchUrl();",
"public synchronized boolean wasURLCrawled(String url) {\r\n return crawledURLs.contains(url);\r\n }",
"public boolean shouldScheduleURL(URLInfo url);",
"boolean isInScope(java.net.URL url);",
"private static boolean isWebserverReachable ( final URL _url ) {\r\n if ( !isAddressReachable( _url ) ) {\r\n return false;\r\n }\r\n\r\n try {\r\n HttpURLConnection connection = ( HttpURLConnection ) _url.openConnection( );\r\n connection.setRequestMethod( \"HEAD\" );\r\n int responseCode = connection.getResponseCode( );\r\n if ( responseCode == 200 ) {\r\n return true;\r\n }\r\n } catch ( IOException e ) {\r\n e.printStackTrace( );\r\n }\r\n\r\n\r\n return false;\r\n }",
"public boolean hasURL();",
"public boolean alreadyRecorded(String url) {\n boolean foundIt = false;\n\n if (internalLinks.contains(url)) {\n foundIt = true;\n } else if (externalLinks.contains(url)) {\n foundIt = true;\n } else if (staticLinks.contains(url)) {\n foundIt = true;\n }\n\n return foundIt;\n }",
"public boolean isSetURL()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(URL$8) != 0;\n }\n }",
"private Boolean isCacheCurrent(String url) {\n Boolean isCurrent = false;\n Long now = System.currentTimeMillis();\n \n if (lastChecked.containsKey(url) && (now - lastChecked.get(url)) < cacheTimeoutInMilliseconds) {\n isCurrent = true;\n }\n logger.debug(\"isCacheCurrent = \" + isCurrent + \" - cache key is \" + lastChecked.containsKey(url));\n\n return isCurrent;\n }",
"public boolean locate(String url);",
"public synchronized boolean ifShouldVisitMarkVisited(String URL) {\n\t\tString key = getKey(URL);\n\t\tif (alreadyVisited(key)) {\n\t\t\treturn false;\n\t\t}\n\t\t/*\n\t\t * Mark the current URL as 'visited' by storing it in the BloomFilter\n\t\t * so that no other thread continues further than this\n\t\t */\n\t\tmarkVisited(key);\n\t\treturn true;\n\t}",
"public boolean exists() {\n\t\tif (isURL) {\n\t\t\ttry {\n\t\t\t\turl.getContent();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tcatch (final IOException e) {\n\t\t\t\tlog().trace(\"Failed to retrieve content from URL\", e);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif (file.exists()) return true;\n\t\tif (locationService.getMappedFile(file.getPath()) != null) return true;\n\n\t\tfinal String mappedId = locationService.getMappedId(file.getPath());\n\t\treturn mappedId != null && new File(mappedId).exists();\n\t}",
"boolean hasReaderUrl();",
"private boolean taskForUrlAlreadyRunning(String url) {\n return imageDownloadTaskMap.get(url) != null;\n }",
"private static boolean checkURL(String url) {\n\t\tif (url.equals(\"None\"))\n\t\t\treturn true;\n\t\ttry {\n\t\t\tHttpURLConnection con = (HttpURLConnection) new URL(url).openConnection();\n\t\t\tcon.setRequestMethod(\"GET\");\n\t\t\treturn ((con.getResponseCode() == HttpURLConnection.HTTP_OK)\n\t\t\t\t\t|| (con.getResponseCode() == HttpURLConnection.HTTP_MOVED_TEMP));\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean urlsMatch() {\n\t\treturn getRequestUrl().toString().equalsIgnoreCase(getResponseUrl().toString());\n\t}",
"public boolean urlExists(String url) throws Exception {\n URL u = new URL ( url);\n HttpURLConnection huc = ( HttpURLConnection ) u.openConnection (); \n huc.setRequestMethod (\"GET\"); //OR huc.setRequestMethod (\"HEAD\"); \n huc.connect () ; \n int code = huc.getResponseCode() ;\n return code==200;\n }",
"boolean hasAppUrl();",
"public boolean isSetUrl() {\n return this.url != null;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears the value of the 'BRAND_KEY' field. | public org.LNDCDC_ADS_PRPSL.PROPOSAL_LINE.apache.nifi.LNDCDC_ADS_PRPSL_PROPOSAL_LINE.Builder clearBRANDKEY() {
BRAND_KEY = null;
fieldSetFlags()[9] = false;
return this;
} | [
"public void unsetBrandID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(BRANDID$4, 0);\n }\n }",
"void unsetBrandCode();",
"public void clearDebitKeyCode() {\n genClient.clear(CacheKey.debitKeyCode);\n }",
"void unsetBrandID();",
"public void setBRANDKEY(java.lang.Double value) {\n this.BRAND_KEY = value;\n }",
"public org.LNDCDC_ADS_PRPSL.PROPOSAL_LINE.apache.nifi.LNDCDC_ADS_PRPSL_PROPOSAL_LINE.Builder setBRANDKEY(java.lang.Double value) {\n validate(fields()[9], value);\n this.BRAND_KEY = value;\n fieldSetFlags()[9] = true;\n return this;\n }",
"public CampaignEditPage deleteEntryInBrandField()\r\n\t{\r\n\t\treadconfig();\t\r\n\t\t//counting the number of entry in the field\r\n\t\tint iCount = driver.findElements(By.xpath(library.getProperty(\"camp_edit_brand_number\"))).size();\r\n\t\tSystem.out.println(\"**brand: \"+iCount);\r\n\t\tfor (int i=0; i<iCount;i++)\r\n\t\t{\r\n\t\t\tdriver.findElement(By.xpath(library.getProperty(\"canp_edit_brand\"))).sendKeys(Keys.BACK_SPACE);\r\n\t\t}\r\n\t\treturn new CampaignEditPage(driver);\r\n\t}",
"public java.lang.Double getBRANDKEY() {\n return BRAND_KEY;\n }",
"void clearByKey(String key);",
"public java.lang.Double getBRANDKEY() {\n return BRAND_KEY;\n }",
"public ProgramsEditPage deleteEntryInBrandField()\r\n\t{\r\n\t\treadconfig();\t\r\n\t\t//counting the number of entry in the field\r\n\t\tint iCount = driver.findElements(By.xpath(manage.getProperty(\"program_edit_brand_number\"))).size();\r\n\t\tSystem.out.println(\"**brand: \"+iCount);\r\n\t\tfor (int i=0; i<iCount;i++)\r\n\t\t{\r\n\t\t\tdriver.findElement(By.xpath(manage.getProperty(\"program_edit_brand\"))).sendKeys(Keys.BACK_SPACE);\r\n\t\t}\r\n\t\t//return programs edit page\r\n\t\treturn new ProgramsEditPage(driver);\t\r\n\t}",
"public com.appanddata.alsme.model.avro.KeyValue.Builder clearKey() {\n key = null;\n fieldSetFlags()[0] = false;\n return this;\n }",
"public Builder clearClearkey() {\n bitField0_ = (bitField0_ & ~0x00000008);\n clearkey_ = null;\n if (clearkeyBuilder_ != null) {\n clearkeyBuilder_.dispose();\n clearkeyBuilder_ = null;\n }\n onChanged();\n return this;\n }",
"public no.ruter.avro.entity.actual.call.key.EntityPartition.Builder clearKey() {\n Key = null;\n fieldSetFlags()[0] = false;\n return this;\n }",
"public MediaGalleryEditPage deleteEntryInBrandField()\r\n\t{\r\n\t\treadconfig();\t\r\n\t\t//counting the number of entry in the field\r\n\t\tint iCount = driver.findElements(By.xpath(assets.getProperty(\"med_gallery_edit_brand_number\"))).size();\r\n\t\tSystem.out.println(\"**brand: \"+iCount);\r\n\t\tfor (int i=0; i<iCount;i++)\r\n\t\t{\r\n\t\t\tdriver.findElement(By.xpath(assets.getProperty(\"med_gallery_edit_brand\"))).sendKeys(Keys.BACK_SPACE);\r\n\t\t}\r\n\t\t//return series edit page\r\n\t\treturn new MediaGalleryEditPage(driver);\r\n\t}",
"public void clearCashAdvanceSerialNum() {\n genClient.clear(CacheKey.cashAdvanceSerialNum);\n }",
"public boolean hasBRANDKEY() {\n return fieldSetFlags()[9];\n }",
"public maestro.payloads.FlyerFeaturedItem.Builder clearBrandDisplayName() {\n brand_display_name = null;\n fieldSetFlags()[6] = false;\n return this;\n }",
"private void clearKeys() {\n \tSharedPreferences prefs = cordova.getContext().getSharedPreferences(ACCOUNT_PREFS_NAME, 0);\n Editor edit = prefs.edit();\n edit.clear();\n edit.commit();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method returns the Footer value. | @Fields({
@Field(offset = 66, length = 5, paddingChar = '\'')
})
public final String getFooter() {
return this.Footer;
} | [
"protected Footer getFooter() {\n return footer;\n }",
"String getPresentationFooter();",
"@Override\n public java.lang.String getFooter() {\n return _contestEmailTemplate.getFooter();\n }",
"protected String getPageFooter()\n {\n if (this.pageFooter == null) {\n String copyright = (this.privateLabel != null)? this.privateLabel.getCopyright() : \"\";\n StringBuffer sb = new StringBuffer();\n sb.append(\"<center>\");\n sb.append(\"<hr><span style='font-size:7pt;'>\" + copyright + \"</span>\");\n sb.append(\"</center>\");\n this.pageFooter = sb.toString();\n }\n return this.pageFooter;\n }",
"public Class<?> footer() {\n return footer;\n }",
"public abstract CharSequence getFooter();",
"public String getFooterFlag() {\n return footerFlag;\n }",
"public java.lang.String getFooterClass() {\n if (null != this.footerClass) {\n return this.footerClass;\n }\n ValueBinding _vb = getValueBinding(\"footerClass\");\n if (_vb != null) {\n return (java.lang.String) _vb.getValue(getFacesContext());\n } else {\n return null;\n }\n }",
"public String getPlayerListFooter ( ) {\n\t\treturn extract ( handle -> handle.getPlayerListFooter ( ) );\n\t}",
"@JsonProperty(\"footer\")\n public FooterSetting getFooterSetting() {\n return footerSetting;\n }",
"public trans.encoders.relayVote.DirFooter getDirectoryFooter() {\n return directory_footer;\n }",
"public trans.encoders.relayVote.DirFooter getDirectoryFooter() {\n return directory_footer;\n }",
"public String getEMailFooter();",
"int getFooterLayoutId();",
"public String createFooter(){\r\n String finalHTML = \"\";\r\n finalHTML += fileToString(\"commonEnd.html\");\r\n return finalHTML;\r\n }",
"String lastColumnFooter();",
"private static String footer() {\r\n String output = \"\";\r\n\r\n output += \"\\n\\\\end{document}\";\r\n\r\n return output;\r\n }",
"protected String getJSONFooter(){\t\n\t\tString rtn = \"\";\n\t\treturn rtn;\n\t}",
"public String getFooterLinkUrl() {\n\t\treturn footerLinkUrl;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of ListMetricEnrichmentStatusOptions. | public ListMetricEnrichmentStatusOptions(OffsetDateTime startTime,
OffsetDateTime endTime) {
this.startTime = startTime;
this.endTime = endTime;
} | [
"@Nonnull\n public com.microsoft.graph.requests.ManagedAppStatusCollectionRequestBuilder managedAppStatuses() {\n return new com.microsoft.graph.requests.ManagedAppStatusCollectionRequestBuilder(getRequestUrlWithAdditionalSegment(\"managedAppStatuses\"), getClient(), null);\n }",
"private void initElevatorStatusArray() {\r\n\t\t\televatorStatusArray = new ArrayList<ElevatorStatus>();\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < NUMBER_OF_ELEVATOR; i++) {\r\n\t\t\t\televatorStatusArray.add(new ElevatorStatus());\r\n\t\t\t}\r\n\t\t}",
"public String[] getMetricStatusNames();",
"private WindowsDefenderStatus(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private ContextProviderServiceStatus(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"@Nonnull\n public static UBL23WriterBuilder <TenderStatusType> tenderStatus ()\n {\n return UBL23WriterBuilder.create (TenderStatusType.class);\n }",
"@Nonnull\n public static UBL23WriterBuilder <TenderStatusRequestType> tenderStatusRequest ()\n {\n return UBL23WriterBuilder.create (TenderStatusRequestType.class);\n }",
"public static Option[] getStatusOptions () {\n return status_options;\n }",
"public TimeOffRequestQueryBody statuses(List<StatusesEnum> statuses) {\n this.statuses = statuses;\n return this;\n }",
"public com.diviso.graeshoppe.order.avro.Status.Builder getStatusBuilder() {\n if (statusBuilder == null) {\n if (hasStatus()) {\n setStatusBuilder(com.diviso.graeshoppe.order.avro.Status.newBuilder(status));\n } else {\n setStatusBuilder(com.diviso.graeshoppe.order.avro.Status.newBuilder());\n }\n }\n return statusBuilder;\n }",
"private GrpcStatusFilter(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public List<SelectItem> getStatusList() {\n\t\treturn getEnums(StatusEnum.class);\n\t}",
"public static MetricParameterBuilder metrics()\n {\n return new MetricParameterBuilder();\n }",
"com.cdiscount.www.ArrayOfDiscussionStateFilter addNewStatusList();",
"public java.util.List<entities.Torrent.NodeReplicationStatus> getNodeStatusListList() {\n if (nodeStatusListBuilder_ == null) {\n return java.util.Collections.unmodifiableList(nodeStatusList_);\n } else {\n return nodeStatusListBuilder_.getMessageList();\n }\n }",
"public BucketVersioningConfiguration(VersioningStatusEnum status)\n {\n this.status = status;\n }",
"List<PresenceStatus> getSupportedStatusSet();",
"@Nonnull\n public com.microsoft.graph.requests.ManagedAppStatusRequestBuilder managedAppStatuses(@Nonnull final String id) {\n return new com.microsoft.graph.requests.ManagedAppStatusRequestBuilder(getRequestUrlWithAdditionalSegment(\"managedAppStatuses\") + \"/\" + id, getClient(), null);\n }",
"void setStatusList(com.cdiscount.www.ArrayOfDiscussionStateFilter statusList);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the 'Inter contestable' attribute. | String getInter_contestable(); | [
"public String getcInterest() {\n return cInterest;\n }",
"@Override\n\tpublic int getContest_val() {\n\t\treturn _cholaContest.getContest_val();\n\t}",
"public java.lang.String getContraIndication() {\n\t\treturn contraIndication;\n\t}",
"public String getInscEstadual() {\n return inscEstadual;\n }",
"public @ContaminantDetectionStatus int getContaminantDetectionStatus() {\n return mContaminantDetectionStatus;\n }",
"public java.lang.String getCervixInjDetail () {\n\t\treturn cervixInjDetail;\n\t}",
"public java.lang.String getInjCervical () {\n\t\treturn injCervical;\n\t}",
"public String getSaijicd() {\r\n return saijicd;\r\n }",
"public int getContestId() {\n return contestId;\n }",
"public BigDecimal getINVESTMENT_ACC_CIF()\r\n {\r\n\treturn INVESTMENT_ACC_CIF;\r\n }",
"public double getInterest() {\n\n return interestEarned;\n\n }",
"public String getIvaFlag() {\n return (String) getAttributeInternal(IVAFLAG);\n }",
"public String getContestId() ;",
"public BigDecimal getCIF_INCOME()\r\n {\r\n\treturn CIF_INCOME;\r\n }",
"public long getContestId() {\r\n return contestId;\r\n }",
"public BigDecimal getACCRUED_INTEREST() {\r\n return ACCRUED_INTEREST;\r\n }",
"public int getInCombat() {\n return inCombat;\n }",
"public long getContestId() {\n return contestId;\n }",
"@Override\n\tpublic int getContest_code() {\n\t\treturn _cholaContest.getContest_code();\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Implementation__NameAssignment_1" $ANTLR start "rule__Implementation__ContextAssignment_2" ../com.avaloq.tools.dslsdk.check.ui/srcgen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:17961:1: rule__Implementation__ContextAssignment_2 : ( ruleContext ) ; | public final void rule__Implementation__ContextAssignment_2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:17965:1: ( ( ruleContext ) )
// ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:17966:1: ( ruleContext )
{
// ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:17966:1: ( ruleContext )
// ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:17967:1: ruleContext
{
if ( state.backtracking==0 ) {
before(grammarAccess.getImplementationAccess().getContextContextParserRuleCall_2_0());
}
pushFollow(FOLLOW_ruleContext_in_rule__Implementation__ContextAssignment_236102);
ruleContext();
state._fsp--;
if (state.failed) return ;
if ( state.backtracking==0 ) {
after(grammarAccess.getImplementationAccess().getContextContextParserRuleCall_2_0());
}
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__Implementation__Group__2__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:5096:1: ( ( ( rule__Implementation__ContextAssignment_2 ) ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:5097:1: ( ( rule__Implementation__ContextAssignment_2 ) )\r\n {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:5097:1: ( ( rule__Implementation__ContextAssignment_2 ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:5098:1: ( rule__Implementation__ContextAssignment_2 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getImplementationAccess().getContextAssignment_2()); \r\n }\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:5099:1: ( rule__Implementation__ContextAssignment_2 )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:5099:2: rule__Implementation__ContextAssignment_2\r\n {\r\n pushFollow(FOLLOW_rule__Implementation__ContextAssignment_2_in_rule__Implementation__Group__2__Impl10759);\r\n rule__Implementation__ContextAssignment_2();\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.getImplementationAccess().getContextAssignment_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__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 }",
"public final void rule__Context__Group__2__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:5316:1: ( ( ( rule__Context__ItAssignment_2 )? ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:5317:1: ( ( rule__Context__ItAssignment_2 )? )\r\n {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:5317:1: ( ( rule__Context__ItAssignment_2 )? )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:5318:1: ( rule__Context__ItAssignment_2 )?\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getContextAccess().getItAssignment_2()); \r\n }\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:5319:1: ( rule__Context__ItAssignment_2 )?\r\n int alt53=2;\r\n int LA53_0 = input.LA(1);\r\n\r\n if ( (LA53_0==RULE_ID) ) {\r\n alt53=1;\r\n }\r\n switch (alt53) {\r\n case 1 :\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:5319:2: rule__Context__ItAssignment_2\r\n {\r\n pushFollow(FOLLOW_rule__Context__ItAssignment_2_in_rule__Context__Group__2__Impl11195);\r\n rule__Context__ItAssignment_2();\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.getContextAccess().getItAssignment_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__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__Model__NameAssignment_2() throws RecognitionException {\n int rule__Model__NameAssignment_2_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 994) ) { return ; }\n // InternalGaml.g:16629:1: ( ( RULE_ID ) )\n // InternalGaml.g:16630:1: ( RULE_ID )\n {\n // InternalGaml.g:16630:1: ( RULE_ID )\n // InternalGaml.g:16631:1: RULE_ID\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getModelAccess().getNameIDTerminalRuleCall_2_0()); \n }\n match(input,RULE_ID,FollowSets000.FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getModelAccess().getNameIDTerminalRuleCall_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, 994, rule__Model__NameAssignment_2_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Activity__NameAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // InternalActivityDiagram.g:7113:1: ( ( ruleEString ) )\n // InternalActivityDiagram.g:7114:1: ( ruleEString )\n {\n // InternalActivityDiagram.g:7114:1: ( ruleEString )\n // InternalActivityDiagram.g:7115:1: ruleEString\n {\n before(grammarAccess.getActivityAccess().getNameEStringParserRuleCall_2_0()); \n pushFollow(FollowSets000.FOLLOW_2);\n ruleEString();\n\n state._fsp--;\n\n after(grammarAccess.getActivityAccess().getNameEStringParserRuleCall_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__Import__NameAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:10299:1: ( ( RULE_ID ) )\n // InternalOCLlite.g:10300:2: ( RULE_ID )\n {\n // InternalOCLlite.g:10300:2: ( RULE_ID )\n // InternalOCLlite.g:10301:3: RULE_ID\n {\n before(grammarAccess.getImportAccess().getNameIDTerminalRuleCall_2_0()); \n match(input,RULE_ID,FOLLOW_2); \n after(grammarAccess.getImportAccess().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 }",
"public final void rule__Program__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:2436:1: ( ( ( rule__Program__NameAssignment_2 ) ) )\n // InternalReflex.g:2437:1: ( ( rule__Program__NameAssignment_2 ) )\n {\n // InternalReflex.g:2437:1: ( ( rule__Program__NameAssignment_2 ) )\n // InternalReflex.g:2438:2: ( rule__Program__NameAssignment_2 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getProgramAccess().getNameAssignment_2()); \n }\n // InternalReflex.g:2439:2: ( rule__Program__NameAssignment_2 )\n // InternalReflex.g:2439:3: rule__Program__NameAssignment_2\n {\n pushFollow(FOLLOW_2);\n rule__Program__NameAssignment_2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getProgramAccess().getNameAssignment_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__Model__NameAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:3652:1: ( ( RULE_ID ) )\n // InternalCsv.g:3653:2: ( RULE_ID )\n {\n // InternalCsv.g:3653:2: ( RULE_ID )\n // InternalCsv.g:3654:3: RULE_ID\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getModelAccess().getNameIDTerminalRuleCall_2_0()); \n }\n match(input,RULE_ID,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getModelAccess().getNameIDTerminalRuleCall_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__Module__NameAssignment_2() 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:3868:1: ( ( RULE_ID ) )\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:3869:1: ( RULE_ID )\n {\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:3869:1: ( RULE_ID )\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:3870:1: RULE_ID\n {\n before(grammarAccess.getModuleAccess().getNameIDTerminalRuleCall_2_0()); \n match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__Module__NameAssignment_27749); \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 }",
"public final void rule__State__NameAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:9753:1: ( ( RULE_ID ) )\n // InternalReflex.g:9754:2: ( RULE_ID )\n {\n // InternalReflex.g:9754:2: ( RULE_ID )\n // InternalReflex.g:9755:3: RULE_ID\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getStateAccess().getNameIDTerminalRuleCall_2_0()); \n }\n match(input,RULE_ID,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getStateAccess().getNameIDTerminalRuleCall_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__Schema__NameAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:2012:1: ( ( ruleEString ) )\n // InternalMyDsl.g:2013:2: ( ruleEString )\n {\n // InternalMyDsl.g:2013:2: ( ruleEString )\n // InternalMyDsl.g:2014:3: ruleEString\n {\n before(grammarAccess.getSchemaAccess().getNameEStringParserRuleCall_2_0()); \n pushFollow(FOLLOW_2);\n ruleEString();\n\n state._fsp--;\n\n after(grammarAccess.getSchemaAccess().getNameEStringParserRuleCall_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__Process__NameAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:9678:1: ( ( RULE_ID ) )\n // InternalReflex.g:9679:2: ( RULE_ID )\n {\n // InternalReflex.g:9679:2: ( RULE_ID )\n // InternalReflex.g:9680:3: RULE_ID\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getProcessAccess().getNameIDTerminalRuleCall_2_0()); \n }\n match(input,RULE_ID,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getProcessAccess().getNameIDTerminalRuleCall_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__OclLModelElement__NameAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:11739:1: ( ( RULE_ID ) )\n // InternalOCLlite.g:11740:2: ( RULE_ID )\n {\n // InternalOCLlite.g:11740:2: ( RULE_ID )\n // InternalOCLlite.g:11741:3: RULE_ID\n {\n before(grammarAccess.getOclLModelElementAccess().getNameIDTerminalRuleCall_2_0()); \n match(input,RULE_ID,FOLLOW_2); \n after(grammarAccess.getOclLModelElementAccess().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 }",
"public final void rule__Module__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:2679:1: ( ( ( rule__Module__NameAssignment_2 ) ) )\n // InternalOCLlite.g:2680:1: ( ( rule__Module__NameAssignment_2 ) )\n {\n // InternalOCLlite.g:2680:1: ( ( rule__Module__NameAssignment_2 ) )\n // InternalOCLlite.g:2681:2: ( rule__Module__NameAssignment_2 )\n {\n before(grammarAccess.getModuleAccess().getNameAssignment_2()); \n // InternalOCLlite.g:2682:2: ( rule__Module__NameAssignment_2 )\n // InternalOCLlite.g:2682:3: rule__Module__NameAssignment_2\n {\n pushFollow(FOLLOW_2);\n rule__Module__NameAssignment_2();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getModuleAccess().getNameAssignment_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__Language__TargetAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:3712:1: ( ( ruleQualifiedName ) )\n // InternalCsv.g:3713:2: ( ruleQualifiedName )\n {\n // InternalCsv.g:3713:2: ( ruleQualifiedName )\n // InternalCsv.g:3714:3: ruleQualifiedName\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getLanguageAccess().getTargetQualifiedNameParserRuleCall_2_0()); \n }\n pushFollow(FOLLOW_2);\n ruleQualifiedName();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getLanguageAccess().getTargetQualifiedNameParserRuleCall_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__Function__NameAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalTym.g:3489:1: ( ( RULE_ID ) )\n // InternalTym.g:3490:2: ( RULE_ID )\n {\n // InternalTym.g:3490:2: ( RULE_ID )\n // InternalTym.g:3491:3: RULE_ID\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getFunctionAccess().getNameIDTerminalRuleCall_2_0()); \n }\n match(input,RULE_ID,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getFunctionAccess().getNameIDTerminalRuleCall_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__Query__NameAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:10314:1: ( ( RULE_ID ) )\n // InternalOCLlite.g:10315:2: ( RULE_ID )\n {\n // InternalOCLlite.g:10315:2: ( RULE_ID )\n // InternalOCLlite.g:10316:3: RULE_ID\n {\n before(grammarAccess.getQueryAccess().getNameIDTerminalRuleCall_2_0()); \n match(input,RULE_ID,FOLLOW_2); \n after(grammarAccess.getQueryAccess().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 }",
"public final void rule__Language__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:1180:1: ( ( ( rule__Language__TargetAssignment_2 ) ) )\n // InternalCsv.g:1181:1: ( ( rule__Language__TargetAssignment_2 ) )\n {\n // InternalCsv.g:1181:1: ( ( rule__Language__TargetAssignment_2 ) )\n // InternalCsv.g:1182:2: ( rule__Language__TargetAssignment_2 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getLanguageAccess().getTargetAssignment_2()); \n }\n // InternalCsv.g:1183:2: ( rule__Language__TargetAssignment_2 )\n // InternalCsv.g:1183:3: rule__Language__TargetAssignment_2\n {\n pushFollow(FOLLOW_2);\n rule__Language__TargetAssignment_2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getLanguageAccess().getTargetAssignment_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 }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Save an existing ProjectAppMajor entity | @RequestMapping("/saveProjectAppMajor")
public String saveProjectAppMajor(@ModelAttribute ProjectAppMajor projectappmajor) {
projectAppMajorService.saveProjectAppMajor(projectappmajor);
return "forward:/indexProjectAppMajor";
} | [
"@RequestMapping(\"/saveProjectAppMajorSchoolMajor\")\n\tpublic ModelAndView saveProjectAppMajorSchoolMajor(@RequestParam Integer projectappmajor_id, @ModelAttribute SchoolMajor schoolmajor) {\n\t\tProjectAppMajor parent_projectappmajor = projectAppMajorService.saveProjectAppMajorSchoolMajor(projectappmajor_id, schoolmajor);\n\n\t\tModelAndView mav = new ModelAndView();\n\t\tmav.addObject(\"projectappmajor_id\", projectappmajor_id);\n\t\tmav.addObject(\"projectappmajor\", parent_projectappmajor);\n\t\tmav.setViewName(\"projectappmajor/viewProjectAppMajor.jsp\");\n\n\t\treturn mav;\n\t}",
"@RequestMapping(\"/newProjectAppMajorSchoolMajor\")\n\tpublic ModelAndView newProjectAppMajorSchoolMajor(@RequestParam Integer projectappmajor_id) {\n\t\tModelAndView mav = new ModelAndView();\n\t\tmav.addObject(\"projectappmajor_id\", projectappmajor_id);\n\t\tmav.addObject(\"schoolmajor\", new SchoolMajor());\n\t\tmav.addObject(\"newFlag\", true);\n\t\tmav.setViewName(\"projectappmajor/schoolmajor/editSchoolMajor.jsp\");\n\n\t\treturn mav;\n\t}",
"@RequestMapping(\"/newProjectAppMajor\")\n\tpublic ModelAndView newProjectAppMajor() {\n\t\tModelAndView mav = new ModelAndView();\n\n\t\tmav.addObject(\"projectappmajor\", new ProjectAppMajor());\n\t\tmav.addObject(\"newFlag\", true);\n\t\tmav.setViewName(\"projectappmajor/editProjectAppMajor.jsp\");\n\n\t\treturn mav;\n\t}",
"public void save(HrCSchool entity);",
"@RequestMapping(value = \"/staff/majorupdate\", method = RequestMethod.POST)\n\tpublic ModelAndView saveMajor(@ModelAttribute Major major, @RequestParam(required = false) String action, HttpSession session) {\n\t\tModelAndView modelAndView = new ModelAndView();\n\t\ttry {\n\t\t\tif (major.getId() != null) {\n\t\t\t\tMajor existingMajor = (Major) majorService.getMajorById(major.getId());\n\t\t\t\tmajor.setCompulsoryCourses(existingMajor.getCompulsoryCourses());\n\t\t\t}\n\t\t\t\n\t\t\tProgram program = programService.getProgramByCode(major.getProgram().getCode());\n\t\t\tmajor.setProgram(program);\n\t\t\tmajorService.save(major);\n\t\t\t\n\t\t\tmodelAndView = new ModelAndView(\"staff/majoredit\");\n\t\t\tmodelAndView.addObject(\"major\", major);\n\t\t\t\t\n\t\t\tString infoMessage = \"Major '\" + major.getTitle() + \"' saved successfully.\";\n\t\t\tmodelAndView.addObject(\"infoMessage\", infoMessage);\n\t\t\t\n\t\t\tPagedListHolder<Major> resultList = new PagedListHolder<Major>(majorService.getAllMajors());\n\t\t\tmodelAndView.addObject(\"resultList\", resultList);\n\t\t\tsession.setAttribute(\"StaffController_majorList\", resultList);\n\t\t} catch (CustomServiceException ex) {\n\t\t\tif (major.getId() == null) {\n\t\t\t\tmodelAndView = new ModelAndView(\"staff/majorcreate\");\n\t\t\t} else {\n\t\t\t\tmodelAndView = new ModelAndView(\"staff/majoredit\");\n\t\t\t}\n\t\t\tmodelAndView.addObject(\"major\", major);\n\t\t\tmodelAndView.addObject(\"errorMessage\", ex.getErrorMsg());\n\t\t\tList<Program> programList = programService.getProgramsByStatus(true);\n\t\t\tmodelAndView.addObject(\"programList\", programList);\n\t\t}\n\t\t\n\t\treturn modelAndView;\n\t}",
"public boolean insertProject(Project project) throws EmployeeManagementException;",
"@Test\n\tpublic void testCRUDMajor() {\n\t\tCourse webDevelopment = (Course) beansCtx.getBean(\"webDevelopment\");\n\t\tByte enabled = 1;\n\t\tProgram program = new Program(null, \"code1\", \"title1\", enabled, \"description1\", \"undergraduate\", 20, null, null);\n\t\tMajor major = (Major) beansCtx.getBean(\"softwareDevelopment\");\n\t\tCourseDAO courseDAO = (CourseDAO) beansCtx.getBean(\"courseDAO\");\n\t\tProgramDAO programDAO = (ProgramDAO) beansCtx.getBean(\"programDAO\");\n\t\t\n\t\twebDevelopment.setId(null);\n\t\tcourseDAO.add(webDevelopment);\n\t\t\n\t\tprogram.setId(null);\n\t\tprogramDAO.add(program);\n\t\tmajor.setProgram(program);\n\t\t\n\t\ttry {\n\t\t\tmajorDAO.add(major);\n\t\t\tfail();\n\t\t} catch (RuntimeException ex) {\n\t\t\tlogger.info(\"majorDAO should not persist major with defined id\");\n\t\t}\n\t\t\n\t\t// Test create (add) including many-to-many (compulsoryCourses), read (get*)\n\t\tmajor.setId(null);\n\t\tmajorDAO.add(major);\n\t\tassertTrue(majorDAO.countAll() == 1);\n\t\tMajor majorFromDB = majorDAO.getMajorByCode(major.getCode());\n\t\tassertNotNull(majorFromDB);\n\t\tassertTrue( majorFromDB.equals(major) );\n\t\tassertTrue( majorFromDB.getProgram().equals(program) );\n\t\tassertTrue( majorFromDB.getCompulsoryCourses().size() == 1 );\n\t\tIterator<Course> iterator = majorFromDB.getCompulsoryCourses().iterator();\n\t\tboolean found = false;\n\t\tCourse currentCourse;\n\t\twhile (iterator.hasNext()) {\n\t\t\tcurrentCourse = iterator.next();\n\t\t\tif (currentCourse.equals(webDevelopment)) {\n\t\t\t\tfound = true;\n\t\t\t}\n\t\t}\n\t\tassertTrue(found);\n\t\t\n\t\tmajorFromDB = majorDAO.getMajorById(majorFromDB.getId());\n\t\tassertNotNull(majorFromDB);\n\t\t\n\t\t// Test update (save)\n\t\tmajor.setCode(\"SWDev\");\n\t\tmajorDAO.save(major);\n\t\tmajorFromDB = majorDAO.getMajorByCode(major.getCode());\n\t\tassertNotNull(majorFromDB);\n\t\tassertTrue(majorFromDB.equals(major));\n\t\t\n\t\t// Test delete\n\t\tmajorDAO.delete(major);\n\t\tcourseDAO.delete(webDevelopment);\n\t\tprogramDAO.delete(program);\n\t\tassertNull(courseDAO.getCourseByCode(webDevelopment.getCode()));\n\t\tassertTrue(programDAO.countAll() == 0);\n\t\tassertNull(majorDAO.getMajorByCode(major.getCode()));\n\t}",
"private AppTProject populateAndSaveProjectDetails(Project project, boolean isNewProject) {\r\n\t\t// Project Details\r\n\t\tAppTProject appTProject = null;\r\n\t\tif (isNewProject) {\r\n\t\t\t// Creates a new Project Entity\r\n\t\t\tappTProject = new AppTProject();\r\n\t\t\tappTProject.setCreatedDate(new Date(System.currentTimeMillis()));\r\n\t\t} else {\r\n\t\t\t// Retrieves the existing Project Entity \r\n\t\t\tappTProject = projectRepository.getOne(project.getProjectId());\r\n\t\t\tappTProject.setModifiedDate(new Date(System.currentTimeMillis()));\r\n\t\t}\r\n\t\tappTProject.setProjectName(project.getProjectName());\r\n\t\tappTProject.setPriority(project.getPriority());\r\n\t\tappTProject.setStartDate(project.getStartDate());\r\n\t\tappTProject.setEndDate(project.getEndDate());\r\n\t\tappTProject.setActive(project.getActive());\r\n\t\tif (null != project.getUser()) {\r\n\t\t\tAppTUser appTUser = new AppTUser();\r\n\t\t\tBeanUtils.copyProperties(project.getUser(), appTUser);\r\n\t\t\tappTProject.setUser(appTUser);\r\n\t\t}\r\n\t\treturn projectRepository.save(appTProject);\r\n\t}",
"@RequestMapping(\"/editProjectAppMajor\")\n\tpublic ModelAndView editProjectAppMajor(@RequestParam Integer idKey) {\n\t\tModelAndView mav = new ModelAndView();\n\n\t\tmav.addObject(\"projectappmajor\", projectAppMajorDAO.findProjectAppMajorByPrimaryKey(idKey));\n\t\tmav.setViewName(\"projectappmajor/editProjectAppMajor.jsp\");\n\n\t\treturn mav;\n\t}",
"@Transactional\n\tpublic LabConstructUser saveLabConstructUserLabConstructApp(Integer id, LabConstructApp related_labconstructapp) {\n\t\tLabConstructUser labconstructuser = labConstructUserDAO.findLabConstructUserByPrimaryKey(id, -1, -1);\n\t\tLabConstructApp existinglabConstructApp = labConstructAppDAO.findLabConstructAppByPrimaryKey(related_labconstructapp.getId());\n\n\t\t// copy into the existing record to preserve existing relationships\n\t\tif (existinglabConstructApp != null) {\n\t\t\texistinglabConstructApp.setId(related_labconstructapp.getId());\n\t\t\texistinglabConstructApp.setLabConstructAppCode(related_labconstructapp.getLabConstructAppCode());\n\t\t\texistinglabConstructApp.setProjectName(related_labconstructapp.getProjectName());\n\t\t\texistinglabConstructApp.setPartyId(related_labconstructapp.getPartyId());\n\t\t\texistinglabConstructApp.setAppDate(related_labconstructapp.getAppDate());\n\t\t\t//existinglabConstructApp.setProjectSourceId(related_labconstructapp.getProjectSourceId());\n\t\t\t//existinglabConstructApp.setProjectPurposeId(related_labconstructapp.getProjectPurposeId());\n\t\t\texistinglabConstructApp.setParticipant(related_labconstructapp.getParticipant());\n\t\t\texistinglabConstructApp.setPrimaryObjective(related_labconstructapp.getPrimaryObjective());\n\t\t\texistinglabConstructApp.setSpecialInnovation(related_labconstructapp.getSpecialInnovation());\n\t\t\texistinglabConstructApp.setProjectBasis(related_labconstructapp.getProjectBasis());\n\t\t\texistinglabConstructApp.setConstructBasis(related_labconstructapp.getConstructBasis());\n\t\t\texistinglabConstructApp.setExpectedResult(related_labconstructapp.getExpectedResult());\n\t\t\texistinglabConstructApp.setAppropriationBudget(related_labconstructapp.getAppropriationBudget());\n\t\t\texistinglabConstructApp.setEquipmentDetail(related_labconstructapp.getEquipmentDetail());\n\t\t\texistinglabConstructApp.setOpenLabItem(related_labconstructapp.getOpenLabItem());\n\t\t\texistinglabConstructApp.setOtherAppendix(related_labconstructapp.getOtherAppendix());\n\t\t\texistinglabConstructApp.setApprovalAppendix(related_labconstructapp.getApprovalAppendix());\n\t\t\texistinglabConstructApp.setPlanSchedule(related_labconstructapp.getPlanSchedule());\n\t\t\texistinglabConstructApp.setCourseAmount(related_labconstructapp.getCourseAmount());\n\t\t\texistinglabConstructApp.setMajorAmount(related_labconstructapp.getMajorAmount());\n\t\t\texistinglabConstructApp.setFeeAmount(related_labconstructapp.getFeeAmount());\n\t\t\texistinglabConstructApp.setOtherFee(related_labconstructapp.getOtherFee());\n\t\t\trelated_labconstructapp = existinglabConstructApp;\n\t\t} else {\n\t\t\trelated_labconstructapp = labConstructAppDAO.store(related_labconstructapp);\n\t\t\tlabConstructAppDAO.flush();\n\t\t}\n\n\t\tlabconstructuser.setLabConstructApp(related_labconstructapp);\n\t\trelated_labconstructapp.getLabConstructUsers().add(labconstructuser);\n\t\tlabconstructuser = labConstructUserDAO.store(labconstructuser);\n\t\tlabConstructUserDAO.flush();\n\n\t\trelated_labconstructapp = labConstructAppDAO.store(related_labconstructapp);\n\t\tlabConstructAppDAO.flush();\n\n\t\treturn labconstructuser;\n\t}",
"@RequestMapping(value = \"/staff/majorcreate\")\n\tpublic String redirectToMajorCreate(Model model) {\n\t\tMajor major = new Major();\n\t\tmodel.addAttribute(\"major\", major);\n\t\tList<Program> programList = programService.getProgramsByStatus(true);\n\t\tmodel.addAttribute(\"programList\", programList);\n\t\treturn \"staff/majorcreate\";\n\t}",
"@PostMapping\n public ResponseEntity<Project> createNewProject(@Valid @RequestBody Project project) {\n\n Project project1 = projectService.saveOrUpdateProject(project);\n return new ResponseEntity<Project>(project1, HttpStatus.CREATED);\n }",
"@RequestMapping(\"/deleteProjectAppMajor\")\n\tpublic String deleteProjectAppMajor(@RequestParam Integer idKey) {\n\t\tProjectAppMajor projectappmajor = projectAppMajorDAO.findProjectAppMajorByPrimaryKey(idKey);\n\t\tprojectAppMajorService.deleteProjectAppMajor(projectappmajor);\n\t\treturn \"forward:/indexProjectAppMajor\";\n\t}",
"public void save(Enterprise entity);",
"@RequestMapping(\"/selectProjectAppMajorSchoolMajor\")\n\tpublic ModelAndView selectProjectAppMajorSchoolMajor(@RequestParam Integer projectappmajor_id, @RequestParam String schoolmajor_majorNumber) {\n\t\tSchoolMajor schoolmajor = schoolMajorDAO.findSchoolMajorByPrimaryKey(schoolmajor_majorNumber, -1, -1);\n\n\t\tModelAndView mav = new ModelAndView();\n\t\tmav.addObject(\"projectappmajor_id\", projectappmajor_id);\n\t\tmav.addObject(\"schoolmajor\", schoolmajor);\n\t\tmav.setViewName(\"projectappmajor/schoolmajor/viewSchoolMajor.jsp\");\n\n\t\treturn mav;\n\t}",
"public void saveSegSistemaCia(SegSistemaCia entity)\n throws Exception;",
"private void actionSaveProject() {\r\n final String projectName = _txtProjectName.getText().toString();\r\n final String projectDesc = _txtProjectDescription.getText().toString();\r\n\r\n //region Validations\r\n\r\n if (projectName.trim().equals(\"\")) {\r\n TopAlert.make(findViewById(R.id.coordinator), (ViewGroup) findViewById(R.id.llFloatingBelowTopAlert), R.string.project_validation_name_empty).show();\r\n return;\r\n } else if (_mode != UIConsts.Bundles.MODE.UPDATE && _repository.projects.checkNameExists(projectName)) {\r\n TopAlert.make(findViewById(R.id.coordinator), (ViewGroup) findViewById(R.id.llFloatingBelowTopAlert), R.string.project_validation_name_exists).show();\r\n return;\r\n } else if (_mode == UIConsts.Bundles.MODE.UPDATE && !projectName.toLowerCase().equals(_project.getName().toLowerCase())) {\r\n // If in edit mode, and the project name is different, then checks if a project already exists in the database:\r\n if (_repository.projects.checkNameExists(projectName)) {\r\n TopAlert.make(findViewById(R.id.coordinator), (ViewGroup) findViewById(R.id.llFloatingBelowTopAlert), R.string.project_validation_name_exists).show();\r\n return;\r\n }\r\n }\r\n\r\n //endregion\r\n\r\n Intent returnIntent = new Intent();\r\n\r\n // Checks if in edit mode:\r\n if (_mode == UIConsts.Bundles.MODE.UPDATE) {\r\n _project.setName(projectName);\r\n _project.setDescription(projectDesc);\r\n _project.setColor(_projectColor);\r\n _repository.projects.update(_project); // Updates the project in the database.\r\n returnIntent.putExtra(UIConsts.Bundles.PROJECT_POSITION_KEY, _project.getPosition());\r\n } else {\r\n _repository.projects.create(Project.make(projectName, projectDesc, _projectColor)); // Saves the new project to the database.\r\n }\r\n\r\n setResult(Activity.RESULT_OK, returnIntent);\r\n finish();\r\n }",
"@Test\r\n\tpublic void saveTeamProgram() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: saveTeamProgram \r\n\t\tInteger teamId_1 = 0;\r\n\t\tProgram related_program = new wsdm.domain.Program();\r\n\t\tTeam response = null;\r\n\t\tresponse = service.saveTeamProgram(teamId_1, related_program);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: saveTeamProgram\r\n\t}",
"@Test\r\n\tpublic void saveGameProgram() {\r\n\t\t// DO: JUnit - Populate test inputs for operation: saveGameProgram \r\n\t\tInteger gameId = 0;\r\n\t\tProgram related_program = new tsw.domain.Program();\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tGame response = null;\r\n\t\tresponse = service.saveGameProgram(gameId, related_program);\r\n\t\t// DO: JUnit - Add assertions to test outputs of operation: saveGameProgram\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Shows the leveleditor for selected level. | public void showLevelEditor(LevelProp level) {
try {
FXMLLoader loader = new FXMLLoader();
loader.setLocation(MainApp.class.getResource("view/LevelEditor.fxml"));
AnchorPane pane = (AnchorPane) loader.load();
Scene scene = new Scene(pane);
LevelEditorController controller = loader.getController();
controller.setLevel(level);
controller.setMainApp(this);
controller.initCanvases();
primaryStage.setScene(scene);
} catch (IOException e) {
e.printStackTrace();
}
} | [
"public void showLevelSelect() {\n selectUI.updateStatus();\n showUI(selectUI);\n }",
"public void DisplayCustomLevel()\n\t{// resets perspective to custom level\n\t\tmView.mlevel = levelSelect;\n\t\tmView.customLevelSelected = true;\n\t\tmView.mCurState = 0;\n\t}",
"public void showLevel(int level) {\n // Set title of the window\n PRIMARY_STAGE.setTitle(GAME_TITLE + \" | Level \" + level);\n // Opening the board of the current level\n Board currentBoard = new Board(level);\n currentBoard.Main = this;\n // Turning back to level menu\n Button btnBack = new Button();\n btnBack.setText(\"Back\");\n btnBack.setPrefSize(VBOX_WIDTH, 35);\n btnBack.setOnAction(e -> levelMenu());\n btnBack.setStyle(\"-fx-text-fill:white; -fx-background-color:\" + BUTTON_COLOR);\n // Show number of moves\n Text numberOfMoves = new Text(\"Moves: \" + currentBoard.getNumberOfMoves());\n // Stackpane for adding all the things to the screen\n StackPane root = new StackPane();\n // VBox for the text that will be on the center of the screen\n VBox body = bodyVBox();\n // Adding title board and back button to the VBox's\n body.getChildren().addAll(currentBoard, numberOfMoves);\n // Adding VBox's to the Border Pane\n BorderPane borderPane = new BorderPane();\n borderPane.setTop(headVBox(\"Level \" + level));\n borderPane.setCenter(body);\n VBox footer = footerVBox();\n footer.getChildren().set(0, btnBack);\n borderPane.setBottom(footer);\n root.getChildren().addAll(borderPane);\n changeScene(root);\n }",
"public LevelEditorView getLvle() {\r\n\t\treturn lvle;\r\n\t}",
"public void displayLevelSet() {\n\t\t\n\t\t// Show current level set name:\n\t\t_buttonLevelSet.setText(_levelSetIdentifier.getName());\n\t\t\n\t\t// Load new levels:\n\t\t_levelIdentifiers = LevelSetManager.getInstance().getLevelIdentifiers(_levelSetIdentifier.getId());\n\t\t_iLevelIdentifier = _levelIdentifiers.listIterator();\n\t\t_levelIdentifier = _iLevelIdentifier.next();\n\t\t_buttonLevel.setText(_levelIdentifier.getName());\n\t\t\n\t\t// Load new stats:\n\t\t_levelStatistics = PlayerManager.getInstance().getLevelSetStatistic(_levelSetIdentifier.getId(), _player.getId());\n\t\t_levelStatistic = _levelStatistics.get(_levelIdentifier.getId());\n\n\t\tif ((_levelStatistic == null) || !_levelStatistic.isSaved() || _levelStatistic.isWon())\n\t\t\t_buttonResume.setVisibility(false);\n\t\telse\n\t\t\t_buttonResume.setVisibility(true);\n\t\t\n\t\tdisplayLevelStatistics();\n\t}",
"public void showLevelTable() {\r\n\t\ttry {\r\n\t\t\tFXMLLoader loader = new FXMLLoader();\r\n\t\t\tloader.setLocation(MainApp.class.getResource(\"view/LevelTable.fxml\"));\r\n\t\t\tAnchorPane levelTable = (AnchorPane) loader.load();\r\n\t\t\trootLayout.setCenter(levelTable);\r\n\t\t\tLevelTableController controller = loader.getController();\r\n\t\t\tcontroller.setMainApp(this);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void actionPerformed(ActionEvent e) {\r\n\t\tthis.level = this.m.getSpecificLevel(levType, levNum);\r\n\t\tJPanel contentPane = lp.getContentPane();\r\n CardLayout cardLayout = (CardLayout) contentPane.getLayout();\r\n cardLayout.show(contentPane, \"levelSelectPanel\");\r\n \r\n if (level.getMostStars() > 0) {\r\n \tlsp.updateStars(level);\r\n \tlevel.setIsUnlocked(true);\r\n \tif (level.getLevelNumber() < 5) {\r\n \t\tLevel nextLevel = this.m.getSpecificLevel(levType, levNum+1);\r\n \t\tif (!nextLevel.getIsUnlocked())\r\n \t\t\tlsp.unlockNext(level);\r\n \t}\r\n }\r\n \r\n \tif (levType == \"lightning\") {\r\n \t\t((LightningPanel) lp).endLevel();\r\n \t\t((LightningPanel) lp).resetLightning();\r\n \t}\r\n \t\r\n\t}",
"void setShowLevels(boolean showLevels);",
"public void displayNextLevel() {\n\t\tif (!_iLevelIdentifier.hasNext()) {\n\t\t\t_iLevelIdentifier = _levelIdentifiers.listIterator();\n\t\t}\n\t\t_levelIdentifier = _iLevelIdentifier.next();\n\t\t_buttonLevel.setText(_levelIdentifier.getName());\n\t\t\n\t\tdisplayLevelStatistics();\n\t}",
"private void printLevelMenu(){\n System.out.println(border);\n System.out.println(\"1. Level 1\");\n System.out.println(\"2. Level 2\");\n System.out.println(\"3. Level 3\");\n System.out.println(\"4. Level Expert\");\n System.out.println(\"5. Level insane\");\n System.out.println(border);\n System.out.print(\"> \");\n\n setLevel(sc.nextInt());\n\n // ensure choice is within range\n if(level < 1 || level > 5)\n printLevelMenu();\n }",
"public void showMenuViewWithModel() {\r\n\t\tstage.setScene(scene);\r\n\t\tstage.show();\r\n\t\tSystem.out.println(\"MAIN MENU\");\r\n\t}",
"@Override\n public void show() {\n menu = MenuBuilder.getInventoryMenu(batch, handler ,model);\n }",
"public void levelMenu() {\n // Setting the title of the window\n PRIMARY_STAGE.setTitle(GAME_TITLE);\n VBox body = bodyVBox();\n // For loop for buttons of the levels in the main menu\n GridPane levelGrid = new GridPane();\n levelGrid.setAlignment(Pos.CENTER);\n levelGrid.setHgap(100);\n levelGrid.setVgap(50);\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 2; j++) {\n int level = (2 * i) + j + 1;\n if (level <= Level.getLevels().length) {\n Button btnLevel = new Button(level + \"\");\n btnLevel.setPrefSize(100, 100);\n btnLevel.setStyle(\"-fx-background-color: #27496d; -fx-text-fill: white; -fx-font-weight: bold; -fx-font-size: 300%;\");\n if (player.isPlayable(level)) {\n // Opening the level\n btnLevel.setOnAction(e -> showLevel(level));\n } else {\n btnLevel.setText(\"\\uD83D\\uDD12\" + btnLevel.getText());\n btnLevel.setDisable(true); // If level is not unlocked disable button\n }\n levelGrid.add(btnLevel, j, i);\n }\n }\n }\n body.getChildren().add(levelGrid);\n StackPane root = new StackPane();\n BorderPane borderPane = new BorderPane();\n borderPane.setTop(headVBox(\"Choose a Level\"));\n borderPane.setCenter(body);\n borderPane.setBottom(footerVBox());\n root.getChildren().addAll(borderPane);\n changeScene(root);\n }",
"private void updateLevel() {\n myLevel.setText(\"LEVEL: \" + level);\n }",
"boolean areLevelsShown();",
"public LevelView getLevelView() {\n\t\treturn lv;\n\t}",
"public void setLevel(String level)\n {\n levelLabel.setText(\"Level: \" + level);\n }",
"public void setLevel(int level)\n {\n levelLabel.setText(\"Level: \" + level);\n }",
"private void showLeaders(){\n\t\thandlers.get(currentPlayer).send(currentPlayer.displayLeader());\n\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This should test whether a collection is new or not. It should account for renamed collections and all the rules that are mentioned in the wiki page. | @Ignore
@Test
public void testIsCollectionNew() {
} | [
"@Override\n\tpublic boolean verifierCollection(String nomCollection) {\n\t\tMongoIterable<String> names = db.listCollectionNames();\n\t\tMongoCursor<String> cursor = names.cursor(); \n\t\twhile(cursor.hasNext()) {\n\t\t\tif (cursor.next().equals(nomCollection))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"protected void assertCollectionExpectations(String collectionName) throws Exception {\n CloudSolrClient client = this.createCloudClient(null);\n try {\n client.connect();\n ClusterState clusterState = client.getZkStateReader().getClusterState();\n\n assertTrue(\"Could not find new collection \" + collectionName, clusterState.hasCollection(collectionName));\n Map<String, Slice> shards = clusterState.getCollection(collectionName).getSlicesMap();\n // did we find expectedSlices shards/shards?\n assertEquals(\"Found new collection \" + collectionName + \", but mismatch on number of shards.\", shardCount, shards.size());\n int totalShards = 0;\n for (String shardName : shards.keySet()) {\n totalShards += shards.get(shardName).getReplicas().size();\n }\n int expectedTotalShards = shardCount * replicationFactor;\n assertEquals(\"Found new collection \" + collectionName + \" with correct number of shards, but mismatch on number \" +\n \"of shards.\", expectedTotalShards, totalShards);\n } finally {\n client.close();\n }\n }",
"boolean hasCollectionName();",
"boolean isCollection();",
"void addCollectionName(Object newCollectionName);",
"@Test\n public void testCollections() throws IOException {\n assertEqual(\"collections\");\n }",
"public void testCollectionPolicy()\r\n {\r\n assertEquals( \"collection\", m_collection, m_directive.getCollectionPolicy() );\r\n }",
"@Test\n\tpublic void shouldNotCreateBoardCollection() {\n\t\tBDDMockito.given(mongoOperations.collectionExists(Board.class)).willReturn(true);\n\t\t\n\t\t// when service.configure() is invoked\n\t\tservice.configure();\n\t\t\n\t\t// then the board collection should be created\n\t\tMockito.verify(mongoOperations, Mockito.times(0)).createCollection(Board.class);\n\t}",
"@Test\n\tpublic void shouldNotCreateCollectionIfItAlreadyExists() {\n\t\tBDDMockito.given(mongoOperations.collectionExists(Board.class)).willReturn(true);\n\t\t\n\t\t// when createNewBoard is invoked with valid values\n\t\tboardService.createNewBoard(\"name\", \"description\");\n\t\t\n\t\t// then the board collection should not be created\n\t\tMockito.verify(mongoOperations, Mockito.times(0)).createCollection(Board.class);\n\t}",
"private void AddCollectionContainer(CollectionContainer cc)\r\n { \r\n if (InternalList.Contains(cc))\r\n throw new ArgumentException(/*SR.Get(SRID.CollectionContainerMustBeUniqueForComposite), \"cc\"*/); \r\n \r\n CollectionChangedEventManager.AddListener(cc, this);\r\n \r\n//#if DEBUG\r\n// _hasRepeatedCollectionIsValid = false;\r\n//#endif\r\n }",
"public boolean isCollection() throws WebDAVException;",
"public void onCreateCollection(String name, MongoCollection<?> collection) {\n // do nothing\n }",
"public boolean allowedToCreateCollection(Collection collection, Authentication authentication) {\n if (SecurityContextCheck.checkUserInRole(authentication, GRSCICOLL_ADMIN_ROLE)) {\n return true;\n }\n\n if (collection == null) {\n return false;\n }\n\n return allowedToModifyEntity(authentication.getName(), collection.getInstitutionKey())\n || allowedToModifyCountry(authentication.getName(), extractCountry(collection));\n }",
"void removeCollectionName(Object oldCollectionName);",
"@Test\n public void collectionTypesTest() {\n // TODO: test collectionTypes\n }",
"@Test\n public void whenInstantiatedThenMongoCollectionHasNameGame(){\n assertEquals(\"game\", collection.getMongoCollection().getName());\n }",
"public boolean isCollection();",
"public void setCollectionName(String collectionName);",
"@Ignore\r\n @Test\r\n public void testContainsCollection() {\r\n System.out.println(\"containsCollection\");\r\n NumberCollection nc = null;\r\n NumberCollection instance = new NumberCollection();\r\n boolean expResult = false;\r\n boolean result = instance.containsCollection(nc);\r\n assertEquals(expResult, result);\r\n \r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Recalculates the candidates of a Cell. | private BitSet calculateCandidates(final Cell cell) {
// Start by assuming that every available value is a candidate.
BitSet candidates = new BitSet(gridSize + 1);
candidates.set(1, gridSize + 1, true);
// If any of the cell's buddies have the value, remove that value from the candidates.
Iterator iterator = puzzleModel.getBuddies(cell).iterator();
while (iterator.hasNext()) {
Cell buddy = (Cell) iterator.next();
if (buddy.getState() == CellState.GIVEN) {
candidates.clear(buddy.getValue());
}
}
return candidates;
} | [
"void updateCellNumbers() {\n cells.stream().forEach(row -> row.stream().filter(cell -> !cell.isMine()).forEach(cell -> {\n int numNeighbouringMines =\n (int) getNeighboursOf(cell).stream().filter(neighbour -> neighbour.isMine()).count();\n cell.setNumber(numNeighbouringMines);\n }));\n }",
"@Override\n public void compute() {\n // Check if we've found at least 2 solutions for the board across all threads. If it does, return immediately.\n if (totalSolns.get() > 1) {\n return;\n }\n\n // First, find an empty cell.\n Optional<Pair<Integer, Integer>> oCoords = findUnassignedCell(grid);\n\n // We have filled up the board and successfully solved the puzzle. Let other threads continue operations.\n if (!oCoords.isPresent()) {\n totalSolns.incrementAndGet();\n return;\n }\n\n // We have a valid cell to target. Do we do our computation sequentially?\n if (depth > cutoff) {\n try {\n // Find the count of solutions that result from the current grid and add to count.\n totalSolns.addAndGet(SeqSudokuGenerator.SeqHelper.runHelper(grid));\n return;\n }\n catch(Exception e) {\n System.exit(100);\n }\n }\n\n // If not sequentially, we'll do it in parallel.\n int r = oCoords.get().getKey();\n int c = oCoords.get().getValue();\n final List<RecursiveAction> actions = new ArrayList<>();\n\n for (int testVal = 1 ; testVal <= nRegions * nRegions; testVal++) {\n if (safeToPlace(grid, r, c, testVal)) {\n // Construct a deep-copy of the grid.\n final int[][] tempGrid = deepCopyIntMatrix(grid);\n // Modify it to reflect the testing value.\n tempGrid[r][c] = testVal;\n // Create a new task to check if this leads to a valid solution.\n RecursiveAction action = null;\n try {\n action = new ParHelper(tempGrid, depth + 1, cutoff);\n }\n catch (Exception e) {\n System.exit(100);\n }\n // Add this task to the \"to-do\" list.\n actions.add(action);\n }\n }\n\n // Invoke all the tasks.\n invokeAll(actions);\n\n for (RecursiveAction action: actions) {\n action.join();\n }\n }",
"public Map<SudokuCell, Integer> updateCage(SudokuCell solvedCell){\n\t\tMap<SudokuCell, Integer> solvableCells = new HashMap<>();\n\t\tCage cage = grid.getCage(solvedCell.getLocation());\n\t\tint remaining = cage.getTotal();\n\t\tremoveFromAllRegions(solvedCell);\n\t\tList<SudokuCell> cells = grid.getCells(cage);\n\t\tList<SudokuCell> unsolvedCells = new ArrayList<>();\n\n\t\tfor(SudokuCell cell : cells){\n\t\t\tif(cell.isSolved()){\n\t\t\t\tremaining -= cell.getValue();\n\t\t\t}\n\t\t\telse if(!cell.isSolved()){\n\t\t\t\tunsolvedCells.add(cell);\n\t\t\t}\n\t\t}\n\t\tif(unsolvedCells.size()==1){\n\t\t\tsolvableCells.put(unsolvedCells.get(0), remaining);\n\t\t\treturn solvableCells;\n\t\t}\n\t\tList<Combination> combinations = Sums.getSums(unsolvedCells.size(), remaining, getPossibleValues(unsolvedCells));\n\t\t//check if the remaining unsolved cells has a unique combination\n\t\tif(combinations.size()==1){\n\t\t\tSet<Integer> possibleValues = combinations.get(0).getNumbers();\n\t\t\tfor(SudokuCell cell : unsolvedCells){\n\t\t\t\tcell.getPossibleValues().retainAll(possibleValues);\n\t\t\t\tif(cell.hasSinglePossibleValue()) solvableCells.put(cell, cell.getSinglePossibleValue());\n\t\t\t}\n\t\t}\n\n\t\treturn solvableCells;\n\t}",
"@Test\n public void changeCandidateCells() {\n Cell x15 = gameBoard.getCell(20);\n Cell x14 = gameBoard.getCell(15);//lv2\n x14.addLevel();x14.addLevel();\n Cell x25 = gameBoard.getCell(21);//workerPos\n worker11.changePosition(x25);\n Cell x24 = gameBoard.getCell(16);//lv3dome\n x24.addLevel();x24.addLevel();x24.addLevel();x24.addDome();\n Cell x34 = gameBoard.getCell(17);\n Cell x35 = gameBoard.getCell(22);\n x35.addDome();\n ArrayList<Cell> expectedList = new ArrayList<>();\n expectedList.add(x15);\n expectedList.add(x14);\n expectedList.add(x34);\n BuildPhase buildPhase = new BuildPhase();\n buildPhase.Init(worker11,gameBoard, true);\n atlasDecoratedPhase = new AtlasDecorator(buildPhase, false);\n atlasDecoratedPhase.evalCandidateCells();\n assertTrue(expectedList.containsAll(buildPhase.getCandidateCells()) && buildPhase.getCandidateCells().containsAll(expectedList));\n }",
"protected void updateCandidatesBasedOnClasses() {\n Timer t = Timer.getNamed(\"Update Candidates based on Classes\", getRootTimer());\n int before = initialCandidateSimilarity.getNumberOfNonZeroElements();\n \n // multiply new class similarities with candidate similarities (sets all candidates with wrong class to 0)\n CombineHierarchy<Table, TableRow> c = new CombineHierarchy<Table, TableRow>();\n c.setAggregationType(CombinationType.Multiply);\n Timer tm = Timer.getNamed(\"Multiply Class with Candidate similarities\", t);\n prunedCandidateSimilarity = c.match(classSimilarity, initialCandidateSimilarity, new TableToRowHierarchyAdapter());\n tm.stop();\n \n prunedCandidateSimilarity.normalize();\n \n if(getMatchingParameters().isCollectMatchingInfo()) {\n System.out.println(\"Majority Class decision:\");\n System.out.println(prunedCandidateSimilarity.getOutput());\n System.out.println(String.format(\"Remove candiates with wrong class: removed %d/%d\", before - prunedCandidateSimilarity.getNumberOfNonZeroElements(), before));\n }\n t.stop();\n }",
"private void setInitialPartialSolution() {\n\t\tfor (int row = 0; row < size; row++) {\n\t\t\tfor (int col = 0; col < size; col++) {\n\t\t\t\tif (intGrid[row][col] != -1) {\n\n\t\t\t\t\t// for all the values that are not empty in the grid, add them into the partial\n\t\t\t\t\t// solution\n\t\t\t\t\tint valueIndex = getValueIndex(intGrid[row][col]);\n\t\t\t\t\tint realRowIndex = getRealRowIndex(row, col, valueIndex);\n\t\t\t\t\tsolution.add(realRowIndex);\n\n\t\t\t\t\t// Also remove them from the uncoveredRows and uncoveredCols sets because they\n\t\t\t\t\t// should be\n\t\t\t\t\t// 'deleted' from the matrix that is being used for the recursive solve.\n\t\t\t\t\tfor (int matrixCol = 0; matrixCol < numCols; matrixCol++) {\n\t\t\t\t\t\tif (exactCoverMatrix[realRowIndex][matrixCol] == 1) {\n\t\t\t\t\t\t\tfor (int innerRow = 0; innerRow < numRows; innerRow++) {\n\n\t\t\t\t\t\t\t\tif (exactCoverMatrix[innerRow][matrixCol] == 1) {\n\t\t\t\t\t\t\t\t\tuncoveredRows.remove(innerRow);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tuncoveredCols.remove(matrixCol);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"static void updatePossible(int[][] G, int[][][] P){\n //only makes changes to possibility array\n \n int k;\n \n for(int i=1; i<G.length; i++){\n for (int j=1; j<G[i].length; j++){\n if (G[i][j]>0) {\n int m = G[i][j]; //this is the candidate # being removed from P[][][]\n \n //remove m as candidate, from P[i][j][m] for rows\n for(int ii=1; ii<G.length; ii++){\n if (ii!=i){ //skip the current box\n if (P[ii][j][0]>1 && P[ii][j][m]>0){ //only change candidate values if it's not filled\n P[ii][j][m] = 0; //set candidate value to 0\n P[ii][j][0] -= 1; //subtract 1 from total candidates for this cell\n }\n }\n }\n \n //remove m from P[i][j][m] for columns\n for(int jj=1; jj<G.length; jj++){\n if (jj!=j){ //skip the current box\n if (P[i][jj][0]>1 && P[i][jj][m]>0){ //only change candidate values if it's not filled\n P[i][jj][m] = 0; //set candidate value to 0\n P[i][jj][0] -= 1; //subtract 1 from total candidates for this cell\n }\n }\n }\n \n //remove m from P[i][j][m] for box!\n int I = getAnchor(i);\n int J = getAnchor(j);\n for(int s=I; s<=I+2; s++){\n for(int t=J; t<=J+2; t++){\n if((s!=i)||(t!=j)){\n if (P[s][t][0]>1 && P[s][t][m]>0){ //only change candidate values if it's not filled\n P[s][t][m] = 0; //set candidate value to 0\n P[s][t][0] -= 1; //subtract 1 from total candidates for this cell\n }\n }\n }\n }\n \n }\n }\n }\n }",
"public void processCells() {\n\n //Create a new grid which will be next iteration\n Cell[][] nextGrid = new Cell[this.width][this.height];\n\n //Populate the new grid with dead cells\n populateGrid(nextGrid);\n\n //Iterate through the grid\n for (int x = 0; x < this.width; x++) {\n for (int y = 0; y < this.height; y++) {\n\n //Get the cell\n Cell currentCell = getCell(x, y);\n\n // Get current status of the Cell\n boolean isAlive = currentCell.isAlive();\n\n //Check its neighbours\n int aliveNeighbours = getNeighbours(currentCell);\n\n //Evaluate against rules\n isAlive = applyRules(isAlive, aliveNeighbours);\n\n //Add cell to new grid\n nextGrid[x][y].setAlive(isAlive);\n }\n }\n\n //Set the next iteration to the current iteration\n this.grid = nextGrid;\n }",
"protected void removeCandidate(Integer candidate) throws NoCandidatesException \n {\n for (Cell cell : cells) \n {\n cell.remove(candidate);\n }\n }",
"public Map<SudokuCell, Integer> updateCage(Cage cage){\n\t\tMap<SudokuCell, Integer> solvableCells = new HashMap<>();\n\t\tint remaining = cage.getTotal();\n\n\t\tList<SudokuCell> cells = grid.getCells(cage);\n\t\tList<SudokuCell> unsolvedCells = new ArrayList<>();\n\t\tList<SudokuCell> solvedCells = new ArrayList<>();\n\n\t\tfor(SudokuCell cell : cells){\n\t\t\tif(cell.isSolved()){\n\t\t\t\tremaining -= cell.getValue();\n\t\t\t\tsolvedCells.add(cell);\n\t\t\t}\n\t\t\telse if(!cell.isSolved()){\n\t\t\t\tunsolvedCells.add(cell);\n\t\t\t}\n\t\t}\n\t\tif(unsolvedCells.size()==1){\n\t\t\tsolvableCells.put(unsolvedCells.get(0), remaining);\n\t\t\treturn solvableCells;\n\t\t}\n\t\tfor(SudokuCell solvedCell : solvedCells){ removeFromAllRegions(solvedCell);}\n\t\tList<Combination> combinations = Sums.getSums(unsolvedCells.size(), remaining, getPossibleValues(unsolvedCells));\n\t\t//check if the remaining unsolved cells has a unique combination\n\t\tif(combinations.size()==1){\n\t\t\tSet<Integer> possibleValues = combinations.get(0).getNumbers();\n\t\t\tfor(SudokuCell cell : unsolvedCells){\n\t\t\t\tcell.getPossibleValues().retainAll(possibleValues);\n\t\t\t\tif(cell.hasSinglePossibleValue()) solvableCells.put(cell, cell.getSinglePossibleValue());\n\t\t\t}\n\t\t}\n\n\t\treturn solvableCells;\n\t}",
"public void update(){\n\t\tif ( updateCellsState() ){ //repaint only if some cells were changed\n\t\t\tcellsShape = null;\n\t\t\trepaint();\n\t\t}\n\t}",
"@Override\n public void evaluate(SudokuGrid grid) {\n for (int l = 0; l < 3; l++) {//subgrid row index\n for (int m = 0; m < 3; m++) { // subgrid column index\n Set<Integer> fixed = new HashSet<Integer>();\n populateFixed(grid, l, m, fixed);\n updateFlags(grid, l, m, fixed);\n //System.out.println(\"Checking for subgrid:\"+ System.currentTimeMillis());\n findUniqueInSubgrid(grid, l, m);\n //System.out.println(\"Cheecked in subgrid: \"+System.currentTimeMillis());\n checkForFinal(grid, l, m, fixed);\n }\n }\n\n }",
"@Override\n public void analyzeCells() {\n for(Cell cell: getGrid()){\n int liveNeighborsCount = countLiveNeighbors(cell.getMyNeighbors());\n if (cell.getState() == LIVE) {\n if (liveNeighborsCount < minPopulationThreshold || liveNeighborsCount > maxPopulationThreshold) {\n cell.setMyNextState(DEAD);\n }\n } else if (cell.getState() == DEAD) {\n if (liveNeighborsCount == maxPopulationThreshold) {\n cell.setMyNextState(LIVE);\n }\n }\n }\n }",
"public void renumberCells() {\r\n int num = 1;\r\n for (Cell cell : cells) {\r\n cell.updateCellNum(num);\r\n num++;\r\n }\r\n }",
"void rebuildFixedCells() {\n myFixedCells.clear();\n }",
"public void updateCell() {\n if (!isChanged) {\n if (myCurrState == PREY) {\n if (getUnchangedEmptyNeighbors().size() != 0){\n movePrey();\n }\n } else if (myCurrState == PREDATOR) {\n if (energy == 0)\n killPredator();\n else if (getUnchangedPreyNeighbors().size() != 0)\n eatPrey();\n else if (getUnchangedEmptyNeighbors().size() != 0)\n movePredator();\n else\n setNextStateAndEnergy(PREDATOR, this.energy - 1);\n }\n }\n }",
"protected void recomputeBounds ()\n {\n _bounds.setToEmpty();\n _minCoord.set(Integer.MAX_VALUE, Integer.MAX_VALUE);\n _maxCoord.set(Integer.MIN_VALUE, Integer.MIN_VALUE);\n addBounds(_elements);\n }",
"public void calculatePossibilities(Cell[][] board)\r\n\t{\r\n\t\tArrayList<Integer> possibilities = new ArrayList<Integer>();\r\n\t\tArrayList<Integer> existingNumbers = new ArrayList<Integer>();\r\n\t\t\r\n\t\t//Eliminate from possibilities all numbers in the row and column\r\n\t\tfor(int i = 1;i <= 9;i++)\r\n\t\t{\r\n\t\t\t//First add all numbers to the possibilities array\r\n\t\t\tpossibilities.add(i);\r\n\t\t\t\r\n\t\t\tif(board[this.x][i].value != 0 && !existingNumbers.contains(board[this.x][i].value))\r\n\t\t\t{\r\n\t\t\t\texistingNumbers.add(board[this.x][i].value);\r\n\t\t\t}\r\n\t\t\tif(board[i][this.y].value != 0 && !existingNumbers.contains(board[i][this.y].value))\r\n\t\t\t{\r\n\t\t\t\texistingNumbers.add(board[i][this.y].value);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Find the initial cell of its 3x3 grid, x,y belongs to {1,4,7}\r\n\t\tint gridInitialX = 0,gridInitialY = 0;\r\n\t\tif(isBetween(this.x, 1, 4))\r\n\t\t\tgridInitialX = 1;\r\n\t\telse if(isBetween(this.x, 4, 7))\r\n\t\t\tgridInitialX = 4;\r\n\t\telse if(isBetween(this.x,7,10))\r\n\t\t\tgridInitialX = 7;\r\n\t\tif(isBetween(this.y, 1, 4))\r\n\t\t\tgridInitialY = 1;\r\n\t\telse if(isBetween(this.y, 4, 7))\r\n\t\t\tgridInitialY = 4;\r\n\t\telse if(isBetween(this.y,7,10))\r\n\t\t\tgridInitialY = 7;\r\n\t\t\r\n\t\t//Eliminate from possibilities all values in its 3x3 grid\r\n\t\tfor(int i = gridInitialX;i < gridInitialX + 3;i++)\r\n\t\t\tfor(int j = gridInitialY;j < gridInitialY + 3;j++)\r\n\t\t\t\tif(board[i][j].value != 0 && !existingNumbers.contains(board[i][j].value))\r\n\t\t\t\t{\r\n\t\t\t\t\texistingNumbers.add(board[i][j].value);\r\n\t\t\t\t}\r\n\t\t\r\n\t\t//all_possibilities - existing numbers = possibilites \r\n\t\tpossibilities.removeAll(existingNumbers);\r\n\t\tthis.possibleEntries = possibilities;\r\n\t\tnumberOfPossibilities = this.possibleEntries.size();\r\n\t}",
"public void recalculateBounds() {\n bounds = null;\n for (B n : this) {\n addBoundsFor(n);\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Picks a random pivot element between l and r and partitions | public static int randomPartition(double arr[], int l, int r) {
int pivot = (int) Math.round(l + Math.random() * (r - l));
swap(arr, pivot, r);
return partition(arr, l, r);
} | [
"private int pivotIndex(int left, int right){\n\t\treturn left+ (int)(Math.random()*(right - left + 1));\n\t}",
"private int random_partition(Object arr[], int left, int right) {\n\t\t\n\t\tint n = right - left + 1, i = left;\n\t\tint pivot_index = ThreadLocalRandom.current().nextInt(n);\n\t\tswap(arr, left + pivot_index, right); // randomly select a pivot and exchange it with the rightmost element\n\t\tObject pivot = arr[right];\n\t\tfor (int j = left; j <= right - 1; j++) {\n\t\t\tif (((Comparable)arr[j]).compareTo(pivot) > 0) {\n\t\t\t\tswap(arr, i, j);\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tswap(arr, i, right);\n\t\treturn i;\n\t}",
"public void quick(int[] nums, int l, int r) {// quick select: kth smallest\n if (l > r) return;\n\n int pivot = nums[r];// Take A[end] as the pivot,\n int left = l;\n for (int i = l; i < r; i++) {\n if (nums[i] <= pivot) // Put numbers < pivot to pivot's left\n swap(left++, i, nums);\n }\n swap(left, r, nums);// Finally, swap A[pivot] with A[left] : as left is pointing to correct pivot element position\n\n quick(nums, left + 1, r);\n quick(nums, l, left - 1);\n }",
"private int getRandomPivot(int low, int high) {\n\t\tRandom random = new Random();\n\t\treturn random.nextInt((high - low) + 1 ) + low;\n\t}",
"public static int partition(int[] input, int p, int r) {\n\t\tint x = input[r];\n\t\tint i = p - 1;\n\n\t\tSystem.out.println(\"\\nPartition:\");\n\t\tSystem.out.println(\"Input: \" + Arrays.toString(Arrays.copyOfRange(input, p, r + 1)));\n\n\t\tfor (int j = p; j < r; j++) {\n\t\t\tif (input[j] <= x) {\n\t\t\t\ti++;\n\t\t\t\texchange(input, i, j);\n\t\t\t}\n\t\t}\n\n\t\texchange(input, i + 1, r);\n\n\t\tSystem.out.println(\"Pivot: \" + x);\n\t\tSystem.out.println(\"Pivot placement: \" + (i + 1));\n\t\tSystem.out.println(\"Result: \" + Arrays.toString(Arrays.copyOfRange(input, p, r + 1)));\n\n\t\treturn i + 1;\n\t}",
"protected Type choose_pivot( ArrayList<Type> array, int start, int end )\n\t{\n\t\t// FIXME: choose a random pivot. place it at the end of the array\n\t\treturn null;\n\t}",
"public static void quickSortOne ( int A [ ], final int p, final int r ) {\n \n // First check that p is less than r.\n \n if ( p < r ) {\n \n // Call the partitionOne function. NOTE: This\n // function will always choose the last element\n // in the array as the pivot. \n \n int q = partitionOne ( A, p, r );\n \n // Recursive call two times.\n \n quickSortOne( A, p, q - 1 );\n \n quickSortOne( A, q + 1, r );\n \n } // end if.\n \n // Return if the stopping case did not execute.\n \n return;\n \n }",
"public static void arbitraryPivotVsRandomPivot() {\n double[] arbitraryTimes = new double[ARBITRARY_VS_RANDOM_LENGTH];\n double[] randomTimes = new double[ARBITRARY_VS_RANDOM_LENGTH];\n long startTime, endTime;\n Random r = new Random();\n for (int i = 0; i < ARBITRARY_VS_RANDOM_LENGTH; i++) {\n long sumArbitrary = 0;\n long sumRandom = 0;\n for (int k = 0; k < T; k++) {\n int size = (int) Math.pow(2, i);\n double[] a = new double[size];\n double[] b = new double[size];\n for (int j = 0; j < a.length; j++) {\n a[j] = r.nextGaussian() * 5000;\n b[j] = a[j];\n }\n startTime = System.currentTimeMillis();\n quickSortArbitraryPivot(a);\n endTime = System.currentTimeMillis();\n sumArbitrary += endTime - startTime;\n startTime = System.currentTimeMillis();\n quickSortRandomPivot(b);\n endTime = System.currentTimeMillis();\n sumRandom += endTime - startTime;\n }\n arbitraryTimes[i] = sumArbitrary / T;\n randomTimes[i] = sumRandom / T;\n }\n Plotter.plot(\"quick sort with an arbitrary pivot\", arbitraryTimes, \"quick sort with a random pivot\",\n randomTimes);\n }",
"public int partition(int[] arr, int p, int r) {\n int i = p-1;\n int pivot = arr[r];\n for (int j = p; j < r; j++) {\n if (arr[j] <= pivot) {\n i++;\n \n // swap arr[i] and arr[j]\n int tmp = arr[j];\n arr[j] = arr[i];\n arr[i] = tmp;\n }\n }\n \n //swap arr[i+1] and pivot\n arr[r] = arr[i+1];\n arr[i+1] = pivot;\n return i+1;\n }",
"public int quickselect(int left, int right, int k_smallest) {\n\n if (left == right) // If the list contains only one element,\n return this.nums[left]; // return that element\n\n // select a random pivot_index\n Random random_num = new Random();\n int pivot_index = left + random_num.nextInt(right - left);\n\n pivot_index = partition(left, right, pivot_index);\n\n // the pivot is on (N - k)th smallest position\n if (k_smallest == pivot_index)\n return this.nums[k_smallest];\n // go left side\n else if (k_smallest < pivot_index)\n return quickselect(left, pivot_index - 1, k_smallest);\n // go right side\n return quickselect(pivot_index + 1, right, k_smallest);\n }",
"public static void quicksort(int l, int r, List<CustomCharacter> list)\n throws InterruptedException {\n\n // handle edge cases\n if(l >= r){\n return;\n }\n if(l >= list.size()){\n return;\n }\n if(r >= list.size()){\n r = list.size() - 1;\n }\n\n\n\n // partition smaller elements on left // and larger on right // with respect to the originalPosition of the rth element (pivot)\n int smallElementEnd = l-1;\n System.out.println(\"Deciding for : \" + list.get(r).key);\n\n CustomCharacter rth = list.get(r);\n for (int i = l; i < r; i++) {\n CustomCharacter curr = list.get(i);\n if(curr.originalPosition < rth.originalPosition){\n swap(list, ++smallElementEnd, i);\n }\n }\n\n // place rth element at correct position\n swap(list, ++smallElementEnd, r);\n\n Thread.sleep(1500);\n printList(list);\n\n // sort the remaining two halves\n quicksort(l, smallElementEnd-1, list);\n quicksort(smallElementEnd + 1, r, list);\n }",
"public static int partition(int[] data, int start, int end) {\n int pivotIndex = (int) (Math.random()*(end - start) + start);\n int pivot = data[pivotIndex];\n int low = start + 1;\n int high = end;\n data[pivotIndex] = data[0];//swap pivot and index\n data[0] = pivot;//swap pivot and index\n while(low <= high){//while still within bounds\n if(data[low] > pivot){//if less than the pivot\n swap(data, low, high);\n high--;\n }else{\n low++;//start moves over by one\n }\n }\n swap(data, start, high);\n return high;\n }",
"private static int choosePivot(int[] array, int left, int right) {\n int middle = left + (right - left) / 2; // pivot choosen in middle\n int pivotValue = array[middle];\n SortUtils.swap(array, right, middle); // moving pivot to end (right index)\n return pivotValue;\n }",
"public int quickselect(int left, int right, int k_smallest) {\n\t\t\t\n\t\t\tif (left == right) // If the list contains only one element,\n\t\t\t{\n\t\t\t\treturn this.nums[left]; // return that element\n\t\t\t}\n\t\t\t\n\t\t\t// select a random pivot_index\n\t\t\tRandom random_num = new Random();\n\t\t\tint pivot_index = left + random_num.nextInt(right - left);\n\t\t\t\n\t\t\tpivot_index = partition(left, right, pivot_index);\n\t\t\t\n\t\t\t// the pivot is on (N - k)th smallest position\n\t\t\tif (k_smallest == pivot_index) {\n\t\t\t\treturn this.nums[k_smallest];\n\t\t\t}\n\t\t\t// go left side\n\t\t\telse if (k_smallest < pivot_index) {\n\t\t\t\treturn quickselect(left, pivot_index - 1, k_smallest);\n\t\t\t}\n\t\t\t// go right side\n\t\t\treturn quickselect(pivot_index + 1, right, k_smallest);\n\t\t}",
"int quick_partition(int start, int end)\n {\n\t int i=start;\n int pivot = A[end]; //Choosing last element as pivot element\n int pindex = start; // Index of first element\n while(i<=end-1){\n\n /* If current element is smaller or equal to pivot then exchange it with element at pindex and increment the pindex*/\n if (A[i] <= pivot)\n {\n // swap A[pIndex] and A[i]\n \n int temp = A[pindex];\n A[pindex] = A[i];\n A[i] = temp;\n pindex=pindex+1;\n }\n i++;\n }\n \n /*swap A[pindex]with A[end] */\n int temp = A[pindex];\n A[pindex] = A[end];\n A[end] = temp;\n return pindex;\n }",
"private void quicksort(int[] array, int start, int end) {\n assert start <= end;\n assert start >= 0;\n assert end < array.length;\n \n switch (end - start) {\n case 0: // termination conditions\n return;\n case 1: // save some recursions\n if (array[start] > array[end]) {\n swap(array, start, end);\n }\n break;\n default: // here it gets difficult\n \n // Points at end of collected pivot elements\n int pivotIndex = rnd.nextInt(end - start) + start;\n \n // pivot element value\n int pivot = array[pivotIndex];\n \n swap(array, pivotIndex, start);\n pivotIndex = start;\n \n // points at end of section that contains elements smaller than\n // pivot\n int lowerIndex = start + 1;\n \n // points at start of section that contains elements bigger than\n // pivot\n int higherIndex = end;\n \n while (lowerIndex <= higherIndex) {\n if (array[lowerIndex] <= pivot) {\n if (array[lowerIndex] == pivot) {\n swap(array, lowerIndex, pivotIndex + 1);\n pivotIndex++;\n }\n lowerIndex++;\n continue;\n }\n if (array[higherIndex] >= pivot) {\n if (array[higherIndex] == pivot) {\n swap(array, higherIndex, pivotIndex + 1);\n pivotIndex++;\n } else {\n higherIndex--;\n }\n continue;\n }\n swap(array, lowerIndex, higherIndex);\n switch (higherIndex - lowerIndex) {\n case 1:\n break;\n case 2:\n if (array[lowerIndex + 1] <= pivot) {\n lowerIndex++;\n } else {\n higherIndex--;\n }\n default:\n lowerIndex++;\n higherIndex--;\n }\n }\n lowerIndex--;\n \n // swap pivot elements back towards middle of slice\n int pivotBegin = start;\n while (lowerIndex > pivotIndex && pivotBegin <= pivotIndex) {\n swap(array, pivotBegin++, lowerIndex--);\n }\n \n // Now do recursions\n if (pivotBegin > pivotIndex) {\n quicksort(array, start, lowerIndex);\n } else {\n quicksort(array, start, pivotBegin);\n \n }\n quicksort(array, higherIndex, end);\n }\n }",
"public static Integer[][] rouletteSelect(Integer[][] population)\n {\n Integer [][] parents = new Integer [2][boardSize];\n Integer [] fitnesses= new Integer[5];\n\n fitnesses[0] = Queens.measureFitness(population[0]);\n fitnesses[1] = Queens.measureFitness(population[1]);\n fitnesses[2] = Queens.measureFitness(population[2]);\n fitnesses[3] = Queens.measureFitness(population[3]);\n fitnesses[4] = Queens.measureFitness(population[4]);\n \n int sum=0;\n\n for(int i=0;i<5 ; i++){\n sum+=fitnesses[i];\n\n }\n\n int i= rand.nextInt(sum);\n int j= rand.nextInt(sum);\n\n int first= fitnesses[0];\n int second= first + fitnesses[1];\n int third= second + fitnesses[2];\n int fourth= third + fitnesses[3];\n int fifth= fourth + fitnesses[4];\n\n int x=0;\n int y=0;\n\n if (i <= first){\n x=0;\n }\n\n if (j <= first){\n y=0;\n }\n \n if(i>first && i<= second){\n x=1;\n }\n \n if(j>first && j<= second){\n y=1;\n }\n\n if(i>second && i<= third){\n x=2;\n }\n \n if(j>second && j<= third){\n y=2;\n }\n\n if(i>third && i<= fourth){\n x=3;\n }\n \n if(j>third && j<=fourth ){\n y=3;\n }\n\n if(i>fourth && i<= fifth){\n x=4;\n }\n \n if(j>fourth && j<= fifth){\n y=4;\n }\n\n \n parents[0]= population[x];\n parents[1]= population[y];\n\n return parents;\n\n\n }",
"private static int partition(int[] a, int p, int q) {\n\t\tint pivot = a[p], i = p, j = q;\r\n\t\twhile ( i < j) {\r\n\t\t\twhile (i < j && a[--j] >= pivot);\r\n\t\t\tif (i < j) {\r\n\t\t\t\ta[i] = a[j];\r\n\t\t\t}\r\n\t\t\twhile (i < j && a[++i] <= pivot);\r\n\t\t\tif (i < j) {\r\n\t\t\t\ta[j] = a[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\ta[j] = pivot;\r\n\t\treturn j;\r\n\t}",
"public interface IPivotStrategy<T>\r\n{\r\n /**\r\n * Returns the index of the element selected as the pivot value\r\n * within the subarray between first and last (inclusive).\r\n * \r\n * @param arr the array in which to select the pivot\r\n * @param first beginning of the subarray\r\n * @param last end of the subarray\r\n * @param comp the comparator to be used\r\n * @return index of the element selected as the pivot value\r\n * @throws IllegalArgumentException if the length of the subarray\r\n * (last - first + 1) is less than the value returned by minLength().\r\n */\r\n int indexOfPivotElement(T[] arr, int first, int last, Comparator<? super T> comp);\r\n\r\n /**\r\n * Returns the minimum length of the subarray to which this \r\n * partitioning strategy can be applied.\r\n * \r\n * @return minimum size of the subarray required to apply this\r\n * pivot selection strategy\r\n */\r\n int minLength();\r\n\r\n /**\r\n * Returns the number of comparisons performed in the most recent call\r\n * to indexOfPivotElement\r\n * @return number of comparisons\r\n */\r\n int getComparisons();\r\n \r\n /**\r\n * Returns the number of swaps performed in the most recent call\r\n * to indexOfPivotElement. For algorithms that do not use swapping, \r\n * this method returns an estimate of swaps equivalent to one-third\r\n * the number of times that an array element was assigned.\r\n * @return equivalent number of swaps\r\n */\r\n int getSwaps();\r\n \r\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add random pointers for new nodes | private void addRandomPointers(RandomListNode head) {
RandomListNode cur = head;
while (cur != null) {
RandomListNode newNode = cur.next;
if (cur.random == null) {
newNode.random = null;
} else {
newNode.random = cur.random.next;
}
cur = newNode.next;
}
} | [
"public void fill() {\n Random rand=new Random(2);\n \n for(int i=0;i<size;i++){\n if(current==null){\n current=new VecNode(i, rand.nextDouble());\n first=current;\n }\n else{\n VecNode last=new VecNode(i, rand.nextDouble());\n current.next=last;\n current=last;\n }\n }\n }",
"public void addRandomPerson()\n {\n addPerson(Person.getRandomPerson());\n }",
"AddNodes createAddNodes();",
"protected abstract void generateNodes();",
"private void getRandomNextPosition() {\n\t\t// getWidth and getHeight return 0\n // if we are called on a new diagram.\n\t\tnextNodePosition.x = Math.random() * Math.max(100, getWidth() - 100);\n\t\tnextNodePosition.y = Math.random() * Math.max(100, getHeight() - 100);\n\t}",
"private long createNode(Object state)\n {\n //Give the Node a new random Id.\n Random random = new Random();\n long newId = random.nextLong();\n \n //Make sure the Id is unique.\n while(containsKey(newId))\n newId = random.nextLong();\n \n //Create the new Node and put it into the list.\n put(newId, new Node(state, newId));\n \n //Return the new Node's Id.\n return newId;\n }",
"private void generateNodes() {\r\n\t\tfor(int x = 1; x <= 4; x++) {\r\n\t\t\tfor(int y = 1; y <= 2; y++) {\r\n\t\t\t\tnodes.add(new Node(x, y));\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void insertRandom() {\n // Create new node\n CriteriaNode newNode = generateRandomNonterminalNode();\n\n // Get random leaf node\n Node[] nodes = getRandomTerminalNode();\n Node prev = nodes[PREV];\n Node node = nodes[CURR];\n\n // Replace either left or right with a random CriteriaNode\n if (prev == null) {\n // If tree has only a root node\n if (U.chance()) {\n root.left = newNode;\n } else {\n root.right = newNode;\n }\n } else {\n // Replace the correct reference of prev with the new node\n if (prev.left == node) {\n prev.left = newNode;\n } else {\n prev.right = newNode;\n }\n }\n }",
"public abstract void addNodes();",
"public void MoveRandom(){\n Asteroid a = (Asteroid) neighbors.get(0);\n a.RemoveNeighbor(this);\n Place neighbor = a.GetRandomNeighbor();\n neighbor.AddNeighbor(this);\n \n neighbors.remove(a);\n neighbors.add(neighbor);\n }",
"public void addRandom() {\n addEntry( randomEntry( 10 )); \n }",
"protected NNode getRandomNode() {\n\t\tArrayList<NNode> nodearr = new ArrayList<NNode>();\n\t\tnodearr.addAll(nodes.values());\n\t\treturn nodearr.get(Braincraft.randomInteger(nodearr.size()));\n\t}",
"public void testPoints() {\r\n node = new Node(null);\r\n int expected = 0;\r\n \r\n //check that the node is initialized to 0;\r\n assertEquals(expected, node.getPoints());\r\n \r\n for (int i = 0; i < NUMBER_OF_TESTS; i++) {\r\n expected = rand.nextInt();\r\n \r\n node.setPoints(expected);\r\n assertEquals(expected, node.getPoints());\r\n }\r\n }",
"private static BankNode getRandomNode() {\n int index = new Random().nextInt(bankNode.getBankNodes().size() - 1);\n int nodeID = bankNode.getBankNodes().keySet().parallelStream().filter(n -> n != bankNode.getNodeID()).collect(Collectors.toList()).get(index);\n return new BankNode(nodeID, bankNode.getBankNodes().get(nodeID));\n }",
"public void addChild(Node n) {\n\t\taddChild(n, (rand.nextDouble()*0.02 - 0.01));\n\t}",
"public void mutateLink() {\n\r\n for (int i = 0; i < 100; i++) {\r\n\r\n\r\n //NodeGene a = nodes.get(r.nextInt(nodes.size()));\r\n //NodeGene b = nodes.get(r.nextInt(nodes.size()));\r\n NodeGene a = randomNode(nodes);\r\n NodeGene b = randomNode(nodes);\r\n\r\n\r\n if (a == null || b == null) continue;\r\n if (a == b) continue;\r\n if (a.getX() == b.getX()) {\r\n //System.out.println(\"same x --\");\r\n continue;\r\n\r\n }\r\n\r\n ConnectionGene con;\r\n\r\n\r\n if (a.getX() < b.getX()) {\r\n con = new ConnectionGene(a, b);\r\n } else {\r\n con = new ConnectionGene(b, a);\r\n }\r\n\r\n if (!isValidConection(con)) {\r\n //System.out.println(\"not valid -- \");\r\n continue;\r\n }\r\n\r\n con = brain.getConnection(con.getFrom(), con.getTo());\r\n con.setWeight((float) ((Math.random() * 2 - 1) * brain.getWeightRandomRange()));\r\n con.setEnabeled(true);\r\n\r\n connections.add(con);\r\n System.out.println(\"mutlink -- \");\r\n return;\r\n }\r\n //mutateLink();\r\n }",
"public void createNodes() {\r\n\t\tfor (int i=0;i<numberOfNodes;i++) { //For each number of nodes that the graph contains\r\n\t\t\tNode aNode=new Node(i); //A node is created\r\n\t\t\tnodesList.add(i, aNode);; //is added to the list of nodes\r\n\t\t}\r\n\t}",
"public RandomListNode copyRandomList(RandomListNode head) {\n if(head==null){\n return null;\n }\n \n //1. link the two up, only next pointer is setup\n for(RandomListNode node=head;node!=null;){ //looping through the old list, do not use the for loop increaser as you are modifying the next pointer!!\n RandomListNode newNode = new RandomListNode(node.label);\n newNode.next = node.next;\n node.next = newNode;\n node = newNode.next;\n }\n \n //2. setup random pointers in new list\n for(RandomListNode node=head;node!=null;){ //looping through the old list, do not use the for loop increaser as you are modifying the next pointer!!\n \tRandomListNode newNode = node.next;\n \tif(node.random!=null){ //random could be null!!!\n \t newNode.random = node.random.next; \n \t}\n \tnode = newNode.next;\n }\n \n //3. break the two link lists\n //we still need a head for the new guy\n RandomListNode newHead = head.next;\n \n for(RandomListNode node=head;node!=null;){ \n \tRandomListNode newNode = node.next;\n \tRandomListNode nextOldNode = newNode.next;\n \tRandomListNode nextNewNode = null;\n \tif(nextOldNode!=null){\n \t\tnextNewNode = nextOldNode.next;\n \t}\n \t\n \t//fix the links\n \tnode.next = nextOldNode;\n \tnewNode.next = nextNewNode;\n \t\n \t//update iterator\n \tnode = nextOldNode; \n }\n \n return newHead;\n }",
"public Node getRandomNode() {\n // TODO: Instead of declaring a new Random every call, can we just put \n // one at the top outside of everything?\n Random randomized = new Random();\n // TODO: Can this be optimized better? We're using maps so Processing's \n // random function doesn't seem to apply here\n List<String> nodekeys = new ArrayList<String>(this.nodemap.keySet());\n String randomnodekey = nodekeys.get( randomized.nextInt(nodekeys.size()) );\n Node randomnode = this.nodemap.get(randomnodekey);\n return randomnode;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Utility method for creating a SmartServiceException that can be passed back to the Appian framework | private SmartServiceException createException(Throwable t, String key, Object... args) {
return new SmartServiceException.Builder(getClass(), t).userMessage(key, args).build();
} | [
"RestLiServiceException getServiceException();",
"public interface ServiceException {}",
"public ServiceException()\n {\n super();\n\n this.serviceError = new ServiceError(this);\n }",
"public DataAccessorServiceException() {\n }",
"public HarvServiceException()\n\t{}",
"Exception createException();",
"public ServiceException getServiceException() { return serviceException; }",
"ExceptionDef createExceptionDef();",
"public WebServiceException()\n {\n\tsuper();\n }",
"public ServiceException() {\n }",
"public WeatherDataServiceException()\n\t{\n\t\tsuper();\n\t}",
"public ServiceException(String message)\n {\n super(message);\n\n this.serviceError = new ServiceError(this);\n }",
"public void setServiceException(ServiceException serviceException) { this.serviceException=serviceException; exceptionType=SERVICEEXCEPTION; }",
"public HarvServiceException(String msg)\n\t{\n\t\tsuper(msg);\n\t}",
"public com.vodafone.global.er.decoupling.binding.request.ErServiceType createErServiceType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.ErServiceTypeImpl();\n }",
"public WebServiceException(String msg)\n {\n\tsuper(msg);\n }",
"public DataAccessorServiceException(String msg) {\n super(msg);\n }",
"public ServiceException(String message) {\n super(message);\n }",
"public ServiceException(Throwable cause)\n {\n super(cause);\n\n this.serviceError = new ServiceError(this);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remove Added Join Relationships | @Override
public void undo() {
if (!businessView.getJoinRelationships().isEmpty()){
businessView.getJoinRelationships().removeAll(addedJoinRelationships);
businessModel.getJoinRelationships().removeAll(addedJoinRelationships);
}
//Add Removed Join Relationships
businessView.getJoinRelationships().addAll(removedJoinRelationships);
businessModel.getJoinRelationships().addAll(removedJoinRelationships);
int i = 0;
//Edited Join Relationships
for (BusinessViewInnerJoinRelationship modifiedJoinRelationship: modifiedJoinRelationships){
modifiedJoinRelationship.getSourceColumns().clear();
modifiedJoinRelationship.getSourceColumns().addAll(modifiedSourceColumns.get(i));
modifiedJoinRelationship.getDestinationColumns().clear();
modifiedJoinRelationship.getDestinationColumns().addAll(modifiedDestinationColumns.get(i));
i++;
}
} | [
"void unsetFurtherRelations();",
"void unsetRelations();",
"public void delIncomingRelations();",
"public void delRelations();",
"public void removeAllRelations() {\n\t\tfor (Relation rel: this.relations) {\n\t\t\tKey otherKey = rel.getOtherKey(this);\n\t\t\totherKey.getRelations().remove(rel);\n\t\t}\n\t\tthis.relations.clear();\n\t}",
"public void removeAllRelation()\n {\n _relationList.removeAllElements();\n }",
"private void deleteFromJoinTable(EntitySaveGraph objectGraph, EntityMetadata metadata)\n {\n // Delete data from Join Table if any\n if (metadata.isRelationViaJoinTable())\n {\n for (Relation relation : metadata.getRelations())\n {\n if (relation.isRelatedViaJoinTable())\n {\n \n JoinTableMetadata jtMetadata = relation.getJoinTableMetadata();\n String joinTableName = jtMetadata.getJoinTableName();\n \n Set<String> joinColumns = jtMetadata.getJoinColumns();\n Set<String> inverseJoinColumns = jtMetadata.getInverseJoinColumns();\n \n String joinColumnName = (String) joinColumns.toArray()[0];\n String inverseJoinColumnName = (String) inverseJoinColumns.toArray()[0];\n \n EntityMetadata relMetadata = getMetadata(objectGraph.getChildClass());\n \n Client pClient = getClient(metadata);\n pClient.deleteByColumn(joinTableName, joinColumnName, objectGraph.getParentId());\n \n }\n }\n }\n }",
"@Override\n\tpublic void flushRelationships(){\n\t\trelationship_map=null;\n\t\troles.clear();\n\t}",
"void unnecessaryRelationshipTraversed();",
"public void unsetFurtherRelations()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(FURTHERRELATIONS$10, 0);\n }\n }",
"void clearAssociations();",
"public void removeAllForeignKey()\n {\n _foreignKeyList.removeAllElements();\n }",
"public Object removeExistingRelationships(String entityId);",
"@Test\n public void testGetAllRemoveRelationship() {\n dao.removeRelationship(hero.getId(), org.getId());\n assertTrue(dao.getAllRelationships().size() == 0);\n }",
"public void removeAllQualifiedAssociation() {\r\n\t\tBase.removeAll(this.model, this.getResource(), QUALIFIEDASSOCIATION);\r\n\t}",
"public void resetRelatesToList(MappingType mapping) {\n\t\tmapping.getRelatesTo().clear();\n\t}",
"public void filter11Relations() {\n this.relations.removeIf(relationship -> !relationship.isOneToOne());\n }",
"void removeRelationship(DbRelationship rel) {\n objectList.remove(rel);\n fireTableDataChanged();\n }",
"void unsetRelatedPerson();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
setActivityLog1 =getting all the returns and orders of the member | public Msg setActivityLog1(Msg msg, Connection con) {
Statement stmt;
int returns=0,orders=0;
try {
Member member=(Member) msg.dataToServer.get(0);
String newQuery="select returns.issueDate,returns.returnDate,returns.actualReturnDate,books.bookname,returns.statusReturn FROM returns INNER JOIN books on returns.idbook = books.idbook where returns.MemberID='"+member.getMemberID() +"';";
stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(newQuery);
ResultSetMetaData rsmd = (ResultSetMetaData) rs.getMetaData();
msg.result=false;
while(rs.next()) {
msg.result=true;
Object obj = createObject_ReturnsForActivityLog(rs);
returns++;
System.out.println(obj.toString());
msg.dataFromServer.add(obj);
}
if(!(msg.result))
{
Return nullReturn =new Return();
msg.dataFromServer.add(nullReturn);
}
newQuery="select orders.memberID,orders.idbook,orders.positionInLine,books.bookname FROM orders INNER JOIN books on orders.idbook = books.idbook where orders.MemberID='"+member.getMemberID() +"';";
stmt = conn.createStatement();
rs = stmt.executeQuery(newQuery);
rsmd = (ResultSetMetaData) rs.getMetaData();
msg.result=false;
while(rs.next()) {
msg.result=true;
Object obj = createObject_ordersForActivityLog(rs);
orders++;
System.out.println(obj.toString());
msg.dataFromServer.add(obj);
}
if(!(msg.result))
{
orders nullorders=new orders();
msg.dataFromServer.add(nullorders);
}
rs.close();
}
catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
msg.dataFromServer.add(returns);
msg.dataFromServer.add(orders);
return msg;
} | [
"public void setUserLogs() {\n ResultSet rs = Business.getInstance().getData().getCaseLog();\n try{\n while (rs.next()) {\n userLog.add(new UserLog(rs.getInt(\"userID\"),\n rs.getInt(2),\n rs.getString(\"date\"),\n rs.getString(\"time\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void setCaseLogs() {\n ResultSet rs = Business.getInstance().getData().getCaseLog();\n try{\n while (rs.next()) {\n caseLog.add(new CaseLog(rs.getInt(\"userid\"),\n rs.getInt(\"caseid\"),\n rs.getString(\"date\"),\n rs.getString(\"time\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private Msg setActivityLog(Msg msg, Connection con) {\r\n\t\t//\tString search;\r\n\r\n\t\tArrayList<Object> objectArr = new ArrayList<>();\r\n\t\tStatement stmt;\r\n\t\tSystem.out.println(msg.getQuery());\r\n\t\ttry {\r\n\t\t\tstmt = conn.createStatement();\r\n\r\n\t\t\tResultSet rs = stmt.executeQuery(msg.getQuery());\r\n\t\t\tResultSetMetaData rsmd = (ResultSetMetaData) rs.getMetaData();\r\n\t\t\tmsg.result=false;\r\n\t\t\twhile(rs.next()) {\r\n\t\t\t\tmsg.result = true;\r\n\t\t\t\tObject obj = createObject_Returns(rs);\r\n\t\t\t\tSystem.out.println(obj.toString());\r\n\t\t\t\tmsg.dataFromServer.add(obj);\r\n\r\n\t\t\t}\r\n\t\t\tif(!(msg.result))\r\n\t\t\t{\r\n\t\t\t\tReturn nullReturn =new Return();\t\t\t\r\n\t\t\t\tmsg.dataFromServer.add(nullReturn);\r\n\t\t\t}\r\n\r\n\t\t\trs.close();\r\n\t\t}\r\n\t\tcatch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\r\n\t\treturn msg;\r\n\r\n\r\n\r\n\t}",
"public List<ActionLog> fetchOrderedByTime();",
"public void getHistory() {\r\n\t\tthis.usersOperations.forEach(operation ->\r\n\t\t\tSystem.out.print(\"Operation : \" + operation.getOperationName() + \" - Date : \" + operation.getOperationDate()+ \" - Amount : \"+ operation.getOperationAmount() +\" - Balance :\" + operation.getAccountsBalance() )\r\n\t\t);\r\n\t\t\t\t\t\t\t\r\n\t}",
"private void recordActivities(CollAHost host, ActivityID activity, String outro) throws NonExistentUser {\n try {\n Server server = Server.getInstance();\n CollAUser usr = server.getUser(host.getNameUser());\n HashMap<String, String> record;\n String pastActivities;\n if (outro == null) {\n outro = \"\";\n }\n record = host.getActivities();\n\n TimeAndDate timeDate = server.getTimeAndDateInstance();\n\n pastActivities = record.get(timeDate.getSimpleDate());\n if (pastActivities == null) {\n pastActivities = timeDate.getHour() + \": \" + activity.getID() + \": \" + activity.getActivity() + outro + \"\\n\";\n host.recordActivities(timeDate.getSimpleDate(), pastActivities);\n } else {\n pastActivities = timeDate.getHour() + \": \" + activity.getID() + \": \" + activity.getActivity() + outro + \"\\n\";\n host.recordActivities(timeDate.getSimpleDate(), pastActivities);\n }\n usr.addHost(host);\n server.updateUser(usr);\n } catch (ServerInitializationException serEx) {\n Debugger.debug(serEx);\n }\n\n }",
"ArrayList<Usertransaction> transactionHistory();",
"TransactionIntentLog getLog();",
"public void viewActiveOrders(){\n System.out.println(cc.blueB+\"Active Orders:\\n--------------\"+cc.reset);\n String view = \"\";\n for (int i = 0; i < activeOrders.getActiveOrders().size(); i++) {\n view += \"\\n#\" + activeOrders.getActiveOrders().get(i).getId() + \" '\" + activeOrders.getActiveOrders().get(i).customer.name +\n \"' (\" + activeOrders.getActiveOrders().get(i).customer.number + \") - \";\n if (activeOrders.getActiveOrders().get(i).remote) {\n view += \"Ordered by Phone\\n\";\n } else {\n view += \"Ordered in Person\\n\";\n }\n if(activeOrders.getActiveOrders().get(i).isReady()){\n view += cc.green+\"-Ready-\\n\"+cc.reset;\n }else{\n view += cc.red+\"-Not Ready-\\n\"+cc.reset;\n }\n view += \"Order(s):\\n\";\n double sum = 0;\n for (int j = 0; j < activeOrders.getActiveOrders().get(i).getItems().size(); j++) {\n view += activeOrders.getActiveOrders().get(i).getItems().get(j).getId();\n if (activeOrders.getActiveOrders().get(i).getItems().get(j).getId() < 10) {\n view += \" --- \";\n } else {\n view += \" -- \";\n }\n view += cc.green+\"\\\"\" + activeOrders.getActiveOrders().get(i).getItems().get(j).getName() + \"\\\"\"+cc.reset+\" --- \";\n for (int k = 0; k < activeOrders.getActiveOrders().get(i).getItems().get(j).getIngredients().length; k++) {\n view += StringUtils.capitalize(activeOrders.getActiveOrders().get(i).getItems().get(j).getIngredients()[k].toLowerCase());\n if (k < activeOrders.getActiveOrders().get(i).getItems().get(j).getIngredients().length - 2) {\n view += \", \";\n } else if (k < activeOrders.getActiveOrders().get(i).getItems().get(j).getIngredients().length - 1) {\n view += \", and \";\n }\n }\n view += \" --- \" + activeOrders.getActiveOrders().get(i).getItems().get(j).getPrice() + \"kr.\\n\";\n sum += activeOrders.getActiveOrders().get(i).getItems().get(j).getPrice();\n }\n view += cc.green+\"Total: \" + sum + \"kr.\\n\"+cc.reset;\n }\n if (view.equals(\"\")) {\n view = cc.red+\"No active orders\"+cc.reset;\n }\n System.out.println(view);\n System.out.println(cc.blueB+\"--------------\"+cc.reset);\n }",
"public static void userViewOrders(String username) {\r\n\t\tUser user = userMap.get(username);\r\n\t\tArrayList<Order> orders = user.getOrders();\r\n\t\tfor (int i=0; i<orders.size(); i++) {\r\n\t\t\tSystem.out.println(\"Order \" + (i+1) + \":\");\r\n\t\t\tOrder order = orders.get(i);\r\n\t\t\tSystem.out.println(\"Auditorium \" + (order.getAuditoriumNum().get(0) + 1));\r\n\t\t\tSystem.out.print(order.getRows().get(0) + 1);\r\n\t\t\tSystem.out.print(order.getSeats().get(0));\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t\tfor (int j=1; j<order.getSeats().size(); j++) {\r\n\t\t\t\tif (order.getAuditoriumNum().get(j).\r\n\t\t\t\t\t\tequals(order.getAuditoriumNum().get(j-1))) {\r\n\t\t\t\t\tSystem.out.print(order.getRows().get(j) + 1);\r\n\t\t\t\t\tSystem.out.print(order.getSeats().get(j));\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSystem.out.println(\"\\nAuditorium \" + (order.getAuditoriumNum().get(j) + 1));\r\n\t\t\t\t\tSystem.out.print(order.getRows().get(j) + 1);\r\n\t\t\t\t\tSystem.out.print(order.getSeats().get(j));\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t\tif (order.getNumATickets() == 1) {\r\n\t\t\t\tSystem.out.println(order.getNumATickets() + \" Adult Ticket\");\r\n\t\t\t} else if (order.getNumATickets() > 1) {\r\n\t\t\t\tSystem.out.println(order.getNumATickets() + \" Adult Tickets\");\r\n\t\t\t}\r\n\t\t\tif (order.getNumCTickets() == 1) {\r\n\t\t\t\tSystem.out.println(order.getNumCTickets() + \" Child Ticket\");\r\n\t\t\t} else if (order.getNumCTickets() > 1) {\r\n\t\t\t\tSystem.out.println(order.getNumCTickets() + \" Child Tickets\");\r\n\t\t\t}\r\n\t\t\tif (order.getNumSTickets() == 1) {\r\n\t\t\t\tSystem.out.println(order.getNumSTickets() + \" Senior Ticket\");\r\n\t\t\t} else if (order.getNumSTickets() > 1) {\r\n\t\t\t\tSystem.out.println(order.getNumSTickets() + \" Senior Tickets\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t}",
"public void logOrder(AdmitadOrder order) {\n logOrder(order, ADMITAD_MOBILE_CHANNEL, null);\n }",
"private static void globallog() {\n ArrayList<Commit> commitlst = new ArrayList<>();\n for (String commit: _repo.getcommits()) {\n File comfile = new File(\".gitlet/commits/\" + commit);\n Commit com = Utils.readObject(comfile, Commit.class);\n commitlst.add(com);\n }\n for (Commit s : commitlst) {\n System.out.println(\"===\");\n System.out.println(\"commit \" + s.getid());\n System.out.println(\"Date: \" + s.gettime());\n System.out.println(s.getlog());\n System.out.println();\n }\n }",
"public void logStoreAppendSuccess(AppendLogCommand cmd) {\r\n\r\n\r\n\r\n if (logger.isInfoEnabled())\r\n logger.info(\"LogStore call back MemberAppend {}\",\r\n new String(cmd.getTerm() + \" \" + cmd.getLastIndex()));\r\n\r\n\r\n\r\n // send to all follower and self\r\n\r\n\r\n\r\n }",
"public String getLogData() {\r\n\t\tLogDbHelper logDbHelper = new LogDbHelper(context);\r\n\r\n\t\t// Gets the data repository in read mode\r\n\t\tSQLiteDatabase db = logDbHelper.getReadableDatabase();\r\n\r\n\t\t// 1. Get the total time in application\r\n\t\tString query = \"SELECT * FROM application_log\";\r\n\r\n\t\tCursor c = db.rawQuery(query, null);\r\n\t\tc.moveToFirst();\r\n\t\tString user_id = \"\";\r\n\t\tList<String> event = new LinkedList<String>();\r\n\t\tList<Float> timestamp = new LinkedList<Float>();\r\n\t\tint timesPaused = 0;\r\n\t\tint timesInMain = 0;\r\n\t\tint clicksForWeeklyArchive = 0;\r\n\t\tint clicksForDailyArchive = 0;\r\n\t\tint clicksForCurrentLoc = 0;\r\n\t\tint clicksForLastPlace = 0;\r\n\t\tint clicksForLatestJourney = 0;\r\n\t\tint clicksForDailyItin = 0;\r\n\t\tint clicksForWeeklyItin = 0;\r\n\t\tint clicksForMostVisited = 0;\r\n\t\tint likesForCurrentLoc = 0;\r\n\t\tint likesForLastPlace = 0;\r\n\t\tint likesForLatestJourney = 0;\r\n\t\tint likesForDailyItin = 0;\r\n\t\tint likesForWeeklyItin = 0;\r\n\t\tint likesForMostVisited = 0;\r\n\r\n\t\twhile (!c.isAfterLast()) {\r\n\t\t\tevent.add(c.getString(1));\r\n\t\t\ttimestamp.add(c.getFloat(2));\r\n\t\t\tc.moveToNext();\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < timestamp.size(); i++) {\r\n\r\n\t\t\tif (event.get(i).equals(\"WEEK_ARCHIVE\")) clicksForWeeklyArchive++;\r\n\t\t\telse if (event.get(i).equals(\"DAY_ARCHIVE\")) clicksForDailyArchive++;\r\n\t\t\telse if (event.get(i).equals(\"CURRENT_LOC\")) clicksForCurrentLoc++;\r\n\t\t\telse if (event.get(i).equals(\"LAST_PLACE\")) clicksForLastPlace++;\r\n\t\t\telse if (event.get(i).equals(\"LATEST_JOURNEY\")) clicksForLatestJourney++;\r\n\t\t\telse if (event.get(i).equals(\"DAILY_ITIN\")) clicksForDailyItin++;\r\n\t\t\telse if (event.get(i).equals(\"WEEKLY_ITIN\")) clicksForWeeklyItin++;\r\n\t\t\telse if (event.get(i).equals(\"MOST_VISITED\")) clicksForMostVisited++;\r\n\t\t\telse if (event.get(i).equals(\"LIKED_CURRENT_LOC\")) likesForCurrentLoc++;\r\n\t\t\telse if (event.get(i).equals(\"LIKED_LAST_PLACE\")) likesForLastPlace++;\r\n\t\t\telse if (event.get(i).equals(\"LIKED_LATEST_JOURNEY\")) likesForLatestJourney++;\r\n\t\t\telse if (event.get(i).equals(\"LIKED_DAILY_ITIN\")) likesForDailyItin++;\r\n\t\t\telse if (event.get(i).equals(\"LIKED_WEEKLY_ITIN\")) likesForWeeklyItin++;\r\n\t\t\telse if (event.get(i).equals(\"LIKED_MOST_VISITED\"))\tlikesForMostVisited++;\r\n\t\t\telse if (event.get(i).equals(\"MAIN\")) timesInMain++;\r\n\t\t\telse if (event.get(i).equals(\"PAUSE\"))\ttimesPaused++;\r\n\r\n\t\t}\t\r\n\r\n\t\tString result = \"######################## USAGE LOG ##########################\"\r\n\t\t\t\t+ \"\\n\" + \"User ID: \"\r\n\t\t\t\t+ user_id\r\n\t\t\t\t+ \"\\n\"\r\n\t\t\t\t+ \"Number of times in Main: \"\r\n\t\t\t\t+ timesInMain\r\n\t\t\t\t+ \"\\n\"\r\n\t\t\t\t+ \"Number of times Paused: \"\r\n\t\t\t\t+ timesPaused\r\n\t\t\t\t+ \"\\n\"\r\n\t\t\t\t+ \"Number of times in Weekly Itinerary archive: \"\r\n\t\t\t\t+ clicksForWeeklyArchive\r\n\t\t\t\t+ \"\\n\"\r\n\t\t\t\t+ \"Number of times in Daily Itinerary archive: \"\r\n\t\t\t\t+ clicksForDailyArchive\r\n\t\t\t\t+ \"\\n\"\r\n\t\t\t\t+ \"Number of times in Current Location detailed view: \"\r\n\t\t\t\t+ clicksForCurrentLoc\r\n\t\t\t\t+ \"\\n\"\r\n\t\t\t\t+ \"Number of times in Last Place Visited detailed view: \"\r\n\t\t\t\t+ clicksForLastPlace\r\n\t\t\t\t+ \"\\n\"\r\n\t\t\t\t+ \"Number of times in Latest Journey detailed view: \"\r\n\t\t\t\t+ clicksForLatestJourney\r\n\t\t\t\t+ \"\\n\"\r\n\t\t\t\t+ \"Number of times in Daily Itinerary detailed view: \"\r\n\t\t\t\t+ clicksForDailyItin\r\n\t\t\t\t+ \"\\n\"\r\n\t\t\t\t+ \"Number of times in Weekly Itinerary detailed view: \"\r\n\t\t\t\t+ clicksForWeeklyItin\r\n\t\t\t\t+ \"\\n\"\r\n\t\t\t\t+ \"Number of times in Most Visited Places detailed view: \"\r\n\t\t\t\t+ clicksForMostVisited\r\n\t\t\t\t+ \"\\n\"\r\n\t\t\t\t+ \"Current Location card thumbs up: \"\r\n\t\t\t\t+ likesForCurrentLoc\r\n\t\t\t\t+ \"\\n\"\r\n\t\t\t\t+ \"Last Place Visited card thumbs up: \"\r\n\t\t\t\t+ likesForLastPlace\r\n\t\t\t\t+ \"\\n\"\r\n\t\t\t\t+ \"Latest Journey card thumbs up: \"\r\n\t\t\t\t+ likesForLatestJourney\r\n\t\t\t\t+ \"\\n\"\r\n\t\t\t\t+ \"Daily Itinerary card thumbs up: \"\r\n\t\t\t\t+ likesForDailyItin\r\n\t\t\t\t+ \"\\n\"\r\n\t\t\t\t+ \"Weekly Itinerary card thumbs up: \"\r\n\t\t\t\t+ likesForWeeklyItin\r\n\t\t\t\t+ \"\\n\"\r\n\t\t\t\t+ \"Most Visited Places card thumbs up: \"\r\n\t\t\t\t+ likesForMostVisited\r\n\t\t\t\t+ \"\\n\"\r\n\t\t\t\t+ \"#############################################################\";\r\n\r\n\t\tc.close();\r\n\t\tdb.close();\r\n\t\treturn result;\r\n\t}",
"private void populateOrdersAndMakeGraphs() {\n Database.getInstance().setCallback(new Database.Callback() {\n @Override\n public void dbCallback(Object o) {\n Customer tempCustomer = (Customer)o;\n log = tempCustomer.getLog();\n final Stack<Order> ordersStack = new Stack<Order>();\n ordersStack.addAll(log.getOrders().values());\n\n // get all orders from database\n while (ordersStack.size() > 0) {\n Order order = ordersStack.pop();\n Database.getInstance().setCallback(new Database.Callback() {\n @Override\n public void dbCallback(Object o) {\n orders.add((Order)o);\n\n if (orders.size() == log.getOrders().size()) {\n extractDataFromOrders(orders);\n\n // create charts and order list\n caffeineBarChart = findViewById(R.id.caffeineBarChart);\n moneyXYPlot = findViewById(R.id.moneyXYPlot);\n\n // setup charts and order list\n onCreateCaffeineBarChart(coffeeCaffeineSeries, teaCaffeineSeries);\n onCreateMoneyXYPlot(coffeeExpenditureSeries, teaExpenditureSeries);\n }\n }\n });\n Database.getInstance().getOrder(order.getId());\n }\n }\n });\n Database.getInstance().getUser(userID);\n }",
"@Override\n @Transactional\n public List<AuditLog> logs() {\n\tCompany company = this.authHelper.getAuth().getCompany();\n\tLong companyID = company == null ? null : company.getId();\n\tList<AuditLog> logs = this.companyDAO.logs(companyID);\n\tfor (AuditLog log : logs) {\n\t log.setAuditAction(AuditAction.of(log.getAction()));\n\t}\n\treturn logs;\n }",
"public Vector listActivityTypeActivity() throws SQLException {\n Debug.print(\"Inside the getUserAndMemberId\");\n Vector vObj = new Vector();\n try {\n makeConnection();\n String slelctStr = \"SELECT A.activity_type_id,B.specification_id,B.specification_name, A.transaction_type_id FROM \"+ \n DBHelper.USEA_ACTIVITY_CATEGORY+\" A, \"+DBHelper.USEA_SPECIFICATION_MASTER+\" B \"+\n \" WHERE A.activity_type_id = B.activity_type_id AND A.activity_type_name = ? and B.active_status = ? order by B.specification_name\";\n PreparedStatement prepStmt = con.prepareStatement(slelctStr);\n prepStmt.setString(1, \"Activity\");\n prepStmt.setBoolean(2, true);\n \n rs = prepStmt.executeQuery();\n System.out.println(\"Inside the listActivityCategory \");\n while (rs.next()) {\n \n this.specificationId = rs.getString(2);\n this.specificationName = rs.getString(3);\n String txnTypeId = rs.getString(4);\n \n String [] activityList = {specificationId,specificationName,txnTypeId};\n vObj.add(activityList);\n }\n releaseConnection();\n }catch (SQLException e){\n e.printStackTrace();\n }finally {\n releaseConnection();\n }\n return vObj;\n }",
"private void getHistoryList(){\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd.MM.yyyy.\");\n\t\tboolean cyr = false;\n\t\tString naslov = Utils.convert(\"Registar \" + getCmbTypeModel().getSelectedItem(), cyr);\n\t\tString period = Utils.convert(\"period: \"+ getTfBegDate().getText()+ \" - \"+getTfEndDate().getText(),cyr);\n String rbr = Utils.convert(\"R.br.\", cyr);\n String bropomene = Utils.convert(\"Br.opomene\", cyr);\n String brclana = Utils.convert(\"Br.\\u010dlana\", cyr);\n String ime = Utils.convert(\"Prezime i ime\", cyr);\n String datum = Utils.convert(\"Dat. vra\\u0107anja\", cyr);\n String napomena = Utils.convert(\"Napomena\", cyr);\n String ctlgno = Utils.convert(\"Inv. broj\", cyr);\n \n Map paramslist = new HashMap(7);\n \t paramslist.put(\"naslov\", naslov);\n \t paramslist.put(\"period\", period);\n \t paramslist.put(\"rbr\", rbr);\n \t paramslist.put(\"bropomene\", bropomene);\n \t paramslist.put(\"brclana\", brclana);\n \t paramslist.put(\"ime\", ime);\n \t paramslist.put(\"datum\", datum);\n \t paramslist.put(\"napomena\", napomena);\n \t paramslist.put(\"ctlgno\", ctlgno);\n \t \n \t try{\n \t String brop = \"\";\n \t list.RootDocument doc = list.RootDocument.Factory.newInstance();\n \t doc.addNewRoot();\n \t int curNo1 = 0;\n \t int curNo2 = 0;\n \t for (int i = 0; i< getHistoryTableModel().getRowCount(); i++){\n \t \t \tif (getHistoryTableModel().getValueAt(i,0)==null || !brop.equals(getHistoryTableModel().getValueAt(i,0))){\n \t \t \t\tdoc.getRoot().addNewOpomena();\n \t \t \t\tcurNo1 = doc.getRoot().getOpomenaArray().length - 1;\n \t \t \t\tdoc.getRoot().getOpomenaArray(curNo1).setBropomene((String)getHistoryTableModel().getValueAt(i,0));\n \t \t \t doc.getRoot().getOpomenaArray(curNo1).setUserid((String)getHistoryTableModel().getValueAt(i,4));\n \t \t \t doc.getRoot().getOpomenaArray(curNo1).setIme((String)getHistoryTableModel().getValueAt(i,5));\n \t \t \t brop = (String)getHistoryTableModel().getValueAt(i,0);\n \t \t \t}\n \t \t doc.getRoot().getOpomenaArray(curNo1).addNewKnjiga();\n \t \t curNo2 = doc.getRoot().getOpomenaArray(curNo1).getKnjigaArray().length - 1;\n \t \t doc.getRoot().getOpomenaArray(curNo1).getKnjigaArray(curNo2).setCtlgno((String)getHistoryTableModel().getValueAt(i,6));\n \t \t if (getHistoryTableModel().getValueAt(i,7) != null){\n \t \t \tdoc.getRoot().getOpomenaArray(curNo1).getKnjigaArray(curNo2).setDatum(sdf.format(getHistoryTableModel().getValueAt(i,7)));\n \t \t }\n \t \t if (getHistoryTableModel().getValueAt(i,8) != null){\n \t \t \tdoc.getRoot().getOpomenaArray(curNo1).getKnjigaArray(curNo2).setNapomena((String)getHistoryTableModel().getValueAt(i,8));\n \t \t }\n \t \t \n \t }\n \t \n \t StringWriter sw = new StringWriter();\n\t XmlOptions xmlOptions = new XmlOptions();\n\t xmlOptions.setSavePrettyPrint();\n\t doc.save(sw,xmlOptions);\n\t \n\n\t JasperReport subreport = (JasperReport)JRLoader.loadObject(\n\t Warnings.class.getResource(\n\t \"/com/gint/app/bisis/circ/warnings/jaspers/subHistoryList.jasper\").openStream());\n\t paramslist.put(\"subreport\", subreport);\n\t \n \t JRXmlDataSource dslist = new JRXmlDataSource(XMLUtils\n .getDocumentFromString(sw.toString()), \"/root/opomena\");\n \t \n JasperPrint jplist = JasperFillManager.fillReport(\n Warnings.class.getResource(\n \"/com/gint/app/bisis/circ/warnings/jaspers/historyList.jasper\").openStream(), \n paramslist, dslist); \n JRViewer jrlist = new JRViewer(jplist);\n getReportListPanel().add(jrlist, java.awt.BorderLayout.CENTER);\n \n \t } catch (Exception e) {\n\t e.printStackTrace();\n\t }\n\t}",
"void logActiveOtherDeviceListData(String string) {\n\t\tif (MainActivity.debugMDS){Log.i(this.getClass().getName(), string);}\n\t\tfor (ActiveANTDeviceData deviceData: antOtherDeviceList) {\n\t\t\tdeviceData.logData();\n\t\t}\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a given angle to the current angle | public void addAngle(double angle) {
this.angle += angle;
int rotations = (int) (this.angle / (2 * Math.PI));
this.angle -= 2 * Math.PI * rotations;
} | [
"public Angle add(Angle angleToAdd)\n {\n\treturn new Angle(this.getValue() + angleToAdd.getValue());\n }",
"public void incrementAngle() {\n\t\tif (angle < 360) {\n\t\t\tangle += increment;\n\t\t} else {\n\t\t\tangle = 0;\n\t\t}\n\t}",
"public void setAngle(double angle);",
"void setAngle(double angle);",
"public void incrementAngle() {\n\t\tangle += angVel;\n\t}",
"protected abstract void addToSteeringAngle(double degrees);",
"public void setAngle(final float angle);",
"public abstract void moveToAngle(int angle);",
"AngleAdd createAngleAdd();",
"public void setAngle(double angle){\n mAngle = angle; // set the angle with the value which was passed in\n }",
"public void turn(double angle) {\n\t\t\n\t\tsetAngle(this.angle + angle);\n\t\t\n\t}",
"public void rotateToAngle(double angle) {\n controlState = ControlState.POSITION;\n outputPosition = -angle * TurretConstants.TICKS_PER_DEGREE;\n }",
"double adjust_angle_rotation(double angle) {\n double temp;\n temp=angle;\n if(temp>90) {\n temp=180-temp;\n }\n return temp;\n }",
"public void incrementAngle(double timestep) {\n\t\tangle += angVel*timestep;\n\t}",
"private void SetAngleForAction(int angle) {\n // substitute angle to variable\n this.mAngle = angle;\n }",
"public RotationComponent add(float degrees) {\n\trotation += degrees;\n\n\treturn this;\n }",
"public Vector setAngle(double angle) {\n\t\tdouble magnitude = getMagnitude();\n\t\t\n\t\tx = Math.cos(angle) * magnitude;\n\t\ty = Math.sin(angle) * magnitude;\n\t\t\n\t\treturn this;\n\t}",
"Angle createAngle();",
"private void setAngleToGo(float angleToGo) {\n this.angleToGo = angleToGo;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Additive Operation Call Exp CS'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseAdditiveOperationCallExpCS(AdditiveOperationCallExpCS object) {
return null;
} | [
"public T caseOperationCallBinaryExpCS(OperationCallBinaryExpCS object) {\r\n return null;\r\n }",
"public T caseUnaryOperationCallExpCS(UnaryOperationCallExpCS object) {\r\n return null;\r\n }",
"public T caseOperationCallExpCS(OperationCallExpCS object) {\r\n return null;\r\n }",
"public T caseLogicalOrOperationCallExpCS(LogicalOrOperationCallExpCS object) {\r\n return null;\r\n }",
"public T caseLogicalAndOperationCallExpCS(LogicalAndOperationCallExpCS object) {\r\n return null;\r\n }",
"public T caseLogicalImpliesOperationCallExpCS(LogicalImpliesOperationCallExpCS object) {\r\n return null;\r\n }",
"public T caseMultOperationCallExpCS(MultOperationCallExpCS object) {\r\n return null;\r\n }",
"public T caseOperationCallOnSelfExpCS(OperationCallOnSelfExpCS object) {\r\n return null;\r\n }",
"public T caseOperationCallBaseExpCS(OperationCallBaseExpCS object) {\r\n return null;\r\n }",
"public T caseStaticOperationCallExpCS(StaticOperationCallExpCS object) {\r\n return null;\r\n }",
"public T caseRelationalOperationCallExpCS(RelationalOperationCallExpCS object) {\r\n return null;\r\n }",
"public T caseCallExpCS(CallExpCS object) {\r\n return null;\r\n }",
"public T caseOperationCallWithSourceExpCS(OperationCallWithSourceExpCS object) {\r\n return null;\r\n }",
"public T caseFeatureCallExpCS(FeatureCallExpCS object) {\r\n return null;\r\n }",
"public T caseEqualityOperationCallExpCS(EqualityOperationCallExpCS object) {\r\n return null;\r\n }",
"public T caseDefinitionExpOperationCS(DefinitionExpOperationCS object) {\r\n return null;\r\n }",
"public T caseShortCircuitOperatorCallExp(ShortCircuitOperatorCallExp object) {\n\t\treturn null;\n\t}",
"public T caseOperationCallExp(OperationCallExp object) {\n\t\treturn null;\n\t}",
"public T caseLogicalXorOperationCallExpCS(LogicalXorOperationCallExpCS object) {\r\n return null;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds the scheduled task with the specified id. | PSScheduledTask findScheduledTaskById(IPSGuid id) throws PSSchedulingException; | [
"Task findTask(String id);",
"Task getTask(String id);",
"public void getTask(String id);",
"PSScheduledTaskLog findTaskLogById(IPSGuid id);",
"public static TaskDefinition getTaskInVector (String id){\r\n\t\tfor (int i = 0 ; i < TasksList.size() ; i++){\r\n\t\t\tif (TasksList.get(i).getId().equals(id)){\r\n\t\t\t\treturn (TasksList.get(i));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null ;\r\n\t}",
"public Task findTaskInProject(String taskID) {\n\t\tfor (Task a : this.TaskList) {\n\t\t\tif (a.getTaskTitle().equals(taskID)) {\n\t\t\t\treturn a;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public Future<?> doFindAlarm(long id)\n\t{\n\t\tif (id < 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\tNacAlarmDao dao = this.getAlarmDao();\n\t\treturn NacAlarmDatabase.getExecutor().submit(() -> dao.findAlarm(id));\n\t}",
"@Override\r\n\tpublic Task fetchTaskById(Integer id) {\r\n\r\n\t\treturn taskRepository.findById(id).get();\r\n\t}",
"public static TaskTimeElement findByID(long id) {\r\n String sql = null;\r\n TaskTimeElement ret = null;\r\n Statement theStatement = null;\r\n Connection theConnection = null;\r\n ResultSet rs = null;\r\n\r\n try {\r\n theConnection = AdminConnectionManager.getConnection(ME + \".findByID\");\r\n theStatement = theConnection.createStatement();\r\n sql = \"select \" +\r\n \"DURATION\" + \r\n \",TASKDATE\" + \r\n \",TASKNAME\" + \r\n \",USERNAME\" +\r\n \" from TaskTimeElement where id = \" + id;\r\n rs = theStatement.executeQuery(sql);\r\n if (rs.next()) {\r\n int i = 1;\r\n ret = new TaskTimeElement();\r\n ret.setId(id);\r\n ret.setDuration(rs.getDouble(i++));\r\n ret.setTaskDate(rs.getString(i++));\r\n ret.setTaskName(rs.getString(i++));\r\n ret.setUserName(rs.getString(i++));\r\n }\r\n }\r\n catch (SQLException e) {\r\n Trace.error(\"sql=\" + sql, e);\r\n }\r\n finally {\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n }\r\n catch (SQLException e) {}\r\n }\r\n if (theStatement != null) {\r\n try {\r\n theStatement.close();\r\n }\r\n catch (SQLException e) {}\r\n }\r\n if (theConnection != null)\r\n AdminConnectionManager.releaseConnection(theConnection);\r\n }\r\n return ret;\r\n }",
"Optional<Schedule> findOneSchedule(int idSchedule) throws DaoException;",
"private Task getTask(Integer identifier) {\n Iterator<Task> iterator = tasks.iterator();\n while (iterator.hasNext()) {\n Task nextTask = iterator.next();\n if (nextTask.getIdentifier().equals(identifier)) {\n return nextTask;\n }\n }\n\n return null;\n }",
"Optional<Schedule> findScheduleById(int idSchedule) throws DaoException;",
"Task findTaskById(Long task_id);",
"Schedule find(Schedule schedule);",
"Task findTask(Task task);",
"@Override\n @Transactional(readOnly = true)\n public Optional<PerSubmit> findOne(Long id) {\n log.debug(\"Request to get PerSubmit : {}\", id);\n return perSchedulerRepository.findById(id);\n }",
"boolean isTaskExist(String id);",
"WorkOrderSchedule findOne(Long id);",
"private Task findTask(State state) {\r\n\t\treturn state.getTasks(taskString).get(0);\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the base address for the given target address to be as indicated. | public void setBaseAddress(int targetAddress, int baseAddress); | [
"public void setBase(LocatorIF base_address) {\n this.base_address = base_address;\n }",
"public void setBaseAddress(String baseAddress) {\n\t\tthis.baseAddress = baseAddress;\n\t}",
"public void setBaseAddress(String base_address) {\n try {\n this.base_address = new URILocator(base_address);\n } catch (MalformedURLException e) {\n throw new OntopiaRuntimeException(e);\n }\n }",
"public static void SetBaseAddress(String baseAddress) {\n\t\t// Load Projects Settings XML file\n\t\tDocument doc = Utilities.LoadDocumentFromFilePath(IDE.projectFolderPath + \"\\\\ProjectSettings.xml\");\n\t\t// Get the <root> element of the Document\n\t\torg.w3c.dom.Element root = doc.getDocumentElement();\n\t\t// Remove previous entry\n\t\tNode previousBaseAddress = null;\n\t\ttry {\n\t\t\tpreviousBaseAddress = root.getElementsByTagName(\"baseAddress\").item(0);\n\t\t}\n\t\tcatch (Exception ex) { /* do nothing */ }\n\t\tif (previousBaseAddress != null) {\n\t\t\troot.removeChild(previousBaseAddress);\n\t\t}\n\t\t// Create a child node for <baseAddress value=\"{baseAddress}\">\n\t\torg.w3c.dom.Element baseAddressNode = doc.createElement(\"baseAddress\");\n\t\tbaseAddressNode.setAttribute(\"value\", baseAddress);\n\t root.appendChild(baseAddressNode);\n\t // Save document to disk\n\t Utilities.writeDocumentToFile(doc, new File(IDE.projectFolderPath + \"\\\\ProjectSettings.xml\"));\n\t}",
"public void setCurrentAddress(Address address) {\r\n currAddress = address;\r\n }",
"public void setInternalAddress(String address);",
"public com.bbn.tc.schema.avro.NetFlowObject.Builder setSrcAddress(java.lang.CharSequence value) {\n validate(fields()[2], value);\n this.srcAddress = value;\n fieldSetFlags()[2] = true;\n return this; \n }",
"void setBaseRegister(int base_reg);",
"void setAddress(String address) throws IllegalArgumentException;",
"public void set_sourceAddress(int value) {\n setUIntBEElement(offsetBits_sourceAddress(), 16, value);\n }",
"public void setInheritAddress(boolean inheritAddress)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(INHERITADDRESS$58, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(INHERITADDRESS$58);\n }\n target.setBooleanValue(inheritAddress);\n }\n }",
"public void setBaseOffset (@Nonnegative long baseOffset);",
"void changeBTAddress() {\n\t\t\n\t\t// if ( this.beacon.getAppType() == AppType.APPLE_GOOGLE_CONTACT_TRACING ) {\n\t\tif ( this.useRandomAddr()) {\n\t\t\t// try to change the BT address\n\t\t\t\n\t\t\t// the address is LSB..MSB and bits 47:46 are 0 i.e. bits 0 & 1 of right-most byte are 0.\n\t\t\tbyte btRandomAddr[] = getBTRandomNonResolvableAddress();\n\t\t\t\n\t\t\t// generate the hcitool command string\n\t\t\tString hciCmd = getSetRandomBTAddrCmd( btRandomAddr);\n\t\t\t\n\t\t\tlogger.info( \"SetRandomBTAddrCmd: \" + hciCmd);\n\t\t\t\n\t\t\t// do the right thing...\n\t\t\tfinal String envVars[] = { \n\t\t\t\t\"SET_RAND_ADDR_CMD=\" + hciCmd\n\t\t\t};\n\t\t\t\t\t\t\n\t\t\tfinal String cmd = \"./scripts/set_random_addr\";\n\t\t\t\n\t\t\tboolean status = runScript( cmd, envVars, this, null);\n\t\t}\n\t\t\t\n\t}",
"public void xsetInheritAddress(org.apache.xmlbeans.XmlBoolean inheritAddress)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlBoolean target = null;\n target = (org.apache.xmlbeans.XmlBoolean)get_store().find_element_user(INHERITADDRESS$58, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlBoolean)get_store().add_element_user(INHERITADDRESS$58);\n }\n target.set(inheritAddress);\n }\n }",
"public void setTarget(CPointer<BlenderObject> target) throws IOException\n\t{\n\t\tlong __address = ((target == null) ? 0 : target.getAddress());\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeLong(__io__address + 128, __address);\n\t\t} else {\n\t\t\t__io__block.writeLong(__io__address + 104, __address);\n\t\t}\n\t}",
"public void setFallThrough(Address addr);",
"public void setAddress(java.lang.String address)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ADDRESS$20, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ADDRESS$20);\n }\n target.setStringValue(address);\n }\n }",
"protected void setTarget(Command target) {\n\t\tproxy.setTarget(target);\n\t}",
"public void setBindAddress(String bindAddress) {\n agentConfig.setBindAddress(bindAddress);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns all the fase postulacions. | public static java.util.List<com.hitss.layer.model.FasePostulacion> findAll()
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findAll();
} | [
"public double[][] getFEPosteriors(SentencePair sp) {\n double[][] posts = sp.getKeyedAlignment(posteriorKeyPrefix+\".fe\").getForeignByEnglishPosteriors();\n return posts;\n }",
"public double[][] getEFPosteriors(SentencePair sp) {\n double[][] posts = sp.getKeyedAlignment(posteriorKeyPrefix+\".ef\").getEnglishByForeignPosteriors();\n return posts;\n }",
"public java.util.List<com.idetronic.eis.model.FactPost> findAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public int getFaltas() {\n return faltas_;\n }",
"public int getFaltas() {\n return faltas_;\n }",
"public static void cacheResult(\n\t\tjava.util.List<com.hitss.layer.model.FasePostulacion> fasePostulacions) {\n\t\tgetPersistence().cacheResult(fasePostulacions);\n\t}",
"public Set<String> postProcessingFields() {\n Set<String> fields = new LinkedHashSet<>();\n query.forEach(condition -> fields.addAll(condition.postProcessingFields()));\n sort.forEach(condition -> fields.addAll(condition.postProcessingFields()));\n return fields;\n }",
"public List<InstitucionPrevision> findAllAFP() {\r\n\t\t\tInstitucionPrevisionDAO iDAO = new InstitucionPrevisionDAO();\r\n\t\t\treturn iDAO.findAllGRID();\r\n\t\t}",
"public static List<Fattura> tutteLeFatture() {\n\t\tEntityManager em = JPAUtil.getInstance().getEmf().createEntityManager();\n\t\tList<Fattura> _return = em.createQuery(\"SELECT f FROM Fattura f\", Fattura.class).getResultList();\n\t\tem.close();\n\t\treturn _return;\n\t}",
"public Multi<PostalInfo> findPostalInfosAll() {\n\t\tSqlPostalInfo qry = new SqlPostalInfo();\n\t\tqry.orderById();\n\t\tqry.unlimited();\n\n\t\treturn multi(\n\t\t\tpg.preparedQuery(qry.build()).execute()\n\t\t).transform(PostalInfo::from);\n\t}",
"public ListaFAE getListaFaes(){\r\n return exposicao.getListaFAE();\r\n }",
"@Override\n\tpublic List<FacturaDetalle> getFacturaDetalles() {\n\t\t// TODO Auto-generated method stub\n\t\treturn facturaDetalleDAO.list();\n\t}",
"public List<Letter<?>> getPostbox() {\n\t\treturn postbox;\n\t}",
"@Transactional(readOnly = true)\n public List<DetallePresupuesto> findAll() {\n log.debug(\"Request to get all DetallePresupuestos\");\n return detallePresupuestoRepository.findAll();\n }",
"public ArrayList<Fantasma> getFantasmas() {\r\n\t\treturn this.fantasmas;\r\n\t}",
"public ArrayList<Posto> getPostos() {\n return postos;\n }",
"public List<FacturaEntity> getFacturas() {\n LOGGER.info(\"Inicia proceso de consultar todos los facturas\");\n List<FacturaEntity> factura = facturaPersistence.findAll();\n LOGGER.info(\"Termina proceso de consultar todos los facturas\");\n return factura;\n }",
"public List<List<MigaPan>> getMigasFijadas() {\r\n\t\treturn MigasAction.getMigasFijas(session);\r\n\t}",
"public double[] getPIDF() {\n return new double[] { kP, kI, kD, kF };\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column house_order.pay_time | public Date getPayTime() {
return payTime;
} | [
"public Long getPayTime() {\n return payTime;\n }",
"public Time getTimeToPay() {\n return timeToPay;\n }",
"public Date getPayTime() {\n return payTime;\n }",
"public Date getUserpayTime() {\n return userpayTime;\n }",
"public Date getPaymentTime() {\r\n return paymentTime;\r\n }",
"public Date getPaymentTime() {\n return paymentTime;\n }",
"public java.lang.String getPaymentTime() {\n java.lang.Object ref = paymentTime_;\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 paymentTime_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public Date getPaymentTime() {\n\t\treturn paymentTime;\n\t}",
"public void setPayTime(Long payTime) {\n this.payTime = payTime;\n }",
"public Date getPayActualTime() {\n return payActualTime;\n }",
"public java.sql.Time getTime(String attr) {\n return (java.sql.Time) super.get(attr);\n }",
"public String getOrdertime() {\n return ordertime;\n }",
"@Basic\n @Column(name = \"choose_time\", nullable = true)\n public Integer getChooseTime() {\n return chooseTime;\n }",
"public java.sql.Time getTime(String column) {\n\t\treturn (java.sql.Time)getColumns().get(column);\n\t}",
"public String getTransactionTime() {\n return raw_fields_.get(3);\n }",
"public Time getTime(String columnName) throws SQLException {\n int columnIndex = findColumn(columnName);\n return getTime(columnIndex);\n }",
"public java.sql.Time getTime(String columnName) throws SQLException\n {\n return m_rs.getTime(columnName);\n }",
"public Date getPaidTime() {\n return paidTime;\n }",
"public Date getOrdertime() {\n return ordertime;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The display name of the step. | public String getStepDisplayName() {
return this.stepDisplayName;
} | [
"public String getStepDisplayName()\r\n\t{\r\n\t\treturn stepDisplayName;\r\n\t}",
"String getCurrentStepName();",
"public String stepName() {\n return this.stepName;\n }",
"public String getStepName()\r\n\t{\r\n\t\treturn stepName;\r\n\t}",
"public String getStepName() {\n return this.stepName;\n }",
"@Override\n public String getShortName() {\n return step.getShortName();\n }",
"String getCurrentStepTitle();",
"public java.lang.String getStepName() {\n return stepName;\n }",
"@Override\n public String getDisplayName() {\n return \"Micro Focus DA Step\";\n }",
"String getCurrentStepDescription();",
"public void setStepDisplayName(String stepDisplayName)\r\n\t{\r\n\t\tthis.stepDisplayName = stepDisplayName;\r\n\t}",
"@Override\n default String stepName() {\n String name = getClass().getSimpleName();\n if (name.contains(\"@\") && name.contains(\"$\")) {\n name = name\n .substring(0, name.indexOf('$'))\n .substring(name.lastIndexOf('.') + 1);\n }\n String stripped = OPERATOR_NAME_UNRELATED_WORDS_PATTERN\n .matcher(name)\n .replaceAll(\"\");\n\n if (!stripped.isEmpty()) {\n return stripped.substring(0, 1).toLowerCase() + stripped.substring(1);\n }\n return stripped;\n }",
"java.lang.String getDisplayName();",
"public final String getName() {\n /// Since we plan to have only one wizard for each class, we use the name of the class.\n return this.getClass().getSimpleName();\n }",
"java.lang.String getSelfDisplayName();",
"private JLabel getStepClassnameLabel() {\n if (stepClassnameLabel == null) {\n stepClassnameLabel = new JLabel();\n stepClassnameLabel.setText(\"Step Classname:\");\n }\n return stepClassnameLabel;\n }",
"public String getFeatureName() {\n if (featureName == null) {\n String className = this.getClass().getName();\n\n className = className.substring(className.lastIndexOf('.') + 1);\n className = className.replace(\"StepDefinition\", \"\");\n\n className = StringUtils.snakecase(className);\n\n setFeatureName(className);\n }\n\n return featureName;\n }",
"public java.lang.String getStepDesc() {\n return stepDesc;\n }",
"@Override\n public String toString() {\n return String.format(Locale.getDefault(),\n \"Step{id=%d, shortDescription='%s'}\", id, shortDescription);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
overriding the echo method of the RmiInterface Method gets the input from the user and sends the response back | @Override
public String echo(Session session, String input) throws RemoteException {
System.out.println("Echo Method called");
System.out.println("Response sent to the client is: "+input);
return input;
} | [
"public String recieveInput() {\n\t\ttry {\n\t\t\treturn socketIn.readLine().replace('_', '\\n');\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.exit(1);\n\t\treturn \"error!\";\n\t}",
"private String getResponse(String input) {\n try {\n CommandResult result = logicManager.execute(input);\n if (result.isExit()) {\n handleExit();\n }\n return result.getFeedbackToUser();\n } catch (CommandException | ParserException e) {\n return e.getMessage();\n }\n }",
"public String receiveResponse()\n\t{\n\t\t\n\t}",
"com.github.jtendermint.jabci.types.Types.ResponseEcho getEcho();",
"@Override\n public void run() {\n try {\n\n String response = \"\";\n String[] args = command[1].split(\"\\\\s+\");\n \n if (this.command[0].equals(\"purchase\")) {\n response = Server.purchase(args[0], args[1], args[2], args[3]);\n }\n else if (this.command[0].equals(\"cancel\")) {\n response = Server.cancel(args[0], args[1]);\n }\n else if (this.command[0].equals(\"search\")) {\n response = Server.search(args[0], args[1]);\n }\n else if (this.command[0].equals(\"list\")) {\n response = Server.list(args[0]);\n }\n /* else: raise custom exception */\n respond(String.format(\"%s\\n\", response.trim()));\n } catch (IOException e) {\n System.err.println(String.format(\"Request aborted: %s\", e));\n }\n }",
"@Override\n public String echo(String text)\n {\n return \"echo: \" + text;\n }",
"@Override\n public Word input(){ \n System.out.println(\"[IO]: Error - Tried to receive from printer.\");\n return null;\n }",
"com.github.jtendermint.jabci.types.Types.RequestEcho getEcho();",
"@Override\n public void interact() {\n System.out.print(\"Halo aku ikan di bawah laut dalam lho, aku punya lampu supaya aku\" \n + \"bisa tetap melihat di kegelapan\");\n }",
"protected abstract void askResponse();",
"private void sendAnswer(PrintWriter output, String clientInput) {\n\t\tint msgNo = Integer.parseInt(clientInput);\n\t\toutput.println(Answers.createAnswers(msgNo));\n\t}",
"public String run(){\r\n int i =0;\r\n String outputStram = \"\";\r\n try {\r\n\t\t\tProcess p = Runtime.getRuntime().exec(\"ping \" + ip);\r\n\t\t\tBufferedReader inputStream = new BufferedReader(\r\n\t\t\t\t\tnew InputStreamReader(p.getInputStream()));\r\n\r\n\t\t\tString s = \"\";\r\n\t\t\t// reading output stream of the command\r\n\t\t\twhile ((s = inputStream.readLine()) != null && replied) {\r\n output.add(s);\r\n outputStram= (outputStram+s);\r\n if(i==3)\r\n if(output.get(3).substring(0, 5).matches(\"Reply\"))\r\n if(output.get(3).length()>32)\r\n replied=output.get(3).substring(27, 32).matches(\"bytes\");\r\n i++;\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n return outputStram;\r\n }",
"String getUserInput();",
"InputPromptTransmitter getInputPromptTransmitter();",
"public abstract void showInputBox(String message, Consumer<String> resultCallback);",
"protected String getInputFromConsole(){\r\n\r\n String userInput = \"\";\r\n System.out.print(String.format(\"player 1's turn: \"));\r\n\r\n //takes input from the user\r\n try {\r\n userInput = br.readLine();\r\n } catch (IOException e) {\r\n return \"Input given was not a string.\"; //returned if the input wasn't suitable\r\n }\r\n return userInput;\r\n }",
"public void processRequest(){\n\t\tCommandArgument argument = readFromClient();\n\t\tCommandResponse response = processArgument(argument);\n\t\tsendResponse(response);\n\t}",
"public String forward(String echoArg) throws RemoteException;",
"protected void echo(String msg){\n\tSystem.out.println(\"*ECHO*: \" + msg);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Displays a dialog asking the user to input the pin number. | private void showDialogPin() {
final ArrayList<AccountDetails> accountDetails = tinyDB.getListObject(getString(R.string.pref_wallet_accounts), AccountDetails.class);
pinDialog = new Dialog(this);
pinDialog.setTitle(R.string.txt_6_digits_pin);
pinDialog.setContentView(R.layout.activity_alert_pin_dialog);
Button btnDone = (Button) pinDialog.findViewById(R.id.btnDone);
final EditText etPin = (EditText) pinDialog.findViewById(R.id.etPin);
btnDone.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
for (int i = 0; i < accountDetails.size(); i++) {
if (accountDetails.get(i).isSelected) {
if (etPin.getText().toString().equals(accountDetails.get(i).pinCode)) {
Log.d(TAG, "pin code matches");
pinDialog.cancel();
if(mLockListener != null){
mLockListener.onLockReleased();
}
break;
}else{
Toast.makeText(LockableActivity.this, getResources().getString(R.string.invalid_pin), Toast.LENGTH_SHORT).show();
}
}
}
}
});
pinDialog.setCancelable(false);
/* No pin dialog in Blockpay for now */
// pinDialog.show();
} | [
"protected void dialog() {\n TextInputDialog textInput = new TextInputDialog(\"\");\n textInput.setTitle(\"Text Input Dialog\");\n textInput.getDialogPane().setContentText(\"Nyt bord nr: \");\n textInput.showAndWait()\n .ifPresent(response -> {\n if (!response.isEmpty()) {\n newOrderbutton(response.toUpperCase());\n }\n });\n }",
"public final void takeInput()\n {\n carNumber = JOptionPane.showInputDialog(\"Enter your Car number: \");\n }",
"public void loginPin(){\n\t\tstate = ATM_State.LOGINPIN;\n\t\tgui.setDisplay(\"Enter your account PIN: \\n\");\n\t}",
"private void basicInfoDialogPrompt() {\n if(!prefBool){\n BasicInfoDialog dialog = new BasicInfoDialog();\n dialog.show(getFragmentManager(), \"info_dialog_prompt\");\n }\n }",
"public static int showDialog(String command) {\n Stage window = new Stage();\n window.initModality(Modality.WINDOW_MODAL);\n window.setTitle(\"Input Distance\");\n window.setMinWidth(300);\n\n Label label = new Label();\n label.setText(command);\n TextField txtDistance = new TextField();\n txtDistance.setPromptText(\"Enter a nonnegative integer.\");\n Button confirm = new Button();\n confirm.setText(\"Confirm\");\n confirm.setOnAction(e-> {\n // Check if it is a valid integer\n try {\n Integer.parseInt\n (txtDistance.getText());\n\n if (isNumeric(txtDistance.getText()) && Integer.parseInt\n (txtDistance.getText()) > 1) {\n value = Integer.parseInt(txtDistance.getText());\n window.close();\n } else {\n label.setText(\"Please enter a VALID integer.\");\n }\n\n }catch (Exception f) {\n label.setText(\"Please enter a VALID integer.\");\n }\n });\n\n VBox layout = new VBox(10); // Add 10px padding\n layout.getChildren().addAll(label, txtDistance, confirm);\n layout.setAlignment(Pos.CENTER);\n Scene scene = new Scene(layout);\n window.setScene(scene);\n window.showAndWait();\n\n return value;\n }",
"public void idInput()\n {\n idNumber = JOptionPane.showInputDialog(\"Your ID number must have 4 Integer Number.\\nEnter your ID number: \"); \n idNum = Integer.parseInt(idNumber); \n\n }",
"public void onSubmitPin(String eventName, iWidget widget, EventObject event) {\n try {\n String pin = widget.getFormViewer().getWidget(\"pin\").getValueAsString();\n\n if (pin == null) {\n pin = \"\";\n }\n\n final WindowViewer w = Platform.getWindowViewer();\n final iWidget l = widget.getFormViewer().getWidget(\"message\");\n\n if ((pin.length() < CardStack.getPinDigitCount()) ||!SNumber.isNumeric(pin)) {\n String s = w.getString(\"bv.format.invalid_pin\", StringCache.valueOf(CardStack.getPinDigitCount()));\n\n l.setValue(s);\n w.beep();\n } else {\n l.setValue(\"\");\n\n if (Utils.isDemo()) {\n l.setValue(w.getString(\"bv.text.settings.pin_submitted\"));\n } else {\n final ActionLink link = Utils.createLink(w, \"/hub/account/allow_pin\");\n final HashMap data = new HashMap(2);\n\n data.put(\"pin\", pin);\n\n aWorkerTask task = new aWorkerTask() {\n @Override\n public Object compute() {\n try {\n link.sendFormData(w, data);\n\n return link.getContentAsString();\n } catch(Exception e) {\n return e;\n }\n }\n @Override\n public void finish(Object result) {\n w.hideWaitCursor();\n\n if (result instanceof Throwable) {\n Utils.handleError((Throwable) result);\n } else {\n String s = (String) result;\n\n if (s != null) {\n s = s.trim();\n }\n\n if ((s == null) || (s.length() == 0)) {\n s = w.getString(\"bv.text.settings.pin_submitted\");\n }\n\n l.setValue(s);\n }\n }\n };\n\n w.spawn(task);\n w.showWaitCursor();\n }\n }\n } catch(Exception e) {\n Utils.handleError(e);\n }\n }",
"public void showSeedInput()\n {\n String seedStr = JOptionPane.showInputDialog(this, \"Map Seed: \", pathFinder.getSeed());\n int seed;\n if (seedStr != null)\n {\n try\n {\n seed = Integer.parseInt(seedStr);\n }\n catch (Exception e)\n {\n seed = seedStr.trim().toUpperCase().hashCode();\n }\n toolPanel.regenerateMap(seed);\n }\n }",
"public void showPasswordPrompt();",
"private static void promptAddress() {\n\t\tSystem.out.print(\"Please enter an address: \");\n\t}",
"private void showNumberPickerDialog(View view){\n // Create the dialog fragment\n NumberPickerDialog dialog = new NumberPickerDialog();\n\n // Create new bundle to store args\n Bundle args = new Bundle();\n args.putInt(NumberPickerDialog.MAX_VALUE_KEY, getResources().getInteger(R.integer.max_no_passengers));\n args.putInt(NumberPickerDialog.MIN_VALUE_KEY, getResources().getInteger(R.integer.min_no_passengers));\n args.putString(NumberPickerDialog.MESSAGE_KEY, getResources().getString(R.string.number_of_passengers_selection));\n\n dialog.setArguments(args);\n dialog.show(getSupportFragmentManager(), NumberPickerDialog.TAG);\n }",
"private Integer createNumberDialog(String title) {\n // Dialog with a text input is created, only showing the title.\n Dialog dialog = new TextInputDialog();\n dialog.setTitle(title);\n dialog.setContentText(\"\");\n dialog.setHeaderText(\"\");\n dialog.setGraphic(null);\n\n // Dialog is displayed, and an optianal string is retrieved.\n @SuppressWarnings(\"unchecked\") Optional<String> result = dialog.showAndWait();\n\n // Determines if a result was returned by the dialog.\n if ( result.isPresent() )\n // Checks to see if the result is an acceptable number\n // returning it if successful, or null otherwise.\n return checkNumberResult( result.get() );\n else\n System.out.println(\"Optional result is not present\");\n\n // If no result was found, return null value.\n return null;\n }",
"private void pinActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"public PINEntry()\n\t{\n\t\tsuper();\n\t\tFrame frame = new Frame(\"PIN entry\");\n\t\t\n\t\tframe.setLayout(new GridLayout(2,2));\n\t\t\n\t\tframe.add(new Label(\"Event:\"));\n\t\t\n\t\tthis.label = new Label(\"NO_EVENT\");\n\t\tframe.add(this.label);\n\t\t\n\t\tthis.prompt = new Label();\n\t\tframe.add(this.prompt);\n\t\t\n\t\tthis.listener = new PINListener(frame);\n\n\t\tthis.textField = new TextField();\n\t\tthis.textField.setEchoChar('*');\n\t\tthis.textField.addKeyListener(this.listener);\n\t\tframe.add(this.textField);\n\t\tframe.addWindowListener(this.listener);\n\t\t\n\t\tframe.pack();\n\t\tframe.setVisible(true);\n\t\t\n\t\tGraphicsConfiguration gc = frame.getGraphicsConfiguration();\n\t\tRectangle r = gc.getBounds();\n\t\tPoint p = new Point((r.width-frame.getWidth())/2,(r.height-frame.getHeight())/2);\n\t\t\n\t\tframe.setLocation(p);\n\t}",
"void pinEntered(UserPassphrase passphrase);",
"String promptForCruiserNumber();",
"public void setPIN (String PIN);",
"void showAddParameterDialog();",
"public void onClick(DialogInterface dialog, int which)\n {\n Log.d(FRAG_TAG, \"button clicked\");\n if(number == null || \"\".equals(number))\n {\n number = (input.getText()).toString();\n }\n Log.d(FRAG_TAG, \"phone number: \"+number);\n //not a well-formatted number\n if(!PhoneNumberUtils.isWellFormedSmsAddress(number))\n {\n Log.d(FRAG_TAG, \"phone number is not well formed\");\n //return;\n }\n\n //preform key generation\n (Key.getStorer(getActivity())).generateKeyPair(\n PhoneNumberUtils.stripSeparators(number));\n\n Log.d(FRAG_TAG, \"generating key\");\n\n //all done\n dismiss();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The method will search a given List, listToSearch, sequentially. It will search for the numberToFind, and return true, if it is present. If it is not found, it will return false. | @Override
public boolean search(List<Integer> listToSearch, int numberToFind) throws NullPointerException {
// Check to see if listToSearch is null or is empty
// Will throw an appropriate exception
if (listToSearch == null)
throw new NullPointerException("listToSearch is null");
else if(listToSearch.contains(null))
throw new NullPointerException("listToSearch contains a null element");
else if (listToSearch.isEmpty())
throw new IllegalArgumentException("listToSearch has no entries in it");
// If the list has only one element
// Return if the first element of listToSearch is the same as the
// numberToFind
if (listToSearch.size() == 1) {
return listToSearch.get(0).equals(numberToFind);
}
// Loop through the listToSearch sequentially
for (int entry : listToSearch) {
// If the entry is equal to the numberToFind
if (entry == numberToFind) {
return true;
}
}
return false;
} | [
"public abstract boolean searchNumber(int[] numbers, int numberToSearch);",
"public boolean foundIntTwice(List<Integer> integerList, int intToFind) {\n\t\tint count = 0;\n\t\tfor (Integer element : integerList) {\n\t\t\tif(element == intToFind) {\n\t\t\t\tcount++;\n\t\t\t\tif (count >=2) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean findElement(int element) {\r\n\tfor(int i = 0 ;i <myList.size();i++) {\r\n\t\tif(element == myList.get(i))\r\n\t\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}",
"public int search(int elementToFind) {\n\t\tint indexOfElement = -1;\n\t\tfor(int index = 0; index < list.length; index++) {\n\t\t\tif(list[index] == elementToFind) {\n\t\t\t\tindexOfElement = index+1;\n\t\t\t}\n\t\t}\n\t\treturn indexOfElement;\n\t}",
"static <T> int findMatch( List<? extends Matcher<T>> list, T value )\n {\n for ( int j = 0; j < list.size(); ++j )\n {\n if ( list.get( j ).matches( value ) )\n {\n return j;\n }\n }\n return -1;\n }",
"public static int search(LinkedList<Integer> aList, int element)\r\n {\r\n\tint index = 0;\r\n\tIterator<Integer> listIterator = aList.iterator();\r\n\twhile(listIterator.hasNext())\r\n\t{\r\n\t\tif (aList.get(index) == element)\r\n\t\t\treturn index;\r\n\t\telse\r\n\t\t{\r\n\t\t\tindex += 1;\r\n\t\t\tlistIterator.next();\r\n\t\t}\r\n\t}\r\n\treturn -1;\r\n }",
"public boolean search(int val) {\n\t\tDLNode n = head;\n\t\twhile (n != null) {\n\t\t\tif (n.getList() != null) {\n\t\t\t\tif (n.getList().search(val)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (n.getVal() == val) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tn = n.getNext();\n\t\t}\n\t\treturn false;\n\t}",
"public static boolean binarySearch(List<Integer> list, int elementToCheck){\n List<Integer> sortedList = new ArrayList<>(list);\n Collections.sort(sortedList);\n\n int index = Collections.binarySearch(sortedList, elementToCheck); //if index=-1 the element doesn't exist in the list\n\n if(index >= 0)\n return true;\n else\n return false;\n }",
"public static int find(ArrayList<Result> list, String partyName) {\n\t\tboolean found = false;\n\t\tint index = -1;\n\t\tint i = 0;\n\t\twhile(!found && i < list.size()) {\n\t\t\tif (list.get(i).getParty().getName() == partyName) {\n\t\t\t\tfound = true;\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn index;\n\t}",
"private boolean contains(List<NodeId> array, NodeId searchValue) {\n return array != null && array.contains(searchValue);\n }",
"private boolean isInList(ArrayList<SearchNode> list, SearchNode node){ \r\n\t\tfor(int i = 0; i < list.size(); i++){\r\n\t\t\tif(list.get(i) == node){\r\n\t\t\t\treturn true; \r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false; \r\n\t}",
"public int search(int target)\n {\n for(int i = 0; i<list.length; i++)\n {\n if(target == list[i])\n {\n return i;\n }\n }\n }",
"public boolean search(int data) {\r\n boolean response = false;\r\n //traversing the linked list and will check each node for given data\r\n // assigning head to temp\r\n Node temp = head;\r\n while (temp != null) {\r\n // checking for data at each node\r\n if (temp.getData() == data) {\r\n response = true;\r\n break;\r\n }\r\n // updating temp\r\n temp = temp.getNext();\r\n\r\n }\r\n return response;\r\n }",
"public static boolean searchItemInList(String text, List<IStringField> list){\n for(IStringField item : list){\n if(item.getStrValue().equals(text)){\n return true;\n }\n }\n return false;\n }",
"@Test\r\n\tvoid testSearch() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(7);\r\n\t\ttest.add(10);\r\n\t\ttest.add(9);\r\n\t\tint output = test.search(10);\r\n\t\tassertEquals(1, output);\r\n\t}",
"public static boolean existsElementMatchingChildNodes(Element findElement, NodeList searchInList) {\n\t\t\n\t\tNode searchInElement = null;\n\t\tboolean foundElement = false;\n\t\tboolean possibleMatch = false;\n\t\tNode findNode = null;\n\t\tString findName = null;\n\t\tString findValue = null;\n\t\tString searchString = null;\n\t\t\n\t\t// Check each Node in searchInList.\n\t\tint searchInListIndex = 0;\n\t\twhile (!foundElement && searchInListIndex < searchInList.getLength()) {\n\t\t\t\n\t\t\tsearchInElement = searchInList.item(searchInListIndex);\n\t\t\t\n\t\t\t// for each child node in the findElement, find a child node\n\t\t\t// with the same name and value exists in the searchInElement.\n\t\t\tpossibleMatch = true;\n\t\t\tfindNode = findElement.getFirstChild();\n\t\t\twhile (findNode != null && possibleMatch) {\n\n\t\t\t\tfindName = findNode.getNodeName();\n\n\t\t\t\tif (findNode.getFirstChild() != null) {\n\t\t\t\t\tfindValue = findNode.getFirstChild().getNodeValue();\n\t\t\t\t\tsearchString = \"?/\" + findName + \"=\" + findValue;\n\t\t\t\t} else {\n\t\t\t\t\tsearchString = \"?/\" + findName;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// If a matching child node was not found then go to the next Element in the search list.\n\t\t\t\tif (com.workbrain.util.XMLHelper.findElement((Element)searchInElement, searchString) == null) {\n\t\t\t\t\tpossibleMatch = false;\n\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\n\t\t\t\t\t// Move to the next sibling which could be a text node.\n\t\t\t\t\tfindNode = findNode.getNextSibling();\n\t\t\t\t\tif (findNode != null && findNode.getNodeType() == Node.TEXT_NODE) {\n\t\t\t\t\t\t// If the next sibling was a text node then need to move again.\n\t\t\t\t\t\tfindNode = findNode.getNextSibling();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// If we iterated through all child nodes successfully then we found a match.\n\t\t\tif (possibleMatch) {\n\t\t\t\tfoundElement = true;\n\t\t\t} else {\n\t\t\t\tsearchInListIndex++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// All child nodes matched.\n\t\treturn foundElement;\n\t}",
"public static int listOfStringFindContains(List<String> list, String value) {\r\n\t\treturn listOfStringFindSubstring(list, value, false);\r\n\t}",
"private boolean searchForTask(Task task) {\n\n for (Task entry : taskList) {\n\n if (entry.equals(task)) {\n return true;\n }\n }\n\n return false;\n }",
"private boolean find(int numToFind, MultiwayNode node) {\n\t\t\n\t\tint[] data = node.getData(); //stores the data of the node\n\t\tint index = 0; //initializes an index\n\t\tboolean result = false; //initialize result as false until found\n\t\n\t\twhile(data[index] != -1 && index < 3) { //search through the data unless empty or at end\n\t\t\t\n\t\t\tif(numToFind > data[index]) {\n\t\t\t\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\t\n\t\t\telse if(numToFind == data[index]) { //return true if found\n\t\t\t\n\t\t\t\tresult = true;\n\t\t\t}\n\t\t\t\n\t\t\telse if(numToFind < data[index] && index == 0) { //passes first child if numToFind is less than first data\n\t\t\t\t\n\t\t\t\tnode = node.getFirstChild();\n\t\t\t\treturn(find(numToFind, node));\n\t\t\t}\n\t\t\t\n\t\t\telse if(numToFind < data[index] && index == 1 ) { //passes second child if numToFind is between first and second data\n\t\t\t\n\t\t\t\tnode = node.getSecondChild();\n\t\t\t\treturn(find(numToFind,node));\n\t\t\t}\n\t\t\t\n\t\t\telse if(numToFind < data[index] && index == 2 ) { //passes third child if numToFind is between second and third data\n\t\t\t\t\n\t\t\t\tnode = node.getThirdChild();\n\t\t\t\treturn(find(numToFind,node));\n\t\t\t}\t\n\t\t\t\n\t\t\telse if(numToFind > data[index] && index == 2 ) { //passes fourth child if numToFind greater than third data\n\t\t\t\t\n\t\t\t\tnode = node.getFourthChild();\n\t\t\t\treturn(find(numToFind,node));\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter method for the treasureClass of the Monster object | public String getTreasureClass() {
return this.treasureClass;
} | [
"public Treasure getTreasure()\n {\n return m_treasure;\n }",
"public Long getsClass() {\n return sClass;\n }",
"public Entity getTreasure() {\n return treasure;\n }",
"public static Mood getMood() { return moodClass; }",
"private final ClassType getVillageMasterTeachType()\n\t{\n\t\tfinal String npcClass = getTemplate().getStatsSet().getString(\"jClass\");\n\t\t\n\t\tif (npcClass.contains(\"sanctuary\") || npcClass.contains(\"clergyman\"))\n\t\t\treturn ClassType.Priest;\n\t\t\n\t\tif (npcClass.contains(\"mageguild\") || npcClass.contains(\"patriarch\"))\n\t\t\treturn ClassType.Mystic;\n\t\t\n\t\treturn ClassType.Fighter;\n\t}",
"protected abstract Class getClassForKey();",
"public void retrieveSelfClass();",
"public Double getTreasure() {\n\t\treturn treasure;\n\t}",
"public String getGodClass()\r\n {\r\n return mGodClass;\r\n }",
"TClass getTClass();",
"public Treasure getTreasure() {\n //returns the monster that is in the passage section, if there is one\n if (aTreasure != null) {\n return aTreasure;\n } else {\n return null;\n }\n }",
"public Class<? extends T> getDistanceObjectClass();",
"public MonsterType getMonsterType()\n {\n return m_monsterType;\n }",
"@JsonProperty(\"class\")\n public List<String> getKlass() {\n return this.sirenEntity.getKlass();\n }",
"public String getClazz() {\n return clazz;\n }",
"public Class<T> getObjectClass()\n {\n return objectClass;\n }",
"public MetaClass getMetaclass()\n {\n return this.xwiki.getMetaclass();\n }",
"com.felania.msldb.MonsterElementTypeOuterClass.MonsterElementType getVElemType();",
"public final Class<M> getCls() {\n return this.cls;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a new From test case with the given name. | public FromTest(String name) {
super(name);
} | [
"public ForTest(String name) {\r\n\t\tsuper(name);\r\n\t}",
"public GenModelTest(String name) {\n\t\tsuper(name);\n\t}",
"public QueryImportTest ( String name )\n {\n super ( name );\n }",
"public AxiomTest(String name) {\n\t\tsuper(name);\n\t}",
"public ProinsoObjectTest(String name) {\r\n\t\tsuper(name);\r\n\t}",
"public ArcTPTest(String name) {\r\n\t\tsuper(name);\r\n\t}",
"public VagueTest(String name) {\n\t\tsuper(name);\n\t}",
"public PayMachineTest(String name) {\n\t\tsuper(name);\n\t}",
"public AlgoUtilTest(String name) {\n super(name);\n }",
"public TestCase(String name) {\n fName= name;\n }",
"public LTest(String name) {\r\n\t\tsuper(name);\r\n\t}",
"public ImportadorServiciosTest(String name) {\r\n\t\tsuper(name);\r\n\t}",
"public ProjectLocaleTest(String name) {\n\t\tsuper(name);\n\t}",
"public MonitorQueryImportTest ( String name )\n {\n super ( name );\n }",
"public Sample(String name){this.name=name;}",
"public InformationFlowTest(String name) {\n\t\tsuper(name);\n\t}",
"public DLTest(String name) {\n\t\tsuper(name);\n\t}",
"public ExternalDemandTypeTest(String name) {\n\t\tsuper(name);\n\t}",
"public ComposantTest(String name) {\n\t\tsuper(name);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a SURF descriptor. SURF descriptors are invariant to illumination, orientation, and scale. BoofCV provides two variants. Creates a variant which is designed for stability. Different descriptors are created for color and grayscale images. [1] Add tech report when its finished. See SURF performance web page for now. | public static <T extends ImageSingleBand, II extends ImageSingleBand>
DetectDescribePoint<T,SurfFeature> surfStable( ConfigFastHessian configDetector,
ConfigSurfDescribe.Stablility configDescribe,
ConfigSlidingIntegral configOrientation,
Class<T> imageType ) {
Class<II> integralType = GIntegralImageOps.getIntegralType(imageType);
FastHessianFeatureDetector<II> detector = FactoryInterestPointAlgs.fastHessian(configDetector);
DescribePointSurfMod<II> describe = FactoryDescribePointAlgs.surfStability(configDescribe, integralType);
OrientationIntegral<II> orientation = FactoryOrientationAlgs.sliding_ii(configOrientation, integralType);
return new WrapDetectDescribeSurf( detector, orientation, describe );
} | [
"public static void easy( ImageFloat32 image ) {\n\t\t// create the detector and descriptors\n\t\tInterestPointDetector<ImageFloat32> detector = FactoryInterestPoint.fastHessian(0, 2, 200, 2, 9, 4, 4);\n\t\t// BoofCV has two SURF implementations.\n\t\t// surfm() = slower, but more accurate. surf() = faster and less accurate\n\t\tDescribeRegionPoint<ImageFloat32,SurfFeature> descriptor =\n\t\t\t\tFactoryDescribeRegionPoint.surfm(true,ImageFloat32.class);\n\t\t\n\t\t// just pointing out that orientation does not need to be passed into the descriptor\n\t\tif( descriptor.requiresOrientation() )\n\t\t\tthrow new RuntimeException(\"SURF should compute orientation itself!\");\n\t\t\n\t\t// detect interest points\n\t\tdetector.detect(image);\n\t\t // specify the image to process\n\t\tdescriptor.setImage(image);\n\t\t\n\t\tList<Point2D_F64> locations = new ArrayList<Point2D_F64>();\n\t\tList<TupleDesc_F64> descriptions = new ArrayList<TupleDesc_F64>();\n\t\t\n\t\tfor( int i = 0; i < detector.getNumberOfFeatures(); i++ ) {\n\t\t\t// information about hte detected interest point\n\t\t\tPoint2D_F64 p = detector.getLocation(i);\n\t\t\tdouble scale = detector.getScale(i);\n\t\t\t\n\t\t\t// extract the SURF description for this region\n\t\t\tSurfFeature desc = descriptor.createDescription();\n\t\t\tdescriptor.process(p.x,p.y,0,scale,desc);\n\t\t\t\n\t\t\t// save everything for processing later on\n\t\t\tdescriptions.add(desc);\n\t\t\tlocations.add(p);\n\t\t}\n\n\t\tSystem.out.println(\"Found Features: \"+locations.size());\n\t\tSystem.out.println(\"First descriptor's first value: \"+descriptions.get(0).value[0]);\n\t}",
"public static <T extends ImageGray<T>, II extends ImageGray<II>>\n\tDescribeImageDense<T, TupleDesc_F64> surfFast( @Nullable ConfigDenseSurfFast config, Class<T> imageType ) {\n\t\tif (config == null)\n\t\t\tconfig = new ConfigDenseSurfFast();\n\n\t\tDescribePointRadiusAngle<T, TupleDesc_F64> surf =\n\t\t\t\tFactoryDescribePointRadiusAngle.surfFast(config.surf, imageType);\n\n\t\treturn new GenericDenseDescribeImageDense<>(surf, config.descriptorScale, config.sampling.periodX, config.sampling.periodY);\n\t}",
"FeaturePattern createFeaturePattern();",
"private static Mat extractFeatures(String imPath) {\n\t\tMat feats = Mat.zeros(1, 324, CvType.CV_32FC1);\n\n\t\t// Read image as YCrCb\n\t\tMat im = Highgui.imread(imPath);\n\t\tImgproc.cvtColor(im, im, Imgproc.COLOR_BGR2YCrCb);\n\t\tMat ch = new Mat();\n\t\tfor (int chNo = 0; chNo < 3; chNo++) { // For each channel\n\t\t\tCore.extractChannel(im, ch, chNo);\n\t\t\t// 4 scales\n\t\t\tdouble[] sigmaVec = {0.0, 3.0, 15.0, 29.0};\n\t\t\tint scaleCtr = 0;\n\t\t\tMat chHz = new Mat(); // Horizontal features for channel.\n\t\t\tMat chVert = new Mat(); // Vertical features for channel.\n\t\t\tMat chDiag = new Mat(); // Diagonal features for channel.\n\t\t\tfor (int dCtr = 0; dCtr < sigmaVec.length; dCtr++) { // For each scale\n\t\t\t\tscaleCtr++;\n\t\t\t\tint baseIdx = chNo * 108 + (scaleCtr-1) * 27;\n\t\t\t\tCore.extractChannel(im, ch, 0);\n\t\t\t\t// Select scale through Gaussian Blurring which will be followed by\n\t\t\t\t// Edge detection (Scharr operator).\n\t\t\t\tif (dCtr != 0) {\n\t\t\t\t\tdouble sigmaX = sigmaVec[dCtr];\n\t\t\t\t\tImgproc.GaussianBlur(ch, ch, new Size(sigmaX / 3, sigmaX / 3), sigmaX);\n\t\t\t\t}\n\t\t\t\t// 3 directions (hz, vert, diag)\n\t\t\t\tMatOfDouble mean = new MatOfDouble();\n\t\t\t\tMatOfDouble stddev = new MatOfDouble();\n\t\t\t\tMoments m = new Moments();\n\n\t\t\t\t// Horizontal stats\n\t\t\t\tImgproc.Scharr(ch, chHz, ch.depth(), 1, 0);\n\n\t\t\t\tCore.meanStdDev(chHz, mean, stddev);\n\t\t\t\tm = Imgproc.moments(chHz);\n\n\t\t\t\tfeats.put(0, baseIdx+0, mean.get(0, 0));\n\t\t\t\tfeats.put(0, baseIdx+1, stddev.get(0, 0));\n\t\t\t\tfeats.put(0, baseIdx+2, m.get_m00());\n\t\t\t\tfeats.put(0, baseIdx+3, m.get_mu02());\n\t\t\t\tfeats.put(0, baseIdx+4, m.get_mu03());\n\t\t\t\tfeats.put(0, baseIdx+5, m.get_mu11());\n\t\t\t\tfeats.put(0, baseIdx+6, m.get_mu12());\n\t\t\t\tfeats.put(0, baseIdx+7, m.get_mu20());\n\t\t\t\tfeats.put(0, baseIdx+8, m.get_mu21());\n\n\t\t\t\t// Vertical stats\n\t\t\t\tImgproc.Scharr(ch, chVert, ch.depth(), 0, 1);\n\n\t\t\t\tCore.meanStdDev(chVert, mean, stddev);\n\t\t\t\tm = Imgproc.moments(chVert);\n\n\t\t\t\tfeats.put(0, baseIdx+9, mean.get(0, 0));\n\t\t\t\tfeats.put(0, baseIdx+10, stddev.get(0, 0));\n\t\t\t\tfeats.put(0, baseIdx+11, m.get_m00());\n\t\t\t\tfeats.put(0, baseIdx+12, m.get_mu02());\n\t\t\t\tfeats.put(0, baseIdx+13, m.get_mu03());\n\t\t\t\tfeats.put(0, baseIdx+14, m.get_mu11());\n\t\t\t\tfeats.put(0, baseIdx+15, m.get_mu12());\n\t\t\t\tfeats.put(0, baseIdx+16, m.get_mu20());\n\t\t\t\tfeats.put(0, baseIdx+17, m.get_mu21());\n\n\t\t\t\t// Diagonal stats\n\t\t\t\tImgproc.Scharr(ch, chDiag, ch.depth(), 0, 1);\n\n\t\t\t\tCore.meanStdDev(chDiag, mean, stddev);\n\t\t\t\tm = Imgproc.moments(chDiag);\n\n\t\t\t\tfeats.put(0, baseIdx+18, mean.get(0, 0));\n\t\t\t\tfeats.put(0, baseIdx+19, stddev.get(0, 0));\n\t\t\t\tfeats.put(0, baseIdx+20, m.get_m00());\n\t\t\t\tfeats.put(0, baseIdx+21, m.get_mu02());\n\t\t\t\tfeats.put(0, baseIdx+22, m.get_mu03());\n\t\t\t\tfeats.put(0, baseIdx+23, m.get_mu11());\n\t\t\t\tfeats.put(0, baseIdx+24, m.get_mu12());\n\t\t\t\tfeats.put(0, baseIdx+25, m.get_mu20());\n\t\t\t\tfeats.put(0, baseIdx+26, m.get_mu21());\n\t\t\t}\n\t\t\tchHz.release();\n\t\t\tchVert.release();\n\t\t\tchDiag.release();\n\t\t}\n\n\t\tim.release();\n\t\tch.release();\n\n\t\tSystem.gc();\n\t\treturn feats;\n\t}",
"Feature createFeature();",
"abstract Type newCVVariant(int cvAttributes);",
"Flavor create(Flavor flavor);",
"StructuralVariation createStructuralVariation();",
"FeatureRef createFeatureRef();",
"StructuralSimilarity createStructuralSimilarity();",
"public static <II extends ImageSingleBand> void harder( ImageFloat32 image ) {\n\t\t// SURF works off of integral images\n\t\tClass<II> integralType = GIntegralImageOps.getIntegralType(ImageFloat32.class);\n\t\t\n\t\t// define the feature detection algorithm\n\t\tFeatureExtractor extractor = FactoryFeatureExtractor.nonmax(2, 0, 5, true);\n\t\tFastHessianFeatureDetector<II> detector = \n\t\t\t\tnew FastHessianFeatureDetector<II>(extractor,200,2, 9,4,4);\n\n\t\t// estimate orientation\n\t\tOrientationIntegral<II> orientation = \n\t\t\t\tFactoryOrientationAlgs.sliding_ii(0.65, Math.PI / 3.0, 8, -1, 6, integralType);\n\n\t\tDescribePointSurf<II> descriptor = FactoryDescribePointAlgs.<II>msurf(integralType);\n\t\t\n\t\t// compute the integral image of 'image'\n\t\tII integral = GeneralizedImageOps.createSingleBand(integralType,image.width,image.height);\n\t\tGIntegralImageOps.transform(image, integral);\n\n\t\t// detect fast hessian features\n\t\tdetector.detect(integral);\n\t\t// tell algorithms which image to process\n\t\torientation.setImage(integral);\n\t\tdescriptor.setImage(integral);\n\n\t\tList<ScalePoint> points = detector.getFoundPoints();\n\n\t\tList<SurfFeature> descriptions = new ArrayList<SurfFeature>();\n\n\t\tfor( ScalePoint p : points ) {\n\t\t\t// estimate orientation\n\t\t\torientation.setScale(p.scale);\n\t\t\tdouble angle = orientation.compute(p.x,p.y);\n\t\t\t\n\t\t\t// extract the SURF description for this region\n\t\t\tSurfFeature desc = descriptor.createDescription();\n\t\t\tdescriptor.describe(p.x,p.y,p.scale,angle,desc);\n\n\t\t\t// save everything for processing later on\n\t\t\tdescriptions.add(desc);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Found Features: \"+points.size());\n\t\tSystem.out.println(\"First descriptor's first value: \"+descriptions.get(0).value[0]);\n\t}",
"FeatureModel createFeatureModel();",
"public Feature createFeature(Feature.Template ft)\n throws BioException, ChangeVetoException;",
"private static List<ImgDescriptor> getDescriptors(Mat[] faces, String name) {\n \tList<ImgDescriptor> ret = new ArrayList<ImgDescriptor>();\n\t\tfor(int i = 0; i < faces.length; i++){\n \t\t// define a copy of the image in order to prevent extract method to modify the original properties\n \t\tMat tmpImg = new Mat(faces[i]);\n \t\tString id = i + \"_\" + name;\n \t\tfloat[] features = extractor.extract(tmpImg, ExtractionParameters.DEEP_LAYER);\n \t\tImgDescriptor tmp = new ImgDescriptor(features, id);\n \t\tret.add(tmp);\n \t\tSystem.out.println(\"Extracting features for \" + id);\n \t}\n\t\t\n\t\treturn ret;\n\t}",
"FeatureConcept createFeatureConcept();",
"public static GetFeature create( Map<String, String> kvp )\n throws InconsistentRequestException, InvalidParameterValueException {\n\n // SERVICE\n checkServiceParameter( kvp );\n\n // ID (deegree specific)\n String id = kvp.get( \"ID\" );\n\n // VERSION\n String version = checkVersionParameter( kvp );\n\n // OUTPUTFORMAT\n String outputFormat = getParam( \"OUTPUTFORMAT\", kvp, FORMAT_GML3 );\n\n // RESULTTYPE\n RESULT_TYPE resultType = RESULT_TYPE.RESULTS;\n String resultTypeString = kvp.get( \"RESULTTYPE\" );\n if ( \"hits\".equals( resultTypeString ) ) {\n resultType = RESULT_TYPE.HITS;\n }\n\n // FEATUREVERSION\n String featureVersion = kvp.get( \"FEATUREVERSION\" );\n\n // MAXFEATURES\n String maxFeaturesString = kvp.get( \"MAXFEATURES\" );\n // -1: fetch all features\n int maxFeatures = -1;\n if ( maxFeaturesString != null ) {\n try {\n maxFeatures = Integer.parseInt( maxFeaturesString );\n if ( maxFeatures < 1 ) {\n throw new NumberFormatException();\n }\n } catch ( NumberFormatException e ) {\n LOG.logError( e.getMessage(), e );\n String msg = Messages.getMessage( \"WFS_PARAMETER_INVALID_INT\", maxFeaturesString,\n \"MAXFEATURES\" );\n throw new InvalidParameterValueException( msg );\n }\n }\n\n // STARTPOSITION (deegree specific)\n String startPosString = getParam( \"STARTPOSITION\", kvp, \"1\" );\n int startPosition = 1;\n try {\n startPosition = Integer.parseInt( startPosString );\n if ( startPosition < 1 ) {\n throw new NumberFormatException();\n }\n } catch ( NumberFormatException e ) {\n LOG.logError( e.getMessage(), e );\n String msg = Messages.getMessage( \"WFS_PARAMETER_INVALID_INT\", startPosString,\n \"STARTPOSITION\" );\n throw new InvalidParameterValueException( msg );\n }\n\n // SRSNAME\n String srsName = kvp.get( \"SRSNAME\" );\n\n // TYPENAME\n QualifiedName[] typeNames = extractTypeNames( kvp );\n if ( typeNames == null ) {\n // no TYPENAME parameter -> FEATUREID must be present\n String featureId = kvp.get( \"FEATUREID\" );\n if ( featureId != null ) {\n String msg = Messages.getMessage( \"WFS_FEATUREID_PARAM_UNSUPPORTED\" );\n throw new InvalidParameterValueException( msg );\n }\n String msg = Messages.getMessage( \"WFS_TYPENAME+FID_PARAMS_MISSING\" );\n throw new InvalidParameterValueException( msg );\n }\n\n // BBOX\n Filter bboxFilter = extractBBOXFilter( kvp );\n\n // FILTER (prequisite: TYPENAME)\n Map<QualifiedName, Filter> filterMap = extractFilters( kvp, typeNames );\n if ( bboxFilter != null && filterMap.size() > 0 ) {\n String msg = Messages.getMessage( \"WFS_BBOX+FILTER_INVALID\" );\n throw new InvalidParameterValueException( msg );\n }\n\n // PROPERTYNAME\n Map<QualifiedName, PropertyPath[]> propertyNameMap = extractPropNames( kvp, typeNames );\n\n // SORTBY\n SortProperty[] sortProperties = null;\n\n // TRAVERSEXLINKDEPTH\n int traverseXLinkDepth = -1;\n\n // TRAVERSEXLINKEXPIRY\n int traverseXLinkExpiry = -1;\n\n // build a Query instance for each requested feature type (later also for each featureid...)\n Query[] queries = new Query[typeNames.length];\n for ( int i = 0; i < queries.length; i++ ) {\n QualifiedName ftName = typeNames[i];\n PropertyPath[] properties = propertyNameMap.get( ftName );\n Filter filter;\n if ( bboxFilter != null ) {\n filter = bboxFilter;\n } else {\n filter = filterMap.get( ftName );\n }\n QualifiedName[] ftNames = new QualifiedName[] { ftName };\n queries[i] = new Query( properties, null, sortProperties, null, featureVersion,\n ftNames, srsName, filter, resultType, maxFeatures,\n startPosition );\n }\n\n // build a GetFeature request that contains all queries\n GetFeature request = new GetFeature( version, id, null, resultType, outputFormat,\n maxFeatures, startPosition, traverseXLinkDepth,\n traverseXLinkExpiry, queries, null );\n return request;\n }",
"public Document createFeatures() {\n return createFeatures(\"SearchImage\");\n\n }",
"Decomposition createDecomposition();",
"public static SURF_CUDA create(double _hessianThreshold, int _nOctaves, int _nOctaveLayers, boolean _extended, float _keypointsRatio, boolean _upright) {\n return SURF_CUDA.__fromPtr__(create_0(_hessianThreshold, _nOctaves, _nOctaveLayers, _extended, _keypointsRatio, _upright));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new plant UML class diagram analyzer and mapper. | public ClassAnalyzer(PlantUMLClassDiagramConfig paramPlantUMLConfig) {
plantUMLConfig = paramPlantUMLConfig;
} | [
"private SCTuiTuSettlePlant() {}",
"private CSTuiTuSettlePlant() {}",
"private CSSettlePlant() {}",
"ClassDiagram createClassDiagram();",
"private PBPlantInfo() {}",
"private PBHotelPlant() {}",
"public PlantillaController() {\n }",
"private CSQuickBornPlant() {}",
"private Mapper() {\n\n }",
"public AFMV() {\r\n }",
"private DungeonGraph()\n {\n //exists to control object creation\n }",
"public Lunar() {\r\n\r\n\t}",
"public Mapper newInstance() {\n Mapper mapper;\n\n mapper = new Mapper(name, parser.newInstance(), oag.newInstance());\n mapper.setLogging(logParsing, logAttribution);\n return mapper;\n }",
"public TargetGeneratorModel()\n {\n }",
"public SourceMappingManagement() {\r\n\t}",
"public Vaccine() {\n\t}",
"private UnitManager() {\r\n\t\tUM = new UnitMap(); // create an object\r\n\t}",
"public TrajectoryPlanner() {\n \n }",
"private void instantiateDomain() {\n\t\tman = new Polka(true);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets a menu with the given name from the menu bar. Returns null if menu item does not exist. | public JMenu getMenuItem(String menuName) {
menuName = menuName.trim();
JMenu menu = null;
for(int i = 0; i<menuBar.getMenuCount(); i++) {
JMenu next = menuBar.getMenu(i);
if(next.getText().equals(menuName)) {
menu = next;
break;
}
}
return menu;
} | [
"public MenuItem getMenuItem(String name) {\n return menuItems.stream().filter(i -> i.getName().equalsIgnoreCase(name)).findFirst().orElse(null);\n }",
"public MenuItem getMenuItemByName(String name){\n for (MenuItem item: menuItems){\n if (item.getFoodName().equals(name)){\n return item;\n }\n }\n return null;\n }",
"public Menu findMenuByName(String menuName);",
"private JMenuItem getMenuItem(String name, JMenu menu) {\n int count=menu.getMenuComponentCount();\n if(count==0){\n return null;\n }\n\n //Skip over all JMenu components that are not JMenu or JMenuItem\n for (int i=0; i<count; i++ ){\n if( !menu.getItem(i).getClass().getName().equals(\"javax.swing.JMenu\") && !menu.getItem(i).getClass().getName().equals(\"javax.swing.JMenuItem\")){\n continue;\n }\n\n JMenuItem jmi=menu.getItem(i);\n if(jmi.getText().equalsIgnoreCase(name)) {\n\n return jmi;\n }\n }\n return null;\n }",
"public Menu getMenu(String name) {\n\t\treturn getMenu(new StringBinding() {\n\t\t\t@Override\n\t\t\tprotected String computeValue() {\n\t\t\t\treturn name;\n\t\t\t}\n\t\t});\n\t}",
"public MenuItem getMenuItemByName(String name) throws SQLException {\n ArrayList<MenuItem> menus = new ArrayList<>(menuItemDao.queryForEq(\"name\", name));\n if (menus.size() != 0)\n return menus.get(0);\n\n return null;\n }",
"public static MenuType getMenuItem(String name) {\n\t\tMenuType menuItem = new MenuType(\"Null\",\"\",\"n\",0,0);\n\n\t\ttry {\n\t\t\tConnection conn = databaseConnect();\n\t\t\t\n\t\t\t//prepare sql statement\n\t\t\tString sql = \"SELECT * FROM Menu WHERE name = ?\";\n\t\t\tPreparedStatement statement = conn.prepareStatement(sql);\n\t\t\tstatement.setString(1, name);\n\t\t\t\n\t\t\tResultSet result = statement.executeQuery();\n\t\t\t\n\t\t\tmenuItem.id = result.getInt(\"id\");\n\t\t\tmenuItem.name = result.getString(\"name\");\n\t\t\tmenuItem.category = result.getString(\"category\");\n\t\t\tmenuItem.price = result.getFloat(\"price\");\n\t\t\tmenuItem.status = result.getString(\"status\");\n\t\t\tmenuItem.cost = result.getFloat(\"cost\");\n\n\t\t\t//Print error message if not found\n\t\t\tif (menuItem.id == 0) {\n\t\t\t\tSystem.out.println(\"No menu item found with name \" + name);\n\t\t\t}\n\t\t\t\n\t\t\tstatement.close();\n\t\t\tconn.close();\n\t\t\treturn menuItem;\n\t\t\t\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Error in getMenuItem\");\n\t\t\te.printStackTrace();\n\t\t\treturn menuItem;\n\t\t}\n\t}",
"public MenuItem getMenuItem(String s){\n MenuItem m=null;\n for(MenuItem mi : menuContent)\n if(mi.getName().equals(s))\n m=mi;\n return m;\n }",
"String getMenuName();",
"Menu getMenu();",
"MenuItem getMenuItem();",
"MenuItems findByMenuName(String name)throws MenuItemNotFoundException;",
"private WebElement getMenuElement(String menu){\r\n\t\tif(menu.toUpperCase().equals(\"ANIMALS\"))\r\n\t\t\treturn mnAnimals;\r\n\t\treturn null;\r\n\t}",
"UmsMenu getItem(Long id);",
"@Override\n public MenuItems findByMenuName(String itemName) throws MenuItemNotFoundException{\n // Optional optional=Optional.of(repository.findByName(itemName));\n if(!repository.existsByName(itemName)){\n throw new MenuItemNotFoundException();\n }\n MenuItems menuItems=repository.findByName(itemName);\n return menuItems;\n }",
"public static Menu getMenu() {return menu;}",
"public static MenuType getMenuItem(int id) {\n\t\tMenuType menuItem = new MenuType(\"Null\",\"\",\"n\",0,0);\n\n\t\ttry {\n\t\t\tConnection conn = databaseConnect();\n\t\t\t\n\t\t\t//prepare sql statement\n\t\t\tString sql = \"SELECT * FROM Menu WHERE id = ?\";\n\t\t\tPreparedStatement statement = conn.prepareStatement(sql);\n\t\t\tstatement.setInt(1, id);\n\t\t\t\n\t\t\tResultSet result = statement.executeQuery();\n\t\t\t\n\t\t\tmenuItem.id = result.getInt(\"id\");\n\t\t\tmenuItem.name = result.getString(\"name\");\n\t\t\tmenuItem.category = result.getString(\"category\");\n\t\t\tmenuItem.price = result.getFloat(\"price\");\n\t\t\tmenuItem.status = result.getString(\"status\");\n\t\t\tmenuItem.cost = result.getFloat(\"cost\");\n\n\t\t\t//Print error message if item is not found in database\n\t\t\tif (menuItem.id == 0) {\n\t\t\t\tSystem.out.println(\"No menu item found with name \" + Integer.toString(id));\n\t\t\t}\n\t\t\t\n\t\t\tstatement.close();\n\t\t\tconn.close();\n\t\t\treturn menuItem;\n\t\t\t\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Error in getMenuItem\");\n\t\t\te.printStackTrace();\n\t\t\treturn menuItem;\n\t\t}\n\t}",
"public NavMenu getNavMenu();",
"public SysMenu getSysMenu();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Highlight the set of planets by drawing them into the given GC as specified by the Universe. | void drawHighlight(Graphics gc, Universe u, PlanetSet set) {
PlanetIter Pptr;
// Draw each existing planet.
for (Pptr = set.first(); !Pptr.isPastEnd(); Pptr.advance()) {
Planet p = Pptr.element();
highlightPlanet(gc,p,u);
}
} | [
"void draw(Graphics gc, Universe u) {\n\tPlanetIter Pptr;\n\n\t// Draw each existing planet.\n\tfor (Pptr = _planets.first(); !Pptr.isPastEnd(); Pptr.advance()) {\n\n\t Planet p = Pptr.element();\n\n\t // Set the color of planet and draw it\n\t gc.setColor(p.color);\n\t drawPlanet(gc,p,u);\n\t}\n }",
"public void paintPlanets(Graphics g)\n {\n for(Planet p: planets)\n {\n if(inBounds(p))\n {\n paintPlanet(g, p);\n }\n }\n }",
"void drawTree(Graphics gc, Universe u, PlanetSet hlt) {\n\n\tgc.clearRect(u.width,0,u.width,u.height);\n\n\t_quadtree.unmark();\n\tif (hlt != null) {\n\t for (PlanetIter Pptr = hlt.first(); \n\t\t !Pptr.isPastEnd(); \n\t\t Pptr.advance()) {\n\t\t\n\t\tPlanet p = Pptr.element();\n\t\t_quadtree.mark(p);\n\t }\n\t}\n\n\tint d = _quadtree.depth();\n\tint n = _quadtree.size();\n\t\n\tif (n >= 1) {\n\t int dy = u.height/d;\n\t if (dy == 0) dy = 1;\n\t \n\t int dx = u.width/n;\n\t if (dx == 0) dx = 1;\n\t\n\t // Call the Quadtree to draw its grid.\n\t _quadtree.drawTree(gc,u.width,0,dx,dy);\n\t}\n\n }",
"public void paint(GC gc) {\n if (mCurrentGesture == null) {\n return;\n }\n\n if (mOverlays == null) {\n mOverlays = mCurrentGesture.createOverlays();\n Device device = gc.getDevice();\n for (Overlay overlay : mOverlays) {\n overlay.create(device);\n }\n }\n for (Overlay overlay : mOverlays) {\n overlay.paint(gc);\n }\n }",
"private void paintObjectsOntoRadar(GC gc) {\n\t\t\n\t\t\n\t\tfor (RadarObject obj : objects) {\n\t\t\t\n\t \tdouble rad = Math.toRadians(course);\t\t\t\n \t\tdouble newXPos = obj.getxPos() * Math.cos(rad) - obj.getyPos() * Math.sin(rad);\n \t\tdouble newYPos = obj.getxPos() * Math.sin(rad) + obj.getyPos() * Math.cos(rad);\t\t\t\n\t\t\t\n\t\t\t// Calculate distance to object\n\t\t\tdouble distance = Math.sqrt(Math.pow(obj.getxPos(), 2) + Math.pow(obj.getyPos(), 2));\n\t\t\tif (distance > rangeDiameter / 2) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// Transform object coordinates to screen coordinates\n\t\t\tint xDraw = (int) (diameter / rangeDiameter * newXPos + diameter / 2) + horMargin;\n\t\t\tint yDraw = (int) (diameter / rangeDiameter * newYPos);\n\t\t\tyDraw = diameter / 2 - yDraw + verMargin;\n\n\t\t\tgc.setBackground(objectColor);\n\t\t\tgc.fillRectangle((xDraw - objSize / 2), (yDraw - objSize / 2), objSize, objSize);\n\n\t\t\tint fontHeight = fetchFontHeight();\n\t\t\tif (fontHeight > 0) {\n\t\t\t\tgc.setForeground(objectTagColor);\n\t\t\t\tgc.setBackground(screenColor);\n\t\t\t\tString txt = obj.getTag() + \"\\nDist:\" + distance + \"\\nSpeed:\" + obj.getSpeed() + \"\\nCrs:\"\n\t\t\t\t\t\t+ calcAngle(xDraw, yDraw);\n\t\t\t\tgc.drawText(txt, xDraw, yDraw - fontHeight * 5 - objSize / 2 - 1);\n\t\t\t}\n\t\t}\n\t}",
"private void shadeCountries() {\n\t\t\n\t}",
"void drawSelected(Graphics g) {\n GraphicVectorEntry[] gves = convertToArray();\n heapsort(gves);\n for (int b = gves.length - 1; b >= 0; b--) {\n GraphicVectorEntry gve = gves[b];\n if (gve.selected && isTempAllowed(gve)) {\n // first paint the object itself\n gve.go.paint(g);\n // then paint the EditPoints\n EditPoint[] ep = ((GraphicEditor) gve.go.getEditor())\n .getEditPoints(gve.go);\n g.setColor(Color.black);\n for (int a = 0; a < ep.length; a++) {\n if (ep[a].num <= 0)// for MovePoints, a Circle is drawn\n\n g.drawOval(ep[a].p.x - 3, ep[a].p.y - 3,\n EDIT_POINT_SIZE, EDIT_POINT_SIZE);\n else\n // for ChangePoints, a Rectangle is drawn\n\n g.drawRect(ep[a].p.x - 3, ep[a].p.y - 3,\n EDIT_POINT_SIZE, EDIT_POINT_SIZE);\n }\n // only check BoundingBoxes\n g.setColor(Color.gray);\n Rectangle r = gve.go.getBoundingBox();\n g.drawRect(r.x, r.y, r.width, r.height);\n }\n }\n }",
"void drawGrid(Graphics gc, Universe u) {\n\n\t// Keep track of the drawing information so that we can service\n\t// the calls to the drawRectangle function below.\n\t_gc = gc;\n\t_univ = u;\n\n\t// Call the Quadtree to draw its grid.\n\t_quadtree.drawGrid();\n\n }",
"void drawGravGrid(Planet p, Graphics gc, Universe u) {\n\n\t// Keep track of the drawing information so that we can service\n\t// the calls to the drawRectangle function below.\n\t_gc = gc;\n\t_univ = u;\n\n\t// Call the Quadtree to draw its grid.\n\t_quadtree.drawGravGrid(p,_max_error);\n\n }",
"private void redrawGroundAndObjects() {\n final Application app = DungeonDiver4.getApplication();\n final Dungeon m = app.getDungeonManager().getDungeon();\n int x, y, w;\n int xFix, yFix;\n final int u = m.getStartRow();\n final int v = m.getStartColumn();\n w = this.elMgr.getEditorLocationW();\n for (x = this.evMgr.getViewingWindowLocationX(); x <= this.evMgr\n .getLowerRightViewingWindowLocationX(); x++) {\n for (y = this.evMgr.getViewingWindowLocationY(); y <= this.evMgr\n .getLowerRightViewingWindowLocationY(); y++) {\n xFix = x - this.evMgr.getViewingWindowLocationX();\n yFix = y - this.evMgr.getViewingWindowLocationY();\n try {\n final AbstractDungeonObject obj1 = m\n .getCell(y, x, this.elMgr.getEditorLocationZ(),\n DungeonConstants.LAYER_GROUND)\n .editorRenderHook(y, x,\n this.elMgr.getEditorLocationZ());\n final AbstractDungeonObject obj2 = m\n .getCell(y, x, this.elMgr.getEditorLocationZ(),\n DungeonConstants.LAYER_OBJECT)\n .editorRenderHook(y, x,\n this.elMgr.getEditorLocationZ());\n final BufferedImageIcon img1 = ObjectImageManager.getImage(\n obj1.getName(), obj1.getBaseID(),\n obj1.getTemplateColor(), obj1.getAttributeID(),\n obj1.getAttributeTemplateColor());\n final BufferedImageIcon img2 = ObjectImageManager.getImage(\n obj2.getName(), obj2.getBaseID(),\n obj2.getTemplateColor(), obj2.getAttributeID(),\n obj2.getAttributeTemplateColor());\n if (u == y && v == x) {\n final AbstractDungeonObject obj3 = new Player()\n .editorRenderHook(y, x,\n this.elMgr.getEditorLocationZ());\n final BufferedImageIcon img3 = ObjectImageManager\n .getImage(obj3.getName(), obj3.getBaseID(),\n obj3.getTemplateColor(),\n obj3.getAttributeID(),\n obj3.getAttributeTemplateColor());\n this.drawGrid.setImageCell(ImageTransformer\n .getVirtualCompositeImage(img1, img2, img3),\n xFix, yFix);\n } else {\n this.drawGrid.setImageCell(\n ImageTransformer.getCompositeImage(img1, img2),\n xFix, yFix);\n }\n } catch (final ArrayIndexOutOfBoundsException ae) {\n this.drawGrid.setImageCell(ObjectImageManager.getImage(\n DungeonEditorGUI.EMPTY_VOID.getName(),\n DungeonEditorGUI.EMPTY_VOID.getBaseID(),\n ColorConstants.COLOR_NONE,\n DungeonEditorGUI.EMPTY_VOID.getAttributeID(),\n ColorConstants.COLOR_NONE), xFix, yFix);\n } catch (final NullPointerException np) {\n this.drawGrid.setImageCell(ObjectImageManager.getImage(\n DungeonEditorGUI.EMPTY_VOID.getName(),\n DungeonEditorGUI.EMPTY_VOID.getBaseID(),\n ColorConstants.COLOR_NONE,\n DungeonEditorGUI.EMPTY_VOID.getAttributeID(),\n ColorConstants.COLOR_NONE), xFix, yFix);\n }\n }\n }\n this.outputFrame.pack();\n this.outputFrame.setTitle(\"Editor (Object Layer) - Floor \"\n + (this.elMgr.getEditorLocationZ() + 1) + \" Level \" + (w + 1));\n this.secondaryPane.repaint();\n this.showOutput();\n }",
"private void digcollect() {\r\n\t\tfor(int i=0; i<25;i++) {\r\n\t\t\tfor(int j=0; j<51; j++) {\r\n\t\t\t\tif(objects[i][j]!=null) {\r\n\t\t\t\tif(objects[i][j].getClass().toString().equals(new Ground().getClass().toString())) {\r\n\t\t\t\t\tif(objects[i][j].getX()==this.viewFrame.getRockford().getX() && objects[i][j].getY()==this.viewFrame.getRockford().getY()) {\r\n\t\t\t\t\t\tthis.tabGrounds.remove(objects[i][j]);\r\n\t\t\t\t\t\tobjects[i][j]= new DarkGround(j*32, i*32);\r\n\t\t\t \tthis.tabDarkGrounds.add((DarkGround) objects[i][j]);}\r\n\t\t\t\t}else if((objects[i][j].getClass().toString().equals(new Diamond().getClass().toString()))) {\r\n\t\t\t\t\tif(objects[i][j].getX()==this.viewFrame.getRockford().getX() && objects[i][j].getY()==this.viewFrame.getRockford().getY()) {\r\n\t\t\t\t\t\tthis.tabDiamonds.remove(objects[i][j]);\r\n\t\t\t\t\t\tobjects[i][j]= new DarkGround(j*32, i*32);\r\n\t\t\t\t\t\tthis.tabDarkGrounds.add((DarkGround) objects[i][j]);\r\n\t\t\t\t\t}}}}}}",
"public abstract void drawPlanet(PApplet view);",
"WorldScene drawAllBgFish(WorldScene below);",
"static void drawCritterShape(Critter c, GraphicsContext gc) {\n\t\tgc.setFill(c.viewColor());\n\t\tgc.setStroke(c.viewOutlineColor());\n\t\t\n\t\tdouble size = (Double) (Params.world_height / 10.0);\n\t\t\n\t\tdouble x = c.x_coord * 5.0;\n\t\tdouble y = c.y_coord * 5.0;\t\n\n\t\t\n\t\tdouble deltaX = c.x_coord / Params.world_width;\n\t\tdouble deltaY = c.y_coord / Params.world_height;\n\t\t\n\t\t\n\t\tswitch (c.viewShape()) {\n\t\t\tcase CIRCLE: gc.fillOval(x, y, size, size); \n\t\t\t\t\t\t gc.strokeOval(x, y, size, size);\n\t\t\t\t\t\t break;\n\t\t\tcase SQUARE: gc.fillRect(x, y, size, size);\n\t\t\t\t\t\t gc.strokeRect(x, y, size, size);\n\t\t\t\t\t\t break; \n\t\t\tcase TRIANGLE: gc.fillPolygon(new double[]{\n\t\t\t\t\t\t \t\tx, x + 5.0, x + 10.0\n\t\t\t\t\t\t }, new double[] {\n\t\t\t\t\t\t\t\ty, y - 10.0, y\n\t\t\t\t\t\t }, 3);\n\t\t\t\t\t\t gc.strokePolygon(new double[]{\n\t\t\t\t\t\t \t\tx, x + 5.0, x + 10.0 \n\t\t\t\t\t\t }, new double[] {\n\t\t\t\t\t\t\t\ty, y - 10.0, y \n\t\t\t\t\t\t }, 3);\n\t\t\t\t\t\t break;\n\t\t\tcase DIAMOND: gc.fillPolygon(new double[]{\n\t\t\t\t\t\t\t\tx + 5, x, x - 5, x\n\t\t\t\t\t\t }, new double[]{\n\t\t\t\t\t\t\t\ty, y + 5, y, y - 5\n\t\t\t\t\t\t }, 4); \n\t\t\t\t\t\t gc.strokePolygon(new double[]{\n\t\t\t\t\t\t\t\tx + 5, x, x - 5, x\n\t\t\t\t\t\t }, new double[]{\n\t\t\t\t\t\t\t\ty, y + 5, y, y - 5\n\t\t\t\t\t\t }, 4);\n\t\t\t\t\t\t break;\n\t\t\tcase STAR: double xPoints[] = {x - 10, x - 2.5, x, x + 2.5, x + 10, x + 5, x + 6, x, x - 6, x- 5};\n\t\t\t\t\t double yPoints[] = {y + 7.5, y + 6.5, y, y + 6.5, y + 7.5, y + 11.5, y + 18, y + 14, y + 18, y + 11.5};\n\t\t\t\t\t gc.fillPolygon(xPoints, yPoints, 10);\n\t\t\t\t\t gc.strokePolygon(xPoints, yPoints, 10); \n\t\t\t\t\t break; \n\t\t\tdefault: throw new IllegalStateException(\"Shape not specified for \" + c.getClass().getName());\n\t\t}\t \n\t}",
"private static void showReservedSpacePolygons(HashSet<Polygon> reservedSpacePolygons) {\r\n\t\tfor (Polygon polygon : reservedSpacePolygons) {\r\n\t\t\tpolygon.display(RESERVED_SPACE_COLOR, true, POLYGON_VERTEX_RADIUS, false);\r\n\t\t}\r\n\t}",
"private static void drawOcean(Graphics g) {\n for( Ocean o : Ocean.theOcean ) {\n g.setColor( o.patchColor );\n g.fillPolygon( o.x, o.y, o.x.length );\n }\n }",
"@Override\n protected void paintComponent(Graphics g)\n {\n g.setColor(COLOUR_DEFAULT);\n for(Source source : sources)\n {\n drawEllipse(g, source.x, source.y, source.A, source.B, source.PA);\n }\n \n // Now overdraw selected cluster\n if(selected!=null)\n {\n g.setColor(COLOUR_SELECTED);\n drawEllipse(g, selected.x, selected.y, selected.A, selected.B, selected.PA);\n }\n }",
"private void renderCity(Graphics g) {\r\n for (CityEntrance cityEntrance : citiesEntranceList) {\r\n if (cityEntrance.getPositionX() + 32 >= xOffset && cityEntrance.getPositionX() <= xOffset + SCREEN_WIDTH\r\n && cityEntrance.getPositionY() + 32 >= yOffset && cityEntrance.getPositionY() <= yOffset + SCREEN_HEIGHT) {\r\n g.drawImage(cityEntranceIcon, cityEntrance.getPositionX() - xOffset, cityEntrance.getPositionY() - yOffset, null);\r\n }\r\n }\r\n\r\n for (CityExit cityExit : citiesExitList) {\r\n if (cityExit.getPositionX() + 32 >= xOffset && cityExit.getPositionX() <= xOffset + SCREEN_WIDTH\r\n && cityExit.getPositionY() + 32 >= yOffset && cityExit.getPositionY() <= yOffset + SCREEN_HEIGHT) {\r\n g.drawImage(cityExitIcon, cityExit.getPositionX() - xOffset, cityExit.getPositionY() - yOffset, null);\r\n }\r\n }\r\n\r\n for (City city : citiesList) {\r\n if (city.getPositionX() + 192 >= xOffset && city.getPositionX() <= xOffset + SCREEN_WIDTH\r\n && city.getPositionY() + 192 >= yOffset && city.getPositionY() <= yOffset + SCREEN_HEIGHT) {\r\n if (city.getName() == \"Metropolis\") {\r\n g.drawImage(capitalCityIcon, city.getPositionX() - xOffset, city.getPositionY() - yOffset, null);\r\n break;\r\n }\r\n if (citySelected) {\r\n if (selectedCity == city.getName()) {\r\n //g.setColor(new Color(255, 136, 104));\r\n g.setColor(new Color(48, 57, 60));\r\n g.fillRect(city.getPositionX() - xOffset - 2, city.getPositionY() - yOffset - 2, 196, 196);\r\n g.setColor(Color.BLACK);\r\n }\r\n }\r\n\r\n if (city.isDestroyed()) {\r\n g.drawImage(cityDestroyedIcon, city.getPositionX() - xOffset, city.getPositionY() - yOffset, null);\r\n } else {\r\n g.drawImage(cityIcon, city.getPositionX() - xOffset, city.getPositionY() - yOffset, null);\r\n }\r\n g.setFont(new Font(\"Arial\", Font.PLAIN, 20));\r\n g.drawString(city.getName(), city.getPositionX() - xOffset, city.getPositionY() - 4 - yOffset);\r\n\r\n if (city.isUnderAttack()) {\r\n g.setColor(Color.RED);\r\n g.fillRoundRect(city.getPositionX() + 165 - xOffset, city.getPositionY() - 20 - yOffset, 15, 15, 3, 3);\r\n g.setColor(Color.black);\r\n }\r\n }\r\n }\r\n }",
"private void drawPokemons(Graphics g) {\n List<CL_Pokemon> pokemons = arena.getPokemons();\n if(pokemons!=null) {\n Iterator<CL_Pokemon> it = pokemons.iterator();\n while(it.hasNext()) {\n CL_Pokemon pok = it.next();\n geo_location c = pok.getPos();\n int r = 10;\n g.setColor(new Color(246, 243, 243, 255));\n if(pok.getType() < 0) {\n g.setColor(Color.red);\n }\n if(c!=null) {\n geo_location ge = this._w2f.world2frame(c);\n ImageIcon poky = new ImageIcon(\"./resources/Pokemon.png\");\n g.drawImage(poky.getImage(), (int)ge.x()-r-5, (int)ge.y()-r-5, 3*r, 3*r, null);\n// g.fillOval((int)ge.x()-r, (int)ge.y()-r, 2*r, 2*r);\n g.drawString(\"\"+pok.getValue(), (int)ge.x()-r+1, (int)ge.y()-r-3);\n }\n }\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the left processed value for the specific data source and consumer. | protected final Object getProcessedLeftValue(Object currentResultSetElement, Queryable.DataSource dataSource, Queryable.Consumer consumer) {
Object result;
if(getLeftValue() instanceof QueryParameter) {
result = getProcessedValue(currentResultSetElement, getLeftValue(), dataSource, consumer);
} else {
Map<Evaluator, Object> cache = getLeftCache();
if(cache != null) {
result = cache.get(this);
if (result == null) {
result = getProcessedValue(currentResultSetElement, getLeftValue(), dataSource, consumer);
cache.put(this, result);
}
} else {
result = getProcessedValue(currentResultSetElement, getLeftValue(), dataSource, consumer);
}
}
return result;
} | [
"public int getLeftmostData( )\r\n {\r\n if (left == null)\r\n return data;\r\n else\r\n return left.getLeftmostData( );\r\n }",
"public Data getLeftData() {\n\t\treturn data[LEFT];\n\t}",
"public Counter getLeft() {\n \n if(this.left == null)\n {\n return null; \n }\n \n else\n {\n return this.left;\n }\n }",
"public abstract L getLeftOrElse(Producer<L> producer);",
"protected long getLeftPosition() {\n return leftPosition;\n }",
"public GlobalId getLeft() {\n return left;\n }",
"public BucketScan getLeftBucketScan(){\n\t\treturn _leftBucketScan;\t\t\n\t}",
"public int left_x_value(int p_y)\n {\n int result = Math.max(lx, ulx + p_y);\n return Math.max(result, llx - p_y);\n }",
"public int getLeft() {\r\n \t\tfor (int j = 0; j < 4; ++j){\r\n \t\t\tfor (int i = 0; i < 4; ++i) {\r\n \t\t\t\tif (blocks[i][j] != null)\r\n \t\t\t\t\treturn x + j;\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn -1;\r\n \t}",
"public double getLeftPValue(){\r\n\t\t\r\n\t\treturn asymptoticLeftTail;\r\n\t\t\r\n\t}",
"public int getKeyLeft() {\r\n return Input.Keys.valueOf(keyLeftName);\r\n }",
"private final Map<Evaluator,Object> getLeftCache() {\n return ServiceSession.getCurrentIdentity().get(SystemProperties.get(SystemProperties.Query.EVALUATOR_LEFT_VALUES_CACHE_NAME));\n }",
"public int getLeftCount()\n {\n return leftCount;\n }",
"public double getLeftCount(){\n return leftEncoder.get();\n }",
"public int getEncoderLeft(){\n\t\treturn leftEncoder.get();\n\t}",
"public long getCountLeft() {\r\n return countLeft;\r\n }",
"public double getLeftSensorPosition(){\n return mLeftMaster.getSelectedSensorPosition(0);\n }",
"int getLeft();",
"@Override\n public AbstractLValue getLeftOperand() {\n return (AbstractLValue)super.getLeftOperand();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional string buseo_name2 = 11; | public Builder setBuseoName2(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000400;
buseoName2_ = value;
onChanged();
return this;
} | [
"java.lang.String getBuseoName1();",
"java.lang.String getBuseoName2();",
"java.lang.String getBuseoName();",
"public Builder setBuseoName1(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000100;\n buseoName1_ = value;\n onChanged();\n return this;\n }",
"public Builder setBuseoName2Bytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000400;\n buseoName2_ = value;\n onChanged();\n return this;\n }",
"public Builder setBuseoName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000010;\n buseoName_ = value;\n onChanged();\n return this;\n }",
"public java.lang.String getBuseoName1() {\n java.lang.Object ref = buseoName1_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n buseoName1_ = s;\n }\n return s;\n }\n }",
"com.google.protobuf.ByteString\n getBuseoName2Bytes();",
"public void setSecondName(String secondName);",
"public void setName2(java.lang.String name2) {\n this.name2 = name2;\n }",
"public void setNomorSK2 (String NomorSK2);",
"boolean hasBuseoName2();",
"public String getBname() {\n return bname;\n }",
"public void setMaLoaiHoSo(String MaLoaiHoSo);",
"public Builder setBuseoNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000010;\n buseoName_ = value;\n onChanged();\n return this;\n }",
"java.lang.String getBunho();",
"public java.lang.String getBuseoName() {\n java.lang.Object ref = buseoName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n buseoName_ = s;\n }\n return s;\n }\n }",
"public Builder setBuseoName1Bytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000100;\n buseoName1_ = value;\n onChanged();\n return this;\n }",
"public void setBname(String bname) {\n this.bname = bname == null ? null : bname.trim();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The customers belonging to a reseller or distributor. repeated .google.cloud.channel.v1.Customer customers = 1; | java.util.List<com.google.cloud.channel.v1.Customer>
getCustomersList(); | [
"com.google.cloud.channel.v1.Customer getCustomers(int index);",
"com.google.ads.googleads.v6.resources.Customer getCustomer();",
"com.google.ads.googleads.v1.resources.Customer getCustomer();",
"public String getCustomersName()\r\n {\r\n return customersName;\r\n }",
"public String getCustomer() {\n return customer;\n }",
"public io.opencannabis.schema.commerce.OrderCustomer.CustomerOrBuilder getCustomerOrBuilder() {\n return getCustomer();\n }",
"io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer();",
"@Accessor(qualifier = \"Customers\", type = Accessor.Type.GETTER)\n\tpublic Collection<B2BCustomerModel> getCustomers()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(CUSTOMERS);\n\t}",
"public static void printAllCustomers() {\r\n for (RegisteredCustomer c : customers) {\r\n System.out.println(c);\r\n }\r\n }",
"public java.lang.String getCustomerId(\r\n ) {\r\n return this._customerId;\r\n }",
"private Set<Customer> createSetOfCustomers(){\n\t\tSet<Customer> setOfCustomers = new HashSet<>();\n\t\t\n\t\tfor (int i=1; i<=NUM_OF_CUSTOMERS; i++){\n\t\t\tint cId = randGen.nextInt(1000)+1;\n\t\t\tint cReg = randGen.nextInt(REGIONS.size())+1;\n\t\t\tCustomer c = new Customer(cId, cReg);\n\t\t\tsetOfCustomers.add(c);\n\t\t}\n\t\treturn setOfCustomers;\n\t}",
"public void setCustomer(List<Customer> customers)throws Exception\n\t{\n\t\tthis.customers = customers;\n\t}",
"public io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer() {\n if (customerBuilder_ == null) {\n return customer_ == null ? io.opencannabis.schema.commerce.OrderCustomer.Customer.getDefaultInstance() : customer_;\n } else {\n return customerBuilder_.getMessage();\n }\n }",
"public int getNumOfCustomers() {\n return this.numOfCustomers;\n }",
"public io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer() {\n return customer_ == null ? io.opencannabis.schema.commerce.OrderCustomer.Customer.getDefaultInstance() : customer_;\n }",
"public static void viewCustomers(){\n //If store has no customers, output this, else show customers\n if(Customers.isEmpty()){\n System.out.println(\"You currently have no customers.\");\n }\n else{\n int counter = 1;\n //Iterate through each customer and output details\n for(Customer c: Customers){\n System.out.println(\"Customer #\" + counter + \":\");\n System.out.println(\"Customer Name: \" + c.getName() + \" | Email: \" + c.getEmail() + \" | Phone Number: \" + c.getPhoneNumber()\n + \" | Address: \" + c.getStreetName() + \", \" + c.getCity() + \", \" + c.getProvince() + \", \" + c.getPostalCode()\n + \" | Credit Card Number: \" + c.getCreditCardNumber() + \" | Credit Card Expiry: \" + c.getCreditCardExpiry()\n + \" | Password: \" + c.getPassword());\n counter++;\n }\n }\n }",
"public io.opencannabis.schema.commerce.OrderCustomer.CustomerOrBuilder getCustomerOrBuilder() {\n if (customerBuilder_ != null) {\n return customerBuilder_.getMessageOrBuilder();\n } else {\n return customer_ == null ?\n io.opencannabis.schema.commerce.OrderCustomer.Customer.getDefaultInstance() : customer_;\n }\n }",
"public ArrayList<Customer> getCustomers()\r\n {\r\n return this.Customers;\r\n }",
"public String getCustomer()\n {\n return name;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Since we mapped the IDefault provider to the PropertyFileConfigurationService we should get that instance back. | @Test
public void testIDefaultProviderIsConfigurationService() {
IDefaultProvider defaultProvider = injector
.getInstance(IDefaultProvider.class);
assert defaultProvider instanceof PropertyFileConfigurationService;
// Further validation that the Configuration Service Implementation is a
// singleton.
IConfigurationService secondConfigService = injector
.getInstance(IConfigurationService.class);
assert defaultProvider == secondConfigService;
} | [
"protected ConfigurationService getConfigurationService() {\r\n\t\treturn configurationService;\r\n\t}",
"protected Configuration loadProperties() {\n return ConfigFactory.createConfig();\n }",
"public IUserInterfaceSettingsProvider getSettingsProvider()\n {\n return this.settingsProvider;\n }",
"IDefaultService getDefaultService();",
"@Contract\npublic interface PropertyFileService {\n /** The default name for an instance if the instance name cannot be determined */\n public final static String DEFAULT_INSTANCE_NAME = \"DEFAULT\";\n \n /** The default name for a type if the type name cannot be determined */\n public final static String DEFAULT_TYPE_NAME = \"DEFAULT_TYPE\";\n \n /**\n * Creates a PropertyFileHandle for reading an HK2 property file\n * that has a specific type name. This is generally used for\n * property files that provide a specific set of instances\n * for a single type. The default instance name will be set\n * to the defaultInstanceName given\n * \n * @param specificTypeName The non-null, non-empty string specific type\n * name. All instances created or modified with this PropertyFileHandle\n * will be in this type\n * @param defaultInstanceName The default name to give to instances of\n * this type if the instance name cannot be determined. If null or\n * the empty string then the default default instance of DEFAULT will\n * be used\n * @return A non-null PropertyFileHandle that can be used to read the\n * property file\n */\n public PropertyFileHandle createPropertyHandleOfSpecificType(String specificTypeName,\n String defaultInstanceName);\n \n /**\n * Creates a PropertyFileHandle for reading an HK2 property file\n * that has a specific type name. This is generally used for\n * property files that provide a specific set of instances\n * for a single type\n * \n * @param file May not be null. The file to be associated with this\n * PropertyFileHandle\n * @param specificTypeName The non-null, non-empty string specific type\n * name. All instances created or modified with this PropertyFileHandle\n * will be in this type\n * @return A non-null PropertyFileHandle that can be used to read the\n * property file\n */\n public PropertyFileHandle createPropertyHandleOfSpecificType(String specificTypeName);\n \n /**\n * Creates a PropertyFileHandle for reading an HK2 property file. This is\n * used for property files that provide instances of multiple types within the\n * same property file\n *\n * @param defaultTypeName The default type name that will be used\n * if a type name could not be determined. If null or empty the\n * default type name of DEFAULT_TYPE will be used\n * @param defaultInstanceName The default name to give to instances of\n * this type if the instance name cannot be determined. If null or\n * the empty string then the default default instance of DEFAULT will\n * be used\n * @return A non-null PropertyFileHandle that can be used to read the\n * property file\n */\n public PropertyFileHandle createPropertyHandleOfAnyType(\n String defaultTypeName,\n String defaultInstanceName);\n \n /**\n * Creates a PropertyFileHandle for reading an HK2 property file. This is\n * used for property files that provide instances of multiple types within the\n * same property file. Will use the default type name of DEFAULT_TYPE for\n * types that cannot be determined and the default instance name of DEFAULT\n * for instance names that cannot be determined\n *\n * @return A non-null PropertyFileHandle that can be used to read the\n * property file\n */\n public PropertyFileHandle createPropertyHandleOfAnyType();\n \n /**\n * This is a utility method that will add the given {@link PropertyFileBean}\n * to the Hub for use in configuring this service\n * \n * @param propertyFileBean The non-null property file bean that should\n * either be added to the Hub or be used to modify the existing\n * bean in the hub\n */\n public void addPropertyFileBean(PropertyFileBean propertyFileBean);\n \n /**\n * This is a utility method that will remove the {@link PropertyFileBean}\n * from the Hub if it is present\n */\n public void removePropertyFileBean();\n}",
"ConfigurationServiceT createConfigurationServiceT();",
"protected IClassPropertiesFactory getPropertiesFactory() {\r\n\t\treturn ClassAnnotatedPropertiesFactory.INSTANCE;\r\n\t}",
"public void afterPropertiesSet()\n {\n super.afterPropertiesSet();\n\n settingService = (SettingServiceProvider)getServiceFactory().makeService(SettingServiceProvider.class);\n\n if(settingService == null)\n {\n throw new RuntimeException(\"Unable to obtain SettingServiceProvider\");\n }\n\n idGenerator = (IdGenerator)getServiceFactory().makeService(IdGenerator.class);\n\n if(idGenerator == null)\n {\n throw new RuntimeException(\"Unable to obtain IdGenerator\");\n }\n\n compressionService = (CompressionService)getServiceFactory().makeService(CompressionService.class);\n\n if(compressionService == null)\n {\n throw new RuntimeException(\"Unable to obtain CompressionService\");\n }\n\n resultFilePathBase = settingService.getTempDir().getAbsolutePath();\n\n debug(\"Plugin validated\");\n\n }",
"public InlinePropertiesConfigurationProvider() {\n\t\tsuper(PropertiesConfiguration.class);\n\t}",
"public ConfigurationService getConfigurationService() {\n return configurationService;\n }",
"public ConfigurationService getConfigService() {\n return configService;\n }",
"public IMailConfigurationService getMailConfigurationService() {\n\n return mailConfigurationService;\n }",
"private ConfiguredNotificationService createService(final Element serviceElement) {\n final Element idElement = getChild(serviceElement, \"id\");\n if (idElement == null) {\n logger.error(\"Found configuration for Notification Service with no 'id' element; this service cannot be referenced so it will not be loaded\");\n return null;\n }\n\n final String serviceId = idElement.getTextContent().trim();\n logger.debug(\"Loading Notification Service with ID {}\", serviceId);\n\n final Element classElement = getChild(serviceElement, \"class\");\n if (classElement == null) {\n logger.error(\"Found configuration for Notification Service with no 'class' element; Service ID is '{}'. This service annot be loaded\", serviceId);\n return null;\n }\n\n final String className = classElement.getTextContent().trim();\n final Class<?> clazz;\n try {\n clazz = Class.forName(className);\n } catch (final Exception e) {\n logger.error(\"Found configuration for Notification Service with ID '{}' and Class '{}' but could not load class.\", serviceId, className);\n logger.error(\"\", e);\n return null;\n }\n\n if (!NotificationService.class.isAssignableFrom(clazz)) {\n logger.error(\"Found configuration for Notification Service with ID '{}' and Class '{}' but class is not a Notification Service.\", serviceId, className);\n return null;\n }\n\n final Object serviceObject;\n try {\n serviceObject = clazz.newInstance();\n } catch (final Exception e) {\n logger.error(\"Found configuration for Notification Service with ID '{}' and Class '{}' but could not instantiate Notification Service.\", serviceId, className);\n logger.error(\"\", e);\n return null;\n }\n\n final Map<String, String> propertyValues = new HashMap<>();\n final List<Element> propertyElements = getChildElementsByTagName(serviceElement, \"property\");\n for (final Element propertyElement : propertyElements) {\n final String propName = propertyElement.getAttribute(\"name\");\n if (propName == null || propName.trim().isEmpty()) {\n logger.warn(\"Found configuration for Notification Service with ID '{}' that has property value configured but no name for the property.\", serviceId);\n continue;\n }\n\n final String propValue = propertyElement.getTextContent().trim();\n propertyValues.put(propName, propValue);\n }\n\n final NotificationService service = (NotificationService) serviceObject;\n\n try {\n service.initialize(new NotificationInitializationContext() {\n @Override\n public PropertyValue getProperty(final PropertyDescriptor descriptor) {\n final String propName = descriptor.getName();\n String value = propertyValues.get(propName);\n if (value == null) {\n value = descriptor.getDefaultValue();\n }\n\n final ResourceContext resourceContext = new StandardResourceContext(new StandardResourceReferenceFactory(), descriptor);\n return new StandardPropertyValue(resourceContext, value, null, ParameterLookup.EMPTY, variableRegistry);\n }\n\n @Override\n public Map<String,String> getAllProperties() {\n return Collections.unmodifiableMap(propertyValues);\n }\n\n @Override\n public String getIdentifier() {\n return serviceId;\n }\n });\n } catch (final Exception e) {\n logger.error(\"Failed to load Notification Service with ID '{}'\", serviceId);\n logger.error(\"\", e);\n }\n\n return new ConfiguredNotificationService(service, propertyValues);\n }",
"public DefaultConnectionProvider() {\n loadProperties();\n }",
"private PatchStore provider() {\n if ( provider == null )\n provider = createProvider();\n return provider;\n }",
"public static PropertiesServiceController getInstance() {\r\n if (PROPS == null) {\r\n PROPS = new PropertiesServiceController();\r\n PROPS.prop = new Properties();\r\n try {\r\n PROPS.prop.load(PROPS.getClass().getResourceAsStream(\"/formstredf.properties\"));\r\n } catch (IOException except) {\r\n except.printStackTrace();\r\n } \r\n }\r\n return PROPS;\r\n }",
"public ConfigurationContext() {\n this.defaults = new Properties();\n }",
"private CommercePropertyManager retrieveCommercePropertyManager() {\n return (CommercePropertyManager) getProfileTools().getPropertyManager();\n }",
"public abstract ConfigurationStorage getStorage();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
configFwdLimitSwitchNormallyOpen This method configures the reverse limit switch to be normally open (i.e. active when close). | public void configRevLimitSwitchNormallyOpen(boolean normalOpen)
{
final String funcName = "configRevLimitSwitchNormallyOpen";
if (debugEnabled)
{
dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, "normalOpen=%s", normalOpen);
dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);
}
revLimitSwitch = motor.getReverseLimitSwitch(
normalOpen ? LimitSwitchPolarity.kNormallyOpen : LimitSwitchPolarity.kNormallyClosed);
} | [
"public void configFwdLimitSwitchNormallyOpen(boolean normalOpen)\n {\n final String funcName = \"configFwdLimitSwitchNormallyOpen\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"normalOpen=%s\", normalOpen);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n fwdLimitSwitch = motor.getForwardLimitSwitch(\n normalOpen ? LimitSwitchPolarity.kNormallyOpen : LimitSwitchPolarity.kNormallyClosed);\n }",
"public static native void ChannelHandshakeLimits_set_force_announced_channel_preference(long this_ptr, boolean val);",
"private void enableLimit(final boolean enable) {\n liftMotor.configForwardSoftLimitEnable(enable);\n liftMotor.configReverseSoftLimitEnable(enable);\n }",
"public static native void UserConfig_set_accept_forwards_to_priv_channels(long this_ptr, boolean val);",
"private void enableLimitSwitch(final boolean enable) {\n if (enable != isLimitSwitchEnabled) {\n liftMotor.configClearPositionOnLimitR(enable, Config.CAN_SHORT);\n isLimitSwitchEnabled = enable;\n }\n }",
"void setForwardConfig(ForwardConfig forward);",
"private void configDriveMotor(){ \n mDriveMotor.configFactoryDefault();\n mDriveMotor.configAllSettings(driveMotorConfig);\n mDriveMotor.setInverted(invertDrive);\n mDriveMotor.setNeutralMode(Constants.Swerve.driveNeutralMode);\n mDriveMotor.setStatusFramePeriod(StatusFrame.Status_1_General, Constants.Swerve.driveStatus1);\n mDriveMotor.setStatusFramePeriod(StatusFrame.Status_2_Feedback0, Constants.Swerve.driveStatus2);\n }",
"public OpenToLANConfig() {\n this.port = 0;\n this.delayBetweenPings = Duration.of(1500, TimeUnit.MILLISECOND);\n this.delayBetweenEvent = Duration.of(30, TimeUnit.SECOND);\n }",
"public static native boolean ChannelHandshakeLimits_get_force_announced_channel_preference(long this_ptr);",
"DynamicProperty<Boolean> circuitBreakerForceOpen();",
"public static native void UserConfig_set_peer_channel_config_limits(long this_ptr, long val);",
"public void setForward(boolean fwdVal) {\n\t\tRelay.Value currentValue = this.get(),\n\t\t\t\t newValue = currentValue;\n\t\t\n\t\tif(currentValue == Relay.Value.kForward) {\n\t\t\tif(!fwdVal)\n\t\t\t\tnewValue = Relay.Value.kOff;\n\t\t} else if(currentValue == Relay.Value.kOff) {\n\t\t\tif(fwdVal)\n\t\t\t\tnewValue = Relay.Value.kForward;\n\t\t} else if(currentValue == Relay.Value.kOn) {\n\t\t\tif(!fwdVal)\n\t\t\t\tnewValue = Relay.Value.kReverse;\n\t\t} else if(currentValue == Relay.Value.kReverse) {\n\t\t\tif(fwdVal)\n\t\t\t\tnewValue = Relay.Value.kOn;\n\t\t}\n\t\t\n\t\tthis.set(newValue);\n\t}",
"public static native long ChannelConfig_new(int forwarding_fee_proportional_millionths_arg, int forwarding_fee_base_msat_arg, short cltv_expiry_delta_arg, boolean announced_channel_arg, boolean commit_upfront_shutdown_pubkey_arg, long max_dust_htlc_exposure_msat_arg, long force_close_avoidance_max_fee_satoshis_arg);",
"public void switchOnForConfiguredPeriod() throws RemoteHomeConnectionException {\n m.sendCommand(parseDeviceIdForMultipleDevice(getRealDeviceId()), \"l\"+getSubDeviceNumber()+\"of\");\n setCurrentState(true);\n }",
"boolean getForwardLimit();",
"public void setOpenLoop() {\n controlState = ControlState.OPEN_LOOP;\n }",
"private static void autoOpenPorts(String forwardToIP, List<Port> portsToOpen) {\n if (!portsToOpen.isEmpty()) {\n try {\n myUI.setPortClosing(false);\n for (Port p : portsToOpen) {\n myManager.addPort(p);\n }\n myManager.closePorts();\n for (Port p : portsToOpen) {\n myManager.addPort(p);\n }\n myManager.openPorts(forwardToIP);\n } catch (IllegalStateException ise) {\n }\n }\n }",
"public void setOpen() {\n \tGDMRelay.set(true);\n\t\tGDMBackRelay.set(true);\n\t\tisActive = true;\n }",
"public void generateOpenNetworkConfig() {\n if ((security != SECURITY_NONE) && (security != SECURITY_OWE)) {\n throw new IllegalStateException();\n }\n if (mConfig != null)\n return;\n mConfig = new WifiConfiguration();\n mConfig.SSID = AccessPoint.convertToQuotedString(ssid);\n\n if (security == SECURITY_NONE || !getWifiManager().isEasyConnectSupported()) {\n mConfig.allowedKeyManagement.set(KeyMgmt.NONE);\n } else {\n mConfig.allowedKeyManagement.set(KeyMgmt.OWE);\n mConfig.requirePMF = true;\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use OpenFileResponse.newBuilder() to construct. | private OpenFileResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} | [
"private RetrieveFileResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private OpenFileRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private CreateFileResponse() {\n initFields();\n }",
"private CloseFileResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private ListFilesResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"edu.usfca.cs.dfs.StorageMessages.RetrieveFileResponseOrBuilder getRetriveFileResponseOrBuilder();",
"edu.usfca.cs.dfs.StorageMessages.RetrieveFileResponseOrBuilder getRetrieveFileResponseOrBuilder();",
"edu.usfca.cs.dfs.StorageMessages.ListFileResponseOrBuilder getListFileResponseOrBuilder();",
"public DeleteFileResponse() {\r\n super(FunctionID.DELETE_FILE.toString());\r\n }",
"edu.usfca.cs.dfs.StorageMessages.RetrieveFileResponse getRetriveFileResponse();",
"edu.usfca.cs.dfs.StorageMessages.RetrieveFileResponse getRetrieveFileResponse();",
"private FileDownloadRspMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"edu.usfca.cs.dfs.StorageMessages.ListFileResponse getListFileResponse();",
"private RetrieveFileRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public edu.usfca.cs.dfs.StorageMessages.ListFileResponseOrBuilder getListFileResponseOrBuilder() {\n if ((msgCase_ == 11) && (listFileResponseBuilder_ != null)) {\n return listFileResponseBuilder_.getMessageOrBuilder();\n } else {\n if (msgCase_ == 11) {\n return (edu.usfca.cs.dfs.StorageMessages.ListFileResponse) msg_;\n }\n return edu.usfca.cs.dfs.StorageMessages.ListFileResponse.getDefaultInstance();\n }\n }",
"private ApiListingResponse createPojoApiListingResponse(MultipartHttpServletRequest requestFile, long start, String fileName,\n\t\t\tFile file) {\n\t\tApiListingResponse apiListingResponse;\n\t\tapiListingResponse = new ApiListingResponse();\n\t\tapiListingResponse.setFileName(fileName);\n\t\tapiListingResponse.setStatus(StatusUploadFile.IN_PROGRESS);\n\t\tapiListingResponse.setIdentification(requestFile.getParameter(\"identification\"));\n\t\tapiListingResponse.setChunksQuantity(1);\n\t\tapiListingResponse.setSendingTime(Util.convertNanoToSeconds(start, System.nanoTime()));\n\t\tapiListingResponse.setLinkDownloadFile(linkDownload.concat(fileName));\n\t\tapiListingResponse.setFile(file);\n\t\treturn apiListingResponse;\n\t}",
"public IAgreementFileRequestBuilder file() {\n return new AgreementFileRequestBuilder(getRequestUrlWithAdditionalSegment(\"file\"), getClient(), null);\n }",
"private CloseFileRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public FileWrapper() {\n \tthis.name = \"\";\n this.path = \"\";\n this.modifiedAt = \"\";\n this.kind = FileType.OTHER;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the task diagnostics for a given attempt id | String[] getTaskDiagnostics( Object taskAttemptId ) throws IOException; | [
"String getTaskLog (int queryId, int taskId, int offset, int len) throws IOException;",
"long getTraceTaskId();",
"public String getErrorDataCollectorId();",
"private void listApplicationAttempts(String applicationId) throws YarnException,\n IOException {\n PrintWriter writer = new PrintWriter(\n new OutputStreamWriter(sysout, Charset.forName(\"UTF-8\")));\n\n List<ApplicationAttemptReport> appAttemptsReport = client\n .getApplicationAttempts(ApplicationId.fromString(applicationId));\n writer.println(\"Total number of application attempts \" + \":\"\n + appAttemptsReport.size());\n writer.printf(APPLICATION_ATTEMPTS_PATTERN, \"ApplicationAttempt-Id\",\n \"State\", \"AM-Container-Id\", \"Tracking-URL\");\n for (ApplicationAttemptReport appAttemptReport : appAttemptsReport) {\n writer.printf(APPLICATION_ATTEMPTS_PATTERN, appAttemptReport\n .getApplicationAttemptId(), appAttemptReport\n .getYarnApplicationAttemptState(), appAttemptReport\n .getAMContainerId() == null ? \"N/A\" : appAttemptReport\n .getAMContainerId().toString(), appAttemptReport.getTrackingUrl());\n }\n writer.flush();\n }",
"public void getTask(String id);",
"String diagnosticsOutput();",
"com.netflix.conductor.proto.EventHandlerPb.EventHandler.TaskDetails getFailTask();",
"DiagnosticResult attemptDiagnostic() throws UnexplainableException;",
"String getTaskId();",
"List<ExceptionAndTasks> getFailedTasksAndExceptions();",
"@GET\n\t\t\t@Path(\"/{id}/summary\")\n\t\t\t@Produces({\"application/xml\"})\n\t\t\tpublic Rows getDifficulttasksSummaryRows() {\n\t\t\t\tRows rows = null;\n\t\t\t\ttry {\n\t\t\t\t\trows=new DifficulttasksDao(uriInfo,header).getDifficulttasksSummaryRows();\n\t\t\t\t} catch (AuthenticationException e) {\n\t\t\t\t\t rows=new TemplateUtility().getFailedMessage(e.getMessage());\n\t\t\t\t\t e.printStackTrace();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tlogger.info( \"Error calling getDifficulttasksRows()\"+ ex.getMessage());\n\t\t\t\t\t ex.printStackTrace();\n\t\t\t\t}\n\t\t\t\treturn rows;\n\t\t\t}",
"public void reportSuccessfulPreemption(TaskAttemptId attemptID);",
"private void getTaskForPlan(Integer idPlan) {\n\t\tthis.allTask = this.planFacades.getTaskForPlan(idPlan);\n\t}",
"java.lang.String getRunErrInfo();",
"String getControllerSystemDiagnostics(String clientId);",
"@GetMapping(\"/bytaskid/{id}\")\r\n public List<TaskStatus> getByTaskId(@PathVariable(value = \"id\") Long id) {\r\n\r\n List<TaskStatus> tsk = dao.findByTaskID(id);\r\n return tsk;\r\n\r\n }",
"java.util.List<com.google.cloud.aiplatform.v1.PipelineTaskDetail> \n getTaskDetailsList();",
"@Override\n\tpublic String toString() {\n\t\tStringBuilder sb = new StringBuilder(shortSummary());\n\t\tif (keepTaskList) {\n\t\t\tfor (TaskInfo task : getTaskInfo()) {\n\t\t\t\tsb.append(\"; [\").append(task.getTaskName()).append(\"] took \").append(task.getTimeMillis());\n\t\t\t\tlong percent = Math.round((100.0 * task.getTimeSeconds()) / getTotalTimeSeconds());\n\t\t\t\tsb.append(\" = \").append(percent).append(\"%\");\n\t\t\t}\n\t\t} else {\n\t\t\tsb.append(\"; no task info kept\");\n\t\t}\n\t\treturn sb.toString();\n\t}",
"public int getTaskId();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert a string into regex | public static String toRegex(String str)
{
str = str.replace("[", "\\[").replace("]", "\\]").replace("(", "\\(").replace(")", "\\)").replace(".", "\\.")
.replace("*", "\\*").replace(" ", "\\s*").replace("_", "\\_");
/*
* Add bound of word at the beginning
*/
if (str.toCharArray()[0] >= 'A' && str.toCharArray()[0] <= 'Z'
|| str.toCharArray()[0] >= 'a' && str.toCharArray()[0] <= 'z')
{
str = "\\b" + str;
}
/*
* Add bound of word at the end
*/
int last = str.toCharArray().length - 1;
if (str.toCharArray()[last] >= 'A' && str.toCharArray()[last] <= 'Z'
|| str.toCharArray()[last] >= 'a' && str.toCharArray()[last] <= 'z')
{
str += "\\b";
}
return str;
} | [
"java.lang.String getRegex();",
"public Pattern regexPattern(String regex) {\n return Pattern.compile(regex);\n }",
"private static String createRegex(String s) {\n\t\tStringBuilder b = new StringBuilder();\n\t\tfor(int i=0; i<s.length(); ++i) {\n\t\t\tchar ch = s.charAt(i);\n\t\t\tif (\"\\\\.^$|?*+[]{}()\".indexOf(ch) != -1)\n\t\t\t\tb.append('\\\\').append(ch);\n\t\t\telse if (Character.isLetter(ch))\n\t\t\t\t//b.append(\"[A-Za-z]\");\n\t\t\t\tb.append(ch);\n\t\t\telse if (Character.isDigit(ch))\n\t\t\t\t//b.append(\"\\\\d\");\n\t\t\t\tb.append(ch);\n\t\t\telse\n\t\t\t\tb.append(ch);\n\t\t}\n\t\treturn b.toString();\n\t}",
"public static String toRegex(String param) \r\n\t{\r\n\t\tStringBuffer regex = new StringBuffer();\r\n\t\tfor( int i=0; i < param.length(); i++ ) \r\n\t\t{\r\n\t\t\tchar next = param.charAt( i );\r\n\t\t\t if ('*' == next) regex.append( \".+\" ); // -> multi-character match wild card\r\n\t\t\telse if ('?' == next) regex.append( \".\" ); // -> single-character match wild card\r\n\t\t\telse if ('.' == next) regex.append( \"\\\\.\" ); // all of these are special regex characters we are quoting\r\n\t\t\telse if ('+' == next) regex.append( \"\\\\+\" ); \r\n\t\t\telse if ('$' == next) regex.append( \"\\\\$\" ); \r\n\t\t\telse if ('\\\\' == next) regex.append( \"\\\\\\\\\" ); \r\n\t\t\telse if ('[' == next) regex.append( \"\\\\[\" ); \r\n\t\t\telse if (']' == next) regex.append( \"\\\\]\" ); \r\n\t\t\telse if ('{' == next) regex.append( \"\\\\{\" ); \r\n\t\t\telse if ('}' == next) regex.append( \"\\\\}\" ); \r\n\t\t\telse if ('(' == next) regex.append( \"\\\\(\" ); \r\n\t\t\telse if (')' == next) regex.append( \"\\\\)\" ); \r\n\t\t\telse if ('&' == next) regex.append( \"\\\\&\" ); \r\n\t\t\telse if ('^' == next) regex.append( \"\\\\^\" ); \r\n\t\t\telse if ('-' == next) regex.append( \"\\\\-\" ); \r\n\t\t\telse if ('|' == next) regex.append( \"\\\\|\" ); \r\n\t\t\telse regex.append( next );\r\n\t\t}\r\n\t\t\r\n\t\treturn regex.toString();\r\n\t}",
"public static String escapeRegex(String str) {\n return str.chars().boxed()\n .map(i -> escapeRegexChar((char) i.intValue()))\n .collect(Collectors.joining());\n }",
"public Pattern getValidStringPattern();",
"public StringToRegEx()\r\n {\r\n }",
"void setRegex( String regex );",
"protected abstract String getMatchingRegex();",
"java.lang.String getRE();",
"public GrammaticaRE(String regex) throws Exception {\n regExp = new RegExp(regex, ignoreCase);\n }",
"protected abstract Regex pattern();",
"public static Regex compile(String pattern, int cflags) throws RegexException {\n return new Regex(pattern, REG_EXTENDED | cflags);\n }",
"private boolean isRegexValid(String string)\n {\n try\n {\n Pattern.compile(string, Pattern.MULTILINE);\n return true;\n }\n catch (PatternSyntaxException e)\n {\n return false;\n }\n }",
"@Pure\n @EnsuresQualifierIf(result = true, expression = \"#1\", qualifier = Regex.class)\n public static boolean isRegex(String s) {\n return isRegex(s, 0);\n }",
"public RegexPatternBuilder (String regex)\n {\n this.regex = regex;\n }",
"public RegexValidator(final String regex) {\n this(regex, true);\n }",
"public void setRegex (String regex)\n {\n this.regex = regex;\n }",
"String getValueRegex(String format);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the points to display the given text as an animation. | public Point[] getPoints(String text) {
FAName fn = getFAName(text);
if (fn != null) {
return fn.points;
}
ArrayList<Point> points = new ArrayList<Point>();
int x = 0;
for (int i=0; i<text.length(); i++) {
FALetter fl = getLetter(text.charAt(i));
for (int j=0; j<fl.points.length; j++) {
Point p = fl.points[j];
points.add(new Point(p.x + x, p.y));
}
x += fl.advance;
}
return points.toArray(new Point[0]);
} | [
"List<NavigationPoint> getNavigationPoints(String sourceText);",
"public static List<TimePoint> extractTimePoints(String text) {\n\t\tfinal List<TimePoint> timePoints = new ArrayList<TimePoint>();\n\t\t\n\t\tfinal Matcher matcher = RE_YOUTUBE_DEEPLINK.matcher(text);\n\t\t\n\t\twhile (matcher.find()) {\n\t\t\tTimePoint tp = new TimePoint(matcher.group());\n\t\t\ttimePoints.add(tp);\n\t\t}\n\t\t\t\n\t\treturn timePoints;\n\t}",
"public String getPoints();",
"public Float[] getTextOffset() {\n return textOffset;\n }",
"void computeTextPositions() {\n\t\tGScene scene = getScene();\n\t\tif (scene == null)\n\t\t\treturn;\n\n\t\t// Stop here if annotation is not visible\n\t\tif ((visibilityMask_ & ANNOTATION_VISIBLE) == 0)\n\t\t\treturn;\n\n\t\t//\n\t\t// Do annotation on children\n\t\t//\n\t\tfor (Iterator i = children_.iterator(); i.hasNext();) {\n\t\t\tGObject child = (GObject) i.next();\n\t\t\tchild.computeTextPositions();\n\t\t}\n\n\t\t//\n\t\t// Do annotation on self\n\t\t//\n\n\t\t// Do annotation on all segments\n\t\tif (segments_ != null) {\n\t\t\tfor (Iterator i = segments_.iterator(); i.hasNext();) {\n\t\t\t\tGSegment segment = (GSegment) i.next();\n\t\t\t\tCollection texts = segment.getTexts();\n\t\t\t\tscene.computePositions(texts);\n\t\t\t}\n\t\t}\n\t}",
"private void printText(String text, double x, double y) {\n fprintf(out, \" %.1f %.1f moveto\\n\", (x * xp),\n (y * yp - texthgt * point));\n fprintf(out, \" (%s) dup stringwidth pop\\n\", text);\n fprintf(out, \" %.2f mul 0 rmoveto\\n\", -textpos);\n fprintf(out, \" show\\n\");\n }",
"public static ITextPointer GetTextPositionFromPoint(ReadOnlyCollection<LineResult> lines, Point point, boolean snapToText) \r\n { \r\n int lineIndex;\r\n ITextPointer orientedPosition; \r\n\r\n Debug.Assert(lines != null && lines.Count > 0, \"Line array is empty.\");\r\n\r\n // Figure out which line is the closest to the input pixel position. \r\n lineIndex = GetLineFromPoint(lines, point, snapToText);\r\n Debug.Assert(lineIndex < lines.Count); \r\n \r\n // If no line is hit, return null oriented text position.\r\n // Otherwise hittest line content. \r\n if (lineIndex < 0)\r\n {\r\n orientedPosition = null;\r\n } \r\n else\r\n { \r\n // Get position from distance. \r\n orientedPosition = lines[lineIndex].GetTextPositionFromDistance(point.X);\r\n } \r\n\r\n return orientedPosition;\r\n }",
"private void processTextRecognitionResult(FirebaseVisionText texts) {\n List<FirebaseVisionText.Block> blocks = texts.getBlocks();\n if (blocks.size() == 0) {\n Toast.makeText(getApplicationContext(), \"onDevice: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n for (int i = 0; i < blocks.size(); i++) {\n List<FirebaseVisionText.Line> lines = blocks.get(i).getLines();\n for (int j = 0; j < lines.size(); j++) {\n List<FirebaseVisionText.Element> elements = lines.get(j).getElements();\n for (int k = 0; k < elements.size(); k++) {\n GraphicOverlay.Graphic textGraphic = new TextGraphic(mGraphicOverlay, elements.get(k));\n mGraphicOverlay.add(textGraphic);\n\n }\n }\n }\n }",
"public void createAnimatedTexts(Vector lines, Font font,\r\n\t\t\t\t Color fg, Color bg,\r\n\t\t\t\t int dx, int dy,\r\n\t\t\t\t String delim)\r\n {\r\n noOfTexts = 0;\r\n animatedTexts = new Vector(lines.size());\r\n dbg(\"Creating Animated Text...\");\r\n for (int i=0; i<lines.size(); i++) {\r\n\t dbg(\" \" + (String) lines.elementAt(i));\r\n animatedTexts.addElement(\r\n new FunScrollAnimatedText(\r\n\t this, (String) lines.elementAt(i), font,\r\n\t fg, bg, dx, dy, delim));\r\n\t noOfTexts++;\r\n }\r\n currentTextIndex = 0;\r\n currentText = (FunScrollAnimatedText)\r\n\t animatedTexts.elementAt(currentTextIndex);\r\n }",
"private void updatePointsText() {\n textViewPlayer.setText(\"YOU: \" + playerPoints);\n textViewBot.setText(\"BOT: \" + botPoints);\n }",
"public void setPointText(int x, int y){\n\t}",
"int TextSetPos(int id, int x, int y);",
"private void ShowPoints() {\n System.out.println(\"Punkteübersicht\\n\" + _line);\n var list = _game.getFrameResult();\n for (int i = 0; i < list.size(); i++) {\n int framePoints = 0;\n ArrayList<Integer> subList = list.get(i).DetailedThrows;\n String formattedOutput;\n\n formattedOutput = \"Frame \" + (i + 1) + ((i + 1) < 10 ? \" \" : \" \") + \"|\";\n for (int j = 0; j < subList.size(); j++) {\n formattedOutput += \" Roll \" + (j + 1) + \": \" + subList.get(j);\n framePoints += subList.get(j);\n }\n for (int j = formattedOutput.length(); j < 45; j++) {\n formattedOutput += \" \";\n }\n if (framePoints == 10 && subList.size() == 1) {\n formattedOutput += \"| STRIKE\";\n }\n if (framePoints == 10 && subList.size() > 1) {\n formattedOutput += \"| SPARE\";\n }\n for (int j = formattedOutput.length(); j < 55; j++) {\n formattedOutput += \" \";\n }\n formattedOutput += \"| Points: \" + list.get(i).Points;\n System.out.println(formattedOutput);\n }\n System.out.println(_subLine + \" Points: \" + _game.SummarizePoints());\n\n }",
"public void drawText(String text, Vector2 position)\n {\n requestedTextArray.add(text);\n requestedTextArray.add(position.cpy());\n }",
"public void slideTexts(final TextView view, int duration, final int repeat, int offset, Interpolator interpolator, int stay_time,\n boolean left) {\n\n float x1, x2, x3;\n x1 = -(view.getLeft() + view.getWidth());\n x2 = 0;\n x3 = view.getRight() + view.getWidth();\n\n final String titles[] = {\n \"Current Affairs\",\n \"Infographics\",\n \"Talks and Interviews\",\n \"Topper's Answer Copy\",\n \"All India Radio\",\n \"Value Added Material\"\n };\n\n TranslateAnimation translateAnimation1, translateAnimation2;\n if (left) {\n translateAnimation1 = new TranslateAnimation(x1, x2, 0, 0);\n translateAnimation2 = new TranslateAnimation(x2, x3, 0, 0);\n } else {\n translateAnimation1 = new TranslateAnimation(x3, x2, 0, 0);\n translateAnimation2 = new TranslateAnimation(x2, x1, 0, 0);\n }\n\n translateAnimation1.setDuration(duration);\n translateAnimation1.setStartOffset(offset);\n translateAnimation1.setFillBefore(false);\n translateAnimation1.setInterpolator(interpolator);\n translateAnimation2.setDuration(duration);\n translateAnimation2.setFillAfter(true);\n translateAnimation2.setStartOffset(stay_time);\n\n AlphaAnimation alphaAnimation1 = new AlphaAnimation(0.3f, 1f);\n AlphaAnimation alphaAnimation2 = new AlphaAnimation(1f, 0.3f);\n\n alphaAnimation1.setDuration(duration);\n alphaAnimation1.setStartOffset(offset);\n alphaAnimation2.setDuration(duration);\n alphaAnimation2.setStartOffset(stay_time);\n\n final AnimationSet animationSet = new AnimationSet(false);\n animationSet.addAnimation(translateAnimation1);\n animationSet.addAnimation(translateAnimation2);\n animationSet.addAnimation(alphaAnimation1);\n animationSet.addAnimation(alphaAnimation2);\n\n animationSet.setAnimationListener(new Animation.AnimationListener() {\n @Override\n public void onAnimationStart(Animation animation) {\n view.setVisibility(View.VISIBLE);\n }\n\n @Override\n public void onAnimationEnd(Animation animation) {\n view.setText(titles[(int) count]);\n count += 0.5f;\n if (count > 5)\n count = 0;\n view.setVisibility(View.INVISIBLE);\n view.startAnimation(animationSet);\n }\n\n @Override\n public void onAnimationRepeat(Animation animation) {\n\n }\n });\n\n view.startAnimation(animationSet);\n }",
"public ArrayList<Point> getTranslates(int frame) {\n\t\tArrayList<Point> destination = new ArrayList<Point>();\n\n\t\t// dont draw if doesnt exist at that frame.\n\t\tif (frame > endTime || frame < startTime)\n\t\t\treturn destination;\n\n\t\tfor (Point p : points) {\n\t\t\tPoint dest = null;\n\n\t\t\tfloat f[] = new float[9];\n\t\t\tatList.get(frame - startTime).getValues(f);\n\n\t\t\tdest = new Point();\n\t\t\tdest.x = (int) (p.x + f[2]);\n\t\t\tdest.y = (int) (p.y + f[5]);\n\t\t\tdestination.add(dest);\n\t\t}\n\t\treturn destination;\n\t}",
"String getPositionStr();",
"@Override public void onQRCodeRead(String text, PointF[] points) {\n resultTextView.setText(text);\n pointsOverlayView.setPoints(points);\n }",
"@Override\n public void animationEnded() {\n int index = mLines.indexOf(newLine);\n\n mPoints.get(index + 1).startAnimation();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds instances to the instance lookup. | private void addInstances (Object... instances) {
for (int i = 0; i < instances.length; i++) {
ic.add(instances[i]);
}
} | [
"private void addToClassPool(List<Class> classes) {\n classes.stream()\n .filter(c -> c.getAnnotation(Provided.class) != null)\n .forEach(c -> classPool.put(c, new Instance()));\n\n classPool.keySet().forEach(this::resolveInstance);\n }",
"public Lookup createInstancesLookup (InstanceContent ic);",
"void addInstance(Instance instance);",
"Collection<Instance> getInstances();",
"private void addInstanceLens(Lens lens) {\n\t\tthis._lenses.add(lens);\n\t\tthis._all.put(lens.getIdentifier(), lens);\n\n\t\tfor (Iterator<ISelector> di = lens.getDomainSet().iterator(); di.hasNext(); ) {\n\t\t\tISelector domain = di.next();\n\t\t\t// TODO other valid selector types may need to be integrated, such as FSE/SPARQL selectors\n\t\t\tif (domain instanceof InstanceSelector) {\n\t\t\t\tInstanceSelector is = (InstanceSelector) domain;\n\t\t\t\tLensMatchSet lms = this._instanceLensMatches.getMatch(is.getInstance());\n\t\t\t\tif (null == lms) {\n\t\t\t\t\tlms = new LensMatchSet(is.getInstance());\n\t\t\t\t}\n\t\t\t\tlms.add(lens);\n\t\t\t\tthis._instanceLensMatches.putMatch(is.getInstance(), lms);\n\t\t\t}\n\t\t}\n\t}",
"public List<ServiceInstance> lookupInstances(String serviceName);",
"protected void addInstance(T instance) {\n this.instances.add(instance);\n this.nextID++;\n }",
"public void buildInstanceList(){\n ArrayList<Pipe> pipeList = new ArrayList<Pipe>();\n\n pipeList.add( new SaveDataInSource() );\n pipeList.add( new Input2CharSequence(\"STRING\") );\n pipeList.add (new CharSequence2TokenSequence());\n pipeList.add( new TokenSequenceNGrams(gramSizes) );\n pipeList.add( new TokenSequence2FeatureSequenceWithBigrams() );\n \n Pipe instancePipe = new SerialPipes(pipeList);\n this.instances = new InstanceList (instancePipe);\n \n ArrayList<Instance> ai = new ArrayList<Instance>();\n for(Post p: posts){\n \tInstance i = new Instance(p.preprocessedText, null, p.id, null);\n \ti.setSource(p.id);\n \tai.add(i);\n }\n this.instances.addThruPipe(ai.iterator());\n \n // DEBUG OUTPUT\n //for (int i=0; i< this.instances.size(); ++i){\n //\tSystem.out.printf(\"\\nName: %s\\n\", this.instances.get(i).getName());\n //\tSystem.out.printf(\"Label: %s\\n\", this.instances.get(i).getLabeling());\n //\tSystem.out.printf(\"Data: %s\", this.instances.get(i).getData());\n //\tSystem.out.printf(\"Source: %s\\n\", this.instances.get(i).getSource());\n //}\n\t}",
"@Nullable\n\t@Override\n\tpublic List<Instance> discover(@Nullable Predicate<? super String> applicationIdFilter, @Nullable Predicate<? super Instance> instanceFilter) {\n\t\tlog.debug(\"We have {} targets configured\", this.promregatorConfiguration.getTargets().size());\n\t\t\n\t\tList<ResolvedTarget> resolvedTargets = this.targetResolver.resolveTargets(this.promregatorConfiguration.getTargets());\n\t\tif (resolvedTargets == null) {\n\t\t\tlog.warn(\"Target resolved was unable to resolve configured targets\");\n\t\t\treturn Collections.emptyList();\n\t\t}\n\t\tlog.debug(\"Raw list contains {} resolved targets\", resolvedTargets.size());\n\t\t\n\t\tList<Instance> instanceList = this.appInstanceScanner.determineInstancesFromTargets(resolvedTargets, applicationIdFilter, instanceFilter);\n\t\tif (instanceList == null) {\n\t\t\tlog.warn(\"Instance Scanner unable to determine instances from provided targets\");\n\t\t\treturn Collections.emptyList();\n\t\t}\n\t\tlog.debug(\"Raw list contains {} instances\", instanceList.size());\n\n\t\t// ensure that the instances are registered / touched properly\n\t\tfor (Instance instance : instanceList) {\n\t\t\tthis.registerInstance(instance);\n\t\t}\n\t\t\n\t\treturn instanceList;\n\t}",
"public void addInstance(Instance inst) {\n this.instanceMap.put(inst.getName(), inst);\n }",
"public Set getInstances(Class extensionPoint){\n if(extensionPoint == null) throw new NullPointerException(\"NULL extension point not permitted\");\n Set instances = new LinkedHashSet();\n if(extensions == null){\n initialize();\n }\n Collection<Class> classes = extensions.get(extensionPoint);\n for (Class cl: classes) {\n\n //instances.add(injector.getInstance(cl));\n try {\n instances.add(cl.newInstance());\n } catch (Exception e) {\n throw new RuntimeException(\"Unable to create plugin instance : \" + cl.getName(), e);\n }\n\n }\n return instances;\n }",
"public LbInstances addLbInstances() throws JNCException {\n LbInstances lbInstances = new LbInstances();\n this.lbInstances = lbInstances;\n insertChild(lbInstances, childrenNames());\n return lbInstances;\n }",
"static List<ProviderInfo> convertInstancesToProviders(List<Instance> allInstances) {\n List<ProviderInfo> providerInfos = new ArrayList<ProviderInfo>();\n if (CommonUtils.isEmpty(allInstances)) {\n return providerInfos;\n }\n\n for (Instance instance : allInstances) {\n String url = convertInstanceToUrl(instance);\n ProviderInfo providerInfo = ProviderHelper.toProviderInfo(url);\n providerInfos.add(providerInfo);\n }\n return providerInfos;\n }",
"public void testOrder () {\n addInstances (INSTANCES);\n\n if (INSTANCES[0] != lookup.lookup (INSTANCES[0].getClass ())) {\n fail (\"First object in intances not found\");\n }\n\n Iterator<?> all = lookup.lookupAll(Object.class).iterator();\n checkIterator (\"Difference between instances added and found\", all, Arrays.asList (INSTANCES));\n }",
"public void addInstancesToInstaceGroup(\n String zone, String instanceGroupName, List<InstanceReference> instances) throws IOException {\n if (instances != null && !CollectionUtils.isEmpty(instances)) {\n InstanceGroupsAddInstancesRequest request = new InstanceGroupsAddInstancesRequest();\n request.setInstances(instances);\n log.debug(\"Adding instances \" + instances + \"to instance group \" + instanceGroupName);\n Operation response =\n compute\n .instanceGroups()\n .addInstances(project, zone, instanceGroupName, request)\n .execute();\n operationPoller.waitForOperationCompletion(response);\n log.info(\"Sucessfully added instances to instance group: \" + instanceGroupName);\n }\n }",
"public void initInstances() {\n this.add(new LQFBInstance(liqoidApplication, \"PP Deutschland\", \"DE_PIRATEN_BUND_2\",\n \"Piraten Deutschland\",\n \"https://lqfb.piratenpartei.de/api/\",\n \"https://lqfb.piratenpartei.de/lf/\",\n \"anonymous\", LQFBInstance.API2));\n this.add(new LQFBInstance(liqoidApplication, \"PP Österreich\", \"AT_PIRATEN_BUND_2\",\n \"Piraten Österreich\",\n \"http://88.198.24.116:25520/\",\n \"http://lqfb.piratenpartei.at/\",\n \"anonymous\", LQFBInstance.API2));\n /*\n this.add(new LQFBInstance(liqoidApplication, \"PP Berlin\", \"DE_PIRATEN_BE\",\n \"Piraten Berlin\",\n \"https://lqpp.de/be/api/\",\n \"https://lqpp.de/be/\", \"Y5jJ3mzf9MN23Q7zRpWs\", LQFBInstance.API1));\n */\n\n /* this.add(new LQFBInstance(liqoidApplication, \"PP BB\", \"DE_PIRATEN_BB\",\n \"Piraten Brandenburg\",\n \"https://lqpp.de/bb/api/\",\n \"https://lqpp.de/bb/\", \"5vvw7LD6P5FShL4yFNQK\", LQFBInstance.API1));\n*/\n this.add(new LQFBInstance(liqoidApplication, \"PP HS\", \"DE_PIRATEN_HS\",\n \"Piraten Hessen\",\n \"https://lqfb.piratenpartei-hessen.de/api/\",\n \"https://lqfb.piratenpartei-hessen.de/\", \"B8xrGhySfKXTFXpqJxYZ\", LQFBInstance.API1));\n// \"MjXNjRD3qSYbgjKrhYgC\"\n /* this.add(new LQFBInstance(liqoidApplication, \"PP MV\", \"DE_PIRATEN_MV\",\n \"Piraten Mecklenburg-Vorpommern\",\n \"https://lqpp.de/mv/api/\",\n \"https://lqpp.de/mv/\",\n \"VpmyJGYbqTQPcc9wyzzk\", LQFBInstance.API2));*/\n\n /* this.add(new LQFBInstance(liqoidApplication, \"PP NRW\", \"DE_PIRATEN_NRW\",\n \"Piraten Nordrhein-Westfalen\",\n \"https://lqpp.de/nw/api/\",\n \"https://lqpp.de/nw/\",\n \"pxzcNHJWMNKRs5Kr3HnX\", LQFBInstance.API1));*/\n /*\n this.add(new LQFBInstance(liqoidApplication, \"PP LSA\", \"DE_PIRATEN_LSA\",\n \"Piraten Sachsen-Anhalt 2\",\n \"http://api.lqfb.piraten-lsa.de/\",\n \"http://lqfb.piraten-lsa.de/lsa/\",\n \"anonymous\", LQFBInstance.API2));*/\n\n this.add(new LQFBInstance(liqoidApplication, \"PP HH\", \"HH\",\n \"Piraten Hamburg\",\n \"https://lqpp.de/hh/api/\",\n \"https://lqpp.de/hh/\",\n \"\", LQFBInstance.API1));\n this.add(new LQFBInstance(liqoidApplication, \"PP NDS\", \"DE_PIRATEN_NDS\",\n \"Piraten NDS\",\n \"https://lqpp.de/ni/api/\",\n \"https://lqpp.de/ni/\",\n \"\", LQFBInstance.API1));\n //YJNdCRv64rRyb3DkW8XH\n /* this.add(new LQFBInstance(liqoidApplication, \"HSG Potsdam\", \"DE_HSG_Potsdam\",\n \"Hochschulgr. Potsdam\",\n \"http://potsdam.lquni.de/api/\",\n \"http://potsdam.lquni.de/\",\n \"YJNdCRv64rRyb3DkW8XH\", LQFBInstance.API1));*/\n this.add(new LQFBInstance(liqoidApplication, \"Test LF2\", \"DE_LF_TEST_2\",\n \"LQFB Test 2\",\n \"http://apitest.liquidfeedback.org:25520/\",\n \"http://dev.liquidfeedback.org/lf2/\",\n \"anonymous\", LQFBInstance.API2));\n\n }",
"public Collection<Instance> getInstances() {\n return instanceMap.values();\n }",
"public void inject() {\n beans.entrySet().forEach(bean -> {\n try {\n injectBeanInstance(bean.getKey(), bean.getValue().getInstance());\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n });\n }",
"private Collection getInstances() {\n \t\tCollection instances=null;\r\n\r\n //instances = cls.getInstances();\r\n \t\tRDFProperty ready = owlModel.getRDFProperty(oTab.namespacePrefix + \":\" + oTab.pReady);\r\n\r\n \t\tif ( ready != null )\r\n \t\t{\r\n \t\t\tinstances = owlModel.getRDFResourcesWithPropertyValue(ready, true);\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\tSystem.out.println(\"*** Could not lookup property defintion for \" + oTab.namespacePrefix + \":\" + oTab.pReady + \" Ontology not imported\");\r\n \t\t}\r\n\r\n return instances;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
process an end of execution notification for a request r previously submitted. Contract prer != null posttrue// no postcondition. | @Override
public void acceptRequestTerminationNotification(RequestI r)
throws Exception
{
assert r != null ;
if (RequestGenerator.DEBUG_LEVEL == 2) {
this.logMessage("Request generator " + this.rgURI +
" is notified that request "+ r.getRequestURI() +
" has ended.") ;
}
} | [
"public boolean postExecute() throws Exception{\n if (!commitResponsePhase.getAndSet(true)){\n processorTask.postResponse();\n processorTask.postProcess();\n processorTask.terminateProcess();\n\n // De-reference so under stress we don't have a simili leak.\n processorTask = null;\n return false;\n }\n return false;\n }",
"public void finishRequest ()\r\n\t{\r\n\t\tthis.simTime = this.sim.getTimer();\r\n\t\t//Debug/System.out.println(Fmt.time(this.simTime)\r\n\t\t//Debug/\t+ \": <finishRequest> \" + this.request);\r\n\r\n\t\t//\tRemove request from the queue.\r\n\t\tthis.removeRequest();\r\n\t\t//\tGet the next request from the queue.\r\n\t\tthis.nextRequest();\r\n\t\t//\tIf there is one, process it.\r\n\t\t//\tIf not, then the next request scheduled will begin immediately.\r\n\t\tif (this.request != null) this.procRequest();\r\n\t}",
"default void onResendRequestSatisfied(SessionID sessionID, int beginSeqNo, int endSeqNo) {\n }",
"protected void onEndRequest()\n\t{\n\t}",
"public HttpResponse postProcess(HttpRequest request, HttpResponse response){\n\t\treturn null;\n\t}",
"PostCondition getPostCondition();",
"public synchronized void postRequest (final Runnable r, boolean wait) {\n if (releaseOn) return;\n //if (requestorThread != null) S ystem.out.println (\"Waiting \" + r); // NOI18N\n synchronized (LOCK) {\n if (requestorThread != null)\n try {\n LOCK.wait ();\n if (releaseOn) return;\n } catch (InterruptedException e) {\n }\n (requestorThread = new Thread (\"Request \" + r + \" thread\") { // NOI18N\n public void run () {\n synchronized (LOCK) {\n //S ystem.out.println (\"Start \" + r); // NOI18N\n lastStart = System.currentTimeMillis ();\n try {\n r.run ();\n } catch (Throwable e) {\n //e.printStackTrace ();\n }\n //t = System.currentTimeMillis () - lastStart;\n requestorThread = null;\n //S ystem.out.println (\"End \" + r + \" time: \" + t); // NOI18N\n LOCK.notify ();\n }\n }\n }).start ();\n try {\n if (wait) LOCK.wait ();\n } catch (InterruptedException e) {\n }\n } // synchronized LOCK end\n }",
"public void onExecutionEnd();",
"protected synchronized void finalResultIsSent() {\r\n\t\tfinalResultsToDo--;\r\n\t\tlogger.log(Level.INFO, \"thread \" + Thread.currentThread().getId() + \" called finalResultIsSent; finalResultsToDo=\"+finalResultsToDo);\r\n\t\tif(finalResultsToDo <= 0) {\r\n\t\t\t// report final result to observers\r\n\t\t\tlogger.log(Level.INFO, Services.getFilterPassingLogPrefix()+ \"Sent all final results. Notifying observers...\");\r\n\t\t\tVectorData dummy = new VectorData(); // dummy data to avoid null pointer exception in Peers::processMpcEvent\r\n\t\t\tFinalResultEvent finalResultEvent;\r\n\t\t\tfinalResultEvent = new FinalResultEvent(this, myAlphaIndex, getMyPeerID(), getMyPeerID(), dummy);\r\n\t\t\tfinalResultEvent.setVerificationSuccessful(true);\r\n\t\t\tsendNotification(finalResultEvent);\r\n\t\t\t// check if there are more time slots to process\r\n\t\t\tif(currentTimeSlot < timeSlotCount) {\r\n\t\t\t\tcurrentTimeSlot++;\r\n\t\t\t\tlogger.log(Level.INFO, \"thread \" + Thread.currentThread().getId() + \" increased currentTimeSlot to \"+currentTimeSlot+\", will init new round now...\");\r\n\t\t\t\tinitializeNewRound();\r\n\t\t\t} else {\r\n\t\t\t\tlogger.log(Level.INFO, \"No more data available... Stopping protocol threads...\");\r\n\t\t\t\tprotocolStopper.setIsStopped(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"void finish(Request request);",
"protected abstract boolean terminatedCondition(Object estimatedParameter, Object currentParameter, Object previousParameter, Object... info);",
"private void resendWorkaround() {\r\n synchronized(waiters) {\r\n if(waiters.size() > 0 && lastResponseNumber == responseNumber && System.currentTimeMillis() - lastProcessedMillis > 450) {\r\n // Resend last request(s)\r\n for(Integer i : waiters.keySet()) {\r\n System.err.println(Thread.currentThread() + \": Resending: $\" + i + \"-\" + waiters.get(i));\r\n writer.println(\"$\" + i + \"-\" + waiters.get(i));\r\n writer.flush();\r\n lastProcessedMillis = System.currentTimeMillis();\r\n }\r\n }\r\n }\r\n }",
"protected void checkEndOfRequest(Request req) {\n if (req.isFinished()) {\n requests.remove(req.getCorrelationId());\n if (req.getBean() != bean) {\n ReflectionUtils.callLifecycleMethod(req.getBean(), PreDestroy.class);\n }\n }\n }",
"public void processReturnShipment() {\n \n }",
"@Override\n protected void finalize() throws Throwable {\n if(!mFinished) {\n finish(\"Request on the loose\", \"\");\n e(\"\", \"Marker log finalized without finish() - uncaught exit point for request\");\n\n }\n }",
"@Override\n\tpublic void postLast(@Async.Schedule Runnable runnable) {\n\t\tif (CHECKS) Reactor.checkInReactorThread(this);\n\t\tlocalTasks.addLast(runnable);\n\t}",
"void postJobExecutionEvent(JobExecutionEvent jobExecutionEvent);",
"void onRuleExecutorExit(final RuleInfo ruleInfo);",
"protected boolean handleContractEndReport(ContractEnd contractEnd) {\r\n\t\treturn false;\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if all the component of a CartesianQuantity are greater or equal than the given value. | public boolean isCartesianQuantityGreaterEqualThan(iiwa_msgs.CartesianQuantity quantity, int value) {
return (quantity.getX() >= value && quantity.getY() >= value && quantity.getZ() >= value && quantity.getA() >= value && quantity.getB() >= value && quantity.getC() >= value);
} | [
"public boolean isCartesianQuantityGreaterThan(iiwa_msgs.CartesianQuantity quantity, int value) {\n return (quantity.getX() > value && quantity.getY() > value && quantity.getZ() > value && quantity.getA() > value && quantity.getB() > value && quantity.getC() > value);\n }",
"public boolean isJointQuantityGreaterEqualThan(iiwa_msgs.JointQuantity quantity, int value) {\n return (quantity.getA1() >= value && quantity.getA2() >= value && quantity.getA3() >= value && quantity.getA4() >= value && quantity.getA5() >= value\n && quantity.getA6() >= value && quantity.getA7() >= value);\n }",
"public boolean isJointQuantityGreaterThan(iiwa_msgs.JointQuantity quantity, int value) {\n return (quantity.getA1() > value && quantity.getA2() > value && quantity.getA3() > value && quantity.getA4() > value && quantity.getA5() > value && quantity.getA6() > value && quantity\n .getA7() > value);\n }",
"public abstract boolean hasSufficientItems(Stack<BigDecimal> values);",
"@Test\n public void givenValuesAsOneYardAnd3Feet_whenCompare_ShouldReturnTrue() {\n QuantityMeasurement valueInYards = new QuantityMeasurement(AllUnitsToUse.UnitConverter.YARDS,1.0);\n QuantityMeasurement valuesInFeet = new QuantityMeasurement(AllUnitsToUse.UnitConverter.FEET,3.0);\n boolean compareCheck = valueInYards.checkCompare(valuesInFeet);\n Assert.assertTrue(compareCheck);\n }",
"@Test\n public void givenValuesAsThreeFeetAndOneYard_whenCompare_ShouldReturnTrue() {\n QuantityMeasurement valuesInFeet = new QuantityMeasurement(AllUnitsToUse.UnitConverter.FEET,3.0);\n QuantityMeasurement valueInYards = new QuantityMeasurement(AllUnitsToUse.UnitConverter.YARDS,1.0);\n boolean compareCheck = valuesInFeet.checkCompare(valueInYards);\n Assert.assertTrue(compareCheck);\n }",
"public final boolean greaterThan() {\n\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tif (secondTopMostValue > topMostValue) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"boolean [][] biggerThan(double [][] matrix, double value) {\n\t\tboolean [][] equals = new boolean[matrix.length][matrix[0].length];\n\t\tfor (int i = 0; i < matrix.length; i++) {\n\t\t\tfor (int j = 0; j < matrix[0].length; j++) {\n\t\t\t\tequals[i][j] = Double.compare(matrix[i][j], value) == 1;\n\t\t\t}\n\t\t}\n\t\treturn equals;\n\t}",
"public boolean checkQuantity(Integer numToRemove) {\n return this.quantity >= numToRemove;\n }",
"public final StepCondition greaterOrEquals(NumericFieldInfo<N> value) {\n return LeafStepCondition.stepCondition(greaterOrEqualsMetadata(metadata, value), getFunction(), value,\n (l, r) -> greaterOrEqualsFunction().apply(l, r));\n }",
"@Test\n public void given1GallonAnd3point78Liter_whenCompare_shouldReturnTrue(){\n QuantityMeasurement valueInLiter = new QuantityMeasurement(AllUnitsToUse.UnitConverter.LITER,3.785);\n QuantityMeasurement valueInGallon = new QuantityMeasurement(AllUnitsToUse.UnitConverter.GALLON,1.0);\n boolean check = valueInLiter.checkCompare(valueInGallon);\n Assert.assertTrue(check);\n }",
"public final StepCondition greaterOrEquals(N value) {\n return LeafStepCondition.stepCondition(greaterOrEqualsMetadata(metadata, value), getFunction(), value,\n (l, r) -> greaterOrEqualsFunction().apply(l, r));\n }",
"public boolean isSetQuantity()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(QUANTITY$10) != 0;\n }\n }",
"private boolean isCoin(double value) {\n\t\tdouble[] possibleCoin = {1, 2, 5, 10};\n\t\tfor (double coinValue : possibleCoin) {\n\t\t\tif (value == coinValue) return true;\n\t\t}\n\t\treturn false;\n\t}",
"@Test\n public void given2InchesAnd5Cm_whenCompare_shouldEqualsTrue(){\n QuantityMeasurement valueInFInches = new QuantityMeasurement(AllUnitsToUse.UnitConverter.CENTIMETER,5.0);\n QuantityMeasurement valueInCm = new QuantityMeasurement(AllUnitsToUse.UnitConverter.INCHES,2.0);\n boolean check = valueInFInches.checkCompare(valueInCm);\n Assert.assertTrue(check);\n }",
"public boolean areExpectedAndActualSubTotalPricesEqual() {\n return getShoppingCartProductsContainer().calculateExpectedSubTotalPrice().equals(getActualSubTotalPrice());\n }",
"private boolean ValidMax(double value){\r\n\t\treturn value > this._minValue;\r\n\t}",
"private boolean checkValidQuantity (int quantity){\n if (quantity >= 0){\n return true;\n }\n return false;\n }",
"private boolean isSquareQuantityValid() {\n int blueSquares = 0;\n int yellowSquares = 0;\n int greenSquares = 0;\n int whiteSquares = 0;\n int orangeSquares = 0;\n int redSquares = 0;\n\n for (RubiksFace face : rubiksFaceList) {\n for (RubiksColor color : face.getRubiksColors()) {\n switch(color) {\n case RED:\n redSquares++;\n break;\n case GREEN:\n greenSquares++;\n break;\n case BLUE:\n blueSquares++;\n break;\n case YELLOW:\n yellowSquares++;\n break;\n case ORANGE:\n orangeSquares++;\n break;\n case WHITE:\n whiteSquares++;\n break;\n }\n }\n }\n\n System.out.println(\"BLUE: \" + blueSquares);\n System.out.println(\"YELLOW: \" + yellowSquares);\n System.out.println(\"GREEN: \" + greenSquares);\n System.out.println(\"WHITE: \" + whiteSquares);\n System.out.println(\"ORANGE: \" + orangeSquares);\n System.out.println(\"RED: \" + redSquares);\n\n return (blueSquares == 9 && yellowSquares == 9 && greenSquares == 9 && whiteSquares == 9 && orangeSquares == 9 && redSquares == 9);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Are subselects supported as the lefthandside (LHS) of INpredicates. In other words, is syntax like "... IN (1, 2, 3) ..." supported? | public boolean supportsSubselectAsInPredicateLHS(); | [
"Expr getExpr_in();",
"Subquery some();",
"private AbstractExpression optimizeInExpressions(AbstractExpression expr) {\n ExpressionType exprType = expr.getExpressionType();\n if (ExpressionType.CONJUNCTION_AND == exprType || ExpressionType.CONJUNCTION_OR == exprType) {\n AbstractExpression optimizedLeft = optimizeInExpressions(expr.getLeft());\n expr.setLeft(optimizedLeft);\n AbstractExpression optimizedRight = optimizeInExpressions(expr.getRight());\n expr.setRight(optimizedRight);\n return expr;\n }\n\n if (ExpressionType.COMPARE_EQUAL != exprType) {\n return expr;\n }\n\n assert(expr instanceof ComparisonExpression);\n if (((ComparisonExpression)expr).getQuantifier() != QuantifierType.ANY) {\n return expr;\n }\n\n /*\n * Verify that an IN expression can be safely converted to an EXISTS one\n * IN (SELECT\" forms e.g. \"(A, B) IN (SELECT X, Y, FROM ...) =>\n * EXISTS (SELECT 42 FROM ... AND|WHERE|HAVING A=X AND|WHERE|HAVING B=Y)\n */\n AbstractExpression inColumns = expr.getLeft();\n if (inColumns instanceof SelectSubqueryExpression) {\n // If the left child is a (SELECT ...) expression itself we can't convert it\n // to the EXISTS expression because the mandatory run time scalar check -\n // (expression must return a single row at most)\n return expr;\n }\n\n // The right hand operand of the equality operation must be a SELECT statement\n AbstractExpression rightExpr = expr.getRight();\n if (!(rightExpr instanceof SelectSubqueryExpression)) {\n return expr;\n }\n\n SelectSubqueryExpression subqueryExpr = (SelectSubqueryExpression) rightExpr;\n AbstractParsedStmt subquery = subqueryExpr.getSubqueryStmt();\n if (!(subquery instanceof ParsedSelectStmt)) {\n return expr;\n }\n\n ParsedSelectStmt selectStmt = (ParsedSelectStmt) subquery;\n\n // Must not have OFFSET or LIMIT set\n // EXISTS (select * from T where T.X = parent.X order by T.Y offset 10 limit 5)\n // seems to require 11 matches\n // parent.X IN (select T.X from T order by T.Y offset 10 limit 5)\n // seems to require 1 match that has exactly 10-14 rows (matching or not) with lesser or equal values of Y.\n if (selectStmt.hasLimitOrOffset()) {\n return expr;\n }\n\n ParsedSelectStmt.rewriteInSubqueryAsExists(selectStmt, inColumns);\n subqueryExpr.resolveCorrelations();\n AbstractExpression existsExpr = new OperatorExpression();\n existsExpr.setExpressionType(ExpressionType.OPERATOR_EXISTS);\n existsExpr.setLeft(subqueryExpr);\n return optimizeExistsExpression(existsExpr);\n }",
"public boolean supportsSubqueriesInIns()\n throws SQLException\n {\n return false;\n }",
"Condition in(QueryParameter parameter, Object... values);",
"public boolean supportsSubqueriesInIns() throws SQLException {\n return true;\n }",
"Subquery any();",
"<T> Subquery<T> any(Subquery<T> subquery);",
"HistoryQuery custom2In(String... custom2);",
"public static InSubQueryExpressionElement in(final String property, final SelectCommonSupplier subQuery) {\n return new InSubQueryExpressionElement(property, subQuery.sql());\n }",
"HistoryQuery custom1In(String... custom1);",
"private String getWhereSubquery() {\n String sql = jam.getWhereClause(paramsWithoutData, tableType);\n\n if (!sql.isEmpty()) {\n sql += \"and \";\n }\n\n sql += quote(ANALYTICS_TBL_ALIAS, DX) + \" in (\" + getSubexpressionDataElementList() + \") \";\n\n return sql;\n }",
"@Test\n public void testSubqueries()\n {\n String query = \"SELECT id, val OVER w \" +\n \" FROM (VALUES \" +\n \" (1, 100), \" +\n \" (2, 200), \" +\n \" (3, 300), \" +\n \" (4, 400) \" +\n \" ) t(id, value) \" +\n \" WINDOW w AS ( \" +\n \" ORDER BY id \" +\n \" MEASURES %s AS val \" +\n \" ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING \" +\n \" AFTER MATCH SKIP TO NEXT ROW \" +\n \" PATTERN (A+) \" +\n \" DEFINE A AS %s \" +\n \" )\";\n\n assertThat(assertions.query(format(query, \"(SELECT 'x')\", \"(SELECT true)\")))\n .matches(\"VALUES \" +\n \" (1, 'x'), \" +\n \" (2, 'x'), \" +\n \" (3, 'x'), \" +\n \" (4, 'x') \");\n\n // subquery nested in navigation\n assertThat(assertions.query(format(query, \"LAST(A.value + (SELECT 1000))\", \"FIRST(A.value < 0 OR (SELECT true))\")))\n .matches(\"VALUES \" +\n \" (1, 1400), \" +\n \" (2, 1400), \" +\n \" (3, 1400), \" +\n \" (4, 1400) \");\n\n // IN-predicate: value and value list without column references\n assertThat(assertions.query(format(query, \"LAST(A.id < 0 OR 1 IN (SELECT 1))\", \"FIRST(A.id > 0 AND 1 IN (SELECT 1))\")))\n .matches(\"VALUES \" +\n \" (1, true), \" +\n \" (2, true), \" +\n \" (3, true), \" +\n \" (4, true) \");\n\n // IN-predicate: unlabeled column reference in value\n assertThat(assertions.query(format(query, \"LAST(id + 50 IN (SELECT 100))\", \"LAST(id NOT IN (SELECT 100))\")))\n .matches(\"VALUES \" +\n \" (1, false), \" +\n \" (2, false), \" +\n \" (3, false), \" +\n \" (4, false) \");\n\n // EXISTS-predicate\n assertThat(assertions.query(format(query, \"LAST(A.value < 0 OR EXISTS(SELECT 1))\", \"FIRST(A.value < 0 OR EXISTS(SELECT 1))\")))\n .matches(\"VALUES \" +\n \" (1, true), \" +\n \" (2, true), \" +\n \" (3, true), \" +\n \" (4, true) \");\n\n // no pattern measures\n assertThat(assertions.query(\"SELECT id, max(value) OVER w \" +\n \" FROM (VALUES \" +\n \" (1, 100), \" +\n \" (2, 200), \" +\n \" (3, 300), \" +\n \" (4, 400) \" +\n \" ) t(id, value) \" +\n \" WINDOW w AS ( \" +\n \" ORDER BY id \" +\n \" ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING \" +\n \" AFTER MATCH SKIP TO NEXT ROW \" +\n \" PATTERN (A+) \" +\n \" DEFINE A AS (SELECT true) \" +\n \" )\"))\n .matches(\"VALUES \" +\n \" (1, 400), \" +\n \" (2, 400), \" +\n \" (3, 400), \" +\n \" (4, 400) \");\n }",
"<T> Subquery<T> some(Subquery<T> subquery);",
"public boolean supportsSubqueriesInComparisons()\n throws SQLException\n {\n return false;\n }",
"public boolean supportsSubqueriesInComparisons() throws SQLException {\n return true;\n }",
"Subquery all();",
"public static InSubQueryExpressionElement in(final String property, final SelectCommon subQuery) {\n return new InSubQueryExpressionElement(property, subQuery);\n }",
"public boolean supportsSubqueriesInQuantifieds()\n throws SQLException\n {\n return false;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use Availability.newBuilder() to construct. | private Availability(Builder builder) {
super(builder);
} | [
"Builder addAvailability(String value);",
"private ItemAvailability(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"Builder addAvailability(ItemAvailability value);",
"public void setAvailability(java.lang.String availability) {\r\n this.availability = availability;\r\n }",
"public void setAvailability(AreaAvailability availability){\n\t\tthis.availability = availability;\n\t}",
"public ImagingStudy setAvailability(BoundCodeDt<InstanceAvailabilityEnum> theValue) {\n\t\tmyAvailability = theValue;\n\t\treturn this;\n\t}",
"public Series setAvailability(BoundCodeDt<InstanceAvailabilityEnum> theValue) {\n\t\tmyAvailability = theValue;\n\t\treturn this;\n\t}",
"com.isaacsheff.charlotte.proto.AvailabilityAttestation getAvailabilityAttestation();",
"public void setAvailabilityId(String value)\n {\n availabilityId = value;\n }",
"public AreaAvailability getAvailability(){\n\t\treturn availability;\n\t}",
"public NameAvailabilityResponseInner() {\n }",
"void addListener( AvailabilityListener listener );",
"public AvailabilityData setName(String name) {\n this.name = name;\n return this;\n }",
"public AvailabilityInformation availabilityInformation() {\n return this.innerProperties() == null ? null : this.innerProperties().availabilityInformation();\n }",
"public String getAvailability() {\n\t\treturn availability;\n\t}",
"@NotNull public static TrainReservation.Builder trainReservation() { return new TrainReservation.Builder(new HashMap<String,Object>()); }",
"public interface Availability {\n\n /**\n * The names of the data sources backing this availability.\n *\n * @return A set of names for datasources backing this availability\n */\n Set<DataSourceName> getDataSourceNames();\n\n /**\n * The names of the data sources backing this availability as filtered by the constraint.\n *\n * @param constraint The constraint to filter data source names.\n *\n * @return A set of names for data sources backing this availability\n */\n default Set<DataSourceName> getDataSourceNames(PhysicalDataSourceConstraint constraint) {\n return getDataSourceNames((DataSourceConstraint) constraint);\n }\n\n /**\n * The names of the data sources backing this availability as filtered by the constraint.\n *\n * @param constraint The constraint to filter data source names.\n *\n * @return A set of names for data sources backing this availability\n */\n default Set<DataSourceName> getDataSourceNames(DataSourceConstraint constraint) {\n return getDataSourceNames();\n }\n\n /**\n * The availability of all columns.\n *\n * @return The intervals, by column name, available.\n */\n Map<String, SimplifiedIntervalList> getAllAvailableIntervals();\n\n /**\n * Fetch a {@link SimplifiedIntervalList} representing the coalesced available intervals on this availability.\n *\n * @return A <tt>SimplifiedIntervalList</tt> of intervals available\n */\n default SimplifiedIntervalList getAvailableIntervals() {\n return getAllAvailableIntervals().values().stream()\n .reduce(SimplifiedIntervalList::union)\n .orElse(new SimplifiedIntervalList());\n }\n\n /**\n *\n * Fetch a {@link SimplifiedIntervalList} representing the coalesced available intervals on this availability as\n * filtered by the {@link PhysicalDataSourceConstraint}.\n *\n * @param constraint <tt>PhysicalDataSourceConstraint</tt> containing\n * {@link com.yahoo.bard.webservice.table.Schema} and {@link ApiFilter}s\n *\n * @return A <tt>SimplifiedIntervalList</tt> of intervals available\n */\n default SimplifiedIntervalList getAvailableIntervals(PhysicalDataSourceConstraint constraint) {\n return getAvailableIntervals();\n }\n\n /**\n *\n * Fetch a {@link SimplifiedIntervalList} representing the coalesced available intervals on this availability as\n * filtered by the {@link DataSourceConstraint}.\n *\n * @param constraint <tt>PhysicalDataSourceConstraint</tt> containing\n * {@link com.yahoo.bard.webservice.table.Schema} and {@link ApiFilter}s\n *\n * @return A <tt>SimplifiedIntervalList</tt> of intervals available\n */\n default SimplifiedIntervalList getAvailableIntervals(DataSourceConstraint constraint) {\n return getAvailableIntervals();\n }\n}",
"AvailabilityDto readAvailability(DateRangeDto dateRangeDto);",
"private Reservation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the format to use for formatting a thread id element. | protected static final Format getThreadIdFormat ()
{
return new FixLengthFormat(
THREADID_LENGTH, FixLengthFormat.LEFT_PADDING);
} | [
"public static String stringRepresentationOfThreadID(long threadID){\n return String.format(\"%08X\", threadID);\n }",
"short getFormatId();",
"protected static final Format getThreadNameFormat ()\r\n {\r\n return new FixLengthFormat(\r\n CATEGORY_LENGTH, FixLengthFormat.LEFT_CUT_RIGHT_PADDING);\r\n }",
"public int getFormat_Id();",
"@Override\r\n public int getFormatId() {\r\n return formatID;\r\n }",
"protected static final Format getInstanceIdFormat ()\r\n {\r\n return new FixLengthFormat(\r\n INSTANCEID_LENGTH, FixLengthFormat.RIGHT_PADDING);\r\n }",
"String getFormat(Object elementID) throws Exception;",
"public Param getIdFormat() {\r\n return idFormat;\r\n }",
"public\tfinal int\tgetTypeFormatId()\t\n\t{\n\t\treturn formatId;\n\t}",
"String getThreadId();",
"@Override\n public String toString() {\n return String.format(\"Thread (TID: %d)\", getThreadId());\n }",
"String getFormattedId()\n {\n return String.format(\"%05d\", this.Id);\n }",
"public String getNameIdFormat() {\n return nameIdFormat;\n }",
"protected static final Format getNodeIdFormat ()\r\n {\r\n return new FixLengthFormat(\r\n NODEID_LENGTH, FixLengthFormat.LEFT_PADDING);\r\n }",
"public static int getThreadID() {\n return threadId.get();\n }",
"String getFormatter();",
"String getMessageFormat();",
"java.lang.String getTid();",
"@Override\r\n public String getFormat (Task task) {\r\n return processFormat(task, \r\n super.getFormat(task), \r\n task.getType().getPropertyId()+\"@format\");\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the values of each attribute as an array of doubles. | public double[] toDoubleArray() {
double[] newValues = new double[m_AttValues.length];
System.arraycopy(m_AttValues, 0, newValues, 0,
m_AttValues.length);
return newValues;
} | [
"public double[] getAttrDoubleArray(String name)\n{\n\treturn (double[])getAttr(name);\n}",
"public double[] getDoubles()\r\n {\r\n return resultDoubles;\r\n }",
"public double[] getAsDoubles() {\n return (double[])data;\n }",
"public double [] getAttributes(){\n return attributes;\n }",
"public double[] ds() {\n double rval[] = new double[size()];\n for (int i = 0; i < rval.length; i++) {\n rval[i] = get(i) == null ? Double.NaN : get(i).doubleValue();\n }\n\n return rval;\n }",
"private Data[] getDoubles(double value, int npoints, int nattributes)\n\t{\n\t\tData[] data = new Data[npoints];\n\t\tfor (int i = 0; i < npoints; i++)\n\t\t\tdata[i] = nattributes == 1 ? new DataDouble(value)\n\t\t: new DataArrayOfDoubles(new double[] { value, value });\n\t\t\treturn data;\n\t}",
"public abstract double[] toDoubleArray();",
"public abstract double[] getAsArray();",
"protected abstract double[] getDataAsArray();",
"public static double[] readDoubles() {\n return readAllDoubles();\n }",
"public abstract double[] asDoubleArray();",
"public double[] toDouble(){\n\t\tdouble[] out = new double[this.length];\n\t\tfor (int j = 0; j < this.length; j++){\n\t\t\tout[j] = this.x[j];\n\t\t}\n\t\treturn out;\n\t}",
"public double[] getDoubleValues() throws DicomException {\n\t\tdouble[] values = null;\n\t\tif (valueLength%FloatDoubleAttribute.bytesPerValue != 0) {\n\t\t\tthrow new DicomException(\"incorrect value length (\"+valueLength+\" dec) for UN as FD\");\n\t\t}\n\t\telse {\n\t\t\ttry {\n\t\t\t\tBinaryInputStream ibs = new BinaryInputStream(new ByteArrayInputStream(originalLittleEndianByteValues),false/*big endian*/);\n\t\t\t\tint vm=(int)(valueLength/FloatDoubleAttribute.bytesPerValue);\n\t\t\t\tvalues=new double[vm];;\n\t\t\t\tfor (int j=0; j<vm; ++j) {\n\t\t\t\t\tvalues[j] = ibs.readDouble();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (IOException e) {\n\t\t\t\tslf4jlogger.error(\"\", e);\n\t\t\t\tthrow new DicomException(e.toString());\n\t\t\t}\n\t\t}\n\t\treturn values;\n\t}",
"public double[] getValues(){\n return new double[]{this.getX(),this.getY()};\n }",
"public double[] getValues(String nodeType, String fieldName)\r\n {\r\n\tfinal int index = getAttributes(nodeType).getAttributeIndex(fieldName);\r\n\treturn getValues(nodeType, index);\r\n }",
"static FastVector attributeValues(Instances instances,Attribute attribute){\n\t\t\t\n\t\tFastVector rvals = new FastVector();\n\n\t\tif (attribute.isNumeric()){\n\t\t\tdouble[] rdouble = instances.attributeToDoubleArray(attribute.index());\n\t\t\tfor(int i = 0;i < rdouble.length;i++){\n\t\t\t\trvals.addElement(rdouble[i]);\n\t\t\t}\n\t\t}else if (attribute.isNominal()){\n\t\t\tfor(int i = 0;i < instances.numInstances();i++){\n\t\t\t\tInstance instance = instances.instance(i);\n\t\t\t\tString value = instance.toString(attribute);\n\t\t\t\trvals.addElement(value);\n\t\t\t}\n\t\t}else if (attribute.isString()){\n\t\t\tfor(int i = 0;i < instances.numInstances();i++){\t\t\n\t\t\t\tInstance instance = instances.instance(i);\n\t\t\t\tString value = instance.stringValue(attribute); \n\t\t\t\trvals.addElement(value);\n\t\t\t}\n\t\t}\n\t\treturn(rvals); \n\t}",
"@Override\n public double[] getDoubles(String name)\n {\n double[] result = null;\n String value[] = getParam(name);\n if (value != null)\n {\n result = new double[value.length];\n for (int i = 0; i < value.length; i++)\n {\n Number number = parseNumber(value[i]);\n result[i] = (number == null ? 0.0 : number.doubleValue());\n }\n }\n return result;\n }",
"public Double getDoubleAttribute();",
"public double[] getRealsArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(REALS$16, targetList);\r\n double[] result = new double[targetList.size()];\r\n for (int i = 0, len = targetList.size() ; i < len ; i++)\r\n result[i] = ((org.apache.xmlbeans.SimpleValue)targetList.get(i)).getDoubleValue();\r\n return result;\r\n }\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Logger for SAML messages and events | @Bean
public SAMLDefaultLogger samlLogger() {
return new SAMLDefaultLogger();
} | [
"protected void logSuccess() {\n String nameToLog = null;\n if (loggedAttributeId != null && attributeContext != null) {\n final IdPAttribute attrToLog = attributeContext.getIdPAttributes().get(loggedAttributeId);\n if (attrToLog != null && !attrToLog.getValues().isEmpty()) {\n nameToLog = attrToLog.getValues().get(0).getDisplayValue();\n }\n }\n \n if (nameToLog == null && samlAuthnContext.getSubject() != null\n && samlAuthnContext.getSubject().getNameID() != null) {\n nameToLog = samlAuthnContext.getSubject().getNameID().getValue();\n }\n\n log.info(\"{} SAML authentication succeeded for '{}'\", getLogPrefix(), nameToLog);\n }",
"private static void defineLogger() {\n HTMLLayout layout = new HTMLLayout();\n DailyRollingFileAppender appender = null;\n try {\n appender = new DailyRollingFileAppender(layout, \"/Server_Log/log\", \"yyyy-MM-dd\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n logger.addAppender(appender);\n logger.setLevel(Level.DEBUG);\n }",
"private void configureLogger() {\r\n PatternLayout layout = new PatternLayout();\r\n layout.setConversionPattern(\"%X{user-name} %X{session-id} %-7p %d [%t] %c %x - %m%n\");\r\n\r\n // creates console appender\r\n ConsoleAppender consoleAppender = new ConsoleAppender();\r\n consoleAppender.setLayout(layout);\r\n consoleAppender.activateOptions();\r\n\r\n logger.addAppender(consoleAppender);\r\n\r\n\r\n /*\r\n before you start processing the user request, place the actual user-name and session-id in the context(MDC)\r\n */\r\n MDC.put(\"user-name\", userName);\r\n MDC.put(\"session-id\", sessionId);\r\n\r\n /*\r\n OBS: in case of Servlets, one can setup this info using a Filter, such as\r\n\r\n @Override\r\n\t public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {\r\n try {\r\n\t\t\t MDC.put(\"user-name\", \"John Doe\");\r\n chain.doFilter(request, response);\r\n } finally {\r\n MDC.remove(\"userName\");\r\n }\r\n }\r\n */\r\n }",
"private void configureLogger() {\n\t\tBindingProvider provider = this.getPortAsProvider();\n\t\tif (provider != null) {\n\t\t\tWebServiceHelper.addMessageLogger(provider, this.soapMessageLogger);\n\t\t\tthis.soapMessageLogger.setLogInbound(this.logInboundMessages);\n\t\t\tthis.soapMessageLogger.setLogOutbound(this.logOutboundMessages);\n\t\t}\n\t}",
"protected void logConfigMessages(){\n //log a message\n mLogger.log(\"Transfer Implementation loaded for Stage-In [\" +\n mTXStageInImplementation.getDescription() + \"]\",\n LogManager.CONFIG_MESSAGE_LEVEL);\n mLogger.log(\"Transfer Implementation loaded for symbolic linking Stage-In [\" +\n mTXSymbolicLinkImplementation.getDescription() + \"]\",\n LogManager.CONFIG_MESSAGE_LEVEL);\n mLogger.log(\"Transfer Implementation loaded for Inter Site [\" +\n mTXInterImplementation.getDescription() + \"]\",\n LogManager.CONFIG_MESSAGE_LEVEL);\n mLogger.log(\"Transfer Implementation loaded for Stage-Out [\" +\n mTXStageOutImplementation.getDescription() + \"]\",\n LogManager.CONFIG_MESSAGE_LEVEL);\n\n }",
"@Before\n public void createLogFiles() {\n final String startMessage = \"begin testing \" + name.getMethodName();\n LogHelper.INSTANCE.debug(startMessage);\n LogHelper.INSTANCE.info(ApplicationMsgs.MESSAGE_AUDIT, startMessage);\n LogHelper.INSTANCE.logMetrics(startMessage);\n LogHelper.INSTANCE.logAuditSuccess(startMessage);\n }",
"public void enableLogging();",
"LogContext getLogContext();",
"EmailLogRenderer registerLogger(Logger logger);",
"public void setupLogging() {\n\t\ttry {\n\t\t\t_logger = Logger.getLogger(QoSModel.class);\n\t\t\tSimpleLayout layout = new SimpleLayout();\n\t\t\t_appender = new FileAppender(layout,_logFileName+\".txt\",false);\n\t\t\t_logger.addAppender(_appender);\n\t\t\t_logger.setLevel(Level.ALL);\n\t\t\tSystem.setOut(createLoggingProxy(System.out));\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void doLogging() {\n\t}",
"public interface IGenericLogger {\n /**\n * Create a timer event and register it with the logger.\n * \n * @param name\n * The name of the timer event.\n * @return The new ITimerEvent instance.\n */\n public ITimerEvent makeTimerEvent(String name);\n\n /**\n * Create a bookmark event and register it with the logger.\n * \n * @param name\n * The name of the bookmark event.\n * @return The new IBookmarkEvent instance.\n */\n public IBookmarkEvent makeBookmarkEvent(String name);\n\n /*\n * Create a timer event which can occur in multiple feedlets at the same\n * time and register it with the logger.\n * \n * FIXME: turned off for 1.0.3 release because still not entirely stable\n * \n * @param name The name of the timer event. @return The new ITimerEvent\n * instance.\n */\n // public ITimerEvent makePerFeedletTimerEvent(String name);\n /**\n * Create a value event and register it with the logger.\n * \n * @param name\n * The name of the value event.\n * @return The new IValueEvent instance.\n */\n public IValueEvent makeValueEvent(String name);\n\n public void addEventType(EventType et);\n\n /**\n * Add a string to the string table.\n * \n * @param value\n * The string to add.\n */\n public int addString(String value);\n\n /**\n * Add a property to the trace file.\n * \n * @param propertyName\n * The name of the property.\n * @param value\n * The property value.\n */\n public void addProperty(String propertyName, String value);\n\n /**\n * An Oscilloscope figure is used for viewing Timer events in TuningFork.\n * This method allows you to define a group of Timer events that will show\n * up in the \"Predefined Figures\" portion of the TuningFork feed explorer.\n * \n * @param name\n * The name for the figure.\n * @param events\n * An array of Timer events which will comprise the figure.\n */\n public void defineOscilloscopeFigure(String name, ITimerEvent[] events);\n\n /**\n * A Pie Chart figure is used for viewing durations of Timer events in\n * TuningFork. This method allows you to define a group of Timer events that\n * can be opened together as a Histogram from the \"Predefined Figures\"\n * portion of the TuningFork feed explorer.\n * \n * @param name\n * The name for the figure.\n * @param events\n * An array of Timer events which will comprise the figure.\n */\n public void definePieChartFigure(String name, ITimerEvent[] events);\n\n /**\n * A Histogram figure is used for viewing durations of Timer events in\n * TuningFork. This method allows you to define a group of Timer events that\n * can be opened together as a Histogram from the \"Predefined Figures\"\n * portion of the TuningFork feed explorer.\n * \n * @param name\n * The name for the figure.\n * @param events\n * An array of Timer events which will comprise the figure.\n */\n public void defineHistogramFigure(String name, ITimerEvent[] events);\n\n /**\n * A TimeSeries figure is used for viewing value events in TuningFork.\n * Intervals can also be superimposed. This method allows you to define a\n * group of Value and Timer events that will show up in the \"Predefined\n * Figures\" portion of the TuningFork feed explorer.\n * \n * @param name\n * The name for the figure.\n * @param values\n * An array of Value events which will be shown in the\n * figure.\n * @param intervals\n * An array of Timer events which will be shown in the\n * figure.\n */\n public void defineTimeSeriesFigure(String name, IValueEvent[] values,\n\t ITimerEvent[] intervals);\n\n /**\n * This method can be called on shutdown to ensure that data is flushed to\n * the file or socket. Normally, the JVM will automatically activate this on\n * regular shutdown because the library installs a shutdown hook.\n */\n public void close();\n}",
"void enableRequestLogging();",
"void logTransaction(TransactionEvent eventType, String transactionData);",
"@Override\n protected void log(String tag, String msg) {\n Log.i(tag, \"[you can use your custom logger here \\\"]\" + msg);\n }",
"public interface Logger {\n\n\t/**\n\t * Set the name for meaningful class names in log messages\n\t * \n\t * If your logger supports instantiating a logger with a class name, \n\t * the implementation should allow instantiation in this manner.\n\t * Otherwise, a NOOP implementation is acceptable.\n\t */\n\tpublic Logger setLoggerClass(String className);\n\t\n\t/** \n\t * Set the class for meaningful class names in log messages\n\t * \n\t * If your logger supports instantiating a logger with a class name, \n\t * the implementation should allow instantiation in this manner.\n\t * Otherwise, a NOOP implementation is acceptable.\n\t */\n\tpublic Logger setLoggerClass(Class<?> clazz);\n\t\n\t/**\n * Log a fatal event\n * \n * @param message \n * \t\tthe message to log\n */\n\tpublic void fatal(String message);\n\t\n\t/**\n * Log a fatal level security event\n * and also record the stack trace associated with the event.\n * \n * @param message \n * \t\tthe message to log\n * @param throwable \n * \t\tthe exception to be logged\n */\n\tpublic void fatal(String message, Throwable throwable);\n\n\t/**\n * Log an error level security event\n * \n * @param message \n * \t\tthe message to log\n */\n\tpublic void error(String message);\n\t\n\t/**\n * Log an error level security event\n * and also record the stack trace associated with the event.\n * \n * @param message \n * \t\tthe message to log\n * @param throwable \n * \t\tthe exception to be logged\n */\n\tpublic void error(String message, Throwable throwable);\n\n\t/**\n * Log a warning level security event\n * \n * @param message \n * \t\tthe message to log\n */\n\tpublic void warning(String message);\n\t\n\t/**\n * Log a warning level security event\n * and also record the stack trace associated with the event.\n * \n * @param message \n * \t\tthe message to log\n * @param throwable \n * \t\tthe exception to be logged\n */\n\tpublic void warning(String message, Throwable throwable);\n\n\t/**\n * Log an info level security event\n * \n * @param message \n * \t\tthe message to log\n */\n\tpublic void info(String message);\n\t\n\t/**\n * Log an info level security event\n * and also record the stack trace associated with the event.\n * \n * @param message \n * \t\tthe message to log\n * @param throwable \n * \t\tthe exception to be logged\n */\n\tpublic void info(String message, Throwable throwable);\n\n\t/**\n * Log a debug level security event\n * \n * @param message \n * \t\tthe message to log\n */\n\tpublic void debug(String message);\n\t\n\t/**\n * Log a debug level security event\n * and also record the stack trace associated with the event.\n * \n * @param message \n * \t\tthe message to log\n * @param throwable \n * \t\tthe exception to be logged\n */\n\tpublic void debug(String message, Throwable throwable);\n}",
"private void divertLog() {\n wr = new StringWriter(1000);\n LogTarget[] lt = { new WriterTarget(wr, fmt) };\n SampleResult.log.setLogTargets(lt);\n }",
"private void logGetTagsAndSpecsAuditInformation(String ip, Long prodId) {\n\t\tOnlineAttributesController.logger.info(\n\t\t\t\tString.format(OnlineAttributesController.LOG_TAGS_AND_SPECS_AUDIT_BY_PRODUCT_ID, this.userInfo.getUserId(), ip, prodId)\n\t\t);\n\t}",
"private void publishLog(String topic, Iterable<ILoggingEvent> events) {\n publishLog(topic, events, new GenericLoggingContext(NamespaceId.DEFAULT.getNamespace(), \"app\", \"entity\"));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Starts a new sale. This method must be called before any action is registered in the sale. | public void startSale() {
sale = new Sale();
} | [
"public void startNewSale() {\n sale = new Sale(cashRegister);\n }",
"public void startSale()\n {\n if(!currentSale.getSaleState())\n {\n currentSale = null;\n currentSale.startSale();\n }\n }",
"public void beginSale() {\r\n\t\tif (!activeSale) {\r\n\t\t\tcurrentSale = new Sale(nextSaleId);\r\n\t\t\tactiveSale = true;\r\n\t\t}\r\n\t}",
"public void startSale() {\r\n System.out.println(\"[CashRegister] startSale\");\r\n System.out.println(\"\");\r\n\r\n //receipt = new Receipt(customerId); \r\n receipt = new Receipt(\"100\");\r\n\r\n //addItemToSale(productId, quantity);\r\n addItemToSale(\"A101\", 10);\r\n\r\n addItemToSale(\"B205\", 6);\r\n\r\n addItemToSale(\"C222\", 12);\r\n\r\n }",
"public void startSale(){\n this.sale = new Sale();\n this.inventory = new Inventory();\n this.accounting = new Accounting();\n }",
"private void onSalesButtonClick() {\n new ManagementSalesScreen(this.authentificationStore).open();\n }",
"public NewSale() {\n setTitle(\"New Sale\");\n\n initComponents();\n updateTable();\n LoginForm lf = new LoginForm();\n mId.setVisible(false);\n mPrice.setEnabled(false);\n sellBtn.setEnabled(false);\n mName.setEnabled(false);\n buyFld.setEnabled(false);\n mTotalBill.setEnabled(false);\n idLbl.setVisible(false);\n currentStock.setVisible(false);\n }",
"void sale(SaleRequest request);",
"public void startDiscount(SaleDTO saleState) {\n this.saleState = saleState;\n }",
"public SaleController()\n\t{\n\t\tdbConnection = new saleSQLQueries();//initiate sales queries instance\n\t}",
"public void startNewPurchase() throws VerificationFailedException {\n\t}",
"public void setSale(int sale) {\n\t\tthis.sale = sale;\r\n\t}",
"public Sale(){\n setSaleTime();\n receipt = new Receipt();\n listOfItems = new ArrayList<>();\n paymentInformation = new PaymentInformation();\n discount = new Discount();\n }",
"private void DisplayCashSale(){\n\t\t//Direct user to the CashSale Activity\n\t\tstartActivity(new Intent(this,CashSale.class));\n\t}",
"public void startScreen()\n {\n onSales = false;\n \n numItemsAdded = 0; \n Menu guiMenu = new Menu(\"File\", \"NewSale\\nClose\\nExit\", 24, Color.BLACK, Color.WHITE, Color.BLACK,Color.WHITE, new FileCommands());\n clearScreen();\n addObject(guiMenu, 200, 50);\n }",
"void recordSale(Customer customer, Movie movie, SaleDetails saleDetails) {\n System.out.println(\"Connecting to Sales server\");\n AcmeSalesServer salesServer = AcmeSalesServer.connect();\n System.out.println(\"Adding sale to server\");\n salesServer.addSale(customer, movie, saleDetails);\n System.out.println(\"Sale added\");\n }",
"Salesman() {\n super();\n super.setType(EMPLOYEE_TYPE);\n this.setAnnualSales(-1);\n }",
"public void startLotterySales() {\n\t\tWorld.getWorld().sendWorldAnnouncement(\n\t\t\t\t\"The lottery is running! Type ::lottery to buy a ticket for \"\n\t\t\t\t\t\t+ entryfee + \"!\");\n\t\tWorld.getWorld().sendWorldAnnouncement(\n\t\t\t\t\"All the money is put into the pot and winner gets it all!\");\n\t\tWorld.getWorld().sendWorldAnnouncement(\"Current pot is: \" + award);\n\t\tif (running) {\n\t\t\treturn;\n\t\t}\n\t\trunning = true;\n\t\tInstance.getDelayedEventHandler().add(new DelayedEvent(null, 60000) {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tif (running) {\n\t\t\t\t\tWorld.getWorld().sendWorldAnnouncement(\n\t\t\t\t\t\t\t\"The lottery is running! Type ::lottery to buy a ticket for \"\n\t\t\t\t\t\t\t\t\t+ entryfee + \"!\");\n\t\t\t\t\tWorld.getWorld()\n\t\t\t\t\t\t\t.sendWorldAnnouncement(\n\t\t\t\t\t\t\t\t\t\"All the money is put into the pot and winner gets it all!\");\n\t\t\t\t\tWorld.getWorld().sendWorldAnnouncement(\n\t\t\t\t\t\t\t\"Current pot is: \" + award);\n\t\t\t\t} else {\n\t\t\t\t\tthis.stop();\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t});\n\t\tInstance.getDelayedEventHandler().add(\n\t\t\t\tnew SingleEvent(null, waitBeforeAnnouncing * 60000) {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void action() {\n\t\t\t\t\t\tendLottery();\n\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t}",
"public void salesScreen()\n {\n onSales = true;\n salesItem = new SalesItem[50];\n Button timbitAdd = new Button(24, \"button-blue.png\", \"button-green.png\", \"Add timbit:\");\n Button doughnutAdd = new Button(24, \"button-blue.png\", \"button-green.png\", \"Add doughnut:\");\n Button coffeeAdd = new Button(24, \"button-blue.png\", \"button-green.png\", \"Add coffee:\");\n \n addObject(timbitAdd, 400, 100);\n addObject(doughnutAdd, 400, 200);\n addObject(coffeeAdd, 400, 300);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets ith "measurement" element | public noNamespace.HostdashletDocument.Hostdashlet.Host.Charts.Chart.Nic.Series.Measurement getMeasurementArray(int i)
{
synchronized (monitor())
{
check_orphaned();
noNamespace.HostdashletDocument.Hostdashlet.Host.Charts.Chart.Nic.Series.Measurement target = null;
target = (noNamespace.HostdashletDocument.Hostdashlet.Host.Charts.Chart.Nic.Series.Measurement)get_store().find_element_user(MEASUREMENT$0, i);
if (target == null)
{
throw new IndexOutOfBoundsException();
}
return target;
}
} | [
"public noNamespace.HostdashletDocument.Hostdashlet.Host.Charts.Chart.Disks.Series.Measurement getMeasurementArray(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.HostdashletDocument.Hostdashlet.Host.Charts.Chart.Disks.Series.Measurement target = null;\r\n target = (noNamespace.HostdashletDocument.Hostdashlet.Host.Charts.Chart.Disks.Series.Measurement)get_store().find_element_user(MEASUREMENT$0, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n return target;\r\n }\r\n }",
"public noNamespace.HostdashletDocument.Hostdashlet.Host.Charts.Chart.Series.Measurement getMeasurementArray(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.HostdashletDocument.Hostdashlet.Host.Charts.Chart.Series.Measurement target = null;\r\n target = (noNamespace.HostdashletDocument.Hostdashlet.Host.Charts.Chart.Series.Measurement)get_store().find_element_user(MEASUREMENT$0, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n return target;\r\n }\r\n }",
"public noNamespace.MeasurementDocument.Measurement getMeasurementArray(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.MeasurementDocument.Measurement target = null;\r\n target = (noNamespace.MeasurementDocument.Measurement)get_store().find_element_user(MEASUREMENT$0, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n return target;\r\n }\r\n }",
"public noNamespace.MeasureDocument.Measure getMeasureArray(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.MeasureDocument.Measure target = null;\r\n target = (noNamespace.MeasureDocument.Measure)get_store().find_element_user(MEASURE2$4, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n return target;\r\n }\r\n }",
"public interface Measurement {\n /**\n * Get the ID of the probe that created this measurement.\n */\n public ID getProbeID();\n\n /**\n * Get the service ID of the probe that created this measurement.\n */\n public ID getServiceID();\n\n /**\n * Get the group ID for this measurement.\n */\n public ID getGroupID();\n\n /**\n * Get the timestamp\n */\n public Timestamp getTimestamp();\n\n /**\n * Get the delta since the last measurement.\n */\n public Timestamp getDeltaTime();\n\n /**\n * Get the measurement type\n */\n public String getType();\n\n /**\n * Get the sequence number of this measurement.\n */\n public long getSequenceNo();\n\n /**\n * Get the attribute values\n */\n public List<ProbeValue> getValues();\n\n}",
"private Measurement parseMeasurement(Element e) {\n if (e != null && e.getNodeName().equals(\"measurement\")) {\n NumberFormat format = NumberFormat.getInstance(Locale.GERMANY);\n Number value;\n\n try {\n // get measurement Value\n value = format.parse(e.getAttribute(\"value\"));\n\n // get timeStamp\n LocalDateTime timeStamp = LocalDateTime\n .parse(e.getAttribute(\"timestamp\"));\n\n Measurement m = new Measurement(value.doubleValue(), timeStamp);\n return m;\n } catch (ParseException e1) {\n System.err.println(\n \"Value was not a Number with Germany formation (comma)\");\n return null;\n }\n } else {\n return null;\n }\n }",
"public noNamespace.MeasurementDocument.Measurement[] getMeasurementArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(MEASUREMENT$0, targetList);\r\n noNamespace.MeasurementDocument.Measurement[] result = new noNamespace.MeasurementDocument.Measurement[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }",
"public noNamespace.HostdashletDocument.Hostdashlet.Host.Charts.Chart.Nic.Series.Measurement[] getMeasurementArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(MEASUREMENT$0, targetList);\r\n noNamespace.HostdashletDocument.Hostdashlet.Host.Charts.Chart.Nic.Series.Measurement[] result = new noNamespace.HostdashletDocument.Hostdashlet.Host.Charts.Chart.Nic.Series.Measurement[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }",
"public List<TestMeasurement<Long>> getMeasurements() {\n return measurements.stream().collect(Collectors.toList());\n }",
"public noNamespace.HostdashletDocument.Hostdashlet.Host.Charts.Chart.Series.Measurement[] getMeasurementArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(MEASUREMENT$0, targetList);\r\n noNamespace.HostdashletDocument.Hostdashlet.Host.Charts.Chart.Series.Measurement[] result = new noNamespace.HostdashletDocument.Hostdashlet.Host.Charts.Chart.Series.Measurement[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }",
"MeasurementSpecification getMeasurementSpecification();",
"public noNamespace.DualaxischartdashletDocument.Dualaxischartdashlet.Measures.Measure getMeasureArray(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.DualaxischartdashletDocument.Dualaxischartdashlet.Measures.Measure target = null;\r\n target = (noNamespace.DualaxischartdashletDocument.Dualaxischartdashlet.Measures.Measure)get_store().find_element_user(MEASURE$0, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n return target;\r\n }\r\n }",
"public noNamespace.HostdashletDocument.Hostdashlet.Host.Charts.Chart.Series.Measurement insertNewMeasurement(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.HostdashletDocument.Hostdashlet.Host.Charts.Chart.Series.Measurement target = null;\r\n target = (noNamespace.HostdashletDocument.Hostdashlet.Host.Charts.Chart.Series.Measurement)get_store().insert_element_user(MEASUREMENT$0, i);\r\n return target;\r\n }\r\n }",
"public eu.aladdin_project.xsd.Measurement getIn()\n {\n synchronized (monitor())\n {\n check_orphaned();\n eu.aladdin_project.xsd.Measurement target = null;\n target = (eu.aladdin_project.xsd.Measurement)get_store().find_element_user(IN$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public double getElemDouble(int i)\n {\n return getElem(i);\n }",
"public org.landxml.schema.landXML11.TimingDocument.Timing getTimingArray(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.TimingDocument.Timing target = null;\r\n target = (org.landxml.schema.landXML11.TimingDocument.Timing)get_store().find_element_user(TIMING$2, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n return target;\r\n }\r\n }",
"public int getMeasureIndex () {\n return index;\n }",
"double getMeasuringValue();",
"public Map<String, Double> getMeasurements() {\n return this.measurements;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set bind view id | public void setBindViewId(int id) {
mBindViewId = id;
} | [
"public void setBindViewId(int id){\n mBindViewId = id;\n }",
"void showBindViewId(int id) {\n bindId.setText(id + \"\");\n }",
"public int getBindViewId() {\n return mBindViewId;\n }",
"public void setViewId(String viewId) {\n \n this.viewId = viewId;\n \n }",
"public void bindView(IView view);",
"public void setBindViewListener(OnBindViewIdChangedListener listener) {\n mBindViewListener = listener;\n }",
"public abstract void setResponderId ( String arg );",
"public static int getViewId() {\n\t\tviewId += 0x00000001;\n\t\treturn viewId;\n\t}",
"public String getBindId() {\r\n return bindId;\r\n }",
"public void setBindId(String bindId) {\r\n this.bindId = bindId == null ? null : bindId.trim();\r\n }",
"public String getViewId() {\n return viewId;\n }",
"@Override\n\tpublic void setId(long id) {\n\t\t_statViewTag.setId(id);\n\t}",
"public static void bgfx_set_view_name(@NativeType(\"bgfx_view_id_t\") int _id, @NativeType(\"char const *\") ByteBuffer _name) {\n if (CHECKS) {\n checkNT1(_name);\n }\n nbgfx_set_view_name((short)_id, memAddress(_name));\n }",
"protected abstract void bindingView();",
"private void setViewId(Route route){\n\t\tStation \t\tsource \t\t\t= route.getModel().getStations().get(route.getSourceId());\n\t\tif(source == null)\n\t\t\tthrow new ModelGraficException(\"RouteGrafic: SourceStation is null RouteId: \"+route.getId());\n\t\tStationGrafic \tsourceGrafic \t= (StationGrafic)source.getGrafic();\n\t\tif(sourceGrafic == null)\n\t\t\tthrow new ModelGraficException(\"RouteGrafic: SourceGrafic is null RouteId: \"+route.getId());\n\t\tString \t\t\tsourceView\t\t= sourceGrafic.getViewId();\n\t\tif(sourceView == null)\n\t\t\tthrow new ModelGraficException(\"RouteGrafic: SourceView is null RouteId: \"+route.getId());\n\t\tStation \t\tsink\t\t\t= route.getModel().getStations().get(route.getSinkId());\n\t\tif(sink == null)\n\t\t\tthrow new ModelGraficException(\"RouteGrafic: SinkStation is null RouteId: \"+route.getId());\n\t\tStationGrafic \tsinkGrafic \t\t= (StationGrafic)sink.getGrafic();\n\t\tif(sinkGrafic == null)\n\t\t\tthrow new ModelGraficException(\"RouteGrafic: SinkGrafic is null RouteId: \"+route.getId());\n\t\tString \t\t\tsinkView\t\t= sinkGrafic.getViewId();\n\t\tif(sinkView == null)\n\t\t\tthrow new ModelGraficException(\"RouteGrafic: SinkView is null RouteId: \"+route.getId());\n\t\tif(sourceView.equals(sinkView))\n\t\t\tthis.viewId\t= sourceView;\n\t\telse\n\t\t\tthrow new ModelGraficException(\"RouteGrafic: source and sink haven't the same view. \"+\n\t\t\t\t\t\"RouteId: \"+route.getId()+\" SourceView: \"+sourceView+\" SinkView: \"+sinkView);\n\t}",
"public static void bgfx_set_view_name(@NativeType(\"bgfx_view_id_t\") int _id, @NativeType(\"char const *\") CharSequence _name) {\n MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();\n try {\n stack.nASCII(_name, true);\n long _nameEncoded = stack.getPointerAddress();\n nbgfx_set_view_name((short)_id, _nameEncoded);\n } finally {\n stack.setPointer(stackPointer);\n }\n }",
"public void setBindingId(Integer value) {\n set(2, value);\n }",
"public void setbind_uuId(String value) {\n ensureVariableManager().setVariableValue(\"bind_uuId\", value);\n }",
"public Widget(int handle, View view)\n \t{\n \t\tm_view = view;\n \t\tm_view.setId( handle );\n \t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column CTSCARDS_MGT_HST.DATE_ACTIVATED | public Date getDATE_ACTIVATED() {
return DATE_ACTIVATED;
} | [
"public Date getDATE_ACTIVATED_INIT() {\r\n return DATE_ACTIVATED_INIT;\r\n }",
"public void setDATE_ACTIVATED(Date DATE_ACTIVATED) {\r\n this.DATE_ACTIVATED = DATE_ACTIVATED;\r\n }",
"public Date getActivateDate() {\r\n return activateDate;\r\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getActivationTimestamp();",
"private String getActivationDate(String csStatChng) {\r\n\t\t\r\n\t\tString activationDate = \"\";\r\n\t\t\r\n\t\tif (csStatChng != null) {\r\n\t\t\tint lastIndexOf = csStatChng.lastIndexOf(ACTIVATE_STATE);\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tactivationDate = DateFormat.format(csStatChng.substring(lastIndexOf-6, lastIndexOf), \"yymmdd\", \"dd/mm/yyyy\");\r\n\t\t\t} catch (ParseException e) {\r\n\t\t\t\tlog.error(\"Erro encontrado no XML de resposta do Infobus.\", e);\r\n\t\t\t\tthrow new ErrorMessageException(\"Erro encontrado no XML de resposta do Infobus.\", e);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn activationDate;\t\r\n\t}",
"public Date getDATE_DEACTIVATED() {\r\n return DATE_DEACTIVATED;\r\n }",
"public Date getDATE_REACTIVATED()\r\n {\r\n\treturn DATE_REACTIVATED;\r\n }",
"public Date getDATE_REACTIVATED() {\r\n return DATE_REACTIVATED;\r\n }",
"public Date getActivatedOn() {\r\n return activatedOn;\r\n }",
"public Date getSERVER_APPROVED_DATE()\r\n {\r\n\treturn SERVER_APPROVED_DATE;\r\n }",
"public Date getSUCCESS_DATE() {\n return SUCCESS_DATE;\n }",
"public Date getLAST_CHARGE_ACCRUED_DATE()\r\n {\r\n\treturn LAST_CHARGE_ACCRUED_DATE;\r\n }",
"public Date gettCgthdate() {\n return tCgthdate;\n }",
"public Date getDATE_DEACTIVATED_INIT() {\r\n return DATE_DEACTIVATED_INIT;\r\n }",
"public Date getSERVER_APPROVED_DATE() {\r\n return SERVER_APPROVED_DATE;\r\n }",
"public Date getFinalActiveDate() {\n if (_finalActiveDate == null) {\n _finalActiveDate = DEFAULT_FINAL_ACTIVE_DATE;\n }\n return _finalActiveDate;\n }",
"public Date getDATE_APPROVED() {\r\n return DATE_APPROVED;\r\n }",
"public Date getDATE_APPROVED()\r\n {\r\n\treturn DATE_APPROVED;\r\n }",
"public Date getDATE_ENTERED() {\r\n return DATE_ENTERED;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Exports all projects into separate xml files and adds them to a zip archive. | public String exportAllProjectsToZip(){
List<PlanProperties> ppList = em.createQuery("select p from PlanProperties p").getResultList();
if (!ppList.isEmpty()){
log.debug("number of plans to export: "+ppList.size());
String filename = "allprojects.zip";
String exportPath = OS.getTmpPath() + "export" + System.currentTimeMillis()+"/";
new File(exportPath).mkdirs();
String binarydataTempPath = exportPath + "binarydata/";
File binarydataTempDir = new File(binarydataTempPath);
binarydataTempDir.mkdirs();
try {
OutputStream out = new BufferedOutputStream(new FileOutputStream(exportPath + filename));
ZipOutputStream zipOut = new ZipOutputStream(out);
for (PlanProperties pp: ppList) {
log.debug("EXPORTING: " + pp.getName());
ZipEntry zipAdd = new ZipEntry(String.format("%1$03d", pp.getId())+"-"+ FileUtils.makeFilename(pp.getName())+".xml");
zipOut.putNextEntry(zipAdd);
// export the complete project, including binary data
exportComplete(pp.getId(), zipOut, binarydataTempPath);
zipOut.closeEntry();
}
zipOut.close();
out.close();
new File(exportPath + "finished.info").createNewFile();
FacesMessages.instance().add(FacesMessage.SEVERITY_INFO, "Export was written to: " + exportPath);
log.info("Export was written to: " + exportPath);
} catch (IOException e) {
FacesMessages.instance().add(FacesMessage.SEVERITY_ERROR, "An error occured while generating the export file.");
log.error("An error occured while generating the export file.", e);
File errorInfo = new File(exportPath + "error.info");
try {
Writer w = new FileWriter(errorInfo);
w.write("An error occured while generating the export file:");
w.write(e.getMessage());
w.close();
} catch (IOException e1) {
log.error("Could not write error file.");
}
} finally {
// remove all binary temp files
OS.deleteDirectory(binarydataTempDir);
}
} else {
FacesMessages.instance().add("No Projects found!");
}
return null;
} | [
"ProjectSourceZip exportAllProjectsSourceZip(String userId, String zipName) throws IOException;",
"ProjectSourceZip exportSelectedProjectsSourceZip(String userId, String zipName, List<Long> projectIds) throws IOException;",
"public void actionExportToZip() {\n FileChooser fileChooser = new FileChooser();\n fileChooser.setTitle(\"Save Zip\");\n fileChooser.setInitialDirectory(JOIPackageManager.getInstance().getJoiPackageDirectory());\n fileChooser.getExtensionFilters().addAll(new FileChooser.ExtensionFilter(\"zip\", \"*.zip\"));\n File dest = fileChooser.showSaveDialog(null);\n\n if (dest != null) JOIPackageManager.getInstance().exportJOIPackageAsZip(dest);\n }",
"public void zip() {\n\t\tif (zipFile != null) {\n\t\t\tlong start = System.currentTimeMillis();\n\t\t\ttry (ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipFile))) {\n\t\t\t\tzos.setLevel(ZipOutputStream.STORED);\n\t\t\t\tbyte[] buffer = new byte[4096];\n\t\t\t\tFiles.list(Paths.get(tool_builddir))\n\t\t\t\t\t\t.forEach(x -> {\n\t\t\t\t\t\t\tFile f = x.toFile();\n\t\t\t\t\t\t\tif (f.isFile() && !f.getName().contains(\".\")) {\n\t\t\t\t\t\t\t\ttry (FileInputStream fis = new FileInputStream(f)) {\n\t\t\t\t\t\t\t\t\tZipEntry zipEntry = new ZipEntry(f.getName());\n\t\t\t\t\t\t\t\t\tzos.putNextEntry(zipEntry);\n\t\t\t\t\t\t\t\t\tint count;\n\t\t\t\t\t\t\t\t\twhile ((count = fis.read(buffer)) >= 0) {\n\t\t\t\t\t\t\t\t\t\tzos.write(buffer, 0, count);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tzos.closeEntry();\n\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\tout.println(\"Zipped to '\" + zipFile + \"' - \" + Duration.ofMillis(System.currentTimeMillis() - start));\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t}",
"private final void zipAll(final Collection<File> files) throws IOException {\n\t\tzos = new ZipOutputStream(outputStream);\n\t\taddDir(files.toArray(new File[0]), zos);\n\t\tzos.close();\n\t}",
"public Document exportToXml(List<Integer> ppids, List<Integer> uploadIDs, List<Integer> recordIDs) {\r\n ProjectExporter exporter = new ProjectExporter();\r\n Document doc = exporter.createProjectDoc();\r\n\r\n int i = 0;\r\n for (Integer id: ppids) {\r\n // load one plan after the other:\r\n List<Plan> list = em.createQuery(\r\n \"select p from Plan p where p.planProperties.id = \"\r\n + id).getResultList();\r\n if (list.size() != 1) {\r\n FacesMessages.instance().add(FacesMessage.SEVERITY_ERROR,\r\n \"Skipping the export of the plan with properties\"+id+\": Couldnt load.\");\r\n } else {\r\n //log.debug(\"adding project \"+p.getplanProperties().getName()+\" to XML...\");\r\n exporter.addProject(list.get(0), doc, uploadIDs, recordIDs);\r\n }\r\n list.clear();\r\n list = null;\r\n \r\n log.info(\"XMLExport: addString destinationed project ppid=\"+id);\r\n i++;\r\n if ((i%10==0)) {\r\n em.clear();\r\n System.gc();\r\n }\r\n }\r\n return doc;\r\n }",
"public void exportDeploymentTopology(Topology topology, String zipFileName) throws Exception {\r\n\t\tZipOutputStream out = null;\r\n\t\ttry {\r\n\t\t\tout = new ZipOutputStream(new FileOutputStream(zipFileName));\r\n\t\t\texportDeploymentTopology(topology, out);\r\n\t\t\tif (isCreateExportProject()) {\r\n\t\t\t\tthis.getExportOptions().setExportProjectName(topology.getName());\r\n\t\t\t\tcreateExportProjectMetaData(topology, out);\r\n\t\t\t} else {\r\n\t\t\t\tthis.getExportOptions().setExportProjectName(\"\"); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tif (out != null) {\r\n\t\t\t\tout.close();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void zipFolder() {\n File sourcePath = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DOCUMENTS + SOURCE_DIR_FOLDER);\n File targetPath = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DOCUMENTS + ZIP_DIR_FOLDER);\n if(!targetPath.exists()){\n targetPath.mkdirs();\n }\n ArrayList<File> fileList = new ArrayList();\n getAndZipFiles(sourcePath, fileList);\n writeZipFile(sourcePath, fileList, targetPath);\n Log.e(\"Zipping\", \"Zipping folder \");\n }",
"public void exportExcel(final List<Project> projects) throws Exception {\n\n\t\tlog.info(\"Entered exportExcel \");\n\n\t\t/* Check if previous week report is older than one week */\n\t\tLocalDate previousReportDate = findPreviousWeekDate();\n\t\tLocalDate now = LocalDate.now();\n\t\tint daysOfDifference = (now.getDayOfYear() - previousReportDate.getDayOfYear());\n\t\tSystem.err.println(\"Days of difference : \" + daysOfDifference);\n\t\tif (daysOfDifference > maximumWeekDays)\n\t\t\tthrow new Exception(baseHistoryPath + \" doesn't contain the previous week report.\");\n\n\t\t/* Read previous week report */\n\t\tList<Project> previousWeekProjects = readPreviousWeekReport(previousReportDate);\n\t\t// Collections.sort(previousWeekProjects, new NameComporator())\n\t\t// Collections.sort(projects, new NameComporator())\n\n\t\t/* Create XSSFWorkbook & XSSFSheet */\n\t\tXSSFWorkbook workbook = new XSSFWorkbook();\n\t\tXSSFSheet sheet = workbook.createSheet(\"Datatypes in Java\");\n\n\t\t// --------------- Create Styles -----------------------//\n\n\t\t/* Init Styles */\n\t\tinitStyles(workbook);\n\n\t\t/* Iterate the data */\n\t\tint[] rowNum = { 0 };\n\n\t\t/* Create row 0-Descriptions */\n\t\tRow row0 = sheet.createRow(rowNum[0]);\n\t\tfor (int i = 0; i <= 4; i++) {\n\n\t\t\t/* Create Row Count */\n\t\t\tCell cell = row0.createCell(i);\n\t\t\tcell.setCellStyle(blueStyle);\n\t\t\tif (i == 0)\n\t\t\t\tcell.setCellValue(\"NO\");\n\t\t\telse if (i == 1)\n\t\t\t\tcell.setCellValue(\"Category\");\n\t\t\telse if (i == 2)\n\t\t\t\tcell.setCellValue(\"Component\");\n\t\t\telse if (i == 3)\n\n\t\t\t\tcell.setCellValue(\"Last Week\");\n\t\t\telse if (i == 4)\n\t\t\t\tcell.setCellValue(\"This week\");\n\n\t\t\tif (i <= 2)\n\t\t\t\tcell.setCellStyle(blueStyleLeft);\n\t\t\telse\n\t\t\t\tcell.setCellStyle(blueStyle);\n\t\t}\n\n\t\tprojects.forEach(thisWeekProject -> {\n\t\t\trowNum[0]++;\n\t\t\tRow row = sheet.createRow(rowNum[0]);\n\n\t\t\tint[] colNum = { 0 };\n\n\t\t\t/* Create Row Count */\n\t\t\tCell rowCountCell = row.createCell(colNum[0]++);\n\t\t\trowCountCell.setCellStyle(defaultStyle);\n\t\t\trowCountCell.setCellValue(rowNum[0]);\n\n\t\t\t/* Application Category */\n\t\t\tCell categoryCell = row.createCell(colNum[0]++);\n\t\t\tcategoryCell.setCellValue(thisWeekProject.getCategory());\n\n\t\t\t/* Application Name */\n\t\t\tCell nameCell = row.createCell(colNum[0]++);\n\t\t\tnameCell.setCellValue(thisWeekProject.getName());\n\n\t\t\t// --------------- Add Coverage -----------------------//\n\n\t\t\t/* Add Previous Week Coverage */\n\t\t\tProject previousWeekProject = previousWeekProjects.stream()\n\t\t\t\t\t.filter(project -> project.getName().equals(thisWeekProject.getName())).findFirst().get();\n\t\t\tCell previousWeekCovCell = row.createCell(colNum[0]++);\n\t\t\tif (previousWeekProject.getCoverage().equals(\"No Coverage\"))\n\t\t\t\tpreviousWeekCovCell.setCellStyle(orangeStyle);\n\t\t\telse\n\t\t\t\tpreviousWeekCovCell.setCellStyle(defaultStyleRight);\n\t\t\tpreviousWeekCovCell.setCellValue(previousWeekProject.getCoverage());\n\n\t\t\t//Print Table to Console?\n\t\t\tif (printToConsole) {\n\t\t\t\tSystem.err.println(\"----------------------------------------\");\n\t\t\t\tSystem.err.println(\n\t\t\t\t\t\trowNum[0] + \" This Week => \" + thisWeekProject.getName() + \":\" + thisWeekProject.getCoverage());\n\t\t\t\tSystem.err.println(rowNum[0] + \" Prev Week => \" + previousWeekProject.getName() + \":\"\n\t\t\t\t\t\t+ previousWeekProject.getCoverage());\n\n\t\t\t\tSystem.err.println(\"----------------------------------------\");\n\t\t\t}\n\n\t\t\t/* Add Current Week Coverage */\n\t\t\tCell thisWeekCovCell = row.createCell(colNum[0]++);\n\t\t\tDouble coveragePreviousWeek = previousWeekProject.getCoverageAsDouble();\n\t\t\tDouble coverageThisWeek = thisWeekProject.getCoverageAsDouble();\n\t\t\tif (coveragePreviousWeek > coverageThisWeek)\n\t\t\t\tthisWeekCovCell.setCellStyle(redStyle);\n\t\t\telse if (coverageThisWeek > coveragePreviousWeek)\n\t\t\t\tthisWeekCovCell.setCellStyle(greenStyle);\n\t\t\telse if (thisWeekProject.getCoverage().equals(\"No Coverage\"))\n\t\t\t\tthisWeekCovCell.setCellStyle(orangeStyle);\n\t\t\telse\n\t\t\t\tthisWeekCovCell.setCellStyle(defaultStyleRight);\n\t\t\tthisWeekCovCell.setCellValue(thisWeekProject.getCoverage());\n\t\t});\n\n\t\t// Auto size column widths\n\t\tfor (int i = 0; i < 7; i++)\n\t\t\tsheet.autoSizeColumn(i);\n\t\tsheet.setColumnWidth(0, 1500);\n\t\tsheet.setColumnWidth(3, 3500);\n\t\tsheet.setColumnWidth(4, 3500);\n\n\t\t/* Create excel file */\n\t\tFile file = getSonarQubeReport(basePath, LocalDate.now());\n\t\tlog.error(\"File {} exists {}... deleting = {}\", file.getName(), file.exists(), FileUtils.deleteQuietly(file));\n\n\t\t/* Write excel file */\n\t\ttry (FileOutputStream outputStream = new FileOutputStream(file.getAbsolutePath())) {\n\t\t\tworkbook.write(outputStream);\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\n\t\t/* Copy the file to the history folder */\n\t\tFiles.move(Paths.get(file.getAbsolutePath()), Paths.get(baseHistoryPath, file.getName()),\n\t\t\t\tStandardCopyOption.REPLACE_EXISTING);\n\n\t\tlog.info(\"Exited exportExcel \");\n\t}",
"public interface FileExporter {\n\n public static final String REMIX_INFORMATION_FILE_PATH = \"youngandroidproject/remix_history\";\n\n /**\n * Exports a project output file.\n *\n * @param userId the userId\n * @param projectId the project id belonging to the userId\n * @param target the output target platform, or null\n * @return RawFile with the name and content of the exported file\n * @throws IllegalArgumentException if download request cannot be fulfilled\n * (either no output file or too many output files)\n */\n RawFile exportProjectOutputFile(String userId, long projectId, @Nullable String target)\n throws IOException;\n\n /**\n * Exports the project source files as a zip.\n *\n * @param userId the userId\n * @param projectId the project id belonging to the userId\n * @param includeProjectHistory indicates whether to include a file\n * containing the project's history in the zip\n * @param includeAndroidKeystore indicates whether to include the user's android.keystore file\n * @param zipName the desired name for the zip, or null for a name to be generated\n * @param fatalError set to true to cause missing GCS file to throw exception\n * @return the zip file, which includes a count of the number of zipped files\n * and (indirectly) the name of the file and its contents\n * @throws IllegalArgumentException if download request cannot be fulfilled\n * (no source files)\n * @throws IOException if files cannot be written\n */\n ProjectSourceZip exportProjectSourceZip(String userId, long projectId,\n boolean includeProjectHistory,\n boolean includeAndroidKeystore, @Nullable String zipName,\n boolean includeYail,\n boolean includeScreenShots,\n boolean fatalError, boolean forGallery) throws IOException;\n\n /**\n * Exports projects selected by the user as a zip of zips.\n *\n * @param userId the userId\n * @param zipName the desired name for the zip\n * @param projectIds the list of project ids corresponding to selected projects\n * @return the name, contents, and number of files in the zip\n * @throws IllegalArgumentException if download request cannot be fulfilled\n * (no projects)\n * @throws IOException if files cannot be written\n */\n ProjectSourceZip exportSelectedProjectsSourceZip(String userId, String zipName, List<Long> projectIds) throws IOException;\n\n /**\n * Exports all of the user's projects' source files as a zip of zips.\n *\n * @param userId the userId\n * @param zipName the desired name for the zip\n * @return the name, contents, and number of files in the zip\n * @throws IllegalArgumentException if download request cannot be fulfilled\n * (no projects)\n * @throws IOException if files cannot be written\n */\n ProjectSourceZip exportAllProjectsSourceZip(String userId, String zipName) throws IOException;\n\n /**\n * Exports a specific project file.\n *\n * @param userId the userId\n * @param projectId the project id belonging to the userId\n * @param filePath the full path of the file\n * @return RawFile with the name and content\n * @throws IllegalArgumentException if download request cannot be fulfilled\n * (file is not known)\n */\n RawFile exportFile(String userId, long projectId, String filePath) throws IOException;\n\n /**\n * Exports a specific user file.\n *\n * @param userId the userId\n * @param filePath the full path of the file\n * @return RawFile with the name and content\n * @throws IllegalArgumentException if download request cannot be fulfilled\n * (file is not known)\n */\n RawFile exportUserFile(String userId, String filePath) throws IOException;\n}",
"protected void doUnzipProject()\n {\n boolean allOk = checkToSave();\n \n if (!allOk) return; // i.e. cancelled...\n \n this.closeProject();\n \n \n File defaultDir = ProjectStructure.getnCProjectsDirectory();\n \n logger.logComment(\"Unzipping a project...\");\n \n JFileChooser zipFileChooser = new JFileChooser();\n \n zipFileChooser.setDialogType(JFileChooser.OPEN_DIALOG);\n zipFileChooser.setCurrentDirectory(defaultDir);\n \n zipFileChooser.setDialogTitle(\"Open zipped neuroConstruct project\");\n \n SimpleFileFilter fileFilter\n = new SimpleFileFilter(new String[]{ProjectStructure.getProjectZipFileExtension()},\n \"neuroConstruct zipped projects. Extension: *\" +\n ProjectStructure.getProjectZipFileExtension());\n \n zipFileChooser.setFileFilter(fileFilter);\n \n int retval = zipFileChooser.showDialog(this, \"Import project\");\n \n if (retval == JFileChooser.APPROVE_OPTION)\n {\n File chosenZipFile = zipFileChooser.getSelectedFile();\n \n logger.logComment(\"File chosen: \"+ chosenZipFile);\n \n if (!chosenZipFile.getName().endsWith(ProjectStructure.getProjectZipFileExtension()))\n {\n \n GuiUtils.showErrorMessage(logger, \"The zip file does not seem to have been generated by \"+ ProjectStructure.getProjectFileExtension(), null, this);\n \n return;\n \n }\n \n JFileChooser destDirChooser = new JFileChooser();\n \n destDirChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n \n String newProjName = chosenZipFile.getName().substring(0,\n chosenZipFile.getName().length() - ProjectStructure.getProjectZipFileExtension().length());\n \n destDirChooser.setDialogTitle(\"Please select a directory for the project: \"+ newProjName);\n \n \n destDirChooser.setCurrentDirectory(ProjectStructure.getnCProjectsDirectory());\n \n boolean validEmptyDirectory = false;\n \n while (!validEmptyDirectory)\n {\n \n retval = destDirChooser.showDialog(this,\n \"Create new folder \" + newProjName + System.getProperty(\"file.separator\") +\n \" for project here\");\n \n if (retval == JFileChooser.APPROVE_OPTION)\n {\n \n File chosenParentDir = destDirChooser.getSelectedFile();\n \n File projDirToCreate = new File (chosenParentDir.getAbsolutePath()\n + System.getProperty(\"file.separator\")\n + newProjName);\n \n logger.logComment(\"Dir chosen: \" + chosenParentDir);\n \n if (!projDirToCreate.exists()) projDirToCreate.mkdir();\n \n if (projDirToCreate.listFiles().length>0)\n {\n GuiUtils.showErrorMessage(logger, \"The directory: \"+ projDirToCreate +\" contains files. Please select a directory with no \"+newProjName+\" folder.\", null, this);\n \n }\n else\n {\n validEmptyDirectory = true;\n try\n {\n ZipUtils.unZip(projDirToCreate.getAbsolutePath(), chosenZipFile.getAbsolutePath());\n \n String nameOfNewProjectFile = projDirToCreate.getAbsolutePath()\n + System.getProperty(\"file.separator\")\n + newProjName\n + ProjectStructure.getProjectFileExtension();\n \n if (!(new File(nameOfNewProjectFile)).exists())\n {\n GuiUtils.showErrorMessage(logger, \"The expected project file: \"+ nameOfNewProjectFile + \" was not found!\", null, this);\n projDirToCreate.delete();\n return;\n }\n \n doLoadProject(nameOfNewProjectFile);\n }\n catch (Exception ex)\n {\n GuiUtils.showErrorMessage(logger, \"Problem extracting the zipped file: \" + chosenZipFile + \" to \"+ projDirToCreate,\n ex, this);\n }\n \n }\n \n }\n else\n {\n logger.logComment(\"User has changed their mind...\");\n return;\n \n }\n }\n \n \n }\n else\n {\n logger.logComment(\"User has changed their mind...\");\n return;\n }\n \n }",
"private void createZipOut(String zipDir) {\r\n if (!new File(zipDir).exists()) {\r\n new File(zipDir).mkdir();\r\n }\r\n try {\r\n zipOut = new ZipOutputStream(new FileOutputStream(new File(zipDir,\r\n \"ArchiveItems-\" + System.currentTimeMillis() + \".zip\")));\r\n } catch (IOException ex) {\r\n ex.printStackTrace();\r\n throw new RuntimeException(\"unexpected error creating zip file for export\");\r\n }\r\n }",
"private void createResultZipFile(String path) throws Exception {\n\t\ttry {\n\t\t\tString zipFile = path + \"Result_\"+testData.get(\"TestSuite\")+\".zip\";\n\t\t\tString sourceDirectory = path;\n\n\t\t\tbyte[] buffer = new byte[1024];\n\t\t\tFileOutputStream fout = new FileOutputStream(zipFile);\n\t\t\tZipOutputStream zout = new ZipOutputStream(fout);\n\t\t\tFile dir = new File(sourceDirectory);\n\t\t\tif (!dir.isDirectory()) {\n\t\t\t\tSystem.out.println(sourceDirectory + \" is not a directory\");\n\t\t\t} else {\n\t\t\t\tFile[] files = dir.listFiles();\n\t\t\t\tFileInputStream fin = null;\n\t\t\t\tfor (int i = 0; i < files.length; i++) {\n\t\t\t\t\tif(files[i].getName().contains(\".htm\") || files[i].getName().contains(\".png\") || files[i].getName().contains(\".jpeg\") || files[i].getName().contains(\".log\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tfin = new FileInputStream(files[i]);\n\t\t\t\t\t\tzout.putNextEntry(new ZipEntry(files[i].getName()));\n\t\t\t\t\t\tint length;\n\t\t\t\t\t\twhile ((length = fin.read(buffer)) > 0) {\n\t\t\t\t\t\t\tzout.write(buffer, 0, length);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tzout.closeEntry();\n\t\t\t\tfin.close();\n\t\t\t}\n\t\t\tzout.close();\n\t\t\tSystem.out.println(\"Results Zip file has been created...\");\n\t\t\tLog4J.getlogger(packageAddress).info(\"Results Zip file has been created...\");\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\"Exception occured in createResultZipFile method: \" + e.getMessage());\n\t\t}\n\t}",
"@FXML private void exportLogs() {\r\n File selected = selectFile(\"ZIP\", \"*.zip\", \"save\");\r\n if (selected != null) {\r\n try (ZipOutputStream out = new ZipOutputStream(new FileOutputStream(selected))) {\r\n File[] files = Kernel.APPLICATION_LOGS.listFiles();\r\n if (files != null) {\r\n byte[] bytes;\r\n for (File file : files) {\r\n ZipEntry entry = new ZipEntry(file.getName());\r\n out.putNextEntry(entry);\r\n bytes = Files.readAllBytes(file.toPath());\r\n out.write(bytes);\r\n out.closeEntry();\r\n }\r\n }\r\n kernel.showAlert(Alert.AlertType.INFORMATION, null, Language.get(35) + System.lineSeparator() + selected.getAbsolutePath());\r\n } catch (IOException ex) {\r\n kernel.showAlert(Alert.AlertType.ERROR, null, Language.get(35) + '\\n' + selected.getAbsolutePath());\r\n }\r\n }\r\n }",
"public boolean copy_cloudbees_web_xml_file(String war_name) throws Exception {\n //public void CopyFile(File in, File out) throws Exception {\n boolean ret=false;\n File in=new File(\"cloudbees-web2.xml\");\n new File(path1+war_name+ File.separator + \"WEB-INF\").mkdirs();\n File out=new File(path1+war_name\n + File.separator + \"WEB-INF\" + File.separator +\n \"cloudbees-web3.xml\");\n\n FileInputStream fis = new FileInputStream(in);\n FileOutputStream fos = new FileOutputStream(out);\n byte[] buf = new byte[1024];\n int i = 0;\n while((i=fis.read(buf))!=-1) {\n fos.write(buf, 0, i);\n }\n fis.close();\n fos.close();\n File war= new File(path1+war_name+\".war\");\n\n File[] files_to_add = new File[1];\n files_to_add[0]=out;\n ZipTool.addFilesToExistingZip(war, files_to_add);\n\n return ret;\n }",
"public void zipFiles() {\r\n byte[] buffer = new byte[1024];\r\n try {\r\n\r\n // On rare occasions, there will be a semi colon in the title name,\r\n // ruining everything while zipping the file.\r\n if (title.contains(\":\") || title.contains(\".\")) {\r\n String temp = \"\";\r\n for (int i = 0; i < title.length(); i++) {\r\n \r\n if (title.charAt(i) == ':' || title.charAt(i) == '.') {\r\n \r\n } else {\r\n temp += title.charAt(i);\r\n }\r\n }\r\n title = temp;\r\n }\r\n System.out.println(\"File name: \" + title);\r\n \r\n FileOutputStream fos = new FileOutputStream(savePath + \"\\\\\" + title + \".zip\");\r\n ZipOutputStream zos = new ZipOutputStream(fos);\r\n \r\n for (String fileName : fileNames) {\r\n \r\n System.out.println(\"zipping file: \" + fileName);\r\n \r\n fileName = savePath + \"\\\\\" + fileName;\r\n File srcFile = new File(fileName);\r\n FileInputStream fis;\r\n if (srcFile.exists()) {\r\n fis = new FileInputStream(srcFile);\r\n \r\n zos.putNextEntry(new ZipEntry(srcFile.getName()));\r\n int length;\r\n while ((length = fis.read(buffer)) > 0) {\r\n zos.write(buffer, 0, length);\r\n }\r\n zos.closeEntry();\r\n fis.close();\r\n \r\n boolean success = (new File(fileName)).delete();\r\n }\r\n }\r\n zos.close();\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"File not found!\");\r\n } catch (IOException ex) {\r\n }\r\n }",
"abstract OutputStream createProject();",
"public void execute() throws BuildException {\n Utils.setProject(getProject());\n \n JarOutputStream output = null;\n try {\n output = new JarOutputStream(new FileOutputStream(file));\n output.setLevel(9);\n \n log(\"browsing, packing, archiving directory \" + directory.getCanonicalPath()); // NOI18N\n browse(directory.getCanonicalFile(),\n output,\n directory.getCanonicalPath().length());\n \n log(\"adding manifest and files list\"); // NOI18N\n output.putNextEntry(new JarEntry(METAINF_ENTRY));\n \n output.putNextEntry(new JarEntry(MANIFEST_ENTRY));\n output.write(\"Manifest-Version: 1.0\\n\\n\".getBytes(\"UTF-8\")); // NOI18N\n \n output.putNextEntry(new JarEntry(FILES_LIST_ENTRY));\n OutputStreamWriter writer =\n new OutputStreamWriter(output, \"UTF-8\"); // NOI18N\n \n writer.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\"); // NOI18N\n writer.write(\"<files-list>\\n\"); // NOI18N\n for (FileEntry entry: entries) {\n writer.write(\" <entry \"); // NOI18N\n if (entry.isDirectory()) {\n writer.write(\"type=\\\"directory\\\" \"); // NOI18N\n writer.write(\"empty=\\\"\" + // NOI18N\n entry.isEmpty() + \"\\\" \"); // NOI18N\n writer.write(\"modified=\\\"\" + // NOI18N\n entry.getLastModified() + \"\\\" \"); // NOI18N\n writer.write(\"permissions=\\\"\" + // NOI18N\n entry.getPermissions() + \"\\\"\"); // NOI18N\n } else {\n writer.write(\"type=\\\"file\\\" \"); // NOI18N\n writer.write(\"size=\\\"\" + // NOI18N\n entry.getSize() + \"\\\" \"); // NOI18N\n writer.write(\"md5=\\\"\" + // NOI18N\n entry.getMd5() + \"\\\" \"); // NOI18N\n writer.write(\"jar=\\\"\" + // NOI18N\n entry.isJarFile() + \"\\\" \"); // NOI18N\n writer.write(\"packed=\\\"\" + // NOI18N\n entry.isPackedJarFile() + \"\\\" \"); // NOI18N\n writer.write(\"signed=\\\"\" + // NOI18N\n entry.isSignedJarFile() + \"\\\" \"); // NOI18N\n writer.write(\"modified=\\\"\" + // NOI18N\n entry.getLastModified() + \"\\\" \"); // NOI18N\n writer.write(\"permissions=\\\"\" + // NOI18N\n entry.getPermissions() + \"\\\"\"); // NOI18N\n }\n \n writer.write(\">\" + entry. // NOI18N\n getName().\n replace(\"&\", \"&\"). // NOI18N\n replace(\"\\'\",\"'\"). //NOI18N\n replace(\"\\\"\",\""\"). //NOI18N\n replace(\"<\", \"<\"). // NOI18N\n replace(\">\", \">\") + \"</entry>\\n\"); // NOI18N\n }\n writer.write(\"</files-list>\\n\"); // NOI18N\n \n writer.flush();\n writer.close();\n \n output.flush();\n output.close();\n \n log(\"archived \" + directoriesCount + // NOI18N\n \" directories and \" + filesCount + \" files\"); // NOI18N\n } catch (IOException e) {\n throw new BuildException(e);\n }\n }",
"public static void ExportSimulation(Project project, List<TrafficDefinitionLayer> layersToExport) {\n\n\t\tSimulation sim = project.getSimulation();\n\n\t\t// Empty the target folder\n\t\tif (JOptionPane.showConfirmDialog(null, \"All files in the folder \" + sim.getExportPath() + \" will be deleted.\\nAre you sure you want to continue?\", \"Confirm file deletion\", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE) == JOptionPane.YES_OPTION) {\n\t\t\tFile exportFolder = new File(sim.getExportPath());\n\n\t\t\tfor (File child : exportFolder.listFiles()) {\n\t\t\t\tif (!child.delete()) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Unable to empty simulation export folder. The operation was cancelled.\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\n\t\t// Try to export the road network\n\t\ttry {\n\t\t\tExportNet(project.getRoadNetwork(), sim.getExportPath(), sim.getName(), sim.isRoadNetworkSpeedInKMH());\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Error while exporting road network\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t}\n\n\t\t// Export polygons for traffic definition elements\n\t\tif (sim.getExportPolygons()) {\n\t\t\ttry {\n\t\t\t\tExportPolygons(layersToExport, sim.getExportPath(), sim.getName());\n\t\t\t} catch (Exception e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error while exporting element geometry\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// Create a list that will hold all the generated trips\n\t\tSUMOInstructionList<Trip> tripsList = new SUMOInstructionList<Trip>();\n\n\t\t// Create a string builder that will hold all the generated routes\n\t\tSUMOInstructionList<Route> routesList = new SUMOInstructionList<Route>();\n\n\t\t// Create a string builder that will hold all the generated routes for\n\t\t// accidents\n\t\tSUMOInstructionList<Route> accidentRoutesList = new SUMOInstructionList<Route>();\n\n\t\ttry {\n\t\t\t// List of statistical traffic definition elements (areas and schools)\n\t\t\tList<TrafficDefinitionElement> statisticalDefinitionElements = new ArrayList<TrafficDefinitionElement>();\n\n\t\t\t// Loop through each selected traffic definition layer\n\t\t\tfor (TrafficDefinitionLayer selectedLayer : layersToExport) {\n\t\t\t\tif(selectedLayer instanceof UserDefinedTrafficDefinitionLayer){\n\t\t\t\t\tTrafficGenerator.GenerateUserDefinedLayerTraffic(project.getRoadNetwork(), (UserDefinedTrafficDefinitionLayer) selectedLayer, tripsList, accidentRoutesList);\n\t\t\t\t}\n\t\t\t\telse if (selectedLayer instanceof RandomTrafficDefinitionLayer){\n\t\t\t\t\tTrafficGenerator.GenerateRandomLayerTraffic(project.getRoadNetwork(),(RandomTrafficDefinitionLayer)selectedLayer, tripsList);\n\t\t\t\t}\n\t\t\t\telse if(selectedLayer instanceof ActivityBasedTrafficDefinitionLayer){\n\t\t\t\t\t//Group together all enabled activity based elements\n\t\t\t\t\tfor(TrafficDefinitionElement e:selectedLayer.getElements()){\n\t\t\t\t\t\tif(e.isEnabled()){\n\t\t\t\t\t\t\tstatisticalDefinitionElements.add(e);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Generate traffic for statistical elements\n\t\t\tTrafficGenerator.GenerateActivityBasedTraffic(project.getRoadNetwork(), project.getJobTypes(), project.getActivityBasedTrafficVehicleSelection(), statisticalDefinitionElements, tripsList, routesList);\n\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Error while creating traffic for selected layers\");\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t}\n\n\t\t// Check to see if any trips or routes were generated\n\t\tif (tripsList.isEmpty() && routesList.isEmpty() && accidentRoutesList.isEmpty()) {\n\t\t\tJOptionPane.showMessageDialog(null, \"No trips or routes were generated\");\n\t\t}\n\n\t\t//Sort the generated lists by vehicle departure time\n\t\tCollections.sort(tripsList, new CustomComparator());\n\t\tCollections.sort(routesList, new CustomComparator());\n\t\tCollections.sort(accidentRoutesList, new CustomComparator());\n\t\t\n\t\t// Write the trips to the trip file\n\t\tif (!tripsList.isEmpty()) {\n\t\t\ttry {\n\t\t\t\tBufferedWriter tripout = new BufferedWriter(new FileWriter(sim.getExportPath() + File.separator + sim.getName() + \".generated-trips.xml\"));\n\n\t\t\t\ttripout.write(\"<tripdefs>\\n\");\n\n\t\t\t\t// Write the project's vehicle types\n\t\t\t\tfor (VehicleType vehicleType : project.getVehicleTypes()) {\n\t\t\t\t\ttripout.write(vehicleType.toXML());\n\t\t\t\t}\n\n\t\t\t\t// Write the generated trips\n\t\t\t\ttripout.write(tripsList.toString());\n\n\t\t\t\ttripout.write(\"</tripdefs>\");\n\n\t\t\t\ttripout.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error while writing trip file\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// Write the routes to the route file\n\t\tif (!routesList.isEmpty()) {\n\t\t\ttry {\n\t\t\t\tBufferedWriter routeout = new BufferedWriter(new FileWriter(sim.getExportPath() + File.separator + sim.getName() + \".generated-routes.xml\"));\n\n\t\t\t\trouteout.write(\"<routes>\\n\");\n\n\t\t\t\t// Write the project's vehicle types\n\t\t\t\tfor (VehicleType vehicleType : project.getVehicleTypes()) {\n\t\t\t\t\trouteout.write(vehicleType.toXML());\n\t\t\t\t}\n\n\t\t\t\t// Write the generated routes\n\t\t\t\trouteout.write(routesList.toString());\n\n\t\t\t\trouteout.write(\"</routes>\");\n\n\t\t\t\trouteout.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error while writing route file\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// Write the accident routes to the additional route file\n\t\tif (!accidentRoutesList.isEmpty()) {\n\t\t\ttry {\n\t\t\t\tBufferedWriter accidentRouteout = new BufferedWriter(new FileWriter(sim.getExportPath() + File.separator + sim.getName() + \".accidents.xml\"));\n\n\t\t\t\taccidentRouteout.write(\"<routes>\\n\");\n\n\t\t\t\t// If the vehicle types were not already written in another file\n\t\t\t\tif (routesList.isEmpty() && tripsList.isEmpty()) {\n\t\t\t\t\t// Write the project's vehicle types\n\t\t\t\t\tfor (VehicleType vehicleType : project.getVehicleTypes()) {\n\t\t\t\t\t\taccidentRouteout.write(vehicleType.toXML());\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Write the generated routes\n\t\t\t\taccidentRouteout.write(accidentRoutesList.toString());\n\n\t\t\t\taccidentRouteout.write(\"</routes>\");\n\n\t\t\t\taccidentRouteout.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error while writing accident routes file\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif ((!tripsList.isEmpty()) || (!routesList.isEmpty())) {\n\t\t\t// Run dua router utility to convert the trips to routes\n\t\t\tList<String> args = new ArrayList<String>();\n\n\t\t\targs.add(\"\\\"\" + ApplicationSettings.getDUARouterPath() + \"\\\"\");\n\n\t\t\tif (!tripsList.isEmpty()) {\n\t\t\t\targs.add(\"-t=\" + sim.getName() + \"\\\".generated-trips.xml\\\"\");\n\t\t\t}\n\t\t\tif (!routesList.isEmpty()) {\n\t\t\t\targs.add(\"-s=\" + sim.getName() + \"\\\".generated-routes.xml\\\"\");\n\t\t\t}\n\t\t\targs.add(\"-n=\" + sim.getName() + \"\\\".net.xml\\\"\");\n\t\t\targs.add(\"-o=\" + sim.getName() + \"\\\".rou.xml\\\"\");\n\t\t\targs.add(\"--continue-on-unbuild\");\n\n\t\t\ttry {\n\t\t\t\tProcessBuilder pb = new ProcessBuilder(args);\n\t\t\t\tpb.directory(new File(sim.getExportPath()));\n\n\t\t\t\tProcess dua = pb.start();\n\n\t\t\t\tStreamGobbler gi = new StreamGobbler(dua.getInputStream());\n\t\t\t\tStreamGobbler ge = new StreamGobbler(dua.getErrorStream());\n\n\t\t\t\tgi.start();\n\t\t\t\tge.start();\n\n\t\t\t\tint exitvalue = dua.waitFor();\n\n\t\t\t\tgi.stop();\n\t\t\t\tge.stop();\n\n\t\t\t\tList<String> gir = gi.getReadLines();\n\t\t\t\tList<String> ger = ge.getReadLines();\n\n\t\t\t\tfor (String s : ger) {\n\t\t\t\t\tSystem.out.println(s);\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error while generating routes from trips\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// Export the simulation configuration file\n\t\ttry {\n\t\t\tBufferedWriter out = new BufferedWriter(new FileWriter(sim.getExportPath() + File.separator + sim.getName() + \".sumo.cfg\"));\n\n\t\t\tStringBuilder cfgBuilder = new StringBuilder();\n\n\t\t\tcfgBuilder.append(\"<configuration>\\n\");\n\t\t\tcfgBuilder.append(\"<input-files>\\n\");\n\t\t\tcfgBuilder.append(\"<net-file>\" + sim.getName() + \".net.xml</net-file>\\n\");\n\n\t\t\tif ((!tripsList.isEmpty()) || (!routesList.isEmpty()) || (!accidentRoutesList.isEmpty())) {\n\n\t\t\t\tif (((!tripsList.isEmpty()) || (!routesList.isEmpty())) && (accidentRoutesList.isEmpty())) {\n\t\t\t\t\tcfgBuilder.append(\"<route-files>\");\n\t\t\t\t\tcfgBuilder.append(sim.getName() + \".rou.xml\");\n\t\t\t\t\tcfgBuilder.append(\"</route-files>\\n\");\n\t\t\t\t} else if ((tripsList.isEmpty()&& routesList.isEmpty()) && (!accidentRoutesList.isEmpty())) {\n\t\t\t\t\tcfgBuilder.append(\"<route-files>\");\n\t\t\t\t\tcfgBuilder.append(sim.getName() + \".accidents.xml\");\n\t\t\t\t\tcfgBuilder.append(\"</route-files>\\n\");\n\t\t\t\t} else {\n\t\t\t\t\tcfgBuilder.append(\"<route-files>\");\n\t\t\t\t\tcfgBuilder.append(sim.getName() + \".rou.xml\" + \";\" + sim.getName() + \".accidents.xml\");\n\t\t\t\t\tcfgBuilder.append(\"</route-files>\\n\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (sim.getExportPolygons()) {\n\t\t\t\tcfgBuilder.append(\"<additional-files>\" + sim.getName() + \".geometry.xml</additional-files>\\n\");\n\t\t\t}\n\n\t\t\tcfgBuilder.append(\"</input-files>\\n\");\n\t\t\tcfgBuilder.append(\"<netstate-dump>\" + sim.getName() + \".netdmp.xml</netstate-dump>\\n\");\n\t\t\tcfgBuilder.append(\"<simulation>\\n\");\n\t\t\tcfgBuilder.append(\"<begin>\" + sim.getBeginTime() + \"</begin>\\n\");\n\t\t\tcfgBuilder.append(\"<end>\" + sim.getEndTime() + \"</end>\\n\");\n\t\t\tcfgBuilder.append(\"</simulation>\\n\");\n\t\t\tcfgBuilder.append(\"</configuration>\\n\");\n\n\t\t\tout.write(cfgBuilder.toString());\n\n\t\t\tout.close();\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Error while writing simulation file\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t}\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if this e s f tournament is is single match. | @Override
public boolean isIsSingleMatch() {
return _esfTournament.isIsSingleMatch();
} | [
"@Override\n\tpublic boolean getIsSingleMatch() {\n\t\treturn _esfTournament.getIsSingleMatch();\n\t}",
"@Override\n\tpublic boolean isIsTeamMatch() {\n\t\treturn _esfTournament.isIsTeamMatch();\n\t}",
"@Override\n\tpublic boolean isIsIndividualMatch() {\n\t\treturn _esfTournament.isIsIndividualMatch();\n\t}",
"@Override\n\tpublic void setIsSingleMatch(boolean isSingleMatch) {\n\t\t_esfTournament.setIsSingleMatch(isSingleMatch);\n\t}",
"public boolean isExactMatch() {\n return exactMatch;\n }",
"public boolean isMultiMatch() {\n return (this.isSuccess() && this.getDistrictMatchLevel().compareTo(DistrictMatchLevel.HOUSE) < 0);\n }",
"@Override\n\tpublic boolean isIsNationalMatch() {\n\t\treturn _esfTournament.isIsNationalMatch();\n\t}",
"@Override\n\tpublic boolean getIsIndividualMatch() {\n\t\treturn _esfTournament.getIsIndividualMatch();\n\t}",
"@Override\n\tpublic boolean getIsTeamMatch() {\n\t\treturn _esfTournament.getIsTeamMatch();\n\t}",
"public boolean isExactMatch () { return exactMatch; }",
"public boolean isSinglePlayer(){\n if(model.getPlayerList().size()==1){\n return true;\n }\n return false;\n\n }",
"public boolean isSinglePlayerPlayable ()\n {\n // maybe it's just single player no problem\n int minPlayers = 2;\n if (match != null) {\n minPlayers = match.getMinimumPlayers();\n if (minPlayers <= 1) {\n return true;\n }\n }\n\n // or maybe it has AIs\n int aiCount = 0;\n for (Parameter param : params) {\n if (param instanceof AIParameter) {\n aiCount = ((AIParameter)param).maximum;\n }\n }\n return (minPlayers - aiCount) <= 1;\n }",
"@Override\n\tpublic boolean isIsJuniorMatch() {\n\t\treturn _esfTournament.isIsJuniorMatch();\n\t}",
"@Override\n\tpublic boolean getIsNationalMatch() {\n\t\treturn _esfTournament.getIsNationalMatch();\n\t}",
"private boolean isPlayerOneTurn()\n\t{\n\t\treturn appModel.getCurrentPlayer() == appModel.getPlayer1();\n\t}",
"boolean hasRequireAtLeastOneMatch();",
"public boolean simulateTournament() {\n\t\tif(!this.verifyTournamentValidity()) {\n\t\t\treturn false;\n\t\t}\n\t\tint stadiumIndex = 0;\n\t\tint matchWinningTeamNumber;\n\t\tfor(int i = 0; i<NUMBER_OF_TEAMS; i++) {\n\t\t\tfor(int j = 0; j<NUMBER_OF_TEAMS; j++) {\n\t\t\t\tif(i==j) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tmatchWinningTeamNumber = \n\t\t\t\t\t\tfindMatchWinningTeam(this.teamsEnrolledArray[i], \n\t\t\t\t\t\t\t\tthis.teamsEnrolledArray[j], this.stadiumsArray[stadiumIndex]);\n\t\t\t\tif(matchWinningTeamNumber==1) {\n\t\t\t\t\tthis.pointsArray[i] += 3;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.pointsArray[j] += 3;\n\t\t\t\t}\n\t\t\t\tstadiumIndex = (stadiumIndex+1)%this.numberOfStadiums;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"boolean getRequireAtLeastOneMatch();",
"com.google.protobuf.BoolValue getIsMatch();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new admin service impl using DaoImpl Singleton | public AdminServiceImpl() {
userDao = DaoImpl.getDaoImpl();
employeeDao = DaoImpl.getDaoImpl();
} | [
"public AdminImpl() {}",
"IAdminService getAdminService();",
"public AdminService() {\n }",
"public AdministratorDAO() {\n super();\n DAOClassType = Administrator.class;\n }",
"public static AdminDAOOperation getInstance(){\n\t\t\n\t\tif(instance == null){\n\t\t\tsynchronized(AdminDAOOperation.class){\n\t\t\t\tinstance= new AdminDAOOperation();\n\t\t\t}\n\t\t}\n\t\treturn instance;\n\t}",
"private ICATAdminSingleton() {\n }",
"public interface SysAdminService {\n\n /**\n * Save a sysAdmin.\n *\n * @param sysAdmin the entity to save\n * @return the persisted entity\n */\n SysAdmin save(SysAdmin sysAdmin);\n\n /**\n * Get all the sysAdmins.\n *\n * @return the list of entities\n */\n List<SysAdmin> findAll();\n\n\n /**\n * Get the \"id\" sysAdmin.\n *\n * @param id the id of the entity\n * @return the entity\n */\n Optional<SysAdmin> findOne(Long id);\n\n /**\n * Delete the \"id\" sysAdmin.\n *\n * @param id the id of the entity\n */\n void delete(Long id);\n\n /**\n * 管理员登陆验证\n */\n ResultObj adminLogin(AdminVM admin);\n}",
"public Admin createAdmin(){\n\t\ttry {\n\t\t\treturn conn.getAdmin();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}",
"public AdminService(ServiceAmbulanceRepository saRepository) {\n\t\tthis.initAdminService();\n\t\tthis.setAllCounters(saRepository);\n\t}",
"PromotionDaoImpl() {\r\n final BeanFactoryReference bf =\r\n SingletonBeanFactoryLocator.getInstance().useBeanFactory(\"contextDao\");\r\n this.daoFactory = (DaoFactory) bf.getFactory().getBean(\"daoFactory\");\r\n }",
"@Repository(\"adminDao\")\npublic interface AdminDao {\n\n void insert(Admin admin);\n\n void update(Admin admin);\n\n void delete(int aid);\n\n Admin select(int aid);\n\n List<Admin> selectAll();\n\n Admin login(String name);\n\n}",
"public AdministratorImpl() {\n\n\t}",
"private AdminWorkspaceDAO( )\r\n {\r\n }",
"public AdminBean() {\n }",
"public RoomServiceImpl(RoomDao roomDao) {\n this.roomDao=roomDao;\n }",
"public Admin(Integer adminId) {\r\n this.adminId = adminId;\r\n }",
"public static ApuntePorDefectoImpl getInstance(){\t\r\n\t\treturn apuntePorDefectoServiceImpl;\r\n\t}",
"public Admin() {\n\n\t}",
"public AdminApp() {\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ QueryInfo Filter Column Operator Operand Column is OB column Operator is > >= <= = like Operand is Value | @Test
public void test_query_04_81_where_LessEqual_ColumnValue_IntType()
{
Result<List<RowData>> result;
QueryInfo queryInfo = new QueryInfo();
RKey start_rowkey = new RKey(new CollectInfoKeyRule(2, (byte) '0', 1));
RKey end_rowkey = new RKey(new CollectInfoKeyRule(2, (byte) '0', 7));
prepare_ob_data();//prepare date
// prepare QueryInfo
prepareInfo(queryInfo, start_rowkey, end_rowkey);
addColumns(queryInfo);
Value val=new Value();
val.setNumber(lOwnerId[0]);
ObSimpleCond obSimpleCond = new ObSimpleCond("gm_create", ObSimpleCond.ObLogicOperator.LE,val);
ObSimpleFilter filter = new ObSimpleFilter();
filter.addCondition(obSimpleCond);
queryInfo.setFilter(filter);
// query operate
result = obClient.query(collectInfoTable.getTableName(), queryInfo);
Assert.assertEquals(ResultCode.OB_INVALID_ARGUMENT, result.getCode());
Assert.assertEquals(0, result.getResult().size());
} | [
"@Test\n\t\tpublic void test_query_04_76_where_LessEqual_ColumnValue_IntType()\n\t\t{\n\t\t\tResult<List<RowData>> result;\n\t\t QueryInfo queryInfo = new QueryInfo();\n\t\t RKey start_rowkey = new RKey(new CollectInfoKeyRule(2, (byte) '0', 1));\n\t\t RKey end_rowkey = new RKey(new CollectInfoKeyRule(2, (byte) '0', 7));\n\t\t \n\t\t prepare_ob_data();//prepare date\n\t\t \n\t\t\t// prepare QueryInfo\n\t\t \tprepareInfo(queryInfo, start_rowkey, end_rowkey);\n\t\t addColumns(queryInfo);\n\t\n\t\t Value val=new Value();\n\t\t\tval.setNumber(lOwnerId[0]);\n\t\t ObSimpleCond obSimpleCond = new ObSimpleCond(\"gm_modified\", ObSimpleCond.ObLogicOperator.LE,val);\n\t\t ObSimpleFilter filter = new ObSimpleFilter();\n\t\t filter.addCondition(obSimpleCond);\n\t\t queryInfo.setFilter(filter);\n\t\t \n\t\t // query operate\n\t\t result = obClient.query(collectInfoTable.getTableName(), queryInfo);\n\t\t Assert.assertEquals(ResultCode.OB_INVALID_ARGUMENT, result.getCode());\n\t\t Assert.assertEquals(0, result.getResult().size()); \t\n\t }",
"@Test\n\t\tpublic void test_query_04_87_where_LessEqual_ColumnValue_IntType()\n\t\t{\n\t\t\tResult<List<RowData>> result;\n\t\t QueryInfo queryInfo = new QueryInfo();\n\t\t RKey start_rowkey = new RKey(new CollectInfoKeyRule(2, (byte) '0', 1));\n\t\t RKey end_rowkey = new RKey(new CollectInfoKeyRule(2, (byte) '0', 7));\n\t\t \n\t\t prepare_ob_data();//prepare date\n\t\t \n\t\t\t// prepare QueryInfo\n\t\t \tprepareInfo(queryInfo, start_rowkey, end_rowkey);\n\t\t addColumns(queryInfo);\n\t\n\t\t Value val=new Value();\n\t\t\tval.setNumber(lOwnerId[0]);\n\t\t ObSimpleCond obSimpleCond = new ObSimpleCond(\"user_nick\", ObSimpleCond.ObLogicOperator.LE,val);\n\t\t ObSimpleFilter filter = new ObSimpleFilter();\n\t\t filter.addCondition(obSimpleCond);\n\t\t queryInfo.setFilter(filter);\n\t\t \n\t\t // query operate\n\t\t result = obClient.query(collectInfoTable.getTableName(), queryInfo);\n\t\t Assert.assertEquals(ResultCode.OB_INVALID_ARGUMENT, result.getCode());\n\t\t Assert.assertEquals(0, result.getResult().size()); \t\n\t }",
"@Test\n\t\tpublic void test_query_04_60_where_LessEqual_ColumnValue_IntType()\n\t\t{\n\t\t\tResult<List<RowData>> result;\n\t\t QueryInfo queryInfo = new QueryInfo();\n\t\t RKey start_rowkey = new RKey(new CollectInfoKeyRule(2, (byte) '0', 1));\n\t\t RKey end_rowkey = new RKey(new CollectInfoKeyRule(2, (byte) '0', 7));\n\t\t \n\t\t prepare_ob_data();//prepare date\n\t\t \n\t\t\t// prepare QueryInfo\n\t\t \tprepareInfo(queryInfo, start_rowkey, end_rowkey);\n\t\t addColumns(queryInfo);\n\t\n\t\t Value val=new Value();\n\t\t\tval.setNumber(lOwnerId[0]);\n\t\t ObSimpleCond obSimpleCond = new ObSimpleCond(\"owner_id\", ObSimpleCond.ObLogicOperator.LE,val);\n\t\t ObSimpleFilter filter = new ObSimpleFilter();\n\t\t filter.addCondition(obSimpleCond);\n\t\t queryInfo.setFilter(filter);\n\t\t \n\t\t // query operate\n\t\t result = obClient.query(collectInfoTable.getTableName(), queryInfo);\n\t\t Assert.assertEquals(ResultCode.OB_SUCCESS, result.getCode());\n\t\t Assert.assertEquals(2, result.getResult().size());\n\t\t for( int i = 0; i < 2; i++)\n\t\t {\n\t\t \tcheck_query_result(result.getResult().get(i), i); \t\n\t\t } }",
"@Test\n\t\tpublic void test_query_04_93_where_LessEqual_ColumnValue_IntType()\n\t\t{\n\t\t\tResult<List<RowData>> result;\n\t\t QueryInfo queryInfo = new QueryInfo();\n\t\t RKey start_rowkey = new RKey(new CollectInfoKeyRule(2, (byte) '0', 1));\n\t\t RKey end_rowkey = new RKey(new CollectInfoKeyRule(2, (byte) '0', 7));\n\t\t \n\t\t prepare_ob_data();//prepare date\n\t\t \n\t\t\t// prepare QueryInfo\n\t\t \tprepareInfo(queryInfo, start_rowkey, end_rowkey);\n\t\t addColumns(queryInfo);\n\t\n\t\t Value val=new Value();\n\t\t\tval.setNumber(lOwnerId[0]);\n\t\t ObSimpleCond obSimpleCond = new ObSimpleCond(\"collect_time\", ObSimpleCond.ObLogicOperator.LE,val);\n\t\t ObSimpleFilter filter = new ObSimpleFilter();\n\t\t filter.addCondition(obSimpleCond);\n\t\t queryInfo.setFilter(filter);\n\t\t \n\t\t // query operate\n\t\t result = obClient.query(collectInfoTable.getTableName(), queryInfo);\n\t\t Assert.assertEquals(ResultCode.OB_INVALID_ARGUMENT, result.getCode());\n\t\t Assert.assertEquals(0, result.getResult().size()); \t\n\t }",
"private void getComparisonOperator() {\n if(getType() == QueryTokenType.NAME) {\n \n if(getValue().equals(\"LIKE\")) {\n \n comparisonOperator = ComparisonOperators.LIKE;\n return;\n }\n throw new RuntimeException(\"Parser\");\n \n } else if(getType() == QueryTokenType.OPERATOR) {\n \n if(getValue().equals(\">\")) {\n comparisonOperator = ComparisonOperators.GREATER;\n \n } else if(getValue().equals(\">=\")) {\n comparisonOperator = ComparisonOperators.GREATER_OR_EQUALS;\n \n } else if(getValue().equals(\"<\")) {\n comparisonOperator = ComparisonOperators.LESS;\n \n } else if(getValue().equals(\"<=\")) {\n comparisonOperator = ComparisonOperators.LESS_OR_EQUALS;\n \n } else if(getValue().equals(\"=\")) {\n comparisonOperator = ComparisonOperators.EQUALS;\n \n } else if(getValue().equals(\"!=\")) {\n comparisonOperator = ComparisonOperators.NOT_EQUALS;\n \n } else {\n throw new RuntimeException(\"Parser\");\n }\n \n } else {\n throw new RuntimeException(\"Parser\");\n } \n }",
"pb.lyft.datacatalog.Datacatalog.QueryOperator getOperator();",
"private String getHqlOperator() {\r\n // determine the operator\r\n String operator = null;\r\n if (searchCriterion != null) {\r\n switch (searchCriterion.getOperator()) {\r\n case EQUALS:\r\n operator = EQUALS;\r\n break;\r\n case DIFFERENTS:\r\n operator = DIFFERENT;\r\n break;\r\n case GREATER_THAN_OR_EQUAL:\r\n operator = \">=\";\r\n break;\r\n case LESS_THAN_OR_EQUAL:\r\n operator = \"<=\";\r\n break;\r\n case GREATER_THAN:\r\n operator = \">\";\r\n break;\r\n case LESS_THAN:\r\n operator = \"<\";\r\n break;\r\n case IS_NULL:\r\n operator = IS_NULL;\r\n break;\r\n case IS_NOT_NULL:\r\n operator = IS_NOT_NULL;\r\n break;\r\n case BETWEEN:\r\n // nothings to do\r\n break;\r\n case NOT_BETWEEN:\r\n // nothings to do\r\n break;\r\n case STRICTLY_BETWEEN:\r\n // nothings to do\r\n break;\r\n case STRICTLY_NOT_BETWEEN:\r\n // nothings to do\r\n break;\r\n default:\r\n logger.fatal(\"Unknown operator.\");\r\n break;\r\n }\r\n }\r\n return operator;\r\n }",
"public static Table anyOp(Table myTable, String op, String query) {\r\n\t\tTable subQueryTable=TableOps.select(query.substring(query.indexOf('(')+1, query.lastIndexOf(')')));\r\n\t\tTable retTable;\r\n\t\tdouble minMaxVal;\r\n\t\tif(op.contains(\">\")) {\r\n\t\t\tminMaxVal=SingleValOps.min(subQueryTable, subQueryTable.getColName(0));\r\n\t\t\tsubQueryTable=HelperFunctions.createTable(\"ANY(\"+query+\")\",CompareOps.DOUBLE, myTable.getRowCount(), String.valueOf(minMaxVal));\r\n\t\t\t//use drew's ops to save code\r\n\t\t\tif(op.contains(\"=\"))\r\n\t\t\t\tretTable=CompareOps.greaterEqual(myTable, subQueryTable);\r\n\t\t\telse\r\n\t\t\t\tretTable=CompareOps.greaterThan(myTable, subQueryTable);\r\n\t\t}\r\n\t\telse if(op.contains(\"<\")) {\r\n\t\t\tminMaxVal=SingleValOps.max(subQueryTable, subQueryTable.getColName(0));\r\n\t\t\tsubQueryTable=HelperFunctions.createTable(\"ANY(\"+query+\")\",CompareOps.DOUBLE, myTable.getRowCount(), String.valueOf(minMaxVal));\r\n\t\t\tif(op.contains(\"=\"))\r\n\t\t\t\tretTable=CompareOps.lessEqual(myTable, subQueryTable);\r\n\t\t\telse\r\n\t\t\t\tretTable=CompareOps.lessThan(myTable, subQueryTable);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t//equals comparison, match anything on the left with anything on the right for true\r\n\t\t\tretTable=HelperFunctions.createTable(\"ANY(\"+query+\")\",CompareOps.BOOLEAN, myTable.getRowCount(), CompareOps.FALSE);\r\n\t\t\t//Create a false table then or it with equals' return value for every single row in subQuery\r\n\t\t\tfor(int ctr=0; ctr<subQueryTable.getRowCount(); ++ctr)\r\n\t\t\t\tretTable=CompareOps.or(retTable, CompareOps.equals(myTable, HelperFunctions.createTable(\"ANY(\"+query+\")\",CompareOps.STRING, myTable.getRowCount(), subQueryTable.getValueAt(ctr, 0).toString())));\r\n\t\t}\r\n\t\treturn retTable;\r\n\t}",
"ColumnInfoFilter getColumnInfoFilter();",
"ColumnOperand createColumnOperand();",
"cn.infinivision.dataforce.busybee.pb.meta.Expr getCondition();",
"public BinaryComparisonQueryExp(int operation, ValueExp first, ValueExp second)\n {\n this.operation = operation;\n this.first = first;\n this.second = second;\n }",
"@Override\n public String toString()\n {\n switch (_operator)\n {\n case '=':\n return \" = '\" + _keywords + \"'\";\n case ':':\n return \" LIKE '\" + _keywords + \"%'\";\n case '~':\n return \" LIKE '%\" + _keywords + \"%'\";\n default:\n throw new IllegalArgumentException (\"Unsupported operator encountered: \" + _operator);\n }\n }",
"static BiPredicate<SibillaValue,SibillaValue> getRelationOperator(String op) {\n if (op.equals(\"<\")) { return (x,y) -> x.doubleOf()<y.doubleOf(); }\n if (op.equals(\"<=\")) { return (x,y) -> x.doubleOf()<=y.doubleOf(); }\n if (op.equals(\"==\")) { return (x,y) -> x.doubleOf()==y.doubleOf(); }\n if (op.equals(\"!=\")) { return (x,y) -> !x.equals(y); }\n if (op.equals(\">\")) { return (x,y) -> x.doubleOf()>y.doubleOf(); }\n if (op.equals(\">=\")) { return (x,y) -> x.doubleOf()>=y.doubleOf(); }\n return (x,y) -> false;\n }",
"private String constructBetweenQuery(String firstOperator, String secondOperator, String columnName, String glueOperator) {\r\n String queryPart = firstOperator;\r\n queryPart += SPACE;\r\n queryPart += DOUBLE_POINTS;\r\n queryPart += hqlParameterName + \"minBoundary\";\r\n\r\n queryPart += SPACE;\r\n queryPart += glueOperator;\r\n queryPart += SPACE;\r\n\r\n queryPart += getHqlColumnName(columnName);\r\n queryPart += secondOperator;\r\n queryPart += SPACE;\r\n queryPart += DOUBLE_POINTS;\r\n queryPart += hqlParameterName + \"maxBoundary\";\r\n\r\n return queryPart;\r\n }",
"public String whereClause() {\n Map<String, ArrayList<String>> map = filter.getFilterArray();\n String query = \"\";\n if (map.size() != 0) {\n query += \"WHERE \";\n if (map.containsKey(\"dateRange\")) {\n String[] two = map.get(\"dateRange\").get(0).split(\"\\\\+\");\n query += \"ImpressionDate between '\" + two[0] + \" 00:00:00' and '\" + two[1] + \" 23:59:00'\";\n }\n if (map.containsKey(\"gender\")) {\n if (!query.endsWith(\"WHERE \")) {\n query += \" AND \";\n }\n if (map.get(\"gender\").size() == 1) {\n query += \"Gender = '\" + map.get(\"gender\").get(0) + \"'\";\n }\n if (map.get(\"gender\").size() != 1) {\n query += \"(\";\n query += \"Gender = '\" + map.get(\"gender\").get(0) + \"'\";\n\n for (int i = 0; i < map.get(\"gender\").size(); i++) {\n if(i == 0)\n continue;\n else\n query += \" OR Gender = '\" + map.get(\"gender\").get(i) + \"'\";\n }\n query += \") \";\n }\n }\n\n if (map.containsKey(\"age\")) {\n if (!query.endsWith(\"WHERE \")) {\n query += \" AND \";\n }\n if (map.get(\"age\").size() == 1) {\n query += \"Age = '\" + map.get(\"age\").get(0) + \"'\";\n }\n if (map.get(\"age\").size() != 1) {\n query += \"(\";\n query += \"Age = '\" + map.get(\"age\").get(0) + \"'\";\n\n for (int i = 0; i < map.get(\"age\").size(); i++) {\n if(i == 0)\n continue;\n else\n query += \" OR Age = '\" + map.get(\"age\").get(i) + \"'\";\n }\n query += \") \";\n }\n }\n\n if (map.containsKey(\"income\")) {\n if (!query.endsWith(\"WHERE \")) {\n query += \" AND \";\n }\n if (map.get(\"income\").size() == 1) {\n query += \"Income = '\" + map.get(\"income\").get(0) + \"'\";\n }\n if (map.get(\"income\").size() > 1) {\n query += \"(\";\n query += \"Income = '\" + map.get(\"income\").get(0) + \"'\";\n\n for (int i = 0; i < map.get(\"income\").size(); i++) {\n if(i == 0)\n continue;\n else\n query += \" OR Income = '\" + map.get(\"income\").get(i) + \"'\";\n }\n query += \") \";\n }\n }\n if (map.containsKey(\"context\")) {\n if (!query.endsWith(\"WHERE \")) {\n query += \" AND \";\n }\n if (map.get(\"context\").size() == 1) {\n query += \"Context = '\" + map.get(\"context\").get(0) + \"'\";\n }\n if (map.get(\"context\").size() > 1) {\n query += \"(\";\n query += \"Context = '\" + map.get(\"context\").get(0) + \"'\";\n\n for (int i = 0; i < map.get(\"context\").size(); i++) {\n if(i == 0)\n continue;\n else\n query += \" OR Context = '\" + map.get(\"context\").get(i) + \"'\";\n }\n query += \") \";\n }\n }\n query += \";\";\n }\n return query;\n }",
"private void parseQuery() {\n\t\ttry {\n\t\t\tToken nextToken = lexer.nextToken();\n\t\t\tToken lastToken = null;\n\t\t\tIFieldValueGetter lastValueGetter = null;\n\t\t\tString lastLiteral = null;\n\t\t\tIComparisonOperator lastOperator = null;\n\t\t\twhile (nextToken.getType() != TokenType.EOF) {\n\t\t\t\tif (nextToken.getType() == TokenType.ATRIBUT) {\n\t\t\t\t\tif (lastToken != null && lastToken.getType() != TokenType.LOGICAL_OPERATOR) {\n\t\t\t\t\t\tthrow new IllegalArgumentException(\"Wrong query given.\");\n\t\t\t\t\t}\n\t\t\t\t\tif (nextToken.getValue().equals(\"jmbag\")) {\n\t\t\t\t\t\tlastValueGetter = FieldValueGetters.JMBAG;\n\t\t\t\t\t} else if (nextToken.getValue().equals(\"lastName\")) {\n\t\t\t\t\t\tlastValueGetter = FieldValueGetters.LAST_NAME;\n\t\t\t\t\t} else if (nextToken.getValue().equals(\"firstName\")) {\n\t\t\t\t\t\tlastValueGetter = FieldValueGetters.FIRST_NAME;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new IllegalArgumentException(\"Wrong atribute given.\");\n\t\t\t\t\t}\n\t\t\t\t} else if (nextToken.getType() == TokenType.OPERATOR) {\n\t\t\t\t\tif (lastToken == null || lastToken.getType() != TokenType.ATRIBUT) {\n\t\t\t\t\t\tthrow new IllegalArgumentException(\"Wrong query given\"); \n\t\t\t\t\t}\n\t\t\t\t\tif (nextToken.getValue().equals(\"<\")) {\n\t\t\t\t\t\tlastOperator = ComparisonOperators.LESS;\n\t\t\t\t\t} else if (nextToken.getValue().equals(\"<=\")) {\n\t\t\t\t\t\tlastOperator = ComparisonOperators.LESS_OR_EQUALS;\n\t\t\t\t\t} else if (nextToken.getValue().equals(\">\")) {\n\t\t\t\t\t\tlastOperator = ComparisonOperators.GREATER;\n\t\t\t\t\t} else if (nextToken.getValue().equals(\">=\")) {\n\t\t\t\t\t\tlastOperator = ComparisonOperators.GREATER_OR_EQUALS;\n\t\t\t\t\t} else if (nextToken.getValue().equals(\"=\")) {\n\t\t\t\t\t\tlastOperator = ComparisonOperators.EQUALS;\n\t\t\t\t\t} else if (nextToken.getValue().equals(\"!=\")) {\n\t\t\t\t\t\tlastOperator = ComparisonOperators.NOT_EQUALS;\n\t\t\t\t\t} else if (nextToken.getValue().equals(\"LIKE\")) {\n\t\t\t\t\t\tlastOperator = ComparisonOperators.LIKE;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new IllegalArgumentException(\"Wrong operator given.\");\n\t\t\t\t\t}\n\t\t\t\t} else if (nextToken.getType() == TokenType.STRING_LITERAL) {\n\t\t\t\t\tif (lastToken == null || lastToken.getType() != TokenType.OPERATOR) {\n\t\t\t\t\t\tthrow new IllegalArgumentException(\"Wrong query given.\"); \n\t\t\t\t\t}\n\t\t\t\t\tif (lastToken.getType() == TokenType.OPERATOR && lastToken.getValue().equals(\"LIKE\")) {\n\t\t\t\t\t\tlong numOfWildcards = nextToken.getValue().chars().filter(symbol -> symbol == '*').count();\n\t\t\t\t\t\tif (numOfWildcards > 1) {\n\t\t\t\t\t\t\tthrow new IllegalArgumentException(\"Wrong number of wildcards entered.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlastLiteral = nextToken.getValue();\n\t\t\t\t} else if (nextToken.getType() == TokenType.LOGICAL_OPERATOR) {\n\t\t\t\t\tif (lastToken == null || lastToken.getType() != TokenType.STRING_LITERAL) {\n\t\t\t\t\t\tthrow new IllegalArgumentException(\"Wrong query given.\");\n\t\t\t\t\t}\n\t\t\t\t\tconditionalExpressions.add(new ConditionalExpression(lastValueGetter, lastLiteral, lastOperator));\n\t\t\t\t} else {\n\t\t\t\t\tthrow new IllegalArgumentException(\"Unknown token given.\");\n\t\t\t\t}\n\t\t\t\tlastToken = nextToken;\n\t\t\t\tnextToken = lexer.nextToken();\n\t\t\t}\n\t\t\tconditionalExpressions.add(new ConditionalExpression(lastValueGetter, lastLiteral, lastOperator));\n\t\t} catch (LexerException ex) {\n\t\t\tthrow new IllegalArgumentException(ex.getMessage());\n\t\t}\n\t}",
"QueryOperation getQueryOperation();",
"LikeOperand createLikeOperand();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true iff the argument indicates the same algorithm with the same parameters. | public boolean equals(AlgorithmId other) {
boolean paramsEqual =
(params == null ? other.params == null : params.equals(other.params));
return (algid.equals(other.algid) && paramsEqual);
} | [
"public boolean isMultipleAlgorithms() {\n return inputMap.size() > 1;\n }",
"public boolean isEquals() {\n long len = -1L;\n\n //1. check the lengths of the words\n for(S left : slp.getAxioms()) {\n if(len == -1L) {\n len = slp.length(left);\n }\n else {\n if(len != slp.length(left)) {\n return false;\n }\n }\n }\n\n // all words are the empty word\n if(len == 0) {\n return true;\n }\n\n // 2. the length are all equals and not zero => execute the recompression\n execute();\n\n S otherSymbol = null;\n boolean first = true;\n\n // 3. chech now if for all axioms X : |val(X)| = 1 and all val(X) are equals.\n for(S left : slp.getAxioms()) {\n if(first) {\n slp.length(left, true);\n first = false;\n }\n\n if(slp.length(left) != 1) {\n return false;\n }\n else {\n S symbol = slp.get(left, 1);\n if(otherSymbol == null) {\n otherSymbol = symbol;\n }\n\n if(!symbol.equals(otherSymbol)) {\n return false;\n }\n }\n }\n\n return true;\n }",
"private boolean isSameData(GroupControllerParameter param, \n\t\t\t\t\t\t\t\tParameter[] array)\n\t{\n\t\t//#CM50724\n\t\t//<en>Key to compare</en>\n\t\t//#CM50725\n\t\t//<en>Value which is unused in normal processes</en> \n\t\tint newAgcNo = 99999; \n\t\t//#CM50726\n\t\t//<en>Value which is unused in normal processes</en> \n\t\tint orgAgcNo = 99999; \n\t\t\n\t\t//#CM50727\n\t\t//<en>If there is the entered data summary,</en>\n\t\tif(array.length > 0)\n\t\t{\n\t\t\t//#CM50728\n\t\t\t//<en>Compare by the storage type appended in this process.</en>\n\t\t\tnewAgcNo = param.getControllerNumber();\n\t\t\t\n\t\t\tfor (int i = 0 ; i < array.length ; i++)\n\t\t\t{\n\t\t\t\tGroupControllerParameter castparam = (GroupControllerParameter)array[i];\n\t\t\t\t//#CM50729\n\t\t\t\t//<en>Key for the entered data summary</en>\n\t\t\t\torgAgcNo = castparam.getControllerNumber();\n\t\t\t\t//#CM50730\n\t\t\t\t//<en>Check the identical AGCNo.</en>\n\t\t\t\tif ( newAgcNo == orgAgcNo )\n\t\t\t\t{\n\t\t\t\t\t//#CM50731\n\t\t\t\t\t//<en>6123046 = The data is already entered. Cannot input the identical AGC no.</en>\n\t\t\t\t\tsetMessage(\"6123046\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"@Test\r\n public void testHasSameParameters() {\r\n\r\n assertTrue(instance.hasSameParameters(instance));\r\n assertTrue(instance.hasSameParameters(instance00));\r\n assertTrue(instance.hasSameParameters(instance05));\r\n assertTrue(instance.hasSameParameters(instance05));\r\n assertTrue(instance.hasSameParameters(publisher));\r\n\r\n assertFalse(instance.hasSameParameters(instance01));\r\n assertFalse(instance.hasSameParameters(instance02));\r\n assertFalse(instance.hasSameParameters(null)); \r\n }",
"boolean hasHasArgumentFunctionPair();",
"static boolean argEquals(LObjBoolPair the, Object that) {\n return Null.equals(the, that, (one, two) -> {\n // Intentionally all implementations of LObjBoolPair are allowed.\n if (!(two instanceof LObjBoolPair)) {\n return false;\n }\n\n LObjBoolPair other = (LObjBoolPair) two;\n\n return argEquals(one.first(), one.second(), other.first(), other.second());\n });\n }",
"@Test\r\n public void testHasSameParameters() {\r\n\r\n assertTrue(instance.hasSameParameters(instance));\r\n assertTrue(instance.hasSameParameters(instance00));\r\n assertTrue(instance.hasSameParameters(instance01));\r\n assertTrue(instance.hasSameParameters(instance05));\r\n assertTrue(instance.hasSameParameters(instance07));\r\n assertTrue(instance.hasSameParameters(instance09));\r\n assertTrue(instance.hasSameParameters(instance11));\r\n assertTrue(instance.hasSameParameters(instance13));\r\n assertTrue(instance.hasSameParameters(instance18));\r\n assertTrue(instance18.hasSameParameters(instance));\r\n assertTrue(instance.hasSameParameters(personAddressLink));\r\n\r\n assertFalse(instance.hasSameParameters(instance02));\r\n assertFalse(instance.hasSameParameters(instance03));\r\n assertFalse(instance.hasSameParameters(instance04));\r\n assertFalse(instance.hasSameParameters(null));\r\n }",
"@Override\n public boolean equals(Object obj) {\n if (obj == this) return true;\n if (obj instanceof Method) {\n Method other = (Method)obj;\n if ((getDeclaringClass() == other.getDeclaringClass()) && (getName() == other.getName())) {\n if (!returnType.equals(other.getReturnType())) return false;\n Class[] params1 = getParameterTypes();\n Class[] params2 = other.getParameterTypes();\n return params1 == params2;\n }\n }\n return false;\n }",
"private boolean isParameterEqual(DifficultyCalculationParameters parameter1,\n DifficultyCalculationParameters parameter2) {\n if (parameter1.customSpeedMultiplier != parameter2.customSpeedMultiplier) {\n return false;\n }\n\n if (parameter1.isForceAR() != parameter2.isForceAR()) {\n return false;\n }\n\n // If both parameters enable force AR, check for equality.\n if (parameter1.isForceAR() && parameter2.isForceAR()\n && parameter1.forcedAR != parameter2.forcedAR) {\n return false;\n }\n\n // Check whether mods are equal.\n return parameter1.mods.size() == parameter2.mods.size() &&\n parameter1.mods.containsAll(parameter2.mods);\n }",
"private boolean methodParametersEqualsPattern(MethodBinding method) {\n TypeBinding[] methodParameters = method.parameters;\n int length = methodParameters.length;\n if (length != this.pattern.parameterSimpleNames.length)\n return false;\n for (int i = 0; i < length; i++) {\n char[] paramQualifiedName = qualifiedPattern(this.pattern.parameterSimpleNames[i], this.pattern.parameterQualifications[i]);\n if (!CharOperation.match(paramQualifiedName, methodParameters[i].readableName(), this.isCaseSensitive)) {\n return false;\n }\n }\n return true;\n }",
"private boolean methodEqueals(Method m1, Method m2) {\n\t\tif (m1.getName() == m2.getName()) {\n\t\t\tif (!m1.getReturnType().equals(m2.getReturnType()))\n\t\t\t\treturn false;\n\t\t\tClass<?>[] params1 = m1.getParameterTypes();\n\t\t\tClass<?>[] params2 = m2.getParameterTypes();\n\t\t\tif (params1.length == params2.length) {\n\t\t\t\tfor (int i = 0; i < params1.length; i++) {\n\t\t\t\t\tif (params1[i] != params2[i])\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"private boolean argumentsEquals(Command other) {\n return Arrays.equals(this.arguments, other.arguments);\n }",
"Boolean same(MultiSet<X> s);",
"private static boolean isSameConstructor(Constructor<?> constructor,\n\t\t\tClass<?>[] params) {\n\t\tif (params == null){\n\t\t\treturn false;\n\t\t}\n\t\tClass<?>[] parameters = constructor.getParameterTypes();\n\t\treturn areParameterTypesTheSame(params, parameters);\n\t}",
"public boolean allSameValue(String ofAttribute);",
"boolean isEqual(Identifier identifier);",
"protected abstract boolean _hasSameBehavior(T a, T b);",
"public static boolean same(int[] a, int[] b) {\r\n \treturn (a[0] == b[0] && a[1] == b[1]) || (a[0] == b[1] && a[1] == b[0]);\r\n }",
"public abstract boolean selectSameValue();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parse out type in schema json and convert to field name and type pairs for CREATE TABLE statement. | private String parseColumnNameAndTypesInSchemaJson(String schema) {
JSONObject json = (JSONObject) new JSONObject(schema).query("/mappings/properties");
return json.keySet().stream().
map(colName -> colName + " " + mapToJDBCType(json.getJSONObject(colName).getString("type")))
.collect(joining(","));
} | [
"SchemaType createSchemaType();",
"public TypeData getTypeData(MigrationType type);",
"static public org.apache.spark.sql.avro.SchemaConverters.SchemaType toSqlType (org.apache.avro.Schema avroSchema) { throw new RuntimeException(); }",
"public String createHiveSchema(String json) throws JSONException {\n JSONObject jo = new JSONObject(json);\n \n @SuppressWarnings(\"unchecked\")\n Iterator<String> keys = jo.keys();\n keys = new OrderedIterator(keys);\n StringBuilder sb = new StringBuilder(\"CREATE TABLE \").append(tableName).append(\"\\n\");\n \n while (keys.hasNext()) {\n String k = keys.next();\n sb.append(\" \");\n sb.append(k.toString());\n sb.append(' ');\n sb.append(valueToHiveSchema(jo.opt(k)));\n sb.append(',').append(\"\\n\");\n }\n \n sb.replace(sb.length() - 2, sb.length(), \")\\n\"); // remove last comma\n return sb.append(\"ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe';\").toString();\n }",
"com.google.cloud.bigquery.storage.v1beta2.TableFieldSchema.Type getType();",
"String getSchemaType();",
"private Map<String, Integer> getUserTableTypeMetaData(Connection conn, String name) throws SQLException{\n\t\t\n\t\tMap<String, Integer> colNameType = new HashMap<String, Integer>();\n\t\tPreparedStatement preparedStatement = conn.prepareStatement(TestCDTAnyDB.USER_TABLE_TYPE_QUERY);\n\t\tpreparedStatement.setString(1, name);\n\t\tResultSet rs = preparedStatement.executeQuery();\n\n\t while (rs.next()) {\n\t String colName = rs.getString(\"name\");\n\t String colType = rs.getString(\"type\");\n\t if (TYPE_MAPPING.get(colType) == null ) {\n\t \tLOG.error(\"SQL Server type \" + colType + \" hasn't been mapped in JDBC types \");\n\t \t//throw new Exception(\"wsef\");\n\t }\n\t colNameType.put(colName, TYPE_MAPPING.get(colType));\n\t }\n\t \n\t return colNameType;\t \n\t}",
"private void createDynamicTypes() {\n\n Type root = SDOUtil.createType(helperContext, getDefaultURI(), \"DataGraphRoot\", false);\n\t\tif (this.logger.isDebugEnabled()) {\n\t\t\tthis.logger.debug(\"GBMD.createDynamicTypes():created Type for \"+getDefaultURI());\n\t\t}\n\n\t\tIterator iter = getResultMetadata().iterator();\n while (iter.hasNext()) {\n\n ResultMetadata resultMetadata = (ResultMetadata) iter.next();\n\n\t\t\t// Create a Type for each Table represented in the ResultSet\n\t\t\tIterator names = resultMetadata.getAllTablePropertyNames().iterator();\n\t\t\twhile (names.hasNext()) {\n\t\t\t\tString tableName = (String) names.next();\n\t\t\t\tif (root.getProperty(tableName) == null) {\n\t\t\t\t\tType tableType = SDOUtil.createType(helperContext, getDefaultURI(), tableName, false);\n\t\t\t\t\tProperty property = SDOUtil.createProperty(root, tableName, tableType);\n\t\t\t\t\tSDOUtil.setMany(property, true);\n\t\t\t\t\tSDOUtil.setContainment(property, true);\n\t\t\t\t\tif (this.logger.isDebugEnabled()) {\n\t\t\t\t\t\tthis.logger.debug(\"GBMD.createDynamicTypes():CREATING NEW TABLE TYPE & PROPERTY :\"+tableName);\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// TODO tablePropertyMap is temporary until Tuscany-203 is fixed\n\t\t\tMap tablePropertyMap = new HashMap();\n\n\t\t\tfor (int i = 1; i <= resultMetadata.getResultSetSize(); i++) {\n\n\t\t\t\tProperty ref = root.getProperty(resultMetadata.getTablePropertyName(i));\n\n\t\t\t\tif (ref == null) {\n\t\t\t\t\tthrow new RuntimeException(\"Could not find table \" + resultMetadata.getTablePropertyName(i) \n\t\t\t\t\t\t\t+ \" in the SDO model\");\n\t\t\t\t}\n\n\t\t\t\t// TODO Temporary code to check to see if a property has already been added.\n\t\t\t\t// Replace when Tuscany-203 is fixed\n\t\t\t\tList addedProperties = (List) tablePropertyMap.get(ref.getName());\n\t\t\t\tif (addedProperties == null) {\n\t\t\t\t\taddedProperties = new ArrayList();\n\t\t\t\t\ttablePropertyMap.put(ref.getName(), addedProperties);\n\t\t\t\t}\n\n\n\n\t\t\t\tString columnName = resultMetadata.getColumnPropertyName(i);\n\n\t\t\t\t// TODO temporary check until Tuscany-203 is fixed\n\t\t\t\tif (!addedProperties.contains(columnName)) {\n\t\t\t\t\taddedProperties.add(columnName);\n\t\t\t\t\tType atype = resultMetadata.getDataType(i);\n\n\t\t\t\t\tSDOUtil.createProperty(ref.getType(), columnName, atype);\n\n\t\t\t\t}\n\n\t\t\t}\n }\n\n MappingWrapper wrapper = getConfigWrapper();\n Iterator i = getRelationships().iterator();\n while (i.hasNext()) {\n Relationship r = (Relationship) i.next();\n\n String parentName = wrapper.getTableTypeName(r.getPrimaryKeyTable());\n String childName = wrapper.getTableTypeName(r.getForeignKeyTable());\n\n if (parentName == null) {\n throw new RuntimeException(\"The parent table (\" + r.getPrimaryKeyTable() \n + \") in relationship \" + r.getName()\n + \" was not found in the mapping information.\");\n } else if (childName == null) {\n throw new RuntimeException(\"The child table (\" + r.getForeignKeyTable() \n + \") in relationship \" + r.getName()\n + \" was not found in the mapping information.\");\n }\n\n Property parentProperty = root.getProperty(parentName);\n Property childProperty = root.getProperty(childName);\n\n if (parentProperty == null) {\n throw new RuntimeException(\"The parent table (\" + parentName + \") in relationship \" \n + r.getName() + \" was not found.\");\n } else if (childProperty == null) {\n throw new RuntimeException(\"The child table (\" + childName + \") in relationship \" \n + r.getName() + \" was not found.\");\n }\n\n Type parent = parentProperty.getType();\n Type child = childProperty.getType();\n\n Property parentProp = SDOUtil.createProperty(parent, r.getName(), child);\n Property childProp = SDOUtil.createProperty(child, r.getName() + \"_opposite\", parent);\n SDOUtil.setOpposite(parentProp, childProp);\n SDOUtil.setOpposite(childProp, parentProp);\n SDOUtil.setMany(parentProp, r.isMany());\n }\n\n this.rootType = root;\n }",
"@Test void testInterpretTableFunctionWithDynamicType() {\n SchemaPlus schema = rootSchema.add(\"s\", new AbstractSchema());\n final TableFunction table1 =\n TableFunctionImpl.create(Smalls.DYNAMIC_ROW_TYPE_TABLE_METHOD);\n schema.add(\"dynamicRowTypeTable\", table1);\n final String sql = \"select *\\n\"\n + \"from table(\\\"s\\\".\\\"dynamicRowTypeTable\\\"('\"\n + \"{\\\"nullable\\\":false,\\\"fields\\\":[\"\n + \" {\\\"name\\\":\\\"i\\\",\\\"type\\\":\\\"INTEGER\\\",\\\"nullable\\\":false},\"\n + \" {\\\"name\\\":\\\"d\\\",\\\"type\\\":\\\"DATE\\\",\\\"nullable\\\":true}\"\n + \"]}', 0))\\n\"\n + \"where \\\"i\\\" < 0 and \\\"d\\\" is not null\";\n sql(sql).returnsRows();\n }",
"static void addTypeInfo(String typeInfoTableName, List<MetaItemField> metafields) throws DatabaseWrapperOperationException {\n \t\tStringBuilder sb = new StringBuilder(\"INSERT INTO \");\n \t\tsb.append(typeInfoTableName);\n \t\tsb.append(\" ( \");\n \n \t\t// The 'while iterator loop' is used here because it is cheaper and more reliable than a foreach\n \t\t// to add commas ',' in between elements\n \t\tIterator<MetaItemField> it = metafields.iterator();\t\t\n \t\twhile(it.hasNext()) {\n \t\t\tString fieldName = DatabaseStringUtilities.encloseNameWithQuotes(it.next().getName()); \n \t\t\tsb.append(fieldName);\n \t\t\tif (it.hasNext())\n \t\t\t{\n \t\t\t\tsb.append(\", \");\n \t\t\t}\n \t\t}\n \t\tsb.append(\" ) VALUES ( \");\n \n \t\tit = metafields.iterator();\t\t\n \t\twhile(it.hasNext()) {\n \t\t\tit.next();\n \t\t\tsb.append(\"?\");\n \t\t\tif (it.hasNext())\n \t\t\t{\n \t\t\t\tsb.append(\", \");\n \t\t\t}\n \t\t}\n \n \t\tsb.append(\") \");\n \t\t\n \t\ttry (PreparedStatement preparedStatement = ConnectionManager.getConnection().prepareStatement(sb.toString())) {\t\t\t\n \t\t\t// Replace the wildcard character '?' by the real type values\n \t\t\tint parameterIndex = 1;\n \t\t\tfor (MetaItemField metaItemField : metafields){\n \t\t\t\tString columnValue = metaItemField.getType().toString();\n \n \t\t\t\t// Generate a new schema version UUID a table is created or modified.\n \t\t\t\tif ( metaItemField.getType().equals(FieldType.UUID) && metaItemField.getName().equals(DatabaseConstants.SCHEMA_VERSION_COLUMN_NAME) ) {\n \t\t\t\t\tcolumnValue = UUID.randomUUID().toString();\n \t\t\t\t}\n \n \t\t\t\tpreparedStatement.setString(parameterIndex, columnValue);\n \t\t\t\tparameterIndex++;\n \t\t\t}\n \n \t\t\tpreparedStatement.executeUpdate();\n \t\t} catch (SQLException e) {\n \t\t\tthrow new DatabaseWrapperOperationException(DBErrorState.ERROR_DIRTY_STATE, e);\t\t\t\n \t\t}\n \t}",
"public abstract String toHiveType(int sqlType);",
"@SuppressWarnings(\"StringSplitter\")\n public static Map<String, Schema> getTpcdsSchemas() throws Exception {\n Map<String, Schema> schemaMap = new HashMap<>();\n\n List<String> tableNames = TableSchemaJSONLoader.getAllTableNames();\n for (String tableName : tableNames) {\n Schema.Builder schemaBuilder = Schema.builder();\n\n String tableSchemaString = TableSchemaJSONLoader.parseTableSchema(tableName);\n String[] nameTypePairs = tableSchemaString.split(\",\");\n\n for (String nameTypePairString : nameTypePairs) {\n String[] nameTypePair = nameTypePairString.split(\"\\\\s+\");\n String name = nameTypePair[0];\n String type = nameTypePair[1];\n\n Schema.FieldType fieldType;\n if (type.equals(\"bigint\")) {\n fieldType = Schema.FieldType.INT64;\n } else if (type.equals(\"double\")) {\n fieldType = Schema.FieldType.DOUBLE;\n } else {\n fieldType = Schema.FieldType.STRING;\n }\n\n schemaBuilder.addNullableField(name, fieldType);\n }\n\n Schema tableSchema = schemaBuilder.build();\n schemaMap.put(tableName, tableSchema);\n }\n return schemaMap;\n }",
"private static TableFieldSchema fromFieldDescriptor(FieldDescriptor descriptor) {\n // We directly use the jsonName of the field when generating the schema.\n String fieldName = descriptor.getJsonName();\n TableFieldSchema field =\n new TableFieldSchema()\n .setName(fieldName)\n .setMode(descriptor.isRepeated() ? \"REPEATED\" : \"NULLABLE\");\n if (descriptor.getType() != FieldDescriptor.Type.MESSAGE) {\n throw new IllegalStateException(\"Unexpected primitive field: \" + descriptor.getFullName());\n }\n Descriptor fieldType = descriptor.getMessageType();\n // We don't include the \"id\" except for resources.\n if (fieldName.equals(\"id\") && !AnnotationUtils.isResource(descriptor.getContainingType())) {\n return null;\n }\n if (AnnotationUtils.isPrimitiveType(fieldType)) {\n return field.setType(schemaTypeForPrimitive(fieldType));\n }\n\n // We don't include extensions or contained resources unless they exist in the data.\n if (fieldType.equals(Extension.getDescriptor())\n || fieldType.equals(ContainedResource.getDescriptor())) {\n return field.setType(\"STRING\");\n }\n // We don't include nested types.\n // TODO: consider allowing a certain level of nesting.\n if (fieldType.equals(descriptor.getContainingType())) {\n return null;\n }\n // Identifier and Reference refer to each other. We stop the recursion by not including\n // Identifier.assigner unless it exists in the data.\n if (descriptor.getContainingType().equals(Identifier.getDescriptor())\n && fieldName.equals(\"assigner\")) {\n return null;\n }\n field.setType(\"RECORD\");\n return field.setFields(fromDescriptor(fieldType).getFields());\n }",
"FieldsType createFieldsType();",
"public abstract Map<String, Integer> getColumnTypes(String tableName);",
"public abstract String toJavaType(int sqlType);",
"Schema parseSchema(String text);",
"public List<String> generateDdlStatementsFromJsonSchema() {\n List<String> ddlStatements = new ArrayList<String>();\n for (JsonElement schemaElement : schema.getJsonArray()) {\n if (schema.getJsonArray().size() == 0) {\n return null;\n }\n JsonObject schemaObject = schemaElement.getAsJsonObject();\n\n if (schemaObject.has(\"tableReference\")) {\n JsonObject tableReference = schemaObject.get(\"tableReference\").getAsJsonObject();\n\n if (tableReference.has(\"datasetId\") && tableReference.has(\"tableId\")) {\n StringBuilder statement = new StringBuilder(\"CREATE TABLE \");\n\n statement.append(tableReference.get(\"datasetId\").getAsString());\n statement.append(\".\");\n statement.append(tableReference.get(\"tableId\").getAsString());\n statement.append(\" (\");\n\n // Generate column syntax for each field provided in JSON\n List<String> columns = new ArrayList<>();\n for (JsonElement fieldElement : schemaObject.getAsJsonArray(\"fields\")) {\n JsonObject field = fieldElement.getAsJsonObject();\n\n // Assemble column syntax\n StringBuilder column = new StringBuilder();\n column.append(field.get(\"name\").getAsString());\n column.append(\" \");\n column.append(field.get(\"type\").getAsString());\n if (field.has(\"mode\")) {\n column.append(\" \");\n column.append(field.get(\"mode\").getAsString());\n }\n\n columns.add(column.toString());\n }\n statement.append(String.join(\", \", columns));\n statement.append(\")\");\n\n ddlStatements.add(statement.toString());\n }\n }\n }\n return ddlStatements;\n }",
"public ResultSet getTypeInfo()\n throws SQLException\n {\n if (traceOn()) {\n trace(\"@getTableTypes\");\n }\n\n // The SimpleText driver only supports the following data types:\n //\n // VARCHAR\n // INTEGER\n // VARBINARY\n\n SimpleTextStatement stmt =\n (SimpleTextStatement) ownerConnection.createStatement();\n\n // Create a Hashtable for all of the columns\n\n Hashtable columns = new Hashtable();\n\n add(columns, 1, \"TYPE_NAME\", Types.VARCHAR);\n add(columns, 2, \"DATA_TYPE\", Types.SMALLINT);\n add(columns, 3, \"PRECISION\", Types.INTEGER);\n add(columns, 4, \"LITERAL_PREFIX\", Types.VARCHAR);\n add(columns, 5, \"LITERAL_SUFFIX\", Types.VARCHAR);\n add(columns, 6, \"CREATE_PARAMS\", Types.VARCHAR);\n add(columns, 7, \"NULLABLE\", Types.SMALLINT);\n add(columns, 8, \"CASE_SENSITIVE\", Types.BIT);\n add(columns, 9, \"SEARCHABLE\", Types.SMALLINT);\n add(columns, 10, \"UNSIGNED_ATTRIBUTE\", Types.BIT);\n add(columns, 11, \"FIXED_PREC_SCALE\", Types.BIT);\n add(columns, 12, \"AUTO_INCREMENT\", Types.BIT);\n add(columns, 13, \"LOCAL_TYPE_NAME\", Types.VARCHAR);\n add(columns, 14, \"MINIMUM_SCALE\", Types.SMALLINT);\n add(columns, 15, \"MAXIMUM_SCALE\", Types.SMALLINT);\n add(columns, 16, \"SQL_DATA_TYPE\", Types.INTEGER);\n add(columns, 17, \"SQL_DATETIME_SUB\", Types.INTEGER);\n add(columns, 18, \"NUM_PREC_RADIX\", Types.INTEGER);\n\n // Create an empty Hashtable for the rows\n\n Hashtable rows = new Hashtable();\n\n // Create a Hashtable for a single row\n\n Hashtable singleRow;\n\n // Create the VARCHAR entry\n\n singleRow = new Hashtable();\n singleRow.put(new Integer(1),\n new CommonValue(typeToName(Types.VARCHAR)));\n singleRow.put(new Integer(2), new CommonValue(Types.VARCHAR));\n singleRow.put(new Integer(3),\n new CommonValue(SimpleTextDefine.MAX_VARCHAR_LEN));\n singleRow.put(new Integer(4), new CommonValue(\"'\"));\n singleRow.put(new Integer(5), new CommonValue(\"'\"));\n singleRow.put(new Integer(7), new CommonValue(typeNoNulls));\n singleRow.put(new Integer(9), new CommonValue(typePredBasic));\n singleRow.put(new Integer(13),\n new CommonValue(typeToName(Types.VARCHAR)));\n rows.put (new Integer(1), singleRow);\n\n // Create the INTEGER entry\n\n singleRow = new Hashtable();\n singleRow.put(new Integer(1),\n new CommonValue(typeToName(Types.INTEGER)));\n singleRow.put(new Integer(2), new CommonValue(Types.INTEGER));\n singleRow.put(new Integer(3),\n new CommonValue(SimpleTextDefine.MAX_INTEGER_LEN));\n singleRow.put(new Integer(7), new CommonValue(typeNoNulls));\n singleRow.put(new Integer(9), new CommonValue(typePredBasic));\n singleRow.put(new Integer(13),\n new CommonValue(typeToName(Types.INTEGER)));\n rows.put (new Integer(2), singleRow);\n\n // Create the VARBINARY entry\n\n singleRow = new Hashtable();\n singleRow.put(new Integer(1),\n new CommonValue(typeToName(Types.VARBINARY)));\n singleRow.put(new Integer(2), new CommonValue(Types.VARBINARY));\n singleRow.put(new Integer(3),\n new CommonValue(SimpleTextDefine.MAX_VARBINARY_LEN));\n singleRow.put(new Integer(4), new CommonValue(\"'\"));\n singleRow.put(new Integer(5), new CommonValue(\"'\"));\n singleRow.put(new Integer(7), new CommonValue(typeNoNulls));\n singleRow.put(new Integer(9), new CommonValue(typePredNone));\n singleRow.put(new Integer(13),\n new CommonValue(typeToName(Types.VARBINARY)));\n rows.put (new Integer(3), singleRow);\n\n // Create the ResultSet object and return it\n\n SimpleTextResultSet rs = new SimpleTextResultSet();\n\n rs.initialize(stmt, columns, rows);\n\n return rs;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "entryRuleCompVarDefination" $ANTLR start "ruleCompVarDefination" InternalDsl.g:2213:1: ruleCompVarDefination : ( ( rule__CompVarDefination__Group__0 ) ) ; | public final void ruleCompVarDefination() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalDsl.g:2217:2: ( ( ( rule__CompVarDefination__Group__0 ) ) )
// InternalDsl.g:2218:2: ( ( rule__CompVarDefination__Group__0 ) )
{
// InternalDsl.g:2218:2: ( ( rule__CompVarDefination__Group__0 ) )
// InternalDsl.g:2219:3: ( rule__CompVarDefination__Group__0 )
{
if ( state.backtracking==0 ) {
before(grammarAccess.getCompVarDefinationAccess().getGroup());
}
// InternalDsl.g:2220:3: ( rule__CompVarDefination__Group__0 )
// InternalDsl.g:2220:4: rule__CompVarDefination__Group__0
{
pushFollow(FOLLOW_2);
rule__CompVarDefination__Group__0();
state._fsp--;
if (state.failed) return ;
}
if ( state.backtracking==0 ) {
after(grammarAccess.getCompVarDefinationAccess().getGroup());
}
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void entryRuleCompVarDefination() throws RecognitionException {\n try {\n // InternalDsl.g:2205:1: ( ruleCompVarDefination EOF )\n // InternalDsl.g:2206:1: ruleCompVarDefination EOF\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getCompVarDefinationRule()); \n }\n pushFollow(FOLLOW_1);\n ruleCompVarDefination();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getCompVarDefinationRule()); \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }",
"public final EObject entryRuleCompVarDefination() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleCompVarDefination = null;\n\n\n try {\n // InternalDsl.g:7239:58: (iv_ruleCompVarDefination= ruleCompVarDefination EOF )\n // InternalDsl.g:7240:2: iv_ruleCompVarDefination= ruleCompVarDefination EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getCompVarDefinationRule()); \n }\n pushFollow(FOLLOW_1);\n iv_ruleCompVarDefination=ruleCompVarDefination();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleCompVarDefination; \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public final void ruleCompVarDef() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:2192:2: ( ( ( rule__CompVarDef__Group__0 ) ) )\n // InternalDsl.g:2193:2: ( ( rule__CompVarDef__Group__0 ) )\n {\n // InternalDsl.g:2193:2: ( ( rule__CompVarDef__Group__0 ) )\n // InternalDsl.g:2194:3: ( rule__CompVarDef__Group__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getCompVarDefAccess().getGroup()); \n }\n // InternalDsl.g:2195:3: ( rule__CompVarDef__Group__0 )\n // InternalDsl.g:2195:4: rule__CompVarDef__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__CompVarDef__Group__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getCompVarDefAccess().getGroup()); \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__CompVarDefination__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:19041:1: ( rule__CompVarDefination__Group__0__Impl rule__CompVarDefination__Group__1 )\n // InternalDsl.g:19042:2: rule__CompVarDefination__Group__0__Impl rule__CompVarDefination__Group__1\n {\n pushFollow(FOLLOW_4);\n rule__CompVarDefination__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__CompVarDefination__Group__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__CompVarDef__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:18945:1: ( ( 'variable' ) )\n // InternalDsl.g:18946:1: ( 'variable' )\n {\n // InternalDsl.g:18946:1: ( 'variable' )\n // InternalDsl.g:18947:2: 'variable'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getCompVarDefAccess().getVariableKeyword_1()); \n }\n match(input,118,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getCompVarDefAccess().getVariableKeyword_1()); \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 entryRuleCompVarDef() throws RecognitionException {\n try {\n // InternalDsl.g:2180:1: ( ruleCompVarDef EOF )\n // InternalDsl.g:2181:1: ruleCompVarDef EOF\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getCompVarDefRule()); \n }\n pushFollow(FOLLOW_1);\n ruleCompVarDef();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getCompVarDefRule()); \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }",
"public final void rule__CompVarDefination__Group_2__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:19176:1: ( rule__CompVarDefination__Group_2__0__Impl rule__CompVarDefination__Group_2__1 )\n // InternalDsl.g:19177:2: rule__CompVarDefination__Group_2__0__Impl rule__CompVarDefination__Group_2__1\n {\n pushFollow(FOLLOW_4);\n rule__CompVarDefination__Group_2__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__CompVarDefination__Group_2__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__CompVarDefination__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:19095:1: ( rule__CompVarDefination__Group__2__Impl rule__CompVarDefination__Group__3 )\n // InternalDsl.g:19096:2: rule__CompVarDefination__Group__2__Impl rule__CompVarDefination__Group__3\n {\n pushFollow(FOLLOW_88);\n rule__CompVarDefination__Group__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__CompVarDefination__Group__3();\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__CompVarDefination__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:19122:1: ( rule__CompVarDefination__Group__3__Impl rule__CompVarDefination__Group__4 )\n // InternalDsl.g:19123:2: rule__CompVarDefination__Group__3__Impl rule__CompVarDefination__Group__4\n {\n pushFollow(FOLLOW_88);\n rule__CompVarDefination__Group__3__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__CompVarDefination__Group__4();\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__CompVarDefination__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:19107:1: ( ( ( rule__CompVarDefination__Group_2__0 )* ) )\n // InternalDsl.g:19108:1: ( ( rule__CompVarDefination__Group_2__0 )* )\n {\n // InternalDsl.g:19108:1: ( ( rule__CompVarDefination__Group_2__0 )* )\n // InternalDsl.g:19109:2: ( rule__CompVarDefination__Group_2__0 )*\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getCompVarDefinationAccess().getGroup_2()); \n }\n // InternalDsl.g:19110:2: ( rule__CompVarDefination__Group_2__0 )*\n loop137:\n do {\n int alt137=2;\n int LA137_0 = input.LA(1);\n\n if ( (LA137_0==62) ) {\n alt137=1;\n }\n\n\n switch (alt137) {\n \tcase 1 :\n \t // InternalDsl.g:19110:3: rule__CompVarDefination__Group_2__0\n \t {\n \t pushFollow(FOLLOW_42);\n \t rule__CompVarDefination__Group_2__0();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop137;\n }\n } while (true);\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getCompVarDefinationAccess().getGroup_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__CompVarDefination__Group_2__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:19188:1: ( ( ',' ) )\n // InternalDsl.g:19189:1: ( ',' )\n {\n // InternalDsl.g:19189:1: ( ',' )\n // InternalDsl.g:19190:2: ','\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getCompVarDefinationAccess().getCommaKeyword_2_0()); \n }\n match(input,62,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getCompVarDefinationAccess().getCommaKeyword_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__CompVarDefination__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:19068:1: ( rule__CompVarDefination__Group__1__Impl rule__CompVarDefination__Group__2 )\n // InternalDsl.g:19069:2: rule__CompVarDefination__Group__1__Impl rule__CompVarDefination__Group__2\n {\n pushFollow(FOLLOW_88);\n rule__CompVarDefination__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__CompVarDefination__Group__2();\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__CompVarDefination__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:19160:1: ( ( ';' ) )\n // InternalDsl.g:19161:1: ( ';' )\n {\n // InternalDsl.g:19161:1: ( ';' )\n // InternalDsl.g:19162:2: ';'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getCompVarDefinationAccess().getSemicolonKeyword_4()); \n }\n match(input,64,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getCompVarDefinationAccess().getSemicolonKeyword_4()); \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 EObject entryRuleCompVarDef() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleCompVarDef = null;\n\n\n try {\n // InternalDsl.g:7182:51: (iv_ruleCompVarDef= ruleCompVarDef EOF )\n // InternalDsl.g:7183:2: iv_ruleCompVarDef= ruleCompVarDef EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getCompVarDefRule()); \n }\n pushFollow(FOLLOW_1);\n iv_ruleCompVarDef=ruleCompVarDef();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleCompVarDef; \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public final void rule__CompVarDefination__Group_3__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:19230:1: ( rule__CompVarDefination__Group_3__0__Impl rule__CompVarDefination__Group_3__1 )\n // InternalDsl.g:19231:2: rule__CompVarDefination__Group_3__0__Impl rule__CompVarDefination__Group_3__1\n {\n pushFollow(FOLLOW_21);\n rule__CompVarDefination__Group_3__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__CompVarDefination__Group_3__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__CompVarDef__VardAssignment_3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:38151:1: ( ( ruleCompVarDefination ) )\n // InternalDsl.g:38152:2: ( ruleCompVarDefination )\n {\n // InternalDsl.g:38152:2: ( ruleCompVarDefination )\n // InternalDsl.g:38153:3: ruleCompVarDefination\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getCompVarDefAccess().getVardCompVarDefinationParserRuleCall_3_0()); \n }\n pushFollow(FOLLOW_2);\n ruleCompVarDefination();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getCompVarDefAccess().getVardCompVarDefinationParserRuleCall_3_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__CompVarDefination__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:19134:1: ( ( ( rule__CompVarDefination__Group_3__0 )? ) )\n // InternalDsl.g:19135:1: ( ( rule__CompVarDefination__Group_3__0 )? )\n {\n // InternalDsl.g:19135:1: ( ( rule__CompVarDefination__Group_3__0 )? )\n // InternalDsl.g:19136:2: ( rule__CompVarDefination__Group_3__0 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getCompVarDefinationAccess().getGroup_3()); \n }\n // InternalDsl.g:19137:2: ( rule__CompVarDefination__Group_3__0 )?\n int alt138=2;\n int LA138_0 = input.LA(1);\n\n if ( (LA138_0==70) ) {\n alt138=1;\n }\n switch (alt138) {\n case 1 :\n // InternalDsl.g:19137:3: rule__CompVarDefination__Group_3__0\n {\n pushFollow(FOLLOW_2);\n rule__CompVarDefination__Group_3__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getCompVarDefinationAccess().getGroup_3()); \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__CompVarDefination__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:19053:1: ( ( ( rule__CompVarDefination__TypeAssignment_0 ) ) )\n // InternalDsl.g:19054:1: ( ( rule__CompVarDefination__TypeAssignment_0 ) )\n {\n // InternalDsl.g:19054:1: ( ( rule__CompVarDefination__TypeAssignment_0 ) )\n // InternalDsl.g:19055:2: ( rule__CompVarDefination__TypeAssignment_0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getCompVarDefinationAccess().getTypeAssignment_0()); \n }\n // InternalDsl.g:19056:2: ( rule__CompVarDefination__TypeAssignment_0 )\n // InternalDsl.g:19056:3: rule__CompVarDefination__TypeAssignment_0\n {\n pushFollow(FOLLOW_2);\n rule__CompVarDefination__TypeAssignment_0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getCompVarDefinationAccess().getTypeAssignment_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__CompVarDef__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:18918:1: ( ( () ) )\n // InternalDsl.g:18919:1: ( () )\n {\n // InternalDsl.g:18919:1: ( () )\n // InternalDsl.g:18920:2: ()\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getCompVarDefAccess().getCompVarDefAction_0()); \n }\n // InternalDsl.g:18921:2: ()\n // InternalDsl.g:18921:3: \n {\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getCompVarDefAccess().getCompVarDefAction_0()); \n }\n\n }\n\n\n }\n\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Executes a query based on the given filter and returns the index of the only one result returned by the query. The query must return exectly one element, otherwise this method throws a RuntimeException. | public long querySingletonKey(Filter filter) {
return entityDB.querySingletonKey(filter);
} | [
"public long queryFirstKey(Filter filter) {\n\t\treturn entityDB.queryFirstKey(filter);\n\t}",
"public Entity queryFirst(Filter filter) {\n\t\treturn entityDB.queryFirst(filter);\n\t}",
"IQuery<R> first(int i);",
"public int getFilteredIndex()\n\t{\n\t\treturn this.filteredIndex;\n\t}",
"public E queryFirst() {\n ValueHolder<E> result = ValueHolder.of(null);\n limit(1);\n doIterate(r -> {\n result.set(r);\n return false;\n });\n\n return result.get();\n }",
"default ItemStack findOne(Predicate<ItemStack> filter) {\n for (IInventoryAdapter inventoryObject : this) {\n InventoryManipulator im = InventoryManipulator.get(inventoryObject);\n ItemStack removed = im.tryRemoveItem(filter);\n if (!InvTools.isEmpty(removed))\n return removed;\n }\n return InvTools.emptyStack();\n }",
"int index(){\n\n\t\t\n\t\tif (cursor == null) \n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\treturn index;\n\t}",
"public int indexOf(Predicate<? super T> cond) {\n return TList.range(0, size()).filter(i->cond.test(get(i))).getOpt(0).orElse(-1);\n }",
"public static <T> int indexOf(List<T> list, Filter<T> filter) {\n\t\tfor(int i = 0; i < list.size(); i++)\n\t\t\tif(filter.isMatch(list.get(i)))\n\t\t\t\treturn i;\n\t\treturn -1;\n\t}",
"Transaction findTransactionInFilteredListByIndex(int index);",
"public int getFirstRecordIndex();",
"int index()\n {\n\t if(cursor == null)\n\t {\n\t\t return -1;\n\t }\n\t return index;\n }",
"public Long getCount(Filter filter);",
"private int find(Account account) {\r\n\t\tfor ( int i = 0 ; i < accounts.length; i++ ) {\t\t\r\n\t\t\tif ( accounts[i] != null && accounts[i].equals(account) ) { //check if accountDB isn't empty, and if the item is the one we want\r\n\t\t\t\treturn i; //return the index of the item needed\r\n\t\t\t}\r\n\t\t}\t\r\n\t\treturn -1;\r\n\t}",
"private void queryIndex() {\n if (predicate == TruePredicate.INSTANCE) {\n return;\n }\n\n // get indexes\n MapService mapService = nodeEngine.getService(SERVICE_NAME);\n MapServiceContext mapServiceContext = mapService.getMapServiceContext();\n Indexes indexes = mapServiceContext.getMapContainer(name).getIndexes();\n // optimize predicate\n QueryOptimizer queryOptimizer = mapServiceContext.getQueryOptimizer();\n predicate = queryOptimizer.optimize(predicate, indexes);\n\n Set<QueryableEntry> querySet = indexes.query(predicate);\n if (querySet == null) {\n return;\n }\n\n List<Data> keys = null;\n for (QueryableEntry e : querySet) {\n if (keys == null) {\n keys = new ArrayList<Data>(querySet.size());\n }\n keys.add(e.getKeyData());\n }\n\n hasIndex = true;\n keySet = keys == null ? Collections.<Data>emptySet() : InflatableSet.newBuilder(keys).build();\n }",
"@Override\n public E query(I primaryIndexKey)\n {\n // Querying on Primary Index\n return primaryIndex.get(primaryIndexKey);\n }",
"public static <T> int lastIndexOf(List<T> list, Filter<T> filter) {\n\t\tfor(int i = list.size() - 1; i >= 0; i--)\n\t\t\tif(filter.isMatch(list.get(i)))\n\t\t\t\treturn i;\n\t\treturn -1;\n\t}",
"long getIndex();",
"private int getIndexOf(T anEntry) { //private so that the index of entries cannot be directly accessed by clients\n int where = -1;\n boolean found = false;\n int index = 0;\n while (!found && (index < numberOfEntries)) {\n if (anEntry.equals(bag[index])) {\n found = true;\n where = index;\n } else\n index++;\n }\n return where;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests the creation of a DefaultFlowTable using an AppId constructor. | @Test
public void testCreationWithAppId() {
final FlowTable rule =
DefaultFlowTable.builder()
.forDevice(did("1"))
.forTable(1)
.withFlowTable(ofFlowTable((byte) 1))
.withCookie((long) 1)
.fromApp(APP_ID)
.build();
assertThat(rule.deviceId(), is(did("1")));
} | [
"@Test\n public void testCreationFromFlowTable() {\n assertThat(defaultFlowTable1.deviceId(), is(flowTable1.deviceId()));\n assertThat(defaultFlowTable1.appId(), is(flowTable1.appId()));\n assertThat(defaultFlowTable1.id(), is(flowTable1.id()));\n\n }",
"@Test\n public void testCreationWithFlowId() {\n final FlowTable rule =\n DefaultFlowTable.builder()\n .forDevice(did(\"1\"))\n .forTable(1)\n .withFlowTable(ofFlowTable((byte) 1))\n .withCookie((long) 1)\n .fromApp(APP_ID)\n .build();\n\n assertThat(rule.deviceId(), is(did(\"1\")));\n }",
"protected abstract FlowRule.Builder setDefaultTableIdForFlowObjective(Builder ruleBuilder);",
"@Test\n public void testTableFactory() {\n assertNotNull(tableFactory);\n }",
"public AppTable() {\n this(DSL.name(\"app\"), null);\n }",
"@Test\n public void testCreationWithConsistentFlowId() {\n final FlowTable rule1 =\n DefaultFlowTable.builder()\n .forDevice(did(\"1\"))\n .forTable(1)\n .withFlowTable(ofFlowTable((byte) 1))\n .fromApp(APP_ID)\n .build();\n\n final FlowTable rule2 =\n DefaultFlowTable.builder()\n .forDevice(did(\"1\"))\n .forTable(1)\n .withFlowTable(ofFlowTable((byte) 1))\n .fromApp(APP_ID)\n .build();\n\n new EqualsTester().addEqualityGroup(rule1.id(), rule2.id()).testEquals();\n }",
"void createDefaultIntegration(Long dataflowId, String datasetSchemaId) throws EEAException;",
"@Test\n public void testTableFactoryEmpty() {\n TableController tableController = tableFactory.getTableController();\n Map<Integer, ArrayList<Table>> tableMap = tableController.getTableMap();\n // loop through the map, check that each list is empty\n for (ArrayList<Table> list : tableMap.values()) {\n assertEquals(0, list.size());\n }\n }",
"@Test\n\tpublic void ApplicationShouldNotExistInAnEmptyDatabase() {\n\n\t\tfinal Integer nonExistentApplicationId = 1;\n\t\tassertNull(instance.getApplication(nonExistentApplicationId));\n\t}",
"@Test\n public void testCreateAndGetAppMinimal() throws Exception\n {\n // Create an app using only required attributes\n String[] app0 = apps.get(11);\n String appId = app0[1];\n System.out.println(\"Creating app with name: \" + appId);\n app0[3] = null; app0[4] = null; app0[5] = null;\n\n String respUrl = createAppMinimal(usrClient, app0);\n System.out.println(\"Created app: \" + respUrl);\n Assert.assertFalse(StringUtils.isBlank(respUrl), \"Invalid response: \" + respUrl);\n\n // Get the app and check the defaults\n TapisApp tmpApp = usrClient.getApp(appId);\n Assert.assertNotNull(tmpApp, \"Failed to create item: \" + appId);\n System.out.println(\"Found item: \" + tmpApp.getId());\n Utils.verifyAppDefaults(tmpApp, appId);\n }",
"@Test\n public void initialDummyDataTest() {\n assertThat(taskService.findAll().size(), is(equalTo(5)));\n assertThat(taskService.findByID(1L), is(notNullValue()));\n assertThat(taskService.findByID(2L), is(notNullValue()));\n assertThat(taskService.findByID(3L), is(notNullValue()));\n assertThat(taskService.findByID(4L), is(notNullValue()));\n assertThat(taskService.findByID(5L), is(notNullValue()));\n }",
"DataCfgTableInfo createTableIfNotExists(String dataCfgOid);",
"@Before\n public void createApp()\n {\n //need person that was created method that takes the real mainContext\n PersonStorageUtil.savePerson(mainContext, person);\n //user Rule to launch given activity\n formActivityIntentsTestRule.launchActivity(null);\n uiDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation());\n }",
"TableInstance createTableInstance();",
"public void testCtor4_ZeroId() {\n try {\n new DummyWeightedScorecardStructure(0, NAME, WEIGHT);\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }",
"void setDefaultApp(String id);",
"public void testCtor3_ZeroId() {\n try {\n new DummyWeightedScorecardStructure(0, WEIGHT);\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }",
"public void testInit_timetable_0args() {\r\n System.out.println(\"init_timetable\");\r\n //Timetablebase.init_timetable();\r\n \r\n }",
"public void testCtor1_ZeroId() {\n try {\n new DummyWeightedScorecardStructure(0);\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }"
] | {
"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.