query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
FIND ALL FLIGHTS find all entities
List<Flight> findAllFlights();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<TransportEntity> getAllEntityOfQuery();", "List<WebCrawlerData> retrieveAllEntity();", "public List<Flight> fetchFlights() {\n\t\tSession session = SessionBuilder.buildSession();\n\t\tString query = \"from Flight\";\n\t\tQuery q = session.createQuery(query);\n\t\tList<Flight> flights = q.getResultList();\...
[ "0.58980507", "0.5739583", "0.569785", "0.5680651", "0.56668526", "0.56583345", "0.5645099", "0.55677867", "0.5564338", "0.5547493", "0.55358386", "0.5513301", "0.5511514", "0.5500344", "0.54248774", "0.54123205", "0.54122835", "0.54109806", "0.53888905", "0.53790176", "0.537...
0.58951986
1
Add steward to flight
Flight addStewardToFlight(Flight flight, Steward steward);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void insertFlightseat(AirFlightseat dRef);", "public void bookFlight(){\n //Steps\n //1 Show the available flights. (at least one seat with 0)\n //2 User select a flight, and the system automatically set the seat with his id. he is not able to select the seat\n //3 User confirm the re...
[ "0.60065764", "0.57747436", "0.5735861", "0.55893445", "0.5562254", "0.55509526", "0.5545575", "0.5520484", "0.5513133", "0.5509838", "0.548876", "0.5479571", "0.5445324", "0.5428199", "0.5397296", "0.53663546", "0.5345749", "0.53438556", "0.53407013", "0.5336883", "0.5307525...
0.8872268
0
Validate Flight parameters steward availibility, airplane availibility and time
boolean validateFlight(Flight flight);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void validate() throws FlightCreationException {\n validateNotNull(\"number\", number);\n validateNotNull(\"company name\", companyName);\n validateNotNull(\"aircraft\", aircraft);\n validateNotNull(\"pilot\", pilot);\n validateNotNull(\"origin\", origin);\n valida...
[ "0.68103987", "0.60651565", "0.56858623", "0.56714994", "0.56280434", "0.56141436", "0.5612667", "0.5560385", "0.551301", "0.5504334", "0.5491156", "0.5467965", "0.5459695", "0.5417644", "0.5407046", "0.5385279", "0.5381938", "0.5380206", "0.53660905", "0.53507614", "0.534377...
0.64929986
1
.appscode.kubernetes.v1beta2.Meta meta = 1;
boolean hasMeta();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "com.appscode.api.kubernetes.v1beta2.Meta getMeta();", "com.appscode.api.kubernetes.v1beta2.MetaOrBuilder getMetaOrBuilder();", "public Object getMeta() {\n return meta;\n }", "public void setMeta (boolean meta) {\n\tthis.meta = meta;\n }", "public void setMeta(org.thdl.lex.component.Meta meta);", ...
[ "0.840164", "0.77114445", "0.6447995", "0.6434399", "0.636537", "0.6283877", "0.6151779", "0.607437", "0.6063908", "0.6041019", "0.59978956", "0.59543705", "0.593035", "0.5923061", "0.58797395", "0.586517", "0.5833123", "0.5794263", "0.5772853", "0.5747371", "0.57468265", "...
0.5188533
76
.appscode.kubernetes.v1beta2.Meta meta = 1;
com.appscode.api.kubernetes.v1beta2.Meta getMeta();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "com.appscode.api.kubernetes.v1beta2.MetaOrBuilder getMetaOrBuilder();", "public Object getMeta() {\n return meta;\n }", "public void setMeta (boolean meta) {\n\tthis.meta = meta;\n }", "public void setMeta(org.thdl.lex.component.Meta meta);", "default @org.jetbrains.annotations.Nullable imports.k8s....
[ "0.77100915", "0.6446217", "0.64315665", "0.6363506", "0.6283592", "0.61509615", "0.6073143", "0.60623497", "0.60402894", "0.59977263", "0.59517795", "0.5928647", "0.59208447", "0.58776945", "0.58625346", "0.58303875", "0.5794218", "0.5771239", "0.5745612", "0.5744357", "0.57...
0.8400092
0
.appscode.kubernetes.v1beta2.Meta meta = 1;
com.appscode.api.kubernetes.v1beta2.MetaOrBuilder getMetaOrBuilder();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "com.appscode.api.kubernetes.v1beta2.Meta getMeta();", "public Object getMeta() {\n return meta;\n }", "public void setMeta (boolean meta) {\n\tthis.meta = meta;\n }", "public void setMeta(org.thdl.lex.component.Meta meta);", "default @org.jetbrains.annotations.Nullable imports.k8s.ObjectMeta getMeta...
[ "0.84015614", "0.6446532", "0.64301836", "0.6361175", "0.6284969", "0.61524224", "0.60744894", "0.60640615", "0.6040436", "0.59993744", "0.595063", "0.59297776", "0.59229", "0.5878918", "0.586408", "0.58311355", "0.57959616", "0.5769778", "0.57466024", "0.57450056", "0.573377...
0.77115244
1
repeated .appscode.kubernetes.v1beta2.Rule rules = 2;
java.util.List<com.appscode.api.kubernetes.v1beta2.Rule> getRulesList();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.util.List<? extends com.appscode.api.kubernetes.v1beta2.RuleOrBuilder> \n getRulesOrBuilderList();", "com.appscode.api.kubernetes.v1beta2.Rule getRules(int index);", "com.appscode.api.kubernetes.v1beta2.RuleOrBuilder getRulesOrBuilder(\n int index);", "public Rules getRules()\r\n {\r\n ret...
[ "0.6758241", "0.66073847", "0.6288047", "0.5882989", "0.58308566", "0.58160627", "0.56775767", "0.5629937", "0.5585979", "0.558538", "0.5547636", "0.5541968", "0.553581", "0.5533254", "0.55036545", "0.55036545", "0.55036545", "0.5481315", "0.54485416", "0.5419642", "0.5347619...
0.6324158
2
repeated .appscode.kubernetes.v1beta2.Rule rules = 2;
com.appscode.api.kubernetes.v1beta2.Rule getRules(int index);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.util.List<? extends com.appscode.api.kubernetes.v1beta2.RuleOrBuilder> \n getRulesOrBuilderList();", "java.util.List<com.appscode.api.kubernetes.v1beta2.Rule> \n getRulesList();", "com.appscode.api.kubernetes.v1beta2.RuleOrBuilder getRulesOrBuilder(\n int index);", "public Rules getRules(...
[ "0.6759394", "0.6326128", "0.62893647", "0.58856606", "0.58349943", "0.58201325", "0.5679799", "0.5631358", "0.55889016", "0.5586249", "0.5550243", "0.55422217", "0.5539352", "0.5535983", "0.5505566", "0.5505566", "0.5505566", "0.54821724", "0.54510593", "0.54220575", "0.5349...
0.66089016
1
repeated .appscode.kubernetes.v1beta2.Rule rules = 2;
int getRulesCount();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.util.List<? extends com.appscode.api.kubernetes.v1beta2.RuleOrBuilder> \n getRulesOrBuilderList();", "com.appscode.api.kubernetes.v1beta2.Rule getRules(int index);", "java.util.List<com.appscode.api.kubernetes.v1beta2.Rule> \n getRulesList();", "com.appscode.api.kubernetes.v1beta2.RuleOrBuilde...
[ "0.6761806", "0.66100097", "0.63280153", "0.6291458", "0.5889406", "0.5837983", "0.5822912", "0.56824654", "0.5633473", "0.55924577", "0.5551186", "0.55422986", "0.5541291", "0.5538316", "0.55086076", "0.55086076", "0.55086076", "0.5485106", "0.5454866", "0.5424918", "0.53517...
0.55871236
10
repeated .appscode.kubernetes.v1beta2.Rule rules = 2;
java.util.List<? extends com.appscode.api.kubernetes.v1beta2.RuleOrBuilder> getRulesOrBuilderList();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "com.appscode.api.kubernetes.v1beta2.Rule getRules(int index);", "java.util.List<com.appscode.api.kubernetes.v1beta2.Rule> \n getRulesList();", "com.appscode.api.kubernetes.v1beta2.RuleOrBuilder getRulesOrBuilder(\n int index);", "public Rules getRules()\r\n {\r\n return rules;\r\n }", "publi...
[ "0.66073847", "0.6324158", "0.6288047", "0.5882989", "0.58308566", "0.58160627", "0.56775767", "0.5629937", "0.5585979", "0.558538", "0.5547636", "0.5541968", "0.553581", "0.5533254", "0.55036545", "0.55036545", "0.55036545", "0.5481315", "0.54485416", "0.5419642", "0.5347619...
0.6758241
0
repeated .appscode.kubernetes.v1beta2.Rule rules = 2;
com.appscode.api.kubernetes.v1beta2.RuleOrBuilder getRulesOrBuilder( int index);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.util.List<? extends com.appscode.api.kubernetes.v1beta2.RuleOrBuilder> \n getRulesOrBuilderList();", "com.appscode.api.kubernetes.v1beta2.Rule getRules(int index);", "java.util.List<com.appscode.api.kubernetes.v1beta2.Rule> \n getRulesList();", "public Rules getRules()\r\n {\r\n return rul...
[ "0.6758241", "0.66073847", "0.6324158", "0.5882989", "0.58308566", "0.58160627", "0.56775767", "0.5629937", "0.5585979", "0.558538", "0.5547636", "0.5541968", "0.553581", "0.5533254", "0.55036545", "0.55036545", "0.55036545", "0.5481315", "0.54485416", "0.5419642", "0.5347619...
0.6288047
3
System.out.println("The fruit has grown!");
private void grow(){ berries.replaceAll((p, v) -> v + 1); apples.replaceAll((p, v) -> v + 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void eat(){\r\n System.out.println(\"Life Isn't Precious\");}", "public static void hello() {\n System.out.println(\"The coffee machine has:\\n\" +\n waterStock + \" of water\\n\" +\n milkStock + \" of milk\\n\" +\n coffeeBeansStock + \" of coffee bea...
[ "0.74794567", "0.7289995", "0.7145635", "0.7130762", "0.7112249", "0.7046853", "0.7033056", "0.70148575", "0.7006731", "0.69436455", "0.6899001", "0.68963724", "0.6873571", "0.68690366", "0.68643004", "0.6855284", "0.6854645", "0.68394834", "0.68291503", "0.682691", "0.682437...
0.0
-1
If a snake is within SNAKE_ATTACK_RANGE tiles of truman, it will hunt him down.
private boolean shouldSnakeSeekTruman(Point snake, int trux, int truy){ return (Math.abs(snake.x - trux) < SNAKE_ATTACK_RANGE && Math.abs(snake.y - truy) < SNAKE_ATTACK_RANGE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean tryAttack(Tile fromTile) {\r\n\t\tint size = getBoard().getTiles().length;\r\n\r\n\t\t// if attacker is on power-up tile\r\n\t\tif (fromTile.getTileType().equals(\"PowerUp\")) {\r\n\t\t\tif (fromTile.getPiece().getLEAGUE() == League.SHARK && fromTile.getTer().territoryName().equals(\"Shark\")) {\r\...
[ "0.64716566", "0.6229715", "0.61977965", "0.6124987", "0.6123417", "0.61195", "0.60738456", "0.6067385", "0.6058956", "0.60506517", "0.60373944", "0.59920955", "0.5984228", "0.59727776", "0.59462583", "0.59460056", "0.59346056", "0.5874751", "0.587433", "0.5872102", "0.585495...
0.6558092
0
Binary content data coding. The default value is (&x60;0&x60;) for GSM7. Example: (&x60;8&x60;) for Unicode data.
public Integer getDataCoding() { return dataCoding; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getEncoding() {\r\n return \"B\";\r\n }", "private void storeHeaderDataToByte() {\n\t\tString byteNumStr = String.format(\"%24s\",\n\t\t\t\tInteger.toBinaryString(encodedByte.length)).replace(' ',\n\t\t\t\t'0');\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(byteNumStr\n\t\t\t\...
[ "0.5862878", "0.5805442", "0.573985", "0.5736735", "0.5736735", "0.5736735", "0.5736735", "0.57291955", "0.5601688", "0.54967755", "0.5482488", "0.5457795", "0.54381704", "0.5430763", "0.5388963", "0.53576136", "0.5331874", "0.53302455", "0.5329283", "0.53191245", "0.5314022"...
0.53224444
19
Hexadecimal string. This is the representation of your binary data. Two hex digits represent one byte. They should be separated by the space character (Example: &x60;0f c2 4a bf 34 13 ba&x60;).
public String getHex() { return hex; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString() {\n return Util.bytesToHex(getByteArray());\n }", "private String hexify(byte bytes[]) {\n\n char[] hexDigits = {'0', '1', '2', '3', '4', '5', '6', '7',\n '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};\n\n StringBuilder buf = new StringBuilder(bytes.length ...
[ "0.67399853", "0.6658015", "0.6637555", "0.6591403", "0.654938", "0.6547397", "0.6538596", "0.65359914", "0.64754957", "0.6447616", "0.6371127", "0.63298565", "0.6286104", "0.62561166", "0.62071806", "0.6199627", "0.6189633", "0.6161902", "0.6153057", "0.61526644", "0.6149657...
0.6289131
12
Convert the given object to string with each line indented by 4 spaces (except the first line).
private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPA...
[ "0.7884939", "0.7549351", "0.74972624" ]
0.0
-1
fungsi untuk mengubah board ke string
public String convertBoardToString(){ String tmp= ""; for (int i=0; i<30; i++){ for (int j=0; j<80; j++){ if (board.getCharacter(j,i)==0){ tmp += '-'; } else { tmp += board.getCharacter(j,i); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getBoardString();", "String drawBoard();", "String getBoard();", "String displayMyBoard();", "public void drawBoard() {\n String[][] strBoard= new String[4][4];\n for(int x= 0; x<4; x++) {\n for(int y= 0; y<4; y++) {\n if(board[x][y]==0) {\n ...
[ "0.7321755", "0.67984915", "0.677307", "0.66825396", "0.64890915", "0.64670163", "0.63954437", "0.6357363", "0.6355943", "0.6337652", "0.631623", "0.6298542", "0.629096", "0.62777436", "0.6257378", "0.6251178", "0.62420046", "0.6238704", "0.62253994", "0.6205695", "0.61700034...
0.6362809
7
prosedur untuk menampilkan board ke layar
public void displayToScreen(){ System.out.println(convertBoardToString()); delay(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showBoard() {\n for (int i = 0; i < booleanBoard.length; i++) {\n for (int j = 0; j < booleanBoard.length; j++) {\n if (strBoard[i][j].equals(\"possible move\") || strBoard[i][j].equals(\"castling\")) {\n gA.getBoard()[i][j].setBackgroundResource(R.co...
[ "0.72060794", "0.7087646", "0.6987039", "0.6886608", "0.68652135", "0.6816263", "0.6811079", "0.6746709", "0.6643165", "0.6611248", "0.65996975", "0.6598536", "0.65755093", "0.65742624", "0.65522", "0.6532221", "0.64692664", "0.6461921", "0.64498705", "0.6444937", "0.64328325...
0.0
-1
prosedur untuk menyimpan display ke file
public void displayToFile(){ String data = ""; try{ FileWriter fstream = new FileWriter("output.txt", true); BufferedWriter out = new BufferedWriter(fstream); for (int i=0 ; i<40; i++) { for (int j=0; j<146 ;j++ ){ if (board.ge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void loadShow(File f) {\n \n }", "private void viewFileChooser() {\n try {\n JFileChooser chooser = new JFileChooser();\n chooser.showOpenDialog(null);\n f = chooser.getSelectedFile();\n// this.attachmentName = f.getName();\n// this.attachm...
[ "0.70695585", "0.70277697", "0.69791394", "0.69362324", "0.6858723", "0.67330796", "0.6684322", "0.66314495", "0.6608295", "0.6573775", "0.65235466", "0.6518369", "0.6508273", "0.649684", "0.6440556", "0.6424596", "0.6415781", "0.6403392", "0.6388428", "0.6365537", "0.6334392...
0.0
-1
int ret = 0;
public int videoStitching(int[][] clips, int t) { if (clips == null || clips.length == 0) return -1; if (t <= 0) return t < 0 ? -1 : 0; int n = clips.length; // int[] dp = new int[t + 1]; int maxEnd = 0; TreeMap<Integer, Integer> startPos = new TreeMap<>(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int return0() ;", "public int get_return(){\r\n return local_return;\r\n }", "int exitValue();", "public int result() {\n return 0;\n }", "public int getresult(){\n return result;}", "public int getReturnValue() {\n if (success)...
[ "0.8403072", "0.727131", "0.7147548", "0.7129657", "0.710408", "0.69162786", "0.6890128", "0.6889988", "0.6723391", "0.6699951", "0.6682897", "0.66500914", "0.66357076", "0.66156125", "0.6601039", "0.65983737", "0.65911335", "0.6564893", "0.652666", "0.6515095", "0.6508227", ...
0.0
-1
Convert from CMY color space to RGB color space
public static double[] cmyToRgb(double[] cmy) { assert(cmy != null && cmy.length == 3); double[] rgb = new double[3]; rgb[0] = (1-cmy[0]) * 255; rgb[1] = (1-cmy[1]) * 255; rgb[2] = (1-cmy[2]) * 255; return rgb; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract RGBIColor toRGBColor();", "static private int[] YCbCrtoRGB(int[] YCbCr) {\n int[] RGB = new int[3];\n\n float Y = (float) YCbCr[0];\n float CB = (float) YCbCr[1];\n float CR = (float) YCbCr[2];\n\n float R = (float) (Y + 1.402 * (CR - 128));\n float G = (...
[ "0.7616944", "0.7099386", "0.68859655", "0.66625154", "0.6479533", "0.64303076", "0.6382099", "0.63611907", "0.6294044", "0.6274821", "0.62351775", "0.61981386", "0.61393213", "0.60744804", "0.6057305", "0.6028522", "0.60034066", "0.59884006", "0.59776336", "0.5973182", "0.59...
0.6903662
2
Convert from HSV color space to RGB color space
public static double[] hsvToRgb(double[] hsv) { double h = hsv[0]; double s = hsv[1]; double v = hsv[2]; double r,g,b; if (s == 0) { r = v * 255; g = v * 255; b = v * 255; } else { double varH = h / 60; if ((int)varH == 6) { varH = 0; } int varI = (int)(varH); double var1 = v ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static double[] rgbToHsv(int rgb[]) {\n\t\tdouble temp[] = new double[3];\n\t\tdouble hsv[] = new double[3];\n\t\t\n\t\ttemp[0] = (double)rgb[0]/255;\n\t\ttemp[1] = (double)rgb[1]/255;\n\t\ttemp[2] = (double)rgb[2]/255;\n\t\t\n\t\tdouble max = Math.max(temp[0], Math.max(temp[1], temp[2]));\n\t\tdouble min =...
[ "0.73704934", "0.7099642", "0.7077565", "0.6938358", "0.69081855", "0.6859896", "0.6767003", "0.66153425", "0.65059745", "0.6475775", "0.64259535", "0.6364422", "0.63375443", "0.63205993", "0.62631077", "0.6238345", "0.6129053", "0.5969119", "0.5872557", "0.57994324", "0.5780...
0.778027
0
Convert an RGB array to an int value that represents RGB which can be used in BufferedImage setRGB() method
public static int rgbArrayToRgbInt(double[] array) { if (array == null) { return 0 ; } if (array.length != 3) { return 0; } return (255 & 0xFF) << 24 + ((int)array[0] & 0xFF) << 16 + ((int)array[1] & 0xFF) << 8 + ((int)array[2] & 0xFF); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int rgbArrayToRgbInt(int[] array) {\n\t\tif (array == null) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (array.length != 3) {\n\t\t\treturn 0;\n\t\t}\n\t\tdouble[] doubleArray = {array[0], array[1], array[2]};\n\t\treturn ColorConverter.rgbArrayToRgbInt(doubleArray);\n\t}", "int[] getStartRGB();", "public ...
[ "0.8086974", "0.6744437", "0.66964453", "0.6666481", "0.6512728", "0.65079445", "0.64741135", "0.64678127", "0.6463723", "0.6431115", "0.6426185", "0.63876903", "0.6336825", "0.628355", "0.62781", "0.6266843", "0.6265148", "0.621372", "0.6176449", "0.6170444", "0.61661685", ...
0.7770057
1
Convert an RGB int value to RGB array
public static double[] rgbIntToRgbArray(int rgb) { double[] rgbArray = new double[3]; rgbArray[0] = (rgb >> 16) & 0xFF; rgbArray[1] = (rgb >> 8) & 0xFF; rgbArray[2] = (rgb) & 0xFF; return rgbArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int[] hexToRgb(int value) {\r\n // int[] v = { (value / 65536), ((value - value / 65536 * 65536) / 256),\r\n // (value - value / 65536 * 65536 - (value - value / 65536 * 65536) /\r\n // 256 * 256), 0 };\r\n\r\n return new int[] { (value >> 16) & 0xFF, (value >> 8) & 0xFF, ...
[ "0.7462477", "0.71654934", "0.7095958", "0.7026143", "0.70001394", "0.69524354", "0.6770394", "0.65391684", "0.6521993", "0.6508968", "0.6486071", "0.6371465", "0.6371166", "0.63696754", "0.6349078", "0.63256216", "0.62597764", "0.6244847", "0.6238903", "0.6220685", "0.620587...
0.6710411
7
Convert an RGB array to an int value that represents RGB which can be used in BufferedImage setRGB() method
public static int rgbArrayToRgbInt(int[] array) { if (array == null) { return 0; } if (array.length != 3) { return 0; } double[] doubleArray = {array[0], array[1], array[2]}; return ColorConverter.rgbArrayToRgbInt(doubleArray); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int rgbArrayToRgbInt(double[] array) {\n\t\tif (array == null) {\n\t\t\treturn 0 ;\n\t\t}\n\t\tif (array.length != 3) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn (255 & 0xFF) << 24 +\n\t\t\t\t((int)array[0] & 0xFF) << 16 +\n\t\t\t\t((int)array[1] & 0xFF) << 8 +\n\t\t\t\t((int)array[2] & 0xFF);\n\t}", "in...
[ "0.7770907", "0.67422575", "0.6695676", "0.6665606", "0.65120995", "0.65079314", "0.647346", "0.6468218", "0.64622086", "0.6430217", "0.64245456", "0.6387409", "0.63352615", "0.6282497", "0.62779206", "0.6264637", "0.626284", "0.6212993", "0.61757356", "0.6170119", "0.6164967...
0.80884475
0
Convert from RGB color space to CMY color space
public static double[] rgbToCmy(double[] rgb) { assert(rgb != null && rgb.length == 3); double[] cmy = new double[3]; cmy[0] = 1 - (rgb[0] / 255); cmy[1] = 1 - (rgb[1] / 255); cmy[2] = 1 - (rgb[2] / 255); return cmy; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract RGBIColor toRGBColor();", "public static float[] rgb2cmyk(int rgb) {\r\n float r = (rgb >> 16) & 0xFF;\r\n float g = (rgb >> 8) & 0xFF;\r\n float b = rgb & 0xFF;\r\n float C = 1.0f - (r / 255);\r\n float M = 1.0f - (g / 255);\r\n float Y = 1.0f - (b / 255...
[ "0.7129924", "0.68627024", "0.6643241", "0.6607214", "0.65567124", "0.65268075", "0.65125126", "0.6481612", "0.6481612", "0.6474144", "0.63531506", "0.63375723", "0.63190895", "0.62859344", "0.61237675", "0.6092153", "0.60118127", "0.6003794", "0.58916944", "0.5787757", "0.57...
0.689081
1
Convert rgb color space to hsv color space h: degree s,v: percentage
public static double[] rgbToHsv(int rgb[]) { double temp[] = new double[3]; double hsv[] = new double[3]; temp[0] = (double)rgb[0]/255; temp[1] = (double)rgb[1]/255; temp[2] = (double)rgb[2]/255; double max = Math.max(temp[0], Math.max(temp[1], temp[2])); double min = Math.min(temp[0], Math.min(temp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static double[] hsvToRgb(double[] hsv) {\n\t\tdouble h = hsv[0];\n\t\tdouble s = hsv[1];\n\t\tdouble v = hsv[2];\n\t\tdouble r,g,b;\n\t\t\n\t\tif (s == 0) {\n\t\t\tr = v * 255;\n\t\t\tg = v * 255;\n\t\t\tb = v * 255;\n\t\t} else {\n\t\t\tdouble varH = h / 60;\n\t\t\tif ((int)varH == 6) {\n\t\t\t\tvarH = 0;\...
[ "0.6905241", "0.6846411", "0.68152815", "0.6618406", "0.6526629", "0.6507404", "0.64499885", "0.63663334", "0.61383796", "0.6113904", "0.6046668", "0.5965715", "0.5921343", "0.59153706", "0.5743641", "0.5712803", "0.5678187", "0.5646805", "0.56276023", "0.5548634", "0.5545582...
0.73325783
0
Convert from RGB color space to XYZ color space
public static double[] rgbToXyz(double[] rgb) { double r = rgb[0]/255; double g = rgb[0]/255; double b = rgb[0]/255; if (r > 0.04045) { r = Math.pow((r+0.055)/1.055, 2.4); } else { r = r/ 12.92; } if (g > 0.04045) { g = Math.pow((g+0.055)/1.055, 2.4); } else { g = g/ 12.92; } if (b > 0.0...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void toSpace( float[] rgb );", "protected abstract float[] getRgbLut();", "public abstract RGBIColor toRGBColor();", "static private int[] YCbCrtoRGB(int[] YCbCr) {\n int[] RGB = new int[3];\n\n float Y = (float) YCbCr[0];\n float CB = (float) YCbCr[1];\n float ...
[ "0.6855772", "0.61641574", "0.5870734", "0.5809777", "0.5767378", "0.57059187", "0.5689943", "0.55988324", "0.5544058", "0.552904", "0.55266494", "0.5521459", "0.5496563", "0.5389459", "0.53595716", "0.5274974", "0.52711785", "0.52501786", "0.523635", "0.52266693", "0.5226333...
0.7175052
0
/ Display a prompt for the player's next move (see examples)
public void showNextMovePrompt() { if(model.isXTurn()){ resultLabel.setText("X's Turn"); } else{ resultLabel.setText("O's Turn"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void displayConfirmMove(int direction) {\n\t\t \n\t\t switch(direction) {\n\t\t \n\t\t\t //enter case 1\n\t\t\t case 1:\tSystem.out.println(\"\\nYou've successfully moved to the next Room.\\n\");\n\t\t\t \t\t\tbreak;\n\t\t\t \t\t\t\n\t\t\t //enter case 2\n\t\t\t case 2:\tSystem.out.println(\"\\nYo...
[ "0.70453066", "0.69903094", "0.682807", "0.6685021", "0.6621955", "0.6611249", "0.63251746", "0.61592686", "0.6158325", "0.61457646", "0.6095878", "0.60689974", "0.6068644", "0.60647947", "0.60510075", "0.6049253", "0.6039178", "0.6034848", "0.60299665", "0.60195297", "0.6013...
0.7885591
0
/ Display an error if input is invalid (see examples)
public void showInputError() { resultLabel.setText("Choose another space!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void invalid() {\r\n\t\tSystem.out.println(\"Please enter a valid input\");\r\n\t}", "public static String invalidInput() {\n return \"Invalid input!\";\n }", "public static void printErrorForInvalidCommand(String userInput) {\n System.out.println(\"Aw man! I am unable to \" + userInput...
[ "0.7695867", "0.74156547", "0.7179793", "0.7164079", "0.7048511", "0.6959371", "0.69351494", "0.6901", "0.68647707", "0.6857352", "0.68289316", "0.6816304", "0.6816304", "0.6750743", "0.6691428", "0.6662059", "0.6635057", "0.6634648", "0.66161567", "0.6592291", "0.6591387", ...
0.6968151
5
Creates new form PantallaPrincipalEnfermeria
public PantallaPrincipalEnfermeria(Usuario usuario) { initComponents(); this.setResizable(false); Image icon = new ImageIcon(getClass().getResource("/Vistas/imagenes/pinaricono.jpg")).getImage(); setIconImage(icon); this.usuario = usuario; controladorEventos = new Control...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PantallaPrincipal() {\n initComponents();\n }", "public frm_tutor_subida_prueba() {\n }", "public frmPrincipal() {\n initComponents(); \n inicializar();\n \n }", "public VentanaPrincipal() {\n initComponents();\n\n idUsuariosControlador = Fabrica.getI...
[ "0.6641977", "0.65608174", "0.6558945", "0.65453005", "0.64930385", "0.6477853", "0.64029384", "0.63834363", "0.632518", "0.6290638", "0.62693995", "0.6268008", "0.6256322", "0.62090844", "0.6190969", "0.61750025", "0.61326593", "0.61171275", "0.61039346", "0.608629", "0.6084...
0.5787483
57
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() { jPanel8 = new Background("/Vistas/imagenes/fondoPantallaPrincipal.jpg"); jLabel11 = new javax.swing.JLabel(); textodeBienvenida2 = new...
{ "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.7321342", "0.7292121", "0.7292121", "0.7292121", "0.72863305", "0.7249828", "0.7213628", "0.7209084", "0.7197292", "0.71912086", "0.7185135", "0.7159969", "0.7148876", "0.70944786", "0.70817256", "0.7057678", "0.69884527", "0.69786763", "0.69555986", "0.69548863", "0.69453...
0.0
-1
hasa Launch the application.
public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { AtmLogin frame = new AtmLogin(); frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void launchApp();", "public static void main(String[] args) \r\n\t {\r\n\t\tApplication.launch(args);\r\n\t }", "void launch();", "void launch();", "void launch();", "public static void main(String[] args) {\n\t\t\n\t\tApplication.launch(args);\n\t\t\n\t\t\n\t\t\n\n\t}", "public static void main(String...
[ "0.8138296", "0.7401657", "0.7313135", "0.7313135", "0.7313135", "0.73116744", "0.7288523", "0.72311825", "0.7189435", "0.71800053", "0.71800053", "0.71480554", "0.7107671", "0.7107671", "0.7107671", "0.7094954", "0.70776993", "0.7022026", "0.69748455", "0.69666046", "0.69051...
0.0
-1
Default constructor for objects of class PersonWithZip
public PersonWithZip(String firstName, String lastName, int zipCode) { this.firstName = firstName; this.lastName = lastName; this.zipCode = zipCode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ZipCodes() {}", "public /* synthetic */ Employee(Integer num, String str, String str2, String str3, int i, DefaultConstructorMarker defaultConstructorMarker) {\n this((i & 1) != 0 ? null : num, (i & 2) != 0 ? null : str, (i & 4) != 0 ? null : str2, (i & 8) != 0 ? null : str3);\n }", "public A...
[ "0.62724674", "0.6058396", "0.59817904", "0.5911467", "0.58130854", "0.5639886", "0.55438197", "0.55321735", "0.54999006", "0.54627275", "0.5456735", "0.5435577", "0.5365916", "0.5361765", "0.5359376", "0.53397495", "0.53315836", "0.5317366", "0.5314967", "0.5302169", "0.5301...
0.7746075
0
public, private, protected, default
public static void main(String[] args) { Scope obj = new Scope(); obj.test1(); obj.test2(); Scope.test2(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Default()\n {}", "private Public() {\n super(\"public\", null);\n }", "private stendhal() {\n\t}", "public static void main(String[] args) {\n ClassDefault claseDefault = new ClassDefault(\"hola\");\n claseDefault.setAttrPrivate(\"Modigficado atrr privado\");\n S...
[ "0.70222855", "0.67293847", "0.67007345", "0.6445357", "0.6434178", "0.6374214", "0.6374214", "0.6281644", "0.6163077", "0.6152848", "0.61501396", "0.61044836", "0.6083276", "0.5985646", "0.5978308", "0.5962879", "0.59581023", "0.5949553", "0.59405863", "0.59375966", "0.59122...
0.0
-1
What happens if I uncomment this?
@Override public boolean equals(Object obj) { if (super.equals(obj)) return true; if (!obj.getClass().equals(this.getClass())) return false; Point p = (Point) obj; if ((this.x == p.x) && (this.y == p.y)) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "private void m50366E() {\n }", "public final void mo91715d() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public boolean method_4132() {\n return false;\n }", "public boolean method_2453() {\r\n return false;\r\n }", "pub...
[ "0.69371724", "0.67744094", "0.67652553", "0.6717996", "0.66980207", "0.6696502", "0.66506755", "0.6650032", "0.6641723", "0.65978765", "0.6596692", "0.657968", "0.6575881", "0.65110713", "0.64943236", "0.6482621", "0.6463863", "0.6462292", "0.64187443", "0.64019626", "0.6395...
0.0
-1
Provides a synchronous method of connecting to a server
public void connect();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void doConnect() {\r\n\t\tlogger.info(\"Connecting to server......\");\r\n\t\tChannelFuture future = null;\r\n\t\ttry {\r\n\t\t\tfuture = bootstrap.connect(new InetSocketAddress(host, port));\r\n\t\t\tfuture.addListener(channelFutureListener);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackT...
[ "0.6853442", "0.67947346", "0.6767561", "0.65208256", "0.6494176", "0.63263386", "0.6256023", "0.6243111", "0.6232915", "0.620291", "0.61955047", "0.6152016", "0.6122587", "0.6101149", "0.6094804", "0.60908014", "0.6083017", "0.60704833", "0.60643893", "0.6032996", "0.5991671...
0.59366494
29
Disconnects the user from the server
public void disconnect();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onDisconnect(User user);", "public void disconnectUser(User user) {\n connect();\n\n try {\n doStream.writeUTF(\"DISCONNECT\");\n doStream.writeUTF(user.getUserName());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n disconnect()...
[ "0.7844574", "0.7474776", "0.74110466", "0.73744607", "0.7225879", "0.72018456", "0.717484", "0.7073774", "0.69697934", "0.6962878", "0.69394284", "0.6935819", "0.6922965", "0.6907675", "0.6902322", "0.6889131", "0.68588924", "0.6854834", "0.68214613", "0.6799853", "0.6760999...
0.662966
37
Is null. Test if the list L is null.
protected static <C> boolean isNull(LIST<C> L) { if ( L == null || L.list == null ) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <C> boolean isEmpty(LIST<C> L) {\n if ( isNull( L ) || L.list.isEmpty() ) {\n return true;\n }\n if ( L.iter != null ) {\n return ! L.iter.hasNext();\n }\n return false;\n }", "public boolean checkListNull() {\n\t\treturn ((drawerItems == null) ? tru...
[ "0.7143222", "0.64819425", "0.64312476", "0.6243514", "0.6216216", "0.6211726", "0.60178304", "0.5992227", "0.596381", "0.59514886", "0.59409064", "0.5923334", "0.5904397", "0.5821576", "0.5809719", "0.5770501", "0.5770501", "0.5754592", "0.57461315", "0.57264525", "0.5718357...
0.8266369
0
Is empty. Test if the list L is empty.
public static <C> boolean isEmpty(LIST<C> L) { if ( isNull( L ) || L.list.isEmpty() ) { return true; } if ( L.iter != null ) { return ! L.iter.hasNext(); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean empty() {\n\t\treturn list.size() == 0;\n\t}", "public boolean isEmpty() {\r\n\t\treturn al.listSize == 0;\r\n\t}", "public boolean isEmpty() {\n\t\tif (l.getHead() == null)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn list.isEm...
[ "0.7741785", "0.7646552", "0.7598765", "0.7560948", "0.7560948", "0.75468314", "0.7525958", "0.7483644", "0.74823105", "0.74795204", "0.74503225", "0.7440221", "0.7438049", "0.73805964", "0.7375598", "0.73694396", "0.7368101", "0.73575157", "0.73570913", "0.73436725", "0.7321...
0.82103825
0
Length. L is a list. Returns length(L).
public static <C> int LENGTH(LIST<C> L) { if ( isNull( L ) ) { return 0; } return L.list.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int length() {\n int ret_val = 1;\n LinkedList i = this;\n\n while (i.next != null) {\n i = i.next;\n ret_val++;\n }\n return ret_val;\n }", "public int length()\n {\n if(integerList == null)\n return 0;\n else\n ...
[ "0.7560005", "0.7465551", "0.722733", "0.71681535", "0.71616167", "0.71373314", "0.711873", "0.70766425", "0.70754635", "0.6964959", "0.6963664", "0.68816614", "0.6876111", "0.68549615", "0.68470615", "0.6800773", "0.67994434", "0.67808616", "0.6750099", "0.6745024", "0.67280...
0.83824116
0
First. L is a nonnull list. a is the first element of L.
public static <C> C FIRST(LIST<C> L) { if ( isNull( L ) ) { return null; } if ( L.iter != null ) { if ( L.iter.hasNext() ) { return L.iter.next(); } else { L.iter = null; return null; } } return L.list.getFirst(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <C> void SFIRST(LIST<C> L, C a) {\n if ( ! isNull( L ) ) {\n L.list.set(0,a);\n }\n }", "public A getFirst() { return first; }", "public static <T> T getFirst(List<T> list) {\n\t\treturn list != null && !list.isEmpty() ? list.get(0) : null;\n\t}", "protected T getFi...
[ "0.7846548", "0.68014914", "0.6682725", "0.651607", "0.64689815", "0.6391207", "0.63318765", "0.62992615", "0.6250293", "0.62256515", "0.6216466", "0.618322", "0.6130841", "0.6099694", "0.60825443", "0.60598195", "0.603255", "0.6020179", "0.59836674", "0.5973045", "0.59713507...
0.73293406
1
Reductum. L is a nonnull list. Returns the reductum of L.
public static <C> LIST<C> RED(LIST<C> L) { if ( isNull( L ) ) { return L; } LIST<C> LP = L; // ok: LP = new LIST<C>( L.list.subList(1,L.list.size()) ); if ( L.iter == null ) { LP = new LIST<C>( L.list ); LP.iter = LP.list.iterator(); C x = LP.it...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static IntList incrListR(IntList L, int x) {\n if (L == null) {\n return null;\n }\n //each recursive run will create a new IntList until L.rest.rest.rest... = null meaning reaching the last item in\n //the original list\n return new IntList(L.first + x, incrLis...
[ "0.56394637", "0.5558543", "0.55196357", "0.52432096", "0.5226929", "0.5212463", "0.51823825", "0.5172757", "0.5156533", "0.51019496", "0.5070165", "0.5063125", "0.5063125", "0.5021543", "0.5001901", "0.49995425", "0.49880746", "0.49601316", "0.49587783", "0.4945828", "0.4921...
0.544393
3
Set first. L is a nonnull list. a is a list. The first element of L is changed to a.
public static <C> void SFIRST(LIST<C> L, C a) { if ( ! isNull( L ) ) { L.list.set(0,a); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addFirst(Comparable o){\n\t\t head=new ListElement(o,head);\n\t }", "@Override\r\n\t\tpublic E setFirst(E first) {\n\t\t\treturn pair.setFirst(first);\r\n\t\t}", "public void addFirst(T t) {\n if (size == elements.length) // checks potential overflow\n ensureCapacity(); // inc...
[ "0.62781423", "0.6132157", "0.6093037", "0.6055526", "0.6041971", "0.5942738", "0.59338295", "0.591775", "0.5865389", "0.5807783", "0.57773554", "0.57515025", "0.5741566", "0.57402855", "0.5728336", "0.57217056", "0.56890744", "0.56616724", "0.5657371", "0.5549167", "0.552764...
0.8328525
0
Set reductum. L is a nonnull list. LP is a list. The reductum of L is changed to LP.
public static <C> void SRED(LIST<C> L, LIST<C> LP) { if ( ! isNull( L ) ) { L.list.subList(1,L.list.size()).clear(); if ( ! isEmpty( LP ) ) { L.list.addAll( LP.list ); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void opration(){ \n System.out.println(\"Final veriable value l:\"+l+\"\\nj:\"+j);\n // l=l+2; erorr it can't change it's value\n \n }", "public static IntList dincrList(IntList L, int x) { //iteratively\n /* Your code here. */\n IntList p = L;\n ...
[ "0.5922759", "0.585279", "0.57712793", "0.5437019", "0.54314846", "0.53938997", "0.53141844", "0.5282478", "0.5275923", "0.523078", "0.5199114", "0.5195297", "0.5170128", "0.5159032", "0.5138073", "0.5137042", "0.5126499", "0.5094191", "0.50859815", "0.5068944", "0.50663465",...
0.62285423
0
Composition. a is an object. L is a list. Returns the composition of a and L.
public static <C> LIST<C> COMP(C a, LIST<C> L) { LIST<C> LP = L; if ( L == null ) { LP = new LIST<C>(); } LP.list.addFirst( a ); return LP; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "T compose(AbsonObject abson);", "public static <C> LIST<C> COMP3(C a, C b, C c, LIST<C> L) {\n LIST<C> LP = L;\n if ( L == null ) {\n LP = new LIST<C>();\n }\n LP.list.addFirst( c );\n LP.list.addFirst( b );\n LP.list.addFirst( a );\n return LP;\n }",...
[ "0.6243726", "0.58172107", "0.5556377", "0.5490528", "0.52791566", "0.5025056", "0.4994038", "0.4918212", "0.4918212", "0.49003032", "0.48715198", "0.48396274", "0.48327363", "0.48236364", "0.47565156", "0.47477186", "0.46774486", "0.46326098", "0.46198252", "0.46181813", "0....
0.5914617
1
Reductum. A is a list. i is a nonnegative betainteger not less than LENGTH(A). B=A, if i=0. Otherwise, B is the ith reductum of A.
public static <C> LIST<C> REDUCT(LIST<C> L, int i) { LIST<C> LP = null; if ( ! isNull( L ) ) { LP = new LIST<C>( L.list.subList(i,L.list.size()) ); } return LP; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Integer> repeatedNumber(final List<Integer> a) {\n long sum = 0, ssum = 0;\n for(int i = 0 ; i < a.size(); i++){\n long curi = i+1; // importnt to prevent overflow.\n long curn = a.get(i); // importnt to prevent overflow.\n sum += curn - curi;\n ...
[ "0.6037224", "0.54052216", "0.53711635", "0.5364657", "0.5350913", "0.5340524", "0.5289646", "0.5247846", "0.5184684", "0.5115846", "0.509741", "0.5080157", "0.50783485", "0.4998411", "0.49600595", "0.48838308", "0.48704815", "0.48451123", "0.4824658", "0.48144388", "0.479777...
0.5256041
7
Reductum 2. L is a list of length 2 or more. LP=RED(RED(L)).
public static <C> LIST<C> RED2(LIST<C> L, int i) { LIST<C> LP = null; if ( ! isNull( L ) ) { LP = new LIST<C>( L.list.subList(2,L.list.size()) ); } return LP; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <C> LIST<C> RED(LIST<C> L) {\n if ( isNull( L ) ) {\n return L;\n }\n LIST<C> LP = L;\n // ok: LP = new LIST<C>( L.list.subList(1,L.list.size()) );\n if ( L.iter == null ) {\n LP = new LIST<C>( L.list );\n LP.iter = LP.list.iterator();\n ...
[ "0.6483622", "0.62686694", "0.6068899", "0.5727168", "0.5691414", "0.5511055", "0.54217637", "0.53945816", "0.53456753", "0.526925", "0.5266473", "0.52168024", "0.52168024", "0.52144957", "0.5169757", "0.51426494", "0.5140016", "0.51361877", "0.51347154", "0.51258534", "0.512...
0.67684364
0
Reductum 3. L is a list of length 3 or more. M is the third reductum of L.
public static <C> LIST<C> RED3(LIST<C> L, int i) { LIST<C> LP = null; if ( ! isNull( L ) ) { LP = new LIST<C>( L.list.subList(3,L.list.size()) ); } return LP; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int stepThree(ArrayList<Integer> list) {\n\t\t\n\t\tint sum = 0;\n\t\tint passNumber = 0;\n\t\t\n\t\t//iterate through arraylist from right to left\n\t\tfor(int i = list.size()-1; i >= 0; i--) {\n\n\t\t\tint num = list.get(i);\n\t\t\tpassNumber++;\n\t\t\t\n\t\t\t//sum every other number beginning wit...
[ "0.5882034", "0.56357807", "0.55846566", "0.55714077", "0.55136466", "0.5422189", "0.5341031", "0.5320821", "0.5303391", "0.52888006", "0.52437246", "0.5215795", "0.52127576", "0.52093107", "0.51563114", "0.51339304", "0.509821", "0.5068483", "0.50513566", "0.5045004", "0.504...
0.555088
4
Reductum 4. L is a list of length 4 or more. M is the fourth reductum of L.
public static <C> LIST<C> RED4(LIST<C> L, int i) { LIST<C> LP = null; if ( ! isNull( L ) ) { LP = new LIST<C>( L.list.subList(42,L.list.size()) ); } return LP; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void reduce4( T mrt ) {\n // Reduce any AppendableVecs\n if( _noutputs > 0 )\n for( int i=0; i<_appendables.length; i++ )\n _appendables[i].reduce(mrt._appendables[i]);\n // User's reduction\n reduce(mrt);\n }", "int main()\n{\n int n;\n cin >>n;\n int m = 11;\n for(int i=0...
[ "0.5725322", "0.57090926", "0.57021654", "0.55133796", "0.53472257", "0.5310767", "0.5152118", "0.5141349", "0.5138144", "0.51298445", "0.51206523", "0.51042825", "0.5085492", "0.5072985", "0.50682867", "0.5031558", "0.49809492", "0.49793038", "0.49735427", "0.49231872", "0.4...
0.5091785
12
Clock. Returns the current CPU clock reading in milliseconds. Intervalls are system dependent.
public static long CLOCK() { return java.lang.System.currentTimeMillis(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double readClock()\n {\n return (System.currentTimeMillis() - startingTime) / 1000.0;\n }", "public double readClock()\n {\n\tif (frameByFrameClock) {\n\t return frameNumber * (1/30.0f);\n\t} else {\n\t long elapsed;\n\t \n\t if (drawAnimation.value) {\n\t\t// Time during anima...
[ "0.77281773", "0.7401253", "0.7107181", "0.6964717", "0.6919307", "0.6744156", "0.6633479", "0.6542255", "0.64850104", "0.6453351", "0.64501506", "0.64179105", "0.63931465", "0.63151205", "0.63001776", "0.6296023", "0.6253491", "0.6240508", "0.62323755", "0.62320787", "0.6213...
0.7682375
1
List element. A is a list. 1 le i le LENGTH(A). a is the ith element of A.
public static <C> C LELT(LIST<C> L, int i) { C x = null; if ( ! isNull( L ) ) { x = L.list.get(i); } return x; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void retriveElementInArrayList() {\n\t\tLinkedList<Integer> list = new LinkedList<Integer>();\n\t\tlist.add(10);\n\t\tlist.add(20);\n\t\tlist.add(30);\n\t\tlist.add(40);\n\t\tlist.add(50);\n\t\tSystem.out.println(\"LinkedList is : \" + list);\n\t\tSystem.out.println(list.get(3));\n\n\t}", "public ...
[ "0.6294271", "0.6247621", "0.6237301", "0.60004824", "0.6000365", "0.59417504", "0.5785549", "0.5678938", "0.56644505", "0.5589501", "0.5437808", "0.53843784", "0.5364543", "0.53418666", "0.53300136", "0.53241336", "0.53114736", "0.52887255", "0.5262357", "0.525275", "0.52441...
0.0
-1
Second. L is a list of length 2 or more. a is the second element of L.
public static <C> C SECOND(LIST<C> L) { C x = null; if ( ! isNull( L ) ) { x = L.list.get(2); } return x; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <C> void SFIRST(LIST<C> L, C a) {\n if ( ! isNull( L ) ) {\n L.list.set(0,a);\n }\n }", "public static <C> LIST<C> LIST2(C a, C b) {\n LIST<C> L = new LIST<C>();\n L.list.addFirst( b );\n L.list.addFirst( a );\n return L;\n }", "public No...
[ "0.6153564", "0.5994707", "0.5694097", "0.5685094", "0.5677983", "0.56449807", "0.5499404", "0.54988337", "0.5491624", "0.53914577", "0.53880346", "0.53349257", "0.53230995", "0.52917874", "0.52526295", "0.52371174", "0.52371174", "0.51902723", "0.5175224", "0.5161644", "0.51...
0.68171346
0
Third. L is a list of length 3 or more. a is the third element of L.
public static <C> C THIRD(LIST<C> L) { C x = null; if ( ! isNull( L ) ) { x = L.list.get(3); } return x; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <C> LIST<C> LIST3(C a, C b, C c) {\n LIST<C> L = new LIST<C>();\n L.list.addFirst( c );\n L.list.addFirst( b );\n L.list.addFirst( a );\n return L;\n }", "public static <C> LIST<C> RED3(LIST<C> L, int i) {\n LIST<C> LP = null;\n if ( ! isNull( L )...
[ "0.648155", "0.6417614", "0.6026944", "0.594748", "0.58115107", "0.57039595", "0.567752", "0.56734467", "0.5653802", "0.5532257", "0.5527946", "0.5475109", "0.54111236", "0.53862464", "0.53478974", "0.5316013", "0.5275119", "0.52714425", "0.52713686", "0.5262269", "0.5242195"...
0.6768725
0
Fourth. L is a list of length 4 or more. a is the fourth element of L.
public static <C> C FOURTH(LIST<C> L) { C x = null; if ( ! isNull( L ) ) { x = L.list.get(4); } return x; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <C> LIST<C> LIST4(C a, C b, C c, C d) {\n LIST<C> L = new LIST<C>();\n L.list.addFirst( d );\n L.list.addFirst( c );\n L.list.addFirst( b );\n L.list.addFirst( a );\n return L;\n }", "public static void m4(ArrayList<? super Integer> al)\n\t{\n\t\t//al.ad...
[ "0.6361381", "0.5953475", "0.58533424", "0.5747742", "0.56943446", "0.56608933", "0.5648718", "0.56334627", "0.5307459", "0.5242253", "0.5235607", "0.52091426", "0.51670134", "0.512797", "0.50844395", "0.5076924", "0.5070704", "0.50634724", "0.504553", "0.50155795", "0.499819...
0.6264394
1
Constructive concatenation. L1 and L2 are lists. L is the concatenation of L1 and L2. The list L is constructed.
public static <C> LIST<C> CCONC(LIST<C> L1, LIST<C> L2) { if ( isNull( L1 ) ) { return L2; } if ( isNull( L2 ) ) { return L1; } LinkedList<C> list = new LinkedList<C>( L1.list ); list.addAll( L2.list ); return new LIST<C>( list ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static List<StateRef> append(List<StateRef> l1, List<StateRef> l2) {\n l1.addAll(l2);\n return l1;\n }", "public static <C> LIST<C> CONC(LIST<C> L1, LIST<C> L2) {\n if ( isNull( L1 ) ) {\n return L2;\n }\n if ( isNull( L2 ) ) {\n return L1;\n }\n ...
[ "0.69484395", "0.6859995", "0.64343953", "0.63054436", "0.61534774", "0.6002471", "0.59152395", "0.58914375", "0.58914375", "0.5888656", "0.58396935", "0.5703513", "0.5699124", "0.56711274", "0.5581037", "0.5572743", "0.55308497", "0.5464244", "0.5456919", "0.5446202", "0.543...
0.6505443
2
Constructive inverse. L is a list. M=INV(L). M is constructed using COMP.
public static <C> LIST<C> CINV(LIST<C> L) { if ( isNull( L ) ) { return L; } LinkedList<C> list = new LinkedList<C>(L.list); Collections.reverse( list ); return new LIST<C>( list ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <C> LIST<C> INV(LIST<C> L) {\n if ( isNull( L ) ) {\n return L;\n }\n Collections.reverse( L.list );\n return L;\n }", "public Matrix inverse() {\n int n = L.getNrows();\n Matrix inv = Matrix.identity(n);\n solve(inv);\n return in...
[ "0.6835238", "0.6669466", "0.63580745", "0.6350922", "0.6093458", "0.5946079", "0.5832552", "0.58227986", "0.57891285", "0.5761281", "0.57512665", "0.57275313", "0.5674034", "0.56292635", "0.55051655", "0.5472056", "0.5444921", "0.544134", "0.54335636", "0.5396351", "0.538208...
0.71771574
0
Inverse. L is a list. The inverse of L is returned. The list L is modified.
public static <C> LIST<C> INV(LIST<C> L) { if ( isNull( L ) ) { return L; } Collections.reverse( L.list ); return L; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Matrix inverse() {\n int n = L.getNrows();\n Matrix inv = Matrix.identity(n);\n solve(inv);\n return inv;\n }", "public Matrix inverse() {\n\t\tMatrix a = copy();\n\t\tif (a.M != a.N) {\n\t\t\tthrow new RuntimeException(\"This matrix is not square!\");\n\t\t}\n\t\tMatrix i =...
[ "0.7564506", "0.6757969", "0.67244816", "0.64072543", "0.63701767", "0.6134623", "0.6091005", "0.59330726", "0.59237045", "0.59163076", "0.59013665", "0.5878698", "0.58578986", "0.58323085", "0.58096194", "0.5794093", "0.57905334", "0.57629704", "0.5736586", "0.56793", "0.567...
0.7188756
1
Composition 2. a and b are objects. L is a list. M=COMP(a,COMP(b,L)).
public static <C> LIST<C> COMP2(C a, C b, LIST<C> L) { LIST<C> LP = L; if ( L == null ) { LP = new LIST<C>(); } LP.list.addFirst( b ); LP.list.addFirst( a ); return LP; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <C> LIST<C> COMP3(C a, C b, C c, LIST<C> L) {\n LIST<C> LP = L;\n if ( L == null ) {\n LP = new LIST<C>();\n }\n LP.list.addFirst( c );\n LP.list.addFirst( b );\n LP.list.addFirst( a );\n return LP;\n }", "public static <C> LIST<C> COMP(...
[ "0.6101663", "0.6070566", "0.5877071", "0.5872279", "0.5499033", "0.5468141", "0.5381728", "0.5342602", "0.52525645", "0.5249411", "0.5186162", "0.51689583", "0.5099442", "0.50707626", "0.5041345", "0.5030202", "0.5023685", "0.5000756", "0.49871615", "0.49679995", "0.4967619"...
0.6768915
0
Composition 3. a1, a2 and a3 are objects. L is a list. M=COMP(a1,COMP(a2,COMP(a3,L))).
public static <C> LIST<C> COMP3(C a, C b, C c, LIST<C> L) { LIST<C> LP = L; if ( L == null ) { LP = new LIST<C>(); } LP.list.addFirst( c ); LP.list.addFirst( b ); LP.list.addFirst( a ); return LP; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <C> LIST<C> COMP3(C a, C b, C c, C d, LIST<C> L) {\n LIST<C> LP = L;\n if ( L == null ) {\n LP = new LIST<C>();\n }\n LP.list.addFirst( d );\n LP.list.addFirst( c );\n LP.list.addFirst( b );\n LP.list.addFirst( a );\n return LP;\n }...
[ "0.6334946", "0.5670821", "0.5169463", "0.50813574", "0.50300276", "0.50034386", "0.49219579", "0.48779383", "0.4876558", "0.48477435", "0.48330453", "0.47945538", "0.47922415", "0.47652495", "0.47227395", "0.47074777", "0.46889466", "0.46507242", "0.46479303", "0.46464252", ...
0.65274453
0
Composition 4. a1, a2, a3 and a4 are objects. L is a list. M=COMP(a1,COMP(a2,COMP(a3,COMP(a4,l)))).
public static <C> LIST<C> COMP3(C a, C b, C c, C d, LIST<C> L) { LIST<C> LP = L; if ( L == null ) { LP = new LIST<C>(); } LP.list.addFirst( d ); LP.list.addFirst( c ); LP.list.addFirst( b ); LP.list.addFirst( a ); return LP; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "T compose(AbsonObject abson);", "static void m11180a(List<Component<?>> list) {\n Set<C3246b> c = m11182c(list);\n Set<C3246b> b = m11181b(c);\n int i = 0;\n while (!b.isEmpty()) {\n C3246b next = b.iterator().next();\n b.remove(next);\n i++;\n ...
[ "0.5363483", "0.5201708", "0.5178615", "0.49331474", "0.48113453", "0.4809156", "0.48059472", "0.47542253", "0.47213256", "0.46850678", "0.46812648", "0.46792457", "0.46697402", "0.4624743", "0.46167877", "0.46139616", "0.4608819", "0.4588922", "0.4582169", "0.4571173", "0.45...
0.59165955
0
Concatenation. L1 and L2 are lists. L=CONC(L1,L2). The list L1 is modified.
public static <C> LIST<C> CONC(LIST<C> L1, LIST<C> L2) { if ( isNull( L1 ) ) { return L2; } if ( isNull( L2 ) ) { return L1; } L1.list.addAll( L2.list ); return L1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <C> LIST<C> CCONC(LIST<C> L1, LIST<C> L2) {\n if ( isNull( L1 ) ) {\n return L2;\n }\n if ( isNull( L2 ) ) {\n return L1;\n }\n LinkedList<C> list = new LinkedList<C>( L1.list );\n list.addAll( L2.list );\n return new LIST<C>( list ...
[ "0.7436265", "0.5783339", "0.57699883", "0.56459516", "0.56148434", "0.55010927", "0.52782834", "0.5272584", "0.526601", "0.5257537", "0.5253442", "0.51780933", "0.5172641", "0.5140439", "0.5118318", "0.5056666", "0.5039516", "0.50333786", "0.50333786", "0.5033124", "0.500409...
0.71113074
1
Equal. a and b are objects. t=true if a and b are equal and otherwise t=false.
public static <C> boolean EQUAL(LIST<C> L1, LIST<C> L2) { if ( isNull( L1 ) ) { return isNull(L2); } if ( isNull( L2 ) ) { return isNull(L1); } return L1.list.equals( L2.list ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static final boolean equal(Object a, Object b) {\n if (a == b)\n return true;\n if (a == null)\n return false;\n if (b == null)\n return false;\n return a.equals(b);\n }", "public static boolean equal(Object a, Object b) {\r\n\t\tif (a == b)...
[ "0.747396", "0.7235944", "0.7174194", "0.71322244", "0.7020478", "0.6928014", "0.68555593", "0.6772668", "0.6768714", "0.6721156", "0.67174655", "0.6701181", "0.6665632", "0.66653264", "0.6663617", "0.6662005", "0.661443", "0.6594803", "0.6591346", "0.65650266", "0.6562761", ...
0.0
-1
Extent. L is a list. n the number of cells of L.
public static <C> int EXTENT(LIST<C> L) { if ( isNull( L ) ) { return 0; } int n = 0; for ( C a : L.list ) { if ( a instanceof LIST ) { LIST<C> LP = null; try { LP = (LIST<C>) a; } catch(Cl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setExtent(int n) {\r\n\r\n int newExtent = Math.max(0, n);\r\n int value = getValue();\r\n if (value + newExtent > max) {\r\n\r\n newExtent = max - value;\r\n\r\n }\r\n setRangeProperties(value, newExtent, min, max, isAdjusting);\r\n }", "private stati...
[ "0.59436387", "0.5293044", "0.51633334", "0.50700843", "0.50336885", "0.49174008", "0.49100474", "0.48886782", "0.4801832", "0.47672066", "0.4757295", "0.4749807", "0.47475857", "0.4745389", "0.47300404", "0.4727076", "0.47158173", "0.4693661", "0.46867257", "0.4682313", "0.4...
0.5172792
2
List, 1 element. a in an object. L is the list (a).
public static <C> LIST<C> LIST1(C a) { LIST<C> L = new LIST<C>(); L.list.addFirst( a ); return L; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void acheter(List<Object> la) {\n\t\t\n\t}", "public List getList1(List<String> list,String a) {\n\t\tlist.add(a);\r\n\t\treturn list;\r\n\t}", "Object getTolist();", "public static <C> void SFIRST(LIST<C> L, C a) {\n if ( ! isNull( L ) ) {\n L.list.set(0,a);\n }\...
[ "0.65538204", "0.6461382", "0.6460003", "0.62225896", "0.61684614", "0.60351515", "0.60071546", "0.5977009", "0.5880128", "0.5869337", "0.5861221", "0.5856423", "0.58222497", "0.58044523", "0.5797193", "0.57728755", "0.5706885", "0.5705572", "0.56885856", "0.56837523", "0.568...
0.70726115
0
List, 10 elements. a1, a2, a3, a4, a5, a6, a7, a8, a9 and a10 are objects. L is the list (a1,a2,a3,a4,a5,a6,a7,a8,a9,a10).
public static <C> LIST<C> LIST10(C a1, C a2, C a3, C a4, C a5, C a6, C a7, C a8, C a9, C a10) { LIST<C> L = new LIST<C>(); L.list.addFirst( a10 ); L.list.addFirst( a9 ); L.list.addFirst( a8 ); L.list.addFirst( a7 ); L.list.addFirst( a6 ); L.list.addFirst( a5 ); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TiraList() {\n this.list = new Object[8];\n this.nextindex = 0;\n this.startIndex = 0;\n }", "public List()\n {\n list = new Object [10];\n }", "public ElementIterator(List l) {\n\t myList = l;\n\t }", "public static void createListFromLong(ArrayList<Inte...
[ "0.6265448", "0.61348236", "0.60693264", "0.60358584", "0.60113406", "0.6010691", "0.58563", "0.5818642", "0.5807837", "0.5804645", "0.5787764", "0.5709417", "0.5705628", "0.5705628", "0.5687511", "0.56874084", "0.5665215", "0.5630513", "0.56276304", "0.56180763", "0.5617955"...
0.67606294
0
List, 2 elements. a and b are objects. L is the list (a,b).
public static <C> LIST<C> LIST2(C a, C b) { LIST<C> L = new LIST<C>(); L.list.addFirst( b ); L.list.addFirst( a ); return L; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static <T> List<T> pairList(T a, T b) {\n ArrayList<T> res = new ArrayList<T>();\n res.add(a);\n res.add(b);\n return res;\n }", "public static <C> LIST<C> COMP2(C a, C b, LIST<C> L) {\n LIST<C> LP = L;\n if ( L == null ) {\n LP = new LIST<C>();\n ...
[ "0.73503894", "0.650576", "0.6287755", "0.6273733", "0.6112813", "0.6078012", "0.6059259", "0.60570216", "0.5975102", "0.5974593", "0.59307414", "0.5897497", "0.58708894", "0.5801315", "0.57840234", "0.5776042", "0.5772432", "0.5772432", "0.5765626", "0.57246757", "0.570864",...
0.7197076
1
List, 3 elements. a1, a2 and a3 are objects. L=(a1,a2,a3).
public static <C> LIST<C> LIST3(C a, C b, C c) { LIST<C> L = new LIST<C>(); L.list.addFirst( c ); L.list.addFirst( b ); L.list.addFirst( a ); return L; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <C> LIST<C> RED3(LIST<C> L, int i) {\n LIST<C> LP = null;\n if ( ! isNull( L ) ) {\n LP = new LIST<C>( L.list.subList(3,L.list.size()) );\n }\n return LP;\n }", "public static <C> LIST<C> COMP3(C a, C b, C c, C d, LIST<C> L) {\n LIST<C> LP = L;\n ...
[ "0.6238501", "0.5927336", "0.5913764", "0.5877604", "0.5861876", "0.5698794", "0.5686152", "0.56546295", "0.56020457", "0.5569726", "0.5550479", "0.5546194", "0.55331045", "0.5527251", "0.5517762", "0.55049115", "0.5501676", "0.54699373", "0.546785", "0.545436", "0.5435255", ...
0.59710485
1
List, 4 elements. a1, a2, a3 and a4 are objects. L is the list (a1,a2,a3,a4).
public static <C> LIST<C> LIST4(C a, C b, C c, C d) { LIST<C> L = new LIST<C>(); L.list.addFirst( d ); L.list.addFirst( c ); L.list.addFirst( b ); L.list.addFirst( a ); return L; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <C> LIST<C> RED4(LIST<C> L, int i) {\n LIST<C> LP = null;\n if ( ! isNull( L ) ) {\n LP = new LIST<C>( L.list.subList(42,L.list.size()) );\n }\n return LP;\n }", "public static <T> List<T> createList(T item1, T item2, T item3, T item4) {\n\t\tList<T> list =...
[ "0.60464853", "0.5932842", "0.5841588", "0.57861847", "0.5780979", "0.56780523", "0.56314105", "0.55900604", "0.55688936", "0.5537401", "0.552836", "0.5511499", "0.54977363", "0.5486811", "0.5463111", "0.5438943", "0.5433648", "0.53973144", "0.53771", "0.5375682", "0.5372109"...
0.6530204
0
List, 5 elements. a1,a2,a3,a4 and a5 are objects. L is the list (a1,a2,a3,a4,a5).
public static <C> LIST<C> LIST5(C a, C b, C c, C d, C e) { LIST<C> L = new LIST<C>(); L.list.addFirst( e ); L.list.addFirst( d ); L.list.addFirst( c ); L.list.addFirst( b ); L.list.addFirst( a ); return L; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void print5(ArrayList<? extends A> list) {\n\n\t}", "public ArrayList() {\n\t\tthis.elements = new Object[5];\n\t\tthis.last = -1;\n\t}", "public static <T> List<T> createList(T item1, T item2, T item3, T item4, T item5) {\n\t\tList<T> list = new ArrayList<T>();\n\t\tlist.add(item1);\n\t\tlist.add(item2...
[ "0.6298018", "0.5987221", "0.5957067", "0.59065515", "0.58344054", "0.5804994", "0.5763832", "0.5733914", "0.5683057", "0.562965", "0.5628671", "0.5587071", "0.55081946", "0.54463005", "0.5443719", "0.5441558", "0.54138976", "0.5410302", "0.54013634", "0.54013634", "0.5369684...
0.6432096
0
Order. L is a list. maximal depth of L.
public static <C> int ORDER(LIST<C> L) { if ( isNull( L ) ) { return 0; } int n = 0; for ( C a : L.list ) { if ( a instanceof LIST ) { LIST<C> LP = null; try { LP = (LIST<C>) a; } catch(Cla...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args){\n TreeNode root = new TreeNode(1);\n root.left = new TreeNode(2);\n root.right = new TreeNode(2);\n root.left.left = new TreeNode(6);\n root.left.right = new TreeNode(4);\n root.right.left = new TreeNode(4);\n root.right.ri...
[ "0.6379123", "0.626354", "0.6241978", "0.62338436", "0.6231334", "0.6188527", "0.617469", "0.6114486", "0.6087084", "0.60832685", "0.6072685", "0.6051304", "0.60392153", "0.60301095", "0.60198563", "0.597864", "0.5936533", "0.59087867", "0.5838491", "0.58331704", "0.5821624",...
0.7243442
0
TODO Autogenerated method stub
public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int arr[] = new int[n]; for(int i = 0 ; i < n ; i++) { arr[i] = sc.nextInt(); } int num = sc.nextInt(); int start = 0 , end = n-1; while(start<end)...
{ "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
account reactive service with proto messages
public interface AccountService { Mono<Account> findById(Int32Value id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "net.nyhm.protonet.example.proto.AccountProto.Account getAccount();", "net.nyhm.protonet.example.proto.AccountProto.Account getAccount();", "net.nyhm.protonet.example.proto.AccountProto.AccountOrBuilder getAccountOrBuilder();", "net.nyhm.protonet.example.proto.AccountProto.AccountOrBuilder getAccountOrBuilder...
[ "0.6756809", "0.6756809", "0.6099323", "0.6099323", "0.5877325", "0.5788913", "0.57066095", "0.5696846", "0.56912255", "0.5632148", "0.55934495", "0.55553114", "0.54836714", "0.5480304", "0.5422708", "0.5420736", "0.53967184", "0.53511053", "0.53511053", "0.53510785", "0.5343...
0.6389555
2
On create new grouped code list.
public void onCreateNewGroupedCodeList(CreateNewGroupedCodeListEvent event);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ch.crif_online.www.webservices.crifsoapservice.v1_00.FinancialStatement addNewFinancialStatementsGroup();", "public void markCsgListCreate() throws JNCException {\n markLeafCreate(\"csgList\");\n }", "ManageCodeListDetailModel getGroupedCodeList(String key);", "protected void insertCode(SketchCode ...
[ "0.58631074", "0.5852631", "0.5775123", "0.57570344", "0.57028836", "0.5638782", "0.55895716", "0.5543759", "0.55340207", "0.5531684", "0.54737824", "0.54436594", "0.5435627", "0.5425857", "0.53588027", "0.53580266", "0.53144455", "0.527495", "0.52603114", "0.5222885", "0.521...
0.77724934
0
Repository class for Main domain objects All method names are compliant with Spring Data naming conventions so this interface can easily be extended for Spring Data See here: jpa.repositories.htmljpa.querymethods.querycreation
public interface MainRepository { Main getMain(Main main) throws DataAccessException; void putMain(Main main) throws DataAccessException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Repository\npublic interface UserRepository extends JpaRepository<User,Integer> {\n //implementation will be provided to run time\n}", "@Repository\npublic interface RepositoryMain extends CrudRepository<Roulette, Long>{\n\n}", "@Repository\npublic interface MainItemOrderedRepository extends CrudRepository...
[ "0.69902205", "0.6965019", "0.67033464", "0.665901", "0.6556525", "0.653344", "0.6518989", "0.6512587", "0.65015745", "0.6486261", "0.64713675", "0.6463939", "0.64634037", "0.64618266", "0.6443021", "0.64343065", "0.64283913", "0.6418771", "0.6418369", "0.6409615", "0.6406872...
0.72288907
0
Create a new generator.
public UniformRandomGenerator(RandomGenerator generator) { this.generator = generator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Generator(){}", "public JsonGenerator createGenerator(OutputStream out)\n/* */ throws IOException\n/* */ {\n/* 1110 */ return createGenerator(out, JsonEncoding.UTF8);\n/* */ }", "public JsonGenerator createGenerator(Writer w)\n/* */ throws IOException\n/* */ {\...
[ "0.82688093", "0.6844001", "0.6842914", "0.67557436", "0.6710047", "0.6558444", "0.64893824", "0.64893824", "0.64893824", "0.64893824", "0.64893824", "0.64502573", "0.6383732", "0.63639903", "0.62867033", "0.616838", "0.6135685", "0.6099266", "0.6099032", "0.60609424", "0.604...
0.51749617
87
Generate a random scalar with null mean and unit standard deviation. The number generated is uniformly distributed between &sqrt;(3) and +&sqrt;(3).
public double nextNormalizedDouble() { return SQRT3 * (2 * generator.nextDouble() - 1.0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static double uniform() {\r\n return random.nextDouble();\r\n }", "public static double uniform() {\n return random.nextDouble();\n }", "public float gaussianRandom() {\n\t\treturn (CCMath.constrain((float)nextGaussian() / 4,-1 ,1 ) + 1) / 2;\n\t}", "public static double random() {...
[ "0.67865336", "0.67642844", "0.67279464", "0.6666359", "0.6662028", "0.65746355", "0.6363786", "0.62028915", "0.61638635", "0.6127528", "0.6125472", "0.6071064", "0.6051004", "0.6048811", "0.6043657", "0.60257125", "0.6010919", "0.60023034", "0.5950551", "0.5931928", "0.59213...
0.6034058
15
Wake the sender thread upon receiving routing information for a given chunk.
protected void unlock() { synchronized ( lock ) { lock.notify(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void run() {\n\t\ttry {\n\t\t\twhile (!abort) {\n\t\t\t\tlong dest = outgoingAddressBuffer.take();\n\t\t\t\tbyte[] msg = outgoingMessageBuffer.take();\n\t\t\t\tif (dest == 0) // Break signal\n\t\t\t\t{\n\t\t\t\t\tLog.d(TAG, \"Dest is 0\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\twhile (rm.isDiscovering()) {...
[ "0.5861621", "0.53013414", "0.5300419", "0.52926695", "0.5280362", "0.52406347", "0.5207455", "0.518188", "0.51473093", "0.51407355", "0.5104282", "0.50649786", "0.50383157", "0.50107944", "0.5005783", "0.4947818", "0.49199477", "0.4906895", "0.49023122", "0.48938468", "0.487...
0.0
-1
Calling method checked for validity of routes;
protected void setRoutes(WriteFileResponse response) { routes[ response.getSequence() ] = response.getRoutingPath(); if ( ableToWrite && totalReceived.incrementAndGet() == routes.length ) { unlock(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void invalidRoute() \n {\n validRoute = false;\n }", "boolean hasRoute();", "public boolean hasValidRoute() \n {\n return validRoute;\n }", "public boolean areRoutesValid() {\n return valid;\n }", "private boolean checkPermissions(HttpServletRequest request, Route...
[ "0.6874613", "0.66570973", "0.6583172", "0.65481246", "0.60401106", "0.5655919", "0.5516416", "0.54973", "0.547578", "0.54584676", "0.5439637", "0.5427005", "0.5412428", "0.5356606", "0.53479654", "0.5330235", "0.5318731", "0.5309659", "0.5306227", "0.5278017", "0.5240219", ...
0.0
-1
Iterate through the files and send them to the chunk servers a chunk at a time. A request to the controller will provide details of which servers to communicate with.
public void send(List<File> files) { SimpleDateFormat sdf = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss.SSS" ); int numberOfFiles = files.size(); LOG.info( "Started uploading " + numberOfFiles + " file(s) at " + sdf.format( System.currentTimeMillis() ) ); ConnectionUtilities connections = new Con...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void run() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t//Get a list of pairs. The pair will be a chunkname with a chunkserver \r\n\t\t/*for(Pair<String, String> p: EventFactory.hostToFiles.getChunkLocations(message.getContent())){\r\n\t\t\tSystem.out.println(\"The location is: \" + p.g...
[ "0.6898086", "0.6591681", "0.6340665", "0.6225596", "0.6207414", "0.6201325", "0.61206824", "0.5989807", "0.5972283", "0.5919013", "0.59131473", "0.5906974", "0.587747", "0.5811016", "0.57571894", "0.5596435", "0.5565466", "0.55623925", "0.54995054", "0.54880565", "0.5462487"...
0.6423516
2
Process an individual file by traversing the chunks of bytes within. This is accomplished via the following steps: read the next chunk of the file send request to controller for details of where to write the chunk. wait for a reply from the controller the client will notify this thread connect to the first item chunk s...
private void processIndividualFile(File file, InputStream is, ConnectionUtilities connections) throws IOException, InterruptedException, ClientWriteException, NumberFormatException { SimpleDateFormat sdf = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss.SSS" ); LOG.debug( "The file: " + file.getAbsolute...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void run() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t//Get a list of pairs. The pair will be a chunkname with a chunkserver \r\n\t\t/*for(Pair<String, String> p: EventFactory.hostToFiles.getChunkLocations(message.getContent())){\r\n\t\t\tSystem.out.println(\"The location is: \" + p.g...
[ "0.6385211", "0.62118596", "0.6117816", "0.60939723", "0.60930246", "0.5946223", "0.5921548", "0.5887961", "0.58732975", "0.58058554", "0.5756273", "0.57541424", "0.5733393", "0.5731499", "0.5729741", "0.57159555", "0.5701703", "0.5685239", "0.56637895", "0.56365746", "0.5633...
0.6051661
5
Send the individual chunks to only the initial destination for each chunk / fragment. The metadata is set with temporary version number ( the server will detect the difference and update if necessary )
private void sendWriteChunkRequest(File file, InputStream is, ConnectionUtilities connections, int numberOfChunks) throws NumberFormatException, IOException { byte[] message = new byte[ Constants.CHUNK_SIZE ]; ProgressBar progress = new ProgressBar( file.getName() ); WriteChunkRequest request ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void sendChunkRequest(int chunkX, int chunkY);", "@Override public void onStreamUpdate(final Set<Long> updatedChunks) {\n }", "@Override\n public void finishMessageSending() {\n for (int i = 0; i < fragNum; ++i) {\n long bytesWriten = cacheOut[i].bytesWriten();\n cacheOut[i].fi...
[ "0.62546", "0.5919376", "0.58786166", "0.5836947", "0.57594585", "0.5708803", "0.56590956", "0.5625272", "0.5623952", "0.5586952", "0.5582656", "0.5490847", "0.54405445", "0.53450817", "0.53257304", "0.5280769", "0.5272249", "0.5258895", "0.5258895", "0.5258895", "0.5258895",...
0.5965999
1
This boolean holds the verdict of a whitelist condition, on checking 1 complete rule. The verdict starts at false, but can change during the loop through all rule components.
public Boolean isWhiteListed(Map<String,Object> alertFieldsAndValues) { Boolean isWhiteListedSoFar = false; Iterator<Map.Entry<String,String>> it = ruleAsJSON.entrySet().iterator(); while (it.hasNext()) { Map.Entry<String, String> ruleComponent = it.next(); //A complete...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@NotNull\n @Generated\n @Selector(\"needRulesVerdict\")\n public static native NEFilterNewFlowVerdict needRulesVerdict();", "public boolean C_trueCond(ListOfParameterLists parameterLists) {\n if(debug)\n System.out.println(\"Condition: TRUE\");\n return true;\n }", "@NotNull\n @Generated\...
[ "0.5440778", "0.53602564", "0.5301816", "0.52661127", "0.5232236", "0.52316236", "0.52057934", "0.52000445", "0.5166974", "0.5155233", "0.51438504", "0.50978947", "0.5095857", "0.50958395", "0.508209", "0.5080303", "0.50627536", "0.50520384", "0.50435716", "0.502867", "0.5021...
0.0
-1
/ All if conditions are true and all statements are executed
@Test public void method1SC() { System.out.println(FaultyClass.method1(3)); assertEquals(1, FaultyClass.method1(3)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void evaluateConditions()\n {\n ensureConditionContinuity() ;\n checkComponentList() ;\n\n for ( int liCondCtr = 1 ; liCondCtr <= 5 ; liCondCtr++ )\n {\n checkCondition( liCondCtr ) ;\n } /* end for */\n\n }", "@Override\r\n\tpublic boolean CheckConditions() {\n\t\t...
[ "0.75013685", "0.66420925", "0.653926", "0.6364895", "0.61819696", "0.61380804", "0.6104452", "0.6032339", "0.5976952", "0.5951171", "0.5936671", "0.58592826", "0.58539724", "0.585007", "0.5821002", "0.5817896", "0.58037573", "0.58027154", "0.5800678", "0.5796141", "0.5758405...
0.0
-1
/ 1st assert all if statements are false, 2nd assert all if statements are true the 2 assert statements cover the branches in the code
@Test public void method1BC() { assertEquals(-2, FaultyClass.method1(-2)); assertEquals(1, FaultyClass.method1(3)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void assertAll() {\n\t\t\n\t}", "public void testPreConditions() {\r\n\t //fail(\"Precondition check not implemented!\");\r\n\t assertEquals(true,true);\r\n\t }", "@Test(enabled = false)\n\tpublic void HardAssert(){\n\t\t\t\t\n\t\tSystem.out.println(\"Hard Asset Step 1\");\n\t\tAssert.assertEqu...
[ "0.7223622", "0.7222011", "0.6752789", "0.65157473", "0.65157473", "0.65157473", "0.6496341", "0.64889586", "0.6485339", "0.6412468", "0.6407731", "0.6384091", "0.6362207", "0.6300283", "0.62969893", "0.6285335", "0.6283997", "0.62366784", "0.62301904", "0.62301904", "0.62267...
0.0
-1
/ because there are only 2 if statements in the code the possible pats are 2^2 = 4. Therefore path test should cover all 4 possible paths. The test below illustrates the 2 paths not covered by path coverage
@Test public void method1PC() { assertEquals(-2, FaultyClass.method1(-2)); assertEquals(1, FaultyClass.method1(3)); //test 1st IF TRUE, 2nd IF FALSE assertEquals(1, FaultyClass.method1(3));; //test 1st IF FALSE, 2nd IF TRUE //Arithmetic Exception and 100 path coverage here FaultyClass.method1(-1)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void finiteUTurnCosts() {\n int right0 = graph.edge(0, 1).setDistance(10).set(speedEnc, 10, 10).getEdge();\n graph.edge(1, 2).setDistance(10).set(speedEnc, 10, 10);\n graph.edge(2, 3).setDistance(10).set(speedEnc, 10, 10);\n graph.edge(3, 4).setDistance(10).set(speedEn...
[ "0.6314642", "0.61095977", "0.61049557", "0.60981244", "0.60571975", "0.6055202", "0.60317445", "0.60214317", "0.6020346", "0.6010904", "0.59091675", "0.59033275", "0.59006464", "0.58916765", "0.58711416", "0.58656836", "0.58518606", "0.5840483", "0.5835638", "0.58320165", "0...
0.620794
1
send msg to jdbc
public void send(String topic,Object content,String actionType) { //maxkey.server.message.queue , if not none if(applicationConfig.isProvisionSupport()) { ProvisionMessage message = new ProvisionMessage( UUID.randomUUID().toString(), //message id as uuid ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean send_message(String SID, String RID, String message)\r\n {\r\n DBConnect db = new DBConnect();\r\n try\r\n {\r\n \r\n String SQL = \"insert into MESSAGES(SID, RID,message) values ('\" + SID + \"', '\" + RID + \"', '\"+ message + ...
[ "0.68866587", "0.64458144", "0.6393537", "0.634242", "0.63128644", "0.6279478", "0.6215945", "0.62011516", "0.5920801", "0.5887", "0.5835484", "0.5819493", "0.5817988", "0.5792407", "0.57780564", "0.57328314", "0.57208276", "0.57171154", "0.56699485", "0.5660236", "0.56546974...
0.0
-1
write your code in Java SE 8
public String solution(String s) { Stream<Character> tmp = s.chars().mapToObj(value -> (char)value); return tmp.collect(Collectors.groupingBy(Function.identity(), Collectors.counting())).entrySet().stream().filter(characterLongEntry -> characterLongEntry.getValue() == 2).findFirst().get().getKey().toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\tnew Action() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void execute(String content) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tSystem.out.println(content);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}.execute(\"jdk1.8之前匿名内部类实现方式\");\r\n\t\t\r\n\t\t\r\n\t\t//lambda\r\n\...
[ "0.5890391", "0.58054996", "0.57008785", "0.56167847", "0.54946315", "0.54761344", "0.524263", "0.52340496", "0.5233149", "0.52029705", "0.5160466", "0.51574665", "0.5143396", "0.5094738", "0.5084682", "0.5069909", "0.50661004", "0.50645214", "0.5064437", "0.50475377", "0.504...
0.0
-1
Once you use Dynamic Programming, map will have right numbers. Without Dynamic Programming, values in the map will be overwritten.
@SuppressWarnings("Duplicates") private static int findMax_with_included_pieces_printed_brute_force(int[] prices, int[] pieceLengths, int start, int end, int expectedRodLength, Map<Integer, Integer> map) { // exit condition if (expectedRodLength <= 0) return 0; // reducing the problem by 1...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n Scanner read = new Scanner(System.in);\n int n = read.nextInt();\n int d = read.nextInt();\n int[] arr = new int[n];\n for(int i=0;i<n;i++)\n arr[i]=read.nextInt();\n \n int[] a = new int[n];\n int temp=0;...
[ "0.66290194", "0.654606", "0.6540295", "0.63944775", "0.62326187", "0.6230195", "0.6170948", "0.6081278", "0.60781366", "0.6068297", "0.6043623", "0.6019857", "0.6005615", "0.5979523", "0.5961223", "0.5930301", "0.59269595", "0.59188175", "0.59145916", "0.59087634", "0.588163...
0.0
-1
pointWorld = lambda(from + affineCoordto)
public Hit(SceneGraphPath path, double[] pointWorld, double dist, double affineCoord, int pickType, int index,int triIndex) { this.path = (SceneGraphPath) path; Matrix m = new Matrix(); path.getInverseMatrix(m.getArray()); this.pointWorld= pointWorld; this.pointObject=m.multiplyVector(pointWorld); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int apply(int x, int y, int origin);", "public void transform(float a11, float a12, float a21, float a22, float x, float y);", "public Point2D translatePoint( Figure f, Point2D p, Point2D dir);", "public boolean apply(int x0, int y0, int x, int y);", "public void translate(int x, int y);", "void vector...
[ "0.6675117", "0.63655883", "0.62077236", "0.59934294", "0.59528476", "0.5895141", "0.58521163", "0.58069664", "0.5724362", "0.5716514", "0.5654389", "0.56370926", "0.5630497", "0.5619618", "0.5616817", "0.5601036", "0.5581008", "0.5531946", "0.5507602", "0.5500463", "0.549827...
0.0
-1
/ calc barycentric coordinates bary for point x in anElement el, not necessarily 0 <= b[i] <= 1
public static boolean convertToBary( double[] bary, double[] x0, double[] x1, double[] x2, double[] x) { //TODO: use exception handling for degenerate situations //TODO: the return type should be void or double which should give // distance from plane int i0 = 0, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Vector3D convexCellBarycenter(final Vertex start) {\n\n int n = 0;\n Vector3D sumB = Vector3D.ZERO;\n\n // loop around the cell\n for (Edge e = start.getOutgoing(); n == 0 || e.getStart() != start; e = e.getEnd().getOutgoing()) {\n sumB = new Vector3D(1, sumB, e.getLe...
[ "0.56154954", "0.5396701", "0.532483", "0.52513105", "0.5160451", "0.5130184", "0.5126725", "0.51222444", "0.508614", "0.5055969", "0.49959713", "0.4942878", "0.4927618", "0.49258378", "0.49005273", "0.48754507", "0.4857296", "0.4853208", "0.4832719", "0.481046", "0.47946295"...
0.63776416
0
metodos metodo para crear persona
public void crearPersona(){ persona = new Persona(); persona.setNombre("Jose"); persona.setCedula(12345678); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void crearNuevaPersona(Persona persona);", "public void create(Person p) {\n\t\t\n\t}", "@Override\r\n\tpublic void create(Person p) \r\n\t{\n\t\t\r\n\t}", "public void CreatePerson(Person p){\n\t\tWeddingConnectionPoolManager con = new WeddingConnectionPoolManager(); \n\t\t Person p1 = new Person(p.getId()...
[ "0.846484", "0.80131274", "0.7738949", "0.7567291", "0.74563205", "0.74136966", "0.73838246", "0.7132897", "0.7132897", "0.71080065", "0.70631105", "0.70286447", "0.6969133", "0.69430655", "0.6909666", "0.69018984", "0.6895878", "0.6892319", "0.6888734", "0.6885759", "0.68643...
0.8181106
1
metodo para mostrar datos de la persona
public void mostrarPersona(){ System.out.println("Nombre: " + persona.getNombre()); System.out.println("Cedula: " + persona.getCedula()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mostrarDatos() {\r\n System.out.println(\"El nombre del cliente es: \" + this.getNombre());\r\n System.out.println(\"El primer apellido es: \" + this.getPrimerApellido());\r\n System.out.println(\"El segundo apellido es: \" + this.getSegundoApellido());\r\n System.out.printl...
[ "0.71626145", "0.70909446", "0.7070012", "0.7046698", "0.69264066", "0.6896772", "0.68578243", "0.6791878", "0.6654108", "0.65558094", "0.65314245", "0.6465523", "0.6444806", "0.6439064", "0.64377224", "0.6426238", "0.63977075", "0.63788766", "0.635563", "0.63499695", "0.6330...
0.8234247
0
metodo para crear automovil
public void crearAutomovil(){ automovil = new Vehiculo(); automovil.setMarca("BMW"); automovil.setModelo(2010); automovil.setPlaca("TWS435"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Anuncio creaAnuncioTematico();", "public abstract Anuncio creaAnuncioGeneral();", "public void create() {\n\t\t\n\t}", "Oracion createOracion();", "Compleja createCompleja();", "@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}", "public abstract Anuncio creaAnuncioIndividualiza...
[ "0.6495235", "0.6465843", "0.6300872", "0.62493575", "0.6218243", "0.6177469", "0.6171597", "0.6149347", "0.61437875", "0.6106166", "0.6100428", "0.6085236", "0.60710365", "0.6054169", "0.605316", "0.60436237", "0.6006945", "0.5987459", "0.5944883", "0.5912858", "0.5906271", ...
0.7457805
0
metodo para mostrar datos del automovil
public void mostrarAutomovil(){ System.out.println("Marca: " + automovil.getMarca()); System.out.println("Modelo: " + automovil.getModelo()); System.out.println("Placa: " + automovil.getPlaca()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void mostrarDados() {\n\t\t\n\t}", "public void mostrarDatos() {\r\n System.out.println(\"El nombre del cliente es: \" + this.getNombre());\r\n System.out.println(\"El primer apellido es: \" + this.getPrimerApellido());\r\n System.out.println(\"El segundo apellido es: \" ...
[ "0.66572124", "0.6620795", "0.6592598", "0.65058166", "0.6485971", "0.6419216", "0.6412213", "0.63943726", "0.6351781", "0.63425666", "0.63200814", "0.6319772", "0.63195103", "0.6269425", "0.62653375", "0.6250371", "0.6222847", "0.6190443", "0.6183661", "0.61735153", "0.61643...
0.79724735
0
asignar la clase persona a la clase automovil
public void asignarAutomovilPersona(){ persona.setAutomovil(automovil); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void asignarClase(int clase);", "public void construirCargo() {\n persona.setCargo(Cargos.SUPERVISOR);\n }", "public void nascitaAgnello() {\n\t\tpecore.add(new Agnello());\n\t\tnumeroAgelli++;\n\t}", "public void automovil(){\r\n System.out.println(\"Ingrese placa: \");\r\n pl...
[ "0.6787596", "0.6338639", "0.61755264", "0.60794157", "0.6039141", "0.6011293", "0.6004293", "0.5960204", "0.59417737", "0.5926485", "0.5919156", "0.588521", "0.5838728", "0.58335435", "0.5811737", "0.578345", "0.5780884", "0.5768974", "0.5767288", "0.57577556", "0.57033026",...
0.79091865
0
Creates the ActiveMQ Broker, which is listening on the URL BROKER_URL
@Bean BrokerService broker() throws Exception { BrokerService broker = new BrokerService(); // configure the broker broker.addConnector(BROKER_URL); broker.start(); return broker; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static DatacenterBroker createBroker(){\n\n\t\tDatacenterBroker broker = null;\n\t\ttry {\n\t\t\tbroker = new DatacenterBroker(\"Broker\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t\treturn broker;\n\t}", "private void setupBroker(String uri) {\n try {...
[ "0.6762005", "0.65469784", "0.6217145", "0.61282694", "0.59298044", "0.5877603", "0.58518803", "0.57685536", "0.57525164", "0.5575111", "0.5558444", "0.554343", "0.55341285", "0.5475879", "0.54596865", "0.53898007", "0.53711146", "0.5367868", "0.5359284", "0.5335837", "0.5333...
0.71919197
0
Creates the connection factory to connect to the broker
@Bean ActiveMQConnectionFactory connectionFactory() { ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(BROKER_URL); return connectionFactory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createConnection() {\n this.callbacks = getCallbacks();\n\n Properties props = new Properties();\n props.putAll(getTestProps());\n props.putAll(getProps());\n this.connection = Connections.create((ConnectionCallbacks) callbacks, props);\n configureConnection(c...
[ "0.69724345", "0.66450566", "0.66145205", "0.6519932", "0.6463706", "0.6403766", "0.63509065", "0.63258374", "0.61197156", "0.61143327", "0.6104527", "0.6101801", "0.6055812", "0.605495", "0.60024875", "0.5970798", "0.59413904", "0.5913599", "0.5899801", "0.58669376", "0.5836...
0.66582954
1
Message listener adapter to listen on new messages
@Bean MessageListenerAdapter adapter(final Receiver receiver) { MessageListenerAdapter messageListener = new MessageListenerAdapter(receiver); messageListener.setDefaultListenerMethod("receiveMessage"); return messageListener; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void addMessageReceivedListener(MessageReceivedListener messageReceivedListener) {\n\n\t}", "@Override\r\n public void setListener() {\n input.setInputListener(this);\r\n\r\n //bind load more listener, it will track scroll up\r\n messagesAdapter.setLoadMoreListener(thi...
[ "0.76486737", "0.7607106", "0.725911", "0.723076", "0.6966563", "0.6946663", "0.6865775", "0.6861961", "0.68415713", "0.68190736", "0.6737756", "0.6735256", "0.670578", "0.6683428", "0.6664629", "0.664691", "0.6641266", "0.66146946", "0.6604346", "0.65853626", "0.65735894", ...
0.63067585
45
Creates the listener container which connects the listener with the destination
@Bean SimpleMessageListenerContainer container(final MessageListenerAdapter messageListener, final ConnectionFactory connectionFactory) { SimpleMessageListenerContainer container = new SimpleMessageListenerContainer(); container.setMessageListener(messageListener); container.setConnectionFactory(con...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createAndListen() {\n\n\t\t\n\t}", "@Override\r\n\tnative long createListenerProxy(EventSink eventSink);", "WithCreate withDestination(EventChannelDestination destination);", "public SimpleMessageListenerContainer() {\n\t}", "Future<CreateListenerResponse> createListener(\n CreateLi...
[ "0.65735394", "0.5930692", "0.5914101", "0.57666457", "0.5678457", "0.5656262", "0.5619613", "0.5604012", "0.53921604", "0.5345176", "0.53274935", "0.53188217", "0.53182876", "0.529274", "0.5271293", "0.5267569", "0.52647835", "0.52456933", "0.5214078", "0.51640326", "0.51597...
0.612895
1