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
Find avatar from gravatar.
@Test void findAvatarFromGravatar() { LdapEntry ldapEntry = new LdapEntry(); ldapEntry.addAttribute(new LdapAttribute("mail", "someone@example.org")); when(ldaptiveTemplate.findOne(any())).thenReturn(Optional.of(ldapEntry)); Optional<byte[]> actual = userRepository.findAvatar("somebody", AvatarDefault...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getAvatar();", "String getAvatarUrl();", "Uri getAvatarUrl();", "int getAvatar();", "public Optional<String> avatar() {\n this.use();\n\n return Optional.ofNullable(avatar);\n }", "String avatarImage();", "ImageView getAvatarImageView();", "public String getAvatar() {\n ...
[ "0.70986134", "0.6817801", "0.6597998", "0.64697313", "0.644041", "0.63658714", "0.62720513", "0.6260723", "0.6260723", "0.6260723", "0.6260723", "0.624752", "0.6237343", "0.6229644", "0.62129235", "0.6211125", "0.6045942", "0.604373", "0.6038197", "0.5969446", "0.59674865", ...
0.69093955
1
Save and expect service exception.
@Test void saveAndExpectServiceException() { DomainUser expected = DomainUser.builder() .userName("someone") .password("short") .build(); when(ldaptiveTemplate.exists(any(), any())).thenReturn(false); assertThrows( ServiceException.class, () -> userRepository.save(e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testSaveCurrentProgress() throws Exception {\n try{\n service.saveCurrentProgress();\n } catch(Exception e){\n fail(\"Exception should not be thrown on save!!!\");\n }\n }", "@Test\n public void testSaveException() {\n when(client.receive...
[ "0.7119715", "0.6979216", "0.64271414", "0.62736505", "0.6249767", "0.62166125", "0.6213355", "0.615727", "0.6076621", "0.60628825", "0.6030165", "0.59608984", "0.5896944", "0.588976", "0.58771855", "0.58620113", "0.58605444", "0.5850688", "0.57819945", "0.5727541", "0.570274...
0.59013444
12
Delete and expect true.
@Test void deleteAndExpectTrue() { when(ldaptiveTemplate.exists(any(), any())).thenReturn(true); assertTrue(userRepository.delete("someone")); verify(userRepository).doDelete(anyString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void testDelete() {\r\n assertTrue(false);\r\n }", "boolean delete();", "public boolean delete();", "boolean hasDelete();", "boolean hasDelete();", "@Test(timeout = 4000)\n public void test47() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesDataOrStructure(\"de...
[ "0.77514374", "0.76264876", "0.74831164", "0.7383145", "0.7383145", "0.7341707", "0.73118067", "0.73118067", "0.73118067", "0.72985363", "0.72488296", "0.7204423", "0.7189347", "0.7152275", "0.71385497", "0.713137", "0.71138406", "0.7105012", "0.7057417", "0.7000559", "0.6994...
0.7028977
19
Delete and expect false.
@Test void deleteAndExpectFalse() { when(ldaptiveTemplate.exists(any(), any())).thenReturn(false); assertFalse(userRepository.delete("someone")); verify(userRepository, never()).doDelete(anyString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void testDelete() {\r\n assertTrue(false);\r\n }", "boolean delete();", "@Override\n\tpublic boolean delete() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean delete() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean delete() {\n\t\treturn false;\n\t}", "@Overr...
[ "0.7693666", "0.76573765", "0.76362526", "0.76362526", "0.76362526", "0.7620016", "0.7542376", "0.73493636", "0.73493636", "0.7198312", "0.7165963", "0.71445304", "0.7140337", "0.71205944", "0.71162444", "0.7108641", "0.7032489", "0.7026939", "0.7009127", "0.7000302", "0.7000...
0.68944067
30
Method od constructor parameter introspection
public interface MetaParameter<T> extends MetaElement { /** * Parameter type class object */ Class<T> getType(); @Override default Kind getKind() { return Kind.PARAMETER; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object[] getConstructorArgs ();", "private void processConstructor(ClassNode cls, MethodNode mn, Type[] syntheticParams) {\n String methodInfo = mn.name + mn.desc + \" in \" + cls.name;\n Type[] params = Type.getArgumentTypes(mn.desc);\n\n if (beginsWith(params, syntheticParams)) {\n ...
[ "0.688455", "0.6675619", "0.658646", "0.6547723", "0.6371608", "0.62286705", "0.62228096", "0.62079084", "0.61963254", "0.6181014", "0.6170064", "0.60574424", "0.6054536", "0.6048573", "0.6029118", "0.6023697", "0.6010484", "0.5968516", "0.5942403", "0.58957106", "0.58863467"...
0.0
-1
Parameter type class object
Class<T> getType();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ParameterType getType();", "public static ParameterExpression parameter(Class type) { throw Extensions.todo(); }", "public IParameter getInstance(String type){\n if(!initialized)\n throw new IllegalStateException(\"constructor never finished\");\n Class klass=(Class)paramList.get(type);\n ...
[ "0.681879", "0.6795301", "0.66645867", "0.66144305", "0.66130865", "0.65426105", "0.648002", "0.6444141", "0.6440264", "0.6420385", "0.63675237", "0.6353657", "0.62885034", "0.6268409", "0.6241421", "0.61854994", "0.6150271", "0.6113097", "0.60642356", "0.60642356", "0.606423...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { QuickSort q = new QuickSort(); if(q.input == null || q.length==0){ return; } q.quickSort(0, q.length-1); for(int i=0; i<q.length;i++) System.out.println(q.input[i]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.6862...
0.0
-1
Scenario steps begins below
@BeforeTest public void setupenvi() throws IOException { setup(); init(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Given(\"prepare to Analysis\")\npublic void preanalysis(){\n}", "@Before\n public void beforeScenario() {\n }", "@Before\r\n public void startUp(Scenario scenario) {\r\n\r\n //this is used to add per scenario log to report with unique name\r\n long logging_start = System.nanoTime();\r\n...
[ "0.7298658", "0.7205312", "0.69511807", "0.69147706", "0.6880761", "0.6604565", "0.65768605", "0.6553979", "0.65277314", "0.64270926", "0.63928056", "0.6388508", "0.63422877", "0.63298255", "0.6316166", "0.63149405", "0.63112175", "0.6308876", "0.63054764", "0.62896264", "0.6...
0.0
-1
Creates a new invoice.
public Invoice(final @Nullable String description, final boolean restricted, final Set<InvoiceRestriction> restrictions, final String script, final boolean timeoutEnabled, final long timeoutInMilliseconds, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createInvoice() {\n\t}", "public Invoice createInvoice(Order order);", "public Invoice create() {\r\n\t\treturn new Invoice();\r\n\t}", "private String CreateInvoice() throws Exception {\n\n\t\tgetDriver().get(\"https://stg.autobrain.com/worker/retail_fulfillment/new_invoice\");\n\n\t\t// Add Qua...
[ "0.8319026", "0.7847564", "0.7485497", "0.7351001", "0.7335639", "0.73023474", "0.7144124", "0.705063", "0.6800457", "0.67400175", "0.6725182", "0.6687473", "0.6670368", "0.66172045", "0.6304136", "0.61882085", "0.6142294", "0.60599595", "0.60367996", "0.6026538", "0.5973094"...
0.0
-1
Gets a brief description of this invoice if any.
@Nullable public String getDescription() { return description; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getDescription()\r\n\t{\r\n\t\tStringBuilder msgreturn = new StringBuilder().append(m_name).append(\" \").append(m_taxBaseAmt.toString());\r\n\t\treturn msgreturn.toString();\r\n\t}", "public String getDescription() {\n if (description == null) {\n description = Description.getD...
[ "0.70549834", "0.7005983", "0.69711804", "0.69023114", "0.6871714", "0.68427134", "0.68407685", "0.6827631", "0.6827631", "0.68218803", "0.6815324", "0.6811567", "0.6795142", "0.6792962", "0.67928797", "0.6792631", "0.67911017", "0.6788649", "0.6788649", "0.6788649", "0.67886...
0.67156464
73
Checks if this invoice must be executed with restrictions applied. In most cases it means that execution has no access to potentially dangerous instructions.
public boolean isRestricted() { return restricted; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isLegal() {\n return !this.isBroken() && (this.getId() >= 0 || !this.isExisted());\n }", "public boolean isRestricted() {\n return restricted || getFlow().getRestriction() != null;\n }", "public abstract boolean isRestricted();", "public boolean isLegal() {\r\n\r\n r...
[ "0.6471537", "0.6413646", "0.6312884", "0.62632024", "0.60713166", "0.60540664", "0.6052836", "0.6033515", "0.602954", "0.5911177", "0.5893893", "0.58266014", "0.5804877", "0.57966924", "0.5740078", "0.57213616", "0.5708643", "0.57011884", "0.5690835", "0.56880444", "0.568764...
0.5648656
25
Gets a set of restrictions which must be applied to this execution.
public Set<InvoiceRestriction> getRestrictions() { return new HashSet<>(restrictions); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Restriction> getRestrictions() {\n return restrictions;\n }", "public String getRestrictions() {\n return restrictions;\n }", "public ArrayList<Restriction> getRestrictions()\r\n {\r\n\tif(restrictions.isEmpty()) {\r\n\t restrictions.add(Restriction.NONE);\r\n\t}\r\n\tretu...
[ "0.7442207", "0.7237049", "0.69435835", "0.62339574", "0.60951245", "0.6026966", "0.5793097", "0.5774866", "0.57416886", "0.5637038", "0.55863965", "0.5578762", "0.55132353", "0.55104786", "0.55027586", "0.54887575", "0.5478229", "0.5478229", "0.5476871", "0.54432374", "0.542...
0.69473267
2
Gets the attached ECMA script to be executed.
public String getScript() { return script; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getScript() { \n\t\treturn null;\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString getScript() {\n return instance.getScript();\n }", "public String getScriptAsString() {\n return this.script;\n }", "public final String getScriptEngine() {\n retur...
[ "0.6614939", "0.651556", "0.6481528", "0.64074486", "0.63443387", "0.6117254", "0.6044807", "0.59176296", "0.5807931", "0.5727504", "0.56734455", "0.56609416", "0.56449753", "0.5574482", "0.55647856", "0.552635", "0.55207574", "0.5486184", "0.54480267", "0.5428262", "0.539163...
0.6667442
0
Checks if this invoice execution is bound to a time limit.
public boolean isTimeoutEnabled() { return timeoutEnabled; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasSolverTimeLimitSeconds();", "public boolean isWithinLimit() {\n return assumptionsFailed.get() < assumptionLimit;\n }", "boolean hasDesiredTime();", "private void checkTimeout() {\n val timeout = config.getInt(\"timeout\");\n\n checkArgument(timeout >= 1000, \"timeout is le...
[ "0.70265126", "0.64398587", "0.629229", "0.62050414", "0.6169902", "0.61605287", "0.61222136", "0.61116624", "0.6100576", "0.60734946", "0.6049655", "0.6043277", "0.6032278", "0.597258", "0.5965627", "0.5885485", "0.5862382", "0.5858949", "0.5857714", "0.57731414", "0.5743688...
0.0
-1
Gets a value of a time limit for this execution in milliseconds (nonnegative).
public long getTimeoutInMilliseconds() { return timeoutInMilliseconds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getTimeLimit() {\n\t\treturn timeLimit;\n\t}", "public float getMaxTimeSeconds() { return getMaxTime()/1000f; }", "final Long getTimeoutValue()\n/* */ {\n/* 137 */ return this.timeout;\n/* */ }", "int getAbsoluteMaximumDelay();", "int getMaxRecordingMillis();", "public int ge...
[ "0.7359027", "0.679974", "0.67042476", "0.6637809", "0.6625505", "0.65686846", "0.65593106", "0.65550864", "0.6553827", "0.6507699", "0.6494339", "0.6482224", "0.6462151", "0.6452689", "0.6434769", "0.641155", "0.64000463", "0.63776636", "0.6376705", "0.6352494", "0.635194", ...
0.6482639
11
Gets the version of this invoice to support its backcompatibility in future.
public String getVersion() { return version; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getProductVersion();", "public BigDecimal getVersion() {\n\t\tBigDecimal bd = (BigDecimal) get_Value(\"Version\");\n\t\tif (bd == null)\n\t\t\treturn Env.ZERO;\n\t\treturn bd;\n\t}", "public BigDecimal getVersion() {\r\n return version;\r\n }", "public String getCurrentVersion() {\n ...
[ "0.67388624", "0.67082226", "0.6608847", "0.6557217", "0.6549903", "0.6501885", "0.6478501", "0.6468336", "0.6468336", "0.64607817", "0.644277", "0.6439098", "0.6436454", "0.64330584", "0.6382607", "0.63669986", "0.636511", "0.6342346", "0.63356405", "0.63235545", "0.63146317...
0.61600894
70
TODO Autogenerated method stub
public static void main(String[] args) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void method() { }
{ "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
so should i clean the whole interface? ye just the itmes in the interface and the value
public void cleanUp() { for (int i = 0; i < 24; i++) { PlayerAssistant.itemOnInterface(c, 26099, i, -1, -1); } c.getPA().sendNewString("0", 26013); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Poulet {\n /*DEFINIT le nombre de like effectué par ce poulet */\n public void setnombreLike(int nombre_like);\n\n /*DEFINIT le nombre de match de ce poulet */\n public void setnombreMatch(int nombre_match);\n\n}", "public interface MovimientoConFlete extends MovimientoCosteable{\t\r...
[ "0.59721434", "0.5954077", "0.5886261", "0.5866994", "0.5838771", "0.58076817", "0.5722935", "0.5714237", "0.5706472", "0.5701078", "0.56997746", "0.5693755", "0.5655366", "0.56506366", "0.5639736", "0.56396884", "0.5604668", "0.5582675", "0.55358386", "0.5530764", "0.5523966...
0.0
-1
u sure u wnt this as int? jw yer. kk
public int setIndex(int index) { this.openIndex = index; return index; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int intValue();", "@Override\r\n\tpublic int getInt(int arg) {\n\t\treturn 0;\r\n\t}", "int intOf();", "public int getInt(){\n return new BigInteger(this.value).intValue();\n }", "public int intValue();", "int getIntValue();", "int getInt();", "int getInt();", "Integer getValue();"...
[ "0.6970086", "0.6957802", "0.6878713", "0.6810451", "0.6762694", "0.67607856", "0.6683245", "0.6683245", "0.6654076", "0.6654076", "0.665014", "0.65533495", "0.6551065", "0.65465844", "0.6531557", "0.6516677", "0.6493924", "0.64852685", "0.64623034", "0.64213395", "0.63977134...
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { mview = inflater.inflate(R.layout.fragment_logintab, container, false); txt1 = (EditText) mview.findViewById(R.id.username); txt2 = (EditText) mview.fin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup...
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.66251...
0.0
-1
low = 0 . high = intArray.length1
public static int RecurviveBinarysearch(int[] intArray, int low, int high , int target ) { int mid; if ( low > high) { return -1; } else { mid = (high + low)/2; if(intArray[mid] < target) return RecurviveBinarysearch(i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int split(int[] array, int low, int high) {\n\t\tint pivot = low;\n\t\tint i = low + 1;\n\t\tint j = high;\n\t\t\n\t\t//we are choosing pivot always the first element in the array\n\t\twhile (i <= j) {\n\t\t\tif (array[i] <= array[pivot]) {\n\t\t\t\ti++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif (array...
[ "0.6416743", "0.6321125", "0.62528753", "0.6218115", "0.6203465", "0.61991984", "0.6133173", "0.611495", "0.6090584", "0.60887986", "0.6062189", "0.60307056", "0.59784436", "0.5975352", "0.5945634", "0.59021515", "0.58983105", "0.58651936", "0.58574927", "0.5826998", "0.58207...
0.5569816
56
add your code here
public static void insertHeap(int x) { if(s.isEmpty()){ s.add(x); } else if(x>s.peek()){ g.add(x); } else if(g.isEmpty()){ g.add(s.poll()); s.add(x); } else { s.add(x); } balanceHeaps(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }", "CD withCode();", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\t \n\t\t\t super.onPreExecute();\n\t\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInsta...
[ "0.5796405", "0.56786925", "0.563816", "0.5565202", "0.55099386", "0.5472452", "0.5429367", "0.5425033", "0.5420643", "0.54064", "0.53861076", "0.5385484", "0.5382233", "0.5378073", "0.5374743", "0.5355735", "0.5346183", "0.5337322", "0.53347856", "0.5331404", "0.53269166", ...
0.0
-1
Function to balance heaps.
public static void balanceHeaps() { // add your code here if(Math.abs(s.size()-g.size()) > 1){ if(s.size() > g.size()){ g.add(s.poll()); } else { s.add(g.poll()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void balanceHeaps(){\n \n //If max heap size is greater than min heap then pop the first element and put int min heap\n if(maxHeap.size() > minHeap.size())\n minHeap.add(maxHeap.pollFirst());\n\n }", "private int balance(AvlTreeNode<K, V> h) {\n return height(h.ri...
[ "0.7831788", "0.63457984", "0.62994283", "0.61231256", "0.60965776", "0.5921478", "0.5646976", "0.5575265", "0.5512113", "0.54523736", "0.5397136", "0.5336747", "0.5332828", "0.5310906", "0.5295477", "0.52861476", "0.52357435", "0.5230261", "0.51944035", "0.51891744", "0.5170...
0.8083802
0
Function to return Median.
public static double getMedian() { // add your code here if(s.size()==g.size()){ return (double) ((s.peek()+g.peek())/2); } else if(s.size() > g.size()) { return (double) s.peek(); } else { return (double) g.peek(); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T median();", "public double findMedian() {\n int size=list.size();\n if(size % 2 ==1) return list.get(size/2);\n else{\n return ((double)list.get(size/2)+(double)list.get(size/2-1))/2;\n }\n }", "public double findMedian() {\n int size = maxHeap.size() +...
[ "0.7926375", "0.77648914", "0.75703406", "0.745184", "0.7447651", "0.739809", "0.73803025", "0.73550093", "0.7334445", "0.7324602", "0.73041457", "0.7244107", "0.72194844", "0.714264", "0.71055096", "0.7076366", "0.70287466", "0.70017195", "0.6994745", "0.6975033", "0.6949703...
0.78463906
1
/ Get the recipe Name
public String getName() { return name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getRecipeName(Integer id){\n SQLiteDatabase db = getWritableDatabase();\n Cursor c = db.rawQuery(\"SELECT recipe_name FROM \" + WFDColumns.RECIPES_TABLE + \" WHERE _ID = \" + id, null);\n c.moveToFirst();\n String temp = c.getString(0);\n c.close();\n db.clos...
[ "0.69208485", "0.66347", "0.66347", "0.66347", "0.66347", "0.66347", "0.66347", "0.66347", "0.66347", "0.66347", "0.66347", "0.66347", "0.66347", "0.66347", "0.66347", "0.66347", "0.66347", "0.66347", "0.66347", "0.66347", "0.66347", "0.66347", "0.66347", "0.66347", "...
0.0
-1
/ Set the recipe Name
public void setName(String name) { this.name = name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setName(String rname) {\n name = rname;\n }", "public void setName(String restaurantName) { // Sets the restaurant's name\n\t\tname = restaurantName;\n\t}", "public void setName (String n) {\n name = n;\n }", "public void setName (String n){\n\t\tname = n;\n\t}", "public void ...
[ "0.6900735", "0.67819357", "0.6722351", "0.670972", "0.6707343", "0.67023736", "0.6679644", "0.6632174", "0.6609099", "0.65632164", "0.65632164", "0.65632164", "0.65601665", "0.6547091", "0.6547091", "0.6547091", "0.65428877", "0.65428877", "0.65428877", "0.65428877", "0.6542...
0.0
-1
/ Give Brew a Recipe
public void addBrew(Brew b) { brews.add(b); b.setRecipe(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public IRecipe addRecipe() {\n return RecipeRegistry.addShapedRecipe(new ItemStack(this),\n \"igi\",\n \"gog\",\n \"igi\",\n 'o', \"obsidian\", 'i', \"ingotIron\", 'g', \"blockGlass\");\n }", "@Override\n\tpublic void addRecipes() \n\t{\n GameRegistry.addRecipe...
[ "0.68833107", "0.64852387", "0.6420203", "0.62199473", "0.6186112", "0.6131993", "0.6108482", "0.610315", "0.609227", "0.60867614", "0.6071011", "0.60382074", "0.59997797", "0.5999532", "0.5994896", "0.5988294", "0.59855455", "0.5965961", "0.5963881", "0.5955303", "0.5926522"...
0.62473804
3
/ One brew has 0...1 recipe, one recipe could be owned by many brews
public void removeBrews(Brew b) { brews.remove(b); b.setRecipe(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkRecipes() {\n\n for (Recipe recipe : this.recipeItems.values()) {\n List<String> requiredItems = new ArrayList<>(recipe.getRequiredItems());\n\n for (Item item : this.commonItems.values()) {\n requiredItems.remove(item.getName());\n }\n ...
[ "0.5895678", "0.58147275", "0.57429576", "0.5575745", "0.5497155", "0.54884356", "0.5488237", "0.54074615", "0.5387465", "0.5384114", "0.5354006", "0.52935076", "0.52835", "0.5280287", "0.52435005", "0.5231938", "0.5209644", "0.51951176", "0.5171631", "0.51608133", "0.5155816...
0.48870045
45
Processes requests for both HTTP GET and POST methods.
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {\n final String method = req.getParameter(METHOD);\n if (GET.equals(method)) {\n doGet(req, resp);\n } else {\n resp.setStatus(HttpServletResponse.SC_METHOD_NOT_...
[ "0.7004024", "0.66585696", "0.66031146", "0.6510023", "0.6447109", "0.64421695", "0.64405906", "0.64321136", "0.6428049", "0.6424289", "0.6424289", "0.6419742", "0.6419742", "0.6419742", "0.6418235", "0.64143145", "0.64143145", "0.6400266", "0.63939095", "0.63939095", "0.6392...
0.0
-1
Handles the HTTP POST method.
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); HttpSession session = request.getSession(true); String name="User"; Usuario user= new Usuario(request.getParameter("n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void doPost(Request request, Response response) {\n\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) {\n }", "public void doPost( )\n {\n \n }", "@Override\n public String getMethod() {\n return \"POST\";\n ...
[ "0.73289514", "0.71383566", "0.7116213", "0.7105215", "0.7100045", "0.70236707", "0.7016248", "0.6964149", "0.6889435", "0.6784954", "0.67733276", "0.67482096", "0.66677034", "0.6558593", "0.65582114", "0.6525548", "0.652552", "0.652552", "0.652552", "0.65229493", "0.6520197"...
0.0
-1
Returns a short description of the servlet.
@Override public String getServletInfo() { return "Short description"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getServletInfo()\n {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short d...
[ "0.87634975", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8531295", "0.8531295", "0.85282224", "0.85282224", ...
0.0
-1
Ligne sa ap la, pou l load data film yo, nan yon position ki byen specifique
@Override public void onBindViewHolder(@NonNull ViewHolder holder, int position) { Movie movie = movies.get(position); holder.tvTitle.setText(movie.getTitle()); holder.tvOverview.setText(movie.getOverview()); //Ligne sa pral gen pou l kreye lien pou Poster Image yo String the...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void cadastrarOfertasQuad2(){\n \n String[] palavras;\n \n //Primeiro quadrimestre\n try {\n try (BufferedReader lerArq = new BufferedReader(new InputStreamReader(new FileInputStream(\"/home/charles/alocacao/Arquivos Alocação/Arquivos CSV/Planejamento2017_q2.csv\...
[ "0.5705024", "0.56743705", "0.56483424", "0.56323415", "0.557843", "0.5561292", "0.5555278", "0.5529654", "0.55126184", "0.5492554", "0.5489087", "0.547898", "0.5477224", "0.5476351", "0.5417557", "0.54014635", "0.5399748", "0.5371458", "0.535822", "0.53472024", "0.53447855",...
0.0
-1
Ligne sa ap responsab pou l display nombre de element kap gen nan liste lan
@Override public int getItemCount() { return movies.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long getNombreElements();", "public void afficherLru() {\n\t\tint nbrCols = listEtape.size();\n\t\tint nbrRows = 0;\n\t\tfor(ArrayList<Processus> list: listEtape) {\n\t\t\tif(list.size() > nbrRows) nbrRows = list.size(); \n\t\t}\n\t\t\n\t\taddColsRows(resultPane, nbrCols+1, nbrRows);\n\t\taddPanelForResult(resul...
[ "0.6936045", "0.6430305", "0.6378997", "0.63602257", "0.6358612", "0.6338301", "0.63168067", "0.630869", "0.62725234", "0.6256285", "0.6253173", "0.62495965", "0.623411", "0.6233019", "0.6218268", "0.6187146", "0.6184859", "0.6180229", "0.61656386", "0.6163834", "0.6142993", ...
0.0
-1
JUnit test of this class.
@Test public void test() throws Exception { TestingUtils.assertSuccessfulReplay(new File(System.getProperty("swing-testing-toolkit.project.directory", "./") + "test-specifications/testExtensibility.stt")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@org.junit.Test\r\n\tpublic void test() {\n\t\t\t\t\r\n\t}", "@Override\n public void runTest() {\n }", "@Override\n public void setUp() {\n }", "@Override\n public void test() {\n \n }", "@Override\r\n\tpublic void setUp() {\n\...
[ "0.78766644", "0.731214", "0.730034", "0.7286038", "0.7218461", "0.71727395", "0.7118289", "0.71054256", "0.70830846", "0.70781124", "0.70680296", "0.70680296", "0.70590216", "0.7051613", "0.7025373", "0.69683284", "0.69667923", "0.69663984", "0.6962402", "0.69526666", "0.692...
0.0
-1
/ Create the test editor and register the custom action class.
@Override public void run() { Tester tester = new Tester(); TestEditor testEditor = new TestEditor(tester) { private static final long serialVersionUID = 1L; @Override public Class<?>[] getTestActionClasses() { List<Class<?>> result = new ArrayList<Class<?>>(Arrays.asList(super.getTest...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ActionEditorTest(String name) {\n super(name);\n }", "@Override\n public void testCreateAsEditor() {}", "@Override\n protected void setUpActionBuilder()\n {\n super.setUpActionBuilder();\n actionBuilder.getActionStore().addAction(TEST_ACTION);\n }", "protected void cr...
[ "0.76952994", "0.71459574", "0.676854", "0.62902147", "0.62840235", "0.60140866", "0.59390545", "0.59302795", "0.59302795", "0.59302795", "0.58508146", "0.5808815", "0.5801169", "0.5782267", "0.5764273", "0.57192105", "0.56594247", "0.56570834", "0.56096756", "0.5593799", "0....
0.73906064
1
/ Here you can initialize your action from the state of the component it is targeted to. Note that the return value is used to indicate that the action class can handle (return true) the component passed as argument or not (return false).
@Override protected boolean initializeSpecificProperties(Component c, AWTEvent introspectionRequestEvent, TestEditor testEditor) { if (c instanceof CustomComponent) { expectpedValueOfPropertyToCheck = ((CustomComponent) c).propertyToCheck; newValueOfPropertyToChange = ((CustomComponent) c).propertyToCh...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ActionState createActionState();", "@Override\n public void initComponent() {\n ActionManager am = ActionManager.getInstance();\n }", "@Override\r\n public void initAction() {\n \r\n }", "private StateActions(){}", "@Override\r\n\tpublic void initActions() {\n\t\t\r\n\t}", "publi...
[ "0.70378065", "0.69875205", "0.68178916", "0.66279936", "0.6601464", "0.6580196", "0.65079373", "0.6491371", "0.6392565", "0.63275766", "0.6123262", "0.61231023", "0.61231023", "0.61231023", "0.61228925", "0.6111072", "0.6102297", "0.6069196", "0.605925", "0.6047879", "0.6009...
0.0
-1
/ Here you actually execute the action/assertion.
@Override public void execute(final Component c, Tester tester) { if (!expectpedValueOfPropertyToCheck.equals(((CustomComponent) c).propertyToCheck)) { throw new TestFailure("propertyToCheck is not ok"); } /* * Note that the current thread is the UI thread. Then it is safe here to * execute inst...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testExecute() {\n\t\taes.execute();\n\t\t\n\t\tassertTrue(a.wasStopPollingMessagesCalled);\n\t\tassertTrue(osm.wasWriteCalled);\n\t}", "public void actionSuccessful() {\n System.out.println(\"Action performed successfully!\");\n }", "public void executeAction( String actionInfo );", "pu...
[ "0.65791315", "0.644436", "0.6403647", "0.63739115", "0.63585955", "0.62179285", "0.61965626", "0.6192547", "0.6157156", "0.61516374", "0.61391073", "0.6132666", "0.61270165", "0.61095095", "0.6093371", "0.60659677", "0.60515827", "0.60499924", "0.6044926", "0.6034423", "0.59...
0.0
-1
/ Here you can optionally verify your action properties. The thrown exceptions will be displayed in the test editor.
@Override public void validate() throws ValidationError { if (newValueOfPropertyToChange < 0) { throw new TestFailure("propertyToChange is not ok"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetActions() {\n }", "@Test\n public void getSorteerAction() throws Exception {\n }", "@Override\r\n protected boolean validateAction() {\n Set inputNames = getInputNames();\r\n Iterator inputNamesIterator = inputNames.iterator();\r\n String inputName;\r\n IActi...
[ "0.6957494", "0.6599797", "0.6506168", "0.6287919", "0.6076663", "0.60702664", "0.6058051", "0.59966075", "0.5964647", "0.5948721", "0.593967", "0.5923817", "0.5917733", "0.58985573", "0.5887357", "0.58681583", "0.5854397", "0.5834012", "0.5833624", "0.58216065", "0.5811064",...
0.0
-1
/ Here you should provide information about your action current property values.
@Override public String getValueDescription() { return "propertytoCheck=" + expectpedValueOfPropertyToCheck + "; propertytoChange=" + newValueOfPropertyToChange; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getPropertyCurrentAction();", "public GovernanceActionProperties getProperties()\n {\n return properties;\n }", "public long getPropertyCurrentAction()\n {\n return iPropertyCurrentAction.getValue();\n }", "protected String getPropertyStrings() {\n\t\treturn \"Active:\" ...
[ "0.6953853", "0.6467097", "0.6412681", "0.6110133", "0.6056309", "0.59564173", "0.5949069", "0.5796778", "0.5785903", "0.5767089", "0.57400686", "0.57163084", "0.5674527", "0.5608946", "0.5522566", "0.55209273", "0.54853034", "0.5481876", "0.54543877", "0.54506046", "0.544081...
0.52317005
43
Parses a line of input from the file and outputs the burger.
public void parseLine(String theLine) { List<String> list = new ArrayList<String>(); ArrayList<String> addList = new ArrayList<>(); ArrayList<String> removeList = new ArrayList<>(); // http://goo.gl/r2npds // http://goo.gl/0Dqc3g list = Arrays.asList(theLine.split(" ")); for (int i = 0; i <list.size...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void parse(String line);", "private static void readLine(BufferedReader br, String field, String line, int pos, GameFile gameFile) throws IOException {\r\n\t\t\r\n\t\tString[] s = line.split(\"=\"); //splits the current line at equal sines\r\n\t\t\r\n\t\tString n = s[0];\r\n\t\t\r\n\t\tif(n.is...
[ "0.58843017", "0.5849084", "0.5648201", "0.55866814", "0.557023", "0.5446012", "0.54211533", "0.5381291", "0.5353138", "0.5347978", "0.5321597", "0.5299125", "0.5248998", "0.52481526", "0.5242264", "0.5218586", "0.5218186", "0.5208251", "0.52021843", "0.51845646", "0.5172938"...
0.64446515
0
Helper method for parseLine.
private void preferenceCheck(List<String> list, List<String> addList, List<String> removeList) { // Condition int indexWith = list.indexOf("with"); int indexBut = list.indexOf("but"); int indexNo = list.indexOf("no"); // with no, but if (indexNo == indexWith + 1) { // with no, bu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void parse(String line);", "public abstract T parseLine(String inputLine);", "protected abstract Operation parseLine(File baseDir, String line, int lineNum) throws IOException;", "protected void processLine(String line){}", "protected int[] parserLine(String source, int Line) {\n\t\tint[...
[ "0.7338168", "0.6826354", "0.65303487", "0.6489241", "0.6311836", "0.6293774", "0.62194866", "0.6138014", "0.6131995", "0.6104376", "0.6101341", "0.6056402", "0.59728223", "0.5970591", "0.59705013", "0.58882767", "0.58855313", "0.58854556", "0.58827657", "0.5875411", "0.58320...
0.0
-1
Test method for MyStack.
public void testMyStack() { MyStack<String> s = new MyStack<String>(); s.push("1"); s.push("2"); s.push("3"); s.pop(); s.push("4"); s.toString(); System.out.println("MyStack size is: " + s.size()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testStack() {\n DatastructureTest.STACK.push(3);\n DatastructureTest.STACK.push(7);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.peek()) == 7);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.pop()) == 7);\n Assert.assertTrue(((Integer) Dat...
[ "0.8378435", "0.81762075", "0.81630933", "0.79719484", "0.7947691", "0.79424137", "0.78962255", "0.78027886", "0.7800561", "0.77565765", "0.77388585", "0.77160794", "0.765134", "0.76448655", "0.7635684", "0.75633955", "0.7478009", "0.73507875", "0.7345301", "0.7335409", "0.73...
0.7640728
14
Test method for Burger.
public void testBurger() { // //Burger // Burger b = new Burger(false); // b.changePatties("Beef"); // //Double Baron Burger // Burger b = new Burger(true); // b.addPatty(); // b.changePatties("Beef"); //Triple Chicken Burger with Onions Cheese but Cheddar Burger b = new Burger(false); b.addCatego...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testBidu(){\n\t}", "@Test\n public void breweryTest() {\n // TODO: test brewery\n }", "@Test\r\n\tpublic void BushTest_1(){\r\n\t\tPlayer player = new Player(0,\"Chris\", new Point(1, 1), new Point(0, 1));\r\n\t\tPoint worldLocation = new Point(1, 1);\r\n\t\tPoint tileLocation = new Po...
[ "0.6866945", "0.63935435", "0.61060274", "0.6039193", "0.5993827", "0.5924723", "0.5921546", "0.59024787", "0.5897069", "0.58943135", "0.58547825", "0.5849318", "0.58488274", "0.5844745", "0.58330584", "0.5803123", "0.57996607", "0.57897043", "0.5789064", "0.5776412", "0.5773...
0.74562967
0
String weather = "sunny"; ,"rainy","snowy", "windy"; when sunny go to park // when rainy stay home drink tea// when snowy clean the car then build snowman when windy get ready for power loss fly kite, and code java //anything else just keep coding java
public static void main(String[] args) { String weather = "sunny"; if (weather.equals("sunny")) { System.out.println(weather + "Go to park , hiking, and code java"); } else if (weather.equals("rainy")) { System.out.println(weather + "stay home, drink tea, and code java"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\t\n\t\tint weather = 3;\n\t\t\n\t\tif(weather==1)\n\t\t{\n\t\t\tSystem.out.println(\"Hi everyone!\");\n\t\t}\n\t if(weather==2)\n\t {\n\t \t System.out.println(\"goodMorning\");\n\t }\n\t \n\t if(weather==3)\n\t {\n\t \t System.out....
[ "0.6139948", "0.60028094", "0.5715413", "0.5586292", "0.555262", "0.55198145", "0.55025274", "0.54780275", "0.54749024", "0.544325", "0.5386724", "0.5299982", "0.52914816", "0.52030426", "0.5196245", "0.5190404", "0.518609", "0.5180652", "0.5180398", "0.5176897", "0.5169692",...
0.7095095
0
TODO Autogenerated method stub
public static void main(String[] args) throws InterruptedException { System.setProperty("webdriver.gecko.driver", "/home/parinder/Downloads/geckodriver-v0.22.0-linux64/geckodriver"); FirefoxDriver driver=new FirefoxDriver(); driver.get("http://www.qaclickacademy.com/interview.php"); driver.findElementByXPat...
{ "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
simulated count for the PYP smoothing
public BayesNodePYP(int attNumber, BayesNode parent, BayesNode root, BayesTree forest) { super(attNumber, parent, root, forest); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int updateCount(double dist);", "public void count (double x)\r\n\t{\r\n\t\tsuper.count(x);\r\n\t\tdouble tmp = SimState.s.now - lastSampleTime;\r\n\t\t// If this statement is true there must be an error in the simulation\r\n\t\t// => abort\r\n\t\tif( tmp < 0 )\r\n\t\t{\r\n\t\t\tSystem.out.println(\"last = \" + ...
[ "0.6071332", "0.5815992", "0.58113664", "0.5728472", "0.56879246", "0.5523993", "0.55223894", "0.5514624", "0.55062723", "0.55031353", "0.54518384", "0.54511815", "0.54169255", "0.54132587", "0.53899366", "0.536462", "0.53554565", "0.5340917", "0.5340057", "0.53052276", "0.52...
0.0
-1
TODO Autogenerated method stub
@Override public void computeFinalProbabilities() { super.computeFinalProbabilities(); }
{ "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
/ Access modifiers changed, original: 0000
public void postScale(float focusX, float focusY, float postScale, int viewportWidth, int viewportHeight) { float transX = this.mView.getTranslationX(); updateTransform(transX - ((focusX - getX()) * (postScale - 1.0f)), this.mView.getTranslationY() - ((focusY - getY()) * (postScale - 1.0f)), thi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}", "public final void mo51373a() {\n }", "public void O000000o() {\r\n super.O000000o();\r\n this.O0000o0 = false;\r\n }", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n public void func_10...
[ "0.64602184", "0.6441093", "0.6427339", "0.63231075", "0.62947446", "0.62600064", "0.6179372", "0.61590916", "0.6146667", "0.6136281", "0.61226934", "0.6107879", "0.60949004", "0.6083142", "0.6074521", "0.6065534", "0.6061899", "0.60457057", "0.60437846", "0.60320616", "0.602...
0.0
-1
/ Access modifiers changed, original: 0000
public void updateTransform(float transX, float transY, float scaleX, float scaleY, int viewportWidth, int viewportHeight) { float left = ((float) this.mView.getLeft()) + transX; float top = ((float) this.mView.getTop()) + transY; RectF r = ZoomView.adjustToFitInBounds(new RectF(left...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}", "public final void mo51373a() {\n }", "public void O000000o() {\r\n super.O000000o();\r\n this.O0000o0 = false;\r\n }", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n public void func_10...
[ "0.64602184", "0.6441093", "0.6427339", "0.63231075", "0.62947446", "0.62600064", "0.6179372", "0.61590916", "0.6146667", "0.6136281", "0.61226934", "0.6107879", "0.60949004", "0.6083142", "0.6074521", "0.6065534", "0.6061899", "0.60457057", "0.60437846", "0.60320616", "0.602...
0.0
-1
/ Access modifiers changed, original: 0000
public void resetTransform() { this.mView.setScaleX(1.0f); this.mView.setScaleY(1.0f); this.mView.setTranslationX(0.0f); this.mView.setTranslationY(0.0f); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}", "public final void mo51373a() {\n }", "public void O000000o() {\r\n super.O000000o();\r\n this.O0000o0 = false;\r\n }", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n public void func_10...
[ "0.64602184", "0.6441093", "0.6427339", "0.63231075", "0.62947446", "0.62600064", "0.6179372", "0.61590916", "0.6146667", "0.6136281", "0.61226934", "0.6107879", "0.60949004", "0.6083142", "0.6074521", "0.6065534", "0.6061899", "0.60457057", "0.60437846", "0.60320616", "0.602...
0.0
-1
/ Access modifiers changed, original: 0000
public void flingInsideZoomView(float velocityX, float velocityY) { if (inZoomView()) { final ViewItem current = FilmstripView.this.mViewItem[2]; if (current != null) { float translationX = current.getTranslationX() * FilmstripView.this.mScale; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}", "public final void mo51373a() {\n }", "public void O000000o() {\r\n super.O000000o();\r\n this.O0000o0 = false;\r\n }", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n public void func_10...
[ "0.64602184", "0.6441093", "0.6427339", "0.63231075", "0.62947446", "0.62600064", "0.6179372", "0.61590916", "0.6146667", "0.6136281", "0.61226934", "0.6107879", "0.60949004", "0.6083142", "0.6074521", "0.6065534", "0.6061899", "0.60457057", "0.60437846", "0.60320616", "0.602...
0.0
-1
/ JADX WARNING: Missing block: B:22:0x006d, code skipped: return false;
public boolean onDoubleTap(float r6, float r7) { /* r5 = this; r0 = com.hmdglobal.app.camera.widget.FilmstripView.this; r0 = r0.mViewItem; r1 = 2; r0 = r0[r1]; r1 = 0; if (r0 != 0) goto L_0x000d; L_0x000c: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean blockEmpty()\r\n/* 72: */ {\r\n/* 73: 60 */ return false;\r\n/* 74: */ }", "public boolean c()\r\n/* 36: */ {\r\n/* 37:51 */ return false;\r\n/* 38: */ }", "public boolean c()\r\n/* 56: */ {\r\n/* 57: 77 */ return false;\r\n/* 58: */ }", "public bo...
[ "0.67761475", "0.66970795", "0.6681776", "0.64754444", "0.64625925", "0.6389489", "0.62946594", "0.62946594", "0.629442", "0.6241394", "0.62354475", "0.6235365", "0.62158936", "0.6199532", "0.6196293", "0.61812097", "0.6181057", "0.6168415", "0.6166435", "0.61517215", "0.6129...
0.0
-1
/ Access modifiers changed, original: protected
public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); int boundWidth = MeasureSpec.getSize(widthMeasureSpec); int boundHeight = MeasureSpec.getSize(heightMeasureSpec); if (boundWidth != 0 && boundHeight != 0) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic ...
[ "0.73623323", "0.69830847", "0.68941706", "0.6798817", "0.67315143", "0.67264825", "0.67049384", "0.6551554", "0.65256643", "0.65247214", "0.64783233", "0.6459452", "0.644003", "0.6434508", "0.641292", "0.64095944", "0.64055127", "0.64055127", "0.6402614", "0.64020926", "0.63...
0.0
-1
/ Access modifiers changed, original: protected
public void onLayout(boolean changed, int l, int t, int r, int b) { this.mDrawArea.left = 0; this.mDrawArea.top = 0; this.mDrawArea.right = r - l; this.mDrawArea.bottom = b - t; this.mZoomView.layout(this.mDrawArea.left, this.mDrawArea.top, this.mDrawArea.right, this.mDrawArea.bo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic ...
[ "0.73623323", "0.69830847", "0.68941706", "0.6798817", "0.67315143", "0.67264825", "0.67049384", "0.6551554", "0.65256643", "0.65247214", "0.64783233", "0.6459452", "0.644003", "0.6434508", "0.641292", "0.64095944", "0.64055127", "0.64055127", "0.6402614", "0.64020926", "0.63...
0.0
-1
/ Access modifiers changed, original: 0000
public Listener getGestureListener() { return this.mGestureListener; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}", "public final void mo51373a() {\n }", "public void O000000o() {\r\n super.O000000o();\r\n this.O0000o0 = false;\r\n }", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n public void func_10...
[ "0.64602184", "0.6441093", "0.6427339", "0.63231075", "0.62947446", "0.62600064", "0.6179372", "0.61590916", "0.6146667", "0.6136281", "0.61226934", "0.6107879", "0.60949004", "0.6083142", "0.6074521", "0.6065534", "0.6061899", "0.60457057", "0.60437846", "0.60320616", "0.602...
0.0
-1
Construct an exchange rate reader using the given base URL. All requests will then be relative to that URL. If, for example, your source is Xavier Finance, the base URL is Rates for specific days will be constructed from that URL by appending the year, month, and day; the URL for 25 June 2010, for example, would be
public ExchangeRateReader(String baseURL) throws IOException { this.Url = baseURL; readAccessKeys(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ExchangeRateReader(String baseURL) throws IOException {\n\t\tthis.baseUrl = baseURL; \n\t}", "@RequestMapping(method = RequestMethod.GET, value = \"/{date}/{baseCurrency}/{targetCurrency}\")\n public ResponseEntity exchangeRate(@PathVariable String date, @PathVariable String baseCurrency,\n ...
[ "0.8003741", "0.6531146", "0.62521607", "0.59078556", "0.5553614", "0.5539511", "0.5511696", "0.55034226", "0.5428813", "0.5362559", "0.5335684", "0.53152275", "0.531309", "0.53000474", "0.52860594", "0.5282483", "0.527677", "0.52455634", "0.52168053", "0.51721203", "0.516049...
0.7704264
1
Get the exchange rate for the specified currency against the base currency (the Euro) on the specified date.
public float getRate(JsonObject ratesInfo, String currency){ return ratesInfo.getAsJsonObject("rates").get(currency).getAsFloat(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(method = RequestMethod.GET, value = \"/{date}/{baseCurrency}/{targetCurrency}\")\n public ResponseEntity exchangeRate(@PathVariable String date, @PathVariable String baseCurrency,\n @PathVariable String targetCurrency) throws ParseException {\n Utils....
[ "0.74261403", "0.68763477", "0.650383", "0.6503134", "0.6481617", "0.6380859", "0.6265513", "0.6107927", "0.6042027", "0.5950378", "0.59470487", "0.59298074", "0.59110665", "0.5905476", "0.5854278", "0.5854158", "0.58248985", "0.57966644", "0.57918274", "0.5743572", "0.570380...
0.5468584
27
Get the exchange rate of the first specified currency against the second on the specified date.
public String addZero(int dayOrMonth) { if (dayOrMonth < 10) { return "0" + String.valueOf(dayOrMonth); } else { return String.valueOf(dayOrMonth); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(method = RequestMethod.GET, value = \"/{date}/{baseCurrency}/{targetCurrency}\")\n public ResponseEntity exchangeRate(@PathVariable String date, @PathVariable String baseCurrency,\n @PathVariable String targetCurrency) throws ParseException {\n Utils....
[ "0.6865892", "0.65448236", "0.6437175", "0.64128476", "0.6248783", "0.62167144", "0.61900264", "0.61167973", "0.6030162", "0.5975143", "0.5965479", "0.59330946", "0.58827424", "0.58769155", "0.5809338", "0.5761433", "0.57537866", "0.5744511", "0.57284373", "0.570605", "0.5659...
0.0
-1
create equations for each recipe
public static ResourceGraph solveResourceFlow(final RecipeGraph graph, List<GraphSolver.Constraint> constraints) { ArrayList<Recipe> recipes = new ArrayList<>(); recipes.addAll(graph.vertexSet()); ArrayList<RecipeEdge> edges = new ArrayList<>(); edges.addAll(graph.edgeSet()); i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void generateTerms() {\t\t\n\t\tString[] terms = this.data.substring(this.semiColonIndex+6,this.data.length()).split(\"(?=-|\\\\+)\"); // splits string by \"-\" or \"+\" into array of terms\n\t\t\n\t\tfor (String numeric_term : terms) {\n \t\t \n\t\t\tint power;\n \t try {\n \t\...
[ "0.64840853", "0.6300062", "0.5827529", "0.5791883", "0.57155055", "0.55858177", "0.5584932", "0.55607426", "0.5485075", "0.5451244", "0.5440525", "0.5439531", "0.5423296", "0.5327348", "0.5325183", "0.5315651", "0.5261645", "0.52253133", "0.52199906", "0.5207302", "0.5192269...
0.48321185
67
TODO Autogenerated method stub
public static void main(String[] args) { System.setProperty("webdriver.chrome.driver","E:\\chrome driver 90\\chromedriver_win32 (2)\\chromedriver.exe"); ChromeDriver driver = new ChromeDriver(); //driver.get("http://demo.guru99.com/test/newtours/"); driver.get("https://www.selenium.dev/downloads/"); driver.ma...
{ "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
Constructeur instanciant la vue
public DmaiClient() { this.mainView = new MainView(); connexionServeur(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public vueEx() {\r\n \r\n }", "public AfiliadoVista() {\r\n }", "public Venda() {\n }", "public CrearQuedadaVista() {\n }", "public Vampire() {\n super();\n this.name = \"Vampire\";\n }", "Vaisseau_Vaisseau createVaisseau_Vaisseau();", "Vaisseau_Vaisseau createVaisse...
[ "0.7951272", "0.7345383", "0.72452354", "0.7217124", "0.72127473", "0.71459913", "0.71459913", "0.71459913", "0.71459913", "0.7131142", "0.7102097", "0.7095629", "0.7074158", "0.70732516", "0.7037556", "0.7026304", "0.70106477", "0.697856", "0.69079375", "0.69079375", "0.6899...
0.0
-1
Ouverture d'un socket relier au serveur
public void connexionServeur() { String serverIp = JOptionPane .showInputDialog("Entrez le nom du serveur."); try { socket = new Socket(serverIp, 4456); logger.info("Connexion au socket serveur."); Thread t = new Thread(new EnvoiPresence(socket)); t.start(); Thread t2 = new Thread(n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void socket() {\n }", "private void gestionSocket(){\n Socket sock = null;\n try{\n sock = new Socket(adresse, 18000);\n }\n catch(IOException ioe){\n System.out.println(\"Erreur lors de la connexion : \" + ioe.getMessage());\n }\n...
[ "0.7469062", "0.7206296", "0.7000103", "0.6949261", "0.6876757", "0.67399526", "0.6699123", "0.6690577", "0.666464", "0.66599077", "0.65837383", "0.6579361", "0.65781325", "0.6558777", "0.6527551", "0.65145123", "0.6486173", "0.6471033", "0.64689136", "0.64658785", "0.646136"...
0.71133053
2
Computes forward algorithm for HMM. Note that we rescale the probabilities to avoid 0 probabilities for long sentences. References: (1) wikipedia Baum Welch algorithm (2) Mathematics of HMM and
public GenericPair<double[][], double[]> forwardWithTScaled(double[][][] a, double[] pi, String[] y, int N, int T, String[] d, HashMap<Pair, Double> t_table){ double[] c_scaled = new double[T+1]; double[][] alphaHat = new double[N+1][]; for (int i = 0; i < alphaHat.length ; i++){ alphaHat[i] = new double[T+1];...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "<S> void storeInitialProbability(String hmmId, HMMInitialProbability<S> probability) throws IOException;", "public void test2 (List<List<String>> sentences) {\n double totalLogProb = 0;\n double totalNumTokens = 0;\n for (List<String> sentence : sentences) {\n totalNumTokens += se...
[ "0.56760067", "0.5515405", "0.54855186", "0.5477333", "0.5451916", "0.5388279", "0.53831375", "0.5379834", "0.5372075", "0.5343462", "0.52166355", "0.52159816", "0.52068806", "0.51988465", "0.5169942", "0.5167145", "0.514897", "0.5117902", "0.50806373", "0.49851078", "0.49685...
0.0
-1
Computes backward algorithm for HMM References: (1) wikipedia Baum Welch algorithm (2) Mathematics of HMM and
public double[][] backwardWithTScaled(double[][][] a, double[] pi, String[] y, int N, int T, String[] d, HashMap<Pair, Double> t_table, double[] c_scaled){ double[][] betaHat = new double[N+1][T+1]; /*for (int i = 0; i < betaHat.length ; i++){ betaHat[i] = new double[T+1]; }*/ for (int i = 1; i < N+1 ; i++)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void backward() {\n Tensor x = modInX.getOutput();\n Tensor tmp = new Tensor(yAdj); // copy\n tmp.elemDivide(x);\n modInX.getOutputAdj().elemAdd(tmp);\n }", "private void backwardCalculation(double[] trainingOutput) {\n\t\tfor (int i = 0; i < numberOfOutputs; ...
[ "0.63485974", "0.59619224", "0.5916822", "0.57505447", "0.572656", "0.56202316", "0.55814385", "0.55486524", "0.5533972", "0.5427021", "0.5421555", "0.537788", "0.5368427", "0.5367147", "0.53340816", "0.53109163", "0.51942426", "0.51728666", "0.51225674", "0.51193124", "0.510...
0.0
-1
Initialize HMM parameters (a and pi). t_table is initialized from the t_table of IBM1. Also, tagMap which is a map of alignment types to unique numbers is initialized.
public void initializeModel(int N){ int twoN = 2*N; for (int i = 1; i < twoN+1; i++) pi[i] = 1.0/twoN; for (int i = 1; i < N+1; i++) for (int j = 1; j < N + 1; j++) a[i][j][N] = 1.0/N; tagMap.put("SEM", 1); tagMap.put("FUN", 2); tagMap.put("PDE", 3); tagMap.put("CDE", 4); tagMap.put("MD...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public HMMModel(double[] pi, double[][] A, double[][] B) {\n\t\tthis.pi = pi;\n\t\tthis.A = A;\n\t\tthis.B = B;\n\t\tthis.N = A.length;\n\t\tthis.M = B[0].length;\n\t}", "public void initForMM(){\n hdBase = HD_BASED_ON_MMS;\n hdNoHdRankThreshold = 0;\n hdCorrection = 1; \n hdCei...
[ "0.59000236", "0.5805787", "0.56706125", "0.5580248", "0.55090696", "0.55058163", "0.54421633", "0.5436172", "0.53964496", "0.5361138", "0.535284", "0.5347243", "0.5320768", "0.5297853", "0.5289822", "0.52759576", "0.5275042", "0.5260943", "0.5260556", "0.5257788", "0.5249767...
0.49741903
51
Computes maximum length among target sentences
public GenericPair<Integer, HashSet<Integer>> maxTargetSentenceLength(String[][] bitext){ int maxLength = 0; HashSet<Integer> targetLengthSet = new HashSet<Integer>(); for (String[] fe : bitext){ int tempLength = fe[1].split(" ").length; if ( tempLength > maxLength) maxLength = tempLength; targetL...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getMaxLength();", "public abstract int getMaxLength();", "public int lengthOfLongestWord(){\n int n=0;\n for(int i=0;i<size();i++)\n if(get(i).length()>n)n=get(i).length();\n return n;\n }", "public static void main(String[] args) {\n\t\tString input = \"Genetics...
[ "0.7051993", "0.68129426", "0.66566366", "0.6633271", "0.6629054", "0.65748495", "0.65134954", "0.65097904", "0.6490478", "0.6423276", "0.6400834", "0.63981926", "0.6346475", "0.6327587", "0.6289067", "0.6268654", "0.62568617", "0.62357557", "0.6225113", "0.62173873", "0.6210...
0.7631328
0
This method reverse a bitext of such that it becomes . This is done for performance issues.
public GenericPair<HashMap<Pair, Integer>, HashMap<Integer, Pair>> mapBitextToInt(HashMap<Pair, Integer>sd_count){ HashMap<Pair, Integer> index = new HashMap<Pair, Integer>(); HashMap<Integer, Pair> biword = new HashMap<Integer, Pair>(); int i = 0; for (Pair pair : sd_count.keySet()){ index.put(pair, i); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void Rev_Str_Fn(){\r\n\t\r\n\tString x=\"ashu TATA\";\r\n\t\r\n\tStringBuilder stb=new StringBuilder();\r\n\tstb.append(x);\r\n\tstb.reverse();\r\n\tSystem.out.println(stb);\r\n}", "public static void inverseTransform()\r\n {\r\n \tint first = BinaryStdIn.readInt();\r\n \tString s = Binary...
[ "0.6388227", "0.5987358", "0.59218854", "0.5913745", "0.59099346", "0.5888759", "0.58875906", "0.58528143", "0.56492287", "0.56490624", "0.5643031", "0.56331974", "0.56040376", "0.55941737", "0.5586555", "0.5580137", "0.5566602", "0.55408496", "0.5512049", "0.5505265", "0.549...
0.0
-1
set a to 0
public void clearA(){ for (int i = 0; i < I+1; i++){ for (int j = 0; j < I+1; j++){ a[i][j][I] = 0.0; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void SET_Z(int a) {\n if (a == 0) {\n SEZ();\n }\n }", "public final void a() {\n this.b = -1;\n this.c = Integer.MIN_VALUE;\n this.d = false;\n this.e = false;\n }", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "abstract void assignZero(...
[ "0.68487066", "0.6840259", "0.68116134", "0.65659374", "0.6510438", "0.6345269", "0.63328755", "0.63328755", "0.62910575", "0.6280766", "0.6280766", "0.6260766", "0.6259986", "0.62442017", "0.6235048", "0.6220163", "0.61712724", "0.61341286", "0.6079425", "0.60769856", "0.603...
0.5252303
100
This method checks the validity of the transition parameters (probabilities sum to 1)
public boolean checkProbability(int N){ boolean isProb = true; for (int i = 1; i < a.length; i++){ double sum = 0.0; for (int j = 1; j < a[0].length; j++){ sum += a[i][j][N]; } System.out.println("sum " + sum); if (sum != 1){ System.out.println("not a probability"); isProb = false; }el...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkParams() throws InvalidParamException{\r\n String error = svm.svm_check_parameter(this.problem, this.param);\r\n if(error != null){\r\n throw new InvalidParamException(\"Invalid parameter setting!\" + error);\r\n }\r\n }", "private void validateInputParameters...
[ "0.64708155", "0.61067873", "0.60855365", "0.59567803", "0.58748883", "0.58406407", "0.5840603", "0.58299553", "0.5826002", "0.58030915", "0.5800507", "0.57587636", "0.5752158", "0.5722224", "0.57116085", "0.5696715", "0.56775326", "0.56571996", "0.56564313", "0.562143", "0.5...
0.0
-1
Smoothes t(f|e) parameter by backingoff to a uniform probability 1/V
public double tProbability(String f, String e){ Pair fe = new Pair(f,e); int V = 163303; if (t_table.containsKey(fe)){ return t_table.get(fe); } else{ if (e.equals("null")) return nullEmissionProb; else return 1.0/V; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Float sigmoidSmoothing(Float value){\n\t\tvalue = (float) (1/(1+Math.pow(value, -1)));\n\t\treturn value;\n\t}", "Builder extremeSpikeProbability(double p);", "void setExtremeSpikeProbability(double p);", "public double f(double t) {\r\n // For e = 0 (special case), the bids will drop linearly...
[ "0.6281848", "0.6179733", "0.61491513", "0.6143339", "0.59421307", "0.5672955", "0.5568999", "0.5520868", "0.53699833", "0.5347336", "0.53333724", "0.5293861", "0.5285196", "0.52584255", "0.52576774", "0.52353454", "0.5232824", "0.52285385", "0.52234924", "0.517725", "0.51758...
0.533897
10
Smoothes p(i|i',I) probabilities by backingoff to a uniform probability 1/I This is an alternative to Och and Ney, 2003 interpolation: \alphap(i|i',I) + (1\alpha)1/I.
public double aProbability(int iPrime, int i, int I){ if (targetLengthSet.contains(I)) return a[iPrime][i][I]; else{ return 1.0/I; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Builder extremeSpikeProbability(double p);", "AdaptiveProbMap(int n, int rate) \n {\n this.rate = rate;\n this.data = new int[n*33];\n\n for (int i=0, k=0; i<n; i++, k+=33)\n {\n for (int j=0; j<33; j++)\n this.data[k+j] = (i == 0) ? Global.squash((j-16)...
[ "0.5468428", "0.52521926", "0.51959217", "0.5178276", "0.51029956", "0.50842506", "0.50242233", "0.50023854", "0.4985807", "0.49787375", "0.4964355", "0.49025798", "0.48791808", "0.4852317", "0.4849094", "0.48315218", "0.48283494", "0.4816771", "0.47290492", "0.47201097", "0....
0.5367083
1
This method is used in EM for smoothing p(h|t_f,t_e) parameters. We used to call these s parameters.
public double sProbability(String t_f, String t_e, Integer h){ Triple<String, String, Integer> f_e_h = new Triple<String, String, Integer>(t_f,t_e,h); double first = (s.containsKey(f_e_h) ? s.get(f_e_h) : 0 ); double[] tagDist = {0, 0.401, 0.264, 0.004, 0.004, 0.012, 0.205, 0.031, 0.008, 0.003, 0.086, 0.002}; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected float interpolate(float s, float e, float t) {\n\tfloat range = e - s;\n\treturn s + t * range;\n }", "public void estimateParameter(){\r\n int endTime=o.length;\r\n int N=hmm.stateCount;\r\n double p[][][]=new double[endTime][N][N];\r\n for (int t=0;t<endTime;++t){\r\n ...
[ "0.6051157", "0.60263944", "0.5736928", "0.5509462", "0.54847383", "0.54692274", "0.537621", "0.5370198", "0.5288512", "0.5272689", "0.5151513", "0.5151513", "0.51398075", "0.5123627", "0.51109135", "0.5108851", "0.5085357", "0.49998543", "0.4995567", "0.49807113", "0.4959872...
0.63928324
0
Following Och and Ney (2000a) approach, for handling source words that have no alignment in the target sentence, we add N empty words (NULLs) to the target sentence and enforce a set of constraints which are implemented in this method.
public void multiplyOneMinusP0H(){ for (int I : targetLengthSet) for (int i = 1; i < I+1; i++) for (int j = 1; j < I+1; j++) a[i][j][I] *= (1-p0H); for (int I : targetLengthSet){ for (int i = 1; i < I+1; i++){ for (int j = 1; j < I+1; j++){ a[i][i + I][I] = p0H; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void processNextSentence(Sentence target) {\n String[] tokens = target.getTokens();\n\n //Create hash of alignments word->frequency:\n HashMap<String, Integer> counts = new HashMap<>();\n\n //Get word counts:\n for (String token : tokens) {\n if (...
[ "0.5272025", "0.5178165", "0.50690997", "0.5030475", "0.50087214", "0.49881282", "0.4909517", "0.4904974", "0.4869123", "0.48483816", "0.48482826", "0.47789308", "0.4778366", "0.47635275", "0.47507203", "0.46811622", "0.46797636", "0.46739644", "0.4672742", "0.4640406", "0.46...
0.0
-1
List a = dns.addRecord("webyoso.com"); System.out.println(a);
public static void main(String[] args) throws IOException, UnexpectedResponseException { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n\tpublic void testGetDNSList(){\r\n\t\tList<String> lst = new ArrayList<String>();\r\n\t\tlst = dnsService.getAllDNS();\r\n\t\tSystem.out.println(\"==>dns list:\");\r\n\t\tSystem.out.println(JSON.toJSONString(lst));\r\n\t}", "int insert(ProxiesPriv record);", "public Dns dns() {\n return dns;\n }"...
[ "0.60906243", "0.55099", "0.54564", "0.5413572", "0.5390873", "0.5378949", "0.5360564", "0.5335523", "0.5318576", "0.5246262", "0.524368", "0.5240542", "0.52194387", "0.520713", "0.51806337", "0.5164769", "0.5159954", "0.51592374", "0.5133174", "0.5099941", "0.50814706", "0...
0.0
-1
Divide the tours by the amount of salesmen
int[][] Naive(int m, Pointd[] points){ int[][] tours = new int[m][]; for(int i=0; i<m; i++){ if(i<points.length%m) tours[i] = new int[points.length/m+1]; else tours[i] = new int[points.length/m]; } //Select the first point, find the next closest point, find the n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculateSale()\n {\n double total = 0.00;\n int numTimbits = 0;\n int numDoughnuts = 0;\n int smallCoffee = 0;\n int mediumCoffee = 0;\n int largeCoffee = 0;\n String order;\n \n for(int i = 0; salesItem[i] != null && i < salesItem.leng...
[ "0.61698306", "0.5982623", "0.5919197", "0.578729", "0.57784605", "0.57097626", "0.5694774", "0.5659748", "0.56594706", "0.565777", "0.5653107", "0.56273025", "0.5532896", "0.5485446", "0.5423239", "0.54215044", "0.54121935", "0.5395423", "0.53914213", "0.5387629", "0.5385653...
0.0
-1
/ Save Profile Picture URI, to keep photo on system changes like rotation
@Override protected void onSaveInstanceState(@NonNull Bundle outState) { super.onSaveInstanceState(outState); // Save the image capture uri before the activity goes into background outState.putParcelable(URI_INSTANCE_STATE_KEY, mImageCaptureUri); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void saveAvatar(Bitmap avatar) {\n String strAvatarFilename = \"avatar.jpg\";\r\n try {\r\n avatar.compress(CompressFormat.JPEG,\r\n 100, openFileOutput(strAvatarFilename, MODE_PRIVATE));\r\n } catch (FileNotFoundException e) {\r\n // TODO Auto-...
[ "0.69227946", "0.69216084", "0.69109094", "0.68119925", "0.6774279", "0.67358327", "0.66026103", "0.65251523", "0.6510266", "0.64996964", "0.64920545", "0.6463725", "0.64597815", "0.64389753", "0.6421454", "0.6386446", "0.6374303", "0.63302463", "0.6325515", "0.6304443", "0.6...
0.0
-1
/ Callback for when the user clicks change button Checks user permissions If granted, launches a dialog for user to opt for camera/gallery option
public void onChangeProfilePicture(View view) { checkPermissions(); if ((ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA) == PackageManager.PERMISSION_GRANTED) && (ActivityCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onPermissionsChecked(MultiplePermissionsReport report) {\n if (report.areAllPermissionsGranted()) {\n // Toast.makeText(getApplicationContext(), \"All permissions are granted!\", Toast.LENGTH_SHORT).show();\n ...
[ "0.71626", "0.6722056", "0.6692844", "0.6670554", "0.6659172", "0.66520905", "0.66350603", "0.6616921", "0.661072", "0.6600598", "0.65840065", "0.6543759", "0.65341634", "0.65054095", "0.649865", "0.64917463", "0.6491248", "0.6485537", "0.6452248", "0.64491284", "0.6448453", ...
0.6583459
11
/ Creates Dialog for Profile Pic options 1. Camera 2. Gallery Sets onClick Event Listener
private void launchProfilePicOptions() { // pop up the dialog AlertDialog.Builder pictureOptions = new AlertDialog.Builder(this); pictureOptions.setTitle("Camera Access"); // Set up click listener, firing intents open camera DialogInterface.OnClickListener itemListener = (dialog,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void mProfileImageSelection() {\n\n final CharSequence[] options = {\"Camera\", \"Gallery\", \"Cancel\"};\n\n AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper\n (ApplicationActivity.this, R.style.AlertDialogCustom));\n\n builder.setIcon(R.m...
[ "0.7803889", "0.7653299", "0.74240226", "0.73923737", "0.7353521", "0.72095305", "0.709806", "0.709345", "0.7049066", "0.70317805", "0.6970568", "0.69683826", "0.69623744", "0.69589645", "0.683299", "0.68321544", "0.67887926", "0.672433", "0.66907007", "0.66859037", "0.667678...
0.83359087
0
/ Listens for Selected Profile Option Starts appropriate implicit intent for camera or gallery depending on option selected
private void onPhotoPickerItemSelected(int button) { switch (button) { case CAMERA_OPTION: // camera Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); // Construct temporary image path and name to save the taken // photo ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void launchProfilePicOptions() {\n // pop up the dialog\n AlertDialog.Builder pictureOptions = new AlertDialog.Builder(this);\n pictureOptions.setTitle(\"Camera Access\");\n // Set up click listener, firing intents open camera\n DialogInterface.OnClickListener itemListene...
[ "0.74564826", "0.7319642", "0.71072817", "0.7014645", "0.6910748", "0.6710088", "0.6532608", "0.64928395", "0.64417684", "0.64094305", "0.63413703", "0.63210535", "0.62688357", "0.6234797", "0.6217221", "0.6208222", "0.6198176", "0.61934197", "0.6148137", "0.61352396", "0.612...
0.0
-1
/ Creates a temp file in standard pictures directory
private File createImageFile() throws IOException { // Create an image file name String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date()); String imageFileName = "JPEG_" + timeStamp + "_"; File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private File createImageFile() throws IOException\r\n {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\r\n String imageFileName = \"MYAPPTEMP_\" + timeStamp + \"_\";\r\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY...
[ "0.7692811", "0.76224875", "0.7516448", "0.74728966", "0.74728966", "0.73881245", "0.7386143", "0.7385225", "0.7354649", "0.7341232", "0.7333131", "0.732106", "0.729638", "0.7294751", "0.7294527", "0.72929245", "0.7290869", "0.72797674", "0.725801", "0.72502154", "0.72059226"...
0.7296455
12
/ Intents: Camera, Gallery, Crop Handles these different intents by calling respective implementations of each intent handler.
@Override protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { if (resultCode != RESULT_OK) { return; } switch (requestCode) { // Camera Implementation case REQUEST_CODE_CAMERA_PERMISSION: isPhotoTaken...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void onHandleIntent(Intent intent) {\n\n\t}", "@Override\n\tprotected void onHandleIntent(Intent arg0) {\n\t\t\n\t}", "@Override\n protected void onHandleIntent(Intent intent) {\n\n }", "@Override\r\n\tpublic void onClick(int whichButton) {\n\t\tif (whichButton == 1) {\r\n\t\t\tI...
[ "0.6605003", "0.6584638", "0.6513835", "0.64707065", "0.6288079", "0.6283544", "0.6253013", "0.62174106", "0.6198972", "0.6144716", "0.608721", "0.6074484", "0.6034431", "0.60146177", "0.59825706", "0.59629637", "0.5962034", "0.5939247", "0.59262645", "0.5908954", "0.58990544...
0.0
-1
/ Populates the register form with user data and profile pic (if it exists)
private void populateProfile() { mPassword_input_layout.getEditText().setText(mSharedPreferences.getPassWord()); mEmail_input_layout.getEditText().setText(mSharedPreferences.getEmail()); mEdit_name_layout.getEditText().setText(mSharedPreferences.getName()); ((RadioButton) mRadioGender.ge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void register() {\n if (registerView.getFirstName().length() == 0 || registerView.getLastName().length() == 0 || registerView.getUsername().length() == 0 || registerView.getPassword().length() == 0) {\n IDialog invalidRegistrationDialog\n = dialogFactory.createDialog(DialogFact...
[ "0.6738965", "0.66641814", "0.6629213", "0.65418124", "0.65143085", "0.6508397", "0.6499444", "0.6464492", "0.64432496", "0.64219314", "0.6408519", "0.6394822", "0.6364928", "0.63319886", "0.6284405", "0.6243025", "0.6237692", "0.623345", "0.62171906", "0.6207629", "0.6201341...
0.6983421
0
/ Receives cropped image, and sets the ImageView
private void handleCrop(int resultCode, Intent data) { if (resultCode == RESULT_OK) { Uri uri = Crop.getOutput(data); try { Bitmap bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), uri); mImageCaptureUri = uri; mImageVie...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onCropWindowChanged() {\n Bitmap cropped = imageView.getCroppedImage();\n BitmapHelper.getInstance().setBitmap(cropped);\n bitmap=cropped;\n\n }", "protected void cropImage() {\n if (mOptions.noOutputImage) {\n ...
[ "0.7636604", "0.74877954", "0.7370178", "0.7118024", "0.7027366", "0.69888586", "0.694418", "0.68183017", "0.67594475", "0.6695373", "0.66696197", "0.66367817", "0.66153115", "0.6605814", "0.6601545", "0.6556123", "0.65391755", "0.65241486", "0.6510038", "0.6476853", "0.64446...
0.69628316
6
/ Called after User takes a photo from either the camera or the gallery. Fires of intent to crop which is handled by handleCrop()
private void beginCrop(Uri source) { // pass URI as intent to the CROP Activity; if (mPhotoFile != null) { Uri destination = FileProvider.getUriForFile(this, BuildConfig.APPLICATION_ID, mPhotoFile); Log.d(TAG, "URI: " + destination.toStrin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void performCrop() {\n try {\r\n //call the standard crop action intent (the user device may not support it)\r\n Intent cropIntent = new Intent(\"com.android.camera.action.CROP\");\r\n //indicate image type and Uri\r\n cropIntent.setDataAndType(picUri, \"i...
[ "0.76713896", "0.7589638", "0.74949944", "0.74915546", "0.7413037", "0.7226633", "0.7134638", "0.7104961", "0.7089832", "0.708791", "0.7078643", "0.70741", "0.70178884", "0.6982125", "0.69166905", "0.6882256", "0.68773264", "0.68762726", "0.6869225", "0.6815287", "0.6814749",...
0.64603764
37
/ Ensures image is adjusted appropriately and returns a bitMap with correct orientation
private Bitmap imageOrientationValidator(File mPhotoFile) { if (mPhotoFile == null) { return null; } ExifInterface ei; try { Bitmap bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), FileProvider.getUriForFile(this, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long getCollideBits();", "private Bitmap decodeMapBitmap() {\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = false;\n options.inScaled = false;\n options.outWidth = 2048;\n options.outHeight = 2048;\n\n return BitmapFactory.d...
[ "0.5810098", "0.5785507", "0.57103664", "0.56774664", "0.5638965", "0.5622463", "0.56188977", "0.5597718", "0.5550749", "0.55379343", "0.54849", "0.5450315", "0.54388535", "0.5417856", "0.54088986", "0.54079646", "0.5368332", "0.536366", "0.53113264", "0.5299976", "0.529316",...
0.0
-1
/ Rotates the Camera image depending on the current orientation
private Bitmap rotateImage(Bitmap source, float angle) { Matrix matrix = new Matrix(); matrix.postRotate(angle); return Bitmap.createBitmap(source, 0, 0, source.getWidth(), source.getHeight(), matrix, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int setCameraImageDisplayOrientation(Activity activity,\n int cameraId, android.hardware.Camera camera) {\n android.hardware.Camera.CameraInfo info =\n new android.hardware.Camera.CameraInfo();\n android.hardware.Cam...
[ "0.6895477", "0.68123883", "0.67217785", "0.652594", "0.6520674", "0.65022707", "0.64647454", "0.6435266", "0.63425934", "0.62962055", "0.6290968", "0.62759465", "0.6266677", "0.6216718", "0.61832654", "0.61825895", "0.61347175", "0.6124532", "0.6120666", "0.6114924", "0.6103...
0.5691433
83
/ Check if the user already granted permissions Proceed if already granted else request for permissions Permissions Requested: CAMERA and EXTERNAL STORAGE
private void checkPermissions() { // if permissions are not granted for camera, and external storage, request for them if ((ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) || (ActivityCompat.checkSelfPermission(th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void requestPermissionsIfNeeded() {\n ArrayList<String> requiredPermissions = new ArrayList<String>();\n checkIfPermissionGranted(requiredPermissions, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n checkIfPermissionGranted(requiredPermissions, Manifest.permission.CAMERA);\n\n if(...
[ "0.7891401", "0.77896726", "0.75898474", "0.7572568", "0.7563113", "0.75379527", "0.75122434", "0.7410028", "0.7397783", "0.73843414", "0.7360273", "0.7352723", "0.73085904", "0.7277879", "0.7275651", "0.7272031", "0.72613716", "0.72481215", "0.7218831", "0.72071046", "0.7197...
0.7575203
3
/ Called when the user responds to permission request On first denial, we show rationale dialog, and offer another chance Proceed to request again if rationale is considered, else don't request again
@Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { if (requestCode == REQUEST_CODE_CAMERA_PERMISSION) { // if permissions are granted, launch camera // If request is cancelled, the result arrays are empty. ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showRequestPermissionRationaleDialog(){\n new AlertDialog.Builder(this)\n .setMessage(\"Permissions needed to use application features.\")\n .setPositiveButton(\"Allow\", new DialogInterface.OnClickListener() {\n @Override\n pu...
[ "0.72314334", "0.6894941", "0.6871447", "0.6731372", "0.66997606", "0.66430455", "0.6584919", "0.64769334", "0.6414254", "0.6359122", "0.63403636", "0.6305597", "0.61843795", "0.61647505", "0.6151745", "0.6106317", "0.60632855", "0.5999067", "0.5950722", "0.5950722", "0.59316...
0.0
-1
handles cases when back button or register button is clicked
@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: finish(); return true; case R.id.register_action: saveRegistration(); case R.id.save_profile_action: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void backButton() {\n\t\t\r\n\t}", "void onGoBackButtonClick();", "@Override\n\tpublic void backButton() {\n\n\t}", "void onUpOrBackClick();", "@Override\n public void backButton() {\n\n\n }", "@Override\n public void onBackPressed() {\n changeForm(R.id.btnSignInForm...
[ "0.7722142", "0.7575853", "0.7550105", "0.7440948", "0.74288166", "0.74123937", "0.73581", "0.7324434", "0.7310137", "0.7310137", "0.72704417", "0.72652954", "0.7231262", "0.7210458", "0.7191993", "0.71731", "0.71665114", "0.7147148", "0.7140302", "0.7130726", "0.70940894", ...
0.0
-1
/ Different Options depending on the entry point to the RegisterActivity. if previous Activity was the SignIn Activity Inflate action bar with register option else inflate with save option if previous Activity was MainActivity
@Override public boolean onCreateOptionsMenu(Menu menu) { if (entryPoint != null) { switch (entryPoint.getStringExtra(SOURCE)) { case MainActivity.ACTIVITY_NAME: getMenuInflater().inflate(R.menu.save_edit_profile, menu); break; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void register() {\n Intent intent = new Intent(LoginActivity.this, RegisterActivity.class);\n startActivity(intent);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_CODE_REGISTER) {\n if ...
[ "0.6330673", "0.61882323", "0.6187986", "0.6054669", "0.5985511", "0.5970339", "0.5966508", "0.59462464", "0.59000945", "0.5865967", "0.5845792", "0.5807655", "0.57632524", "0.574982", "0.572616", "0.57130456", "0.57048905", "0.5660804", "0.5655304", "0.5652746", "0.56295675"...
0.0
-1
/ Called when register button is clicked to register user and returns to LoginActivity Called when save button is clicked to save edited profile and returns to MainActivity The user is prompted to signIn if password is changed.
private void saveRegistration() { if (hasCorrectDetails()) { if (entryPoint != null) { switch (entryPoint.getStringExtra(SOURCE)) { case MainActivity.ACTIVITY_NAME: // Check any change in password? We know mPassword is never null since it's...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onRegisterPressed(View v) {\n String username = ((EditText) findViewById(R.id.usernameNew)).getText().toString();\n String password = ((EditText) findViewById(R.id.passwordNew)).getText().toString();\n String checkPassword = ((EditText) findViewById(R.id.passwordNew2)).getText().to...
[ "0.78739965", "0.73703045", "0.73049176", "0.7183204", "0.71689945", "0.71567744", "0.7145225", "0.7099819", "0.7086519", "0.70782804", "0.7032898", "0.69790953", "0.6955874", "0.69547534", "0.6928767", "0.69169164", "0.69077235", "0.68597007", "0.68361783", "0.68152857", "0....
0.7686774
1
/ Called after user has correctly entered profile details First, clears Shared Preferences storage, no previous records kept Saves userData, and stores profile (if it exists) in local storage with static filename
private void saveUserData() { mSharedPreferences.clearProfile(); mSharedPreferences.setName(mName); mSharedPreferences.setEmail(mEmail); mSharedPreferences.setGender(mGender); mSharedPreferences.setPassWord(mPassword); mSharedPreferences.setYearGroup(mYearGroup); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void restoringDataProfile() {\n mSharedPreferences = getSharedPreferences(Constants.PROFILE_NAME, MODE_PRIVATE);\n avatar = mSharedPreferences.getString(Constants.EDIT_PROFILE_PREFERENCES_KEY_PICTURE_PROFILE, \"\");\n Bitmap savingAvatar = AppSingleton.decodeBase64(avatar);\n if...
[ "0.755908", "0.7339684", "0.71780527", "0.7152512", "0.70796525", "0.6860665", "0.6856087", "0.6839085", "0.68258953", "0.68245006", "0.67772233", "0.67709374", "0.67572564", "0.672215", "0.67107373", "0.66811496", "0.66671705", "0.6654968", "0.66512626", "0.664074", "0.66287...
0.7517399
1
/ Checks if registration details are okay Required Fields: Name, Email, Password (6 or more characters)
private boolean hasCorrectDetails() { // set any error to null mEdit_name_layout.setError(null); mEmail_input_layout.setError(null); mPassword_input_layout.setError(null); View focusView = null; boolean cancel = false; // grab data from views mPassword =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkRegistationValidation() {\r\n\t\tUtility.hideKeyBoard(this);\r\n\t\tif (firstName.getText().toString().length() == 0\r\n\t\t\t\t&& lastName.getText().toString().length() == 0\r\n\t\t\t\t&& emailAddress.getText().toString().length() == 0\r\n\t\t\t\t&& password.getText().toString().length() == 0\r\...
[ "0.76323533", "0.72564024", "0.72434336", "0.72235155", "0.7165111", "0.7062634", "0.7052285", "0.7017524", "0.69832647", "0.6959268", "0.6950979", "0.6927708", "0.6883665", "0.68607026", "0.6858695", "0.6844028", "0.6843319", "0.6842657", "0.67974645", "0.67865986", "0.67730...
0.0
-1
/ Checks if email is valid: A valid email is nonempty and matches email pattern
private boolean isEmailValid(String email) { boolean valid = true; String emailPattern = "[a-zA-Z0-9._-]+@[a-z]+\\.+[a-z]+"; if (TextUtils.isEmpty(email)) { mEmail_input_layout.setError(getString(R.string.error_field_required)); valid = false; } else if (!email.ma...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isEmailValid(String email) {\n if(Patterns.EMAIL_ADDRESS.matcher(email).matches()){\n\n return true;\n }else {\n return false;\n }\n// return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return true;\r\n ...
[ "0.8358657", "0.8291124", "0.8191034", "0.8191034", "0.8191034", "0.8191034", "0.815499", "0.8072022", "0.8042685", "0.80397075", "0.80397075", "0.8038875", "0.80348045", "0.80184096", "0.79971695", "0.7979701", "0.7979701", "0.7979701", "0.7979701", "0.79261243", "0.79100794...
0.75227386
79
/ Checks if passowrd is valid: A valid password is nonempty and has at least 6 characters
private boolean isPasswordValid(String password) { boolean valid = true; if (TextUtils.isEmpty(password)) { mPassword_input_layout.setError(getString(R.string.error_field_required)); valid = false; } else if (password.length() < 6) { mPassword_input_layout.set...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isValidPassword(String pass) {\n if (pass != null && pass.length() >= 6) {\n return true;\n }\n return false;\n }", "private boolean isPasswordValid(String password) {\n return password.length() > 6;\n }", "private boolean isPasswordValid(String pass...
[ "0.8407694", "0.8341524", "0.8341524", "0.83044994", "0.80265015", "0.80265015", "0.80265015", "0.7976184", "0.7938573", "0.79327196", "0.79327196", "0.79327196", "0.79327196", "0.79327196", "0.79327196", "0.79327196", "0.79327196", "0.79327196", "0.79327196", "0.79327196", "...
0.7340858
51
/ Impose a slight delay to prevent resource exhaustion if the user madly toggles.
public void handleEvent(Event e) { mWindow.getDisplay().timerExec(500, mToggleUPnPEvent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void delay() {\n\ttry {\n\t\tThread.sleep(500);\n\t} catch (InterruptedException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\t\n\t}", "private void emulateDelay() {\n try {\n Thread.sleep(700);\n } catch (InterruptedException e) {\n e.pr...
[ "0.6968177", "0.6932847", "0.6748838", "0.6623706", "0.660395", "0.6522829", "0.65221417", "0.6513513", "0.6471069", "0.64330345", "0.633719", "0.6327922", "0.63179", "0.6317261", "0.6276785", "0.6273068", "0.62522066", "0.6246238", "0.62274283", "0.6178025", "0.6174005", "...
0.0
-1
/ We will be notified when the state changes to update the UI.
public void run() { if (mUseUPnP.getSelection()) UPnPService.getInstance().enableUPnP(); else UPnPService.getInstance().disableUPnP(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void stateChanged() {\n\t\t\n\t}", "protected void stateChanged() {\r\n\t\tsetChanged();\r\n\t\tnotifyObservers();\r\n\t}", "@Override\r\n public void updateUI() {\r\n }", "public void updateUI(){}", "@Override\n public void updateUi() {\n\n }", "@Override\n pub...
[ "0.797101", "0.7793002", "0.7652623", "0.7539492", "0.7521645", "0.7521645", "0.7521645", "0.7407166", "0.7362268", "0.7351578", "0.73315835", "0.73103684", "0.7263837", "0.72012967", "0.7127206", "0.7097398", "0.7057436", "0.7035083", "0.70263237", "0.70263237", "0.6993062",...
0.0
-1
This will get the left subtree first
@Override public E next() { while (curr != null) { stack.push(curr); curr = curr.getLeft(); } curr = stack.pop(); TreeNode<E> out = curr; curr = curr.getRight(); return out.getData(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TreeNode<T> getLeft();", "protected void visitLeftSubtree() {\n\t\tif(tree.hasLeftNode()) {\n\t\t\ttree.moveToLeftNode();\n\t\t\ttraverse();\n\t\t\ttree.moveToParentNode();\n\t\t}\n\t}", "public BinaryTreeNode getLeftChild() { \n\t\t\treturn null;\n\t\t}", "public HuffmanNode getLeftSubtree () {\n \tretur...
[ "0.79940164", "0.77179724", "0.76780784", "0.7596463", "0.75481224", "0.75343007", "0.74675256", "0.7452117", "0.7446684", "0.74117017", "0.74020714", "0.7396588", "0.7320738", "0.7284673", "0.72805107", "0.7276904", "0.7257256", "0.7257256", "0.7257256", "0.7257256", "0.7256...
0.0
-1