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
a call to toRadians returns an equivalent radian value for the degree value passed. accepts a double and returns a double
public static double toRadians(double degree) { return (degree * 3.14159) / 180; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static double degreeToRadians(double num) { return (num*0.0174533); }", "public static double findRadiun(int degree) {\r\n\t\treturn Math.toRadians(degree);\r\n\t}", "public static float deg2rad(float deg) {return deg*D2R;}", "public double convertToRadians(final double value) {\n return va...
[ "0.812036", "0.77805907", "0.7651575", "0.76244897", "0.75831413", "0.7365265", "0.7361918", "0.733535", "0.7315846", "0.7285202", "0.726307", "0.7181294", "0.71741265", "0.7157983", "0.7131792", "0.71279424", "0.7088513", "0.7017019", "0.6990932", "0.6983525", "0.6983525", ...
0.81273174
0
a call to discriminant returns the discriminant value of a quadratic equation based on the values passed. accepts 3 doubles, returns a double
public static double discriminant(double a, double b, double c) { return (b * b) - (4 * a * c); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static double discriminant(double a, double b, double c) {\n double result = b * b - 4.0 * a * c;\n return result;\n }", "public static void main(String args[]) {\n\t\t\n\t\t//declare the variables of equation ax*x + b*x + c = 0 \n\t\tdouble a,b,c;\n\t\t\n\t\t//define scanner variable x a...
[ "0.73397136", "0.6355075", "0.627834", "0.6237765", "0.6231319", "0.61552185", "0.58366835", "0.57581097", "0.56204605", "0.5587511", "0.55462337", "0.5532016", "0.5484203", "0.5475575", "0.54539645", "0.5449568", "0.54319584", "0.5428285", "0.54273814", "0.5423961", "0.54236...
0.7393195
0
a call to toImproperFract returns an equivalent improper fraction for the mixed number passed. accepts 3 integers, returns a string
public static String toImproperFrac(int number, int numer, int denom) { String answer = "0"; answer = number * denom + numer + "/" + denom; return(answer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String toMixedNum(int numerator, int denominator) {\n \tint whole=numerator/denominator;\t\t//make variable to store whole number by dividing num and denom\r\n\t\tint newnumerator=numerator%denominator;\t//get newnum by doing num mod denom\r\n\t\t\r\n\t\tif(whole<0) {\t\t\t//if whole number is neg...
[ "0.67189384", "0.6717757", "0.6557074", "0.64726627", "0.6143007", "0.60876787", "0.5946136", "0.59029645", "0.5880652", "0.58070487", "0.56581", "0.5623379", "0.56027025", "0.5593749", "0.5581445", "0.5571806", "0.5562837", "0.55495065", "0.55056316", "0.5495841", "0.5493086...
0.64679354
4
a call to toMixedNum returns an equivalent mixed number for the improper fraction passed. accepts 2 integers, returns a string
public static String toMixedNum(int numer, int denom) { String answer = "0"; answer = (numer / denom) + "_" + (numer / denom) % denom + "/" + denom; return(answer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String toMixedNum(int numerator, int denominator) {\n \tint whole=numerator/denominator;\t\t//make variable to store whole number by dividing num and denom\r\n\t\tint newnumerator=numerator%denominator;\t//get newnum by doing num mod denom\r\n\t\t\r\n\t\tif(whole<0) {\t\t\t//if whole number is neg...
[ "0.8016098", "0.76761425", "0.62739635", "0.60520965", "0.5872326", "0.5824477", "0.5599417", "0.5556796", "0.55559784", "0.54731196", "0.5430807", "0.54230404", "0.5414127", "0.54042816", "0.53939474", "0.53824127", "0.53217065", "0.5302526", "0.5302526", "0.5302526", "0.528...
0.69028515
2
a call to foil returns a standard form quadratic equation based on the values passed. accepts 4 integers and a string, returns a string
public static String foil(int a, int b, int c, int d, String string) { String answer = "0"; answer = (a * c) + string + "^2" + +(a * d) + string + "+" + (b * c) + string + + (b * d); return(answer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\tint a, b, c;\r\n\t\tSystem.out.println(\"Quadratic equation \\tax^2+bx+c=0\");\r\n\t\tSystem.out.println();\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter the value of a: \");\r\n\t\ta = input.nextInt();\r\n\t\tSystem.out.print(\"Enter t...
[ "0.5986862", "0.5949651", "0.59117407", "0.5802063", "0.5544802", "0.5528824", "0.5467484", "0.54438365", "0.54207474", "0.53914326", "0.5390138", "0.5389964", "0.5380781", "0.53803766", "0.53604907", "0.5353278", "0.53469855", "0.53450805", "0.5343622", "0.533752", "0.532814...
0.6249274
0
a call to isDivisibleBy returns a boolean based on whether the two values passed are evenly divisible. accepts 2 integers, returns a boolean
public static boolean isDivisibleBy(int number, int factor) { if(factor == 0) { throw new IllegalArgumentException("cannot divide by 0"); } return(number % factor == 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean evenlyDivisible (int num1, int num2) {\r\n if(num1 % num2 == 0) {\r\n return true;\r\n } \r\n return false;\r\n }", "public boolean isDivisibleBy(int x, int y)\n\t{\n\t\tif(x % y == 0){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\t//System.out.println(\"isDivisibleB...
[ "0.81883866", "0.7456382", "0.74433464", "0.6738168", "0.66255283", "0.66159225", "0.65270215", "0.6461009", "0.64603114", "0.63540196", "0.62836844", "0.6263154", "0.62216216", "0.6205382", "0.61981183", "0.61872554", "0.61143684", "0.61055845", "0.60960025", "0.60654646", "...
0.57059336
68
a call to absValue returns the absolute value of the value passed. accepts and returns a double
public static double absValue(double number) { if(number >= 0) { return(number); } else { return(number / -1); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double abs(double value){return value < 0? value*-1: value;}", "public static double abs(double a) {\n\t\treturn ((a<0)?-a:a);\n\t}", "@Test\n\tpublic void testAbsVal() {\n\t\tdouble tmpRndVal = 0.0;\n\t\t\n\t\t//testing with negative numbers\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\ttmpRndVal = Math.ab...
[ "0.84459305", "0.7383087", "0.73013353", "0.71633536", "0.70112866", "0.6888381", "0.6832311", "0.6807394", "0.6677341", "0.6503719", "0.6407442", "0.6407442", "0.6407442", "0.6398188", "0.6375912", "0.6267188", "0.6261818", "0.6169829", "0.60991055", "0.60928595", "0.6063945...
0.76670384
1
a call to max returns the larger of the values passed. accepts two doubles returns a double
public static double max(double number1, double number2) { if (number1 > number2) { return(number1); } return (number2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static double getMax(double a, double b) {\n\t\treturn (a > b) ? a : b;\n\t}", "public static double max(double a, double b) {\t\n\t\treturn ((a>b)?a:b);\n\t}", "public static double max(double num1, double num2){\n if(num1 > num2){\n return num1;\n }else{\n return num2;\n ...
[ "0.8638767", "0.8249403", "0.8022931", "0.79983085", "0.76295483", "0.76295483", "0.74780357", "0.7473435", "0.7265967", "0.7250782", "0.7249899", "0.72027975", "0.71675044", "0.70546794", "0.70269656", "0.6962844", "0.692597", "0.6924922", "0.6879998", "0.6844942", "0.683719...
0.78344905
4
call to this max (overload) returns the largest value of three values. accepts 3 doubles returns a double
public static double max(double number1, double number2, double number3) { if (number1 > number2) { if (number1 >number3) { return(number1); } } if (number2 > number1) { if (number2 > number3) { return(number2); } } if (number3 > number1) { if (number3 > number2) { return(number3); } } return(number1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static double max(double num1, double num2, double num3){\n return max(max(num1, num2), num3);\n }", "public static double maximo(double n1, double n2, double n3){\n\t\tdouble max = Math.max(n1, n2);\n\t\tmax = Math.max(max, n3);\n\t\treturn max;\t\t\n\t}", "Double getMaximumValue();", "priv...
[ "0.81306607", "0.7736463", "0.7736127", "0.7728734", "0.7682551", "0.75993186", "0.75993186", "0.7563823", "0.7516977", "0.7414257", "0.73678553", "0.7318391", "0.72379684", "0.71928746", "0.716395", "0.7120824", "0.70748186", "0.70729893", "0.7058456", "0.70414037", "0.70187...
0.7751443
1
call to min returns the smaller value for the values passed. accepts two ints and returns an int
public static int min(int number1, int number2) { if(number1 < number2) { return(number1); } return(number2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static int min(int a, int b) { return a < b ? a : b; }", "static int min(int a, int b) {\n return Math.min(a, b);\n }", "public static int min(int a, int b) {\t\n\t\treturn ((a<b)?a:b);\n\t}", "private int min(int a, int b) {\n\t\treturn a<b?a:b;\n\t}", "private static int Min(int num1, int num2)...
[ "0.87267375", "0.85587174", "0.8406301", "0.83628577", "0.81812763", "0.8099784", "0.8003342", "0.78972256", "0.7889735", "0.78761923", "0.7828058", "0.76825523", "0.76255745", "0.7536652", "0.75333476", "0.74941814", "0.7397563", "0.73604673", "0.73489696", "0.73465216", "0....
0.82342184
4
a call to round2 rounds a double to 2 decimal places. accepts and returns a double
static double round2(double number) { number = (number * 100); number = (number + .5); number = (int) number; number = (number / 100); number = (double) number; ======= public static double round2(double number) { //we gottem number = (number*100); number = (number+.5); number = (int)number; number = (number/100); number = (double)number; >>>>>>> branch 'master' of https://github.com/henryhoover/APCS4Fall.git return number; } <<<<<<< HEAD public static double exponent(double base, int power) { //a call to exponent raises a value to the integer value. accepts double and integer, returns a double ======= public static double exponent(double base, int power) { //mayhaps./???? >>>>>>> branch 'master' of https://github.com/henryhoover/APCS4Fall.git if(power < 0) { throw new IllegalArgumentException("no negative powers"); } <<<<<<< HEAD if(power == 0) { return(1); } int repeats = 1; double answer = base; while (repeats != power) { answer = base * base; repeats++; } return(answer); ======= int repeats = 1; while (repeats < power) { power++; return(base*base); } return(1); >>>>>>> branch 'master' of https://github.com/henryhoover/APCS4Fall.git } public static int factorial(int number) { //a call to factorial returns the factorial of the value passed. accepts and returns an int int answer = number; <<<<<<< HEAD int mult = number -1; ======= >>>>>>> branch 'master' of https://github.com/henryhoover/APCS4Fall.git if (number < 0) { throw new IllegalArgumentException("no negative factorials"); } <<<<<<< HEAD do { answer = number; mult = mult - 1; return(answer); } while (mult != 1); } ======= if(number == 0) { return(1); } for (answer = number -1; answer <= number; answer++) { answer = answer / 1; } return(answer); } >>>>>>> branch 'master' of https://github.com/henryhoover/APCS4Fall.git public static boolean isPrime(int number) { //call to isPrime determines if an integer is prime. accepts an int and returns a boolean int factor = 2; if(isDivisibleBy(number, factor) == false) { factor++; return(true); } else { return(false); } } <<<<<<< HEAD public static int gcf(int number1, int number2) { //a call to gcf returns the greatest ccommon factor of the 2 values passed. accepts 2 integers, rerturns an int int factor = 1; double larger = max(number1, number2); double smaller = min(number1, number2); for (int i = 1; i <= (int)larger; i++) { if (isDivisibleBy((int)larger, i) == true) { if (isDivisibleBy((int)smaller, i) == true) { factor = i; } } } return(factor); } ======= public static int gcf(int number1, int number2) { //lets find out >>>>>>> branch 'master' of https://github.com/henryhoover/APCS4Fall.git <<<<<<< HEAD ======= if(isPrime(number1 | number2) == false) { while(number1 != number2) { if(number1 > number2) { return(number1 - number2); } if(number1 < number2) { return(number2 - number1); } } } return(1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double roundTwoDecimals(double d) { \n DecimalFormat twoDForm = new DecimalFormat(\"#.##\"); \n return Double.valueOf(twoDForm.format(d));\n }", "public static double round2(double x) {\n\t\treturn Math.round(100 * x) / 100d;\n\t}", "public static double round2(double num1) {\n\t\tnum1=((n...
[ "0.73510283", "0.70167524", "0.6944308", "0.6894476", "0.68136144", "0.65779436", "0.6484358", "0.64243007", "0.64200324", "0.6318094", "0.6208934", "0.62014", "0.61829585", "0.61829585", "0.61475354", "0.6107574", "0.60875523", "0.60090536", "0.59584606", "0.5918406", "0.590...
0.0
-1
a call to sqrt returns the square root of the value passed (rounded to 2 decimal places). accecpts and returns an int
static double sqrt(double number) { double answer = number / 2; if (number < 0) { throw new IllegalArgumentException("no negative square roots"); ======= public static double sqrt(int number) { //gonna be honest here: idk?? int div = number*number; if(number < 0) { throw new IllegalArgumentException("no square roots of negative numbers"); >>>>>>> branch 'master' of https://github.com/henryhoover/APCS4Fall.git } while (((answer * answer) - number) >= .005 || ((answer * answer) - number) <= -.005) { answer = 0.5 * (number / answer + answer); } return round2(answer); } public static String quadForm(int a, int b, int c) { //need round2 so uhhhhh if(b == 0) { System.out.println(round2(c)); } if(discriminant(a, b, c) == 0) { return("Roots: " + round2((b * -1) / (2 *a))); } if(discriminant(a, b, c) > 0) { return("Roots: " + round2(b * -1) + (sqrt(b * b - (4 * a * c)))); } return("no real roots"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T sqrt(T value);", "public int sqrt(int x) {\n if(x==0) return 0;\n if(x<0) return -1;\n double y=(double)x/2;\n while(Math.abs(y*y-x)>0.00001){\n y=(y+x/y)/2;\n }\n return (int)y;\n }", "public static int sqrt(final int a) {\n return (int)...
[ "0.7924823", "0.7687727", "0.75947255", "0.74781823", "0.7432276", "0.74006754", "0.7275203", "0.7269201", "0.71791613", "0.71472114", "0.70753664", "0.70539653", "0.69539636", "0.69383013", "0.69308585", "0.68843937", "0.68327886", "0.6807038", "0.6767162", "0.67482644", "0....
0.6335078
32
Init ActionContoller with params
public static ActionController getInstance(int hard, int countRooms) { if (instance == null) { instance = new ActionController(hard, countRooms); } return instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void initController();", "@Override\n public void doInit() {\n action = (String) getRequestAttributes().get(\"action\");\n }", "public void initializeActions(SGControllerActionInitializer actionInitializer);", "public void init() throws ServletException {\n\t\tModel model = new M...
[ "0.66846704", "0.6499403", "0.6272511", "0.5911845", "0.59024835", "0.5845967", "0.5780889", "0.5768722", "0.5762096", "0.5710527", "0.5642252", "0.56167334", "0.5613796", "0.558554", "0.5571299", "0.5562622", "0.5561926", "0.5558186", "0.5546893", "0.5541764", "0.55269146", ...
0.0
-1
Get instance without params
public static ActionController getInstance() { return instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Instance getInstance(String id);", "@Override\n\t\tpublic Object getInstance() {\n\t\t\treturn null;\n\t\t}", "public ImmutableRetrieve() {\n super();\n }", "private Get() {}", "private Get() {}", "public Object getObject() {\n return getObject(null);\n }", "InstanceModel createInst...
[ "0.58540606", "0.5825687", "0.5763443", "0.5755783", "0.5755783", "0.57496285", "0.5652384", "0.5640446", "0.56135863", "0.5606617", "0.5587099", "0.5557686", "0.55262536", "0.5525452", "0.55253196", "0.54326946", "0.5413869", "0.5362391", "0.532393", "0.53037703", "0.5287579...
0.0
-1
Generate new labyrinth for action controller
public void generateLabyrinth() { /** * Generate some randoms Monsters for rooms */ Monsters[] monster = new Monsters[countRooms]; for (int i = 0; i < countRooms; i++) { monster[i] = new Monsters( rnd.nextDouble() * 10 + 1, rnd.nextDouble() * 10 + 1, rnd.nextDouble() * 10 + 1 ); } /** * Genetare random rooms with monsters */ Rooms[] room = new Rooms[countRooms]; for (int i = 0; i < countRooms; i++) { room[i] = new Rooms("unknownRoom" + i); room[i].setMonster(monster[i]); if (rnd.nextInt(100) < 50) { room[i].setItem(shop.getRandomItem()); } } /** * Connecting rooms with each other * North to South * East to West */ //init and connect first room with labyrinth currentRoom = new Rooms("startRoom"); currentRoom.setNorth(room[0]); room[0].setSouth(currentRoom); for (int i = 0; i < countRooms - 1; i++) { int rint; //North to South rint = rnd.nextInt(countRooms); if (room[i].getNorth() == null) { while (room[rint].getSouth() != null) { rint = rnd.nextInt(countRooms); } room[i].setNorth(room[rint]); room[rint].setSouth(room[i]); } //East to West rint = rnd.nextInt(countRooms); if (room[i].getEast() == null) { while (room[rint].getWest() != null) { rint = rnd.nextInt(countRooms); } room[i].setEast(room[rint]); room[rint].setWest(room[i]); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createLabyrinth() {\n int x = numberGenerator.nextInt(width-1);\n int y = numberGenerator.nextInt(height-1);\n //first walk until stop\n walkRandom(cells[x][y]);\n }", "public Labyrinth getLabyrinth() {\n\t\treturn labyrinth;\n\t}", "public static String newWord(Strin...
[ "0.6429615", "0.5423755", "0.5232007", "0.5162091", "0.51296216", "0.5022246", "0.4994547", "0.49584895", "0.490015", "0.48785633", "0.4875835", "0.48490354", "0.48486775", "0.4841465", "0.48321962", "0.4828589", "0.48087674", "0.48041028", "0.48021767", "0.47541794", "0.4735...
0.5302635
2
Buy item from shop
public boolean buyItem(int id) { Items item = shop.getItem(id); if (player.withdrawMoney(item.getCost())) { player.changeItem(item); return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void buyButtonClicked(final ShopItem shopItem) {\n int cost = shopItem.getPrice();\n if (GameActivity.buyItem(cost)) {\n shopItem.setState(ItemStatusID.BOUGHT);\n updateUI();\n }\n }", "public void buyItem() {\n List<Gnome> cart = user.getCart();\n ...
[ "0.7898048", "0.7578058", "0.7464622", "0.7457473", "0.7291", "0.7176741", "0.7079802", "0.7070364", "0.7013035", "0.69521624", "0.6820156", "0.6748613", "0.67214864", "0.6643034", "0.66152614", "0.6602079", "0.65963864", "0.6580415", "0.6551017", "0.6548834", "0.65441525", ...
0.685996
10
Move to next room
public void moveToRoom(Rooms room) { this.currentRoom = room; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void nextRoom() {\n room++;\n createRoom();\n }", "public void setRoom(int next)\n\t{\n\t\tiCurrentRoom = next;\n\t\t\n\t}", "public void changeRoom(Room nextRoom)\r\n {\r\n //remove the person from the old room (if already in one)\r\n if (room != null)\r\n r...
[ "0.82059884", "0.7173166", "0.706429", "0.706203", "0.69585866", "0.6895171", "0.682413", "0.67706144", "0.6739722", "0.67124355", "0.6669238", "0.66678214", "0.66182053", "0.6540427", "0.65234804", "0.64806724", "0.6470362", "0.63767123", "0.6359077", "0.63430977", "0.628706...
0.70020705
4
Get change to fight with monster
public double getChange(Monsters monster) { return (player.getSkill() + player.getAttack() + player.getDefence()) / (monster.getSkill() + monster.getDefence() + monster.getAttack()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void changeActiveMonster(){\n //todo\n }", "public int fight() {\r\n\t\treturn -this.randomObject.nextInt(50);\r\n\t}", "int getRightMonster();", "public void fight();", "int getLeftMonster();", "public Player fight() {\n if (player1.getCurrentFighter()==null && player2.getCurrent...
[ "0.6589376", "0.64632815", "0.6449759", "0.6388286", "0.62881374", "0.6287693", "0.6226908", "0.6221403", "0.6162235", "0.61344415", "0.61070204", "0.6051483", "0.6035929", "0.5984753", "0.5974054", "0.59670216", "0.59665394", "0.59631556", "0.58864456", "0.58838624", "0.5883...
0.6776031
0
UPDATE temp_dquot SET age='20',name1='',rdt='11/08/2014',basic_sa='100000',plno='814',pterm='20',mterm='20',mat_date='11/08/2034',mode='YLY',dab_sa='100000',tr_sa='0',cir_sa='',bonus_rate='42',prem='5276',basic_prem='5118',dab_prem='100.0',step_rate='for Life',loyal_rate='0',bonus_rate='42',act_mat='1,88,000',mly_b_pr='448',qly_b_pr='1345',hly_b_pr='2664',yly_b_pr='5276' WHERE uniqid=1
public void dml(String Query) { String myPath = DB_PATH + DB_NAME; if (db == null) db = SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.OPEN_READWRITE); try { db.execSQL(Query); } catch (Exception e) { Log.e("Error", e.toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Update({\n \"update A_SUIT_MEASUREMENT\",\n \"set contract_id = #{contractId,jdbcType=INTEGER},\",\n \"consultant_uid = #{consultantUid,jdbcType=INTEGER},\",\n \"collar = #{collar,jdbcType=DOUBLE},\",\n \"wrist = #{wrist,jdbcType=DOUBLE},\",\n \"bust = #{bust,jdbc...
[ "0.5485266", "0.54787266", "0.54586196", "0.543565", "0.5418392", "0.5416736", "0.5404825", "0.5332125", "0.53105885", "0.5307982", "0.5302155", "0.5291458", "0.52321327", "0.5193104", "0.5171961", "0.51560974", "0.51540214", "0.5151676", "0.5148672", "0.5135813", "0.51196533...
0.0
-1
TODO Autogenerated method stub
@Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { }
{ "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.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", ...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { MyFrame f = new MyFrame(); }
{ "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
Fields Constructors Abstract Methods Overridden Methods Other Methods
@RequestMapping( value= {"", "index.htm"}, produces = "text/html") public String forwardUrl() { return "forward:/index.html"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Field() {\r\n\t}", "private FieldInfo() {\r\n\t}", "private void __sep__Constructors__() {}", "public Field(){\n\n // this(\"\",\"\",\"\",\"\",\"\");\n }", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n\tprotected void initializeFields() {\n\n\t}", "public FieldInfo() {\r\n \t// No...
[ "0.73670757", "0.70684755", "0.7047877", "0.7029288", "0.70161927", "0.6948084", "0.69325304", "0.6879916", "0.68642557", "0.68460387", "0.681992", "0.67268014", "0.67234373", "0.6505587", "0.647803", "0.6451234", "0.64042366", "0.63776624", "0.63757986", "0.6362075", "0.6353...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { ControleRemoto ct = new ControleRemoto("Sony", 0, 12); ct.aumentaVolume(); System.out.println(ct.getVolume()); ct.aumentaVolume(); System.out.println(ct.getVolume()); ct.diminuiVolume(); System.out.println(ct.getVolume()); }
{ "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
set up the actual test runners.
static List<Entry<String,Runnable>> getRunners(GrammarTestSuite suite) { var runners = new LinkedList<Entry<String,Runnable>>(); var sources = suite.getStageFiles(); var testsuite = new SuiteOfStages(sources); for (var stage : testsuite.getStages()) { for (var target : stage.getTargets()) { var i = 0; for (var test : target.getTests()) { var name = test.getStage() + ':' + test.getTarget() + ':' + (i++); runners.add(new SimpleEntry<String,Runnable>( name, () -> testParsing(suite,test) )); } } } return runners; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@BeforeClass\n public void setup()\n throws Exception {\n startZk();\n startController();\n startBroker();\n startKafka();\n }", "protected void setUp()\n {\n /* Add any necessary initialization code here (e.g., open a socket). */\n }", "protected void setUp()\r\n {\r\n ...
[ "0.7055894", "0.70194715", "0.7007231", "0.6994319", "0.68728685", "0.6814677", "0.67872006", "0.6707887", "0.66711706", "0.6646797", "0.6627004", "0.6618126", "0.66165024", "0.66142476", "0.6604044", "0.6604044", "0.65635574", "0.65627146", "0.6539408", "0.65356845", "0.6530...
0.0
-1
id tjekkes mod paneArrayList for at se om det pane eksiterer
public Pane getPane(String id) throws IndexOutOfBoundsException { for (Pane pane : paneArrayList) { if (pane.idProperty().get().equals(id)) { return pane; } } throw new IndexOutOfBoundsException("Ugyldigt input - sæde udenfor grænserne"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void agregarPaneles(){\n vistaInicial.jpIzquierda.removeAll();\n this.limpiarPaneles();\n vistaInicial.jpIzquierda.add(panelIngresoControlador.getPanelIngreso());\n vistaInicial.jpDerecha.add(panelBusquedaControlador.getPanelBusqueda());\n vistaInicial.jpCentral.add(panelL...
[ "0.5885259", "0.5784561", "0.5595424", "0.5463235", "0.5439311", "0.5418033", "0.5388171", "0.53699297", "0.5361732", "0.534229", "0.53080416", "0.52901065", "0.5283765", "0.52609247", "0.52583164", "0.52536774", "0.5238088", "0.52311224", "0.5172023", "0.5169803", "0.5154932...
0.61448914
0
This method was generated by MyBatis Generator. This method returns the value of the database column punchin.userid
public Integer getUserid() { return userid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getUserId();", "java.lang.String getUserId();", "java.lang.String getUserId();", "public Long getUserid() {\r\n return userid;\r\n }", "public Integer getUserid() {\n\t\treturn this.userid;\n\t}", "public Integer getUserid() {\r\n\t\treturn userid;\r\n\t}", "Integer getUserI...
[ "0.6781318", "0.6781318", "0.6781318", "0.6755648", "0.6741493", "0.66966456", "0.6667629", "0.65416", "0.65416", "0.64609003", "0.64592445", "0.64592445", "0.64592445", "0.64592445", "0.64278096", "0.64278096", "0.64273745", "0.64273745", "0.6419365", "0.64180845", "0.641808...
0.6826068
8
This method was generated by MyBatis Generator. This method sets the value of the database column punchin.userid
public void setUserid(Integer userid) { this.userid = userid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUserId(long userId);", "public void setUserId(long userId);", "public void setUserId(long userId);", "public void setUserId(long userId);", "public void setUserid(Long userid) {\r\n this.userid = userid;\r\n }", "public void setUserID(int value) {\n this.userID = value;\n ...
[ "0.6702481", "0.6702481", "0.6702481", "0.6702481", "0.6702336", "0.66326845", "0.6626149", "0.660263", "0.6560349", "0.6559233", "0.64945334", "0.6477177", "0.6471703", "0.6464038", "0.646229", "0.646229", "0.6441679", "0.64119494", "0.6365564", "0.6356755", "0.6331556", "...
0.6677234
12
This method was generated by MyBatis Generator. This method returns the value of the database column punchin.createtime
public String getCreatetime() { return createtime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Long getCreatetime() {\n return createtime;\n }", "public String getCreatetime() {\r\n return createtime;\r\n }", "public Date getCreate_time() {\n return create_time;\n }", "public Date getCreate_time() {\n return create_time;\n }", "public Date getCreatetime...
[ "0.69902", "0.685961", "0.6748278", "0.6748278", "0.67321044", "0.67321044", "0.67321044", "0.67321044", "0.67321044", "0.67321044", "0.67321044", "0.67321044", "0.67188984", "0.67188984", "0.67188984", "0.6712465", "0.6712465", "0.66062653", "0.65025777", "0.6475471", "0.641...
0.68436986
3
This method was generated by MyBatis Generator. This method sets the value of the database column punchin.createtime
public void setCreatetime(String createtime) { this.createtime = createtime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCreatetime(Date createtime) {\r\n this.createtime = createtime;\r\n }", "public void setCreatetime(Date createtime) {\r\n this.createtime = createtime;\r\n }", "public void setCreatetime(Date createtime) {\r\n this.createtime = createtime;\r\n }", "public void set...
[ "0.66491276", "0.66491276", "0.66491276", "0.66030335", "0.66030335", "0.6599877", "0.6599877", "0.6599877", "0.6599877", "0.6599877", "0.6599877", "0.6599877", "0.6599877", "0.6542417", "0.6509171", "0.62139267", "0.61731917", "0.615984", "0.615984", "0.6159034", "0.61485434...
0.64804804
16
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_read_article_layout, container, false); }
{ "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
Sender sender = new Sender();
public static void wirteData2(OutputStream os, String[] headers, Integer[] footer, int startrow, List data, int hfreeze) throws IOException, WriteException { WritableWorkbook workbook = createWorkbook(os); WritableFont songti12 = new WritableFont(WritableFont.createFont("宋体"), 12, WritableFont.NO_BOLD); WritableFont arial12 = new WritableFont(WritableFont.ARIAL, 12, WritableFont.NO_BOLD); WritableFont arialRedBold12 = new WritableFont(WritableFont.ARIAL, 12, WritableFont.NO_BOLD); arialRedBold12.setBoldStyle(WritableFont.BOLD); arialRedBold12.setColour(Colour.RED); WritableSheet s = workbook.createSheet("统计", 0); s.getSettings().setVerticalFreeze(1); if (hfreeze > 0) { s.getSettings().setHorizontalFreeze(hfreeze); } WritableCellFormat cwt = new WritableCellFormat(songti12); WritableCellFormat wrappedText = new WritableCellFormat(songti12); WritableCellFormat cfipc = new WritableCellFormat(arial12, NumberFormats.PERCENT_INTEGER); WritableCellFormat cfiry = new WritableCellFormat(NumberFormats.ACCOUNTING_RED_FLOAT); wrappedText.setAlignment(Alignment.CENTRE); wrappedText.setWrap(false); int i = 0; ArrayList<Integer> percents = new ArrayList<Integer>(); ArrayList<Integer> rys = new ArrayList<Integer>(); for (i = 0; i < headers.length; i++) { try { String header = headers[i]; boolean is = false; int m = header.indexOf("%"); if (m > -1) { percents.add(i); header = header.substring(0, m); is = true; } if (is == false) { m = header.indexOf("¥"); if (m > -1) { rys.add(i); header = header.substring(0, m); } } Label l = new Label(i, 0, header, wrappedText); s.addCell(l); } catch (Exception e) { filex.saveLog(e, "c:\\"); } } i = 1; Iterator it = data.iterator(); while (it.hasNext()) { Object[] value = (Object[]) it.next(); for (int j = 0; j < value.length; j++) { if (value[j] instanceof Number) { if (((Number) value[j]).doubleValue() != 0) { WritableCellFormat cwt1 = cwt; boolean is = false; if (percents.contains(j)) { cwt1 = cfipc; is = true; } if (is == false) { if (rys.contains(j)) { cwt1 = cfiry; is = true; } } jxl.write.Number numCell = new jxl.write.Number(j, i, ((Number) value[j]).doubleValue(), cwt1); s.addCell(numCell); } else { Label lblCell = new Label(j, i, "", cwt); s.addCell(lblCell); } } else if (value[j] instanceof String) { Label l = new Label(j, i, (String) value[j], cwt); s.addCell(l); } else if (value[j] instanceof Date) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); Label l = new Label(j, i, sdf.format(value[j]), cwt); s.addCell(l); } } i++; } if (footer != null) { int dataLen = data.size(); int first = footer[0] - 1; Label lblCell = new Label(first, startrow + dataLen, "合计", cwt); s.addCell(lblCell); for (i = 0; i < footer.length; i++) { String Cr1 = CellReferenceHelper.getCellReference(footer[i], startrow); String Cr2 = CellReferenceHelper.getCellReference(footer[i], startrow + dataLen - 1); Formula f = new Formula(footer[i], startrow + dataLen, "SUM(" + Cr1 + ":" + Cr2 + ")", cwt); s.addCell(f); } } closeWorkbook(workbook); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setupSender() {\r\n\t\ttheSender = new AutoSender();\r\n\t}", "public Sender(String name) {\n super(name);\n }", "ClientMessageSender() {\n\n\t}", "public void setSender(String sender){\n this.sender = sender;\n }", "public void setSender(String sender) {\n Sender = ...
[ "0.754388", "0.7476768", "0.7403167", "0.7331453", "0.7128097", "0.7033229", "0.69445306", "0.68946594", "0.6878636", "0.687518", "0.68431795", "0.6816521", "0.6816521", "0.67873216", "0.6753111", "0.67510843", "0.664662", "0.6628498", "0.65692914", "0.65560585", "0.65538204"...
0.0
-1
Gets the number of drawn objects.
public int getSize();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNumberOfGraphics()\n\t{\n\t\treturn getObject().getNumberOfGraphics();\n\t}", "public int getNumGraphics() {\r\n\t\treturn graphics.size();\r\n\t}", "public static int numberObjects()\r\n\t{\r\n\t\treturn(no_of_obj);\r\n\t}", "public int size() {\n\t\t\treturn gameObjects.size();\n\t\t}", "pu...
[ "0.74022573", "0.72738165", "0.71434337", "0.70444", "0.70197695", "0.6982135", "0.6933033", "0.6905718", "0.685344", "0.6788777", "0.67881006", "0.6683633", "0.66243726", "0.65899044", "0.65689445", "0.6501896", "0.6480461", "0.64792556", "0.6461284", "0.6453865", "0.6432713...
0.0
-1
Gets the object at given index.
public GeometricalObject getObject(int index);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AdvObject getObject(int index) {\n\t\treturn objects.get(index); // Replace with your code\n\t}", "public Object get(int index) {\n\t\tif (this.index == index) {\n\t\t\treturn object;\n\t\t} else {\n\t\t\treturn nextItem.get(index);\n\t\t}\n\t}", "Object get(int index);", "Object get(int index);", "...
[ "0.84721047", "0.84612495", "0.84557915", "0.84557915", "0.826572", "0.826572", "0.79835474", "0.79771036", "0.7948261", "0.7948261", "0.7948261", "0.78976", "0.78941214", "0.78070635", "0.77773553", "0.77691936", "0.77556676", "0.77175456", "0.7680001", "0.7650487", "0.76333...
0.80367815
6
Adds new object to the model. Implementations of this class in this method inform all registered users that object has been added to internal list of objects.
public void add(GeometricalObject object);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void add(Object object) {\n\t\t\r\n\t}", "public void add(Object obj) { \n\t\tcollection.addElement(obj);\n\t}", "protected void addObject(AbstractGameObject object) {\n\t\t// add object to rendering list\n\t\tobjects.add(object);\n\t\tif (object instanceof UIi18nRe...
[ "0.72095776", "0.6768123", "0.67097074", "0.66434073", "0.6622869", "0.6617497", "0.6591296", "0.6573242", "0.65407896", "0.65278256", "0.6517098", "0.64968824", "0.64921504", "0.6435313", "0.63917136", "0.6383611", "0.6382965", "0.63652074", "0.6345534", "0.63171387", "0.630...
0.6374793
17
Removes given object from the model. Implementations of this class in this method inform all registered users that object has been removed from internal list of objects.
public void remove(GeometricalObject object);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void remove( ModelObject object );", "public void removeByObject()\r\n\t{\n\t}", "public void removeObject(java.lang.Object object) {}", "public void remove(E object) {\n\t\tsynchronized (mLock) {\n\t\t\tif (data != null) {\n\t\t\t\tdata.remove(object);\n\t\t\t}\n\t\t}\n\t\tnotifyDataSetChanged();\n\t}", "...
[ "0.7635933", "0.7421128", "0.7412794", "0.71144706", "0.6974028", "0.695765", "0.68793243", "0.6862693", "0.6813647", "0.67245495", "0.6717885", "0.6709868", "0.6684319", "0.66292536", "0.66218174", "0.6620582", "0.66144615", "0.6425504", "0.64168566", "0.64097655", "0.640811...
0.695351
6
Removes all objects from the internal objects list. Implementations of this class in this method inform all registered users internal object list has been cleared.
public void clear();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void removeAllObjects()\n {\n removeObjects (getObjects(Actor.class));\n }", "private void clearLists() {\n\t\tobjects = new ArrayList<Entity>();\n\t\tenemies.clear();\n\t\titemList.clear();\n\t}", "public synchronized void unRegisterAll()\r\n {\r\n clearNameObjectMaps();\r\n }", "@...
[ "0.7407543", "0.71861583", "0.6895176", "0.68036264", "0.68036264", "0.67497194", "0.6693674", "0.66768044", "0.661812", "0.6595706", "0.6595706", "0.6534318", "0.65339494", "0.6532413", "0.65265745", "0.6479015", "0.64685214", "0.6448851", "0.6442399", "0.64309424", "0.64261...
0.0
-1
Changes given object in the model. Implementations of this class in this method inform all registered users that object has been changed from internal list of objects.
public void change(GeometricalObject object);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateByObject()\r\n\t{\n\t}", "@Override\r\n\tpublic void update(Object object) {\n\t\t\r\n\t}", "public void notifyChange(Object obj) {\n\t\t\ttry\n\t\t\t{\n\t\t\t\tsetChanged();\n\t\t\t\tnotifyObservers(obj);\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t}\n\t\t\t\n\t\t}", "public void up...
[ "0.71215326", "0.66539615", "0.65583897", "0.65060574", "0.6152343", "0.61433923", "0.61433923", "0.6134467", "0.6082671", "0.60710055", "0.60571015", "0.60571015", "0.60483", "0.6038052", "0.60356694", "0.6022632", "0.6001973", "0.59937686", "0.5971107", "0.5943293", "0.5930...
0.6386053
4
Returns index of the given object.
public int indexOf(GeometricalObject object);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract int indexFor(Object obj);", "public int indexOfObject(Object obj);", "public int indexOf(Object o);", "public int indexOf(Object obj)\r\n {\r\n int index = 0;\r\n for (E element : this)\r\n {\r\n if (Utilities.nullSafeEquals(element, obj))\r\n {\r...
[ "0.87520576", "0.8331201", "0.781277", "0.77800626", "0.7736501", "0.7703428", "0.76518506", "0.7642079", "0.7605615", "0.75158477", "0.74949926", "0.7477194", "0.7469533", "0.74373615", "0.74133134", "0.738861", "0.73875237", "0.73349667", "0.7299623", "0.72980124", "0.72767...
0.7361717
17
Performs the given action for each element in internal objects list.
public void forEach(Consumer<GeometricalObject> action);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void operation() {\n\t\tfor(Object object:list) {\n\t\t\t((Component)object).operation();\n\t\t}\n\t}", "@Override\n public void forEach(Consumer<? super T> action) {\n items.forEach(action);\n }", "Object visitArrayOfObjects(ArrayOfObjectsNode node, Object state);", "public ...
[ "0.71137166", "0.6526121", "0.6256249", "0.60518414", "0.6024263", "0.5904466", "0.5840803", "0.56745327", "0.5670303", "0.56401587", "0.56365824", "0.5601215", "0.5491596", "0.5448129", "0.5426232", "0.54142106", "0.54036134", "0.5380207", "0.5349108", "0.5336", "0.5327049",...
0.6280453
2
Adds the drawing model listener.
public void addDrawingModelListener(DrawingModelListener l);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addDrawingClickListener(DrawingClickListener listener);", "public void addDrawListener(ActionListener action) { drawButton.addActionListener(action); }", "public void addPainter(CanvasType.PaintListener listener)\r\n\t{\n\t}", "void addModelEventListener(PropertyChangeListener listener, Object mo...
[ "0.72523016", "0.6528074", "0.6388577", "0.6377236", "0.6283395", "0.6154683", "0.6130199", "0.6123625", "0.6115203", "0.6114065", "0.6077947", "0.60722655", "0.6058695", "0.6044594", "0.60365504", "0.6028133", "0.5996685", "0.5941949", "0.5895221", "0.5882588", "0.58757216",...
0.8450754
0
Removes the drawing model listener.
public void removeDrawingModelListener(DrawingModelListener l);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void removeDrawingModelListener(DrawingModelListener l);", "public void removeDrawingClickListener(DrawingClickListener listener);", "@Override\n public void removeListener() {\n this.mListener = null;\n }", "void removeModelEventListener(PropertyChangeListener listener, Object modelelement);", ...
[ "0.85586536", "0.7449453", "0.7055184", "0.69212157", "0.6884438", "0.68122643", "0.6732482", "0.6715952", "0.6661373", "0.6642238", "0.66189957", "0.6596635", "0.6587464", "0.6569064", "0.64983094", "0.6492749", "0.64731306", "0.6472311", "0.646871", "0.64644605", "0.6461689...
0.8581413
0
Creates the new unit menu
public UnitMenu(Dimension size, Player player) throws IOException { super("Map.jpg", size); this.player = player; init(); cancelButtons = new ArrayList<RectangleButton>(); title = new TextButton(player.getName(), Main.getFont("Kalinga", 18), new Point(565, 40), new Dimension(150, 40), Color.white, new Color(0, 0, 0, 0)); title.setBorderWidth(2); title.setBorderOffset(2); title.setTextColor(Color.black); title.setBorderColor(player.getColor()); goButton = new CircleButton(new Point(640, 440), 12); goButton.setHoverColor(new Color(141, 255, 40)); statDisplay = new Sprite("res/UI/StatDisplay.gif"); statFont = Main.getFont("Kalinga", 16); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Menu createToolsMenu();", "private void createMenu(){\n\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n JMenu Opcje = new JMenu(\"Opcje\");\n mbar.add(Opcje);\n JMenuItem Ustawienia = new JMenuItem(\"Ustawienia\");\n /** ...
[ "0.7233616", "0.7204159", "0.7085277", "0.7034321", "0.7028817", "0.6925936", "0.6883941", "0.6846521", "0.6838561", "0.6833844", "0.6819978", "0.6818594", "0.6815188", "0.676828", "0.6744008", "0.6739156", "0.6736485", "0.6695574", "0.6687286", "0.66828245", "0.66554046", ...
0.0
-1
Resets the amount of units, and if the player is computer controlled, randomly select units and proceed
private void init() { selectedUnits = new ArrayList<UnitEntry>(); if (!player.isHuman()) { ArrayList<UnitEntry> unitTypes = new ArrayList<UnitEntry>(units); for (int i = 0; i < maxUnits; i++) { player.addUnit(new Unit( unitTypes.get((int) (Math.random() * maxUnits)), player)); } completed = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createNewUnit()\r\n {\r\n int currentPlayer = worldPanel.getCurrentPlayer();\r\n int currentUnit = worldPanel.getCurrentUnit();\r\n int randomNumber = (int)Math.ceil(Math.random() * 8);\r\n boolean canBuild = false;\r\n\r\n if(currentPlayer =...
[ "0.689327", "0.6692467", "0.6525275", "0.6402141", "0.6243392", "0.6194553", "0.616456", "0.6122224", "0.6059633", "0.6031718", "0.59759", "0.59663665", "0.5947368", "0.5919339", "0.59055305", "0.59030336", "0.5896212", "0.58869886", "0.5884324", "0.5878383", "0.58597416", ...
0.71865344
0
Loads all the units and the displays This might use large files and so is made static and done once
public static void loadUnitDisplay() { units = new TreeSet<UnitEntry>(); for (UnitEntry unit : UnitEntry.values()) units.add(unit); buttons = new HashMap<RectangleButton, UnitEntry>(); Point center = new Point(640, 265); // Calculate the placements of the unit portraits unitsPerRow = 5; int spaceBetweenRows = 20; int spaceBetweenColumns = 20; int columns = Math.min(unitsPerRow, units.size()); int rows = (int) Math.ceil(1.0 * units.size() / unitsPerRow); int width = columns * (thumbnailSize.width + spaceBetweenColumns) - spaceBetweenColumns; int height = rows * (thumbnailSize.height + spaceBetweenRows) - spaceBetweenRows; // Create all the buttons on the screen Point buttonLoc = new Point(center.x - width / 2, center.y - height / 2); for (UnitEntry unit : units) { RectangleButton button = new RectangleButton(new Point(buttonLoc), thumbnailSize, unit.getPortrait()); button.setBorderWidth(3); buttons.put(button, unit); if (buttons.size() % unitsPerRow == 0) { buttonLoc.translate(-width + thumbnailSize.width, thumbnailSize.height + spaceBetweenRows); } else buttonLoc.translate(thumbnailSize.width + spaceBetweenColumns, 0); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void loadUnits() {\n\t\tsprites.put(\"axeman\", RES.getSprite(\"axeman\"));\n\t\tsprites.put(\"warg\", RES.getSprite(\"warg_right\"));\n\t}", "public static void load() {\n\t\t// manager.load(camp_fire);\r\n\t\t// manager.load(camp_fire_burntout);\r\n\t\t//\r\n\t\t// manager.load(fire_stick);...
[ "0.68698716", "0.68033", "0.6559431", "0.6367926", "0.6329735", "0.63041395", "0.6266367", "0.61886686", "0.6168584", "0.6160306", "0.6156478", "0.6144427", "0.61207694", "0.6065757", "0.6062937", "0.6051336", "0.6048728", "0.6005009", "0.60020757", "0.6001327", "0.5975212", ...
0.6874719
0
Resets the location of all the selected units
private void setSelectionLocations() { Point center = new Point(640, 539); int spaceBetweenRows = 20; int width = selectedUnits.size() * (thumbnailSize.width + spaceBetweenRows) - spaceBetweenRows; Point buttonLoc = new Point(center.x - width / 2, center.y - thumbnailSize.height / 2); for (int unit = 0; unit < selectedUnits.size(); unit++) { cancelButtons.get(unit).setLocation(buttonLoc); buttonLoc.translate(thumbnailSize.width + spaceBetweenRows, 0); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void resetLocation()\r\n {\r\n locations.clear();\r\n }", "public void reset()\n\t{\n\t\tthis.sourceUnit.setSelectedIndex(0);\n\t\tthis.destUnit.setSelectedIndex(0);\n\t\tthis.input.setText(\"\");\n\t\tthis.outputLabel.setText(\"\");\n\t}", "private void resetUnitSprite() {\r\n\t\tswitch (GameManag...
[ "0.7318183", "0.7285514", "0.7003101", "0.6982282", "0.69423974", "0.6819895", "0.67229384", "0.67103475", "0.6684221", "0.66650766", "0.6594284", "0.6593123", "0.6563108", "0.65198094", "0.64997715", "0.6490839", "0.6477124", "0.64250666", "0.6421076", "0.63894975", "0.63730...
0.0
-1
Adds a unit to the current selections
private void addSelection(UnitEntry unit) { selectedUnits.add(unit); cancelButtons.add(new RectangleButton(new Point(), thumbnailSize, unit .getPortrait())); setSelectionLocations(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUnit(Unit u)\r\n {\r\n display.setUnit(u);\r\n selectedIndex = -1;\r\n }", "private JComboBox makeUnitBox(Vector units, String cmd, Unit selected) {\n if ( !units.contains(selected)) {\n units.add(selected);\n }\n JComboBox jcb = new JComboBox(un...
[ "0.6901637", "0.65009654", "0.64244443", "0.63892853", "0.6376658", "0.6342587", "0.62908274", "0.6169365", "0.6121106", "0.6111846", "0.60952693", "0.6014564", "0.5999018", "0.59795886", "0.5968712", "0.59376985", "0.59036666", "0.5893113", "0.5867014", "0.5857913", "0.58517...
0.68679565
1
Removes a selection from the current selections
private void removeSelection(RectangleButton button) { selectedUnits.remove(cancelButtons.indexOf(button)); cancelButtons.remove(button); setSelectionLocations(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeSelection() {\n this.selection = null;\n }", "protected void removeSelection() {\n\t\tBEAN oldBean = getInternalValue();\n\t\tsetInternalValue(null);\n\t\ttextField.setValue(null);\n\t\tif (searchListener != null) {\n\t\t\tsearchListener.remove(oldBean);\n\t\t}\n\t}", "public void deselec...
[ "0.88100076", "0.78770566", "0.77918375", "0.7701695", "0.7691674", "0.7627041", "0.76220655", "0.7580558", "0.75576407", "0.75142306", "0.75037783", "0.747352", "0.7444832", "0.74384964", "0.74003065", "0.73914194", "0.73907864", "0.72894746", "0.7275147", "0.71751285", "0.7...
0.7307139
17
Draws the box that displays the unit's stats if the user's mouse is hovering over it on the unit selection area.
private void drawStatDisplay(Graphics g, Container container) { if (hoverButton != null) { // Set the display to draw right underneath the button being // hovered over int x = hoverButton.getLocation().x; int y = hoverButton.getLocation().y + thumbnailSize.height + 3; statDisplay.draw(g, x, y, container); StatSet stats = buttons.get(hoverButton).getStats(); g.setFont(statFont); g.setColor(Color.black); g.drawString("" + stats.getAttack(), x + 30, y + 20); g.drawString("" + stats.getMovement(), x + 30, y + 40); // Make sure the right display is right-aligned // The stats do not exceed 99, therefore there isn't // any need for dealing with 3 or more digit numbers if (stats.getHealth() >= 10) g.drawString("" + stats.getHealth(), x + 78, y + 20); else g.drawString("" + stats.getHealth(), x + 86, y + 20); if (stats.getRange() >= 10) g.drawString("" + stats.getRange(), x + 78, y + 40); else g.drawString("" + stats.getRange(), x + 86, y + 40); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void display() {\n shadow.display();\r\n strokeWeight(strokeWeight);\r\n fill(boxColour);\r\n rect(x, y, w, h, 7);\r\n }", "public void drawUnites(Graphics g, int screenX, int screenY, Unite uniteSelection, Joueur joueur) {\n\t\t\n\t}", "public void dis...
[ "0.63248396", "0.5870476", "0.58693373", "0.5859907", "0.5855578", "0.57756823", "0.5768134", "0.57654834", "0.57097346", "0.5700112", "0.5680262", "0.5678127", "0.5673198", "0.56603646", "0.56559503", "0.56499434", "0.562468", "0.5605612", "0.5585319", "0.55660796", "0.55642...
0.5850563
5
Draws the menu on the screen
public void draw(Graphics g, Container container) { super.draw(g, container); // Draw the buttons for (RectangleButton button : buttons.keySet()) button.draw(g, container); for (RectangleButton button : cancelButtons) button.draw(g, container); title.draw(g, container); goButton.draw(g, container); // Draw the lines that appear beside the go button Graphics2D g2 = (Graphics2D) g; g2.setColor(Color.white); g2.setStroke(new BasicStroke(2f)); int lineLength = 325; int spaceFromButton = 20; Point center = goButton.getCenter(); g2.drawLine(center.x - spaceFromButton - lineLength, center.y, center.x - spaceFromButton, center.y); g2.drawLine(center.x + spaceFromButton, center.y, center.x + spaceFromButton + lineLength, center.y); drawStatDisplay(g, container); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void renderMenu() {\n StdDraw.setCanvasSize(START_WIDTH * TILE_SIZE, START_HEIGHT * TILE_SIZE);\n Font font = new Font(\"Monaco\", Font.BOLD, 20);\n StdDraw.setFont(font);\n StdDraw.setXscale(0, START_WIDTH );\n StdDraw.setYscale(0, START_HEIGHT );\n StdDraw.clear(...
[ "0.8388595", "0.8079379", "0.74140203", "0.73835576", "0.7250067", "0.7150581", "0.70098865", "0.69605184", "0.6958109", "0.6931519", "0.68948203", "0.68878585", "0.67999923", "0.67382294", "0.67067707", "0.66701496", "0.6662108", "0.6652367", "0.66301155", "0.6606508", "0.65...
0.0
-1
Created by Minh on 9/28/2018.
public interface GenreCallback<T> { void onSucess(ArrayList<T> data); void onError(Exception exception); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "publ...
[ "0.60334104", "0.5975828", "0.58708763", "0.57206154", "0.57097036", "0.56647074", "0.5652643", "0.5645696", "0.5645696", "0.5637054", "0.56183594", "0.55813897", "0.5568726", "0.5556643", "0.5546729", "0.5525257", "0.5510285", "0.55094326", "0.55093807", "0.5495138", "0.5489...
0.0
-1
parse the episode string, i.e. [1,1],[2,2],[3,3],
protected Set<DsdCahVisitEpisode> parseEpisodeString(String episodesString) { if (log.isInfoEnabled()) { log.info("Episode string = " + episodesString); } Set<DsdCahVisitEpisode> dsdCahVisitEpisodes = new LinkedHashSet<>(); if (StringUtils.isNotEmpty(episodesString)) { log.info("Episode string length - " + episodesString.split(";").length); for (String line : episodesString.split(";")) { String values = extractValuesFromBrackets(line); String[] array = splitValuesToArray(values); if (array.length == 6) { dsdCahVisitEpisodes.add( new DsdCahVisitEpisode(dsdCahVisit, parseValueToInteger(array[0]), array[1], array[2], array[3], array[4], array[5])); } } } log.info("Episodes = " + dsdCahVisitEpisodes); return dsdCahVisitEpisodes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Edge parseToEdge(String s) {\n\t\ts = s.trim();\n\t\tString[] results = s.split(\"[(),]+\");\n\t\tif(results.length == 8 && results[0].equals(\"[\") && results[7].equals(\"]\")) {\n\t\t\t\n\t\t\ttry {\n\t\t\t\tint i1 = Integer.parseInt(results[1]);\n\t\t\t\tint i2 = Integer.parseInt(results[2]);\n\t...
[ "0.56629676", "0.55169046", "0.5418808", "0.5412058", "0.53511894", "0.5264439", "0.52549344", "0.51942796", "0.51229614", "0.5027883", "0.50155485", "0.50064635", "0.4964976", "0.49341837", "0.4932279", "0.4912276", "0.4887158", "0.48812217", "0.48660946", "0.48518422", "0.4...
0.6418172
0
parse the episode string, i.e. [Hydrocortisone,1,mg,01:00,note1];[Prednisolone,2,mcg,02:00,note2];[Prednisone,3,grams,03:00,note3];;,
protected Set<DsdCahVisitMedDetail> parseMedicineDetailString(String medicineDetailString) { log.info("medicineDetail String = " + medicineDetailString); Set<DsdCahVisitMedDetail> dsdCahVisitMedDetailSet = new LinkedHashSet<>(); if (StringUtils.isNotEmpty(medicineDetailString)) { log.debug("medicineDetail String length - " + medicineDetailString.split(";").length); for (String line : medicineDetailString.split(";")) { String values = extractValuesFromBrackets(line); String[] array = splitValuesToArray(values); log.info("split value array length: " + array.length); if (array != null && array.length != 0) { DsdCahVisitMedDetail medDetail = new DsdCahVisitMedDetail(dsdCahVisit, array[0], parseValueToDouble(array[1]), array[2], parseValueToTime(array[3]), decodeEscapedJavaScriptString(array[4])); dsdCahVisitMedDetailSet.add(medDetail); } } } else { log.error("medicineDetail String from JSP is null or empty"); } log.info("Parsed Meds detail set = " + dsdCahVisitMedDetailSet); return dsdCahVisitMedDetailSet; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected Set<DsdCahVisitEpisode> parseEpisodeString(String episodesString) {\n if (log.isInfoEnabled()) {\n log.info(\"Episode string = \" + episodesString);\n }\n Set<DsdCahVisitEpisode> dsdCahVisitEpisodes = new LinkedHashSet<>();\n if (StringUtils.isNotEmpty(episodesStrin...
[ "0.6746129", "0.56598055", "0.5461513", "0.5281212", "0.5271936", "0.5252061", "0.52194154", "0.52129453", "0.5171036", "0.5168507", "0.51371187", "0.51159686", "0.51021874", "0.5050215", "0.5042519", "0.503711", "0.49937573", "0.49848583", "0.49673724", "0.49464628", "0.4922...
0.0
-1
Method programming frequency of acceptable button clicks
public void buttonClickTiming() { //Prevention of button mushing by using threshold of 1000 ms between clicks if (SystemClock.elapsedRealtime() - lastClickTime < 1000) { return; } lastClickTime = SystemClock.elapsedRealtime(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clickAction(int clickCount);", "public int howManyActivated() {\n int cont = 0;\n if(!baseProductionPanel.getProductionButton().isToken())\n cont++;\n for(int i = 0 ; i<3;i++){\n if (!productionButtons[i].isToken())\n cont++;\n }\n ...
[ "0.6421741", "0.62189895", "0.61754054", "0.5892632", "0.5847507", "0.5798104", "0.57218343", "0.57055235", "0.5681465", "0.5666646", "0.56605935", "0.5601027", "0.5565875", "0.5546125", "0.55341583", "0.5510291", "0.5508307", "0.55062443", "0.54925805", "0.5490508", "0.54882...
0.61164117
3
TODO Autogenerated method stub
@Override public void actionPerformed(ActionEvent ae) { if(ae.getActionCommand().equals("Ação 3")); System.out.println("Clicke no botão 3"); }
{ "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
Leet69 Sqrt with Binary Search created in 19:28 2021/4/10
public int mySqrt(int x) { if(x < 2) return x; int tmp = x / 2; while(x / tmp < tmp) { tmp /= 2; } int l = tmp; int r = 2 * tmp; while(l <= r) { int mid = l + (r - l) / 2; tmp = x / mid; if(mid == tmp) return mid; if(tmp < mid) r = mid - 1; else l = mid + 1; } return r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args){\n int s = 80;\n int n = (int) Math.pow(10, 7);\n Integer[] a = new Integer[n];\n Random rand = new Random();\n for (int i = 0; i < n; i++){\n a[i] = (int) (n*rand.nextDouble());\n }\n double binTime = binSearchT(s, ...
[ "0.6310813", "0.6237915", "0.61374015", "0.6111252", "0.6100022", "0.60946286", "0.6085604", "0.6007646", "0.60027546", "0.5964783", "0.5946879", "0.59466434", "0.59451157", "0.59227145", "0.59219867", "0.5908028", "0.5889623", "0.587655", "0.58529747", "0.5842385", "0.583739...
0.0
-1
String access_Token = kakao.getAccessToken(code);
@ApiOperation(value = "카카오로그인", response = User.class) @PostMapping("/login") public ResponseEntity<User> login(@RequestBody String accessToken) { int indexsame = 0; indexsame= accessToken.indexOf("="); String token = accessToken.substring(indexsame+1, accessToken.length()); HashMap<String,Object>userInfo =kakao.getUserInfo(token); User loginuser=new User(); String id; String nickname; Object temp; if(userInfo!=null) { temp= userInfo.get("id"); temp=temp+""; id= temp+"kakao.com"; if(userservice.getUserCount(id)>0) { User user= new User(); user.setUserId(id); loginuser=userservice.login(user); } else if(userservice.getUserCount(id)==0) { Random r = new Random(); int dice = r.nextInt(157211)+48271; String dicesen=Integer.toString(dice); String pw = dicesen; loginuser.setUserId(id); loginuser.setUserPw(pw); int totalcount=userservice.getTotalCount(); loginuser.setUserName(totalcount+""); nickname= temp+""; loginuser.setUserNickname(nickname); userservice.insertUser(loginuser); } } return new ResponseEntity<User>(loginuser, HttpStatus.OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getAccessToken();", "String getAccessToken();", "public String getAccessToken();", "private String retrieveToken(String accessCode) throws IOException {\n OAuthApp app = new OAuthApp(asanaCredentials.getClientId(), asanaCredentials.getClientSecret(),\n asanaCredentials.getRedirec...
[ "0.79338443", "0.79338443", "0.7879487", "0.7535559", "0.73326075", "0.7201379", "0.71695894", "0.71646625", "0.7121317", "0.7083908", "0.7060648", "0.7043266", "0.70309335", "0.702735", "0.7022995", "0.7022995", "0.69786453", "0.6918562", "0.6894772", "0.68703765", "0.686184...
0.0
-1
Create an invalid appointment
@Test public void test02() throws Throwable { int startHour=-15; int startMinute=30; int startDay=11; int startMonth=4; int startYear=2017; String title="Birthday Party"; String description="This is my birthday party."; //Construct a new Appointment object with the initial data Appt appt1 = new Appt(startHour, startMinute , startDay , startMonth , startYear , title, description); // create another appointment startHour=14; startMinute=30; startDay=11; startMonth=4; startYear=2017; title="Class"; description="Rescheduled class."; //Construct a new Appointment object with the initial data Appt appt2 = new Appt(startHour, startMinute , startDay , startMonth , startYear , title, description); // create another appointment startHour=13; startMinute=30; startDay=11; startMonth=4; startYear=2017; title="Meeting Today"; description="Meeting with the students."; //Construct a new Appointment object with the initial data Appt appt3 = new Appt(startHour, startMinute , startDay , startMonth , startYear , title, description); //Create CalDay objects CalDay today = new CalDay (new GregorianCalendar(2017,4,11)); //Set the calender appointments today.addAppt(appt1); today.addAppt(appt2); today.addAppt(appt3); //Assertions assertTrue(today.isValid()); assertEquals(11, today.getDay()); assertEquals(4, today.getMonth()); assertEquals(2017, today.getYear()); assertEquals(2, today.getSizeAppts()); assertEquals("\t --- 4/11/2017 --- \n" + " --- -------- Appointments ------------ --- \n" + "\t4/11/2017 at 1:30pm ,Meeting Today, Meeting with the students.\n" + " \t4/11/2017 at 2:30pm ,Class, Rescheduled class.\n" + " \n", today.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int createAppointment(Appointment appointment) {\n\t\treturn 0;\r\n\t}", "@PostMapping(\"/appointments\")\n @ResponseStatus(HttpStatus.CREATED)\n Appointment createAppointment(@Valid @RequestBody Appointment newApp) {\n\n Appointment appointment = modelMapper.map(newApp, Appointment.class);\n...
[ "0.71392107", "0.69568056", "0.65217024", "0.6417392", "0.6308186", "0.6291761", "0.6282364", "0.6242358", "0.61225355", "0.61183333", "0.6082061", "0.6076332", "0.6068796", "0.6061931", "0.60606897", "0.60279727", "0.60040855", "0.59732103", "0.59594667", "0.5950874", "0.585...
0.5966524
18
to generate rankings for all tnids with label tlabel from snid
@UserFunction public List<List<String>> MPPR(@Name("value") String degVec2, @Name("value") String labels2, @Name("value") String snidStr, @Name("value") String slabel, @Name("value") String tlabel, @Name("value") String iterationNumStr, @Name("value") String damplingfactorStr) throws IOException, InterruptedException { int snid = Integer.parseInt(snidStr); int slabelid = kg.getLabelID(slabel); int sid = kg.node[slabelid].get(snid); int tlabelid = kg.getLabelID(tlabel); int iterationNum = Integer.parseInt(iterationNumStr); double damplingfactor = Double.parseDouble(damplingfactorStr); gmam = new GetMAMGraph(); graphReady g = gmam.getMAMGraph(degVec2, labels2, kg); int smamid = gmam.eid2id.get(slabelid+","+sid); //note that the id in graphready is smmcid-1, since graphready starts from 1! //get tnids with tlabel ArrayList<Integer>tmamids = new ArrayList(); for(int i=0;i<kg.nodeNID[tlabelid].size();i++) { tmamids.add(gmam.eid2id.get(tlabelid+","+i)); } double[]mppr = rootedPageRank(smamid, tmamids, g.graph, iterationNum, damplingfactor); int min = Integer.MIN_VALUE; List<List<String>> res = new ArrayList(); for(int i=0;i<mppr.length;i++) { if(mppr[i]<=min) continue; List<String> ares= new ArrayList(); ares.add(kg.nodeNID[tlabelid].get(i)+""); ares.add(kg.nodeName[tlabelid].get(i)); ares.add(mppr[i]+""); res.add(ares); //System.out.println(ares); } return res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void rankMatches();", "public void evaluateUniformDistribution(String label) {\r\n // subtract one point for each card of same suit next to a card one away in rank\r\n // subtract two points for each run of two\r\n // three points for each run of three, etc.\r\n // add no point...
[ "0.55604875", "0.5289275", "0.5184131", "0.51718134", "0.5159868", "0.5146859", "0.5093214", "0.5083016", "0.49718636", "0.49544084", "0.49023077", "0.4902108", "0.48841736", "0.48788878", "0.48772055", "0.48544228", "0.48481712", "0.48452455", "0.48436746", "0.48410913", "0....
0.0
-1
seperate the values between two parentheses
private List<String> parse(String str) { List<String> res = new ArrayList<>(); int par = 0; StringBuilder sb = new StringBuilder(); for(char c: str.toCharArray()){ if(c == '('){ par++; } if(c == ')'){ par--; } if(par == 0 && c == ' '){ res.add(new String(sb)); sb = new StringBuilder(); }else{ sb.append(c); } } if(sb.length() > 0){ res.add(new String(sb)); } return res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String[] sepInst(String inst){\n\n String[] separated = new String[3];\n separated[0] = inst.substring(0, inst.indexOf(' '));\n if(-1 == inst.indexOf(',')){//enters if when only one variable\n separated[1] = inst.substring(inst.indexOf(' ')+1, inst.length());\n ...
[ "0.59425396", "0.5613482", "0.5583689", "0.5531429", "0.5516599", "0.5490141", "0.5412817", "0.5411215", "0.5388573", "0.5370598", "0.53702515", "0.5369936", "0.5337402", "0.5316401", "0.52963865", "0.526847", "0.52389914", "0.5220933", "0.5210549", "0.5183001", "0.51722485",...
0.5432591
6
/ Supprime l'association entre une liste de tags et un signet
public void untagBookmark(int[] tagIds, int bookmarkId) { String sql = "DELETE FROM tag_bookmark WHERE tagId IN ? AND bookmarkId=?"; try (Connection conn = getConnection()) { PreparedStatement stmt = conn.prepareStatement(sql); stmt.setObject(1, tagIds); stmt.setObject(2, bookmarkId); stmt.executeUpdate(); } catch (SQLException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UniqueTagList getTags();", "private void removeInsTag(ArrayList p_tags, HtmlObjects.Tag p_tag)\n {\n int i_start = 0;\n int i_end = 0;\n\n loop: for (int i = 0, max = p_tags.size(); i < max; i++)\n {\n Object o = p_tags.get(i);\n\n if (o == p_tag)\n ...
[ "0.6795965", "0.6396395", "0.62757015", "0.6202757", "0.6152749", "0.6152749", "0.61311644", "0.61093825", "0.6080905", "0.6067971", "0.60523826", "0.603346", "0.59174323", "0.5880554", "0.58466935", "0.5826164", "0.5822508", "0.5791502", "0.5771549", "0.57634544", "0.5763454...
0.0
-1
/ Supprime l'association entre un tag et plusieurs signets
public void untagBookmarks(int tagId, int[] bookmarkIds){ String sql = "DELETE FROM tag_bookmarks WHERE tagId=? AND bookmarkId IN ?"; try(Connection conn = getConnection()) { PreparedStatement stmt = conn.prepareStatement(sql); stmt.setObject(1, tagId); stmt.setObject(2, bookmarkIds); stmt.executeUpdate(); } catch (SQLException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UniqueTagList getTags();", "private void removeInsTag(ArrayList p_tags, HtmlObjects.Tag p_tag)\n {\n int i_start = 0;\n int i_end = 0;\n\n loop: for (int i = 0, max = p_tags.size(); i < max; i++)\n {\n Object o = p_tags.get(i);\n\n if (o == p_tag)\n ...
[ "0.5609212", "0.5554108", "0.53576124", "0.534151", "0.5238316", "0.5223339", "0.52217215", "0.51924205", "0.5151525", "0.5094654", "0.5082476", "0.5072638", "0.5017928", "0.50089335", "0.49994367", "0.49994367", "0.4996223", "0.495331", "0.49523717", "0.4949594", "0.49487883...
0.0
-1
Supprime les associations entre une liste de tags et une liste de signets
public void untagBookmarks(int[] tagIds, int[] bookmarkIds) { String sql = "DELETE FROM tag_bookmarks WHERE tagId IN ? AND bookmarkId IN ?"; try(Connection conn = getConnection()) { PreparedStatement stmt = conn.prepareStatement(sql); stmt.setObject(1, tagIds); stmt.setObject(2, bookmarkIds); stmt.executeUpdate(); } catch (SQLException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void clearAssociations();", "private void removeInsTag(ArrayList p_tags, HtmlObjects.Tag p_tag)\n {\n int i_start = 0;\n int i_end = 0;\n\n loop: for (int i = 0, max = p_tags.size(); i < max; i++)\n {\n Object o = p_tags.get(i);\n\n if (o == p_tag)\n ...
[ "0.6290192", "0.5982102", "0.59019405", "0.56717384", "0.5613567", "0.54919714", "0.5455689", "0.5414019", "0.5408789", "0.5397372", "0.53708225", "0.52863616", "0.5283702", "0.5247132", "0.5246683", "0.5202102", "0.520002", "0.5197664", "0.5168385", "0.5159894", "0.5156747",...
0.0
-1
/ Supprime toutes les associations de ce tag
public void deleteAssociationsForTag(int tagId) { String sql = "DELETE FROM tag_bookmark WHERE tagId=?"; try (Connection conn = getConnection()) { PreparedStatement stmt = conn.prepareStatement(sql); stmt.setObject(1, tagId); stmt.executeUpdate(); } catch (SQLException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void clearAssociations();", "void unsetFurtherRelations();", "public void delRelations();", "void removeRelated(int i);", "TypeAssociationEXT getConcerneUniteUnite();", "void cascade(Attributes attributes);", "public void delIncomingRelations();", "public void purgeRelations() {\n this.purged ...
[ "0.6270713", "0.5909285", "0.55673987", "0.5485699", "0.53736967", "0.5367048", "0.532537", "0.525656", "0.5254166", "0.52274203", "0.5217133", "0.5194869", "0.5191555", "0.5167097", "0.5166437", "0.5161417", "0.51501495", "0.51449615", "0.5118196", "0.510155", "0.50894", "...
0.51052845
19
/ Supprime toutes les associations de ce signet
public void deleteAssociationsForBookmark(int bookmarkId) { String sql = "DELETE FROM tag_bookmark WHERE bookmarkID=?"; try (Connection conn = getConnection()) { PreparedStatement stmt = conn.prepareStatement(sql); stmt.setObject(1, bookmarkId); stmt.executeUpdate(); } catch (SQLException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void clearAssociations();", "void unsetFurtherRelations();", "@Optional\n Association<GebaeudeArtStaBuComposite> gebaeudeArtStaBu();", "public void delRelations();", "TypeAssociationEXT getConcerneUniteUnite();", "public void purgeRelations() {\n this.purged = true;\n for (AS tCust : thi...
[ "0.66235334", "0.6188301", "0.5821038", "0.5798775", "0.5779195", "0.57176995", "0.56604636", "0.56587213", "0.56221", "0.55705297", "0.55418444", "0.5523673", "0.54575396", "0.5447113", "0.5429011", "0.5412974", "0.5401478", "0.5393395", "0.538508", "0.5375805", "0.5375068",...
0.0
-1
T O(2^n) S O(n)
public int knapSack(int wt[], int val[], int w) { return helper(wt, val, wt.length ,w); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int f2(int N) { \n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n)\n // O(n)`\n for(int j = 0; j < i; j++) \n x++;\n return x;\n }", "public static int f1(int N) {\n int x = 0; //O(1)\n for(int i = 0; i < N; i++...
[ "0.71382695", "0.6775368", "0.620023", "0.61132324", "0.60156554", "0.59950346", "0.5782846", "0.5771869", "0.5749249", "0.57079965", "0.568199", "0.567689", "0.56348735", "0.5611003", "0.55878794", "0.5574263", "0.55412304", "0.55048406", "0.5481209", "0.54706734", "0.544836...
0.0
-1
T O(n w) S O(n w)
public int knapSackDP(int wt[], int val[], int mw) { // init DP int[][] dp = new int[wt.length + 1][mw + 1]; // base conditions // set all rows for n=0 and w=0 to 0 // Loop for (int n = 1; n < dp.length; n++) { for (int w = 1; w < dp[0].length; w++) { if (wt[n - 1] > w) dp[n][w] = dp[n - 1][w]; else dp[n][w] = Math.max(val[n - 1] + dp[n - 1][w - wt[n - 1]], dp[n - 1][w]); } } return dp[dp.length - 1][dp[0].length - 1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void h(List<List<Integer>> r, List<Integer> t, int n, int s){ \n for(int i = s; i*i <= n; i++){\n if(n % i != 0) continue; \n t.add(i);\n t.add(n / i);\n r.add(new ArrayList<>(t));\n t.remove(t.size() -...
[ "0.5715879", "0.5636839", "0.5379997", "0.5325899", "0.5317265", "0.52644455", "0.525922", "0.5250388", "0.5194986", "0.51566", "0.51434493", "0.5115961", "0.5088496", "0.5058519", "0.50504816", "0.5044809", "0.50394917", "0.5013902", "0.50111735", "0.50072414", "0.50018066",...
0.0
-1
Creates new form InternalVentanaFacturar
public InternalVentanaFacturar(Empleado empleado) throws SQLException { cv = new ControladorValidaciones(); fecha= cv.getHora(); detalles = new DefaultTableModel(); cl = new ControladorClientes(); cl.cargarClientes(); clientes = cl.getClientes(); cp = new ControladorProductos(); cf = new ControladorFacturas(); initComponents(); jTextField2.setText(cf.getNumFactura()); this.empleado = empleado; factura = new FacturaCabecera(); nombreEmpleado.setText(this.empleado.getNombre()); cedulaEmpleado.setText(this.empleado.getCedula()); nombre1.setText(date.format(fecha)); cargarModeloTabla(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void makeFactura() {\n Usuario userCurrent = (Usuario) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get(\"current\");\n if (userCurrent != null) {\n Calendar c = Calendar.getInstance();\n factura.setIdfactura(facturaFacade.findAll().size() + 1);\...
[ "0.6942488", "0.67264277", "0.6659875", "0.65235406", "0.64963603", "0.6478082", "0.6413147", "0.6380847", "0.63550997", "0.63550997", "0.63550997", "0.63550997", "0.6313699", "0.63010347", "0.62881964", "0.62721324", "0.6242336", "0.62288", "0.621183", "0.619031", "0.6164974...
0.57720923
73
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() { envio = new javax.swing.ButtonGroup(); jPanel1 = new javax.swing.JPanel(); jPanel2 = new javax.swing.JPanel(); jPanel3 = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); jTextField2 = new javax.swing.JTextField(); jLabel3 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); nombreEmpleado = new javax.swing.JTextField(); jLabel19 = new javax.swing.JLabel(); cedulaEmpleado = new javax.swing.JTextField(); nombre1 = new javax.swing.JTextField(); jPanel4 = new javax.swing.JPanel(); jLabel5 = new javax.swing.JLabel(); tipoBusquedaCliente = new javax.swing.JComboBox(); txtIngresoDatoCliente = new javax.swing.JTextField(); buscar = new javax.swing.JButton(); newCliente = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); nombreCliente = new javax.swing.JTextField(); jLabel16 = new javax.swing.JLabel(); cedulaCliente = new javax.swing.JTextField(); jLabel17 = new javax.swing.JLabel(); telefonoCliente = new javax.swing.JTextField(); jLabel18 = new javax.swing.JLabel(); jLabel20 = new javax.swing.JLabel(); apellidoCliente = new javax.swing.JTextField(); celularCliente = new javax.swing.JTextField(); jPanel5 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); txtIngresoDatosPro = new javax.swing.JTextField(); buscar1 = new javax.swing.JButton(); tipoBusquedaProducto = new javax.swing.JComboBox(); jLabel10 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); cantidadCompraPro = new javax.swing.JTextField(); jLabel22 = new javax.swing.JLabel(); nombrePro = new javax.swing.JTextField(); jLabel23 = new javax.swing.JLabel(); precioUnitarioPro = new javax.swing.JTextField(); jLabel24 = new javax.swing.JLabel(); ivaPro = new javax.swing.JTextField(); jLabel25 = new javax.swing.JLabel(); stockPro = new javax.swing.JTextField(); jLabel26 = new javax.swing.JLabel(); codBarrasPro = new javax.swing.JTextField(); jLabel27 = new javax.swing.JLabel(); pct_descuentoPro = new javax.swing.JTextField(); jLabel28 = new javax.swing.JLabel(); uniCompraPro = new javax.swing.JTextField(); jLabel29 = new javax.swing.JLabel(); uniVentaPro = new javax.swing.JTextField(); jPanel6 = new javax.swing.JPanel(); jScrollPane3 = new javax.swing.JScrollPane(); tablaDetalles = new javax.swing.JTable(); jPanel7 = new javax.swing.JPanel(); btnQuitar = new javax.swing.JButton(); jLabel9 = new javax.swing.JLabel(); jLabel12 = new javax.swing.JLabel(); jLabel13 = new javax.swing.JLabel(); subtotalTotal = new javax.swing.JTextField(); descuentoTotal = new javax.swing.JTextField(); totalFac = new javax.swing.JTextField(); jPanel9 = new javax.swing.JPanel(); rbtnSi = new javax.swing.JRadioButton(); jLabel14 = new javax.swing.JLabel(); jTextField7 = new javax.swing.JTextField(); direccionEnvio = new javax.swing.JButton(); rtbnNo = new javax.swing.JRadioButton(); jPanel8 = new javax.swing.JPanel(); jLabel15 = new javax.swing.JLabel(); txttotalPagar = new javax.swing.JTextField(); btnRecetaMedica = new javax.swing.JButton(); jPanel10 = new javax.swing.JPanel(); jButton6 = new javax.swing.JButton(); setClosable(true); setMaximizable(true); setResizable(true); jPanel1.setBackground(new java.awt.Color(255, 255, 255)); jPanel2.setBackground(new java.awt.Color(255, 255, 255)); jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), "Datos de la Factura", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 13), new java.awt.Color(51, 51, 51))); // NOI18N jPanel3.setBackground(new java.awt.Color(255, 255, 255)); jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), "Datos de Factura")); jLabel2.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel2.setText("Número de Factura"); jTextField2.setEditable(false); jTextField2.setBackground(new java.awt.Color(255, 255, 255)); jTextField2.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N jTextField2.setForeground(new java.awt.Color(51, 51, 51)); jTextField2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); jTextField2.setEnabled(false); jLabel3.setBackground(new java.awt.Color(255, 255, 255)); jLabel3.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel3.setText("Fecha de Venta"); jLabel7.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel7.setText("Nombre del Empleado: "); nombreEmpleado.setEditable(false); nombreEmpleado.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N nombreEmpleado.setHorizontalAlignment(javax.swing.JTextField.CENTER); nombreEmpleado.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); nombreEmpleado.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { nombreEmpleadoActionPerformed(evt); } }); jLabel19.setBackground(new java.awt.Color(0, 102, 204)); jLabel19.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N jLabel19.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel19.setText("Cedula del Empleado:"); cedulaEmpleado.setEditable(false); cedulaEmpleado.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N cedulaEmpleado.setHorizontalAlignment(javax.swing.JTextField.CENTER); cedulaEmpleado.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); nombre1.setEditable(false); nombre1.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N nombre1.setHorizontalAlignment(javax.swing.JTextField.CENTER); nombre1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); nombre1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { nombre1ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel19, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) .addGap(37, 37, 37) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jTextField2) .addComponent(nombreEmpleado) .addComponent(cedulaEmpleado) .addComponent(nombre1)) .addGap(18, 18, 18)) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(nombre1, javax.swing.GroupLayout.DEFAULT_SIZE, 37, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(nombreEmpleado, javax.swing.GroupLayout.DEFAULT_SIZE, 33, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabel19, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(cedulaEmpleado, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel4.setBackground(new java.awt.Color(255, 255, 255)); jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), "Cliente", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Calibri", 0, 14), new java.awt.Color(51, 51, 51))); // NOI18N jLabel5.setBackground(new java.awt.Color(255, 255, 255)); jLabel5.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel5.setText("Buscar por: "); tipoBusquedaCliente.setForeground(new java.awt.Color(0, 102, 204)); tipoBusquedaCliente.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Cedula", "Nombre" })); tipoBusquedaCliente.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); tipoBusquedaCliente.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { tipoBusquedaClienteActionPerformed(evt); } }); txtIngresoDatoCliente.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N txtIngresoDatoCliente.setHorizontalAlignment(javax.swing.JTextField.CENTER); txtIngresoDatoCliente.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); buscar.setBackground(new java.awt.Color(255, 255, 255)); buscar.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N buscar.setForeground(new java.awt.Color(0, 102, 204)); buscar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/lupa.png"))); // NOI18N buscar.setText("Buscar"); buscar.setBorder(null); buscar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { buscarActionPerformed(evt); } }); newCliente.setBackground(new java.awt.Color(255, 255, 255)); newCliente.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N newCliente.setForeground(new java.awt.Color(0, 102, 204)); newCliente.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); newCliente.setText("¿Desea almacenar un nuevo cliente? click aqui"); newCliente.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); newCliente.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { newClienteMouseClicked(evt); } }); jLabel4.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel4.setText("Nombre: "); nombreCliente.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N nombreCliente.setHorizontalAlignment(javax.swing.JTextField.CENTER); nombreCliente.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); nombreCliente.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { nombreClienteActionPerformed(evt); } }); jLabel16.setBackground(new java.awt.Color(0, 102, 204)); jLabel16.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N jLabel16.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel16.setText("Cedula:"); cedulaCliente.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N cedulaCliente.setHorizontalAlignment(javax.swing.JTextField.CENTER); cedulaCliente.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); jLabel17.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N jLabel17.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel17.setText(" Telefono "); telefonoCliente.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N telefonoCliente.setHorizontalAlignment(javax.swing.JTextField.CENTER); telefonoCliente.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); jLabel18.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N jLabel18.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel18.setText("Apellido:"); jLabel20.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel20.setText("Celular:"); apellidoCliente.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N apellidoCliente.setHorizontalAlignment(javax.swing.JTextField.CENTER); apellidoCliente.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); celularCliente.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N celularCliente.setHorizontalAlignment(javax.swing.JTextField.CENTER); celularCliente.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); celularCliente.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { celularClienteActionPerformed(evt); } }); javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); jPanel4.setLayout(jPanel4Layout); jPanel4Layout.setHorizontalGroup( jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup() .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(tipoBusquedaCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(17, 17, 17) .addComponent(txtIngresoDatoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 235, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(jPanel4Layout.createSequentialGroup() .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jLabel17, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 123, Short.MAX_VALUE) .addComponent(jLabel16, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(telefonoCliente, javax.swing.GroupLayout.DEFAULT_SIZE, 256, Short.MAX_VALUE) .addComponent(cedulaCliente, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(nombreCliente, javax.swing.GroupLayout.Alignment.LEADING)) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(newCliente, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(109, 109, 109)) .addGroup(jPanel4Layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(buscar, javax.swing.GroupLayout.PREFERRED_SIZE, 232, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel4Layout.createSequentialGroup() .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabel18, javax.swing.GroupLayout.DEFAULT_SIZE, 123, Short.MAX_VALUE) .addComponent(jLabel20, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(18, 18, 18) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(apellidoCliente, javax.swing.GroupLayout.DEFAULT_SIZE, 216, Short.MAX_VALUE) .addComponent(celularCliente)))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))))) ); jPanel4Layout.setVerticalGroup( jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtIngresoDatoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(tipoBusquedaCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(buscar)) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(nombreCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup() .addGap(0, 1, Short.MAX_VALUE) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(apellidoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(cedulaCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel20, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(celularCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(telefonoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(newCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(1, 1, 1)) ); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(18, 18, 18) .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(0, 0, Short.MAX_VALUE)) ); jPanel5.setBackground(new java.awt.Color(255, 255, 255)); jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), "Buscar Producto", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 13), new java.awt.Color(102, 102, 102))); // NOI18N jLabel1.setBackground(new java.awt.Color(255, 255, 255)); jLabel1.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N jLabel1.setForeground(new java.awt.Color(51, 51, 51)); jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setText("Buscar"); txtIngresoDatosPro.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N txtIngresoDatosPro.setHorizontalAlignment(javax.swing.JTextField.CENTER); txtIngresoDatosPro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); buscar1.setBackground(new java.awt.Color(255, 255, 255)); buscar1.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N buscar1.setForeground(new java.awt.Color(0, 102, 204)); buscar1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/lupa.png"))); // NOI18N buscar1.setText("Buscar"); buscar1.setBorder(null); buscar1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { buscar1ActionPerformed(evt); } }); tipoBusquedaProducto.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N tipoBusquedaProducto.setForeground(new java.awt.Color(0, 102, 204)); tipoBusquedaProducto.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Codigo de Barras", "Nombre" })); tipoBusquedaProducto.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 102, 204))); tipoBusquedaProducto.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { tipoBusquedaProductoActionPerformed(evt); } }); jLabel10.setBackground(new java.awt.Color(255, 255, 255)); jLabel10.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N jLabel10.setForeground(new java.awt.Color(0, 102, 204)); jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel10.setText("Ingresar Cantidad a Comprar"); jButton1.setBackground(new java.awt.Color(255, 255, 255)); jButton1.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N jButton1.setForeground(new java.awt.Color(0, 102, 204)); jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/compra.png"))); // NOI18N jButton1.setText("Añadir"); jButton1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); cantidadCompraPro.setEditable(false); cantidadCompraPro.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N cantidadCompraPro.setForeground(new java.awt.Color(0, 102, 204)); cantidadCompraPro.setHorizontalAlignment(javax.swing.JTextField.CENTER); cantidadCompraPro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 102))); jLabel22.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N jLabel22.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel22.setText("Nombre: "); nombrePro.setEditable(false); nombrePro.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N nombrePro.setHorizontalAlignment(javax.swing.JTextField.CENTER); nombrePro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); jLabel23.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N jLabel23.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel23.setText("Código de Barras:"); precioUnitarioPro.setEditable(false); precioUnitarioPro.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N precioUnitarioPro.setHorizontalAlignment(javax.swing.JTextField.CENTER); precioUnitarioPro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); jLabel24.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N jLabel24.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel24.setText("IVA: "); ivaPro.setEditable(false); ivaPro.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N ivaPro.setHorizontalAlignment(javax.swing.JTextField.CENTER); ivaPro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); jLabel25.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N jLabel25.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel25.setText("Stock:"); stockPro.setEditable(false); stockPro.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N stockPro.setHorizontalAlignment(javax.swing.JTextField.CENTER); stockPro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); jLabel26.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N jLabel26.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel26.setText("Precio Unitario:"); codBarrasPro.setEditable(false); codBarrasPro.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N codBarrasPro.setHorizontalAlignment(javax.swing.JTextField.CENTER); codBarrasPro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); jLabel27.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N jLabel27.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel27.setText("Porcentaje de Descuento"); pct_descuentoPro.setEditable(false); pct_descuentoPro.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N pct_descuentoPro.setHorizontalAlignment(javax.swing.JTextField.CENTER); pct_descuentoPro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); pct_descuentoPro.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { pct_descuentoProActionPerformed(evt); } }); jLabel28.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N jLabel28.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel28.setText("Unidad de Compra"); uniCompraPro.setEditable(false); uniCompraPro.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N uniCompraPro.setHorizontalAlignment(javax.swing.JTextField.CENTER); uniCompraPro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); jLabel29.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N jLabel29.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel29.setText("Unidad de Venta"); uniVentaPro.setEditable(false); uniVentaPro.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N uniVentaPro.setHorizontalAlignment(javax.swing.JTextField.CENTER); uniVentaPro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5); jPanel5.setLayout(jPanel5Layout); jPanel5Layout.setHorizontalGroup( jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup() .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel5Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel22, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel28, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel29, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup() .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(nombrePro, javax.swing.GroupLayout.PREFERRED_SIZE, 199, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(uniCompraPro, javax.swing.GroupLayout.PREFERRED_SIZE, 199, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(uniVentaPro, javax.swing.GroupLayout.PREFERRED_SIZE, 199, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel26, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel24, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel5Layout.createSequentialGroup() .addComponent(jLabel25, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(7, 7, 7))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(ivaPro, javax.swing.GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE) .addComponent(precioUnitarioPro) .addComponent(stockPro)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(jPanel5Layout.createSequentialGroup() .addComponent(tipoBusquedaProducto, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(txtIngresoDatosPro, javax.swing.GroupLayout.PREFERRED_SIZE, 234, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(buscar1, javax.swing.GroupLayout.DEFAULT_SIZE, 214, Short.MAX_VALUE))) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup() .addGap(17, 17, 17) .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(jPanel5Layout.createSequentialGroup() .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE) .addComponent(jLabel27, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel23, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(codBarrasPro) .addComponent(pct_descuentoPro) .addComponent(cantidadCompraPro, javax.swing.GroupLayout.DEFAULT_SIZE, 219, Short.MAX_VALUE)))) .addGap(22, 22, 22)) ); jPanel5Layout.setVerticalGroup( jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup() .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(tipoBusquedaProducto, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(precioUnitarioPro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel26, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel22, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(nombrePro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(17, 17, 17) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel24, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(ivaPro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel28, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(uniCompraPro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(8, 8, 8) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel25, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(stockPro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel29, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(uniVentaPro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap()) .addGroup(jPanel5Layout.createSequentialGroup() .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtIngresoDatosPro, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(buscar1) .addComponent(jLabel23, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(codBarrasPro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel27, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(pct_descuentoPro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(cantidadCompraPro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)))) ); jPanel6.setBackground(new java.awt.Color(255, 255, 255)); jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), "Detalle de la Factura")); jScrollPane3.setBackground(new java.awt.Color(255, 255, 255)); jScrollPane3.setBorder(null); tablaDetalles.setBackground(new java.awt.Color(0, 102, 204)); tablaDetalles.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N tablaDetalles.setForeground(new java.awt.Color(255, 255, 255)); tablaDetalles.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null, null}, {null, null, null, null, null}, {null, null, null, null, null}, {null, null, null, null, null}, {null, null, null, null, null}, {null, null, null, null, null}, {null, null, null, null, null}, {null, null, null, null, null} }, new String [] { "Cantidad", "Producto", "Precio Unitario", "Subtotal", "Descuento por Producto" } ) { Class[] types = new Class [] { java.lang.Integer.class, java.lang.String.class, java.lang.Double.class, java.lang.Double.class, java.lang.Double.class }; boolean[] canEdit = new boolean [] { false, false, false, true, true }; public Class getColumnClass(int columnIndex) { return types [columnIndex]; } public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit [columnIndex]; } }); tablaDetalles.setRowHeight(25); tablaDetalles.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { tablaDetallesMouseClicked(evt); } }); jScrollPane3.setViewportView(tablaDetalles); javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6); jPanel6.setLayout(jPanel6Layout); jPanel6Layout.setHorizontalGroup( jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 845, Short.MAX_VALUE) .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 845, Short.MAX_VALUE)) ); jPanel6Layout.setVerticalGroup( jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 0, Short.MAX_VALUE) .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel6Layout.createSequentialGroup() .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 227, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 25, Short.MAX_VALUE))) ); jPanel7.setBackground(new java.awt.Color(255, 255, 255)); jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), "Opciones", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Calibri", 0, 14), new java.awt.Color(51, 51, 51))); // NOI18N btnQuitar.setBackground(new java.awt.Color(255, 255, 255)); btnQuitar.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N btnQuitar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/eliminar.png"))); // NOI18N btnQuitar.setText("Quitar"); btnQuitar.setEnabled(false); btnQuitar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnQuitarActionPerformed(evt); } }); jLabel9.setText("Subtotal:"); jLabel12.setText("Descuento Total:"); jLabel13.setText("Total:"); subtotalTotal.setEditable(false); subtotalTotal.setBackground(new java.awt.Color(255, 255, 255)); subtotalTotal.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N descuentoTotal.setEditable(false); descuentoTotal.setBackground(new java.awt.Color(255, 255, 255)); descuentoTotal.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N totalFac.setEditable(false); totalFac.setBackground(new java.awt.Color(255, 255, 255)); totalFac.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7); jPanel7.setLayout(jPanel7Layout); jPanel7Layout.setHorizontalGroup( jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel7Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(btnQuitar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel7Layout.createSequentialGroup() .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel12, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel13, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel9, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(subtotalTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 218, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(descuentoTotal) .addComponent(totalFac)))) .addContainerGap()) ); jPanel7Layout.setVerticalGroup( jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel7Layout.createSequentialGroup() .addContainerGap() .addComponent(btnQuitar, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(subtotalTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(28, 28, 28) .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(descuentoTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(totalFac, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(32, Short.MAX_VALUE)) ); jPanel9.setBackground(new java.awt.Color(255, 255, 255)); jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), "Envio", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Calibri", 0, 12), new java.awt.Color(51, 51, 51))); // NOI18N envio.add(rbtnSi); rbtnSi.setText("Si"); rbtnSi.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { rbtnSiMouseClicked(evt); } }); jLabel14.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/dinero.png"))); // NOI18N jLabel14.setText("Precio de envio"); jTextField7.setEditable(false); jTextField7.setHorizontalAlignment(javax.swing.JTextField.CENTER); jTextField7.setText("$ 2.00"); direccionEnvio.setBackground(new java.awt.Color(255, 255, 255)); direccionEnvio.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N direccionEnvio.setForeground(new java.awt.Color(0, 102, 204)); direccionEnvio.setText("Añadir direccion de Envio del cliente"); direccionEnvio.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); direccionEnvio.setEnabled(false); direccionEnvio.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { direccionEnvioActionPerformed(evt); } }); envio.add(rtbnNo); rtbnNo.setSelected(true); rtbnNo.setText("No"); rtbnNo.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { rtbnNoMouseClicked(evt); } }); javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9); jPanel9.setLayout(jPanel9Layout); jPanel9Layout.setHorizontalGroup( jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel9Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(rbtnSi) .addComponent(rtbnNo)) .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel9Layout.createSequentialGroup() .addGap(58, 58, 58) .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(direccionEnvio, javax.swing.GroupLayout.PREFERRED_SIZE, 226, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(14, 14, 14))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel9Layout.setVerticalGroup( jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel9Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(rbtnSi) .addComponent(jLabel14) .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(0, 0, Short.MAX_VALUE) .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(rtbnNo) .addComponent(direccionEnvio, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(21, 21, 21)) ); jPanel8.setBackground(new java.awt.Color(255, 255, 255)); jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), "Servicios", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Calibri", 0, 14), new java.awt.Color(51, 51, 51))); // NOI18N jLabel15.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N jLabel15.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel15.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/cobro.png"))); // NOI18N jLabel15.setText("Total a Pagar:"); txttotalPagar.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N txttotalPagar.setHorizontalAlignment(javax.swing.JTextField.CENTER); txttotalPagar.setEnabled(false); txttotalPagar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txttotalPagarActionPerformed(evt); } }); btnRecetaMedica.setBackground(new java.awt.Color(255, 255, 255)); btnRecetaMedica.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N btnRecetaMedica.setForeground(new java.awt.Color(0, 102, 204)); btnRecetaMedica.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/receta.png"))); // NOI18N btnRecetaMedica.setText("Agregar Receta Medica"); btnRecetaMedica.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnRecetaMedicaActionPerformed(evt); } }); javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8); jPanel8.setLayout(jPanel8Layout); jPanel8Layout.setHorizontalGroup( jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel8Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel15, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(18, 18, 18) .addComponent(txttotalPagar) .addGap(23, 23, 23)) .addGroup(jPanel8Layout.createSequentialGroup() .addGap(34, 34, 34) .addComponent(btnRecetaMedica, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); jPanel8Layout.setVerticalGroup( jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel8Layout.createSequentialGroup() .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(txttotalPagar, javax.swing.GroupLayout.DEFAULT_SIZE, 38, Short.MAX_VALUE) .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnRecetaMedica, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(21, 21, 21)) ); jPanel10.setBackground(new java.awt.Color(255, 255, 255)); jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), "Generar Factura", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Calibri", 0, 14), new java.awt.Color(51, 51, 51))); // NOI18N jButton6.setBackground(new java.awt.Color(255, 255, 255)); jButton6.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N jButton6.setForeground(new java.awt.Color(0, 102, 204)); jButton6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/impresora.png"))); // NOI18N jButton6.setText("Imprimir Factura"); jButton6.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jButton6MouseClicked(evt); } }); javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10); jPanel10.setLayout(jPanel10Layout); jPanel10Layout.setHorizontalGroup( jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel10Layout.createSequentialGroup() .addGap(23, 23, 23) .addComponent(jButton6, javax.swing.GroupLayout.DEFAULT_SIZE, 361, Short.MAX_VALUE) .addContainerGap()) ); jPanel10Layout.setVerticalGroup( jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel10Layout.createSequentialGroup() .addContainerGap() .addComponent(jButton6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(23, 23, 23)) ); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(17, 17, 17)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.7319573", "0.72908455", "0.72908455", "0.72908455", "0.7286827", "0.7248724", "0.7213511", "0.7208325", "0.7195998", "0.7190202", "0.7184771", "0.7158966", "0.7147921", "0.7093225", "0.7080275", "0.7057302", "0.69875276", "0.6977057", "0.6955658", "0.6953942", "0.69454855"...
0.0
-1
Control createDialogArea = super.createDialogArea(parent);
@Override protected Control createDialogArea(final Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 2; composite.setLayout(layout); composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); Label idLab = new Label(composite, SWT.NONE); idLab.setText("Id: "); idLab.setToolTipText(""); idText = new Text(composite, SWT.BORDER); idText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); doSingleCheck(idText, ID_MIN); idText.addModifyListener(new TextBoxValidator(idText, Messages.getString( "titleToShort", ID_MIN)) { @Override public boolean check(final TypedEvent e) { return doCheck((Text) e.getSource(), ID_MIN); } }); Label titleLab = new Label(composite, SWT.NONE); titleLab.setText("Title: "); titleLab.setToolTipText(""); titleText = new Text(composite, SWT.BORDER); titleText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); doSingleCheck(titleText, TITLE_MIN); titleText.addModifyListener(new TextBoxValidator(titleText, Messages .getString("titleToShort", TITLE_MIN)) { @Override public boolean check(final TypedEvent e) { return doCheck((Text) e.getSource(), TITLE_MIN); } }); // TODO browse field. Label iconLab = new Label(composite, SWT.NONE); iconLab.setText("Icon: "); iconLab.setToolTipText(""); iconPath = new Text(composite, SWT.BORDER); iconPath.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); Label parentCatLab = new Label(composite, SWT.NONE); parentCatLab.setText("Parent Category: "); parentCatCombo = new Combo(composite, SWT.BORDER); parentCatCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); parentCatCombo.add(NO_PARENT); parentCatCombo.select(0); // FIXME save performance, if loading categories only one time. List<Category> categories = ExampleManager.get().getCategories(); for (Category cat : categories) { parentCatCombo.add(cat.getId()); parentCatCombo.getText(); } Label descLab = new Label(composite, SWT.NONE); descLab.setText("Description: "); descText = new Text(composite, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL); GridData descData = new GridData(GridData.FILL_HORIZONTAL); descData.heightHint = CAT_DESC_HEIGHT; descData.minimumHeight = CAT_DESC_MINHEIGHT; descText.setLayoutData(descData); doSingleCheck(descText, DESCRIPTION_MIN); descText.addModifyListener(new TextBoxValidator(descText, Messages .getString("titleToShort", DESCRIPTION_MIN)) { @Override public boolean check(final TypedEvent e) { return doCheck((Text) e.getSource(), DESCRIPTION_MIN); } }); return parent; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n protected Control createDialogArea(Composite parent) {\r\n Composite area = (Composite) super.createDialogArea(parent);\r\n container = createContainer(area);\r\n createField(container);\r\n return area;\r\n }", "@Override\n\tprotected Control createDialogArea(Comp...
[ "0.8211249", "0.8072598", "0.7373044", "0.7336412", "0.7312379", "0.72942907", "0.72231144", "0.72075874", "0.71661943", "0.7086943", "0.70776075", "0.7046508", "0.69783425", "0.69667774", "0.69577575", "0.69357836", "0.68334043", "0.681969", "0.67908657", "0.6784355", "0.676...
0.6587026
26
Helper method to fill a tree with data.
public void fillTree(final Tree tree) { tree.setRedraw(true); List<Category> categories = ExampleManager.get().getCategories(); List<Category> notPlacedCategories = new ArrayList<Category>(); for (Category category : categories) { if (category.getParentId() == null) { TreeItem item = new TreeItem(tree, SWT.NONE); item.setText(category.getTitle()); item.setData(category); } else { notPlacedCategories.add(category); } } for (Category cat : creatableCategories) { if (cat.getParentId() == null) { TreeItem item = new TreeItem(tree, SWT.NONE); item.setText(cat.getTitle()); item.setData(cat); } else { notPlacedCategories.add(cat); } } // enable drawing tree.setRedraw(true); // subcategories. if (notPlacedCategories.size() > 0) { addCategory(Arrays.asList(tree.getItems()), tree.getItemCount(), notPlacedCategories, categories); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TreeImpl(T dato) {\r\n\t\traiz = new NodeImpl<T>(dato, null);// El null dice que es raiz\r\n\t}", "public void populate(List data) {\n visit(m_root, data);\n }", "protected void makeTheTree(){\n\n structure.getRootNode().branchList.add(structure.getNode11());\n structure.getRootNode()....
[ "0.6576994", "0.6573612", "0.6437212", "0.6311094", "0.6304575", "0.62285805", "0.6220484", "0.6202634", "0.6190794", "0.616332", "0.61586165", "0.61567557", "0.613247", "0.61136305", "0.6102295", "0.6093672", "0.6078508", "0.6063305", "0.60621464", "0.60608083", "0.6047506",...
0.6126274
13
Getter for destination location.
public String getDestLocation() { return this.destPath.getText(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Location getDestination() {\r\n return destination;\r\n }", "public Location getDestination()\r\n\t{ return this.destination; }", "public Location getDestination(){\n\t\treturn destination;\n\t}", "@Override\n public Location getDestination() {\n return _destinationLocation != null...
[ "0.84036547", "0.8337576", "0.8329274", "0.82867783", "0.7811335", "0.77819616", "0.7688972", "0.7667203", "0.7618616", "0.7613221", "0.7591477", "0.75666815", "0.75588167", "0.75519043", "0.7542174", "0.7523917", "0.75037414", "0.74646133", "0.74542296", "0.73818535", "0.737...
0.77721447
6
FIXME looses all dependencies and checked elements before.
private void updateCategoryTree() { categoryTree.removeAll(); fillTree(categoryTree); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void checkDependencies() throws Exception\n\t{\n\t\t\n\t}", "private void solveDependencies() {\n requiredProjects.clear();\n requiredProjects.addAll(getFlattenedRequiredProjects(selectedProjects));\n }", "protected void setDependencies() {\n\t\t\n\t}", "private Immutable...
[ "0.6136099", "0.58627826", "0.5697037", "0.5635954", "0.5492304", "0.5459982", "0.5459982", "0.5427887", "0.5422003", "0.5422003", "0.541042", "0.5376751", "0.5360473", "0.53555435", "0.53498167", "0.5268067", "0.526146", "0.52489865", "0.5219414", "0.52135926", "0.52035385",...
0.0
-1
TODO Autogenerated method stub
@Override public void doWorkFlowAnalysis() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { int a,b=0,c=0; Scanner scan = new Scanner (System.in); a = scan.nextInt(); int d=a; while(a!=0){ b = a%10; c=c*10+b; a=a/10; } if(c==d){ System.out.println("palidrome"); } else{ System.out.println("no palidrome"); } }
{ "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
to calculate MiscExpenses amount Total
public static Double getTotalMiscExpensesAmount(List<MiscExpense> miscExpenses) { Logger.info("@M MiscExpense -->> getTotalMiscExpensesAmount(miscExpenses) -->>"); Double result = 0.00; for(MiscExpense miscExpense: miscExpenses){ if(miscExpense != null){ result = result + miscExpense.expenseAmt; } } result=Math.round( result * 100.0 ) / 100.0; Logger.debug("@M MiscExpense -->> getTotalMiscExpensesAmount(miscExpenses) -->> TotalMiscExpenseAmount "+result); Logger.info("@M MiscExpense -->> getTotalMiscExpensesAmount(miscExpenses) <<--"); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setExpensesTotal(){\n\t\t\texpensesOutput.setText(\"$\" + getExpensesTotal());\n\t\t\tnetIncomeOutput.setText(\"$\" + getNetIncome());\n\t\t}", "public double calcTotal(){\n\t\tdouble total; // amount to be returned\n\t\t\n\t\t// add .50 cents for any milk that isn't whole or skim, and .35 cents for ...
[ "0.68600947", "0.6765883", "0.66839707", "0.6604699", "0.65711814", "0.6500773", "0.6472443", "0.6452091", "0.6421061", "0.64203656", "0.6354166", "0.6347055", "0.6347055", "0.63276803", "0.6322834", "0.6312786", "0.63053536", "0.62910116", "0.6283167", "0.6258912", "0.622795...
0.747096
0
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof TblApplicantVacancy)) { return false; } TblApplicantVacancy other = (TblApplicantVacancy) object; if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void se...
[ "0.6895054", "0.68374", "0.6704317", "0.6640388", "0.6640388", "0.6591309", "0.65775865", "0.65775865", "0.6573139", "0.6573139", "0.6573139", "0.6573139", "0.6573139", "0.6573139", "0.65607315", "0.65607315", "0.6543184", "0.65233654", "0.6514126", "0.6486639", "0.6476104", ...
0.0
-1
to store single value
public static void main(String[]args ) { int num=10; //to store multiple values int [] array= {10, 20, 30}; int [] arr=new int[3]; arr[0]=100; arr[1]=200; arr[2]=300; System.out.println(arr[2]); // to retrive all values 1 by 1 for(int num1: arr) { System.out.println(num1); } //Using for loop for (int i=0; i<arr.length; i++) { System.out.println(arr[i]); } //we can store non primitive types: Objects Fruit f=new Apple(); Fruit f1=new Banana(); Object f2=new Orange(); Object monkey=new Monkey(); Object [] mixArray= {f, f1, f2, monkey, "Hello"}; for(Object fr:mixArray) { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public S getValue() { return value; }", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "public Object getValue() { return _value; }", "public Object getValue()\n {\n\treturn value;\n }...
[ "0.6439437", "0.6438686", "0.6438686", "0.6438686", "0.6438686", "0.6438686", "0.6438686", "0.6438686", "0.6290326", "0.6264952", "0.62594134", "0.62594134", "0.62594134", "0.62594134", "0.62594134", "0.6211152", "0.61787605", "0.61787605", "0.61787605", "0.6114062", "0.60810...
0.0
-1
Black Sandstone > Sand
private void addSandRecipes(Consumer<IFinishedRecipe> consumer, String basePath) { RecipeProviderUtil.addSandStoneToSandRecipe(consumer, basePath + "black", modLoaded, BYGBlocks.BLACK_SAND, BYGBlocks.BLACK_SANDSTONE, BYGBlocks.BLACK_CHISELED_SANDSTONE, BYGBlocks.BLACK_CUT_SANDSTONE, BYGBlocks.BLACK_SMOOTH_SANDSTONE); //Blue Sandstone -> Sand RecipeProviderUtil.addSandStoneToSandRecipe(consumer, basePath + "blue", modLoaded, BYGBlocks.BLUE_SAND, BYGBlocks.BLUE_SANDSTONE, BYGBlocks.BLUE_CHISELED_SANDSTONE, BYGBlocks.BLUE_CUT_SANDSTONE, BYGBlocks.BLUE_SMOOTH_SANDSTONE); //Pink Sandstone -> Sand RecipeProviderUtil.addSandStoneToSandRecipe(consumer, basePath + "pink", modLoaded, BYGBlocks.PINK_SAND, BYGBlocks.PINK_SANDSTONE, BYGBlocks.PINK_CHISELED_SANDSTONE, BYGBlocks.PINK_CUT_SANDSTONE, BYGBlocks.PINK_SMOOTH_SANDSTONE); //Purple Sandstone -> Sand RecipeProviderUtil.addSandStoneToSandRecipe(consumer, basePath + "purple", modLoaded, BYGBlocks.PURPLE_SAND, BYGBlocks.PURPLE_SANDSTONE, BYGBlocks.PURPLE_CHISELED_SANDSTONE, BYGBlocks.PURPLE_CUT_SANDSTONE, BYGBlocks.PURPLE_SMOOTH_SANDSTONE); //White Sandstone -> Sand RecipeProviderUtil.addSandStoneToSandRecipe(consumer, basePath + "white", modLoaded, BYGBlocks.WHITE_SAND, BYGBlocks.WHITE_SANDSTONE, BYGBlocks.WHITE_CHISELED_SANDSTONE, BYGBlocks.WHITE_CUT_SANDSTONE, BYGBlocks.WHITE_SMOOTH_SANDSTONE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static String isSandivic(String str) {\n\t\t\n\t\tint first=str.indexOf(\"bread\");\n\t\tint second=str.lastIndexOf(\"bread\");\n\t\tif(first==second) return \"nothing\";\n\t\telse \n\t\treturn str.substring(first+5,second);\n\t\t\n\t}", "public Bishop(String color) {//True is white, false is black\n\t\tsuper(co...
[ "0.5750444", "0.5716729", "0.5649042", "0.5364291", "0.5327256", "0.5273318", "0.5273318", "0.523471", "0.5196316", "0.51959544", "0.51921684", "0.5168638", "0.516417", "0.51615465", "0.5156404", "0.5155787", "0.51276577", "0.51208866", "0.5119712", "0.5117326", "0.50984365",...
0.0
-1
Dacite > Dacite Cobblestone
private void addCrusherDaciteRecipes(Consumer<IFinishedRecipe> consumer, String basePath) { crushing(consumer, BYGBlocks.DACITE, BYGBlocks.DACITE_COBBLESTONE, basePath + "to_cobblestone"); crushing(consumer, BYGBlocks.DACITE_SLAB, BYGBlocks.DACITE_COBBLESTONE_SLAB, basePath + "slabs_to_cobblestone_slabs"); crushing(consumer, BYGBlocks.DACITE_STAIRS, BYGBlocks.DACITE_COBBLESTONE_STAIRS, basePath + "stairs_to_cobblestone_stairs"); crushing(consumer, BYGBlocks.DACITE_WALL, BYGBlocks.DACITE_COBBLESTONE_WALL, basePath + "walls_to_cobblestone_walls"); //Dacite Tile -> Dacite Bricks crushing(consumer, BYGBlocks.DACITE_TILE, BYGBlocks.DACITE_BRICKS, basePath + "tile_to_brick"); crushing(consumer, BYGBlocks.DACITE_TILE_SLAB, BYGBlocks.DACITE_BRICK_SLAB, basePath + "tile_slabs_to_brick_slabs"); crushing(consumer, BYGBlocks.DACITE_TILE_STAIRS, BYGBlocks.DACITE_BRICK_STAIRS, basePath + "tile_stairs_to_brick_stairs"); crushing(consumer, BYGBlocks.DACITE_TILE_WALL, BYGBlocks.DACITE_BRICK_WALL, basePath + "tile_walls_to_brick_walls"); //Dacite Bricks -> Dacite crushing(consumer, BYGBlocks.DACITE_BRICKS, BYGBlocks.DACITE, basePath + "from_brick"); crushing(consumer, BYGBlocks.DACITE_BRICK_SLAB, BYGBlocks.DACITE_SLAB, basePath + "brick_slabs_to_slabs"); crushing(consumer, BYGBlocks.DACITE_BRICK_STAIRS, BYGBlocks.DACITE_STAIRS, basePath + "brick_stairs_to_stairs"); crushing(consumer, BYGBlocks.DACITE_BRICK_WALL, BYGBlocks.DACITE_WALL, basePath + "brick_walls_to_walls"); //Dacite Pillar -> Dacite ItemStackToItemStackRecipeBuilder.crushing( ItemStackIngredient.from(BYGBlocks.DACITE_PILLAR), new ItemStack(BYGBlocks.DACITE, 2) ).addCondition(modLoaded) .build(consumer, Mekanism.rl(basePath + "from_pillar")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printDiamond(){\n printIsoceles();\n //use bottom isosceles method to get bottom half of Diamond\n printBottomIsoceles();\n }", "@Override\n public String bite() {\n String bite = getName()+ \" bites \";\n return bite;\n }", "void Dogs() {\n \n }", "public ...
[ "0.5722997", "0.5651303", "0.5631669", "0.5505324", "0.5488919", "0.5467719", "0.5455009", "0.54222935", "0.54039794", "0.53379744", "0.5304839", "0.5304039", "0.5288265", "0.5272339", "0.5239761", "0.52324206", "0.52307326", "0.5229567", "0.52148914", "0.51882553", "0.517585...
0.5001726
51
Ether > Cobbled Ether
private void addCrusherEtherRecipes(Consumer<IFinishedRecipe> consumer, String basePath) { crushing(consumer, BYGBlocks.ETHER_STONE, BYGBlocks.COBBLED_ETHER_STONE, basePath + "to_cobblestone"); crushing(consumer, BYGBlocks.ETHER_STONE_SLAB, BYGBlocks.COBBLED_ETHER_STONE_SLAB, basePath + "slabs_to_cobblestone_slabs"); crushing(consumer, BYGBlocks.ETHER_STONE_STAIRS, BYGBlocks.COBBLED_ETHER_STONE_STAIRS, basePath + "stairs_to_cobblestone_stairs"); crushing(consumer, BYGBlocks.ETHER_STONE_WALL, BYGBlocks.COBBLED_ETHER_STONE_WALL, basePath + "walls_to_cobblestone_walls"); //Carved Ether -> Ether crushing(consumer, BYGBlocks.CARVED_ETHER_STONE, BYGBlocks.ETHER_STONE, basePath + "from_carved"); crushing(consumer, BYGBlocks.CARVED_ETHER_STONE_SLAB, BYGBlocks.ETHER_STONE_SLAB, basePath + "carved_slabs_to_slabs"); crushing(consumer, BYGBlocks.CARVED_ETHER_STONE_STAIRS, BYGBlocks.ETHER_STONE_STAIRS, basePath + "carved_stairs_to_stairs"); crushing(consumer, BYGBlocks.CARVED_ETHER_STONE_WALL, BYGBlocks.ETHER_STONE_WALL, basePath + "carved_walls_to_walls"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void testEtherNet() {\n\t\tSystem.out.println(\"ethernet test success\");\n\t\t\n\t}", "@Override\n\tpublic void testEtherNet() {\n\t\tieWebDriver.checkEthernet();\n\t}", "public String getNetwork() {\n String[] ipOctets = ipAddress.split(\"\\\\.\");\n String[] subnetOctets = ...
[ "0.581713", "0.55415773", "0.5301225", "0.5198548", "0.51398003", "0.5120318", "0.50753754", "0.50626206", "0.5041685", "0.5012014", "0.5002051", "0.50014734", "0.5000231", "0.49682802", "0.49265686", "0.49250263", "0.49085793", "0.4907025", "0.49035227", "0.4903386", "0.4886...
0.4540603
95
Chiseled Red Rock > Red Rock Bricks
private void addCrusherRedRockRecipes(Consumer<IFinishedRecipe> consumer, String basePath) { crushing(consumer, BYGBlocks.CHISELED_RED_ROCK_BRICKS, BYGBlocks.RED_ROCK_BRICKS, basePath + "chiseled_to_brick"); crushing(consumer, BYGBlocks.CHISELED_RED_ROCK_BRICK_SLAB, BYGBlocks.RED_ROCK_BRICK_SLAB, basePath + "chiseled_slabs_to_brick_slabs"); crushing(consumer, BYGBlocks.CHISELED_RED_ROCK_BRICK_STAIRS, BYGBlocks.RED_ROCK_BRICK_STAIRS, basePath + "chiseled_stairs_to_brick_stairs"); crushing(consumer, BYGBlocks.CHISELED_RED_ROCK_BRICK_WALL, BYGBlocks.RED_ROCK_BRICK_WALL, basePath + "chiseled_walls_to_brick_walls"); //Red Rock Bricks -> Cracked Red Rock Bricks crushing(consumer, BYGBlocks.RED_ROCK_BRICKS, BYGBlocks.CRACKED_RED_ROCK_BRICKS, basePath + "bricks_to_cracked_bricks"); crushing(consumer, BYGBlocks.RED_ROCK_BRICK_SLAB, BYGBlocks.CRACKED_RED_ROCK_BRICK_SLAB, basePath + "brick_slabs_to_cracked_brick_slabs"); crushing(consumer, BYGBlocks.RED_ROCK_BRICK_STAIRS, BYGBlocks.CRACKED_RED_ROCK_BRICK_STAIRS, basePath + "brick_stairs_to_cracked_brick_stairs"); crushing(consumer, BYGBlocks.RED_ROCK_BRICK_WALL, BYGBlocks.CRACKED_RED_ROCK_BRICK_WALL, basePath + "brick_walls_to_cracked_brick_walls"); //Cracked Red Rock Bricks -> Red Rock crushing(consumer, BYGBlocks.CRACKED_RED_ROCK_BRICKS, BYGBlocks.RED_ROCK, basePath + "from_cracked_bricks"); crushing(consumer, BYGBlocks.CRACKED_RED_ROCK_BRICK_SLAB, BYGBlocks.RED_ROCK_SLAB, basePath + "brick_slabs_to_slabs"); crushing(consumer, BYGBlocks.CRACKED_RED_ROCK_BRICK_STAIRS, BYGBlocks.RED_ROCK_STAIRS, basePath + "brick_stairs_to_stairs"); crushing(consumer, BYGBlocks.CRACKED_RED_ROCK_BRICK_WALL, BYGBlocks.RED_ROCK_WALL, basePath + "brick_walls_to_walls"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void RockPaper(){\n\n\t\t// Store user choice as generated option\n\t\tint userNum = getRandomNum();\n\t\t\n\t\t// Store computer choice as generated option\n\t\tint compNum = getRandomNum();\n\t\t\n\t\t// Determine which option was selected for user\n\t\tString userOption = whichRPS(userNum);\n\t\t\...
[ "0.64994526", "0.6449192", "0.6286947", "0.62286055", "0.60585517", "0.60495675", "0.6019378", "0.600806", "0.5990636", "0.59594995", "0.5924873", "0.5921251", "0.58642423", "0.58295554", "0.58203346", "0.57619166", "0.57612073", "0.5760881", "0.5736251", "0.57134527", "0.570...
0.0
-1
Scoria > Scoria Cobblestone
private void addCrusherScoriaRecipes(Consumer<IFinishedRecipe> consumer, String basePath) { crushing(consumer, BYGBlocks.SCORIA_STONE, BYGBlocks.SCORIA_COBBLESTONE, basePath + "to_cobblestone"); crushing(consumer, BYGBlocks.SCORIA_SLAB, BYGBlocks.SCORIA_COBBLESTONE_SLAB, basePath + "slabs_to_cobblestone_slabs"); crushing(consumer, BYGBlocks.SCORIA_STAIRS, BYGBlocks.SCORIA_COBBLESTONE_STAIRS, basePath + "stairs_to_cobblestone_stairs"); crushing(consumer, BYGBlocks.SCORIA_WALL, BYGBlocks.SCORIA_COBBLESTONE_WALL, basePath + "walls_to_cobblestone_walls"); //Scoria Stone Bricks -> Cracked Scoria Stone Bricks crushing(consumer, BYGBlocks.SCORIA_STONEBRICKS, BYGBlocks.CRACKED_SCORIA_STONE_BRICKS, basePath + "bricks_to_cracked_bricks"); //Cracked Scoria Stone Bricks -> Scoria crushing(consumer, BYGBlocks.CRACKED_SCORIA_STONE_BRICKS, BYGBlocks.SCORIA_STONE, basePath + "from_cracked_bricks"); //Scoria Stone Bricks -> Scoria crushing(consumer, BYGBlocks.SCORIA_STONEBRICK_SLAB, BYGBlocks.SCORIA_SLAB, basePath + "brick_slabs_to_slabs"); crushing(consumer, BYGBlocks.SCORIA_STONEBRICK_STAIRS, BYGBlocks.SCORIA_STAIRS, basePath + "brick_stairs_to_stairs"); crushing(consumer, BYGBlocks.SCORIA_STONEBRICK_WALL, BYGBlocks.SCORIA_WALL, basePath + "brick_walls_to_walls"); //Scoria Pillar -> Scoria ItemStackToItemStackRecipeBuilder.crushing( ItemStackIngredient.from(BYGBlocks.SCORIA_PILLAR), new ItemStack(BYGBlocks.SCORIA_STONE, 2) ).addCondition(modLoaded) .build(consumer, Mekanism.rl(basePath + "from_pillar")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String elaboraAvvisoScrittura() {\n String testo = VUOTA;\n\n if (usaHeadNonScrivere) {\n testo += TAG_NON_SCRIVERE;\n testo += A_CAPO;\n }// end of if cycle\n\n return testo;\n }", "public void crown();", "public void snare();", "public int genera...
[ "0.59819466", "0.57778907", "0.57425445", "0.57331514", "0.5733135", "0.5714119", "0.56898665", "0.56549925", "0.564867", "0.5641167", "0.5575774", "0.55614656", "0.5533676", "0.55289215", "0.5519525", "0.55162615", "0.5505293", "0.5484569", "0.5467256", "0.5456026", "0.54543...
0.0
-1
Polished Soapstone > Soapstone
private void addCrusherSoapstoneRecipes(Consumer<IFinishedRecipe> consumer, String basePath) { crushing(consumer, BYGBlocks.POLISHED_SOAPSTONE, BYGBlocks.SOAPSTONE, basePath + "from_polished"); crushing(consumer, BYGBlocks.POLISHED_SOAPSTONE_SLAB, BYGBlocks.SOAPSTONE_SLAB, basePath + "polished_slabs_to_slabs"); crushing(consumer, BYGBlocks.POLISHED_SOAPSTONE_STAIRS, BYGBlocks.SOAPSTONE_STAIRS, basePath + "polished_stairs_to_stairs"); crushing(consumer, BYGBlocks.POLISHED_SOAPSTONE_WALL, BYGBlocks.SOAPSTONE_WALL, basePath + "polished_walls_to_walls"); //Soapstone Bricks -> Polished Soapstone crushing(consumer, BYGBlocks.SOAPSTONE_BRICKS, BYGBlocks.POLISHED_SOAPSTONE, basePath + "brick_to_polished"); crushing(consumer, BYGBlocks.SOAPSTONE_BRICK_SLAB, BYGBlocks.POLISHED_SOAPSTONE_SLAB, basePath + "brick_slabs_to_polished_slabs"); crushing(consumer, BYGBlocks.SOAPSTONE_BRICK_STAIRS, BYGBlocks.POLISHED_SOAPSTONE_STAIRS, basePath + "brick_stairs_to_polished_stairs"); crushing(consumer, BYGBlocks.SOAPSTONE_BRICK_WALL, BYGBlocks.POLISHED_SOAPSTONE_WALL, basePath + "brick_walls_to_polished_walls"); //Soapstone Tile -> Soapstone Bricks crushing(consumer, BYGBlocks.SOAPSTONE_TILE, BYGBlocks.SOAPSTONE_BRICKS, basePath + "tile_to_brick"); crushing(consumer, BYGBlocks.SOAPSTONE_TILE_SLAB, BYGBlocks.SOAPSTONE_BRICK_SLAB, basePath + "tile_slabs_to_brick_slabs"); crushing(consumer, BYGBlocks.SOAPSTONE_TILE_STAIRS, BYGBlocks.SOAPSTONE_BRICK_STAIRS, basePath + "tile_stairs_to_brick_stairs"); crushing(consumer, BYGBlocks.SOAPSTONE_TILE_WALL, BYGBlocks.SOAPSTONE_BRICK_WALL, basePath + "tile_walls_to_brick_walls"); //Soapstone Pillar -> Soapstone ItemStackToItemStackRecipeBuilder.crushing( ItemStackIngredient.from(BYGBlocks.SOAPSTONE_PILLAR), new ItemStack(BYGBlocks.SOAPSTONE, 2) ).addCondition(modLoaded) .build(consumer, Mekanism.rl(basePath + "from_pillar")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@WebService(targetNamespace = \"http://www.pm.company.com/service/Pawel/\", name = \"Pawel\")\n@XmlSeeAlso({com.company.pm.schema.pawelschema.ObjectFactory.class})\n@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)\npublic interface Pawel {\n\n @WebResult(name = \"firstOperationResponse\", targetNa...
[ "0.60026264", "0.5812943", "0.57872194", "0.5784665", "0.5739505", "0.5725137", "0.56280893", "0.5586742", "0.55749834", "0.5572355", "0.5568869", "0.5553938", "0.552809", "0.5510168", "0.5505918", "0.5469511", "0.5455862", "0.53431755", "0.5319268", "0.5319185", "0.53036624"...
0.0
-1
Polished Travertine > Travertine
private void addCrusherTravertineRecipes(Consumer<IFinishedRecipe> consumer, String basePath) { crushing(consumer, BYGBlocks.POLISHED_TRAVERTINE, BYGBlocks.TRAVERTINE, basePath + "from_polished"); crushing(consumer, BYGBlocks.POLISHED_TRAVERTINE_SLAB, BYGBlocks.TRAVERTINE_SLAB, basePath + "polished_slabs_to_slabs"); crushing(consumer, BYGBlocks.POLISHED_TRAVERTINE_STAIRS, BYGBlocks.TRAVERTINE_STAIRS, basePath + "polished_stairs_to_stairs"); crushing(consumer, BYGBlocks.POLISHED_TRAVERTINE_WALL, BYGBlocks.TRAVERTINE_WALL, basePath + "polished_walls_to_walls"); //Chiseled Travertine -> Polished Travertine crushing(consumer, BYGBlocks.CHISELED_TRAVERTINE, BYGBlocks.POLISHED_TRAVERTINE, basePath + "chiseled_to_polished"); crushing(consumer, BYGBlocks.CHISELED_TRAVERTINE_SLAB, BYGBlocks.POLISHED_TRAVERTINE_SLAB, basePath + "chiseled_slabs_to_polished_slabs"); crushing(consumer, BYGBlocks.CHISELED_TRAVERTINE_STAIRS, BYGBlocks.POLISHED_TRAVERTINE_STAIRS, basePath + "chiseled_stairs_to_polished_stairs"); crushing(consumer, BYGBlocks.CHISELED_TRAVERTINE_WALL, BYGBlocks.POLISHED_TRAVERTINE_WALL, basePath + "chiseled_walls_to_polished_walls"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Town getTraleeName1() {\n\t\treturn new Town(\"Tralee Town Park \");\r\n\t}", "@Override\r\n\tpublic Town getTraleeLocation() {\n\t\treturn new Town(\" Ashe Memorial Hall \");\r\n\t}", "public Town getTraleeLocation1() {\n\t\treturn new Town(\"Town Park Denny Street\");\r\n\t}", "public void travaille...
[ "0.5799824", "0.5727638", "0.556806", "0.5491105", "0.54695344", "0.5459239", "0.5336702", "0.5233705", "0.5133639", "0.5128581", "0.5123076", "0.51153946", "0.5107756", "0.5083977", "0.50755316", "0.5054883", "0.5038561", "0.50220734", "0.50214815", "0.5015532", "0.5002996",...
0.0
-1
Dacite Bricks > Dacite Tile
private void addDaciteEnrichingRecipes(Consumer<IFinishedRecipe> consumer, String basePath) { enriching(consumer, BYGBlocks.DACITE_BRICKS, BYGBlocks.DACITE_TILE, basePath + "brick_to_tile"); enriching(consumer, BYGBlocks.DACITE_BRICK_SLAB, BYGBlocks.DACITE_TILE_SLAB, basePath + "brick_slabs_to_tile_slabs"); enriching(consumer, BYGBlocks.DACITE_BRICK_STAIRS, BYGBlocks.DACITE_TILE_STAIRS, basePath + "brick_stairs_to_tile_stairs"); enriching(consumer, BYGBlocks.DACITE_BRICK_WALL, BYGBlocks.DACITE_TILE_WALL, basePath + "brick_walls_to_tile_walls"); //Dacite -> Dacite Bricks enriching(consumer, BYGBlocks.DACITE, BYGBlocks.DACITE_BRICKS, basePath + "to_brick"); enriching(consumer, BYGBlocks.DACITE_SLAB, BYGBlocks.DACITE_BRICK_SLAB, basePath + "slabs_to_brick_slabs"); enriching(consumer, BYGBlocks.DACITE_STAIRS, BYGBlocks.DACITE_BRICK_STAIRS, basePath + "stairs_to_brick_stairs"); enriching(consumer, BYGBlocks.DACITE_WALL, BYGBlocks.DACITE_BRICK_WALL, basePath + "walls_to_brick_walls"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void getTile_B8();", "void buildDome(Tile t);", "public void drawTile() {\n\n }", "@Override\n public void drawTile(GraphicsContext gc, double dx, double dy) {\n gc.drawImage(tile, dx, dy, 64, 64);\n }", "public DoorTile(int x, int y) {\r\n\t\tsuper(\"resources/door.gif\", x, y);\r\n...
[ "0.69060636", "0.6695229", "0.66472554", "0.64309007", "0.64004105", "0.62514263", "0.6215604", "0.61773294", "0.607383", "0.6073313", "0.60399264", "0.6034734", "0.59952646", "0.58931684", "0.5877862", "0.5875881", "0.58513045", "0.5848498", "0.57871807", "0.577733", "0.5772...
0.0
-1
Ether > Carved Ether
private void addEtherEnrichingRecipes(Consumer<IFinishedRecipe> consumer, String basePath) { enriching(consumer, BYGBlocks.ETHER_STONE, BYGBlocks.CARVED_ETHER_STONE, basePath + "to_carved"); enriching(consumer, BYGBlocks.ETHER_STONE_SLAB, BYGBlocks.CARVED_ETHER_STONE_SLAB, basePath + "slabs_to_carved_slabs"); enriching(consumer, BYGBlocks.ETHER_STONE_STAIRS, BYGBlocks.CARVED_ETHER_STONE_STAIRS, basePath + "stairs_to_carved_stairs"); enriching(consumer, BYGBlocks.ETHER_STONE_WALL, BYGBlocks.CARVED_ETHER_STONE_WALL, basePath + "walls_to_carved_walls"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void testEtherNet() {\n\t\tSystem.out.println(\"ethernet test success\");\n\t\t\n\t}", "@Override\n\tpublic void testEtherNet() {\n\t\tieWebDriver.checkEthernet();\n\t}", "public double getETH() \n\t{\n\t\treturn ether;\n\t}", "public EtherTypeEnum getEtherType() {\n return etherType;\...
[ "0.6917732", "0.6781821", "0.62117547", "0.617636", "0.5445733", "0.5356768", "0.53403383", "0.5309913", "0.52422804", "0.5194195", "0.517575", "0.5146267", "0.5140146", "0.51177436", "0.5105806", "0.5099469", "0.50959814", "0.5092201", "0.50774103", "0.5076857", "0.50765765"...
0.0
-1
Red Rock > Cracked Red Rock Bricks
private void addRedRockEnrichingRecipes(Consumer<IFinishedRecipe> consumer, String basePath) { enriching(consumer, BYGBlocks.RED_ROCK, BYGBlocks.CRACKED_RED_ROCK_BRICKS, basePath + "to_cracked_bricks"); enriching(consumer, BYGBlocks.RED_ROCK_SLAB, BYGBlocks.CRACKED_RED_ROCK_BRICK_SLAB, basePath + "slabs_to_brick_slabs"); enriching(consumer, BYGBlocks.RED_ROCK_STAIRS, BYGBlocks.CRACKED_RED_ROCK_BRICK_STAIRS, basePath + "stairs_to_brick_stairs"); enriching(consumer, BYGBlocks.RED_ROCK_WALL, BYGBlocks.CRACKED_RED_ROCK_BRICK_WALL, basePath + "walls_to_brick_walls"); //Cracked Red Rock Bricks -> Red Rock Bricks enriching(consumer, BYGBlocks.CRACKED_RED_ROCK_BRICKS, BYGBlocks.RED_ROCK_BRICKS, basePath + "cracked_bricks_to_bricks"); enriching(consumer, BYGBlocks.CRACKED_RED_ROCK_BRICK_SLAB, BYGBlocks.RED_ROCK_BRICK_SLAB, basePath + "cracked_brick_slabs_to_brick_slabs"); enriching(consumer, BYGBlocks.CRACKED_RED_ROCK_BRICK_STAIRS, BYGBlocks.RED_ROCK_BRICK_STAIRS, basePath + "cracked_brick_stairs_to_brick_stairs"); enriching(consumer, BYGBlocks.CRACKED_RED_ROCK_BRICK_WALL, BYGBlocks.RED_ROCK_BRICK_WALL, basePath + "cracked_brick_walls_to_brick_walls"); //Red Rock Bricks -> Chiseled Red Rock enriching(consumer, BYGBlocks.RED_ROCK_BRICKS, BYGBlocks.CHISELED_RED_ROCK_BRICKS, basePath + "brick_to_chiseled"); enriching(consumer, BYGBlocks.RED_ROCK_BRICK_SLAB, BYGBlocks.CHISELED_RED_ROCK_BRICK_SLAB, basePath + "brick_slabs_to_chiseled_slabs"); enriching(consumer, BYGBlocks.RED_ROCK_BRICK_STAIRS, BYGBlocks.CHISELED_RED_ROCK_BRICK_STAIRS, basePath + "brick_stairs_to_chiseled_stairs"); enriching(consumer, BYGBlocks.RED_ROCK_BRICK_WALL, BYGBlocks.CHISELED_RED_ROCK_BRICK_WALL, basePath + "brick_walls_to_chiseled_walls"); //Mossy Red Rock Bricks -> Red Rock Bricks enriching(consumer, BYGBlocks.MOSSY_RED_ROCK_BRICKS, BYGBlocks.RED_ROCK_BRICKS, basePath + "chiseled_to_brick"); enriching(consumer, BYGBlocks.MOSSY_RED_ROCK_BRICK_SLAB, BYGBlocks.RED_ROCK_BRICK_SLAB, basePath + "chiseled_slabs_to_brick_slabs"); enriching(consumer, BYGBlocks.MOSSY_RED_ROCK_BRICK_STAIRS, BYGBlocks.RED_ROCK_BRICK_STAIRS, basePath + "chiseled_stairs_to_brick_stairs"); enriching(consumer, BYGBlocks.MOSSY_RED_ROCK_BRICK_WALL, BYGBlocks.RED_ROCK_BRICK_WALL, basePath + "chiseled_walls_to_brick_walls"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void RockPaper(){\n\n\t\t// Store user choice as generated option\n\t\tint userNum = getRandomNum();\n\t\t\n\t\t// Store computer choice as generated option\n\t\tint compNum = getRandomNum();\n\t\t\n\t\t// Determine which option was selected for user\n\t\tString userOption = whichRPS(userNum);\n\t\t\...
[ "0.6431313", "0.6248249", "0.60790646", "0.60714656", "0.60220397", "0.59453017", "0.59378207", "0.59368956", "0.5925694", "0.5888489", "0.58852965", "0.58789617", "0.58748466", "0.58670473", "0.5823574", "0.58124965", "0.5812487", "0.57445204", "0.5690223", "0.5680433", "0.5...
0.0
-1
Cracked Scoria Stone Bricks > Scoria Stone Bricks
private void addScoriaEnrichingRecipes(Consumer<IFinishedRecipe> consumer, String basePath) { enriching(consumer, BYGBlocks.CRACKED_SCORIA_STONE_BRICKS, BYGBlocks.SCORIA_STONEBRICKS, basePath + "cracked_bricks_to_bricks"); //Scoria -> Cracked Scoria Stone Bricks enriching(consumer, BYGBlocks.SCORIA_STONE, BYGBlocks.CRACKED_SCORIA_STONE_BRICKS, basePath + "to_cracked_bricks"); //Scoria -> Scoria Stone Bricks enriching(consumer, BYGBlocks.SCORIA_SLAB, BYGBlocks.SCORIA_STONEBRICK_SLAB, basePath + "slabs_to_brick_slabs"); enriching(consumer, BYGBlocks.SCORIA_STAIRS, BYGBlocks.SCORIA_STONEBRICK_STAIRS, basePath + "stairs_to_brick_stairs"); enriching(consumer, BYGBlocks.SCORIA_WALL, BYGBlocks.SCORIA_STONEBRICK_WALL, basePath + "walls_to_brick_walls"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void makeTrips() {\n int highestThree, firstKicker, secondKicker;\n highestThree = firstKicker = secondKicker = -1;\n for (Integer key : this.cardOccurrence.keySet()) {\n int value = this.cardOccurrence.get(key);\n if(value == 3 && value > highestThree)\n ...
[ "0.55133796", "0.5504394", "0.5354723", "0.5274361", "0.5260525", "0.52338076", "0.51907736", "0.51876795", "0.5183269", "0.51794976", "0.5175886", "0.5158824", "0.5147351", "0.5131937", "0.5125447", "0.51251745", "0.51196736", "0.51122344", "0.5106124", "0.5094933", "0.50799...
0.0
-1
Soapstone > Polished Soapstone
private void addSoapstoneEnrichingRecipes(Consumer<IFinishedRecipe> consumer, String basePath) { enriching(consumer, BYGBlocks.SOAPSTONE, BYGBlocks.POLISHED_SOAPSTONE, basePath + "to_polished"); enriching(consumer, BYGBlocks.SOAPSTONE_SLAB, BYGBlocks.POLISHED_SOAPSTONE_SLAB, basePath + "slabs_to_polished_slabs"); enriching(consumer, BYGBlocks.SOAPSTONE_STAIRS, BYGBlocks.POLISHED_SOAPSTONE_STAIRS, basePath + "stairs_to_polished_stairs"); enriching(consumer, BYGBlocks.SOAPSTONE_WALL, BYGBlocks.POLISHED_SOAPSTONE_WALL, basePath + "walls_to_polished_walls"); //Polished Soapstone -> Soapstone Bricks enriching(consumer, BYGBlocks.POLISHED_SOAPSTONE, BYGBlocks.SOAPSTONE_BRICKS, basePath + "polished_to_brick"); enriching(consumer, BYGBlocks.POLISHED_SOAPSTONE_SLAB, BYGBlocks.SOAPSTONE_BRICK_SLAB, basePath + "polished_slabs_to_brick_slabs"); enriching(consumer, BYGBlocks.POLISHED_SOAPSTONE_STAIRS, BYGBlocks.SOAPSTONE_BRICK_STAIRS, basePath + "polished_stairs_to_brick_stairs"); enriching(consumer, BYGBlocks.POLISHED_SOAPSTONE_WALL, BYGBlocks.SOAPSTONE_BRICK_WALL, basePath + "polished_walls_to_brick_walls"); //Soapstone Bricks -> Soapstone Tile enriching(consumer, BYGBlocks.SOAPSTONE_BRICKS, BYGBlocks.SOAPSTONE_TILE, basePath + "brick_to_tile"); enriching(consumer, BYGBlocks.SOAPSTONE_BRICK_SLAB, BYGBlocks.SOAPSTONE_TILE_SLAB, basePath + "brick_slabs_to_tile_slabs"); enriching(consumer, BYGBlocks.SOAPSTONE_BRICK_STAIRS, BYGBlocks.SOAPSTONE_TILE_STAIRS, basePath + "brick_stairs_to_tile_stairs"); enriching(consumer, BYGBlocks.SOAPSTONE_BRICK_WALL, BYGBlocks.SOAPSTONE_TILE_WALL, basePath + "brick_walls_to_tile_walls"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@WebService(targetNamespace = \"http://www.pm.company.com/service/Pawel/\", name = \"Pawel\")\n@XmlSeeAlso({com.company.pm.schema.pawelschema.ObjectFactory.class})\n@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)\npublic interface Pawel {\n\n @WebResult(name = \"firstOperationResponse\", targetNa...
[ "0.6352457", "0.6119654", "0.6070957", "0.6064693", "0.6048085", "0.59889305", "0.5978167", "0.5948555", "0.593917", "0.593866", "0.57920384", "0.5756829", "0.57539403", "0.57512814", "0.5730651", "0.57162714", "0.5695596", "0.56648624", "0.5627474", "0.5621887", "0.56146777"...
0.0
-1
Travertine > Polished Travertine
private void addTravertineEnrichingRecipes(Consumer<IFinishedRecipe> consumer, String basePath) { enriching(consumer, BYGBlocks.TRAVERTINE, BYGBlocks.POLISHED_TRAVERTINE, basePath + "to_polished"); enriching(consumer, BYGBlocks.TRAVERTINE_SLAB, BYGBlocks.POLISHED_TRAVERTINE_SLAB, basePath + "slabs_to_polished_slabs"); enriching(consumer, BYGBlocks.TRAVERTINE_STAIRS, BYGBlocks.POLISHED_TRAVERTINE_STAIRS, basePath + "stairs_to_polished_stairs"); enriching(consumer, BYGBlocks.TRAVERTINE_WALL, BYGBlocks.POLISHED_TRAVERTINE_WALL, basePath + "walls_to_polished_walls"); //Polished Travertine -> Chiseled Travertine enriching(consumer, BYGBlocks.POLISHED_TRAVERTINE, BYGBlocks.CHISELED_TRAVERTINE, basePath + "polished_to_chiseled"); enriching(consumer, BYGBlocks.POLISHED_TRAVERTINE_SLAB, BYGBlocks.CHISELED_TRAVERTINE_SLAB, basePath + "polished_slabs_to_chiseled_slabs"); enriching(consumer, BYGBlocks.POLISHED_TRAVERTINE_STAIRS, BYGBlocks.CHISELED_TRAVERTINE_STAIRS, basePath + "polished_stairs_to_chiseled_stairs"); enriching(consumer, BYGBlocks.POLISHED_TRAVERTINE_WALL, BYGBlocks.CHISELED_TRAVERTINE_WALL, basePath + "polished_walls_to_chiseled_walls"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic Town getTraleeLocation() {\n\t\treturn new Town(\" Ashe Memorial Hall \");\r\n\t}", "public Town getTraleeName1() {\n\t\treturn new Town(\"Tralee Town Park \");\r\n\t}", "public void travaille();", "public Town getTraleeDescription1() {\n\t\treturn new Town(\r\n\t\t\t\t\"A lovely park o...
[ "0.6046778", "0.5937211", "0.5920802", "0.58551544", "0.58011794", "0.57052386", "0.55756086", "0.54281855", "0.53738123", "0.5289685", "0.5287517", "0.52129024", "0.51706654", "0.50712913", "0.5026157", "0.5009719", "0.5003892", "0.49813533", "0.49671668", "0.49634212", "0.4...
0.5106303
13
TODO Autogenerated method stub
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); response.setContentType("text/html"); String id=request.getParameter("id"); String name=request.getParameter("name"); String department=request.getParameter("department"); try { Class.forName("com.mysql.jdbc.Driver"); Connection conn = DriverManager.getConnection( "jdbc:mysql://localhost:3306/db1?useTimezone=true&serverTimezone=UTC", "root", "1234"); PreparedStatement stmt = conn.prepareStatement("insert into student(id, name, department) values (?,?,?)"); stmt.setString(1, id); stmt.setString(2, name); stmt.setString(3,department); boolean success=stmt.execute(); if(success==false) { out.println("<p>"+"Successfully Added!"+"</p>"); out.println("</table>" +"<a href=\"Index\">"+"Return to Home"+ "</a>"+ "</body>" + "</html>"); } else { out.println(docType+"<font size=\"12px\" color=\"" + "red" + "\">" + fail +"</p>"); out.println("</table>" +"<a href=\"Index\">"+"Return to Home"+ "</a>"+ "</body>" + "</html>"); } } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } }
{ "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
Gets total number of documents
public int getNumberOfDocuments(IndexReader indexReader) { return indexReader.numDocs(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getDocumentCount();", "int getNumberOfDocuments();", "public int getDocumentCount() {\n return this.documentCount;\n }", "int numDocuments();", "public int size() {\n return documents.size();\n }", "public long documentCount() {\n return this.documentCount;\n }", "public int...
[ "0.85882103", "0.8478548", "0.80101854", "0.79187155", "0.7864782", "0.7754235", "0.774284", "0.7644629", "0.76043195", "0.74719036", "0.735685", "0.7348605", "0.72637963", "0.72637963", "0.723817", "0.71950257", "0.71492785", "0.7090078", "0.7089958", "0.707855", "0.7023128"...
0.69322425
22
Get the DocNo (external ID, can be any field, but here we usually will use url) of a document stored in the index by its internal id (here from 0 to maxNoOfDocs).
public String getDocno( IndexReader indexReader, String fieldName, int docid ) throws IOException { // One should consider reuse the fieldset if you need to read docnos for a lot of documents. Set<String> fieldset = new HashSet<>(); fieldset.add( fieldName ); Document d = indexReader.document( docid, fieldset ); return d.get( fieldName ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getDocNo() {\r\n return docNo;\r\n }", "public String getDocumentNo();", "public String getDocumentNo();", "public String getDocumentNo();", "public String getDocumentNo() {\n return documentNo;\n }", "String getDocumentNumber();", "public java.lang.String getDoc_No() ...
[ "0.7114483", "0.7018833", "0.7018833", "0.7018833", "0.69276696", "0.67915636", "0.6728314", "0.6709714", "0.6613938", "0.65409184", "0.65409184", "0.64639693", "0.6401181", "0.6382448", "0.6371561", "0.63174605", "0.6269029", "0.6259546", "0.6247458", "0.61670804", "0.609745...
0.7047225
1
Find a document in the index by its docno (external ID, can be any field, but here we usually will use url). Returns the internal ID (here from 0 to maxNoOfDocs) of the document; or 1 if not found.
public int findByDocno( IndexReader indexReader, String fieldName, String docno ) throws IOException { BytesRef term = new BytesRef( docno ); PostingsEnum posting = MultiFields.getTermDocsEnum( indexReader, fieldName, term, PostingsEnum.NONE ); if ( posting != null ) { int docid = posting.nextDoc(); if ( docid != PostingsEnum.NO_MORE_DOCS ) { return docid; } } return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getLuceneDocid(String docid) throws Exception {\n\n ScoreDoc[] hits;\n TopDocs topDocs;\n\n TopScoreDocCollector collector = TopScoreDocCollector.create(1);\n Query luceneDocidQuery = new TermQuery(new Term(idField, docid));\n\n docidSearcher.search(luceneDocidQuery, c...
[ "0.6329695", "0.5995308", "0.5969681", "0.5914593", "0.58898705", "0.5599241", "0.55802464", "0.55659294", "0.5544043", "0.54981536", "0.54455197", "0.5426094", "0.5420844", "0.54133713", "0.5411771", "0.5403298", "0.5392352", "0.5338002", "0.5336253", "0.5336253", "0.5336253...
0.70944047
0
One can retrieve a term's posting list from an index. The simplest form is documentfrequency posting list, where each entry in the list is a pair (only includes the documents containing that term). The entries are sorted by docids such that you can efficiently compare and merge multiple lists. This is an example for accessing a termdocumentfrequency posting list from a Lucene index.
public HashMap<Integer, Integer> readFreqPosting(IndexReader indexReader, String fieldName, String term) throws IOException { HashMap<Integer, Integer> listOfFreqSortedByDocID = new HashMap<>(); System.out.printf( "%-10s%-15s%-6s\n", "DOCID", "URL", "FREQ" );//Reads the posting list of the term in a specific index field. You need to encode the term into a BytesRef object, which is the internal representation of a term used by Lucene. PostingsEnum posting = MultiFields.getTermDocsEnum( indexReader, fieldName, new BytesRef( term ), PostingsEnum.FREQS ); if ( posting != null ) { // if the term does not appear in any document, the posting object may be null int docid; while ( ( docid = posting.nextDoc() ) != PostingsEnum.NO_MORE_DOCS ) {//Each time you call posting.nextDoc(), it moves the cursor of the posting list to the next position and returns the docid of the current entry (document). Note that this is an internal Lucene docid. It returns PostingsEnum.NO_MORE_DOCS if you have reached the end of the posting list. String url = getDocno( indexReader, "url", docid ); int freq = posting.freq(); // get the frequency of the term in the current document listOfFreqSortedByDocID.put(docid, freq); System.out.printf( "%-10d%-15s%-6d\n", docid, url, freq ); } } return listOfFreqSortedByDocID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static PostingList readPosting(FileChannel fc, int termId)\n\t\t\tthrows IOException {\n\t\t/*\n\t\t * TODO: Your code here\n\t\t */\n\t\tif (!posDict.containsKey(termId)) return null;\n\t\tfc.position(posDict.get(termId));\n\t\treturn index.readPosting(fc);\n\t}", "public ArrayList<Integer> readPosition...
[ "0.62640995", "0.62565243", "0.62461233", "0.6166919", "0.58175933", "0.5749325", "0.5686765", "0.56625134", "0.5589781", "0.5588006", "0.5557036", "0.55509317", "0.5489838", "0.54400134", "0.5409163", "0.5377146", "0.53661144", "0.5352232", "0.53510076", "0.53304195", "0.530...
0.72408766
0
This is an example of counting document field length in Lucene. Unfortunately, by the time I created the tutorial, Lucene does not store document length in its index. An acceptable but slow solution is that you calculate document length by yourself based on a document vector. In case your dataset is static and relatively small (such as just about or less than a few million documents), you can simply compute all documents' lengths after you've built an index and store them in an external file (it takes just 4MB to store 1 million docs' lengths as integers). At running time, you can load all the computed document lengths to avoid loading doc vector and computing length.
public ArrayList<Integer> readDocLength(IndexReader indexReader, String fieldName) throws IOException { Set<String> fieldset = new HashSet<>(); fieldset.add( "url" );//For printing out external ID ArrayList<Integer> listOfDocLengthSortedByDocID = new ArrayList<>(); // The following loop iteratively print the lengths of the documents in the index. System.out.printf( "%-10s%-15s%-10s\n", "DOCID", "URL", "Length" ); for ( int docid = 0; docid < indexReader.maxDoc(); docid++ ) { String url = indexReader.document( docid, fieldset ).get( "url" ); int doclen = 0; // Unfortunately, Lucene does not store document length in its index // (because its retrieval model does not rely on document length). // An acceptable but slow solution is that you calculate document length by yourself based on // document vector. In case your dataset is static and relatively small (such as about or less // than a few million documents), you can simply compute the document lengths and store them in // an external file (it takes just a few MB). At running time, you can load all the computed // document lengths to avoid loading doc vector and computing length. TermsEnum termsEnum = indexReader.getTermVector( docid, fieldName ).iterator(); while ( termsEnum.next() != null ) { doclen += termsEnum.totalTermFreq(); } listOfDocLengthSortedByDocID.add(doclen); System.out.printf( "%-10d%-15s%-10d\n", docid, url, doclen ); } return listOfDocLengthSortedByDocID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getDocumentCount();", "public long getDocLength(int doc) throws IOException {\n long docLength = 1;\n final LeafReader reader = this.context.reader();\n if (reader != null) {\n docLength = Long.parseLong(reader.document(doc).get(Constants.DOCUMENT_LENGTH));\n // docLength = reader.getNumer...
[ "0.6774625", "0.6607734", "0.6584917", "0.6523323", "0.64966655", "0.64891374", "0.6484653", "0.6376798", "0.6314538", "0.6216365", "0.609701", "0.6074375", "0.6061331", "0.60225713", "0.6007216", "0.5957262", "0.591838", "0.59022504", "0.59022504", "0.5884305", "0.5872043", ...
0.63606936
8
This is an example for accessing a termdocumentposition posting list from a Lucene index.
public ArrayList<Integer> readPositionPosting(IndexReader indexReader, String fieldName, String term) throws IOException { Set<String> fieldset = new HashSet<>(); fieldset.add( "url" );//For printing out external ID ArrayList<Integer> listOfPositionsSortedByDocID = new ArrayList<>(); // The following line reads the posting list of the term in a specific index field. You need to encode the term into a BytesRef object, which is the internal representation of a term used by Lucene. System.out.printf( "%-10s%-15s%-10s%-20s\n", "DOCID", "URL", "FREQ", "POSITIONS" ); PostingsEnum posting = MultiFields.getTermDocsEnum( indexReader, fieldName, new BytesRef( term ), PostingsEnum.POSITIONS ); if ( posting != null ) { // if the term does not appear in any document, the posting object may be null int docid; // Each time you call posting.nextDoc(), it moves the cursor of the posting list to the next position // and returns the docid of the current entry (document). Note that this is an internal Lucene docid. // It returns PostingsEnum.NO_MORE_DOCS if you have reached the end of the posting list. while ( ( docid = posting.nextDoc() ) != PostingsEnum.NO_MORE_DOCS ) { String url = indexReader.document( docid, fieldset ).get( "url" ); int freq = posting.freq(); // get the frequency of the term in the current document System.out.printf( "%-10d%-15s%-10d", docid, url, freq ); for ( int i = 0; i < freq; i++ ) { // Get the next occurrence position of the term in the current document. // Note that you need to make sure by yourself that you at most call this function freq() times. int position = posting.nextPosition(); listOfPositionsSortedByDocID.add(position); System.out.print( ( i > 0 ? "," : "" ) + position); } System.out.println(); } } return listOfPositionsSortedByDocID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static PostingList readPosting(FileChannel fc, int termId)\n\t\t\tthrows IOException {\n\t\t/*\n\t\t * TODO: Your code here\n\t\t */\n\t\tif (!posDict.containsKey(termId)) return null;\n\t\tfc.position(posDict.get(termId));\n\t\treturn index.readPosting(fc);\n\t}", "private static Positional_inverted_ind...
[ "0.5847897", "0.5739059", "0.570826", "0.5646757", "0.56427723", "0.5616837", "0.56124467", "0.56008613", "0.5538885", "0.55038244", "0.54840714", "0.5461626", "0.54248685", "0.5423569", "0.5394846", "0.53948206", "0.53872335", "0.53780544", "0.5366971", "0.5365912", "0.53567...
0.6808108
0
This is an example for accessing a stored document vector from a Lucene index.
public void readDocVector(IndexReader indexReader, String fieldName, int docid) throws IOException { Terms vector = indexReader.getTermVector( docid, fieldName ); // Read the document's document vector. // You need to use TermsEnum to iterate each entry of the document vector (in alphabetical order). System.out.printf( "%-20s%-10s%-20s\n", "TERM", "FREQ", "POSITIONS" ); TermsEnum terms = vector.iterator(); PostingsEnum positions = null; BytesRef term; while ( ( term = terms.next() ) != null ) { String termstr = term.utf8ToString(); // Get the text string of the term. long freq = terms.totalTermFreq(); // Get the frequency of the term in the document. System.out.printf( "%-20s%-10d", termstr, freq ); // Lucene's document vector can also provide the position of the terms // (in case you stored these information in the index). // Here you are getting a PostingsEnum that includes only one document entry, i.e., the current document. positions = terms.postings( positions, PostingsEnum.POSITIONS ); positions.nextDoc(); // you still need to move the cursor // now accessing the occurrence position of the terms by iteratively calling nextPosition() for ( int i = 0; i < freq; i++ ) { System.out.print( ( i > 0 ? "," : "" ) + positions.nextPosition() ); } System.out.println(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface InvertedIndex extends Serializable {\n\n\n /**\n * Sampling for creating mini batches\n * @return the sampling for mini batches\n */\n double sample();\n\n /**\n * Iterates over mini batches\n * @return the mini batches created by this vectorizer\n */\n Iterator...
[ "0.63995624", "0.6301779", "0.6230134", "0.6209101", "0.6147687", "0.6088326", "0.59659624", "0.5898454", "0.5833379", "0.58317554", "0.5828512", "0.5801457", "0.57832396", "0.5746407", "0.57431006", "0.5698725", "0.5685405", "0.562873", "0.5613768", "0.5577159", "0.5555922",...
0.68739367
0
This is an example of accessing corpus statistics and corpuslevel term statistics.
public void readCorpusStats(IndexReader indexReader, String fieldName, String term) throws IOException { int N = indexReader.numDocs(); // the total number of documents in the index int n = indexReader.docFreq(new Term(fieldName, term)); // get the document frequency of the term in the "text" field double idf = Math.log((N + 1.0) / (n + 1.0)); // well, we normalize N and n by adding 1 to avoid n = 0 System.out.printf("%-30sN=%-10dn=%-10dIDF=%-8.2f\n", term, N, n, idf); long corpusTF = indexReader.totalTermFreq(new Term(fieldName, term)); // get the total frequency of the term in the "text" field long corpusLength = indexReader.getSumTotalTermFreq(fieldName); // get the total length of the "text" field double pwc = 1.0 * corpusTF / corpusLength; System.out.printf("%-30slen(corpus)=%-10dfreq(%s)=%-10dP(%s|corpus)=%-10.6f\n", term, corpusLength, term, corpusTF, term, pwc); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void printStatistics() throws IOException {\n\n\t\tSystem.out.println(\"*********************** \" + analyzer\n\t\t\t\t+ \" *********************************\");\n\n\t\tidxReader = DirectoryReader\n\t\t\t\t.open(FSDirectory.open(Paths.get(indexPath)));\n\n\t\tSystem.out.println(\"Total no. of document in t...
[ "0.6452998", "0.637105", "0.62902594", "0.61685824", "0.6026369", "0.5990102", "0.5980422", "0.59277534", "0.5909305", "0.5906592", "0.5808482", "0.5752357", "0.57519126", "0.57074213", "0.57060605", "0.5678121", "0.5670695", "0.56249386", "0.5601272", "0.5591633", "0.5563611...
0.6977307
0
In Lucene, we can store contents in an index document just let a database.
public void readStoredDocField(IndexReader indexReader, int numberOfDocs) throws IOException { // Let's just retrieve the docno (external ID) and title of the first 100 documents in the index // store the names of the fields you hope to access in the following set Set<String> fieldset = new HashSet<>(); fieldset.add( "url" ); fieldset.add( "body" ); // You can add more fields into the set as long as they have been stored at indexing time. // But for efficiency issues, you should only include the fields you are going to use. System.out.printf( "%-10s%-15s%-30s\n", "DOCID", "url", "body" ); // iteratively read and print out the first 100 documents' internal IDs, external IDs (DOCNOs), and titles. for ( int docid = 0; docid < indexReader.maxDoc() && docid < numberOfDocs; docid++ ) { // The following line retrieves a stored document representation from the index. // It will only retrieve the fields you included in the set. // There is also a method ixreader.document( docid ), which simply retrieves all the stored fields for a document. Document doc = indexReader.document( docid, fieldset ); // Now you can get the string data previously stored in the field of the document. // Again, you can only access the data field's value if you stored the value at index time. String url = doc.getField( "url" ).stringValue(); String body = doc.getField( "body" ).stringValue(); // You can also store other types of data (such as integers, floats, bytes, etc) in an indexed document. // You can access the data using methods such as field.numericValue(), field.binaryValue(), etc. System.out.printf( "%-10d%-15s%-30s\n", docid, url, body ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "LuceneMemoryIndex createLuceneMemoryIndex();", "private void addContentToLuceneDoc() {\n\t\t// Finish storing the document in the document store (parts of it may already have been\n\t\t// written because we write in chunks to save memory), retrieve the content id, and store\n\t\t// that in Lucene.\n\t\tint conte...
[ "0.7043672", "0.6848261", "0.6488515", "0.6444783", "0.6384091", "0.63141924", "0.6268676", "0.6229555", "0.61531407", "0.6127392", "0.604534", "0.6022807", "0.6021011", "0.600628", "0.5997569", "0.5995037", "0.5952742", "0.5921322", "0.5920003", "0.5919797", "0.58951443", ...
0.53133035
68