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 |
|---|---|---|---|---|---|---|
primero, invocamos el determiante | public String raiz2 (){
float det=determinante(); //se asigna al determinante de arriba
String sol="raiz 2"; //la solucion la evuelve como string
if (det<0){
sol="Raiz imaginaria";
}else {
float r2= (float)(-b- Math.sqrt(det) )/(2*a);
//tambien aplicamos casting pata Math, con (float)
sol="Raiz 2: "+r2; //texto + valor agregado
}
return sol;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void disparar(){}",
"public void restarPunto ( ) {\n\t\tif ( vida > 0 )\n\t\t\tvida--;\n\t}",
"private void priorizar() {\r\n if (ini == fin) {\r\n return;\r\n }\r\n\r\n int t1 = fin, t2 = fin - 1;\r\n TDAPrioridad aux = new TDAPrioridad(0, '0');\r\n while (... | [
"0.703278",
"0.66763115",
"0.6631133",
"0.6598176",
"0.6582145",
"0.65356815",
"0.6419936",
"0.6370483",
"0.63646907",
"0.63529915",
"0.6308851",
"0.629175",
"0.6291203",
"0.6285827",
"0.6262222",
"0.6247099",
"0.61833817",
"0.6170321",
"0.6165937",
"0.61618996",
"0.61582476"... | 0.0 | -1 |
SET y GET son siempre publicos | public float getA() {
return a;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setObservacion(java.lang.String param){\n \n this.localObservacion=param;\n \n\n }",
"public void setOrigen(java.lang.String param){\n \n ... | [
"0.6270304",
"0.61303693",
"0.605633",
"0.5865778",
"0.5806223",
"0.57744545",
"0.57606804",
"0.5695514",
"0.56712246",
"0.5628929",
"0.5611306",
"0.558441",
"0.55738574",
"0.5569942",
"0.55493426",
"0.5542859",
"0.5534069",
"0.5479969",
"0.547156",
"0.54581153",
"0.545781",
... | 0.0 | -1 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {... | [
"0.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.6862... | 0.0 | -1 |
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.action_add_widget) {
selectWidget();
return true;
}
return super.onOptionsItemSelected(item);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ... | [
"0.79041183",
"0.7805934",
"0.77659106",
"0.7727251",
"0.7631684",
"0.7621701",
"0.75839096",
"0.75300384",
"0.74873656",
"0.7458051",
"0.7458051",
"0.7438486",
"0.742157",
"0.7403794",
"0.7391802",
"0.73870087",
"0.7379108",
"0.7370295",
"0.7362194",
"0.7355759",
"0.73454577... | 0.0 | -1 |
For some reason you have to add this empty data, else it won't work | public void addEmptyData(Intent pickIntent) {
ArrayList<AppWidgetProviderInfo> customInfo = new ArrayList<>();
pickIntent.putParcelableArrayListExtra(AppWidgetManager.EXTRA_CUSTOM_INFO, customInfo);
ArrayList<Bundle> customExtras = new ArrayList<>();
pickIntent.putParcelableArrayListExtra(AppWidgetManager.EXTRA_CUSTOM_EXTRAS, customExtras);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public AddData() {\n\t\tsuper();\n\t\tfilled = false;\n\t}",
"@Override\n public String getData()\n {\n return null;\n }",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\... | [
"0.6878185",
"0.6661341",
"0.655141",
"0.655141",
"0.655141",
"0.655141",
"0.655141",
"0.655141",
"0.6491307",
"0.6441555",
"0.6441555",
"0.6415653",
"0.6409541",
"0.64027774",
"0.6368682",
"0.6360613",
"0.6322705",
"0.6322458",
"0.6322458",
"0.6279681",
"0.62350404",
"0.62... | 0.56399363 | 84 |
Show configuration activity of the widget picked by the user | private void configureWidget(Intent data) {
Bundle extras = data.getExtras();
int appWidgetId = extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID, -1);
AppWidgetProviderInfo appWidgetInfo = getAppWidgetManager().getAppWidgetInfo(appWidgetId);
if (appWidgetInfo.configure != null) {
Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_CONFIGURE);
intent.setComponent(appWidgetInfo.configure);
intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
startActivityForResult(intent, REQUEST_CREATE_APPWIDGET);
} else {
createWidget(data);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void widgetSelected(SelectionEvent e) {\n updateLaunchConfigurationDialog();\n }",
"@Override\n public void widgetSelected(SelectionEvent e) {\n updateLaunchConfigurationDialog();\n }",
"private void setConfigElements(... | [
"0.65486467",
"0.65486467",
"0.6248275",
"0.6113269",
"0.59813446",
"0.59537643",
"0.5942697",
"0.59417146",
"0.5897482",
"0.58851975",
"0.5874717",
"0.5862084",
"0.5812451",
"0.5763007",
"0.57534355",
"0.5751446",
"0.5679094",
"0.5670364",
"0.5660256",
"0.5650443",
"0.565034... | 0.65753496 | 0 |
Get an instance of the selected widget as a AppWidgetHostView | public void createWidget(Intent data) {
if (data == null) return;
Bundle extras = data.getExtras();
int appWidgetId = extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID, -1);
AppWidgetProviderInfo appWidgetInfo = getAppWidgetManager().getAppWidgetInfo(appWidgetId);
// Build Launcher-specific widget info and save
LauncherAppWidgetInfo launcherInfo = new LauncherAppWidgetInfo(appWidgetId);
launcherInfo.setHostView(getAppWidgetHost().createView(MainActivity.this, appWidgetId, appWidgetInfo));
launcherInfo.getHostView().setAppWidget(appWidgetId, appWidgetInfo);
WidgetFragment fragment = getCurrentWidgetFragment();
if (fragment != null) {
ItemInfo info = fragment.attachWidget(launcherInfo);
if (info != null) {
WidgetPersistance.addDesktopAppWidget(fragment.getScreen(), info);
}
getAppWidgetHost().startListening();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tprotected AppWidgetHostView onCreateView(Context context, int appWidgetId, AppWidgetProviderInfo appWidget)\n\t{\n\t\tLauncherAppWidgetHostView appWidgetHostView = new LauncherAppWidgetHostView(context);\n\t\tappWidgetHostView.setId(appWidgetId);\n\t\treturn appWidgetHostView;\n\n\t}",
"public Widge... | [
"0.65915114",
"0.6154653",
"0.598636",
"0.5704652",
"0.56798065",
"0.5629776",
"0.562481",
"0.55823445",
"0.55354285",
"0.5446366",
"0.54259527",
"0.54003525",
"0.5396039",
"0.5366278",
"0.53524554",
"0.53438014",
"0.530617",
"0.5295626",
"0.52856493",
"0.5267243",
"0.524113"... | 0.45871702 | 73 |
TODO Autogenerated method stub | @Override
public double promotePrice() {
return price - 10;
} | {
"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 |
Translates only interfaces into xadl. | public void translate(ObjRef brickRef, IMyxBrickExtension extBrick) {
ObjRef typesContextRef = xarch.createContext(xArchRef, "types");
//sets the url of extension point brick id
XadlUtils.setXLinkByHref(xarch, brickRef, "type", MyxBrickExtensionUtils.getExtensionPointPluginUrl(extBrick).toString());
//extension point brink interfaces and its ancestors
Collection<IInterface> extIntfSet = new HashSet<IInterface>();
extIntfSet.addAll(extBrick.getInterfaces());
extIntfSet.addAll(extBrick.getAncestorsExtensionInterfaces());
//creates extension point brick interface url to extension point brick interface map
Map<String, IInterface> extUrlIntfMap = new HashMap<String, IInterface>();
for (IInterface extIntf : extIntfSet) {
extUrlIntfMap.put(MyxBrickExtensionUtils.getExtensionPointPluginUrl(extIntf).toString(), extIntf);
}
//updates existing interface elements of the brickRef
for (ObjRef interfaceEltRef : xarch.getAll(brickRef, "interface")) {
ObjRef typeRef = (ObjRef) xarch.get(interfaceEltRef, "type");
if (typeRef != null) {
String interfaceUrl = XadlUtils.getHref(xarch, typeRef);
IInterface extIntf = extUrlIntfMap.get(interfaceUrl);
if (extIntf != null) {
//updates the existing interface
XadlUtils.setDescription(xarch, interfaceEltRef, extIntf.getName());
XadlUtils.setDirection(xarch, interfaceEltRef, CodeGenXadlPartialTranslator.getXadlDirection(extIntf.getDirection()));
//removes extension point interface from the set
extIntfSet.remove(extIntf);
}
else {
//removes the deleted interface
XadlUtils.remove(xarch, interfaceEltRef);
}
}
else {
//removes the interface that does not have type link
XadlUtils.remove(xarch, interfaceEltRef);
}
}
//adds interface elements into the brickRef
for (IInterface intf : extIntfSet) {
//crates a new interface element
ObjRef interfaceEltRef = xarch.create(typesContextRef, "interface");
XadlUtils.setDescription(xarch, interfaceEltRef, intf.getName());
XadlUtils.setDirection(xarch, interfaceEltRef, CodeGenXadlPartialTranslator.getXadlDirection(intf.getDirection()));
String interfaceId = UIDGenerator.generateUID("interface");
xarch.set(interfaceEltRef, "id", interfaceId);
xarch.add(brickRef, "interface", interfaceEltRef);
//sets the url of extension point brick interface id
XadlUtils.setXLinkByHref(xarch, interfaceEltRef, "type", MyxBrickExtensionUtils.getExtensionPointPluginUrl(intf).toString());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"interface dax {\n}",
"String getInterfaces();",
"public Collection<ClassTranslator> getInterfaces();",
"public interface a extends IInterface {\n}",
"public interface XModule extends ru.awk.spb.xonec.XOneC.XModule\r\n{\r\n}",
"public interface IChws_wdt extends IChws, IWdt{\n\n\tpublic IRI iri();\n\n}",
... | [
"0.61226124",
"0.59461606",
"0.55756986",
"0.52858514",
"0.51657337",
"0.5155865",
"0.51377416",
"0.5118054",
"0.511247",
"0.5089783",
"0.5079998",
"0.50758773",
"0.5050496",
"0.504863",
"0.50350773",
"0.5006167",
"0.5004626",
"0.49986574",
"0.49976194",
"0.49971056",
"0.4993... | 0.0 | -1 |
Gets string expression of the given signature for xadl. | private static String getXadlDirection(Direction direction) {
String strDirection = null;
switch (direction) {
case IN:
strDirection = "in";
break;
case OUT_MULTI:
case OUT_SINGLE:
strDirection = "out";
break;
default:
strDirection = "none";
}
return strDirection;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getSignature();",
"String getSignature();",
"String getSignature();",
"String getExpression();",
"String getExpression();",
"String componentSignature();",
"public String getExpressionString ()\n {\n return toStringToken ((String) getValue ());\n }",
"public String getSignature() {\n\tStr... | [
"0.5977596",
"0.5977596",
"0.5977596",
"0.5944539",
"0.5944539",
"0.59186834",
"0.59127915",
"0.5783235",
"0.57342124",
"0.56706923",
"0.5628871",
"0.5598602",
"0.548467",
"0.54726076",
"0.54243356",
"0.54083425",
"0.54040474",
"0.53651446",
"0.5346047",
"0.522702",
"0.522281... | 0.0 | -1 |
Constructor con entrada de datos | public Profesional(int aniosExperiencia, String departamento,
String titulo, String fechaIngreso) {
super();
this.aniosExperiencia = aniosExperiencia;
this.departamento = departamento;
this.titulo = titulo;
this.fechaIngreso = fechaIngreso;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Datos(){\n }",
"Data() {\n\t\t// dia = 01;\n\t\t// mes = 01;\n\t\t// ano = 1970;\n\t\tthis(1, 1, 1970); // usar um construtor dentro de outro\n\t}",
"public datosTaller() {\n this.cedulaCliente = new int[100]; //Atributo de la clase\n this.nombreCliente = new String[100]; //Atributo ... | [
"0.7580154",
"0.7273661",
"0.7127585",
"0.7064675",
"0.7002654",
"0.6977029",
"0.69725776",
"0.6885026",
"0.6848392",
"0.6845498",
"0.6824955",
"0.6809862",
"0.6758552",
"0.6758552",
"0.6758392",
"0.6755283",
"0.6743805",
"0.67360306",
"0.67281216",
"0.6725815",
"0.67031205",... | 0.0 | -1 |
This is the main method which makes use of Hash function methods. | public static void main(String[] args)
{
int n = 20011;
int m = 20011;
double sum = 0;
//HashTable ht = new HashTable(m);
int[] a = new int[n];
Arrays.fill(a,(-1));
Scanner s = new Scanner(System.in);
System.out.println("Enter a function , hashWorst/hash1/hash2/hash3 :");
String hash = s.next();
try {
HashTable ht = new HashTable(m);
//String hash = "hash3";
BufferedReader inputStream = new BufferedReader(new FileReader("data.tar-1-1"));
//PrintWriter outputStream = new PrintWriter(new FileOutputStream("numbered.txt"));
int count = 0;
String line = inputStream.readLine();
int hashVal;
while (line != null){
//outputStream.println(count + " " + line);
line = inputStream.readLine();
//System.out.println( ht.hash3(line));
if(hash.equals("hash3")){
hashVal = ht.hash3(line);
String z = "" +ht.hash3(line);
if(z != null){
//System.out.println(z);
a[count] = hashVal;
}
else
//a[count] = z;
System.out.println("wwww");}
else if(hash.equals("hash1")){
hashVal = ht.hash1(line);
String z = "" +ht.hash1(line);
if(z != null)
{
//System.out.println(z);
a[count] = hashVal;
}
else
//a[count] = z;
System.out.println("wwww");}
else if(hash.equals("hash2")){
hashVal = ht.hash2(line);
String z = "" +ht.hash2(line);
if(z != null)
{
//System.out.println(z);
a[count] = hashVal;
}
else
//a[count] = z;
System.out.println("wwww");}
/*else if(hash.equals("hash1")){
hashVal = ht.hashWorst(line);
a[count] = hashVal;}*/
else if(hash.equals("hashWorst")){
hashVal = 1;
a[1] = hashVal;
}
else
System.out.print("Enter The correct function !!");
count++;
}
int[] Na = new int[n];
Arrays.fill(Na,(-1));
int[] control = new int[n];
Arrays.fill(control,(-1));
System.out.println("\nHash values | Counts | Probability | -P(x)log10(P(x)):\n");
for(int i = 0; i < n;i++){
// HashTable gt = null;
int c = 0;
if(ht.contains(control,a[i]) == false){
//int c = 0;
for(int j =0;j<n;j++){
if(a[j] == a[i] && a[i] != -1)// && j != i)
c++;
}
double p = (double)c/10000;
double e;
if( p != 0)
e = -p*Math.log(p);
else
e = 0;
sum +=e;
double x = (double)a[i];
System.out.printf("%11.5f |",x);//ln(a[i]+" | "+c + " | "+p +" | " + e );
System.out.printf("%7.5f |", (double)c);
System.out.printf("%12.5f |", (double)p);
System.out.printf("%17.5f |", (double)e);
System.out.println();
control[i] = a[i];
if(a[i]>0)
Na[a[i]] = c;
else if(a[i]<0 && Na[(-1)*a[i]] == -1)
Na[(-1)*a[i]] = c;
}
}
System.out.println("Enthropy H(X) is " + sum);
// System.out.println("\nNumber of #val counts:\n");
//for(int k : Na){
//System.out.println(k);
//}
inputStream.close();
//outputStream.close();
}
catch(FileNotFoundException e) {
System.out.println("Problem opening files."); }
catch(IOException e)
{
System.out.println("Error reading from original.txt.");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String args[]) {\n TestDriver.runHash(100, 1);\r\n\r\n }",
"int getHash();",
"public abstract int getHash();",
"@Override\n public void computeHash(Hasher hasher) {\n }",
"@Test\n public void testHash() {\n // the hash function does sha256, but I guess I do... | [
"0.7555649",
"0.7379242",
"0.71165127",
"0.70282227",
"0.70248026",
"0.69962",
"0.69962",
"0.6933463",
"0.69308835",
"0.6917735",
"0.6884309",
"0.68462354",
"0.6815195",
"0.67743886",
"0.6731807",
"0.66877437",
"0.6681848",
"0.6632476",
"0.6630024",
"0.6614601",
"0.6606207",
... | 0.62942016 | 49 |
This contructor sets the default value of the size to the size entered . | public HashTable(int tableSize){
this.tableSize = tableSize;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void initialize(int size) {\n setMaxSize(size);\n }",
"private void set_size(int size)\r\n\t{\r\n\t\tthis.size = size;\r\n\t}",
"public void setSize(int size){\n this.size = size;\n }",
"public void setSize(int size) {\r\n this.size = size;\r\n }",
"public void setSize(int... | [
"0.7493958",
"0.7478987",
"0.7257732",
"0.71066004",
"0.7077387",
"0.7067914",
"0.70350206",
"0.70256007",
"0.70178926",
"0.6982667",
"0.6982667",
"0.69689655",
"0.69689655",
"0.694543",
"0.6936794",
"0.69317555",
"0.6908228",
"0.6904593",
"0.6893125",
"0.68756557",
"0.687565... | 0.0 | -1 |
This method checks if a value is contained in an array , if found true, if not found false. | public static boolean contains(int[] arr, int item) {
for (int n : arr) {
if (item == n) {
return true;
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean contains(List<NodeId> array, NodeId searchValue) {\n return array != null && array.contains(searchValue);\n }",
"static boolean contains(int[] a, int value){\n int i;\n\n for(i = 0; i < a.length; i++){\n if(a[i] == value) {\n return true;\n ... | [
"0.78394014",
"0.7786134",
"0.7772202",
"0.7380119",
"0.728649",
"0.72848254",
"0.71417624",
"0.6902462",
"0.69004786",
"0.68420225",
"0.68222684",
"0.68176603",
"0.68021935",
"0.67681813",
"0.67648447",
"0.6746542",
"0.6715262",
"0.66590655",
"0.6647472",
"0.66169167",
"0.65... | 0.6403504 | 26 |
This method hashes a full name in the worst case . | public int hashWorst(String key){
int hashVal = 1;
return hashVal;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public int getHash(String name) {\n int x = 0;\n int sum = 0;\n while (x < name.length()) {\n sum += name.charAt(x);\n x++;\n }\n int result = sum % size;\n return result;\n }",
"public static long hashName(String name) {\n\t\t\tlo... | [
"0.70110077",
"0.6941327",
"0.68209404",
"0.66061497",
"0.65413326",
"0.64905894",
"0.6452224",
"0.64510155",
"0.64510155",
"0.6353379",
"0.6311272",
"0.6274493",
"0.62471193",
"0.6239848",
"0.6222622",
"0.61987156",
"0.6188276",
"0.61849046",
"0.6163637",
"0.6122198",
"0.607... | 0.0 | -1 |
This method hashes a full name to add Unicode values . | public int hash1 ( String key )
{
int hashVal = 0;
if(key != null){
for( int i = 0; i < key.length(); i++ )
hashVal += key.charAt(i);
//if(hashVal != 0)
return hashVal % tableSize;
//else
// return 0;
}
else{
//System.out.println("Key is null");
return 0 ;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static long hashName(String name) {\n\t\t\tlong res = 123;\n\t\t\tfor (int i = 0; i < name.length(); ++i) {\n\t\t\t\tres = (res << 8) | (res >>> 56);\n\t\t\t\tres += name.charAt(i);\n\t\t\t\tif ((res & 1) == 0) {\n\t\t\t\t\tres ^= 0x00000000feabfeabL; // Some kind of feedback\n\t\t\t\t}\n\t\t\t}\n\t\t\tres ... | [
"0.5816796",
"0.5635019",
"0.5622899",
"0.5613973",
"0.55775535",
"0.5544908",
"0.5540764",
"0.55279505",
"0.5524406",
"0.5522736",
"0.55085427",
"0.5493908",
"0.5476806",
"0.5459206",
"0.5398391",
"0.5395749",
"0.53865314",
"0.53737473",
"0.5371436",
"0.5370985",
"0.5341058"... | 0.0 | -1 |
This method hashes a full name to add shifted Unicode values . | public int hash2 ( String key )
{
int hashVal = 0;
if(key != null){
for( int i = 0; i < key.length(); i++ )
hashVal = (37 * hashVal) + key.charAt(i);
//if(hashVal != 0)
return hashVal % tableSize;
//else
// return 0;
}
else{
//System.out.println("Key is null");
return 0;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static long hashName(String name) {\n\t\t\tlong res = 123;\n\t\t\tfor (int i = 0; i < name.length(); ++i) {\n\t\t\t\tres = (res << 8) | (res >>> 56);\n\t\t\t\tres += name.charAt(i);\n\t\t\t\tif ((res & 1) == 0) {\n\t\t\t\t\tres ^= 0x00000000feabfeabL; // Some kind of feedback\n\t\t\t\t}\n\t\t\t}\n\t\t\tres ... | [
"0.62151104",
"0.60733813",
"0.58542824",
"0.58368516",
"0.57474416",
"0.57222104",
"0.5709741",
"0.5696965",
"0.5666581",
"0.5661625",
"0.5647868",
"0.56451786",
"0.56407416",
"0.56095576",
"0.5580243",
"0.55683666",
"0.55549943",
"0.55507463",
"0.55376995",
"0.55181444",
"0... | 0.0 | -1 |
A faster hash function that takes advantage of overflow | public int hash3 ( String key )
{
int hashVal = 0;
if(key != null){
for( int i = 0; i < key.length(); i++ ){
hashVal = (37 * hashVal) + key.charAt(i);}
hashVal %= tableSize;
if(hashVal<0)
hashVal += tableSize;
if(hashVal != 0)
return hashVal;
else
return 0;
}
else
{
//System.out.println("Key is null");
return 0;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int _hash(int maximum);",
"static int hash(int h) {\n\t\t // This function ensures that hashCodes that differ only by constant \n\t\t // multiples at each bit position have a bounded number of collisions \n\t\t // (approximately 8 at default load factor).\n\t\th ^= (h >>> 20) ^ (h >>> 12);\n\t\treturn h ^ (h >>>... | [
"0.7834905",
"0.76130676",
"0.7521926",
"0.7392898",
"0.7371331",
"0.7244965",
"0.7118355",
"0.7108791",
"0.71062976",
"0.7098839",
"0.6993424",
"0.6991245",
"0.6961247",
"0.69402766",
"0.69168687",
"0.689151",
"0.6879478",
"0.687342",
"0.6871243",
"0.6871243",
"0.6871243",
... | 0.6544836 | 46 |
A scheduled method to extract the Audit log from DB and export it into Excel on a weekly basis. | @Scheduled(cron = "0 59 23 * * SAT")
public void auditLogExportBatchJob() {
try {
Calendar calendar = Calendar.getInstance();
int currentMonth = calendar.get(Calendar.MONTH);
calendar.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);
if (calendar.get(Calendar.MONTH) != currentMonth) {
calendar.set(Calendar.DAY_OF_MONTH, 1);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
Calendar toCalendar = Calendar.getInstance();
toCalendar.set(Calendar.MONTH, currentMonth - 1);
toCalendar.set(Calendar.DAY_OF_MONTH, toCalendar.getActualMaximum(Calendar.DAY_OF_MONTH));
toCalendar.set(Calendar.HOUR_OF_DAY, 23);
toCalendar.set(Calendar.MINUTE, 59);
toCalendar.set(Calendar.SECOND, 59);
extractAuditLogByDates(calendar.getTime(), toCalendar.getTime());
}
Calendar currntMonthCalendar = Calendar.getInstance();
currntMonthCalendar.set(Calendar.DAY_OF_MONTH, 1);
currntMonthCalendar.set(Calendar.HOUR_OF_DAY, 0);
currntMonthCalendar.set(Calendar.MINUTE, 0);
currntMonthCalendar.set(Calendar.SECOND, 0);
extractAuditLogByDates(currntMonthCalendar.getTime(), new Date());
} catch (Exception e) {
LOGGER.error("Error while extracting Audit data from prive DB...");
LOGGER.error(e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void main_flow_manual_export(String dateFrom, String dateTo) throws SQLException {\n start_operation_complete_monitoring(this);\r\n BuffDBWriterTrell.total_nr_recorded_entries = 0;\r\n //======================\r\n NEW_RECORDS_FOUND = false;\r\n// String last_export_date =... | [
"0.5661913",
"0.55981934",
"0.5580458",
"0.5519234",
"0.55011076",
"0.5444414",
"0.54343617",
"0.5368288",
"0.5323018",
"0.53100485",
"0.5303381",
"0.52815306",
"0.5262931",
"0.5256167",
"0.52211416",
"0.52144396",
"0.5209375",
"0.51988757",
"0.5181354",
"0.5178529",
"0.51666... | 0.72566545 | 0 |
//////////////////////////////////// Tested Methods //////////////////////////////////// findHighestRentProperty() auction() thereIsUnownedProperty() getUnownedProperties() checkShareOfStocks() buyStock() auctionStock() getIdByStockName() | @Test
public void testFindHighestRentProperty() {
Board board = new Board(4);
SquareProperty outer = (SquareProperty)board.getSquareFromBoard(84);
SquareProperty inner = (SquareProperty)board.getSquareFromBoard(53);
outer.rent = 3000;
inner.rent = 4000;
Bank ba = board.bank;
int[] a = ba.findHighestRentProperty(3);
int[] b = ba.findHighestRentProperty(4);
assertTrue("findHighestRentProperty() works",ba.repOk() && (outer.position == a[1] && outer.row == a[0]) && (inner.position == b[1] && inner.row == b[0]));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public FoodItem mostExpensive() {\n FoodItem mostExpensive = null;\n for (int i = 0; i < this._noOfItems; i++) {\n FoodItem currentItem = this._stock[i];\n // if not first, compare the most expensive yet to current,\n // and change the most expensive if current's pric... | [
"0.6158708",
"0.60941124",
"0.6067071",
"0.60623556",
"0.6036995",
"0.59208125",
"0.58788836",
"0.57699305",
"0.5669219",
"0.5661837",
"0.566044",
"0.5650988",
"0.5621015",
"0.55491275",
"0.5516646",
"0.5514178",
"0.5512263",
"0.54921913",
"0.54748094",
"0.5465602",
"0.545786... | 0.678843 | 0 |
Navigate via Intent. The intent must contain a NAVIGATE_ID field with the menu id of the section desired to navigate to. | public void navigateWithIntent(Intent intent) {
mIntent = intent;
if (mIntent != null) {
Bundle args = mIntent.getExtras();
if (args != null) {
int menuId = args.getInt(NAVIGATE_ID);
navigate(menuId);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void goToMenu() {\n Intent intentProfile = new Intent(PregonesActivosActivity.this, MenuInicial.class);\n PregonesActivosActivity.this.startActivity(intentProfile);\n }",
"private void goToNavActivity() {\n Intent i = new Intent(MainActivity.this, NavActivity.class);\n star... | [
"0.63294387",
"0.6072197",
"0.597208",
"0.59360945",
"0.58458316",
"0.58258367",
"0.5796168",
"0.5761857",
"0.5740074",
"0.5710704",
"0.5688775",
"0.5661179",
"0.56559956",
"0.5647973",
"0.56379443",
"0.56039536",
"0.55898654",
"0.55212355",
"0.5519664",
"0.551839",
"0.550760... | 0.74036163 | 0 |
We can allow state loss because the fragment will start for the first time | public void commitFragmentTransaction(FragmentTransaction transaction) {
transaction.commitAllowingStateLoss();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void onFragmentPaused() {\n\t}",
"@Override\r\n\tpublic void onFragmentStart() {\n\t}",
"@Override\r\n\tpublic void onFragmentStop() {\n\t}",
"@Override\r\n\tpublic void onFragmentResume() {\n\t}",
"@Override\r\n\tpublic void onFragmentCreate(Bundle savedInstanceState) {\n\t}",
"@Ov... | [
"0.6654249",
"0.63548285",
"0.6283217",
"0.62251914",
"0.62056535",
"0.61326134",
"0.6048941",
"0.6048941",
"0.6048941",
"0.6048941",
"0.6048941",
"0.6048941",
"0.6035814",
"0.6030018",
"0.602129",
"0.6016329",
"0.5939947",
"0.59234494",
"0.59218085",
"0.59140575",
"0.5870468... | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
String st=sc.nextLine();
int maxcount=0;
int count=0;
char ch='a';
for(int i=0;i<st.length();i++)
{
count=0;
for(int j=i+1;j<st.length();j++)
{
if(st.charAt(i)==st.charAt(j))
{
count++;
}
}
if(count>maxcount)
{
maxcount=count;
ch=st.charAt(i);
}
}
System.out.println(ch);
} | {
"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 |
Information about a depot. You can have multiple Depots in your login view, thus this class should be comparable/sortable. | @Value.Immutable
@JsonDeserialize(as = ImmutableFfbDepotInfo.class)
public interface FfbDepotInfo extends Comparable<FfbDepotInfo> {
static ImmutableFfbDepotInfo.Builder builder() {
return ImmutableFfbDepotInfo.builder();
}
/**
* A name of th depot. Actually, it is much more like a category ("Standarddepot", "VL-Depot", etc.).
*
* @return the Depotname as String.
*/
String getDepotname();
@JsonProperty("depotnummer")
FfbDepotNummer getDepotNummer();
@JsonProperty("bestand")
@JsonDeserialize(using = GermanNumberToBigDecimalDeserializer.class)
BigDecimal getGesamtDepotBestand();
/**
* Each fund is represendet by {@link FfbFondsbestand}.
*
* @return a list of funds.
*/
List<FfbFondsbestand> getFondsbestaende();
/**
* Compare to other by {@link #getDepotNummer()}, {@link #getDepotname()} and {@link #getGesamtDepotBestand()}.
*/
@Override
default int compareTo(final FfbDepotInfo other) {
final Comparator<FfbDepotInfo> comparator = Comparator
.comparing(FfbDepotInfo::getDepotNummer)
.thenComparing(FfbDepotInfo::getDepotname)
.thenComparing(FfbDepotInfo::getGesamtDepotBestand);
return comparator.compare(this,other);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getDepotname();",
"@GetMapping(\"/getDepotList\")\n\tpublic List<Depot> getDepotList() {\n\t\treturn busService.getDepotList();\n\t}",
"public String getDepName() {\n return DepName;\n }",
"@Override\n public boolean equals(Object object)\n {\n if (!(object instanceof Depot))\n ... | [
"0.58235973",
"0.577952",
"0.562819",
"0.5465582",
"0.5234355",
"0.52252597",
"0.50157505",
"0.5008721",
"0.49769157",
"0.49213657",
"0.49061742",
"0.48862898",
"0.48859435",
"0.48704255",
"0.48524222",
"0.48437893",
"0.48386362",
"0.48252288",
"0.4808986",
"0.4807526",
"0.47... | 0.5317301 | 4 |
A name of th depot. Actually, it is much more like a category ("Standarddepot", "VLDepot", etc.). | String getDepotname(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getName() {\n\t\treturn \"Cold Coffee\";\n\t}",
"@Override\n\tpublic java.lang.String getName() {\n\t\treturn _lineaGastoCategoria.getName();\n\t}",
"public String getDepName() {\n return DepName;\n }",
"public String getName ( ) {\r\n\t\treturn \"TASS Mark IV Patches Cat... | [
"0.617362",
"0.6135537",
"0.6044463",
"0.60243237",
"0.60101205",
"0.5866998",
"0.58602107",
"0.58454",
"0.58301324",
"0.5808252",
"0.5806096",
"0.57904875",
"0.5779297",
"0.57787895",
"0.57734233",
"0.5769294",
"0.57623076",
"0.5755828",
"0.5755828",
"0.5755828",
"0.5755828"... | 0.7686667 | 0 |
declares a variable which can be used to transfer messages using intents | @Override
protected void onCreate(Bundle savedInstanceState) { //code executed on creation of the activity
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_view_cwlist); //sets the xml content to display
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void sendMessage() {\n Intent intent = new Intent(this, GoToMessage.class);\n intent.putExtras(getIntent().getExtras());\n Bundle args = new Bundle();\n args.putString(\"nickname\", mNickname);\n //args.putSerializable(\"convoitem\", item);\n args.putSt... | [
"0.60447645",
"0.5980294",
"0.5841254",
"0.5823279",
"0.5804173",
"0.5683666",
"0.5659453",
"0.56554145",
"0.5641702",
"0.563599",
"0.5603712",
"0.55741084",
"0.5571194",
"0.5567978",
"0.5512647",
"0.55102414",
"0.5499526",
"0.5494557",
"0.54933304",
"0.5490035",
"0.54702646"... | 0.0 | -1 |
handles the Order by Name button | public void onClickOrderName(View view){
Intent intent = new Intent(this, ViewOrderedCWListActivity.class); //create a new intent and point it at the ViewOrderedCWList activity
intent.putExtra(EXTRA_MESSAGE, "Name"); //add the "Name" string as a message in the intent, used to differentiate the calls to ViewOrderedCWList
startActivity(intent); //start the new activity
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@FXML\n private void updateNameOrder(ActionEvent event) {\n\n if (sortOrder == Order.NAME_ASC) {\n\n sortOrder = Order.NAME_DESC;\n\n } else if (sortOrder == Order.NAME_DESC) {\n\n sortOrder = Order.DEFAULT;\n\n } else {\n\n sortOrder = Order.NAME_ASC;\n\n }\n\n updateOrderButtons();... | [
"0.75501406",
"0.6553838",
"0.6548652",
"0.64094275",
"0.63370854",
"0.6171022",
"0.61540127",
"0.6019339",
"0.6019007",
"0.5895409",
"0.5886849",
"0.5882019",
"0.587477",
"0.5869047",
"0.58656687",
"0.58487564",
"0.5846268",
"0.5823841",
"0.5819026",
"0.58150196",
"0.5801906... | 0.5981322 | 9 |
handles the Order by Date button | public void onClickOrderDate(View view){
Intent intent = new Intent(this, ViewOrderedCWListActivity.class); //create a new intent and point it at the ViewOrderedCWList activity
intent.putExtra(EXTRA_MESSAGE, "Date"); //add the "Date" string as a message in the intent, used to differentiate the calls to ViewOrderedCWList
startActivity(intent); //start the new activity
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@FXML\n private void updateDateOrder(ActionEvent event) {\n\n if (sortOrder == Order.DATE_ASC) {\n\n sortOrder = Order.DATE_DESC;\n\n } else if (sortOrder == Order.DATE_DESC) {\n\n sortOrder = Order.DEFAULT;\n\n } else {\n\n sortOrder = Order.DATE_ASC;\n\n }\n\n updateOrderButtons();... | [
"0.76820785",
"0.69684684",
"0.68615705",
"0.6824169",
"0.6550582",
"0.6528189",
"0.6474472",
"0.64553607",
"0.64232755",
"0.6385855",
"0.62971026",
"0.62971026",
"0.62857187",
"0.62125176",
"0.61224246",
"0.61130697",
"0.61009574",
"0.6091828",
"0.60733145",
"0.6059535",
"0.... | 0.62571764 | 13 |
handles the Order by Weighting button | public void onClickOrderWeight(View view){
Intent intent = new Intent(this, ViewOrderedCWListActivity.class); //create a new intent and point it at the ViewOrderedCWList activity
intent.putExtra(EXTRA_MESSAGE, "Weight"); //add the "Weight" string as a message in the intent, used to differentiate the calls to ViewOrderedCWList
startActivity(intent); //start the new activity
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onClick(View v) {\n // Add weight back into database\n mWeightDb.addWeight(mSelectedWeight); // Add weight to database\n mWeightAdapter.addWeight(mSelectedWeight); // Add item to lis... | [
"0.6339697",
"0.62977785",
"0.6238218",
"0.61501247",
"0.60002476",
"0.5979027",
"0.59746724",
"0.59740186",
"0.59359306",
"0.59120935",
"0.58828366",
"0.58784646",
"0.58449394",
"0.5844463",
"0.5840643",
"0.58325046",
"0.58205456",
"0.5818198",
"0.58165723",
"0.58084357",
"0... | 0.6466029 | 0 |
A native method that is implemented by the 'nativelib' native library, which is packaged with this application. | public native String stringFromJNI(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private native String native_init();",
"public native String sayHello();",
"private static native void init();",
"private static native void classInitNative();",
"private native long nativeCreateDelegate();",
"public static native void run();",
"public /*static*/ native void init();",
"static native ... | [
"0.7545926",
"0.7270657",
"0.7240605",
"0.7084562",
"0.706658",
"0.7017377",
"0.6974813",
"0.6970278",
"0.69449276",
"0.69324636",
"0.68945926",
"0.68445563",
"0.6813044",
"0.6785555",
"0.67793053",
"0.6761838",
"0.6675699",
"0.6648069",
"0.66197485",
"0.6596017",
"0.65136373... | 0.57822764 | 92 |
assuming arr2 will be of greater length | public int findLongestCommonIncreasingSubsequence(int [] arr, int [] arr2) {
// length of lcs ending at arr2[i]
int [] dp = new int[arr2.length];
for (int i = 0; i < arr.length; i++) {
int current = 0;
for (int j = 0; j < arr2.length; j++) {
if (arr[i] == arr2[j]) {
if (current + 1 > dp[j]) {
dp[j] = current + 1;
}
}
if (arr[i] > arr[j]) {
if (table[j] > current) {
current = table[j];
}
}
}
}
for (int i = 0; i < arr2.length; i++) {
res = Math.max(res, dp[i]);
}
return res;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Cell[] concatArray(Cell[] arr1, Cell[] arr2) {\r\n\t\tCell[] concat = new Cell[arr1.length + arr2.length];\r\n\t\tfor (int k = 0; k < concat.length; k++) {\r\n\t\t\tif (k < arr1.length) {\r\n\t\t\t\tconcat[k] = arr1[k];\r\n\t\t\t} else {\r\n\t\t\t\tconcat[k] = arr2[k - arr1.length];\r\n\t\t\t}\r\n\t\t}\r\n... | [
"0.7125783",
"0.67751276",
"0.66349554",
"0.6621173",
"0.6617112",
"0.66162133",
"0.66078246",
"0.65927947",
"0.65421474",
"0.6541853",
"0.6479052",
"0.64773375",
"0.64570755",
"0.6395907",
"0.63817084",
"0.6263693",
"0.618302",
"0.6170753",
"0.6074183",
"0.605403",
"0.604757... | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
double k=8;
System.out.println(k);
Double v=new Double(); //create object of class Variable
System.out.println(v.i);
System.out.println(j);
} | {
"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 |
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(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 |
Do something with the date chosen by the user | public void onDateSet(DatePicker view, int year, int month, int day) {
SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy");
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.DAY_OF_MONTH, month, day, 0, 0);
calendar.set(Calendar.YEAR, year);
String formatedDate = sdf.format(calendar.getTime());
if (calendar.getTime().before(Calendar.getInstance().getTime())) {
diffInMilis = Calendar.getInstance().getTimeInMillis() - calendar.getTimeInMillis();
diffInDays = diffInMilis / (24 * 60 * 60 * 1000);
if (diffInDays > 21) {
String promptMessage = "Cannot fetch call logs for " + diffInDays
+ " days right now. Please wait for "
+ String.valueOf(diffInDays - 21) + "days";
Toast.makeText(getContext(), promptMessage, Toast.LENGTH_SHORT).show();
}
else {
Toast.makeText(getContext(), "Day before", Toast.LENGTH_SHORT).show();
Intent intent = new Intent(getActivity().getBaseContext(), UserLogsTabs.class);
intent.putExtra("date", calendar.getTime());
intent.putExtra("whenItHappened", "before");
startActivity(intent);
}
}
else if (calendar.getTime().equals(Calendar.getInstance().getTime()))
{
Toast.makeText(getContext(), "Please select a date before the current date",
Toast.LENGTH_SHORT).show();
}
else {
Toast.makeText(getContext(), "Cannot fetch call logs from future", Toast.LENGTH_SHORT).show();
/*Intent intent = new Intent(getActivity(), CallLogStats.class);
intent.putExtra("date", calendar.getTime());
intent.putExtra("whenItHappened", "after");
startActivity(intent);*/
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void promptDate(String date)\n {\n this.date = date;\n }",
"public static void dateDue() {\n Date date = new Date();\r\n SimpleDateFormat formatter = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n String strDate = formatter.format(date);\r\n NewProject.due_date = getInp... | [
"0.76758796",
"0.73965657",
"0.72634137",
"0.72167915",
"0.71526825",
"0.6920045",
"0.6802975",
"0.67794394",
"0.6755281",
"0.6732159",
"0.6707034",
"0.6678944",
"0.66236824",
"0.65955025",
"0.6593093",
"0.6552339",
"0.65486085",
"0.6542835",
"0.6540414",
"0.653116",
"0.65265... | 0.0 | -1 |
Constructor of our display | JImageDisplay(int imWid,int imHei)
{
image = new BufferedImage(imWid,imHei,BufferedImage.TYPE_INT_RGB);
super.setPreferredSize(new java.awt.Dimension(imWid,imHei));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Display() {\n initComponents();\n }",
"public Display()\n {\n setSize(W, H);\n setBackground(Color.BLACK);\n }",
"public ClockDisplay()\r\n\t{\t\t\r\n\t\t\r\n\t\tthis.numberDisplay1 = new NumberDisplay();\r\n\t}",
"public StreamRecorderDisplay() {\n initializ... | [
"0.7964554",
"0.78194743",
"0.76345634",
"0.7293241",
"0.718367",
"0.70705837",
"0.7067453",
"0.7034157",
"0.6806072",
"0.67264754",
"0.67032707",
"0.66422546",
"0.66368055",
"0.66289824",
"0.66191393",
"0.6616411",
"0.6607135",
"0.6589394",
"0.6586438",
"0.6540746",
"0.65354... | 0.0 | -1 |
Set the image to black color | public void clearImage()
{
//Initialize the array of 0s
int arr_len;
if (image.getHeight() > image.getWidth()) arr_len = image.getHeight();
else arr_len = image.getWidth();
int[] rgb = new int[arr_len];
//Set the whole image to black color
image.setRGB(0,0,image.getWidth()-1,image.getHeight()-1,rgb,0,0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void black() {\n g2.setPaint(Color.black);\r\n }",
"public void clear() {\n\t\tfor(int i=0;i<getWidth();i++) {\n\t\t\tfor(int j=0;j<getHeight();j++) {\n\t\t\t\tbImage.setRGB(i, j, 0xffffffff);\n\t\t\t}\n\t\t}\n\t}",
"private Image blackSquare() {\n\t\tWritableImage wImage = new WritableImage(4... | [
"0.7226496",
"0.7121079",
"0.6722626",
"0.6579339",
"0.6477595",
"0.6442529",
"0.64095545",
"0.638918",
"0.6254091",
"0.6247125",
"0.6247088",
"0.6244321",
"0.6240532",
"0.6240532",
"0.61876214",
"0.6178705",
"0.6166386",
"0.61533403",
"0.61026627",
"0.60789216",
"0.60737336"... | 0.7398512 | 0 |
Draws a pixel with a given color to coordinates x,y | public void drawPixel(int x,int y, int rgbColor)
{
image.setRGB(x,y,rgbColor);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void drawPixel(int x, int y, int color);",
"private void paintPointInColor(int x, int y) {\n\t\traster.setDataElements(x, y, model.getDataElements(c.getRGB(), null));\t\t\n\t}",
"public void blitPixel(int x, int y, int color)\n {\n if (x < 0 || x > width - 1 || y < 0 || y >= height - 1)\n ... | [
"0.9196566",
"0.7598309",
"0.73854816",
"0.73791236",
"0.70627254",
"0.7041918",
"0.70412606",
"0.6995724",
"0.69876844",
"0.69661564",
"0.69591945",
"0.6896079",
"0.6861563",
"0.67812693",
"0.67040145",
"0.6646501",
"0.66168267",
"0.65653646",
"0.65581244",
"0.64120567",
"0.... | 0.79350847 | 1 |
returns empty path if there is no path froms start to finish | Path run(Maze maze, Cell start, Cell finish) {
Path path = new Path();
if (start.equals(finish)) {
path.add(start);
return path;
}
Maze changed = new Maze(maze);
CellQueue queue = new CellQueueLinkedListImpl();
queue.enqueue(start);
changed.setCellValue(start, 0);
Cell curCell;
do {
curCell = queue.dequeue();
for (int i = -1; i <= 1; i++) {
for (int j = -1; j <= 1; j++) {
for (int k = -1; k <= 1; k++) {
Cell curNeighbour = new Cell(curCell.x + i, curCell.y + j, curCell.z + k);
//check that curNeighbour exists and empty
if (changed.getCellValue(curNeighbour) == -1) {
changed.setCellValue(curNeighbour, changed.getCellValue(curCell) + 1);
queue.enqueue(curNeighbour);
}
}
}
}
} while (!queue.isEmpty() && !curCell.equals(finish));
if (!curCell.equals(finish)) {
return path;
}
while (!curCell.equals(start)) {
path.addBegin(curCell);
int curPathIndex = changed.getCellValue(curCell);
boolean foundPrev = false;
for (int i = -1; i <= 1 && !foundPrev; i++) {
for (int j = -1; j <= 1 && !foundPrev; j++) {
for (int k = -1; k <= 1 && !foundPrev; k++) {
Cell curNeighbour = new Cell(curCell.x + i, curCell.y + j, curCell.z + k);
if (changed.getCellValue(curNeighbour) == changed.getCellValue(curCell) - 1) {
curCell = curNeighbour;
foundPrev = true;
}
}
}
}
}
path.addBegin(start);
return path;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Stack<MapLocation> returnPath(MapLocation goal, MapLocation start) {\n\t\tStack<MapLocation> path = new Stack<MapLocation>();\n\n\t\tMapLocation iter = goal;\n\t\twhile (iter.cameFrom != null) {\n\t\t\tpath.add(iter.cameFrom);\n\t\t\titer = iter.cameFrom;\n\t\t}\n\t\t// to remove start\n\n\t\tif (path.isEm... | [
"0.67287654",
"0.63687515",
"0.6226247",
"0.6201376",
"0.6181187",
"0.6156275",
"0.6123972",
"0.61165816",
"0.6088893",
"0.6069142",
"0.59422433",
"0.5888258",
"0.58758295",
"0.58758295",
"0.58758295",
"0.58758295",
"0.58758295",
"0.5873202",
"0.58666646",
"0.58621645",
"0.58... | 0.58728 | 18 |
Used in XAMPP Or Any other Local server | public static RetrofitWebService RetrofitInitilizer(){
RestAdapter adapter = new RestAdapter.Builder()
.setEndpoint(DOMAIN) //Setting the Root URL
.build(); //Finally building the adapter
RetrofitWebService api = adapter.create(RetrofitWebService.class);
return api;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void connectToExternalServer()\n\t{\n\t\tbuildConnectionString(\"10.228.6.204\", \"\", \"ctec\", \"student\");\n\t\tsetupConnection();\n\t\t// createDatabase(\"Kyler\");\n\t}",
"public void internetConnectionProble()\n\t\t{\n\n\n\t\t}",
"private String getUrlBaseForLocalServer() {\n\t HttpServletRequ... | [
"0.54969424",
"0.5470993",
"0.5346464",
"0.5283658",
"0.52543503",
"0.5136566",
"0.5136566",
"0.51331407",
"0.5118914",
"0.50864685",
"0.50810707",
"0.507939",
"0.50743514",
"0.5059967",
"0.50510544",
"0.50506014",
"0.50298303",
"0.50249946",
"0.5024601",
"0.50241894",
"0.500... | 0.0 | -1 |
A default constructor used for serialization Constructor for the class | public ExemplarAnswer(Multigraph query) {
this.query = query;
this.nodeWeights = new HashMap<>();
this.totalWeight = 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"defaultConstructor(){}",
"public ClassOne(){\n\t\tthis.age = 55;\t\t// this value won't come while de-serialization.\n\t\tSystem.out.println (\"Default Constructor Running\");\n\t}",
"void DefaultConstructor(){}",
"public ObjectSerializationEncoder() {\n // Do nothing\n }",
"public Data() {\n ... | [
"0.77952176",
"0.74316525",
"0.7426933",
"0.7417527",
"0.7280357",
"0.7203329",
"0.7177219",
"0.715189",
"0.715189",
"0.71454656",
"0.7116045",
"0.7094398",
"0.70705116",
"0.69709843",
"0.6928542",
"0.6904585",
"0.68745273",
"0.6834694",
"0.6826427",
"0.67832386",
"0.67599905... | 0.0 | -1 |
Maps the passed query node to the given node in the graph | public abstract void map(Long queryNode, Long graphNode); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void map(Edge queryEdge, Edge graphEdge);",
"void setNode(int nodeId, double lat, double lon);",
"void setNode(int nodeId, double lat, double lon, double ele);",
"public ResultMap<BaseNode> findNodes(ObjectNode query, String searchTerm, ObjectNode traverse);",
"public ResultMap<BaseNode> f... | [
"0.7041861",
"0.5918594",
"0.5877627",
"0.5858592",
"0.5516523",
"0.5482112",
"0.5465333",
"0.5432997",
"0.5398897",
"0.53729296",
"0.52654785",
"0.5265007",
"0.5264458",
"0.52635634",
"0.52480006",
"0.5244841",
"0.5236442",
"0.5223196",
"0.52207637",
"0.5191788",
"0.518183",... | 0.8302815 | 0 |
Maps the passed query edge to the given edge in the graph | public abstract void map(Edge queryEdge, Edge graphEdge); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void map(Long queryNode, Long graphNode);",
"<O> E getEdge(Function<E, O> map, O value);",
"public abstract boolean hasMapped(Edge queryEdge);",
"protected void processEdge(Edge e) {\n\t}",
"E getEdge(int id);",
"private void addEdge(int from, int to, Edge e) {\n _edges.get(from).s... | [
"0.6873998",
"0.6383922",
"0.59521",
"0.59038013",
"0.5873913",
"0.58702445",
"0.58223426",
"0.5778073",
"0.57592005",
"0.56805205",
"0.56625116",
"0.5639773",
"0.5630779",
"0.56221235",
"0.5612076",
"0.5581531",
"0.5578039",
"0.55729884",
"0.5547589",
"0.55352336",
"0.548543... | 0.851322 | 0 |
check whether the queryNode has already been mapped to a Graph Node | public abstract boolean hasMapped(Long queryNode); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract boolean hasMapped(Edge queryEdge);",
"public abstract boolean isUsing(Long graphNode);",
"boolean hasNodeId();",
"private boolean isQueryNew() throws PipelineNodeException {\n\t\tthis.getCanonicalFormForParameters();\n\n\t\t// get the Id of an evenual existing query identical to the one which... | [
"0.71138865",
"0.6846022",
"0.6513263",
"0.63959014",
"0.62162155",
"0.6199888",
"0.6193555",
"0.61475813",
"0.61475813",
"0.6114424",
"0.6101071",
"0.5977315",
"0.5976937",
"0.5963834",
"0.59460104",
"0.59460104",
"0.59399366",
"0.5930328",
"0.59152246",
"0.5890928",
"0.5846... | 0.74810344 | 0 |
check whether the graphNode has already been mapped to a queryNpde | public abstract boolean isUsing(Long graphNode); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract boolean hasMapped(Long queryNode);",
"public abstract boolean hasMapped(Edge queryEdge);",
"private boolean isQueryNew() throws PipelineNodeException {\n\t\tthis.getCanonicalFormForParameters();\n\n\t\t// get the Id of an evenual existing query identical to the one which is\n\t\t// submitted\n... | [
"0.76863927",
"0.73210335",
"0.6579606",
"0.63258207",
"0.6108778",
"0.60837305",
"0.5968682",
"0.59516746",
"0.59516746",
"0.59516746",
"0.59516746",
"0.59516746",
"0.59516746",
"0.59516746",
"0.59516746",
"0.59516746",
"0.59516746",
"0.59516746",
"0.59516746",
"0.59516746",
... | 0.6466358 | 3 |
check whether the queryEdge has already been mapped to a graphEdge | public abstract boolean hasMapped(Edge queryEdge); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract boolean isUsing(Edge graphEdge);",
"public boolean containsEdge(Edge e){\n\t\treturn edges.containsKey(e.hashCode());\n\t}",
"public boolean hasEdge(Edge e) {\n for (Edge outEdge : outEdges) {\n if (outEdge.equals(e) && e.getTo() == outEdge.getTo()) {\n return t... | [
"0.677933",
"0.64780897",
"0.6392039",
"0.63869864",
"0.6367261",
"0.63508487",
"0.63357323",
"0.63231987",
"0.6295947",
"0.62333596",
"0.62221843",
"0.62213355",
"0.61352634",
"0.61306703",
"0.60529447",
"0.602722",
"0.6023657",
"0.6014532",
"0.5959455",
"0.5955342",
"0.5884... | 0.83218426 | 0 |
check whether the graphEdge has already been mapped to a queryEdge | public abstract boolean isUsing(Edge graphEdge); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract boolean hasMapped(Edge queryEdge);",
"public abstract boolean hasMapped(Long queryNode);",
"public boolean containsEdge(Edge e){\n\t\treturn edges.containsKey(e.hashCode());\n\t}",
"@Override\n\tpublic boolean containsEdge(Edge<?> edge)\n\t{\n\t\treturn edgeList.contains(edge);\n\t}",
"pub... | [
"0.83860016",
"0.6556163",
"0.6417052",
"0.6335431",
"0.63323164",
"0.62898684",
"0.6276972",
"0.6272929",
"0.62519145",
"0.61994797",
"0.6184627",
"0.6151606",
"0.6113072",
"0.6088666",
"0.6020854",
"0.6017651",
"0.60044146",
"0.5996091",
"0.5935599",
"0.589265",
"0.5866231"... | 0.6698398 | 1 |
Builds a graph from the mapped nodes and edges | public abstract Multigraph buildMatchedGraph(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Graph<Integer, DefaultEdge> buildMap();",
"private void initGraph() {\n nodeMap = Maps.newIdentityHashMap();\n stream.forEach(t -> {\n Object sourceKey = sourceId.extractValue(t.get(sourceId.getTableId()));\n Object targetKey = targetId.extractValue(t.get(targetId.getTableId()... | [
"0.7768861",
"0.7226177",
"0.6990131",
"0.6861088",
"0.68558365",
"0.6854957",
"0.67887944",
"0.676785",
"0.6514329",
"0.64596903",
"0.64522386",
"0.6422485",
"0.63161343",
"0.6216887",
"0.6181195",
"0.61707085",
"0.6166502",
"0.61587983",
"0.6133303",
"0.60549724",
"0.604361... | 0.6188065 | 14 |
Adds the weight of the node, replacing if an old one exists | public double addWeight(Long c, Double w) {
Double old;
old = nodeWeights.put(c, w);
if (old != null) {
totalWeight -= old;
totalWeight += w;
} else {
totalWeight += w;
}
return totalWeight;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addWeight(){\n\t\tweight++;\n\t}",
"public void addWeight(int weightToMerge) {\n this.weight += weightToMerge;\n }",
"public void update_weight() {\n this.weights = this.updatedWeights;\n }",
"public void setWeight(int newWeight) {\n weight = newWeight;\n }",
"void ad... | [
"0.7937702",
"0.74078256",
"0.72316176",
"0.71945673",
"0.70822877",
"0.7049385",
"0.6962676",
"0.6707145",
"0.6686282",
"0.6684534",
"0.6666623",
"0.6658172",
"0.6650049",
"0.66472954",
"0.66386914",
"0.6634044",
"0.66281605",
"0.66279304",
"0.6596119",
"0.65892786",
"0.6584... | 0.6926743 | 7 |
Compares based on the total weight | @Override
public int compareTo(ExemplarAnswer other) {
if (other == null) {
throw new NullPointerException("Null object cannot be compared");
}
if (getClass() != other.getClass()) {
throw new ClassCastException("Only RelatedQuery objects can be compared");
}
return (new Double(this.totalWeight)).compareTo(other.getTotalWeight());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean compareWeight(Weight w1, Weight w2){\n return Double.compare(w1.value*w1.unit.baseUnitConversion, w2.value*w2.unit.baseUnitConversion) == 0;\n }",
"public int compare(Person a, Person b){\n int aWeight = (int)a.getWeight();\n int bWeight = (int)b.getWeight();\n retu... | [
"0.6996109",
"0.64384866",
"0.64261675",
"0.6358062",
"0.6303969",
"0.6243567",
"0.622877",
"0.61870223",
"0.6137053",
"0.60656214",
"0.6053497",
"0.60229576",
"0.6020051",
"0.6013449",
"0.59427667",
"0.5937718",
"0.5893805",
"0.5876959",
"0.5862069",
"0.5847242",
"0.5847242"... | 0.0 | -1 |
Adds an edge to a multigraph adding the nodes first when needed; | public static Multigraph smartAddEdge(Multigraph graph, Edge edge, boolean stopIfMissing) {
if (!graph.containsVertex(edge.getSource())) {
if(stopIfMissing){
throw new IllegalStateException("Missing source node for edge "+ edge);
}
graph.addVertex(edge.getSource());
}
if (!graph.containsVertex(edge.getDestination())) {
if(stopIfMissing){
throw new IllegalStateException("Missing destination node for edge "+ edge);
}
graph.addVertex(edge.getDestination());
}
//That a good mapping edge, add to the related query
graph.addEdge(edge.getSource(), edge.getDestination(), edge.getLabel());
return graph;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addEdge(Edge edge){\n \n synchronized(vertexes){\n Long start = edge.getStart();\n Vertex sVertex = vertexes.get(start);\n if(sVertex != null){\n sVertex.addEdge(edge, true);\n }\n// if undirected graph then adds edge to the finis... | [
"0.66980904",
"0.66576236",
"0.6631597",
"0.660256",
"0.6564388",
"0.65026146",
"0.64813095",
"0.6453903",
"0.6447679",
"0.6416433",
"0.64084023",
"0.6395802",
"0.6375341",
"0.63596326",
"0.63120204",
"0.63117576",
"0.6277831",
"0.62595636",
"0.6232189",
"0.6205481",
"0.61933... | 0.6508628 | 5 |
PopulateVisitor constructor to intialize PopulateVisitor class. | public PopulateVisitor(FileProcessor fileIn){
MyLogger.writeMessage("Inside PopulateVisitor constructor",MyLogger.DebugLevel.CONSTRUCTOR);
file = fileIn;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Visitor() {}",
"public Visitante() {\r\n }",
"@Override\n public void visit(NodeVisitor v) {\n if (v.visit(this)) {\n target.visit(v);\n if (initializer != null) {\n initializer.visit(v);\n }\n }\n }",
"public Parser() {\n\t\tpopul... | [
"0.66349465",
"0.57282454",
"0.5428345",
"0.5338875",
"0.51485664",
"0.5070995",
"0.50275224",
"0.5026317",
"0.5012573",
"0.49904406",
"0.49482653",
"0.49422592",
"0.49389717",
"0.49389493",
"0.4921311",
"0.4907069",
"0.48647222",
"0.48561743",
"0.48544437",
"0.48438713",
"0.... | 0.6542436 | 1 |
visit method. Vist method for visitor pattern. | public void visit(TreeBuilder tree){
String line;
while ((line = file.readLine(true)) != null)
{
String[] words = line.split(" ");
for(String word : words){
if(!word.equals("")){
tree.insertNode(word);
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void accept(Visitor visitor);",
"public abstract void visit();",
"void visit(Visitor visitor);",
"public abstract void accept(Visitor v);",
"public void accept(Visitor visitor);",
"@Override\r\n\tpublic void accept(Visitor v) {\r\n\t\tv.visit(this);\t\r\n\t}",
"void accept(Visitor visit... | [
"0.8112397",
"0.81050503",
"0.8087474",
"0.80159944",
"0.7907912",
"0.78649116",
"0.77287525",
"0.7646036",
"0.76394176",
"0.763381",
"0.7626288",
"0.7589164",
"0.7589164",
"0.75292045",
"0.75279486",
"0.75179225",
"0.7495401",
"0.74885136",
"0.7399078",
"0.72923094",
"0.7288... | 0.0 | -1 |
This method will diplay the updated measurement weather data | private void diplay() {
System.out.println(new StringBuilder(HUMIDITY_CONSTANT + humidity + TEMPRETURE_CONSTANT + temp
+ PRESSURE_CONSTANT + pressure));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void displayWeather() throws IOException {\n weather.getWeather();\n weather.notifyObservers();\n window.getWeatherLabel().setText(weatherPrinter.printWeather());\n window.getTemperatureLabel().setText(weatherPrinter.printTemperature());\n window.getMaxTempLabel().setText(... | [
"0.7445696",
"0.70702094",
"0.7019263",
"0.69711953",
"0.68813735",
"0.6829921",
"0.6820543",
"0.68133897",
"0.6781745",
"0.67772007",
"0.6725657",
"0.6675746",
"0.6662387",
"0.6627166",
"0.66034925",
"0.6547745",
"0.654626",
"0.650131",
"0.6398917",
"0.63732445",
"0.63421774... | 0.6529782 | 17 |
For add and update person both | @RequestMapping(value= "/user/add", method = RequestMethod.POST)
public String addUser(@ModelAttribute("user") CreateUsersBean bean,RedirectAttributes redirectAttrs ,HttpServletRequest request) throws NoSuchAlgorithmException{
AdminModuleDao dao = Beans.adminModuleDao;
EditProfileBean profileBean =new EditProfileBean();
profileBean.setUser_id(bean.getSerial_no());
profileBean.setUser_name(bean.getUsername());
profileBean.setFirst_name(bean.getFirstname());
profileBean.setAddress("");
profileBean.setCity("");
profileBean.setEmail_id("name@example.com");
profileBean.setLast_name("");
profileBean.setPhone_number("0123456789");
if((bean.getChanger()).equals("1")){
Session session = dao.getSessionFactory().openSession();
Transaction tx = session.beginTransaction();
session.update(bean);
session.update(profileBean);
tx.commit();
session.close();
redirectAttrs.addFlashAttribute("messenger", MessageDispatcher.message(AuditLog.userActivity("Modified Data of User.",request),true));
}else{
@SuppressWarnings("unused")
boolean i =dao.insertValues(bean);
boolean res=dao.insertValues(profileBean);
if(res){
redirectAttrs.addFlashAttribute("messenger", MessageDispatcher.message("User was created.",true));
redirectAttrs.addFlashAttribute("messenger", MessageDispatcher.message(AuditLog.userActivity("Added new user information.",request),true));
dao.close();
}else{
redirectAttrs.addFlashAttribute("messenger", MessageDispatcher.message("User creation is failed,Try Again.",false));
}
}
return "redirect:/createUser.htm";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void lookupAndSaveNewPerson();",
"public void addPerson(Person p);",
"@Override\r\n\tpublic void update(Person p) \r\n\t{\n\t\t\r\n\t}",
"@Override\r\n\tpublic void update(Person person) {\n\r\n\t}",
"public Person updatePerson(Person pr){\t\n\t\tPerson old_p = new Person(pr.getId());\n\t\tPerson new_p = n... | [
"0.7343239",
"0.692142",
"0.67933285",
"0.6784737",
"0.6768771",
"0.6647801",
"0.66431624",
"0.6572571",
"0.65063465",
"0.6490937",
"0.64854145",
"0.6484291",
"0.6481636",
"0.6473611",
"0.6466653",
"0.64610344",
"0.64592004",
"0.6436795",
"0.64151746",
"0.6402995",
"0.6386466... | 0.0 | -1 |
Plugin interface which is implemented by all kinds of plugins (Operators, CLassifier,...). | public interface Plugin<T> {
/**
* Method returns the hashmap with loaded plugins. </p> Hashmap is inside
* PluginManager class.
*
* @return hashmap with loaded plugins
*/
public HashMap<String, T> getStorage();
/**
* Method adds the plugin specified in pluginClass param into hashmap with
* param key. </p> Hashmap is inside PluginManager class.
*
* @param key
* to hashmap with added plugin
* @param pluginClass
* of type class to save into hashmap
*/
public void addPlugin(String key, T pluginClass);
/**
* Name of the plugin.
*
* @return name of plugin
*/
public String getName();
/**
* Tests if the plugin has any error
*
* @return true if there is any error.
*/
public boolean hasError();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface Plugin {\n void doUsefil();\n}",
"public interface Plugin\n{\n\tpublic String getPluginName();\n}",
"public interface Plugin {\n\n /**************************************************************************\n * Method: starting\n * <p>\n * Starting a plugin requires this meth... | [
"0.71153176",
"0.68611807",
"0.6777271",
"0.67476946",
"0.66914296",
"0.66890174",
"0.6675445",
"0.6600494",
"0.65375894",
"0.6468842",
"0.64489263",
"0.6391207",
"0.6298452",
"0.62880903",
"0.62418926",
"0.61758226",
"0.61574864",
"0.6073088",
"0.60571414",
"0.60547274",
"0.... | 0.64306784 | 11 |
Method returns the hashmap with loaded plugins. Hashmap is inside PluginManager class. | public HashMap<String, T> getStorage(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Collection<Plugin> getPlugins()\n {\n final List<Plugin> plugins;\n synchronized ( this )\n {\n plugins = Arrays.asList(pluginsLoaded.values().toArray(new Plugin[0]));\n }\n return Collections.unmodifiableCollection( plugins );\n }",
"public JSONObject g... | [
"0.7058659",
"0.6948148",
"0.671068",
"0.6461489",
"0.6442092",
"0.6387785",
"0.6335065",
"0.62521785",
"0.6158933",
"0.6136379",
"0.6131197",
"0.60455483",
"0.60241693",
"0.5957077",
"0.5927018",
"0.5924659",
"0.5914378",
"0.5899453",
"0.5853745",
"0.58311164",
"0.57931817",... | 0.0 | -1 |
Method adds the plugin specified in pluginClass param into hashmap with param key. Hashmap is inside PluginManager class. | public void addPlugin(String key, T pluginClass); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface Plugin<T> {\n\t/**\n\t * Method returns the hashmap with loaded plugins. </p> Hashmap is inside\n\t * PluginManager class.\n\t * \n\t * @return hashmap with loaded plugins\n\t */\n\tpublic HashMap<String, T> getStorage();\n\n\t/**\n\t * Method adds the plugin specified in pluginClass param into ha... | [
"0.6047874",
"0.57990557",
"0.57738745",
"0.5665381",
"0.560319",
"0.5599152",
"0.5364425",
"0.5201983",
"0.5134417",
"0.51194745",
"0.511879",
"0.51147777",
"0.50526834",
"0.5038461",
"0.49952868",
"0.49714056",
"0.49420798",
"0.49234426",
"0.48971358",
"0.48889208",
"0.4878... | 0.81183374 | 0 |
Name of the plugin. | public String getName(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getPluginName(){\n\t\treturn pluginName;\n\t}",
"@Override\n public String getPluginName() {\n return null;\n }",
"@Override\n public String getPluginName() {\n return null;\n }",
"public String getName() {\r\n try {\r\n return... | [
"0.8133344",
"0.7967467",
"0.7967467",
"0.77553517",
"0.7230101",
"0.69942313",
"0.6839238",
"0.6732247",
"0.67222714",
"0.67222714",
"0.67222714",
"0.67222714",
"0.67222714",
"0.67222714",
"0.67222714",
"0.67222714",
"0.67222714",
"0.67222714",
"0.67222714",
"0.67222714",
"0... | 0.0 | -1 |
Tests if the plugin has any error | public boolean hasError(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasError();",
"boolean hasError();",
"boolean hasError();",
"boolean isError();",
"public boolean hasErrors();",
"boolean hadErrors();",
"@Override\r\n\tpublic boolean hasError() {\n\t\treturn false;\r\n\t}",
"boolean hasErrors();",
"boolean hasErr();",
"boolean hasErrormessage();",
"pu... | [
"0.7287571",
"0.7287571",
"0.7287571",
"0.7083112",
"0.70801175",
"0.7054225",
"0.70064366",
"0.6927887",
"0.69004065",
"0.6768669",
"0.6685611",
"0.6634579",
"0.6631297",
"0.64636755",
"0.640741",
"0.6368616",
"0.63606435",
"0.63419014",
"0.630502",
"0.6282179",
"0.62693214"... | 0.7465378 | 0 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {... | [
"0.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.6862... | 0.0 | -1 |
Handle action bar card_view_for_weather_forecast_5_day clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
//noinspection SimplifiableIfStatement
switch (id) {
case R.id.action_settings:
activityTransitionIntent(ScreenSetting.class, SETTING_CODE);
break;
case R.id.enter_city_selection2:
activityTransitionIntent(CitySelectionScreen.class, REQUEST_CODE);
break;
case R.id.refresh_the_weather:
presenter.updateWeather();
break;
case R.id.about_app:
initAlertDialogAboutApp(this);
break;
}
return super.onOptionsItemSelected(item);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onClick(View arg0) {\n scanCurrentDay();\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tDailyView.setDaily(c);\n\t\t\t\tstartActivity(new Intent(\"com.calendar.DAILYVIEW\"));\n\n\t\t\t}",
"public void goToForecast(View view) {\n Intent myIntent = ... | [
"0.6200353",
"0.61908317",
"0.58494467",
"0.57580346",
"0.57100093",
"0.5696565",
"0.56666684",
"0.56243455",
"0.5622325",
"0.56024843",
"0.55957276",
"0.5591739",
"0.55913",
"0.5577213",
"0.55574745",
"0.5552722",
"0.5544637",
"0.554078",
"0.55290186",
"0.5508094",
"0.550029... | 0.0 | -1 |
/ access modifiers changed from: packageprivate | @Binds
@IntoMap
@ActivityKey(BaseActivity.class)
public abstract AndroidInjector.Factory<? extends Activity> bindAndroidInjectorFactory(BaseActivitySubcomponent.Builder builder); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private stendhal() {\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n protected void prot() {\n }",
"public void method_4270() {}",
"@Override\n public void func_104112_b() {\n \n }",
"private void m50366E() {\n }",
"private void kk12() {\n\n\t}",
"public final void mo51373a... | [
"0.71513015",
"0.6686406",
"0.6558315",
"0.6482832",
"0.6430476",
"0.63856333",
"0.63838816",
"0.63487375",
"0.6330605",
"0.62764114",
"0.626384",
"0.62509346",
"0.6237325",
"0.62340367",
"0.6228612",
"0.6197973",
"0.6197973",
"0.61952",
"0.6183631",
"0.61797863",
"0.6157397"... | 0.0 | -1 |
System.out.println ( "TrackerWidget::dragAborted" ) ; | @Override
public void dragAborted () {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onDragEnded();",
"static void dragonLost() {\n\n\t\tSystem.exit(0); // This code ends the program\n\t}",
"@Override\n\tpublic void dragDropped() {\n\n\t}",
"@Override\n\tpublic void onDragEnd(boolean success) {\n\t\t\n\t}",
"@Override\n public void onDragEnd() {\n // Do nothing.\n ... | [
"0.6886485",
"0.67602897",
"0.6717501",
"0.66274375",
"0.64950836",
"0.63908505",
"0.63212234",
"0.6314835",
"0.63042516",
"0.63022894",
"0.62975705",
"0.62693965",
"0.62693965",
"0.62693965",
"0.62693965",
"0.62693965",
"0.62693965",
"0.62693965",
"0.62675714",
"0.62641984",
... | 0.8192071 | 0 |
System.out.println ( "TrackerWidget::receiveDrop:" + dropString ) ; | @Override
public void receiveDrop ( String dropString ) {
addAttribute ( WidgetAttribute.valueOf ( dropString ) ) ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void dragDropped() {\n\n\t}",
"void onDropped();",
"@Override\n public void mouseDrop()\n {\n }",
"public void onDropped(StringBuilder sb, char[] buf, int len) {\n }",
"public void onFrameDrop() {}",
"@Override\n\tpublic void handleDrop(Player player, Task task, Game game)... | [
"0.65326405",
"0.65281886",
"0.620278",
"0.61587703",
"0.6047931",
"0.6035673",
"0.5883506",
"0.5877134",
"0.58767647",
"0.58068216",
"0.577779",
"0.57619894",
"0.56647897",
"0.5657766",
"0.5632405",
"0.56165034",
"0.56090355",
"0.55841154",
"0.55755275",
"0.55445886",
"0.554... | 0.6924149 | 0 |
TODO : find which widget is about to be dragged | @Override
public boolean isDropOk () {
return isAllowed ( selectedAttribute ) ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract boolean dragged();",
"public boolean dragFromSubComponents();",
"void onDragged();",
"public void mouseDragged(MouseEvent mEvent) \n {\n /* don't do anything while game is running */\n if(GAME_RUNNING)\n return;\n\n /* TODO: remove debug msg */\n s... | [
"0.72589356",
"0.69377744",
"0.68525153",
"0.6780831",
"0.6697662",
"0.65506923",
"0.6529236",
"0.65026647",
"0.6487153",
"0.6468608",
"0.6468608",
"0.6468608",
"0.6460904",
"0.64532584",
"0.64302987",
"0.64302987",
"0.64130735",
"0.6410894",
"0.64079833",
"0.6407464",
"0.640... | 0.0 | -1 |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_summary_stock, container, false);
/*
sets xml layout control to java controls
*/
stockCategorySpinner = rootView.findViewById(R.id.stockCategorySpinner);
etSearchStock = rootView.findViewById(R.id.etSearchStock);
stockItemsHolder = rootView.findViewById(R.id.stockItemsHolder);
stockCategorySpinner = rootView.findViewById(R.id.stockCategorySpinner);
productArrayList = new ArrayList<>();
stockProductAdapter = new StockProductAdapter(productArrayList);
ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(getContext(),
R.array.stock_search_category, android.R.layout.simple_spinner_item);
// Specify the layout to use when the list of choices appears
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
// Apply the adapter to the spinner
stockCategorySpinner.setAdapter(adapter);
stockCategorySpinner.setOnItemSelectedListener(this);
loadStock();
StockProductCardHolder.setListener(this);
etSearchStock.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void afterTextChanged(Editable editable) {
if(etSearchStock.getText().length() < 1){
loadStock();
}else if(selectedCat.equalsIgnoreCase("product")) {
searchStockProduct(etSearchStock.getText().toString().toLowerCase().trim());
}else if(selectedCat.equalsIgnoreCase("category")) {
searchProductByCategory(etSearchStock.getText().toString().toLowerCase().trim());
}
}
});
return rootView;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup... | [
"0.6739604",
"0.67235583",
"0.6721706",
"0.6698254",
"0.6691869",
"0.6687986",
"0.66869223",
"0.6684548",
"0.66766286",
"0.6674615",
"0.66654444",
"0.66654384",
"0.6664403",
"0.66596216",
"0.6653321",
"0.6647136",
"0.66423255",
"0.66388357",
"0.6637491",
"0.6634193",
"0.66251... | 0.0 | -1 |
todo barry handle error | @Override
public void onCancelled(DatabaseError databaseError) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\t\t\t\t\tpublic void error(Exception e) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}",
"private void correctError()\r\n\t{\r\n\t\t\r\n\t}",
"protected abstract void error(String err);",
"public void inquiryError() {\n\t\t\n\t}",
"public void error();",
"abstract void error(String error);",
"pub... | [
"0.6999458",
"0.69370854",
"0.67742306",
"0.6726768",
"0.66588837",
"0.6601652",
"0.64539975",
"0.64175516",
"0.63516134",
"0.6326169",
"0.63217276",
"0.6312326",
"0.6308666",
"0.630725",
"0.6306992",
"0.62956595",
"0.627297",
"0.6209389",
"0.61843336",
"0.61485404",
"0.61316... | 0.0 | -1 |
delete product from firebase database | @Override
public void onClick(View view) {
productsRef.child(selectedProduct.getProductId()).removeValue().addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
alertDialog.dismiss();
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean deleteProduct(String code, String name , String brand , String price , String quantity) {\n DatabaseReference dR = FirebaseDatabase.getInstance().getReference().child(code);\n\n //removing artist\n Information information = new Information(code, name ,brand ,price ,quantity);\n... | [
"0.7762249",
"0.7486926",
"0.7416997",
"0.7385279",
"0.7113792",
"0.70981145",
"0.70291865",
"0.69992644",
"0.690548",
"0.6901912",
"0.6897898",
"0.68831205",
"0.68722886",
"0.684547",
"0.68241966",
"0.6801685",
"0.67343354",
"0.6713817",
"0.6677251",
"0.6674501",
"0.6660329"... | 0.7522292 | 1 |
Adds a boolean value to the container. | public void add(Boolean value) {
if(size < capacity) {
values.add(value);
size++;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public TupleDesc addBoolean(String name) {\n columns.add(new TupleDescItem(Type.BOOLEAN, name));\n return this;\n }",
"public boolean add(boolean a, boolean b){\n\t\tSystem.out.println(\"i am from method where return type is boolean\");\n\t return true;\n\t}",
"public void putBoolean(String ... | [
"0.70114577",
"0.6934167",
"0.6857561",
"0.6726388",
"0.6726388",
"0.6640023",
"0.6636249",
"0.6623174",
"0.6583466",
"0.6555936",
"0.6511255",
"0.6508762",
"0.648714",
"0.6438279",
"0.6434825",
"0.6365698",
"0.6347954",
"0.6347954",
"0.6345523",
"0.63363886",
"0.629888",
"... | 0.76620364 | 0 |
Return the collected boolean values. | public List<Boolean> getValues() {
return values;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean[] getBooleanList();",
"public boolean[] asSetOfBool() {\n boolean[] rslt = new boolean[this.value.length];\n for (int i=0; i<this.value.length; i++) rslt[i] = this.value[i];\n return rslt;\n }",
"public Iterable<Boolean> getBooleans(String key);",
"public boolean[] getBooleans(){\n\t... | [
"0.75727224",
"0.757016",
"0.7238794",
"0.71645737",
"0.71396834",
"0.68570024",
"0.6730713",
"0.6706602",
"0.64633894",
"0.6448579",
"0.6448579",
"0.6421081",
"0.6420421",
"0.6381892",
"0.6312107",
"0.62941617",
"0.6229141",
"0.6209439",
"0.61748666",
"0.61681247",
"0.614882... | 0.74344975 | 2 |
TODO Autogenerated method stub | public static void main(String[] args) {
String color="blue";
String shirt="shirt";
switch(color)
{
case "blue": shirt="blue"+shirt;
break;
case "red": shirt="red"+shirt;
break;
default : shirt ="white"+shirt;
}
System.out.println("shirt type:"+shirt);
} | {
"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 |
provide program arguments: path_to_file column_separator e.g.: Users/username/data/user_data.csv ; | public static void main(String[] args) {
new Menu(args[0], args[1]).run();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<String[]> readCsv(String inputFilePath, char separator)throws IOException;",
"List<String[]> readCsv(String inputFilePath,int skipLine,char separator)throws IOException;",
"public static void main(String[] args) {\n\t\tSystem.out.println(readCSVFile(System.getProperty(\"user.dir\") + \"/CoffeeShops.csv\")... | [
"0.6278416",
"0.6207726",
"0.59483933",
"0.5915408",
"0.5737727",
"0.5704203",
"0.5649168",
"0.56346554",
"0.5579813",
"0.5578855",
"0.5544813",
"0.5542707",
"0.54861397",
"0.54824936",
"0.5472126",
"0.54650277",
"0.54526263",
"0.54358685",
"0.54046667",
"0.5399698",
"0.53855... | 0.0 | -1 |
Creates an immutable list based on a comma seperated json string | static List<String> getSafeStringArray(String name, JSONObject json)
{
try
{
if (json.has(name))
{
JSONArray array = json.getJSONArray(name);
List<String> ret = new ArrayList<String>();
for (int x = 0; x < array.length(); x++)
ret.add(array.getString(x));
return Collections.unmodifiableList(ret);
}
}
catch (Exception e)
{
}
return new ArrayList<String>();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private ArrayList parseStringToList(String data){\n ArrayList<String> result = new ArrayList<String>();\n String[] splitResult = data.split(\",\");\n for(String substring : splitResult){\n result.add(substring);\n }\n return result;\n }",
"public static <T> List<T... | [
"0.6155943",
"0.61545753",
"0.586841",
"0.57546985",
"0.57135123",
"0.5665864",
"0.5655819",
"0.5587524",
"0.55647284",
"0.5536249",
"0.55158985",
"0.5490712",
"0.5465965",
"0.5447732",
"0.5441996",
"0.54329586",
"0.54249126",
"0.5419968",
"0.54087245",
"0.5402065",
"0.539509... | 0.0 | -1 |
your code goes here | public static void main (String[] args) throws java.lang.Exception
{
Scanner sc=new Scanner(System.in);
int arr[][]=new int[5][5];
for(int i=0;i<5;i++)
{
for(int j=0;j<5;j++)
{
arr[i][j]=sc.nextInt();
}
}
int x=0;
for(int i=0;i<5;i++)
{
for(int j=0;j<5;j++)
{
if(arr[i][j]==1)
x=Math.abs(i-2) +Math.abs(j-2);
}
}
System.out.println(x);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void crawl_data() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}",
"public void themesa()\n {\n \n \n \n \n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"@Overr... | [
"0.57286084",
"0.5721873",
"0.5685595",
"0.5611692",
"0.5611692",
"0.5596448",
"0.5573983",
"0.555654",
"0.55509007",
"0.5543824",
"0.551758",
"0.55170584",
"0.54959154",
"0.5489394",
"0.54819673",
"0.54768246",
"0.5474171",
"0.5460018",
"0.5460018",
"0.5429363",
"0.5428646",... | 0.0 | -1 |
Perform this operation on the given arguments. | void accept(A a, B b, C c); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract Value apply(List<Value> args, Node location);",
"public Object call(Object[] args) {\r\n return invoke(args);\r\n }",
"protected abstract Value execute(final State state, final HashMap<ParameterDef, Value> args) throws SetlException;",
"T call( @Nonnull final Object... args );",
"... | [
"0.62746876",
"0.6247584",
"0.6173091",
"0.60734004",
"0.6060834",
"0.6060053",
"0.6051122",
"0.5947386",
"0.5888166",
"0.5868837",
"0.58635515",
"0.5843392",
"0.58252144",
"0.5817564",
"0.5810864",
"0.57756054",
"0.57631814",
"0.5754605",
"0.5752026",
"0.574921",
"0.57487464... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public Product SelectById(int id) {
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 | public static void main(String[] args) throws IOException {
File file = new File("testeArquivo.txt");
file.createNewFile();
FileWriter writer = new FileWriter(file);
writer.write("Arquivo criado");
writer.flush();
writer.close();
FileReader fr = new FileReader(file);
char [] a = new char[50];
fr.read(a);
for(char c : a){
System.out.println(c);
}
fr.close();
} | {
"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 |
generates a random ChartData object with just one DataSet | private BarData generateDataBar() {
ArrayList<BarEntry> entries = new ArrayList<>();
for (int i = 0; i < 12; i++) {
entries.add(new BarEntry(i, (int) (Math.random() * 70) + 30));
}
BarDataSet d = new BarDataSet(entries, "New DataSet 1");
// 设置相邻的柱状图之间的距离
d.setColors(ColorTemplate.VORDIPLOM_COLORS);
// 设置高亮的透明度
d.setHighLightAlpha(255);
BarData cd = new BarData(d);
cd.setBarWidth(0.9f);
return cd;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private DataSet constantDataSet(){\n DataSet dataSet = new DataSet();\n Task[] tasks = new Task[NUM_DISTINCT_TASKS];\n //generate taks with all 50 mills\n for(int i=0; i < NUM_DISTINCT_TASKS; i++){\n UUID uuid = UUID.randomUUID();\n tasks[i] = new Task(TARGET_MEAN,... | [
"0.66695136",
"0.6340032",
"0.6333443",
"0.63081926",
"0.6284798",
"0.61780196",
"0.616738",
"0.61278",
"0.6105734",
"0.60897595",
"0.60818356",
"0.6080277",
"0.6055647",
"0.60237837",
"0.59734124",
"0.59421015",
"0.5863807",
"0.5846843",
"0.58450556",
"0.5844055",
"0.5839624... | 0.6240886 | 5 |
=================================================================================== Select Entity ============= | public void test_selectEntity_Tx() throws Exception {
// ## Arrange ##
final Integer memberId = 3;
// ## Act ##
long before = currentDate().getTime();
final Member member = jdbcManager.from(Member.class).where("memberId = ?", memberId).getSingleResult();
long after = currentDate().getTime();
// ## Assert ##
assertNotNull(member);
log(member.toString());
assertEquals(memberId, member.memberId);
log("cost: " + convertToPerformanceView(before, after));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract EntitySelect<T> getEntitySelect();",
"abstract protected Entity selectNextEntity();",
"AccessModelEntity selectByPrimaryKey(String id);",
"public E getEntity();",
"public T getSelectedEntity() {\n return selectedEntity;\n }",
"EntityType getEntity();",
"public void select(Gene... | [
"0.73342264",
"0.70077455",
"0.6868837",
"0.6603268",
"0.6545665",
"0.64842814",
"0.6340777",
"0.62895095",
"0.6184373",
"0.61817765",
"0.6171023",
"0.6170429",
"0.61383605",
"0.6083676",
"0.6081053",
"0.6067691",
"0.6065316",
"0.6065316",
"0.60640836",
"0.60638595",
"0.60463... | 0.0 | -1 |
=================================================================================== Select List =========== | public void test_selectList_prefixSearch_Tx() throws Exception {
// ## Arrange ##
final String prefix = "S";
// ## Act ##
final List<Member> memberList = jdbcManager.from(Member.class).where("memberName like ?", prefix + "%")
.orderBy("birthdate desc, memberId asc").getResultList();
// Assert ##
assertNotNull(memberList);
assertNotSame(0, memberList.size());
for (Member member : memberList) {
log(member.toString());
assertTrue(member.memberName.startsWith(prefix));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic List selectList() {\n\t\t\n\t\t\n\t\t\n\t\treturn null;\n\t}",
"@Override\n\tpublic List selectList() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic List<Idol> selectList() {\n\t\treturn session.selectList(\"idols.selectList\");\n\t}",
"@Override\n\tpublic void selectList(RestRequest req... | [
"0.77337223",
"0.734127",
"0.7168742",
"0.6852062",
"0.66638297",
"0.66206694",
"0.65339845",
"0.6516094",
"0.65097666",
"0.6505212",
"0.6423907",
"0.64190257",
"0.6372574",
"0.636237",
"0.63489383",
"0.63489383",
"0.6332227",
"0.6307849",
"0.6307349",
"0.6296078",
"0.6257305... | 0.0 | -1 |
=================================================================================== Type Handling ============= | public void test_Date_utilDateColumn_selects_sqlDate_Tx() throws Exception {
// ## Arrange ##
final Integer memberId = 1;
// ## Act ##
final Member member = jdbcManager.from(Member.class).where("memberId = ?", memberId).getSingleResult();
// ## Assert ##
assertNotNull(member);
log(member.toString());
assertEquals(memberId, member.memberId);
assertEquals(java.sql.Date.class, member.birthdate.getClass());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String g... | [
"0.7595598",
"0.7595598",
"0.7595598",
"0.7595598",
"0.7595598",
"0.7595598",
"0.7595598",
"0.7595598",
"0.7595598",
"0.7595598",
"0.7595598",
"0.7595598",
"0.7595598",
"0.7515235",
"0.7422437",
"0.72943014",
"0.72818804",
"0.72719204",
"0.72719204",
"0.72719204",
"0.72719204... | 0.0 | -1 |
=================================================================================== Performance Cost ================ | public void test_performance_cost_Tx() throws Exception {
// ## Arrange ##
final String prefix = "S";
// ## Act & Assert ##
{
long before = System.currentTimeMillis();
List<Member> memberList = jdbcManager.from(Member.class).where("memberName like ?", prefix + "%").orderBy(
"birthdate desc, memberId asc").getResultList();
long after = System.currentTimeMillis();
log("1-[Performance Cost]: " + convertToPerformanceView(before, after) + " size=" + memberList.size());
}
{
long before = System.currentTimeMillis();
List<Member> memberList = jdbcManager.from(Member.class).where("memberName like ?", prefix + "%").orderBy(
"birthdate desc, memberId asc").getResultList();
long after = System.currentTimeMillis();
log("2-[Performance Cost]: " + convertToPerformanceView(before, after) + " size=" + memberList.size());
}
{
long before = System.currentTimeMillis();
List<Purchase> purchaseList = jdbcManager.from(Purchase.class).where("purchaseDatetime < ?", new Date())
.orderBy("purchaseId asc").getResultList();
long after = System.currentTimeMillis();
log("3-[Performance Cost]: " + convertToPerformanceView(before, after) + " size=" + purchaseList.size());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testPerformance() {\n \t}",
"@Override\r\n public long problem2() {\r\n ArrayList<String> arrList = new ArrayList<>();\r\n long start = System.currentTimeMillis(); \r\n for(int i = 0; i<1234567; i++){\r\n arrList.add(Integer.toString(i));\r\n }\r\n lon... | [
"0.5863761",
"0.5848024",
"0.5757903",
"0.57300824",
"0.55892366",
"0.5539215",
"0.55352205",
"0.5499275",
"0.5497257",
"0.5428451",
"0.541991",
"0.5386119",
"0.5369438",
"0.536794",
"0.536044",
"0.5342582",
"0.5305505",
"0.5304205",
"0.5300577",
"0.5300387",
"0.5284869",
"... | 0.5346567 | 15 |
Also deal with cascades is important but not present. | @RequestMapping(value ="{id}", method =RequestMethod.DELETE)
public void delete(@PathVariable Long id){
sessionRepository.delete(id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"final void checkForComodification() {\n\t}",
"boolean isConsomme();",
"@Override\r\n\tpublic boolean isConcave() {\n\t\treturn false;\r\n\t}",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Boolean isCascadedLookup();",
"boolean hasHas_consequence();",
"public boolean isCascaded() {\r\n ... | [
"0.5577376",
"0.5463451",
"0.5377584",
"0.53060144",
"0.52643204",
"0.5226925",
"0.5133606",
"0.5128625",
"0.5123278",
"0.5078247",
"0.503709",
"0.5017874",
"0.4981755",
"0.49736065",
"0.49608102",
"0.4959658",
"0.49506795",
"0.49324408",
"0.49213448",
"0.49184704",
"0.488801... | 0.0 | -1 |
Determine the provider implementation suitable for byProvider(Class) and delegate the creation of this specific Configuration subclass to the provider. | public T configure() {
if (validationProviderClass == null) {
throw new ValidationException(
"builder is mandatory. Use Validation.byDefaultProvider() to use the generic provider discovery mechanism");
}
// used mostly as a BootstrapState
GenericBootstrapImpl state = new GenericBootstrapImpl();
if (resolver == null) {
resolver = state.getDefaultValidationProviderResolver();
} else {
// stay null if no resolver is defined
state.providerResolver(resolver);
}
List<ValidationProvider<?>> resolvers;
try {
resolvers = resolver.getValidationProviders();
} catch (RuntimeException re) {
throw new ValidationException(
"Unable to get available provider resolvers.", re);
}
for (ValidationProvider<?> provider : resolvers) {
// GWT validation only support exact matches.
if (validationProviderClass.equals(provider.getClass())) {
@SuppressWarnings("unchecked")
ValidationProvider<T> specificProvider = (ValidationProvider<T>) provider;
return specificProvider.createSpecializedConfiguration(state);
}
}
throw new ValidationException("Unable to find provider: "
+ validationProviderClass);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static <T extends Configuration<T>,U extends ValidationProvider<T>>\n ProviderSpecificBootstrap<T> byProvider(Class<U> providerType) {\n return new ProviderSpecificBootstrapImpl<T, U>(providerType);\n }",
"public interface ConfigurationProvider extends ContainerProvider, PackageProvider {\n}",
... | [
"0.6169093",
"0.6021895",
"0.59421676",
"0.58344305",
"0.57508296",
"0.5726076",
"0.568453",
"0.5663438",
"0.5655882",
"0.5616583",
"0.5508485",
"0.55073756",
"0.5478218",
"0.5451953",
"0.5437348",
"0.5432751",
"0.54185826",
"0.5405304",
"0.5405129",
"0.5378476",
"0.53524977"... | 0.6242418 | 0 |
Optionally define the provider resolver implementation used. If not defined, use the default ValidationProviderResolver | public ProviderSpecificBootstrap<T> providerResolver(
ValidationProviderResolver resolver) {
this.resolver = resolver;
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public T configure() {\n if (validationProviderClass == null) {\n throw new ValidationException(\n \"builder is mandatory. Use Validation.byDefaultProvider() to use the generic provider discovery mechanism\");\n }\n // used mostly as a BootstrapState\n GenericBootstrapImpl sta... | [
"0.6316807",
"0.62342995",
"0.5888116",
"0.5679078",
"0.56283706",
"0.555435",
"0.54555464",
"0.54156417",
"0.5410612",
"0.5404699",
"0.53931063",
"0.53885794",
"0.5301632",
"0.52452195",
"0.52389735",
"0.5205818",
"0.5184317",
"0.5172781",
"0.5155584",
"0.51548445",
"0.51336... | 0.72965693 | 0 |
Build and return a ValidatorFactory instance based on the default Bean Validation provider. The provider list is resolved using the default validation provider resolver logic. The code is semantically equivalent to Validation.byDefaultProvider().configure().buildValidatorFactory() | public static ValidatorFactory buildDefaultValidatorFactory() {
return byDefaultProvider().configure().buildValidatorFactory();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static ValidatorFactory getDefault() {\n return DEFAULT_FACTORY;\n }",
"public T configure() {\n if (validationProviderClass == null) {\n throw new ValidationException(\n \"builder is mandatory. Use Validation.byDefaultProvider() to use the generic provider discovery mecha... | [
"0.7142718",
"0.63110465",
"0.57159305",
"0.5659628",
"0.5531108",
"0.524719",
"0.5191746",
"0.5127483",
"0.50975907",
"0.49402517",
"0.49278674",
"0.49129483",
"0.49116874",
"0.4809596",
"0.47977707",
"0.4740678",
"0.47219846",
"0.47102553",
"0.46983632",
"0.4679732",
"0.465... | 0.8489568 | 0 |
Build a Configuration. The provider list is resolved using the strategy provided to the bootstrap state. Configuration<?> configuration = Validation .byDefaultProvider() .providerResolver( new MyResolverStrategy() ) .configure(); ValidatorFactory factory = configuration.buildValidatorFactory(); The first available provider will be returned. | public static GenericBootstrap byDefaultProvider() {
return new GenericBootstrapImpl();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public T configure() {\n if (validationProviderClass == null) {\n throw new ValidationException(\n \"builder is mandatory. Use Validation.byDefaultProvider() to use the generic provider discovery mechanism\");\n }\n // used mostly as a BootstrapState\n GenericBootstrapImpl sta... | [
"0.8184323",
"0.63250756",
"0.57313806",
"0.5672106",
"0.55887026",
"0.54967886",
"0.5370223",
"0.53588325",
"0.5322654",
"0.52826065",
"0.5256567",
"0.523622",
"0.52217597",
"0.51960003",
"0.51473236",
"0.5146684",
"0.50942117",
"0.50929046",
"0.5046965",
"0.5018513",
"0.498... | 0.44863686 | 70 |
Build a Configuration for a particular provider implementation. Optionally overrides the provider resolution strategy used to determine the provider. Used by applications targeting a specific provider programmatically. ACMEConfiguration configuration = Validation.byProvider(ACMEProvider.class) .providerResolver( new MyResolverStrategy() ) .configure(); , where ACMEConfiguration is the Configuration sub interface uniquely identifying the ACME Bean Validation provider. and ACMEProvider is the ValidationProvider implementation of the ACME provider. | public static <T extends Configuration<T>,U extends ValidationProvider<T>>
ProviderSpecificBootstrap<T> byProvider(Class<U> providerType) {
return new ProviderSpecificBootstrapImpl<T, U>(providerType);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public T configure() {\n if (validationProviderClass == null) {\n throw new ValidationException(\n \"builder is mandatory. Use Validation.byDefaultProvider() to use the generic provider discovery mechanism\");\n }\n // used mostly as a BootstrapState\n GenericBootstrapImpl sta... | [
"0.7236493",
"0.53498846",
"0.5257148",
"0.49804366",
"0.49663994",
"0.4965269",
"0.49263263",
"0.4913334",
"0.49019662",
"0.4900174",
"0.48914334",
"0.48690215",
"0.48618868",
"0.48156178",
"0.48056963",
"0.47753376",
"0.474269",
"0.47374493",
"0.47374493",
"0.47175306",
"0.... | 0.5085568 | 3 |
Returns a composite filter of the given filters. | private static SearchFilter compose(Vector<? extends SearchFilter> filters) {
//As a minor optimization, we avoid a few method calls in
//special cases.
if (filters.size() == 0) {
return new AllowFilter();
} else if (filters.size() == 1) {
return filters.get(0);
} else {
SearchFilter[] delegates = new SearchFilter[filters.size()];
filters.copyInto(delegates);
return new CompositeFilter(delegates);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public CompositeFilter(FilteringOperator operator, Filter<T>... filters) {\n\t\tthis.filters = filters;\n\t\tthis.operator = operator;\n\t}",
"public static FilterBuilder filters()\n {\n return new FilterBuilder();\n }",
"private static Filter newFilter()\r\n {\r\n Filter filter = new Fi... | [
"0.7126156",
"0.64891404",
"0.6298864",
"0.6291239",
"0.62622184",
"0.6203915",
"0.62026435",
"0.6155188",
"0.5919843",
"0.58166164",
"0.5731913",
"0.5699675",
"0.56988573",
"0.5640381",
"0.55985683",
"0.55829114",
"0.54747164",
"0.54741836",
"0.54738337",
"0.5462453",
"0.544... | 0.7658234 | 0 |
Notifies the Engine that a phone call was activated on a calling device. | final protected void callActivated( String callId ) {
callActivated( getNativeObject(), callId );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onCallStateChanged(int state, String incomingNumber) {\n if (state == 2) {\n\n String msg = \" New Phone Call Event. Incoming Number : \"+incomingNumber;\n int mID = 1;\n long when = System.currentTimeMillis();\n NotificationManager notificationManager... | [
"0.6842242",
"0.6710788",
"0.6655751",
"0.66024977",
"0.64271027",
"0.6313112",
"0.62679386",
"0.62439495",
"0.62439495",
"0.62166387",
"0.61972684",
"0.6154572",
"0.61490494",
"0.61359096",
"0.6056233",
"0.60461605",
"0.60425204",
"0.599759",
"0.5985261",
"0.5984831",
"0.598... | 0.7076979 | 0 |
Notifies the Engine that an active call was terminated or an ongoing phone call setup was cancelled | final protected void callTerminated( String callId ) {
callTerminated( getNativeObject(), callId );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void EndCall() {\n TelephonyManager TelephonyMgr = (TelephonyManager) cordova.getActivity().getSystemService(Context.TELEPHONY_SERVICE);\n \n try{\n Class clazz = Class.forName(TelephonyMgr.getClass().getName());\n \n Method m... | [
"0.68463653",
"0.68122447",
"0.67391914",
"0.6726458",
"0.65880513",
"0.65418875",
"0.6515909",
"0.65020543",
"0.64099234",
"0.6352544",
"0.62943923",
"0.6113366",
"0.61044776",
"0.6079402",
"0.6077058",
"0.6062605",
"0.6053274",
"0.59775",
"0.59723526",
"0.5970589",
"0.59579... | 0.60179514 | 17 |
Notifies the Engine of a change in connection state of a calling device. | public void connectionStateChanged( ConnectionState state ) {
connectionStateChanged( getNativeObject(), state );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void notifyConnectionStateChanged(State state);",
"protected void onConnectionChanged() {\n mConnectionChangedListener.didChange(mConnection);\n }",
"protected void notifyConnection() {\n connectionListeners.forEach(listener-> listener.connectionChange(this, isConnected()));\n }",
"@Overr... | [
"0.7504997",
"0.7359237",
"0.7025638",
"0.67701876",
"0.66478485",
"0.6422466",
"0.62602645",
"0.6211879",
"0.62060374",
"0.62060374",
"0.6147608",
"0.6146052",
"0.6140223",
"0.61384106",
"0.6085973",
"0.6033357",
"0.60003644",
"0.5984707",
"0.5973839",
"0.59682727",
"0.59638... | 0.62697196 | 6 |
Created by yan on 2016/8/10. | public interface MsgChannelsMapper {
MsgChannels selectById(int id) throws SQLException;
List<MsgChannels> selectChannels(@Param("search_value") String search_value) throws SQLException;
List<MsgChannels> selectAllChannels() throws SQLException;
int insertChannel(MsgChannels msgChannels) throws SQLException;
int updateChannel(MsgChannels msgChannels) throws SQLException;
int deleteByChannelId(int id) throws SQLException;
List<MsgChannels> selectChannelScreen(Map<String, Object> params) throws SQLException;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"private sta... | [
"0.60392433",
"0.59550095",
"0.58594155",
"0.58536786",
"0.58422756",
"0.58422756",
"0.5789378",
"0.5770488",
"0.5744053",
"0.5736863",
"0.56923974",
"0.5688266",
"0.56677085",
"0.56430143",
"0.56352985",
"0.56339264",
"0.5624978",
"0.56248856",
"0.56240284",
"0.56151205",
"0... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table pine_alarm | long countByExample(PineAlarmExample example); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"PineAlarm selectByPrimaryKey(Long pineAlarmId);",
"SBCallAlarm selectByPrimaryKey(@Param(\"mainId\") Integer mainId, @Param(\"alarmId\") Integer alarmId);",
"private void getAlarmsFromDB(){\n \t\tAlarmManager.getInstance().reset();\n \t\tAlarmManager.getInstance().load4DB(ctx, SimpleAlarm.class);\n \t\tStatu... | [
"0.66226864",
"0.62331855",
"0.5784389",
"0.5676232",
"0.55651456",
"0.5556063",
"0.54896426",
"0.5449083",
"0.54301167",
"0.53997916",
"0.5356938",
"0.526222",
"0.52598655",
"0.5226461",
"0.5187891",
"0.5173056",
"0.51718414",
"0.51581275",
"0.5134447",
"0.5128042",
"0.50473... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table pine_alarm | int deleteByExample(PineAlarmExample example); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"PineAlarm selectByPrimaryKey(Long pineAlarmId);",
"SBCallAlarm selectByPrimaryKey(@Param(\"mainId\") Integer mainId, @Param(\"alarmId\") Integer alarmId);",
"private void getAlarmsFromDB(){\n \t\tAlarmManager.getInstance().reset();\n \t\tAlarmManager.getInstance().load4DB(ctx, SimpleAlarm.class);\n \t\tStatu... | [
"0.662179",
"0.62335896",
"0.57859",
"0.56751996",
"0.5565052",
"0.55558884",
"0.5488129",
"0.54484767",
"0.54309213",
"0.53986",
"0.5356317",
"0.52634424",
"0.52595836",
"0.5226362",
"0.5186951",
"0.51736766",
"0.51700497",
"0.5158317",
"0.51369864",
"0.513075",
"0.5047717",... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table pine_alarm | int deleteByPrimaryKey(Long pineAlarmId); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"PineAlarm selectByPrimaryKey(Long pineAlarmId);",
"SBCallAlarm selectByPrimaryKey(@Param(\"mainId\") Integer mainId, @Param(\"alarmId\") Integer alarmId);",
"private void getAlarmsFromDB(){\n \t\tAlarmManager.getInstance().reset();\n \t\tAlarmManager.getInstance().load4DB(ctx, SimpleAlarm.class);\n \t\tStatu... | [
"0.6622558",
"0.62320715",
"0.57815576",
"0.5676552",
"0.5563982",
"0.5555874",
"0.54887265",
"0.544873",
"0.54296345",
"0.53999186",
"0.5353354",
"0.52619725",
"0.52598035",
"0.52261424",
"0.5186841",
"0.5171023",
"0.51702106",
"0.51609004",
"0.5135301",
"0.5128344",
"0.5047... | 0.489168 | 36 |
This method was generated by MyBatis Generator. This method corresponds to the database table pine_alarm | int insert(PineAlarm record); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"PineAlarm selectByPrimaryKey(Long pineAlarmId);",
"SBCallAlarm selectByPrimaryKey(@Param(\"mainId\") Integer mainId, @Param(\"alarmId\") Integer alarmId);",
"private void getAlarmsFromDB(){\n \t\tAlarmManager.getInstance().reset();\n \t\tAlarmManager.getInstance().load4DB(ctx, SimpleAlarm.class);\n \t\tStatu... | [
"0.662179",
"0.62335896",
"0.57859",
"0.56751996",
"0.5565052",
"0.55558884",
"0.5488129",
"0.54484767",
"0.54309213",
"0.53986",
"0.5356317",
"0.52634424",
"0.52595836",
"0.5226362",
"0.5186951",
"0.51736766",
"0.51700497",
"0.5158317",
"0.51369864",
"0.513075",
"0.5047717",... | 0.5042814 | 21 |
This method was generated by MyBatis Generator. This method corresponds to the database table pine_alarm | int insertSelective(PineAlarm record); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"PineAlarm selectByPrimaryKey(Long pineAlarmId);",
"SBCallAlarm selectByPrimaryKey(@Param(\"mainId\") Integer mainId, @Param(\"alarmId\") Integer alarmId);",
"private void getAlarmsFromDB(){\n \t\tAlarmManager.getInstance().reset();\n \t\tAlarmManager.getInstance().load4DB(ctx, SimpleAlarm.class);\n \t\tStatu... | [
"0.66226864",
"0.62331855",
"0.5784389",
"0.5676232",
"0.55651456",
"0.5556063",
"0.54896426",
"0.5449083",
"0.54301167",
"0.53997916",
"0.5356938",
"0.526222",
"0.52598655",
"0.5226461",
"0.5187891",
"0.5173056",
"0.51718414",
"0.51581275",
"0.5134447",
"0.5128042",
"0.50473... | 0.49681515 | 28 |
This method was generated by MyBatis Generator. This method corresponds to the database table pine_alarm | PineAlarm selectOneByExample(PineAlarmExample example); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"PineAlarm selectByPrimaryKey(Long pineAlarmId);",
"SBCallAlarm selectByPrimaryKey(@Param(\"mainId\") Integer mainId, @Param(\"alarmId\") Integer alarmId);",
"private void getAlarmsFromDB(){\n \t\tAlarmManager.getInstance().reset();\n \t\tAlarmManager.getInstance().load4DB(ctx, SimpleAlarm.class);\n \t\tStatu... | [
"0.662179",
"0.62335896",
"0.57859",
"0.56751996",
"0.5565052",
"0.55558884",
"0.5488129",
"0.54484767",
"0.54309213",
"0.53986",
"0.5356317",
"0.52634424",
"0.52595836",
"0.5226362",
"0.5186951",
"0.51736766",
"0.51700497",
"0.5158317",
"0.51369864",
"0.513075",
"0.5047717",... | 0.50086045 | 22 |
This method was generated by MyBatis Generator. This method corresponds to the database table pine_alarm | PineAlarm selectOneByExampleSelective(@Param("example") PineAlarmExample example, @Param("selective") PineAlarm.Column ... selective); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"PineAlarm selectByPrimaryKey(Long pineAlarmId);",
"SBCallAlarm selectByPrimaryKey(@Param(\"mainId\") Integer mainId, @Param(\"alarmId\") Integer alarmId);",
"private void getAlarmsFromDB(){\n \t\tAlarmManager.getInstance().reset();\n \t\tAlarmManager.getInstance().load4DB(ctx, SimpleAlarm.class);\n \t\tStatu... | [
"0.6622558",
"0.62320715",
"0.57815576",
"0.5676552",
"0.5563982",
"0.5555874",
"0.54887265",
"0.544873",
"0.54296345",
"0.53999186",
"0.5353354",
"0.52619725",
"0.52598035",
"0.52261424",
"0.5186841",
"0.51702106",
"0.51609004",
"0.5135301",
"0.5128344",
"0.50474286",
"0.504... | 0.5171023 | 15 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.