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
Retrieves information regarding the specified triggers or all existing triggers currently active.
public ShowTriggersResponse showTriggers(ShowTriggersRequest request) throws GPUdbException { ShowTriggersResponse actualResponse_ = new ShowTriggersResponse(); submitRequest("/show/triggers", request, actualResponse_, false); return actualResponse_; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Trigger> getActiveTriggers() {\n return activeTriggers;\n }", "public List<Trigger> getTriggers();", "public abstract Map<String, Trigger> getTriggers();", "ETriggers getTriggers();", "Collection<ITrigger> getTriggers();", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(...
[ "0.71706396", "0.6991455", "0.6917351", "0.6761288", "0.665414", "0.6367226", "0.63599354", "0.6123053", "0.5994576", "0.59560907", "0.59292597", "0.5911691", "0.55826235", "0.55648404", "0.5553865", "0.55321944", "0.5503092", "0.5488091", "0.54381496", "0.5384357", "0.53401"...
0.6285926
7
Retrieves information regarding the specified triggers or all existing triggers currently active.
public ShowTriggersResponse showTriggers(List<String> triggerIds, Map<String, String> options) throws GPUdbException { ShowTriggersRequest actualRequest_ = new ShowTriggersRequest(triggerIds, options); ShowTriggersResponse actualResponse_ = new ShowTriggersResponse(); submitRequest("/show/triggers", actualRequest_, actualResponse_, false); return actualResponse_; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Trigger> getActiveTriggers() {\n return activeTriggers;\n }", "public List<Trigger> getTriggers();", "public abstract Map<String, Trigger> getTriggers();", "ETriggers getTriggers();", "Collection<ITrigger> getTriggers();", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(...
[ "0.71706396", "0.6991455", "0.6917351", "0.6761288", "0.665414", "0.6367226", "0.63599354", "0.6285926", "0.6123053", "0.5994576", "0.59560907", "0.5911691", "0.55826235", "0.55648404", "0.5553865", "0.55321944", "0.5503092", "0.5488091", "0.54381496", "0.5384357", "0.53401",...
0.59292597
11
Retrieves information for the specified data type. Given a type ID, the database returns the data type schema, the label, and the semantic type along with the type ID. If the user provides any combination of label and semantic type, then the database returns the pertinent information for all data types that match the input criteria.
public ShowTypesResponse showTypes(ShowTypesRequest request) throws GPUdbException { ShowTypesResponse actualResponse_ = new ShowTypesResponse(); submitRequest("/show/types", request, actualResponse_, false); for (int i_ = 0; i_ < actualResponse_.getTypeIds().size(); i_++) { setTypeDescriptorIfMissing(actualResponse_.getTypeIds().get(i_), actualResponse_.getLabels().get(i_), actualResponse_.getTypeSchemas().get(i_), actualResponse_.getProperties().get(i_)); } return actualResponse_; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "com.google.cloud.datacatalog.FieldTypeOrBuilder getTypeOrBuilder();", "java.lang.String getDataType();", "com.google.cloud.datacatalog.FieldType getType();", "public static DataType get(String type)\n {\n return lookup.get(type);\n }", "public BikeType getType(int typeId){\n ...
[ "0.5797944", "0.57595515", "0.5725118", "0.5678109", "0.5632479", "0.5463933", "0.5342219", "0.52763885", "0.5263938", "0.52619433", "0.52608615", "0.52554715", "0.52548313", "0.5253123", "0.52476436", "0.5236058", "0.52076817", "0.5196217", "0.51954305", "0.51933205", "0.517...
0.0
-1
When i use the "implements" keyword, I am saying i agree that i am responsible for implementing all the methods presenting in "bankingClient" interface. this class is responsible. it is an agreement. Hover over red line on developing and implement all the classes to this class. One class can implement more that one interface.
public static void main(String[] args) { developing d = new developing();// The return type is developing, so i will get all the methods from developing. BankingClient dr = new developing(); //I changed the return type to "BankingClient" So now "dr" is responsible for calling all the methods in "BankingClient". I will not get "MyExtraMethod" when //I call methods with "dr" object. This is called Runtime polymorphisim. DomainClient ds = new developing();//Client is only interested in DomainClient methods that were implemented in this class which has multiple interfaces implemented. Well //changed the return type to DomainClient and client is able to access only methods dealing with DomainClient // Polymorphisim - you can only call particular methods in a particular interface. //DomainClient ds = d; ds.investment(); ds.noninvesters(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "interface AccountInterface{\n\tabstract void deposit();\n\tvoid withdraw();\n\tvoid roi();\n}", "public interface Service {\r\n\t\r\n\t public Customer createAccount(Customer c) \r\n\t\t\t throws InvalidInputException; \r\n\t public Customer getBalance(String mobile) \r\n\t\t\t throws AccountNotFoundException, I...
[ "0.70246005", "0.70053774", "0.70011854", "0.6968478", "0.695507", "0.6899338", "0.6852639", "0.6825266", "0.6724968", "0.6724591", "0.67093986", "0.6676843", "0.66540676", "0.66075", "0.65805215", "0.6565237", "0.6563563", "0.65573543", "0.6521575", "0.651874", "0.64677304",...
0.0
-1
I can't access this method with 'bankingClient" as the return type.
public void myExtraMethod_login() { System.out.println("this is my method that i added to this class and not from interface. This is login"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "shared.data.Bank getBank();", "List<Client> getAllClients(Bank bankId);", "IBank getBank(int rekeningNr) throws RemoteException;", "public Bank getBank() {\r\n return bank;\r\n }", "public String getBankAccountType();", "Databank getBank();", "public static Bank getBank() {\n return B...
[ "0.678869", "0.66772866", "0.6641033", "0.65972203", "0.6562219", "0.6537725", "0.6492935", "0.63247776", "0.63247776", "0.63237065", "0.6303493", "0.62598974", "0.62533104", "0.62264943", "0.62233466", "0.6098607", "0.60930973", "0.60848683", "0.6070428", "0.60578895", "0.60...
0.0
-1
TODO Autogenerated method stub
@Override public void investment() { }
{ "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 noninvesters() { }
{ "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
Test of getWords method, of class DollarsToWords.
@Test public void testGetWordsAsDouble() { System.out.println("getWords"); DollarsToWords instance = new DollarsToWords(2523.04); String expResult = "Two thousand five hundred twenty-three and 04/100 dollars"; String result = instance.getWords(); assertEquals(expResult, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",...
[ "0.82500106", "0.81902176", "0.8175638", "0.8163545", "0.8124168", "0.80687416", "0.8041891", "0.8014486", "0.79933214", "0.79695207", "0.77852094", "0.77209365", "0.7660729", "0.762471", "0.75890666", "0.6959958", "0.65079635", "0.5891826", "0.5867252", "0.5850185", "0.58378...
0.7778645
11
Test of getWords method, of class DollarsToWords.
@Test public void testGetWordsAsString() { System.out.println("getWords"); DollarsToWords instance = new DollarsToWords("2523.04"); String expResult = "Two thousand five hundred twenty-three and 04/100 dollars"; String result = instance.getWords(); assertEquals(expResult, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",...
[ "0.82500106", "0.81902176", "0.8175638", "0.8163545", "0.8124168", "0.8041891", "0.8014486", "0.79933214", "0.79695207", "0.77852094", "0.7778645", "0.77209365", "0.7660729", "0.762471", "0.75890666", "0.6959958", "0.65079635", "0.5891826", "0.5867252", "0.5850185", "0.583789...
0.80687416
5
Test of getWords method, of class DollarsToWords.
@Test public void testGetWordsBillion() { System.out.println("getWords"); DollarsToWords instance = new DollarsToWords("1233444253.04"); String expResult = "One billion two hundred thirty-three million four hundred forty-four thousand two hundred fifty-three and 04/100 dollars"; String result = instance.getWords(); assertEquals(expResult, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",...
[ "0.82500106", "0.81902176", "0.8175638", "0.8163545", "0.8124168", "0.80687416", "0.8014486", "0.79933214", "0.79695207", "0.77852094", "0.7778645", "0.77209365", "0.7660729", "0.762471", "0.75890666", "0.6959958", "0.65079635", "0.5891826", "0.5867252", "0.5850185", "0.58378...
0.8041891
6
Test of getWords method, of class DollarsToWords.
@Test public void testGetWordsBillionMilTeens() { System.out.println("getWords"); DollarsToWords instance = new DollarsToWords("1018000000.05"); String expResult = "One billion eighteen million and 05/100 dollars"; String result = instance.getWords(); assertEquals(expResult, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",...
[ "0.82500106", "0.81902176", "0.8175638", "0.8163545", "0.80687416", "0.8041891", "0.8014486", "0.79933214", "0.79695207", "0.77852094", "0.7778645", "0.77209365", "0.7660729", "0.762471", "0.75890666", "0.6959958", "0.65079635", "0.5891826", "0.5867252", "0.5850185", "0.58378...
0.8124168
4
Test of getWords method, of class DollarsToWords.
@Test public void testGetWordsMillions() { System.out.println("getWords"); DollarsToWords instance = new DollarsToWords("5000000.05"); String expResult = "Five million and 05/100 dollars"; String result = instance.getWords(); assertEquals(expResult, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",...
[ "0.82500106", "0.81902176", "0.8175638", "0.8163545", "0.8124168", "0.80687416", "0.8041891", "0.8014486", "0.79933214", "0.79695207", "0.77852094", "0.7778645", "0.7660729", "0.762471", "0.75890666", "0.6959958", "0.65079635", "0.5891826", "0.5867252", "0.5850185", "0.583789...
0.77209365
12
Test of getWords method, of class DollarsToWords.
@Test public void testGetWordsThousands() { System.out.println("getWords"); DollarsToWords instance = new DollarsToWords("428030.16"); String expResult = "Four hundred twenty-eight thousand thirty and 16/100 dollars"; String result = instance.getWords(); assertEquals(expResult, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",...
[ "0.82500106", "0.8175638", "0.8163545", "0.8124168", "0.80687416", "0.8041891", "0.8014486", "0.79933214", "0.79695207", "0.77852094", "0.7778645", "0.77209365", "0.7660729", "0.762471", "0.75890666", "0.6959958", "0.65079635", "0.5891826", "0.5867252", "0.5850185", "0.583789...
0.81902176
1
Test of getWords method, of class DollarsToWords.
@Test public void testGetWordsHundreds() { System.out.println("getWords"); DollarsToWords instance = new DollarsToWords("46.00"); String expResult = "Forty-six and 00/100 dollars"; String result = instance.getWords(); assertEquals(expResult, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetWordsThousands() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"428030.16\");\n String expResult = \"Four hundred twenty-eight thousand thirty and 16/100 dollars\";\n String result = instance.getWords();\n asse...
[ "0.81902176", "0.8175638", "0.8163545", "0.8124168", "0.80687416", "0.8041891", "0.8014486", "0.79933214", "0.79695207", "0.77852094", "0.7778645", "0.77209365", "0.7660729", "0.762471", "0.75890666", "0.6959958", "0.65079635", "0.5891826", "0.5867252", "0.5850185", "0.583789...
0.82500106
0
Test of getWords method, of class DollarsToWords.
@Test public void testGetWordsEmpty() { System.out.println("getWords"); DollarsToWords instance = new DollarsToWords(""); String expResult = "Zero and 00/100 dollars"; String result = instance.getWords(); assertEquals(expResult, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",...
[ "0.82500106", "0.81902176", "0.8175638", "0.8163545", "0.8124168", "0.80687416", "0.8041891", "0.79933214", "0.79695207", "0.77852094", "0.7778645", "0.77209365", "0.7660729", "0.762471", "0.75890666", "0.6959958", "0.65079635", "0.5891826", "0.5867252", "0.5850185", "0.58378...
0.8014486
7
Test of getWords method, of class DollarsToWords.
@Test public void testGetWordsNull() { System.out.println("getWords"); String input=null; DollarsToWords instance = new DollarsToWords(input); String expResult = "Zero and 00/100 dollars"; String result = instance.getWords(); assertEquals(expResult, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",...
[ "0.82500106", "0.81902176", "0.8175638", "0.8163545", "0.8124168", "0.80687416", "0.8041891", "0.8014486", "0.79933214", "0.79695207", "0.77852094", "0.7778645", "0.77209365", "0.7660729", "0.75890666", "0.6959958", "0.65079635", "0.5891826", "0.5867252", "0.5850185", "0.5837...
0.762471
14
Test of getWords method, of class DollarsToWords.
@Test public void testGetWordsJustDecimal() { System.out.println("getWords"); DollarsToWords instance = new DollarsToWords("."); String expResult = "Zero and 00/100 dollars"; String result = instance.getWords(); assertEquals(expResult, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",...
[ "0.82500106", "0.81902176", "0.8175638", "0.8163545", "0.8124168", "0.80687416", "0.8041891", "0.8014486", "0.79933214", "0.77852094", "0.7778645", "0.77209365", "0.7660729", "0.762471", "0.75890666", "0.6959958", "0.65079635", "0.5891826", "0.5867252", "0.5850185", "0.583789...
0.79695207
9
Test of getWords method, of class DollarsToWords.
@Test public void testGetWordsZero() { System.out.println("getWords"); DollarsToWords instance = new DollarsToWords("0"); String expResult = "Zero and 00/100 dollars"; String result = instance.getWords(); assertEquals(expResult, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",...
[ "0.82500106", "0.81902176", "0.8175638", "0.8163545", "0.8124168", "0.80687416", "0.8041891", "0.8014486", "0.79933214", "0.79695207", "0.77852094", "0.7778645", "0.77209365", "0.762471", "0.75890666", "0.6959958", "0.65079635", "0.5891826", "0.5867252", "0.5850185", "0.58378...
0.7660729
13
Test of getWords method, of class DollarsToWords.
@Test public void testGetWordsZeroDot() { System.out.println("getWords"); DollarsToWords instance = new DollarsToWords("0."); String expResult = "Zero and 00/100 dollars"; String result = instance.getWords(); assertEquals(expResult, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",...
[ "0.82500106", "0.81902176", "0.8175638", "0.8163545", "0.8124168", "0.80687416", "0.8041891", "0.8014486", "0.79933214", "0.79695207", "0.7778645", "0.77209365", "0.7660729", "0.762471", "0.75890666", "0.6959958", "0.65079635", "0.5891826", "0.5867252", "0.5850185", "0.583789...
0.77852094
10
Test of getWords method, of class DollarsToWords.
@Test public void testGetWordsDotZero() { System.out.println("getWords"); DollarsToWords instance = new DollarsToWords(".0"); String expResult = "Zero and 00/100 dollars"; String result = instance.getWords(); assertEquals(expResult, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",...
[ "0.82500106", "0.81902176", "0.8175638", "0.8163545", "0.8124168", "0.80687416", "0.8041891", "0.8014486", "0.79933214", "0.79695207", "0.77852094", "0.7778645", "0.77209365", "0.7660729", "0.762471", "0.6959958", "0.65079635", "0.5891826", "0.5867252", "0.5850185", "0.583789...
0.75890666
15
Test of getWords method, of class DollarsToWords.
@Test public void testGetWordsOverBillion() { System.out.println("getWords"); DollarsToWords instance = new DollarsToWords("2123456789123"); String expResult = "Zero and 00/100 dollars"; String result = instance.getWords(); assertEquals(expResult, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",...
[ "0.82500106", "0.81902176", "0.8163545", "0.8124168", "0.80687416", "0.8041891", "0.8014486", "0.79933214", "0.79695207", "0.77852094", "0.7778645", "0.77209365", "0.7660729", "0.762471", "0.75890666", "0.6959958", "0.65079635", "0.5891826", "0.5867252", "0.5850185", "0.58378...
0.8175638
2
Test of getWords method, of class DollarsToWords.
@Test public void testGetWordsOverBillionDecimal() { System.out.println("getWords"); DollarsToWords instance = new DollarsToWords(2e24); String expResult = "Zero and 00/100 dollars"; String result = instance.getWords(); assertEquals(expResult, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",...
[ "0.82500106", "0.81902176", "0.8175638", "0.8163545", "0.8124168", "0.80687416", "0.8041891", "0.8014486", "0.79695207", "0.77852094", "0.7778645", "0.77209365", "0.7660729", "0.762471", "0.75890666", "0.6959958", "0.65079635", "0.5891826", "0.5867252", "0.5850185", "0.583789...
0.79933214
8
Test of getWords method, of class DollarsToWords.
@Test public void testGetWordsNoFraction() { System.out.println("getWords"); DollarsToWords instance = new DollarsToWords("458"); String expResult = "Four hundred fifty-eight and 00/100 dollars"; String result = instance.getWords(); assertEquals(expResult, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",...
[ "0.82500106", "0.81902176", "0.8175638", "0.8124168", "0.80687416", "0.8041891", "0.8014486", "0.79933214", "0.79695207", "0.77852094", "0.7778645", "0.77209365", "0.7660729", "0.762471", "0.75890666", "0.6959958", "0.65079635", "0.5891826", "0.5867252", "0.5850185", "0.58378...
0.8163545
3
transform a pluginBase of form /my/plugin/path/ to my/plugin/path
private String formatServletRoute(String pluginBase, String servletRelative) { if (pluginBase.startsWith("/")) { pluginBase = pluginBase.substring(1); } if (pluginBase.endsWith("/")) { pluginBase = pluginBase.substring(0, pluginBase.length() - 1); } if (servletRelative == null || servletRelative.isEmpty()) { return String.format("/%s/", pluginBase); } if (servletRelative.startsWith("/")) { servletRelative = servletRelative.substring(1); } if (servletRelative.endsWith("/")) { servletRelative = servletRelative.substring(0, servletRelative.length() - 1); } return String.format(ROUTE_REGEX, pluginBase, servletRelative); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addPlugin(BaseComponentPlugin baseComponent);", "private static URL findPluginBaseWithoutLoadingPlugin(Plugin plugin) {\r\n \ttry {\r\n \t\tURL url = plugin.getClass().getResource(\".\");\r\n \t\ttry {\r\n \t\t\t// Plugin test with OSGi plugin need to resolve bundle resource\r\n\t\t\t\turl = Fil...
[ "0.5775518", "0.54485714", "0.52432775", "0.5166743", "0.5135268", "0.5031496", "0.50280374", "0.49607596", "0.49528167", "0.4936063", "0.48140913", "0.4734469", "0.4715251", "0.4702402", "0.46896186", "0.4681995", "0.4640018", "0.46042877", "0.46017694", "0.45912156", "0.458...
0.4919463
10
////////////////// C T O R //////////////////////////// Ctor for a new player.
public Player(final double xCoordinate, final double yCoordinate, final double playerVelocity) { super(xCoordinate, yCoordinate, PLAYER_SIZE, playerVelocity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Player() {\t\n\t}", "public Player(){}", "public Player(){}", "public Player() {}", "public Player() {}", "public Player() {}", "public Player() {}", "public Player(){\r\n\r\n }", "public Player(){\n\n }", "public Player() {\n this(\"\", \"\", \"\");\n }", "public Abstrac...
[ "0.8601457", "0.85643995", "0.85643995", "0.8528397", "0.8528397", "0.8528397", "0.8528397", "0.83868885", "0.8327934", "0.82089716", "0.80616623", "0.80435383", "0.7942426", "0.79293156", "0.7918455", "0.7878765", "0.78420466", "0.782828", "0.77534693", "0.773869", "0.773460...
0.0
-1
Method sets a new Target.
public void setDestination(final double xCoord, final double yCoord) { super.setDestination(new Target(xCoord, yCoord)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void setTarget(Object arg0) {\n\t\tdefaultEdgle.setTarget(arg0);\n\t}", "public void setTarget(Object method)\n {\n __m_Target = method;\n }", "void setTarget(java.lang.String target);", "public void setTarget(Target target) {\n\t\tthis.target = target;\n\...
[ "0.7605871", "0.75738865", "0.75085187", "0.7481662", "0.7355186", "0.7185884", "0.71332544", "0.71236175", "0.7036361", "0.70333356", "0.70069385", "0.69422925", "0.6938051", "0.6923577", "0.69057816", "0.68484974", "0.68203515", "0.67851204", "0.67434585", "0.6734945", "0.6...
0.0
-1
Constructs a MatchBot to operate on the last numTweets of the given user.
public MatchBot(String user, int numTweets) { super(user, numTweets); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Twitter() {\n\t\t\tuserMap = new HashMap<>();\n\t\t\tmaxFeed = 10;\n\t\t}", "public Twitter() {\n size = 0;\n users = new ArrayList<>();\n }", "@Override\n public void run() {\n try {\n\n try {\n mLastLocation = Locatio...
[ "0.5658242", "0.54879326", "0.5301281", "0.52596146", "0.5193131", "0.5151462", "0.51365495", "0.5132681", "0.5015023", "0.49969223", "0.49594033", "0.49423075", "0.49096698", "0.49021816", "0.4874559", "0.48718235", "0.48664445", "0.48653713", "0.4848079", "0.48358098", "0.4...
0.79076797
0
TODO Employs the KMP string matching algorithm to add all tweets containing the given pattern to the provided list. Returns the total number of character comparisons performed.
public int searchTweetsKMP(String pattern, List<String> ans) { int compCost = 0; Assoc<Integer, Integer> holder; int[] flinks = new int[pattern.length() + 1]; int flinkcost = StringMatch.buildKMP(pattern, flinks); compCost = flinkcost; for(String tweet : tweets) { //holder = StringMatch.matchKMP(pattern, tweet); holder = StringMatch.matchKMP(pattern.toLowerCase(), tweet.toLowerCase()); compCost += holder.value - flinkcost; if(holder.key != -1) ans.add(tweet); } return compCost; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static long count (List<String> lst, String pattern) {\n\t\t\n\t\tlong cpt = 0;\n\t\tfor(String st : lst) {\n\t\t\tif(st.equals(pattern)) {\n\t\t\t//if(st.contains(pattern)) {\n\t\t\t\tcpt++;\n\t\t\t}\n\t\t}\n\t\treturn cpt;\n\t\n\t}", "public int searchTweetsNaive(String pattern, List<String> ans) {\n ...
[ "0.71703166", "0.70636773", "0.69060814", "0.6843461", "0.63700926", "0.59935635", "0.5889226", "0.588771", "0.56987745", "0.56978726", "0.56641513", "0.5631968", "0.5626956", "0.5613795", "0.56085926", "0.55682826", "0.5536186", "0.5510514", "0.55062044", "0.5505006", "0.548...
0.7591383
0
TODO Employs the naive string matching algorithm to add all tweets containing the given pattern to the provided list. Returns the total number of character comparisons performed.
public int searchTweetsNaive(String pattern, List<String> ans) { int compCost = 0; Assoc<Integer, Integer> holder; for(String tweet : tweets) { holder = StringMatch.matchNaive(pattern.toLowerCase(), tweet.toLowerCase()); compCost += holder.value; if(holder.key != -1) ans.add(tweet); } return compCost; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static long count (List<String> lst, String pattern) {\n\t\t\n\t\tlong cpt = 0;\n\t\tfor(String st : lst) {\n\t\t\tif(st.equals(pattern)) {\n\t\t\t//if(st.contains(pattern)) {\n\t\t\t\tcpt++;\n\t\t\t}\n\t\t}\n\t\treturn cpt;\n\t\n\t}", "public static long count2(List<String> lst, String pattern) {\n\n\t\t...
[ "0.7245107", "0.70011026", "0.6951954", "0.6732717", "0.63403374", "0.565684", "0.56560093", "0.56514925", "0.55672157", "0.5555711", "0.55265796", "0.548846", "0.5481259", "0.54673004", "0.545393", "0.54498947", "0.54458076", "0.54408246", "0.5435939", "0.5418132", "0.539970...
0.71001
1
Now, do something similar to the above, but for the BoyerMoore matching algorithm. Use your results to write your REPORT, as described in the comment at the top of this file.
public int searchTweetsBoyerMoore(String pattern, List<String> ans) { int compCost = 0; Assoc<Integer, Integer> holder; for(String tweet : tweets) { holder = StringMatch.matchBoyerMoore(pattern.toLowerCase(), tweet.toLowerCase()); compCost += holder.value; if(holder.key != -1) ans.add(tweet); } return compCost; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) throws IOException {\n if (args.length != 1) {\n System.err.println(\"Must provide a file to read from.\");\n } else { \n ArrayList<MatchPerson> allPeople = new ArrayList<MatchPerson>();\n ArrayList<MatchPerson> gayMalePool = new ArrayList<MatchPerson>()...
[ "0.6538967", "0.6218579", "0.59305876", "0.583726", "0.5818561", "0.5810968", "0.5801017", "0.5794335", "0.57678294", "0.56959146", "0.569058", "0.56707007", "0.5655808", "0.5650728", "0.5648026", "0.5632881", "0.5610377", "0.56056225", "0.560499", "0.560046", "0.55974925", ...
0.0
-1
TODO: Write your experiments here!
public static void main(String... args) { String handle = "realDonaldTrump", pattern = "mexico"; System.out.println("Starting"); MatchBot bot = new MatchBot(handle, 2000); System.out.println("made bot"); // search all tweets for the pattern List<String> ansNaive = new DoublyLinkedList<>(); System.out.println("naive start"); // test 1 int compsNaive = bot.searchTweetsNaive(pattern, ansNaive); List<String> ansKMP = new DoublyLinkedList<>(); System.out.println("kmp start"); int compsKMP = bot.searchTweetsKMP(pattern, ansKMP); List<String> ansBM = new DoublyLinkedList<>(); System.out.println("Boyer - Moore start"); int compsBM = bot.searchTweetsBoyerMoore(pattern, ansBM); System.out.println("*** Donald test (normal size): ***naive comps = " + compsNaive + ", KMP comps = " + compsKMP + ", Boyer-Moore comps = " + compsBM); /*for (int i = 0; i < ansKMP.size(); i++) { String tweet = ansKMP.get(i); assert tweet.equals(ansNaive.get(i)); System.out.println(i++ + ". " + tweet); System.out.println(pattern + " appears at index " + tweet.toLowerCase().indexOf(pattern.toLowerCase())); }*/ // test 2 handle = "cnnbrk"; pattern = "syria"; bot = new MatchBot(handle, 2000); compsNaive = bot.searchTweetsNaive(pattern, ansNaive); compsKMP = bot.searchTweetsKMP(pattern, ansKMP); compsBM = bot.searchTweetsBoyerMoore(pattern, ansBM); System.out.println("*** CNN breaking news (normal size): ***naive comps = " + compsNaive + ", KMP comps = " + compsKMP + ", Boyer-Moore comps = " + compsBM); //test 3 handle = "realDonaldTrump"; pattern = "mexico"; bot = new MatchBot(handle, 250); compsNaive = bot.searchTweetsNaive(pattern, ansNaive); compsKMP = bot.searchTweetsKMP(pattern, ansKMP); compsBM = bot.searchTweetsBoyerMoore(pattern, ansBM); System.out.println("*** Donald test (small size): **: ***naive comps = " + compsNaive + ", KMP comps = " + compsKMP + ", Boyer-Moore comps = " + compsBM); // test 4 handle = "cnnbrk"; pattern = "syria"; bot = new MatchBot(handle, 250); compsNaive = bot.searchTweetsNaive(pattern, ansNaive); compsKMP = bot.searchTweetsKMP(pattern, ansKMP); compsBM = bot.searchTweetsBoyerMoore(pattern, ansBM); System.out.println("*** CNN breaking news (small size): ***naive comps = " + compsNaive + ", KMP comps = " + compsKMP + ", Boyer-Moore comps = " + compsBM); // test 5 handle = "cnnbrk"; pattern = "syria"; bot = new MatchBot(handle, 4000); compsNaive = bot.searchTweetsNaive(pattern, ansNaive); compsKMP = bot.searchTweetsKMP(pattern, ansKMP); compsBM = bot.searchTweetsBoyerMoore(pattern, ansBM); System.out.println("*** CNN breaking news (large size): ***naive comps = " + compsNaive + ", KMP comps = " + compsKMP + ", Boyer-Moore comps = " + compsBM); // test 6 handle = "realDonaldTrump"; pattern = "mexico"; bot = new MatchBot(handle, 4000); compsNaive = bot.searchTweetsNaive(pattern, ansNaive); compsKMP = bot.searchTweetsKMP(pattern, ansKMP); compsBM = bot.searchTweetsBoyerMoore(pattern, ansBM); System.out.println("*** Donald test (large size): **: ***naive comps = " + compsNaive + ", KMP comps = " + compsKMP + ", Boyer-Moore comps = " + compsBM); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n protected void setup() {\n }", "@Override\n public void setup() {\n }", "@Override\n public void setup() {\n }", "@Overri...
[ "0.578374", "0.57483155", "0.5676113", "0.5662736", "0.5662736", "0.56576854", "0.5623516", "0.5589186", "0.557931", "0.5577771", "0.5570716", "0.5491276", "0.54795414", "0.54727757", "0.54724586", "0.5468031", "0.54651034", "0.5450117", "0.5439845", "0.54303664", "0.54215884...
0.0
-1
Use the current date as the default date in the picker
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { final Calendar c = Calendar.getInstance(); int year = c.get(Calendar.YEAR); int month = c.get(Calendar.MONTH); int day = c.get(Calendar.DAY_OF_MONTH); // Create a new instance of DatePickerDialog and return it return new DatePickerDialog(getActivity(), this, year, month, day); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTodayDate() {\n\t\tfinal Calendar c = Calendar.getInstance();\r\n\t\tmYear = c.get(Calendar.YEAR);\r\n\t\tmMonth = c.get(Calendar.MONTH);\r\n\t\tmDay = c.get(Calendar.DAY_OF_MONTH);\r\n\r\n\t\tmaxYear = mYear - 10;\r\n\t\tmaxMonth = mMonth;\r\n\t\tmaxDay = mDay;\r\n\r\n\t\tminYear = mYear - 110;\r\n...
[ "0.7570866", "0.7052404", "0.6975466", "0.68639815", "0.67990696", "0.6789898", "0.6783088", "0.6780454", "0.670162", "0.6687505", "0.66742736", "0.6661783", "0.66408455", "0.6629506", "0.6622046", "0.6614785", "0.66132003", "0.65635", "0.6558133", "0.65395504", "0.65298307",...
0.0
-1
when user change date change value of button
public void onDateSet(DatePicker view, int year, int month, int day) { if (getTag().equals("begin")) { String y = Integer.toString(year); String m = Integer.toString(month + 1); String d = Integer.toString(day); if (d.length() == 1) { d = "0" + d; } if (m.length() == 1) { m = "0" + m; } SearchActivity.setBeginDate(d + "/" + m + "/" + y); } if (getTag().equals("end")) { String y = Integer.toString(year); String m = Integer.toString(month + 1); String d = Integer.toString(day); if (d.length() == 1) { d = "0" + d; } if (m.length() == 1) { m = "0" + m; } SearchActivity.setEndDate(d + "/" + m + "/" + y); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setCurrentDateOnButton() {\n\t\t\tfinal Calendar c = Calendar.getInstance();\n\t\t\tyear = c.get(Calendar.YEAR);\n\t\t\tmonth = c.get(Calendar.MONTH);\n\t\t\tday = c.get(Calendar.DAY_OF_MONTH);\n\t\t\t//set current date to registration button\n\t\t\tbtnRegDate.setText(new StringBuilder()\n\t\t\t// Mon...
[ "0.7449167", "0.7065897", "0.70464057", "0.68179107", "0.6723883", "0.6639433", "0.65341944", "0.65314", "0.65229005", "0.6512588", "0.6453457", "0.6444066", "0.6430267", "0.63976085", "0.6387811", "0.63696635", "0.63652146", "0.63575906", "0.6352537", "0.6348454", "0.6333443...
0.0
-1
checkAuthentication: check login and password
private boolean checkAuthentication(String login, String passwd) { Connection connect; boolean result = false; try { // connect db Class.forName(DRIVER_NAME); connect = DriverManager.getConnection(SQLITE_DB); // looking for login && passwd in db Statement stmt = connect.createStatement(); ResultSet rs = stmt.executeQuery(SQL_SELECT.replace("?", login)); while (rs.next()) result = rs.getString(PASSWD_COL).equals(passwd); // close all rs.close(); stmt.close(); connect.close(); } catch (Exception ex) { ex.printStackTrace(); return false; } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean checkCredentials (String username, String password);", "boolean authenticate(String userName, String password);", "boolean isAuthenticate(String username, String password) throws UserDaoException;", "@Override\n\tpublic boolean isUserAuthenticate(String username, String password) {\n\...
[ "0.77930987", "0.7646736", "0.7385382", "0.7291242", "0.72893286", "0.7199486", "0.71796036", "0.71783024", "0.7097455", "0.7082834", "0.7075725", "0.7073795", "0.7068987", "0.7050092", "0.70482284", "0.70482284", "0.70345837", "0.69955033", "0.69718456", "0.6877824", "0.6870...
0.7272186
5
The predefined stamp is carried out.
public StampRes stamp(Stamp stamp) { // check validity of arguments checkStampObjectValidity(stamp); // execute StampRes res = (StampRes) pdf4meClient.customHttp.postUniversalObject(stamp, StampRes.class, "Stamp/Stamp"); // check response for errors if (res == null) { throw new Pdf4meBackendException("Server Error"); } else { ResponseChecker.checkDocumentForErrors(res.getDocument()); } return res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void stamp() {\n mInternalStamp = SystemClock.elapsedRealtime();\n }", "private String makeEventStamp() {\n String name = \"DTSTAMP\";\n return formatTimeProperty(LocalDateTime.now(), name) + \"\\n\";\n }", "private void updateTimeStamp() {\n\t\tthis.timeStamp = new Timestamp...
[ "0.7928503", "0.6849034", "0.66565126", "0.64777553", "0.637177", "0.6281779", "0.6256112", "0.62136203", "0.61994576", "0.61483926", "0.6032841", "0.5959481", "0.5846708", "0.5830776", "0.5817345", "0.57351905", "0.5708549", "0.570594", "0.57042843", "0.56968", "0.5681543", ...
0.60416687
10
Places a custom text stamp on the pages of your choice. The position of the stamp is specified by alignX and alignY.
public byte[] textStamp(String text, String pages, AlignXEnum alignX, AlignYEnum alignY, File file) { // prepare multipart parameters List<Tuple<String, String>> params = new ArrayList<Tuple<String, String>>(); params.add(new Tuple("text", text)); params.add(new Tuple("pages", pages)); params.add(new Tuple("alignX", alignX.getValue())); params.add(new Tuple("alignY", alignY.getValue())); List<Tuple<String, File>> uploadFiles = new ArrayList<Tuple<String, File>>(); uploadFiles.add(new Tuple("file", file)); return pdf4meClient.customHttp.postWrapper(params, uploadFiles, "/Stamp/TextStamp"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void drawText(PDDocument document, PDPage page, PDRectangle box, PDFont font, Color color, String[] lines, ALIGNMENT alignment, ROTATION rotation, float fontLeading, float fontSize, boolean autoScale, boolean drawBoundingBox) throws IOException {\n\n\n /* Prepare the content stream */\n PDPage...
[ "0.6014496", "0.5954973", "0.57660043", "0.56464195", "0.5603344", "0.55185956", "0.5396135", "0.53850985", "0.53390956", "0.5314247", "0.53035915", "0.53030825", "0.5293969", "0.5274524", "0.52429163", "0.52309597", "0.5228685", "0.5221377", "0.51848596", "0.5126957", "0.507...
0.5994228
1
Checks whether the stamp object contains the essential information to be processed by the server.
private void checkStampObjectValidity(Stamp stamp) { // check provided arguments if (stamp == null) { throw new Pdf4meClientException("The stamp parameter cannot be null."); } else if (stamp.getDocument() == null || stamp.getDocument().getDocData() == null) { throw new Pdf4meClientException("The stamp document cannot be null."); } else if (stamp.getStampAction() == null) { throw new Pdf4meClientException("The stampAction cannot be null."); } else if (stamp.getStampAction().getAlpha() == null) { throw new Pdf4meClientException("The alpha parameter of stampAction cannot be null."); } else if (stamp.getStampAction().getText() == null && stamp.getStampAction().getImage() == null) { throw new Pdf4meClientException("The image and text parameter of stampAction cannot both be null."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasData()\n {\n logger.info(\"server: \" + server + \" addr: \" + addr + \"text:\" + text);\n return server != null && addr != null && text != null;\n }", "public boolean hasTimestamp() {\n return timestamp_ != null;\n }", "boolean hasStartingInfo();", "public boolean isGi...
[ "0.611871", "0.591518", "0.58263874", "0.5820407", "0.57655996", "0.57286674", "0.5725403", "0.5720894", "0.56928027", "0.56878024", "0.56868696", "0.5654352", "0.5641166", "0.5627321", "0.5627321", "0.56181264", "0.5608377", "0.5608377", "0.56074363", "0.5590625", "0.5559318...
0.72110975
0
constructor of the utility class
public static String[] getDescribes(){ boolean haveNull = false; for(int i=0 ; i<NUMBER_OF_COMPONENTS ; i++){ if( !notNull(i) ){ haveNull = true; break; } } if( haveNull ){ readShapes(); } return Arrays.copyOf(describes, describes.length); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Utils() {}", "private Util() { }", "public Utils() {\n }", "private Util()\n {\n // Empty default ctor, defined to override access scope.\n }", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Util() {\n }", "private Util()...
[ "0.8345655", "0.8314651", "0.8207921", "0.8131061", "0.8116878", "0.8116878", "0.8116878", "0.8116878", "0.8096726", "0.8096726", "0.80784345", "0.8029246", "0.8027941", "0.8015441", "0.8015441", "0.7940328", "0.7940328", "0.7940328", "0.7940328", "0.7940328", "0.7744219", ...
0.0
-1
static final String TXT_FILE_OF_SENTENCES="src/FileToHoI see hellewldSentences";
public static void main(String[] args) { GUI_Interface gui = new GUI_Interface(); gui.setVisible(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static File fMibsTextDir() \r\n\t{\r\n\t\treturn new File(fMibsDir() + File.separator + \"txt\");\t\r\n\t}", "String transcribeFile(String filePath);", "public String textExtractor(String filePath) {\n\n StringBuilder textBuilder = new StringBuilder();\n try (BufferedReader bufferedRea...
[ "0.57888114", "0.5748912", "0.5723208", "0.56811345", "0.56684047", "0.560477", "0.5601832", "0.55958015", "0.5548766", "0.5469804", "0.5434657", "0.54321754", "0.5430951", "0.5411513", "0.5402447", "0.53777146", "0.5358509", "0.53413045", "0.5341159", "0.5329885", "0.5317209...
0.0
-1
update all the marks
public void marksEdit(View view) { Intent intent = new Intent(getApplicationContext(), InsertingAtten.class); intent.putExtra("STATUS", "edit"); intent.putExtra("SEMESTER", semester); intent.putExtra("SECTION", section); intent.putExtra("COURSEID", courseId); intent.putExtra("DEPARTMENT", department); intent.putExtra("SERIES", series); startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateMarks() {\n this.marks.addAll(thisTurnMarks);\n thisTurnMarks.clear();\n if(game != null)\n game.notifyUpdateMarks(this);\n }", "public void setMarks(int[] newMarks){\n marks = newMarks;\n }", "@Override\n\tpublic void marks() {\n\t\t\n\t}", "publ...
[ "0.7795355", "0.6965126", "0.68165755", "0.6462779", "0.64090353", "0.6281524", "0.6160444", "0.60880864", "0.6060493", "0.59753966", "0.59254164", "0.586238", "0.5860912", "0.58573025", "0.58525646", "0.5840174", "0.582433", "0.5787382", "0.5766138", "0.5725747", "0.571041",...
0.0
-1
cancel all the marks
public void marksCancel(View view) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void cancel() {\n\t}", "public void cancel()\n\t{\n\t\t_buttonHit = true;\n\t}", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel(){\n cancelled = true;\n ...
[ "0.70664287", "0.70420647", "0.703949", "0.703949", "0.703949", "0.703949", "0.703949", "0.703949", "0.70326823", "0.7012701", "0.7007853", "0.6981415", "0.69809246", "0.6935723", "0.69053316", "0.6902927", "0.68683", "0.6857023", "0.68231916", "0.6813287", "0.6805232", "0....
0.721762
0
Created by tanaphatdev on 20/5/2559.
@Repository public interface FaresRepository extends JpaSpecificationExecutor<Fares>, JpaRepository<Fares,Long>,PagingAndSortingRepository<Fares,Long>,CrudRepository<Fares,Long> { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {...
[ "0.58712214", "0.57705426", "0.5722799", "0.5716781", "0.568973", "0.5665707", "0.5664472", "0.5661142", "0.56542253", "0.5651658", "0.5651658", "0.56170434", "0.5616207", "0.5615755", "0.5608331", "0.5599423", "0.55769336", "0.55666196", "0.55657566", "0.5551318", "0.5551318...
0.0
-1
first enforce that there is only one landscape per CCFMaster
@Override public void create(Landscape context) { checkSingleLandscapeConstraint(); checkParticipantKinds(context); try { Resource resource = applicationContext .getResource(getCcfCoreZipFileLocation()); File ccfLandscapeDirectory = new File(getCcfHome(), LANDSCAPE_DIRECTORY_PREFIX + context.getId()); FileUtils.forceMkdir(ccfLandscapeDirectory); unzip(resource.getFile(), ccfLandscapeDirectory); File landscapePropertyFile = new File(ccfLandscapeDirectory, getImmutableLandscapePropertyFileName()); createProperties(context, landscapePropertyFile); if (context.getVersion() != null) { createFieldMappingLandscapeTemplates(context, new File( ccfLandscapeDirectory, FIELDMAPPING_BASE_DIRECTORY)); } } catch (IOException e) { throw new CoreConfigurationException( "Could not properly extract core for landscape " + context.getName() + ": " + e.getMessage(), e); } catch (JAXBException e) { throw new CoreConfigurationException( "Could not parse Mapping Rule template for given landscape " + context.getName() + ": " + e.getMessage(), e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isLandscapeOrientation(){\n return getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE; \n }", "boolean getLandscape();", "public boolean isAutoRotateLandscape() {\n return autoRotateLandscape;\n }", "public interface UseLandscape {\n}", ...
[ "0.60432357", "0.58882153", "0.5618269", "0.5606888", "0.5571672", "0.52892745", "0.52746713", "0.524888", "0.52243084", "0.5208113", "0.5192791", "0.5186229", "0.5158134", "0.51490456", "0.5144361", "0.5135751", "0.51199037", "0.5115518", "0.51145464", "0.5099499", "0.509633...
0.5037137
22
figure out whether templates directory exist
private void createFieldMappingLandscapeTemplatesForDirection( Landscape context, File parentDirectory, Directions direction) throws IOException, JAXBException { File fieldMappingTemplatesDirectory = new File(parentDirectory, FIELD_MAPPING_LANDSCAPE_TEMPLATE_DIRECTORY_NAME); if (fieldMappingTemplatesDirectory.isDirectory()) { for (String child : fieldMappingTemplatesDirectory.list()) { File childDirectory = new File(fieldMappingTemplatesDirectory, child); if (childDirectory.isDirectory()) { createFieldMappingLandscapeTemplate(context, childDirectory, direction); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean hasTemplates() {\n\t\treturn loader.<TemplateController>getController().hasTemplates();\n\t}", "public boolean sourceExists(String name) {\n \treturn mTemplates.containsKey(name);\n }", "private boolean directoryExists() {\n if (Meta.getInstance().containDirectory(dirName))\n ...
[ "0.70473444", "0.65756303", "0.6331129", "0.6161675", "0.61286026", "0.60858643", "0.59930384", "0.5862262", "0.5839819", "0.5835473", "0.58353585", "0.58305246", "0.5826317", "0.5806152", "0.5791035", "0.5790846", "0.57687527", "0.5739653", "0.56972426", "0.56892365", "0.568...
0.0
-1
check for correct answer first
@Override public void onClick(View view) { if(choicesRG.getCheckedRadioButtonId() == questionList.get(currentQuestionIndex).getAnswerIndex()) correctAnswers++; Log.d("test", "Submitted: " + Integer.toString(choicesRG.getCheckedRadioButtonId())); currentQuestionIndex++; if(currentQuestionIndex < questionList.size()) { loadQuestion(questionList.get(currentQuestionIndex)); } else{ //go to stats activity Intent statsIntent = new Intent(TriviaActivity.this, StatsActivity.class); Log.d("test", "Initiate Stats Activity"); //Log.d("test", "Correct Answers: " + correctAnswers + "/" + questionList.size()); statsIntent.putExtra(MainActivity.PERCENT_KEY, (double)correctAnswers/(double)questionList.size()); Log.d("test", "Sending double: " + (double)correctAnswers/(double)questionList.size()); statsIntent.putExtra(MainActivity.QUESTION_LIST_KEY, questionList); finish(); startActivity(statsIntent); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasCorrectAnswer();", "public void verifyAnswer() {\n\t\tint i=0;\n\t\tSystem.out.println(\"in verify answer function\");\n\t\tSystem.out.println(\"Number of Answers: \"+ansCount);\n\t\tSystem.out.println(\"User ans: \"+userEquation);\n\t\tif (ansCount==0)\n\t\t\tlb2.setText(\"There is no solution for th...
[ "0.8031933", "0.7652088", "0.7641093", "0.7449566", "0.7357962", "0.73461694", "0.7185443", "0.71091914", "0.6992513", "0.6983918", "0.6952704", "0.69487834", "0.6886084", "0.68566495", "0.68565917", "0.6855447", "0.68415064", "0.6808569", "0.6748464", "0.67237973", "0.668557...
0.0
-1
Log.d("test", "Checked: " + checked);
@Override public void onCheckedChanged(RadioGroup radioGroup, @IdRes int checked) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onCheck(boolean isChecked) {\n Log.e(\"isChecked\", \"onCheck: isChecked=\" + isChecked);\n }", "@Override\n public void onCheck(boolean isChecked) {\n ...
[ "0.7525838", "0.74896336", "0.74240625", "0.6658514", "0.65108395", "0.6440869", "0.6351837", "0.6296398", "0.6296398", "0.62059975", "0.61943346", "0.6193375", "0.618302", "0.61804146", "0.61709017", "0.61164546", "0.6042878", "0.60394496", "0.6033244", "0.6001267", "0.59826...
0.53507423
76
timer.setText("Time's Up!"); go to stats activity
public void onFinish() { Intent statsIntent = new Intent(TriviaActivity.this, StatsActivity.class); Log.d("test", "Initiate Stats Activity"); //Log.d("test", "Correct Answers: " + correctAnswers + "/" + questionList.size()); statsIntent.putExtra(MainActivity.PERCENT_KEY, (double)correctAnswers/(double)questionList.size()); Log.d("test", "Sending double: " + (double)correctAnswers/(double)questionList.size()); statsIntent.putExtra(MainActivity.QUESTION_LIST_KEY, questionList); finish(); startActivity(statsIntent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateCountdownText() {\r\n int minutes = (int) (timeLeftInMillis / 1000) / 60;\r\n int seconds = (int) (timeLeftInMillis / 1000) % 60;\r\n\r\n String timeFormatted = String.format(Locale.getDefault(), \"%02d:%02d\", minutes, seconds);\r\n\r\n mTimer.setText(timeFormatted);...
[ "0.6960367", "0.68350405", "0.67811614", "0.6751295", "0.6731554", "0.664781", "0.6643857", "0.6620795", "0.6603536", "0.659849", "0.65820146", "0.6573851", "0.65010595", "0.64999306", "0.64901286", "0.64702153", "0.64592975", "0.6449666", "0.6448288", "0.6443707", "0.6441179...
0.0
-1
Draw a line from the old location to the new location
@Override public void changed(ObservableValue<? extends Duration> observable, Duration oldValue, Duration newValue) { // skip starting at 0/0 if( oldValue == Duration.ZERO) return; // get current location double x = pen.getTranslateX(); double y = pen.getTranslateY(); // initialize the location if( oldLocation == null) { oldLocation = new Location(); oldLocation.x = x; oldLocation.y = y; return; } // draw line gc.setStroke(Color.BLUE); gc.setFill(Color.YELLOW); gc.setLineWidth(7); gc.strokeLine(oldLocation.x, oldLocation.y, x, y); // update old location with current one oldLocation.x = x; oldLocation.y = y; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void drawLine(int x, int y, int x2, int y2, int color);", "public void drawLine(int x1, int y1, int x2, int y2);", "public abstract void lineTo(double x, double y);", "protected abstract void lineTo(final float x, final float y);", "public void lineTo(int x, int y){\n paint.setColor(Color.par...
[ "0.73939246", "0.72140574", "0.71581185", "0.71546495", "0.7073262", "0.7032689", "0.6977481", "0.6917675", "0.6889241", "0.68838114", "0.68755805", "0.6847281", "0.68255204", "0.674238", "0.6710859", "0.6709989", "0.6709989", "0.6709989", "0.6709989", "0.66775316", "0.667184...
0.67376685
14
Picasso.with(ListActivity.this).load(url) .placeholder(android.R.drawable.star_big_on) .error(android.R.drawable.stat_notify_error) .resize(1600, 1200) .centerCrop() .into(imageView);
@Override public void loadImage(String url, ImageView imageView) { ImageLoader.getInstance().displayImage(url, imageView); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onError() {\n Picasso.with(context)\n .load(uri).fit().centerCrop()\n .placeholder(R.drawable.ic_menu_gallery)\n .error(R.drawable.ic_me...
[ "0.80103517", "0.79626393", "0.78527594", "0.77973473", "0.77395964", "0.7680962", "0.76758", "0.76509506", "0.75960207", "0.75551337", "0.75010437", "0.74969345", "0.7462056", "0.7380945", "0.71470547", "0.7073237", "0.7065198", "0.7039671", "0.6985807", "0.69154084", "0.690...
0.0
-1
TODO Autogenerated method stub
@Override public List<SprintTo> getSprintsForProjectByStatus(String projectId, int status) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void updateSprintStatus(String card_id, String box_id, String user) { }
{ "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 SprintTo getCurrentSprint(String projectId) { return sprintDao.getCurrentSprint(projectId,new Date()); }
{ "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 List<TreeNodeTo> prepareSprintTreeNodes(String projectId) { TreeNodeTo rootNode=prepareRootNode(); List sprintNodes=new ArrayList<TreeNodeTo>(); sprintNodes.add(rootNode); List<SprintTo> sprints=sprintDao.getSprintForProject(projectId); if(sprints!=null&&sprints.size()>0){ for(SprintTo sprint : sprints){ TreeNodeTo node=new TreeNodeTo(); node.setId(sprint.getId()); node.setName("<Strong>"+sprint.getName()+"</Strong>"+" : "+dateFormat.format(sprint.getStartTime())+"--"+dateFormat.format(sprint.getEndTime())); if(sprint.getParentSprint()==null){ node.setpId("0"); node.setOpen(true); } else { node.setpId(sprint.getParentSprint().getId()); node.setOpen(false); } sprintNodes.add(node); } } return sprintNodes; }
{ "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 TreeNodeTo createSprintNode(SprintTo sprint, String projectId,String sprintId) { sprint=createSprint(sprint, projectId, sprintId); TreeNodeTo node=new TreeNodeTo(); node.setId(sprint.getId()); node.setName("<Strong>"+sprint.getName()+"</Strong>"+" : "+dateFormat.format(sprint.getStartTime())+"--"+dateFormat.format(sprint.getEndTime())); if(sprint.getParentSprint()==null){ node.setpId("0"); node.setOpen(true); } else { node.setpId(sprint.getParentSprint().getId()); node.setOpen(false); } return node; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public List<SprintTo> getSprintWithNoChildrenForProject(String projectId) { return sprintDao.getSprintWithNoChildrenForProject(projectId); }
{ "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
An interface for objects which dispatch pages, used to avoid a circular dependency between WWWDataSource and PageProcessor and to enable testing with the easymock library.
public interface PageDispatcher { /** * Process a webpage * @param url The URL to process * @param link The link that was followed to get there */ public void dispatch(URL url, Weblink link, long delay); /** * Register a redirect * @param oldURL The URL that was redirected * @param newURL The URL it was redirected to * @param delay The number of milliseconds to wait before loading the page */ public void registerRedirect(String oldURL, String newURL); /** * Remove all traces of having crawled a URL * @param url the URL to remove */ public void undispatchURL(String url); /** * Notify the dispatcher that a page has been parsed * @param page The final version of the page * @param link The link that was followed to reach the page */ public void notifyPage(Webpage page, Weblink link); /** * Send a command to the Builders * @param cmd The Command to send */ public void sendCommand(Command cmd); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface PageConnector {\n void onLastPage();\n void onNormalPage();\n}", "public interface ResponsePostprocessor {\r\n String postprocess(Page page, String postprocess);\r\n}", "public interface IPage {\r\n\r\n\t/**\r\n\t * Gets the url.\r\n\t *\r\n\t * @return the url\r\n\t */\r\n\tUrl getUr...
[ "0.7147283", "0.6867538", "0.68108356", "0.64120525", "0.6399308", "0.63850605", "0.63768435", "0.63613063", "0.63003486", "0.62954485", "0.6140332", "0.61073196", "0.607918", "0.60749775", "0.6061695", "0.60195994", "0.59987015", "0.59941596", "0.59853387", "0.59658414", "0....
0.78094226
0
Remove all traces of having crawled a URL
public void undispatchURL(String url);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void cleanCollectedLinks() {\n for (Iterator itr = visitedLinks.iterator(); itr.hasNext(); ) {\n String thisURL = (String) itr.next();\n if (urlInLinkedList(NetworkUtils.makeURL(thisURL), collectedLinks)) {\n collectedLinks.remove(thisURL.toString());\n// ...
[ "0.6735716", "0.5579229", "0.54485905", "0.53842217", "0.5368928", "0.5365341", "0.53517926", "0.53211856", "0.5315881", "0.52046657", "0.5182496", "0.51755804", "0.5158638", "0.5157234", "0.51491725", "0.513548", "0.510864", "0.510442", "0.5087401", "0.5083034", "0.5082786",...
0.5198253
10
Notify the dispatcher that a page has been parsed
public void notifyPage(Webpage page, Weblink link);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface PageDispatcher {\n\t/**\n\t * Process a webpage\n\t * @param url The URL to process\n\t * @param link The link that was followed to get there\n\t */\n\tpublic void dispatch(URL url, Weblink link, long delay);\n\t\n\t/**\n\t * Register a redirect\n\t * @param oldURL The URL that was redirected\n\t...
[ "0.62124383", "0.59856915", "0.58459437", "0.5844248", "0.5824353", "0.57798827", "0.57716346", "0.5763689", "0.57255393", "0.5689225", "0.56635606", "0.5630171", "0.56120175", "0.56070554", "0.5594109", "0.55863994", "0.5576627", "0.557513", "0.55364", "0.5448537", "0.543976...
0.5874107
2
Send a command to the Builders
public void sendCommand(Command cmd);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void sendCommand(CommandEvent event);", "private void sendCommand(int recipient, int action, int parameter,\r\n\t\t\tint options) {\r\n\t\tString command = \"*\" + recipient + \";\" + action + \";\" + parameter + \";\"\r\n\t\t\t\t+ options + \"#\";\r\n\t\tlogger.debug(\"Sende Kommando\");\r\n\t\tcom.sendString(c...
[ "0.647401", "0.64128816", "0.62879467", "0.6281284", "0.62587386", "0.6246814", "0.61941546", "0.6167285", "0.6166969", "0.6163471", "0.61080575", "0.609401", "0.6082151", "0.60425264", "0.6010284", "0.5994171", "0.5964534", "0.58982575", "0.5833635", "0.58258134", "0.5799953...
0.7264593
0
TODO Autogenerated method stub
@Override public int getMovingRange() { return MAX_MOVE_RANGE; }
{ "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
Creates new form UsersInF
public UsersInF() { initComponents(); dao = new UsersDAO(); loadTableUsers(dao.readAll()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FXML\n\tpublic void createUser(ActionEvent event) {\n\t\tString empty = \"\";\n\t\tString name = txtUserNames.getText();\n\t\tString lastName = txtUserSurnames.getText();\n\t\tString id = txtUserId.getText();\n\t\tString username = txtUserUsername.getText();\n\t\tString password = PfUserPassword.getText();\n\n\t\...
[ "0.6824466", "0.6777332", "0.67661583", "0.6722817", "0.6607376", "0.6595028", "0.65728056", "0.6534276", "0.65245336", "0.64884037", "0.64635247", "0.6435986", "0.64056903", "0.64035034", "0.6379527", "0.6373228", "0.6336719", "0.63277465", "0.63275003", "0.63198805", "0.631...
0.5983658
46
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); txtId = new javax.swing.JTextField(); txtUsersName = new javax.swing.JTextField(); txtPassword = new javax.swing.JTextField(); txtRoleId = new javax.swing.JTextField(); btnCreate = new javax.swing.JButton(); btnRefresh = new javax.swing.JButton(); btnUpdate = new javax.swing.JButton(); btnDelete = new javax.swing.JButton(); spnMain = new javax.swing.JScrollPane(); tblMain = new javax.swing.JTable(); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Users")); jLabel1.setText("Id :"); jLabel2.setText("UsersName :"); jLabel3.setText("Password :"); jLabel4.setText("RoleId :"); btnCreate.setText("Create"); btnCreate.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCreateActionPerformed(evt); } }); btnRefresh.setText("Refresh"); btnRefresh.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnRefreshActionPerformed(evt); } }); btnUpdate.setText("Update"); btnUpdate.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnUpdateActionPerformed(evt); } }); btnDelete.setText("Delete"); btnDelete.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnDeleteActionPerformed(evt); } }); tblMain.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); tblMain.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { tblMainMouseClicked(evt); } }); spnMain.setViewportView(tblMain); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(spnMain, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(60, 60, 60) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1) .addComponent(jLabel2) .addComponent(jLabel3) .addComponent(jLabel4)) .addGap(48, 48, 48) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(txtId, javax.swing.GroupLayout.DEFAULT_SIZE, 256, Short.MAX_VALUE) .addComponent(txtUsersName) .addComponent(txtPassword) .addComponent(txtRoleId))) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(88, 88, 88) .addComponent(btnCreate) .addGap(46, 46, 46) .addComponent(btnRefresh) .addGap(50, 50, 50) .addComponent(btnUpdate) .addGap(38, 38, 38) .addComponent(btnDelete)))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(27, 27, 27) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(txtId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(28, 28, 28) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent(txtUsersName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(25, 25, 25) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3) .addComponent(txtPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(22, 22, 22) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4) .addComponent(txtRoleId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(65, 65, 65) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnCreate) .addComponent(btnRefresh) .addComponent(btnUpdate) .addComponent(btnDelete)) .addGap(80, 80, 80) .addComponent(spnMain, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.73191476", "0.72906625", "0.72906625", "0.72906625", "0.72860986", "0.7248112", "0.7213479", "0.72078276", "0.7195841", "0.71899796", "0.71840525", "0.7158498", "0.71477973", "0.7092748", "0.70800966", "0.70558053", "0.69871384", "0.69773406", "0.69548076", "0.69533914", "...
0.0
-1
Constructor for private EMPTY member. Complies with Java8.
private Optional() { this.value = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "public EmptyType() {\n super(\"<EMPTY>\");\n }", "public Member() {\n //Empty constructor!\n }", "public Member() {}", "public StubPrivateConstructorPair() {\r\n this(null, null);\r\n }"...
[ "0.7471902", "0.7148086", "0.6582324", "0.6581496", "0.65684706", "0.6513132", "0.65100795", "0.645179", "0.64463353", "0.64217657", "0.63730204", "0.63604236", "0.6315945", "0.6309433", "0.62610203", "0.623052", "0.62208015", "0.6207874", "0.61654216", "0.6164931", "0.616028...
0.5761963
83
Creates a new optional with a value.
private Optional(T value) { this.value = Objects.requireNonNull(value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <T> Optional <T> of(T value) {\r\n\t\treturn new Optional<>(value);\r\n\t}", "private OptionalValue(final Value value) {\n this.value = value;\n }", "static <V> Value<V> of(Optional<V> value) {\n return new ImmutableValue<>(value.orElse(null));\n }", "public Builder setOptio...
[ "0.75442606", "0.73222166", "0.6955791", "0.6401831", "0.628866", "0.6243929", "0.60631144", "0.5969985", "0.5814315", "0.578769", "0.5693271", "0.5607916", "0.554904", "0.55106425", "0.55072683", "0.55072683", "0.54744744", "0.54139906", "0.53473747", "0.53441757", "0.528227...
0.71620655
2
Returns an empty Optional instance.
@SuppressWarnings("unchecked") public static <T> Optional <T> empty() { return (Optional<T>) EMPTY; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Optional<T> toOptional();", "default Optional<V> toOptional() {\n V item = orElseNull();\n return item == null ? Optional.empty() : Optional.of( item );\n }", "private Optional() {\r\n\t\tthis.value = null;\r\n\t}", "@Override\n\tpublic Optional<T> get() {\n\t\treturn null;\n\t}"...
[ "0.7190859", "0.70575243", "0.69894034", "0.65100974", "0.64303917", "0.6382993", "0.6364783", "0.63044226", "0.6246522", "0.623289", "0.61233777", "0.60858494", "0.60840577", "0.6015568", "0.5999931", "0.5941048", "0.58687776", "0.5819739", "0.5805611", "0.5795534", "0.57864...
0.79292846
0
Creates a new Optional with a value.
public static <T> Optional <T> of(T value) { return new Optional<>(value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static <V> Value<V> of(Optional<V> value) {\n return new ImmutableValue<>(value.orElse(null));\n }", "private OptionalValue(final Value value) {\n this.value = value;\n }", "private Optional(T value) {\r\n\t\tthis.value = Objects.requireNonNull(value);\r\n\t}", "public static <V> Some<V> ...
[ "0.74119896", "0.7380251", "0.7290823", "0.6562059", "0.6542396", "0.6260572", "0.624624", "0.61856663", "0.61097", "0.60031486", "0.59620374", "0.59510773", "0.594032", "0.59166527", "0.5907516", "0.56037486", "0.5599351", "0.55939084", "0.5511999", "0.5463701", "0.5414583",...
0.826125
0
Creates an Optional class from a value. The value can be null and if so, empty() is returned.
public static <T> Optional <T> ofNullable(T value) { if (value == null) return empty(); return of(value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <T> Optional <T> of(T value) {\r\n\t\treturn new Optional<>(value);\r\n\t}", "private Optional(T value) {\r\n\t\tthis.value = Objects.requireNonNull(value);\r\n\t}", "static <V> Value<V> of(Optional<V> value) {\n return new ImmutableValue<>(value.orElse(null));\n }", "private Optional...
[ "0.78983533", "0.7074783", "0.6996195", "0.6948386", "0.6439045", "0.6415457", "0.63452184", "0.63127035", "0.62663746", "0.6253182", "0.6209024", "0.6043227", "0.59957", "0.59438103", "0.59329444", "0.5886159", "0.5864484", "0.5863145", "0.5855551", "0.578801", "0.57372403",...
0.70624924
2
If a value is present in this Optional, returns the value, otherwise throws NoSuchElementException.
public T get() { if (value == null) { throw new NoSuchElementException("No value present"); } return value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public E element () throws NoSuchElementException;", "@Override\n public Integer next() {\n if(peekedVal != null ){\n Integer next = peekedVal;\n peekedVal = null;\n return next;\n }\n if(!iter.hasNext()){\n throw new NoSuchElementException();\n...
[ "0.60606086", "0.59762084", "0.59597945", "0.59338355", "0.5923817", "0.5919933", "0.583374", "0.5829993", "0.5744201", "0.5743983", "0.5738522", "0.56269", "0.56221163", "0.560906", "0.55897886", "0.55828303", "0.55497164", "0.55419487", "0.5539668", "0.55246836", "0.5524382...
0.64111423
0
Return true if there is a value present, otherwise false.
public boolean isPresent() { return value != null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean hasValue() {\n return value_ != null;\n }", "default boolean hasValue() {\n\t\t\treturn getValue() != null;\n\t\t}", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();"...
[ "0.8552573", "0.84158486", "0.84034085", "0.84034085", "0.84034085", "0.84034085", "0.84034085", "0.84034085", "0.84034085", "0.84034085", "0.84034085", "0.84034085", "0.84034085", "0.84034085", "0.84034085", "0.84034085", "0.8133319", "0.8133319", "0.81140256", "0.8097756", ...
0.81547225
16
Return the value if present, otherwise return other.
public T orElse(T other) { return value != null ? value : other; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "default V getOrElse(V value) {\n return isEmpty() ? value : get();\n }", "public Object getElseValue();", "T getOrElse(T value);", "public Optional<T> getValue() {\n return Optional.ofNullable(value);\n }", "@Override\n\tpublic Optional<Value> get(Key k) {\n\t\treturn bst.find(k);\n\t}"...
[ "0.6855212", "0.68465364", "0.6696616", "0.6119531", "0.5809296", "0.5775367", "0.57589096", "0.5745065", "0.5719377", "0.5645588", "0.5641741", "0.554952", "0.5536871", "0.5497517", "0.5485952", "0.5485952", "0.54692024", "0.541353", "0.54084903", "0.54082096", "0.54042643",...
0.6993303
0
Indicates whether some other object is "equal to" this Optional. The other object is considered equal if: it is also an Optional and; both instances have no value present or; the present values are "equal to" each other via equals().
@Override public boolean equals(Object obj) { if (this == obj) return true; if (!(obj instanceof Optional)) { return false; } Optional <?> other = (Optional <?>) obj; return Objects.equals(value, other.value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }", "public boolean eqValue(E that) {\n return this.value.compareTo(that) == 0;\n }", "public boolean equals(Object other)\...
[ "0.6113743", "0.6026901", "0.5949036", "0.5942518", "0.5932233", "0.5918141", "0.59176934", "0.58961076", "0.5865443", "0.5842806", "0.5837675", "0.5830501", "0.5798725", "0.57805246", "0.5776194", "0.57597405", "0.5750512", "0.5748828", "0.5740246", "0.5740236", "0.57261676"...
0.79386735
0
Returns the hash code value of the present value, if any, or 0 (zero) if no value is present.
@Override public int hashCode() { return Objects.hashCode(value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int computeHashCode(byte val);", "public int hashcode();", "public int hashCode() {\n if (getInternalValue() == null) {\n return -3;\n }\n else {\n return super.hashCode();\n }\n }", "public String getHashValue() {\n\t\tif(hash == null || hash.equals(\"\")){\n\t\t\tthis.calculateHashVa...
[ "0.67143875", "0.6581394", "0.63790923", "0.6353986", "0.63425344", "0.63212687", "0.6308518", "0.6281981", "0.62607116", "0.6226658", "0.6166933", "0.6132243", "0.61143863", "0.61029845", "0.60755754", "0.60454077", "0.59567446", "0.5953457", "0.59456545", "0.5935057", "0.59...
0.54840016
82
Returns a nonempty string representation of this Optional suitable for debugging. The exact presentation format is unspecified and may vary between implementations and versions.
@Override public String toString() { if (value != null) return String.format("Optional[%s]", value); else return "Optional.empty"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toDebugString();", "@Override\n\tpublic String toStringDebug() {\n\t\treturn null;\n\t}", "public String shortRepr() {\n\t\treturn \"Value of some kind.\";\n\t}", "@Override\n public String toString() {\n return new GsonBuilder().serializeNulls().create().toJson(this).toString();\n ...
[ "0.7047674", "0.70365584", "0.6971504", "0.6899422", "0.68854547", "0.68404484", "0.6821638", "0.68148905", "0.68068516", "0.6766533", "0.67425954", "0.6733731", "0.66990685", "0.6698959", "0.6652784", "0.6633637", "0.6628306", "0.66210026", "0.66169816", "0.658354", "0.65810...
0.7152991
0
TODO Autogenerated method stub
public static void main(String[] args) { int number = 32841; int temp = 32841; /* * int number = 32814; int temp = 32814; */ // 14823 // 12843 ArrayList<Integer> listOfNumbers = new ArrayList<Integer>(); ArrayList<Integer> newList = new ArrayList<Integer>(); while (temp > 0) { int digit = temp % 10; temp = temp / 10; listOfNumbers.add(digit); } int i = 0; int j = i + 1; // Checking the asecending order for (i = 0; i < listOfNumbers.size() - 1; i++) { if (listOfNumbers.get(j) < listOfNumbers.get(i)) { System.out.println(listOfNumbers.get(i + 1)); System.out.println(i + 1); break; } System.out.println(j); j++; } // j = 0; // replacing the 2 and 4 for (int m = 0; m < listOfNumbers.size() - 1; m++) { if ((Integer) listOfNumbers.get(m) > (Integer) listOfNumbers.get(i + 1)) { System.out.println(" i = " + i); System.out.println("value at m is " + listOfNumbers.get(m)); System.out.println("value at i is " + listOfNumbers.get(i + 1)); int swap = listOfNumbers.get(m); listOfNumbers.set(m, listOfNumbers.get(i + 1)); listOfNumbers.set(i + 1, swap); break; } } // getting the sub list and sorting them List<Integer> subList = listOfNumbers.subList(0, i + 1); Collections.sort(subList); Collections.reverse(subList); // creating a new list wit the next higher number for (int k = listOfNumbers.size(); k > i + 1; k--) { newList.add(listOfNumbers.get(k - 1)); } for (int k = 0; k < subList.size(); k++) { newList.add(subList.get(k)); } for (int k = 0; k < newList.size(); k++) { System.out.print(newList.get(k)); } }
{ "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
This method was generated by MyBatis Generator. This method returns the value of the database column t_activity.id
public Integer getId() { return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getActivityId() {\n\t\treturn activityId;\n\t}", "public Integer getActivityId() {\n return activityId;\n }", "public int getC_Activity_ID() {\n\t\tInteger ii = (Integer) get_Value(\"C_Activity_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public int...
[ "0.701232", "0.69133323", "0.68249273", "0.66598773", "0.6566843", "0.6399289", "0.63984185", "0.6207174", "0.618652", "0.61303926", "0.58964753", "0.58771986", "0.5810961", "0.578783", "0.57547575", "0.5669789", "0.56220734", "0.5586559", "0.5573493", "0.5568126", "0.5556105...
0.0
-1
This method was generated by MyBatis Generator. This method sets the value of the database column t_activity.id
public void setId(Integer id) { this.id = id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setC_Activity_ID (int C_Activity_ID);", "public void setActivityId(Integer activityId) {\n this.activityId = activityId;\n }", "public void setActivityId(String activityId) {\n this.activityId = activityId;\n }", "public void setActivityId(Integer activityId) {\n\t\tthis.activityId ...
[ "0.6789075", "0.673917", "0.6620175", "0.66105175", "0.6233814", "0.6207462", "0.61045015", "0.6083227", "0.59694445", "0.5916037", "0.5833987", "0.58052784", "0.5676296", "0.5671187", "0.56087", "0.5597917", "0.5524143", "0.5473364", "0.54249465", "0.5394207", "0.53860736", ...
0.0
-1
This method was generated by MyBatis Generator. This method returns the value of the database column t_activity.student_name
public String getStudentName() { return studentName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@AutoEscape\n\tpublic String getStudentName();", "public String getName() \r\n {\r\n return studentName;\r\n }", "public String getStudentName() {\r\n\t\treturn studentName;\r\n\t}", "public java.lang.String getStudent_name() {\n\t\treturn _primarySchoolStudent.getStudent_name();\n\t}", "publi...
[ "0.67264473", "0.64833754", "0.6410157", "0.6401574", "0.63403225", "0.63084185", "0.6014555", "0.59872955", "0.59821486", "0.5863173", "0.5807263", "0.58060914", "0.57705045", "0.5768543", "0.5752497", "0.57173306", "0.5706702", "0.5706702", "0.56999254", "0.5692849", "0.568...
0.63936484
5
This method was generated by MyBatis Generator. This method sets the value of the database column t_activity.student_name
public void setStudentName(String studentName) { this.studentName = studentName == null ? null : studentName.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setStudentName(String studentName);", "public void setStudentFirstName(String studentFirstName){\r\n this.studentFirstName.set(studentFirstName);\r\n }", "public void setStudentName() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t// setter method initialized\r\n System.out.println(...
[ "0.6871886", "0.6479796", "0.6340254", "0.6230289", "0.61619186", "0.61557823", "0.6105076", "0.59944224", "0.5940124", "0.5935154", "0.5862858", "0.5850301", "0.5822478", "0.57966137", "0.5795158", "0.5767603", "0.57125014", "0.56695443", "0.5663473", "0.5663473", "0.5657596...
0.62717855
3
This method was generated by MyBatis Generator. This method returns the value of the database column t_activity.mobile_phone
public String getMobilePhone() { return mobilePhone; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Long getMobile_phone();", "public java.lang.String getMobilePhone() {\r\n return mobilePhone;\r\n }", "public String getMobilePhoneNumber() {\n\t\treturn mobilePhoneNumber;\n\t}", "public String getMobile_number() {\n return mobile_number;\n }", "public java.lang.String getMobile...
[ "0.7542114", "0.69836855", "0.689581", "0.6885385", "0.6843693", "0.68010426", "0.6698423", "0.6682586", "0.6682586", "0.66804975", "0.66483426", "0.66483426", "0.66483426", "0.66483426", "0.66483426", "0.66483426", "0.66483426", "0.66483426", "0.66483426", "0.66483426", "0.6...
0.6992198
1
This method was generated by MyBatis Generator. This method sets the value of the database column t_activity.mobile_phone
public void setMobilePhone(String mobilePhone) { this.mobilePhone = mobilePhone == null ? null : mobilePhone.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMobile_phone(Long mobile_phone);", "public void setMobilePhone(String mobilePhone) {\n this.mobilePhone = mobilePhone;\n }", "public void setMobilePhone(java.lang.String mobilePhone) {\r\n this.mobilePhone = mobilePhone;\r\n }", "public void setMobile(String mobile) {\n ...
[ "0.7421225", "0.73284805", "0.7203496", "0.6831989", "0.6831989", "0.6831989", "0.6831989", "0.68235654", "0.68093646", "0.6746466", "0.671592", "0.67021936", "0.6696834", "0.6673144", "0.6673144", "0.6671646", "0.6661692", "0.6647172", "0.6647172", "0.6647172", "0.6647172", ...
0.70390505
3
This method was generated by MyBatis Generator. This method returns the value of the database column t_activity.email
public String getEmail() { return email; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Column(length = 50, nullable = false)\n public String getEmail() {\n return email;\n }", "public String getEmail(){\n SQLiteDatabase db = this.getReadableDatabase();\n\n // Define a projection that specifies which columns from the database\n // you will actually use after this ...
[ "0.65355587", "0.65045357", "0.6490532", "0.6427202", "0.6427202", "0.6427202", "0.6427202", "0.6427202", "0.6427202", "0.6368684", "0.62544924", "0.62544924", "0.62544924", "0.62544924", "0.62544924", "0.62544924", "0.62544924", "0.62544924", "0.62544924", "0.62544924", "0.6...
0.0
-1
This method was generated by MyBatis Generator. This method sets the value of the database column t_activity.email
public void setEmail(String email) { this.email = email == null ? null : email.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void set_email(String Email)\n {\n email =Email;\n }", "public void setEmail(String email)\r\n/* 36: */ {\r\n/* 37:50 */ this.email = email;\r\n/* 38: */ }", "public void setEmail(String account, String email) throws SQLException, MessagingException {\n\t\tthis.userDao.setEmail(...
[ "0.6755468", "0.6729223", "0.66219807", "0.651221", "0.651221", "0.6510218", "0.6500809", "0.6500809", "0.6480279", "0.6473463", "0.6460423", "0.6429929", "0.641341", "0.6406569", "0.6370207", "0.635057", "0.6290287", "0.6284852", "0.62715316", "0.62715316", "0.62715316", "...
0.0
-1
This method was generated by MyBatis Generator. This method returns the value of the database column t_activity.parent_name
public String getParentName() { return parentName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getParentName() {\n return getProperty(Property.PARENT_NAME);\n }", "public String getParentName() {\n return parentName;\n }", "public String getParentName() {\n\t\treturn parentName;\n\t}", "@JoinColumn(name = \"parentName\", referencedColumnName = \"login\")\n @ManyToOne\n publ...
[ "0.6946407", "0.6814638", "0.6656071", "0.6588752", "0.65354973", "0.6378667", "0.62073433", "0.62022024", "0.6180662", "0.61520237", "0.6145063", "0.6142156", "0.61308616", "0.60968584", "0.60891294", "0.60891294", "0.60891294", "0.60891294", "0.60891294", "0.60891294", "0.6...
0.67602915
2
This method was generated by MyBatis Generator. This method sets the value of the database column t_activity.parent_name
public void setParentName(String parentName) { this.parentName = parentName == null ? null : parentName.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setParentName(String name) { m_parentName = name; }", "public void setParent(String parent) {\r\n this.parent = parent;\r\n }", "public void setParent(String parent) {\n this.parent = parent;\n }", "public void setParent(String parent) {\n _parent = parent;\n }", "...
[ "0.7034246", "0.6399838", "0.6302064", "0.63003016", "0.62556624", "0.62368774", "0.61796325", "0.61638117", "0.60124785", "0.5972882", "0.5920219", "0.5893069", "0.5790355", "0.5784657", "0.57670784", "0.56793", "0.5667624", "0.56471795", "0.5609804", "0.5571891", "0.5559901...
0.66117525
1
This method was generated by MyBatis Generator. This method returns the value of the database column t_activity.status
public String getStatus() { return status; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getStatus(){\n\n //returns the value of the status field\n return this.status;\n }", "public Integer getStatus() {\n return this.status;\n }", "public String getStatus() {\n return this.status;\n }", "public String getStatus() {\n return this.status;\n }", "public Str...
[ "0.6646802", "0.62968683", "0.6286422", "0.6286422", "0.6286422", "0.6269758", "0.62691844", "0.6266782", "0.6251633", "0.6251633", "0.6251633", "0.6251633", "0.6251633", "0.6251633", "0.6251633", "0.6243614", "0.6243614", "0.624001", "0.623317", "0.623317", "0.6225421", "0...
0.61584747
81
This method was generated by MyBatis Generator. This method sets the value of the database column t_activity.status
public void setStatus(String status) { this.status = status == null ? null : status.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setStatus(boolean newstatus){activestatus = newstatus;}", "public void setActiveStatus(Boolean active){ this.status = active; }", "@IcalProperty(pindex = PropertyInfoIndex.STATUS,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true\n ...
[ "0.6316909", "0.61955863", "0.6168718", "0.6127986", "0.6127986", "0.60957676", "0.6075038", "0.6075038", "0.6075038", "0.6075038", "0.6075038", "0.6075038", "0.6075038", "0.6075038", "0.6075038", "0.6075038", "0.6075038", "0.6075038", "0.6075038", "0.6075038", "0.6075038", ...
0.0
-1
This method was generated by MyBatis Generator. This method returns the value of the database column t_activity.parent_call
public String getParentCall() { return parentCall; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setParentCall(String parentCall) {\n this.parentCall = parentCall == null ? null : parentCall.trim();\n }", "public String getParentActivity() {\n return parentActivity;\n }", "public int getParent_id() {\n return this.parent_id;\n }", "public String getParentParamCode() {...
[ "0.65958506", "0.656325", "0.6303373", "0.62827957", "0.6271734", "0.6147838", "0.6124084", "0.60999113", "0.6087378", "0.60762894", "0.6054827", "0.6028795", "0.60228974", "0.597843", "0.59501064", "0.5948523", "0.5916625", "0.5895551", "0.58912486", "0.58912486", "0.5891248...
0.78576994
0
This method was generated by MyBatis Generator. This method sets the value of the database column t_activity.parent_call
public void setParentCall(String parentCall) { this.parentCall = parentCall == null ? null : parentCall.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getParentCall() {\n return parentCall;\n }", "public void setParentCode(long value) {\n this.parentCode = value;\n }", "public void setParentParamCode(String parentParamCode) {\n this.parentParamCode = parentParamCode;\n }", "public void setParent(String parent) {\...
[ "0.6963653", "0.6111691", "0.6077282", "0.6046915", "0.597374", "0.59645045", "0.5959171", "0.56865984", "0.5682899", "0.5656477", "0.56472623", "0.56284434", "0.56273335", "0.562563", "0.5595407", "0.5592841", "0.55837166", "0.5571515", "0.55430627", "0.5496019", "0.54919666...
0.7573704
0
This method was generated by MyBatis Generator. This method returns the value of the database column t_activity.creat_time
public Date getCreatTime() { return creatTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Long getCreatetime() {\n return createtime;\n }", "public Date getCreate_time() {\n return create_time;\n }", "public Date getCreate_time() {\n return create_time;\n }", "public String getCreatetime() {\r\n return createtime;\r\n }", "public String getCreateti...
[ "0.69933015", "0.68799937", "0.68799937", "0.684795", "0.681001", "0.681001", "0.67431927", "0.67360246", "0.6732505", "0.6732505", "0.6732505", "0.6715015", "0.67076373", "0.6705094", "0.6705094", "0.6705094", "0.6705094", "0.6705094", "0.6705094", "0.6705094", "0.6705094", ...
0.0
-1
This method was generated by MyBatis Generator. This method sets the value of the database column t_activity.creat_time
public void setCreatTime(Date creatTime) { this.creatTime = creatTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCreate_time(Date create_time) {\n this.create_time = create_time;\n }", "public void setCreate_time(Date create_time) {\n this.create_time = create_time;\n }", "public void setCreateTime(Date createTime)\n/* */ {\n/* 184 */ this.createTime = createTime;\n/* */ ...
[ "0.65927374", "0.65927374", "0.6443483", "0.6433874", "0.6433874", "0.6433874", "0.6398198", "0.6375294", "0.6355133", "0.6345474", "0.6345474", "0.6345474", "0.6345474", "0.6345474", "0.6345474", "0.6345474", "0.6345474", "0.63071084", "0.6264123", "0.62581", "0.6185303", ...
0.6582064
3
This method was generated by MyBatis Generator. This method returns the value of the database column t_activity.execute_time
public Date getExecuteTime() { return executeTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.Integer getExecutionTime() {\n return execution_time;\n }", "public java.lang.Integer getExecutionTime() {\n return execution_time;\n }", "public java.util.Date getLastExecuteTime()\n {\n return null;\n }", "public long getExecutionTime() {\n return exec...
[ "0.6555908", "0.65509576", "0.64888006", "0.6437019", "0.6413877", "0.6239091", "0.610971", "0.59936035", "0.5890289", "0.58871573", "0.5844516", "0.581306", "0.581306", "0.58013", "0.5800179", "0.5788481", "0.57782936", "0.5734766", "0.57326066", "0.5685878", "0.56855696", ...
0.733259
0
This method was generated by MyBatis Generator. This method sets the value of the database column t_activity.execute_time
public void setExecuteTime(Date executeTime) { this.executeTime = executeTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Date getExecuteTime() {\n return executeTime;\n }", "public com.autodesk.ws.avro.Call.Builder setExecutionTime(java.lang.Integer value) {\n validate(fields()[7], value);\n this.execution_time = value;\n fieldSetFlags()[7] = true;\n return this; \n }", "protected void set...
[ "0.6506474", "0.62362754", "0.6187394", "0.6153297", "0.6096183", "0.5844879", "0.5787092", "0.56121045", "0.5571581", "0.55251426", "0.5516139", "0.5509209", "0.5503152", "0.5496417", "0.5493956", "0.5493956", "0.54938346", "0.5487301", "0.548326", "0.5465559", "0.54471445",...
0.7265782
0
This method was generated by MyBatis Generator. This method corresponds to the database table t_activity
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", studentName=").append(studentName); sb.append(", mobilePhone=").append(mobilePhone); sb.append(", email=").append(email); sb.append(", parentName=").append(parentName); sb.append(", status=").append(status); sb.append(", parentCall=").append(parentCall); sb.append(", creatTime=").append(creatTime); sb.append(", executeTime=").append(executeTime); sb.append(", serialVersionUID=").append(serialVersionUID); sb.append("]"); return sb.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UserActivityTable getUserActivityById(int id) {\n return daoInterface.getUserActivityById(id);\n\n }", "public Vector listActivityTypeActivity() throws SQLException {\n Debug.print(\"Inside the getUserAndMemberId\");\n Vector vObj = new Vector();\n try {\n makeConn...
[ "0.5910497", "0.57305235", "0.56107545", "0.55392545", "0.5536522", "0.53568655", "0.5321965", "0.5279741", "0.52355665", "0.5229351", "0.5225539", "0.5181333", "0.51621234", "0.51520663", "0.5151841", "0.5126113", "0.5102486", "0.5089619", "0.504985", "0.504508", "0.50120944...
0.0
-1
we expect 2 agents and each agent should have a random location....
@Override public void setup() { ObjectSpace objectSpace = Blackboard.inst().getSpace(ObjectSpace.class, "object"); List<PhysicsObject> objects = objectSpace.getCognitiveAgents(); if (objects.size() != 2) throw new RuntimeException("Need two agents in order to run PathScenario4!"); // first we determine the line between their two points. PhysicsObject obj1 = objects.get(0); PhysicsObject obj2 = objects.get(1); Vec2 direction = obj1.getPPosition().sub(obj2.getPPosition()); Vec2 nDirection = new Vec2(direction); nDirection.normalize(); float radians = (float) Math.atan2(nDirection.y, nDirection.x); float PI = (float) Math.PI; float PI2 = PI * 0.5f; float perp = radians + PI2; Vec2 v = new Vec2((float) Math.cos(perp), (float) Math.sin(perp)); Vec2 offset1 = new Vec2(obj1.getPPosition().add(v)); List<Vec2> waypoints1 = new ArrayList<Vec2>(); waypoints1.add(obj2.getPPosition()); List<Vec2> waypoints2 = new ArrayList<Vec2>(); waypoints2.add(offset1); // Set positions and orientations obj1.getBody().setXForm(obj1.getPPosition(), radians + (float) Math.PI); obj2.getBody().setXForm(obj2.getPPosition(), radians); EventManager.inst().dispatch(new SetWaypoints(waypoints1, obj1)); EventManager.inst().dispatch(new SetWaypoints(waypoints2, obj2)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void Random() {\n\t\tRandom ran =new Random();\r\n\t\trandom=ran.nextInt(6)+1;\r\n\t\t//random=1;\r\n\t\twho=A1063307_GUI.who2;\r\n\t\tif((ch[who].status)>0) {\r\n\t\t\tch[who].location=(ch[who].location)+random;\r\n\t\t\tch[who].status=(ch[who].status)-1;\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\t\treturn;\...
[ "0.6583102", "0.64912", "0.64522797", "0.64461464", "0.63164806", "0.62801236", "0.62301666", "0.62013066", "0.61321723", "0.61163646", "0.6087268", "0.60488665", "0.60338604", "0.60205865", "0.59888", "0.59712446", "0.59702355", "0.5961712", "0.5954176", "0.5942262", "0.5919...
0.5383382
92
Checks the user role before executing command If user doesn't have required role a 403 error page will be displayed
public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws ServletException, IOException { HttpServletRequest request = (HttpServletRequest) req; HttpServletResponse response =(HttpServletResponse) resp; ActionFactory actionFactory = new ActionFactory(); ActionCommand actionCommand = actionFactory.getCommand(request); User user = LoginLogic.user(request); if(actionCommand.checkAccess(user)){ chain.doFilter(req, resp); }else{ response.setStatus(403); logger.error(String.format("Access denied")); request.getRequestDispatcher(PathManager.INSTANCE.getString("path.error403")).forward(req, resp); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n protected void mayProceed() throws InsufficientPermissionException {\n if (ub.isSysAdmin() || ub.isTechAdmin()) {\r\n return;\r\n }\r\n// if (currentRole.getRole().equals(Role.STUDYDIRECTOR) || currentRole.getRole().equals(Role.COORDINATOR)) {// ?\r\n// ...
[ "0.6955113", "0.6473836", "0.63852113", "0.6291834", "0.6193789", "0.61908126", "0.6156318", "0.6111736", "0.6106084", "0.60435456", "0.59596366", "0.5887332", "0.58829564", "0.5856181", "0.5843374", "0.58304185", "0.58269095", "0.5800352", "0.5782858", "0.57714844", "0.57402...
0.0
-1
final StatisticsDTO stats = results.s;
private String resultDTOToString(final ResultDTO results) { final StatisticsDTO stats = results.stats; return obj.travelTime(stats) + ";" + obj.tardiness(stats) + ";" + obj.overTime(stats) + ";" + obj.computeCost(stats); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Embedded\n public Statistics getStatistics() {\n return statistics;\n }", "Map<String, Object> getStats();", "public Stats getStats() {\n if (this.stats == null) {\n this.stats = (Stats) JavaScriptObject.createObject();\n }\n return this.stats;\n }", "public java.util.Map<String,...
[ "0.6483229", "0.6080049", "0.5958593", "0.583475", "0.58160925", "0.5786661", "0.5776779", "0.57757515", "0.5758277", "0.5721278", "0.57186824", "0.56869155", "0.5657026", "0.5647298", "0.5629928", "0.5627558", "0.5594361", "0.55710566", "0.55676097", "0.5553671", "0.55133474...
0.5367271
32
Classifies a case using the decision tree, and then checks the tree's classification against the true classification
public static boolean testTree(Case c, Node tree) { if (tree.isLeaf) { // If this is a result node, return whether the tree result matches the true classification return c.isHealthy == tree.isHealthy; } else { // Else, we find the appropriate value, and then compare that to the threshold to recurse on the correct subtree double value = 0; switch (tree.attribute) { case K: value = c.k; break; case Na: value = c.na; break; case CL: value = c.cl; break; case HCO3: value = c.hco3; break; case Endotoxin: value = c.endotoxin; break; case Aniongap: value = c.aniongap; break; case PLA2: value = c.pla2; break; case SDH: value = c.sdh; break; case GLDH: value = c.gldh; break; case TPP: value = c.tpp; break; case BreathRate: value = c.breathRate; break; case PCV: value = c.pcv; break; case PulseRate: value = c.pulseRate; break; case Fibrinogen: value = c.fibrinogen; break; case Dimer: value = c.dimer; break; case FibPerDim: value = c.fibPerDim; break; } // Recursion if (value < tree.threshold) { return testTree(c, tree.lessThanChildren); } else { return testTree(c, tree.greaterThanChildren); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void classify() {\n\t\ttry {\n\t\t\tdouble pred = classifier.classifyInstance(instances.instance(0));\n\t\t\tSystem.out.println(\"===== Classified instance =====\");\n\t\t\tSystem.out.println(\"Class predicted: \" + instances.classAttribute().value((int) pred));\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSyst...
[ "0.6535951", "0.64383364", "0.63275975", "0.63218015", "0.625521", "0.6119743", "0.60857886", "0.59984004", "0.5930655", "0.5878565", "0.5875035", "0.58679324", "0.5844099", "0.5800225", "0.5786788", "0.57078725", "0.5691424", "0.56565046", "0.562602", "0.55431366", "0.553255...
0.6083699
7
Builds the decision tree based on a training set
public static Node buildTree(ArrayList<Case> cases) { int healthy = 0; // Count the number of healthy cases in the current set for (Case c : cases) { if (c.isHealthy) healthy++; } // If all cases are either healthy or unhealthy, this can be a result node and so is set as such (to the correct value) if (healthy == cases.size() || healthy == 0) { return new Node(cases.get(0).isHealthy); } else { // Otherwise we have a mix, so find the best attribute and matching threshold to split on Attribute attribute = chooseAttribute(cases); double threshold = chooseAttributeThreshold(cases, attribute); Node tree = new Node(); tree.attribute = attribute; tree.threshold = threshold; ArrayList<Case> casesLessThan = new ArrayList<Case>(); ArrayList<Case> casesGreaterThan = new ArrayList<Case>(); // Get the appropriate value and use that to sort into two lists, one for each side of the threshold for (Case c : cases) { double value = 0; switch (attribute) { case K: value = c.k; break; case Na: value = c.na; break; case CL: value = c.cl; break; case HCO3: value = c.hco3; break; case Endotoxin: value = c.endotoxin; break; case Aniongap: value = c.aniongap; break; case PLA2: value = c.pla2; break; case SDH: value = c.sdh; break; case GLDH: value = c.gldh; break; case TPP: value = c.tpp; break; case BreathRate: value = c.breathRate; break; case PCV: value = c.pcv; break; case PulseRate: value = c.pulseRate; break; case Fibrinogen: value = c.fibrinogen; break; case Dimer: value = c.dimer; break; case FibPerDim: value = c.fibPerDim; break; } if (value < threshold) { casesLessThan.add(c); } else { casesGreaterThan.add(c); } } // Recurse on these sets to create subtrees tree.lessThanChildren = buildTree(casesLessThan); tree.greaterThanChildren = buildTree(casesGreaterThan); return tree; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void buildClassifier(Instances trainingData) throws Exception {\n // can classifier handle the data?\n getCapabilities().testWithFail(trainingData);\n\n tree = new MultiInstanceDecisionTree(trainingData);\n }", "static private DecisionTree buildTree(ItemSet learningSet, \n\t\t\t\t\t...
[ "0.7050263", "0.6597628", "0.6594863", "0.63688064", "0.62227607", "0.60909325", "0.6074417", "0.6061895", "0.5916782", "0.58660024", "0.58183944", "0.58083546", "0.5719699", "0.5699036", "0.56734425", "0.566541", "0.56636024", "0.5623859", "0.5612455", "0.5608167", "0.554957...
0.5600783
20
The Information Content function I(p/p+n, n/p+n) from lecture
public static double informationContent(double p, double n) { double pn = p + n; // Modified so that log(0) is treated as 0 if (p == 0) { return ((-p/pn) * 0) - ((n/pn) * (Math.log(n/pn)/Math.log(2))); } else if (n == 0) { return ((-p/pn) * (Math.log(p/pn)/Math.log(2))) - ((n/pn) * 0); } else { return ((-p/pn) * (Math.log(p/pn)/Math.log(2))) - ((n/pn) * (Math.log(n/pn)/Math.log(2))); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Term getP();", "public void PrimInfo(ActionEvent actionEvent)\n {\n try {\n Desktop.getDesktop().browse(new URL(\"https://en.wikipedia.org/wiki/Prim%27s_algorithm\").toURI());\n } catch (IOException e) {\n e.printStackTrace();\n } catch (URISyntaxException e)\n ...
[ "0.54053557", "0.5385912", "0.5382481", "0.530613", "0.52514625", "0.52150804", "0.5195819", "0.5172272", "0.5141877", "0.5136022", "0.51293194", "0.51251173", "0.51086235", "0.5086757", "0.5067879", "0.5063586", "0.4990064", "0.4988011", "0.4979463", "0.49786898", "0.4976559...
0.6790435
0
Based on a set of Cases, finds the attribute that gives the highest information gain This method is fairly ugly, it could definitely be cut down on in length as there is a lot of repeated code, but it is perfectly functional in its current state, just a lot of repetition
public static Attribute chooseAttribute(ArrayList<Case> cases) { Attribute currentBestAttribute = null; double currentBestRemainder = 0; // k double [] kValues = new double[cases.size()]; for (int i = 0 ; i < cases.size() ; i++) { // Extract the correct fields from each case into a separate array for sorting kValues[i] = cases.get(i).k; } Arrays.sort(kValues); for (int i = 0 ; i < cases.size() - 1 ; i++) { // Find the midpoint between two sequential values double midpoint = (kValues[i] + kValues[i+1]) / 2; // A rough way of dealing with non-unique values; two sequential identical values' average will be themselves, so ignore anything coming from such a pairing if (midpoint == kValues[i]) continue; double pless = 0; double nless = 0; double pgreater = 0; double ngreater = 0; for (Case c : cases) { // Count the number of positive and negative cases that exist on either side of the threshold if (c.k < midpoint) { if (c.isHealthy) pless++; else nless++; } else { if (c.isHealthy) pgreater++; else ngreater++; } } // Calculate the remainder as given in lecture slides 17-18 slide 31 double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless)) + ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater)); // We want the attribute that gives the highest information gain, and since information content of the full // set is constant, this is equivalent to the smallest remainder if (remainder < currentBestRemainder || currentBestAttribute == null) { currentBestAttribute = Attribute.K; currentBestRemainder = remainder; } } // na double [] naValues = new double[cases.size()]; for (int i = 0 ; i < cases.size() ; i++) { naValues[i] = cases.get(i).na; } Arrays.sort(naValues); for (int i = 0 ; i < cases.size() - 1 ; i++) { double midpoint = (naValues[i] + naValues[i+1]) / 2; if (midpoint == naValues[i]) continue; double pless = 0; double nless = 0; double pgreater = 0; double ngreater = 0; for (Case c : cases) { if (c.na < midpoint) { if (c.isHealthy) pless++; else nless++; } else { if (c.isHealthy) pgreater++; else ngreater++; } } double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless)) + ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater)); if (remainder < currentBestRemainder) { currentBestAttribute = Attribute.Na; currentBestRemainder = remainder; } } // cl double [] clValues = new double[cases.size()]; for (int i = 0 ; i < cases.size() ; i++) { clValues[i] = cases.get(i).cl; } Arrays.sort(clValues); for (int i = 0 ; i < cases.size() - 1 ; i++) { double midpoint = (clValues[i] + clValues[i+1]) / 2; if (midpoint == clValues[i]) continue; double pless = 0; double nless = 0; double pgreater = 0; double ngreater = 0; for (Case c : cases) { if (c.cl < midpoint) { if (c.isHealthy) pless++; else nless++; } else { if (c.isHealthy) pgreater++; else ngreater++; } } double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless)) + ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater)); if (remainder < currentBestRemainder) { currentBestAttribute = Attribute.CL; currentBestRemainder = remainder; } } // hco3 double [] hco3Values = new double[cases.size()]; for (int i = 0 ; i < cases.size() ; i++) { hco3Values[i] = cases.get(i).hco3; } Arrays.sort(hco3Values); for (int i = 0 ; i < cases.size() - 1 ; i++) { double midpoint = (hco3Values[i] + hco3Values[i+1]) / 2; if (midpoint == hco3Values[i]) continue; double pless = 0; double nless = 0; double pgreater = 0; double ngreater = 0; for (Case c : cases) { if (c.hco3 < midpoint) { if (c.isHealthy) pless++; else nless++; } else { if (c.isHealthy) pgreater++; else ngreater++; } } double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless)) + ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater)); if (remainder < currentBestRemainder) { currentBestAttribute = Attribute.HCO3; currentBestRemainder = remainder; } } // endotoxin double [] endotoxinValues = new double[cases.size()]; for (int i = 0 ; i < cases.size() ; i++) { endotoxinValues[i] = cases.get(i).endotoxin; } Arrays.sort(endotoxinValues); for (int i = 0 ; i < cases.size() - 1 ; i++) { double midpoint = (endotoxinValues[i] + endotoxinValues[i+1]) / 2; if (midpoint == endotoxinValues[i]) continue; double pless = 0; double nless = 0; double pgreater = 0; double ngreater = 0; for (Case c : cases) { if (c.endotoxin < midpoint) { if (c.isHealthy) pless++; else nless++; } else { if (c.isHealthy) pgreater++; else ngreater++; } } double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless)) + ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater)); if (remainder < currentBestRemainder) { currentBestAttribute = Attribute.Endotoxin; currentBestRemainder = remainder; } } // aniongap double [] aniongapValues = new double[cases.size()]; for (int i = 0 ; i < cases.size() ; i++) { aniongapValues[i] = cases.get(i).aniongap; } Arrays.sort(aniongapValues); for (int i = 0 ; i < cases.size() - 1 ; i++) { double midpoint = (aniongapValues[i] + aniongapValues[i+1]) / 2; if (midpoint == aniongapValues[i]) continue; double pless = 0; double nless = 0; double pgreater = 0; double ngreater = 0; for (Case c : cases) { if (c.aniongap < midpoint) { if (c.isHealthy) pless++; else nless++; } else { if (c.isHealthy) pgreater++; else ngreater++; } } double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless)) + ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater)); if (remainder < currentBestRemainder) { currentBestAttribute = Attribute.Aniongap; currentBestRemainder = remainder; } } // pla2 double [] pla2Values = new double[cases.size()]; for (int i = 0 ; i < cases.size() ; i++) { pla2Values[i] = cases.get(i).pla2; } Arrays.sort(pla2Values); for (int i = 0 ; i < cases.size() - 1 ; i++) { double midpoint = (pla2Values[i] + pla2Values[i+1]) / 2; if (midpoint == pla2Values[i]) continue; double pless = 0; double nless = 0; double pgreater = 0; double ngreater = 0; for (Case c : cases) { if (c.pla2 < midpoint) { if (c.isHealthy) pless++; else nless++; } else { if (c.isHealthy) pgreater++; else ngreater++; } } double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless)) + ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater)); if (remainder < currentBestRemainder) { currentBestAttribute = Attribute.PLA2; currentBestRemainder = remainder; } } // sdh double [] sdhValues = new double[cases.size()]; for (int i = 0 ; i < cases.size() ; i++) { sdhValues[i] = cases.get(i).sdh; } Arrays.sort(sdhValues); for (int i = 0 ; i < cases.size() - 1 ; i++) { double midpoint = (sdhValues[i] + sdhValues[i+1]) / 2; if (midpoint == sdhValues[i]) continue; double pless = 0; double nless = 0; double pgreater = 0; double ngreater = 0; for (Case c : cases) { if (c.sdh < midpoint) { if (c.isHealthy) pless++; else nless++; } else { if (c.isHealthy) pgreater++; else ngreater++; } } double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless)) + ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater)); if (remainder < currentBestRemainder) { currentBestAttribute = Attribute.SDH; currentBestRemainder = remainder; } } // gldh double [] gldhValues = new double[cases.size()]; for (int i = 0 ; i < cases.size() ; i++) { gldhValues[i] = cases.get(i).gldh; } Arrays.sort(gldhValues); for (int i = 0 ; i < cases.size() - 1 ; i++) { double midpoint = (gldhValues[i] + gldhValues[i+1]) / 2; if (midpoint == gldhValues[i]) continue; double pless = 0; double nless = 0; double pgreater = 0; double ngreater = 0; for (Case c : cases) { if (c.gldh < midpoint) { if (c.isHealthy) pless++; else nless++; } else { if (c.isHealthy) pgreater++; else ngreater++; } } double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless)) + ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater)); if (remainder < currentBestRemainder) { currentBestAttribute = Attribute.GLDH; currentBestRemainder = remainder; } } // tpp double [] tppValues = new double[cases.size()]; for (int i = 0 ; i < cases.size() ; i++) { tppValues[i] = cases.get(i).tpp; } Arrays.sort(tppValues); for (int i = 0 ; i < cases.size() - 1 ; i++) { double midpoint = (tppValues[i] + tppValues[i+1]) / 2; if (midpoint == tppValues[i]) continue; double pless = 0; double nless = 0; double pgreater = 0; double ngreater = 0; for (Case c : cases) { if (c.tpp < midpoint) { if (c.isHealthy) pless++; else nless++; } else { if (c.isHealthy) pgreater++; else ngreater++; } } double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless)) + ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater)); if (remainder < currentBestRemainder) { currentBestAttribute = Attribute.TPP; currentBestRemainder = remainder; } } // breathRate double [] breathRateValues = new double[cases.size()]; for (int i = 0 ; i < cases.size() ; i++) { breathRateValues[i] = cases.get(i).breathRate; } Arrays.sort(breathRateValues); for (int i = 0 ; i < cases.size() - 1 ; i++) { double midpoint = (breathRateValues[i] + breathRateValues[i+1]) / 2; if (midpoint == breathRateValues[i]) continue; double pless = 0; double nless = 0; double pgreater = 0; double ngreater = 0; for (Case c : cases) { if (c.breathRate < midpoint) { if (c.isHealthy) pless++; else nless++; } else { if (c.isHealthy) pgreater++; else ngreater++; } } double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless)) + ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater)); if (remainder < currentBestRemainder) { currentBestAttribute = Attribute.BreathRate; currentBestRemainder = remainder; } } // pcv double [] pcvValues = new double[cases.size()]; for (int i = 0 ; i < cases.size() ; i++) { pcvValues[i] = cases.get(i).pcv; } Arrays.sort(pcvValues); for (int i = 0 ; i < cases.size() - 1 ; i++) { double midpoint = (pcvValues[i] + pcvValues[i+1]) / 2; if (midpoint == pcvValues[i]) continue; double pless = 0; double nless = 0; double pgreater = 0; double ngreater = 0; for (Case c : cases) { if (c.pcv < midpoint) { if (c.isHealthy) pless++; else nless++; } else { if (c.isHealthy) pgreater++; else ngreater++; } } double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless)) + ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater)); if (remainder < currentBestRemainder) { currentBestAttribute = Attribute.PCV; currentBestRemainder = remainder; } } // pulseRate double [] pulseRateValues = new double[cases.size()]; for (int i = 0 ; i < cases.size() ; i++) { pulseRateValues[i] = cases.get(i).pulseRate; } Arrays.sort(pulseRateValues); for (int i = 0 ; i < cases.size() - 1 ; i++) { double midpoint = (pulseRateValues[i] + pulseRateValues[i+1]) / 2; if (midpoint == pulseRateValues[i]) continue; double pless = 0; double nless = 0; double pgreater = 0; double ngreater = 0; for (Case c : cases) { if (c.pulseRate < midpoint) { if (c.isHealthy) pless++; else nless++; } else { if (c.isHealthy) pgreater++; else ngreater++; } } double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless)) + ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater)); if (remainder < currentBestRemainder) { currentBestAttribute = Attribute.PulseRate; currentBestRemainder = remainder; } } // fibrinogen double [] fibrinogenValues = new double[cases.size()]; for (int i = 0 ; i < cases.size() ; i++) { fibrinogenValues[i] = cases.get(i).fibrinogen; } Arrays.sort(fibrinogenValues); for (int i = 0 ; i < cases.size() - 1 ; i++) { double midpoint = (fibrinogenValues[i] + fibrinogenValues[i+1]) / 2; if (midpoint == fibrinogenValues[i]) continue; double pless = 0; double nless = 0; double pgreater = 0; double ngreater = 0; for (Case c : cases) { if (c.fibrinogen < midpoint) { if (c.isHealthy) pless++; else nless++; } else { if (c.isHealthy) pgreater++; else ngreater++; } } double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless)) + ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater)); if (remainder < currentBestRemainder) { currentBestAttribute = Attribute.Fibrinogen; currentBestRemainder = remainder; } } // dimer double [] dimerValues = new double[cases.size()]; for (int i = 0 ; i < cases.size() ; i++) { dimerValues[i] = cases.get(i).dimer; } Arrays.sort(dimerValues); for (int i = 0 ; i < cases.size() - 1 ; i++) { double midpoint = (dimerValues[i] + dimerValues[i+1]) / 2; if (midpoint == dimerValues[i]) continue; double pless = 0; double nless = 0; double pgreater = 0; double ngreater = 0; for (Case c : cases) { if (c.dimer < midpoint) { if (c.isHealthy) pless++; else nless++; } else { if (c.isHealthy) pgreater++; else ngreater++; } } double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless)) + ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater)); if (remainder < currentBestRemainder) { currentBestAttribute = Attribute.Dimer; currentBestRemainder = remainder; } } // fibPerDim double [] fibPerDimValues = new double[cases.size()]; for (int i = 0 ; i < cases.size() ; i++) { fibPerDimValues[i] = cases.get(i).fibPerDim; } Arrays.sort(fibPerDimValues); for (int i = 0 ; i < cases.size() - 1 ; i++) { double midpoint = (fibPerDimValues[i] + fibPerDimValues[i+1]) / 2; if (midpoint == fibPerDimValues[i]) continue; double pless = 0; double nless = 0; double pgreater = 0; double ngreater = 0; for (Case c : cases) { if (c.fibPerDim < midpoint) { if (c.isHealthy) pless++; else nless++; } else { if (c.isHealthy) pgreater++; else ngreater++; } } double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless)) + ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater)); if (remainder < currentBestRemainder) { currentBestAttribute = Attribute.FibPerDim; currentBestRemainder = remainder; } } return currentBestAttribute; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static double chooseAttributeThreshold(ArrayList<Case> cases, Attribute attribute) {\n\t\tdouble currentBestThreshold = -1;\n\t\tdouble currentBestRemainder = 0;\n\n\t\tdouble [] values = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\t// Create an array of the appropriate f...
[ "0.6499191", "0.5765308", "0.54022", "0.53552985", "0.5194244", "0.518922", "0.5189157", "0.51846284", "0.51598316", "0.515874", "0.51391286", "0.5137646", "0.51013863", "0.5096742", "0.50918394", "0.5072064", "0.50668865", "0.5064764", "0.5051296", "0.502816", "0.5004011", ...
0.7323549
0