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
Gets the list of moves that represent round number X. Rounds start at 0 like arrays.
public ArrayList<Move> getRound(int round) { int startIndex; int endIndex; ArrayList<Move> moves = new ArrayList<Move>(); // Guard against negatives if (round < 0) { round = 0; } if (round >= offsets.size()) { round = offsets.size() - 1; endIndex = offsets.size(); } else { endIndex = offsets.get(round+1); } startIndex = offsets.get(round); for(int i = startIndex; i < endIndex; i++) { moves.add(this.getResults().get(i)); } return moves; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<Match> getRound(int roundNum) {\n\t\tList<Match> round = new ArrayList<Match>();\n\t\tint numInRound = numInRound(roundNum);\n\t\tint roundStart = numInRound - 1;\n\t\tfor (int i = 0; i < numInRound; i++)\n\t\t\tround.add(matches[roundStart + i]);\n\t\treturn round;\n\t}", "public int[] getMov...
[ "0.6582886", "0.61842763", "0.6156833", "0.6111727", "0.602635", "0.5981627", "0.59608006", "0.5912997", "0.58889246", "0.584407", "0.5791157", "0.5780082", "0.5716481", "0.56816745", "0.56647056", "0.5652381", "0.5633863", "0.56080914", "0.55929774", "0.558104", "0.5576959",...
0.7492278
0
Admin logins the Retail website and navigates to Dashboard
@Test(priority=1) public void setUp() throws Exception { driver = DriverFactory.getDriver(DriverNames.CHROME); filterReturnsList=new RTTC025POM(driver); baseUrl = properties.getProperty("baseURL"); driver.get(baseUrl); filterReturnsList.sendUserName("admin"); filterReturnsList.sendPassword("admin@123"); filterReturnsList.clickLoginBtn(); String expectedPageTitle="Dashboard"; String actualPageTitle=driver.getTitle(); assertEquals(actualPageTitle, expectedPageTitle); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void adminLogin() {\n\t\tdriver.get(loginUrl);\r\n\t\t// fill the form\r\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(USERNAME);\r\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(PASSWORD);\r\n\t\t// submit login\r\n\t\tdriver.findElement(By.name(\"btn_submit\")).click();\r\n\t}", "pri...
[ "0.7545364", "0.75379777", "0.7250026", "0.71446496", "0.6845424", "0.6696702", "0.6521769", "0.64828765", "0.6462984", "0.6367636", "0.6352843", "0.6349233", "0.6305955", "0.6289098", "0.6279516", "0.6273421", "0.62281877", "0.62179494", "0.6195556", "0.6187614", "0.6182456"...
0.0
-1
Display the SubOptions available under Reports Option
@Test(priority=2) public void displayReportsOptions() throws InterruptedException { boolean expected=true; boolean actual=filterReturnsList.displayReportsList(); assertEquals(actual, expected); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void showAgendaOptions() {\n System.out.println(new StringJoiner(\"\\n\")\n .add(\"*************************\")\n .add(\"1- View all scheduled RDVs\")\n .add(\"2- Add a new RDV\")\n .add(\"3- Show all RDVs between 2 dates (sorted).\")...
[ "0.58467734", "0.5811623", "0.57073003", "0.5657641", "0.5579992", "0.554593", "0.5539907", "0.5538479", "0.5512047", "0.55039275", "0.54979044", "0.54912066", "0.5471484", "0.5437058", "0.5431047", "0.5430924", "0.54132426", "0.5400842", "0.53996307", "0.53953385", "0.539064...
0.5787613
2
Display the SubOptions available under Sales Option
@Test(priority=3) public void displaySalesOptions() { boolean expected=true; boolean actual=filterReturnsList.displaySalesList(); assertEquals(actual, expected); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void Loadata(){ // fill the choice box\n stats.removeAll(stats);\n String seller = \"Seller\";\n String customer = \"Customer\";\n stats.addAll(seller,customer);\n Status.getItems().addAll(stats);\n }", "public ArrayList<SaleVO> showSale() {\n\t\treturn sale.show();\r...
[ "0.5860457", "0.5512499", "0.550748", "0.5480055", "0.5365833", "0.52769417", "0.5254601", "0.5238511", "0.5207427", "0.5202154", "0.51887894", "0.5158688", "0.5150608", "0.5123659", "0.512", "0.50818515", "0.5053164", "0.50438476", "0.5020788", "0.5017512", "0.50097835", "...
0.5848991
1
click on Returns link and navigate to Returns Report page
@Test(priority=4) public void navigateToReturnsPage() { String expectedPageTitle="Returns Report"; String actualPageTitle=filterReturnsList.navigateToReturns(); assertEquals(actualPageTitle, expectedPageTitle); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "HtmlPage clickLink();", "HtmlPage clickSiteLink();", "public void onClick()\n\t\t\t{\n\t\t\t\t((DccdSession)Session.get()).setRedirectPage(SearchResultDownloadPage.class, getPage());\n\t\t\t\tsetResponsePage(new SearchResultDownloadPage((SearchModel) SearchResultsDownloadPanel.this.getDefaultModel(), \n\t\t\t\...
[ "0.72252446", "0.68372786", "0.6506833", "0.6375064", "0.636973", "0.6329468", "0.63105756", "0.62078685", "0.6114694", "0.6042477", "0.60070914", "0.5982613", "0.5928982", "0.5921291", "0.59120363", "0.58886063", "0.58855677", "0.58746153", "0.586276", "0.58429193", "0.58372...
0.7056985
1
Display options available under GroupBy dropdown
@Test(priority=5) public void displayGroupByListBox() { boolean expected=true; boolean actual=filterReturnsList.displayGroupByListboxOptions(); assertEquals(actual, expected); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private List<OptionBean> populateView(HttpServletRequest request) {\n List<OptionBean> groups = new ArrayList<OptionBean>();\n for (SecurityGroup group : securityManager.getAllGroups()) {\n groups.add(new OptionBean(group.getName(), group.getId()));\n }\n\n Collections.sort(g...
[ "0.60907876", "0.5765664", "0.57582635", "0.5719858", "0.56653684", "0.5646971", "0.5603907", "0.55545425", "0.5430156", "0.5397269", "0.53917277", "0.5361282", "0.533112", "0.52881587", "0.5279317", "0.52765834", "0.5263541", "0.5261441", "0.5253861", "0.52532935", "0.522645...
0.6263296
0
Filter the results using the option "week"
@Test(priority=6) public void filterReturnsDetails() { String expectedTitle="No. Returns"; String actualTitle=filterReturnsList.filterListbyGroup(); assertEquals(actualTitle, expectedTitle); ScreenShot ss=new ScreenShot(driver); ss.captureScreenShot("TC025"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setWeek(String week) {\r\n this.week = week;\r\n }", "public List<Week> getAllWeeks() { return weekService.getAllWeeks(); }", "boolean getWeek1();", "private List<WeeklyRecord> getWeekly(int year, Month month, String type) throws SQLException {\n\t\tLocalDate from = LocalDate.of(year, m...
[ "0.6213057", "0.603004", "0.6024156", "0.59838873", "0.5959821", "0.5898831", "0.58774203", "0.58618915", "0.5821921", "0.58011365", "0.5773385", "0.57475364", "0.5734358", "0.5730257", "0.57281995", "0.56487155", "0.56372696", "0.56298953", "0.55851525", "0.5577134", "0.5574...
0.0
-1
This interface promises to keeps track of changes to the board during the game. It facilitates checking if a specific states have been encountered before as well as giving a way to represent all actions taken in a game
public interface I_GameHistory extends PropertyChangeListener { /** * Checks if the current state has been encountered before * @return true if the current game state is equal to an earlier encountered state */ default boolean isRepeatState() { return isRepeatState(FULL_EQUAL); } default boolean isRepeatState(I_GameState state) { return isRepeatState(FULL_EQUAL, state); } /** * Checks if the current state has been encountered before using a list of predicates to compare states with * @param predicate a predicate testing some relation between two states. * @return true if the current game state is equal to an earlier encountered state */ boolean isRepeatState(final BiPredicate<I_GameState, I_GameState> predicate); boolean isRepeatState(final BiPredicate<I_GameState, I_GameState> predicate, I_GameState state); /** * Checks if the current state has been encountered before. * All states that returns true given the predicate being aplied to it as well as the current state are * being returned as a collection. * @return true if the current game state is equal to an earlier encountered state */ default Collection<I_GameState> getRepeatStates() { return getRepeatStates(FULL_EQUAL); } default Collection<I_GameState> getRepeatStates(I_GameState state) { return getRepeatStates(FULL_EQUAL, state); } /** * Checks if the current state has been encountered before using a list of predicate to compare states with. * All states that returns true given the predicate being applied to it as well as the current state are * being returned as a collection. * @param predicate a predicate testing some relation between two states. * @return true if the current game state is equal to an earlier encountered state */ Collection<I_GameState> getRepeatStates(final BiPredicate<I_GameState, I_GameState> predicate); Collection<I_GameState> getRepeatStates(final BiPredicate<I_GameState, I_GameState> predicate, I_GameState state); /** * This predicate returns true only if the two states are actually both referencing the same object. */ BiPredicate<I_GameState, I_GameState> IDENTITY_EQUAL = I_GameHistory::identityEqual; /** * This predicate returns true if the sizes of the lists in the first state are all * equal to the length of the corresponding list in the second state. */ BiPredicate<I_GameState, I_GameState> PILE_SIZE_EQUAL = I_GameHistory::sizeEqual; /** * This predicate returns true only if the content of each list in one state matches exactly the content * of the corresponding lists in the other state. Objects.equals() is used to check equality of the contents. */ BiPredicate<I_GameState, I_GameState> PILE_CONTENT_EQUAL = I_GameHistory::contentEqual; /** * This predicate tests all of the other standard predicates in this interface. * They are tried in a prioritized manor with the least expensive first. * It returns as soon as it can be sure of the result. */ BiPredicate<I_GameState, I_GameState> FULL_EQUAL = IDENTITY_EQUAL.or(PILE_SIZE_EQUAL.and(PILE_CONTENT_EQUAL)); /** * Returns true only if the two states are actually both referencing the same object. * * @param state1 a state to compare * @param state2 the state to compare it to * @return true if the contents of one state all equals the contents of the other state */ private static boolean identityEqual(final I_GameState state1, final I_GameState state2) { if (state1 == state2) return true; return Stream.of(new SimpleEntry<>(state1, state2)) .flatMap( // transform the elements by making a new stream with the transformation to be used pair -> Arrays.stream(E_PileID.values()) // stream the pileIDs // make new pair of the elements of that pile from each state .map(pileID -> new SimpleEntry<>( pair.getKey().get(pileID), pair.getValue().get(pileID) ) ) ) .allMatch(pair -> pair.getKey() == pair.getValue()); } /** * Returns true if the sizes of the lists in the first state are all * equal to the length of the corresponding list in the second state. * * @param state1 a state to compare * @param state2 the state to compare it to * @return true if the contents of one state all equals the contents of the other state */ private static boolean sizeEqual(final I_GameState state1, final I_GameState state2) { //if a state is null there surely must be a mistake somewhere if (state1 == null || state2 == null) throw new NullPointerException("A state cannot be null when comparing"); // make a stream with a data structure containing both states return Stream.of(new SimpleEntry<>(state1, state2)) .flatMap( // transform the elements by making a new stream with the transformation to be used pair -> Arrays.stream(E_PileID.values()) // stream the pileIDs // make new pair of the elements of that pile from each state .map(pileID -> new SimpleEntry<>( pair.getKey().get(pileID), pair.getValue().get(pileID) ) ) ) .map(I_GameHistory::replaceNulls) .allMatch(pair -> pair.getKey().size() == pair.getValue().size()); // check they have equal sizes } /** * Returns true only if the content of each list in one state matches exactly the content * of the corresponding lists in the other state. Objects.equals() is used to check equality of the contents. * * @param state1 a state to compare * @param state2 the state to compare it to * @return true if the contents of one state all equals the contents of the other state */ private static boolean contentEqual(final I_GameState state1, final I_GameState state2) { //if a state is null there surely must be a mistake somewhere if (state1 == null || state2 == null) throw new NullPointerException("A state cannot be null when comparing"); //if ( !sizeEqual(state1, state2) ) return false; return Stream.of(new SimpleImmutableEntry<>(state1, state2)) .flatMap( //map the pair of states to many pairs of piles statePair -> Arrays.stream(E_PileID.values()) .map(pileID -> new SimpleEntry<>( statePair.getKey().get(pileID), statePair.getValue().get(pileID) ) ) ) .map(I_GameHistory::replaceNulls) .flatMap( // map the pairs of piles to many pairs of Optional<I_card>s. listPair -> IntStream //make sure to always traverse the longer list .range(0, Math.max(listPair.getKey().size(), listPair.getValue().size())) .mapToObj(i -> new SimpleEntry<>( getIfExists(listPair.getKey(), i), getIfExists(listPair.getValue(), i)) ) ) // map pairs to booleans by checking that the element in a pair are equal .map(cardPair -> Objects.equals(cardPair.getKey(), cardPair.getValue())) // reduce the many values to one bool by saying all must be true or the statement is false .reduce(true, (e1, e2) -> e1 && e2); } static SimpleEntry<List<I_CardModel>, List<I_CardModel>> replaceNulls(SimpleEntry<List<I_CardModel>, List<I_CardModel>> entry) { var key = entry.getKey(); var value = entry.getValue(); if (key == null) key = List.of(); if (value == null) value = List.of(); return new SimpleEntry<>(key, value); } default <t extends I_GameState> Predicate<t> partiallyApplyPredicate(BiPredicate<t, t> biPred, t arg) { return test -> biPred.test(arg, test); } /** * A convenient to get an optional card from a list that might throw index out of bounds * @param list the list to take an element from * @param index the index of the element * @return empty if element is null or dosen't exist, otherwise the element at index wrapped in {@link Optional} */ private static Optional<I_CardModel> getIfExists(List<I_CardModel> list, int index) { try { return Optional.ofNullable(list.get(index)); } catch (IndexOutOfBoundsException e) { return Optional.empty(); } } //todo might be a good idea to implement a method that checks for the moves that has been tried when in a given state }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void takeTurn(int[][] boardState)\n {\n \n }", "public interface PuzzleState {\r\n\t/**\r\n\t * The puzzle allows for four moves whose names are fixed with an enum type\r\n\t * Operation. Note that MOVERIGHT means that a tile moves to the right and the\r\n\t * slot to its right need to be ...
[ "0.6344088", "0.6282174", "0.6279204", "0.6205396", "0.6186173", "0.613159", "0.61276186", "0.59826386", "0.5957856", "0.59487873", "0.5915864", "0.58965355", "0.5876549", "0.58732396", "0.58673036", "0.5813026", "0.5790974", "0.5783066", "0.5782927", "0.5758043", "0.5748339"...
0.5836699
15
Checks if the current state has been encountered before
default boolean isRepeatState() { return isRepeatState(FULL_EQUAL); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkState() {\r\n\t\tswitch (this.stepPanel.getStep()) {\r\n\t\tcase StepPanel.STEP_HOST_GRAPH:\r\n\t\t\tcheckHostGraphAndNextStep();\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_STOP_GRAPH:\r\n\t\t\tcheckStopGraphAndNextStep();\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_CRITICAL_PAIRS:\r\n\t\t\tcheckP...
[ "0.69217736", "0.68918973", "0.66341704", "0.6586717", "0.6508029", "0.6494741", "0.6494741", "0.6494741", "0.6494741", "0.6494741", "0.6494741", "0.6494741", "0.6494741", "0.6432158", "0.63995826", "0.6360266", "0.6325066", "0.6253609", "0.62463564", "0.6233031", "0.6207457"...
0.0
-1
Checks if the current state has been encountered before using a list of predicates to compare states with
boolean isRepeatState(final BiPredicate<I_GameState, I_GameState> predicate);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean checkIfAlreadyIsState(ArrayList<ArrayList<Integer>> states, ArrayList<Integer> state){\n boolean res=true;\n Collections.sort(state);\n\n for (int i = 0 ; i < states.size();i++){\n ArrayList<Integer> currState = states.get(i);\n\n if(currState.size() != st...
[ "0.60015035", "0.5552526", "0.5546471", "0.5394547", "0.53622895", "0.530194", "0.5295812", "0.5293275", "0.5285399", "0.5279147", "0.52711725", "0.5218621", "0.51797336", "0.51791304", "0.51693386", "0.51661587", "0.5152352", "0.5125801", "0.51255345", "0.51237327", "0.50662...
0.5816289
1
Checks if the current state has been encountered before. All states that returns true given the predicate being aplied to it as well as the current state are being returned as a collection.
default Collection<I_GameState> getRepeatStates() { return getRepeatStates(FULL_EQUAL); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean checkNext(){\n boolean ret = this.hasNext;\n if ((this.allStatesIterator.hasNext()) || (this.allSubsetsIterator.hasNext()) || (this.allTransitionsIterator.hasNext())){\n hasNext = true;\n return hasNext;\n }\n hasNext = false;\n return ret;\n...
[ "0.5679753", "0.5658178", "0.5602214", "0.5496625", "0.5406949", "0.53947765", "0.5393356", "0.53814393", "0.53363264", "0.5302364", "0.5248589", "0.52425283", "0.52425146", "0.52033144", "0.51834184", "0.5180066", "0.51609313", "0.51596516", "0.5087054", "0.5071161", "0.5063...
0.48407912
51
Checks if the current state has been encountered before using a list of predicate to compare states with. All states that returns true given the predicate being applied to it as well as the current state are being returned as a collection.
Collection<I_GameState> getRepeatStates(final BiPredicate<I_GameState, I_GameState> predicate);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Collection<? extends AbstractState> getFollowStates(AutomatonState state, List<AbstractState> otherElements, CFAEdge edge, boolean failOnUnknownMatch) throws CPATransferException {\n Preconditions.checkArgument(!(state instanceof AutomatonUnknownState));\n if (state == cpa.getBottomState()) {\n ...
[ "0.58505094", "0.58120817", "0.5396003", "0.5378852", "0.53344744", "0.5203293", "0.51864004", "0.51771575", "0.5138018", "0.51206803", "0.5102532", "0.5096229", "0.5082533", "0.50708413", "0.50694454", "0.50606567", "0.50348896", "0.50131035", "0.4991994", "0.49841514", "0.4...
0.5789442
2
Returns true only if the two states are actually both referencing the same object.
private static boolean identityEqual(final I_GameState state1, final I_GameState state2) { if (state1 == state2) return true; return Stream.of(new SimpleEntry<>(state1, state2)) .flatMap( // transform the elements by making a new stream with the transformation to be used pair -> Arrays.stream(E_PileID.values()) // stream the pileIDs // make new pair of the elements of that pile from each state .map(pileID -> new SimpleEntry<>( pair.getKey().get(pileID), pair.getValue().get(pileID) ) ) ) .allMatch(pair -> pair.getKey() == pair.getValue()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean equals(Object obj) {\n if(obj == null || obj.getClass() != getClass()) return false;\n\n State state = (State)obj;\n\n // if both side equals then we say this state is equivalent to the other state\n if(state.getSideInfo(\"left\") == getSideInfo(\"left\"))\...
[ "0.73099566", "0.73012435", "0.71788776", "0.7134352", "0.71051455", "0.7079063", "0.7023255", "0.702203", "0.70143044", "0.698853", "0.69300675", "0.69081247", "0.6894597", "0.67519516", "0.6705154", "0.6698834", "0.6656676", "0.6612467", "0.6595321", "0.64442503", "0.643798...
0.62648576
24
Returns true if the sizes of the lists in the first state are all equal to the length of the corresponding list in the second state.
private static boolean sizeEqual(final I_GameState state1, final I_GameState state2) { //if a state is null there surely must be a mistake somewhere if (state1 == null || state2 == null) throw new NullPointerException("A state cannot be null when comparing"); // make a stream with a data structure containing both states return Stream.of(new SimpleEntry<>(state1, state2)) .flatMap( // transform the elements by making a new stream with the transformation to be used pair -> Arrays.stream(E_PileID.values()) // stream the pileIDs // make new pair of the elements of that pile from each state .map(pileID -> new SimpleEntry<>( pair.getKey().get(pileID), pair.getValue().get(pileID) ) ) ) .map(I_GameHistory::replaceNulls) .allMatch(pair -> pair.getKey().size() == pair.getValue().size()); // check they have equal sizes }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private final boolean AreListStatesEqual(List<State> list1, List<State> list2) {\r\n if ((list1.size() != list2.size())) {\r\n return false;\r\n }\r\n \r\n for (State state : list1) {\r\n if (!list2.contains(state)) {\r\n return false;\r\n ...
[ "0.6937856", "0.6866047", "0.67330706", "0.62304145", "0.61206895", "0.60708547", "0.6058871", "0.60528725", "0.5958367", "0.5934609", "0.59239185", "0.5916038", "0.58209735", "0.5728735", "0.5728224", "0.5708776", "0.5697465", "0.56916356", "0.5689526", "0.5689526", "0.56895...
0.7620933
0
Returns true only if the content of each list in one state matches exactly the content of the corresponding lists in the other state. Objects.equals() is used to check equality of the contents.
private static boolean contentEqual(final I_GameState state1, final I_GameState state2) { //if a state is null there surely must be a mistake somewhere if (state1 == null || state2 == null) throw new NullPointerException("A state cannot be null when comparing"); //if ( !sizeEqual(state1, state2) ) return false; return Stream.of(new SimpleImmutableEntry<>(state1, state2)) .flatMap( //map the pair of states to many pairs of piles statePair -> Arrays.stream(E_PileID.values()) .map(pileID -> new SimpleEntry<>( statePair.getKey().get(pileID), statePair.getValue().get(pileID) ) ) ) .map(I_GameHistory::replaceNulls) .flatMap( // map the pairs of piles to many pairs of Optional<I_card>s. listPair -> IntStream //make sure to always traverse the longer list .range(0, Math.max(listPair.getKey().size(), listPair.getValue().size())) .mapToObj(i -> new SimpleEntry<>( getIfExists(listPair.getKey(), i), getIfExists(listPair.getValue(), i)) ) ) // map pairs to booleans by checking that the element in a pair are equal .map(cardPair -> Objects.equals(cardPair.getKey(), cardPair.getValue())) // reduce the many values to one bool by saying all must be true or the statement is false .reduce(true, (e1, e2) -> e1 && e2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private final boolean AreListStatesEqual(List<State> list1, List<State> list2) {\r\n if ((list1.size() != list2.size())) {\r\n return false;\r\n }\r\n \r\n for (State state : list1) {\r\n if (!list2.contains(state)) {\r\n return false;\r\n ...
[ "0.79567224", "0.6700266", "0.66720486", "0.6625868", "0.66063744", "0.6589261", "0.6556432", "0.6538399", "0.6522661", "0.64845294", "0.6467478", "0.6460218", "0.64558524", "0.64327353", "0.6430924", "0.6400357", "0.6377091", "0.637263", "0.63639474", "0.63210744", "0.631499...
0.74987614
1
String name = request.getParameter("name");
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String name = new String(request.getParameter("name").getBytes("iso-8859-1"),"utf-8"); UserService service = new UserServiceImpl(); User user = service.findUser(name); request.setAttribute("user", user); request.getRequestDispatcher("/jsp/edituser.jsp").forward(request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getParameter(HttpServletRequest request, String name) throws ValidationException;", "public String getParameter(String name) throws IOException {\n if(form == null) {\n form = builder.getInstance();\n }\n return form.get(name);\n }", "private String getParameter(String name, Ht...
[ "0.7843314", "0.7561136", "0.7522545", "0.7270524", "0.72406983", "0.6985545", "0.6938527", "0.68901056", "0.68029773", "0.6581805", "0.65771496", "0.6572917", "0.64702314", "0.64669317", "0.6458408", "0.64275306", "0.6395496", "0.63741314", "0.6368375", "0.6323871", "0.63234...
0.5656432
67
TODO Autogenerated method stub
private String doHttpClientGet() { HttpGet httpGet=new HttpGet(url); HttpClient client=new DefaultHttpClient(); try { HttpResponse response=client.execute(httpGet); if(response.getStatusLine().getStatusCode()==HttpStatus.SC_OK){ result=EntityUtils.toString(response.getEntity()); } System.out.println("content----->"+result); } catch (ClientProtocolException e) { e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View view) { switch (view.getId()) { case R.id.vc_shuaixi: vc_image.setImageBitmap(Code.getInstance().getBitmap()); getCode = Code.getInstance().getCode(); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
Enables the My Location layer if the fine location permission has been granted.
private void enableMyLocation() { if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) { // Permission to access the location is missing. PermissionUtils.requestPermission(this, LOCATION_PERMISSION_REQUEST_CODE, Manifest.permission.ACCESS_FINE_LOCATION, true); mMap.setMyLocationEnabled(true); } else if (mMap != null) { // Access to the location has been granted to the app. mMap.setMyLocationEnabled(true); } Log.i("Current Location", "Location Enabled:" + mMap.isMyLocationEnabled()); LocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE); LocationListener locationListener = new OrderLocationListener(); // Register the listener with the Location Manager to receive location updates locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 9000, 0, locationListener); Location location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER); makeUseOfNewLocation(location); location = LocationServices.FusedLocationApi.getLastLocation(client); makeUseOfNewLocation(location); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void enableLocation(){\n if(PermissionsManager.areLocationPermissionsGranted(this))\n {\n initializeLocationEngine();\n initializeLocationLayer();\n\n\n }else{\n permissionsManager = new PermissionsManager(this);\n permissionsManager.requestL...
[ "0.8208465", "0.79404676", "0.7863643", "0.7849101", "0.783358", "0.76571274", "0.763352", "0.7589871", "0.7427327", "0.73520654", "0.71160996", "0.7102486", "0.7100997", "0.70915", "0.7074462", "0.7074462", "0.705325", "0.7051611", "0.69584197", "0.6957103", "0.6953321", "...
0.73035705
10
Displays a dialog with error message explaining that the location permission is missing.
private void showMissingPermissionError() { PermissionUtils.PermissionDeniedDialog .newInstance(true).show(getSupportFragmentManager(), "dialog"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showMissingPermissionsDialog(){\n android.app.AlertDialog.Builder alertDialog = new android.app.AlertDialog.Builder(this);\n\n // Setting Dialog Title\n alertDialog.setTitle(\"Enable Permissions\");\n\n // Setting Dialog Message\n alertDialog.setMessage(\"Application ...
[ "0.6958244", "0.67710596", "0.6752319", "0.6617532", "0.6522053", "0.6472646", "0.6438382", "0.641026", "0.6198996", "0.6167778", "0.6096244", "0.6072465", "0.6002546", "0.5997172", "0.5991611", "0.59908015", "0.59864205", "0.5952292", "0.59252274", "0.59153193", "0.59078944"...
0.65363395
8
final String info = (String) marker.getExtraInfo().get("info");
@Override public boolean onMarkerClick(Marker marker) { Toast.makeText(CameraInfoActivity.this,"点击布点",Toast.LENGTH_SHORT).show(); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View getInfoContents(final Marker marker) {\n infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n title = ((TextView) infoWindow.findViewById(R.id.title));\n ...
[ "0.6989084", "0.69382477", "0.68726146", "0.6856287", "0.68013287", "0.6750228", "0.67444205", "0.6667151", "0.6633799", "0.66217154", "0.66217154", "0.66217154", "0.65591294", "0.6551205", "0.6505942", "0.65029377", "0.649997", "0.6458439", "0.6452251", "0.6449164", "0.64343...
0.0
-1
TODO Autogenerated method stub
public boolean onTouch(View v, MotionEvent event) { mExpandableListView.getParent().requestDisallowInterceptTouchEvent(true); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
File file = new File(Environment.getExternalStorageDirectory(), "/Pictures/QQ/pandavideo_cut.mp4"); System.out.println(file.getPath());
private void initVideoPath() { File file = new File(Environment.getExternalStorageDirectory(), "/Pictures/QQ/pandavideo_cut.mp4"); String videoPath = file.getAbsolutePath(); // Toast.makeText(this,"文件是否存在"+file.exists(),Toast.LENGTH_LONG).show(); Toast.makeText(this,"文件路径"+videoPath,Toast.LENGTH_LONG).show(); mVideoView.setVideoPath(videoPath); mVideoView.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String getOutputMediaFile(){\n\n\t File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n\t Environment.DIRECTORY_PICTURES), \"MyCameraApp\");\n\t // This location works best if you want the created images to be shared\n\t // between applications and p...
[ "0.730956", "0.7244021", "0.72203404", "0.71292543", "0.68585336", "0.67595315", "0.65923446", "0.65332294", "0.64785415", "0.6470808", "0.64245754", "0.63641393", "0.6363202", "0.6358038", "0.6353649", "0.6322482", "0.631628", "0.630884", "0.62803906", "0.626022", "0.6234417...
0.7229231
2
Created by chintankotadia on 11/01/18.
public interface ReqInterface { @GET("/posts") Call<List<Example>> getMyJSON(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t...
[ "0.619827", "0.60035145", "0.60020643", "0.59654266", "0.59654266", "0.59069747", "0.59032124", "0.5885054", "0.5879964", "0.58735955", "0.58629847", "0.5841652", "0.58240616", "0.57951677", "0.57938606", "0.5789898", "0.57744634", "0.5772224", "0.5772224", "0.5772224", "0.57...
0.0
-1
/ JADX WARNING: Code restructure failed: missing block: B:22:0x0042, code lost: if (r4.equals("hashtag") == false) goto L_0x0024; / JADX WARNING: Code restructure failed: missing block: B:24:0x004c, code lost: if (r4.equals("user") == false) goto L_0x0024; / JADX WARNING: Code restructure failed: missing block: B:9:0x0022, code lost: if (r4.equals("location") == false) goto L_0x0024;
public final Integer A00() { char c; Integer num; if (this.A00 == null) { String str = this.A04; int hashCode = str.hashCode(); if (hashCode == 3599307) { c = 2; } else if (hashCode == 697547724) { c = 0; } else if (hashCode == 1901043637) { c = 1; } c = 65535; if (c == 0) { num = Constants.ZERO; } else if (c == 1) { num = Constants.ONE; } else if (c != 2) { num = Constants.A0N; } else { num = Constants.A0C; } this.A00 = num; } return this.A00; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private final com.google.android.p306h.p307a.p308a.C5685v m26927b(com.google.protobuf.nano.a r7) {\n /*\n r6 = this;\n L_0x0000:\n r0 = r7.a();\n switch(r0) {\n case 0: goto L_0x000d;\n case 8: goto L_0x000e;\n case 18: goto L_0x0043;\n cas...
[ "0.5871857", "0.58576524", "0.5680457", "0.5618195", "0.5596877", "0.5586482", "0.5573312", "0.5567709", "0.5553075", "0.5539006", "0.55133164", "0.55091476", "0.5509008", "0.54771584", "0.54647833", "0.5445075", "0.53735876", "0.5370486", "0.53410846", "0.53280234", "0.53069...
0.0
-1
1 / \ 2 3 / / \ 4 5 6 / \ 7 8 7 > 4 > 8 > 2 > 1 > 5 > 3 > 6
public static void main(String[] args) { Node<Integer> node1 = new Node<>(1); Node<Integer> node2 = new Node<>(2); Node<Integer> node3 = new Node<>(3); Node<Integer> node4 = new Node<>(4); node1.setLeftChild(node2); node1.setRightChild(node3); node2.setLeftChild(node4); node3.setLeftChild(new Node<>(5)); node3.setRightChild(new Node<>(6)); node4.setLeftChild(new Node<>(7)); node4.setRightChild(new Node<>(8)); traverse(node1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int first_leaf() { return n/2; }", "private int leftChild(int i){return 2*i+1;}", "public String run() {\r\n\t// divisorSum[n] is the sum of all the proper divisors of n\r\n int divisorSum[]= new int[LIMIT+1];\r\n for(int i=1;i<=LIMIT;i++)...
[ "0.59730023", "0.5593236", "0.55730385", "0.5432687", "0.52791494", "0.527625", "0.523507", "0.5188621", "0.51802474", "0.51546884", "0.51337755", "0.50925815", "0.50475264", "0.50446254", "0.50419474", "0.50293607", "0.49933", "0.49805215", "0.4980482", "0.49756125", "0.4965...
0.0
-1
Created by maxleo on 17920.
public interface CommonService { String codeToLocation(int code); int locationToCode(String location); Addressbase getAddress(int code); List<Addressbase> getSubAddress(int code); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "public final void mo51373a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "protect...
[ "0.57955784", "0.56899214", "0.56620777", "0.56479204", "0.564708", "0.5635979", "0.55978197", "0.5540363", "0.5540363", "0.55261767", "0.55025464", "0.54899496", "0.54777414", "0.5437954", "0.54366803", "0.54346484", "0.54346484", "0.54346484", "0.54346484", "0.54346484", "0...
0.0
-1
Constructor with a message. When we want to signal when exception is made.
public SmartScriptParserException(String message) {super(message);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Exception(String message) {\n\t\t\tsuper(message);\n\t\t}", "public MyException(String message)\n { super(message); }", "public void testConstructorWithMessage() {\r\n RejectReasonNotFoundException exception = new RejectReasonNotFoundException(message);\r\n\r\n assertNotNull(\"Unabl...
[ "0.75535285", "0.7419842", "0.7305542", "0.7205557", "0.7168239", "0.71501213", "0.711692", "0.71158224", "0.7089529", "0.7055337", "0.70548356", "0.7020712", "0.69925827", "0.6969737", "0.69498384", "0.6866378", "0.6856728", "0.68342453", "0.6830908", "0.68186474", "0.679300...
0.0
-1
This is only required when you want to highlight the webelement
public static WebElement syncWebElement(WebDriver driver,WebElement element) { WebElement ele= waitForWebElement(driver, element, 20); WebElement ele1=highLightElement(driver, ele); return ele1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "default void highlight()\n {\n JavascriptExecutor executor = (JavascriptExecutor) environment().getDriver();\n\n executor\n .executeScript(\"arguments[0].setAttribute('style', 'background: yellow; border: 2px solid red;'); \"\n + \"arguments[0].setAttribute('highlighted',...
[ "0.7570748", "0.7040353", "0.7022716", "0.6810292", "0.6153532", "0.6125833", "0.61005336", "0.608848", "0.6050932", "0.5996801", "0.59409404", "0.5916037", "0.5889391", "0.58648235", "0.58638996", "0.58569026", "0.581646", "0.5808188", "0.575283", "0.5746797", "0.57337654", ...
0.0
-1
use this always if you don't want to highlight the elements
public static WebElement waitForWebElement(WebDriver driver, WebElement element,int time) { WebDriverWait wait=new WebDriverWait(driver, time); return wait.until(ExpectedConditions.elementToBeClickable(element)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeAllHighlights() {}", "@Override\n public void removeHighlight()\n {\n }", "private IRenderingElement generateHighlightElement( IAtom atom ) {\n return null;\n }", "public void highlightEnable() {\n actualFillColor = new Color(0, 255, 0, 150);\n r...
[ "0.69783247", "0.67539513", "0.6615973", "0.6565665", "0.6541549", "0.64322126", "0.63931024", "0.63931024", "0.63931024", "0.63931024", "0.6306751", "0.62385374", "0.6208651", "0.6193481", "0.6177909", "0.6135018", "0.6119927", "0.6109503", "0.60842216", "0.6076718", "0.6027...
0.0
-1
This method was generated by MyBatis Generator. This method returns the value of the database column TRS_TREASURY_LIMIT.BRANCH_CODE
public BigDecimal getBRANCH_CODE() { return BRANCH_CODE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setBRANCH_CODE(BigDecimal BRANCH_CODE) {\r\n this.BRANCH_CODE = BRANCH_CODE;\r\n }", "public void setBRANCH_CODE(BigDecimal BRANCH_CODE) {\r\n this.BRANCH_CODE = BRANCH_CODE;\r\n }", "public void setBRANCH_CODE(BigDecimal BRANCH_CODE) {\r\n this.BRANCH_CODE = BRANCH_CODE;...
[ "0.67134625", "0.67134625", "0.67134625", "0.67134625", "0.67134625", "0.67134625", "0.67134625", "0.67134625", "0.6555734", "0.6455185", "0.63346976", "0.6294653", "0.6175746", "0.6075484", "0.59846264", "0.5894398", "0.58825004", "0.5874771", "0.5736007", "0.5647345", "0.56...
0.73416716
6
This method was generated by MyBatis Generator. This method sets the value of the database column TRS_TREASURY_LIMIT.BRANCH_CODE
public void setBRANCH_CODE(BigDecimal BRANCH_CODE) { this.BRANCH_CODE = BRANCH_CODE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }", "public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }", "public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }", "public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r...
[ "0.638271", "0.638271", "0.638271", "0.638271", "0.638271", "0.638271", "0.638271", "0.638271", "0.6098058", "0.60040903", "0.5952078", "0.5929183", "0.577668", "0.56794715", "0.5634483", "0.5634483", "0.56325024", "0.5550583", "0.55395424", "0.55305856", "0.55305856", "0.5...
0.74146533
6
This method was generated by MyBatis Generator. This method returns the value of the database column TRS_TREASURY_LIMIT.CIF_NO
public BigDecimal getCIF_NO() { return CIF_NO; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCIF_NO(BigDecimal CIF_NO) {\r\n this.CIF_NO = CIF_NO;\r\n }", "public BigDecimal getCIF_SUB_NO() {\r\n return CIF_SUB_NO;\r\n }", "public BigDecimal getCIF_SUB_NO() {\r\n return CIF_SUB_NO;\r\n }", "public BigDecimal getCIF_SUB_NO() {\r\n return CIF_SUB_NO;...
[ "0.6371465", "0.60698664", "0.60698664", "0.60698664", "0.58883923", "0.5697324", "0.563551", "0.55876744", "0.5525818", "0.55240333", "0.54994047", "0.54994047", "0.54994047", "0.5447864", "0.54334086", "0.53962743", "0.5374097", "0.5374097", "0.5345029", "0.53173953", "0.53...
0.6473809
0
This method was generated by MyBatis Generator. This method sets the value of the database column TRS_TREASURY_LIMIT.CIF_NO
public void setCIF_NO(BigDecimal CIF_NO) { this.CIF_NO = CIF_NO; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setACC_CIF(BigDecimal ACC_CIF) {\r\n this.ACC_CIF = ACC_CIF;\r\n }", "public void setCIF_SUB_NO(BigDecimal CIF_SUB_NO) {\r\n this.CIF_SUB_NO = CIF_SUB_NO;\r\n }", "public void setCIF_SUB_NO(BigDecimal CIF_SUB_NO) {\r\n this.CIF_SUB_NO = CIF_SUB_NO;\r\n }", "public vo...
[ "0.5972449", "0.57983804", "0.57983804", "0.57983804", "0.57747966", "0.5640398", "0.55953735", "0.55279434", "0.54461986", "0.5414087", "0.5407065", "0.53929734", "0.5371439", "0.53456324", "0.53313947", "0.5324903", "0.53228515", "0.5304645", "0.52919", "0.5281216", "0.5267...
0.6775092
0
This method was generated by MyBatis Generator. This method returns the value of the database column TRS_TREASURY_LIMIT.COMP_CODE
public BigDecimal getCOMP_CODE() { return COMP_CODE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCOMP_CODE(BigDecimal COMP_CODE) {\r\n this.COMP_CODE = COMP_CODE;\r\n }", "public void setCOMP_CODE(BigDecimal COMP_CODE) {\r\n this.COMP_CODE = COMP_CODE;\r\n }", "public void setCOMP_CODE(BigDecimal COMP_CODE) {\r\n this.COMP_CODE = COMP_CODE;\r\n }", "public vo...
[ "0.6143805", "0.6143805", "0.6143805", "0.6143805", "0.6143805", "0.6143805", "0.6143805", "0.6143805", "0.5912065", "0.57917863", "0.5735157", "0.5688957", "0.5688957", "0.56028444", "0.5507281", "0.5498101", "0.5418064", "0.5369752", "0.5294637", "0.52295107", "0.52295107",...
0.6372483
6
This method was generated by MyBatis Generator. This method sets the value of the database column TRS_TREASURY_LIMIT.COMP_CODE
public void setCOMP_CODE(BigDecimal COMP_CODE) { this.COMP_CODE = COMP_CODE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void setTableCompCode(String compcode)\n\t\t{\n\t\t\tCompCode = compcode ;\n\t\t}", "public void setCompCode(String compCode) {\n this.compCode = compCode;\n }", "public void setCODE(BigDecimal CODE) {\r\n this.CODE = CODE;\r\n }", "public void setCODE(BigDecimal CODE) {\r\n ...
[ "0.6572177", "0.62839323", "0.6142865", "0.6142865", "0.608601", "0.59790295", "0.54969233", "0.54969233", "0.54969233", "0.54969233", "0.54969233", "0.54969233", "0.54969233", "0.54969233", "0.5383881", "0.53665745", "0.53528637", "0.53334403", "0.5320195", "0.5254054", "0.5...
0.671658
6
Implementation of select algorithm O(n)
public static int select(int[] arr, int k){ return select(arr, 0, arr.length, k); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract int quickSelect(Integer[] map, int right, int idx);", "private static int select (int[] arr, int p, int n, int k){\n //threshold of 17\n if(n < 17 ){\n insertionSort(arr, p, p+n-1);\n return arr[p + n - k];\n }else{\n int q = randomizedPart...
[ "0.66711134", "0.6275944", "0.62719", "0.6156153", "0.60423833", "0.6008034", "0.59875", "0.5899465", "0.58815044", "0.58408886", "0.58292645", "0.5824368", "0.58138406", "0.57633", "0.5758464", "0.5733756", "0.57137436", "0.57033217", "0.5691135", "0.5680113", "0.5668527", ...
0.5638341
24
Implementation of select algorithm O(n)
private static int select (int[] arr, int p, int n, int k){ //threshold of 17 if(n < 17 ){ insertionSort(arr, p, p+n-1); return arr[p + n - k]; }else{ int q = randomizedPartition(arr,p,p+n-1); int left = q-p; int right = n - left - 1; if(right >= k) return select(arr,q+1,right,k); else if(right + 1 == k ) return arr[q]; else return select(arr,p,left,k-right-1); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract int quickSelect(Integer[] map, int right, int idx);", "public K select(int k);", "private int quickSelect(int[] arr, int n, int low, int high){\n\n int index = partition(arr, low, high);\n\n if (index - low == n - 1)\n return arr[index];\n\n if (index - low > ...
[ "0.6671118", "0.62733746", "0.61556685", "0.604222", "0.6008506", "0.59879315", "0.5901497", "0.5883466", "0.58406687", "0.58293116", "0.5824464", "0.58134174", "0.57652617", "0.57610875", "0.5734189", "0.57156", "0.57038087", "0.56914365", "0.56809664", "0.5668936", "0.56643...
0.6276236
1
Exchange the values at index i with j in the arr A
private static void exchange(int[] A, int i, int j) { if(A[i] == A[j]) return; A[i] = A[i] ^ A[j]; A[j] = A[i] ^ A[j]; A[i] = A[i] ^ A[j]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void exchange(int i, int j){\n\t\tString temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n\t}", "void exchange(Node[] arr, int i, int j) {\n\n\t\tNode temp = arr[i];\n\t\tarr[i] = arr[j];\n\t\tarr[j] = temp;\n\t}", "private void exchange(int i, int j){\n\t\tnode_data t = _a[i];...
[ "0.7442028", "0.73706174", "0.73273844", "0.7261353", "0.7202352", "0.72014767", "0.71756065", "0.71756065", "0.71728027", "0.7169585", "0.7169585", "0.7169585", "0.713922", "0.7112143", "0.70998555", "0.70807326", "0.70603055", "0.7038842", "0.7032808", "0.70308596", "0.7026...
0.7361377
2
Select using the priority queue
public static int selectUsingPQ(int[] arr, int k){ PriorityQueue<Integer> pq = new PriorityQueue<>(); int i; //add first k elements in the priority queue for(i=0; i<k ; i++){ pq.add(arr[i]); } while(i<arr.length){ if(arr[i] > pq.peek()){ pq.add(arr[i]); pq.remove(); } i++; } // the top of the heap will be the kth largest element return pq.peek(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\nPriorityQueue pq= new PriorityQueue(15);//,new MyComparator123());\r\nSystem.out.println(pq.peek());\r\n//System.out.println(pq.element());\r\n/*for(int i=1;i<=10;i++)\r\npq.offer(i);\r\nSystem.out.println(pq);\r\nSystem.out.println(pq.poll());\r\n\r\nSystem.out.println(pq...
[ "0.62340534", "0.606084", "0.6004087", "0.5907552", "0.58673227", "0.5842667", "0.5829236", "0.5806292", "0.5749295", "0.57436883", "0.57099545", "0.5698381", "0.56726456", "0.5668612", "0.5648526", "0.56439775", "0.563166", "0.5609952", "0.5586697", "0.5581474", "0.55796266"...
0.6184068
1
Select pivot x uniformly from A[p...r]
private static int randomizedPartition(int[] A, int p, int r) { Random rand = new Random(); int idx = p+rand.nextInt(r-p+1); int x = A[idx]; int i = p; int j = r; // LI:A[p...i] ≤ x, A[j...r] ≥ x while (true) { while (A[i] < x) i++; while (A[j] > x) j--; if (i >= j) return j; exchange(A, i, j); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected T pickPivot(T[] array, int start, int end) {\n\t\treturn array[start];\n\t}", "@Nonnull\n public int [] getPivot ()\n {\n return Arrays.copyOf (m_aPivot, m_nRows);\n }", "private static int partition(int[] a, int p, int r) {\n int i = p;\n int pivot = a[r];\n /...
[ "0.57781523", "0.5531806", "0.55115485", "0.55048555", "0.5449076", "0.54427415", "0.5429248", "0.54249495", "0.5399947", "0.5392511", "0.53891027", "0.53601855", "0.5357913", "0.53016037", "0.5300354", "0.518396", "0.5171313", "0.5168382", "0.5129235", "0.50570387", "0.49732...
0.55571955
1
TODO Autogenerated method stub
@Override public void draw() { System.out.println("Triangle was drawing."); System.out.println("new line"); System.out.println("second line "); //add comments // add more comments }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
collects user inputed data from textfields and creates a sample entry for the table
public void addEntry(ActionEvent event) { if(checkEntryInputs()) { BacteroidesSample newBacteroidesSample = new BacteroidesSample(sampleNumberTF.getText(),materialDescriptionTF.getText(),bacteroidesConcentration.getText()); newBacteroidesSample.setConclusionCase(); table.getItems().add(newBacteroidesSample); newReport2.addSample(newBacteroidesSample); addConclusionNumber(newBacteroidesSample); sampleNumberTF.clear(); materialDescriptionTF.clear(); bacteroidesConcentrationTF.clear(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private MyTable generateTable()\n\t{\n\t\t//this creates the column headers for the table\n\t\tString[] titles = new String[] {\"Name\"};\n\t\t//fields will store all of the entries in the database for the GUI\n\t\tArrayList<String[]> fields = new ArrayList<String[]>();\n\t\tfor (food foodStuff: items) //for each ...
[ "0.59877425", "0.5889481", "0.5747951", "0.57325023", "0.573241", "0.5611162", "0.5599231", "0.5476239", "0.54499054", "0.54419476", "0.5431033", "0.54143816", "0.53940535", "0.53793997", "0.53667086", "0.53591186", "0.53465945", "0.5346212", "0.5317613", "0.53067386", "0.529...
0.5875384
2
removes entry from sample table and walk in report data
public void removeEntry(ActionEvent event) { newReport2.removeSample(table.getSelectionModel().getSelectedItem()); table.getItems().removeAll(table.getSelectionModel().getSelectedItem()); if(conclusionNumbers1.indexOf(table.getSelectionModel().getSelectedItem().getSampleNumber())!=-1) { conclusionNumbers1.remove(conclusionNumbers1.indexOf(table.getSelectionModel().getSelectedItem().getSampleNumber())); } else { conclusionNumbers2.remove(conclusionNumbers2.indexOf(table.getSelectionModel().getSelectedItem().getSampleNumber())); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void DeleteBurnInsOnPreviousSamples() {\n\t\tif (gibbs_sample_num <= num_gibbs_burn_in + 1 && gibbs_sample_num >= 2){\n\t\t\tgibbs_samples_of_bart_trees[gibbs_sample_num - 2] = null;\n\t\t}\n\t}", "@Override\n public final void clearData() {\n synchronized (tableRows) {\n statModel.c...
[ "0.60199827", "0.59472764", "0.58574307", "0.56293076", "0.55987644", "0.558779", "0.5550167", "0.548318", "0.54601413", "0.5427475", "0.54215616", "0.54195076", "0.54172945", "0.5381057", "0.5377001", "0.53532803", "0.53431773", "0.5341592", "0.53211147", "0.5319783", "0.530...
0.6071061
0
checks entry for invalid inputs
public boolean checkEntryInputs() { boolean isValid = true; if(sampleNumberTF.getText().equals("")) { isValid = false; } if(materialDescriptionTF.getText().equals("")) { isValid = false; } if(Double.valueOf(bacteroidesConcentrationTF.getText())==null) { isValid = false; } return isValid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isValidInput() {\n\t\treturn true;\n\t}", "public void invalid() {\r\n\t\tSystem.out.println(\"Please enter a valid input\");\r\n\t}", "private boolean isInputValid() {\n return true;\n }", "private boolean validEditInput() throws SQLException {\n // Checks if any of the fiel...
[ "0.6799951", "0.67713463", "0.6750688", "0.6732097", "0.66751814", "0.654032", "0.6485251", "0.64620125", "0.6450413", "0.64350975", "0.63955843", "0.63930917", "0.63749653", "0.63641655", "0.6345012", "0.6339771", "0.63357687", "0.6331645", "0.63127893", "0.62896717", "0.626...
0.7201128
0
returns to previous prompt
public void goBack(ActionEvent event) { try { FXMLLoader loader = new FXMLLoader(getClass().getResource("/application/walkin/BasicInfoPrompt.fxml")); Parent root = (Parent) loader.load(); GenerateReportController reportVariables = loader.getController(); reportVariables.getReport(newReport2); Stage stage = (Stage)((Node)event.getSource()).getScene().getWindow(); stage.setScene(new Scene(root)); stage.show(); } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String promptLoadOrNew(){\r\n Object[] options = {\"Start A New Game!\", \"Load A Previous Game.\"};\r\n String result = (String) JOptionPane.showInputDialog(\r\n null,\r\n \"What would you like to do?\",\r\n \"Welcome!\",\r\n JOptionPane.PLAIN_MESS...
[ "0.70086694", "0.69701356", "0.6759813", "0.6733255", "0.6720643", "0.6633814", "0.6518465", "0.6506277", "0.64516366", "0.6445492", "0.6421213", "0.641118", "0.64071536", "0.6395226", "0.6386886", "0.6377847", "0.63509476", "0.6333066", "0.63171685", "0.6278453", "0.62689555...
0.5707903
85
gets report data from prior prompt
public void getReportData(WalkInReport report) { newReport2 = report; newReport2.clearConclusions(); for(int i=0;i<newReport2.table.size();i++) { Sample newBacteroidesSample = newReport2.table.get(i); table.getItems().add(newBacteroidesSample); addConclusionNumber(newBacteroidesSample); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getPrompt(){ return _prompt ; }", "private static String promptFileContent(String prompt) {\n\t\tSystem.out.println(prompt);\n\t\tString line = null;\n\t\tString content = \"\";\n\t\twhile (!(line = scnr.nextLine()).equals(\"q\")) {\n\t\t\tcontent += line + \"\\n\";\n\t\t}\n\t\treturn content;\n\t}...
[ "0.5734685", "0.5610548", "0.5489809", "0.5479607", "0.54561573", "0.5449762", "0.54442966", "0.5432543", "0.54245484", "0.5402774", "0.5400435", "0.5371573", "0.5370488", "0.53481203", "0.5314762", "0.5308261", "0.5301015", "0.5298417", "0.5259024", "0.5248406", "0.523994", ...
0.4958811
43
submits final table to next prompt
@FXML public void submitTable(ActionEvent event) { if(!conclusion1.equals("")) { newReport2.addConclusion(conclusion1); } if(!conclusion2.equals("")) { newReport2.addConclusion(conclusion2); } try { FXMLLoader loader = new FXMLLoader(getClass().getResource("/application/ReportMaker.fxml")); Parent root = (Parent) loader.load(); GenerateReportController finalReport = loader.getController(); finalReport.getReport(newReport2); Stage stage = (Stage)((Node)event.getSource()).getScene().getWindow(); stage.setScene(new Scene(root)); stage.show(); } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void finishUp() {\r\n // pushOutput(table, 0);\r\n viewDone(\"Done\");\r\n }", "public ComplaintSubmitted() {\n initComponents();\n dtm = (DefaultTableModel) cTable.getModel();\n this.showContent(\"Waiting For Approval\");\n this.setLocationRelativeTo(nul...
[ "0.59784114", "0.5869425", "0.5756205", "0.5685427", "0.5651257", "0.5589649", "0.5494651", "0.5471956", "0.5460259", "0.5448142", "0.541615", "0.5408144", "0.5392444", "0.5387824", "0.53789735", "0.53541785", "0.53433895", "0.5333625", "0.5317262", "0.5297105", "0.52757573",...
0.56678474
4
turns sorted sample numbers into final conclusions
public void addConclusions() { if(conclusionNumbers1.size()==0) { conclusion1=""; } else if(conclusionNumbers1.size()==1) { conclusion1 = "Bacteroides was detected from sample "+conclusionNumbers1.get(0)+"."; } else if(conclusionNumbers1.size()==2) { conclusion1 = "Bacteroides was detected from samples "+conclusionNumbers1.get(0) + " and "+ conclusionNumbers1.get(1) + "."; } else { conclusion1 = "Bacteroides was detected from samples "; for(int i=0;i<conclusionNumbers1.size()-2;i++) { conclusion1+=conclusionNumbers1.get(i) + ", "; } conclusion1+= conclusionNumbers1.get(conclusionNumbers1.size()-2) + " and "+ conclusionNumbers1.get(conclusionNumbers1.size()-1) + "."; } if(conclusionNumbers2.size()==0) { conclusion2=""; } else if(conclusionNumbers2.size()==1) { conclusion2 = "no Bacteroides was detected from sample "+conclusionNumbers2.get(0)+"."; } else if(conclusionNumbers2.size()==2) { conclusion2 = "no Bacteroides was detected from samples "+conclusionNumbers2.get(0) + " and "+ conclusionNumbers2.get(1) + "."; } else { conclusion2 = "no Bacteroides was detected from samples "; for(int i=0;i<conclusionNumbers2.size()-2;i++) { conclusion2+=conclusionNumbers2.get(i) + ", "; } conclusion2+= conclusionNumbers2.get(conclusionNumbers2.size()-2) + " and "+ conclusionNumbers2.get(conclusionNumbers2.size()-1) + "."; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void discretization(int[] nums) {\n\t\tint[] sorted = nums.clone();\n\t\tArrays.sort(sorted);\n\t\tfor (int i = 0; i < nums.length; i++) {\n\t\t\tnums[i] = Arrays.binarySearch(sorted, nums[i]);\n\t\t}\n\t}", "public void addConclusionNumber(Sample sample) {\n\t\tif(sample.getConclusionCase()==0) {\n\t\t\...
[ "0.571184", "0.5580446", "0.545255", "0.53344", "0.52974945", "0.529005", "0.52742165", "0.526515", "0.52294064", "0.5139428", "0.5112697", "0.508485", "0.507673", "0.50744426", "0.5062702", "0.5049593", "0.504117", "0.50173783", "0.5013033", "0.49808553", "0.49635872", "0....
0.5251409
8
adds a sample number to the appropriate list
public void addConclusionNumber(Sample sample) { if(sample.getConclusionCase()==0) { conclusionNumbers1.addAll(sample.getSampleNumber()); } else { conclusionNumbers2.addAll(sample.getSampleNumber()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addSampleData() {\r\n }", "public void addSample(double value){\n num_samples += 1;\n signal = signal*damping + value;\n }", "org.hl7.fhir.SampledData addNewValueSampledData();", "public void setSamples(List<Sample> samples)\n {\n this.samples = samples;\n }", "void upda...
[ "0.66681296", "0.6362106", "0.6252824", "0.6028874", "0.6014661", "0.5946595", "0.5931122", "0.5890988", "0.5883358", "0.58740014", "0.5871549", "0.58522344", "0.5849391", "0.57452536", "0.57292235", "0.5724987", "0.5690117", "0.5675448", "0.565572", "0.5599125", "0.55905735"...
0.58282113
13
String path = "C:\\Users\\Administrator\\Desktop\\img";
@RequestMapping("/add") @ResponseBody public String handleFileUpload(@RequestParam("file") MultipartFile file) { String path = "C:\\Users\\Administrator\\Desktop\\lostfound\\static\\img"; String fileName = file.getOriginalFilename(); Calendar currTime = Calendar.getInstance(); String time = String.valueOf(currTime.get(Calendar.YEAR))+String.valueOf((currTime.get(Calendar.MONTH)+1)); String suffix = fileName.substring(file.getOriginalFilename().lastIndexOf(".")); suffix = suffix.toLowerCase(); if(suffix.equals(".jpg") || suffix.equals(".jpeg") || suffix.equals(".png")){ fileName = UUID.randomUUID().toString()+suffix; File targetFile = new File(path, fileName); if(!targetFile.getParentFile().exists()){ targetFile.getParentFile().mkdirs(); } long size = 0; try { file.transferTo(targetFile); size = file.getSize(); } catch (Exception e) { e.printStackTrace(); return"上传失败"; } String fileUrl="/static"; fileUrl = fileUrl + "/img/" + fileName; return fileUrl; }else{ return "上传失败"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getImageResoucesPath() {\n\t\t//return \"d:\\\\PBC\\\\GitHub\\\\Theia\\\\portal\\\\WebContent\\\\images\";\n\t\treturn \"/Users/anaswhb/Documents/Eclipse/Workspace/portal/WebContent/images\";\n\t\t\n\t}", "public void getImagePath(String imagePath);", "String getFilepath();", "public sta...
[ "0.67717177", "0.63874036", "0.6351978", "0.63333976", "0.63308907", "0.63308907", "0.62062436", "0.6093766", "0.6093766", "0.60808885", "0.60789186", "0.60789186", "0.60789186", "0.60789186", "0.60789186", "0.6033901", "0.5946807", "0.5937405", "0.5915262", "0.59003294", "0....
0.0
-1
Created by developer on 2017/3/15.
public interface UserRegisterService { public Boolean isHave(String username); void insertUser(UserRegister user); PagedResult<UserRegister> queryPage(String username,Integer pageNo,Integer pageSize); void deleteUser(int userId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\...
[ "0.6121167", "0.6062492", "0.5844807", "0.58284354", "0.5702321", "0.56990707", "0.5698605", "0.56966966", "0.5695662", "0.5695662", "0.5637372", "0.563734", "0.563734", "0.563734", "0.563734", "0.563734", "0.563734", "0.5634449", "0.56025827", "0.5595501", "0.55945843", "0...
0.0
-1
Get the module id from the specified file
public static String getModuleId(File f) { FileReader fr = null; try { fr = new FileReader(f); final XMLInputFactory xmlInputFactory = XMLInputFactory.newInstance(); final XMLStreamReader xmlStreamReader = xmlInputFactory.createXMLStreamReader(fr); while (xmlStreamReader.hasNext()) { if (xmlStreamReader.next() == XMLStreamReader.START_ELEMENT && "module".equals(xmlStreamReader.getLocalName())) { for (int i = 0; i < xmlStreamReader.getAttributeCount(); i++) { String name = xmlStreamReader.getAttributeLocalName(i); if ("name".equals(name)) { return xmlStreamReader.getAttributeValue(i); } } } } } catch (Exception e) { // Nothing to do } finally { if (null != fr) { try { fr.close(); } catch (IOException ioe) { // Ignore } } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ModuleIdentifier getId();", "String getModuleId();", "String getModID();", "String getModID();", "public String getAssetModuleId();", "public static int getFileID() {\n\t\treturn StringArray.fileID;\n\t}", "public int getId() {\n // some code goes here\n int id = f.getAbsoluteFile().hashC...
[ "0.71806926", "0.6869336", "0.6696701", "0.6696701", "0.66123974", "0.6579282", "0.6521969", "0.6455922", "0.6397718", "0.6395202", "0.6376092", "0.636568", "0.63267213", "0.6295147", "0.61750567", "0.6146401", "0.6142233", "0.6124882", "0.6114602", "0.60899365", "0.60666895"...
0.8178311
0
Album common service methods
@Override public Album createAlbum(Album album) { return albservice.createAlbum(album); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface AlbumService {\n //添加\n public void addAlbum(Album album, MultipartFile coverImg, String realPath);\n //查所有\n public List<Album> queryAllAlbum();\n //查一个\n public Album queryOneAlbum(String id);\n public AlbumDto queryAllBySplit(Integer page, Integer rows);\n}", "public inte...
[ "0.7655614", "0.7329775", "0.7316184", "0.69142354", "0.67680764", "0.65913546", "0.6581699", "0.6547514", "0.6525774", "0.6463506", "0.64251363", "0.6355181", "0.63094276", "0.62835443", "0.6267261", "0.6260835", "0.6212444", "0.6188283", "0.615743", "0.6128053", "0.6127096"...
0.6287096
13
MyImage common service methods
@Override public MyImage createMyImage(MyImage myimage) { return myimg.createMyImage(myimage); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface ImageService extends Remote {\n\n public static final int IMG_SIZE_ORIGINAL = 0;\n public static final int IMG_SIZE_176_220_SMALL = 1;\n public static final int IMG_SIZE_330_220 = 2;\n public static final int IMG_SIZE_240_320_SMALL = 3;\n public static final int IMG_SIZE_120_67 = 4;...
[ "0.7330435", "0.7141623", "0.70917505", "0.6879578", "0.68324876", "0.68324876", "0.6827898", "0.68142444", "0.6731987", "0.6671204", "0.65969455", "0.6595908", "0.6585355", "0.6580275", "0.65648496", "0.6541453", "0.65192777", "0.6517626", "0.6506841", "0.65048194", "0.64969...
0.6061323
67
Crea un escenario donde al contacto inicial le inserta un contacto menor
private void setupEscenario2( ) { setupEscenario1( ); String nombre = "Alberto"; String direccion = "dirección"; String telefono = "1234567"; String email = "alberto@email.com"; Contacto contacto2 = new Contacto( nombre, telefono, direccion, email ); try { contacto1.insertar( contacto2 ); } catch( ContactoRepetidoException e ) { fail( "El contacto debió agregarse" ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void crearEntidad() throws EntidadNotFoundException {\r\n\t\tif (validarCampos(getNewEntidad())) {\r\n\t\t\tif (validarNomNitRepetidoEntidad(getNewEntidad())) {\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_WARN, \"Advertencia: \", \"Nomb...
[ "0.6738334", "0.6590132", "0.65507674", "0.6421089", "0.6419533", "0.6362563", "0.63499206", "0.633053", "0.63096714", "0.62972766", "0.6289395", "0.6279096", "0.6267313", "0.6264789", "0.6262639", "0.62564075", "0.62464255", "0.6244467", "0.6231782", "0.62254083", "0.6171787...
0.6924798
0
Called by consumer to discover a service.
private void discoverDevicesAndServices( String uuid ) throws BluetoothStateException { discoverer.discoverDevices(); discoverer.discoverServices( uuid ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void startDiscovery() {\n client.startDiscovery(getResources().getString(R.string.service_id), endpointDiscoveryCallback, new DiscoveryOptions(STRATEGY));\n }", "public void discoverServices() {\n mNsdManager.discoverServices(\n SERVICE_TYPE, NsdManager.PROTOCOL_DNS_SD, mD...
[ "0.709005", "0.69091016", "0.6389047", "0.61882615", "0.6140298", "0.6114506", "0.60818887", "0.6077915", "0.60758865", "0.60710907", "0.6006521", "0.59838164", "0.5966723", "0.59577376", "0.59211195", "0.5883306", "0.5879043", "0.5841707", "0.58377147", "0.58353305", "0.5834...
0.55904967
42
Calculate the noise estimate via the histogram method.
public float histogramMethod(MCVolume volume) { Histogram hh = new Histogram(); int ii = 0; // // Compute the thresholded histogram. // float lower_threshold = (float)0.01; float upper_threshold = (float)0.3 * (float)Statistics.max(volume); hh.histogram( volume, lower_threshold, upper_threshold ); // // Get the counts and bins. // float[] bins = hh.getBins(); float[] counts = hh.getCounts(); // // Find the maximum count. // float max = (float)0.0; int max_index = 0; for(ii=0; ii<counts.length; ii++) { if( counts[ii] > max ) { max_index = ii; max = counts[ii]; } } // // Find the first minimum after the maximum // ii = max_index + 1; do { ii++; } while( counts[ii] < counts[ii-1] && ( ii < bins.length ) ); float sigma = (float)0.0; if( ii >= bins.length-1 ) { System.out.println("Gack...could not find the first minimum."); } else { sigma = bins[ii]; } return sigma; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double noise(SpIterNoiseObs noise) {\n return 3.0 * 60.0;\n }", "public void computeHistogram() {\n\t}", "public void recalcHistogram();", "public final double getEstimatedNoise() {\r\n return noise;\r\n }", "@Override\n double distribution(double height) {\n return (n...
[ "0.5936452", "0.58772236", "0.5874683", "0.58690625", "0.58523893", "0.58420837", "0.5813659", "0.57622784", "0.57114553", "0.5648255", "0.55944306", "0.55868435", "0.55126154", "0.54727525", "0.546788", "0.5459223", "0.54416996", "0.5438648", "0.5433011", "0.5432485", "0.541...
0.5143761
32
Calculate the noise estimate via the histogram method.
public float histogramMethod(Volume volume) { Histogram hh = new Histogram(); int ii = 0; // // Compute the thresholded histogram. // float lower_threshold = (float)0.01; float upper_threshold = (float)0.3 * (float)Statistics.max(volume); hh.histogram( volume, lower_threshold, upper_threshold ); // // Get the counts and bins. // float[] bins = hh.getBins(); float[] counts = hh.getCounts(); // // Find the maximum count. // float max = (float)0.0; int max_index = 0; for(ii=0; ii<counts.length; ii++) { if( counts[ii] > max ) { max_index = ii; max = counts[ii]; } } // // Find the first minimum after the maximum // ii = max_index + 1; do { ii++; } while( counts[ii] < counts[ii-1] && ( ii < bins.length ) ); float sigma = (float)0.0; if( ii >= bins.length-1 ) { System.out.println("Gack...could not find the first minimum."); } else { sigma = bins[ii]; } return sigma; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double noise(SpIterNoiseObs noise) {\n return 3.0 * 60.0;\n }", "public void computeHistogram() {\n\t}", "public void recalcHistogram();", "public final double getEstimatedNoise() {\r\n return noise;\r\n }", "@Override\n double distribution(double height) {\n return (n...
[ "0.5932934", "0.5881219", "0.5878538", "0.5865497", "0.58533853", "0.5844371", "0.58161974", "0.57580036", "0.57100844", "0.5644349", "0.55961734", "0.5588187", "0.5515392", "0.54704887", "0.54657954", "0.5460978", "0.54407215", "0.54382133", "0.54323447", "0.54283", "0.54114...
0.52228576
28
Noise estimation via the histogram method on a single slice.
public float histogramMethod(Slice slice) { Histogram hh = new Histogram(); int ii = 0; // // Compute the thresholded histogram. // float lower_threshold = (float)0.01; float upper_threshold = (float)0.3 * (float)Statistics.max(slice); hh.histogram( slice, lower_threshold, upper_threshold ); // // Get the counts and bins. // float[] bins = hh.getBins(); float[] counts = hh.getCounts(); // // Find the maximum count. // float max = (float)0.0; int max_index = 0; for(ii=0; ii<counts.length; ii++) { if( counts[ii] > max ) { max_index = ii; max = counts[ii]; } } // // Find the first minimum after the maximum // ii = max_index + 1; do { ii++; } while( counts[ii] < counts[ii-1] && ( ii < bins.length ) ); float sigma = (float)0.0; if( ii >= bins.length-1 ) { System.out.println("Gack...could not find the first minimum."); } else { sigma = bins[ii]; } return sigma; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void computeHistogram() {\n\t}", "public void recalcHistogram();", "private double[] extractHistogram(int[] imagePixels){\n\t\tdouble[] histogram=new double[LEVELS_NUMBER];\n\t\tfor (int j = 0; j < imagePixels.length&&start; j++) {\n\t\t\thistogram[imagePixels[j]]++;\n\t\t}\n\t\treturn histogram;\n\t}",...
[ "0.57103384", "0.56926835", "0.5481837", "0.53986704", "0.53349596", "0.52810746", "0.5259992", "0.5243857", "0.52164257", "0.5204911", "0.513133", "0.5125006", "0.51114297", "0.5089314", "0.5082169", "0.50687754", "0.5031835", "0.50257933", "0.5005417", "0.49567503", "0.4937...
0.6308347
0
Calculate the noise estimate via the gradient method given a specific slice.
public float gradientMethod(Slice slice) { // // Intialize variables. // int nrows = slice.getNRows(); int ncols = slice.getNCols(); float[] v = new float[nrows*ncols]; int v_numset = 0; float t = (float)0.0; float sig_y = (float)0.0; float sig_x = (float)0.0; // // Compute the column gradient // for(int row=0; row<nrows; row++) { for(int col=1; col<ncols-1; col++) { t = slice.getData(row,col+1) - (float)2.0 * slice.getData(row,col) + slice.getData(row,col-1); if( t != (float)0.0 || slice.getData(row,col) != (float)0.0 ) { v[v_numset] = t; v_numset++; } } } if( v_numset <= 10 ) { sig_y = (float)0.0; } else { sig_y = vec_stdDevMod(v, v_numset); } v_numset = 0; // // Compute the row gradient // for(int col=0; col<ncols; col++) { for(int row=1; row<nrows-1; row++) { t = slice.getData(row+1,col) - (float)2.0 * slice.getData(row,col) + slice.getData(row-1,col); if( t != (float)0.0 || slice.getData(row,col) != (float)0.0 ) { v[v_numset] = t; v_numset++; } } } if( v_numset <= 10 ) { sig_x = (float)0.0; } else { sig_x = vec_stdDevMod(v, v_numset); } return (float)Math.sqrt( (double)(sig_x * sig_x + sig_y * sig_y) ) / (float)2.0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double noise(SpIterNoiseObs noise) {\n return 3.0 * 60.0;\n }", "Gradient gradientAt(Point point);", "public float gradientMethod(Volume vol) \n\t{\n\t\tfloat nes = (float)0.0;\n\n\t\t//\n\t\t// Get the right slice.\n\t\t//\n\t\tfor(int ii=0; ii<vol.getNSlices(); ii++) {\n\t\t\tnes += gradie...
[ "0.5701709", "0.5639278", "0.55561185", "0.5508133", "0.5481322", "0.54163206", "0.5415527", "0.54041696", "0.5373473", "0.53447914", "0.53416216", "0.5311047", "0.53067964", "0.52258825", "0.519752", "0.51733637", "0.5084402", "0.50369257", "0.50082314", "0.49711043", "0.493...
0.66166806
0
Calcualte the noise estimate via the gradient method given a volume and slice/channel.
public float gradientMethod(Volume vol, int slice_num) { // // Get the right slice. // Slice slice = vol.getSlice(slice_num); return gradientMethod(slice); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public float gradientMethod(MCVolume vol) \n\t{\n\t\tfloat nes = (float)0.0;\n\n\t\t//\n\t\t// Get the right slice.\n\t\t//\n\t\tfor(int ii=0; ii<vol.getNSlices(); ii++) {\n\t\t\tfor(int jj=0; jj<vol.getNChannels(); jj++) {\n\t\t\t\tnes += gradientMethod( vol.getSlice(ii, jj) );\n\t\t\t}\n\t\t}\n\n\t\treturn (nes...
[ "0.66904235", "0.6660848", "0.65625876", "0.6471994", "0.63630366", "0.6269413", "0.60306334", "0.5876555", "0.5861091", "0.5634187", "0.5529186", "0.5503558", "0.5416258", "0.53797066", "0.5295568", "0.52127796", "0.5200569", "0.51628375", "0.5160337", "0.51559156", "0.51047...
0.6193776
6
Calcualte the noise estimate via the gradient method given a volume and channel.
public float gradientMethod(Volume vol) { float nes = (float)0.0; // // Get the right slice. // for(int ii=0; ii<vol.getNSlices(); ii++) { nes += gradientMethod( vol.getSlice(ii) ); } return (nes / (float)vol.getNSlices()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public float gradientMethod(MCVolume vol, int channel_num) \n\t{\n\t\tfloat nes = (float)0.0;\n\n\t\t//\n\t\t// Get the right slice.\n\t\t//\n\t\tfor(int ii=0; ii<vol.getNSlices(); ii++) {\n\t\t\tnes += gradientMethod( vol.getSlice(ii, channel_num) );\n\t\t}\n\n\t\treturn (nes / (float)vol.getNSlices());\n\t}", ...
[ "0.664265", "0.6227805", "0.62220764", "0.6184292", "0.6067105", "0.5925538", "0.558267", "0.55378747", "0.5509455", "0.5469896", "0.5457351", "0.5394972", "0.5284596", "0.52455485", "0.5206637", "0.52013385", "0.51918536", "0.5109562", "0.5071591", "0.5064096", "0.50619334",...
0.59953386
5
Calcualte the noise estimate via the gradient method given a volume and slice/channel.
public float gradientMethod(MCVolume vol, int slice_num, int channel_num) { // // Get the right slice. // Slice slice = vol.getSlice(slice_num, channel_num); return gradientMethod(slice); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public float gradientMethod(MCVolume vol) \n\t{\n\t\tfloat nes = (float)0.0;\n\n\t\t//\n\t\t// Get the right slice.\n\t\t//\n\t\tfor(int ii=0; ii<vol.getNSlices(); ii++) {\n\t\t\tfor(int jj=0; jj<vol.getNChannels(); jj++) {\n\t\t\t\tnes += gradientMethod( vol.getSlice(ii, jj) );\n\t\t\t}\n\t\t}\n\n\t\treturn (nes...
[ "0.6688722", "0.66591996", "0.65599036", "0.6361639", "0.6270701", "0.6191183", "0.60307413", "0.58733875", "0.58620393", "0.5634777", "0.5529838", "0.5504936", "0.5415665", "0.53809327", "0.5297336", "0.5213811", "0.519959", "0.51642454", "0.5162355", "0.5157464", "0.5104818...
0.6469654
3
Calcualte the noise estimate via the gradient method given a volume and channel.
public float gradientMethod(MCVolume vol, int channel_num) { float nes = (float)0.0; // // Get the right slice. // for(int ii=0; ii<vol.getNSlices(); ii++) { nes += gradientMethod( vol.getSlice(ii, channel_num) ); } return (nes / (float)vol.getNSlices()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public float gradientMethod(MCVolume vol) \n\t{\n\t\tfloat nes = (float)0.0;\n\n\t\t//\n\t\t// Get the right slice.\n\t\t//\n\t\tfor(int ii=0; ii<vol.getNSlices(); ii++) {\n\t\t\tfor(int jj=0; jj<vol.getNChannels(); jj++) {\n\t\t\t\tnes += gradientMethod( vol.getSlice(ii, jj) );\n\t\t\t}\n\t\t}\n\n\t\treturn (nes...
[ "0.6230959", "0.6220713", "0.6186033", "0.60663766", "0.5998711", "0.59297854", "0.5581063", "0.55408424", "0.5508698", "0.54693997", "0.5458318", "0.53941756", "0.5287344", "0.52460694", "0.52065295", "0.52006453", "0.5193437", "0.5108384", "0.507268", "0.5064589", "0.506237...
0.66452545
0
Calcualte the noise estimate via the gradient method.
public float gradientMethod(MCVolume vol) { float nes = (float)0.0; // // Get the right slice. // for(int ii=0; ii<vol.getNSlices(); ii++) { for(int jj=0; jj<vol.getNChannels(); jj++) { nes += gradientMethod( vol.getSlice(ii, jj) ); } } return (nes / ((float)vol.getNSlices()*(float)vol.getNChannels()) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double noise(SpIterNoiseObs noise) {\n return 3.0 * 60.0;\n }", "public final double getEstimatedNoise() {\r\n return noise;\r\n }", "@java.lang.Override\n public float getNoiseSigma() {\n if (gradientNoiseSigmaCase_ == 1) {\n return (java.lang.Float) gradientNoiseSigma_;\n...
[ "0.671821", "0.65200573", "0.64090955", "0.61593", "0.6096201", "0.60269284", "0.60100293", "0.59466016", "0.59021515", "0.5894323", "0.5749806", "0.5739503", "0.5729601", "0.5663542", "0.56419396", "0.5634335", "0.56268215", "0.5601494", "0.5572386", "0.55552197", "0.5547591...
0.5358528
29
One of the internal routines.
private float vec_stdDevBounded(float[] v, int n, float lower, float upper){ float t=(float)0.0, t2=(float)0.0; long m=0; for(int i=0;i<n;i++) { if (v[i] >= lower && v[i] <= upper) { m++; t+=v[i]; t2+=v[i]*v[i]; } } if (m <= 1) return 0; return (float)Math.sqrt((double)(t2/m - (t/m)*(t/m))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public final void mo51373a() {\n }", "public void method_4270() {}", "protected void additionalProcessing() {\n\t}", "private void m50366E() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\n publi...
[ "0.6364281", "0.63417935", "0.6282839", "0.6220709", "0.6123851", "0.61004525", "0.60922277", "0.6070961", "0.6053424", "0.5977004", "0.5924675", "0.59198177", "0.59008956", "0.59005874", "0.59005874", "0.5897211", "0.58956075", "0.5890555", "0.58844894", "0.58681494", "0.583...
0.0
-1
The other internal routine.
private float vec_stdDevMod(float[] v, int n) { float iqr, med; float lb, ub; long i; Arrays.sort(v); med = v[(int)(n/2)]; iqr = v[(int)(3*n/4)] - v[(int)(n/4)]; lb = med - (float)2.0*iqr; ub = med + (float)2.0*iqr; return vec_stdDevBounded(v,n,lb,ub); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "protected void additionalProcessing() {\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "pr...
[ "0.6428367", "0.6307782", "0.6188222", "0.611211", "0.60875946", "0.60874444", "0.60575056", "0.6054072", "0.59863085", "0.59844583", "0.59561366", "0.5953325", "0.5952841", "0.59095573", "0.5908976", "0.58827126", "0.5855301", "0.58286774", "0.58261055", "0.58261055", "0.582...
0.0
-1
This is the MEDIATOR...
public static void showMessage(FlyingObject flyingObject, String message) { System.out.println("[" + new Date().toString() + "][" + flyingObject.getType().toUpperCase() + "]: " + message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected float m()\r\n/* 234: */ {\r\n/* 235:247 */ return 0.03F;\r\n/* 236: */ }", "@Override\n\tpublic void englishMedium() {\n\t\t\n\t}", "protected final void parseM() {\n current = read();\n skipSpaces();\n\n float x = parseNumber();\n skipCommaSpaces();\n ...
[ "0.5426942", "0.54055613", "0.53570783", "0.5272506", "0.524441", "0.52363735", "0.52192247", "0.52080435", "0.5204707", "0.51875705", "0.51406205", "0.5138377", "0.5083414", "0.50680363", "0.506157", "0.505402", "0.5052286", "0.50498134", "0.50493664", "0.5041611", "0.504113...
0.0
-1
Created by Administrator on 2016/11/9.
public interface IIndexDataInfo { Index_DataInfo getDataInfo();// 获取首页的整体对象 List<Index_DataInfo.InfoBean.FocusBean> getFocusDataFromServer();// 首页图片轮播 List<Index_DataInfo.InfoBean.BannerBean> getBannerDataFromServer();// 首页轮播下选项 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@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\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Ov...
[ "0.62181824", "0.6128533", "0.6084573", "0.605676", "0.5989271", "0.59771544", "0.5916375", "0.59157044", "0.5889726", "0.5874657", "0.5874657", "0.5856748", "0.5856748", "0.583856", "0.5834941", "0.5833396", "0.58204085", "0.5820225", "0.5817862", "0.5782024", "0.5780984", ...
0.0
-1
BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(System.getenv("OUTPUT_PATH")));
public static void main(String[] args) throws IOException { int t = scanner.nextInt(); scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?"); for (int tItr = 0; tItr < t; tItr++) { int n = scanner.nextInt(); scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?"); int[] arr = new int[n]; String[] arrItems = scanner.nextLine().split(" "); scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?"); for (int i = 0; i < n; i++) { int arrItem = Integer.parseInt(arrItems[i]); arr[i] = arrItem; } long result = countInversions(arr); cnt = 0; System.out.println(result); //bufferedWriter.write(String.valueOf(result)); //bufferedWriter.newLine(); } //bufferedWriter.close(); scanner.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) throws IOException {\n\t\tBufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(System.getenv(\"OUTPUT_PATH\")));\n\t\t\n\t\tbufferedWriter.write(\"Hello\");\n\n\t}", "private static void prepareOutputFile() {\n try {\n outputFileBuffer = new B...
[ "0.7209157", "0.68182474", "0.6045851", "0.6026026", "0.60066426", "0.5917836", "0.5892854", "0.58156013", "0.57768947", "0.5759149", "0.56143475", "0.56056494", "0.558266", "0.55772114", "0.55695826", "0.55376124", "0.5534617", "0.55092055", "0.54988045", "0.5494558", "0.548...
0.0
-1
Initialize the contents of the frame.
private void initialize() { frame = new JFrame(); frame.getContentPane().setForeground(Color.LIGHT_GRAY); frame.getContentPane().setFont(new Font("Times New Roman", Font.PLAIN, 16)); frame.setBounds(100, 100, 735, 467); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().setLayout(null); JButton btnGoAhead = new JButton("GO AHEAD"); btnGoAhead.setForeground(Color.BLACK); btnGoAhead.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { try { Desktop.getDesktop().browse(new URL("https://www.youtube.com/watch?v=eh7lp9umG2I&t=10s").toURI()); } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (URISyntaxException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }); btnGoAhead.setFont(new Font("Times New Roman", Font.PLAIN, 21)); btnGoAhead.setBackground(Color.GRAY); btnGoAhead.setBounds(268, 166, 183, 29); frame.getContentPane().add(btnGoAhead); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BreukFrame() {\n super();\n initialize();\n }", "public MainFrame() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "private void initialize() {\n\t\tthis.setSize(211, 449);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setTitle(\"JFrame\");\n\t}", "public SiscobanFrame() {\r\n\t\tsuper();\r...
[ "0.77704835", "0.75652915", "0.7442664", "0.7369101", "0.7366378", "0.7358479", "0.73146075", "0.73096764", "0.72987294", "0.72978777", "0.7278321", "0.72729623", "0.7269468", "0.7269468", "0.7215727", "0.7180792", "0.71682984", "0.7140954", "0.7140953", "0.7126852", "0.71079...
0.0
-1
Convert the given object to string with each line indented by 4 spaces (except the first line).
private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPA...
[ "0.78847593", "0.75493765", "0.74971926", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0...
0.0
-1
TODO Autogenerated method stub
@Override public void myWork() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
this you'll need to index into the commandline array of Strings.
public static void main(String[] args) { System.out.println("args[0] = " + args[0]); System.out.println("args[1] = " + args[1]); System.out.println("args[2] = " + args[2]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] strings) {\n }", "protected abstract String[] getExecString();", "public static void main(String[] args)\n {\n cmdLineArgs = args;\n }", "public static void main(String arg[]) {\n\n }", "public static void main(String[ ] argv) {\n if(argv.length == 0){\n...
[ "0.655122", "0.6501965", "0.6438801", "0.6410494", "0.6370203", "0.6340129", "0.6184578", "0.6184578", "0.6184578", "0.61788017", "0.6130692", "0.6110644", "0.6106853", "0.5973794", "0.59676576", "0.5948934", "0.5945309", "0.5945309", "0.5933426", "0.5928819", "0.59244686", ...
0.5563465
97
/ TODO: implement the following queries 1) find all books (done) 2) find book by id (done) 3) find book by title (done) 4) find book by type (done) 5) find all books for an author
public List<Book> findAll(String field, int pageNb, int pageSize) { Query allPageAndOrdered = new Query() .with(Sort.by(Sort.Direction.ASC, field)) .with(PageRequest.of(pageNb, pageSize)); return mongoTemplate.find(allPageAndOrdered, Book.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Book> getBooksByAuthorId(Integer authorId);", "public Books getBooks(String title,String authors,String isbn,String publisher);", "public List<Book> getByAuthor(String name );", "public List<Books> searchBook(int book_id){\n String sql=\"select * from Book where id=?\";\n BaseDao baseDao =...
[ "0.77804285", "0.7712485", "0.75517833", "0.72436595", "0.7238364", "0.7065408", "0.70458627", "0.7044296", "0.6997765", "0.6973849", "0.69629323", "0.6928622", "0.6922787", "0.6708748", "0.66780007", "0.66726506", "0.66549706", "0.6594098", "0.657411", "0.6531109", "0.652800...
0.0
-1
TODO: add fields, constructors, fill method bodies, etc..
void shuffle() { cards.addAll(dealtCards); dealtCards.removeAll(dealtCards); Collections.shuffle(cards); System.out.println("Shuffled cards" + cards); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Methods() {\n // what is this doing? -PMC\n }", "private FundInfo() {\n initFields();\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private Infer() {\n\n }", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n protected void init() {\n }", "Reproducible...
[ "0.639159", "0.62765527", "0.61574304", "0.61524355", "0.6138258", "0.6127574", "0.6099286", "0.60955393", "0.60939646", "0.6092477", "0.6077862", "0.6065927", "0.6062237", "0.6058136", "0.6055563", "0.60280675", "0.6023094", "0.6019143", "0.6007541", "0.59960455", "0.5993212...
0.0
-1
Just for some manual tests
public static void main(String[] args) { CardDeck deck = new CardDeck(); System.out.println(deck.dealHand(5)); // <- print 5 cards 3 times System.out.println(deck.dealHand(5)); System.out.println(deck.dealHand(5)); System.out.println(deck.dealHand(50)); // <- only 39 cards should be printed here System.out.println(deck.dealHand(50)); // <- and empty list should be printed deck.shuffle(); System.out.println(deck.dealHand(5)); // <- another 5 cards }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void test() {\n\n\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "private test5() {\r\n\t\r\n\t}", "public void testGetInsDyn() {\n }", "@Test\n public void testDAM30203001() {\n testDAM30102001();\n }", "@Test\r\n\tpublic void testSanity() {\n\t}", "@Test\n public ...
[ "0.64173454", "0.64031696", "0.6056965", "0.5950567", "0.5825551", "0.58148694", "0.579752", "0.57839584", "0.57695913", "0.5739704", "0.57165235", "0.5714779", "0.5683232", "0.5675774", "0.5669667", "0.56651264", "0.56525946", "0.5650546", "0.5645881", "0.5644267", "0.564397...
0.0
-1
function to load map. If map is not created it will create it for you
private void initilizeMap() { mContext = getApplicationContext(); try { locationManager = (LocationManager) getSystemService(LOCATION_SERVICE); // Getting GPS status isGPSEnabled = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER); // Getting network status isNetworkEnabled = locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER); if (!isGPSEnabled && !isNetworkEnabled) { // No network provider is enabled } else { this.canGetLocation = true; if (isNetworkEnabled) { locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, this); Log.d("Network", "Network"); if (locationManager != null) { // Criteria criteria = new Criteria(); // provider = locationManager.getBestProvider(criteria, false); location = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER); if (location != null) { latitude = location.getLatitude(); longitude = location.getLongitude(); // initialLocation = new LatLng(latitude, longitude); initialLocation = new Location("inicial"); initialLocation.setLatitude(latitude); initialLocation.setLongitude(longitude); } } } // If GPS enabled, get latitude/longitude using GPS Services if (isGPSEnabled) { if (location == null) { locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, this); Log.d("GPS Enabled", "GPS Enabled"); if (locationManager != null) { location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER); if (location != null) { latitude = location.getLatitude(); longitude = location.getLongitude(); // initialLocation = new LatLng(latitude, longitude); initialLocation = new Location("inicial"); initialLocation.setLatitude(latitude); initialLocation.setLongitude(longitude); } } } } } } catch (Exception e) { e.printStackTrace(); } gMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap(); myLocation = new LatLng(latitude,longitude); gMap.animateCamera(CameraUpdateFactory.newLatLngZoom(myLocation, 15)); // // // check if map is created successfully or not // if (gMap == null) // { // Toast.makeText(getApplicationContext(), // "Sorry! unable to create maps", Toast.LENGTH_SHORT) // .show(); // } gMap.setMyLocationEnabled(true); // Marker TP = gMap.addMarker(new MarkerOptions().position(myLocation).title("Estoy aca").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_VIOLET))); // lstLatLngs = new ArrayList<LatLng>(); gMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() { @Override public void onMapClick(final LatLng point) { // TODO Auto-generated method stub AlertDialog.Builder builder = new AlertDialog.Builder(CrearIncidenteGPS.this); builder.setMessage("Desea agregar un incidente en este lugar?") .setCancelable(false) .setPositiveButton("Si", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { //Agregar el incidente // lstLatLngs.add(point); insertarIncidente(point); // gMap.addMarker(new MarkerOptions().position(point)); } }) .setNegativeButton("No", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.cancel(); } }); AlertDialog alert = builder.create(); alert.show(); } }); // HttpRequestFactory httpRequestFactory = createRequestFactory(transport); // HttpRequest request = httpRequestFactory.buildGetRequest(new GenericUrl(PLACES_SEARCH_URL)); // request.url.put("key", ""); // request.url.put("location", latitude + "," + longitude); // request.url.put("radius", 500); // request.url.put("sensor", "false"); // infowindow = new google.maps.InfoWindow(); // var service = new google.maps.places.PlacesService(gMap); // service.nearbySearch(request, callback); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TiledMap loadMap(String path);", "public void loadMap() {\n\n try {\n new File(this.mapName).mkdir();\n FileUtils.copyDirectory(\n new File(this.plugin.getDataFolder() + \"/maps/\" + this.mapName), new File(this.mapName));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\...
[ "0.78768814", "0.7869801", "0.713924", "0.7086959", "0.703925", "0.6957559", "0.69241786", "0.68649834", "0.6818675", "0.6804128", "0.67892957", "0.6777142", "0.6694093", "0.6684106", "0.66588753", "0.66574687", "0.6656661", "0.6649066", "0.66328335", "0.66221774", "0.6604836...
0.0
-1
TODO Autogenerated method stub
@Override public void onMapClick(final LatLng point) { AlertDialog.Builder builder = new AlertDialog.Builder(CrearIncidenteGPS.this); builder.setMessage("Desea agregar un incidente en este lugar?") .setCancelable(false) .setPositiveButton("Si", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { //Agregar el incidente // lstLatLngs.add(point); insertarIncidente(point); // gMap.addMarker(new MarkerOptions().position(point)); } }) .setNegativeButton("No", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.cancel(); } }); AlertDialog alert = builder.create(); alert.show(); }
{ "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
Agregar el incidente lstLatLngs.add(point);
public void onClick(DialogInterface dialog, int id) { insertarIncidente(point); // gMap.addMarker(new MarkerOptions().position(point)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addPoints(List<Point2D> points);", "public static void instantiate(){\n listOfpoints = new ArrayList<>(12);\n listOfPolygons = new ArrayList<>(listOfpoints.size());\n\n for ( int i= 0 ; i < 70; i++ ){\n listOfpoints.add(new ArrayList<LatLng>());\n }\n\n l...
[ "0.60795105", "0.5917921", "0.5914786", "0.5784058", "0.5780689", "0.5766017", "0.56867194", "0.56359226", "0.5635187", "0.5628003", "0.55878323", "0.55816597", "0.55652285", "0.5554952", "0.5550927", "0.5536687", "0.552538", "0.54986954", "0.5493125", "0.5428747", "0.5402457...
0.0
-1
TODO Autogenerated method stub
@Override public void onStatusChanged(String provider, int status, Bundle extras) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
TODO Autogenerated method stub
@Override public void onProviderEnabled(String provider) { Toast.makeText(this, "Enabled new provider " + provider, Toast.LENGTH_SHORT).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void onProviderDisabled(String provider) { Toast.makeText(this, "Disabled provider " + provider, Toast.LENGTH_SHORT).show(); }
{ "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
ESTO SIEMPRE SE EJECUTA CUANDO SE CONSUME EJB
public Date getVersionRow(){ return this.versionRow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetOrcamentos() throws Exception {\n System.out.println(\"getOrcamentos\");\n Integer idOfCostumer = null;\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n OrcamentoService instance = (OrcamentoService)container.getContext()...
[ "0.62473017", "0.6118646", "0.60525715", "0.60170615", "0.6016947", "0.6015204", "0.5990267", "0.5945225", "0.59263813", "0.59006315", "0.586391", "0.58629686", "0.5860923", "0.58541286", "0.5823571", "0.5741638", "0.57288766", "0.57220244", "0.57192785", "0.5715607", "0.5696...
0.0
-1
Crida la funcio de crearHidatoManual
public static void creaHidatoManualment(int tamany) { taulerCreacio = new Tauler(tamany); VistaCrearHidatoManual ct = new VistaCrearHidatoManual(taulerCreacio,callbackImplementor); ct.mostra(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void creaHidatoAutomaticament()\n {\n ControladorVista.mostraCreacioHidatoAutomatica();\n }", "public abstract Anuncio creaAnuncioTematico();", "@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}", "public abstract Anuncio creaAnuncioGeneral();", "public abstract Anuncio c...
[ "0.7814888", "0.68813574", "0.6748658", "0.6364551", "0.63040394", "0.6244352", "0.6208792", "0.6147632", "0.61333185", "0.6050402", "0.60385627", "0.6021289", "0.6011786", "0.59699154", "0.59662724", "0.5920023", "0.59165925", "0.59014606", "0.58902526", "0.5876889", "0.5866...
0.7600176
1
Crida la funcio de crearHidatoAutomaticament
public static void creaHidatoAutomaticament() { ControladorVista.mostraCreacioHidatoAutomatica(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void creaHidatoManualment(int tamany)\n {\n\n taulerCreacio = new Tauler(tamany);\n VistaCrearHidatoManual ct = new VistaCrearHidatoManual(taulerCreacio,callbackImplementor);\n ct.mostra(true);\n }", "public abstract Anuncio creaAnuncioTematico();", "public static int f...
[ "0.7361667", "0.7259172", "0.68874526", "0.6672159", "0.66550565", "0.6473374", "0.6425457", "0.6326677", "0.6314602", "0.627452", "0.6240495", "0.6211848", "0.6203669", "0.6191841", "0.61337173", "0.61098385", "0.6104223", "0.60165954", "0.60016257", "0.5987355", "0.59769136...
0.88756543
0
Crida la funcio de crear un Hidato automaticament
public static int fesCreacioAutomatica(int tamanyHidato, int numForats, int numPrecolocats, String dificultat) { Tauler t; TaulerComplert tc = new TaulerComplert(); t = Algoritmes.creacioTaulerPredeterminat(tamanyHidato, numForats, numPrecolocats, dificultat, tc); if (tc.getTauler() == null) return -1; Hidato nouHidato = new Hidato(); nouHidato.setTauler(t); nouHidato.setTaulerComplert(tc); nouHidato.setDificultat(dificultat); return GestorHidato.creaHidato(nouHidato); //todo prendre nota del creador i de la id }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void creaHidatoAutomaticament()\n {\n ControladorVista.mostraCreacioHidatoAutomatica();\n }", "public abstract Anuncio creaAnuncioTematico();", "public static void creaHidatoManualment(int tamany)\n {\n\n taulerCreacio = new Tauler(tamany);\n VistaCrearHidatoManual c...
[ "0.80885243", "0.71524245", "0.70287484", "0.70179754", "0.67037", "0.65962565", "0.6591758", "0.6518809", "0.64497596", "0.6427881", "0.6398209", "0.6372396", "0.63533497", "0.6342691", "0.6318086", "0.63175416", "0.6303132", "0.6278101", "0.6265563", "0.62644094", "0.621116...
0.63173807
16
hasta que no tenga el brotherhood area no pueden organizarse parades
public Parade save(final Parade parade) { Assert.notNull(parade.getBrotherhood().getArea()); Assert.notNull(parade); Parade result = parade; Brotherhood brotherhood = null; Chapter chapter = null; final Authority authorityBrotherhood = new Authority(); authorityBrotherhood.setAuthority(Authority.BROTHERHOOD); final Authority authorityChapter = new Authority(); authorityChapter.setAuthority(Authority.CHAPTER); if (LoginService.getPrincipal().getAuthorities().contains(authorityBrotherhood)) brotherhood = this.brotherhoodService.findByPrincipal(); else if (LoginService.getPrincipal().getAuthorities().contains(authorityChapter)) { chapter = this.chapterService.findByPrincipal(); final Chapter chapterCoordinatedParades = this.chapterService.findChapterByAreaId(parade.getBrotherhood().getArea().getId()); Assert.isTrue(chapter.getId() == chapterCoordinatedParades.getId()); } Assert.isTrue(brotherhood != null || chapter != null); /* * Aqu� pasamos el status a SUBMITTED si se le pusiera en el create o el edit * el FINAL MODE a TRUE */ if (parade.getId() != 0) { final Parade paradeBBDD = this.findOne(parade.getId()); //si estaba a true ya no se puede modificar if (!LoginService.getPrincipal().getAuthorities().contains(authorityChapter)) Assert.isTrue(paradeBBDD.getFinalMode() == false); //si estaba a false el de BBDD y ahora se ha puesto a true if (parade.getStatus() == null && parade.getFinalMode() == true) parade.setStatus("SUBMITTED"); if (parade.getStatus() == "REJECTED") Assert.isTrue(parade.getRejectedComment() != null && parade.getRejectedComment() != ""); } else if (parade.getId() == 0 && parade.getFinalMode() == true) parade.setStatus("SUBMITTED"); final Date currentMoment = new Date(System.currentTimeMillis() - 1000); Assert.isTrue(parade.getOrganisationMoment().after(currentMoment)); result = this.paradeRepository.save(parade); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void ispisiSveNapomene() {\r\n\t\tint i = 0;// redni broj napomene\r\n\t\tint brojac = 0;\r\n\t\tfor (Podsjetnik podsjetnik : lista) {\r\n\r\n\t\t\ti++;\r\n\t\t\tSystem.out.println(i + \")\" + podsjetnik);\r\n\t\t\tbrojac = i;\r\n\t\t}\r\n\t\tif (brojac == 0) {\r\n\t\t\tSystem.out.println(\"Nema unesenih na...
[ "0.61459315", "0.61165833", "0.60863525", "0.5886414", "0.5830936", "0.5727473", "0.5708263", "0.570271", "0.56941277", "0.5659017", "0.56373584", "0.56357634", "0.5619374", "0.5607943", "0.5605666", "0.5590688", "0.55890816", "0.55830854", "0.5560454", "0.5551256", "0.554959...
0.0
-1
Created by Barak Bar Orion 12/15/14.
public interface Constant<T> extends Remote { T getValue() throws RemoteException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpubl...
[ "0.6098237", "0.6044252", "0.59052384", "0.58860207", "0.58633864", "0.58625007", "0.58459055", "0.58459055", "0.5766396", "0.57501996", "0.56981826", "0.5693475", "0.56927985", "0.56903166", "0.56853735", "0.5672243", "0.5668902", "0.5655806", "0.56506264", "0.5646051", "0.5...
0.0
-1
System.out.println(new Date()); System.out.println( LocalDateTime.now()); DayOfWeek dow = DayOfWeek.MONDAY; Locale locale = Locale.getDefault(); System.out.println(dow.getDisplayName(TextStyle.FULL, locale)); YearMonth date1 = YearMonth.now(); System.out.printf("%s: %d%n", date1, date1.lengthOfMonth());
public static void main(String[] args) { LocalDate date = LocalDate.now(); System.out.println("print date- "+date); // print day DayOfWeek dow = date.getDayOfWeek(); System.out.println("print day name - "+ dow); int dateNo = date.getDayOfMonth(); System.out.println("print day (number) - "+ dateNo); // print month Month monthName = date.getMonth(); System.out.println("print month name - "+ monthName); int monthNo = date.getMonthValue(); System.out.println("print month (Number) - "+ monthNo); // print month int year = date.getYear(); System.out.println("print year - "+ year); // print particuller date like birth day LocalDate birthDay = LocalDate.of(1990, Month.NOVEMBER, 20); System.out.println("print particuller date - "+birthDay); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void Month() {\n System.out.printf(\"%d%n\", Month.FEBRUARY.maxLength());\n\n Month month = Month.AUGUST;\n Locale locale = Locale.getDefault();\n System.out.println(month.getDisplayName(TextStyle.FULL, locale));\n System.out.println(month.getDisplayName(TextStyle.NARROW, locale));\n...
[ "0.7123279", "0.681804", "0.6573241", "0.6416837", "0.6389668", "0.6375172", "0.6234342", "0.62287784", "0.6187472", "0.6133701", "0.61242294", "0.6110911", "0.6100487", "0.60954416", "0.60746956", "0.6065069", "0.60320866", "0.60315865", "0.6006141", "0.5999401", "0.59973013...
0.6476105
3
Add the number to an internal data structure.
public void add(int number) { if(!m.containsKey(number)) { m.put(number, 0); } int pre = m.get(number); m.put(number, pre + 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void add(int number) {\n sum.add(number);\n }", "public void addNumber(int number) {\r\n\t\tadd(Integer.toString(number).getBytes(charset));\r\n\t}", "public void add(int number) {\n if(map.containsKey(number)) map.put(number, map.get(number) + 1);\n else {\n ...
[ "0.7298927", "0.7258595", "0.7185211", "0.7179542", "0.71686804", "0.71325636", "0.7110969", "0.7081806", "0.7026955", "0.70166874", "0.6992092", "0.69855356", "0.6917963", "0.6915635", "0.6803027", "0.6701519", "0.6692067", "0.6672693", "0.658667", "0.6564145", "0.656076", ...
0.70860004
7
Find if there exists any pair of numbers which sum is equal to the value.
public boolean find(int value) { boolean res = false; if(m.size() >0) { for(int i : m.keySet()) { if(value - i == i) { if(m.get(i) > 1) { res = true; break; } } else { if(m.containsKey(value - i)) { res = true; break; } } } } return res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void hasPairWithSum(int[] input, int sum) {\n\t\tMap<Integer, Integer> map = new Hashtable<>();\n\t\tint occurence = 0;\n\t\tfor (int num : input) {\n\t\t\toccurence = 1;\n\t\t\tif (map.containsKey(num)) {\n\t\t\t\toccurence = map.get(num);\n\t\t\t\toccurence++;\n\t\t\t}\n\t\t\tmap.put(num, occurence...
[ "0.7004017", "0.68952566", "0.67666686", "0.6591662", "0.65779155", "0.65529066", "0.65353143", "0.6517477", "0.6465265", "0.6460707", "0.64448756", "0.64388967", "0.64232916", "0.6412718", "0.63869613", "0.63844234", "0.63832927", "0.6344679", "0.6302931", "0.62976724", "0.6...
0.59384215
36
TODO Autogenerated method stub
@Override public void onCreate() { super.onCreate(); try { // Log.d("Ringer", "inside service.."); c = this; mPrefs = new IUnderstandStore(this.getApplicationContext()); gdata = (GlobalDataApplication) GlobalDataApplication.getInstance(); am = (AudioManager) this.getApplicationContext().getSystemService(Context.AUDIO_SERVICE); //globaldata=(GlobalDataApplication)getApplication(); Initvolume = am.getRingerMode(); //Log.d("change","Init Ringer mode: "+Initvolume); sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE); accelerometer = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); proxy = sensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY); BroadcastReceiver receiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { if (am.getRingerMode() == AudioManager.RINGER_MODE_NORMAL) { if ((mPrefs.getpickupmode()) || (mPrefs.getmagicmode()) || (mPrefs.getpocketpmode())) { SensorService.registerAllSensors(); Toast.makeText(getApplicationContext(), "Services enabled!", Toast.LENGTH_SHORT).show(); } } else { if ((mPrefs.getpickupmode()) || (mPrefs.getmagicmode()) || (mPrefs.getpocketpmode())) { SensorService.unregisterAllSensors(); Toast.makeText(getApplicationContext(), "Services disabled!", Toast.LENGTH_SHORT).show(); } } Toast.makeText(getApplicationContext(), "" + am.getRingerMode(), Toast.LENGTH_SHORT).show(); } }; IntentFilter filter = new IntentFilter( AudioManager.RINGER_MODE_CHANGED_ACTION); registerReceiver(receiver, filter); registerAllSensors(); } catch (Exception e) { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
TODO Autogenerated method stub
@Override public void onDestroy() { super.onDestroy(); }
{ "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 int onStartCommand(Intent intent, int flags, int startId) { return super.onStartCommand(intent, flags, startId); }
{ "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 IBinder onBind(Intent intent) { 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
TODO Autogenerated method stub
@Override public void onAccuracyChanged(Sensor sensor, int accuracy) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
Creates or updates the current object.
public boolean save(Context context) { return save(context, this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object createOrUpdate() {\n if (isNewRecord()) {\n create();\n } else {\n update();\n }\n return this;\n }", "private void saveCurrentObject() {\n\t}", "public boolean update(New object);", "Update createUpdate();", "public void updateByObject()\r\n\t{\n...
[ "0.6440818", "0.6296445", "0.61568916", "0.61260337", "0.59889585", "0.59220785", "0.58530915", "0.5840952", "0.58252376", "0.5800972", "0.5799011", "0.57923526", "0.5754077", "0.57158494", "0.56451255", "0.5642307", "0.56259227", "0.5602478", "0.5599698", "0.55984825", "0.55...
0.0
-1
Sign in the user with specified parameters.
public static void signIn(String username, String password, final Context context, final OnLoginListener onLoginListener) { HttpClientHelper client = new HttpClientHelper(Endpoints.User.login, context); client.addParamForPost("api_type", "json"); client.addParamForPost("user", username); client.addParamForPost("passwd", password); client.addParamForPost("rem", String.valueOf(true)); Network.newRequest(client, Network.POST, Network.WITHOUT_COOKIE, new Delegate() { @Override public void requestResults(Network.Status status) { User user = null; boolean err = false; if(status.hasInternet) { if(status.response.getStatusLine().getStatusCode() == 200 || status.response.getStatusLine().getStatusCode() == 409) { try { JSONObject values = (JSONObject) ((JSONObject) status.result.get("json")).get("data"); String cookie = values.getString("cookie"); status.httpClientHelper.setCookie(cookie, context); getMe(context, onLoginListener); } catch (JSONException e) { err = true; onLoginListener.onLogin(user, status, err); } } else { err = true; onLoginListener.onLogin(user, status, err); } } else { onLoginListener.onLogin(user, status, err); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "User signIn(String login, String password);", "String signIn(String userName, String password) throws UserNotFoundException;", "public String signIn(String username, String password);", "public void signIn(String userName, String password) {\n\t}", "public void user_signin()\r\n\t{\r\n\t\t\r\n\t\tdriver.fi...
[ "0.7641766", "0.74646884", "0.73957646", "0.7338593", "0.7078497", "0.7052093", "0.69228387", "0.67968553", "0.6707056", "0.66695535", "0.6612184", "0.6610568", "0.6610568", "0.6610568", "0.6603647", "0.6516845", "0.65141743", "0.64816386", "0.6446309", "0.6425223", "0.642522...
0.5718347
100