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
/ setHours takes in a number of hours and changes the value in this class.
public void setHours(double hours) { // if hours is negative, hours is 0 if (hours < 0) { this.hours = 0; } else { this.hours = hours; } // calls calculateSalary to update the salary once hours is changed calculateSalary(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setHours(int hours) {\n this.hours = hours;\n }", "public void setHours(double hours) {\r\n this.hours = hours;\r\n }", "public void setHours(int hours) {\n\t\tthis.hours = hours;\n\t}", "public final native double setHours(int hours) /*-{\n this.setHours(hours);\n retur...
[ "0.86080426", "0.8550554", "0.84580237", "0.8189267", "0.812148", "0.79304314", "0.77897227", "0.7690417", "0.7604701", "0.7582564", "0.7467344", "0.73999894", "0.7361184", "0.73319507", "0.7325685", "0.7284696", "0.72845745", "0.7281428", "0.7255354", "0.7220082", "0.7213823...
0.80615896
5
/ setHourlyRate takes in an hourlyRate and changes the value in this class.
public void setHourlyRate (double hourlyRate) { // if hourlyRate is negative, hourlyRate is 0 if (hourlyRate < 0) { this.hourlyRate = 0; } else { this.hourlyRate = hourlyRate; } // calls calculateSalary to update the salary once hourlyRate is changed calculateSalary(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setHourlyRate(double hr)\n\t{\n\t\thourlyRate = hr;\n\t}", "public void setHourlyRate(double rate) {\n\t\tthis.hourlyRate = rate;\n\t}", "public final void setHourlyRate(double hourlyRate) {\n if(hourlyRate < 0 || hourlyRate > 500) {\n throw new IllegalArgumentException();\n ...
[ "0.8471583", "0.8265672", "0.8163461", "0.723607", "0.707587", "0.69363993", "0.63214326", "0.63214326", "0.62387866", "0.623752", "0.6133119", "0.5921855", "0.58927065", "0.58912003", "0.58807904", "0.5879025", "0.58480257", "0.5813552", "0.579544", "0.5781496", "0.5775624",...
0.85256827
0
calculates the salary if hours or hourlyRate is negative (default constructor sets numerical values as 1) salary is set to 1
public void calculateSalary() { if (hours < 0 || hourlyRate < 0) { salary = -1; } else if (hours > 40) { salary = 40 * hourlyRate; } else { salary = hours * hourlyRate; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public double calculateSalary(){\n return this.horas_trabajadas*EmployeeByHours.VALOR_HORA;\n }", "@Override\r\n\tpublic void calculateSalary() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t salary = hoursWorked * hourlyWages;\r\n\t\t this.setSalary(salary);\r\n\t}", "@Override\n\...
[ "0.7480295", "0.7362118", "0.7081426", "0.6925239", "0.6914758", "0.6712601", "0.66968864", "0.6671633", "0.6662578", "0.6651097", "0.6645616", "0.66426075", "0.66364944", "0.66351223", "0.6619089", "0.65690374", "0.6564011", "0.6564011", "0.6479813", "0.6378806", "0.63644034...
0.85979265
0
/ getHours returns hours.
public double getHours() { return hours; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getHours();", "private int getHours() {\n //-----------------------------------------------------------\n //Preconditions: none.\n //Postconditions: returns the value for the data field hours.\n //-----------------------------------------------------------\n\n return this.hours;\n\n }", ...
[ "0.86111104", "0.8386721", "0.8383781", "0.81674373", "0.80672187", "0.80297196", "0.7982228", "0.78927356", "0.7829337", "0.7638996", "0.7582536", "0.741729", "0.73702365", "0.73017037", "0.7286979", "0.7284753", "0.7275602", "0.72627336", "0.7201203", "0.7156308", "0.711549...
0.84417
2
/ getHourlyRate returns hourlyRate.
public double getHourlyRate() { return hourlyRate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getHourlyRate () {\n\t\treturn this.hourlyRate;\n\t}", "public double getHourlyRate()\n\t{\n\t\treturn hourlyRate;\n\t}", "public double getHourlyRate() {\n return hourlyRate;\n }", "@Override\n\tpublic Money hourlyCostRate() {\n\t\treturn costRate().hourly();\n\t}", "public void se...
[ "0.82548916", "0.82528675", "0.8100059", "0.75447536", "0.6790621", "0.67593056", "0.65976244", "0.6474137", "0.6423562", "0.6327625", "0.61703694", "0.608585", "0.5998591", "0.58754086", "0.5837485", "0.5775748", "0.576289", "0.5742493", "0.57370424", "0.5736807", "0.5736807...
0.8122259
3
/ getSalary returns salary.
@Override public double getSalary() { return salary; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getSalary();", "public double getSalary() {\r\n return salary;\r\n }", "public double getSalary() {\n\t\treturn salary;\n\t}", "public double getSalary() {\n return salary;\n }", "public double getSalary() {\n return salary;\n }", "public double getSalary() {\n re...
[ "0.85024947", "0.8284071", "0.8237957", "0.8224502", "0.8224502", "0.8224502", "0.81981385", "0.81981385", "0.81902957", "0.816307", "0.8150094", "0.80971324", "0.8043527", "0.7963066", "0.79046065", "0.78362274", "0.7688823", "0.75420004", "0.74802935", "0.74485093", "0.7432...
0.8135028
11
/ earnings returns a sum of the total pay for every hour, plus any overtime pay.
public double earnings() { double earnings; double overtime; double overtimeRate = hourlyRate * 1.5; // if hours, hourlyRate, or salary is negative (default numerical values are -1) earnings is -1 if (hours < 0 || hourlyRate < 0 || salary < 0) { earnings = -1; } else if (hours > 40) { overtime = (hours - 40) * overtimeRate; earnings = overtime + salary; } else { earnings = salary; } return earnings; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public double earnings() {\n if (getHours() < 40)\n return getWage() * getHours();\n else\n return 40 * getWage() + ( getHours() - 40 ) * getWage() * 1.5;\n }", "public double getEarnings() {\n//\t\tif (hoursWorked > 40) {\n//\t\t\treturn (40 * hoursWorked) +...
[ "0.6842553", "0.6526291", "0.63828045", "0.6339227", "0.6314439", "0.6260594", "0.6225932", "0.60392314", "0.6023182", "0.59118944", "0.58557755", "0.5850557", "0.58188957", "0.58141977", "0.5775587", "0.5753333", "0.5683264", "0.5659692", "0.56583166", "0.561138", "0.5576179...
0.73115736
0
/ toString returns a string of all the variable values associated with an HourlyWorker
@Override public String toString () { return "HourlyWorker: " + hours + ", " + hourlyRate + ", " + salary + ", " + super.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString()\r\n {\r\n /* write code to return a string representation of a PieceWorker */\r\n return String.format( \"%s %s; %s: $%,.2f; %s: %.0f\", \r\n \"piece worker: \", super.toString(), \r\n \"wage per piece\", getWage(), \r\n \"pieces produced\", getPieces()...
[ "0.6828306", "0.6570062", "0.6478664", "0.63834375", "0.63390195", "0.6333048", "0.6257045", "0.62567675", "0.6251235", "0.6212303", "0.620701", "0.6181665", "0.61793387", "0.6140903", "0.6126561", "0.6118161", "0.6111878", "0.6108444", "0.61029494", "0.6099939", "0.6097104",...
0.70656693
0
creating 2 hourly workers each with different constructor
public static void main(String[] args) { HourlyWorker worker1 = new HourlyWorker("Adam", "G", "P0489951", 30, 15.00); HourlyWorker worker2 = new HourlyWorker(); // testing all getters on worker1 System.out.println("first name: " + worker1.getFirstName()); System.out.println("last name: " + worker1.getLastName()); System.out.println("employee ID: " + worker1.getID()); System.out.println("hours: " + worker1.getHours()); System.out.println("hourly rate: " + worker1.getHourlyRate()); System.out.println("salary: " + worker1.getSalary()); System.out.println("earnings: " + worker1.earnings()); System.out.println(worker1.toString()); System.out.println(); // testing all setters on worker2 System.out.println(worker2.toString()); worker2.setFirstName("Erica"); worker2.setLastName("Erikson"); worker2.setID("P0626585"); worker2.setHours(55); worker2.setHourlyRate(13.15); worker2.calculateSalary(); System.out.println("earnings: " + worker2.earnings()); System.out.println(worker2.toString()); System.out.println(); // testing incorrect input worker1.setHours(-2443); worker1.setHourlyRate(-2323); worker1.calculateSalary(); System.out.println(worker1.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public HourlyWorker() {\n\t\tthis.num_hours = 1;\n\t\tthis.hourly_rate = 0.01;\n\t}", "public void createWorker(Worker worker){\n }", "public HourlyWorker () {\r\n super ();\r\n hours = -1;\r\n hourlyRate = -1;\r\n salary = -1;\r\n }", "public Worker(){\n\n }", "public...
[ "0.69365233", "0.65187484", "0.6364863", "0.5975172", "0.5973579", "0.58210176", "0.5820372", "0.5769778", "0.57489395", "0.56965137", "0.5693068", "0.56927097", "0.56713146", "0.5633121", "0.56315935", "0.5618838", "0.56143445", "0.5613934", "0.56026304", "0.5580347", "0.557...
0.5300017
52
This method will be called once per scheduler run
@Override public void periodic() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void periodic() {\n // This method will be called once per scheduler run\n }", "@Override\r\n\tpublic void doInitialSchedules() {\n\t}", "@Override\n public void autonomousPeriodic() {\n \n Scheduler.getInstance().run();\n \n }", "protected abstract void scheduler_i...
[ "0.79959375", "0.71370137", "0.7053971", "0.6965585", "0.69561255", "0.6893155", "0.68800586", "0.6876765", "0.67826825", "0.67659134", "0.6764156", "0.67577356", "0.6701485", "0.6687244", "0.6663779", "0.6658108", "0.6658108", "0.6658108", "0.6658108", "0.6644757", "0.664475...
0.62594575
92
TODO Autogenerated method stub
@Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { imgView.setAlpha(progress); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void onStartTrackingTouch(SeekBar seekBar) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void onStopTrackingTouch(SeekBar seekBar) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.7249559", "0.7204226", "0.71981144", "0.7180145", "0.7110589", "0.70431244", "0.7041351", "0.70150685", "0.70118093", "0.69832", "0.6947845", "0.69419056", "0.6937257", "0.6920975", "0.6920975", "0.68938893", "0.68867826", "0.6878929", "0.6877472", "0.68656766", "0.6865676...
0.0
-1
TODO Autogenerated method stub
@Override public void run() { imgView.setImageBitmap(pngBM); }
{ "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
/ 1.setImageState theimageviewmethodsetimagestateintstatebooleanmergedo So it looks like if you set merge to false in setImageState(state, merge) then next time the view system calls onCreateDrawableState() it will return just the state you supplied in setImageState(state, merge). If however you set merge to true in setImageState(state, merge) then next time the view system calls onCreateDrawableState() it will return the existing state merged with the state you supplied in setImageState(state, merge). In other words, Yes the merge parameter determines whether the state you supply should be combined with or replace the current states of the ImageView next time the view system calls onCreateDrawableState(). I still believe some explanation of the parameters should be added to the documentation. I've not come across any other public methods without any documentation so far. imgView.setImageState(state, merge) 2. set ImageLevel / imgView.setImageResource(R.drawable.weathericon); imgView.setImageLevel(a); a = (a == 1 ? 0 : 1); 3.setImageMatrix android:scaleType="matrix"
void setImageProperty() { imgView.setImageResource(R.drawable.weathericon); Matrix matrix = new Matrix(); rotate += 30; if (rotate == 360) { rotate = 0; } float centerX = imgView.getWidth() / 2; float centerY = imgView.getHeight() / 2; matrix.setRotate(rotate, centerX, centerY); //matrix.setTranslate(10, 20); imgView.setImageMatrix(matrix); //ScaleType type = ScaleType. //imgView.setScaleType(scaleType); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void\nsetImageOverride(SoState state,\n boolean override)\n//\n////////////////////////////////////////////////////////////////////////\n{\n SoTextureOverrideElement elt;\n elt = (SoTextureOverrideElement )getElement(state, classStackIndexMap.get(SoT...
[ "0.59392947", "0.58631927", "0.5845603", "0.5822124", "0.5810686", "0.57346797", "0.57266647", "0.5693435", "0.566709", "0.56613505", "0.5636219", "0.5634312", "0.562431", "0.56211686", "0.5608457", "0.5601166", "0.55956286", "0.5595613", "0.5594377", "0.55939394", "0.5590263...
0.67958426
0
TODO Autogenerated method stub
public static void main(String[] args) { Scanner sc=new Scanner(System.in); int n; String bowlName; String batName; long runs; System.out.println("Menu\n1.Player details of the delivery\n2.Run details of the delivery"); n=sc.nextInt(); sc.nextLine(); Delivery d=new Delivery(); switch(n) { case 1: System.out.println("Enter the bowler name"); bowlName=sc.nextLine(); System.out.println("Enter the batsman name"); batName=sc.nextLine(); d.displayDeliveryDetails(bowlName, batName); break; case 2: System.out.println("Enter the number of runs"); runs=sc.nextLong(); d.displayDeliveryDetails(runs); break; } sc.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.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
Constructor a partir de la entidad
public MarcaDTO(MarcaEntity marcaEntity) { if (marcaEntity != null) { this.id = marcaEntity.getId(); this.nombreMarca = marcaEntity.getNombreMarca(); this.logo = marcaEntity.getLogo(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public EstadosSql() {\r\n }", "public PedidoRecord() {\n super(Pedido.PEDIDO);\n }", "public Candidatura (){\n \n }", "public Alojamiento() {\r\n\t}", "public ChoixEntreprise() {\n\n }", "public CCuenta()\n {\n }", "public PersistenciaCMT() {\n\n }", "public Caso_de...
[ "0.71016794", "0.6990449", "0.69553494", "0.69251156", "0.691999", "0.68431276", "0.68247664", "0.6789043", "0.67498827", "0.67261076", "0.67237383", "0.6693738", "0.66518193", "0.66495913", "0.66473615", "0.66408676", "0.663299", "0.6631387", "0.6625279", "0.66055304", "0.65...
0.0
-1
Execute the global state (if any)
@Override public void update() { if (globalState != null) globalState.update(owner); // Execute the current state (if any) if (currentState != null && newStateEntered) currentState.update(owner); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void runState() {\n\t\tp.displaySheet();\n\t\tcurState.run();\n\t}", "ProgramState execute(ProgramState state) ;", "public ExecuteState() {\r\n PrevPC = 0;\r\n ChangedLoc = -1;\r\n OldInst = new CodeBlueInstruction();\r\n }", "public void execute() {\n if(cb) {\n Mai...
[ "0.686934", "0.65567863", "0.6273406", "0.622673", "0.61267215", "0.60598063", "0.603386", "0.60096633", "0.5887221", "0.58734816", "0.57784057", "0.5754299", "0.57429844", "0.57142633", "0.5690416", "0.5680221", "0.56761086", "0.56635916", "0.5663052", "0.56517607", "0.56298...
0.6053428
6
/ Given two strings, return true if either of the strings appears at the very end of the other string, ignoring upper/lower case differences (in other words, the computation should not be "case sensitive"). Note: str.toLowerCase() returns the lowercase version of a string.
public static boolean endOther(String a, String b) { String larger, smaller; if (a.length() > b.length()){ larger = a; smaller = b; } else{ larger = b; smaller = a; } larger = larger.toLowerCase(); smaller = smaller.toLowerCase(); int i = larger.length() - smaller.length(); return ((larger.substring(i, larger.length())).equals(smaller)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static String twoStrings(String s1, String s2){\n // Complete this function\n String letters = \"abcdefghijklmnopqrstuvwxyz\";\n for(int i=0;i<letters.length();i++){\n char lettersChar = letters.charAt(i); \n if(s1.indexOf(lettersChar) > -1 && s2.indexOf(lettersChar) > -1...
[ "0.7366097", "0.70967823", "0.686626", "0.6862961", "0.67063963", "0.66902214", "0.6667936", "0.66636264", "0.66539204", "0.66325366", "0.6595715", "0.65890443", "0.6577246", "0.65730375", "0.6559691", "0.6553429", "0.64945143", "0.64853877", "0.6457104", "0.64397", "0.642660...
0.76552296
0
End of user code
public interface NTLMMediatorInputConnectorPropertiesEditionPart { /** * Init the incomingLinks * @param settings settings for the incomingLinks ReferencesTable */ public void initIncomingLinks(ReferencesTableSettings settings); /** * Update the incomingLinks * @param newValue the incomingLinks to update * */ public void updateIncomingLinks(); /** * Adds the given filter to the incomingLinks edition editor. * * @param filter * a viewer filter * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter) * */ public void addFilterToIncomingLinks(ViewerFilter filter); /** * Adds the given filter to the incomingLinks edition editor. * * @param filter * a viewer filter * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter) * */ public void addBusinessFilterToIncomingLinks(ViewerFilter filter); /** * @return true if the given element is contained inside the incomingLinks table * */ public boolean isContainedInIncomingLinksTable(EObject element); /** * Returns the internationalized title text. * * @return the internationalized title text. * */ public String getTitle(); // Start of user code for additional methods // End of user code }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void end() {\n\r\n\t}", "protected void end()\n\t{\n\t}", "protected void end() {\n \n \n }", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {...
[ "0.7773234", "0.77577317", "0.77330613", "0.7699825", "0.7699825", "0.7699825", "0.7699825", "0.7699825", "0.7699825", "0.76330596", "0.76330596", "0.76330596", "0.76330596", "0.7611532", "0.75298935", "0.75298935", "0.75298935", "0.75298935", "0.75298935", "0.75298935", "0.7...
0.0
-1
Adds the given filter to the incomingLinks edition editor.
public void addFilterToIncomingLinks(ViewerFilter filter);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addFilterToReferencedLink(ViewerFilter filter);", "public void addBusinessFilterToIncomingLinks(ViewerFilter filter);", "public void addFilterToAnotations(ViewerFilter filter);", "public void addFilterToAnotations(ViewerFilter filter);", "public void addBusinessFilterToReferencedLink(ViewerFilt...
[ "0.7563448", "0.7514647", "0.71099037", "0.71099037", "0.7010631", "0.6850969", "0.6652439", "0.6589147", "0.65369487", "0.65155494", "0.65155494", "0.64860696", "0.6353862", "0.6327686", "0.6306877", "0.6281534", "0.6233909", "0.6166945", "0.6157844", "0.6114233", "0.6092242...
0.81378466
0
Adds the given filter to the incomingLinks edition editor.
public void addBusinessFilterToIncomingLinks(ViewerFilter filter);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addFilterToIncomingLinks(ViewerFilter filter);", "public void addFilterToReferencedLink(ViewerFilter filter);", "public void addFilterToAnotations(ViewerFilter filter);", "public void addFilterToAnotations(ViewerFilter filter);", "public void addBusinessFilterToReferencedLink(ViewerFilter filte...
[ "0.81378466", "0.7563448", "0.71099037", "0.71099037", "0.7010631", "0.6850969", "0.6652439", "0.6589147", "0.65369487", "0.65155494", "0.65155494", "0.64860696", "0.6353862", "0.6327686", "0.6306877", "0.6281534", "0.6233909", "0.6166945", "0.6157844", "0.6114233", "0.609224...
0.7514647
2
Returns the internationalized title text.
public String getTitle();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "IDisplayString getTitle();", "public String getTitle() {\n if (getMessages().contains(\"title\")) {\n return message(\"title\");\n }\n return message(MessageUtils.title(getResources().getPageName()));\n }", "public abstract String getTitle(Locale locale);", "public String g...
[ "0.75932795", "0.7533", "0.7472663", "0.73810655", "0.73520434", "0.73520434", "0.73520434", "0.73520434", "0.73520434", "0.7254565", "0.7180434", "0.70977515", "0.70818526", "0.707332", "0.70589423", "0.70589423", "0.70509595", "0.70509595", "0.70509595", "0.7044794", "0.704...
0.6937041
56
Creates the upper and lower boundary query Note: does not include min and max key values in the boundary as these are implicit bounds, so not required.
public static BsonDocument createPartitionBounds(final BsonValue lower, final BsonValue upper) { BsonDocument partitionBoundary = new BsonDocument(); if (lower.getBsonType() != BsonType.MIN_KEY) { partitionBoundary.append("$gte", lower); } if (upper.getBsonType() != BsonType.MAX_KEY) { partitionBoundary.append("$lt", upper); } return partitionBoundary; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BetweenCriteria(String attributeName, Object lowerBound, Object upperBound) {\n super(attributeName, lowerBound);\n this.upperBound = upperBound;\n }", "private List<ComparisonExpression> comparisons(HashMap<TimeSelector, Long> lowerBounds,\n HashMap<...
[ "0.639836", "0.6004895", "0.59507746", "0.59344935", "0.59236866", "0.5896326", "0.58388937", "0.5819978", "0.575658", "0.5641359", "0.55510324", "0.55430263", "0.55409104", "0.5534165", "0.55066025", "0.5493605", "0.54178995", "0.53845835", "0.5341836", "0.5302742", "0.52563...
0.7145925
0
Creates the aggregation pipeline for a partition.
public static List<BsonDocument> createPartitionPipeline( final BsonDocument partitionBounds, final List<BsonDocument> userPipeline) { List<BsonDocument> partitionPipeline = new ArrayList<>(); partitionPipeline.add(new BsonDocument("$match", partitionBounds)); partitionPipeline.addAll(userPipeline); return partitionPipeline; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static AggregateEsBase<? extends Aggregation, ? extends Bucket> makeAggregate(String type, String field,\n Properties properties) {\n AggregateDescriptor descriptor = new AggregateDescriptor();\n descriptor.setId(aggKey(field, type));\n descriptor.setDocumentField(field);\...
[ "0.55628395", "0.54113805", "0.53199935", "0.5239363", "0.5227838", "0.50531393", "0.49970603", "0.4909245", "0.48176157", "0.48171818", "0.48148873", "0.4808722", "0.47725388", "0.47377893", "0.46853182", "0.46768743", "0.46648222", "0.46078482", "0.45908305", "0.45800295", ...
0.48954013
8
Get Access Token and persist it
private void checkForSavedLogin() { accessToken = getAccessToken(); if (accessToken==null) return; //if there are no credentials stored then return to usual activity // initialize Twitter4J twitter.setOAuthAccessToken(accessToken); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getAccessToken();", "String getAccessToken();", "String getAccessToken();", "public AccessToken getAccessToken() {\n return token;\n }", "protected AccessToken getAccessToken() \n\t{\n\t\treturn accessToken;\n\t}", "public String getAccessToken() {\n return accessToken;\n }...
[ "0.7206143", "0.7135087", "0.7135087", "0.69820005", "0.6973416", "0.6963855", "0.6954641", "0.69038606", "0.6885812", "0.6791594", "0.67143685", "0.66290414", "0.66290414", "0.66261584", "0.66245097", "0.6605619", "0.6571714", "0.65678585", "0.6566283", "0.6561043", "0.65514...
0.0
-1
Create a new instance.
public StrTab() { maxIndex = 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Instance createInstance();", "public void create(){}", "public Instance() {\n }", "private Instantiation(){}", "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}", "void create(T instance) throws IOException;", "Reproduc...
[ "0.7856344", "0.7297506", "0.7190777", "0.7127816", "0.70360863", "0.69051784", "0.6813679", "0.67574406", "0.6720743", "0.67055887", "0.66634166", "0.66509396", "0.66509396", "0.66497475", "0.6614444", "0.656769", "0.6566887", "0.652523", "0.6489371", "0.64792", "0.6469803",...
0.0
-1
Create a new instance and initialize from the given byte array.
public StrTab(byte[] data, int length) { final int cnt = length; int addr = 0; while (addr < cnt) { int size = 0; while ((addr + size < cnt) && (data[addr + size] != 0)) { size++; } final String s = new String(data, addr, size); final Integer index = addr; str2addr.put(s, index); addr2str.put(index, s); addr += (size + 1); } maxIndex = cnt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public UUID(byte[] byteArray) {\n this(byteArray, 0);\n }", "ByteArray(byte []a) {\n\tdata = a;\n }", "public static Account fromByteArray(byte[] b) {\n return new Account(b);\n }", "public TByteArray(uka.transport.UnmarshalStream _stream)\n throws java.io.IOException, ClassNotFound...
[ "0.665722", "0.65446705", "0.6543535", "0.64565456", "0.6423464", "0.63984865", "0.62695974", "0.61936885", "0.6168735", "0.61332434", "0.6117108", "0.6107842", "0.60721785", "0.60334855", "0.60293674", "0.6002763", "0.5974683", "0.5943034", "0.5939043", "0.59342086", "0.5923...
0.0
-1
Add a string and return its index.
public int addString(String v) { int addr = findString(v); if (addr < 0) { addr = maxIndex; maxIndex += (v.length() + 1); final Integer index = addr; str2addr.put(v, index); addr2str.put(index, v); } return addr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer add(String v)\n {\n Integer pos = h(v);\n if (search(v) != -1)\n {\n return -1;\n }\n while (pos < cap && table.get(pos) != null && !table.get(pos).equals(v))\n {\n pos++;\n }\n if (pos == cap)\n {\n w...
[ "0.6707172", "0.6540168", "0.6489317", "0.6450438", "0.6293798", "0.6293798", "0.625183", "0.61680025", "0.60561484", "0.6017921", "0.5989439", "0.59602404", "0.5930037", "0.5858705", "0.58185905", "0.5792712", "0.5779089", "0.5748235", "0.5734886", "0.5722158", "0.57194436",...
0.6907516
0
Gets the String at a given index.
public String getString(int index) { return addr2str.get(new Integer(index)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getString(int index);", "String get(int index);", "public CharSequence get(int index) {\n return getString(index);\n }", "public String getString(int index) throws IOException {\n\t\t\tInputStream in = newInputStream(index);\n\t\t\treturn in != null ? inputStreamToString(in) : null;\n...
[ "0.8523295", "0.8081963", "0.80084246", "0.7583707", "0.75784105", "0.74095917", "0.7341092", "0.73142034", "0.7232141", "0.7205619", "0.70605344", "0.70234334", "0.7018173", "0.70055676", "0.6943304", "0.6894119", "0.6801034", "0.6726409", "0.66538686", "0.66352594", "0.6631...
0.7378076
6
Return the index of a given string, or 1 if not found.
public int findString(String v) { final Integer addr = str2addr.get(v); if (addr != null) { return addr; } else { return -1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer indexOf(String s){\n\t\tInteger i;\n\t\tif((i=indices.get(s))!=null)\n\t\t\treturn i;\n\t\telse\n\t\t\treturn Integer.valueOf(-1);\n\t}", "public int find(String string) {\n\t\tif (string==null) {\n\t\t\treturn -1;\n\t\t}\n\t\tfor (int i=0;i!=m_stringOffsets.length;++i) {\n\t\t\tint offset=m_strin...
[ "0.79786175", "0.7493283", "0.7365867", "0.7307042", "0.7288988", "0.7163814", "0.7105169", "0.7019245", "0.69767964", "0.6863682", "0.6860682", "0.6817162", "0.68114984", "0.6771398", "0.6764175", "0.67427737", "0.6693621", "0.66826653", "0.6651861", "0.6651861", "0.66079366...
0.6513412
25
Convert to a strtab formatted byte array.
public byte[] toByteArray() { final byte[] data = new byte[maxIndex]; for (Map.Entry<Integer, String> entry : addr2str.entrySet()) { final String str = entry.getValue(); final int addr = entry.getKey(); for (int k = 0; k < str.length(); k++) { data[addr + k] = (byte) str.charAt(k); } } return data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public StrTab(byte[] data, int length) {\n final int cnt = length;\n int addr = 0;\n while (addr < cnt) {\n int size = 0;\n while ((addr + size < cnt) && (data[addr + size] != 0)) {\n size++;\n }\n final String s = new String(data, add...
[ "0.61049664", "0.5508162", "0.55020434", "0.51414573", "0.511175", "0.50917524", "0.50467396", "0.50467396", "0.5031013", "0.5027355", "0.4979949", "0.49751234", "0.49475336", "0.49294218", "0.49123445", "0.48876968", "0.48745722", "0.48730588", "0.48670438", "0.4856325", "0....
0.48938146
15
/ Create constructor without arguments. and declare exception
protected MyRemoteImp1() throws RemoteException { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(expected = IllegalArgumentException.class)\r\n public void constructorExceptionTest(){\n Owner invalid = new Owner(\"First\", \"Last\", \"333\");\r\n }", "public CIMException() {\n\t\tthis((String) null, (Object[]) null);\n\t}", "public JavaException()\r\n\t{\r\n\t\tsuper();\r\n\t}", "publ...
[ "0.74116397", "0.72845733", "0.710491", "0.71031624", "0.7073247", "0.70722723", "0.70673156", "0.70278335", "0.69564897", "0.69502455", "0.69192356", "0.68963397", "0.68930095", "0.68844116", "0.6881135", "0.687869", "0.685766", "0.6851045", "0.68504614", "0.6837691", "0.681...
0.0
-1
/ Add service in RMI
public static void main(String[] args) { try { MyRemote service = new MyRemoteImp1(); Naming.rebind("Remote Hello", service); } catch (Exception ex) { ex.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract T addService(ServerServiceDefinition service);", "void addService(ServiceInfo serviceInfo);", "void addHost(Service newHost);", "public void registerService(String serviceName, Object service);", "public interface DemoService extends Remote {\r\n public final static String SERVICE_NAME =...
[ "0.697079", "0.6946799", "0.6757271", "0.672887", "0.6717192", "0.66440153", "0.66440153", "0.6634023", "0.6596507", "0.65928", "0.65670294", "0.6559834", "0.6506064", "0.65030926", "0.64759076", "0.64475137", "0.6376025", "0.63473797", "0.6344478", "0.6304058", "0.62895036",...
0.60326844
45
admin api used to create consent/notconsent user for given study nearly identical to createUser() one
public Result createUserWithStudyId(String studyId) throws Exception { getAuthenticatedSession(ADMIN); Study study = studyService.getStudy(studyId); JsonNode node = parseJson(request(), JsonNode.class); StudyParticipant participant = parseJson(request(), StudyParticipant.class); boolean consent = JsonUtils.asBoolean(node, CONSENT_FIELD); userAdminService.createUser(study, participant, null, false, consent); return createdResult("User created."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createUser(User user);", "CreateUserResult createUser(CreateUserRequest createUserRequest);", "public void createUserAccount(UserAccount account);", "public void createUser(User user) {\n\n\t}", "@Test\n public void testCreateOnBehalfUser() throws Exception {\n String password = \"abc...
[ "0.6346299", "0.62345433", "0.6182914", "0.6176046", "0.6168964", "0.615934", "0.615823", "0.6144956", "0.61324626", "0.60506374", "0.6038169", "0.60309446", "0.5977909", "0.5954644", "0.5934294", "0.58755046", "0.58146006", "0.57494354", "0.5745901", "0.57091963", "0.5705725...
0.60366666
11
/ renamed from: a
public C30677a newBuilder() { C30677a aVar = new C30677a(); aVar.addUnknownFields(unknownFields()); return aVar; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed fr...
[ "0.6249595", "0.6242955", "0.61393225", "0.6117684", "0.61140615", "0.60893875", "0.6046927", "0.60248226", "0.60201806", "0.59753186", "0.5947817", "0.5912414", "0.5883872", "0.5878469", "0.587005", "0.58678955", "0.58651674", "0.5857262", "0.58311176", "0.58279663", "0.5827...
0.0
-1
/ renamed from: a
public ZABEMobileNetwork build() { return new ZABEMobileNetwork(buildUnknownFields()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed fr...
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064...
0.0
-1
/ renamed from: a
public int encodedSize(ZABEMobileNetwork jVar) { return jVar.unknownFields().mo132944h(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed fr...
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064...
0.0
-1
/ renamed from: a
public void encode(ProtoWriter iVar, ZABEMobileNetwork jVar) throws IOException { iVar.mo40528a(jVar.unknownFields()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed fr...
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064...
0.0
-1
/ renamed from: a
public ZABEMobileNetwork decode(ProtoReader hVar) throws IOException { C30677a aVar = new C30677a(); long a = hVar.mo40516a(); while (true) { int b = hVar.mo40518b(); if (b != -1) { FieldEncoding c = hVar.mo40519c(); aVar.addUnknownField(b, c, c.rawProtoAdapter().decode(hVar)); } else { hVar.mo40517a(a); return aVar.build(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed fr...
[ "0.6249595", "0.6242955", "0.61393225", "0.6117684", "0.61140615", "0.60893875", "0.6046927", "0.60248226", "0.60201806", "0.59753186", "0.5947817", "0.5912414", "0.5883872", "0.5878469", "0.587005", "0.58678955", "0.58651674", "0.5857262", "0.58311176", "0.58279663", "0.5827...
0.0
-1
/ renamed from: b
public ZABEMobileNetwork redact(ZABEMobileNetwork jVar) { C30677a a = jVar.newBuilder(); a.clearUnknownFields(); return a.build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo2508a(bxb bxb);", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void b() {\n }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "@Override\n\tpublic void b2() {\n\t\t\n\t}", "v...
[ "0.64558864", "0.6283203", "0.6252635", "0.6250949", "0.6244743", "0.6216273", "0.6194491", "0.6193556", "0.61641675", "0.6140157", "0.60993093", "0.60974354", "0.6077849", "0.6001867", "0.5997364", "0.59737104", "0.59737104", "0.5905105", "0.5904295", "0.58908087", "0.588663...
0.0
-1
Constructor que inicializa el parametro de la clase
public ControladorRanking(){ clasificacion = new Ranking[10]; for(int i=0;i<10;i++){ clasificacion[i]=new Ranking(); clasificacion[i].setLogin(" "); clasificacion[i].setMediana(0); }//END_FOR }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "public Parameters() {\n\t}", "public Pasien() {\r\n }", "public BaseParameters(){\r\n\t}", "public prueba()\r\n {\r\n }", "public TParametrosVOImpl() {\r\n }", "public AntrianPasien() {\r\n\r\n }", "public PowerM...
[ "0.703147", "0.7029833", "0.69145393", "0.6908502", "0.6831717", "0.67776334", "0.674887", "0.671675", "0.670564", "0.6690012", "0.66832846", "0.6642523", "0.6628807", "0.6609864", "0.66073024", "0.6606715", "0.65773684", "0.65650076", "0.65332675", "0.6518476", "0.6495822", ...
0.0
-1
END_CONSTRUCTOR Actualiza la clasificacion de los 10 mejores jugadores
public void actualizarRanking(String login, int mediana){ int temp=0; for(int i=0;i<10;i++){ if((clasificacion[i].getLogin()).equals(login)){ //si el jugador ya esta en los 10 mejores jugadores actualizo su punctuacion temp=(clasificacion[i].getMediana()) + mediana; clasificacion[i].setMediana(temp); ordenarRanking(); //ordeno el ranking con la puntuacion del jugador actualizada return; }//END_IF }//END_FOR for(int j=0;j<10;j++){ if((clasificacion[j].getMediana()) < mediana){//si existe en el ranking una puntuacion menor de la que se passa a la funcion por parametro System.arraycopy(clasificacion, j, clasificacion, j+1, clasificacion.length-j-1);//reordena las puntuaciones menores que mediana Ranking aux=new Ranking(); aux.setLogin(login); aux.setMediana(mediana); clasificacion[j]=aux; return; }//END_IF }//END_FOR }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public jugador(){\n\t\tnombre=\"Dave\";\n\t\ttipo=\"jugador\";\n\t\tpoderataque=6;\n\t\tpuntosvida=20;\n\t}", "public Jeu(){\n Saisie.Initialiser();\n this.premierJoueur = CreationDePersonnage(\"joueur1\");\n this.secondJoueur = CreationDePersonnage(\"joueur2\");\n Combat();\n ...
[ "0.648292", "0.64138055", "0.6345335", "0.63449025", "0.63336736", "0.6309976", "0.6183232", "0.6174491", "0.6159301", "0.6136813", "0.611937", "0.6108618", "0.6101674", "0.60874766", "0.60726213", "0.60316944", "0.6008547", "0.5998668", "0.59962267", "0.597136", "0.5963929",...
0.0
-1
END_METHOD Ordena las puntuaciones en el ranking de mayor a menor
public void ordenarRanking(){ for(int i = 0; i < clasificacion.length; i++) { boolean flag = false; for(int j = 0; j < clasificacion.length-1; j++) { /*Si el elemento de la posicion j+1 es mayor que el anterior se intercambian los valores de esas posiciones*/ if((clasificacion[j].getMediana())<(clasificacion[j+1].getMediana())) { Ranking k = new Ranking(); k=clasificacion[j]; clasificacion[j] = clasificacion[i]; clasificacion[i] = k; flag=true; //Se pone a true para indicar que se ha hecho un cambio }//END_IF }//END_FOR if(!flag) break; //Si flag es igual a falso quiere decir que en la ultima iteracion //no hubo ningun intercambio y por lo tanto el metodo puede terminar //ya que el vector esta ordenado }//END_FOR }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void rank(){\n\n\t}", "long getToRank();", "int getRanking();", "private int rankMethod()\r\n {\r\n\treturn spinTheWheel();\r\n }", "public abstract void modRanking(ParamRanking pr);", "long getRank();", "public void actualizarRanking(String login, int mediana){\n \n int temp...
[ "0.6318386", "0.6055099", "0.5990141", "0.5852561", "0.58046246", "0.57987577", "0.5689414", "0.5642407", "0.56370085", "0.56370085", "0.56181127", "0.55808526", "0.55401224", "0.55356866", "0.5491646", "0.5475468", "0.5449252", "0.5440623", "0.54165304", "0.541352", "0.53943...
0.60778564
1
END_METHOD Vacia el vector de la clasificacion
public Ranking[] vaciarRanking() { for(int i=0;i<10;i++){ clasificacion[i].setLogin(" "); clasificacion[i].setMediana(0); }//END_FOR return clasificacion; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public WB_Vector nextVector();", "public VOIVector() {\r\n super();\r\n }", "public abstract Vector computeCenter();", "List<IntVector3> rails();", "public nvo_coords.CoordsType getVector() {\n return vector;\n }", "public void clearVectors();", "public Vector(float[] axis){ this.ax...
[ "0.60121524", "0.59860265", "0.59511316", "0.59221876", "0.5884436", "0.5882479", "0.587164", "0.5863575", "0.58256024", "0.58218277", "0.5782296", "0.5774094", "0.5765953", "0.5748898", "0.57322246", "0.57133585", "0.5706466", "0.5699951", "0.56998146", "0.56893384", "0.5661...
0.0
-1
END_METHOD Devuelve la clasificacion de los 10 mejores jugadores
public Ranking[] mostrarRanking(){ return clasificacion; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void end() {\n\t\tlog.info(\"-----end()-----\");\n\t\tTonKhoDelegate tkDelegate = TonKhoDelegate.getInstance();\n\t\tKiemKeDelegate kiemkeDel = KiemKeDelegate.getInstance();\n\t\tif (listCtKhoLeTraEx.size() > 0) {\n\t\t\tyteLog = new YteLog();\n\t\t\tlistDataLog = \"\";\n\t\t\tif (!ngayXuat.equals(\"\")) {\...
[ "0.6303767", "0.6088076", "0.6048375", "0.5997116", "0.59545887", "0.5906791", "0.58666843", "0.5839423", "0.58208764", "0.5818749", "0.5818749", "0.5818749", "0.58034986", "0.5799478", "0.5794213", "0.57812834", "0.5780972", "0.5780972", "0.5780972", "0.5780972", "0.5780972"...
0.0
-1
END_METHOD Guarda la clasificacion actualizada
public void guardarRanking() throws FileNotFoundException, IOException{ gest.guardarRanking(clasificacion); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@AfterMethod\n\tpublic void end()\n\t{\n\n\t}", "protected void end() {\n\r\n\t}", "protected void end()\n\t{\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t...
[ "0.7157829", "0.70224136", "0.6982857", "0.69309026", "0.69309026", "0.69309026", "0.69309026", "0.69309026", "0.69309026", "0.69239223", "0.6802931", "0.6802931", "0.6802931", "0.6802931", "0.6782752", "0.67825925", "0.67825925", "0.67765933", "0.67765933", "0.67765933", "0....
0.0
-1
END_METHOD Carga el ultimo ranking guardado y actualiza el atributo clasificacion
public void cargarRanking() throws ClassNotFoundException, FileNotFoundException, IOException, RankingNotFoundException { try{ clasificacion=gest.cargarRanking(); }//END_TRY catch (RankingNotFoundException e){ }//END_CATCH }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void iniciarRanking() {\n\t\tif(!usouIa) {\r\n\t\t\tswitch (this.dificuldade) {\r\n\t\t\tcase FACIL:\r\n\t\t\t\trank = new RankingFacil();\r\n\t\t\t\tbreak;\r\n\t\t\tcase MEDIO:\r\n\t\t\t\trank = new RankingMedio();\r\n\t\t\t\tbreak;\r\n\t\t\tcase DIFICIL:\r\n\t\t\t\trank = new RankingDificil();\r\n\t\t\t\...
[ "0.64020324", "0.6347305", "0.6285348", "0.6159879", "0.6117985", "0.6012957", "0.5965037", "0.58190674", "0.57523847", "0.56746477", "0.55862796", "0.5549195", "0.55380183", "0.5528503", "0.5513732", "0.55058646", "0.5500656", "0.549919", "0.5491905", "0.5486574", "0.5465504...
0.5942
7
1 remaining is best, all remaining is second.
@Override public int compare(Pen p1, Pen p2) { int r1 = p1.remaining(); int r2 = p2.remaining(); if(r1 == 1) r1 = 7; if(r2 == 1) r2 = 7; return Integer.compare(r1,r2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void runBest() {\n }", "public long getBestSolutionTime();", "public Double getBestTime() {\n return bestTime;\n }", "Object getBest();", "public void setBestTime(Time bestTime)\n\t{\n\t\tthis.bestTime = bestTime;\n\t}", "public Time getBestTime()\n\t{\n\t\treturn bestTime;\n\t}", ...
[ "0.6707525", "0.64184296", "0.63672596", "0.6211809", "0.60044324", "0.5940432", "0.59291357", "0.5854789", "0.57286996", "0.57125014", "0.57020277", "0.561788", "0.5600205", "0.5581661", "0.55776453", "0.5566689", "0.55566365", "0.55496484", "0.55300605", "0.5527408", "0.550...
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.teacher_hw_frgmnt2, container, false); drawer = (DrawerLayout) ((TeacherHome) getContext()).findViewById(R.id.drawer_asiana); toolbar = (Toolbar) ((TeacherHome) getContext()).findViewById(R.id.tool_bar); FloatingActionButton button = (FloatingActionButton) view.findViewById(R.id.fab); recyclerView = (RecyclerView) view.findViewById(R.id.recycler); progress = (ProgressBar) view.findViewById(R.id.progress); manager = new GridLayoutManager(getActivity(), 1); list = new ArrayList<>(); //searchList = new ArrayList<>(); adapter = new AdapterHwList(getContext(), list); recyclerView.setAdapter(adapter); recyclerView.setLayoutManager(manager); list1 = new ArrayList<>(); classlist = new ArrayList<>(); classId = new ArrayList<>(); listSection = new ArrayList<>(); sectionlist = new ArrayList<>(); sectionid = new ArrayList<>(); listSubject = new ArrayList<>(); subjectlist = new ArrayList<>(); subjectId = new ArrayList<>(); if (isSearch = false) { User b = (User) getActivity().getApplicationContext(); Retrofit retrofit = new Retrofit.Builder() .baseUrl(b.baseURL) .addConverterFactory(ScalarsConverterFactory.create()) .addConverterFactory(GsonConverterFactory.create()) .build(); AllAPIs cr = retrofit.create(AllAPIs.class); progress.setVisibility(View.VISIBLE); Call<HomewrkListbean> call = cr.homwwrk_list(b.school_id, b.user_id); call.enqueue(new Callback<HomewrkListbean>() { @Override public void onResponse(Call<HomewrkListbean> call, Response<HomewrkListbean> response) { adapter.setGridData(response.body().getHomeworkList()); adapter.notifyDataSetChanged(); progress.setVisibility(View.GONE); } @Override public void onFailure(Call<HomewrkListbean> call, Throwable throwable) { progress.setVisibility(View.GONE); } }); } /* card=(CardView)view.findViewById(R.id.card); card.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { FragmentManager fm = getFragmentManager(); FragmentTransaction ft = fm.beginTransaction(); TeacherHwFrgmntTwo frag1 = new TeacherHwFrgmntTwo(); ft.replace(R.id.replace, frag1); ft.addToBackStack(null); ft.commit(); } }); */ button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { final Dialog dialog = new Dialog(getActivity()); dialog.setCancelable(true); dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); dialog.setContentView(R.layout.hw_dialog); final Button submit = (Button) dialog.findViewById(R.id.submit); final Spinner className = (Spinner) dialog.findViewById(R.id.className); final Spinner sectionName = (Spinner) dialog.findViewById(R.id.sectionName); final Spinner subjectName = (Spinner) dialog.findViewById(R.id.subjectName); final ProgressBar progress = (ProgressBar) dialog.findViewById(R.id.progress); final User b = (User) getActivity().getApplicationContext(); Retrofit retrofit = new Retrofit.Builder() .baseUrl(b.baseURL) .addConverterFactory(ScalarsConverterFactory.create()) .addConverterFactory(GsonConverterFactory.create()) .build(); final AllAPIs cr = retrofit.create(AllAPIs.class); Call<ClassListbean> call = cr.classList(b.school_id); progress.setVisibility(View.VISIBLE); call.enqueue(new Callback<ClassListbean>() { @Override public void onResponse(Call<ClassListbean> call, Response<ClassListbean> response) { list1 = response.body().getClassList(); classlist.clear(); classId.clear(); for (int i = 0; i < response.body().getClassList().size(); i++) { classlist.add(response.body().getClassList().get(i).getClassName()); classId.add(response.body().getClassList().get(i).getClassId()); } ArrayAdapter<String> adp1 = new ArrayAdapter<String>(getContext(), android.R.layout.simple_list_item_1, classlist); adp1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); className.setAdapter(adp1); ArrayAdapter<String> adp = new ArrayAdapter<String>(getContext(), android.R.layout.simple_list_item_1, sectionlist); adp.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); sectionName.setAdapter(adp); ArrayAdapter<String> adp2 = new ArrayAdapter<String>(getContext(), android.R.layout.simple_list_item_1, subjectlist); adp2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); subjectName.setAdapter(adp2); progress.setVisibility(View.GONE); } @Override public void onFailure(Call<ClassListbean> call, Throwable throwable) { progress.setVisibility(View.GONE); } }); className.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) { cId = classId.get(i); Retrofit retrofit = new Retrofit.Builder() .baseUrl(b.baseURL) .addConverterFactory(ScalarsConverterFactory.create()) .addConverterFactory(GsonConverterFactory.create()) .build(); AllAPIs cr = retrofit.create(AllAPIs.class); Call<SectionListbean> call2 = cr.sectionList(b.school_id, classId.get(i)); progress.setVisibility(View.VISIBLE); call2.enqueue(new Callback<SectionListbean>() { @Override public void onResponse(Call<SectionListbean> call, Response<SectionListbean> response) { listSection = response.body().getSectionList(); sectionlist.clear(); sectionid.clear(); for (int i = 0; i < response.body().getSectionList().size(); i++) { sectionlist.add(response.body().getSectionList().get(i).getSectionName()); sectionid.add(response.body().getSectionList().get(i).getSectionId()); } ArrayAdapter<String> adp = new ArrayAdapter<String>(getContext(), android.R.layout.simple_list_item_1, sectionlist); adp.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); sectionName.setAdapter(adp); Log.d("Cid", String.valueOf(cId)); progress.setVisibility(View.GONE); } @Override public void onFailure(Call<SectionListbean> call, Throwable throwable) { progress.setVisibility(View.GONE); } }); } @Override public void onNothingSelected(AdapterView<?> adapterView) { } }); sectionName.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view, final int i, long l) { sId = sectionid.get(i); Retrofit retrofit = new Retrofit.Builder() .baseUrl(b.baseURL) .addConverterFactory(ScalarsConverterFactory.create()) .addConverterFactory(GsonConverterFactory.create()) .build(); final AllAPIs cr = retrofit.create(AllAPIs.class); Call<SectionListbean> call2 = cr.sectionList(b.school_id, classId.get(i)); progress.setVisibility(View.VISIBLE); call2.enqueue(new Callback<SectionListbean>() { @Override public void onResponse(Call<SectionListbean> call, Response<SectionListbean> response) { Retrofit retrofit = new Retrofit.Builder() .baseUrl(b.baseURL) .addConverterFactory(ScalarsConverterFactory.create()) .addConverterFactory(GsonConverterFactory.create()) .build(); AllAPIs cr = retrofit.create(AllAPIs.class); Call<SubjectListBean> call1 = cr.subjectList(b.school_id, classId.get(i),sectionid.get(i)); progress.setVisibility(View.VISIBLE); call1.enqueue(new Callback<SubjectListBean>() { @Override public void onResponse(Call<SubjectListBean> call, Response<SubjectListBean> response) { listSubject = response.body().getSubjectList(); subjectlist.clear(); subjectId.clear(); for (int i = 0; i < response.body().getSubjectList().size(); i++) { subjectlist.add(response.body().getSubjectList().get(i).getSubjectName()); subjectId.add(response.body().getSubjectList().get(i).getSubjectId()); } ArrayAdapter<String> adp = new ArrayAdapter<String>(getContext(), android.R.layout.simple_list_item_1, subjectlist); adp.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); subjectName.setAdapter(adp); progress.setVisibility(View.GONE); } @Override public void onFailure(Call<SubjectListBean> call, Throwable throwable) { progress.setVisibility(View.GONE); } }); progress.setVisibility(View.GONE); } @Override public void onFailure(Call<SectionListbean> call, Throwable throwable) { progress.setVisibility(View.GONE); } }); } @Override public void onNothingSelected(AdapterView<?> adapterView) { } }); subjectName.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) { ssId = subjectId.get(i); } @Override public void onNothingSelected(AdapterView<?> adapterView) { } }); submit.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if (isFirst == true) { Toast.makeText(getActivity(), "Select Class, Section and Subject. ", Toast.LENGTH_SHORT).show(); } else { Retrofit retrofit = new Retrofit.Builder() .baseUrl(b.baseURL) .addConverterFactory(ScalarsConverterFactory.create()) .addConverterFactory(GsonConverterFactory.create()) .build(); AllAPIs cr = retrofit.create(AllAPIs.class); progress.setVisibility(View.VISIBLE); Log.d("iddd", String.valueOf(sId)); Call<HomewrkListbean> call = cr.homwwrk_list(b.school_id, b.user_id, cId, sId, ssId); call.enqueue(new Callback<HomewrkListbean>() { @Override public void onResponse(Call<HomewrkListbean> call, Response<HomewrkListbean> response) { dialog.dismiss(); progress.setVisibility(View.GONE); adapter.setGridData(response.body().getHomeworkList()); adapter.notifyDataSetChanged(); isSearch = true; onResume(); } @Override public void onFailure(Call<HomewrkListbean> call, Throwable throwable) { progress.setVisibility(View.GONE); } }); } } }); dialog.show(); } }); return view; }
{ "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
Creates a new async stub that supports all call types for the service
public static DoctorServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory<DoctorServiceStub> factory = new io.grpc.stub.AbstractStub.StubFactory<DoctorServiceStub>() { @java.lang.Override public DoctorServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new DoctorServiceStub(channel, callOptions); } }; return DoctorServiceStub.newStub(factory, channel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Stub createStub();", "public interface GenerateResourceServiceAsync {\n /**\n * {@link GenerateResourceServiceImpl#generateTSDPattern(long,boolean)}\n */\n void generateTSDPattern(long settingFileId, boolean isCreateFile, AsyncCallback<VMFile> callback) throws IllegalArgumentException;\n\n /**\n...
[ "0.6892434", "0.6467239", "0.6211053", "0.60550624", "0.58448124", "0.5826248", "0.58191776", "0.5696866", "0.5648306", "0.55342954", "0.55286705", "0.5512426", "0.5510817", "0.5508667", "0.54999334", "0.54982334", "0.546741", "0.5460062", "0.5459664", "0.5436188", "0.5432517...
0.0
-1
Creates a new blockingstyle stub that supports unary and streaming output calls on the service
public static DoctorServiceBlockingStub newBlockingStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory<DoctorServiceBlockingStub> factory = new io.grpc.stub.AbstractStub.StubFactory<DoctorServiceBlockingStub>() { @java.lang.Override public DoctorServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new DoctorServiceBlockingStub(channel, callOptions); } }; return DoctorServiceBlockingStub.newStub(factory, channel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Stub createStub();", "public interface Stream<T> extends Lifecycle {\n\n PendingRequest<T> next(int requestId, T request);\n\n int getPendingRequestCount();\n\n ClientResponseObserver<T, RpcResult> newObserver();\n\n\n final class PendingRequest<T> {\n\n private final T request;\n\n pri...
[ "0.6458012", "0.57180977", "0.5505814", "0.544022", "0.54356253", "0.54159", "0.54159", "0.54159", "0.54159", "0.54159", "0.5414142", "0.54074436", "0.5389581", "0.5360376", "0.5344012", "0.53095233", "0.5303986", "0.5303986", "0.5291003", "0.5264746", "0.5260247", "0.52520...
0.0
-1
Creates a new ListenableFuturestyle stub that supports unary calls on the service
public static DoctorServiceFutureStub newFutureStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory<DoctorServiceFutureStub> factory = new io.grpc.stub.AbstractStub.StubFactory<DoctorServiceFutureStub>() { @java.lang.Override public DoctorServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new DoctorServiceFutureStub(channel, callOptions); } }; return DoctorServiceFutureStub.newStub(factory, channel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static ExtractionServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<ExtractionServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<ExtractionServiceFutureStub>() {\n @Override\n public ExtractionServiceFutureSt...
[ "0.5985981", "0.5908025", "0.58695775", "0.58659035", "0.58654654", "0.58402485", "0.5769668", "0.5759988", "0.5710096", "0.56908256", "0.5688155", "0.5675159", "0.5666334", "0.5658236", "0.5655489", "0.565218", "0.56243795", "0.5623187", "0.55766517", "0.5550165", "0.5532616...
0.55032784
23
/ ================================================================= Class constructors for instantiating a car entity object to represent a row in the Car table in the CarsDB database. ================================================================= Used in PrepareCreate method in CarController
public Car() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Car(){\n\t\t\n\t}", "public Car() {\n }", "public Car() {\r\n super();\r\n }", "public Car() {\n super();\n }", "public Car(Integer id, String make, String logoFileName, String makeUrl, String model, Integer year, Integer price, Integer mileage, Integer cityMPG, Integer highwa...
[ "0.69915813", "0.6983518", "0.69649357", "0.69357663", "0.6869717", "0.685597", "0.67141426", "0.665427", "0.6635293", "0.6573711", "0.6564019", "0.65449315", "0.6422973", "0.64181644", "0.6366417", "0.63643646", "0.6167395", "0.61466897", "0.6133917", "0.61060816", "0.610166...
0.6946471
3
Not used but kept for potential future use
public Car(Integer id, String make, String logoFileName, String makeUrl, String model, Integer year, Integer price, Integer mileage, Integer cityMPG, Integer highwayMPG, String engineType, String driveType) { this.id = id; this.make = make; this.logoFileName = logoFileName; this.makeUrl = makeUrl; this.model = model; this.year = year; this.price = price; this.mileage = mileage; this.cityMPG = cityMPG; this.highwayMPG = highwayMPG; this.engineType = engineType; this.driveType = driveType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public...
[ "0.61924255", "0.60743606", "0.6071602", "0.60103106", "0.5922578", "0.58908457", "0.5848054", "0.58245224", "0.57981026", "0.5776768", "0.5756279", "0.5734877", "0.5699842", "0.5699842", "0.56921464", "0.56921464", "0.56921464", "0.56921464", "0.56921464", "0.56921464", "0.5...
0.0
-1
/ ================================ Instance Methods Used Internally ================================ Generate and return a hash code value for the object with database primary key id
@Override public int hashCode() { int hash = 0; hash += (id != null ? id.hashCode() : 0); return hash; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public int hashCode() {\n \n final int code = 24;\n int result = 1;\n result = code * result + ((id == null) ? 0 : id.hashCode());\n return result;\n }", "public int hashCode() {\n return getId();\n }", "public int hashCode() {\n return getId();\n...
[ "0.72991204", "0.71596473", "0.71044886", "0.7104342", "0.70938575", "0.7056521", "0.704486", "0.7014118", "0.6967047", "0.6965784", "0.695912", "0.69252115", "0.6924061", "0.69209224", "0.6896156", "0.6885128", "0.6879265", "0.6875088", "0.68545043", "0.68349975", "0.6821477...
0.64777136
81
/ Checks if the car object identified by 'object' is the same as the car object identified by 'id' Parameter object = car object identified by 'object' Returns True if the car 'object' and 'id' are the same; otherwise, return False
@Override public boolean equals(Object object) { if (!(object instanceof Car)) { return false; } Car other = (Car) object; return (this.id != null || other.id == null) && (this.id == null || this.id.equals(other.id)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Car)) {\n return false;\n }\n Car other = (Car) object;\n if ((this.idcar == null && other.idcar != null) || (this.idcar != null && !this.idcar.equals(other.idcar))) {\n return false;\n...
[ "0.7376661", "0.6764973", "0.67045397", "0.6688957", "0.66392064", "0.66318506", "0.656746", "0.6556242", "0.6507981", "0.6494172", "0.64735055", "0.64590055", "0.6452922", "0.6406771", "0.63895136", "0.63842463", "0.63825405", "0.6365666", "0.636046", "0.6360428", "0.6349232...
0.75523454
0
Return String representation of database primary key id
@Override public String toString() { return id.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getPrimaryKey() {\n if (primaryKey == null) primaryKey = \"id\";\n return primaryKey;\n }", "public static String getPrimaryKeyName() {\r\n\t\t\treturn PRIMARY_KEY_ID;\r\n\t\t}", "public String formatPrimaryKey()\n {\n StringBuilder sb = new StringBuilder();\n Ac...
[ "0.751708", "0.73463094", "0.73122334", "0.73122334", "0.73122334", "0.73122334", "0.73122334", "0.7201877", "0.7200001", "0.71599394", "0.70564175", "0.698959", "0.6966004", "0.6887756", "0.6867729", "0.6856605", "0.68272513", "0.6806194", "0.6798513", "0.6798513", "0.676267...
0.0
-1
This method will be invoked when a new page becomes selected.
@Override public void onPageSelected(int position) { // Toast.makeText(AlarmSettingActivity.this, // "Selected page position: " + position, Toast.LENGTH_SHORT).show(); setIndicator(position); play(position); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onPageSelected(int pageSelected) {\n\t\t\t}", "@Override\n\t\t\tpublic void onPageSelected(int arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onPageSelected(int arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onPageSelected(int arg0) {\n\n\t\t\t}", "@Override\n\t\tpublic ...
[ "0.7797357", "0.77812594", "0.77812594", "0.7773528", "0.77425534", "0.7726533", "0.7650704", "0.7589704", "0.7589704", "0.7516986", "0.7516986", "0.7491818", "0.7251853", "0.71917045", "0.71658856", "0.7123647", "0.70867276", "0.70867276", "0.70867276", "0.70827943", "0.7004...
0.0
-1
This method will be invoked when the current page is scrolled
@Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { // Code goes here }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onPageScrollStateChanged(int arg0) {\n \n }", "@Override\n public void onPageScrollStateChanged(int arg0) {\n \n }", "@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}", "@Over...
[ "0.78713685", "0.78713685", "0.7814419", "0.7814419", "0.7814419", "0.7814419", "0.7814419", "0.7814419", "0.7814419", "0.7814419", "0.7814419", "0.7814419", "0.7807032", "0.7807032", "0.7807032", "0.7781545", "0.7781545", "0.7762315", "0.7754217", "0.7753104", "0.774548", ...
0.0
-1
Called when the scroll state changes: SCROLL_STATE_IDLE, SCROLL_STATE_DRAGGING, SCROLL_STATE_SETTLING
@Override public void onPageScrollStateChanged(int state) { // Code goes here }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onScrollStateChanged(AbsListView view, int scrollState) {\n\t\tmCurrentScrollState = scrollState;\n\t}", "@Override\n public void onScrollChanged(int scrollY, boolean firstScroll, boolean dragging) {\n }", "@Override\n\tprotected void onScrollChanged(int l, int t, int oldl, int o...
[ "0.7382847", "0.73236716", "0.72743726", "0.72585857", "0.72423357", "0.7222176", "0.7147042", "0.7138126", "0.7134588", "0.70917165", "0.7084647", "0.7063793", "0.70577234", "0.7056919", "0.7040674", "0.70398295", "0.70190746", "0.7017717", "0.70029944", "0.70029944", "0.700...
0.66840225
84
Returns total number of pages
@Override public int getCount() { return NUM_ITEMS; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getPagesAmount();", "public int getTotalPages() {\r\n return totalPages;\r\n }", "public int getTotalPages()\r\n {\r\n return pageNames.size()-1;\r\n }", "public int getTotalPages() {\r\n\t\treturn page.getTotalPages();\r\n\t}", "public Integer getPageCount();", "public int getTotalPag...
[ "0.8670782", "0.85352755", "0.835817", "0.8342886", "0.8292837", "0.8233094", "0.81880236", "0.80999756", "0.8094793", "0.80073506", "0.78744197", "0.7799766", "0.77388656", "0.77283823", "0.75954545", "0.7590071", "0.75671303", "0.7541962", "0.75169176", "0.7510422", "0.7509...
0.0
-1
Returns the fragment to display for that page
@Override public Fragment getItem(int position) { switch (position) { case 0: // Fragment # 0 - This will show FirstFragment return Alarm_Fragment_1.newInstance(0, "Page #1"); case 1: // Fragment # 0 - This will show FirstFragment different title return Alarm_Fragment_2.newInstance(1, "Page # 2"); case 2: // Fragment # 1 - This will show SecondFragment return Alarm_Fragment_3.newInstance(2, "Page # 3"); case 3 : return Alarm_Fragment_4.newInstance(3, "Page # 4"); case 4 : return Alarm_Fragment_5.newInstance(5, "Page # 5"); //return Frag5.newInstance(4, "Page # 5"); case 5 : return Alarm_Fragment_6.newInstance(6, "Page # 6"); default: return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getFragment() {\n\t\treturn fragment;\n\t}", "public String getFragment() {\n return m_fragment;\n }", "public lanyotech.cn.park.protoc.CommonProtoc.PageHelper getPage() {\n if (pageBuilder_ == null) {\n return page_;\n } else {\n return pageBuilder_.getMessa...
[ "0.6543084", "0.6520935", "0.6365829", "0.6178564", "0.6148923", "0.6048764", "0.601362", "0.60135686", "0.5956785", "0.584006", "0.58135945", "0.58067", "0.5798896", "0.57979524", "0.5789065", "0.5773344", "0.5768405", "0.5729677", "0.5693581", "0.56873405", "0.5675193", "...
0.5103001
93
Returns the page title for the top indicator
@Override public CharSequence getPageTitle(int position) { return "Page " + position; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "public String getPageTitle()\n {\n return page == null ? StringUtils.EMPTY : page.getElementInfo().getTitle();\n }", "public static String...
[ "0.7533483", "0.7533483", "0.7533483", "0.7533483", "0.7533483", "0.74283767", "0.7384088", "0.7286544", "0.7284714", "0.72799945", "0.7278579", "0.7278579", "0.7278579", "0.7278579", "0.7278579", "0.7278579", "0.7278579", "0.7278579", "0.7278579", "0.7278579", "0.7278579", ...
0.0
-1
System.out.println("The lowerArg is " + lowerArg); System.out.println("The upperArg is " + upperArg);
private boolean checkHierarchy(String lowerArg, String upperArg) { if (lowerArg.equals(upperArg)) { return true; } List<String> primTypes = Arrays.asList("int", "int[]", "boolean"); if (primTypes.contains(lowerArg) || primTypes.contains(upperArg)) { return false; } SymbolTable table = null; for (ClassDecl classDecl : this.classesDeclrs) { if (classDecl.name().equals(lowerArg)) { table = ExtractTable(classDecl); } } while (table != null) { if (table.className != null && table.className.equals(upperArg)) { return true; } table = table.getParentSymbolTable(); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args)\r\n\t\t\t{\n\t\t\t\tprintLowerAndUpperBound();\r\n\t\t\t}", "void test(int a ,int b){\n System.out.println(\"a and b: \"+a+\" \"+b);\n }", "public void printRange(AnyType lower, AnyType upper) {\r\n\t\tif (lower.compareTo(upper) > 0) {\r\n\t\t\tAnyType temp = lo...
[ "0.66182625", "0.65052456", "0.6124795", "0.60407627", "0.603874", "0.6005216", "0.59868896", "0.59322965", "0.5928339", "0.5885752", "0.58584607", "0.58342373", "0.5823679", "0.5820829", "0.58167684", "0.5789897", "0.57755405", "0.57731926", "0.57660437", "0.57657164", "0.57...
0.0
-1
Use this factory method to create a new instance of this fragment using the provided parameters.
public static FaceRecFragment newInstance(String param1, String param2) { FaceRecFragment fragment = new FaceRecFragment(); Bundle args = new Bundle(); args.putString(ARG_PARAM1, param1); args.putString(ARG_PARAM2, param2); fragment.setArguments(args); return fragment; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static FragmentTousWanted newInstance() {\n FragmentTousWanted fragment = new FragmentTousWanted();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "protected abstract Fragment createFragment();", "public void createFragment() {\n\n ...
[ "0.7259329", "0.72331375", "0.71140355", "0.69909847", "0.69902235", "0.6834592", "0.683074", "0.68134046", "0.6801526", "0.6801054", "0.67653185", "0.6739714", "0.6739714", "0.6727412", "0.6717231", "0.6705855", "0.6692112", "0.6691661", "0.66869426", "0.66606814", "0.664618...
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.i("FaceRecFragment", "onCreateView"); View view= inflater.inflate(R.layout.fragment_face_rec, container, false); visCameraView = view.findViewById(R.id.camera_view); returnButton = findViewByIdAndSetListener(R.id.return_button,view); livenessModeSpinner = findViewByIdAndSetListener(R.id.liveness_mode_spinner,view); livenessDetectModeArrayAdapter = new ArrayAdapter<LivenessDetectMode>(this.getActivity(), android.R.layout.simple_list_item_1, DemoUtils.getSupportLivenessModes(XsFaceSDKCameraHelper.getNirCamera() != null)); livenessModeSpinner.setAdapter(livenessDetectModeArrayAdapter); meteringCheckbox = findViewByIdAndSetListener(R.id.metering_checkbox,view); reRecCheckbox = findViewByIdAndSetListener(R.id.rerec_checkbox,view); repeatCloseOpenCamera=findViewByIdAndSetListener(R.id.repeat_checkbox,view); return view; }
{ "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: Rename method, update argument and hook method into UI event
public void onButtonPressed(Uri uri) { if (mListener != null) { mListener.onFragmentInteraction(uri); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\n\t\t\t\t}", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}", "@...
[ "0.66202044", "0.65255916", "0.64743257", "0.64743257", "0.6436195", "0.6325417", "0.6237402", "0.61902404", "0.61594874", "0.61453", "0.61244947", "0.6106878", "0.61008215", "0.6093242", "0.60499597", "0.60499597", "0.6046236", "0.6041878", "0.6041878", "0.60084456", "0.5999...
0.0
-1
This interface must be implemented by activities that contain this fragment to allow an interaction in this fragment to be communicated to the activity and potentially other fragments contained in that activity. See the Android Training lesson Communicating with Other Fragments for more information.
public interface OnFragmentInteractionListener { // TODO: Update argument type and name void onFragmentInteraction(Uri uri); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface OnFragmentInteractionListener {\n void onFragmentMessage(String TAG, Object data);\n}", "public interface FragmentInteraction {\n void switchToBoardView();\n void switchToPinsView();\n void switchToPins(PDKBoard pdkBoard);\n void switchToDescription(PDKPin pin);\n}", "public int...
[ "0.7325317", "0.7209285", "0.7136769", "0.7125", "0.71222794", "0.7015571", "0.6976405", "0.6976405", "0.6976405", "0.69750535", "0.69684756", "0.696636", "0.69612736", "0.6954515", "0.694358", "0.6934953", "0.69307446", "0.6928857", "0.69236445", "0.69108784", "0.69035834", ...
0.0
-1
TODO: Update argument type and name
void onFragmentInteraction(Uri uri);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public String getFirstArg() {\n return name;\r\n }", "@Override\n public int getNumberArguments() {\n return 1;\n }", "java.lang.String getArg();", "@Override\n public int getArgLength() {\n return 4;\n }", "Argument createArgument();", "@Override\r\n\tpublic ...
[ "0.7164074", "0.6946075", "0.6714363", "0.65115863", "0.63969076", "0.6375468", "0.63481104", "0.63162106", "0.6260299", "0.6208487", "0.6208487", "0.62070644", "0.6197276", "0.61806154", "0.6177103", "0.61530507", "0.61472267", "0.61243707", "0.60771817", "0.6054482", "0.599...
0.0
-1
/ solution: sort and compare /
public static int heightChecker(int[] heights) { int[] copy = heights.clone(); Arrays.sort(copy); int count = 0; for(int i = 0; i < copy.length; i++){ if(heights[i]!=copy[i]) { count++; } } return count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void sort();", "void sort();", "public void sort() {\n ListNode start = head;\n ListNode position1;\n ListNode position2;\n\n // Going through each element of the array from the second element to the end\n while (start.next != null) {\n start = start.next;\n ...
[ "0.7009674", "0.7009674", "0.691371", "0.67796344", "0.66553", "0.6639672", "0.6628865", "0.6628329", "0.66241235", "0.65866137", "0.6578354", "0.6519973", "0.6498284", "0.6471202", "0.6465848", "0.64343154", "0.6425364", "0.64113647", "0.64029294", "0.6401897", "0.639801", ...
0.0
-1
Created by Sarah on 5/2/2017.
public interface MonsterStateTransitions { //state transitions void toVulnerableState(); void toProtectedState(); //actions void init(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Overri...
[ "0.5977021", "0.5847734", "0.5837049", "0.57779163", "0.5736978", "0.5732907", "0.57013965", "0.56700003", "0.56700003", "0.5641489", "0.5578566", "0.55728245", "0.5569631", "0.55426276", "0.5517312", "0.5514957", "0.5514917", "0.5513724", "0.5510589", "0.5510589", "0.5510589...
0.0
-1
TODO Autogenerated method stub
private static void SearchRowAndColwise(int[][] arr, int r, int c, int key) { int i = 0; int j = c - 1; while (i <= r && j >= 0) { int mid = arr[i][j]; if (key < mid) { j--; } else if (key > mid) { i++; } else if (key == mid) { System.out.println("key found at row" + i + "and at column" + j); return; } } System.out.println("not found"); }
{ "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
Create contents of the dialog.
private void createContents() { shell = new Shell(getParent(), getStyle()); shell.setSize(540, 297); shell.setLayout(new GridLayout(1, false)); Composite cmpTop = new Composite(shell, SWT.NONE); cmpTop.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); GridLayout gl_cmpTop = new GridLayout(4, false); gl_cmpTop.verticalSpacing = 0; cmpTop.setLayout(gl_cmpTop); Label lblBankAccountNumber = new Label(cmpTop, SWT.CENTER); lblBankAccountNumber.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1)); lblBankAccountNumber.setBounds(0, 0, 59, 14); lblBankAccountNumber.setText("Bank Account"); Label lblBranch = new Label(cmpTop, SWT.CENTER); lblBranch.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1)); lblBranch.setBounds(0, 0, 59, 14); lblBranch.setText("Branch"); Label lblBank = new Label(cmpTop, SWT.CENTER); lblBank.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1)); lblBank.setText("Bank"); new Label(cmpTop, SWT.NONE); txtBankAccountNumber = new Text(cmpTop, SWT.BORDER); txtBankAccountNumber.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1)); txtBankAccountNumber.setBounds(0, 0, 64, 19); txtBranch = new Text(cmpTop, SWT.BORDER); GridData gd_txtBranch = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1); gd_txtBranch.widthHint = 50; txtBranch.setLayoutData(gd_txtBranch); txtBranch.setBounds(0, 0, 64, 19); txtBank = new Text(cmpTop, SWT.BORDER); GridData gd_txtBank = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1); gd_txtBank.widthHint = 50; txtBank.setLayoutData(gd_txtBank); btnSearch = new Button(cmpTop, SWT.NONE); btnSearch.setAlignment(SWT.RIGHT); btnSearch.setText("Search"); btnSearch.setEnabled(false); Composite cmpResults = new Composite(shell, SWT.NONE); cmpResults.setLayout(new GridLayout(1, false)); GridData gd_cmpResults = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1); gd_cmpResults.heightHint = 129; cmpResults.setLayoutData(gd_cmpResults); tblAccounts = new Table(cmpResults, SWT.BORDER); GridData gd_tblAccounts = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1); gd_tblAccounts.heightHint = 71; tblAccounts.setLayoutData(gd_tblAccounts); tblAccounts.setHeaderVisible(true); tblAccounts.setLinesVisible(true); TableColumn tblclmnAccountNumber = new TableColumn(tblAccounts, SWT.NONE); tblclmnAccountNumber.setWidth(120); tblclmnAccountNumber.setText("Player Account"); TableColumn tblclmsFirstName = new TableColumn(tblAccounts, SWT.NONE); tblclmsFirstName.setWidth(100); tblclmsFirstName.setText("First Name"); TableColumn tblclmnLastName = new TableColumn(tblAccounts, SWT.NONE); tblclmnLastName.setWidth(100); tblclmnLastName.setText("Last Name"); TableColumn tblclmnActivated = new TableColumn(tblAccounts, SWT.NONE); tblclmnActivated.setWidth(95); tblclmnActivated.setText("From"); TableColumn tblclmnDeactivated = new TableColumn(tblAccounts, SWT.NONE); tblclmnDeactivated.setWidth(100); tblclmnDeactivated.setText("To"); Composite cmpFooter = new Composite(shell, SWT.NONE); cmpFooter.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); cmpFooter.setLayout(new GridLayout(2, false)); lblResultsMessage = new Label(cmpFooter, SWT.NONE); lblResultsMessage.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1)); Composite cmpButtons = new Composite(cmpFooter, SWT.NONE); cmpButtons.setLayout(new GridLayout(3, false)); cmpButtons.setLayoutData(new GridData(SWT.RIGHT, SWT.BOTTOM, true, false, 1, 1)); btnLoad = new Button(cmpButtons, SWT.NONE); btnLoad.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1)); btnLoad.setText("Load Account"); btnLoad.setEnabled(false); btnCancel = new Button(cmpButtons, SWT.NONE); btnCancel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1)); btnCancel.setText("Cancel"); new Label(cmpButtons, SWT.NONE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createContents() {\n\t\tshell = new Shell(getParent(), getStyle());\n\n\t\tshell.setSize(379, 234);\n\t\tshell.setText(\"\\u0410\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\");\n\t\tshell.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tLabel dialogAccountHeader = new Label(shell, SWT.NONE);\n\t\tdialogAcc...
[ "0.7465564", "0.71213424", "0.70750844", "0.7056892", "0.7035284", "0.6982003", "0.6966167", "0.6853646", "0.68448454", "0.6811343", "0.68096405", "0.6801873", "0.67985934", "0.6798088", "0.679386", "0.6789257", "0.67799765", "0.6769032", "0.6748607", "0.67194223", "0.6717503...
0.6212883
63
Get the list of note names in the server
public static String[] getAllNotes(int tenantID) throws RegistryException { UserRegistry userRegistry = ServiceHolder.getRegistryService().getConfigSystemRegistry(tenantID); createNotesCollectionIfNotExists(userRegistry); Collection noteCollection = (Collection) userRegistry.get(NoteConstants.NOTE_LOCATION); String[] notes = noteCollection.getChildren(); if (notes == null) { notes = new String[0]; } else { for (int i = 0; i < notes.length; i++) { // Removing note registry path notes[i] = notes[i].replace(NoteConstants.NOTE_LOCATION, ""); notes[i] = notes[i].replace(RegistryConstants.PATH_SEPARATOR, ""); notes[i] = notes[i].replace(NoteConstants.NOTE_FILE_EXTENSION_SEPARATOR + NoteConstants.NOTE_FILE_EXTENSION, ""); } } return notes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<String> nicknames();", "public String LIST(){\n String nameList = \"\";\n Enumeration keys = this.clientData.keys();\n while(keys.hasMoreElements()){\n nameList += keys.nextElement() + \" \";\n }\n return \"OK \" + nameList;\n }", "public String fetc...
[ "0.6602525", "0.64234984", "0.6385986", "0.63593626", "0.63082224", "0.6292168", "0.6265467", "0.6251164", "0.62253547", "0.6219535", "0.61632234", "0.61202955", "0.6103329", "0.61030656", "0.6080083", "0.60395366", "0.6028283", "0.6019476", "0.59850603", "0.5977606", "0.5941...
0.5842731
36
Add a new note into the server and add content
public static void addNewNote(int tenantID, String noteName, String content) throws NotePersistenceException, RegistryException { UserRegistry userRegistry = ServiceHolder.getRegistryService().getConfigSystemRegistry(tenantID); createNotesCollectionIfNotExists(userRegistry); String noteLocation = getNoteLocation(noteName); if (content == null) { content = "[]"; } if (!userRegistry.resourceExists(noteLocation)) { Resource resource = userRegistry.newResource(); resource.setContent(content); resource.setMediaType(NoteConstants.NOTE_MEDIA_TYPE); userRegistry.put(noteLocation, resource); } else { log.error("Cannot create new note with name " + noteName + " for tenant with tenant ID " + tenantID + " because note already exists"); throw new NotePersistenceException("Already a note exists with same name : " + noteName + " for tenantId :" + tenantID); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createNote(NewNoteInput note, QueryService service) {\n if ((note.body() == null || note.body().isEmpty()) &&\n (note.title() == null || note.title().isEmpty())) {\n Log.i(LOG_TAG, \"skipped upload of note with empty body\");\n return;\n }\n\n serv...
[ "0.727928", "0.709262", "0.70761734", "0.6985627", "0.69797814", "0.69731474", "0.68505186", "0.6764747", "0.6763474", "0.675932", "0.67495996", "0.6716789", "0.6686779", "0.6686779", "0.6686779", "0.6686779", "0.6686779", "0.66669893", "0.66639197", "0.66630995", "0.66372436...
0.71163887
1
Update the contents of the given note
public static void updateNote(int tenantID, String noteName, String content) throws RegistryException, NotePersistenceException { UserRegistry userRegistry = ServiceHolder.getRegistryService().getConfigSystemRegistry(tenantID); String noteLocation = getNoteLocation(noteName); if (userRegistry.resourceExists(noteLocation)) { Resource resource = userRegistry.get(noteLocation); resource.setContent(content); resource.setMediaType(NoteConstants.NOTE_MEDIA_TYPE); userRegistry.put(noteLocation, resource); } else { log.warn("Cannot update note with name " + noteName + " for tenant with tenant ID " + tenantID + " because it does not exist. Creating new note and adding the content."); addNewNote(tenantID, noteName, content); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Update withNotes(String notes);", "@Test\n\tpublic void testUpdateNote() {\n//\t\tlog.trace(\"Testing updating note\");\n\t\tfinal short week = 2;\n\n\t\t// get the list of individual notes for week 2\n\t\tList<Note> notes = noteDao.findIndividualNotes(TEST_QCBATCH_ID, week);\n\n\t\tassertTrue(!notes.isEmpty());...
[ "0.7183007", "0.71422935", "0.7120517", "0.6717649", "0.6650423", "0.6637983", "0.66262025", "0.66186255", "0.65729254", "0.65729254", "0.65729254", "0.65729254", "0.65729254", "0.6547573", "0.6538301", "0.64602125", "0.64279383", "0.64261144", "0.6397275", "0.6394687", "0.63...
0.6498714
15
Get the contents of the note as a JSON string
public static String getNote(int tenantID, String noteName) throws RegistryException, NotePersistenceException { UserRegistry userRegistry = ServiceHolder.getRegistryService().getConfigSystemRegistry(tenantID); String noteLocation = getNoteLocation(noteName); if (userRegistry.resourceExists(noteLocation)) { return RegistryUtils.decodeBytes((byte[]) userRegistry.get(noteLocation).getContent()); } else { log.error("Cannot retrieve note because a note with name " + noteName + " for tenant with tenant ID " + tenantID + " does not exist"); throw new NotePersistenceException("Cannot get note with name : " + noteName + " for tenantId : " + tenantID + " beacause it does not exist"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "com.google.protobuf.ByteString\n getNotesBytes();", "com.google.protobuf.ByteString\n getNotesBytes();", "public java.lang.String getNotes() {\n java.lang.Object ref = notes_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.g...
[ "0.68084115", "0.68084115", "0.68033534", "0.6788124", "0.6757535", "0.6756424", "0.67493474", "0.67493474", "0.67152613", "0.6620042", "0.6615689", "0.6585305", "0.6585305", "0.6559954", "0.6559954", "0.6538576", "0.64490134", "0.6434525", "0.64320356", "0.64307934", "0.6270...
0.0
-1
Delete a note in the server
public static void deleteNote(int tenantID, String noteName) throws RegistryException { UserRegistry userRegistry = ServiceHolder.getRegistryService().getConfigSystemRegistry(tenantID); String noteLocation = getNoteLocation(noteName); if (userRegistry.resourceExists(noteLocation)) { userRegistry.delete(noteLocation); } else { log.error("Cannot to delete note note with name " + noteName + " for tenant with tenant ID " + tenantID + " because it does not exist"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean deleteMyNote(MyNoteDto usernote);", "@Override\n\tpublic void delete(Note e) {\n\t\t\n\t}", "int deleteByExample(ComplainNoteDOExample example);", "@Override\n\tpublic void delete(GalaxyNote galaxynote) {\n\t\t\n\t}", "private void deleteNoteOnFirebaseManager(Note note){\n firebase.deleteNot...
[ "0.75897753", "0.7565793", "0.754117", "0.75046474", "0.74789554", "0.743396", "0.73022634", "0.7268977", "0.7257399", "0.7198605", "0.7162805", "0.69590557", "0.67221045", "0.6691279", "0.6690282", "0.66702586", "0.6632803", "0.6630539", "0.6598033", "0.6596885", "0.65697557...
0.6433629
26
Create the note directory if it does not exist
private static void createNotesCollectionIfNotExists(UserRegistry registry) throws RegistryException { if (!registry.resourceExists(NoteConstants.NOTE_LOCATION)) { Collection collection = registry.newCollection(); registry.put(NoteConstants.NOTE_LOCATION, collection); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void createSaveDirIfNotExisting() {\n\t\tFile dir = new File(\"save\");\n\t\tif (!dir.exists()) {\n\t\t\t// directory does not exist => create!\n\t\t\tdir.mkdir();\n\t\t}\n\t}", "public void createDirectory() {\r\n\t\tpath = env.getProperty(\"resources\") + \"/\" + Year.now().getValue() + \"/\";\r...
[ "0.6574705", "0.6401804", "0.6210872", "0.6201304", "0.6083168", "0.6013945", "0.59581757", "0.59329736", "0.59326357", "0.58697593", "0.58635986", "0.58489615", "0.57765234", "0.5776449", "0.57728916", "0.5763165", "0.57447624", "0.5743963", "0.5716088", "0.5711628", "0.5692...
0.0
-1
Get the location of the note Including the note file name and extension
private static String getNoteLocation(String noteName) { return NoteConstants.NOTE_LOCATION + RegistryConstants.PATH_SEPARATOR + noteName + NoteConstants.NOTE_FILE_EXTENSION_SEPARATOR + NoteConstants.NOTE_FILE_EXTENSION; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getFileLoc();", "public L getDocumentLocation();", "public abstract String getFileLocation();", "public String getLocationPath();", "public String getLocationOfFiles() {\n\t\ttry {\n\t\t\tFile f = new File(\n\t\t\t\t\tgetRepositoryManager().getMetadataRecordsLocation() + \"/\" + getFormatO...
[ "0.67196834", "0.6535028", "0.6371853", "0.63462275", "0.6272504", "0.61886925", "0.61691153", "0.61579305", "0.6119762", "0.6089598", "0.6011699", "0.5983951", "0.59690446", "0.59473574", "0.5945871", "0.593528", "0.5911847", "0.590668", "0.5889607", "0.5870356", "0.58271456...
0.7554991
0
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { pPainel = new javax.swing.JPanel(); lNomeCliente = new javax.swing.JLabel(); lDataInicial = new javax.swing.JLabel(); lDataFinal = new javax.swing.JLabel(); tfNomeCliente = new javax.swing.JTextField(); spClientePedidos = new javax.swing.JScrollPane(); tRelatorio = new javax.swing.JTable(); sSeparador = new javax.swing.JSeparator(); bProcurar = new javax.swing.JButton(); dcInicial = new com.toedter.calendar.JDateChooser(); dcFinal = new com.toedter.calendar.JDateChooser(); bSair = new javax.swing.JButton(); bSalvar = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Relatórios"); setMinimumSize(new java.awt.Dimension(650, 400)); setPreferredSize(new java.awt.Dimension(650, 400)); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosed(java.awt.event.WindowEvent evt) { formWindowClosed(evt); } }); pPainel.setPreferredSize(new java.awt.Dimension(650, 550)); lNomeCliente.setText("Nome do Cliente:"); lDataInicial.setText("Data inicial:"); lDataFinal.setText("Data final:"); tRelatorio.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { }, new String [] { "ID", "Data", "Cliente", "Valor" } ) { boolean[] canEdit = new boolean [] { false, false, false, false }; public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit [columnIndex]; } }); spClientePedidos.setViewportView(tRelatorio); bProcurar.setText("Procurar"); bProcurar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { bProcurarActionPerformed(evt); } }); dcInicial.setDateFormatString("dd/MM/yy"); dcFinal.setDateFormatString("dd/MM/yy"); bSair.setText("Sair"); bSair.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { bSairActionPerformed(evt); } }); bSalvar.setText("Salvar"); bSalvar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { bSalvarActionPerformed(evt); } }); javax.swing.GroupLayout pPainelLayout = new javax.swing.GroupLayout(pPainel); pPainel.setLayout(pPainelLayout); pPainelLayout.setHorizontalGroup( pPainelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pPainelLayout.createSequentialGroup() .addContainerGap() .addGroup(pPainelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(sSeparador) .addGroup(pPainelLayout.createSequentialGroup() .addComponent(lNomeCliente) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(tfNomeCliente)) .addComponent(spClientePedidos, javax.swing.GroupLayout.DEFAULT_SIZE, 611, Short.MAX_VALUE) .addGroup(pPainelLayout.createSequentialGroup() .addGroup(pPainelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lDataInicial) .addComponent(dcInicial, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(40, 40, 40) .addGroup(pPainelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pPainelLayout.createSequentialGroup() .addComponent(dcFinal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(bProcurar) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(bSalvar) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(bSair)) .addGroup(pPainelLayout.createSequentialGroup() .addComponent(lDataFinal) .addGap(79, 79, 79))))) .addContainerGap()) ); pPainelLayout.setVerticalGroup( pPainelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pPainelLayout.createSequentialGroup() .addContainerGap() .addGroup(pPainelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lNomeCliente) .addComponent(tfNomeCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addComponent(spClientePedidos, javax.swing.GroupLayout.PREFERRED_SIZE, 211, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(sSeparador, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(pPainelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pPainelLayout.createSequentialGroup() .addGap(22, 22, 22) .addGroup(pPainelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(bProcurar) .addComponent(bSair) .addComponent(bSalvar))) .addGroup(pPainelLayout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(pPainelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lDataInicial) .addComponent(lDataFinal)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(pPainelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(dcInicial, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(dcFinal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); getContentPane().add(pPainel, java.awt.BorderLayout.CENTER); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.73191476", "0.72906625", "0.72906625", "0.72906625", "0.72860986", "0.7248112", "0.7213479", "0.72078276", "0.7195841", "0.71899796", "0.71840525", "0.7158498", "0.71477973", "0.7092748", "0.70800966", "0.70558053", "0.69871384", "0.69773406", "0.69548076", "0.69533914", "...
0.0
-1
End of variables declaration//GENEND:variables
public void popularTabela() { try { RelatorioRN relatorioRN = new RelatorioRN(); ArrayList<PedidoVO> pedidos = relatorioRN.buscarPedidos(); javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) tRelatorio.getModel(); dtm.fireTableDataChanged(); dtm.setRowCount(0); for (PedidoVO pedidoVO : pedidos) { String[] linha = {"" + pedidoVO.getIdpedido(), "" + pedidoVO.getData(), "" + pedidoVO.getCliente(), "" + pedidoVO.getValor()}; dtm.addRow(linha); } } catch (SQLException sqle) { JOptionPane.showMessageDialog(null, "Erro: " + sqle.getMessage(), "Bordas", JOptionPane.ERROR_MESSAGE); } catch (Exception e) { JOptionPane.showMessageDialog(null, "Erro: " + e.getMessage(), "Bordas", JOptionPane.ERROR_MESSAGE); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "private void assignment() {\n\n\t\t\t}", "private void kk12() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n pu...
[ "0.6359434", "0.6280371", "0.61868024", "0.6094568", "0.60925734", "0.6071678", "0.6052686", "0.60522056", "0.6003249", "0.59887564", "0.59705925", "0.59680873", "0.5967989", "0.5965816", "0.5962006", "0.5942372", "0.5909877", "0.5896588", "0.5891321", "0.5882983", "0.5881482...
0.0
-1
This class was generated by the JAXWS RI. JAXWS RI 2.2.11b150120.1832 Generated source version: 2.2
@WebService(name = "OrderPortType", targetNamespace = "http://www.ttu.ee/idu0075/2017/ws/restaurant2") @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE) @XmlSeeAlso({ ObjectFactory.class }) public interface OrderPortType { /** * * @param parameter * @return * returns ee.ttu.idu0075._2017.ws.restaurant2.DishType */ @WebMethod @WebResult(name = "getDishResponse", targetNamespace = "http://www.ttu.ee/idu0075/2017/ws/restaurant2", partName = "parameter") public DishType getDish( @WebParam(name = "getDishRequest", targetNamespace = "http://www.ttu.ee/idu0075/2017/ws/restaurant2", partName = "parameter") GetDishRequest parameter); /** * * @param parameter * @return * returns ee.ttu.idu0075._2017.ws.restaurant2.DishType */ @WebMethod @WebResult(name = "addDishResponse", targetNamespace = "http://www.ttu.ee/idu0075/2017/ws/restaurant2", partName = "parameter") public DishType addDish( @WebParam(name = "addDishRequest", targetNamespace = "http://www.ttu.ee/idu0075/2017/ws/restaurant2", partName = "parameter") AddDishRequest parameter); /** * * @param parameter * @return * returns ee.ttu.idu0075._2017.ws.restaurant2.GetDishListResponse */ @WebMethod @WebResult(name = "getDishListResponse", targetNamespace = "http://www.ttu.ee/idu0075/2017/ws/restaurant2", partName = "parameter") public GetDishListResponse getDishList( @WebParam(name = "getDishListRequest", targetNamespace = "http://www.ttu.ee/idu0075/2017/ws/restaurant2", partName = "parameter") GetDishListRequest parameter); /** * * @param parameter * @return * returns ee.ttu.idu0075._2017.ws.restaurant2.OrderType */ @WebMethod @WebResult(name = "getOrderResponse", targetNamespace = "http://www.ttu.ee/idu0075/2017/ws/restaurant2", partName = "parameter") public OrderType getOrder( @WebParam(name = "getOrderRequest", targetNamespace = "http://www.ttu.ee/idu0075/2017/ws/restaurant2", partName = "parameter") GetOrderRequest parameter); /** * * @param parameter * @return * returns ee.ttu.idu0075._2017.ws.restaurant2.OrderType */ @WebMethod @WebResult(name = "addOrderResponse", targetNamespace = "http://www.ttu.ee/idu0075/2017/ws/restaurant2", partName = "parameter") public OrderType addOrder( @WebParam(name = "addOrderRequest", targetNamespace = "http://www.ttu.ee/idu0075/2017/ws/restaurant2", partName = "parameter") AddOrderRequest parameter); /** * * @param parameter * @return * returns ee.ttu.idu0075._2017.ws.restaurant2.GetOrderListResponse */ @WebMethod @WebResult(name = "getOrderListResponse", targetNamespace = "http://www.ttu.ee/idu0075/2017/ws/restaurant2", partName = "parameter") public GetOrderListResponse getOrderList( @WebParam(name = "getOrderListRequest", targetNamespace = "http://www.ttu.ee/idu0075/2017/ws/restaurant2", partName = "parameter") GetOrderListRequest parameter); /** * * @param parameter * @return * returns ee.ttu.idu0075._2017.ws.restaurant2.OrderDishListType */ @WebMethod @WebResult(name = "getOrderDishListResponse", targetNamespace = "http://www.ttu.ee/idu0075/2017/ws/restaurant2", partName = "parameter") public OrderDishListType getOrderDishList( @WebParam(name = "getOrderDishListRequest", targetNamespace = "http://www.ttu.ee/idu0075/2017/ws/restaurant2", partName = "parameter") GetOrderDishListRequest parameter); /** * * @param parameter * @return * returns ee.ttu.idu0075._2017.ws.restaurant2.OrderDishType */ @WebMethod @WebResult(name = "addOrderDishResponse", targetNamespace = "http://www.ttu.ee/idu0075/2017/ws/restaurant2", partName = "parameter") public OrderDishType addOrderDish( @WebParam(name = "addOrderDishRequest", targetNamespace = "http://www.ttu.ee/idu0075/2017/ws/restaurant2", partName = "parameter") AddOrderDishRequest parameter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@WebService(name = \"ZWSVUR_UPDSTATUS\", targetNamespace = \"urn:sap-com:document:sap:rfc:functions\")\r\npublic interface ZWSVURUPDSTATUS {\r\n\r\n\r\n /**\r\n * \r\n * @param iNROLIQ\r\n * @param eRETURN\r\n * @param iESTADO\r\n * @param eMESSAGE\r\n */\r\n @WebMethod(operationName ...
[ "0.66070825", "0.64775544", "0.630916", "0.6291267", "0.6277317", "0.6257862", "0.6248848", "0.62480336", "0.623558", "0.6233331", "0.62311953", "0.6223949", "0.6223049", "0.62143505", "0.6206468", "0.6201611", "0.619187", "0.61884725", "0.6186561", "0.61825", "0.6180536", ...
0.594007
65
Strip qualifier of a fully qualified class name,
public static String stripQualifier(String className) { String qual = getQualifier(className); if (qual == null) return className; int len = className.length(); return className.substring(qual.length() + 1, len); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getQualifier(String className) {\n \tString name = className;\n \tif (name.indexOf('<') >= 0) {//is generic class?\n \t\tname = erase(name);\n \t}\n int index = name.lastIndexOf('.');\n return (index < 0) ? null : name.substring(0, index);\n }", "String qualified...
[ "0.7134868", "0.62324566", "0.61597866", "0.5954948", "0.593095", "0.58893216", "0.5887988", "0.58613235", "0.5805727", "0.577948", "0.5775639", "0.5775372", "0.5763971", "0.57588726", "0.574515", "0.5742235", "0.569749", "0.56698805", "0.56426245", "0.56423914", "0.5617899",...
0.81295514
0
Get package name a fully qualified class name
public static String getPackageName(String className) { String packageName = getQualifier(className); return packageName != null ? packageName : ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getFullyQualifiedName() {\n\t\treturn this.getPackageName() + \".\" + this.getClassName();\n\t}", "java.lang.String getClassName();", "private String getClassname() {\r\n\t\tString classname = this.getClass().getName();\r\n\t\tint index = classname.lastIndexOf('.');\r\n\t\tif (index >= 0)\r\n\t\t...
[ "0.7600532", "0.7510499", "0.7420464", "0.72951466", "0.72788286", "0.72446346", "0.7209079", "0.71999633", "0.7148601", "0.71456635", "0.71456635", "0.71456635", "0.7131622", "0.70659506", "0.7053803", "0.69946414", "0.6921327", "0.6910148", "0.68701065", "0.684076", "0.6770...
0.7034742
15
Get qualifier of a class name
public static String getQualifier(String className) { String name = className; if (name.indexOf('<') >= 0) {//is generic class? name = erase(name); } int index = name.lastIndexOf('.'); return (index < 0) ? null : name.substring(0, index); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract String getQualifier();", "public String getQualifier() {\n return mQualifier;\n }", "java.lang.String getClassName();", "String getClassName();", "String getClassName();", "String getClassName();", "public PosSymbol getQualifier() {\n return qualifier;\n }", "publ...
[ "0.71075654", "0.65895736", "0.6448515", "0.64221174", "0.64221174", "0.64221174", "0.63831323", "0.63517386", "0.63428867", "0.61816216", "0.61703503", "0.61703503", "0.61376363", "0.6119847", "0.60372037", "0.6031879", "0.60061276", "0.5950197", "0.5949016", "0.59221244", "...
0.7492738
0
Erase type parameters of a generic class
public static String erase(String className) { int index = className.indexOf('<'); if(index < 0) return className; return (index > 0)?className.substring(0, index):className; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void clearTypedParameters();", "void unsetType();", "boolean removeTypedParameter(Parameter typedParameter);", "public static String stripGenerics(String className) {\n String name = className;\n \n if (name.contains(\"<\")) {\n name = name.substring(0, name.indexOf('<'));\n ...
[ "0.6597609", "0.61777127", "0.5776954", "0.5591764", "0.54831696", "0.5466357", "0.5375058", "0.53108025", "0.5279478", "0.52656007", "0.51882565", "0.5183541", "0.51435274", "0.51167136", "0.5104388", "0.5099316", "0.5078611", "0.50731516", "0.507085", "0.50428253", "0.50396...
0.0
-1
change package name into a relative file path
public static String packageNameToPath(String pkgName) { if (pkgName == null) return null; String path = pkgName.replace('.', File.separatorChar); return path; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String getPackageNameForPackageDirFile(WebFile aFile)\n {\n String filePath = aFile.getPath();\n return filePath.substring(1).replace('/', '.');\n }", "static String translatePackageNameToFilePath(final String packageName) {\n if (packageName == null) {\n thro...
[ "0.6858932", "0.6848906", "0.66871417", "0.6594786", "0.63313144", "0.6329854", "0.63196564", "0.62243235", "0.6174847", "0.6120408", "0.611607", "0.6110693", "0.6071775", "0.6054257", "0.6024013", "0.5960982", "0.5951802", "0.5941356", "0.5920623", "0.5902262", "0.58896095",...
0.6428731
4
Returns a map with the total sales of each pricelist used in an order
public Map<Pricelist, Double> getSalesPrPricelist() { Map<Pricelist, Double> sales = new HashMap<>(); for (Order o : orders) { Double currentTotal = sales.get(o.getPricelist()); if (currentTotal == null) { currentTotal = 0.0; } currentTotal += o.totalPrice(); sales.put(o.getPricelist(), currentTotal); } return sales; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Map<String, Double> getSalesPrBeer() {\n\t\tMap<String, Double> sales = new HashMap<>();\n\n\t\tfor (Order o : orders) {\n\t\t\tfor (ProductOrder po : o.getAllProducts()) {\n\t\t\t\tProduct p = po.getProduct();\n\t\t\t\tString category = po.getProduct().getCategory();\n\n\t\t\t\tif (category.equals(\"fadøl\...
[ "0.737918", "0.6881436", "0.66810787", "0.66436654", "0.6601821", "0.65245026", "0.63999754", "0.62804025", "0.62216127", "0.61162674", "0.6097479", "0.60589844", "0.5992434", "0.5977349", "0.59311026", "0.58918357", "0.5874281", "0.5854757", "0.5808338", "0.5789616", "0.5752...
0.8053448
0
Returns a map with the total price spent on each 'beer' product, if used in an order NOTE: Products not sold will not show up in the map
public Map<String, Double> getSalesPrBeer() { Map<String, Double> sales = new HashMap<>(); for (Order o : orders) { for (ProductOrder po : o.getAllProducts()) { Product p = po.getProduct(); String category = po.getProduct().getCategory(); if (category.equals("fadøl") || category.equals("flaske") || category.equals("fustage")) { String name = p.getName().split(",")[0].trim(); Double currentTotal = sales.get(name); if (currentTotal == null) { currentTotal = 0.0; } currentTotal += po.price(); sales.put(name, currentTotal); } } } return sales; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public HashMap<String, ArrayList[]> determineSale() {\n HashMap<String, ArrayList[]> ordersMap = new HashMap<>();\n ordersMap.put(\"ms\", new ArrayList<Integer>[2]);\n ordersMap.put(\"gs\", new ArrayList<Integer>[2]);\n ordersMap.put(\"xlf\", new ArrayList<Integer>[2]);\n ordersM...
[ "0.66902936", "0.64028865", "0.6250713", "0.6237476", "0.62079966", "0.61778724", "0.6097361", "0.5899986", "0.5865614", "0.5840851", "0.5827435", "0.57906", "0.5765667", "0.57488394", "0.57402307", "0.56928116", "0.5665251", "0.56585956", "0.56525815", "0.56435686", "0.56334...
0.72889006
0
Returns the total sales price if all clip cards sold
public double getClipCardSales() { double d = 0; for (Order o : orders) { for (ProductOrder po : o.getProductOrders()) { if (po.getProduct().getName().startsWith("Klippekort")) { d += po.price(); } } } return d; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void salesTotal(){\n\t\tif (unitsSold<10){\n\t\t\tsetTotalCost(basePrice);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t}\n\t\telse if (unitsSold<20){\n\t\t\tsetTotalCost((RETAIL_PRICE*.8)*unitsSold);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t\t\n\t\t}\n\t\telse if (unitsSold<50){\n\t\t\t...
[ "0.69636583", "0.6779059", "0.6741468", "0.6647582", "0.6622994", "0.6483441", "0.6444646", "0.6432279", "0.6397033", "0.63552475", "0.63350004", "0.62389743", "0.62237096", "0.6210624", "0.62063104", "0.6205841", "0.61851704", "0.6184676", "0.616575", "0.6140047", "0.6135116...
0.748882
0
Returns the total amount of clips used for all orders
public int getClipCardUses() { int d = 0; for (Order o : orders) { for (Payment p : o.getPayments()) { if (p.getPaymentType() == PaymentType.CLIP_CARD) { d += p.getAmount(); } } } return d; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int totalAllocatedOrders();", "private double getOrderTotal() {\n double d = 0;\n\n for (Pizza p : pizzas) {\n d += p.calcTotalCost();\n }\n\n return d;\n }", "public int totalOrdersTaken();", "public double getClipCardSales() {\n\t\tdouble d = 0;\n\n\t\tfor (...
[ "0.66640526", "0.6269817", "0.62594736", "0.6225796", "0.6090008", "0.59525746", "0.59422654", "0.5780096", "0.5755203", "0.5742436", "0.5699746", "0.5629488", "0.5611979", "0.56092215", "0.5596171", "0.55761653", "0.55505013", "0.5543934", "0.5534387", "0.55184865", "0.54742...
0.74066967
0
Returns a map with the total price of all sales for each category used in an order NOTE: Categories with no sale will not show up
public Map<String, Double> getSalesPrCategory() { Map<String, Double> sales = new HashMap<>(); for (Order o : orders) { for (ProductOrder po : o.getProductOrders()) { String category = po.getProduct().getCategory(); Double currentTotal = sales.get(category); if (currentTotal == null) { currentTotal = 0.0; } currentTotal += po.price(); sales.put(category, currentTotal); } } return sales; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Map<String, Double> getSalesPrBeer() {\n\t\tMap<String, Double> sales = new HashMap<>();\n\n\t\tfor (Order o : orders) {\n\t\t\tfor (ProductOrder po : o.getAllProducts()) {\n\t\t\t\tProduct p = po.getProduct();\n\t\t\t\tString category = po.getProduct().getCategory();\n\n\t\t\t\tif (category.equals(\"fadøl\...
[ "0.6930046", "0.64215475", "0.56634206", "0.56571084", "0.5606556", "0.55995053", "0.5599499", "0.5562302", "0.5454364", "0.54293084", "0.54231906", "0.5395502", "0.5366201", "0.5364133", "0.5334269", "0.521911", "0.52135533", "0.52113247", "0.5129898", "0.5121735", "0.511889...
0.8005004
0
Returns a map with the total price of all sales made by each user NOTE: users with no sales will not show up
public Map<User, Double> getSalesPrUser() { Map<User, Double> sales = new HashMap<>(); for (Order o : orders) { Double currentTotal = sales.get(o.getUser()); if (currentTotal == null) { currentTotal = 0.0; } currentTotal += o.totalPrice(); sales.put(o.getUser(), currentTotal); } return sales; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Map<String, Double> getSalesPrBeer() {\n\t\tMap<String, Double> sales = new HashMap<>();\n\n\t\tfor (Order o : orders) {\n\t\t\tfor (ProductOrder po : o.getAllProducts()) {\n\t\t\t\tProduct p = po.getProduct();\n\t\t\t\tString category = po.getProduct().getCategory();\n\n\t\t\t\tif (category.equals(\"fadøl\...
[ "0.66793793", "0.6514291", "0.63211375", "0.62146354", "0.58901954", "0.58104604", "0.57227254", "0.55664915", "0.55478793", "0.55388755", "0.5533553", "0.5528422", "0.552313", "0.54969746", "0.5463557", "0.5424247", "0.5411353", "0.53812903", "0.53441113", "0.534408", "0.533...
0.8278628
0
Returns the sum of the total price of all orders
public double getTotalSales() { double total = 0; for (Order o : orders) { total += o.totalPrice(); } return total; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double calculateTotal(){\r\n double total = 0;\r\n for(int i = 0; i < orderList.size(); i++){\r\n total += orderList.getOrder(i).calculatePrice();\r\n }\r\n return total;\r\n }", "@Transient\n public Double getTotalOrderPrice() {\n double sum = 0;\n ...
[ "0.84653336", "0.82658106", "0.80935764", "0.78746396", "0.78010476", "0.76404965", "0.7555582", "0.74607414", "0.74152607", "0.7372238", "0.7348896", "0.7246682", "0.72160304", "0.7208377", "0.7204954", "0.71834546", "0.7142013", "0.7126654", "0.7110468", "0.7098752", "0.708...
0.69325775
24
Limits the orders to a specific time period
public void setTimePeriod(TimePeriod timePeriod) { assert timePeriod != null; orders = service.getOrdersInPeriod(timePeriod); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setOrdertime(Date ordertime) {\n this.ordertime = ordertime;\n }", "public void setTimeLimit(java.util.Collection timeLimit);", "List<SellOrder> findAscPendingOrdersByPriceTime(Date toTime, BigMoney price, OrderBookId orderBookId, int size);", "public void setOrderTime(Date orderTime) {...
[ "0.5541341", "0.546412", "0.5422921", "0.5394063", "0.5392959", "0.533372", "0.52960134", "0.5219649", "0.51138014", "0.5074322", "0.5037221", "0.4977457", "0.4960507", "0.49578923", "0.49497062", "0.49278817", "0.49244457", "0.4914907", "0.48739752", "0.48263162", "0.4772672...
0.56786364
0
Modified the Read function
private byte[] read(SelectionKey key) throws IOException { SocketChannel channel = (SocketChannel)key.channel(); readBuffer.clear(); int length = channel.read(readBuffer); byte[] data = null; // Checking whether length is negative, to overcome java.lang.NegativeArraySizeException -- Aditya if (length == -1) { mClientStatus.remove(channel); clients--; channel.close(); key.cancel(); throw new IOException("No data found"); }else { readBuffer.flip(); data = new byte[length]; readBuffer.get(data, 0, length); } return data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract void read();", "Read createRead();", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "public void ownRead();", "@Override\n\tpublic void read() {\n\n\t}", "String read();", "String read();", "@Override\r\n\tpublic void read() {\n\r\n\t}", "abstract protected boolean rea...
[ "0.7949624", "0.7754508", "0.7678741", "0.76637", "0.76259017", "0.7440607", "0.7440607", "0.74235344", "0.7399027", "0.7378351", "0.7331124", "0.7291427", "0.7289133", "0.71746314", "0.71740997", "0.70799875", "0.68546355", "0.6830314", "0.67847866", "0.6717993", "0.6709591"...
0.0
-1
Quick sampling of the data received
private StringBuilder byteToStringBuilder(byte[] data) { StringBuilder sbLog = new StringBuilder(); for (byte b : data) { sbLog.append(String.format("%02x", new Object[] { b })); } //System.out.println(" data packet : "+ sbLog); return sbLog; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double sample();", "public void getNextRawSamples( double[] rawBuffer );", "public static void sample() {\n System.out.println(\"# 1\");\n Observable.fromIterable(sData)\n .timestamp()\n .sample(1000, TimeUnit.MICROSECONDS)\n .subscribe(new MyObserver<...
[ "0.66774875", "0.66302145", "0.6615252", "0.6548932", "0.6260136", "0.6223571", "0.6215166", "0.6170106", "0.61465555", "0.611519", "0.6083425", "0.60733783", "0.60336", "0.6015302", "0.5971249", "0.59512025", "0.59346855", "0.59336853", "0.59221387", "0.5912823", "0.5886464"...
0.0
-1