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
Starts an infinite loop to proccess all messages from the gameserver
public void processConnection() { executorService.execute(() -> { while (true) { try { String msg = input.readLine(); if (msg != null) { if(msg.startsWith(Constants.GAMESTART)) { // Makes the gameClientUIController if the message ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void run()\n\t\t{\twhile(true)\n\t\t\t{\tString s = ChatServer.message.get();\n\t\t\t\tsynchronized(ChatServer.sessions)\n\t\t\t\t{\tfor(int i = 0; i < ChatServer.size; ++i)\n\t\t\t\t\t\tif(ChatServer.sessions[i] != null)\n\t\t\t\t\t\t\tChatServer.sessions[i].println(s);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "publ...
[ "0.7456891", "0.7409652", "0.7366124", "0.7143045", "0.71273834", "0.71092993", "0.70540446", "0.7036178", "0.69862396", "0.69748735", "0.69706446", "0.69642174", "0.69606847", "0.69341916", "0.69298726", "0.6928711", "0.6904826", "0.68956876", "0.6885966", "0.6879019", "0.68...
0.0
-1
Makes an new tab to be added to the gameTabs in Main and setOnClosed on the tab to remove every object that is in the tab, and sends gamelost to globalserver and disconnet to gameserver
public void createNewLobby() { Platform.runLater(() -> { Tab tab = new Tab("Ludo"); tab.setId(hostName); tab.setClosable(true); tab.setOnClosed(new EventHandler<Event>() { @Override public void handle(Event e) { //String dcPlayer; int p, turnowner; if (gameClientUIController != null) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void closeTab() {\n\t\tclose();\n\t\t\n\t\tfor(int i = 0; i < Main.gameTabs.getTabs().size(); i++) {\n\t\t\tif(Main.gameTabs.getTabs().get(i).getId().equals(hostName)) {\n\t\t\t\tMain.gameTabs.getTabs().remove(i);\n\t\t\t}\n\t\t}\n\t\tfor (int i=0; i<Main.gameHandler.size(); i++) {\n\t\t\tif(hostName.equals...
[ "0.70398337", "0.5954397", "0.5946506", "0.59033495", "0.5900991", "0.5891232", "0.5856635", "0.5849248", "0.58168983", "0.57753867", "0.57685137", "0.5767361", "0.5741849", "0.57101846", "0.57095134", "0.5703977", "0.57006854", "0.5669824", "0.5645984", "0.56411636", "0.5616...
0.6678177
1
Shuts down the threads and closes the connection to the gameserver and the output and input
public void close() { try { executorService.shutdownNow(); output.close(); input.close(); connection.close(); } catch (IOException ioe) { Main.LOGGER.log(Level.SEVERE, "Error closing GameHandler", ioe); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void shutdown() {\n\t\ttry {\n\t\t\tsock.close();\n\t\t\tgame.handleExit(this);\n\t\t\tstopped = true;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "public void shutdown() {\n mGameHandler.shutdown();\n mTerminalNetwork.terminate();\n }", "public void close...
[ "0.7544592", "0.7451581", "0.7077937", "0.7037906", "0.69299436", "0.6869722", "0.6807534", "0.6791056", "0.67752445", "0.6769395", "0.66646284", "0.6661071", "0.6647492", "0.65935016", "0.65825254", "0.6571965", "0.65574443", "0.65570796", "0.65563756", "0.65440387", "0.6533...
0.71321213
2
closes the connection too gameserver and removes the gameTab object from list and the gameHandler object from list aswell
public void closeTab() { close(); for(int i = 0; i < Main.gameTabs.getTabs().size(); i++) { if(Main.gameTabs.getTabs().get(i).getId().equals(hostName)) { Main.gameTabs.getTabs().remove(i); } } for (int i=0; i<Main.gameHandler.size(); i++) { if(hostName.equals(Main.gameHandler.get(i).getHostName(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void endGame() {\r\n\t\tthis.gameStarted = false;\r\n\t\tthis.sendMessages = false;\r\n\t\tthis.centralServer.removeServer(this);\r\n\t}", "void stopGame() {\n leader.disconnect();\n opponent.disconnect();\n }", "public void endSession(){\n\t\t//remove this session from the server's lis...
[ "0.6896574", "0.6812422", "0.64981127", "0.64826274", "0.6438239", "0.6332159", "0.62736315", "0.6257594", "0.6251235", "0.6240662", "0.6188236", "0.6162338", "0.6114806", "0.6083026", "0.6074053", "0.60386944", "0.6009477", "0.59983164", "0.5980884", "0.5977479", "0.596653",...
0.73307973
0
Get the lobby type of the GameHandler object
public boolean getCaseNr() { return caseNr == 1? true : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SpawnType getLobbySpawnType();", "public static GameType getGameType() {\n\t\treturn type;\n\t}", "public String getGameType() {\n return gameType;\n }", "SpawnType getGameSpawnType();", "public static int getGameType()\n\t{\n\t\treturn -1;\n\t}", "public String getLoadGameType(){\n return m...
[ "0.7356613", "0.68326735", "0.6581752", "0.65409267", "0.6423778", "0.6073682", "0.603716", "0.6006504", "0.6001789", "0.5978057", "0.59503585", "0.58741295", "0.58424336", "0.581004", "0.5796882", "0.579087", "0.5774549", "0.5678488", "0.5640282", "0.5619594", "0.55757505", ...
0.0
-1
Removes the player from the playerList in createGameLobby
public void removePlayer(String name) { createGameLobbyController.removePlayerFromList(name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void removePlayerFromLobby() {\n\n //Added Firebase functionality assuming var player is the player who wants to leave the game.\n }", "public void removePlayer(Player player){\n playerList.remove(player);\n }", "public void RemovePlayerFromList(ClientThread client){\n this.clien...
[ "0.84079176", "0.8250467", "0.7944924", "0.77913123", "0.76704544", "0.7524416", "0.7478901", "0.7459603", "0.7424071", "0.7341497", "0.73153555", "0.7274008", "0.7202573", "0.7196884", "0.7167193", "0.7122457", "0.7087832", "0.70442337", "0.70027214", "0.6982537", "0.6953969...
0.74346656
8
Adds the player too the playerList in createGameLobby
public void addPlayer(String name) { createGameLobbyController.addPlayerToList(name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addPlayer(Player player) {\n playerList.add(player);\n }", "public void addPlayer(Player player){\n players.add(player);\n }", "public void addPlayerToTheList(){\n \tif(!txtFieldPlayerName.getText().trim().isEmpty() && totPlayers <= maximumPlayersAllowed){\n\t\t\t\n \t\t//...
[ "0.7719552", "0.75731486", "0.75569135", "0.7341981", "0.72416544", "0.7165818", "0.7115767", "0.7059356", "0.703496", "0.7006957", "0.6993796", "0.69876945", "0.69548774", "0.6906639", "0.6898235", "0.68825585", "0.6847397", "0.68394", "0.6828121", "0.67872465", "0.67517364"...
0.74242
3
Prevent this class from being initiated without parameters.
public DrawDataParser(String dataFilename, DrawList drawList, JLabel progress) { objectList = new ArrayList<>(); this.dataFilename = dataFilename; this.progress = progress; this.drawList = drawList; drawList.getDrawInstructorList().clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private InterpreterDependencyChecks() {\r\n\t\t// Hides default constructor\r\n\t}", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "private Consts(){\n //this prevents even the native class from \n //calling this ctor as well :\n throw new Assertio...
[ "0.69365466", "0.6926067", "0.6614497", "0.6595904", "0.6585456", "0.65673023", "0.6543953", "0.6464658", "0.64425766", "0.64425766", "0.64425766", "0.64425766", "0.64425766", "0.6406679", "0.6403683", "0.6348572", "0.63439065", "0.63278574", "0.6320298", "0.6312356", "0.6307...
0.0
-1
Returns the parsed draw data.
public DrawList getDrawList() { return(drawList); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Response getDraws() {\n final List<StandardDraw> allDraws = this.jdbcGameDAO.getDraws();\n Object data = new Object() {\n public List<StandardDraw> draws = allDraws;\n };\n DataResponse response = (DataResponse) ResponseFactory.makeResponse(ResponseType.SUCCESSDATA);\n...
[ "0.6005034", "0.5682695", "0.5522409", "0.5480768", "0.5342697", "0.5250051", "0.523309", "0.52054054", "0.51432216", "0.5096106", "0.5081969", "0.5062454", "0.50605625", "0.50401515", "0.50392544", "0.49644136", "0.49407485", "0.4930918", "0.491852", "0.4915445", "0.49129844...
0.51783514
8
This test validates the anomalies of the email
@Test public void testEmailAnomalies() { Assert.assertEquals(emailValidator.isValid("aa@test.com", constraintValidatorContext), false); Assert.assertEquals(emailValidator.isValid("aa@testcom", constraintValidatorContext), false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(priority=1)\n\tpublic void testEmailValidity() {\n\t\tsignup.clearAllFields();\n\t\tsignup.enterId(\"123@abc\");\n\t\tsignup.clickSubmit();\n\t\tList<String> errors = signup.getErrors();\n\t\tAssert.assertTrue(TestHelper.isStringPresent(errors, \"Please enter a valid email address in the format someone@examp...
[ "0.7993293", "0.7373232", "0.7265124", "0.7177329", "0.7095871", "0.7087211", "0.7061096", "0.69921154", "0.69921154", "0.6964467", "0.6951355", "0.6907052", "0.68703043", "0.68695354", "0.68412244", "0.6836879", "0.6827698", "0.6767793", "0.67275137", "0.6715506", "0.6700443...
0.79405934
1
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { n7 = new javax.swing.JButton(); n4 = new javax.swing.JButton(); n1 = new javax.swing.JButton(); jButton4 = new javax.swing.JBu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.7322098", "0.7292275", "0.7292275", "0.7292275", "0.72872275", "0.72507876", "0.7214814", "0.7209056", "0.7197325", "0.71918863", "0.71856284", "0.7160448", "0.7148918", "0.7094831", "0.70820963", "0.70585436", "0.6988433", "0.6978755", "0.69569016", "0.6955245", "0.694635...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { }
{ "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
Encode the api key in the following format: Base64(jsonStr) + "." + Signature jsonStr is the json string of the API Key.
private String encode(APIKey apiKey) { if (!signer.sign(apiKey)) { return null; } String json = apiKey.toJson(); String base64 = new String(Base64.getEncoder().encode(json.getBytes())); return String.format("%s.%s", base64, apiKey.getApiKeySignature()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String encodeKey() {\n byte[] keyByte = secretKey.getEncoded();\n return Base64.getEncoder().encodeToString(keyByte);\n }", "@SuppressWarnings(\"unused\")\n private static String getKeyString(Key key)\n {\n return Base64.encode(key.getEncoded());\n }", "public String enc...
[ "0.7398408", "0.6743126", "0.65185887", "0.64692885", "0.63090956", "0.6083023", "0.6052846", "0.5901758", "0.58952403", "0.5891281", "0.585947", "0.58130646", "0.57542825", "0.5749955", "0.57391304", "0.5720811", "0.5695697", "0.56569725", "0.5641885", "0.5614289", "0.559352...
0.8099042
0
creates random list object.
public void add(T element) { if (element == null) { throw new IllegalArgumentException(); } if (size == elements.length) { resize(elements.length * 2); } elements[size()] = element; size++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ListNode createList(int len) {\r\n\t\tListNode head = null;\r\n\t\tRandom r = new Random(10);\r\n\t\tfor (int i = 0; i < len; ++i) {\r\n\r\n\t\t\thead = createNode(head, r.nextInt(20) + 1);\r\n\t\t}\r\n\r\n\t\treturn head;\r\n\t}", "ListType createListType();", "@BeforeEach\n public void createList() {...
[ "0.697281", "0.6904797", "0.68353033", "0.6817334", "0.6728383", "0.67091155", "0.6680936", "0.66534686", "0.6649112", "0.66375077", "0.66250414", "0.65731794", "0.6518914", "0.65065277", "0.6480622", "0.64706117", "0.64247125", "0.6413622", "0.63896996", "0.63660127", "0.634...
0.0
-1
Creates random list object.
public T remove() { if (size() == 0) { return null; } int r = new Random().nextInt(size()); T deleted = elements[r]; elements[r] = elements[size() - 1]; elements[size() - 1] = null; size--; if (size() > 0 && size() < elements.length / 4) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ListType createListType();", "public ListNode createList(int len) {\r\n\t\tListNode head = null;\r\n\t\tRandom r = new Random(10);\r\n\t\tfor (int i = 0; i < len; ++i) {\r\n\r\n\t\t\thead = createNode(head, r.nextInt(20) + 1);\r\n\t\t}\r\n\r\n\t\treturn head;\r\n\t}", "@Before(value = \"@createList\", order = ...
[ "0.6955441", "0.6943084", "0.693318", "0.6884487", "0.6866235", "0.6679395", "0.66686755", "0.6554224", "0.65355897", "0.6495921", "0.64541245", "0.6448108", "0.6430855", "0.642781", "0.64248794", "0.636934", "0.63671434", "0.6364984", "0.63641626", "0.6361636", "0.6331502", ...
0.0
-1
returns a random element from the list.
public T sample() { if (size == 0) { return null; } int r = new Random().nextInt(size()); return elements[r]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private <T> T getRandomElement(List<T> list) {\n return list.get(randomInt(0, list.size()));\n }", "public static <T> T getRandomElement(List<T> list) {\n \tint index = (int) (Math.random() * list.size());\n \treturn list.get(index);\n }", "public T getRandomElement() {\n\t\treturn this.item...
[ "0.8660583", "0.84192747", "0.8358425", "0.8058066", "0.80115414", "0.8010426", "0.79590166", "0.79393667", "0.79290086", "0.78772366", "0.78555274", "0.78445035", "0.7775783", "0.77437127", "0.76615185", "0.76353854", "0.75522065", "0.75321114", "0.7526338", "0.74856406", "0...
0.7458382
20
returns the size of the list.
public int size() { return size; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getSize(){\n\t\tint size = list.size();\n\t\treturn size;\n\n\t}", "public int size()\n\t{\n\t\treturn listSize;\n\t}", "public int size()\n\t{\n\t\treturn list.size();\n\t}", "public int size()\n\t{\n\t\treturn list.size();\n\t}", "public int size() {\n\t\treturn list.size();\n\t}", "public i...
[ "0.89357024", "0.87753654", "0.8759933", "0.8759933", "0.8733208", "0.87145895", "0.87145895", "0.8713198", "0.8707452", "0.8706073", "0.868505", "0.86572325", "0.8613991", "0.858036", "0.8498911", "0.849657", "0.8492269", "0.84854424", "0.84484386", "0.8426211", "0.84228754"...
0.0
-1
checks if the list is empty.
public boolean isEmpty() { return size == 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic boolean isEmpty() {\n\t\treturn list.isEmpty();\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn list.isEmpty();\n\t}", "public boolean empty() {\n\t\treturn list.size() == 0;\n\t}", "@Override\n public boolean isEmpty()\n {\n return list.size()<1;\n }", "publ...
[ "0.8738737", "0.8738737", "0.8603385", "0.8587965", "0.8562329", "0.85030586", "0.84851426", "0.84728616", "0.84172237", "0.8408726", "0.839925", "0.839511", "0.8392329", "0.8383352", "0.83308387", "0.83262706", "0.82466185", "0.8205953", "0.8173681", "0.8061332", "0.7975319"...
0.76217824
91
resizes elements[] for dynamic memory usage.
@SuppressWarnings("unchecked") private void resize(int capacity) { T[] array = (T[]) new Object[capacity]; for (int i = 0; i < size(); i++) { array[i] = elements[i]; } elements = array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void reallocate() {\n\t\tthis.capacity *= 2;\n\t\tObject[] newElements = new Object[this.capacity];\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tnewElements[i] = this.elements[i];\n\t\t}\n\n\t\tthis.elements = newElements;\n\t}", "private void ensureCapacity() {\n int newSize = elements.length *...
[ "0.7207799", "0.7163014", "0.7127496", "0.71152407", "0.7015852", "0.69402564", "0.691008", "0.68573457", "0.6820117", "0.68095064", "0.67678744", "0.6671419", "0.65875137", "0.65131277", "0.6511726", "0.64367735", "0.6405471", "0.63384604", "0.63139784", "0.6298227", "0.6253...
0.6882701
7
creates special iterator, "Iteration," for program.
Iteration(T[] array, int amount) { items = array; count = amount; now = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Iterator<E> createIterator();", "IteratorExp createIteratorExp();", "private static void iterator() {\n\t\t\r\n\t}", "public OpIterator iterator() {\n // some code goes here\n // throw new\n // UnsupportedOperationException(\"please implement me for lab2\");\n retu...
[ "0.7276484", "0.7227165", "0.6974441", "0.68473226", "0.67924184", "0.67897546", "0.6655805", "0.6649121", "0.65932214", "0.6514683", "0.6440364", "0.6440194", "0.64350116", "0.64307135", "0.63918453", "0.6389721", "0.6322231", "0.6322231", "0.6322231", "0.6322231", "0.629134...
0.0
-1
returns next element of the list.
public T next() { if (!hasNext()) { throw new NoSuchElementException(); } return items[now++]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ListElement<T> getNext()\n\t{\n\t\treturn next;\n\t}", "public ListElement getNext()\n\t {\n\t return this.next;\n\t }", "public int next() {\r\n\t\tif (currentPosition <= list.length &&list[currentPosition]==-1) {\r\n\t\t\tcurrentPosition = 0;\r\n\t\t\treturn list[currentPosition];\r\n\t\t...
[ "0.8159445", "0.7962273", "0.7923078", "0.78052515", "0.77194124", "0.7705978", "0.7674471", "0.7670007", "0.7635139", "0.76340044", "0.763341", "0.76333", "0.7632475", "0.75563514", "0.75528234", "0.7521339", "0.7515686", "0.75076044", "0.7502943", "0.7479111", "0.74679124",...
0.72883034
36
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new java...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.73191476", "0.72906625", "0.72906625", "0.72906625", "0.72860986", "0.7248112", "0.7213479", "0.72078276", "0.7195841", "0.71899796", "0.71840525", "0.7158498", "0.71477973", "0.7092748", "0.70800966", "0.70558053", "0.69871384", "0.69773406", "0.69548076", "0.69533914", "...
0.0
-1
TEST propertyNames(), getProperties(), exists(), remove() which are all not supported.
@Test( expected = UnsupportedOperationException.class ) public void whenCallingPropertyNames() { UserParametersStub lStub = new UserParametersStub( USER_ID, PARM_TYPE ); lStub.propertyNames(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasGetProperty();", "public void _getProperties() {\n Property[] properties = oObj.getProperties();\n IsThere = properties[0];\n tRes.tested(\"getProperties()\", ( properties != null ));\n return;\n }", "public void _hasPropertyByName() {\n requiredMethod(\"getProp...
[ "0.7165378", "0.6639066", "0.6614955", "0.65867347", "0.64468884", "0.6443442", "0.6391131", "0.6292787", "0.62565285", "0.62565285", "0.62565285", "0.6243293", "0.6225362", "0.6218884", "0.6196945", "0.6184686", "0.61461496", "0.61318743", "0.6085039", "0.6065975", "0.602383...
0.68492824
1
creates a new random int
private static void chaotic(int lines) { Random rand = new Random(); //prints out a random amout of * from 1 to 5 for every line for (int i = 0; i < lines; i++) { int length = rand.nextInt(5) + 1; for(int o = 0; o < length; o++) System.out.print("* ")...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int generateRandomNumber() {\n\t\treturn new SplittableRandom().nextInt(0, 3);\n\t}", "public static int generateRandomNumber()\n\t{\n\t\tRandom r = new Random();\n\t\treturn r.nextInt();\n\t}", "private int generateRandomNumber() {\n\t\treturn (int) Math.floor(Math.random() * Constants.RANDOM_NUMBER_G...
[ "0.7342226", "0.7296996", "0.7267132", "0.7118677", "0.71062225", "0.7080897", "0.70787203", "0.70154107", "0.7009579", "0.6985988", "0.69859076", "0.6855901", "0.6833068", "0.6823475", "0.681815", "0.6800104", "0.6787526", "0.6775367", "0.6760195", "0.67518204", "0.67423856"...
0.0
-1
File f= new File("D:\\Test1.txt");
public static void main(String[] args)throws IOException { FileReader fr= new FileReader("D:\\Test1.txt"); BufferedReader br= new BufferedReader(fr); String line=null; while((line=br.readLine())!=null) { System.out.println(line); } // int ch=0; // while( (ch=fr.read())!=-1) { // System.out.prin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "File openFile();", "public static File getTestFile( String path )\r\n {\r\n return new File( getBasedir(), path );\r\n }", "public static void main(String[] args) throws IOException {\n\t\t\n\t\tFile f = new File(\"c:\\\\Ranjan\", \"ranjan1.txt\");\n\t\tf.createNewFile();\n\t\t\n\t\tSystem.out.pri...
[ "0.6981822", "0.6647941", "0.6611481", "0.6510708", "0.6423828", "0.63764", "0.63764", "0.628062", "0.6265397", "0.6211432", "0.61901975", "0.61666834", "0.61666834", "0.61600864", "0.61600864", "0.61600864", "0.61264724", "0.61242586", "0.6111715", "0.60716677", "0.6019981",...
0.0
-1
A partir del precio y el dinero introducido calcula las monedas que se dan de cambio
public float calcular(float dinero, float precio) { // Cálculo del cambio en céntimos de euros cambio = Math.round(100 * dinero) - Math.round(100 * precio); // Se inicializan las variables de cambio a cero cambio1 = 0; cambio50 = 0; cambio100 = 0; // Se guar...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calcular() {\n int validar, c, d, u;\n int contrasena = 246;\n c = Integer.parseInt(spiCentenas.getValue().toString());\n d = Integer.parseInt(spiDecenas.getValue().toString());\n u = Integer.parseInt(spiUnidades.getValue().toString());\n validar = c * 100 + d ...
[ "0.6841928", "0.6757906", "0.67065114", "0.670518", "0.6675682", "0.6572065", "0.6499119", "0.6467624", "0.6466295", "0.6456761", "0.6439164", "0.6437664", "0.64080834", "0.6398176", "0.63961625", "0.63895774", "0.63828003", "0.63701355", "0.6347993", "0.63461", "0.6336527", ...
0.68701977
0
Resta el valor de 1 euro del cambio a devolver Quita una moneda de 1 euro del cambio disponible Suma una moneda de 1 euro al cambio que se va a devolver
private void devolver100() { cambio = cambio - 100; de100--; cambio100++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void restaApostado() {\n\t\tif(apostado.get() >= 1.0) apostado.set(apostado.get() -1.0);\n\t\t\tdiruField.setText(String.format(\"%.2f\", apostado.get()));\n\t\t\tactualizaPremio();\n\t\t\t\n\t}", "public float calcular(float dinero, float precio) {\n // Cálculo del cambio en céntimos de euros ...
[ "0.6333649", "0.628985", "0.627882", "0.6106075", "0.608437", "0.600551", "0.5984", "0.5908423", "0.5883073", "0.58661306", "0.58616865", "0.58439124", "0.5797248", "0.57938725", "0.57806355", "0.5771237", "0.5751305", "0.5746788", "0.5742237", "0.5735223", "0.5732124", "0....
0.0
-1
need to close is after using this method
public static InputStream getInputStream(String pageURL) throws IOException{ InputStream is = null; URL url = new URL(pageURL); URLConnection conn = url.openConnection(); conn.setUseCaches(false); conn.addRequestProperty("User-agent", Common.USER_AGENT); is = conn.getInpu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void close() {\n \n }", "public void close() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void close() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void close() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void close() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void close() {...
[ "0.78826433", "0.7824925", "0.78063136", "0.77648365", "0.775799", "0.775799", "0.77321124", "0.7731727", "0.76930255", "0.76930255", "0.76848817", "0.76039195", "0.7603076", "0.75936484", "0.75936484", "0.75936484", "0.75936484", "0.75714606", "0.75524527", "0.75524527", "0....
0.0
-1
Converting to future to avoid Schedulers.parallel() complaining about blocking method. For now reactor has no descent functionality to implement blocking cancellation
@SneakyThrows private void unsubscribe(String name) { call("unsubscribe", new Subscription(name)).toFuture().get(UNSUBSCRIBE_DELAY_S, TimeUnit.SECONDS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ChannelProgressivePromise awaitUninterruptibly()\r\n/* 113: */ {\r\n/* 114:144 */ super.awaitUninterruptibly();\r\n/* 115:145 */ return this;\r\n/* 116: */ }", "CompletableFuture<Void> cancel();", "public interface Future\n{\n\n public abstract boolean cancel(boolean flag);\n\n p...
[ "0.5892243", "0.58446735", "0.5823648", "0.57227033", "0.5604659", "0.5556579", "0.5517476", "0.5516465", "0.551065", "0.5478412", "0.5448509", "0.5418378", "0.5376261", "0.5284939", "0.5281578", "0.5181157", "0.51761496", "0.515399", "0.51408875", "0.513859", "0.5130523", ...
0.0
-1
The namespace of the vocabulary as a string
public static String getURI() {return NS;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getNamespace();", "String getNamespaceStringValue(Object ns);", "String getNamespace();", "String getNamespace();", "String getNamespace();", "public String getNamespace();", "String getNamespacePrefix(Object ns);", "public Optional<String> namespace() {\n return Codegen.strin...
[ "0.7491037", "0.7414067", "0.7382713", "0.7382713", "0.7382713", "0.7055525", "0.6924792", "0.68687934", "0.6809705", "0.6761348", "0.6761348", "0.6761348", "0.67490065", "0.67237246", "0.66745615", "0.6659763", "0.6654354", "0.65830463", "0.6580599", "0.6573777", "0.6550614"...
0.0
-1
constructor: it can receive an EPackage, a list of EPackage, or a URI
public MuMetaModel(String uri) { this(EMFUtils.loadEcoreMetamodel(uri)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public EmployeePackage(NetworkType type, List<String> employee, String businessId, String serviceId) {\n super(type);\n this.employeeIds = employee;\n this.businessId = businessId;\n this.serviceId = serviceId;\n }", "public ItemFactory(final String url) {\n this.url = url;...
[ "0.6043489", "0.55163234", "0.5408586", "0.5369967", "0.5333423", "0.53191257", "0.5201338", "0.5188508", "0.5170015", "0.51497674", "0.5113373", "0.51021284", "0.5091893", "0.5089946", "0.5047352", "0.5045921", "0.5038914", "0.50305605", "0.5030184", "0.5028946", "0.49683926...
0.4762576
47
search classifier in the metamodel
public EClassifier getEClassifier (String classifier) { EClassifier cl = null; for (int i=0; i<this.packages.size() && cl==null; i++) cl = this.packages.get(i).getEClassifier(classifier); return cl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public void search();", "Classifier getClassifier();", "List<CabinClassModel> findCabinClasses();", "@Override\r\n\tpublic void search() {\n\r\n\t}", "public void search() {\r\n \t\r\n }", "@Override\n\tpublic void search() {\n\t}", "public void loadModel() throws SQLException {\n\t\tObj...
[ "0.5939348", "0.59285533", "0.5891307", "0.58726954", "0.58364576", "0.5810727", "0.5755398", "0.56820065", "0.55190796", "0.55090326", "0.55090326", "0.5506014", "0.54967535", "0.5479938", "0.54754436", "0.5470735", "0.54506755", "0.5443677", "0.5435942", "0.54358727", "0.54...
0.5128907
52
classifiers in the metamodel
public List<EClassifier> getEClassifiers () { return this.classifiers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Classifier getClassifier();", "@Override\r\n\tpublic void buildClassifier(Instances data) throws Exception {\n\r\n\t}", "public interface RelationalClassifier extends Classifier {\r\n}", "Classifier getBase_Classifier();", "public int getNumEClassifiers () { \r\n\t\treturn this.classifiers.size(); \r\n\t}"...
[ "0.68896455", "0.658784", "0.64331084", "0.63902545", "0.6316004", "0.61663747", "0.61640084", "0.60918987", "0.6050976", "0.59519655", "0.5947917", "0.59133595", "0.58535266", "0.58514977", "0.584957", "0.5847682", "0.58256686", "0.5819826", "0.5814447", "0.5813001", "0.5796...
0.65788287
2
number of classifiers in the metamodel
public int getNumEClassifiers () { return this.classifiers.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNumOfClasses();", "public int getFeaturesCount();", "int getFeaturesCount();", "@Override\n\tpublic int numClasses() {\n\t\treturn attributes[classIndex].numValues();\n\t}", "int sizeOfClassificationArray();", "public int getNumberOfClasses() {\n return 200;\n }", "int countFeat...
[ "0.73567456", "0.70556295", "0.70113695", "0.6986137", "0.6973137", "0.6793315", "0.6758595", "0.6758595", "0.6735773", "0.6717995", "0.66987646", "0.66890055", "0.66890055", "0.6687046", "0.66815567", "0.65245056", "0.6508267", "0.6503775", "0.6503775", "0.6474979", "0.64749...
0.7668918
0
name / uri / prefix of the bigger package in the metamodel
public String getName () { return this.name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String packageName();", "public abstract String getTargetPackage();", "public abstract String getTargetPackage();", "java.lang.String getPackage();", "protected abstract String getPackageName();", "MystPackage getMystPackage();", "ThingMLPackage getThingMLPackage();", "SmallEcorePacka...
[ "0.7031049", "0.695959", "0.695959", "0.65178394", "0.646751", "0.6446317", "0.6441703", "0.6291467", "0.6276656", "0.62723476", "0.6249071", "0.6208726", "0.6159915", "0.61581445", "0.61125857", "0.6102958", "0.6065828", "0.60304534", "0.6029082", "0.6002041", "0.59961873", ...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { DaemonThreadIntro t1 = new DaemonThreadIntro(); DaemonThreadIntro t2 = new DaemonThreadIntro(); DaemonThreadIntro t3 = new DaemonThreadIntro(); // Note: If you want to make a user thread as Daemon, it must not be // started otherwise it will throw IllegalThreadStateExc...
{ "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
Set the current value
private void setConditionAndListener(ObjectProperty<ConditionViewModel> property) { setCondition(property.get()); // Update for new values property.addListener((observable, oldValue, newValue) -> setCondition(newValue)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setValue(Object value) { this.value = value; }", "public void setValue(int new_value){\n this.value=new_value;\n }", "protected void assignCurrentValue() {\n\t\tcurrentValue = new Integer(counter + incrValue);\n\t}", "public void setValue (int newValue) {\n myValue = newValue...
[ "0.75991654", "0.7560505", "0.75031286", "0.74248004", "0.7420408", "0.7379292", "0.73730904", "0.73730904", "0.7349658", "0.732752", "0.7325561", "0.73142135", "0.73030514", "0.7245265", "0.7199208", "0.7193227", "0.71920115", "0.7188265", "0.7181555", "0.7179957", "0.717296...
0.0
-1
Initializes an authorized Analytics Reporting service object.
private static Analyticsreporting initializeAnalyticsReporting() throws GeneralSecurityException, IOException { httpTransport = GoogleNetHttpTransport.newTrustedTransport(); dataStoreFactory = new FileDataStoreFactory(DATA_STORE_DIR); // Load client secrets. GoogleClientSecrets clientSecrets = GoogleC...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ReportService() { }", "@Override\n protected void initAnalytics() {\n }", "public CommonPersonalReportServiceImpl() {\r\n }", "public void initialize() {\n\t\tDLog(\"ANEAnalyticsExtension initialize\");\n\t}", "public UnityAnalytics() {}", "public AdminAnalytics()\n {\n \tinstructo...
[ "0.6432411", "0.6412017", "0.6072301", "0.57406354", "0.5614828", "0.55830336", "0.55645293", "0.5534987", "0.5524249", "0.5519181", "0.54736984", "0.5458791", "0.5451434", "0.54360753", "0.54282856", "0.53832734", "0.53774154", "0.5376999", "0.5311944", "0.53109974", "0.5265...
0.77873814
0
Query the Analytics Reporting API V4. Constructs a request for the sessions for the past seven days. Returns the API response.
private static GetReportsResponse getReport(Analyticsreporting service) throws IOException { // Create the DateRange object. DateRange dateRange = new DateRange(); dateRange.setStartDate("7DaysAgo"); dateRange.setEndDate("today"); // Create the Metrics object. Metric sessions = new Metric() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GET(\"sdk/v5/sessions\")\n Call<SessionResponse> getSession(@Header(\"Authorization\") String Authorization);", "ScheduleTasks getScheduledHarvestingSessions(String dsID) throws RepoxException;", "@RequestMapping(value = \"/getTodayReport\", method = RequestMethod.GET)\r\n public @ResponseBody String getD...
[ "0.52614504", "0.5169401", "0.47319996", "0.47297323", "0.4718946", "0.4691638", "0.4685363", "0.4660034", "0.46248335", "0.4616688", "0.46096185", "0.4608382", "0.4572577", "0.45629373", "0.4559017", "0.45530057", "0.45284006", "0.4515722", "0.4509274", "0.4483595", "0.44757...
0.63320994
0
Parses and prints the Analytics Reporting API V4 response.
private static void printResponse(GetReportsResponse response) { for (Report report: response.getReports()) { ColumnHeader header = report.getColumnHeader(); List<String> dimensionHeaders = header.getDimensions(); List<MetricHeaderEntry> metricHeaders = header.getMetricHeader().getMetricHeaderEnt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void parseResponse();", "private void \n\tanalyseTrackerResponse(\n\t\t\tTRTrackerAnnouncerResponse\ttracker_response )\n\t{\n\t\t// tracker_response.print();\n\t\tfinal TRTrackerAnnouncerResponsePeer[]\tpeers = tracker_response.getPeers();\n\n\t\tif ( peers != null ){\n\t\t\taddPeersFromTracker( tracker_...
[ "0.5734424", "0.54520464", "0.51827264", "0.50955796", "0.5086282", "0.5074577", "0.5042561", "0.49879217", "0.4948746", "0.49016932", "0.49005055", "0.48801178", "0.48607355", "0.48338765", "0.4817587", "0.4755524", "0.4748944", "0.47440714", "0.4714557", "0.4707196", "0.470...
0.6673816
0
Prints all elements of Linked List
public void display(ListNode head) { if(head == null) { return; } ListNode current = head; while (current != null) { System.out.print(current.data + " --> "); current = current.next; } System.out.println(current); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printList() {\n\t\tNode tnode = head;\n\t\twhile (tnode != null) {\n\t\t\tSystem.out.print(tnode.data + \"->\");\n\t\t\ttnode = tnode.next;\n\t\t}\n\t}", "public void print_list() {\n \t \n \t//define current node as\n \t node<Type> current_node = new node<>();\n \t \n \t //now kee...
[ "0.8406808", "0.83391005", "0.83372575", "0.8331101", "0.83149374", "0.8296513", "0.82911086", "0.82859397", "0.8282798", "0.8250809", "0.820164", "0.81974393", "0.8150039", "0.8133371", "0.8091923", "0.8081795", "0.8079607", "0.806829", "0.80635417", "0.8058123", "0.80496675...
0.0
-1
log entries will be received through SharedPreferencesChangedListener
private static void writeToPreference(String type, String tag, String s) { /*SharedPreferences.Editor editor = eventHistory.edit(); //save log entries editor.putString( HISTORY_KEY, //key type + " " + s + " " + tag); //content editor.apply();*/...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void writeUserLog(String name){\n SharedPreferences user = context.getSharedPreferences(\"user_info\",0);\n SharedPreferences.Editor mydata = user.edit();\n mydata.putString(\"userlist\" ,name);\n mydata.commit();\n }", "@Override\n public void onLoging() {\n }", "@O...
[ "0.6626841", "0.6342607", "0.62195945", "0.6175245", "0.6172245", "0.5980613", "0.5921773", "0.58961767", "0.5890087", "0.5837002", "0.5760734", "0.57439744", "0.57197064", "0.57138264", "0.5705381", "0.5684689", "0.5667788", "0.5664915", "0.56496084", "0.5644393", "0.5626905...
0.55253845
27
When binding to the service, we return an interface to our messenger for sending messages to the service.
@Override public IBinder onBind(Intent intent) { if(DEBUG)Log.d(TAG, "onBind"); serviceConnected = true; Toast.makeText(getApplicationContext(), "binding", Toast.LENGTH_SHORT).show(); return mMessenger.getBinder(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface ServiceMessenger\n{\n\t/* public: ServiceMessager interface */\n\n\tpublic void sendEvent(Event event);\n}", "public interface MessageService {\n boolean sendMessage(String msg, String receiver);\n}", "@Override\n public void onServiceConnected(ComponentName name, IBinder service) {\...
[ "0.7203023", "0.7131137", "0.7104037", "0.6977216", "0.6977216", "0.6723777", "0.66895145", "0.6665591", "0.6654516", "0.66242015", "0.6622001", "0.6581941", "0.6581941", "0.65766954", "0.6561547", "0.65300846", "0.6484762", "0.64836776", "0.64660525", "0.6436848", "0.6430287...
0.6456454
19
Das Hauptprogramm. Hier wird die Anwendung gestarted
public static void main(String[] args) { Flughafen pad = new Flughafen(); pad.name = "Paderborn"; pad.treibstoffLager = 1000000; System.out.println("\"*** Unser Flughafen ***"); System.out.println("Flughafen " + pad.name); System.out.println("Am Gate 1: " + pad.g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void start() {\n\n\t}", "public void start() {\n\t\t\n\t}", "public void start() {\n\t\t\n\t}", "public void start() {}", "public void start() {}", "public void start()\n {\n }", "public void start() {\n\n\t}", "protected void start() {\n }", "@Override\r\n\tpublic void start()...
[ "0.79550743", "0.7804705", "0.7804705", "0.7794628", "0.7794628", "0.77727854", "0.7767022", "0.77603555", "0.77555674", "0.76762056", "0.76166385", "0.7613627", "0.7577224", "0.7574837", "0.7573147", "0.7573147", "0.7573147", "0.7573147", "0.7553909", "0.75504977", "0.754794...
0.0
-1
TODO Autogenerated method stub
@Override protected void collideEnd(Node node) { }
{ "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
if null or empty, return empty array
public int[] findDiagonalOrder(int[][] matrix) { if (matrix == null || matrix.length == 0) { return new int[0]; } int mRows, nCols; mRows = matrix.length; nCols = matrix[0].length; int[] result = new int[mRows * nCols]; int x = 0, y = 0; // current c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <T> T[] notEmpty(T[] array){\n if(ArrayUtils.isEmpty(array)) return array;\n List<T> items = new ArrayList<>();\n for(int i=0;i<array.length; i++){\n if(array[i] != null) items.add(array[i]);\n }\n return items.toArray((T[])Array.newInstance(\n ...
[ "0.6519457", "0.6519457", "0.64579034", "0.6348", "0.6284022", "0.6156387", "0.6129216", "0.605689", "0.60418105", "0.60241556", "0.6012701", "0.5968947", "0.5952238", "0.59292656", "0.5908327", "0.5906847", "0.58865637", "0.5876211", "0.5855898", "0.5837771", "0.5804784", ...
0.0
-1
Hide everything until we are logged in
@Override public void onResume() { findViewById(R.id.root).setVisibility(View.INVISIBLE); Log.i("EVENT", "onResume normal"); super.onResume(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void hideLoginScreen()\n {\n logIngEditText.setVisibility(View.INVISIBLE);\n passwordEditText.setVisibility(View.INVISIBLE);\n loginButton.setVisibility(View.INVISIBLE);\n textViewLabel.setVisibility(View.INVISIBLE);\n }", "public void setNotLoggedInLayoutVisible() {\n ...
[ "0.7395294", "0.6841536", "0.68252546", "0.6615223", "0.6610495", "0.6551078", "0.6477065", "0.6406069", "0.6386975", "0.6365777", "0.63357294", "0.63254285", "0.62974644", "0.62818855", "0.6264257", "0.6261054", "0.6139988", "0.6139856", "0.61187226", "0.6065222", "0.6044469...
0.0
-1
Keeping reference to rest client
@Override public void onResume(RestClient client) { this.client = client; Log.i("EVENT", "onResume RestClient"); // Show everything findViewById(R.id.root).setVisibility(View.VISIBLE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected RestClient()\n\t{\n\t\tclient = new HttpClient();\n\t\tclient.setIdleTimeout(3000000);\n\t\t// for possible future use:\n\t\t//exchange_get = new ContentExchange()\n\t\t{\n\t\t\t// define the callback method to process the response when you get it back\n\t\t\t// protected void onResponseComplete() throws...
[ "0.69898653", "0.67276776", "0.6638182", "0.66196644", "0.65323484", "0.65178645", "0.6412776", "0.6387383", "0.63299984", "0.6299326", "0.6295074", "0.6241312", "0.6231517", "0.6224459", "0.6170664", "0.6167913", "0.6163705", "0.61552393", "0.614737", "0.6116834", "0.6111045...
0.56365585
75
Limpia el layout de registros.
public void onClearClick(View v) { ViewGroup root = (ViewGroup) findViewById(R.id.root); for (int i = 0; i < root.getChildCount(); i++) { View vw = findViewById(R.id.vgroup); if (vw != null) { root.removeView(vw); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void iniciarLayout();", "public void setupLayout() {\n // left empty for subclass to override\n }", "@Override\n public void layout() {\n // TODO: not implemented\n }", "@JsOverlay\n public final void layout() {\n Dagre.get().layout(this);\n }", "@Over...
[ "0.6797287", "0.6620466", "0.6602709", "0.6526228", "0.64804584", "0.6455948", "0.6405561", "0.63829213", "0.62947094", "0.6257705", "0.6233774", "0.6227172", "0.6218573", "0.6204195", "0.619957", "0.6198499", "0.6196838", "0.619145", "0.6190142", "0.6189516", "0.61849326", ...
0.0
-1
Obtiene resultado de codigo de barra
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { IntentResult result = IntentIntegrator.parseActivityResult(requestCode, resultCode, data); if (result != null) { if (result.getContents() == null) { Log.d("MainActivity", "Cancelled ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CodeBook getCodificacion(){\n CodeBook res=new CodeBook();\n \n //Se obtiene los valores ni\n ArrayList<Integer> n=obtenerNi(obtenerYi());\n \n //Se asigna a cada carácter un código\n ArrayList<String> candidatos;\n int i=0;\n int cont_alfa=0;\n...
[ "0.6953679", "0.68475336", "0.6268923", "0.6236172", "0.6208498", "0.6208498", "0.6208373", "0.6208373", "0.6207508", "0.61142457", "0.60874814", "0.6047164", "0.60401267", "0.6027838", "0.5983974", "0.5968182", "0.5953225", "0.5939372", "0.59299475", "0.59036803", "0.5898497...
0.0
-1
Inicia lector de codigos de barra
public void onGetProduct2Click(View v) throws UnsupportedEncodingException, JSONException { IntentIntegrator integrator = new IntentIntegrator(this); integrator.setDesiredBarcodeFormats(IntentIntegrator.ONE_D_CODE_TYPES); integrator.setPrompt("Escanea un codigo"); integrator.setCameraId(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CodeBook getCodificacion(){\n CodeBook res=new CodeBook();\n \n //Se obtiene los valores ni\n ArrayList<Integer> n=obtenerNi(obtenerYi());\n \n //Se asigna a cada carácter un código\n ArrayList<String> candidatos;\n int i=0;\n int cont_alfa=0;\n...
[ "0.6604204", "0.6542736", "0.63488156", "0.6346787", "0.61587864", "0.6158357", "0.60446155", "0.5967675", "0.5933857", "0.5921591", "0.5918694", "0.59029686", "0.5891838", "0.5889995", "0.58676434", "0.5866913", "0.5827035", "0.5819085", "0.5817574", "0.5782686", "0.57624054...
0.0
-1
Agrega producto al layout
private void agregarProducto(String msg, String value) { // Obtiene el grupo LinearLayout parentLayout = (LinearLayout) findViewById(R.id.root); // Crea el inflater LayoutInflater layoutInflater = getLayoutInflater(); View view; // Obtiene el layout a insertar v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AdicionarProdutoCarrinhoVIew() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public Registrar_Producto() {\n this.setContentPane(fondo);\n initComponents();\n llenaArr();\n llenaCB();\n soloLetras(rp_tx_nombre);\n soloNumeros(rp_tx_c...
[ "0.64472747", "0.640081", "0.6338934", "0.63342726", "0.6321328", "0.6297698", "0.62917817", "0.6263063", "0.62593496", "0.6238827", "0.61520594", "0.60996294", "0.6083273", "0.6041202", "0.6034621", "0.6027409", "0.60005766", "0.59941727", "0.59885085", "0.5976129", "0.59708...
0.5559936
73
Obtiene producto y agrega a la lista
private void getProducto(String isbn) throws UnsupportedEncodingException { String soql = "SELECT ProductCode, Name FROM Product2 WHERE isActive = true AND ISBN__c = " + isbn + ".0"; RestRequest restRequest = RestRequest.getRequestForQuery(getString(R.string.api_version), soql); client.sendAsyn...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void listarProducto() {\n }", "private void cargarProductos() {\r\n\t\tproductos = productoEJB.listarInventariosProductos();\r\n\r\n\t\tif (productos.size() == 0) {\r\n\r\n\t\t\tList<Producto> listaProductos = productoEJB.listarProductos();\r\n\r\n\t\t\tif (listaProductos.size() > 0) {\r\n\r\n\t\t\t\tM...
[ "0.7604665", "0.7423955", "0.72283924", "0.72078454", "0.7146369", "0.7145108", "0.7115355", "0.70117885", "0.6962381", "0.6950054", "0.6927441", "0.6924345", "0.69111323", "0.68982184", "0.6871187", "0.686493", "0.6855958", "0.68445635", "0.6840391", "0.6802743", "0.6760858"...
0.0
-1
Check for any missing dependencies, returning a set of names and disabling the module is any are found
public final Set<String> missingDependencies(final Collection<ModuleInstance> instances) { final JSONArray dependencies = this.descriptionFile.getDependency(); if(dependencies == null) { // No dependencies return Collections.emptySet(); } final Set<String> missi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Set<String> getDependencies();", "public String[] getUnresolvedDependencies();", "public Set<String> getMissingModules() {\r\n return missing;\r\n }", "public String[] getResolvedDependencies();", "@Override\n\tpublic void checkDependencies() throws Exception\n\t{\n\t\t\n\t}", "@Override\n p...
[ "0.65809166", "0.64765286", "0.6353005", "0.6008558", "0.5957396", "0.5921696", "0.58689624", "0.5832412", "0.58159417", "0.56984574", "0.5665978", "0.56415457", "0.5640209", "0.5602114", "0.552831", "0.550814", "0.5503917", "0.54727626", "0.54713327", "0.5423418", "0.5410236...
0.60051674
4
/public List getDriverList() throws Exception; public List vehicleList() throws Exception; public List travelAgencyList() throws Exception; public List modelList() throws Exception; public List getDriverDetailList() throws Exception; public List getAddressList() throws Exception; public List getVehicleDetailList() thro...
public List<VehicleCategoryMasterBean> categoryList() throws Exception;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getVehicleList() {\n mApiCall.getVehicleList();\n }", "void vehicleDetails();", "@Override\n public List<Vehicle> getVehicles(AuthContext context) throws DSException {\n\n isContextValidFor(context, roleId -> { if(roleId == -1) throw new DSAuthException(\"Invalid Context\"); },...
[ "0.7152627", "0.65792274", "0.6467326", "0.64565337", "0.6341975", "0.62080723", "0.61801624", "0.6173583", "0.6113551", "0.6099395", "0.60727733", "0.6044254", "0.60129464", "0.6006532", "0.5969027", "0.5956243", "0.5951869", "0.594713", "0.5937191", "0.59053695", "0.5832147...
0.69915634
1
for getting driver,vehicle absent list
public List getDriverAbsentList() throws Exception ;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Agent> listAgentNotMappedwithDevice();", "public List getCurrentAvailabeDrivers() throws Exception;", "public List<Agent> findAgentsActifs() {\n Query q = getEntityManager().createQuery(\"select A from Agent A WHERE A.etat NOT IN('RET','DEM') ORDER BY A.personne.name\");\n List<Agent>...
[ "0.6516395", "0.5901346", "0.58488804", "0.58405894", "0.5772162", "0.5706577", "0.5627844", "0.5511246", "0.54606885", "0.54521173", "0.54473066", "0.53999466", "0.5330759", "0.5329338", "0.5328467", "0.5292393", "0.5284821", "0.5277646", "0.52546614", "0.5250206", "0.522011...
0.7738893
0
for getting available drivers
public List getCurrentAvailabeDrivers() throws Exception;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GET\n @Produces({MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN})\n public String getAvailableDatabaseDrivers() {\n final Enumeration<Driver> loadedDrivers = DriverManager.getDrivers();\n final List<String> drivers = new ArrayList<>();\n while (loadedDrivers.hasMoreElements()) {\n ...
[ "0.71572804", "0.69362813", "0.6563372", "0.64990985", "0.6495983", "0.6415518", "0.63816917", "0.6357721", "0.6326179", "0.6324409", "0.6255298", "0.6238053", "0.61560124", "0.61457646", "0.6003836", "0.5974371", "0.5924879", "0.5911077", "0.5894737", "0.5885175", "0.5864729...
0.7479841
0
TODO Autogenerated method stub
public static void main(String[] args) { Scanner sc= new Scanner(System.in); System.out.println("Enter the number of queens"); int n=sc.nextInt(); int[] X= new int[n]; int k=0; for(int i=0;i<n;i++) { X[i]=0; } while(k>=0) { X[k]=X[k]+1; while(X[k]<=n && !place(k,X)) { X[k]=X[k]+1...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.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
Get all the views which matches the given Tag recursively
public static List<View> findAllViewsWithTag(ViewGroup root, Object tag){ List<View> allViews = new ArrayList<View>(); final int childCount = root.getChildCount(); for(int i=0; i<childCount; i++){ final View childView = root.getChildAt(i); if(childView instanceof ViewGr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private List<View> findViewsWithTag(View view, Object tag) {\n List<View> viewsWithTag = new ArrayList<>();\n if (view instanceof ViewGroup) {\n for (int i = 0; i < ((ViewGroup) view).getChildCount(); i++) {\n viewsWithTag.addAll(findViewsWithTag(((ViewGroup)...
[ "0.7655189", "0.75206625", "0.71229184", "0.5453872", "0.5322916", "0.53173995", "0.52919763", "0.52515936", "0.5234785", "0.5187906", "0.51080614", "0.50963145", "0.50461066", "0.50163937", "0.49356043", "0.49265668", "0.4894596", "0.48920822", "0.489026", "0.48844042", "0.4...
0.7360436
2
a type for set of strings interface.
interface Set { boolean contains(String s); void add(String s); // notice that void means Set will be mutated. // => no longer functional. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public StringSet() {\r\n\t\tsuper();\r\n\t}", "public interface SetOfStrings\n{\n\n /**\n * Determine if the set contains a particular string.\n */\n public boolean contains(String str);\n\n /**\n * Add an element to the set.\n * \n * @post contains(str)\n */\n public void add(String str);\n\n /...
[ "0.731911", "0.72059745", "0.6859617", "0.6836083", "0.6339166", "0.6276884", "0.6222931", "0.6133112", "0.61299294", "0.60848737", "0.60399574", "0.60324395", "0.602001", "0.5994141", "0.5991791", "0.5976351", "0.5958309", "0.59538037", "0.59217584", "0.5878707", "0.58451575...
0.572662
33
/ Two forms of polymorphism: parametric polymorphism: some type is pareterized by one or more type variables. client can choose how to intstantiate type variables. example: see PolySet below.
interface PolySet<T> { boolean contains(T t); void add(T t); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void LessonPolymorphism() {\n Employee empOne = new Employee(\"Bob\");\n Employee empTwo = new Employee(\"Linda\", \"Belcher\");\n System.out.println(empOne.getFirstName());\n System.out.println(empTwo.getFirstName() + \" \" + empTwo.getLastName());\n // run-time p...
[ "0.5663088", "0.5612097", "0.5569867", "0.55341774", "0.52415407", "0.52237624", "0.5182591", "0.51825255", "0.5144039", "0.5141232", "0.5103341", "0.5079856", "0.5075322", "0.5066316", "0.5035916", "0.502325", "0.50143576", "0.4999264", "0.49940622", "0.49802172", "0.4969024...
0.5649808
1
/ Java has a second kind of polymorphism: subtype polymorphism there's a subtype relation on types if S is a subtype of T, then you can pass an object of type S where an object of type T is expected. Subtype polymorphism is a property of interfaces. example: RemovableSet is a subtype of Set.
interface RemovableSet extends Set { void remove(String s); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface o<Downstream, Upstream> {\n r<? super Upstream> a(r<? super Downstream> rVar) throws Exception;\n}", "public interface DerivedType extends EObject {\r\n}", "Object visitSubtype(SubtypeNode node, Object state);", "public interface Set<Type> {\r\n\r\n\t/**\r\n\t * Ensures that this set cont...
[ "0.595979", "0.5582417", "0.5559713", "0.5532084", "0.54084957", "0.5393497", "0.53709286", "0.53628504", "0.534518", "0.53398645", "0.53379184", "0.5337358", "0.5320801", "0.530529", "0.5268364", "0.524976", "0.52365494", "0.52322733", "0.52085084", "0.51695955", "0.5160745"...
0.57193035
1
notice that elems, since protected, can be used in this class.
public void remove(String s) { elems.remove(s); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Object[] elements() {\n return elements.toArray();\n }", "public interface ElementsGetter<T> {\n\t\n\t/**\n\t * Metoda provjerava ima li jos elemenata\n\t * u kolekciji\n\t * @return boolean true ako ima jos elemenata, false ako nema\n\t */\n\tpublic boolean hasNextElement();\n\t\n\t/**\n\t * Metoda ...
[ "0.64309466", "0.5871445", "0.57353973", "0.5689886", "0.5645983", "0.5640504", "0.5613811", "0.5589487", "0.5574624", "0.54651624", "0.54651594", "0.54565156", "0.5452748", "0.542559", "0.5423699", "0.5410888", "0.54062825", "0.54062825", "0.5396201", "0.5383499", "0.5376601...
0.0
-1
... other method implementations
public void addAll(String[] a) { for (String s : a) this.add(s); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n ...
[ "0.6699532", "0.6695641", "0.6661111", "0.66306823", "0.66306823", "0.66205215", "0.65990496", "0.6498298", "0.6490272", "0.6452656", "0.64343435", "0.642825", "0.6411001", "0.63974607", "0.6377646", "0.63737005", "0.63699937", "0.635879", "0.635879", "0.63576645", "0.6348532...
0.0
-1
a method to spawn in the player as the main car
@Spawns("car") public Entity spawnCar(SpawnData data) { PhysicsComponent physics = new PhysicsComponent(); physics.setBodyType(BodyType.DYNAMIC); return entityBuilder() .type(CAR) .from(data) .viewWithBBox(texture(MainMenu.getSelectedCarAsset()...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void control(Spawn spawn) {}", "@Override\n\tpublic void spawn(Location loc) {\n\t\t\n\t}", "public void spawn()\n\t{\n\t\tsynchronized(this)\n\t\t{\n\t\t\t// Set the x,y,z position of the L2Object spawn and update its _worldregion\n\t\t\tsetVisible(true);\n\t\t\tsetWorldRegion(WorldManager.getInstance(...
[ "0.6859272", "0.6690443", "0.6651439", "0.6618977", "0.66055506", "0.65867805", "0.64587694", "0.64346576", "0.6406546", "0.636788", "0.6342828", "0.63284576", "0.6328265", "0.63240945", "0.6265272", "0.6263809", "0.624597", "0.62384194", "0.6229786", "0.62259096", "0.6212701...
0.7376599
0
a method to spawn in a moose, the main enemy. Will cause a game over on collision.
@Spawns("moose") public Entity spawnMoose(SpawnData data) { return entityBuilder() .from(data) .type(MOOSE) .viewWithBBox(texture("moose.png", 40, 58)) .with(new CollidableComponent(true)) .with(new OffscreenCleanComponent()) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unused\")\n void spawn(Entity entity);", "private void spawnEnemy() {\n float randomEnemy = (float) Math.random();\n\n if (round == 1) {\n addActorFunction.accept(new SimpleEnemy(tileSet));\n } else {\n float speedMultiplier = 1 + (0.08f * round);...
[ "0.7324009", "0.7271115", "0.6919052", "0.6883725", "0.67985004", "0.6753498", "0.675129", "0.6693676", "0.66841483", "0.66804916", "0.6560068", "0.6537537", "0.6498033", "0.6494835", "0.64910007", "0.64691395", "0.639767", "0.6356664", "0.63452923", "0.6340586", "0.63088286"...
0.67242163
7
a method to spawn a pothole, an obstacle that reduces health on collision.
@Spawns("potHole") public Entity spawnPotHole(SpawnData data) { return entityBuilder() .from(data) .type(POTHOLE) .viewWithBBox(texture("pothole.png", 40, 58)) .with(new CollidableComponent(true)) .with(new OffscreenCleanCompone...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void spawnObstacle(){\n\t\tif(this.seconds > this.nextSpawn && !this.gameOver){\n\t\t\tint pX = this.radom.nextInt(350);\n\t\t\tthis.obstacles.add(new Obstacle(WIDTH,0,30,pX,0));\n\t\t\tthis.obstacles.add(new Obstacle(WIDTH,pX+110,30,HEIGHT-pX-111,0));\n\t\t\tthis.goals.add(new Goal(WIDTH,pX,30,110,0xffffff...
[ "0.71932936", "0.6210168", "0.61249286", "0.6096053", "0.60902977", "0.5987578", "0.59311676", "0.5910144", "0.5908545", "0.5875625", "0.5859377", "0.5852509", "0.5842295", "0.582942", "0.57880235", "0.5767183", "0.5763873", "0.57503796", "0.5743282", "0.57408065", "0.5720711...
0.69661254
1
a method to spawn a pylon, an obstacle that reduces health on collision.
@Spawns("pylon") public Entity spawnPylon(SpawnData data) { return entityBuilder() .from(data) .type(PYLON) .viewWithBBox(texture("pylon.png", 40, 58)) .with(new CollidableComponent(true)) .with(new OffscreenCleanComponent()) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void spawnObstacle(){\n\t\tif(this.seconds > this.nextSpawn && !this.gameOver){\n\t\t\tint pX = this.radom.nextInt(350);\n\t\t\tthis.obstacles.add(new Obstacle(WIDTH,0,30,pX,0));\n\t\t\tthis.obstacles.add(new Obstacle(WIDTH,pX+110,30,HEIGHT-pX-111,0));\n\t\t\tthis.goals.add(new Goal(WIDTH,pX,30,110,0xffffff...
[ "0.7030021", "0.64933884", "0.64729744", "0.63086665", "0.63046324", "0.62079716", "0.6206218", "0.6185942", "0.6155939", "0.60935307", "0.5920187", "0.5908291", "0.59034795", "0.58785754", "0.58717304", "0.5857083", "0.58565557", "0.58249503", "0.57876074", "0.5785109", "0.5...
0.6168084
8
a method to spawn a wrench, an obstacle that increases health on collision.
@Spawns("wrench") public Entity spawnWrench(SpawnData data) { return entityBuilder() .from(data) .type(WRENCH) .viewWithBBox(texture("wrench.png", 40, 58)) .with(new CollidableComponent(true)) .with(new OffscreenCleanComponent()...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Water_Hero(RefLinks refLink, float x, float y)\r\n {\r\n ///Apel al constructorului clasei de baza\r\n super(refLink, x,y, Character.DEFAULT_CREATURE_WIDTH, Character.DEFAULT_CREATURE_HEIGHT);\r\n\r\n ///Seteaza imaginea de start a eroului\r\n image = Assets.heroLeft;\r\n\r\n ...
[ "0.6672122", "0.6562249", "0.65263796", "0.64359903", "0.61508363", "0.6016361", "0.59572935", "0.5949367", "0.594104", "0.59379756", "0.5901852", "0.58880526", "0.58839256", "0.5861862", "0.586097", "0.5855328", "0.5855056", "0.58467907", "0.58339125", "0.58073056", "0.57979...
0.6430911
4
a method to spawn a points orb, an obstacle that increases score on collision.
@Spawns("pointsorb") public Entity spawnPointsOrb(SpawnData data) { return entityBuilder() .from(data) .type(POINTSORB) .viewWithBBox(texture("pointorb.png", 40, 58)) .with(new CollidableComponent(true)) .with(new OffscreenClean...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void spawnObstacle(){\n\t\tif(this.seconds > this.nextSpawn && !this.gameOver){\n\t\t\tint pX = this.radom.nextInt(350);\n\t\t\tthis.obstacles.add(new Obstacle(WIDTH,0,30,pX,0));\n\t\t\tthis.obstacles.add(new Obstacle(WIDTH,pX+110,30,HEIGHT-pX-111,0));\n\t\t\tthis.goals.add(new Goal(WIDTH,pX,30,110,0xffffff...
[ "0.7345858", "0.69188666", "0.59045786", "0.58690953", "0.58404905", "0.5830659", "0.5821822", "0.5807215", "0.5791738", "0.57635087", "0.57289886", "0.572638", "0.571498", "0.5695141", "0.56920034", "0.56872815", "0.56699365", "0.56600213", "0.5659227", "0.5646122", "0.56216...
0.6274985
2
Get the stroke width
public float getStrokeWidth() { return strokeWidth; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final DoubleProperty strokeWidthProperty() {\n return getStrokeAttributes().widthProperty();\n }", "public float getStrokeWidth() {\n return (float) this.getValue(STROKE_WIDTH_PROPERTY_KEY);\n }", "int getTextStrokeWidth();", "public float getStrokeWidth() { return getStroke()==nu...
[ "0.82400686", "0.79998386", "0.7937927", "0.78024197", "0.7654828", "0.7486763", "0.7441163", "0.7414298", "0.7414298", "0.7362188", "0.72277844", "0.72262335", "0.71776706", "0.7173462", "0.7161058", "0.7161058", "0.7097175", "0.70876837", "0.70876837", "0.7042492", "0.70221...
0.8235961
1
Set the stroke width
public void setStrokeWidth(Float strokeWidth) { this.strokeWidth = strokeWidth; stroke = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final native void setStrokeWidth(double width) /*-{\n\t\tthis.setStrokeWidth(width);\n\t}-*/;", "void setStrokeWidth(float strokeWidth) {\n/* 180 */ this.mStrokeWidth = strokeWidth;\n/* */ }", "public void setStrokeWidth(float aValue)\n{\n // Set line width\n if(getStroke()==null) setStr...
[ "0.8016689", "0.77625203", "0.7717954", "0.7546393", "0.75368077", "0.7332668", "0.7331719", "0.72970176", "0.7267388", "0.7251207", "0.72249335", "0.7201179", "0.7195389", "0.71073294", "0.70388377", "0.70125693", "0.7011427", "0.6983104", "0.68541753", "0.6839396", "0.68231...
0.74608564
5
Get the stroke created from the stroke width
public Stroke getStroke() { Stroke theStroke = stroke; if (theStroke == null) { theStroke = new BasicStroke(strokeWidth); stroke = theStroke; } return theStroke; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static BasicStroke getStroke(int width) {\n\t\tif (width < _strokes.length) {\n\t\t\tif (_strokes[width] == null) {\n\t\t\t\t_strokes[width] = new BasicStroke(width);\n\t\t\t}\n\n\t\t\treturn _strokes[width];\n\t\t} else {\n\t\t\treturn new BasicStroke(width);\n\t\t}\n\t}", "public float getStrokeWidth() ...
[ "0.7510826", "0.7476925", "0.74274296", "0.73528534", "0.7346122", "0.7137675", "0.70884514", "0.69964427", "0.697814", "0.69642", "0.6839997", "0.68218297", "0.67657614", "0.66877204", "0.6561595", "0.65538675", "0.6538081", "0.6409645", "0.64041877", "0.639882", "0.63686657...
0.7272113
5
Initialize a new instance of the GhostService class. This class is initialized in spring configuration.
public GhostService(List<IDictionaryProvider> dictionaries, List<IGhostStrategy> strategies) { this.dictionaries = dictionaries; this.strategies = strategies; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Autowired\n public void setGreetingService(GreetingsServiceUsingSpring greetingsServiceUsingSpring) {\n this.greetingsServiceImplUsingSpring = greetingsServiceUsingSpring;\n }", "public AutowireService() {\n\t\tSystem.out.println(\"Default constructor used\");\n\t}", "private void initService() {...
[ "0.6616985", "0.63381", "0.62520766", "0.6247728", "0.61119527", "0.6100348", "0.6022977", "0.5996852", "0.58691883", "0.58547795", "0.5847862", "0.582267", "0.58073086", "0.5805407", "0.5768527", "0.57552177", "0.57481563", "0.5733948", "0.57313436", "0.5730784", "0.5719527"...
0.5390596
80
Find the proper dictionary for the specified language.
private IDictionaryProvider findDictionary(String lang) { IDictionaryProvider provider = null; int index = 0; boolean found = false; while (index < this.dictionaries.size() && !found) { IDictionaryProvider dict = this.dictionaries.get(index); if (dict.isDictionaryForLang(lang)) { provider = dict; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Language findByName(String name);", "public void loadDictionary(String language) {\r\n\t\tif(this.language.equals(language) && dizionario != null ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tdizionario = new ArrayList<String>();\r\n\t\tthis.language = language; //Impostiamo la lingua uguale a quella passata da p...
[ "0.6608259", "0.64457124", "0.6197881", "0.6132657", "0.6091442", "0.6002706", "0.59488934", "0.5946851", "0.5902508", "0.5856273", "0.5737882", "0.5735242", "0.57144344", "0.5712264", "0.5527696", "0.55081356", "0.54811126", "0.54648966", "0.5449584", "0.5419321", "0.5401091...
0.771297
0
Find the proper strategy for the specified level.
private IGhostStrategy findStrategy(Integer level) { IGhostStrategy strategy = null; int index = 0; boolean found = false; while (index < this.strategies.size() && !found) { IGhostStrategy dict = this.strategies.get(index); if (dict.isStrategyForLevel(level)) { strategy = dict; found = true; }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static StrategyLevel getByName(String name) {\r\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\r\n\t\t\tStrategyLevel result = VALUES_ARRAY[i];\r\n\t\t\tif (result.getName().equals(name)) {\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public int getOperation (int level...
[ "0.57052535", "0.5695291", "0.56694585", "0.5523692", "0.54850125", "0.5450693", "0.5352019", "0.52786136", "0.5227294", "0.5210452", "0.5148215", "0.5148215", "0.5137925", "0.51109225", "0.51046133", "0.5038261", "0.50172603", "0.5011405", "0.5007063", "0.499308", "0.4991675...
0.8338499
0
Create the default header
public CDFHeader createDefaultCDFFileHeader(double mvaBase) { String header = " 99/99/99 LANL 100.0 9999 W 1 "; CDFHeader cHeader = new CDFHeader(header); cHeader.setMVABase(mvaBase); return cHeader; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Header createHeader();", "public JLabel buildDefaultHeader(){\n JLabel returnHeader = new JLabel();\n returnHeader.setHorizontalAlignment(SwingConstants.LEFT);\n returnHeader.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 48)); // Great font, makes it pop\n returnHeader.setForeground...
[ "0.8243991", "0.7204428", "0.7105063", "0.6970554", "0.6967274", "0.6918539", "0.69178814", "0.6888702", "0.68295807", "0.6669469", "0.6667128", "0.6662648", "0.66493636", "0.6621347", "0.6614094", "0.6612208", "0.65998465", "0.65978026", "0.65826267", "0.6561412", "0.6528875...
0.7038836
3
Gets the fechaPago value for this PagareR.
public java.util.Calendar getFechaPago() { return fechaPago; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public java.util.Date getFecha() {\n return _partido.getFecha();\n }", "public java.lang.String getHoraDePago() {\n return horaDePago;\n }", "public LocalDate getFecha() {\n\t\treturn fecha;\n\t}", "public LocalDate getDato() {\n\t\treturn dato;\n\t}", "public String getF...
[ "0.68067384", "0.67843366", "0.67315346", "0.65672976", "0.65482193", "0.6508816", "0.6467076", "0.6429949", "0.6420479", "0.64000815", "0.6397499", "0.6396588", "0.6374364", "0.6343495", "0.63307035", "0.62778205", "0.6251418", "0.6236263", "0.62357354", "0.6210047", "0.6179...
0.7559738
0
Sets the fechaPago value for this PagareR.
public void setFechaPago(java.util.Calendar fechaPago) { this.fechaPago = fechaPago; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void setFecha(java.util.Date fecha) {\n _partido.setFecha(fecha);\n }", "public void setFechaPresentacion(es.gob.agenciatributaria.www2.static_files.common.internet.dep.aplicaciones.es.aeat.ssii.fact.ws.SuministroInformacion_xsd.RangoFechaPresentacionType fechaPresentacion) {\r\n ...
[ "0.7373862", "0.6792696", "0.6696403", "0.6690429", "0.6586207", "0.65581644", "0.6523238", "0.6350329", "0.62984186", "0.62856424", "0.6267698", "0.6175567", "0.6058702", "0.6046946", "0.6002295", "0.59645116", "0.5952611", "0.5929965", "0.58975613", "0.58781505", "0.5852226...
0.7769928
0
Gets the tasaInteres value for this PagareR.
public java.math.BigDecimal getTasaInteres() { return tasaInteres; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getTipoInteres() {\r\n return tipoInteres;\r\n }", "@javax.jdo.annotations.Column(allowsNull = \"false\")\n\t@Title(sequence = \"2\")\n\t@MemberOrder(sequence = \"5\")\n\tpublic PuntoInteres getPuntoInteres() {\n\t\treturn this.puntoInteres;\n\t}", "public void setTasaInteres(java.math....
[ "0.6044694", "0.59472024", "0.5855693", "0.58068633", "0.5732629", "0.55474645", "0.5511327", "0.54866916", "0.54810745", "0.54619", "0.54131454", "0.5412914", "0.54100317", "0.538751", "0.53198355", "0.5316282", "0.527773", "0.5253873", "0.5245103", "0.5240191", "0.52393204"...
0.7701981
0
Sets the tasaInteres value for this PagareR.
public void setTasaInteres(java.math.BigDecimal tasaInteres) { this.tasaInteres = tasaInteres; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setAtores(Iterator<IPessoa> atores);", "public void setPuntoInteres(final PuntoInteres puntoInteres) {\n\t\tthis.puntoInteres = puntoInteres;\n\t}", "public java.math.BigDecimal getTasaInteres() {\n return tasaInteres;\n }", "public void setTipoInteres(double tipoInteres) {\r\n t...
[ "0.59068274", "0.58659995", "0.54378396", "0.54329777", "0.5309871", "0.5307166", "0.5261447", "0.518481", "0.5138464", "0.5097734", "0.50588936", "0.5037045", "0.5018198", "0.49480674", "0.48436886", "0.48401108", "0.48362073", "0.4786971", "0.4786511", "0.47791085", "0.4776...
0.7037807
0
Return type metadata object
public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MetadataType getType();", "public MetadataType getType() {\n return type;\n }", "public MilanoTypeMetadata.TypeMetadata getMetadata()\n {\n if (typeMetadata == null) {\n return null;\n }\n\n return typeMetadata;\n }", "private Metadata getMetadata(RubyModule type)...
[ "0.7969707", "0.7373198", "0.7358018", "0.7090138", "0.67353225", "0.67259765", "0.66725683", "0.65644145", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223",...
0.0
-1
return first EStructuralFeature that fits to the XML element name TODO: add error handling for ambiguous features
public EStructuralFeature getFeatureByXMLElementName(String namespace, String xmlElementName) { // try to find the EStructural feature locally // TODO: consider namespace EStructuralFeature result = xmlNameToEStructuralFeatureMap.get(xmlElementName); if (null == result) { Iterator<EStructuralFeatur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public org.pentaho.pms.cwm.pentaho.meta.core.CwmStructuralFeature getFeature();", "UMLStructuralFeature createUMLStructuralFeature();", "@Nullable JvmIdentifiableElement getFeature();", "private Object getFeature (EObject o, String feature) {\n\n if(o == null){\n System.out.println(\"Null o...
[ "0.63993514", "0.6360719", "0.6360091", "0.63567144", "0.61915654", "0.61915654", "0.6064196", "0.6007852", "0.5939872", "0.57788897", "0.57134813", "0.57134813", "0.56486875", "0.56133693", "0.56133693", "0.5589924", "0.55885106", "0.5582123", "0.5581737", "0.5548676", "0.54...
0.78135836
0
TODO Autogenerated method stub
public void setFeatureSerializationStructure(EStructuralFeature eStructuralFeature, int serializationStructure) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public EStructuralFeature getAttribute(EClass eClass, String namespace, String name) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.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
D3 Class Constructor. The Constructor's Private permission ensures that the D3 Class cannot be instantiated other than through the getInstance() method.
private D3() { super(3); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static D3 getInstance() {\n \n if(instance == null) {\n instance = new D3();\n }\n \n return instance;\n }", "public MultiShape3D()\n {\n this( (Geometry)null, (Appearance)null );\n }", "protected AbstractMatrix3D() {}", "public J3DAttribut...
[ "0.7846455", "0.6920632", "0.6694012", "0.66589844", "0.66341203", "0.65685266", "0.64433205", "0.63956696", "0.63625336", "0.6326003", "0.6296521", "0.61576974", "0.6121572", "0.6114887", "0.6109074", "0.61042255", "0.60913503", "0.60597724", "0.6047385", "0.6011866", "0.601...
0.83322877
0
Guarantees that there is only ever a single D3 object instantiated in the program.
public static D3 getInstance() { if(instance == null) { instance = new D3(); } return instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private D3() {\n super(3);\n }", "@Override\n\tpublic boolean is3D() {\n\t\treturn true;\n\t}", "public Object3D() {\n objectVectors = new ArrayList<>();\n linesToDraw = new ArrayList<>();\n }", "public boolean is3D() {\n return _is3D;\n }", "private void createD3Example() {\...
[ "0.6122516", "0.58213824", "0.5704447", "0.55080324", "0.54847205", "0.5392681", "0.53693336", "0.53213096", "0.5306685", "0.518742", "0.51681525", "0.5134858", "0.4994152", "0.49499452", "0.49168777", "0.4915162", "0.49050373", "0.49030927", "0.4885865", "0.4858649", "0.4855...
0.6908356
0
Private constructor for singleton
private TbusRoadGraph() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Singleton()\n\t\t{\n\t\t}", "private Singleton(){}", "private Singleton() {\n\t}", "private Singleton() { }", "private SingletonObject() {\n\n\t}", "private Singleton(){\n }", "private SingletonSigar(){}", "private SingletonSample() {}", "private SparkeyServiceSingleton(){}", "private ...
[ "0.8704474", "0.86345166", "0.8581089", "0.85058475", "0.84680855", "0.8190726", "0.8159366", "0.7990395", "0.79794216", "0.7952581", "0.78178513", "0.7797314", "0.76454735", "0.7630271", "0.76206493", "0.7554703", "0.7519292", "0.75150055", "0.7475945", "0.7475175", "0.74751...
0.0
-1
Parses the given document using a DOM structure
private DirectedGraph<String, SumoEdge> parseDocument(Document dom) { DirectedGraph<String, SumoEdge> newGraph = new DefaultDirectedWeightedGraph<String, SumoEdge>(SumoEdge.class); Element root = dom.getDocumentElement(); NodeList edges = root.getElementsByTagName("edge"); for (int i = 0; i < edges.getLen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract XMLDocument parse(URL url);", "@Override\n protected Document parseAsDom(final Document input) {\n return input;\n }", "private void parseXMLDocument(final Document doc)\r\n {\r\n Node docRoot = doc.getDocumentElement();\r\n StringBuilder indent = new S...
[ "0.6374253", "0.63171786", "0.61527276", "0.61522", "0.61503065", "0.6148357", "0.61308104", "0.6130594", "0.6108095", "0.607535", "0.6067763", "0.6064906", "0.60633516", "0.6034816", "0.6012628", "0.6004845", "0.5981378", "0.59655863", "0.5943167", "0.58797145", "0.5834257",...
0.57563657
23
Parses the given file and extracts a SUMO network graph
public synchronized void parse(File sumoNet) { if (graph != null) { // This singleton already parsed a file, error! System.err.println("Error, " + toString() + " already parsed a file, this singleton would become invalid! Aborting method and keeping a valid state!"); return; } init(); DocumentBui...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void readGraphFromFile();", "public void readNetworkFromFile() {\r\n\t\tFileReader fr = null;\r\n\t\t// open file with name given by filename\r\n\t\ttry {\r\n\t\t\ttry {\r\n\t\t\t\tfr = new FileReader (filename);\r\n\t\t\t\tScanner in = new Scanner (fr);\r\n\r\n\t\t\t\t// get number of vertices\r\n\t\t\t\tString...
[ "0.6791679", "0.6709344", "0.6420502", "0.6108754", "0.60434407", "0.6014806", "0.5986952", "0.5925556", "0.5910009", "0.5872034", "0.58646554", "0.5811803", "0.57842034", "0.574893", "0.5736357", "0.5713111", "0.5645981", "0.56365377", "0.5618102", "0.5613011", "0.55900043",...
0.63355464
3
Return the graph's edge identified by id
private SumoEdge getEdge(String id) { return idToEdge.get(id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "E getEdge(int id);", "public Edge returnEdgeById(Id id){\n\t\tif(id.indice >= listOfEdges.size()) return null;\n\t\tEdge e = listOfEdges.elementAt(id.indice);\n\t\tif(e == null) return null;\n\t\tId eid = e.getId();\n\t\tif(eid.indice != id.indice || eid.unique != id.unique) return null; \n\t\treturn e;\n\t}", ...
[ "0.89516747", "0.8063501", "0.7969178", "0.79496896", "0.78203416", "0.7214637", "0.6910155", "0.6844999", "0.6774317", "0.67344594", "0.6699118", "0.6648172", "0.6626591", "0.6574302", "0.65427125", "0.6497243", "0.6460381", "0.6416579", "0.6341889", "0.62772197", "0.6267950...
0.86851525
1
Return the graph's edge length identified by edgeid
public double getEdgeLength(String id) { return idToEdge.get(id).getWeight(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getEdgeCount();", "@Override\n public int edgeSize() {\n return this.numOfEdges;\n }", "public long getEdgeCount() { return edgeCount; }", "int getNumberOfEdges();", "@Override\n\tpublic int edgeSize() {\n\t\treturn numOfEdges;\n\t}", "public int getNumberOfEdges();", "public long getE...
[ "0.70121104", "0.69274795", "0.68896335", "0.68885833", "0.6837138", "0.6813402", "0.6797417", "0.67105496", "0.6658409", "0.65353876", "0.65351385", "0.6480917", "0.64326096", "0.64319736", "0.62898326", "0.624007", "0.6230236", "0.62014586", "0.6197182", "0.6144374", "0.613...
0.8451713
0
Return a set of outgoing edges from the current edges endvertex
public synchronized Set<String> getNextEdges(String currentEdge) { if (currentEdge == null) { return new HashSet<String>(); } SumoEdge currentSumoEdge = getEdge(currentEdge); if (currentSumoEdge == null) { return new HashSet<String>(); } String currentEdgeEnd = graph.getEdgeTarget(currentSumoEdg...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Set<Edge> getDownwardOutgoingNeighborEdges() {\n\t\t\tif(_bumpOnUpwardPass) {\n\t\t\t\tSystem.err.println(\"calling downward pass neighbor method on upward pass!\");\n\t\t\t}\n//\t\t\tif(_outgoingEdges.size() == 0) { // only compute if we have to\n\t\t\t\tSet<Edge> outgoingEdges = new HashSet<Edge>();\n\t\t\t\tIte...
[ "0.7224194", "0.7100124", "0.70326304", "0.7024098", "0.69912815", "0.69554645", "0.6848508", "0.6721847", "0.6706235", "0.66815025", "0.66146183", "0.65958077", "0.6513949", "0.64692205", "0.64645183", "0.6458584", "0.64325523", "0.64242685", "0.6419781", "0.6405094", "0.640...
0.6400746
21
Return a set of incoming edges to the current edges endvertex
public synchronized Set<String> getIncomingEdges(String currentEdge) { if (currentEdge == null) { return new HashSet<String>(); } SumoEdge currentSumoEdge = getEdge(currentEdge); if (currentSumoEdge == null) { return new HashSet<String>(); } String currentEdgeEnd = graph.getEdgeTarget(currentSum...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Set<E> getEdges(V tail);", "public Set<E> getEdges();", "Set<Edge> getIncomingNeighborEdges(boolean onUpwardPass) {\n//\t\t\tif(_outgoingEdges.size() == 0) { // only compute if we have to\n\t\t\t\tSet<Edge> outgoingEdges = new HashSet<Edge>();\n\t\t\t\tIterator<Edge> it = _neighborEdges.keySet().iterato...
[ "0.717689", "0.6960203", "0.6936875", "0.6910347", "0.67389184", "0.6712212", "0.6647585", "0.66469264", "0.66223234", "0.6621184", "0.66075927", "0.659368", "0.6585609", "0.65276957", "0.6519466", "0.6506993", "0.6496469", "0.64595854", "0.64557946", "0.64517033", "0.6450931...
0.73494256
0
Get the length of the shortest path between two edges
public synchronized double getDistance(String from, String to) { return (new DijkstraShortestPath<String, SumoEdge>(graph, from, to)).getPathLength(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract int shortestPathDistance(String vertLabel1, String vertLabel2);", "public void shortestPathsNodes() {\n for (int sourceNode = 0; sourceNode < wordGraph.V(); sourceNode++) {\n BreadthFirstDirectedPaths bfs = new BreadthFirstDirectedPaths(wordGraph, sourceNode);\n\n for...
[ "0.72807735", "0.71882457", "0.6976161", "0.6873071", "0.6848002", "0.6751357", "0.6705223", "0.67011863", "0.66636837", "0.6661253", "0.6633257", "0.65221334", "0.63976425", "0.6312366", "0.6294262", "0.62928694", "0.6250491", "0.6197933", "0.6128361", "0.6109752", "0.609219...
0.67033833
7
Get a list of all routes with maximum distance distance (excluding first and last edge), starting from edge from
public synchronized List<List<String> > getRoutesStartingFrom(String from, double distance) { return algos.getRoutesWithinDisctance(getEdge(from), distance); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer numberOfDifferentRoutes(MultiDirectionalNode startNode,\n\t\t\tMultiDirectionalNode endNode, Integer maxDistance) {\n\t\treturn null;\n\t}", "@Override\n public ArrayList<GraphEdge> getRoute(GraphNode a, GraphNode b) {\n \tHashMap<GraphNode, Double> distances = new HashMap<GraphNode, Double>...
[ "0.61925", "0.61367065", "0.60082287", "0.595784", "0.5870375", "0.583996", "0.5701634", "0.5683471", "0.5681368", "0.5680015", "0.56717557", "0.5634836", "0.55917394", "0.55410993", "0.5529148", "0.5448407", "0.5430438", "0.54240954", "0.5420922", "0.541664", "0.5415372", ...
0.0
-1
Get a list of all routes with maximum distance distance (excluding first and last edge), ending at edge to
public synchronized List<List<String> > getRoutesLeadingTo(String to, double distance) { return algos.getRevertedRoutesWithinDisctance(getEdge(to), distance); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer numberOfDifferentRoutes(MultiDirectionalNode startNode,\n\t\t\tMultiDirectionalNode endNode, Integer maxDistance) {\n\t\treturn null;\n\t}", "private int findAllRoutesBetweenTowns(Town origin, \n\t\t\tTown destination, int weight, \n\t\t\tint maxDistance) {\n\t\tint routes = 0;\n\t\tif (this.routi...
[ "0.6279589", "0.6114015", "0.603606", "0.6030561", "0.598017", "0.5838516", "0.58247215", "0.5802442", "0.5748742", "0.56668127", "0.5592828", "0.5592077", "0.5515925", "0.5510713", "0.5490588", "0.548", "0.5464922", "0.54327065", "0.5423492", "0.5386253", "0.5373584", "0.5...
0.4748327
98
/ Solution: if the first column is '0', greedily flip this row if the column has more '0' than '1', greedily flip this column O(nm),O(1)
public int matrixScore(int[][] A) { int n = A.length, m = A[0].length, ans = 0; for (int i = 0; i < n; ++i) { if (A[i][0] == 0) { flipRow(A, i); } } for (int j = 1; j < m; ++j) { int cnt = 0; for (int i = 0; i < n; ++i) { cnt += A[i][j]; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void flipHorizontalAxis(int[][] matrix) {\n for(int i = matrix.length - 1; i >= matrix.length/2; i-- ){\n for(int j = 0; j < matrix[i].length; j++){\n int temp = matrix[i][j];\n matrix[i][j] = matrix[(matrix.length - 1) - i][j];\n matrix[(matrix.length - 1) ...
[ "0.647789", "0.6352299", "0.59590435", "0.57964814", "0.57899904", "0.5764012", "0.57376856", "0.571299", "0.56783164", "0.56380177", "0.5605398", "0.55970883", "0.55695975", "0.55663896", "0.5553781", "0.55515444", "0.5537898", "0.55287534", "0.55097234", "0.549607", "0.5451...
0.5208715
41
Check if device policy has disabled the camera.
public static Camera openCamera(Activity activity, int cameraId) throws Exception { if (!activity.isFinishing()) { DevicePolicyManager dpm = (DevicePolicyManager) activity.getSystemService( Context.DEVICE_POLICY_SERVICE); if (dpm.getCameraDisabled(null) ==...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean getCameraDisabled(ComponentName who, int userHandle, boolean parent) {\n if (!mHasFeature) {\n return false;\n }\n\n final CallerIdentity caller = getCallerIdentity(who);\n Preconditions.checkCallAuthorization(hasFullCrossUsersPermission(caller, ...
[ "0.64469564", "0.64364177", "0.64364177", "0.64364177", "0.63834065", "0.63797176", "0.63797176", "0.6364088", "0.6345708", "0.6339514", "0.63014257", "0.6272355", "0.62499946", "0.62349313", "0.6214402", "0.62139493", "0.6136075", "0.6089529", "0.6063355", "0.6060992", "0.60...
0.0
-1
See android.hardware.Camera.setDisplayOrientation for documentation.
public static int getDisplayOrientation(int degrees, int cameraId) { CameraInfo info = new CameraInfo(); Camera.getCameraInfo(cameraId, info); int result; if (info.facing == CameraInfo.CAMERA_FACING_FRONT) { result = (info.orientation + degrees) % 360; result = (3...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setCameraDisplayOrientation(Activity activity, int cameraId, Camera camera){\n Camera.CameraInfo info = new Camera.CameraInfo();\n Camera.getCameraInfo(cameraId, info);\n int degrees = getDisplayRotation(activity);\n Log.i(\"Test\", \"rotation:-->\" + degrees);\n int...
[ "0.79842746", "0.76209486", "0.75406736", "0.7332183", "0.72712755", "0.725057", "0.7118824", "0.6991478", "0.6989965", "0.67435676", "0.66941833", "0.66052866", "0.64949757", "0.64702046", "0.64620626", "0.64120847", "0.63590103", "0.63537836", "0.6303849", "0.62771225", "0....
0.67983484
9