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
delete a cmVocabularyCategory by primary key
@Transactional public void delete(final String pk) { dao.delete(CmVocabularyCategory.class, pk); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Transactional\r\n\tpublic void delete(CmVocabularyCategory cmVocabularyCategory) {\r\n\t\tdao.delete(cmVocabularyCategory);\r\n\t}", "void deleteCategory(long id);", "void deleteCategory(Integer id);", "void deleteCategoryById(int categoryId);", "public void deleteCategorie(Categorie c);", "void deleteC...
[ "0.76444525", "0.7598077", "0.75521874", "0.75407135", "0.75199944", "0.74917835", "0.7406628", "0.7141458", "0.70541704", "0.70248365", "0.6972051", "0.6890781", "0.6735683", "0.6687355", "0.667955", "0.66658026", "0.6600993", "0.6568878", "0.65545845", "0.6543982", "0.65155...
0.7787066
0
find return CmVocabularyCategory get CmVocabularyCategory object by primary key
@Transactional public CmVocabularyCategory getCmVocabularyCategoryById(final String id) { CmVocabularyCategory cmVocabularyCategory = dao.findById(CmVocabularyCategory.class, id); return cmVocabularyCategory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Cvcategory findCvcategoryById(Long id);", "Category findCategoryById(Long id);", "Category getCategoryById(int id);", "Category findById(int id);", "public Category getCategoryById()\r\n {\r\n return cdb.getCategoryById();\r\n }", "Categorie findOne(Long id);", "Category getCategory...
[ "0.7548028", "0.7547502", "0.73906916", "0.7349028", "0.73265904", "0.7314586", "0.7251769", "0.7104408", "0.7099431", "0.70570904", "0.69815105", "0.67677045", "0.6746542", "0.670121", "0.6636676", "0.66293746", "0.6525613", "0.65178746", "0.6500964", "0.6475855", "0.6418403...
0.74294335
2
get all CmVocabularyCategory objects
@Transactional public List<CmVocabularyCategory> getCmVocabularyCategorys() { return dao.findAllWithOrder(CmVocabularyCategory.class, "modifyTimestamp", false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Category> getAllCategories();", "public List<Categorie> getAllCategories();", "public List<ProductCatagory> getAllCategory() throws BusinessException;", "public List<Cvcategory> findAllCvcategories();", "@Override\n\tpublic List<Category> getAllCategory() {\n\t\treturn category.selectAllCategory();\n\...
[ "0.77787966", "0.7776659", "0.74419147", "0.7413999", "0.737426", "0.7339268", "0.726524", "0.7254111", "0.7250088", "0.724766", "0.7240098", "0.72391456", "0.72291553", "0.72036713", "0.72013986", "0.71347946", "0.7082838", "0.70707655", "0.7057638", "0.70493144", "0.7042761...
0.82347256
0
get all CmVocabularyCategory objects and support order
@Transactional public List<CmVocabularyCategory> getCmVocabularyCategorysWithOrder(String orderBy, boolean isAsc) { return dao.findAllWithOrder(CmVocabularyCategory.class, orderBy, isAsc); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Transactional\r\n\tpublic List<CmVocabularyCategory> getCmVocabularyCategorys() {\r\n\t\treturn dao.findAllWithOrder(CmVocabularyCategory.class, \"modifyTimestamp\", false);\r\n\t}", "public List<Categorie> getAllCategories();", "List<Category> getAllCategories();", "public List<ProductCatagory> getAllCateg...
[ "0.79668367", "0.7581398", "0.75535417", "0.71911544", "0.70780754", "0.7070721", "0.6974168", "0.695372", "0.69320726", "0.68968195", "0.68630826", "0.6858897", "0.68428904", "0.6833223", "0.6832329", "0.6831831", "0.68256533", "0.6824663", "0.680561", "0.6758251", "0.675214...
0.6307348
58
get CmVocabularyCategory objects by fieldName
@Transactional public List<CmVocabularyCategory> getCmVocabularyCategorysByField(final String fieldName, final Object value) { return dao.findByField(CmVocabularyCategory.class, fieldName, value, "modifyTimestamp", false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Category getByName(String name);", "Category getCategoryByName(String categoryName);", "Category findByName(String name);", "@Transactional\r\n\tpublic List<CmVocabularyCategory> getCmVocabularyCategorys() {\r\n\t\treturn dao.findAllWithOrder(CmVocabularyCategory.class, \"modifyTimestamp\", false);\r\n\t}", ...
[ "0.6557268", "0.6533281", "0.6238304", "0.60033137", "0.5955316", "0.5928011", "0.5809773", "0.5773636", "0.56954294", "0.56681454", "0.5637376", "0.55307156", "0.5520909", "0.550779", "0.54963326", "0.54963326", "0.5477254", "0.54740715", "0.54717225", "0.545487", "0.5445462...
0.7883333
0
System.out.println(">Teclado: Has presionado la tecla: " + e.getKeyChar() );
@Override public void keyTyped(KeyEvent e){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tSystem.out.println(e.getKeyChar()+\" ta precionando a tecla igual um idiota\");\n\t\t\t\tSystem.out.println(e.getKeyCode());\n\t\t\t}", "@Override\n\tpublic void keyTyped(KeyEvent e) {\n\t\tchar letra= e.getKeyChar();\n\t\tSystem.out.println(letra);\...
[ "0.82152784", "0.8025775", "0.7637464", "0.76220095", "0.75838643", "0.7571556", "0.75674856", "0.75561", "0.7555768", "0.7551403", "0.7551403", "0.7551403", "0.7551403", "0.75459015", "0.75459015", "0.7544133", "0.7544133", "0.7544133", "0.7543278", "0.7543278", "0.75406116"...
0.0
-1
Obtener boton del Mouse pulsado
@Override public void mouseClicked(MouseEvent e){ String boton = W.detClick( e.getButton() ); System.out.println(" Mouse: Click " + boton ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void botonDemo_mouseEntered(MouseEvent e) {\n\t\tImageIcon cursor = new ImageIcon(\"../imagenes/cursores/punteroAct.gif\");\n\t\tImage image = cursor.getImage();\n\t\tCursor puntero = Toolkit.getDefaultToolkit().createCustomCursor(image, new Point(8, 8), \"img\");\n\t\tthis.setCursor(puntero);\n\n\t}", "public v...
[ "0.6969157", "0.6791603", "0.67344654", "0.67314404", "0.67272997", "0.6719822", "0.66934025", "0.6630643", "0.6585384", "0.6577839", "0.6560817", "0.6560531", "0.65594083", "0.6543412", "0.6532829", "0.6527184", "0.65254956", "0.6506098", "0.6490205", "0.64753014", "0.647032...
0.6608747
8
Obtener boton del Mouse pulsado
@Override public void mousePressed(MouseEvent e){ String boton = W.detClick( e.getButton() ); //System.out.println("->Mouse: Presionando Click " + boton ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void botonDemo_mouseEntered(MouseEvent e) {\n\t\tImageIcon cursor = new ImageIcon(\"../imagenes/cursores/punteroAct.gif\");\n\t\tImage image = cursor.getImage();\n\t\tCursor puntero = Toolkit.getDefaultToolkit().createCustomCursor(image, new Point(8, 8), \"img\");\n\t\tthis.setCursor(puntero);\n\n\t}", "public v...
[ "0.69693935", "0.6791693", "0.67308486", "0.67266876", "0.6720071", "0.669357", "0.663158", "0.66088134", "0.6585307", "0.6577078", "0.6561232", "0.6561007", "0.6559886", "0.65437585", "0.6533194", "0.65276295", "0.6525804", "0.6504607", "0.6490022", "0.64759964", "0.6470965"...
0.67343783
2
Obtener boton del Mouse pulsado
@Override public void mouseReleased(MouseEvent e){ String boton = W.detClick( e.getButton() ); //Obtener cantidad de Clicks int clickCont = e.getClickCount(); System.out.println("->Mouse: Has soltado Click " + boton ); System.out.println(" Cantidad de Clicks: " + clickCont ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void botonDemo_mouseEntered(MouseEvent e) {\n\t\tImageIcon cursor = new ImageIcon(\"../imagenes/cursores/punteroAct.gif\");\n\t\tImage image = cursor.getImage();\n\t\tCursor puntero = Toolkit.getDefaultToolkit().createCustomCursor(image, new Point(8, 8), \"img\");\n\t\tthis.setCursor(puntero);\n\n\t}", "public v...
[ "0.6969757", "0.67926496", "0.67348504", "0.67312956", "0.672754", "0.67206746", "0.669406", "0.66315246", "0.66096973", "0.6583716", "0.65778", "0.65615284", "0.6561249", "0.6559979", "0.6543992", "0.6533217", "0.65281636", "0.65259963", "0.65055346", "0.6490189", "0.6476053...
0.0
-1
Checks which nodes to be selected for expansion
public static void check() { while (!choiceOfNodes.isEmpty()) { Node node = choiceOfNodes.remove(); if (node.isItGoal()) { System.out.println("\nSolution: \n"); printTheBoards(node); System.out.println("No. of nodes generated in total: " + nodesGenerated); System.out.println("No. of nodes expanded: " + nodesOpened); return; } else { if (isItVisted(node)) { continue; } else { nodesOpened++; nodesCovered.add(node); startOperation(node); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected boolean selectionAccept(Node[] nodes) {\n return true;\n }", "public void checkNodes() {\n // Don't do anything when you check the nodes. This nodes is built by\n // when the setTarget method is called.\n }", "private void checkAndSet() {\n if (value == null...
[ "0.6451429", "0.6273281", "0.5728529", "0.56322384", "0.560912", "0.5480029", "0.5470007", "0.5451707", "0.54222906", "0.53954303", "0.5383867", "0.53456897", "0.53414047", "0.53206855", "0.53196925", "0.5309725", "0.52717346", "0.52565604", "0.5250201", "0.52448785", "0.5221...
0.5940888
2
Checks if state is already present in the nodesCovered
private static boolean isItVisted(Node node) { boolean areNodesEqual = false; for (Node temp : nodesCovered) { if(choice==1){ if (node.count == temp.count) { if (areTheyEqual(temp.stateSpace, node.stateSpace)) { return true; } } } else{ if (node.manhattanDist == temp.manhattanDist) { if (areTheyEqual(temp.stateSpace, node.stateSpace)) { return true; } } } } return areNodesEqual; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean containState(String state) {\r\n for (int i = 0; i < this.visitedList.size(); i++) {\r\n if (state.equals(this.visitedList.get(i))) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "private boolean hasUniqueState()\n {\n ...
[ "0.6597909", "0.6507966", "0.63168424", "0.63168424", "0.63168424", "0.63168424", "0.63168424", "0.63168424", "0.63168424", "0.63168424", "0.61831105", "0.6175408", "0.60816413", "0.60521287", "0.60382247", "0.5975571", "0.5945758", "0.5847908", "0.58098376", "0.5805718", "0....
0.5783013
20
Compares if they are same or not
private static boolean areTheyEqual(int[][] tempArray, int[][] array2) { for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { if (tempArray[i][j] != array2[i][j]) { return false; } } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasSameAs();", "@Test\n void compareTo_Identical_AllParts()\n {\n runIsMatchTest(AnswerType.yes, AnswerType.yes, AnswerType.yes, AnswerType.yes, ContactMatchType.Identical);\n }", "private boolean checkComp() {\n\t\tfor (int i = 0; i < comp.length; i++) {\n\t\t\tfor (int j = 0; j < comp...
[ "0.7362921", "0.7076814", "0.70604545", "0.67927605", "0.65984446", "0.6462575", "0.64062995", "0.6359585", "0.6350762", "0.63475645", "0.63445497", "0.63100386", "0.6306669", "0.6300913", "0.62988585", "0.6295321", "0.62931263", "0.6263547", "0.6262093", "0.6259212", "0.6257...
0.60414636
41
prints the sequence of states
private static void printTheBoards(Node node) { ArrayList<Node> finalList = new ArrayList<>(); do { finalList.add(node); node = node.parent; } while (node.parent != null); node.printBoard(); Collections.reverse(finalList); for (Node temp : finalList) { temp.printBoard(); } System.out.println("Path cost: " + finalList.size()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printMachine(){\n\t\tfor(State s:theStates){\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}", "public void printCurrentState() {\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tfor (int j = 0; j < 9; j++) {\n\t\t\t\tSystem.out.print(this.currentState[i][j] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t...
[ "0.77279997", "0.7413313", "0.73538214", "0.73336005", "0.73102534", "0.7299384", "0.72225463", "0.71419984", "0.7030336", "0.69223744", "0.6905958", "0.68932366", "0.6764954", "0.67621756", "0.6752191", "0.6664369", "0.66092366", "0.6590253", "0.65391773", "0.6484634", "0.64...
0.0
-1
determines the next possible states achievable from this node
public static void startOperation(Node presesntNode) { if (presesntNode != null) { goUp(presesntNode); goDown(presesntNode); goLeft(presesntNode); goRight(presesntNode); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LinkedList<State> getNextAvailableStates() {\n LinkedList<Integer> currentSide = new LinkedList<>();\n LinkedList<Integer> otherSide = new LinkedList<>();\n LinkedList<State> newStates = new LinkedList<>();\n if(isLeft) {\n if(leftSide != null) currentSide = new Linked...
[ "0.6990687", "0.6570848", "0.6480148", "0.64790124", "0.6341822", "0.6315959", "0.6287333", "0.62424177", "0.6229872", "0.6201965", "0.6155448", "0.6141691", "0.6135427", "0.6113497", "0.6091606", "0.6091606", "0.6091606", "0.6091606", "0.6091606", "0.6091606", "0.6079277", ...
0.0
-1
Moves the blank tile up
public static void goUp(Node parent) { int[][] tempArray = new int[3][3]; int blankPositionRow = parent.getblankPositionRow(); int blankPositionCol = parent.getblankPositionCol(); for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { tempArray[i][j] = parent.stateSpace[i][j]; } } if (blankPositionRow != 0) { int temp = tempArray[blankPositionRow - 1][blankPositionCol]; tempArray[blankPositionRow - 1][blankPositionCol] = 0; tempArray[blankPositionRow][blankPositionCol] = temp; Node node = new Node(tempArray, finalState, parent); choiceOfNodes.add(node); nodesGenerated++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void moveUp() {\n\n if (this.row - 1 < 16) {\n return;\n }\n this.row -= 1;\n\n playerImage.translate(0, -Cell.CELLSIZE);\n playerImage.draw();\n }", "public void moveUp()\n\t{\n\t\tthis.grid.moveUp();\n\t}", "private void swapTileWithBlank(TileView tv) {...
[ "0.7227133", "0.7219437", "0.71684295", "0.7066142", "0.6934298", "0.6907921", "0.6810107", "0.67803794", "0.6754842", "0.6741269", "0.6716086", "0.6716086", "0.67098266", "0.66732603", "0.6658578", "0.6638022", "0.6622929", "0.65339637", "0.65177894", "0.6457518", "0.6443455...
0.0
-1
Moves the blank tile down
public static void goDown(Node parent) { int[][] tempArray = new int[3][3]; int blankPositionRow = parent.getblankPositionRow(); int blankPositionCol = parent.getblankPositionCol(); for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { tempArray[i][j] = parent.stateSpace[i][j]; } } if (blankPositionRow != 2) { int temp = tempArray[blankPositionRow + 1][blankPositionCol]; tempArray[blankPositionRow + 1][blankPositionCol] = 0; tempArray[blankPositionRow][blankPositionCol] = temp; Node node = new Node(tempArray, finalState, parent); choiceOfNodes.add(node); nodesGenerated++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized void moveDown(){\n if (!this.isAtBottom()){\n for (int j = 1; j < 25; j++){\n for (int i = 1; i < 13; i++){\n if (this.movable[i][j]){\n this.map[i][j - 1] = this.map[i][j];\n this.movable[i][j - 1...
[ "0.7342891", "0.7136297", "0.71355927", "0.7106235", "0.687667", "0.6870339", "0.6815365", "0.67846596", "0.6757518", "0.67278296", "0.6695065", "0.66535735", "0.66321987", "0.6593336", "0.6577684", "0.6537903", "0.6523311", "0.64813", "0.64813", "0.64716876", "0.64649653", ...
0.0
-1
gos the blank tile left
public static void goLeft(Node parent) { int[][] tempArray = new int[3][3]; int blankPositionRow = parent.getblankPositionRow(); int blankPositionCol = parent.getblankPositionCol(); for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { tempArray[i][j] = parent.stateSpace[i][j]; } } if (blankPositionCol != 0) { int temp = tempArray[blankPositionRow][blankPositionCol - 1]; tempArray[blankPositionRow][blankPositionCol - 1] = 0; tempArray[blankPositionRow][blankPositionCol] = temp; Node node = new Node(tempArray, finalState, parent); choiceOfNodes.add(node); nodesGenerated++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void blank() {\r\n\t\trunning = false;// sets the simulation to stopped\r\n\t\tfor (int i = 0; i < TOTAL_TILES; i++)// loops through all tiles\r\n\t\t\tnodes[i] = new Node(new Point(i / WIDTH_TILES * SIZE_TILES, i % HEIGHT_TILES * SIZE_TILES), new ImageIcon(\"empty.png\").getImage(), false, \"empty\");// se...
[ "0.70391923", "0.6627267", "0.66013354", "0.65928584", "0.6460928", "0.636607", "0.63467014", "0.6337472", "0.63328516", "0.6276297", "0.62714154", "0.6269845", "0.6238282", "0.61979777", "0.6197791", "0.6176761", "0.6176328", "0.6175945", "0.61399573", "0.61169827", "0.61075...
0.0
-1
Moves the blank tile right
public static void goRight(Node parent) { int[][] tempArray = new int[3][3]; int blankPositionRow = parent.getblankPositionRow(); int blankPositionCol = parent.getblankPositionCol(); for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { tempArray[i][j] = parent.stateSpace[i][j]; } } if (blankPositionCol != 2) { int temp = tempArray[blankPositionRow][blankPositionCol + 1]; tempArray[blankPositionRow][blankPositionCol + 1] = 0; tempArray[blankPositionRow][blankPositionCol] = temp; Node node = new Node(tempArray, finalState, parent); choiceOfNodes.add(node); nodesGenerated++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void moveRight() {\n\t\tif (x1 < 24 && x2 < 24 && x3 < 24 && x4 < 24) {\n\t\t\tclearPiece();\n\t\t\tx1 += 1;\n\t\t\tx2 += 1;\n\t\t\tx3 += 1;\n\t\t\tx4 += 1;\n\t\t\tsetPiece();\n\t\t\trepaint();\n\t\t}\n\t}", "public void right(){\n\t\tmoveX=1;\n\t\tmoveY=0;\n\t}", "private void swapTileWithBlank(TileVie...
[ "0.71626955", "0.69342405", "0.68911755", "0.6831598", "0.6826928", "0.67889816", "0.67556167", "0.6752876", "0.67453307", "0.6719653", "0.6716576", "0.6709885", "0.6631989", "0.6624716", "0.6607565", "0.653932", "0.6527393", "0.64867187", "0.64763033", "0.6463521", "0.646338...
0.0
-1
This method takes a JSON string, extracts the results array and parses the elements needed to create new Movie objects. It adds the new Movie objects to the given ArrayList container.
public static void parseMovieJSONResult( String jsonResult, ArrayList<Movie> moviesList) { Movie newMovie; try { // Create the root JSONObject from the JSON string. JSONObject jsonRootObject = new JSONObject(jsonResult); Log.d(TAG, ".parseMovieJSONResult(): object parsed from JSON: " + jsonRootObject.toString()); //Get the instance of JSONArray that contains JSONObjects JSONArray jsonArray = jsonRootObject.optJSONArray(RESULT_ARRAY); //Iterate the jsonArray and print the info of JSONObjects for(int i=0; i < jsonArray.length(); i++){ JSONObject jsonObject = jsonArray.getJSONObject(i); // parse all elements of JSON object we are interested in int id = Integer.parseInt(jsonObject.optString(ID).toString()); String posterPath = jsonObject.optString(POSTER_PATH).toString(); String plotSynopsis = jsonObject.optString(PLOT_SYNOPSIS).toString(); String title = jsonObject.optString(TITLE).toString(); float rating = Float.parseFloat(jsonObject.optString(RATING).toString()); String releaseDate = jsonObject.optString(RELEASE_DATE).toString(); newMovie = new Movie(id, title, posterPath, plotSynopsis, rating, releaseDate); moviesList.add(newMovie); } Log.d(TAG, ".parseMovieJSONResult(): JSON parsed to movie array of length" + moviesList.size()); } catch (JSONException e) { Log.e(TAG, ".parseMovieJSONResult(): JSON parsing failed: " + e.getMessage()); e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ArrayList<MovieData> getMovieDatafromJson(String jsonStr)\n throws JSONException {\n ArrayList<MovieData> movieDataArrayList = new ArrayList<>();\n\n // Parse through JSON response and find array with results\n JSONObject json = new JSONObject(jsonStr);\n JSONArray results = ...
[ "0.7740387", "0.71707314", "0.7030628", "0.6570496", "0.6548938", "0.65195274", "0.6462535", "0.6425319", "0.6284822", "0.6260613", "0.6126418", "0.61018646", "0.5968722", "0.5823273", "0.57549924", "0.5735151", "0.5715094", "0.5670793", "0.56704354", "0.566336", "0.5629869",...
0.80553204
0
TODO Autogenerated method stub
public static void main(String[] args) { Connection conexion=null; try { Class.forName(DRIVER); //vamos a permitir la integridad referencial en sqlite //debemos establecer PRAGMA foreign_keys=ON SQLiteConfig config = new SQLiteConfig(); config.enforceForeignKeys(true); conexion = DriverManager.getConnection(DB_URL, config.toProperties()); System.out.println("Conectando a la BD....."); //Thread.sleep(3000); //simulo operaciones con la BD(3segunda en espera) //vamos a consultar la tabla libro. que tiene entre otros campos, nombre, autor, id categoria //creamos la consulta como String String sql= "select * from librosCategorias2"; //creamos un objeto Statement Statement statement = conexion.createStatement(); //recibimos datos de la consulta en un objeto ResultSet ResultSet resultset = statement.executeQuery(sql); //recorremos el resultset String nombre,autor,categoria; //int id_categoria; while (resultset.next()) { nombre=resultset.getString("nombre"); autor=resultset.getString("autor"); //id_categoria = resultset.getInt("id_categoria"); categoria = resultset.getString(4); System.out.printf("%35s, %10s, %3s%n",nombre,autor,categoria); } //vamos a cambiar el nombre del usuario id=2 sql="update usuarios set nombre='Diego' where id=2"; int filasAfectadas = statement.executeUpdate(sql); System.out.println("Nš filas afectadas "+filasAfectadas); //vamos a borrar el usuario de id = 3; sql="delete from usuarios where id=3"; filasAfectadas = statement.executeUpdate(sql); System.out.println("Nš filas afectadas "+filasAfectadas); System.out.println("--------------------------\n"); //vamos a usar PrepareStatement //vamos a consultar los 2 primeros libros sql = "select * from libros where id=?"; PreparedStatement preparedStatement =conexion.prepareStatement(sql); for (int i = 1; i < 3; i++) { preparedStatement.setInt(1,i); //el 1 hace referencia a id=? resultset = preparedStatement.executeQuery(); while(resultset.next()){ nombre = resultset.getString("nombre"); String editorial = resultset.getString("editorial"); System.out.printf("%15s %15s %n",editorial,nombre); } } //vamos a afrupar sentencias sql usando Batch sql = "insert into usuarios(nombre,apellido)values(?,?) "; preparedStatement= conexion.prepareStatement(sql); preparedStatement.setString(1,"luis felipe"); preparedStatement.setString(2, "Arriaga"); preparedStatement.addBatch(); preparedStatement.setString(1,"luis felipe2"); preparedStatement.setString(2, "Arriaga2"); preparedStatement.addBatch(); //Primero hacemos una cosa y luego hacemos otra /* sql = "update usuarios set nombre=? where apellido=?"; preparedStatement= conexion.prepareStatement(sql); preparedStatement.setString(1, "luis felipe"); preparedStatement.setString(2, "Marca"); preparedStatement.addBatch();*/ int[] affectedRecords = preparedStatement.executeBatch(); System.out.println("Registros afectados"+affectedRecords.length); //vamos a hacer transacciones //primero preparamos la Base de Datos conexion.setAutoCommit(false); String sql1 = "insert into usuarios(nombre,apellido)values('Joaquin','Buitrago')"; String sql2 = "insert into usuarios(nombre,apellido)values('Gracia','Cano')"; statement.execute(sql1); statement.execute(sql2); conexion.commit();//luego ponemos el rollback abajo en el catch donde le hacemos otro try/catch //con esto hacemos que si insertamos un dato que esta mal salta una excepcion y mos deshace lo que //previamente habias metido //cerramos conexion conexion.close(); System.out.println("-----------------\n"); System.out.println("Desconectado la BD"); } catch (ClassNotFoundException | SQLException e) { // TODO Auto-generated catch block try { conexion.rollback(); } catch (SQLException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } e.printStackTrace(); } }
{ "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
/double latitude = 37.823689; double longitude = 145.121597;
public void CobaHitung() { PrayTimeCounter prayers = new PrayTimeCounter(); prayers.setTimeFormat(prayers.getTime24()); prayers.setCalcMethod(prayers.getMWL()); prayers.setAsrJuristic(prayers.getShafii()); prayers.setAdjustHighLats(prayers.getAngleBased()); int[] offsets = {0, 0, 0, 0, 0, 0, 0}; // {Fajr,Sunrise,Dhuhr,Asr,Sunset,Maghrib,Isha} prayers.tune(offsets); Date now = new Date(); Calendar cal = Calendar.getInstance(); cal.setTime(now); ArrayList<String> prayerTimes = prayers.getPrayerTimes(cal, Anshitu.getApp().getLatitude(), Anshitu.getApp().getLongitude(), Anshitu.getApp().getTimezone()); subuh.setText(prayerTimes.get(0)); terbit.setText(prayerTimes.get(1)); duhur.setText(prayerTimes.get(2)); ashar.setText(prayerTimes.get(3)); maghrib.setText(prayerTimes.get(4)); isya.setText(prayerTimes.get(prayerTimes.size()-1)); /*ArrayList<String> prayerNames = prayers.getTimeNames(); ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item,prayerNames); jeda.setAdapter(adapter); ArrayAdapter<String> adapter1 = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item,prayerTimes); durasi.setAdapter(adapter1);*/ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double getLatitude();", "Double getLatitude();", "Double getLatitude();", "public double getLongitude_() { \n return longitude_; \n }", "public double getLatitude_() { \n return latitude_; \n }", "void mo5802a(LatLng latLng);", "BigDecimal getWgs84Latitude();", "private String getLoca...
[ "0.65102774", "0.64752126", "0.64752126", "0.6398201", "0.6396456", "0.63140154", "0.62728035", "0.6265835", "0.6235887", "0.61539257", "0.6108374", "0.6087762", "0.6085234", "0.60739243", "0.60739243", "0.6043314", "0.60338056", "0.59863067", "0.59806824", "0.59790725", "0.5...
0.0
-1
TODO Autogenerated method stub
public boolean batchDelete(List<Serializable> articleClassIds) { for (Serializable id : articleClassIds) { delete((Long) id); } return true; }
{ "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
Interaction with village elder to get assignment
public void getAssignment() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void assignIntoGrade() {\n }", "public Village getVillage() {\n/* 501 */ return this.village;\n/* */ }", "public void evolve_enviroment() {\r\n\r\n // this.main_population.update_population();\r\n // get the indices of the best individual in the main population\r\n ...
[ "0.57547534", "0.5532584", "0.54211634", "0.5412363", "0.53861016", "0.5330479", "0.52862525", "0.52690905", "0.52628917", "0.5259916", "0.5236794", "0.5163232", "0.51334006", "0.5122734", "0.5117164", "0.5080557", "0.50727004", "0.50698763", "0.5062721", "0.5054349", "0.5048...
0.57665503
0
Creamos el constructor para crear un objeto con datos de entrada
public Aeronave(int NoElises,int NoAlas, int NoPasajeros) { super(); this.NoElises=NoElises; this.NoAlas=NoAlas; this.NoPasajeros=NoPasajeros; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Datos(){\n }", "public Alojamiento() {\r\n\t}", "public Vehiculo() {\r\n }", "public Candidatura (){\n \n }", "public Caso_de_uso () {\n }", "public CampoModelo(String valor, String etiqueta, Integer longitud)\n/* 10: */ {\n/* 11:17 */ this.valor = valor;\n/* 12:18 */ ...
[ "0.7241561", "0.72319096", "0.71385974", "0.7022022", "0.6995473", "0.69918185", "0.6985698", "0.6984074", "0.6973395", "0.6973395", "0.69474715", "0.6920862", "0.69032425", "0.68927497", "0.68851197", "0.6878922", "0.68684995", "0.6848049", "0.6841271", "0.67909634", "0.6764...
0.0
-1
metodos para imprimir los datos
public void ImprimirDatos(){ System.out.println("Número de elises: "+NoElises); System.out.println("Número de alas: "+NoAlas); System.out.println("Número de pasajeros: "+NoPasajeros); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void freshTheData() {\n mData.clear();\n mData.addAll(mDataOrg);\n }", "private void initializeData() {\n ListaOfertas.removeAll(ListaOfertas);\n for(Articulo listaJuegos: ArticuloRepository.getListArticulo()){\n if(listaJuegos.getOferta().contains(\"S\")){\n ...
[ "0.6959229", "0.6716509", "0.664467", "0.6545379", "0.65071607", "0.64739746", "0.63939476", "0.6375178", "0.63679713", "0.63565844", "0.63229966", "0.63045937", "0.6289924", "0.6286406", "0.62854856", "0.62402016", "0.6225299", "0.62045556", "0.61716866", "0.6155231", "0.615...
0.64846295
5
metodo set para insertar datos enteros en la variable NoElises
public void SetNoElises(int noelises) { this.NoElises=noelises; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void Nodo(){\r\n this.valor = \"\";\r\n this.siguiente = null;\r\n }", "public void inserisciValore()throws Exception {\r\n\r\n\t\t\r\n\t\t\tif (!valore.getInserito()) {\r\n\t\t\t\tboolean inserimento = InputOutput.richiestaInserimento(nome);\r\n\t\t\t\tif (inserimento) {\r\n\t\t\t\t\tval...
[ "0.6349942", "0.6251066", "0.62326753", "0.6156306", "0.60752565", "0.60623735", "0.6061118", "0.6051987", "0.59529555", "0.5894368", "0.5890504", "0.58866704", "0.58581275", "0.5815127", "0.57859486", "0.5768861", "0.57405424", "0.5729895", "0.57264924", "0.5721686", "0.5719...
0.55507165
43
metodo set para insertar datos enteros en la variable NoPasajeros con un exception NumberFormatException
public void SetNoPasajeros(int nopasajeros) { try { this.NoPasajeros=nopasajeros; } catch (NumberFormatException e) { this.NoPasajeros=0; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void alterarDadosCadastraisNumeroInvalido() {\n\t\tAlterarDadosCadastraisPage alterarDadosCadastraisPage = new AlterarDadosCadastraisPage(driver);\n\t\talterarDadosCadastraisPage.getInputCel().clear();\n\t\talterarDadosCadastraisPage.getButtonSalvar().click();\n\t}", "public void inserisciValore()throws E...
[ "0.625907", "0.6157341", "0.57983637", "0.5680758", "0.5677278", "0.5592303", "0.55823994", "0.5582036", "0.5576092", "0.5493746", "0.54795814", "0.54293394", "0.5421777", "0.5410041", "0.5407452", "0.5397092", "0.5395663", "0.5393432", "0.5386172", "0.5350108", "0.5348963", ...
0.59875643
2
metodo Get para obtener los datos de NoElises
public int GetNoElises(){ return NoElises; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getRazonNoData(){\n mRazonNoData = estudioAdapter.getListaRazonNoDataSinEnviar();\n //ca.close();\n }", "public abstract List<GnNotaria> getAllGnNotaria() throws Exception;", "@Override\n\tpublic List<Nodo> obtenerNodos() {\n\t\treturn nodos;\n\t}", "public static List<Noeud> ge...
[ "0.6581226", "0.6283009", "0.6243769", "0.61739856", "0.6020506", "0.59954524", "0.5989481", "0.59541976", "0.5949122", "0.5896577", "0.58808666", "0.58696735", "0.58653843", "0.58570826", "0.5834065", "0.58234096", "0.58123547", "0.5807702", "0.58058566", "0.5801665", "0.579...
0.60675913
4
constructor de la clase
public conectar(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "public Clade() {}", "public Pasien() {\r\n }", "public Classe() {\r\n }", "public Carrera(){\n }", "public CyanSus() {\n\n }", "public AntrianPasien() {\r\n\r\n }", "public Alojamiento() {\r\n\t}", "public SlanjePor...
[ "0.8238812", "0.7915219", "0.7732909", "0.76823485", "0.7591926", "0.75492096", "0.74967504", "0.74887085", "0.74848735", "0.74786437", "0.74367607", "0.73924965", "0.73894495", "0.7377169", "0.7344392", "0.7342144", "0.7318385", "0.7305079", "0.72876424", "0.7284493", "0.728...
0.0
-1
Rearranges AUs according to the plugin
public static TreeMap<Plugin, TreeSet<ArchivalUnit>> orderAusByPlugin(Collection<ArchivalUnit> allAus) { Iterator itr = allAus.iterator(); TreeMap<Plugin, TreeSet<ArchivalUnit>> ausMap = new TreeMap<Plugin, TreeSet<ArchivalUnit>>(new PluginComparator()); while (itr.hasNext()) { ArchivalUnit au = (ArchivalUnit) itr.next(); Plugin plugin = au.getPlugin(); if (ausMap.containsKey(plugin)) { TreeSet<ArchivalUnit> auSet = (TreeSet) ausMap.get(plugin); auSet.add(au); } else { TreeSet<ArchivalUnit> auSet = new TreeSet<ArchivalUnit>(new AuOrderComparator()); auSet.add(au); ausMap.put(plugin, auSet); } } return ausMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void transformToACORDSimplified(APDataCollection apData) throws APDataCollectionTransformationException {\n\n\t\tlocationAddresses = collectLocationAddresses(apData);\n\n\t\ttransformSymbols(apData);\n\n\t\t// Perform all transformations involving CommlVeh element iteration\n\t\ttransformVehicles(apData);\...
[ "0.567464", "0.5586399", "0.52081966", "0.5181528", "0.505425", "0.49554828", "0.49282646", "0.49146596", "0.491059", "0.48640376", "0.4855576", "0.4850782", "0.4842501", "0.48289612", "0.48173115", "0.47900292", "0.47395033", "0.4730408", "0.47192115", "0.46937966", "0.46723...
0.60102755
0
Rearranges AUs according to the publisher
public static TreeMap<String, TreeSet<ArchivalUnit>> orderAusByPublisher(Collection<ArchivalUnit> allAus) { Iterator<ArchivalUnit> itr = allAus.iterator(); TreeMap<String, TreeSet<ArchivalUnit>> ausMap = new TreeMap<String, TreeSet<ArchivalUnit>>(); while (itr.hasNext()) { ArchivalUnit au = itr.next(); String publisher = AuUtil.getTitleAttribute(au, "publisher"); if (publisher == null) { publisher = "unknown publisher"; } if (ausMap.containsKey(publisher)) { TreeSet<ArchivalUnit> auSet = (TreeSet) ausMap.get(publisher); auSet.add(au); } else { TreeSet<ArchivalUnit> auSet = new TreeSet<ArchivalUnit>(new AuOrderComparator()); auSet.add(au); ausMap.put(publisher, auSet); } } return ausMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void transformToACORDSimplified(APDataCollection apData) throws APDataCollectionTransformationException {\n\n\t\tlocationAddresses = collectLocationAddresses(apData);\n\n\t\ttransformSymbols(apData);\n\n\t\t// Perform all transformations involving CommlVeh element iteration\n\t\ttransformVehicles(apData);\...
[ "0.54375046", "0.5169564", "0.5007214", "0.4975354", "0.49209368", "0.4886654", "0.48782963", "0.4876603", "0.481291", "0.48010972", "0.47977805", "0.47952232", "0.47917637", "0.4756278", "0.47065493", "0.46274063", "0.46225", "0.46187207", "0.46090522", "0.4604045", "0.46039...
0.6215383
0
Adds required CSS to the page header
private void addCss() { StyleLink jqueryLink = new StyleLink("http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"); page.addHeader(jqueryLink); StyleLink jqueryTooltipLink = new StyleLink("/css/jquery.ui.tooltip.css"); page.addHeader(jqueryTooltipLink); StyleLink cssLink = new StyleLink("/css/lockss-new.css"); page.addHeader(cssLink); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void init()\n\t{\n\t\tResourceReference css = getCSS();\n\t\tif (css != null)\n\t\t{\n\t\t\tadd(HeaderContributor.forCss(css.getScope(), css.getName()));\n\t\t}\n\t}", "private void validatedHeader() {\n\t\tif(loginView != null){\n\t\t\tLabel greeting = new Label(T.get(\"LABEL_TOP_BAR_GREETING\") + T.get...
[ "0.67099154", "0.6020701", "0.5968012", "0.5917604", "0.572058", "0.56861717", "0.56859124", "0.5685042", "0.5680912", "0.56603986", "0.56563044", "0.56333905", "0.56333905", "0.5625366", "0.5612425", "0.558431", "0.5566656", "0.55312353", "0.55310404", "0.5526896", "0.552689...
0.71963364
0
Adds JQuery Javascript to the header of the page object
private void addJQueryJS() { addJS("http://code.jquery.com/jquery-1.9.1.js"); addJS("http://code.jquery.com/ui/1.10.3/jquery-ui.js"); addJS("js/auDetails-new.js"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addJS(String jsLocation) {\n Script ajaxScript = new Script(\"\");\n ajaxScript.attribute(\"src\", jsLocation);\n ajaxScript.attribute(\"type\", \"text/javascript\");\n page.addHeader(ajaxScript);\n }", "public static void Javascript() {\n\n\t}", "@Given(\"I am on the jquery homepage\...
[ "0.61523813", "0.60406613", "0.5375932", "0.52549195", "0.5246699", "0.52242523", "0.51936674", "0.5117142", "0.49679524", "0.49325395", "0.489408", "0.48248369", "0.48135084", "0.4801364", "0.47030807", "0.4667011", "0.4652811", "0.46249887", "0.4597355", "0.45882207", "0.45...
0.6731503
0
Adds a link to the top of the table to allow switching between a publisher or pluginsorted list
private void createSortLink() { String newGrouping; if ("plugin".equals(grouping)) { newGrouping = "publisher"; } else { newGrouping = "plugin"; } String timeString = ""; if ("accurate".equals(timeKey)) { timeString = "&amp;timeKey=" + timeKey; } String linkHref = "/DisplayContentStatus?group=" + newGrouping + timeString; String linkText = "Order by " + newGrouping; Link sortLink = new Link(linkHref); sortLink.attribute("class", "filters"); sortLink.add(linkText); page.add(sortLink); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void onButtonClicked() {\n\t\tclientFactory.getPlaceController().goTo(\r\n\t\t\t\tnew CellTableSortingPlace(\"sortingtable\"));\r\n\t}", "public void syncTableTop() {\n\t\tsetVerticalScrollPosition(rowHeader.getTop());\n\t}", "private void getMarkAsTopNewsLinkPanel() {\n\t\ttry{\n\t\t\tMa...
[ "0.5893926", "0.5788779", "0.57618004", "0.5531233", "0.5521322", "0.5517903", "0.5473902", "0.54079723", "0.53209263", "0.5236328", "0.5218629", "0.5186779", "0.5161805", "0.5156922", "0.5155521", "0.51483", "0.5147478", "0.51453733", "0.5126317", "0.51212054", "0.5068813", ...
0.6255201
0
Adds the div required by jQuery tabs
private void createTabsDiv() { tabsDiv = new Block(Block.Div, "id='tabs'"); page.add(tabsDiv); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initTabs() {\n\t\tJPanel newTab = new JPanel();\r\n\t\taddTab(\"\", newTab); //$NON-NLS-1$\r\n\t\tsetTabComponentAt(0, new NewPaneButton());\r\n\t\tsetEnabledAt(0, false);\r\n\t\t// Add a new pane\r\n\t\taddPane();\r\n }", "private void addTabs() {\n TabsPagerAdapter tabsAdapter = new Tabs...
[ "0.702123", "0.6740658", "0.6668066", "0.65537393", "0.65536594", "0.6507343", "0.6462852", "0.64023906", "0.638104", "0.6378662", "0.6330688", "0.6294628", "0.6294117", "0.6253865", "0.6250902", "0.61562216", "0.61315626", "0.6126876", "0.61119705", "0.6095141", "0.60846955"...
0.8089092
0
Populates the treemap with start and end letters based on how many letters should be present in each group
private void populateLetterList() { int numberOfTabs = LETTERS_IN_ALPHABET / numberInGroup; if (LETTERS_IN_ALPHABET % numberInGroup != 0) { numberOfTabs++; } for (int i = 0; i < numberOfTabs; i++) { Character startLetter = (char) ((i * numberInGroup) + 65); Character endLetter = (char) (startLetter + numberInGroup - 1); if ((int) endLetter > (25 + 65)) { endLetter = (char) (25 + 65); } startLetterList.put(startLetter, endLetter); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void buildMap()\n {\n for(int letterNum=0; letterNum < myText.length()-myNum; letterNum++) {\n String key = myText.substring(letterNum,letterNum+myNum);\n String nextLetter = String.valueOf(myText.charAt(letterNum + myNum));\n if (!map.containsKey(key)) {\n ...
[ "0.64649516", "0.6243607", "0.5911263", "0.58134633", "0.5662403", "0.54527014", "0.5417487", "0.5306911", "0.52528954", "0.52515846", "0.51859325", "0.5121079", "0.51195544", "0.5109276", "0.5086711", "0.50818187", "0.5081784", "0.5080015", "0.50792855", "0.5057529", "0.5051...
0.6559422
0
Creates the spans required for jQuery tabs to build the desired tabs
private void createTabList() throws UnsupportedEncodingException { org.mortbay.html.List tabList = new org.mortbay.html.List(org.mortbay.html.List.Unordered); tabsDiv.add(tabList); Integer tabCount = 1; for (Map.Entry letterPairs : startLetterList.entrySet()) { Character startLetter = (Character) letterPairs.getKey(); Character endLetter = (Character) letterPairs.getValue(); Link tabLink = new Link("DisplayContentTab?start=" + startLetter + "&amp;end=" + endLetter + "&amp;group=" + grouping + "&amp;type=" + type + "&amp;filter=" + filterKey + "&amp;timeKey=" + timeKey, startLetter + " - " + endLetter); Composite tabListItem = tabList.newItem(); tabListItem.add(tabLink); Block loadingDiv = new Block(Block.Div, "id='ui-tabs-" + tabCount++ + "'"); Image loadingImage = new Image(LOADING_SPINNER); loadingImage.alt("Loading..."); loadingDiv.add(loadingImage); loadingDiv.add(" Loading..."); tabsDiv.add(loadingDiv); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createTabsDiv() {\n tabsDiv = new Block(Block.Div, \"id='tabs'\");\n page.add(tabsDiv);\n }", "private void createTabs() {\r\n\t\ttabbedPane = new JTabbedPane();\r\n\t\t\r\n\t\t//changes title and status bar \r\n\t\ttabbedPane.addChangeListener((l) -> { \r\n\t\t\tint index = tabbedPane.getSel...
[ "0.6716681", "0.63711506", "0.63357335", "0.62854505", "0.62235147", "0.6101115", "0.6006216", "0.59709877", "0.58444923", "0.5837202", "0.5822562", "0.57927465", "0.5785772", "0.57027465", "0.5618826", "0.5611504", "0.5561321", "0.5554566", "0.5554556", "0.5476348", "0.54682...
0.67669636
0
Sanitises a string so that it can be used as a div id
public static String cleanName(String name) { return name.replace(" ", "_").replace("&", "").replace("(", "") .replace(")", "").replaceAll(",", ""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getIdFromConsiderList(String str) {\n return str.trim();\n }", "private static String sanitize(String input) {\n input = input.replaceAll(\"[^A-Za-z0-9_]\", \"\").toLowerCase();\n if (input.matches(\"[0-9]+\") || input.startsWith(\"href\")) {\n return \"\";...
[ "0.5694769", "0.567416", "0.5566309", "0.54859424", "0.5460938", "0.5404283", "0.53871316", "0.53431875", "0.53209877", "0.5262356", "0.523826", "0.52299315", "0.5188462", "0.51469797", "0.5132282", "0.5131323", "0.5113651", "0.5094696", "0.5071911", "0.50538087", "0.5053045"...
0.0
-1
Adds javascript to the page based on the URL provided
private void addJS(String jsLocation) { Script ajaxScript = new Script(""); ajaxScript.attribute("src", jsLocation); ajaxScript.attribute("type", "text/javascript"); page.addHeader(ajaxScript); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addJQueryJS() {\n addJS(\"http://code.jquery.com/jquery-1.9.1.js\");\n addJS(\"http://code.jquery.com/ui/1.10.3/jquery-ui.js\");\n addJS(\"js/auDetails-new.js\");\n }", "public void loadJavaScript(String javascript) {\n if (TextUtils.isEmpty(javascript)) {\n return;\n ...
[ "0.5965387", "0.57859665", "0.57684314", "0.5535591", "0.55089283", "0.53514796", "0.52338487", "0.5203658", "0.5164074", "0.5146726", "0.51291573", "0.51192683", "0.5105161", "0.50972325", "0.5083051", "0.50578624", "0.5004338", "0.4963466", "0.4953797", "0.4920127", "0.4918...
0.71953905
0
Returns consecutive sublists of a list, each of the same size (the final list may be smaller). For example, partitioning a list containing [a, b, c, d, e] with a partition size of 3 yields [[a, b, c], [d, e]] an outer list containing two inner lists of three and two elements, all in the original order. The outer list is unmodifiable, but reflects the latest state of the source list. The inner lists are sublist views of the original list, produced on demand using List.subList(int, int), and are subject to all the usual caveats about modification as explained in that API.
static <T> List<List<T>> partition(List<T> list, int size) { return new Partition<>(list, size); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static <T> List<List<T>> getSubsets( int indexToStart, int subSize, List<T> toClone, List<T> origList ) {\n List<List<T>> allSubsets = new ArrayList<List<T>>();\n for ( int i = indexToStart; i <= origList.size() - subSize; i++ ) {\n List<T> subset = new ArrayList<T>( toClone );\n subset.add...
[ "0.6566955", "0.6458244", "0.64263827", "0.64143044", "0.63529867", "0.595147", "0.594155", "0.580288", "0.56444496", "0.5582479", "0.55539846", "0.54853255", "0.5385434", "0.5295916", "0.529018", "0.5267217", "0.5252707", "0.5247907", "0.5225411", "0.5214609", "0.52066404", ...
0.6917392
0
Verifies that providing an empty predicate array evaluates to true.
@SuppressWarnings({"unchecked"}) @Test public void emptyArrayToGetInstance() { assertTrue(getPredicateInstance(new Predicate[] {}).evaluate(null), "empty array not true"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\n @Test\n public void oneFalsePredicate() {\n // use the constructor directly, as getInstance() returns the original predicate when passed\n // an array of size one.\n final Predicate<Integer> predicate = createMockPredicate(false);\n assertFalse(a...
[ "0.6512737", "0.649856", "0.61924106", "0.6054374", "0.6038946", "0.60323304", "0.6011351", "0.5996907", "0.5988679", "0.59481204", "0.5933951", "0.5932421", "0.5899778", "0.58139056", "0.5777797", "0.5739317", "0.5738496", "0.57340854", "0.5667354", "0.56293887", "0.56169486...
0.6905487
0
Verifies that providing an empty predicate collection evaluates to true.
@Test public void emptyCollectionToGetInstance() { final Predicate<Integer> allPredicate = getPredicateInstance( Collections.<Predicate<Integer>>emptyList()); assertTrue(allPredicate.evaluate(getTestValue()), "empty collection not true"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CollectionPreconditions toBeEmpty() {\n return customMatcher(new Matcher<Collection>() {\n @Override\n public boolean match(final Collection value, final String label) {\n return expect(value, label).not().toBeNull().check().isEmpty();\n }\n\n ...
[ "0.68394464", "0.66069376", "0.6575465", "0.6360986", "0.63328993", "0.62544674", "0.62507665", "0.62390447", "0.61688834", "0.6122284", "0.6094034", "0.60798484", "0.6032282", "0.598914", "0.5966752", "0.5966091", "0.5964374", "0.5934673", "0.59273225", "0.5924617", "0.58699...
0.707851
0
Tests whether a single true predicate evaluates to true.
@SuppressWarnings("unchecked") @Test public void oneTruePredicate() { // use the constructor directly, as getInstance() returns the original predicate when passed // an array of size one. final Predicate<Integer> predicate = createMockPredicate(true); assertTrue(allPredicate(predicate).evaluate(getTestValue()), "single true predicate evaluated to false"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testPredicateAlwaysTrue() {\n Predicate<Integer> predicate = Predicate.alwaysTrue();\n\n assertTrue(predicate.apply(10));\n assertTrue(predicate.apply(null));\n assertTrue(predicate.apply(0));\n }", "@Test\n public void allTrue() {\n assertTrue(getP...
[ "0.6992189", "0.67414427", "0.6605045", "0.6288894", "0.6287236", "0.6278205", "0.6276555", "0.62594926", "0.6202073", "0.6170033", "0.6138757", "0.6101801", "0.5985093", "0.59826565", "0.59580135", "0.58957744", "0.5866204", "0.5832583", "0.56990623", "0.56927073", "0.568142...
0.7065524
0
Tests whether a single false predicate evaluates to true.
@SuppressWarnings("unchecked") @Test public void oneFalsePredicate() { // use the constructor directly, as getInstance() returns the original predicate when passed // an array of size one. final Predicate<Integer> predicate = createMockPredicate(false); assertFalse(allPredicate(predicate).evaluate(getTestValue()), "single false predicate evaluated to true"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testPredicateAlwaysFalse() {\n Predicate<Integer> predicate = Predicate.alwaysFalse();\n\n assertFalse(predicate.apply(10));\n assertFalse(predicate.apply(null));\n assertFalse(predicate.apply(0));\n }", "@Test\n public void trueAndFalseCombined() {\n ...
[ "0.73911226", "0.684543", "0.67486", "0.62202287", "0.62096", "0.6101904", "0.59921366", "0.59846395", "0.59039336", "0.5887656", "0.58639973", "0.585532", "0.5851935", "0.5803737", "0.5789473", "0.57678676", "0.5713994", "0.5681695", "0.56497395", "0.56214434", "0.5614114", ...
0.72052336
1
Tests whether multiple true predicates evaluates to true.
@Test public void allTrue() { assertTrue(getPredicateInstance(true, true).evaluate(getTestValue()), "multiple true predicates evaluated to false"); assertTrue(getPredicateInstance(true, true, true).evaluate(getTestValue()), "multiple true predicates evaluated to false"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void trueAndFalseCombined() {\n assertFalse(getPredicateInstance(false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(false, null, null).evaluate(getTestValue()),\n \"false predicate evaluat...
[ "0.7191953", "0.7092514", "0.6880489", "0.66638213", "0.6505118", "0.6428561", "0.6245753", "0.6173272", "0.6147212", "0.6032302", "0.60256463", "0.6010144", "0.59705836", "0.59705836", "0.5911274", "0.5905144", "0.5895261", "0.58618945", "0.5847779", "0.58175707", "0.5789484...
0.83863485
0
Tests whether combining some true and one false evaluates to false. Also verifies that only the first false predicate is actually evaluated
@Test public void trueAndFalseCombined() { assertFalse(getPredicateInstance(false, null).evaluate(getTestValue()), "false predicate evaluated to true"); assertFalse(getPredicateInstance(false, null, null).evaluate(getTestValue()), "false predicate evaluated to true"); assertFalse(getPredicateInstance(true, false, null).evaluate(getTestValue()), "false predicate evaluated to true"); assertFalse(getPredicateInstance(true, true, false).evaluate(getTestValue()), "false predicate evaluated to true"); assertFalse(getPredicateInstance(true, true, false, null).evaluate(getTestValue()), "false predicate evaluated to true"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void allTrue() {\n assertTrue(getPredicateInstance(true, true).evaluate(getTestValue()),\n \"multiple true predicates evaluated to false\");\n assertTrue(getPredicateInstance(true, true, true).evaluate(getTestValue()),\n \"multiple true predicates evalu...
[ "0.717221", "0.66255754", "0.640839", "0.6343776", "0.63394934", "0.63388395", "0.628853", "0.61839086", "0.61488914", "0.61100906", "0.607447", "0.6072688", "0.6040951", "0.6039815", "0.6024284", "0.59820294", "0.5970555", "0.5887005", "0.58714855", "0.58480084", "0.57768697...
0.7671863
0
Abstrakte Methoden koennen von den Kindern ueberschrieben werden, muessen aber nicht! jede Pizza hat versch. Zutaten, muss also selber wissen welche um welche Zutaten es geht, verwaltet jedes Kind dann selber in dem "zutaten" Attribut, deshalb kann die Methode selbest hier zentral gefuehrt werden! getZutaten ist von der Syntax her in jeder Kindklasse genau gleich!
public String[] getZutaten() { return zutaten; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String dohvatiKontakt();", "public Farbe letztesKamel();", "public Order getOrderZonderKorting() {\n return orderZonderKorting;\n }", "public final zzgol<zzgop<?>> zzn() {\n zzr();\n return this.zzae;\n }", "@Override\n\tpublic String dohvatiKontakt() {\n\t\tretur...
[ "0.5752487", "0.57028633", "0.5620122", "0.5561062", "0.55071944", "0.54908526", "0.54801285", "0.54679", "0.54359144", "0.54326034", "0.5424792", "0.53735185", "0.5365886", "0.53284967", "0.53240186", "0.5287369", "0.5281997", "0.52696717", "0.52542716", "0.5249401", "0.5237...
0.5448306
8
ohne body, da abstract jede Pizza hat einen anderen preis, muss also selber wissen welchen die Preisberechung ist in jeder Kindklasse voellig anders!
public abstract double getPreis();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Pizza orderPizza(String type) {\n //hier wird Factory methode aufgerufen/ Code ändert sich öfters\n Pizza pizza = createPizza(type);\n\n if (pizza != null){\n System.out.printf(\"Making a \" + pizza.getName() + \"---------\");\n pizza.prepare();\n pizza....
[ "0.66276187", "0.63159406", "0.62978923", "0.6152934", "0.6093962", "0.60910994", "0.6064479", "0.60631585", "0.60516304", "0.59779644", "0.5920351", "0.58663225", "0.58561265", "0.58532685", "0.58315104", "0.580155", "0.57372534", "0.5723171", "0.5716148", "0.5709251", "0.56...
0.0
-1
This method will be called everytime a test fails. It will return TRUE if a test fails and need to be retried, else it returns FALSE
public boolean retry(ITestResult result) { //You could mentioned maxRetryCnt (Maximiun Retry Count) as per your requirement. Here I took 2, If any failed testcases then it runs two times int maxRetryCnt = 1; if (retryCnt < maxRetryCnt) { System.out.println("Retrying " + result.getName() + " again and the count is " + (retryCnt+1)); retryCnt++; return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic boolean retry(ITestResult result) \n\t{\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean retry(ITestResult result) {\n\n if (!result.isSuccess()) { //Check if test not succeed\n if (count < maxTry) { //Check if max...
[ "0.7688026", "0.7496475", "0.7229396", "0.7027582", "0.6874562", "0.6844606", "0.6835655", "0.6805579", "0.6762331", "0.67294645", "0.67185134", "0.66825265", "0.6650515", "0.65778595", "0.6542566", "0.65183556", "0.6409048", "0.63900006", "0.6388493", "0.6386784", "0.6353909...
0.70580363
3
Primary function used to teleport the player using doors. Performs numerous null checks, and also generates the destination door/pocket if it has not done so already. Also ensures correct orientation relative to the door.
public static void traverseDimDoor(World world, DimLink link, Entity entity) { if (world == null) { throw new IllegalArgumentException("world cannot be null."); } if (link == null) { throw new IllegalArgumentException("link cannot be null."); } if (entity == null) { throw new IllegalArgumentException("entity cannot be null."); } if (world.isRemote) { return; } if (cooldown == 0 || entity instanceof EntityPlayer) { cooldown = 2 + random.nextInt(2); } else { return; } if (!initializeDestination(link, DDProperties.instance())) { return; } entity = teleportEntity(entity, link.destination()); entity.worldObj.playSoundEffect(entity.posX, entity.posY, entity.posZ, "mob.endermen.portal", 1.0F, 1.0F); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean teleport(Entity destination) {\n/* 571 */ return teleport(destination.getLocation());\n/* */ }", "public boolean movePlayer(Player p, Direction d) {\n\n\t\tLocation playerLoc = p.getLocation();\n\t\tTile playerTil = p.getTile();\n\t\tPosition playerPos = playerTil.getPos();\n\n\t\tTile...
[ "0.57902974", "0.5684571", "0.5485919", "0.5449063", "0.54176414", "0.53478736", "0.53442734", "0.5342095", "0.53011775", "0.5222502", "0.51621157", "0.5160502", "0.51591396", "0.5142965", "0.5130192", "0.51213455", "0.506555", "0.5062984", "0.505838", "0.5047471", "0.5027972...
0.0
-1
FIXME: Change this later to support rooms that have been wiped and must be regenerated.
private static boolean initializeDestination(DimLink link, DDProperties properties) { if (link.hasDestination()) { return true; } //Check the destination type and respond accordingly //FIXME: Add missing link types. //FIXME: Add code for restoring the destination-side door. switch (link.linkType()) { case LinkTypes.DUNGEON: return PocketBuilder.generateNewDungeonPocket(link, properties); case LinkTypes.POCKET: return PocketBuilder.generateNewPocket(link, properties); case LinkTypes.NORMAL: return true; default: throw new IllegalArgumentException("link has an unrecognized link type."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createRooms()//refactored\n {\n currentRoom = RoomCreator.buildCurrentRooms();//new\n }", "private static void performRoomManagement() {\n\t\t\r\n\t\t\r\n\r\n\t}", "Room getRoom();", "Room getRoom();", "public void populateRooms(){\n }", "public void createRooms()//Method was g...
[ "0.7183627", "0.7122857", "0.6731659", "0.6731659", "0.6678635", "0.65381646", "0.6522477", "0.651477", "0.6506508", "0.64333975", "0.6421318", "0.64100784", "0.63661855", "0.6356475", "0.6339315", "0.6307888", "0.6275794", "0.6266754", "0.6264664", "0.6237757", "0.62314284",...
0.0
-1
homework !!! must use your ArrayStack or LinkedListStack in problem 1 print with the following format. System.out.println() will not pass test.
public static void printListInReverse(ListNode list, PrintStream print) { print.println("hello world"); // place holder }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void printStack(Stack<Integer> s)\n\t{\n/*\t\tListIterator<Integer> lt = s.listIterator();\n\n\t\t// forwarding\n\t\twhile (lt.hasNext())\n\t\t\tlt.next();\n\n\t\t// printing from top to bottom\n\t\twhile (lt.hasPrevious())\n\t\t\tSystem.out.print(lt.previous() + \" \");*/\n\t\t\tSystem.out.println(s);\n\t}...
[ "0.7281107", "0.7253796", "0.72095114", "0.71250653", "0.71239763", "0.7062571", "0.70343804", "0.7018798", "0.70167124", "0.69771993", "0.6910599", "0.689175", "0.68803984", "0.6874785", "0.6861691", "0.68421793", "0.68153787", "0.6797689", "0.6767923", "0.67452383", "0.6728...
0.0
-1
~ Constructors Creates a new directed weighted flow graph.
public DefaultDirectedWeightedFlowGraph(Class<? extends E> edgeClass) { this(new ClassBasedEdgeFactory<V, E>(edgeClass)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public WeightedGraph() {\n super();\n }", "public DefaultDirectedWeightedFlowGraph(DefaultDirectedWeightedGraph<V, E> dWG) {\r\n this.graph = dWG;\r\n\r\n }", "public WeightedAdjacencyGraph() {\n this.vertices = new HashMap<>();\n }", "public DefaultDirectedWeightedFlowGraph(Edg...
[ "0.7402975", "0.6924529", "0.68496126", "0.6738611", "0.67231345", "0.65552354", "0.65497345", "0.6524515", "0.646255", "0.64276314", "0.62582934", "0.6180722", "0.61288935", "0.61229056", "0.6118345", "0.60950845", "0.60909027", "0.609054", "0.6055488", "0.6036396", "0.60293...
0.6474125
8
Creates a new directed weighted flow graph with the specified edge factory.
public DefaultDirectedWeightedFlowGraph(EdgeFactory<V, E> ef) { this.graph = new DefaultDirectedWeightedGraph(ef); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static final Factory<Edge> getFactory() {\r\n\t\treturn new Factory<Edge> () {\r\n\t\t\tprivate int nextId = 0;\r\n\t\t\tpublic Edge create() {\r\n\t\t\t\treturn new Edge(nextId++);\r\n\t\t\t}\r\n\t\t};\r\n\t}", "Edge createEdge(Vertex src, Vertex tgt, boolean directed);", "public DefaultDirectedWeighte...
[ "0.6440572", "0.5978513", "0.593119", "0.59212035", "0.5810886", "0.5728624", "0.56399006", "0.5637921", "0.55375075", "0.5526722", "0.540082", "0.5369645", "0.5333752", "0.53318256", "0.5329816", "0.5316353", "0.5248712", "0.5235385", "0.5190153", "0.51798314", "0.5145641", ...
0.71516603
0
Creates a new directed weighted flow graph by wrapping an DefaultDirectedWeightedGraph
public DefaultDirectedWeightedFlowGraph(DefaultDirectedWeightedGraph<V, E> dWG) { this.graph = dWG; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected IWeightedGraph<GraphNode, WeightedEdge> createGraph() {\r\n\t\treturn createGraph(goapUnit.getGoalState());\r\n\t}", "public weighted_graph getGraph();", "public DefaultDirectedWeightedFlowGraph(EdgeFactory<V, E> ef) {\r\n this.graph = new DefaultDirectedWeightedGraph(ef);\r\n\r\n }", "pu...
[ "0.6768132", "0.67489266", "0.6737185", "0.66773593", "0.6655718", "0.66376746", "0.65151924", "0.6410576", "0.63893664", "0.63656384", "0.6273781", "0.61641216", "0.61552495", "0.6146054", "0.6093688", "0.60884786", "0.6022783", "0.5972649", "0.59237504", "0.5922876", "0.592...
0.7548851
0
commit one asset on main branch.
@Test public void run() throws Exception { BranchName main = BranchName.of("main"); // create an old commit referencing both unique and non-unique assets. //The unique asset should be identified by the gc policy below since they are older than 1 day. store.setOverride(FIVE_DAYS_IN_PAST_MICROS); commit().put("k1", new DummyValue().add(-3).add(0).add(100)).withMetadata("cOld").toBranch(main); // work beyond slop but within gc allowed age. store.setOverride(TWO_HOURS_IN_PAST_MICROS); // create commits that have time-valid assets. Create more commits than ParentList.MAX_PARENT_LIST to confirm recursion. for (int i = 0; i < 55; i++) { commit().put("k1", new DummyValue().add(i).add(i + 100)).withMetadata("c2").toBranch(main); } // create a new branch, commit two assets, then delete the branch. BranchName toBeDeleted = BranchName.of("toBeDeleted"); versionStore.create(toBeDeleted, Optional.empty()); Hash h = commit().put("k1", new DummyValue().add(-1).add(-2)).withMetadata("c1").toBranch(toBeDeleted); versionStore.delete(toBeDeleted, Optional.of(h)); store.clearOverride(); { // Create a dangling value to ensure that the slop factor avoids deletion of the assets of this otherwise dangling value. save(TimeUnit.MILLISECONDS.toMicros(System.currentTimeMillis()), new DummyValue().add(-50).add(-51)); // create a dangling value that should be cleaned up. save(TimeUnit.MILLISECONDS.toMicros(System.currentTimeMillis()) - TimeUnit.DAYS.toMicros(2), new DummyValue().add(-60).add(-61)); } SparkSession spark = SparkSession .builder() .appName("test-nessie-gc-collection") .master("local[2]") .getOrCreate(); // now confirm that the unreferenced assets are marked for deletion. These are found based // on the no-longer referenced commit as well as the old commit. GcOptions options = ImmutableGcOptions.builder() .bloomFilterCapacity(10_000_000) .maxAgeMicros(ONE_DAY_OLD_MICROS) .timeSlopMicros(ONE_HOUR_OLD_MICROS) .build(); IdentifyUnreferencedAssets<DummyValue> app = new IdentifyUnreferencedAssets<DummyValue>(helper, new DynamoSupplier(), spark, options); Dataset<UnreferencedItem> items = app.identify(); Set<String> unreferencedItems = items.collectAsList().stream().map(UnreferencedItem::getName).collect(Collectors.toSet()); assertThat(unreferencedItems, containsInAnyOrder("-1", "-2", "-3", "-60", "-61")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "byte[] submit() throws CommitException;", "void commit() {\n }", "void commit() throws CommitException;", "public void commit() {\n doCommit();\n }", "public void commit() {\n }", "public void commit(Writer output) throws IOException {\n postData(new StringReader(\"<commit/>\"), output);\n...
[ "0.6331862", "0.6227228", "0.5984934", "0.5922197", "0.5856027", "0.5789615", "0.57420874", "0.57420874", "0.5719315", "0.5698256", "0.5678718", "0.567516", "0.5642349", "0.5642349", "0.5642349", "0.5642349", "0.5642349", "0.56294346", "0.5623186", "0.56217057", "0.5614363", ...
0.0
-1
Delayed removal of status and navigation bar Note that some of these constants are new as of API 16 (Jelly Bean) and API 19 (KitKat). It is safe to use them, as they are inlined at compiletime and do nothing on earlier devices. mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
@SuppressLint("InlinedApi") @Override public void run() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void hideSystemUI() {\n decorView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n | View.SYSTEM_UI_FLAG_HIDE_NAVIG...
[ "0.8305635", "0.8224361", "0.8190639", "0.80639213", "0.80339384", "0.80339384", "0.80339384", "0.80339384", "0.80339384", "0.80339384", "0.7992419", "0.7990797", "0.78727895", "0.7830553", "0.78135484", "0.7761877", "0.75880176", "0.7560409", "0.75301653", "0.7487276", "0.74...
0.0
-1
Delayed display of UI elements
@Override public void run() { ActionBar actionBar = getSupportActionBar(); if (actionBar != null) { actionBar.show(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressLint(\"InlinedApi\")\n private void show() {\n mVisible = true;\n\n // Schedule a runnable to display UI elements after a delay\n mHideHandler.removeCallbacks(mHidePart2Runnable);\n mHideHandler.postDelayed(mShowPart2Runnable, UI_ANIMATION_DELAY);\n }", "public void dis...
[ "0.6941023", "0.6717221", "0.66713834", "0.6607852", "0.65695727", "0.6560161", "0.64995843", "0.6486983", "0.6460261", "0.6453134", "0.64354575", "0.6428714", "0.63923097", "0.6370556", "0.63703376", "0.63700414", "0.63254714", "0.6321182", "0.62877566", "0.62872857", "0.627...
0.0
-1
Show the system bar
@SuppressLint("InlinedApi") private void show() { mVisible = true; // Schedule a runnable to display UI elements after a delay mHideHandler.removeCallbacks(mHidePart2Runnable); mHideHandler.postDelayed(mShowPart2Runnable, UI_ANIMATION_DELAY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showSystemUI() {\n View decorView = getWindow().getDecorView();\n decorView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);\n...
[ "0.74906224", "0.74906224", "0.74906224", "0.7391044", "0.7357647", "0.7254911", "0.7037097", "0.7036765", "0.69323057", "0.68598646", "0.68598646", "0.68598646", "0.68598646", "0.68598646", "0.68598646", "0.6850693", "0.684366", "0.68308485", "0.6825867", "0.6821222", "0.668...
0.0
-1
Schedules a call to hide() in delay milliseconds, canceling any previously scheduled calls.
private void delayedHide(int delayMillis) { mHideHandler.removeCallbacks(mHideRunnable); mHideHandler.postDelayed(mHideRunnable, delayMillis); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void delayedHide(int delayMillis) {\n\n }", "private void delayedHide(int delayMillis) {\n\t\tmHideHandler.removeCallbacks(mHideRunnable);\n\t\tmHideHandler.postDelayed(mHideRunnable, delayMillis);\n\t}", "private void delayedHide(int delayMillis) {\n\t\tmHideHandler.removeCallbacks(mHideRunnable);\...
[ "0.8275258", "0.768496", "0.768496", "0.748471", "0.6545245", "0.6433806", "0.6335333", "0.631813", "0.6296235", "0.6294597", "0.6078069", "0.60214007", "0.60214007", "0.60214007", "0.60214007", "0.60214007", "0.60214007", "0.60214007", "0.60214007", "0.60214007", "0.60214007...
0.7677579
12
Integer pageSize = aStatic.getPageSize();
@Override public PageInfo<VehicleProduct> findByPage(BaseQuery data) { Integer pageSize = 5; Integer pageNum=1; if (data.getPageNum()!=null) { pageNum=data.getPageNum(); } PageHelper.startPage(pageNum, pageSize); List<VehicleProduct> vehicleList = vehicleProductMapper.findByQuery(data); PageInfo<VehicleProduct> pageInfo = new PageInfo(vehicleList); return pageInfo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long getPageSize();", "long getPageSize();", "long getPageSize();", "int getPageSize();", "int getPageSize();", "int getPageSize();", "int getPageSize();", "int getPagesize();", "default Integer getPageSize() {\n return 10;\n }", "public Integer getCurrentPageSize();", "public int get...
[ "0.8328864", "0.8328864", "0.8328864", "0.8269167", "0.8269167", "0.8269167", "0.8269167", "0.7988132", "0.7752553", "0.7710519", "0.7438293", "0.7345521", "0.7212982", "0.7200666", "0.7109418", "0.7104432", "0.7094103", "0.70296645", "0.70191693", "0.69975245", "0.69975245",...
0.0
-1
/ Precedence of logical operators ! is evaluated first && is evaluated second || is valuated third int value1 = 10; int value2 = 20; int value3= 30; // True// True // retured value is True boolean result1 = value2>value1 && value2value1 && value2value1 && value2>value3; System. out .println( "value2>value1 && value2>value3 result3 is " +result3); // False// False// False boolean result4 = value2value3; System. out .println( "value2value3 result4 is " +result4); //2. Logical OR operator System. out .println( "Logical OR Operator Examples" ); // True// True// Retured value is True result1 = value2>value1 || value2value1 || value2value1 || value2>value3; System. out .println( "value2>value1 || value2>value3 result3 is " +result3); //False// False// Retured value is False result4 = value2value3; System. out .println( "value2value3 result4 is " +result4);
public static void main(String[] args) { int day = 2; String dayType; String dayString; switch (day) { case 1: dayString = "Monday"; break; case 2: dayString = "Tuesday"; break; case 3: dayString = "Wednesday"; break; case 4: dayString = "Thursday"; break; case 5: dayString = "Friday"; break; case 6: dayString = "Saturday"; break; case 7: dayString = "Sunday"; break; default: dayString = "Invalid day"; } switch (day) { //multiple cases without break statements case 1: case 2: case 3: case 4: case 5: dayType = "Weekday"; break; case 6: case 7: dayType = "Weekend"; break; default: dayType= "Invalid daytype"; } System.out.println(dayString+" is a "+ dayType); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\t\n\t\t\n\t\tint num = 20;\n\t\t\n\t\tnum = 25; \n\t\t\n\t\t//\" == \" sign or comparison boolean kullanilir \n\t\t\n\t\tboolean isTrue = 5 + 2 == 7;\n\t\t\n\t\tboolean isFalse = 5 + 2 == 8;\n\t\t\n\t\tSystem.out.println(isTrue == isFalse); // this says True equals Fal...
[ "0.7367896", "0.7355359", "0.7342465", "0.70999897", "0.6971661", "0.67124087", "0.656738", "0.6534837", "0.64990324", "0.6463141", "0.6412905", "0.63546747", "0.6354199", "0.6329013", "0.6278155", "0.62192607", "0.6198916", "0.61598545", "0.6081055", "0.6059548", "0.59825486...
0.0
-1
This method is used to test login in controller layer. Service layer response is mocked and controller layer of login is validated. This method is validated when valid details is provided from front end
@Test void validLoginTest() throws Exception { User userObj = new User(); userObj.setUsername("sivass"); userObj.setPassword("Siva123@"); UserInfo userInfo = new UserInfo(); userInfo.setRole("C"); userInfo.setUserId(10); String userJson = new ObjectMapper().writeValueAsString(userObj); when(userService.loginValidation(any(String.class), any(String.class))).thenReturn(userInfo); mockMvc.perform(post("/vegapp/v1/users/login").contentType(MediaType.APPLICATION_JSON).content(userJson)) .andExpect(status().isOk()).andExpect(jsonPath("$.role").value("C")) .andExpect(jsonPath("$.userId").value(10)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ResponseEntity<TokenLoginResponse> requestLoginResponse() {\n LoginRequest userLogin = new LoginRequest();\n userLogin.setUsername(\"user\");\n userLogin.setPassword(\"password\");\n ResponseEntity<TokenLoginResponse> loginResponse = new TestRestTemplate().postForEntity(\"http:/...
[ "0.70019144", "0.6845226", "0.67921174", "0.67541", "0.674648", "0.65344775", "0.6527422", "0.65192187", "0.65053886", "0.6458095", "0.64455485", "0.6377919", "0.63426", "0.6334822", "0.6300359", "0.6286794", "0.62792313", "0.6275142", "0.62575454", "0.62550414", "0.6234106",...
0.736623
0
This method is used to test login in controller layer. Service layer response is mocked and controller layer of login is validated. This method is validated when invalid details is provided from front end
@Test void invalidLoginTest() throws Exception { User userObj = new User(); userObj.setUsername("sivass"); userObj.setPassword("Sivas23@"); String userJson = new ObjectMapper().writeValueAsString(userObj); when(userService.loginValidation(any(String.class), any(String.class))) .thenThrow(new InvalidLoginException("Invalid Login Credentials")); mockMvc.perform(post("/vegapp/v1/users/login").contentType(MediaType.APPLICATION_JSON).content(userJson)) .andExpect(status().isUnauthorized()) .andExpect(jsonPath("$.errorMessage").value("Invalid Login Credentials")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tvoid validLoginTest() throws Exception {\n\t\tUser userObj = new User();\n\t\tuserObj.setUsername(\"sivass\");\n\t\tuserObj.setPassword(\"Siva123@\");\n\n\t\tUserInfo userInfo = new UserInfo();\n\t\tuserInfo.setRole(\"C\");\n\t\tuserInfo.setUserId(10);\n\t\tString userJson = new ObjectMapper().writeValueA...
[ "0.7344891", "0.68325144", "0.683065", "0.66883904", "0.6648267", "0.6569454", "0.6557239", "0.65464646", "0.64839643", "0.6401694", "0.631298", "0.63120556", "0.6278616", "0.6222378", "0.62133324", "0.6153487", "0.6150837", "0.61396915", "0.6131614", "0.6124995", "0.6124337"...
0.6975309
1
This method is used to test register in controller layer. Service layer response is mocked and controller layer of register is validated. This method is validated when valid details is provided from front end
@Test void validRegisterTest() throws Exception { User userObj = new User(); userObj.setName("Siva Murugan"); userObj.setEmail("valid@gmail.com"); userObj.setGender("M"); userObj.setMobileNumber(9878909878L); userObj.setRole("C"); userObj.setUsername("sivanew"); userObj.setPassword("Siva123@"); String userJson = new ObjectMapper().writeValueAsString(userObj); when(userService.registerUser(any(User.class))).thenReturn(true); mockMvc.perform(post("/vegapp/v1/users/register").contentType(MediaType.APPLICATION_JSON).content(userJson)) .andExpect(status().isOk()).andExpect(content().string("true")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testRegisterSuccessfully() {\n SignUpRequest request = new SignUpRequest(UNIQUE, \"Secret\");\n\n dao.register(request);\n\n verify(controller).registered();\n }", "@Test\n void registerUser() throws Exception{\n\n final RegisterDto registerDto = new Regis...
[ "0.7300629", "0.7044915", "0.6649331", "0.6538899", "0.651867", "0.64329463", "0.63679826", "0.61925817", "0.6156291", "0.6139406", "0.6129829", "0.612259", "0.6121664", "0.6121383", "0.611975", "0.611935", "0.6106135", "0.60967755", "0.6090031", "0.60789627", "0.60699964", ...
0.7105627
1
This method is used to test register in controller layer. Service layer response is mocked and controller layer of register is validated. This method is validated when email already used by a user and service layer throws exception of EmailAlreadyExistException.
@Test void repeatedEmailTest() throws Exception { User userObj = new User(); userObj.setName("Siva Murugan"); userObj.setEmail("valid@gmail.com"); userObj.setGender("M"); userObj.setMobileNumber(9878909878L); userObj.setRole("C"); userObj.setUsername("sivanew"); userObj.setPassword("Siva123@"); String userJson = new ObjectMapper().writeValueAsString(userObj); when(userService.registerUser(any(User.class))).thenThrow(new EmailAlreadyExistException("E_ER01")); mockMvc.perform(post("/vegapp/v1/users/register").contentType(MediaType.APPLICATION_JSON).content(userJson)) .andExpect(status().isConflict()).andExpect(jsonPath("$.errorMessage").value("E_ER01")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void registerUserTest3() throws Exception {\n\t\tSignUpRequest signUpRequest = new SignUpRequest(\"Marko\", \"Troskot\", \"MTro\", \"marko@gotmail.com\", \"pass123\", \"pass123\");\n\n\t\tMockito.when(userService.existsByUsername(ArgumentMatchers.anyString())).thenReturn(false);\n\t\tMockito.when(u...
[ "0.7492028", "0.7196356", "0.70833975", "0.6995061", "0.6990183", "0.69342226", "0.6835059", "0.6829169", "0.6811866", "0.67913586", "0.6769434", "0.67460215", "0.67095554", "0.66097385", "0.66054374", "0.6568128", "0.6541034", "0.6537801", "0.6535025", "0.6518319", "0.647470...
0.7950278
0
This method is used to test register in controller layer. Service layer response is mocked and controller layer of register is validated. This method is validated when username already used by a user and service layer throws exception of UsernameAlreadyExistException.
@Test void repeatedUsernameTest() throws Exception { User userObj = new User(); userObj.setName("Siva Murugan"); userObj.setEmail("valid@gmail.com"); userObj.setGender("M"); userObj.setMobileNumber(9878909878L); userObj.setRole("C"); userObj.setUsername("sivanew"); userObj.setPassword("Siva123@"); String userJson = new ObjectMapper().writeValueAsString(userObj); when(userService.registerUser(any(User.class))).thenThrow(new UsernameAlreadyExistException("E_UR01")); mockMvc.perform(post("/vegapp/v1/users/register").contentType(MediaType.APPLICATION_JSON).content(userJson)) .andExpect(status().isConflict()).andExpect(jsonPath("$.errorMessage").value("E_UR01")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void registerUserTest2() throws Exception {\n\t\tSignUpRequest signUpRequest = new SignUpRequest(\"Marko\", \"Troskot\", \"MTro\", \"marko@gotmail.com\", \"pass123\", \"pass123\");\n\n\t\tMockito.when(userService.existsByUsername(ArgumentMatchers.anyString())).thenReturn(true);\n\n\t\tmockMvc.perfo...
[ "0.7740674", "0.71596783", "0.7080061", "0.69996387", "0.6973125", "0.6873729", "0.6822487", "0.67789924", "0.67735463", "0.66672695", "0.6665892", "0.66613704", "0.66588205", "0.66471", "0.6638485", "0.66237897", "0.659", "0.6589151", "0.65647894", "0.6561626", "0.6550198", ...
0.80079675
0
This method is used to test register in controller layer. Service layer response is mocked and controller layer of register is validated. This method is validated when mobile number already used by a user and service layer throws exception of MobileNumberAlreadyExistException.
@Test void repeatedMobileNumberTest() throws Exception { User userObj = new User(); userObj.setName("Siva Murugan"); userObj.setEmail("valid@gmail.com"); userObj.setGender("M"); userObj.setMobileNumber(9878909878L); userObj.setRole("C"); userObj.setUsername("sivanew"); userObj.setPassword("Siva123@"); String userJson = new ObjectMapper().writeValueAsString(userObj); when(userService.registerUser(any(User.class))).thenThrow(new MobileNumberAlreadyExistException("E_MR01")); mockMvc.perform(post("/vegapp/v1/users/register").contentType(MediaType.APPLICATION_JSON).content(userJson)) .andExpect(status().isConflict()).andExpect(jsonPath("$.errorMessage").value("E_MR01")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tvoid validRegisterTest() throws Exception {\n\t\tUser userObj = new User();\n\t\tuserObj.setName(\"Siva Murugan\");\n\t\tuserObj.setEmail(\"valid@gmail.com\");\n\t\tuserObj.setGender(\"M\");\n\t\tuserObj.setMobileNumber(9878909878L);\n\t\tuserObj.setRole(\"C\");\n\t\tuserObj.setUsername(\"sivanew\");\n\t\...
[ "0.6455696", "0.6339709", "0.6313856", "0.62987196", "0.62599", "0.62195635", "0.6217549", "0.62005156", "0.6193361", "0.6189587", "0.6104295", "0.60920024", "0.60729885", "0.6043953", "0.604293", "0.5981338", "0.59555334", "0.59451914", "0.59381694", "0.5919558", "0.58859307...
0.8101971
0
Instantiates a new column menu actions.
public CrossReferenceMenuActions(MenuManagerController menuManagerController) { final ATabularController<?> tabularController = (ATabularController<?>) menuManagerController.getMenuContainer(); if (null != tabularController) { Action action; for (final CrossReference crossReference : ((ATabularCore<?>) tabularController.getGenCode()).getCrossReferences()) { action = new Action(crossReference.getDescription(), SWT.CHECK) { public void runWithEvent(Event event) { E4AdichatzApplication.openPart(tabularController.getContext(), getCrossRefParamMap(tabularController, crossReference)); } }; menuManagerController.getControl().add(action); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void populateCellMenu(Cell cell, List<String> actions);", "public void createMenu() {\n\t\tmenuBar.add(createGameMenuColumn());\n\t\tmenuBar.add(createTestsMenuColumn());\n\t\tmenuBar.add(createCheatsMenuColumn());\n\n\t\tparentMainView.setJMenuBar(menuBar);\n\t}", "protected void createContextMenu() {\n\t\t//...
[ "0.6624892", "0.6459648", "0.6446051", "0.6413572", "0.6257723", "0.6153111", "0.6145157", "0.60968465", "0.6045609", "0.590718", "0.5901597", "0.58836025", "0.58365226", "0.5818718", "0.5783664", "0.5776446", "0.57729495", "0.57424116", "0.5741513", "0.57365775", "0.5725067"...
0.0
-1
Generated managedobject class for type TaslyOrderLineQuantityData first defined at extension omstaslyextorder. .
public interface TaslyOrderLineQuantityData extends OrderLineQuantityData, PropertyAware { /**<i>Generated managed object type code constant.</i>*/ String _TYPECODE = "TaslyOrderLineQuantityData"; /** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */ AttributeType<TaslyOrderLineQuantityData, String> EXPRESS_CODE = new AttributeType<>("express_code"); /** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */ AttributeType<TaslyOrderLineQuantityData, String> EXPRESS_ORDER_ID = new AttributeType<>("express_order_id"); /** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */ AttributeType<TaslyOrderLineQuantityData, String> REFUNDSTATUS = new AttributeType<>("refundstatus"); /** <i>Generated constant</i> - Index of <code>TaslyOrderLineQuantityData</code> type defined at extension <code>oms-tasly-ext-order</code>. */ UniqueIndexSingle<TaslyOrderLineQuantityData, Long> UX_ORDERLINEQUANTITIES_OLQID = new UniqueIndexSingle<>("UX_orderLineQuantities_olqId", TaslyOrderLineQuantityData.class); /** * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. * <p/> * 快递运单号. * * @return the express_order_id */ @javax.validation.constraints.Size(max=64) java.lang.String getExpress_order_id(); /** * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. * <p/> * 快递公司代码. * * @return the express_code */ @javax.validation.constraints.Size(max=10) java.lang.String getExpress_code(); /** * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. * <p/> * 退款、退货状态. * * @return the refundstatus */ @javax.validation.constraints.Size(max=128) java.lang.String getRefundstatus(); /** * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. * <p/> * 快递运单号. * * @param value the express_order_id */ void setExpress_order_id(final java.lang.String value); /** * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. * <p/> * 快递公司代码. * * @param value the express_code */ void setExpress_code(final java.lang.String value); /** * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. * <p/> * 退款、退货状态. * * @param value the refundstatus */ void setRefundstatus(final java.lang.String value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public OrderLine() {\n products = new ArrayList<>();\n price = new BigDecimal(0);\n }", "public OrderLine() {\n }", "public void setOrderLine (MOrderLine oLine, int M_Locator_ID, BigDecimal Qty)\n\t{\n\t\tMOrgPOS orgpos = MOrgPOS.getOrgPos(getCtx(), oLine.getParent().getAD_Org_ID(), get_Trx...
[ "0.6524634", "0.6363414", "0.6314658", "0.6292632", "0.62543297", "0.6213122", "0.6094878", "0.6071226", "0.6040542", "0.6040368", "0.6030125", "0.599224", "0.5983194", "0.596801", "0.5957175", "0.5956054", "0.59466374", "0.5895114", "0.5886395", "0.5828172", "0.5823036", "...
0.72613376
0
access it using localhost:4567/api/signup
private void doSignup(RoutingContext ctx){ // Get Data from view JsonObject req = ctx.getBodyAsJson(); String username = req.getString("username"); String password = req.getString("password"); GoogleAuthenticator authenticator = new GoogleAuthenticator(); //Get Generate Key System.out.println(" Calling Google Authenticator to generate AuthKey"); GoogleAuthenticatorKey authKey = authenticator.createCredentials(); String key = authKey.getKey(); System.out.println(" Google Authenticator generated AuthKey"); //Store Data from Repository User user = new User(username,password,key); //send response to the user JsonObject res = new JsonObject().put("key",key); ctx.response().setStatusCode(200).end(res.encode()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void register_user() {\n\n\t\tHttpRegister post = new HttpRegister();\n\t\tpost.execute(Config.URL + \"/api/newuser\");\n\n\t}", "void signUp(SignUpRequest signupRequest);", "@PostMapping(\"/signup\")\n public ResponseEntity<?> registerUser(@RequestBody RegistrationRequest registrationRequest){\n ...
[ "0.686044", "0.6850581", "0.6780019", "0.6739688", "0.6532104", "0.6527675", "0.6523384", "0.64493364", "0.6420643", "0.6398363", "0.636201", "0.6356909", "0.6340942", "0.63184255", "0.63052076", "0.62917304", "0.6279441", "0.6228014", "0.6203716", "0.61845404", "0.6158573", ...
0.6992043
0
TODO Autogenerated method stub
public static void main(String[] args) throws Exception { ItemMap items = new ItemMap(); OrderSet orders = new OrderSet(); CustomerList customers = new CustomerList(); SharedObject so = new SharedObject(); Manager.populateItemMap(items, "items.csv"); Manager.populateOrderSet(orders, customers, "existingCustomerOrders.csv"); CafeModel cafe = new CafeModel(orders, items, customers); ArrayList<ArrayList<String>> allOrders = Manager.indexOrders(orders, customers, items); System.out.println("Foo123 price: " + items.getPrice("DRINK206")); CafeGUIView gui = new CafeGUIView(orders, customers, items, so); CafeGUIController controller = new CafeGUIController(gui, so); QueueManager q = new QueueManager(so, orders, cafe, customers, items, controller); Thread producerThread = new Thread(q); producerThread.start(); Server serverOne = new Server(so, gui, 1); Thread consumerThreadOne = new Thread(serverOne); consumerThreadOne.start(); Server serverTwo = new Server(so, gui, 2); Thread consumerThreadTwo = new Thread(serverTwo); consumerThreadTwo.start(); NewOrderMgr newOrderManager = new NewOrderMgr(so, orders, customers, gui, items); Thread newOrderThread = new Thread(newOrderManager); newOrderThread.start(); Log.getInstance(); Log.Log(); }
{ "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
public static void main(String[] args) { Stream<String> strings = streamSection(nextStream(), 1, 3); System.out.println("**********************"); strings.forEach(System.out::println); Stream<String> strings2 = streamSection(nextStream(), 0, 5); System.out.println("**********************"); strings2.forEach(System.out::println); Stream<String> strings3 = streamSection(nextStream(), 2, 4); System.out.println("**********************"); strings3.forEach(System.out::println); }
{ "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
recuperation des id deja traites (enregistrer sous forme de nom de fichiers vides)
@Override public void process(Exchange exchange) throws Exception { File envoyeDirectory = new File("envoye"); String[] fileNames = envoyeDirectory.list(); LOG.debug("Liste de messages envoyés : {}", fileNames); if (fileNames == null) { fileNames = new String[1]; LOG.debug("initialisation du cache de fichiers traités à vide, premier lancement"); } exchange.getIn().setHeader("fileNames", fileNames); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setId_trimestre(int id_trimestre) {this.id_trimestre = id_trimestre;}", "public int getIden() {\n return iden;\n }", "public int getId() {\n // some code goes here\n \treturn m_f.getAbsoluteFile().hashCode();\n }", "public long getDossierId();", "java.lang.String getId();...
[ "0.62557757", "0.62026167", "0.61991775", "0.617723", "0.61413735", "0.61413735", "0.61413735", "0.61413735", "0.61413735", "0.61413735", "0.61413735", "0.61413735", "0.61413735", "0.61413735", "0.61413735", "0.61413735", "0.61413735", "0.61413735", "0.61413735", "0.61413735", ...
0.0
-1
Created by chentuanhui on 2016/9/23.
public interface BookService { //order:bydefault //http://api2.qingting.fm/v6/media/categories/527/channels/order/bydefault/0/attr/855/curpage/1/pagesize/30 @GET("v6/media/categories/527/channels/order/{order}/0/attr/{id}/curpage/{curpage}/pagesize/{pagesize}") Observable<BookResult> getBookList(@Header("Cache-Control") String cacheControl, @Path("order") String order, @Path("id") int id, @Path("curpage") int curpage, @Path("pagesize") int pagesize); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r...
[ "0.6158929", "0.60614836", "0.59614855", "0.58734775", "0.58602744", "0.5852098", "0.5852098", "0.58503354", "0.58432955", "0.5773304", "0.5771686", "0.57495964", "0.57476884", "0.5746606", "0.5731063", "0.5719766", "0.5701703", "0.5698854", "0.5698854", "0.56708443", "0.5655...
0.0
-1
Where the logic of the action is executed.
@Override public String execute() throws Exception { Program program = programService.getProgram(id); DataElementGroup dataElementGroup = program.getDataElementGroup(); IndicatorGroup indicatorGroup = program.getIndicatorGroup(); if( deSelectedList.size() >0 || indSelectedList.size()>0) { program.setName( StringUtils.trimToNull( name ) ); program.setCode( StringUtils.trimToNull( code ) ); program.setShortName( StringUtils.trimToNull( shortName ) ); program.setDescription( StringUtils.trimToNull( description ) ); program.getDataElements().clear(); program.getIndicators().clear(); dataElementGroup.getMembers().clear(); indicatorGroup.getMembers().clear(); for ( String id : deSelectedList ) { DataElement dataElement = dataElementService.getDataElement( id ); dataElementGroup.getMembers().add( dataElement ); program.getDataElements().add( dataElement ); } for ( String id : indSelectedList ) { Indicator indicator = indicatorService.getIndicator( id ); indicatorGroup.getMembers().add( indicator ); program.getIndicators().add( indicator ); } //updating DataElementGroup and IndicatorGroup dataElementGroup.setName( StringUtils.trimToNull( name ) ); dataElementGroup.setCode( StringUtils.trimToNull( code ) ); dataElementGroup.setShortName( StringUtils.trimToNull( shortName )); indicatorGroup.setName( StringUtils.trimToNull( name ) ); indicatorGroup.setCode( StringUtils.trimToNull( code ) ); programService.updateProgram( program ); dataElementService.updateDataElementGroup( dataElementGroup ); indicatorService.updateIndicatorGroup( indicatorGroup ); } return SUCCESS; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void execute(ActionContext ctx) {\n\t\t\r\n\t}", "public void action() {\n action.action();\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n ...
[ "0.73040634", "0.7238826", "0.7101533", "0.7101533", "0.7101533", "0.70639193", "0.68539524", "0.6853354", "0.6810679", "0.6810679", "0.6808125", "0.6772251", "0.67718446", "0.67718446", "0.67718446", "0.67718446", "0.67718446", "0.67718446", "0.67718446", "0.67718446", "0.66...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { Milk m=new Milk(); m.mineral(); m.bisleri(); }
{ "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
TreeSet ts = new TreeSet(new MyComp());
public static void main(String[] args) { TreeSet<String> ts = new TreeSet<>(new MyComp().reversed()); ts.add("C"); ts.add("B"); ts.add("A"); ts.add("G"); ts.add("Z"); ts.add("Q"); for (String element : ts){ System.out.print(element); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SyncedTreeSet() {\n _treeSet = new TreeSet<T>();\n }", "public static void main(String[] args) {\r\n\t\tHashSet h1=new HashSet();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\th1.add(3);\r\n\t\th1.add(7); //Homogeous \r\n\t\th1.add(9);//hetrogeous\r\n\t\th1.add(10);\r\n\t\t\r\n\t\tTreeSet t1=...
[ "0.6879813", "0.67951417", "0.6719849", "0.6677616", "0.6601301", "0.6505895", "0.63417935", "0.63317716", "0.6330672", "0.6285445", "0.62366176", "0.61995775", "0.6197409", "0.61794776", "0.6083557", "0.60832787", "0.604703", "0.5993531", "0.59775907", "0.5958983", "0.594676...
0.6650724
4
Lay doi tuong JSON bang duong dan ten ten moi node luu trong doi tuong danh sach
public static JsonElement getElementByPath(JsonObject root, List<String> list, JsonElement[] parent){ JsonElement ret = root; int i = 0; String s; try{ do{ if(i == list.size()){ return ret; } s = list.get(i++); if(parent != null){ parent[0] = ret; } ret = ((JsonObject)ret).get(s); if(ret == null || ret.isJsonNull()){ return null; } else if(ret.isJsonPrimitive()){ if(i < (list.size() - 1)){ return null; } else{ s = list.get(i); String str = ret.getAsString(); if(s.equals(str)){ return ret; } else{ return null; } } } else if (ret.isJsonArray()){ // tao lap duong dan con List<String> l = new ArrayList<>(); int j; for(j = i; j < list.size(); j++){ l.add(list.get(j)); } // tim kiem bat ky doi tuong con nao thao man JsonArray arr = (JsonArray)ret; boolean bFound = false; for(j = 0; j < arr.size(); j++){ ret = arr.get(j); ret = getElementByPath((JsonObject)ret, l, parent); if(ret != null){ bFound = true; break; } } if(!bFound){ ret = null; } return ret; } } while(true); } catch(Exception ex){ return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void leerCabezeraJson(JSONObject node){\n if( !REQUEST_STR.contentEquals(node.getString(NODE_TYPE_STR) ) ){\n throw new RuntimeException(Mensajes.ERR_FIRMA_JSON);\n }\n try{\n setScope(node.getString(REQUEST_SCOPE_STR));\n setIdentity(node.getString(REQ...
[ "0.60391253", "0.599151", "0.5955325", "0.5909354", "0.5875587", "0.5824895", "0.5757651", "0.57321656", "0.5705164", "0.5700233", "0.5684058", "0.5684058", "0.5684058", "0.5653676", "0.56401175", "0.561648", "0.5577033", "0.5567359", "0.5562254", "0.5545487", "0.55416083", ...
0.0
-1
TODO Autogenerated method stub
@Override public ImageIcon getFrameIcon() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void 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
The constructor for the EventTimeline that takes in a location and dimension.
public EventTimeline(Location location, Dimensions dimension) { super(location, dimension); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public EventTimeline(int x, int y, int width, int height) {\n this(new Location(x, y), new Dimensions(width, height));\n }", "public EventTimeline() {\n this(0, 0, 91, 9);\n }", "public Event(String title, String location,\n LocalDateTime datetime, int duration, int eventCap...
[ "0.7683685", "0.67677087", "0.6350119", "0.6007887", "0.55904305", "0.54256374", "0.53600407", "0.5339171", "0.5336453", "0.5187967", "0.5180346", "0.5168462", "0.5136544", "0.51055306", "0.5083074", "0.5081945", "0.50796247", "0.506751", "0.50545025", "0.50373214", "0.502499...
0.8735746
0
The constructor for the EventStream that takes in a x / y and width / height.
public EventTimeline(int x, int y, int width, int height) { this(new Location(x, y), new Dimensions(width, height)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Stone(int x, int y, int width, int height) {\n\t\tsuper(x, y, width, height);\n\t\t\n\t}", "public Shape(int x, int y, int deltaX, int deltaY, int width, int height) {\n\t\t_x = x;\n\t\t_y = y;\n\t\t_deltaX = deltaX;\n\t\t_deltaY = deltaY;\n\t\t_width = width;\n\t\t_height = height;\n\t}", "public Canva...
[ "0.6016591", "0.5953955", "0.5939091", "0.5930463", "0.59299445", "0.59133214", "0.5883002", "0.5791808", "0.5781791", "0.57809174", "0.57708955", "0.57164586", "0.56636924", "0.5638272", "0.5603732", "0.55674165", "0.55572325", "0.5556725", "0.5548672", "0.5535601", "0.55269...
0.7441999
0
Private constructor used for deserialization. Set in the top left corner of the board with the default dimensions.
public EventTimeline() { this(0, 0, 91, 9); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Board() {\n\t\tswitch (Board.boardType) {\n\t\tcase Tiny:\n\t\t\tthis.dimensions = TinyBoard; break;\n\t\tcase Giant:\n\t\t\tthis.dimensions = GiantBoard; break;\n\t\tdefault:\n\t\t\tthis.dimensions = StandardBoard; break;\n\t\t}\n\t\tboard = new Square[dimensions.x][dimensions.y];\n\t\tinit();\n\t}", "public Bo...
[ "0.78086543", "0.74905634", "0.7490009", "0.74812275", "0.73758745", "0.7334863", "0.72188264", "0.718872", "0.71499294", "0.7125397", "0.7000072", "0.6958052", "0.69469726", "0.69466686", "0.68790203", "0.68420243", "0.6827247", "0.6821515", "0.67661345", "0.6716351", "0.671...
0.0
-1
The getter for the EventTimeline's query which will fuel the EventTimeline..
@JsonIgnore public String getQuery() { return _query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Timeline getTimeline() { return this.timeline; }", "public Timeline getTimeline() {\n return this.timeline;\n }", "public RMTimeline getTimeline() { return getTimeline(false); }", "public Timeline getTimeline(){\n return null;\n }", "public HashMap<String/* concept path */, List...
[ "0.65798044", "0.64662075", "0.6427115", "0.6157067", "0.6074588", "0.59795976", "0.58332366", "0.57123554", "0.55521107", "0.5550583", "0.55473703", "0.5523594", "0.5479448", "0.5452918", "0.5449252", "0.543731", "0.5434324", "0.54273075", "0.54211336", "0.53780377", "0.5377...
0.52112955
33
The setter for the EventTimeline's query which will fuel the EventStream..
public void setQuery(String query) { _query = checkNotNull(query, "query is null"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void setQueryFilter(CalendarFilter filter) {\n this.queryFilter = filter;\n }", "public void setQuery(DatabaseQuery query) {\n this.query = query;\n }", "public void setQuery (Query q)\n\t throws IllegalStateException,\n\t QueryParseExce...
[ "0.61948955", "0.58675677", "0.58484477", "0.5722281", "0.57086605", "0.56686157", "0.564198", "0.55938137", "0.55938137", "0.5585006", "0.5515529", "0.5494287", "0.5491283", "0.54717684", "0.54377276", "0.54315126", "0.5412096", "0.5397708", "0.53930515", "0.5358391", "0.533...
0.5706476
5
load the first page of results
void load(Request req);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract PaginatedResult<T> first() throws AblyException;", "@Override\n\tpublic void onLoadMore() {\n\t\tpage++;\n\t\texecutorService.submit(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\ttry {\n\t\t\t\t\tgetResultByKeyword(page);\n\t\t...
[ "0.6906001", "0.67819065", "0.67812943", "0.65648437", "0.65571666", "0.6486111", "0.6442348", "0.63608086", "0.6318835", "0.6259402", "0.62323505", "0.62313", "0.6221363", "0.6163371", "0.61616164", "0.6124779", "0.6082857", "0.6064367", "0.606058", "0.60414654", "0.6036196"...
0.0
-1
a single callback can be attached, if needed
void setCallback(IResponseCallback<WalletDataDecl.ListResultTmpl<Response>> cb);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void callback() {\n }", "@Override\n\tpublic void onCallback() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void callbackCall() {\n\t\t\t}", "public void callback();", "@Override\n\tpublic void callback() {\n\t}", "@Override\n\t\t\t\t\t\t\t\t\tpublic void callback(int position) {\n\n\t\t\t\t\t\t\t\t...
[ "0.68971276", "0.6819867", "0.6737128", "0.6676657", "0.66201717", "0.64985555", "0.6394053", "0.6324237", "0.6184731", "0.6179281", "0.6050341", "0.60147065", "0.6002642", "0.5981946", "0.5976388", "0.5944225", "0.5932017", "0.592483", "0.59212667", "0.5889826", "0.58743083"...
0.0
-1
observe to read results
LiveData<WalletDataDecl.ListResultTmpl<Response>> results();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getDataFromDb() {\n viewModel.getCachedResults().observe(getViewLifecycleOwner(), searchResults -> {\n// Log.d(TAG, \"queryMusic: \" + new GsonBuilder().create().toJson(searchResults));\n\n //Checks if results is empty, will show the empty message if it do else, clears the...
[ "0.66883194", "0.6140722", "0.61180925", "0.60553825", "0.60400796", "0.5947948", "0.58842087", "0.58746773", "0.5850556", "0.58263814", "0.5808916", "0.57531023", "0.5730609", "0.5729364", "0.5719769", "0.569306", "0.5689725", "0.5689725", "0.5677713", "0.566181", "0.5660822...
0.5369232
51
observe to read errors, including TX_INVALID which means data set was invalidated and now reset+load must be executed to update the data (preferable w/ req.page.aroundId set near the previously observed page)
LiveData<WalletData.Error> error();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private synchronized void evictPage() throws DbException {\n // some code goes here\n // not necessary for proj1\n //flush the page first, which is the end node\n // System.out.println(\"In evict head \" + head + \" end \"+end);\n // Node evictedNode = end;\n\n // Page re...
[ "0.55234975", "0.54882437", "0.53816015", "0.5276027", "0.5225344", "0.51247627", "0.5116413", "0.50001884", "0.49915522", "0.49656743", "0.49419427", "0.493622", "0.49214652", "0.48935637", "0.48932973", "0.4890469", "0.48842958", "0.4867193", "0.48486018", "0.48378116", "0....
0.0
-1
reset list to allow for new 'load' call
void reset();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void loadLists() {\n }", "private void loadLists() {\n loadSavedCourses();\n loadSavedSchedules();\n }", "public void reset() {\n this.list.clear();\n }", "public void reset() {\n //mLoader.reset();\n start();\n }", "@Override \n\t protected void onReset(...
[ "0.73393893", "0.68796676", "0.67387843", "0.6704811", "0.66749257", "0.66749257", "0.6665834", "0.6632815", "0.65794927", "0.6532871", "0.65315986", "0.65259904", "0.6522073", "0.6518342", "0.6513067", "0.65067464", "0.65042406", "0.6497166", "0.6450048", "0.6449635", "0.644...
0.0
-1
call to release reader resources
void destroy();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void closeResources() {\n try {\n if (inputStream != null) {\n inputStream.close();\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n\n try {\n if (inputStreamReader != null) {\n inputSt...
[ "0.7470349", "0.74378604", "0.7259103", "0.72487825", "0.7147514", "0.7054441", "0.7006282", "0.6898385", "0.6836268", "0.67971617", "0.6796081", "0.6757825", "0.67243546", "0.67110044", "0.67076945", "0.66747475", "0.6648764", "0.6646533", "0.6641031", "0.6632692", "0.661280...
0.0
-1
to integrate w/ AndroidPaging library, create a Pager, after that the ListData object itself should not be used, as Pager will submit it's own requests and a callback.
IPager createPager(PagedList.Config config);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "LiveData<PagedList<Response>> pagedList();", "private void pagination(){\n recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {\n @Override\n public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {\n super.onScrollStateCha...
[ "0.6622916", "0.6463742", "0.64228123", "0.63610834", "0.63082856", "0.6173725", "0.6166341", "0.61479974", "0.6124236", "0.6077748", "0.6065351", "0.60600626", "0.6056318", "0.6045697", "0.6037454", "0.6001522", "0.6001522", "0.6001522", "0.5999334", "0.597815", "0.5952435",...
0.7427808
0
observe new PagedLists and submit them to Adapter
LiveData<PagedList<Response>> pagedList();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void paginate() {\n List<ItemModel> old = adapter.getItems();\n List<ItemModel> New = new ArrayList<>(addList());\n CardStackCallback callback = new CardStackCallback(old, New);\n DiffUtil.DiffResult result = DiffUtil.calculateDiff(callback);\n adapter.setItems(New);\n ...
[ "0.7216349", "0.69829756", "0.6847604", "0.6724387", "0.6716962", "0.6642826", "0.64882606", "0.6359695", "0.6336479", "0.6322234", "0.6273398", "0.6273398", "0.6222075", "0.61945426", "0.619144", "0.61872965", "0.6142674", "0.6127696", "0.61096865", "0.61036605", "0.610182",...
0.68971884
2
set request that will be used to retrieve all pages
void setRequest(Request req);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getMall(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}", "void startPage(RequestContextHolder request);", "@Override\r\n\tpublic void setServletRequest(HttpServletRequest request) {\n\t this.request = request;\r\n\t}", "void setPageSize(DriveRequest<?> request, Integer...
[ "0.63901067", "0.63346946", "0.6311434", "0.6278571", "0.62619656", "0.62395227", "0.62269425", "0.6200821", "0.6180123", "0.6180123", "0.6180123", "0.61652035", "0.61566687", "0.61447465", "0.60789007", "0.6058626", "0.60451233", "0.601836", "0.5992029", "0.59807783", "0.595...
0.62676454
4
force the list to refresh
void invalidate();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void refreshList() {\n }", "public void reload(){\n populateList();\n }", "private void refreshList() {\n\n Requester.getInstance().cancelPendingRequests(BrowseCoursesNew.TAG);\n mWishListAdapter.clearData();\n\n refreshView();\n\n wishCourses = ne...
[ "0.8701888", "0.81662416", "0.78408074", "0.78355646", "0.77552587", "0.7728528", "0.76058733", "0.7605174", "0.7569975", "0.7564908", "0.7550703", "0.7547434", "0.75163454", "0.7515021", "0.7510637", "0.7488412", "0.7465492", "0.7421065", "0.7419876", "0.7405582", "0.7398656...
0.0
-1
Method for reaading the file lines and saving in the ArrayList
public void readFile(String filePath) { File file = new File(filePath); try { Scanner sc = new Scanner(file); while(sc.hasNextLine() ) { String line = sc.nextLine(); linesArray.add( line.split(",") ); } } catch (FileNotFoundException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ArrayList<String> saveText(){\n FileReader loadDetails = null;\n String record;\n record = null;\n\n //Create an ArrayList to store the lines from text file\n ArrayList<String> lineKeeper = new ArrayList<String>();\n\n try{\n loadDetails=new FileReader(\"empl...
[ "0.7339153", "0.6617433", "0.6520455", "0.6489618", "0.6337725", "0.6299403", "0.62544054", "0.61610925", "0.6151345", "0.61283267", "0.6117058", "0.60672635", "0.60587907", "0.6046191", "0.60350406", "0.6003925", "0.5986333", "0.59759", "0.59414005", "0.59316295", "0.5894406...
0.53565156
93
Print the file content
public void printFile() { for(String[] line_i: linesArray) { System.out.println( Arrays.toString(line_i) ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void printFile(String path) {\n try {\n String[] readFileOutPut = readFile(path);\n for (int i = 0; i < readFileOutPut.length;i++) System.out.println(readFileOutPut[i]);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void printData() {\...
[ "0.76127094", "0.7048522", "0.7038998", "0.67769504", "0.64824075", "0.64471936", "0.6423134", "0.6403491", "0.63038695", "0.6291556", "0.62555635", "0.62507915", "0.6248937", "0.6236012", "0.61393213", "0.6118932", "0.60672605", "0.60596967", "0.6020744", "0.6003052", "0.598...
0.7453442
1
Find duplicates using Set (in O(n) time), ref:
public ArrayList<String> findDuplicates(String[] column) { HashSet<String> columnEntries = new HashSet<String>(); ArrayList<String> duplicates = new ArrayList<String>(); for(int row = 0; row < column.length; ++row) { if(!columnEntries.add(column[row]) && !column[row].isBlank()){ System.out.println("Duplicate: " + column[row]); duplicates.add(column[row]); } } return duplicates; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void findDuplicate()\n\t{\n\n\t\tList<String> oList = null;\n\t\tSet<String> oSet = null;\n\t\ttry {\n\t\t\toList = new ArrayList<String>();\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\toList.add(\"Frog\");\n\t\t\toList.add(\"Dog\");\n\t\t\toList.add(\"Eagle\");\n\t\t\toList.add(\"Frog\");...
[ "0.761526", "0.7154552", "0.69774556", "0.6945964", "0.6931992", "0.6734415", "0.66986006", "0.66518116", "0.6614402", "0.6607473", "0.6432785", "0.6409088", "0.64013785", "0.63619196", "0.63403124", "0.6325673", "0.62955296", "0.62667215", "0.6231557", "0.6219123", "0.619307...
0.0
-1
Check the column with OS type and count students that want to work on Android
public void worksWithAndroid() { System.out.println( "\nTASK [3]> The number of students that will work with an Android app:\n"); String [] namesColOne = columns.get(1); String [] namesColTwo = columns.get(2); String [] osType = columns.get(5); int count = 0; for(int i = 0; i < osType.length; ++i) { if( Objects.equals(osType[i], "Android App") ) { System.out.println( "[Names #1]: " + namesColOne[i] + " [Names #2]: " + namesColTwo[i]); ++count; } } int total = count * 2; System.out.println( "\nResult (both columns): " + total); System.out.println( "----------------------------------------------------"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getLocationTypeCount(){\n\t\tString countQuery = \"SELECT * FROM \" + table_locationType;\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tCursor cursor = db.rawQuery(countQuery, null);\n\t\tint count = cursor.getCount();\n\t\tdb.close();\n\t\treturn count;\n\t}", "public int getNumberOfStude...
[ "0.5728353", "0.5710228", "0.56543255", "0.5600694", "0.54657584", "0.54271406", "0.532434", "0.52545995", "0.52545995", "0.52545995", "0.52180237", "0.52058583", "0.5200879", "0.51540875", "0.513676", "0.51222616", "0.5059608", "0.5050754", "0.5026459", "0.50183284", "0.5013...
0.75446784
0
Matching names with emails
public void sortNames() { System.out.println( "\nTASK [4]> Match names with e-mails, check for duplicate e-mails: \n"); // Adding all names / e-mails to ArrayLists, avoiding blank lines ArrayList<String> allNames = new ArrayList<String>(); ArrayList<String> allEmails = new ArrayList<String>(); for(int col = 1; col < 3; ++col) { String[] namesCol = columns.get(col); String[] emailsCol = columns.get(col + 2); // omit the first row with col. names for(int row = 1; row < namesCol.length; ++row) { if(!namesCol[ row ].isBlank()) { allNames.add( namesCol[ row ] ); allEmails.add( emailsCol[ row ]); } } } System.out.println("Names, e-mails (both columns): \n"); for(int row = 0; row < allNames.size(); ++row) { System.out.print( allNames.get(row) + " " + allEmails.get(row) + "\n"); } // checking for duplicates String[] emails = allEmails.toArray( new String[ allEmails.size() ] ); ArrayList<String> duplEmails = this.findDuplicates( emails ); System.out.println("\nStudents with same emails: \n"); for(int dupl = 0; dupl < duplEmails.size(); ++ dupl) { String duplicate_i = duplEmails.get(dupl); for(int row = 0; row < allEmails.size(); ++ row) { if(Objects.equals(allEmails.get(row), duplicate_i ) ) { System.out.println(allNames.get(row) + " : " + duplicate_i); } } } System.out.println( "----------------------------------------------------"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean findEmail(String email);", "public ArrayList<AddressEntry> searchByEmail(String text) {\r\n ArrayList<AddressEntry> textMatches = new ArrayList<AddressEntry>();\r\n text = text.toLowerCase();\r\n for (AddressEntry current : contacts) {\r\n String currentname = current.getEmail().toLo...
[ "0.68858486", "0.6766492", "0.6708015", "0.6657686", "0.66105", "0.6459815", "0.6298337", "0.62569004", "0.6215219", "0.6159905", "0.6127737", "0.6086025", "0.6007161", "0.59640414", "0.59351236", "0.5924817", "0.591282", "0.58472973", "0.58428675", "0.5839412", "0.5830183", ...
0.5844538
18