query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
GET /cartegroupe: get all the tuileGroupe.
@GetMapping("/tuile-groupe") public ResponseEntity<List<TuileGroupeDTO>> getAllTuileGroupe(@RequestParam(value = "search", required = false) String criteria ) { log.debug("requete REST pour obtenir une liste de TuileGroupe avec criteres: {}", criteria); List<TuileGroupeDTO> entityList = tuileGroupeService.findAll(criteria); return ResponseEntity.ok().body(entityList); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<Groupe> getAll() {\n\n // Creation de l'entity manager\n EntityManager em = GestionFactory.factory.createEntityManager();\n\n // Recherche\n @SuppressWarnings(\"unchecked\")\n List<Groupe> list = em.createQuery(\"SELECT e FROM Groupe e\").getResultList();\n\n ...
[ "0.71088403", "0.6694338", "0.65458256", "0.6461933", "0.6350455", "0.6284263", "0.62662566", "0.6255926", "0.62459064", "0.6242609", "0.6233323", "0.6126614", "0.61223", "0.6110941", "0.6109675", "0.60892236", "0.60736966", "0.60572666", "0.60495305", "0.6024459", "0.6015756...
0.65951496
2
Creates the SQL constraint used to find the AdjustmentType for VRA ER handling.
public String createStatement(Context ctx) { return AbstractAdjustmentType.NAME_PROPERTY + " = " + getName(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "QueryConstraintType createQueryConstraintType();", "Constraint createConstraint();", "Constraint createConstraint();", "static String getAlterArtifactInstancesAddAccountIdConstraintTemplate() {\n // Each \"%s\" will be replaced with the relevant TYPE_instances table name.\n return \"ALTER TABLE...
[ "0.6403276", "0.5824255", "0.5824255", "0.5681915", "0.5638663", "0.5577264", "0.54524", "0.51819456", "0.5177972", "0.5174223", "0.51455367", "0.50748485", "0.50530076", "0.50381243", "0.5002787", "0.49689394", "0.49675834", "0.496444", "0.49372688", "0.4851933", "0.4821006"...
0.56264514
5
Set a PreparedStatement with the supplied Object.
public void set(Context ctx, XPreparedStatement ps) throws SQLException { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract void setStatement(@NotNull PreparedStatement preparedStatement, @NotNull T object) throws SQLException, NotEnoughDataException;", "public void setObject(int parameterIndex, Object x) throws SQLException {\n currentPreparedStatement.setObject(parameterIndex, x);\n }", "abstract void set...
[ "0.7424171", "0.7045261", "0.6885201", "0.6832335", "0.6810908", "0.65914977", "0.65428853", "0.6529504", "0.64459115", "0.64341563", "0.6427276", "0.6336439", "0.632415", "0.62950057", "0.6265869", "0.6168813", "0.61371684", "0.6127193", "0.60981405", "0.60863376", "0.606146...
0.6251765
15
TODO Autogenerated method stub
@Override public void isMatched(Point p) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
FROM TRACKER (VIEW OBSERVER)
@Override public void notifyOnFrameChange(final int frame, final Vector2D derivative, final Vector2D path) { Platform.runLater(() -> { // When it's the first frame it reset the canvas. if (frame == 0) { this.clearCanvasAndChart(); } // fill the chart with data this.getxSeries().getData().add(new XYChart.Data<Number, Number>(frame, (int) derivative.getX())); this.getySeries().getData().add(new XYChart.Data<Number, Number>(frame, (int) derivative.getY())); // Draw oval on canvas this.getLiveContext().fillOval(-path.getX() + this.getLiveCanvas().getWidth() / 2, path.getY() + this.getLiveCanvas().getHeight() / 2, 10, 10); // Move the progress bar this.progressBar.setProgress(frame / (this.gestureLength.getFrameNumber() + 0.0)); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Track(){\n\t}", "void track();", "void startTracking();", "TrackInfo() {\n // no-op\n }", "private void showViewToursActivity() {\n//\t\tIntent intent = new intent(this, ActivityViewTours.class);\n System.out.println(\"Not Yet Implemented\");\n }", "public interface TrackingVi...
[ "0.6613438", "0.6097393", "0.6003608", "0.599355", "0.59517086", "0.58270204", "0.5731493", "0.5666491", "0.56537485", "0.55834675", "0.5578059", "0.55293685", "0.55251616", "0.55229235", "0.5520946", "0.55028045", "0.5448235", "0.54470146", "0.5405564", "0.53991205", "0.5383...
0.0
-1
When a gesture is ready
@Override public void notifyOnFeatureVectorEvent() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean onGestureCompleted(int gestureId);", "boolean onGestureStarted();", "public void onCompletedGesture(SimpleOpenNI curContext,int gestureType, PVector pos)\n{\n println(\"onCompletedGesture - gestureType: \" + gestureType + \", pos: \" + pos);\n \n int handId = kinect.startTrackingHand(pos);\n printl...
[ "0.73510426", "0.7269433", "0.67152494", "0.6345927", "0.6073634", "0.5949043", "0.5895422", "0.5887777", "0.5868539", "0.5819206", "0.58137536", "0.57661724", "0.57410306", "0.57199526", "0.57018775", "0.56985986", "0.56901765", "0.56511277", "0.563107", "0.5623785", "0.5587...
0.0
-1
FROM RECOGNIZER (RECOGNITION VIEW OBSERVER ) TAB 4
@Override public void updateSettings(final RecognitionSettingsImpl settings) { Platform.runLater(() -> { this.udpateRateCombo.getSelectionModel().select(settings.getUpdateRate()); this.sliderRadius.setValue(settings.getDtwRadius() * 10); this.sliderMinThreshold.setValue(settings.getMinDtwThreashold()); this.sliderMaxThreshold.setValue(settings.getMaxDTWThreashold()); this.sliderTimeSeparation.setValue(settings.getMinTimeSeparation()); this.sliderMatchNumber.setValue(settings.getMatchNumber()); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void viewtable() {\r\n\t\tt.dibuixa(table);\r\n\t}", "public void view() {\r\n\t\tfor (int i = 0; i < this.getTableNumber(); i++) {\r\n\t\t\tthis.getTables(i).view();\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "private void popularTabela() {\n\n if (CadastroCliente.listaAluno.isEmpty...
[ "0.55031025", "0.5330575", "0.51595175", "0.5110468", "0.50040174", "0.49895075", "0.4986932", "0.4985955", "0.49742088", "0.49740013", "0.49638265", "0.49411547", "0.49045867", "0.4875764", "0.48726833", "0.48719892", "0.4865785", "0.48588043", "0.48519576", "0.48455238", "0...
0.0
-1
Snack bar with the gesture name
@Override public void onGestureRecognized(final String gestureName) { Platform.runLater(() -> { ViewUtilities.showSnackBar((Pane) this.recorderPane.getCenter(), gestureName, Duration.MEDIUM, DimDialogs.MEDIUM, null); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showSnackBar(String message) {\n }", "void onSnackBarActionClicked(int uniqueId, View view);", "private void snackBar(String msg) {\n MySnackBar.createSnackBar(Objects.requireNonNull(getContext()), Objects.requireNonNull(getView()), msg);\n }", "public String getSnackBarText() {\n ...
[ "0.65111494", "0.62998503", "0.62373686", "0.6100654", "0.59752285", "0.5923145", "0.58906233", "0.57881147", "0.5634411", "0.5619671", "0.5535776", "0.550068", "0.5495256", "0.5435931", "0.5427051", "0.52832806", "0.52818257", "0.5224643", "0.52015424", "0.5183922", "0.51558...
0.69398075
0
Set the label with the gesture length
@Override public void setGestureLengthLabel(final GestureLength length) { this.labelGestureLength.setText("Gesture length: " + length.getFrameNumber()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void changedisplayLengthLabel() {\n\t\taffectiveGraphPlot.changedisplayLengthLabel();\n\t}", "public void handleIncreaseLengthPowerup(){\n myRectangle.setWidth(myRectangle.getWidth()*increaseLengthPowerupSizeFactor);\n myLength=(int)(myLength*increaseLengthPowerupSizeFactor);\n }", "pub...
[ "0.6700771", "0.60444385", "0.59759825", "0.5973929", "0.5961187", "0.5958354", "0.59106666", "0.59106666", "0.59076816", "0.58757675", "0.58757675", "0.58624953", "0.585553", "0.5830538", "0.5818392", "0.57755643", "0.57692623", "0.5758101", "0.5699112", "0.56948715", "0.568...
0.8306216
0
TO RECOGNIZER (RECOGNITION VIEW)
@Override public void loadUserProfile(final String name) { try { // Load the actual user this.recognizer.loadUserProfile(name); } catch (final IOException e1) { ViewUtilities.showNotificationPopup("User Dataset not found", "Regenerating it", Duration.MEDIUM, // NOPMD NotificationType.ERROR, t -> e1.printStackTrace()); } catch (final JsonSyntaxException e2) { ViewUtilities.showNotificationPopup("Json file changed by human!", "Please click to se exception", Duration.MEDIUM, // NOPMD NotificationType.ERROR, t -> e2.printStackTrace()); } // Set User name in scroll bar ((Label) this.userScrollPane.getBottomBar().getChildren().get(0)).setText(name); // Load user gestures ViewUtilities.showSnackBar((Pane) this.recorderPane.getCenter(), "Database loaded and Gesture updated!", Duration.MEDIUM, DimDialogs.SMALL, null); // Create the gesture tree representation. this.createGestureTreeView(this.recognizer.getUserName()); // Initialize the gesture length. this.gestureLength = this.recognizer.getUserGestureLength(); // Initialize Charts this.setChart(this.gestureLength.getFrameNumber(), this.gestureLength.getFrameNumber()); this.startButton.setDisable(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void toRent() {\n }", "@Override\n public void onRecognition(Transaction transaction, Recognition recognition) {\n }", "private void recognize() {\n //Setup our Reco transaction options.\n Transaction.Options options = new Transaction.Options();\n options.setDetect...
[ "0.55632424", "0.51524717", "0.515063", "0.5064473", "0.499886", "0.49691978", "0.49539775", "0.4947819", "0.49230048", "0.48991328", "0.4897175", "0.4875913", "0.48722756", "0.48211008", "0.48209184", "0.4788571", "0.47884935", "0.47798544", "0.47795215", "0.47354928", "0.47...
0.0
-1
TREE VIEW CANVAS GESTURE
@Override public void drawSavedGestureOnCanvas(final TreeItem<String> gestureItem, final int templateIndex) { // Get the specific gesture from dataset (list of 2D points) final List<Vector2D> template = this.recognizer.getGestureDataset(gestureItem.getValue()).get(templateIndex); // Reset the canvas this.getUserCanvasContext().clearRect(0, 0, this.getLiveCanvas().getWidth(), this.getLiveCanvas().getHeight()); // Redraw oval for every point. Now it's a derivative representation for (final Vector2D path : template) { this.getUserCanvasContext().fillOval(-path.getX() + this.getLiveCanvas().getWidth() / 2, path.getY() + this.getLiveCanvas().getHeight() / 2, 10, 10); } // Show the Canvas in a pop up this.getCnavasPopup().show(this.recorderPane); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void display() {\n\t\ttree.resize(30,50);\n\t\tfor(int i = 650; i > 0; i -= 100) {\t\n\t\t\tt.image(tree,25,i);\n\t\t}\n\t\tfor(int i = 650; i > 0; i -= 100) {\t\n\t\t\tt.image(tree, 575, i);\n\t\t}\n\t}", "private void loadTree(){ \n PBarHelper.show();\n DataProvider.getTreeHierarchy(m...
[ "0.64164746", "0.62796193", "0.6178241", "0.60253745", "0.59894127", "0.59867346", "0.5957302", "0.5917186", "0.5832758", "0.5826955", "0.5803876", "0.579654", "0.5777855", "0.5725623", "0.5677136", "0.5657889", "0.5627617", "0.5622856", "0.5611726", "0.5606456", "0.55859005"...
0.0
-1
TAB 4 INSTANCE METHODS 2 THREAD, UI AND KINECT
private synchronized void clearCanvasAndChart() { this.getLiveContext().clearRect(0, 0, this.getLiveCanvas().getWidth(), this.getLiveCanvas().getHeight()); this.getxSeries().getData().clear(); this.getySeries().getData().clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initTab()\n {\n \n }", "public Main() {\r\n\t\ttry {\r\n\t\t\tcreateFolders();\r\n\t\t\trestaurar();\r\n\t\t\tMaterialLookAndFeel materialTheme = new MaterialLookAndFeel(\r\n\t\t\t\t\t(MaterialTheme) Utils.getInstance().getCurrentTheme());\r\n\r\n\t\t\tUIManager.setLookAndFeel(materialT...
[ "0.6082701", "0.59691066", "0.59101725", "0.5907595", "0.58767176", "0.57840925", "0.57620966", "0.57176644", "0.5711264", "0.5705687", "0.568361", "0.56773835", "0.566607", "0.5629365", "0.55977154", "0.55934846", "0.5589637", "0.5581445", "0.55810344", "0.5548048", "0.55450...
0.0
-1
Create the treeview in a recursive way
private void createGestureTreeView(final String root) { this.root = new TreeItem<String>(root); this.root.setExpanded(true); this.treeView.setRoot(this.root); final List<String> userGestures = this.recognizer.getAllUserGesture(); for (int i = 0; i < userGestures.size(); i++) { this.makeGestureBranch(userGestures.get(i), this.root); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void makeTheTree(){\n\n structure.getRootNode().branchList.add(structure.getNode11());\n structure.getRootNode().branchList.add(structure.getNode12());\n structure.getRootNode().branchList.add(structure.getNode13());\n\n structure.getNode11().branchList.add(structure.getNode11...
[ "0.7412554", "0.7151319", "0.7108875", "0.70798385", "0.70751876", "0.7014905", "0.68557173", "0.68252605", "0.6802484", "0.67577946", "0.6742119", "0.67369276", "0.6668915", "0.66626173", "0.6638206", "0.66334915", "0.66158366", "0.6522842", "0.6520118", "0.6486204", "0.6464...
0.6127003
43
CREO UN TREEELEM PER OGNI GESTURE
private TreeItem<String> makeGestureBranch(final String gestureName, final TreeItem<String> parent) { final TreeItem<String> item = new TreeItem<>(gestureName); item.setGraphic(ViewUtilities.iconSetter(Material.GESTURE, IconDim.SMALL)); // RICORSIVA CREO TUTTO L'ALBERO final List<List<Vector2D>> gestureDataset = this.recognizer.getGestureDataset(gestureName); for (int i = 0; i < gestureDataset.size(); i++) { this.makeTemplateBranch("Template: " + (i + 1), item); } parent.getChildren().add(item); return item; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String creaElenco() {\n String testoTabella ;\n String riga = CostBio.VUOTO;\n ArrayList listaPagine = new ArrayList();\n ArrayList listaRiga;\n HashMap mappaTavola = new HashMap();\n String cognomeText;\n int num;\n int taglioPagine = Pref.getInt(Cos...
[ "0.6555631", "0.61688924", "0.6153913", "0.61501", "0.61405605", "0.606594", "0.60649484", "0.5909096", "0.5902805", "0.5862171", "0.5860329", "0.5848256", "0.57986385", "0.5781966", "0.57756466", "0.57604784", "0.5758899", "0.5745077", "0.5738786", "0.5719443", "0.5718238", ...
0.0
-1
CREO UN TREEELEM PER OGNI TEMPLATE
private TreeItem<String> makeTemplateBranch(final String gestureName, final TreeItem<String> parent) { final TreeItem<String> item = new TreeItem<>(gestureName); item.setGraphic(ViewUtilities.iconSetter(Material.SHOW_CHART, IconDim.SMALL)); parent.getChildren().add(item); return item; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}", "private String creaElenco() {\n String testoTabella ;\n String riga = CostBio.VUOTO;\n ArrayList listaPagine = new ArrayList();\n ArrayList listaRiga;\n HashMap mappaTavola = new HashMap();\n String cognomeText...
[ "0.6299146", "0.62917244", "0.62753296", "0.61566144", "0.61561775", "0.5977734", "0.59578085", "0.59367514", "0.5931331", "0.59305096", "0.58835584", "0.58727914", "0.5850055", "0.5850055", "0.5850055", "0.5850055", "0.5835759", "0.5826542", "0.5810378", "0.5789081", "0.5775...
0.0
-1
TODO Autogenerated method stub
private static void generateSequence() throws FileNotFoundException { Scanner s = new Scanner(new BufferedReader(new FileReader(inputPath + filename))); lrcSeq = new ArrayList<Integer>(); meloSeq = new ArrayList<Integer>(); durSeq = new ArrayList<Integer>(); String line = null; int wordStress; int pitch; int melStress; int stress; int duration; while(s.hasNextLine()) { line = s.nextLine(); String[] temp = line.split(","); wordStress = Integer.parseInt(temp[1]); pitch = Integer.parseInt(temp[2]); melStress = Integer.parseInt(temp[3]); duration = Integer.parseInt(temp[4]); //combine word level stress and sentence level stress stress = wordStress * 3 + melStress; /*if(stress < 0 || stress > 9) { System.out.println("Stress range error"); }*/ lrcSeq.add(stress); meloSeq.add(pitch); durSeq.add(duration); } //calculate relative value for(int i = 0;i < lrcSeq.size() -1;++i) { lrcSeq.set(i, lrcSeq.get(i+1)-lrcSeq.get(i)); meloSeq.set(i, meloSeq.get(i+1) - meloSeq.get(i)); if(durSeq.get(i+1) / durSeq.get(i)>=1) durSeq.set(i, durSeq.get(i+1) / durSeq.get(i)); else durSeq.set(i,durSeq.get(i) / durSeq.get(i+1) * (-1)); } lrcSeq.remove(lrcSeq.size()-1); meloSeq.remove(meloSeq.size()-1); durSeq.remove(durSeq.size()-1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
TODO Autogenerated method stub
private static void LogOverall() throws IOException { BufferedWriter out; Iterator entries = allPatternOne.entrySet().iterator(); out = new BufferedWriter(new FileWriter(singlePatternPath+"allPatternOne.txt")); int count1 = 0; entries = allPatternOne.entrySet().iterator(); while (entries.hasNext()) { Map.Entry entry = (Map.Entry) entries.next(); Integer value = (Integer)entry.getKey(); HashSet<SequencePair> set = (HashSet<SequencePair>) entry.getValue(); count1+=set.size(); out.write("!size " + value + " " + set.size() + "\n"); Iterator itr = set.iterator(); while(itr.hasNext()) { SequencePair current = (SequencePair) itr.next(); //System.out.println("[" + current.firstSeq +":"+current.secondSeq +"]"); out.write("[" + current.firstSeq +":"+current.secondSeq +"]"+"\n"); } } out.write("! total " + count1); //System.out.println(count2); if(out!=null) out.close(); out = new BufferedWriter(new FileWriter(newSinglePatternPath+"allPatternTwo.txt")); int count2 = 0; entries = allPatternTwo.entrySet().iterator(); while (entries.hasNext()) { Map.Entry entry = (Map.Entry) entries.next(); Integer value = (Integer)entry.getKey(); HashSet<SequencePair> set = (HashSet<SequencePair>) entry.getValue(); count2+=set.size(); out.write("!size " + value + " " + set.size() + "\n"); Iterator itr = set.iterator(); while(itr.hasNext()) { SequencePair current = (SequencePair) itr.next(); out.write("[" + current.firstSeq +":"+current.secondSeq +"]"+"\n"); } } out.write("! total " + count2); //System.out.println(count2); if(out!=null) out.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
private static void generateForSingleFile() throws IOException { BufferedWriter out = new BufferedWriter(new FileWriter(singlePatternPath+ filename)); Iterator iter = countOne.entrySet().iterator(); while(iter.hasNext()) { Map.Entry entry = (Entry) iter.next(); Integer value = (Integer) entry.getValue(); SequencePair key = (SequencePair) entry.getKey();//System.out.println("current" + "[" + key.firstSeq +":"+key.secondSeq +"]" + " ; "+ value); out.write("[" + key.firstSeq + ":" + key.secondSeq + "]" +":" +value + "\n"); } if(out!=null) out.close(); BufferedWriter out1 = new BufferedWriter(new FileWriter(newSinglePatternPath+filename)); iter = countTwo.entrySet().iterator(); while(iter.hasNext()) { Map.Entry entry = (Entry) iter.next(); Integer value = (Integer) entry.getValue(); SequencePair key = (SequencePair) entry.getKey();//System.out.println("current" + "[" + key.firstSeq +":"+key.secondSeq +"]" + " ; "+ value); out1.write("[" + key.firstSeq + ":" + key.secondSeq + "]" +":" +value + "\n"); } if(out1!=null) out1.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
given a file, generate all sequence of size
private static void getPatterns(int size) { // TODO Auto-generated method stub hashOne = new HashMap<SequencePair,Integer>(); hashTwo = new HashMap<SequencePair,Integer>(); ArrayList<Integer> first; ArrayList<Integer> second; ArrayList<Integer> third; //System.out.println(lrcSeq.size()); for(int i = 0; i < lrcSeq.size() - size ;++i) { first = new ArrayList<Integer>(); second = new ArrayList<Integer>(); third = new ArrayList<Integer>(); for(int j = i; j < i+ size ;++j) { first.add(lrcSeq.get(j)); second.add(meloSeq.get(j)); third.add(durSeq.get(j)); } //System.out.println(first); //System.out.println(second); //System.out.println(third); SequencePair cur= new SequencePair(first, second); int count = hashOne.containsKey(cur)?hashOne.get(cur):0; hashOne.put(cur, count+1); cur = new SequencePair(second, third); count = hashTwo.containsKey(cur)?hashTwo.get(cur):0; hashTwo.put(cur, count+1); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void generateSequence() throws FileNotFoundException {\n Scanner s = new Scanner(new BufferedReader(new FileReader(inputPath + filename)));\n\t\tlrcSeq = new ArrayList<Integer>();\n\t\tmeloSeq = new ArrayList<Integer>();\n\t\tdurSeq = new ArrayList<Integer>();\n\t\t\n\t\tString line = null;\n...
[ "0.59771174", "0.5641804", "0.54976636", "0.5484344", "0.5388084", "0.5382379", "0.5364096", "0.5286713", "0.528039", "0.523069", "0.5229174", "0.5226371", "0.52108043", "0.519802", "0.5032296", "0.5032272", "0.501464", "0.5008921", "0.5006093", "0.4991001", "0.49893898", "...
0.0
-1
validate and shared preferences to make then an intent to the main activity ver si modifica si se aplica el public en la declaracion
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_login); initViews(); buttonRegister.setOnClickListener(this); buttonlog1.setOnClickListener(this); firebaseAuth = FirebaseAuth.getInstance(); progressDialog = new ProgressDialog(this); users = FirebaseDatabase.getInstance().getReference("users"); //usuario = firebaseAuth.getCurrentUser().getEmail(); String email = editTextEmail.getText().toString(); String password= editTextPassword.getText().toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void onStart() {\n if (sharedPref.contains(getString(R.string.acno))) {\n ODAcCreation.this.startActivity(new Intent(ODAcCreation.this, UPICreation.class));\n ODAcCreation.this.finish();\n }\n\n super.onStart();\n }", "private void checkFirst...
[ "0.6850515", "0.66788185", "0.66731703", "0.6401223", "0.6351545", "0.634208", "0.6332242", "0.6287975", "0.62188566", "0.6156017", "0.6149069", "0.61206746", "0.61083287", "0.6099163", "0.6072645", "0.6037411", "0.6036721", "0.60314494", "0.6022106", "0.60147953", "0.600566"...
0.0
-1
es similar a la anterior pero utiliza el objeto FirebaseAuth para poder permitirle al usuario ingresar sus datos y en caso de que exista el usuario wn la parte de autenticacion le permite ingresar
private void loguearUsuario() { final FirebaseAuth auth = FirebaseAuth.getInstance(); FirebaseUser user = auth.getCurrentUser(); // consigue el usuario final String email = editTextEmail.getText().toString().trim(); String password = editTextPassword.getText().toString().trim(); if (TextUtils.isEmpty(email)) { Toast.makeText(this, "Se debe ingresar un email", Toast.LENGTH_LONG).show(); return; } if (TextUtils.isEmpty(password)) { Toast.makeText(this, "Falta ingresar la contraseña", Toast.LENGTH_LONG).show(); return; } progressDialog.setMessage("Realizando consulta en linea..."); progressDialog.show(); firebaseAuth.signInWithEmailAndPassword(email, password) .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() { // la misma funcion que en el caso anterior pero para poder ingresar @Override public void onComplete(@NonNull Task<AuthResult> task) { //el oncomplete es para tener la comprobacion sea del campo del login o el singup if (task.isSuccessful()) { // si el usuario se encontraba creado entonces la tarea es exitosa int pos = email.indexOf("@"); userstring = email.substring(0, pos); //consigue el nombre del usuario Toast.makeText(Login.this, "Bienvenido: " + editTextEmail.getText(), Toast.LENGTH_LONG).show(); // consigue el email que habia sido asignado a la variable TextEmail Intent intencion = new Intent(getApplication(), UserView.class); // nueva actividad intencion.putExtra("user", email); // le pasa como dato al usuario ingresado a la proxima actividad startActivity(intencion); //hay que hacer el get del usuario en la parte principal // userapasar = user; loged = true; } else { loged = false; if (task.getException() instanceof FirebaseAuthUserCollisionException) {//si se presenta una colisiÛn Toast.makeText(Login.this, "Procesando", Toast.LENGTH_SHORT).show(); } else { Toast.makeText(Login.this, "", Toast.LENGTH_LONG).show(); } } progressDialog.dismiss(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void cadastrarUsuario(final Usuario usuario){\n mAuth = ConfiguracaoFirebase.getFirebaseAuth();\n mAuth.createUserWithEmailAndPassword(\n usuario.getEmail(),usuario.getSenha()\n ).addOnCompleteListener(\n this, new OnCompleteListener<AuthResult>() {\n ...
[ "0.7192611", "0.7092799", "0.7052751", "0.6960698", "0.68912345", "0.6882512", "0.68165195", "0.6747676", "0.66590196", "0.6638194", "0.6580688", "0.6576754", "0.653814", "0.65346706", "0.6523531", "0.6487048", "0.64796215", "0.6477561", "0.6458177", "0.6431758", "0.6388773",...
0.7075139
2
la misma funcion que en el caso anterior pero para poder ingresar
@Override public void onComplete(@NonNull Task<AuthResult> task) { //el oncomplete es para tener la comprobacion sea del campo del login o el singup if (task.isSuccessful()) { // si el usuario se encontraba creado entonces la tarea es exitosa int pos = email.indexOf("@"); userstring = email.substring(0, pos); //consigue el nombre del usuario Toast.makeText(Login.this, "Bienvenido: " + editTextEmail.getText(), Toast.LENGTH_LONG).show(); // consigue el email que habia sido asignado a la variable TextEmail Intent intencion = new Intent(getApplication(), UserView.class); // nueva actividad intencion.putExtra("user", email); // le pasa como dato al usuario ingresado a la proxima actividad startActivity(intencion); //hay que hacer el get del usuario en la parte principal // userapasar = user; loged = true; } else { loged = false; if (task.getException() instanceof FirebaseAuthUserCollisionException) {//si se presenta una colisiÛn Toast.makeText(Login.this, "Procesando", Toast.LENGTH_SHORT).show(); } else { Toast.makeText(Login.this, "", Toast.LENGTH_LONG).show(); } } progressDialog.dismiss(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void excavate();", "private Boolean precond() {\r\n\t\tcalculoCantidadSacar(grupoPuestosController.getIdConcursoPuestoAgr());\r\n\t\t/**\r\n\t\t * fin incidencia 0001649\r\n\t\t */\r\n\t\tBoolean respuesta = validacionesIteracion();\r\n\t\treturn respuesta;\r\n\t}", "public void Exterior() {\n\t\t\r\n\t...
[ "0.63014", "0.62727314", "0.6265241", "0.6237964", "0.6199529", "0.61256677", "0.6123586", "0.6098582", "0.6041384", "0.5958276", "0.5953085", "0.5950457", "0.59483206", "0.594435", "0.5900438", "0.589916", "0.58846664", "0.58628845", "0.58628654", "0.5861068", "0.58590806", ...
0.0
-1
Intentando agregar el uso de la id
public void shared() { String Email = editTextEmail.getText().toString(); String Password = editTextPassword.getText().toString(); String username = userstring; SharedPreferences sharedlog = getSharedPreferences("usernamelast" , MODE_PRIVATE); SharedPreferences.Editor editorlogin = sharedlog.edit(); editorlogin.putString("usernamelast", username); editorlogin.apply(); SharedPreferences sharedPref = getSharedPreferences("email", MODE_PRIVATE); SharedPreferences.Editor editor = sharedPref.edit(); editor.putString("email", Email); editor.apply(); //Los estados los podemos setear en la siguiente actividad SharedPreferences sharedPref2 = getSharedPreferences("password", MODE_PRIVATE); SharedPreferences.Editor editor2 = sharedPref2.edit(); editor2.putString("password", Password); editor2.apply(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "II addId();", "public void setId(int idNuevo)\n { \n this.id = idNuevo;\n }", "private void AutoID() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "void addId(II identifier);", "public vo...
[ "0.6236386", "0.5992491", "0.59852993", "0.5976782", "0.59230584", "0.5873705", "0.58666766", "0.58086383", "0.5785979", "0.5752428", "0.57294196", "0.57210124", "0.5706818", "0.56722826", "0.5668418", "0.56662464", "0.5659408", "0.5656483", "0.5636437", "0.5625538", "0.56254...
0.0
-1
This method will throw the Service exception
public DBException(String message) { super(message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DataAccessorServiceException() {\n }", "public void testSetService() throws Exception {\n }", "public DataAccessorServiceException(String msg) {\n super(msg);\n }", "@Test\n\tpublic void test() throws ServiceException {\n\t}", "public static String _service_create() throws Exception...
[ "0.682824", "0.6766682", "0.6704666", "0.66881055", "0.6659916", "0.6514968", "0.64872515", "0.64872515", "0.64484614", "0.64157104", "0.63903373", "0.63542557", "0.63042647", "0.6290622", "0.6244622", "0.6236733", "0.6175353", "0.61490625", "0.6094792", "0.6066969", "0.60579...
0.0
-1
private ScoreIndicator scoreIndicator; private LivesIndicator livesIndicator; Instantiates a new GameLevel.
public GameLevel(KeyboardSensor keyboard, GUI gui, LevelInformation info, AnimationRunner runner, Counter score, Counter lives) { this.sprites = new SpriteCollection(); this.environment = new GameEnvironment(); this.score = score; this.numberOfLives = lives; this.ballsList = new ArrayList<>(); this.runner = runner; this.keyboard = keyboard; this.gui = gui; this.info = info; this.remainingBlocks = new Counter(info.numberOfBlocksToRemove()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addIndicators() {\r\n ScoreIndicator scoreIndicator = new ScoreIndicator(this.score);\r\n scoreIndicator.addToGame(this);\r\n LivesIndicator livesIndicator = new LivesIndicator(this.numberOfLives);\r\n livesIndicator.addToGame(this);\r\n NameLevelIndicator nameLevel ...
[ "0.7374299", "0.68466896", "0.68390834", "0.6721225", "0.65178734", "0.64962846", "0.64538646", "0.6409856", "0.640796", "0.6402657", "0.631016", "0.62906796", "0.6211612", "0.6205922", "0.61793286", "0.61753255", "0.6096691", "0.60959375", "0.60875577", "0.60800153", "0.6055...
0.69881284
1
Gets number of lives.
public Counter getNumberOfLives() { return this.numberOfLives; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int lives() {\r\n return lives;\r\n }", "public final int getLives() {\n\t\treturn lives;\n\t}", "public int getLives() {\r\n\t\treturn lives;\r\n\t}", "public int lives() {\r\n return lifeStates.head().lives();\r\n }", "public int getLives() {\n return lives;\n ...
[ "0.85166234", "0.83475", "0.83037496", "0.81369215", "0.8129405", "0.7993711", "0.7657878", "0.7600284", "0.75938684", "0.72795016", "0.7165723", "0.7164996", "0.7131674", "0.71003014", "0.7012955", "0.7009808", "0.69888675", "0.69655305", "0.6928752", "0.6870947", "0.6859929...
0.7183261
10
Initialize. Initialize a new game: create the Blocks, Ball and Paddle, and add them to the game.
public void initialize() { addSprite(this.info.getBackground()); createBorders(); defineDeathBlock(); addIndicators(); BlockRemover removeBlock = new BlockRemover(this, this.remainingBlocks); // this.remainingBlocks=removeBlock.getRemainingBlocks(); ScoreTrackingListener scoreTrackingListener = new ScoreTrackingListener(this.score); for (int i = 0; i < info.blocks().size(); i++) { info.blocks().get(i).addHitListener(removeBlock); info.blocks().get(i).addHitListener(scoreTrackingListener); info.blocks().get(i).addToGame(this); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initialize() {\n // create a runner using a function\n this.createScreenBorders();\n // create a keyboard sensor.\n this.keyboard = this.runner.getGUI().getKeyboardSensor();\n //create the environment for the game (game environment and sprites collection)\n thi...
[ "0.77575916", "0.7644199", "0.73652405", "0.70847946", "0.7063478", "0.70619285", "0.70336866", "0.70249826", "0.70080817", "0.6974771", "0.69330806", "0.6932625", "0.69314283", "0.6904737", "0.690032", "0.6876895", "0.68310076", "0.68291664", "0.6821634", "0.677257", "0.6769...
0.7227405
3
This method define the border that if the ball cross this border the ball remove from the game.
private void defineDeathBlock() { BallRemover removeBall = new BallRemover(this); Rectangle death = new Rectangle(new Point(0, HEIGHT), WITH, 10); Block deathRegion = new Block(death, Color.black,0); deathRegion.addHitListener(removeBall); deathRegion.addToGame(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void borders() {\n if (loc.y > height) {\n vel.y *= -bounce;\n loc.y = height;\n }\n if ((loc.x > width) || (loc.x < 0)) {\n vel.x *= -bounce;\n } \n //if (loc.x < 0) loc.x = width;\n //if (loc.x > width) loc.x = 0;\n }", "void addEventBorder(DefaultBorder border, ...
[ "0.6792716", "0.66687185", "0.66254365", "0.6478188", "0.6381706", "0.6347348", "0.6281002", "0.62592334", "0.6246905", "0.6164852", "0.61559886", "0.61280906", "0.6121235", "0.61189455", "0.6087671", "0.604991", "0.59821874", "0.5981286", "0.5889005", "0.58861923", "0.587560...
0.0
-1
Method to determine borders.
private void createBorders() { // Upper border rectangle Rectangle topRecFrame = new Rectangle(new Point(0, 0), WITH, SIZE + 20); // Left border rectangle Rectangle leftRecFrame = new Rectangle(new Point(0, SIZE + 21), SIZE, HEIGHT); // Right border rectangle Rectangle rightRecFrame = new Rectangle(new Point(WITH - SIZE, SIZE + 21), SIZE, HEIGHT); // Rectangle for block on top of upper block for the score Rectangle topRecScore = new Rectangle(new Point(0, 0), WITH, 20); Block topScore = new Block(topRecScore, Color.LIGHT_GRAY, 0); Block topFrame = new Block(topRecFrame, Color.GRAY, 0); Block leftFrame = new Block(leftRecFrame, Color.gray, 0); Block rightFrame = new Block(rightRecFrame, Color.gray, 0); topFrame.addToGame(this); leftFrame.addToGame(this); rightFrame.addToGame(this); topScore.addToGame(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Rectangle[] getBorders(){\n\t\treturn borders;\n\t}", "boolean checkBorders();", "@Test\n public void testGetBorder() {\n Assert.assertEquals(Border.ALL, Border.getBorder(true, true, true, true));\n Assert.assertEquals(Border.BOTTOM, Border.getBorder(false, false, false, true));\...
[ "0.74957424", "0.7486708", "0.7023304", "0.6870789", "0.68567467", "0.6834558", "0.68152624", "0.67722535", "0.6767088", "0.6711719", "0.66726524", "0.66575754", "0.665691", "0.66431475", "0.6580129", "0.6563471", "0.6558236", "0.6555043", "0.65522593", "0.65510255", "0.65495...
0.65827465
14
This method adds the indicator.
private void addIndicators() { ScoreIndicator scoreIndicator = new ScoreIndicator(this.score); scoreIndicator.addToGame(this); LivesIndicator livesIndicator = new LivesIndicator(this.numberOfLives); livesIndicator.addToGame(this); NameLevelIndicator nameLevel = new NameLevelIndicator(info); nameLevel.addToGame(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addIndicator() {\n createIndicator(mCurrentAdapterSize);\n mViewPager.setCurrentItem(mViewPager.getAdapter().getCount() - 1);\n }", "public org.dhis2.ns.schema.dxf2.IndicatorRefDocument.IndicatorRef addNewIndicatorRef()\n {\n synchronized (monitor())\n {...
[ "0.7300717", "0.66731703", "0.6120876", "0.60439914", "0.60084623", "0.5986085", "0.58013767", "0.57604414", "0.57098687", "0.5699243", "0.56783277", "0.5583183", "0.55372965", "0.55095065", "0.5496926", "0.5496926", "0.5492708", "0.5441256", "0.54383165", "0.53942794", "0.53...
0.6819254
1
This method removes the paddle from the game.
public void removePaddle() { this.removeSprite(this.paddle); this.removeCollidable(this.paddle); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void clearStage(GOval ball) {\n remove(ball);\n remove((paddle));\n }", "public void removeFromGame(){\n this.isInGame = false;\n }", "public void removePanel() \n\t{\n\t\tgame.remove(this);\n\t}", "void removeFromGame() {\n\t\t// remove from game\n\t\t//only for multi-play...
[ "0.69633424", "0.6829642", "0.6798601", "0.6789081", "0.654192", "0.64539295", "0.62848794", "0.6153623", "0.6097358", "0.6024035", "0.5997636", "0.59695995", "0.5969286", "0.5937806", "0.59215075", "0.5879833", "0.58718055", "0.5870794", "0.5864381", "0.5861636", "0.5815142"...
0.88217294
0
This method removes the balls from the game.
public void removeBalls() { for (Ball ball : this.ballsList) { ball.removeFromGame(this); } this.ballsList.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clearBalls();", "public void resetBalls() {\n\t\tBALL_LIST.clear();\n\t}", "void removeBall(Coordinates at);", "private void clearStage(GOval ball) {\n remove(ball);\n remove((paddle));\n }", "public int dropBalls(){\r\n if(balls>0){\r\n balls--;\r\n }\...
[ "0.7961282", "0.71419865", "0.7069509", "0.702341", "0.6995389", "0.6908126", "0.68981934", "0.6806803", "0.65688145", "0.6544933", "0.6516382", "0.6514589", "0.6501531", "0.6497345", "0.6487033", "0.6464545", "0.6435969", "0.63042295", "0.62688375", "0.6264591", "0.6231247",...
0.8750966
0
the logic from the previous playOneTurn method goes here. the `return` or `break` statements should be replaced with this.running = false;
@Override public void doOneFrame(DrawSurface d) { this.sprites.drawAllOn(d); this.sprites.notifyAllTimePassed(); if (this.keyboard.isPressed("p")) { Animation puseScreen = new PauseScreen(this.keyboard); this.runner.run(new KeyPressStoppableAnimation(puseScreen, this.keyboard, KeyboardSensor.SPACE_KEY)); } if (this.remainingBlocks.getValue() == 0) { this.score.increase(100); this.running = false; } if (this.remainingBalls.getValue() == 0) { this.running = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void playTurn()\n {\n try\n {\n XMLHandler.saveGame(game, GAME_CLONE_PATH);\n }\n catch(IOException | JAXBException | SAXException ex)\n {\n // TODO... ConsoleUtils.message(\"An internal save error has occured, terminating current game\");\n ...
[ "0.7678249", "0.7509797", "0.7436768", "0.7274493", "0.7170182", "0.70949274", "0.709114", "0.70896757", "0.7065884", "0.700221", "0.69735134", "0.69367987", "0.6926266", "0.6920045", "0.6838507", "0.6834932", "0.68281865", "0.68223107", "0.6818081", "0.68107694", "0.68001777...
0.0
-1
schedule the autonomous command (example) if (autonomousCommand != null) autonomousCommand.start();
public void autonomousInit() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void autonomousInit() {\n\t\tautonomousCommand = new Auto();\n\n\t\t/*\n\t\t * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n\t\t * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n\t\t * = new MyAutoCommand(); break; case \"Default Auto\": default:...
[ "0.7643098", "0.7372982", "0.7313", "0.7287944", "0.7261039", "0.7232339", "0.72221684", "0.7189703", "0.71843475", "0.7179614", "0.7177656", "0.71716505", "0.7142132", "0.6959022", "0.6922506", "0.68986493", "0.68929327", "0.6870796", "0.6870796", "0.6870796", "0.6870796", ...
0.0
-1
This function is called periodically during autonomous
public void autonomousPeriodic() { Scheduler.getInstance().run(); drive.updateAuto(); sensor.updateAuto(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public...
[ "0.8242393", "0.8238804", "0.8235853", "0.8235853", "0.8235853", "0.820495", "0.8199907", "0.8194021", "0.8194021", "0.8151588", "0.8147766", "0.81250346", "0.81250346", "0.80807847", "0.8016792", "0.8016792", "0.79744554", "0.79655135", "0.7948241", "0.7948241", "0.7948241",...
0.8177311
9
This makes sure that the autonomous stops running when teleop starts running. If you want the autonomous to continue until interrupted by another command, remove this line or comment it out. if (autonomousCommand != null) autonomousCommand.cancel();
public void teleopInit() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void teleopInit() {\n\t// This makes sure that the autonomous stops running when\n\t// teleop starts running. If you want the autonomous to\n\t// continue until interrupted by another command, remove\n\t// this line or comment it out.\n\tif (autonomousCommand != null) {\n\t autonomousComma...
[ "0.82523936", "0.8149221", "0.80942667", "0.76988226", "0.7637844", "0.7600895", "0.7600895", "0.7470235", "0.7218022", "0.70114815", "0.673181", "0.67221296", "0.6697145", "0.66199493", "0.6566748", "0.64997685", "0.6495776", "0.6487819", "0.64202064", "0.6392949", "0.636425...
0.0
-1
This function is called when the disabled button is hit. You can use it to reset subsystems before shutting down.
public void disabledInit(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onDisable() {\n super.onDisable();\n running = false;\n }", "public void onDisable() {\r\n }", "@Override\n public void onDisabled() {\n }", "@Override\r\n\tpublic void disable() {\n\t\tcurrentState.disable();\r\...
[ "0.70443255", "0.7026597", "0.6963652", "0.69619745", "0.6931237", "0.69273555", "0.6925242", "0.69249684", "0.69249684", "0.6918791", "0.6918778", "0.6915999", "0.6901217", "0.69003904", "0.68879694", "0.6879488", "0.6873872", "0.6873772", "0.6831916", "0.6827878", "0.678730...
0.0
-1
This function is called periodically during operator control
public void teleopPeriodic() { Scheduler.getInstance().run(); drive.updateTeleop(); sensor.updateTeleop(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void teleopPeriodic() {\n \t\n \twhile (isOperatorControl() && isEnabled()) {\n \t\tdebug();\n \t\tsmartDashboardVariables();\n \t\t//driver control functions\n \t\tdriverControl();\n \t//state machine\n \tterrainStates();\n \t//this function always comes last\n ...
[ "0.7665666", "0.73227316", "0.7286976", "0.72593725", "0.7255314", "0.71488637", "0.71488637", "0.71138996", "0.7093574", "0.7090445", "0.70560575", "0.7046668", "0.704289", "0.7039102", "0.7032054", "0.7023366", "0.6963418", "0.69623876", "0.69429386", "0.69309705", "0.69309...
0.6882646
27
This function is called periodically during test mode
public void testPeriodic() { LiveWindow.run(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void testPeriodic()\n {\n \n }", "@Override\n public void testPeriodic() {\n }", "@Override\n public void testPeriodic() {\n }", "@Override\n public void testPeriodic() {\n }", "@Override\n public void testPeriodic() {\n }", "@Override\n public void testPeriodi...
[ "0.7800467", "0.75683486", "0.75683486", "0.75683486", "0.75683486", "0.75683486", "0.75683486", "0.75683486", "0.75683486", "0.75683486", "0.75683486", "0.7513078", "0.7469104", "0.7374911", "0.7364876", "0.7364876", "0.7364876", "0.7364876", "0.73407346", "0.7327271", "0.73...
0.71142244
42
/////// ARRAYLIST UTILITIES /////////
public void clearFreeSlots() { AvailableSlots.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private PyObject[] listtoarray(ArrayList<PyObject> a)\n {\n PyObject[] results = new PyObject[a.size()];\n int iter = 0;\n for (PyObject pt : a) {\n results[iter] = pt;\n iter++;\n }\n return results;\n }", "@Test\n\tpublic void createListWithArraysU...
[ "0.67609745", "0.66684353", "0.65688396", "0.64371663", "0.6314764", "0.6297094", "0.62668645", "0.61917424", "0.6168048", "0.6153859", "0.61061764", "0.60933185", "0.60821104", "0.60451984", "0.603046", "0.602421", "0.5967937", "0.59638697", "0.5931533", "0.59303474", "0.592...
0.0
-1
////////// NORMAL GETTERS & SETTERS ///////////////
public Integer getFreeSlots() { return AvailableSlots.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void get() {}", "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "protected abstract Set method_1559();", "public T get() {\n return value;\n }", "public T get() {\n return value;\n }", "public T get() {\n return value;\n }", "@Override\n String get();", "pub...
[ "0.68573207", "0.68433404", "0.6794346", "0.64473844", "0.64473844", "0.6444429", "0.64363575", "0.63332295", "0.6306677", "0.627259", "0.62610847", "0.6223647", "0.6196103", "0.61801124", "0.6160915", "0.6158433", "0.6137138", "0.61110777", "0.6099284", "0.6042947", "0.60271...
0.0
-1
broken hash: F4D489D0E889F3A8156655DEF91AB90F8BD01EF019B0756CEAA91B0F979C985E 277120, [0, 0, 0, 10, 0, 32, 0, 0, 0, 64, 0, 33, 0, 0, 0, 96, .....
@Test public void testSearchNastyCases() { RpkiObjectCoder coder = new RpkiObjectCoder(); AtomicInteger brokenCounter = new AtomicInteger(0); lmdb.readTx0(tx -> { lmdbRpkiObject.forEach(tx, (k, bb) -> { byte[] bytes = Bytes.toBytes(bb); try { RpkiObject rpkiObject = coder.fromBytes(bytes); assertEquals(rpkiObject.key(), k); assertArrayEquals(Sha256.hash(rpkiObject.getEncoded()), rpkiObject.getSha256()); } catch (Exception e) { brokenCounter.incrementAndGet(); e.printStackTrace(); } }); }); assertEquals(0, brokenCounter.get()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int initHash() {\n return 0x811c9DC5; // unsigned 2166136261\n }", "private String getOldPasswordHash(String password) {\n\t\tWhirlpool hasher = new Whirlpool();\n hasher.NESSIEinit();\n\n // add the plaintext password to it\n hasher.NESSIEadd(password);\n\n ...
[ "0.69276845", "0.661075", "0.6605296", "0.646341", "0.63968235", "0.63707757", "0.6311957", "0.6311957", "0.6310796", "0.63057923", "0.63057923", "0.62880933", "0.6264472", "0.6256039", "0.62367624", "0.61998624", "0.6197383", "0.6180457", "0.6166361", "0.61562276", "0.613431...
0.0
-1
TODO Autogenerated method stub
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_kick_testing); InitializeViews(); initCheckBox(); Checkvalidation(check); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { int id=buttonView.getId(); RadioButton[] checbox=new RadioButton[3]; checbox[0]=less_thirty_check; checbox[1]=thirty_fourty_check; checbox[2]=great_fourty_check; RadioButton[] checkbox1=new RadioButton[3]; checkbox1[0]=health_check; checkbox1[1]=diabetes_check; checkbox1[2]=other_check; RadioButton[] checkbox2=new RadioButton[6]; checkbox2[0]=guy_check; checkbox2[1]=dad_check; checkbox2[2]=girl_check; checkbox2[3]=mom_check; checkbox2[4]=grandad_check; checkbox2[5]=grand_ma; switch (id) { case R.id.less_thirty_check: if(isChecked){ RadioButton check=(RadioButton) findViewById(id); checkCondition(check, checbox); } break; case R.id.thirty_fourty_check: if(isChecked){ RadioButton check1=(RadioButton) findViewById(id); checkCondition(check1, checbox); } break; case R.id.great_fourty_check: if(isChecked){ RadioButton check2=(RadioButton) findViewById(id); checkCondition(check2, checbox); } break; case R.id.health_check: if(isChecked){ RadioButton check3=(RadioButton) findViewById(id); checkCondition(check3, checkbox1); } break; case R.id.diabetes_check: if(isChecked){ RadioButton check4=(RadioButton) findViewById(id); checkCondition(check4, checkbox1); } break; case R.id.other_check: if(isChecked){ RadioButton check5=(RadioButton) findViewById(id); checkCondition(check5, checkbox1); } break; case R.id.guy_check: if(isChecked){ RadioButton check6=(RadioButton) findViewById(id); checkCondition(check6, checkbox2); } break; case R.id.dad_check: if(isChecked){ RadioButton check7=(RadioButton) findViewById(id); checkCondition(check7, checkbox2); } break; case R.id.girl_check: if(isChecked){ RadioButton check8=(RadioButton) findViewById(id); checkCondition(check8, checkbox2); } break; case R.id.mom_check: if(isChecked){ RadioButton check9=(RadioButton) findViewById(id); checkCondition(check9, checkbox2); } break; case R.id.grandad_check: if(isChecked){ RadioButton check10=(RadioButton) findViewById(id); checkCondition(check10, checkbox2); } break; case R.id.grand_ma: if(isChecked){ RadioButton check11=(RadioButton) findViewById(id); checkCondition(check11, checkbox2); } break; default: // CheckBox check12=(CheckBox) findViewById(id); // checkCondition(check12, this.check); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View v) { RadioButton[] checbox=new RadioButton[3]; checbox[0]=less_thirty_check; checbox[1]=thirty_fourty_check; checbox[2]=great_fourty_check; RadioButton[] checkbox1=new RadioButton[3]; checkbox1[0]=health_check; checkbox1[1]=diabetes_check; checkbox1[2]=other_check; RadioButton[] check2=new RadioButton[6]; check2[0]=guy_check; check2[1]=dad_check; check2[2]=girl_check; check2[3]=mom_check; check2[4]=grandad_check; check2[5]=grand_ma; if(Checkvalidation(checbox)){ RadioButton checkbox=SelectedCheckBox(checbox); int check_id=checkbox.getId(); switch (check_id) { case R.id.less_thirty_check: Log.d("sun","less thirty check"); // AppsConstant.user_age="<30"; break; case R.id.thirty_fourty_check: Log.d("sun","thirty fourty check"); // AppsConstant.user_age="30-45"; break; case R.id.great_fourty_check: Log.d("sun","great fourty check"); // AppsConstant.user_age=">45"; break; default: break; } } else{ Toast.makeText(getApplicationContext(), "please select age", Toast.LENGTH_SHORT).show(); return; } if(Checkvalidation(checkbox1)){ RadioButton checkbox=SelectedCheckBox(checkbox1); int check_id=checkbox.getId(); switch (check_id) { case R.id.health_check: Log.d("sun","health_check"); // AppsConstant.user_health="health"; break; case R.id.diabetes_check: Log.d("sun","diabetes_check"); // AppsConstant.user_health="diabetes"; break; case R.id.other_check: Log.d("sun","other_check"); // AppsConstant.user_health="other"; break; default: break; } } else{ Toast.makeText(getApplicationContext(), "please Select the health Problem", Toast.LENGTH_SHORT).show(); return; } if(Checkvalidation(check2)){ RadioButton checkbox=SelectedCheckBox(check2); int check_id=checkbox.getId(); switch (check_id) { case R.id.guy_check: Log.d("sun","Gender:-Guy"); // AppsConstant.user_gender="guy"; break; case R.id.dad_check: Log.d("sun","Gender:-Dad"); // AppsConstant.user_gender="dad"; break; case R.id.girl_check: Log.d("sun","Gender:-Girl"); // AppsConstant.user_gender="girl"; break; case R.id.mom_check: Log.d("sun","Gender:-Mom"); // AppsConstant.user_gender="mom"; break; case R.id.grandad_check: Log.d("sun","Gender:-GrandDad"); // AppsConstant.user_gender="granddad"; break; case R.id.grand_ma: Log.d("sun","Gender:-GrandMaa"); // AppsConstant.user_gender="grandmaa"; break; default: Log.d("sun","Gender:-Guy"); // AppsConstant.user_gender="guy"; break; } } else{ Toast.makeText(getApplicationContext(), "Please Select Your Gender", Toast.LENGTH_SHORT).show(); return; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Test of getOrDefault method, of class SimpleStyleableMap.
@Test public void testGetOrDefault() { System.out.println("getOrDefault"); // GIVEN SimpleStyleableMap instance = new SimpleStyleableMap(); // WHEN getOrDefault and no value has been put Object key = "dummyKey"; Object defaultValue = "defaultValue"; Object result = instance.getOrDefault(key, defaultValue); // THEN must return default value assertEquals(defaultValue, result); // WHEN getOrDefault and a value has been put Object putValue="putValue"; instance.put(key, putValue ); result = instance.getOrDefault(key, defaultValue); // THEN must return put value assertEquals(putValue, result); // WHEN key is removed instance.remove(key); result = instance.getOrDefault(key, defaultValue); // THEN must return default value assertEquals(defaultValue, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testContainsKey() {\n System.out.println(\"containsKey\");\n \n // GIVEN\n SimpleStyleableMap instance = new SimpleStyleableMap();\n \n // WHEN getOrDefault and no value has been put\n Object key = \"dummyKey\";\n boolean result = insta...
[ "0.63259745", "0.62858385", "0.60999656", "0.6006031", "0.5920945", "0.5790706", "0.5721352", "0.5711441", "0.57071036", "0.566418", "0.5660913", "0.5658313", "0.5656336", "0.56421816", "0.5600083", "0.55910754", "0.5588702", "0.5581296", "0.5555501", "0.5528104", "0.5516346"...
0.7978547
0
Test of containsKey method, of class SimpleStyleableMap.
@Test public void testContainsKey() { System.out.println("containsKey"); // GIVEN SimpleStyleableMap instance = new SimpleStyleableMap(); // WHEN getOrDefault and no value has been put Object key = "dummyKey"; boolean result = instance.containsKey(key); // THEN must return false assertEquals(false, result); // WHEN getOrDefault and a value has been put Object putValue="putValue"; instance.put(key, putValue ); result = instance.containsKey(key); // THEN must returnt rue assertEquals(true, result); // WHEN key is removed instance.remove(key); result = instance.containsKey(key); // THEN must return default value assertEquals(false, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean containsKey(Key key) ;", "public abstract boolean containsKey(K key);", "boolean containsKey(CoreLabel key);", "@Override\n\t\t\tpublic boolean containsKey(Object key) {\n\t\t\t\treturn false;\n\t\t\t}", "public boolean contains(Key key);", "@Override\n\tpublic boolean containsKey(Object k...
[ "0.7173415", "0.6968093", "0.691128", "0.6862091", "0.6845912", "0.6841973", "0.679535", "0.6792492", "0.6738047", "0.6687515", "0.6687515", "0.6687515", "0.6687515", "0.6687515", "0.6625117", "0.6583815", "0.6574659", "0.65719575", "0.65719575", "0.6562413", "0.6550558", "...
0.75132495
0
Creates a new instance of EcologicaExcepciones
public ExceptionSubVersion() { this("EcologicaExcepciones"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Exercicio(){\n \n }", "public ProductoNoElaborado() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "private IOferta buildOfertaEjemplo3() {\n\t\tPredicate<Compra> condicion = Predicates.compose(\n\t\t\t\tnew PredicadoDiaSemana(Calendar.SATURDAY),\n\t\t\t\tnew ExtraerFechaCreacion());\n\...
[ "0.6503945", "0.584556", "0.58341", "0.5815336", "0.5807734", "0.5767613", "0.57621026", "0.5754809", "0.5719564", "0.5710972", "0.57033044", "0.56746805", "0.5664832", "0.56445634", "0.5643991", "0.56233454", "0.5569636", "0.5560335", "0.5556129", "0.5550098", "0.55426866", ...
0.5932808
1
This constructor is used to define a new client and handles all the methods for sending and receiving messages
public Client(ClientConfiguration conf) { clientMessages = new Stack<>(); serverMessages = new Stack<>(); this.conf = conf; encryptionSessionHashMap = new HashMap<>(); savedMessage = new HashMap<>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Client() {}", "public Client() {\n }", "public Client() {\r\n\t// TODO Auto-generated constructor stub\r\n\t \r\n }", "public Client() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "ClientMessageSender() {\n\n\t}", "public Client() {\n initComponents();\n \n Serv...
[ "0.7756394", "0.77385134", "0.7688179", "0.7672166", "0.750252", "0.74006957", "0.7321463", "0.73115927", "0.7254352", "0.72149473", "0.71585673", "0.7144338", "0.713254", "0.7103662", "0.7039184", "0.69605327", "0.6918486", "0.6890398", "0.68644696", "0.6817928", "0.680657",...
0.74000883
6
This method starts a connection from the client to the server
public void start() { try { Socket socket = new Socket(conf.getServerIp(), conf.getServerPort()); java.io.InputStream is = socket.getInputStream(); BufferedReader reader = new BufferedReader(new java.io.InputStreamReader(is)); readerThread = new MessageReader(reader); new Thread(readerThread).start(); java.io.OutputStream os = socket.getOutputStream(); PrintWriter writer = new PrintWriter(os); writerThread = new MessageWriter(writer); new Thread(writerThread).start(); while (serverMessages.empty()) { //Do nothing } ServerMessage serverMessage = serverMessages.pop(); if (!serverMessage.getMessageType().equals(ServerMessage.MessageType.HELO)) { System.out.println("Expecting a HELO message but received: " + serverMessage.toString()); } else { System.out.println("Please fill in your username: "); Scanner scanner = new Scanner(System.in); String username = scanner.nextLine(); ClientMessage heloMessage = new ClientMessage(ClientMessage.MessageType.HELO, username); clientMessages.push(heloMessage); while (serverMessages.empty()) { } isConnected = validateServerMessage(heloMessage, serverMessages.pop()); if (!isConnected) { System.out.println("Error logging into server"); } else { System.out.println("Successfully connected to server."); System.out.println("(Type '/quit' to close connection and stop application.)"); System.out.println("Type a broadcast message: "); nonblockReader = new NonblockingBufferedReader(new BufferedReader(new java.io.InputStreamReader(System.in))); while (isConnected) { String line = nonblockReader.readLine(); if (line != null) { ClientMessage clientMessage; if (line.equals("/quit")) { clientMessage = new ClientMessage(ClientMessage.MessageType.QUIT, username + " left the server"); isConnected = false; Thread.sleep(500L); } else if (line.startsWith("/msg") && line.split(" ").length > 1) { //Split the message first String[] splittedline = line.split(" "); String senderUsername = splittedline[1].toLowerCase(); if (!senderUsername.equalsIgnoreCase(username)) { line = line.replace("/msg " + splittedline[1] + " ", ""); //Check if we have an encryptionsession with the user or not if (encryptionSessionHashMap.containsKey(senderUsername)) { //We have an encryptionsession, so we can just send the message String encryptedLine = encryptionSessionHashMap.get(senderUsername).encryptMessage(line); clientMessage = new ClientMessage(ClientMessage.MessageType.ENCR, senderUsername + " " + encryptedLine); System.out.println("(You -> " + senderUsername + "): " + line); } else { //We don't have an encryptionsession yet, so we create one EncryptionSession encryptionSession = new EncryptionSession(); encryptionSessionHashMap.put(senderUsername, encryptionSession); clientMessage = new ClientMessage(ClientMessage.MessageType.KEYS, senderUsername + " " + encryptionSession.getPublicKey()); savedMessage.put(senderUsername, line); } } else { System.out.println("You cannot send a message to yourself"); clientMessage = null; } } else if (line.startsWith("/file") && line.split(" ").length == 3) { //Split the message first String[] splitLine = line.split(" "); String senderUsername = splitLine[1].toLowerCase(); if (!senderUsername.equalsIgnoreCase(username)) { String fileBase64String = new FileTransfer(splitLine[2], senderUsername).sendFile(); clientMessage = new ClientMessage(ClientMessage.MessageType.FILE, fileBase64String); System.out.println("You have send " + splitLine[2] + " to " + senderUsername); } else { System.out.println("You cannot send a file to yourself"); clientMessage = null; } } else { clientMessage = new ClientMessage(ClientMessage.MessageType.BCST, line); System.out.println(line); } if (clientMessage != null) { clientMessages.push(clientMessage); } } if (!serverMessages.empty()) { ServerMessage received = serverMessages.pop(); if (received.getMessageType().equals(ServerMessage.MessageType.BCST)) { System.out.println(received.getPayload()); } //Check if we received an encrypted message else if (received.getMessageType().equals(ServerMessage.MessageType.ENCR)) { //Split the message first String[] splitMessage = received.getPayload().split(" "); String sender = splitMessage[0].toLowerCase(); String encryptedMessage = splitMessage[1]; //If we have a session with this user, we can decrypt the message if (encryptionSessionHashMap.containsKey(sender)) { System.out.println("(" + sender + " -> You): " + encryptionSessionHashMap.get(sender).decryptMessage(encryptedMessage)); } } //If this is the first time, we have to share keys else if (received.getMessageType().equals(ServerMessage.MessageType.KEYS)) { //Split the message first String[] splitMessage = received.getPayload().split(" "); String sender = splitMessage[0].toLowerCase(); String encryptedKey = splitMessage[1]; //Check if we send the first message or not if (encryptionSessionHashMap.containsKey(sender)) { encryptionSessionHashMap.get(sender).decryptKey(encryptedKey); //After saving the aes key, we have to resend our first message String msg = savedMessage.get(sender); if (msg != null) { String encryptedLine = encryptionSessionHashMap.get(sender).encryptMessage(msg); ClientMessage responseMessage = new ClientMessage(ClientMessage.MessageType.ENCR, sender + " " + encryptedLine); clientMessages.push(responseMessage); System.out.println("(You -> " + sender + "): " + msg); savedMessage.remove(sender); } } //We send our aes key when we didn't send the message first else { EncryptionSession encryptionSession = new EncryptionSession(); encryptionSessionHashMap.put(sender, encryptionSession); String aesKey = encryptionSession.encryptKey(encryptedKey); ClientMessage responseMessage = new ClientMessage(ClientMessage.MessageType.KEYS, sender + " " + aesKey); clientMessages.push(responseMessage); } } //Check if the message is a file else if (received.getMessageType().equals(ServerMessage.MessageType.FILE)) { String[] splitMessage = received.getPayload().split(" "); String sender = splitMessage[0].toLowerCase(); String base64String = splitMessage[2]; new FileTransfer(base64String, splitMessage[0], true).readFile(); System.out.println("You have received " + splitMessage[1] + " from " + sender); } } } } disconnect(); System.out.println("Client disconnected!"); } } catch (IOException e) { System.out.println("Ouch! Could not connect to server!"); } catch (InterruptedException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void startClientConnection() {\r\n\t\t\t\r\n\t//\tStringBuilder sbreq = new StringBuilder();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t/*making connection request*/\r\n\t\t\tclientsoc = new Socket(ip,port);\r\n\t\t\t\r\n\t\t\t/*Input and output streams for data sending and receiving through client and server...
[ "0.7604471", "0.7504551", "0.7471868", "0.7366922", "0.7336662", "0.7329941", "0.7119226", "0.70696485", "0.70515615", "0.7045348", "0.70395505", "0.7008087", "0.7001322", "0.69844145", "0.6967239", "0.69420296", "0.69323516", "0.69268674", "0.6913081", "0.6906004", "0.690509...
0.0
-1
This method will validate the +OK message received from the server when entering an username
private boolean validateServerMessage(ClientMessage clientMessage, ServerMessage serverMessage) { boolean isValid = false; try { byte[] hash = java.security.MessageDigest.getInstance("MD5").digest(clientMessage.toString().getBytes()); String encodedHash = new String(java.util.Base64.getEncoder().encode(hash)); if ((serverMessage.getMessageType().equals(ServerMessage.MessageType.OK)) && (encodedHash.equals(serverMessage.getPayload()))) { isValid = true; } } catch (java.security.NoSuchAlgorithmException e) { e.printStackTrace(); } return isValid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean checkUsername() {\n if(getUsername.getText().compareTo(\"\") != 0) { return true; }\n else {\n errorMessage.setText(\"Please enter a username.\");\n return false;\n }\n }", "private void handleUser(String username) {\n if (username.toLowerCase().eq...
[ "0.754129", "0.7067024", "0.6936676", "0.67887956", "0.6784802", "0.6773584", "0.673128", "0.6708285", "0.6693184", "0.6693007", "0.6670489", "0.6665751", "0.66218674", "0.6610484", "0.6603897", "0.6567159", "0.65565634", "0.6535981", "0.65154636", "0.6512865", "0.651022", ...
0.0
-1
This method will disconnect you from the server
private void disconnect() { if (readerThread != null) readerThread.kill(); if (writerThread != null) writerThread.kill(); if (nonblockReader != null) { nonblockReader.close(); } isConnected = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void disconnect(){\n\n\t\tserverConnection.disconnect();\n\t}", "public void disconnect() {}", "public void disconnect( ) {\n disconnect( \"\" );\n }", "public void disconnect();", "public void disconnect();", "public void disconnect();", "public void disconnect();", "public void disc...
[ "0.85472995", "0.79801506", "0.7944128", "0.7875981", "0.7875981", "0.7875981", "0.7875981", "0.7784653", "0.77097946", "0.77097946", "0.77004623", "0.7647881", "0.7567827", "0.7564876", "0.75539446", "0.7535899", "0.7534336", "0.7525135", "0.75211", "0.7510092", "0.74977916"...
0.0
-1
declaration of a String array
public static void main(String[] args) { int[] ages; // declaration of an int array char[] characters; // declaration of a char array //NOT preferred ways of creating arrays String [] lastNames; String addresses []; //Giving a size to array String[] names = new String[3]; names[0] = "Kaan"; names[2] = "Mbappe"; System.out.println(names[0]); System.out.println(names[2]); System.out.println(names[1]); //null }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[] getStringArray();", "public void setStringArray(String[] value);", "private String[] toArray(String str) { String arr[] = new String[1]; arr[0] = str; return arr; }", "public JsArrayString generateArray(String[] array){\r\n\t\tif ( array==null||array.length==0)\r\n\t\t\treturn null ;\r\n\t\t\...
[ "0.68112236", "0.67842424", "0.6718177", "0.64938986", "0.64760095", "0.6467344", "0.64427227", "0.637582", "0.62245613", "0.6222398", "0.62221295", "0.6193616", "0.61617017", "0.6142931", "0.608906", "0.6088485", "0.6071163", "0.6063462", "0.60627985", "0.6053926", "0.600226...
0.0
-1
Find price of item
@Override public double findPrice(DatabaseItem item) { this.item = item; this.dialog = new ProgressDialog(ctx); this.execute(); return this.currentPrice; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double findItemPrice(String item){\n\t\t//TODO\n\t\t\n\t\tdouble price=0.0;\n\t\tfor(int i=0; i<ITEMS.length;i++) {\n\t\t\t\n\t\t\tif(ITEMS[i].equalsIgnoreCase(item)) {\n\t\t\t\tprice=PRICES[i];\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}return price;\n\t}", "public double getDiscountedPrice(doubl...
[ "0.778325", "0.713403", "0.711773", "0.711675", "0.70416164", "0.70416164", "0.70416164", "0.7028325", "0.6937437", "0.69251996", "0.69066507", "0.68951684", "0.68912315", "0.68529606", "0.6813411", "0.67967576", "0.67787504", "0.67761743", "0.6748222", "0.6744361", "0.674176...
0.74309915
1
Looks for item prices
@Override protected Void doInBackground(Void... voids) { Document document; Elements elements = null; try{ String url = item.getUrl(); if(url.contains(HOME_DEPOT)){ document = Jsoup.connect(url).cookie("zip","79902").get(); elements = document.select("#ajaxPrice"); //Homedepot this.textPrice = elements.text(); elements = document.select(".pStrikeThru"); this.initTextPrice = elements.text(); } else if (url.contains(AMAZON)){ document = Jsoup.connect(url).timeout(0).get(); elements = document.select("#priceblock_ourprice");//amazon this.textPrice = elements.text(); } else if (url.contains(WALMART)){ document = Jsoup.connect(url).timeout(0).get(); elements = document.select(".price-group");//bestbuy this.textPrice = elements.text(); } else{ this.textPrice = ""; } } catch(IOException e){ e.printStackTrace(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double findItemPrice(String item){\n\t\t//TODO\n\t\t\n\t\tdouble price=0.0;\n\t\tfor(int i=0; i<ITEMS.length;i++) {\n\t\t\t\n\t\t\tif(ITEMS[i].equalsIgnoreCase(item)) {\n\t\t\t\tprice=PRICES[i];\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}return price;\n\t}", "public Items[] findWherePriceEquals(do...
[ "0.7115591", "0.66838753", "0.64810526", "0.6436164", "0.6432752", "0.640252", "0.63925403", "0.6268024", "0.6267291", "0.6214901", "0.62109333", "0.61691445", "0.61657375", "0.6160559", "0.61099404", "0.6075554", "0.60633284", "0.6048084", "0.60474354", "0.6038264", "0.60274...
0.0
-1
Updates item prices and refresh GUI
@Override protected void onPostExecute(Void aVoid){ super.onPostExecute(aVoid); this.dialog.dismiss(); String url = this.item.getUrl(); if(url.contains(HOME_DEPOT)){ String[] values = this.textPrice.split(" "); double dollars = Double.parseDouble(values[1]); double cents = Double.parseDouble(values[2])/100; this.currentPrice = dollars + cents; this.initTextPrice = this.initTextPrice.replace(",",("")); this.initialPrice = Double.parseDouble(initTextPrice.substring(1)); Toast.makeText(ctx,"Done updating",Toast.LENGTH_LONG).show(); } else if (url.contains(AMAZON)){ this.currentPrice = Double.parseDouble(this.textPrice.substring(1));//amazon Toast.makeText(ctx,"Done updating",Toast.LENGTH_LONG).show(); } else if (url.contains(WALMART)){ String[] values = this.textPrice.split(" "); this.currentPrice = Double.parseDouble(values[0].substring(1)); this.initialPrice = Double.parseDouble(values[2].substring(1)); Toast.makeText(ctx,"Done updating",Toast.LENGTH_LONG).show(); } else{ Toast.makeText(ctx,"Store Not supported",Toast.LENGTH_LONG).show(); this.currentPrice = 0.0; } if(this.initTextPrice == null){ this.initialPrice = this.currentPrice; } item.setInitialPrice(this.initialPrice); item.setCurrentPrice(this.currentPrice); item.calculatePercentageChange(); item.setChange(); DatabaseItemManager d = new DatabaseItemManager(ctx); d.updateItem(item); adapter.notifyDataSetChanged(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void refreshButtonClicked(ActionEvent event) {\n\n PriceFinder refreshedPrice = new PriceFinder(); // generates a new price to set as a temp item's new price\n\n itemView.testItem.setPrice(refreshedPrice.returnNewPrice());\n configureUI(); // essentially pushes the new item informatio...
[ "0.7294122", "0.72119194", "0.70782095", "0.6954084", "0.69138104", "0.6913605", "0.688206", "0.67948204", "0.6766417", "0.6630692", "0.6417273", "0.6391401", "0.63679093", "0.6311437", "0.6305892", "0.63009053", "0.6291642", "0.6281813", "0.6274678", "0.6269852", "0.6236551"...
0.63540244
13
Get the Topn From the Current and Next Population
private static Solution[] getTopSolutions(Solution[] current, Solution[] generated, int popAmount){ // Both Solution Array is Sorted // Set Pointer to Each Array int currPointer = 0; int genPointer = 0; // Create the output Solution[] result = new Solution[popAmount]; // Fill into the result for (int index = 0; index < popAmount; index++) { if(current[currPointer].distance <= generated[genPointer].distance){ // Prevent the Duplicated Solution: Create Again if have Duplicated if (haveDuplicated(result, current[currPointer])) { // Skip Current Solution & Continue currPointer++; index--; }else{ result[index] = current[currPointer++]; } }else{ // Prevent the Duplicated Solution: Create Again if have Duplicated if (haveDuplicated(result, generated[genPointer])) { // Skip Current Solution & Continue genPointer++; index--; }else{ result[index] = generated[genPointer++]; } } // Prevent the IndexOutOfBound if (genPointer >= generated.length) { System.arraycopy(current, currPointer, result, index + 1, popAmount - 1 - index); return result; } if (currPointer >= current.length) { System.arraycopy(generated, genPointer, result, index + 1, popAmount - 1 - index); return result; } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int top();", "public int top() {\n return p.val;\n }", "public int top() { return 0; }", "public int top() {\n return top.value;\n }", "public int top() {\n return One.peek();\n }", "public int top() {\n return q1.getFirst();\n }", "public int top() {\n ...
[ "0.7067787", "0.7010968", "0.6947552", "0.6871131", "0.6847385", "0.68425304", "0.6805118", "0.68023086", "0.6757425", "0.6757425", "0.67479354", "0.66860676", "0.66730803", "0.6668934", "0.66523033", "0.66480297", "0.66224855", "0.66024613", "0.6583227", "0.65817845", "0.657...
0.0
-1
Selection: RankBased Selection Return Two Parents Based On
public static Solution[] rankSelection(Solution[] currPop){ // Get the City Amount int popAmount = currPop.length; int totalWeight = (1 + popAmount) * popAmount / 2; // Get 2 Parents int parentIndex_1 = rankParentIndex(popAmount, totalWeight); int parentIndex_2; // Make Sure Two Parents are Different do { parentIndex_2 = rankParentIndex(popAmount, totalWeight); } while(parentIndex_1 == parentIndex_2); return new Solution[]{currPop[parentIndex_1], currPop[parentIndex_2]}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ArrayList<Chromosome> selectParentsTournament() {\n ArrayList<Chromosome> parents = new ArrayList<Chromosome>(Defines.crossoverParentCt);\n ArrayList<Chromosome> matingPool = new ArrayList<Chromosome>(Defines.crossoverParentCt);\n\n // Run tournaments to select parents - for each paren...
[ "0.6487596", "0.64266413", "0.63272136", "0.63044167", "0.6291923", "0.61884266", "0.612213", "0.60046095", "0.5999114", "0.58931535", "0.5866849", "0.5795695", "0.5606658", "0.5605506", "0.55737203", "0.5544996", "0.5527592", "0.55218923", "0.55074537", "0.55040914", "0.5494...
0.66773427
0
Auxiliary Function For rankSelection: Generate the Random City Index
private static int rankParentIndex(int popAmount, int totalWeight) { // Randomly Generate the Weight double randomWeight = Math.random() * (totalWeight + 1); // Find out the Living Range for (int rankWeight = popAmount; rankWeight > 0; rankWeight--) { // Reduce the rankWeight randomWeight = randomWeight - rankWeight; // Meet the Rank if (randomWeight <= 0) { return popAmount - rankWeight; } } return popAmount - 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String randomCityId(RandomNumberGenerator random) {\n long targetPop = (long) (random.rand() * totalPopulation);\n\n for (Map.Entry<String, Long> city : populationByCityId.entrySet()) {\n targetPop -= city.getValue();\n\n if (targetPop < 0) {\n return city.getKey();\n }\n }\n...
[ "0.6488237", "0.64814675", "0.6318941", "0.5931284", "0.5872085", "0.58565015", "0.58564806", "0.5826058", "0.582588", "0.5759553", "0.5656883", "0.56503147", "0.560677", "0.5588661", "0.555146", "0.5535749", "0.5527888", "0.5472583", "0.54520166", "0.54346836", "0.539494", ...
0.48639035
82
Check MapTable and Return the Replaced Value
private static int getMappingValue(ArrayList<Integer[]> mapTable, int listOrder, int value) { // Define Mapping Order int mapIndex; if (listOrder == 1){ mapIndex = 1; }else{ mapIndex = 0; } // Go through the Whole List for(Integer[] item: mapTable) { if (item[listOrder - 1] == value){ return item[mapIndex]; } } return value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void updateMap(MapData map);", "public int updatedcode(Map<String, Object> map) {\n\t\treturn dao.updatedcode(map);\r\n\t}", "public int updatedcodea(Map<String, Object> map) {\n\t\treturn dao.updatedcodea(map);\r\n\t}", "public int[] updateMap() {\r\n\t\tint[] isObstacle = super.updateMap();\r\n\t\tsmap.set...
[ "0.56485206", "0.559386", "0.55594665", "0.5510865", "0.5449205", "0.54372466", "0.54297984", "0.53814435", "0.53127956", "0.52813834", "0.5273172", "0.5253422", "0.522585", "0.5168778", "0.51515317", "0.51439965", "0.5127154", "0.51240426", "0.51125914", "0.5111923", "0.5090...
0.54612154
4
Check Whether Have Duplicated Solution
public static boolean haveDuplicated(Solution[] Collection, Solution element) { // Go through All the Collection for (Solution item: Collection) { // Prevent NullElementException if (item == null) { return false; } if(item.equals(element)) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean unique() {\n\t\tfor (int i = 1; i <= 9; i++) {\n\t\t\tcopy(problem, comp);\n\t\t\tsolve(0, 0, i, comp);\n\t\t\tif (!checkComp()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "protected boolean isDuplicate(ELesxUseCase useCase) {\n return false;\n }", "public boolean che...
[ "0.7434679", "0.67549443", "0.6683565", "0.6663572", "0.65890807", "0.65667593", "0.6540323", "0.6498649", "0.6422283", "0.6355585", "0.6318917", "0.6302161", "0.6293815", "0.62893915", "0.62736845", "0.6272423", "0.6247443", "0.62393427", "0.62151325", "0.6200626", "0.615216...
0.6259257
16
Method to Execute the GA
public static boolean solve(Problem inputProblem, int popLimit, double mutChance, int iterLimit) { // Check All the Input Parameter // popLimit: Make as Even int evenBase = 2; if (popLimit % evenBase != 0){ popLimit = popLimit + 1; } // mutChance: in the Range of 0% and 100% if (mutChance < 0 || mutChance > 1){ System.out.println("Invalid Mutation Chance: " + mutChance); return false; } // Initialization Solution[] currentPop = initPopulation(inputProblem, popLimit); Solution[] generatedPop, nextPop; System.out.println(0 + "\t" +0+ "\t" +currentPop[0].distance); long time = System.nanoTime(); // Loop For Counting Iteration for (int turn = 0; turn < iterLimit; turn++) { //System.out.println(currentPop[0].distance); // Initialization Next Generation generatedPop = new Solution[popLimit]; // Loop for Generating Next Population Solution[] parent, offspring; for (int leftChild = popLimit; leftChild > 0; leftChild = leftChild - 2) { // Selection parent = rankSelection(currentPop); // CrossOver offspring = CrossOver_mapping(currentProblem, parent[0], parent[1]); // Prevent Duplicated Offspring if (haveDuplicated(generatedPop, offspring[0]) || haveDuplicated(generatedPop, offspring[1])) { leftChild = leftChild + 2; continue; } // Add Child into generatedPop generatedPop[leftChild - 1] = offspring[0]; generatedPop[leftChild - 2] = offspring[1]; } // Mutation For Each Solution Solution newElement; for (int index = 0; index < popLimit; index++){ if(Math.random() < mutChance){ // Use Local Search to Finish Mutation newElement = HillClimbing.solve_invoke(inputProblem, generatedPop[index]); // Prevent Duplicated Offspring if (!haveDuplicated(generatedPop, newElement)) { generatedPop[index] = newElement; } } } // Sort the Generated Array Arrays.sort(generatedPop); // Produce Next Generation nextPop = getTopSolutions(currentPop, generatedPop, popLimit); // Switch nextPop to currentPop currentPop = nextPop; System.out.println((System.nanoTime() - time) + "\t" + (turn+1) + "\t" + currentPop[0].distance); } // Store into the Static Variable optimalSolution = currentPop[0]; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void execute() {\n\t\tSystem.out.println(\"==STATISTICS FOR THE RESTAURANT==\");\n\t\tSystem.out.println(\"Most used Ingredients:\");\n\t\tmanager.printIngredients();\n\t\tSystem.out.println(\"Most ordered items:\");\n\t\tmanager.printMenuItems();\n\t\tSystem.out.println(\"==END STATISTICS==\")...
[ "0.61667645", "0.5901071", "0.5849025", "0.58024126", "0.57802474", "0.57802474", "0.57802474", "0.5757995", "0.57449585", "0.57338166", "0.57338166", "0.5724335", "0.5721793", "0.5719288", "0.5702244", "0.5689151", "0.5683326", "0.5643984", "0.5599825", "0.5568776", "0.55619...
0.0
-1
Check the Route Length First
public boolean equals(Solution sol) { if (this.route.length != sol.route.length){ return false; } // Check the Distance else if (this.distance != sol.distance) { return false; }else{ // Check the Route for (int index = 0; index < this.route.length; index++) { if (this.route[index] != sol.route[index]){ return false; } } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasRoute();", "public boolean hasValidRoute() \n {\n return validRoute;\n }", "@Test\n\tpublic void checkNumberOfDifferentRoutes() {\n\t\tassertEquals(Trains.numberDifferentRoutes(\"C\",\"C\",30), 7);\n\t}", "@Test\n\tpublic void checkShortestRoute() {\n\t\tassertEquals(Trains.shortestRo...
[ "0.673366", "0.64593524", "0.6358811", "0.6356156", "0.6292244", "0.5975037", "0.59735364", "0.5931768", "0.5889477", "0.58708966", "0.57931095", "0.5761087", "0.5758228", "0.5745202", "0.572422", "0.5685838", "0.56764805", "0.5668895", "0.564965", "0.56313837", "0.5610348", ...
0.0
-1
Create buttons in this page
protected void createButtons(Composite parent) { comRoot = new Composite(parent, SWT.BORDER); comRoot.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false)); comRoot.setLayout(new GridLayout(2, false)); tbTools = new ToolBar(comRoot, SWT.WRAP | SWT.RIGHT | SWT.FLAT); tbTools.setLayout(new GridLayout()); tbTools.setLayoutData(new GridData(SWT.RIGHT, SWT.BOTTOM, true, false)); final ToolItem btnSettings = new ToolItem(tbTools, SWT.NONE); btnSettings.setText(Messages.btnAdvancedSettings); btnSettings.setToolTipText(Messages.tipAdvancedSettings); btnSettings.addSelectionListener(new SelectionAdapter() { public void widgetSelected(final SelectionEvent event) { PerformanceSettingsDialog dialog = new PerformanceSettingsDialog( getShell(), getMigrationWizard().getMigrationConfig()); dialog.open(); } }); new ToolItem(tbTools, SWT.SEPARATOR); btnPreviewDDL = new ToolItem(tbTools, SWT.CHECK); btnPreviewDDL.setSelection(false); btnPreviewDDL.setText(Messages.btnPreviewDDL); btnPreviewDDL.setToolTipText(Messages.tipPreviewDDL); btnPreviewDDL.addSelectionListener(new SelectionAdapter() { public void widgetSelected(final SelectionEvent event) { boolean flag = btnPreviewDDL.getSelection(); switchText(flag); } }); new ToolItem(tbTools, SWT.SEPARATOR); final ToolItem btnExportScript = new ToolItem(tbTools, SWT.NONE); btnExportScript.setText(Messages.btnExportScript); btnExportScript.setToolTipText(Messages.tipSaveScript); btnExportScript.addSelectionListener(new SelectionAdapter() { public void widgetSelected(final SelectionEvent event) { exportScriptToFile(); } }); new ToolItem(tbTools, SWT.SEPARATOR); final ToolItem btnUpdateScript = new ToolItem(tbTools, SWT.NONE); btnUpdateScript.setText(Messages.btnUpdateScript); btnUpdateScript.setToolTipText(Messages.tipUpdateScript); btnUpdateScript.addSelectionListener(new SelectionAdapter() { public void widgetSelected(final SelectionEvent event) { prepare4SaveScript(); getMigrationWizard().saveMigrationScript(false, isSaveSchema()); MessageDialog.openInformation(PlatformUI.getWorkbench() .getDisplay().getActiveShell(), Messages.msgInformation, Messages.setOptionPageOKMsg); } }); btnUpdateScript .setEnabled(getMigrationWizard().getMigrationScript() != null); new ToolItem(tbTools, SWT.SEPARATOR); final ToolItem btnNewScript = new ToolItem(tbTools, SWT.NONE); btnNewScript.setText(Messages.btnCreateNewScript); btnNewScript.setToolTipText(Messages.tipCreateNewScript); btnNewScript.addSelectionListener(new SelectionAdapter() { public void widgetSelected(final SelectionEvent event) { prepare4SaveScript(); String name = EditScriptDialog.getMigrationScriptName( getShell(), getMigrationWizard().getMigrationConfig() .getName()); if (StringUtils.isBlank(name)) { return; } getMigrationWizard().getMigrationConfig().setName(name); getMigrationWizard().saveMigrationScript(true, isSaveSchema()); btnUpdateScript.setEnabled(getMigrationWizard() .getMigrationScript() != null); MessageDialog.openInformation(PlatformUI.getWorkbench() .getDisplay().getActiveShell(), Messages.msgInformation, Messages.setOptionPageOKMsg); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createButtons() {\n\t\tescapeBackground = new GRect(200, 150, 300, 400);\n\t\tescapeBackground.setFilled(true);\n\t\tescapeBackground.setColor(Color.gray);\n\n\t\tbutton1 = new GButton(\"Return to Game\", 250, 175, 200, 50, Color.cyan);\n\t\tbutton3 = new GButton(\"Exit Level\", 250, 330, 200, 50, Colo...
[ "0.7697604", "0.76447046", "0.76436573", "0.74218786", "0.73884064", "0.7377064", "0.72844833", "0.72247154", "0.7177878", "0.7168342", "0.70548993", "0.7053412", "0.6996453", "0.6995575", "0.69730943", "0.693267", "0.69271094", "0.687939", "0.68756783", "0.6867596", "0.68418...
0.6839119
21
Create contents of the wizard
public void createControl(Composite parent) { Composite container = new Composite(parent, SWT.NONE); container.setLayout(new GridLayout()); setControl(container); Composite container2 = new Composite(container, SWT.BORDER); container2.setLayout(new GridLayout()); container2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); txtSummary = new StyledText(container2, SWT.LEFT | SWT.BORDER | SWT.READ_ONLY | SWT.WRAP | SWT.V_SCROLL); txtSummary.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); txtSummary.setBackground(SWTResourceConstents.COLOR_WHITE); txtDDL = new StyledText(container2, SWT.LEFT | SWT.BORDER | SWT.READ_ONLY | SWT.WRAP | SWT.V_SCROLL); GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true); gd.exclude = true; txtDDL.setLayoutData(gd); txtDDL.setVisible(false); txtDDL.setBackground(SWTResourceConstents.COLOR_WHITE); createButtons(container); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract AbstractPerfCakeEditWizard createWizard(IStructuredSelection selection);", "private Wizard(final FXFinder javafxFinder) {\n this.javafxFinder = javafxFinder;\n wizard = new JFrame(\"Apache SIS setup\");\n final Container content = wizard.getContentPane();\n content....
[ "0.69989717", "0.6820229", "0.673835", "0.67283905", "0.67213607", "0.67124814", "0.6518928", "0.651366", "0.65055203", "0.6498539", "0.6477543", "0.64678425", "0.6467805", "0.6435733", "0.6425108", "0.6331127", "0.633104", "0.6325514", "0.6315328", "0.626534", "0.6240933", ...
0.0
-1
Export script to a external XML file
protected void exportScriptToFile() { try { final MigrationConfiguration cfg = getMigrationWizard() .getMigrationConfig(); prepare4SaveScript(); ExportScriptDialog.exportScript(cfg, isSaveSchema()); } catch (Exception e) { // MessageDialog.openError(PlatformUI.getWorkbench().getDisplay().getActiveShell(), // Messages.msgWarning, Messages.setOptionPageErrMsg); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void savetoxml() throws FileNotFoundException, JAXBException {\n xml_methods.save(player);\n }", "public void dumpAsXmlFile(String pFileName);", "private void write(){\n\t\ttry {\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = t...
[ "0.6168482", "0.6129763", "0.61245847", "0.6119861", "0.60914516", "0.6088731", "0.5909971", "0.59038615", "0.5891314", "0.5889447", "0.58502513", "0.58251756", "0.57546276", "0.5748819", "0.5687903", "0.5657584", "0.5649611", "0.56421906", "0.5609379", "0.55974567", "0.55940...
0.6454647
0
Prepare for saving migration script.
protected void prepare4SaveScript() { MigrationConfiguration cfg = getMigrationWizard().getMigrationConfig(); cfg.cleanNoUsedConfigForStart(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void resetTestDatabase() {\n String URL = \"jdbc:mysql://localhost:3306/?serverTimezone=CET\";\n String USER = \"fourthingsplustest\";\n\n InputStream stream = UserStory1Test.class.getClassLoader().getResourceAsStream(\"init.sql\");\n if (stream == null) throw new RuntimeExceptio...
[ "0.58498555", "0.58103496", "0.5704054", "0.5702856", "0.56893915", "0.5662129", "0.56269336", "0.5598559", "0.5554486", "0.5547343", "0.5538641", "0.54936886", "0.5488337", "0.5488337", "0.5437661", "0.543161", "0.5420078", "0.53942126", "0.5348435", "0.5339684", "0.5325557"...
0.7731438
0
Set DDL to text area.
protected void setDDLText() { MigrationConfiguration cfg = getMigrationWizard().getMigrationConfig(); if (cfg.sourceIsSQL()) { btnPreviewDDL.setSelection(false); btnPreviewDDL.setEnabled(false); switchText(false); return; } txtDDL.setText(""); prepare4SaveScript(); List<Table> tables = new ArrayList<Table>(); final CUBRIDSQLHelper ddlUtils = CUBRIDSQLHelper.getInstance(null); StringBuffer sbConstrains = new StringBuffer(); appendSchemaDDL(cfg); for (SourceEntryTableConfig setc : cfg.getExpEntryTableCfg()) { if (!setc.isCreateNewTable()) { continue; } Table tarTbl = null; tarTbl = cfg.getTargetTableSchema(setc.getTargetOwner(), setc.getTarget()); if (tarTbl == null || tables.contains(tarTbl)) { continue; } if (setc != null && setc.getComment() != null) { if (tarTbl.getComment() == null || tarTbl.getComment() != setc.getComment()) { tarTbl.setComment(setc.getComment()); } } else { tarTbl.setComment(null); } for (Column tarCol : tarTbl.getColumns()) { SourceColumnConfig sourceCol = setc.getColumnConfigIgnoreCase(tarCol.getName()); if (sourceCol != null && tarCol != null){ if (sourceCol.getComment() != null) { if (tarCol.getComment() == null || tarCol.getComment() != sourceCol.getComment()){ tarCol.setComment(sourceCol.getComment()); } } else { tarCol.setComment(null); } } } tables.add(tarTbl); String sql = ddlUtils.getTableDDL(tarTbl, cfg.isAddUserSchema()); txtDDL.append(sql); txtDDL.append(NEWLINE); final PK pk = tarTbl.getPk(); if (setc.isCreatePK() && pk != null) { String ddl = ddlUtils.getPKDDL(tarTbl.getOwner(), tarTbl.getName(), pk.getName(), pk.getPkColumns(), cfg.isAddUserSchema()); sbConstrains.append(ddl); sbConstrains.append(";"); sbConstrains.append(NEWLINE); sbConstrains.append(NEWLINE); } for (FK fk : tarTbl.getFks()) { String ddl = ddlUtils.getFKDDL(tarTbl.getOwner(), tarTbl.getName(), fk, cfg.isAddUserSchema()); sbConstrains.append(ddl); sbConstrains.append(";"); sbConstrains.append(NEWLINE); sbConstrains.append(NEWLINE); } for (Index idx : tarTbl.getIndexes()) { String ddl = ddlUtils.getIndexDDL(tarTbl.getOwner(), tarTbl.getName(), idx, "", cfg.isAddUserSchema()); sbConstrains.append(ddl); sbConstrains.append(";"); sbConstrains.append(NEWLINE); sbConstrains.append(NEWLINE); } } for (SourceSQLTableConfig sstc : cfg.getExpSQLCfg()) { if (!sstc.isCreateNewTable()) { continue; } Table tarTbl = cfg.getTargetTableSchema(sstc.getTarget()); if (tarTbl == null || tables.contains(tarTbl)) { continue; } tables.add(tarTbl); String sql = ddlUtils.getTableDDL(tarTbl, cfg.isAddUserSchema()); txtDDL.append(sql); txtDDL.append(NEWLINE); } for (SourceViewConfig sc : cfg.getExpViewCfg()) { if (!sc.isCreate()) { continue; } View vw = cfg.getTargetViewSchema(sc.getTargetOwner(), sc.getTarget()); String ddl = ddlUtils.getViewDDL(vw, cfg.isAddUserSchema()); txtDDL.append(ddl); txtDDL.append(NEWLINE); txtDDL.append(NEWLINE); } for (SourceSequenceConfig sc : cfg.getExpSerialCfg()) { if (!sc.isCreate()) { continue; } Sequence sq = cfg.getTargetSerialSchema(sc.getTargetOwner(), sc.getTarget()); String ddl = ddlUtils.getSequenceDDL(sq, cfg.isAddUserSchema()); txtDDL.append(ddl); txtDDL.append(NEWLINE); txtDDL.append(NEWLINE); } for (SourceCSVConfig sstc : cfg.getCSVConfigs()) { if (!sstc.isCreate()) { continue; } Table tarTbl = cfg.getTargetTableSchema(sstc.getTarget()); if (tarTbl == null || tables.contains(tarTbl)) { continue; } tables.add(tarTbl); String sql = ddlUtils.getTableDDL(tarTbl, cfg.isAddUserSchema()); txtDDL.append(sql); txtDDL.append(NEWLINE); } txtDDL.append(sbConstrains.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void putDataToTextArea() {\n jTextArea1.setEditable(false);\n jTextArea1.setText(selectedFoods);\n }", "public void setAreaText(String text) {\n description.setText(text);\n }", "public static void fillTextArea() {\r\n\t\tString choice = (String) comboBox.getSelectedItem();\r...
[ "0.6229173", "0.6106782", "0.5993547", "0.5787741", "0.5778346", "0.5775866", "0.5762888", "0.5741137", "0.57362074", "0.569331", "0.560512", "0.5586123", "0.5578929", "0.5565633", "0.5498321", "0.5485064", "0.5443642", "0.544112", "0.5424272", "0.53972936", "0.53889143", "...
0.72129804
0
Set "create user" query
public void appendSchemaDDL(MigrationConfiguration cfg) { MigrationConfiguration config = getMigrationWizard().getMigrationConfig(); List<String> schemaList = config.getNewTargetSchema(); for (String schemaName : schemaList) { txtDDL.append("CREATE USER " + schemaName); txtDDL.append(";"); txtDDL.append(NEWLINE); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void createMysqlUser(Eleve e) {\n Session session = HibernateUtils.getSessionFactory().openSession();\r\n String SQLRequest = \"CREATE USER '\" + e.getAbreviation() + \"'@'%' IDENTIFIED BY '\" + e.getPwd() + \"'; \";\r\n System.out.println(SQLRequest);\r\n session.beginTra...
[ "0.6705294", "0.66732204", "0.6593883", "0.65915805", "0.6502107", "0.65018165", "0.65001875", "0.6464256", "0.64564764", "0.64138144", "0.6404393", "0.6373691", "0.63542265", "0.63486624", "0.6345757", "0.63158053", "0.6305113", "0.6305113", "0.62794363", "0.6269848", "0.625...
0.0
-1
Show or hide the DDL text.
protected void switchText(boolean flag) { txtDDL.setVisible(flag); GridData gd = (GridData) txtDDL.getLayoutData(); gd.exclude = !flag; txtSummary.setVisible(!flag); gd = (GridData) txtSummary.getLayoutData(); gd.exclude = flag; txtDDL.getParent().layout(); btnPreviewDDL.setSelection(flag); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void setDDLText() {\n\t\tMigrationConfiguration cfg = getMigrationWizard().getMigrationConfig();\n\t\tif (cfg.sourceIsSQL()) {\n\t\t\tbtnPreviewDDL.setSelection(false);\n\t\t\tbtnPreviewDDL.setEnabled(false);\n\t\t\tswitchText(false);\n\t\t\treturn;\n\t\t}\n\t\ttxtDDL.setText(\"\");\n\t\tprepare4SaveScri...
[ "0.6280625", "0.5967288", "0.59668916", "0.5887942", "0.5818264", "0.5808294", "0.5651355", "0.5639726", "0.5631478", "0.56156677", "0.5518617", "0.53366476", "0.53050554", "0.528976", "0.52827305", "0.5268417", "0.52133626", "0.5184602", "0.5177947", "0.5165406", "0.51459455...
0.66228604
0
If saving source schema into migration script file
protected boolean isSaveSchema() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void recreateDatabaseSchema() {\n\t\t// Fetch database schema\n\t\tlogger.info(\"Reading database schema from file\");\n\t\tString[] schemaSql = loadFile(\"blab_schema.sql\", new String[] { \"--\", \"/*\" }, \";\");\n\n\t\tConnection connect = null;\n\t\tStatement stmt = null;\n\t\ttry {\n\t\t\t// Get the ...
[ "0.6353746", "0.6002483", "0.59397507", "0.59152514", "0.58107615", "0.5778524", "0.5760724", "0.5737137", "0.5714637", "0.5703406", "0.568981", "0.56543124", "0.5649789", "0.56202275", "0.56202275", "0.56197965", "0.56134", "0.5611582", "0.5608942", "0.55973935", "0.5592502"...
0.6028849
1
Gets a single FractalNode out of an FScript value: If arg is a FractalNode, returns it. If arg is a nonempty nodeset (i.e. a FractalNode[]), returns one element of the set. Otherwise, returns null.
public static Node getSingleNode(Object arg) { if (arg instanceof Node) { return (Node) arg; } else if (arg instanceof Iterable<?>) { return (Node) Iterables.getOnlyElement((Iterable<?>) arg, null); } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object get(Node node);", "private SearchNode findFirstNode(HashSet<SearchNode> set){\n\t\t\tSearchNode min = null;\n\t\t\tfor (SearchNode cur : set){\n\t\t\t\tif (min == null || cur.fScore < min.fScore)\n\t\t\t\t\tmin = cur;\n\t\t\t}\n\t\t\treturn min;\n\t\t}", "public Node<E> getFirst(){\n Node<E> toRe...
[ "0.5516778", "0.55043364", "0.5219712", "0.5123319", "0.50245345", "0.49792024", "0.496716", "0.49603647", "0.49130645", "0.49105418", "0.48693162", "0.48580074", "0.48475227", "0.47954994", "0.47800106", "0.47237945", "0.4713893", "0.4700424", "0.469751", "0.46938974", "0.46...
0.6654697
0
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.7246874", "0.72017205", "0.71953726", "0.7177551", "0.7107639", "0.7040628", "0.7038909", "0.70122313", "0.7010098", "0.69809204", "0.6946122", "0.6940016", "0.6934117", "0.6917838", "0.6917838", "0.6891204", "0.6883838", "0.6875593", "0.6874913", "0.6862368", "0.6862368",...
0.0
-1
Action for Cancel button.
@Action public void acCancel() { setChangeObj(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void cancelButtonActionPerformed(ActionEvent e) {\n }", "void cancelButton_actionPerformed(ActionEvent e) {\n setUserAction(CANCELLED);\n setVisible(false);\n }", "void btnCancel();", "void onCancelClicked();", "private void actionCancel() {\n\t\tselectedDownload.cancel();\n\t\tupdate...
[ "0.8303044", "0.82837737", "0.82590556", "0.81451356", "0.814405", "0.8119098", "0.811594", "0.79297745", "0.78919744", "0.7885027", "0.78391755", "0.7687486", "0.7658327", "0.7651064", "0.7600984", "0.7587857", "0.75639904", "0.7544679", "0.75306845", "0.749404", "0.74939495...
0.73578185
25
Action for OK button.
@Action public void acOk() { if (checkFormattedTextFieldNullNoSupposed(jftfDiameter, 0.1, 1.5)) { return; } if (checkFormattedTextFieldNullNoSupposed(jftfThickness, 1e-3, 0.1)) { return; } if (checkFormattedTextFieldNullNoSupposed(jftfDepth, 0.5, 50.0)) { return; } if (checkFormattedTextFieldNullNoSupposed(jftfValueBegin, -1e5, 1e5)) { return; } if (checkFormattedTextFieldNullNoSupposed(jftfValueStep, 0.1, 1e3)) { return; } getTempObj().setDiameter(getDoubleFromFormattedTextField(jftfDiameter)); getTempObj().setThickness(getDoubleFromFormattedTextField(jftfThickness)); getTempObj().setDepth(getDoubleFromFormattedTextField(jftfDepth)); getTempObj().setCoordBegin(getDoubleFromFormattedTextField(jftfValueBegin)); getTempObj().setCoordStep(getDoubleFromFormattedTextField(jftfValueStep)); getTempObj().setCoordCount((Integer) jspValueCount.getValue()); setChangeObj(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void okButtonClicked();", "public void actionPerformed (ActionEvent e)\n\t\t\t\t{\n\t\t\t\talertOK();\n\t\t\t\t}", "protected abstract boolean onOkClicked();", "public void cmdOk() {\n\n\t\tif (!m_actionscombo.isValueInModel()) {\n\t\t\tString msg = I18N.getLocalizedMessage(\"Invalid Action Name\");\n\t\t\tS...
[ "0.82498163", "0.7735042", "0.76717913", "0.76620084", "0.7599956", "0.7563331", "0.74849004", "0.74773395", "0.74751794", "0.7474995", "0.7465549", "0.7388835", "0.7280969", "0.7170516", "0.7117098", "0.71012646", "0.70957196", "0.70934623", "0.7088997", "0.7025616", "0.6995...
0.0
-1
CHECKSTYLE:OFF This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jlbDiameter = new javax.swing.JLabel(); jftfDiameter = new javax.swing.JFormattedTextField(); jlbThickness = new javax.swing.JLabel(); jftfThickness = new javax.swing.JFormattedTextField(); jlbDepth = new javax.swing.JLabel(); jftfDepth = new javax.swing.JFormattedTextField(); jPanel2 = new javax.swing.JPanel(); jlbValueBegin = new javax.swing.JLabel(); jftfValueBegin = new javax.swing.JFormattedTextField(); jlbValueStep = new javax.swing.JLabel(); jftfValueStep = new javax.swing.JFormattedTextField(); jlbValueCount = new javax.swing.JLabel(); jspValueCount = new javax.swing.JSpinner(); jbtnOk = new javax.swing.JButton(); jbtnCancel = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(ru.gss.pmfsearcher.PMFSearcherApp.class).getContext().getResourceMap(DlgParameterEdit.class); setTitle(resourceMap.getString("Form.title")); // NOI18N setModal(true); setName("Form"); // NOI18N setResizable(false); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel1.border.title"))); // NOI18N jPanel1.setName("jPanel1"); // NOI18N jlbDiameter.setText(resourceMap.getString("jlbDiameter.text")); // NOI18N jlbDiameter.setName("jlbDiameter"); // NOI18N jftfDiameter.setName("jftfDiameter"); // NOI18N jlbThickness.setText(resourceMap.getString("jlbThickness.text")); // NOI18N jlbThickness.setName("jlbThickness"); // NOI18N jftfThickness.setName("jftfThickness"); // NOI18N jlbDepth.setText(resourceMap.getString("jlbDepth.text")); // NOI18N jlbDepth.setName("jlbDepth"); // NOI18N jftfDepth.setName("jftfDepth"); // NOI18N javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jlbThickness) .addComponent(jlbDepth) .addComponent(jlbDiameter)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 176, Short.MAX_VALUE) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jftfDiameter) .addComponent(jftfThickness) .addComponent(jftfDepth, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap()) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jlbDiameter) .addComponent(jftfDiameter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jlbThickness) .addComponent(jftfThickness, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jlbDepth) .addComponent(jftfDepth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap()) ); jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel2.border.title"))); // NOI18N jPanel2.setName("jPanel2"); // NOI18N jlbValueBegin.setText(resourceMap.getString("jlbValueBegin.text")); // NOI18N jlbValueBegin.setName("jlbValueBegin"); // NOI18N jftfValueBegin.setName("jftfValueBegin"); // NOI18N jlbValueStep.setText(resourceMap.getString("jlbValueStep.text")); // NOI18N jlbValueStep.setName("jlbValueStep"); // NOI18N jftfValueStep.setName("jftfValueStep"); // NOI18N jlbValueCount.setText(resourceMap.getString("jlbValueCount.text")); // NOI18N jlbValueCount.setName("jlbValueCount"); // NOI18N jspValueCount.setName("jspValueCount"); // NOI18N javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() .addComponent(jlbValueBegin) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)) .addComponent(jlbValueStep) .addComponent(jlbValueCount)) .addGap(67, 67, 67) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jspValueCount) .addComponent(jftfValueStep) .addComponent(jftfValueBegin, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jlbValueBegin) .addComponent(jftfValueBegin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jlbValueStep) .addComponent(jftfValueStep, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jlbValueCount) .addComponent(jspValueCount, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(ru.gss.pmfsearcher.PMFSearcherApp.class).getContext().getActionMap(DlgParameterEdit.class, this); jbtnOk.setAction(actionMap.get("acOk")); // NOI18N jbtnOk.setName("jbtnOk"); // NOI18N jbtnCancel.setAction(actionMap.get("acCancel")); // NOI18N jbtnCancel.setName("jbtnCancel"); // NOI18N javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(jbtnOk, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jbtnCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jbtnOk) .addComponent(jbtnCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap()) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPem...
[ "0.7394902", "0.730535", "0.730535", "0.730535", "0.72993475", "0.72569805", "0.7242906", "0.7213646", "0.71623415", "0.71535647", "0.7134446", "0.709741", "0.7095053", "0.70120686", "0.70061785", "0.6997782", "0.6991662", "0.69877446", "0.69771487", "0.69716275", "0.69444615...
0.0
-1
22:09 22:29 22:38 22:46 22:50 22:54 23:02
public static void main(String[] args) { String[] input = new String[]{"A,E,N,S", "S,H,N", "E,N", "H", "N"}; List<String> list = costOfModules(input); for (String str : list) { System.out.println(str); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\n String time =\"16:49:40\".substring(0,2);\n System.out.println(time);\n\n }", "static String timeCount_1(List<String> Arr){\n int timeHH = 0;\n int timeMI = 0;\n int timeSS = 0;\n \n Str...
[ "0.6474335", "0.63276905", "0.61444616", "0.61444414", "0.6036842", "0.5951158", "0.5923497", "0.59002167", "0.58312565", "0.58045167", "0.57501584", "0.5737751", "0.5712253", "0.5653274", "0.5653274", "0.56355226", "0.56326634", "0.56326634", "0.56041557", "0.5595833", "0.55...
0.0
-1
assert input: ["A,E,N,S", "S,H,N", "E,N", "H", "N"]
static List<String> costOfModules(String[] input) { if (input == null || input.length == 0) return null; String[] allModules = new String[input.length]; Map<String, Set<String>> map = revertMappings(input, allModules); // sort all modules Arrays.sort(allModules); Map<String, Boolean> visited = new HashMap<>(); List<String> resultList = new ArrayList<>(); for (String module : allModules) { // visited used to avoid cycle dependencies initVisited(visited, allModules); resultList.add(module + "," + dfs(module, map, visited)); visited.clear(); } return resultList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\t\r\n\t\tint a [] = {1,0,0,1,1,0,0,1,0,1,0,0,0,1};\r\n\t\t\r\n\t\tboolean start = false;\r\n\t\t//boolean end = false;\r\n\t\tString s = \"\";\r\n\t\tString k = Arrays.toString(a);\r\n\t\tString[] strings = (k.replace(\"[\", \"\").replace(\"]\", \"\").split(\", \"));\r\...
[ "0.6039737", "0.60155874", "0.5927434", "0.5845983", "0.577116", "0.57703984", "0.5658499", "0.56534535", "0.56207556", "0.5578883", "0.55612236", "0.55561507", "0.5467849", "0.5463126", "0.54466015", "0.5434874", "0.5428981", "0.5394985", "0.53780776", "0.53761363", "0.53084...
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View v) { calculate(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View arg0) { txtEpd.setText(""); txtDpd.setText(""); txtRate.setText(""); txtFvalue.setText(""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
construct tree for test
@Test public void testHandleIndexNodeUnderflowed(){ LeafNode<Integer, Integer> leaf1 = new LeafNode<Integer, Integer>(2, 2); leaf1.insertSorted(3, 3); LeafNode<Integer, Integer> leaf2 = new LeafNode<Integer, Integer>(5, 5); leaf2.insertSorted(7, 7); leaf2.insertSorted(8, 8); LeafNode<Integer, Integer> leaf3 = new LeafNode<Integer, Integer>(14, 14); leaf3.insertSorted(16, 16); LeafNode<Integer, Integer> leaf4 = new LeafNode<Integer, Integer>(22,22); leaf4.insertSorted(27, 27); leaf4.insertSorted(29, 29); LeafNode<Integer, Integer> leaf5 = new LeafNode<Integer, Integer>(33, 33); leaf5.insertSorted(34, 34); leaf5.insertSorted(38, 38); leaf5.insertSorted(39, 39); leaf1.nextLeaf = leaf2; leaf2.previousLeaf = leaf1; leaf2.nextLeaf = leaf3; leaf3.previousLeaf = leaf2; leaf3.nextLeaf = leaf4; leaf4.previousLeaf = leaf3; leaf4.nextLeaf = leaf5; leaf5.previousLeaf = leaf4; ArrayList<Integer> leftkeys = new ArrayList<>(); leftkeys.add(5); leftkeys.add(13); ArrayList<Node<Integer, Integer>> leftNodeChilds = new ArrayList<>(); leftNodeChilds.add(leaf1); leftNodeChilds.add(leaf2); leftNodeChilds.add(leaf3 ); IndexNode<Integer, Integer> left = new IndexNode<>(leftkeys, leftNodeChilds); IndexNode<Integer, Integer> right = new IndexNode<>(30, leaf4, leaf5); IndexNode<Integer, Integer> parent = new IndexNode<>(17, left, right); left.parent = parent; right.parent = parent; // -----end construction BPlusTree<Integer, Integer> tree = new BPlusTree<>(); int index = tree.handleIndexNodeUnderflow(left, right, parent); System.out.println(index); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void CreateTree()\r\n\t{\r\n\r\n\t\t//sample nodes which are not identical\r\n\t\ta = new Node(1);\r\n\t\ta.left = new Node(3);\r\n\t\ta.left.left = new Node(5);\r\n\t\ta.right = new Node(2);\r\n\r\n\r\n\t\tb = new Node(2);\r\n\t\tb.left = new Node(1);\r\n\t\tb.right = new Node(3);\r\n\t\tb.right.right = n...
[ "0.71319634", "0.69619876", "0.6959782", "0.69512796", "0.67706496", "0.6709603", "0.66832757", "0.66421175", "0.6597268", "0.6556422", "0.64988804", "0.64983124", "0.649758", "0.648163", "0.6480373", "0.6469369", "0.6454014", "0.6453771", "0.64506316", "0.6432978", "0.642087...
0.0
-1
construct tree for test
@Test public void testIndexNodeRedistribute(){ LeafNode<Integer, Integer> leaf1 = new LeafNode<Integer, Integer>(2, 2); leaf1.insertSorted(3, 3); LeafNode<Integer, Integer> leaf2 = new LeafNode<Integer, Integer>(5, 5); leaf2.insertSorted(7, 7); leaf2.insertSorted(8, 8); LeafNode<Integer, Integer> leaf3 = new LeafNode<Integer, Integer>(14, 14); leaf3.insertSorted(16, 16); LeafNode<Integer, Integer> leaf3_3 = new LeafNode<Integer, Integer>(17, 17); leaf3_3.insertSorted(18, 18); leaf3_3.insertSorted(19, 19); LeafNode<Integer, Integer> leaf4 = new LeafNode<Integer, Integer>(22,22); leaf4.insertSorted(27, 27); leaf4.insertSorted(29, 29); LeafNode<Integer, Integer> leaf5 = new LeafNode<Integer, Integer>(33, 33); leaf5.insertSorted(34, 34); leaf5.insertSorted(38, 38); leaf5.insertSorted(39, 39); leaf1.nextLeaf = leaf2; leaf2.previousLeaf = leaf1; leaf2.nextLeaf = leaf3; leaf3.previousLeaf = leaf2; leaf3.nextLeaf = leaf4; leaf4.previousLeaf = leaf3; leaf4.nextLeaf = leaf5; leaf5.previousLeaf = leaf4; ArrayList<Integer> leftkeys = new ArrayList<>(); leftkeys.add(5); leftkeys.add(13); leftkeys.add(17); ArrayList<Node<Integer, Integer>> leftNodeChilds = new ArrayList<>(); leftNodeChilds.add(leaf1); leftNodeChilds.add(leaf2); leftNodeChilds.add(leaf3 ); leftNodeChilds.add(leaf3_3); IndexNode<Integer, Integer> left = new IndexNode<>(leftkeys, leftNodeChilds); IndexNode<Integer, Integer> right = new IndexNode<>(30, leaf4, leaf5); IndexNode<Integer, Integer> parent = new IndexNode<>(20, left, right); left.parent = parent; right.parent = parent; // -----end construction BPlusTree<Integer, Integer> tree = new BPlusTree<>(); tree.root = parent; int index = tree.handleIndexNodeUnderflow(left, right, parent); System.out.println(index); Integer a = tree.search(17); System.out.println(a); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void CreateTree()\r\n\t{\r\n\r\n\t\t//sample nodes which are not identical\r\n\t\ta = new Node(1);\r\n\t\ta.left = new Node(3);\r\n\t\ta.left.left = new Node(5);\r\n\t\ta.right = new Node(2);\r\n\r\n\r\n\t\tb = new Node(2);\r\n\t\tb.left = new Node(1);\r\n\t\tb.right = new Node(3);\r\n\t\tb.right.right = n...
[ "0.71319634", "0.69619876", "0.6959782", "0.69512796", "0.67706496", "0.6709603", "0.66832757", "0.66421175", "0.6597268", "0.6556422", "0.64988804", "0.64983124", "0.649758", "0.648163", "0.6480373", "0.6469369", "0.6454014", "0.6453771", "0.64506316", "0.6432978", "0.642087...
0.0
-1
Testing appropriate depth and node invariants on a big tree
@Test public void testLargeTree() { BPlusTree<Integer, Integer> tree = new BPlusTree<Integer, Integer>(); ArrayList<Integer> numbers = new ArrayList<Integer>(100000); for (int i = 0; i < 100000; i++) { numbers.add(i); } Collections.shuffle(numbers); for (int i = 0; i < 100000; i++) { tree.insert(numbers.get(i), numbers.get(i)); } testTreeInvariants(tree); int depth = treeDepth(tree.root); assertTrue(depth < 11); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasDepth();", "boolean hasDepth();", "void checkTrees(Box tree);", "public void testAdvancedUsage() throws Exception {\n Map<Integer, byte[]> tree = createRandomTree(12, xorGen);\n TreeStorage storage = new TreeStorage(tree.get(1),xorGen, 12);\n \n // add 3, 5, 9, 16\n ...
[ "0.6517315", "0.6517315", "0.63752997", "0.63316846", "0.6308122", "0.62729585", "0.6263509", "0.62500435", "0.62260526", "0.62092674", "0.61961687", "0.61835164", "0.6167953", "0.60983866", "0.60701877", "0.6055422", "0.60524184", "0.6015915", "0.6003783", "0.5996111", "0.59...
0.7051072
0
/2) Napisati funkciju koja vraca sumu dva niza, zatim od niza sa vecom sumom oduzme sumu drugog niza i vrati da li je veci niz i dalje veci Primer: Ako se unese prvi niz 1,2,3 (suma je 6) i drugi niz 10,20,30 (suma 60) onda 60 6 = drugi niz je i dalje veci, vraca true.
public static void main(String[] args) { int[] niz1 = {15, 20, 56, 12, 13}; int[] niz2 = {-3, -2, -1, -4}; System.out.println("Da li je suma niza i dalje veca: " ); poredjenje(niz1, niz2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sumaPuntos() {\r\n int rojo = 0;\r\n int azul = 0;\r\n for (int i = 1; i < 10; i++) {\r\n\r\n if (tablero[1][i].getTipo().equals(\"Rojo\")) {\r\n rojo += tablero[1][i].getValor();\r\n }\r\n\r\n if (tablero[8][i].getTipo().equals(\"Azu...
[ "0.7195223", "0.63398105", "0.6320479", "0.6320087", "0.6252698", "0.6241531", "0.62074476", "0.6200529", "0.6105616", "0.6089133", "0.6087798", "0.6071132", "0.60708046", "0.6046876", "0.60453326", "0.6041102", "0.6036937", "0.60326314", "0.6009297", "0.5974806", "0.597145",...
0.6026246
18
Return the binding associated with this variable, if there is any. This method is only to be used to determine the lval of an \c Action
public DagEdge getLvalBinding(DagEdge input, Bindings bindings) { if (_varName == null) { DagEdge current = bindings.getBinding("#", Bindings.LOCAL); if (current != null) return current; return input; } DagEdge current = bindings.getBinding(_varName, getType()); if (current == null && getType() == Bindings.GLOBAL) { // create a new global variable current = new DagEdge((short)-1, new DagNode()); bindings.bind(_varName, current, getType()); } if (current == null) { logger.warn("local variable not bound and used as lval " + _varName); } return current; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract int getBindingVariable();", "Binding getBinding();", "@Override\n public int getBindingVariable() {\n return BR.data;\n }", "@Override\n public int getBindingVariable() {\n return BR.data;\n }", "Expression getBindingExpression();", "public Binding getBinding() {...
[ "0.69096345", "0.6451635", "0.61259675", "0.61259675", "0.6070864", "0.6001896", "0.5977325", "0.58142346", "0.5725101", "0.5638271", "0.56372833", "0.5611246", "0.5577817", "0.5487232", "0.5461972", "0.53659594", "0.53023213", "0.529774", "0.5243618", "0.5179094", "0.517426"...
0.5918935
7
if _varname is in the bindings, return the value of the binding, otherwise bind varname to the provided parent DagEdge
@Override protected DagNode evaluate(DagNode parent, Bindings bindings) { // type acts as storage for the status DagEdge bound = bindings.getBinding(_varName, getType()); if (bound == null) { if (getType() == Bindings.LOCAL) { // first occurence of this var, bind the variable name // to the given node. This is on the application side, where new bindings // are only relevant in expandVars, which is why the DagEdge is not // important, but the node, to establish coreferences. bound = new DagEdge((short) -1, parent); bindings.bind(_varName, bound, getType()); } else { logger.warn("Unknown binding during application of rule: " + this); return parent; } } // Avoid unwanted coreferences for atomic nodes if (bound.getValue().newEdgesAreEmpty()) { return bound.getValue().cloneFS(); } return bound.getValue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DagEdge getLvalBinding(DagEdge input, Bindings bindings) {\n if (_varName == null) {\n DagEdge current = bindings.getBinding(\"#\", Bindings.LOCAL);\n if (current != null) return current;\n return input;\n }\n DagEdge current = bindings.getBinding(_varName, getType());\n if (curre...
[ "0.6139973", "0.60274225", "0.5914666", "0.5519281", "0.5469827", "0.54167277", "0.52657735", "0.5229516", "0.5206669", "0.510831", "0.510831", "0.51069707", "0.50855076", "0.50108594", "0.49874482", "0.4940648", "0.48945096", "0.4883281", "0.48787022", "0.484609", "0.4789584...
0.72025335
0
Function: Describe: Author: reese on 2018/8/1.
public interface IAccountService { /** * 是否已经登录 * * @return */ boolean isLogin(); /** * 获取登录用户的 AccountId * * @return */ String getAccountId(); Fragment newUserFragment(Activity activity, int containerId, FragmentManager fragmentManager, Bundle bundle, String tag); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public int describeContents() { return 0; }", "@Override\n public void describeTo(Description arg0) {\n \n }", "String getDescribe();", "String getDescribe();", "@Override\n public int describeContents() {\n// ignore for now\n return 0;\n }", "@Override\n public String...
[ "0.7011013", "0.70027333", "0.6884063", "0.6884063", "0.6862979", "0.68581575", "0.6822709", "0.68098164", "0.6782393", "0.6762979", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", ...
0.0
-1
Calling this will calibrate the arm (theoretically, assuming we're on flat ground). Works
public void init() { // int anglesToEncTicks = (int) ((90 - currentAngle) * encoderTicksPerRev); // armMotor.setEncPosition(anglesToEncTicks); while (armMotor.isFwdLimitSwitchClosed() != true) { armMotor.set(.2); } System.out.println("Calibrated!"); armMotor.setEncPosition(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void processGroundCal()\n\t{\n\t\tif (testMotor != null) {\n\t\t\tSystem.out.println(\"Calibrating arm to floor position\");\n\t\t\ttestMotor.setPosition(SOFT_ENCODER_LIMIT_FLOOR);\n\t\t}\n\t}", "public void arm_up() {\n arm_analog(RobotMap.Arm.arm_speed);\n }", "void startCalibration(...
[ "0.6952052", "0.63965183", "0.627305", "0.6260949", "0.61711174", "0.61026525", "0.6067046", "0.6044607", "0.60406965", "0.6015225", "0.5999768", "0.5942893", "0.59342426", "0.59240806", "0.59116477", "0.59068584", "0.58707136", "0.5795313", "0.5754386", "0.5753138", "0.57374...
0.72186106
0
Used to get the angle that the manipulator arm is currently in
public double getAngle() { return armMotor.getEncPosition(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double getAngle(){\n //Get a new angle measurement\n angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n //Get the difference between current angle measurement and last angle measurement\n double deltaAngle = angles.firstAngle - lastA...
[ "0.7880769", "0.7811736", "0.763475", "0.763475", "0.7633363", "0.757304", "0.75458324", "0.753864", "0.7536861", "0.75295675", "0.74545", "0.7451674", "0.74511874", "0.7448276", "0.7429317", "0.7410534", "0.7397951", "0.73887736", "0.73641634", "0.7345391", "0.73337454", "...
0.8221933
0
Used to get the distance from the ultrasonic sensor
public double getUltrasonicDistance() { return currentDist; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getDistance(){\n return sensor.getVoltage()*100/2.54 - 12;\n }", "public float getDistanceData() {\n\t\tultrasonicSample.fetchSample(distanceData, 0);\n\t\tfloat distance = distanceData[0]*100; //change the unit from m to cm\n\t\tfloat distanceToReturn;\n\t\tif (distance >= WALL_DIS + WIDTH ...
[ "0.7719136", "0.73357785", "0.7119396", "0.70944256", "0.7050727", "0.7047439", "0.7039765", "0.69599724", "0.6937443", "0.6798204", "0.67750275", "0.675994", "0.67567885", "0.67546827", "0.6742618", "0.67095387", "0.6689813", "0.667565", "0.6675648", "0.6664028", "0.66570336...
0.7729869
0
Used to set the speed of the arm talon
public void setArmTalon(double outputval) { armMotor.set(outputval); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setSpeed(RobotSpeedValue newSpeed);", "public void setSpeed() {\n //assigns the speed based on the shuffleboard with a default value of zero\n double tempSpeed = setpoint.getDouble(0.0);\n\n //runs the proportional control system based on the aquired speed\n controlRotator.propor...
[ "0.78918344", "0.7790259", "0.7728917", "0.76631874", "0.7630691", "0.7619743", "0.75880677", "0.75462776", "0.75352603", "0.7475318", "0.7427361", "0.7421088", "0.7413698", "0.7404834", "0.7403828", "0.73786443", "0.7325688", "0.7319963", "0.73109496", "0.7295698", "0.729538...
0.6806094
79
Used to get the value of the right Joystick Y Axis
public double getRightJoystick() { return HumanInput.getXboxAxis(HumanInput.xboxController, XboxButtons.XBOX_RIGHT_Y_AXIS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getRightJoystickVertical() {\n\t\treturn getRawAxis(RIGHT_STICK_VERTICAL) * -1;\n\t}", "public JoystickButton getButtonY() {\n\t\treturn button[3];\n\t}", "public double getRightYAxis() {\n\t\treturn getRawAxis(Axis_RightY);\n\t}", "public int getY()\n {\n return yaxis;\n }", "public dou...
[ "0.7953686", "0.74482447", "0.7276554", "0.7125315", "0.7117478", "0.7097447", "0.6925891", "0.69181585", "0.6851315", "0.6826518", "0.6780662", "0.66850394", "0.66796935", "0.6677036", "0.6622238", "0.66183895", "0.6601791", "0.65915346", "0.6587539", "0.6559826", "0.6558592...
0.78458977
1
An implemented method for SensorListener interface
public void receivedValue(HashMap<Sensor, Double> e) { try { armIMUAngle = e.get(Sensor.ARM_ANGLE); } catch (NullPointerException error) { if (debug) System.out.println("Bad Angle Sensor"); } try { currentDist = e.get(Sensor.ULTRASONIC_DISTANCE); } catch (NullPointerException error) { if (debug) System.out.println("Bad Ultrasonic Sensor"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\n\t}", "@Override\n\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\n\t}", "public void handleSensorEvents(){\n\t}", "public void onSensorChanged() {\n\t\tsensorChanged();\n\t}", "@Override\n public void OnAccuracyChanged(Ss...
[ "0.79884076", "0.79884076", "0.7766017", "0.77634513", "0.7722349", "0.7544246", "0.73463416", "0.72956544", "0.72741115", "0.7216471", "0.72013956", "0.7120534", "0.7068367", "0.70447737", "0.7001158", "0.69931245", "0.69690484", "0.69690484", "0.69621813", "0.69522864", "0....
0.0
-1
MrrckApplication.getInstance().laitude = 0; MrrckApplication.getInstance().longitude = 0;
@Override public void doCancel() { commonDialog.dismiss(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setMyLatLong() {\n }", "private void m6903a() {\n SharedPreferences sharedPreferences = getSharedPreferences(C1848b.a().getClass().getName(), 0);\n this.f5647p = (double) Float.parseFloat(sharedPreferences.getString(\"beast.location.manager.lat\", \"0\"));\n this.f5648q = (do...
[ "0.6676493", "0.65596694", "0.6464735", "0.64278495", "0.6268458", "0.6264027", "0.62620395", "0.6261461", "0.6153833", "0.6146574", "0.61443305", "0.6126692", "0.61245847", "0.6119704", "0.6116397", "0.6106464", "0.6105377", "0.6094916", "0.6091193", "0.607697", "0.6074085",...
0.0
-1
TODO Autogenerated method stub
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { List<crime_criminalBean> crime_criminalBeanlist=new crime_criminalDao().select(); request.setAttribute("crime_criminalBeanlist", crime_criminalBeanlist); request.getRequestDispatcher("crime_criminal_list.jsp").forward(request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_zestmoney, container, false); setUpUI(view); mPaymentParams = getArguments().getParcelable(PayuConstants.KEY); payuConfig = getArguments().getParcelable(PayuConstants.PAYU_CONFIG); salt = getArguments().getString(PayuConstants.SALT); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup...
[ "0.6740675", "0.6725193", "0.67224836", "0.6699259", "0.6691596", "0.668896", "0.6687658", "0.66861755", "0.667755", "0.66756433", "0.6667425", "0.66667783", "0.6665166", "0.66614723", "0.66549766", "0.665031", "0.6643759", "0.6639389", "0.66378653", "0.66345453", "0.6626348"...
0.0
-1
Initialize UI Component of fragment
private void setUpUI(View view) { etMobileNumberZestmoney = view.findViewById(R.id.etZestmoneyMobileNumber); Button mBtnCheckEligibility = view.findViewById(R.id.btnCheckElibility); mTvEligibilityMessage = view.findViewById(R.id.tvEligibilityMessage); mBtnCheckEligibility.setOnClickListener(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract FragmentComponent setupComponent();", "@Override\n\tprotected void onCreate(Bundle arg0) {\n\t\t if (arg0 != null) {\n\t\t\t arg0.putParcelable(\"android:support:fragments\",null);\n\t }\n\t\t super.onCreate(arg0);\n\t\t requestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\t setLayout();\...
[ "0.7395164", "0.7112732", "0.7000872", "0.69729584", "0.6935601", "0.6865008", "0.68502754", "0.6844855", "0.6838507", "0.68091255", "0.6809073", "0.6801469", "0.67875", "0.67773026", "0.6774248", "0.67617697", "0.67485523", "0.6740962", "0.67033076", "0.6699806", "0.6688917"...
0.0
-1
Called when activity staretd for result is finished
@Override public void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == PayuConstants.PAYU_REQUEST_CODE) { getActivity().setResult(resultCode, data); getActivity().finish(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onFinish() {\n }", "@Override\n public void onFinish() {\n }", "public void onFinish() {\n\n }", "@Override\n\t\t\t\t\tpublic void onFinish() {\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onFinish() {\n\t\t\t\t\t}", "public abstract void finished(Objec...
[ "0.7593092", "0.7571035", "0.7555998", "0.74541056", "0.74541056", "0.7446394", "0.7441331", "0.7424131", "0.74137235", "0.7403963", "0.7389781", "0.73860526", "0.7386021", "0.73603725", "0.7359203", "0.735339", "0.733958", "0.7275007", "0.7275007", "0.72580117", "0.7197338",...
0.0
-1
TODO Autogenerated method stub
@Override public void setRequest(Map<String, Object> arg0) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View v) { begindialog.cancel(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1