query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
get which fragment is the current fragment in container
public Fragment getCurrentFragment() { return getFragmentInContainer(R.id.fragmentFrameContainer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BaseFragment getCurrentFragment() {\n return (BaseFragment) getSupportFragmentManager().findFragmentById(R.id.mFrameContainer);\n }", "public int getRootFragmentContainerId();", "public d getCurrentBaseFragment() {\n Fragment findFragmentById = getFragmentManager().findFragmentById(1690...
[ "0.700908", "0.69610703", "0.69229764", "0.6788052", "0.6776136", "0.67347366", "0.6634849", "0.6626608", "0.65731996", "0.6528772", "0.6443552", "0.6426035", "0.6399727", "0.6330918", "0.62417495", "0.6176046", "0.61646616", "0.61096436", "0.6107607", "0.6104439", "0.6089281...
0.7274811
0
repace or add fragment
public void setCurrentFragment(Fragment fragment, boolean toAdd, boolean addToBackStack, int enterAnim, int exitAnim, int popEnterAnim, int popExitAnim, boolean clearBackStack) { replaceContentFragment(getSupportFragmentManager(), fragment, toAdd, R.id.fragmentFrameContainer, enterAnim, exitAnim, popEnterAnim, popExitAnim, addToBackStack); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void fragment(String fragment);", "void fragment(String fragment);", "private void addFragments() {\n\n Fragment f = SideFilterFragment.newInstance();\n getFragmentManager().beginTransaction().replace(R.id.side_filter_container, f).commit();\n }", "public void insert(int index, String fragme...
[ "0.71182245", "0.71182245", "0.68694806", "0.6861756", "0.6847571", "0.68208367", "0.6789593", "0.6774213", "0.6727752", "0.6595742", "0.6573383", "0.6567912", "0.6532175", "0.6506157", "0.6477049", "0.6461131", "0.6447214", "0.6430974", "0.64296997", "0.63976127", "0.6386239...
0.0
-1
Sets the String id of the Post that this Comment is for.
public void setPostId(Post postId) { put(KEY_POST_ID, postId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setPostId(int postId);", "public void setPostId(long postId);", "public void setPostId(Integer postId) {\n this.postId = postId;\n }", "public void setPostId(int postId) {\r\n\t\tthis.postId = postId;\r\n\t}", "public void setPostId(int postId) {\n\t\tthis.postId = postId;\n\t}", "@Overrid...
[ "0.74239415", "0.6992483", "0.6783548", "0.6666096", "0.66117984", "0.657193", "0.64541316", "0.64541316", "0.63597584", "0.63549405", "0.6353907", "0.6296821", "0.62790745", "0.62635297", "0.6239764", "0.6239764", "0.6236815", "0.6231541", "0.62285095", "0.62210715", "0.6220...
0.71804065
1
Returns a list of all nodes in this graph, ordered by the ascending Z depth.
public List<SpriteGraphNodeInstance> getZOrderedFlatList(Comparator<SpriteGraphNodeInstance> comparator) { if (!mOrdered) { mFlatNodes.sort(comparator); mOrdered = true; } return mFlatNodes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Node> getNodes() {\n List<Node> list = getNodes(false, false);\n return list;\n }", "List<Node> getNodes();", "public List<Node> getNodes();", "public List<INode> getAllNodes();", "public Set<Node<E>> getNodes(){\n return nodes.keySet();\n }", "public Set<String> ge...
[ "0.7467425", "0.71164554", "0.7105576", "0.6928236", "0.6918516", "0.69065344", "0.6888354", "0.6847581", "0.68365484", "0.67548174", "0.6721201", "0.6720811", "0.67193216", "0.66947937", "0.6659037", "0.6590448", "0.658673", "0.6578945", "0.6555117", "0.6530699", "0.6501219"...
0.0
-1
////////////////////////////////////////////////////////////////// Event handlers. //////////////////////////////////////////////////////////////////
public void startElement (String uri, String name, String qName, Attributes atts) { if(name.equals("manager")) { baseAddress = atts.getValue("domainAddress"); } else if(name.equals("topic")) { Topic t = new Topic(); t.setName(atts.getValue("name")); t.setTypeID(atts.getValue("type")); t.setPort(Integer.parseInt(atts.getValue("portID"))); t.setDomainAddress(baseAddress); try { t.setReplyPort(Integer.parseInt(atts.getValue("replyPortID"))); } catch (NumberFormatException ex) { //ex.printStackTrace(); } catch (NullPointerException ex) { } topics.add(t); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "@Override...
[ "0.79772013", "0.79772013", "0.7787203", "0.7787203", "0.7787203", "0.7787203", "0.7787203", "0.7741414", "0.7741414", "0.7741414", "0.77311534", "0.7699535", "0.7630852", "0.7461109", "0.73649746", "0.7289308", "0.7133302", "0.7104118", "0.70721215", "0.70721215", "0.7058717...
0.0
-1
don't new this up in a draw method
public void drawTextCentred(Canvas canvas, Paint paint, String text, float cx, float cy) { setTextSizeForWidth(paint, text, mTextWidth); paint.setTextSize(32f); paint.getTextBounds(text, 0, text.length(), textBounds); canvas.drawText(text, cx - textBounds.exactCenterX(), cy - textBounds.exactCenterY(), paint); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\r\n ...
[ "0.77435267", "0.77435267", "0.7724814", "0.7724814", "0.7642813", "0.7642813", "0.76334363", "0.76304364", "0.75940424", "0.7582757", "0.7266331", "0.7266331", "0.7170863", "0.7155928", "0.7145294", "0.71449625", "0.7105626", "0.70940083", "0.70737404", "0.7068478", "0.70589...
0.0
-1
Sets the text size for a Paint object so a given string of text will be a given width.
private static void setTextSizeForWidth(Paint paint, String text, float desiredWidth) { // Pick a reasonably large value for the test. Larger values produce // more accurate results, but may cause problems with hardware // acceleration. But there are workarounds for that, too; refer to // http://stackoverflow.com/questions/6253528/font-size-too-large-to-fit-in-cache final float defaultTextSize = 44f; paint.setTextSize(defaultTextSize); Rect textBounds = new Rect(); paint.getTextBounds(text, 0, text.length(), textBounds); // Calculate the desired size as a proportion of our testTextSize. if (textBounds.width() > desiredWidth) { float desiredTextSize = defaultTextSize * (desiredWidth / textBounds.width()); // Set the paint for that size. paint.setTextSize(desiredTextSize); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTextSize(float textSize){\n Context context = getContext();\n Resources res;\n\n if(context == null){\n res = Resources.getSystem();\n }else{\n res = context.getResources();\n }\n\n setTextSizePx(TypedValue.applyDimension(TypedValue.COM...
[ "0.75628656", "0.7524223", "0.70956826", "0.6899523", "0.6815246", "0.6622125", "0.6556834", "0.6508939", "0.64888674", "0.6448559", "0.64206725", "0.63915074", "0.6308614", "0.61636597", "0.61475635", "0.609652", "0.6085444", "0.60748374", "0.60732687", "0.60523885", "0.6051...
0.7566968
0
writeStats method saving player's stats using arraylist and string
public static void writeStats(String result, List<Integer> list) { for(int number : list) { result = result + " " + number + " "; } statsList.add(result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void savePlayerData() throws IOException{\n\t\t/*\n\t\t\tFile playerData = new File(\"Players/\" + Player.getName() +\".txt\");\n\t\t\tif (!playerData.exists()) {\n\t\t\t\tplayerData.createNewFile(); \n\t\t\t}\n\t\tObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(\"Players/\" + Player.ge...
[ "0.72440314", "0.71149856", "0.67953116", "0.67617846", "0.6669181", "0.6639984", "0.6607277", "0.6474439", "0.6450093", "0.6407436", "0.6399812", "0.6398785", "0.6397891", "0.6387956", "0.63653725", "0.6352332", "0.63486844", "0.63362384", "0.63147485", "0.6251751", "0.62479...
0.63366604
17
showStats method show players stats with result
public static void showStats() { List<String> stats = statsList.subList(Math.max(statsList.size() - 3, 0), statsList.size()); System.out.println("Stats:"); for(String stat : stats){ System.out.println(stat); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printAllPlayerStats(List<Player> players);", "public void printPlayerStats(PlayerStats statistics) {\r\n\t\tSystem.out.print(statistics.playerStatsToString());\r\n\t}", "public void printPlayerStat(Player player);", "private static void displayPlayerStats(Object[] stats, String[] helmetSlot, Stri...
[ "0.7488214", "0.7347457", "0.7173626", "0.71364766", "0.70912486", "0.700494", "0.6988932", "0.6942229", "0.69186705", "0.68688416", "0.6735086", "0.6663826", "0.6662481", "0.66577494", "0.6618615", "0.66099983", "0.6589199", "0.65848887", "0.6551093", "0.6493212", "0.6453975...
0.727349
2
set focus traversable to true, this lets the user tab to this component.
public boolean isFocusable() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void focus() {}", "@Override\r\n\tpublic void focus() {\r\n\t\tactivate();\r\n\t\ttoFront();\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void setFocus() {\r\n\t}", "public void setFocus();", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Overrid...
[ "0.71171546", "0.7089689", "0.68360096", "0.68341845", "0.68233985", "0.6821452", "0.6821452", "0.6821452", "0.6821452", "0.6821452", "0.6801993", "0.68007165", "0.68007165", "0.68007165", "0.68007165", "0.67866975", "0.67819023", "0.6778917", "0.6748246", "0.6733702", "0.673...
0.66294533
32
set font size to be equal as the player size
protected void setFont(Graphics2D g2, int space, int minFontSize) { boolean fontFits = false; Font font = g2.getFont(); FontMetrics fontMetrics = g2.getFontMetrics(); int size = font.getSize(); String name = font.getName(); int style = font.getStyle(); while (!fontFits) { if (fontMetrics.getHeight() <= space) { fontFits = true; } else { if (size <= minFontSize) { fontFits = true; } else { g2.setFont(font = new Font(name, style, --size)); fontMetrics = g2.getFontMetrics(); } } } return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void changeFontSize(int i) {\n lyricsTV.setTextSize((float) i);\n PreferencesManager pm = PreferencesManager.getInstance();\n pm.setFontSize(i);\n }", "public void setDisplayFont(int size){\n\t\tscreen.setFont(new Font(\"Serif\",Font.BOLD,size));\r\n\t}", "public v...
[ "0.7018466", "0.69654745", "0.69343436", "0.68234706", "0.6774161", "0.6761184", "0.6668455", "0.66195875", "0.661749", "0.65817785", "0.6581506", "0.65401876", "0.65365136", "0.65297616", "0.6462595", "0.6450314", "0.6441289", "0.64236134", "0.6374524", "0.63619494", "0.6350...
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.6862...
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ...
[ "0.79033595", "0.7804288", "0.7765498", "0.77259207", "0.76304305", "0.7621137", "0.75833404", "0.7529789", "0.7487063", "0.74565315", "0.74565315", "0.7437683", "0.7421245", "0.7402311", "0.7390894", "0.7386079", "0.737815", "0.7369255", "0.736113", "0.735479", "0.7344447", ...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { DBConnectionMgr dbMgr = DBConnectionMgr.getInstance(); DeptDao dd = new DeptDao(); dbMgr.getConnection(); dd.selectALL(); }
{ "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
/ A neighbour sending its routing table to a node in order to share its current knowledge of the network
public boolean exchangeDistances(Node node, Node neighbour, boolean hasUpdate, boolean splitHorizon) { int cost = node.getDistanceVector().get(neighbour); int currentBest; // current best distance to a node in the network int offeredBest; // best distance offered by the neighbour for (Node n : neighbour.getDistanceVector().keySet()) { currentBest = node.getDistanceVector().get(n); offeredBest = neighbour.getDistanceVector().get(n) + cost; if (currentBest > offeredBest && offeredBest > 0) { // split horizon execution if (splitHorizon && !neighbour.getForwardingTable().get(n).getName().equals(node.getName())) { node.getDistanceVector().put(n, offeredBest); node.getForwardingTable().put(n, neighbour); hasUpdate = true; } else { // standard DVR node.getDistanceVector().put(n, offeredBest); node.getForwardingTable().put(n, neighbour); hasUpdate = true; // System.out.println(node.getName() + " updated its // distance to " + n.getName() + " to " + offeredBest + " // via " + neighbour.getName()); } } } return hasUpdate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void send()\n {\n\n\tRouterPacket pkt;\n if(poisonEnabled){\n\t // Create a false distance table\n int[] tmpDistTable = new int[RouterSimulator.NUM_NODES];\n System.arraycopy(myDistTable,0,tmpDistTable,0,RouterSimulator.NUM_NODES);\n for(int i = 0;i<neighbours....
[ "0.6940367", "0.68384385", "0.6433735", "0.6188536", "0.6182862", "0.60880375", "0.60843223", "0.60729414", "0.6071959", "0.59537154", "0.5948067", "0.59183395", "0.5912761", "0.58617955", "0.58247656", "0.5788267", "0.57826084", "0.5762599", "0.5761503", "0.5742198", "0.5712...
0.0
-1
/ Apply the algorithm for a specific number of iterations
public void iterate(HashMap<String, Node> nodes, int iterations, boolean trace, ArrayList<Node> nodesSet) { for (int i = 1; i <= iterations; i++) { for (Node n : nodes.values()) { ArrayList<Node> neighbours = n.getNeighbours(); for (Node node : neighbours) { this.exchangeDistances(n, node, true, false); } } // print details for a custom node set if tracing is on if (trace && nodesSet != null) { for (Node node : nodesSet) { System.out.println("Node " + node.getName() + " at iteration " + i + ": "); node.printRoutingTable(); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getIterations();", "void iterate( int numberOfDocs, int maxIterations ) {\r\n double[] x = new double[numberOfDocs];\r\n double[] xPrime = new double[numberOfDocs]; xPrime[0] = 1;\r\n int numIteration = 0;\r\n while (!diffLessThanEpsilon(x, xPrime) && numIteration < maxIterations)...
[ "0.6731819", "0.6267503", "0.6209739", "0.6204473", "0.61470824", "0.61441964", "0.61430794", "0.6131222", "0.612107", "0.6111382", "0.61093897", "0.60912573", "0.60442716", "0.6026359", "0.60221505", "0.6007342", "0.59735394", "0.5933906", "0.59238654", "0.59197116", "0.5892...
0.0
-1
/ Execute the DVR algorithm until convergence
public void converge(HashMap<String, Node> nodes, boolean splitHorizon) { int i = 1; boolean linkUpdate = false; boolean hasUpdate = false; while (true) { // System.out.println("Iteration " + i); // update any incorrect links for (Node n : nodes.values()) { linkUpdate = n.checkLinks(nodes); } // exchange information from neighbour to neighbour for (Node n : nodes.values()) { ArrayList<Node> neighbours = n.getNeighbours(); for (Node node : neighbours) { hasUpdate = this.exchangeDistances(n, node, hasUpdate, splitHorizon); } } // if no new updates, the network has converged if (!hasUpdate && !linkUpdate) { break; } // avoid count to infinity problem if split horizon has been // activated if (!hasUpdate && linkUpdate && splitHorizon) { break; } hasUpdate = false; // stop execution if the count to infinity problem has been // encountered if (!splitHorizon && i > 10 && !hasUpdate) { System.out.println("Taking too long to converge..."); break; } i++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void runAlgorithm()\n\t{\n\t\tboolean done = false;\n while (!done)\n {\n switch (step)\n {\n case 1:\n step=stepOne(step);\n break;\n case 2:\n step=stepTwo(step);\n ...
[ "0.6523486", "0.6437068", "0.63944566", "0.6352836", "0.61815435", "0.61784583", "0.610698", "0.61008877", "0.60562086", "0.605286", "0.60216355", "0.6004237", "0.59815305", "0.59490746", "0.5945702", "0.5933726", "0.5928147", "0.5915611", "0.5913177", "0.59096485", "0.587779...
0.0
-1
/ Track the best route from a source to a destination
public void findBestRoute(Node src, Node dst) { ArrayList<Node> route = new ArrayList<>(); Node curr = src; while (!curr.getName().equals(dst.getName())) { curr = curr.getForwardingTable().get(dst); route.add(curr); } System.out.print("Best route so far is: "); for (Node node : route) { System.out.print(node.getName() + " "); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void processDetect(String destinationIP) {\n WeightedGraph graph = WeightedGraph.createFromLSD(this.routerDesc, this.lsd);\n WeightedGraph.Vertex root = graph.getVertex(this.routerDesc.simulatedIPAddress);\n WeightedGraph.Vertex target = graph.getVertex(destinationIP);\n\n if(ta...
[ "0.69696164", "0.6723387", "0.65041465", "0.649462", "0.64869463", "0.64685416", "0.6418658", "0.6376217", "0.6360575", "0.6343372", "0.624179", "0.62229973", "0.62121046", "0.62100387", "0.6208173", "0.62045133", "0.6151597", "0.6138397", "0.6087353", "0.6069434", "0.6064151...
0.7407562
0
/ Fail a specific link between two nodes in the network
public void failLink(Node n1, Node n2) { n1.getDistanceVector().put(n2, Integer.MAX_VALUE); n2.getDistanceVector().put(n1, Integer.MAX_VALUE); n1.getForwardingTable().put(n2, null); n2.getForwardingTable().put(n1, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void linkFailed(Mtp2 link) {\n linkset.remove(link);\n \n //restart initial alignment after T17 expires\n link.failLink();\n \n //notify mtp user part\n if (!linkset.isActive() ) {\n \tl4IsUp = false;\n \tif(mtpUser != null)\n \t{\n \t\...
[ "0.6568132", "0.6072493", "0.59869653", "0.59828216", "0.59185946", "0.5917072", "0.5883362", "0.5851464", "0.5842917", "0.58123314", "0.57594395", "0.5683459", "0.56776583", "0.5647066", "0.5624526", "0.5598129", "0.5562463", "0.55364263", "0.55252993", "0.55020857", "0.5482...
0.7903352
0
/ Change the cost of a certain link in the network
public void changeCost(Node n1, Node n2, int cost) { n1.getDistanceVector().put(n2, cost); n2.getDistanceVector().put(n1, cost); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLinkCost(long linkCost) {\n if ((LinkCost - linkCost) > 100) {\n LinkCost = linkCost;\n } else {\n LinkCost = (linkCost*2 + getLinkCost()*8)/10;\n }\n }", "public void forceLinkCost(long linkCost) {\n LinkCost = linkCost;\n }", "public void...
[ "0.7428536", "0.68762916", "0.67884076", "0.6700589", "0.66541487", "0.6614239", "0.6599276", "0.65935564", "0.6340599", "0.6269509", "0.62086624", "0.617704", "0.614789", "0.60475636", "0.6004043", "0.59982413", "0.5995757", "0.5984476", "0.59633505", "0.5948951", "0.5896549...
0.6584787
8
/ Print the routing tables of all nodes in the network
public void printRoutingTables(HashMap<String, Node> nodes) { for (Node node : nodes.values()) { System.out.println("Node " + node.getName() + ":"); node.printRoutingTable(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printTable() {\n\t\tString s = String.format(\"Routing table (%.3f)\\n\"\n\t\t\t\t+ \"%10s %10s %8s %5s %10s \\t path\\n\", now, \"prefix\", \n\t\t\t\t\"timestamp\", \"cost\",\"link\", \"VLD/INVLD\");\n\t\tfor (Route rte : rteTbl) {\n\t\t\ts += String.format(\"%10s %10.3f %8.3f\",\n\t\t\t\t\trte.pfx.to...
[ "0.7858394", "0.76588106", "0.7088602", "0.6844646", "0.6761336", "0.6739269", "0.6648594", "0.6599641", "0.6584565", "0.6581946", "0.6561974", "0.6545855", "0.6501915", "0.64939374", "0.64671683", "0.6444417", "0.6441816", "0.6432178", "0.6427339", "0.6385905", "0.63404477",...
0.80849314
0
assigned to Ignore button
public void advanceInconsistencyList() { inconsistenciesFound.remove(0); possessiveTurn = false; checkingEngine.replaceTextwithList(); typeHere.setText(checkingEngine.getText()); goThroughInconsistencies(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setIgnore() {\n\t\t\tignore = true;\n\t\t}", "private void disableButtons()\r\n {\r\n }", "@Override\n protected void negativeClick() {\n\n }", "public void cancel()\n\t{\n\t\t_buttonHit = true;\n\t}", "public void disableButtons() {\n\t\t\r\n\t\tcapture.setEnabled(false);\r\n...
[ "0.70742995", "0.68872494", "0.66977376", "0.6696712", "0.6679272", "0.6671046", "0.6508554", "0.6473849", "0.6416813", "0.6399985", "0.6370531", "0.6353673", "0.6336588", "0.6308996", "0.63058925", "0.6258532", "0.62276185", "0.6216984", "0.61774063", "0.6169518", "0.6163661...
0.0
-1
Rename does not operate on link targets Do not resolveLink when checking permissions of src and dst Check write access to parent of src
@Deprecated @SuppressWarnings("deprecation") private static boolean renameTo(FSDirectory fsd, FSPermissionChecker pc, String src, String dst, boolean logRetryCache) throws IOException { final INodesInPath srcIIP = fsd.getINodesInPath4Write(src, false); // Note: We should not be doing this. This is move() not renameTo(). final String actualDst = fsd.isDir(dst) ? dst + Path.SEPARATOR + new Path(src).getName() : dst; final INodesInPath dstIIP = fsd.getINodesInPath4Write(actualDst, false); if (fsd.isPermissionEnabled()) { fsd.checkPermission(pc, srcIIP, false, null, FsAction.WRITE, null, null, false); // Check write access to ancestor of dst fsd.checkPermission(pc, dstIIP, false, FsAction.WRITE, null, null, null, false); } if (NameNode.stateChangeLog.isDebugEnabled()) { NameNode.stateChangeLog.debug("DIR* FSDirectory.renameTo: " + src + " to " + dst); } final long mtime = Time.now(); boolean stat = false; fsd.writeLock(); try { stat = unprotectedRenameTo(fsd, src, actualDst, srcIIP, dstIIP, mtime); } finally { fsd.writeUnlock(); } if (stat) { fsd.getEditLog().logRename(src, actualDst, mtime, logRetryCache); return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = SWIFT_TEST_TIMEOUT)\n public void testRenameFileToSelf() throws Throwable {\n if (!renameSupported()) return;\n Path filepath = path(\"test/file\");\n createFile(filepath);\n //HDFS expects rename src, src -> true\n rename(filepath, filepath, true, true, true);\n //verify the fil...
[ "0.6340741", "0.6027258", "0.59873736", "0.5959073", "0.5853283", "0.58417165", "0.58362377", "0.5782541", "0.57773423", "0.57278734", "0.5711694", "0.56709415", "0.5653397", "0.56281346", "0.56128484", "0.5608713", "0.55824167", "0.55617017", "0.5559338", "0.55012417", "0.54...
0.61915475
1
/ Intent edicion=new Intent(este,Modpasmisg1.class); edicion.putExtra("nombre",movie.getTitle()); edicion.putExtra("dias",String.valueOf(movie.getDias())); Log.d("descripcion",movie.getGenre()); edicion.putExtra("descripcion",movie.getGenre()); edicion.putExtra("categoria",String.valueOf(movie.getCategoria())); este.startActivity(edicion);
@Override public void onClick(View view) { final int[] n = {1}; AlertDialog.Builder b = new AlertDialog.Builder(este); Object[] objectList = nombres.toArray(); final String[] types = Arrays.copyOf(objectList,nombres.size(),String[].class); b.setTitle("Seleccione un logro"); b.setItems(types, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); movie.setLogro(numeritos.get(which)); holder.genre.setText(types[which]); moviesList.set(position,movie); //------------------------------------- Toast.makeText(este, "Logro asignado!", Toast.LENGTH_LONG).show(); //------------------------------------- //Log.d("numeritosel",""+nombres.get(which)); } }); b.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n\n Intent i = new Intent(context, DetailActivity.class); //create intent to switch screen\n\n //trying to place movie into putExtra by putting it into Parcelable value (bc method can't take movie object)\n ...
[ "0.7548558", "0.70260864", "0.7013749", "0.7007053", "0.6998899", "0.6972535", "0.6959091", "0.6958349", "0.69111294", "0.68816406", "0.68784785", "0.6876792", "0.6857525", "0.6853623", "0.6851723", "0.6809261", "0.68014073", "0.6733532", "0.67312604", "0.6706823", "0.6702498...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { Dept dept= new Dept(1212, "IT", "Bangalore"); Emp emp = new Emp(1234, "Tarun", 9999999999L, dept); System.out.println(emp); Emp e1=null; try { e1 = (Emp) emp.clone(); } catch (CloneNotSupportedException e) { // TODO Auto-generated catch block e.printStackTrace(); } dept.setLocation("Chennai"); System.out.println(e1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_one_page, menu); //Setting up the Share Action Provider provider = (ShareActionProvider) menu.findItem(R.id.menu_share).getActionProvider(); provider.setShareIntent(getDefaultShareIntent()); return super.onCreateOptionsMenu(menu); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.7246451", "0.7201833", "0.7195169", "0.7176824", "0.71071094", "0.7039687", "0.70379424", "0.7011622", "0.70095545", "0.69799995", "0.6945173", "0.69389343", "0.6933555", "0.69172555", "0.69172555", "0.68906796", "0.688355", "0.687496", "0.6874772", "0.68613136", "0.686131...
0.0
-1
Returns a share intent
private Intent getDefaultShareIntent(){ Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("text/plain"); intent.putExtra(Intent.EXTRA_SUBJECT, "SUBJECT"); intent.putExtra(Intent.EXTRA_TEXT,"Extra Text"); return intent; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void launchShareIntent() {\n Intent sendIntent = new Intent();\n sendIntent.setAction(Intent.ACTION_SEND);\n sendIntent.putExtra(Intent.EXTRA_TEXT, gif.getFullGif().getUrl());\n sendIntent.setType(\"text/plain\");\n startActivity(Intent.createChooser(sendIntent, getString...
[ "0.7427922", "0.73679745", "0.7205719", "0.7123768", "0.7077139", "0.70678097", "0.6950833", "0.69330734", "0.6921537", "0.69116986", "0.6862537", "0.6853816", "0.6827221", "0.68096566", "0.67947775", "0.67947364", "0.6759055", "0.6745723", "0.67358243", "0.67111516", "0.6694...
0.7633931
0
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ...
[ "0.79046476", "0.7805623", "0.7766615", "0.77274555", "0.7632045", "0.76220745", "0.75848633", "0.7531134", "0.74884325", "0.74575055", "0.74575055", "0.74388313", "0.74218154", "0.7403308", "0.7391667", "0.7386889", "0.73792624", "0.73705244", "0.7362704", "0.7355958", "0.73...
0.0
-1
Handle navigation view item clicks here.
@SuppressWarnings("StatementWithEmptyBody") @Override public boolean onNavigationItemSelected(MenuItem item) { int id = item.getItemId(); DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); drawer.closeDrawer(GravityCompat.END); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onNavigationItemClicked(Element element);", "@Override\n public void onClick(View view) { listener.onItemClick(view, getPosition()); }", "void onDialogNavigationItemClicked(Element element);", "@Override\n public void onClick(View view) {\n itemInterface.OnItemClickedListener(tr...
[ "0.78824425", "0.72363925", "0.69870526", "0.69464594", "0.69168895", "0.69168895", "0.6884302", "0.68745536", "0.6868239", "0.6766278", "0.67426", "0.67219543", "0.67180467", "0.67139757", "0.66987735", "0.669814", "0.6680063", "0.66605985", "0.6660478", "0.6647546", "0.6642...
0.0
-1
GirlPhotoFragment fragment = new GirlPhotoFragment(); Bundle bundle = new Bundle(); bundle.putParcelable("girl", mzituVM.getItems().get(position)); fragment.setArguments(bundle); fragment.setStyle(DialogFragment.STYLE_NORMAL, R.style.Dialog_FullScreen); FragmentManager fm = getActivity().getSupportFragmentManager(); fragment.show(fm, "fragment_girl_photo");
@Override public void onItemClick(ItemGirlBinding binding, int position) { MzituGalleryActivity.launch(context, binding.girliv, mzituVM.galleries.get(position)); // GirlPhotoActivity.launch(context, binding.girliv, position, // mzituVM.getItems().get(position)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onItemClick(View view, int position)\n {\n Toast.makeText(context, recyclerDataArrayList.get(position).getTitulo(), Toast.LENGTH_SHORT).show();\n Bundle bundle = new Bundle();\n bundle...
[ "0.6876195", "0.6865329", "0.67228377", "0.6694516", "0.66193396", "0.65531754", "0.653876", "0.6478258", "0.6464067", "0.64451844", "0.644487", "0.64221215", "0.6416856", "0.6379836", "0.63702977", "0.6367413", "0.63004434", "0.62916505", "0.6289624", "0.62877554", "0.628274...
0.60796016
47
adds a tile to the end of the list. based on width left,top coordinates are applied to retrieve them later. this method is used to add a stream of tiles (e.g. reading them from a file).
public Map add(Tile tile) { this.tiles.add(tile); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addTileAtTheEnd(Tile tile);", "public void addTileOnBeginning(Tile tile);", "@Override\n public Map put(Tile tile, int left, int top) {\n // TODO if useful\n int index = getPosition(left, top);\n while (this.tiles.size() <= index) {\n this.tiles.add(null);\n }\n this.tiles.set(...
[ "0.7357597", "0.68050575", "0.6395789", "0.63219243", "0.6285895", "0.600966", "0.59435076", "0.5942685", "0.5922557", "0.57820106", "0.5725761", "0.5695141", "0.5694172", "0.56930614", "0.56244266", "0.56045383", "0.5604149", "0.55949754", "0.5580886", "0.5537626", "0.549051...
0.5572355
19
adds a tile at a given position. left,top 1based
@Override public Map put(Tile tile, int left, int top) { // TODO if useful int index = getPosition(left, top); while (this.tiles.size() <= index) { this.tiles.add(null); } this.tiles.set(index, tile); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addTileOnBeginning(Tile tile);", "public void addTile(Tile tile) {\n ownedTiles.add(tile);\n }", "public void addTileAtTheEnd(Tile tile);", "public void addTile(Tile tile)\r\n\t{\r\n\t\ttiles.add(tile);\r\n\t}", "public void placeTile(Tile t){\n\t\t//System.out.println(t.toString() ...
[ "0.71675783", "0.6922567", "0.6886467", "0.67625326", "0.6614529", "0.65680397", "0.6517071", "0.64876467", "0.64693767", "0.64520085", "0.62920237", "0.6251795", "0.6245192", "0.6199463", "0.618957", "0.61307377", "0.61201274", "0.60973406", "0.607581", "0.60271376", "0.6024...
0.6566261
6
returns a tile at position left, top. first row/column are 1 (one)
@Override public Tile get(int left, int top) { if (left < 1) return null; if (top < 1) return null; int index = getPosition(left, top); if (index >= tiles.size()) { return null; } return this.tiles.get(index); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Tile getPosition();", "public Tile getTileAt(Position p);", "public abstract Tile getTileAt(int x, int y);", "private Tile getTile(int x, int y) {\n\t\tif (x < 0 || x > width || y < 0 || y > height) return Tile.VOID;\n\t\treturn Tile.tiles[tiles[x + y * width]];\n\t}", "private Tile getTileAt(Position p) {...
[ "0.78970164", "0.76461434", "0.7542092", "0.7109627", "0.7041159", "0.7015856", "0.70147353", "0.69497424", "0.692127", "0.6908542", "0.688579", "0.68348056", "0.6833569", "0.6785947", "0.67611355", "0.6755486", "0.6703377", "0.6686074", "0.6636", "0.6623226", "0.6594866", ...
0.7371903
3
Returns the first tile found. This determines the type of the map.
@Override public Tile getFirst() { return tiles.iterator().next(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getTileType();", "public int tileType(){\n\t\treturn this.type;\n\t}", "Tile getTile() {\n if (tiles.size() == 0) {\n return null;\n } else {\n int randomIndex = ThreadLocalRandom.current().nextInt(0, tiles.size());\n Tile result = tiles.get(randomIndex);\n...
[ "0.66865945", "0.66808295", "0.66368437", "0.6579351", "0.6472743", "0.64704746", "0.6468878", "0.64663786", "0.64447665", "0.6312378", "0.6297159", "0.6273668", "0.62660277", "0.62451094", "0.6233404", "0.62226516", "0.620773", "0.6182906", "0.61764836", "0.61751074", "0.613...
0.75351435
0
TODO: this should be separated into a MapDescription class, from which a map can be constructed. returns the positions where a ghost needs to be positioned
public List<Point> getGhostPositions() { throw new RuntimeException("Not Implemented"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Position findWeedPosition() {\n int x = 0;\n int y = 0;\n int sum = 0;\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD...
[ "0.6424462", "0.6217091", "0.617147", "0.60211855", "0.59473515", "0.5900729", "0.58453345", "0.5839647", "0.57929754", "0.5787328", "0.5782771", "0.5773594", "0.57591194", "0.5755999", "0.5750704", "0.5743488", "0.57351184", "0.57118744", "0.5696488", "0.5686312", "0.5686312...
0.6679195
0
returns the position where the pacman needs to be positioned
public Point getPacmanPosition() { throw new RuntimeException("Not Implemented"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Point getPosition();", "Point getPosition();", "public Position findWeedPosition() {\n int x = 0;\n int y = 0;\n int sum = 0;\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hog...
[ "0.70034915", "0.70034915", "0.69621176", "0.6916878", "0.6916878", "0.6897655", "0.68868333", "0.6863933", "0.6805304", "0.6804457", "0.6799835", "0.6784986", "0.6767186", "0.67580783", "0.67580783", "0.67556804", "0.669134", "0.6668253", "0.66247964", "0.6619809", "0.661477...
0.7742671
0
This constructor enables the Speak command.
public Speak() { super( "Speak", "Begin a conversation.", "p" ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SendVoice() {\n super();\n }", "@Override\n\tpublic void canSpeak() {\n\t\t\n\t}", "public SpeakerSerivceImpl() {\n\t\tSystem.out.println(\"No args in constructor\");\n\t}", "public void setSpeakEnable(boolean enable) {\n this.speakEnable = enable;\n if (speakEnable && mSynthes...
[ "0.6715824", "0.63450164", "0.60898167", "0.60533834", "0.59886163", "0.59700745", "0.58531743", "0.5785867", "0.57741606", "0.5710826", "0.5632505", "0.5585723", "0.5583827", "0.5566491", "0.55117214", "0.5506131", "0.5477098", "0.5467421", "0.54633486", "0.5449295", "0.5449...
0.8279296
0
When run, this method will cause the target to initiate their initial dialog.
public void run( Operation operation ) { String[] commands = operation.getinputArray(); GamePlayer player = Engine.currentPlayer(); boolean spoken = false; for ( GameComponent component : Engine.componentList() ) { if ( component instanceof GameSpeaker && component.getName().equalsIgnoreCase( commands[ 2 ] ) && player.getLocation().hasSpeaker( commands[ 2 ], false ) ) { GameSpeaker speaker = ( GameSpeaker ) component; speaker.initiateDialog(); spoken = true; break; } } if ( !spoken ) { IO.add( "There is no " + commands[ 2 ] + " to speak to here." ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initDialog() {\n }", "@Override\n public void onStart() {\n pDialog.show();\n }", "public abstract void initDialog();", "private void initializeUI() {\r\n this.parentFrame = game.getFrame();\r\n parentFrame.setEnabled(false); // D...
[ "0.70838577", "0.6873149", "0.6729812", "0.66379863", "0.6608114", "0.6531713", "0.63745534", "0.63113225", "0.62520266", "0.6197626", "0.6177633", "0.61512405", "0.6117531", "0.61100495", "0.6080092", "0.6057888", "0.60289717", "0.6022541", "0.6011639", "0.59978294", "0.5995...
0.0
-1
cria e executa um delete statemente na tabela artigo
public static void excluir(Integer idArt) throws SQLException{ String delete = "DELETE FROM Artigo WHERE idArt = '" + idArt + "'"; System.out.println("Delete statement: " + delete); Statement statement = dbConnection.createStatement(); statement.executeUpdate(delete); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected String deleteStatement() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic void delete(TQssql sql) {\n\r\n\t}", "@Override\n\tpublic String deleteStatement() throws Exception {\n\t\treturn null;\n\t}", "@Override\n public String deleteStatement() throws Exception {\n return null...
[ "0.7212158", "0.7194034", "0.703164", "0.7020259", "0.69398296", "0.69282717", "0.6861408", "0.68556446", "0.6841373", "0.6829612", "0.68295527", "0.6807428", "0.67734283", "0.6766142", "0.67636573", "0.6743808", "0.6718281", "0.670806", "0.66640383", "0.6658512", "0.6656498"...
0.0
-1
retorna um modelo de combobox com todos os artigos de acordo com o evento e a edicao
public static DefaultComboBoxModel getArtigos(Integer codEv, Integer numEd) throws SQLException{ DefaultComboBoxModel model = new DefaultComboBoxModel(); String selectTableSQL = "SELECT idArt FROM Artigo WHERE codEv = " + codEv +" AND numEd = " + numEd + ""; System.out.println(selectTableSQL); Statement statement = dbConnection.createStatement(); ResultSet rs = statement.executeQuery(selectTableSQL); model.addElement(" --- "); while(rs.next()){ model.addElement(rs.getString("idArt")); } rs.close(); return model; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void datosCombobox() {\n listaColegios = new ColegioDaoImp().listar();\n for (Colegio colegio : listaColegios) {\n cbColegio.addItem(colegio.getNombre());\n }\n }", "public CadastroCarroView() {\n initComponents();\n ReadTable();\n MarcaVeiculoDao ma...
[ "0.70715165", "0.705778", "0.7022695", "0.6959819", "0.6913199", "0.6912386", "0.68948996", "0.68243414", "0.67867005", "0.67862636", "0.6780336", "0.67766", "0.67542857", "0.6716898", "0.6668127", "0.6644515", "0.6623401", "0.6615129", "0.658719", "0.6563445", "0.6558755", ...
0.7277462
0
cria e retorna um combobox preenchido com todos os artigos
public static DefaultComboBoxModel getAllArtigos() throws SQLException, ParseException{ DefaultComboBoxModel model = new DefaultComboBoxModel(); String selectTableSQL = "SELECT idArt FROM Artigo "; Statement statement = dbConnection.createStatement(); ResultSet rs = statement.executeQuery(selectTableSQL); model.addElement(" --- "); while(rs.next()){ model.addElement(rs.getString("idArt")); } rs.close(); return model; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initCombobox() {\n comboConstructeur = new ComboBox<>();\n comboConstructeur.setLayoutX(100);\n comboConstructeur.setLayoutY(250);\n\n\n BDDManager2 bddManager2 = new BDDManager2();\n bddManager2.start(\"jdbc:mysql://localhost:3306/concession?characterEncoding=utf8\"...
[ "0.8096811", "0.78346705", "0.7770322", "0.76851016", "0.7659236", "0.7619448", "0.7619387", "0.76069957", "0.7505789", "0.74479985", "0.7431099", "0.7360501", "0.72936994", "0.7281696", "0.72750896", "0.72627306", "0.7212625", "0.7209515", "0.72083384", "0.7189247", "0.71835...
0.0
-1
encontra o maior valor da sequencia de artigos
private static Integer getSeq()throws SQLException{ String selectSql = "SELECT max(idArt) from Artigo"; Statement statement = dbConnection.createStatement(); ResultSet rs = statement.executeQuery(selectSql); int seqIdPe = -1; if(rs.next()){ seqIdPe = rs.getInt(1); } return seqIdPe + 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int proximo_sequencia(int atual){\n if (atual + Utils.tamanho_util_pacote > Utils.numero_max_seq) return (atual + Utils.tamanho_util_pacote) - Utils.numero_max_seq;\n else return atual + Utils.tamanho_util_pacote;\n\n }", "@Override\n\tpublic int sequen...
[ "0.69574463", "0.62866247", "0.618702", "0.618702", "0.618702", "0.6156776", "0.60953766", "0.60953766", "0.60953766", "0.6082212", "0.6068247", "0.60091466", "0.5876158", "0.58404046", "0.5805764", "0.5803167", "0.5800024", "0.57641876", "0.5735873", "0.57263803", "0.5726380...
0.5328707
78
Perform this action for the given HistoryEntry and files.
protected abstract void perform(VCSHistoryProvider.HistoryEntry entry, Set<VCSFileProxy> files);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected Modification handleEntry(List historyEntry) {\n // Ignore unusual labels of directories which cause parsing errors that \n // look like this:\n //\n // ***** built *****\n // Version 4\n // Label: \"autobuild_test\"\n // User: Etucker Date: ...
[ "0.5688063", "0.52102447", "0.5175573", "0.51365167", "0.51034814", "0.5099198", "0.49994352", "0.49861944", "0.49763408", "0.49568832", "0.48753756", "0.4862995", "0.4861525", "0.48488072", "0.48338658", "0.4824683", "0.47861946", "0.47735345", "0.4766475", "0.47649062", "0....
0.7523681
0
Method for fetching users
@RequestMapping(value = {"/users/list"}, method = RequestMethod.GET) public ResponseEntity<List<User>> fetchUsers() { System.out.println("fetching users"); List<User> user = userDAO.list("APPROVED"); System.out.println(user); return new ResponseEntity<List<User>>(user, HttpStatus.OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List getAllUsers();", "List<User> fetchAllUSers();", "public List getUsers(User user);", "public List<User> getAllUsers();", "List<User> getUsers();", "List<User> getUsers();", "public void getAllUsers() {\n\t\t\n\t}", "public List<User> getUsers();", "@Override\n\tpublic List<User> getUserL...
[ "0.78316075", "0.7775067", "0.7557107", "0.75153995", "0.7482432", "0.7482432", "0.7479317", "0.74333537", "0.74239194", "0.7423181", "0.74163353", "0.74163353", "0.74052405", "0.73949355", "0.7368148", "0.72829574", "0.72824043", "0.7280213", "0.72688115", "0.72509027", "0.7...
0.7492823
4
function to fetch user and user detail
@RequestMapping(value = {"/user/{id}"}, method = RequestMethod.GET) public ResponseEntity<UserModel> fetchUser(@PathVariable("id") int id) { //Setting user inside model UserModel userModel = new UserModel(); User user = userDAO.getUser(id); userModel.setUser(user); //Setting list of events created by user inside model List<Events> events = eventsDAO.getUserEvents(id); userModel.setEvents(events); //Setting list of jobs created by user inside model List<Job> job = jobDAO.getUserJobs(id); userModel.setJob(job); //Settling list of blogs created by user inside model List<Blog> blog = blogDAO.getUsersBlogs(id); userModel.setBlog(blog); //Settling list of events user has joined inside model List<EventJoined> eventJoined = eventJoinedDAO.list(id); List<Events> joinedEvents = new ArrayList<>(); for (EventJoined ej : eventJoined) { joinedEvents.add(ej.getEvents()); } userModel.setJoinedEvents(joinedEvents); //Settling list of jobs user has applied for inside model List<JobApplied> jobApplieds = jobAppliedDAO.list(id); List<Job> appliedJobList = new ArrayList<>(); for (JobApplied ja : jobApplieds) { appliedJobList.add(ja.getJob()); } userModel.setAppliedJobList(appliedJobList); //Setting list of user's friends return new ResponseEntity<UserModel>(userModel, HttpStatus.OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "User getUserInformation(Long user_id);", "@Override\n\tpublic Map<String, Object> getUserInfoDetail(Map<String, Object> reqs) {\n\t\treturn joaSimpleDao.retrieve(\"tp_users\", reqs);\n\t}", "private void getUserDetailApi() {\n RetrofitService.getOtpData(new Dialog(mContext), retrofitApiClient.getUserDet...
[ "0.7462672", "0.72017926", "0.7196945", "0.69860905", "0.69460094", "0.694595", "0.69349986", "0.6918362", "0.6873064", "0.6857392", "0.68005", "0.6788376", "0.6726595", "0.6666074", "0.66522646", "0.66450083", "0.65708953", "0.6565325", "0.65612966", "0.65348446", "0.6526496...
0.6364343
34
function to fetch main page contain
@RequestMapping(value = {"/main/contain"}, method = RequestMethod.GET) public ResponseEntity<ContainModel> fetchContain() { System.out.println("Fetching blogs"); ContainModel containModel = new ContainModel(); List<Blog> top5Blogs = blogDAO.mainList(); containModel.setTop5Blogs(top5Blogs); List<Forum> top3Forums = forumDAO.mainList(); containModel.setTop3Forums(top3Forums); List<Job> top3Jobs = jobDAO.mainList(); containModel.setTop3Jobs(top3Jobs); List<Events> top3Events = eventsDAO.mainList(); containModel.setTop3Events(top3Events); return new ResponseEntity<ContainModel>(containModel, HttpStatus.OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Element> monitorMainPage(){\n\t\tSystem.out.println(\"monitor main Page\");\n\t\tDocument document;\n\t\tList<Element> results = new ArrayList<Element>();\n\t\t// se connecte au site\n\t\tdocument = connectToPage(\"https://www.supremenewyork.com/shop/all\");\n\t\t// liste tous les éléments de la classe...
[ "0.69857883", "0.66444707", "0.65427715", "0.6450159", "0.639077", "0.6277016", "0.6273504", "0.60278165", "0.5986924", "0.597685", "0.597685", "0.597685", "0.59632283", "0.59216917", "0.58580595", "0.57850343", "0.57814693", "0.57797134", "0.57791674", "0.5764199", "0.572231...
0.54165554
44
function to fetch my online friends
@RequestMapping(value = {"/my/online/friends/{id}"}, method = RequestMethod.GET) public ResponseEntity<List<User>> fetchOnlineFriends(@PathVariable ("id") int userId) { System.out.println("Fetching online friends"); List<User> users = userDAO.fetchOnlineFriends(userId); List<User> onlineFriends = new ArrayList<>(); for(User user1 : users) { if(user1.getId() != userId) { onlineFriends.add(user1); } } return new ResponseEntity<List<User>>(onlineFriends, HttpStatus.OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void getfriendlist(){\n\n String myfacebookid = DataUtils.getPreference(Const.FACEBOOKID,\"\");\n\n new GraphRequest(\n token,\n //\"/\" + myfacebookid + \"/taggable_friends\", //taggable_friends // friendlists // invitable_friends //excluded_ids //friend...
[ "0.695259", "0.69381815", "0.6811902", "0.67908216", "0.6681114", "0.6651925", "0.6511546", "0.64691895", "0.64232105", "0.6409168", "0.6337315", "0.6309701", "0.6303571", "0.6254829", "0.6241584", "0.6224782", "0.6213292", "0.61828506", "0.6178786", "0.6165483", "0.6152675",...
0.6978856
0
Open the fingerprint device.
public synchronized native static int open();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void open() throws FTD2XXException {\n Memory memory = new Memory(16);\n memory.setString(0, devSerialNumber);\n PointerByReference handle = new PointerByReference();\n ensureFTStatus(ftd2xx.FT_OpenEx(memory, FTD2XX.FT_OPEN_BY_SERIAL_NUMBER, handle));\n this.ftHandle = han...
[ "0.63012093", "0.608562", "0.60129833", "0.5815275", "0.56855184", "0.5488772", "0.54707384", "0.53430945", "0.5286337", "0.5221471", "0.5166802", "0.51565087", "0.5138858", "0.51247436", "0.5115327", "0.506342", "0.5060948", "0.505845", "0.5043863", "0.49953216", "0.4989263"...
0.51904625
10
Close the fingerprint device.
public native static int close();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void close() {\n if (VDBG) log(\"close()\");\n\n mAppRegistered = false;\n final IBluetoothDeviceGroup service = getService();\n if (service != null) {\n try {\n service.unregisterGroupClientApp(mAppId, mAttributionSource);\n } catch (RemoteException...
[ "0.6127398", "0.60829914", "0.6014565", "0.5999005", "0.59349716", "0.5849175", "0.5843097", "0.5828608", "0.58079433", "0.5807056", "0.5779785", "0.5779785", "0.57153124", "0.5713747", "0.56712", "0.56600696", "0.5640596", "0.56291777", "0.56290144", "0.56163204", "0.5606699...
0.5515154
44
Get the feature of fingerprint.
public synchronized native static int getFea(byte[] arryFea, int nFeaLength, int[] pRealFeaLength, int n_TimeOut_S);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getFeature();", "String getFeature();", "public String getFeature() {\r\n return feature;\r\n }", "Feature getFeature();", "Feature getFeature();", "public String feature() {\n return feature;\n }", "public Integer getFeature() {\n return feature;\n }", "FTCommand...
[ "0.7052064", "0.7052064", "0.69198644", "0.6874423", "0.6874423", "0.6857654", "0.6844728", "0.6753212", "0.67319256", "0.65310025", "0.64736074", "0.644951", "0.64368826", "0.64349973", "0.63973737", "0.63973737", "0.63973737", "0.63740355", "0.6278191", "0.62381256", "0.619...
0.0
-1
Get the image of fingerprint.
public synchronized native static int getLastImage(byte[] pImgBuffer, int nImgLength, int[] pRealImaLength, int[] pImgWidth, int[] pImgHeight);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "byte[] getProfileImage();", "String getImage();", "java.lang.String getProfileImage();", "java.lang.String getImage();", "@RestrictTo(Scope.LIBRARY_GROUP)\n @Nullable\n Fingerprint getFingerprint();", "com.google.protobuf.ByteString getPicture();", "public String getFingerprint() {\n r...
[ "0.69458544", "0.6587609", "0.6552353", "0.6518585", "0.6505027", "0.6504343", "0.64903426", "0.6467056", "0.6394768", "0.6394768", "0.6394768", "0.63501096", "0.63055634", "0.6300869", "0.6234166", "0.6234157", "0.62311655", "0.6197961", "0.6154254", "0.6126661", "0.612539",...
0.0
-1
Cancel the fingerprint device.
public native static int cancel();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized void cancel() {\n }", "public void cancel() {\n\t\tinterrupt();\n\t}", "public void cancel() {\n request.disconnect();\n }", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "public void...
[ "0.6608687", "0.65259546", "0.648935", "0.6486027", "0.6486027", "0.6486027", "0.6486027", "0.6486027", "0.6486027", "0.63996786", "0.63901895", "0.6334935", "0.6303959", "0.6283543", "0.6283468", "0.62421644", "0.6236357", "0.62187177", "0.62033856", "0.6188062", "0.6183996"...
0.61582536
27
Created by wyouflf on 15/8/13.
public interface ProgressBody extends RequestBody { void setProgressHandler(ProgressHandler progressHandler); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public fina...
[ "0.62127036", "0.6084377", "0.6068907", "0.6018212", "0.5939448", "0.5939448", "0.59087497", "0.5868998", "0.58615875", "0.5859827", "0.584737", "0.5802172", "0.5787153", "0.57836837", "0.5779763", "0.57766443", "0.57698554", "0.57698554", "0.57698554", "0.57698554", "0.57698...
0.0
-1
Reposition based on the mouse location difference
@Override public void mouseDragged(MouseEvent e) { int deltaX = e.getXOnScreen() - screenX; int deltaY = e.getYOnScreen() - screenY; setLocation(myX + deltaX, myY + deltaY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void mouseDragged(MouseEvent evt) {\n setLocation(evt.getXOnScreen() - posX, evt.getYOnScreen() - posY);\n }", "@Override\n public void mouseMoved(MouseEvent e) {\n mouseXPosition = e.getX();\n }", "private void formMouseDragged(java.awt.even...
[ "0.70754737", "0.68996274", "0.68270487", "0.6821742", "0.68193096", "0.68038005", "0.67304313", "0.6722254", "0.6703911", "0.6703265", "0.66967195", "0.66730666", "0.6586281", "0.6584278", "0.65670997", "0.6535927", "0.65286124", "0.6499835", "0.64902693", "0.6468982", "0.64...
0.69563955
1
Sets up the sandbox, but does not invoke it. This constructor sets up a sandbox with no security at all. The spawned process can do whatever it wants. To actually kick off the command, call the Init() method. If trap_sterr is true, then the sandbox catches the stderr output of the spawned program, otherwise the stderr output of the spawned program goes straight to the terminal.
public Sandbox(String command, boolean trapStderr) { childStdin = null; childStdout = null; childStderr = null; this.command = command; process = null; this.trapStderr = trapStderr; isAlive = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Sandbox(String command) {\n\tchildStdin = null;\n\tchildStdout = null;\n\tchildStderr = null;\n\tthis.command = command;\n\tprocess = null;\n\tthis.trapStderr = true;\n\tisAlive = false;\t\n }", "public int Init() {\n\ttry {\n\t process = Runtime.getRuntime().exec(command);\n\t} catch (Exception e) ...
[ "0.6292433", "0.5531845", "0.5179462", "0.5167987", "0.5075353", "0.48507294", "0.47523794", "0.46960878", "0.46940896", "0.45444006", "0.45301622", "0.45166707", "0.4482307", "0.44821846", "0.44520453", "0.44517657", "0.44466656", "0.4445153", "0.443857", "0.4427714", "0.438...
0.7045485
0
Sets up the sandbox, but does not invoke it. This constructor sets up a sandbox with no security at all. The spawned process can do whatever it wants. To actually kick off the command, call the Init() method. Traps the stderr channel of the spawned process.
public Sandbox(String command) { childStdin = null; childStdout = null; childStderr = null; this.command = command; process = null; this.trapStderr = true; isAlive = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Sandbox(String command, boolean trapStderr) {\n\tchildStdin = null;\n\tchildStdout = null;\n\tchildStderr = null;\n\tthis.command = command;\n\tprocess = null;\n\tthis.trapStderr = trapStderr;\n\tisAlive = false;\n }", "public int Init() {\n\ttry {\n\t process = Runtime.getRuntime().exec(command);\n...
[ "0.6809974", "0.6049768", "0.5970985", "0.5626481", "0.5625788", "0.5485626", "0.5382826", "0.5329998", "0.5317505", "0.5304426", "0.52301675", "0.5217193", "0.5168823", "0.5164601", "0.5156494", "0.49791023", "0.4946694", "0.49439698", "0.49355307", "0.49344686", "0.49076894...
0.6893118
0
The Init() method actually sets up the sandbox and invokes the command inside it. Returns 1 on success, 0 on failure.
public int Init() { try { process = Runtime.getRuntime().exec(command); } catch (Exception e) { return 0; } if (process == null) { return 0; } childStdin = new OutputStreamWatcher(process.getOutputStream()); childStdout = new InputStreamWatcher(process.getInputStream()); childStderr = new InputStreamWatcher(process.getErrorStream()); childStdin.start(); childStdout.start(); childStderr.start(); return 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void invokeInitBlock(PythonFacet init, String env) {\n\t\tString body=init.getBody();\n\t\tPythonInterpreter environment = registerEnv(env);\n\t\tif (body !=null && !body.trim().equals(\"\")) {\n\t\t\tenvironment.exec(body);\n\t\t}\n\n\t}", "@Test\n public void testConstructor() {\n interpreterInstan...
[ "0.5283492", "0.52411", "0.5212989", "0.5183645", "0.51456136", "0.50685453", "0.5042416", "0.50368506", "0.5033045", "0.5033045", "0.5033045", "0.5033045", "0.5033045", "0.5033045", "0.5033045", "0.5033045", "0.5033045", "0.5033045", "0.5033045", "0.5033045", "0.5033045", ...
0.57494605
0
Destroys the spawned process.
public void Kill() { if (process != null) { process.destroy(); childStdin.Kill(); childStdout.Kill(); childStderr.Kill(); } process = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void close() {\n myProcess.destroy();\n }", "public final void destroy()\n {\n processDestroy();\n super.destroy();\n }", "@Override\n\tpublic void destroyProcess() {\n\t\tsuper.destroyProcess();\n\t\tDataDirRemoverHandler ddhHandler = \n\t\t\tnew DataDirRemoverHandler(getLogHandler())...
[ "0.7551027", "0.72496706", "0.7240337", "0.6946328", "0.68755454", "0.6858697", "0.6791782", "0.6674599", "0.657801", "0.6539147", "0.6515822", "0.6498201", "0.64869225", "0.64869225", "0.6470262", "0.6447789", "0.64380836", "0.6425378", "0.63967705", "0.6391", "0.63795465", ...
0.73153454
1
Returns true if the spawned process is thought to be alive. If something is known to be wrong with the process, then false is returned. Examples include if an IO function has failed or if the Kill() function has been called.
public boolean IsAlive() { return process != null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean isAlive(Process p) { \n\t\ttry{ \n\t\t\tp.exitValue(); \n\t\t\treturn false; \n\t\t}catch (IllegalThreadStateException e) { \n\t\t\treturn true; \n\t\t} \n\t}", "boolean isAlive() throws RemoteException;", "public boolean isAlive() throws RemoteException;", "public boolean isAli...
[ "0.7503467", "0.6987067", "0.68888766", "0.68195933", "0.66987985", "0.6695256", "0.6695256", "0.6693435", "0.6693435", "0.669176", "0.66382045", "0.663452", "0.663452", "0.663452", "0.6620308", "0.65425545", "0.65314275", "0.6529631", "0.6529631", "0.651909", "0.6506971", ...
0.7516445
0
Writes the given string to the stdin channel of the spawned process, followed by a single newline character (\n). On success, returns the number of bytes written. On error, 1 is returned.
public int WriteLine(String message) { Write(message); childStdin.AddCharacters("\n"); return message.length() + 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int Write(String message) {\n\tchildStdin.AddCharacters(message);\n\treturn message.length();\n }", "OutputStream getStdin();", "public void write(String text) throws ShellIOException;", "public void send() throws InterruptedException, IOException\n {\n netCat.setInput( new ByteArrayInput...
[ "0.628394", "0.52897614", "0.5104937", "0.5088536", "0.5015067", "0.49798945", "0.49693066", "0.49101183", "0.4901517", "0.47162983", "0.46990794", "0.4686898", "0.4586547", "0.45560715", "0.45356172", "0.44598943", "0.4456393", "0.4442227", "0.44126585", "0.43976194", "0.435...
0.64172626
0
Writes the given string to the stdin channel of the spawned process, without adding a newline character to the end. On success, returns the number of bytes written. On error, 1 is returned.
public int Write(String message) { childStdin.AddCharacters(message); return message.length(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int WriteLine(String message) {\n\tWrite(message);\n\tchildStdin.AddCharacters(\"\\n\");\n\treturn message.length() + 1;\n }", "OutputStream getStdin();", "public void send() throws InterruptedException, IOException\n {\n netCat.setInput( new ByteArrayInputStream( inputFromTest.getBytes() )...
[ "0.57357997", "0.53545135", "0.4984578", "0.49513847", "0.4716412", "0.4566055", "0.45311287", "0.4508507", "0.44924593", "0.44920152", "0.44785914", "0.44571134", "0.4424809", "0.4422257", "0.43933854", "0.4392275", "0.435656", "0.4335088", "0.4330564", "0.431477", "0.429362...
0.6116246
0
Attempts to read a line from the stdout channel of the spawned process. This method does not block. If a complete line of the program's output is available, it is placed into the buf variable and the method returns the number of characters read. The terminating newline character is not included in buf, but is included in the returned character count. If a complete line of the program's output is not yet available, null is returned.
public String ReadLine() { String s = childStdout.Readline(); return s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String readLine() throws IOException, ReadTimeoutException {\n\t\ttry {\n\t\t\twaitForAvailable();\n\t\t\tlineBuffer[0] = (byte) inputStream.read();\n\t\t\twaitForAvailable();\n\t\t\tlineBuffer[1] = (byte) inputStream.read();\n\t\t\tlineLength = 2;\n\t\t\twhile (lineBuffer[lineLength - 2] != (byte) 13\n\t\t...
[ "0.5790898", "0.5660509", "0.5636956", "0.55338454", "0.55153924", "0.54153925", "0.5397084", "0.5289067", "0.5205893", "0.5194323", "0.51942366", "0.5175007", "0.5159914", "0.5136458", "0.5114919", "0.50496936", "0.5048568", "0.5011905", "0.5003278", "0.49883747", "0.4950252...
0.6667033
0
A blocking ReadLine. Waits for characters written to the spawned program's stdout stream until a newline is read, or max_blocking_time milliseconds have elapsed. Returns the number of characters read.
public String ReadLine(int maxBlockingTime) { long startTime = System.currentTimeMillis(); while (System.currentTimeMillis() - startTime < maxBlockingTime) { String s = ReadLine(); if (s != null) { return s; } try {Thread.sleep(10); } catch (Exception e) { } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String readLine() throws IOException, ReadTimeoutException {\n\t\ttry {\n\t\t\twaitForAvailable();\n\t\t\tlineBuffer[0] = (byte) inputStream.read();\n\t\t\twaitForAvailable();\n\t\t\tlineBuffer[1] = (byte) inputStream.read();\n\t\t\tlineLength = 2;\n\t\t\twhile (lineBuffer[lineLength - 2] != (byte) 13\n\t\t...
[ "0.57585776", "0.540291", "0.5344069", "0.5245928", "0.5074038", "0.48411205", "0.46943602", "0.46828282", "0.46628997", "0.46241173", "0.46010834", "0.45908505", "0.4579913", "0.4564426", "0.4548442", "0.45350248", "0.45345837", "0.45307148", "0.45226642", "0.45094252", "0.4...
0.68033594
0
Reads a line from the spawned program's stderr channel. Works just the same as the ReadLine method, except for stderr instead of stdout.
public String ReadErrorLine() { return childStderr.Readline(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "InputStream getStderr();", "public abstract InputStream stderr();", "public String readLine() throws ShellIOException;", "public String ReadLine() {\n\tString s = childStdout.Readline();\n\treturn s;\n }", "static public StdReader stderr(Process process, StdProcessor processor) {\n \n return new S...
[ "0.6662843", "0.6418407", "0.63860613", "0.59239316", "0.5873303", "0.57570285", "0.5586782", "0.55665636", "0.548915", "0.5476183", "0.54663134", "0.54231334", "0.5326376", "0.5300557", "0.52879304", "0.5271434", "0.51655203", "0.5106228", "0.50032157", "0.49961975", "0.4924...
0.7323238
0
Returns the shell command used to initialize this sandbox.
public String Command() { return command; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String getLaunchCommand();", "private static String getSetCommand()\n {\n String setCmd;\n String osName = System.getProperty(\"os.name\");\n\n if (osName.indexOf(\"indows\") != -1)\n {\n if (osName.indexOf(\"indows 9\") != -1)\n {\n ...
[ "0.6223209", "0.58677375", "0.5863686", "0.5702824", "0.56680113", "0.5649872", "0.56498027", "0.5627367", "0.5589999", "0.55789965", "0.5538112", "0.5528352", "0.55102307", "0.5508755", "0.54695714", "0.5444955", "0.5444955", "0.5442395", "0.54239064", "0.5419443", "0.541449...
0.55330044
11
Kills this thread. Stops monitoring the InputStream.
public synchronized void Kill() { dieDieDie = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void stop() {\n isRunning = false;\n\n mReadLogsHandler = null;\n if (mReadLogThread != null) {\n final Thread inherited = mReadLogThread;\n mReadLogThread = null;\n inherited.interrupt();\n }\n\n IOUtilities.closeStream(reader);\n }", ...
[ "0.7079659", "0.7045995", "0.6402628", "0.6392985", "0.63839734", "0.6364405", "0.6360481", "0.63498145", "0.63436127", "0.6341731", "0.63206196", "0.6318389", "0.6289651", "0.6278615", "0.62781596", "0.62654895", "0.62569785", "0.6255465", "0.625488", "0.6242257", "0.6242257...
0.0
-1
Checks to get one line of input, if available. If no line is immediately available, returns null.
public synchronized String Readline() { return lines.poll(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String readLine() {\r\n\t\ttry {\r\n\t\t\treturn input.readLine();\r\n\t\t} catch (IOException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "private String readLine() {\n\t\ttry {\n\t\t\treturn reader.nextLine();\t\n\t\t} catch (NoSuchElementException e) {\n\t\t\treturn null;\n\t\t}\n\t}", "public Stri...
[ "0.74294215", "0.7393671", "0.7019271", "0.693072", "0.65789485", "0.63799995", "0.63415045", "0.6336527", "0.6221963", "0.6221958", "0.61662626", "0.61557555", "0.6142932", "0.61328965", "0.61175513", "0.61001176", "0.60305154", "0.60118526", "0.5995352", "0.5986141", "0.595...
0.5770097
26
Checks the stream. Returns false if there's a problem. If everything is peachy, returns true.
private synchronized boolean Iteration() { if (inputStream == null) { return false; } int c = -1; try { int avail = inputStream.available(); if (avail > 0) { c = inputStream.read(); } } catch (Exception e) { return false; } if (c < 0) { return true; } if (c == '\n') { lines.offer(buffer); buffer = new String(""); } else { buffer += (char)c; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean valid()\r\n\t{\r\n\t\treturn valid(getInputStream());\r\n\t}", "public boolean hasStreamFailed() {\n return fieldSetFlags()[6];\n }", "private boolean isValid() throws BadInputException {\n try {\n if( ! br.ready() ) \t\t\t\t\t\t//Is the reader ready?\n t...
[ "0.69367486", "0.65966713", "0.65130025", "0.60508883", "0.59925616", "0.59873617", "0.5974446", "0.5948075", "0.5934147", "0.5871778", "0.58473915", "0.58335435", "0.58215564", "0.5820008", "0.5796392", "0.5776872", "0.57484764", "0.57152176", "0.57098395", "0.5690668", "0.5...
0.5505867
38
Kills this thread. Stops monitoring the InputStream.
public synchronized void Kill() { dieDieDie = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void stop() {\n isRunning = false;\n\n mReadLogsHandler = null;\n if (mReadLogThread != null) {\n final Thread inherited = mReadLogThread;\n mReadLogThread = null;\n inherited.interrupt();\n }\n\n IOUtilities.closeStream(reader);\n }", ...
[ "0.7079698", "0.7048134", "0.6402774", "0.6393268", "0.6389885", "0.637098", "0.63661885", "0.6355841", "0.63456917", "0.63450223", "0.6323649", "0.6323301", "0.6294437", "0.62837666", "0.6282683", "0.6268405", "0.6262245", "0.62620133", "0.6256497", "0.62480974", "0.62480974...
0.0
-1
Adds to the queue of characters that are being sent to the sandboxed process' stdin channel.
public synchronized void AddCharacters(String s) { buffer += s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void accept(){\n\t\ttry{\n\t\t\tBufferedReader fromConsole = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString message;\n\t\t\twhile (true){\n\t\t\t\tmessage = fromConsole.readLine();\n\t\t\t\tthis.handleMessage(message);\n\t\t\t}\n\t\t} \n\t\tcatch (Exception exception){\n\t\t\tSystem.out...
[ "0.5873082", "0.5720166", "0.5467646", "0.533187", "0.53170025", "0.53077495", "0.53048515", "0.5294585", "0.527363", "0.5273618", "0.51031315", "0.5039544", "0.5036485", "0.5015532", "0.49964172", "0.49469832", "0.49038452", "0.48968095", "0.48944846", "0.48795995", "0.48777...
0.44985273
68
Writes characters from the buffer to the sandboxed process' stdin channel.
private synchronized boolean Iteration() { if (outputStream == null) { return false; } if (buffer.length() == 0) { return true; } try { outputStream.write(buffer.getBytes()); outputStream.flush(); buffer = new String(""); } catch (Exception e) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "OutputStream getStdin();", "public static void inputFlush() {\n int dummy;\n int bAvail;\n\n try {\n while ((System.in.available()) != 0)\n dummy = System.in.read();\n } catch (java.io.IOException e) {\n System.out.println(\"Input error\");\n }\n }", "public void accept(){\n\t\...
[ "0.59137243", "0.5484983", "0.51204115", "0.5043423", "0.49343234", "0.4882643", "0.48609343", "0.48189938", "0.47587165", "0.4624487", "0.46077088", "0.4587859", "0.45550424", "0.44874686", "0.4482309", "0.44788837", "0.44588655", "0.44571772", "0.4439288", "0.4437989", "0.4...
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table uc_order_guest_info
int countByExample(UcOrderGuestInfoExample example);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UcOrderGuestInfo selectByPrimaryKey(Long id);", "List<UcOrderGuestInfo> selectByExample(UcOrderGuestInfoExample example);", "@Select({\n \"select\",\n \"id, user_id, user_name, tel_number, postal_Code, national_Code, province_Name, \",\n \"city_Name, county_Name, detail_Info, is_default\",...
[ "0.5967312", "0.54307216", "0.5095361", "0.5056573", "0.50336015", "0.5020163", "0.50114596", "0.4977055", "0.4975924", "0.49726197", "0.49679083", "0.49661392", "0.49465713", "0.49343327", "0.49217805", "0.49192396", "0.4898314", "0.48977977", "0.4890611", "0.4889592", "0.48...
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table uc_order_guest_info
int deleteByExample(UcOrderGuestInfoExample example);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UcOrderGuestInfo selectByPrimaryKey(Long id);", "List<UcOrderGuestInfo> selectByExample(UcOrderGuestInfoExample example);", "@Select({\n \"select\",\n \"id, user_id, user_name, tel_number, postal_Code, national_Code, province_Name, \",\n \"city_Name, county_Name, detail_Info, is_default\",...
[ "0.59679544", "0.54316205", "0.5095957", "0.505718", "0.503224", "0.50196356", "0.5010775", "0.497697", "0.49743563", "0.49709788", "0.49674714", "0.49671787", "0.49457926", "0.4934255", "0.49222803", "0.49195752", "0.48989034", "0.4898203", "0.48898008", "0.48892307", "0.486...
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table uc_order_guest_info
int deleteByPrimaryKey(Long id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UcOrderGuestInfo selectByPrimaryKey(Long id);", "List<UcOrderGuestInfo> selectByExample(UcOrderGuestInfoExample example);", "@Select({\n \"select\",\n \"id, user_id, user_name, tel_number, postal_Code, national_Code, province_Name, \",\n \"city_Name, county_Name, detail_Info, is_default\",...
[ "0.59686077", "0.5430412", "0.509382", "0.50578535", "0.5032601", "0.5018578", "0.5012282", "0.4976719", "0.49758866", "0.49703467", "0.49687666", "0.49675158", "0.49461478", "0.4936134", "0.4921217", "0.49207553", "0.48992163", "0.48963723", "0.489108", "0.48900905", "0.4862...
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table uc_order_guest_info
int insert(UcOrderGuestInfo record);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UcOrderGuestInfo selectByPrimaryKey(Long id);", "List<UcOrderGuestInfo> selectByExample(UcOrderGuestInfoExample example);", "@Select({\n \"select\",\n \"id, user_id, user_name, tel_number, postal_Code, national_Code, province_Name, \",\n \"city_Name, county_Name, detail_Info, is_default\",...
[ "0.59686077", "0.5430412", "0.509382", "0.50578535", "0.5032601", "0.5018578", "0.5012282", "0.4976719", "0.49758866", "0.49703467", "0.49687666", "0.49675158", "0.49461478", "0.4936134", "0.4921217", "0.49207553", "0.48992163", "0.48963723", "0.489108", "0.48900905", "0.4862...
0.46559086
46
This method was generated by MyBatis Generator. This method corresponds to the database table uc_order_guest_info
int insertSelective(UcOrderGuestInfo record);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UcOrderGuestInfo selectByPrimaryKey(Long id);", "List<UcOrderGuestInfo> selectByExample(UcOrderGuestInfoExample example);", "@Select({\n \"select\",\n \"id, user_id, user_name, tel_number, postal_Code, national_Code, province_Name, \",\n \"city_Name, county_Name, detail_Info, is_default\",...
[ "0.5967312", "0.54307216", "0.5095361", "0.5056573", "0.50336015", "0.5020163", "0.50114596", "0.4977055", "0.4975924", "0.49726197", "0.49679083", "0.49661392", "0.49465713", "0.49343327", "0.49217805", "0.49192396", "0.4898314", "0.48977977", "0.4890611", "0.4889592", "0.48...
0.46146044
56
This method was generated by MyBatis Generator. This method corresponds to the database table uc_order_guest_info
List<UcOrderGuestInfo> selectByExample(UcOrderGuestInfoExample example);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UcOrderGuestInfo selectByPrimaryKey(Long id);", "@Select({\n \"select\",\n \"id, user_id, user_name, tel_number, postal_Code, national_Code, province_Name, \",\n \"city_Name, county_Name, detail_Info, is_default\",\n \"from twshop_address\",\n \"where id = #{id,jdbcType=INTEGER...
[ "0.59679544", "0.5095957", "0.505718", "0.503224", "0.50196356", "0.5010775", "0.497697", "0.49743563", "0.49709788", "0.49674714", "0.49671787", "0.49457926", "0.4934255", "0.49222803", "0.49195752", "0.48989034", "0.4898203", "0.48898008", "0.48892307", "0.48633268", "0.486...
0.54316205
1
This method was generated by MyBatis Generator. This method corresponds to the database table uc_order_guest_info
UcOrderGuestInfo selectByPrimaryKey(Long id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<UcOrderGuestInfo> selectByExample(UcOrderGuestInfoExample example);", "@Select({\n \"select\",\n \"id, user_id, user_name, tel_number, postal_Code, national_Code, province_Name, \",\n \"city_Name, county_Name, detail_Info, is_default\",\n \"from twshop_address\",\n \"where...
[ "0.5430412", "0.509382", "0.50578535", "0.5032601", "0.5018578", "0.5012282", "0.4976719", "0.49758866", "0.49703467", "0.49687666", "0.49675158", "0.49461478", "0.4936134", "0.4921217", "0.49207553", "0.48992163", "0.48963723", "0.489108", "0.48900905", "0.4862083", "0.48604...
0.59686077
0
This method was generated by MyBatis Generator. This method corresponds to the database table uc_order_guest_info
int updateByExampleSelective(@Param("record") UcOrderGuestInfo record, @Param("example") UcOrderGuestInfoExample example);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UcOrderGuestInfo selectByPrimaryKey(Long id);", "List<UcOrderGuestInfo> selectByExample(UcOrderGuestInfoExample example);", "@Select({\n \"select\",\n \"id, user_id, user_name, tel_number, postal_Code, national_Code, province_Name, \",\n \"city_Name, county_Name, detail_Info, is_default\",...
[ "0.59686077", "0.5430412", "0.509382", "0.50578535", "0.5032601", "0.5018578", "0.5012282", "0.4976719", "0.49758866", "0.49703467", "0.49687666", "0.49675158", "0.49461478", "0.4936134", "0.4921217", "0.49207553", "0.48992163", "0.48963723", "0.489108", "0.48900905", "0.4862...
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table uc_order_guest_info
int updateByExample(@Param("record") UcOrderGuestInfo record, @Param("example") UcOrderGuestInfoExample example);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UcOrderGuestInfo selectByPrimaryKey(Long id);", "List<UcOrderGuestInfo> selectByExample(UcOrderGuestInfoExample example);", "@Select({\n \"select\",\n \"id, user_id, user_name, tel_number, postal_Code, national_Code, province_Name, \",\n \"city_Name, county_Name, detail_Info, is_default\",...
[ "0.5967312", "0.54307216", "0.5095361", "0.5056573", "0.50336015", "0.5020163", "0.50114596", "0.4977055", "0.4975924", "0.49726197", "0.49679083", "0.49661392", "0.49465713", "0.49343327", "0.49217805", "0.49192396", "0.4898314", "0.48977977", "0.4890611", "0.4889592", "0.48...
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table uc_order_guest_info
int updateByPrimaryKeySelective(UcOrderGuestInfo record);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UcOrderGuestInfo selectByPrimaryKey(Long id);", "List<UcOrderGuestInfo> selectByExample(UcOrderGuestInfoExample example);", "@Select({\n \"select\",\n \"id, user_id, user_name, tel_number, postal_Code, national_Code, province_Name, \",\n \"city_Name, county_Name, detail_Info, is_default\",...
[ "0.59679544", "0.54316205", "0.5095957", "0.505718", "0.503224", "0.50196356", "0.5010775", "0.497697", "0.49743563", "0.49709788", "0.49674714", "0.49671787", "0.49457926", "0.4934255", "0.49222803", "0.49195752", "0.48989034", "0.4898203", "0.48898008", "0.48892307", "0.486...
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table uc_order_guest_info
int updateByPrimaryKey(UcOrderGuestInfo record);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UcOrderGuestInfo selectByPrimaryKey(Long id);", "List<UcOrderGuestInfo> selectByExample(UcOrderGuestInfoExample example);", "@Select({\n \"select\",\n \"id, user_id, user_name, tel_number, postal_Code, national_Code, province_Name, \",\n \"city_Name, county_Name, detail_Info, is_default\",...
[ "0.59686077", "0.5430412", "0.509382", "0.50578535", "0.5032601", "0.5018578", "0.5012282", "0.4976719", "0.49758866", "0.49703467", "0.49687666", "0.49675158", "0.49461478", "0.4936134", "0.4921217", "0.49207553", "0.48992163", "0.48963723", "0.489108", "0.48900905", "0.4862...
0.0
-1
find another player that already has the gui for this tile open
public void syncOnOpen(EntityPlayerMP playerOpened) { WorldServer server = playerOpened.getServerWorld(); for (EntityPlayer player : server.playerEntities) { if (player == playerOpened) { continue; } if (player.openContainer instanceof BaseContainer) { if (this.sameGui((BaseContainer<H>) player.openContainer)) { syncWithOtherContainer((BaseContainer<H>) player.openContainer, playerOpened); return; } } } // no player has a container open for the tile syncNewContainer(playerOpened); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Player getSelectedPlayer();", "void findOpponent() {\n\t\tif(gameHelper == null){return;}\n\t\tif (gameHelper.isSignedIn()) {\n\t\t\tIntent intent = Games.TurnBasedMultiplayer\n\t\t\t\t\t.getSelectOpponentsIntent(gameHelper.getApiClient(), 1, 1);\n\t\t\tstartActivityForResult(intent, RC_SELECT_PLAYERS);\n\t\t} e...
[ "0.62450886", "0.5754316", "0.573149", "0.57149357", "0.5702279", "0.5677285", "0.5677285", "0.56578946", "0.5654721", "0.5627808", "0.5616292", "0.5590811", "0.55639184", "0.55539274", "0.55410165", "0.55207384", "0.5484313", "0.5474415", "0.5468524", "0.5461445", "0.5461111...
0.52471
60
Called when the container is opened and no other player has it open. Set the default state here.
protected void syncNewContainer(EntityPlayerMP player) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void onOpened() {\n\r\n\t}", "@Override\n public void onOpened(AdColonyInterstitial ad) {\n notifyShown();\n notifyStarted();\n }", "public void onStart() {\r\n\t\tthis.setVisible(true);\r\n\t}", "@Override\r\n\tpublic void onContainer...
[ "0.5858749", "0.57697487", "0.5769686", "0.57629657", "0.5751245", "0.57494056", "0.5668953", "0.56632894", "0.56257004", "0.5609172", "0.560763", "0.55835336", "0.5572503", "0.55721056", "0.55232894", "0.548729", "0.5486013", "0.54751956", "0.54751956", "0.54751956", "0.5475...
0.0
-1
Initialize filter criteria with no filter
private void initialize() { filterSelectedField = "-1"; filterCriteria = ""; // Initialize sort with default values sortHelper = new SortHelper(); try { sortHelper.setField(getPrimarySortedField()); sortHelper.setAscending(primarySortedFieldAsc); } catch (PrimarySortedFieldNotFoundException ex) { java.util.logging.Logger.getLogger(AbstractCrudBean.class.getName()).log( Level.SEVERE, i18n.iValue("web.client.backingBean.message.Error") + ex.getMessage(), ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initFilter() {\r\n if (filter == null) {\r\n filter = new VocabularyConceptFilter();\r\n }\r\n filter.setVocabularyFolderId(vocabularyFolder.getId());\r\n filter.setPageNumber(page);\r\n filter.setNumericIdentifierSorting(vocabularyFolder.isNumericCo...
[ "0.69380164", "0.6641577", "0.6585341", "0.6552248", "0.6549757", "0.653111", "0.6503888", "0.6406685", "0.6362939", "0.6297496", "0.6284581", "0.6256314", "0.6253835", "0.62421584", "0.62260246", "0.62183183", "0.6182355", "0.6166661", "0.6155862", "0.61466944", "0.61449593"...
0.6195641
16
MESSAGE LIST AND TABLE METHODS
public PaginationHelper getPaginationHelper() { if (paginationHelper == null) { int pageSize = getRowQuantSelected().length() > 0 ? Integer.valueOf( getRowQuantSelected()).intValue() : 0; paginationHelper = new PaginationHelper(pageSize) { Integer count = null; @Override public int getItemsCount() { String where = null; if (count == null) { if (!filterSelectedField.equals("-1") && filterCriteria.length() > 0) { Class<?> fieldClass = getFieldType(filterSelectedField); if (fieldClass.equals(Integer.class) || fieldClass.equals(Long.class) || fieldClass.equals(BigInteger.class)) { where = "where o.".concat(filterSelectedField).concat( " = ").concat(filterCriteria); } else if (fieldClass.equals(String.class)) { where = "where lower(o.".concat( filterSelectedField).concat(") LIKE '%").concat( filterCriteria.toLowerCase()).concat( "%'"); } } if (aditionalFilter != null && aditionalFilter.trim().length() > 0) { if (where == null) { where = "where "; } else { where = where.concat(" AND"); } where = where.concat(" (").concat( aditionalFilter.trim()).concat(") "); } count = facade.count(where); } return count; } @Override public DataModel createPageDataModel() { String where = null; if (!filterSelectedField.equals("-1") && filterCriteria.length() > 0) { Class<?> fieldClass = getFieldType(filterSelectedField); if (fieldClass.equals(Integer.class) || fieldClass.equals(Long.class) || fieldClass.equals(BigInteger.class)) { where = "where o.".concat(filterSelectedField).concat( " = ").concat(filterCriteria); } else if (fieldClass.equals(String.class)) { where = "where lower(o.".concat(filterSelectedField).concat( ") LIKE '%").concat( filterCriteria.toLowerCase()).concat("%'"); } } if (aditionalFilter != null && aditionalFilter.trim().length() > 0) { if (where == null) { where = "where "; } else { where = where.concat(" AND"); } where = where.concat(" (").concat( aditionalFilter.trim()).concat(") "); } String beginOrderBy = sortHelper.getField().equals( "codeChr") ? "o.metaDataPK." : "o."; String orderby = beginOrderBy.concat(sortHelper.getField()).concat( sortHelper.isAscending() ? " ASC" : " DESC"); return new ListDataModelViewCsTigo(facade.findRange( new int[] { getPageFirstItem(), getPageFirstItem() + getPageSize() }, where, orderby)); } }; } return paginationHelper; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Message> listMessages(Integer tid);", "java.util.List<io.dstore.engine.Message> \n getMessageList();", "java.util.List<io.dstore.engine.Message> \n getMessageList();", "java.util.List<io.dstore.engine.Message> \n getMessageList();", "java.util.List<io.dstore.engine.Message>...
[ "0.7066664", "0.7050429", "0.7050429", "0.7050429", "0.7050429", "0.7050429", "0.70194626", "0.6955849", "0.6698938", "0.66738176", "0.66247344", "0.6618678", "0.6544344", "0.6538562", "0.6538562", "0.6362535", "0.6350311", "0.63084805", "0.62721074", "0.62619144", "0.6260653...
0.0
-1
FILTER AND SORT METHODS
public String applyFilter() { if (!filterSelectedField.equals("-1")) { Class<?> fieldClass = getFieldType(filterSelectedField); if ((fieldClass.equals(Integer.class) && !NumberUtil.isInteger(filterCriteria)) || (fieldClass.equals(Long.class) && !NumberUtil.isLong(filterCriteria)) || (fieldClass.equals(BigInteger.class) && !NumberUtil.isBigInteger(filterCriteria))) { setWarnMessage(i18n.iValue("web.client.backingBean.abstractCrudBean.message.MustBeInteger")); filterCriteria = ""; } else { signalRead(); } paginationHelper = null; // For pagination recreation dataModel = null; // For data model recreation selectedItems = null; // For clearing selection } else { setWarnMessage(i18n.iValue("web.client.backingBean.abstractCrudBean.message.MustSelectFindOption")); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args){\n\t\tSystem.out.println(\"/***Java 8 stream Implementation sorting and filtering ***/\");\n\t\tSystem.out.println(\"/*Stream Implementation sorting and filtering to List*/\");\n\t\tList<Person> streamEx = new ArrayList<Person>();\n\t\tstreamEx.add(new Person(\"Ramu\",12));\n...
[ "0.6492076", "0.6457671", "0.64271784", "0.63872993", "0.63707256", "0.6368994", "0.62234825", "0.6200468", "0.61985105", "0.6094821", "0.6085224", "0.60395366", "0.60395366", "0.6034337", "0.5996403", "0.5984711", "0.58136207", "0.5797375", "0.5763923", "0.57531625", "0.5741...
0.0
-1
AUDITORY METHODS AUXILIARY GENERIC METHODS
protected Field getPrimaryKeyField() { Field returnField = null; Field[] fieds = MetaData.class.getDeclaredFields(); for (Field field : fieds) { Id annotation = field.getAnnotation(Id.class); EmbeddedId annotationEmb = field.getAnnotation(EmbeddedId.class); if (annotation != null || annotationEmb != null) { return field; } } return returnField; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void audit(String id) throws Exception {\n\t\t\n\t}", "public interface Auditable {\n Date getCreated();\n void setCreated(Date created);\n Date getLastUpdate();\n void setLastUpdate(Date lastUpdate);\n}", "@Override\n\tpublic String audit() throws Throwable {\n\t\treturn null;\...
[ "0.7201379", "0.66732794", "0.6540534", "0.6209892", "0.60616565", "0.6003641", "0.6001596", "0.5983627", "0.58926535", "0.58556527", "0.5846768", "0.5835375", "0.5678135", "0.5672003", "0.565324", "0.5626202", "0.5623044", "0.5606842", "0.55227405", "0.5518384", "0.550375", ...
0.0
-1
Fake method to simulating long run actions Override it to inject fault for test
protected boolean performActions() { try { Thread.sleep(5000); } catch (InterruptedException e) { // This is simulation, so we will not handle it } return Math.rint(Math.random()) % 20 != 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean performAction(int action) {\n/* 567 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public boolean performAction(int action, Bundle arguments) {\n/* 583 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\n public void testInvokeEffectorStartFailing_Metho...
[ "0.6412009", "0.6165806", "0.5849298", "0.5759238", "0.5759131", "0.57271546", "0.5665051", "0.56471705", "0.56343037", "0.56174505", "0.5608504", "0.5589253", "0.55847865", "0.55753887", "0.5572795", "0.557197", "0.5542835", "0.55343926", "0.5518593", "0.549836", "0.54822826...
0.0
-1
/ Preparing our Dialog View
@NonNull @Override public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) { AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); LayoutInflater inflater = getActivity().getLayoutInflater(); View view = inflater.inflate(R.layout.fragment_dialog, null); builder.setView(view); dialog = builder.create(); dialog.setCanceledOnTouchOutside(false); taskEditText = view.findViewById(R.id.task_edit_text); cancelButton = view.findViewById(R.id.cancel_button); saveButton = view.findViewById(R.id.save_button); viewModel = new ViewModelProvider(requireActivity()).get(TaskViewModel.class); /* * If we get no arguments from activity it means we have to add new task * otherwise we have to update the task and in that case argument!=null */ if (getArguments() == null) { saveButton.setText("Save"); } else { saveButton.setText("Update"); taskEditText.setText(getArguments().getString(MainActivity.TASK_TAG)); } // Cancel Button in Dialog cancelButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { dialog.dismiss(); } }); // Save button in dialog saveButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (getArguments() == null) { if (!TextUtils.isEmpty(taskEditText.getText().toString())) saveTask(taskEditText.getText().toString()); else Toast.makeText(getActivity(), "Enter some task", Toast.LENGTH_SHORT).show(); } else { int id = getArguments().getInt(MainActivity.TASK_ID); boolean isDone = getArguments().getBoolean(MainActivity.TASK_DONE_TAG); if (!TextUtils.isEmpty(taskEditText.getText().toString())) updateTask(taskEditText.getText().toString(), id, isDone); else Toast.makeText(getActivity(), "Enter some task", Toast.LENGTH_SHORT).show(); } } }); return dialog; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initDialog() {\n }", "void makeDialog()\n\t{\n\t\tfDialog = new ViewOptionsDialog(this.getTopLevelAncestor());\n\t}", "public abstract void initDialog();", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n\n View view = getActivity().getLayoutInflater().inflat...
[ "0.7291449", "0.7247376", "0.7065539", "0.70014375", "0.68703413", "0.6806301", "0.67885405", "0.66801375", "0.6663293", "0.65758467", "0.65478927", "0.64909637", "0.6490818", "0.6487391", "0.64851034", "0.6481731", "0.6477016", "0.6477016", "0.64734775", "0.64672804", "0.646...
0.0
-1
================================================= Helper functions =================================================
public boolean isIpAccessible(String url) { URL img = null; try { img = new URL(url); InputStream s = img.openStream(); byte[] b = new byte[256]; s.read(b); String str = new String(b); System.out.println(str); s.close(); return true; } catch (java.io.IOException e) { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected boolean func_70814_o() { return true; }", "private Util() { }", "private void strin() {\n\n\t}", "private FormatUtilities() {}", "public void method_4270() {}", "Compatibility compatibility();", "private stendhal() {\n\t}", "private AsciiUtils() {\r\n\t}", "private void someUtilityMethod(...
[ "0.5342146", "0.52641", "0.52439773", "0.5167008", "0.5120976", "0.5072847", "0.5039364", "0.497238", "0.49549946", "0.49549946", "0.4946316", "0.49234262", "0.4918403", "0.4918403", "0.4918403", "0.4918403", "0.49137953", "0.49112824", "0.49112824", "0.4890153", "0.48844203"...
0.0
-1
Created duke on 2018/7/8
@Mapper public interface BlogArticleExtendMapper { /** * 根据用户id查找 * * @param userId 用户id * @param tag 标签 * @param type 类别 * @return List<BlogArticleList> */ List<BlogArticleList> selectByUserId(@Param("userId") String userId, @Param("tag") String tag, @Param("type") String type); /** * 访问次数加一 * * @param id 主键 * @param articleViews 访问次数 */ void updateArticleViewsById(@Param("id") String id, @Param("articleViews") int articleViews); /** * 最新文章推荐 * * @param userId 当前用户id * @return List<BlogArticleList> */ List<BlogArticleList> latestRecommendedArticles(@Param("userId") String userId); /** * 文章归档查询 * * @param userId 当前用户id * @return List<BlogArticleList> */ List<BlogArticleList> archiveQuery(@Param("userId") String userId); /** * 查询当前文章创建时间之前的文章 * * @param createTime 当前时间 * @return List<BlogArticleDetail> */ List<BlogArticleDetail> selectPreviousArticles(@Param("createTime") String createTime); /** * 查询当前文章创建时间之后的文章 * * @param createTime 当前时间 * @return List<BlogArticleDetail> */ List<BlogArticleDetail> selectNextArticles(@Param("createTime") String createTime); /** * 根据id查找 * * @param id 主键 * @return BlogArticleDetail */ List<BlogArticleDetail> selectById(@Param("id") String id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private void poetries() {\n\n\t}", "public final void mo51373a() {\n }", "private static void cajas() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n public void func_10411...
[ "0.6093624", "0.5939952", "0.58097476", "0.5788523", "0.57612616", "0.57570136", "0.57068855", "0.5663334", "0.5663334", "0.56573445", "0.5622766", "0.5617879", "0.56053543", "0.55907744", "0.5587536", "0.5576542", "0.5537449", "0.55252033", "0.5513745", "0.55008787", "0.5494...
0.0
-1
Creates a new Magnifier object which will look for changes in the specified source component for mouse/graphics changes.
public MagnifyingGlass( Component source ){ this.source = source; this.magnifier = this; try { robot = new Robot(); source.addMouseMotionListener( this ); } catch (AWTException awte) { System.err.println( "Can't get a Robot" ); awte.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void recomputeCoordinatesToSource(MouseEvent oldEvent, Object newSource) {\n/*\n Point3D newCoordinates = InputEventUtils.recomputeCoordinates(pickResult, newSource);\n x = newCoordinates.getX();\n y = newCoordinates.getY();\n z = newCoordinates.getZ();\n*/\n Point2D newCoordinat...
[ "0.56978726", "0.54422617", "0.5309248", "0.5291753", "0.5241688", "0.5196536", "0.5169899", "0.51400286", "0.5133978", "0.5126825", "0.50447404", "0.5031661", "0.50296205", "0.50219333", "0.50063694", "0.50011486", "0.49891698", "0.49532425", "0.49364257", "0.48979402", "0.4...
0.72840464
0
width, height are size of this comp / zoom
private Rectangle computeGrabRect() { int grabWidth = (int) ((double) magnifierSize.width / zoom); int grabHeight = (int) ((double) magnifierSize.height / zoom); // upper left corner is current point return new Rectangle(point.x-grabWidth/2, point.y-grabHeight/2, grabWidth, grabHeight); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void componentResized(ComponentEvent e) {\n\t\twidthAttitude=e.getComponent().getSize().getWidth()/Width;\n\t\theightAttitude=e.getComponent().getSize().getHeight()/Height;\n\t}", "private void updateSize() {\n double width = pane.getWidth();\n double height = pane.getHeight();\...
[ "0.6820923", "0.66620463", "0.65868914", "0.6569152", "0.65087026", "0.6500107", "0.64577305", "0.6452996", "0.6432901", "0.64099103", "0.64099103", "0.64006716", "0.6385712", "0.63121516", "0.62608397", "0.6260694", "0.62516105", "0.62446886", "0.622437", "0.620083", "0.6198...
0.0
-1
Sets the zoom factor
public void setZoom( double zoom ) { this.zoom = zoom; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setZoom(float zoom){\r\n zoom = zoom * 100;\r\n zoom = Math.round(zoom);\r\n this.zoom = Math.max(zoom / 100, 0.01f);\r\n }", "public void setZoomFactor( double inZoomFactor )\r\n {\r\n if( inZoomFactor <= 0 )\r\n throw new RuntimeException( \"Zoom factor \" + in...
[ "0.82209474", "0.8122921", "0.80625165", "0.8054414", "0.80429643", "0.8029586", "0.80137765", "0.79669267", "0.7789179", "0.776139", "0.7758881", "0.7753996", "0.77426255", "0.7720532", "0.77013546", "0.76736367", "0.7670115", "0.764905", "0.76428956", "0.7603198", "0.756814...
0.7628953
19
Sets the component to draw the magnifier graphics onto
public void setMagnifierComponent( Component magnifier ) { this.magnifier = magnifier; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private JPanel getJPanelMag() {\r\n\t\tif (jPanelMag == null) {\r\n\t\t\tjPanelMag = new JPanel();\r\n\t\t\tjPanelMag.setBorder(new EmptyBorder(0, 0, 0, 0));\r\n\t\t\tjPanelMag.setLayout(new BorderLayout());\r\n\t\t\tjLabelMag = new JLabel(\"Magnification: \");\r\n\t\t\tjLabelMag.setToolTipText(\"Magnification for...
[ "0.6087736", "0.5986878", "0.5890067", "0.5879599", "0.5879599", "0.5875454", "0.5836692", "0.5820215", "0.58000654", "0.57402784", "0.5734832", "0.5716801", "0.5675721", "0.5672296", "0.56677157", "0.56518346", "0.5641191", "0.563784", "0.56253153", "0.5619525", "0.5618068",...
0.7449795
0
Create the collection of futures.
private Future<String> processHosts(List<String> input) { List<Future<String>> futures = input.stream() .map(str -> supplyAsync(() -> callApi(str))) .collect(toList()); // Restructure as varargs because that's what CompletableFuture.allOf requires. CompletableFuture<?>[] futuresAsVarArgs = futures .toArray(new CompletableFuture[futures.size()]); // Create a new future that completes once once all of the previous futures complete. CompletableFuture<Void> jobsDone = CompletableFuture.allOf(futuresAsVarArgs); CompletableFuture<String> output = new CompletableFuture<>(); // Once all of the futures have completed, build out the result string from results. jobsDone.thenAccept(ignored -> { StringBuilder stringBuilder = new StringBuilder(); futures.forEach(f -> { try { stringBuilder.append(f.get()); } catch (Exception e) { output.completeExceptionally(e); } }); output.complete(stringBuilder.toString()); }); return output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "FutureEventList() {\n q = new PriorityQueue<Event>(10, new EventComperator());\n }", "public ExecutorService createExecutor() {\n return getCamelContext().getExecutorServiceManager().newThreadPool(this, endpointName,\n 1, 5);\n }", "public Collection<Service> createSe...
[ "0.60031646", "0.57103735", "0.5701393", "0.56721246", "0.5662557", "0.5606505", "0.55338806", "0.5490541", "0.5422867", "0.5344248", "0.53221655", "0.530769", "0.530769", "0.530769", "0.5302536", "0.5301003", "0.52969414", "0.5294215", "0.52750206", "0.5249637", "0.52148145"...
0.0
-1
Examen examen = new Examen(); Act do whatever the Profesor wants to do. This method is called whenever the 'Act' or 'Run' button gets pressed in the environment.
public void act() { mueve(); //tocaJugador(); //bala(); disparaExamen(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void act() \r\n {\r\n \r\n // Add your action code here\r\n MovimientoNave();\r\n DisparaBala();\r\n Colisiones();\r\n //muestraPunto();\r\n //archivoTxt();\r\n }", "public void act() \n {\n // Add your action code here.\n MyWorld world = (...
[ "0.62075114", "0.61679137", "0.61540055", "0.614689", "0.61322945", "0.603556", "0.59980255", "0.59980255", "0.5995103", "0.59741485", "0.5956023", "0.59451485", "0.59377867", "0.59372264", "0.5914165", "0.5902123", "0.5900726", "0.5863821", "0.58495873", "0.5848576", "0.5843...
0.70452654
0
Created by az on 050617.
public interface PeopleListView { void showSpinner(); void hideSpinner(); void onPeoplePageLoaded(List<Person> person); void onPersonSelected(int personId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }...
[ "0.5717231", "0.57156324", "0.5681588", "0.5604532", "0.5586142", "0.5531733", "0.5502886", "0.549792", "0.54818994", "0.5441056", "0.5435029", "0.54170346", "0.54170346", "0.54170346", "0.54170346", "0.54170346", "0.5404721", "0.5404721", "0.5395476", "0.5395267", "0.5390597...
0.0
-1
/ Getters and setters
public KeyPair getKeyPair() { return keyPair; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void get() {}", "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "protected abstract Set method_1559();", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void setAge(int age) { this.age = age; }", "@Override\n\tp...
[ "0.646901", "0.6434069", "0.6405327", "0.6374714", "0.61492217", "0.6088488", "0.6079561", "0.6056365", "0.6019692", "0.5977231", "0.597154", "0.5964837", "0.59290606", "0.5922731", "0.5914227", "0.59035057", "0.5893521", "0.5888251", "0.5875859", "0.58580583", "0.5830215", ...
0.0
-1