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
Gets the productId for the resource.
public String getProductId();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getProductId() {\n return productId;\n }", "public String getProductId() {\n return productId;\n }", "public String getProductId() {\n return productId;\n }", "public String getProductId() {\n return productId;\n }", "public String getProductId() {\n ...
[ "0.7320712", "0.7320712", "0.7320712", "0.7320712", "0.7320712", "0.72804826", "0.7267517", "0.72403187", "0.72403187", "0.723003", "0.721322", "0.721322", "0.721322", "0.721322", "0.721322", "0.721322", "0.7153001", "0.7150218", "0.71429765", "0.7115671", "0.70035154", "0....
0.65912294
37
Gets the edition of the product, if applicable.
public String getProductEdition();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getEdition() {\n return edition;\n }", "public double getEdition() {\n return edition;\n }", "public int getEdition() {\n return edition;\n }", "public int getEdition() {\n\treturn edition;\n}", "public String getEdition() {\n return FxSharedUtils.getFlexi...
[ "0.78713894", "0.78713894", "0.7823473", "0.7614431", "0.7234818", "0.7102713", "0.70049727", "0.6900168", "0.65479296", "0.6503037", "0.6447659", "0.6402883", "0.63987887", "0.62741643", "0.62233347", "0.6156554", "0.6156554", "0.5982481", "0.59403217", "0.5914501", "0.58833...
0.8217413
0
Gets the install type of the product (e.g. "Archive")
public String getProductInstallType();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.math.BigInteger getInstallmentType();", "public String getType() {\r\n\t\treturn productType;\r\n\t}", "org.apache.xmlbeans.XmlInteger xgetInstallmentType();", "public String getProductType() {\n\t\treturn productType;\n\t}", "IntegerResource installationType();", "public Class getType() {\n ...
[ "0.7291171", "0.7072623", "0.69923115", "0.69607747", "0.66720223", "0.63932824", "0.62202746", "0.6182165", "0.6107353", "0.6037285", "0.59868747", "0.5980379", "0.59407884", "0.59111947", "0.5909157", "0.58858156", "0.58817166", "0.5831464", "0.5826283", "0.5820893", "0.579...
0.8874255
0
Gets the version of the product
public String getProductVersion();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String getEISProductVersion() throws ResourceException {\n return repository.getDescriptor(Repository.REP_VERSION_DESC);\n }", "public String getVersion()\n {\n return ver;\n }", "public Version getVersion();", "int getCurrentVersion();", "public String getVersi...
[ "0.7762599", "0.7355577", "0.73547435", "0.73122674", "0.73016304", "0.72783947", "0.72783947", "0.72783947", "0.72783947", "0.7269519", "0.72597057", "0.72534865", "0.72534865", "0.7250847", "0.72448206", "0.72448206", "0.7237518", "0.7220687", "0.7218813", "0.7218813", "0.7...
0.87450445
0
Gets the features included in this product
public Collection<String> getProvideFeature();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Feature> getFeatures();", "public FeatureSet getFeatures() {\n\treturn features;\n }", "@Nonnull\r\n public Set<Feature> getFeatures() {\r\n return features;\r\n }", "public List<String> getFeatures() {\n return features;\n }", "List<String> getFeatures();", "java.util.List<iet.d...
[ "0.8055995", "0.77862865", "0.7673076", "0.7645578", "0.7557232", "0.73792696", "0.7367158", "0.7190845", "0.7190845", "0.7161573", "0.715554", "0.7092604", "0.7071797", "0.70208555", "0.6999656", "0.69833374", "0.6877577", "0.6863652", "0.66978735", "0.666207", "0.66570026",...
0.6726068
18
Gets the features that this product depends on
public Collection<String> getRequireFeature();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Feature> getFeatures();", "java.util.List<iet.distributed.telemetry.Feature> \n getFeatureList();", "public java.util.List getFeature() \n {\n \tModelFacade instance = ModelFacade.getInstance(this.refOutermostPackage().refMofId());\n \tif (instance != null && \n \t\tinstance.isRepresentat...
[ "0.66412234", "0.664028", "0.6566074", "0.65434813", "0.64407855", "0.63807654", "0.6312146", "0.63080114", "0.63080114", "0.6275546", "0.62729007", "0.62291664", "0.6091692", "0.5980149", "0.59268516", "0.5914572", "0.5875133", "0.5844355", "0.5817895", "0.58163947", "0.5805...
0.60494995
13
Gets the collection of OSGi requirements this product has
public Collection<Requirement> getGenericRequirements();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract List<AbstractRequirement> getRequirements();", "public List<? extends Requirement> getRequirements();", "ImmutableList<ResourceRequirement> getRequirements();", "public String getRequirements() { \n\t\treturn getRequirementsElement().getValue();\n\t}", "public java.util.List<DocumentRequir...
[ "0.7720788", "0.74510455", "0.7306929", "0.6999446", "0.68782234", "0.6607148", "0.63954854", "0.63538873", "0.6314893", "0.61852324", "0.5926041", "0.58594805", "0.5855279", "0.5852072", "0.57914954", "0.57912034", "0.57469785", "0.57045233", "0.56565803", "0.5640375", "0.55...
0.7534911
1
Gets the version information for the Java packaged with this product
public String getPackagedJava();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getProductVersion();", "public static String getJavaVersion() {\n return JavaEnvUtils.getJavaVersion();\n }", "public String getOctaveInJavaVersion() {\n\t//System.out.println(\"MANIFEST_INFO: \"+MANIFEST_INFO);\n\t//return MANIFEST_INFO.getImplVersion();\n\treturn this.getClass().get...
[ "0.71770877", "0.71294916", "0.70831376", "0.70239097", "0.69561017", "0.6921743", "0.6888995", "0.6888995", "0.6888995", "0.6888995", "0.6870502", "0.6870502", "0.6870502", "0.6870502", "0.6870502", "0.6870502", "0.6870502", "0.6870502", "0.67938256", "0.6756218", "0.6756218...
0.0
-1
Step 1: Allocate a database 'Connection' object MySQL: "jdbc:mysql://hostname:port/databaseName", "username", "password"
public static Connection getInstance() { Connection conn = null; try { conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/restaurant?useSSL=false", "root", "1234"); } catch (SQLException e) { e.getStackTrace(); } return conn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setupDatabase()\n {\n try\n {\n Class.forName(\"com.mysql.jdbc.Driver\");\n }\n catch (ClassNotFoundException e)\n {\n simpleEconomy.getLogger().severe(\"Could not load database driver.\");\n simpleEconomy.getServer().getPluginMana...
[ "0.75183207", "0.74943197", "0.74652916", "0.7392174", "0.73391974", "0.73247284", "0.7304147", "0.7298469", "0.7292554", "0.72408265", "0.71750736", "0.7165007", "0.7152659", "0.7139173", "0.7128113", "0.71159285", "0.71126276", "0.71064645", "0.7062888", "0.70565575", "0.70...
0.0
-1
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 Pet)) { return false; } Pet other = (Pet) object; if ((this.idPet == null && other.idPet != null) || (this.idPet != null && !this.idPet.equals(other.idPet))) { 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.6896886", "0.6838461", "0.67056817", "0.66419715", "0.66419715", "0.6592331", "0.6579151", "0.6579151", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.65624106", "0.65624106", "0.65441847", "0.65243006", "0.65154546", "0.6487427", "0.64778...
0.0
-1
Add_place reads in a string for the attribute place
public void Add_place(String p) { place = new String(p); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPlace(String place){\n this.place = place;\n }", "Builder addContentLocation(Place value);", "@Override\n\tpublic synchronized Place addPlace(String label) {\n\t\tPlace p = new Place(this, label);\n\t\tthis.places.add(p);\n\t\tgraphElementAdded(p);\n\t\treturn p;\n\t}", "public Strin...
[ "0.6783822", "0.64325875", "0.6420108", "0.623437", "0.6224436", "0.6207527", "0.60566956", "0.603804", "0.59895873", "0.5984708", "0.59641737", "0.594609", "0.5945657", "0.59439605", "0.59381986", "0.5937254", "0.5936523", "0.5936523", "0.5936523", "0.5936523", "0.58870757",...
0.7887497
0
Get_place Returns the value of place.
public String Get_place() { return place; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getPlace() {\n\t\treturn place;\n\t}", "public String getPlace() {\n return place;\n }", "public String getPlace() {\n return place;\n }", "public String getPlace() {\n return place;\n }", "public String getPlace() {\n return place;\n }", "public fina...
[ "0.8034997", "0.8024391", "0.8024391", "0.8024391", "0.8024391", "0.7943908", "0.79275817", "0.781501", "0.7646749", "0.7229443", "0.72151566", "0.70971924", "0.70960224", "0.7041194", "0.7013578", "0.69819343", "0.6937602", "0.69082105", "0.6868974", "0.6847638", "0.6828572"...
0.82944494
0
Add_date reads in a string for the attribute date
public void Add_date(String d) { date = new String(d); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addDate(Date value) {\n/* 132 */ addDateToSeq(\"date\", value);\n/* */ }", "public abstract void add(Date212 date);", "public final void addDate(final String date, final String type)\n throws RIFCSException {\n this.addDate(date, type, \"W3C\");\n }", "@AutoEscape\n...
[ "0.6981904", "0.69288236", "0.67722154", "0.6748723", "0.66766626", "0.6494159", "0.6311572", "0.6177558", "0.6156085", "0.6146589", "0.61413527", "0.612744", "0.610419", "0.6095237", "0.59750026", "0.59717757", "0.59616435", "0.595714", "0.5930002", "0.59283495", "0.5900202"...
0.7088601
0
Get_date Returns the value of date.
public String Get_date() { return date; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Date getDate();", "Date getDate();", "Date getDate();", "java.lang.String getDate();", "public Date getdate() {\n\t\treturn new Date(date.getTime());\n\t}", "String getDate();", "String getDate();", "Date getEDate();", "Date getForDate();", "java.lang.String getToDate();", "public String getDat...
[ "0.7163515", "0.7163515", "0.7163515", "0.6893597", "0.6832022", "0.6771611", "0.6771611", "0.6761479", "0.6732777", "0.67267334", "0.67191917", "0.66410846", "0.65730447", "0.65045923", "0.6485778", "0.64810944", "0.64667135", "0.6438686", "0.6438686", "0.64089715", "0.63729...
0.7124135
3
Add_event_value Reads in a string for the attribute event_value
public void Add_event_value(String v) { event_value = new String(v); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String Get_event_value() \n {\n\n return event_value;\n }", "public void setAttrEventValue(String attrEventValue) {\r\n\t\tthis.attrEventValue = attrEventValue;\r\n\t}", "@JsonSetter(\"event\")\r\n public void setEvent (String value) { \r\n this.event = value;\r\n }", "public voi...
[ "0.6474325", "0.63055027", "0.624733", "0.60754764", "0.58851254", "0.5882504", "0.582215", "0.57181394", "0.5668108", "0.5653604", "0.56228507", "0.5586326", "0.55564255", "0.55560696", "0.554705", "0.5534963", "0.5524146", "0.55066925", "0.55029595", "0.5484205", "0.5454229...
0.79784846
0
Get_event_value Returns the value of event_value.
public String Get_event_value() { return event_value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getEventValue() {\n return event_;\n }", "public int getEventValue() {\n return event_;\n }", "public String getAttrEventValue() {\r\n\t\treturn attrEventValue;\r\n\t}", "int getEventValue();", "public E getValue() {\r\n return value;\r\n }", "public E getValue() ...
[ "0.7812749", "0.78095925", "0.7215722", "0.7148197", "0.6017698", "0.6014344", "0.5993876", "0.59918797", "0.59906197", "0.59687877", "0.59638673", "0.59403276", "0.58968556", "0.58909386", "0.58870345", "0.5839991", "0.58289057", "0.5824276", "0.5819932", "0.5811286", "0.581...
0.8394332
0
Print_place Prints the value of place.
public void Print_place() { System.out.println("Place: " + place); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printList(ETPlace place) {\n place.getName();\n\n\n }", "public String getPlace() {\n\t\treturn place;\n\t}", "public String Get_place() \n {\n\n return place;\n }", "public String getPlace() {\n return place;\n }", "public String getPlace() {\n return place;...
[ "0.75413656", "0.726943", "0.7171017", "0.7164454", "0.7164454", "0.7164454", "0.7164454", "0.71511084", "0.69163734", "0.68637645", "0.67184055", "0.6538329", "0.64284915", "0.6420717", "0.63103026", "0.62643903", "0.6179832", "0.6179768", "0.6113513", "0.6113118", "0.609457...
0.90599316
0
Print_date Prints the value of date.
public void Print_date() { System.out.println("Date: " + date); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void printdate(date iDate)\n {\n System.out.println(iDate.getElementValue());\n }", "public void printDate() {\r\n printDayOfWeek();\r\n System.out.println(cur.getDay());\r\n printMonth();\r\n System.out.println(cur.getYear());\r\n }", "public void displayDate() {\n\t\tSyste...
[ "0.7863891", "0.78035843", "0.77932817", "0.7405534", "0.7231651", "0.7113416", "0.6998862", "0.6985278", "0.68750054", "0.6830458", "0.6810138", "0.67284536", "0.67283887", "0.67143273", "0.65176105", "0.65018976", "0.6410196", "0.6391906", "0.63139015", "0.6305351", "0.6267...
0.8647693
0
Print_event_value Prints the value of event_value.
public void Print_event_value(String v) { System.out.println(v + ": " + event_value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String Get_event_value() \n {\n\n return event_value;\n }", "protected void printEvent(Event event) {\n System.out.println(\"\\t\" + event.getName());\n System.out.println(\"\\t\" + event.getDate().getDate());\n System.out.println(\"\\t\" + event.getTime().get12HTime());\n\n ...
[ "0.7413669", "0.6773892", "0.62231934", "0.6115133", "0.59720945", "0.5948886", "0.59378666", "0.586366", "0.58474517", "0.5662734", "0.5633647", "0.55550325", "0.5537706", "0.54763734", "0.54512995", "0.5399315", "0.5389286", "0.5387289", "0.53725487", "0.5359013", "0.535533...
0.8052603
0
Instantiates a new Config service.
@Autowired public ConfigService(ConfigRepository repo, RedisTemplate<String, Serializable> redisTemplate) { super(repo); this.redisTemplate = redisTemplate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Config() {\n this(System.getProperties());\n\n }", "public ConfigManager() {\n // Nobody here.\n }", "public DirectProjectCPConfigServiceImpl() {\r\n // Empty\r\n }", "private Config() {\n }", "public ConfigExample() {\n }", "public Config() {\n\t\t// TODO Auto-generated ...
[ "0.65935326", "0.6531135", "0.6429633", "0.6329788", "0.6248292", "0.6174046", "0.6154654", "0.6151816", "0.6151816", "0.60678136", "0.6038498", "0.60374737", "0.60240227", "0.6008803", "0.5984282", "0.5984282", "0.59826547", "0.59784466", "0.59599763", "0.5901279", "0.589864...
0.5653752
36
TODO Autogenerated method stub
@Override public void run() { super.run(); try { join.join(); } catch (InterruptedException 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
Generates/calculates firebasefashion unique messagethreadID by appending lexicographically bigger uid to the smaller uid. It represents one_to_one unique relationship and can be used to store unique Data object into firebase facilitating its retrieval by enforcing consistent protocol
public static String calculateMessageThreadID(String uid1, String uid2) { // TODO again no need for second id , this is always calculated for currently logged in user of application - me // compare user ids lexicographically , we always want smaller uid at start if (uid1.compareTo(uid2) < 0) { // should be equivalent to uid1 < uid2 return uid1 + uid2; } else { return uid2 + uid1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long getToUid();", "public int genID() {\n int uid = this.hashCode();\n if (uid < 0) {\n uid = Math.abs(uid);\n uid = uid * 15551;\n }\n return uid;\n }", "long getUid();", "long getUid();", "@Override\n\tpublic native final String createUniqueId() /*-{\...
[ "0.62189597", "0.6055563", "0.60514736", "0.60514736", "0.6026451", "0.5999047", "0.5826949", "0.58262956", "0.582424", "0.5802511", "0.5797746", "0.579699", "0.5789358", "0.57813585", "0.5717971", "0.57179475", "0.57179475", "0.5715978", "0.5715978", "0.57131726", "0.5707318...
0.6482643
0
"ddMMyyyy kk:mm:ss" format or any other provided combination, calculated from timestamp
public static String calcDateStringFromTimestamp(String s, long timestamp) { Calendar cal = Calendar.getInstance(Locale.ENGLISH); cal.setTimeInMillis(timestamp); String date = DateFormat.format(s, cal).toString(); return date; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getTimestamp() \n{\n Calendar now = Calendar.getInstance();\n return String.format(\"20%1$ty-%1$tm-%1$td_%1$tHh%1$tMm%1$tSs\", now);\n}", "private String syncTimeStamp(String timestamp){\r\n StringBuilder dateBuilder = new StringBuilder(timestamp);\r\n String time = dateBuilder....
[ "0.6691057", "0.6664041", "0.6418683", "0.64054537", "0.62668663", "0.62503487", "0.6152484", "0.61452156", "0.61101615", "0.61014545", "0.60937357", "0.60646045", "0.60570574", "0.60430664", "0.60430664", "0.60307455", "0.6024836", "0.60236347", "0.60236347", "0.59774345", "...
0.6071519
11
Used for testing to inject a writer.
public static int execute(String[] args, Writer writer) { return new CommandLine(new Main(args, writer)).execute(args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setupWriter() {\n output = new StringWriter();\n writer = new PrintWriter(output);\n }", "public void setWriter(Writer writer) {\n this.writer = writer;\n }", "@Test\r\n\tpublic void testWriter() {\r\n\t\tString s = \"This is a test of the writer\";\r\n\t\tWriter w = new...
[ "0.692939", "0.65342605", "0.6349006", "0.6240684", "0.6212027", "0.616109", "0.6087653", "0.60698694", "0.6055255", "0.6051559", "0.6037211", "0.60327387", "0.6027639", "0.5928061", "0.58913594", "0.581808", "0.5811306", "0.57975817", "0.57829905", "0.5741914", "0.57378376",...
0.0
-1
set system properties as soon as possible
@Override public Integer call() { if (properties != null && !properties.isEmpty()) { System.getProperties().putAll(properties); } final List<File> templateDirectories = getTemplateDirectories(baseDir); final Settings settings = Settings.builder() .setArgs(args) .setTemplateDirectories(templateDirectories) .setTemplateName(template) .setSourceEncoding(sourceEncoding) .setOutputEncoding(outputEncoding) .setOutputFile(outputFile) .setInclude(include) .setLocale(locale) .isReadFromStdin(readFromStdin) .isEnvironmentExposed(isEnvironmentExposed) .setSources(sources != null ? sources : new ArrayList<>()) .setProperties(properties != null ? properties : new HashMap<>()) .setWriter(writer(outputFile, outputEncoding)) .build(); try { return new FreeMarkerTask(settings).call(); } finally { if (settings.hasOutputFile()) { close(settings.getWriter()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSystemProperties() {\n Properties systemP = System.getProperties();\n Enumeration e = systemP.propertyNames();\n while (e.hasMoreElements()) {\n String propertyName = (String) e.nextElement();\n String value = systemP.getProperty(propertyName);\n ...
[ "0.81952983", "0.80272967", "0.748038", "0.74550545", "0.7248848", "0.72217417", "0.70742136", "0.6776774", "0.6652174", "0.6522814", "0.64687127", "0.645365", "0.6429217", "0.63745683", "0.6336217", "0.63280934", "0.6272205", "0.6245196", "0.62160915", "0.6205576", "0.615832...
0.0
-1
this include source, static property
public void sinclude(Context source){ for (String str : sexport.keySet()){ if (sexport.get(str) && source.get(str) != null){ set(str, source.get(str)); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Source getSrc();", "@Override\n public String getSource() {\n return this.src;\n }", "public String get_source() {\n\t\treturn source;\n\t}", "public abstract String getSource();", "protected Source getSource() {\r\n return source;\r\n }", "public String getSourceFileName() { return sourc...
[ "0.65107346", "0.63152283", "0.6131428", "0.61141485", "0.60854405", "0.6059148", "0.60533464", "0.60355055", "0.60132587", "0.5959744", "0.5917792", "0.5898165", "0.5883429", "0.58753145", "0.58515656", "0.584464", "0.584165", "0.584165", "0.584165", "0.58378345", "0.5830440...
0.5319376
90
export this to target, dynamic property
void export(Context target){ for (String str : export.keySet()){ if (export(str)){ target.export(str, get(str)); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object getTarget();", "Object getTarget();", "@Override\n\tpublic VType getTarget() {\n\t\t// TODO: Add your code here\n\t\treturn super.to;\n\t}", "Variable getTargetVariable();", "public String getSetPropertyTarget() {\n \n return this.setPropertyTarget;\n }", "public Object getTargetValue(...
[ "0.5897469", "0.5897469", "0.57513446", "0.5699069", "0.5660019", "0.5503112", "0.5473593", "0.5369564", "0.5343552", "0.5302256", "0.52952445", "0.5275761", "0.5267681", "0.5267681", "0.52664053", "0.52557856", "0.5234724", "0.52119446", "0.5186113", "0.5179116", "0.5173854"...
0.0
-1
add values clause to query
public Context addValue(String value) { String squery = getQueryString(); if (getURI() == null && squery != null) { setQueryString(squery + value); } return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static DbQuery createValueQuery() {\n DbQuery query = new DbQuery();\n query.order = OrderBy.VALUE;\n return query;\n }", "@Override\n\t\tpublic String toSQL() {\n\t\t\tStringBuilder sb=new StringBuilder();\n\t\t\tsb.append(fieldName).append(\" IN (\");\n\t\t\tboolean first=true;\n\t\t\tf...
[ "0.67134655", "0.6313303", "0.60681677", "0.5846949", "0.5820661", "0.56955767", "0.5606209", "0.5514471", "0.5476714", "0.540031", "0.5396023", "0.5357695", "0.5327121", "0.53164935", "0.53043777", "0.53036153", "0.52978015", "0.52849305", "0.5250766", "0.52507645", "0.52334...
0.0
-1
TODO: 2/19/19 Create a algorithm to find the words from the dictionary that exists in the input string
public static void main(String[] args) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public KeyWordList extractKeyWords(String input);", "public String function(HashSet<String> Dictionary, String inputString) {\n\n int[] step = new int[inputString.length() + 1];\n\n step[0] = 0;\n\n for (int i = 1; i <= inputString.length(); i++)\n {\n step[i] = -1;\n\n ...
[ "0.7241863", "0.69419086", "0.68336535", "0.67913467", "0.66508746", "0.6456609", "0.6456324", "0.6427917", "0.6417049", "0.64159477", "0.63862103", "0.63716525", "0.63514334", "0.62341434", "0.6219301", "0.6211132", "0.6151512", "0.61224145", "0.60856754", "0.60661834", "0.6...
0.0
-1
called each time a new line was read from the stream.
protected void append(String line) { out.append(line); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void readLine() throws IOException {\n line = reader.readLine(); // null at the end of the source\n currentPos = -1;\n\n if (line != null) {\n lineNum++;\n }\n\n if (line != null) {\n sendMessage(new Message(MessageType.SOURCE_LINE, new Object[]{line...
[ "0.69549114", "0.67379844", "0.6600791", "0.640583", "0.6385043", "0.63421315", "0.6330317", "0.6183181", "0.6179803", "0.6124847", "0.61172146", "0.6111867", "0.6095812", "0.60393703", "0.5923", "0.5919681", "0.5912756", "0.5905535", "0.5900604", "0.58960426", "0.58960354", ...
0.0
-1
attaches output readers to a process which log to stderr and strout.
public void attach(Process p) { if (stdout == null) stdout = new StdOutReader(); if (stderr == null) stderr = new StdErrReader(); attach(p, stdout, stderr); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void redirectOutput() {\n Process process = _vm.process();\n _errThread = new StreamRedirectThread(\"error reader\", process.getErrorStream(), System.err);\n _outThread = new StreamRedirectThread(\"output reader\", process.getInputStream(), System.out);\n _errThread.start();\n _o...
[ "0.67496043", "0.6161286", "0.61310893", "0.61011946", "0.5958091", "0.5882107", "0.5594982", "0.5517065", "0.5506713", "0.546051", "0.53689027", "0.53618854", "0.535081", "0.5265009", "0.5218081", "0.5182633", "0.513835", "0.51078546", "0.5050441", "0.50318813", "0.5021838",...
0.616533
1
TODO Autogenerated method stub
@Override public String deleteStudent(Integer studentId, Integer classId) { ClassInfo classInfo = classMapper.selectByPrimaryKey(classId); if(classInfo == null) return "fail"; Student stu = new Student(); stu.setId(studentId); stu.setIsDelete(true); int operateResult = studentMapper.updateByPrimaryKeySelective(stu); if(operateResult == 0) { return "fail"; } else { classInfo.setStudentNum(classInfo.getStudentNum() - 1); classInfo.setUpdateDate(new Date()); classMapper.updateByPrimaryKeySelective(classInfo); } return "success"; }
{ "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
setUp() method which runs before every test invocation.
@Override /* Chaque objet utilisé est alors déclaré en tant que variuable d instance de la classe de test initialisé dans la methode setUp() et eventuellement libere dans la methode tearDown */ protected void setUp() throws Exception { cruiseBean = new CruiseBean(); clientCruise = new RestClientCruise(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Before public void setUp() { }", "protected void setUp() {\n\t}", "@Before public void setUp() {\n }", "@Before public void setUp() {\n }", "@Before public void setUp() {\n }", "@Before public void setUp() {\n }", "@Before public void setUp() {\n }", "@Before\n\t public void setUp() {\n\t...
[ "0.8813886", "0.8775346", "0.86564493", "0.86564493", "0.86564493", "0.86564493", "0.86564493", "0.86415476", "0.8626013", "0.8626013", "0.85905623", "0.8541961", "0.8474956", "0.84740394", "0.84739745", "0.8440265", "0.8432147", "0.8429436", "0.8416813", "0.84012413", "0.837...
0.0
-1
The constructor for the Weapon class is called when we want to create objects of the misc class with a specific set of instace variables.
public Misc(boolean pickup, String name, boolean useable, int weight, int capacity) { super(pickup, name, useable, weight, capacity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Weapon ()\r\n\t{\r\n\t\t//no default values for Weapon attributes are set here as the specific weapon type unspecified at super level\r\n\t}", "public Weapon() {\n this(Weapon.defaultName, 0, new Level(0), 0, 0);\n }", "public Weapon(){\n \n name = \"Claw\"; // will be treated as a sword...
[ "0.8390374", "0.8161041", "0.8055573", "0.8043703", "0.79443777", "0.7770105", "0.7720213", "0.7595367", "0.7421522", "0.74138236", "0.72938114", "0.7266314", "0.7151892", "0.6999681", "0.6980939", "0.6951008", "0.6936009", "0.68649304", "0.6824575", "0.6766963", "0.6765605",...
0.0
-1
The abstract method which is declared in the abstract class Item is overrided so that The getType method returns the enum value corresponding to this item type
@Override public ItemType getItemType() { return ItemType.MISC; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ItemType getType();", "@Override\n public int getItemType() {\n return ITEM_TYPE;\n }", "public ItemType getType()\n {\n\treturn type;\n }", "public ItemType getType() {\n return type;\n }", "@Override\n\tprotected DataTypes getDataType() {\n\t\treturn DataTypes.ITEM;\n\...
[ "0.78566337", "0.7810669", "0.7571878", "0.74775463", "0.69773036", "0.69462883", "0.6875889", "0.6867293", "0.6867293", "0.6867293", "0.67873204", "0.6775534", "0.67716104", "0.6721509", "0.6661252", "0.66505814", "0.66246206", "0.65788233", "0.65788233", "0.655458", "0.6540...
0.62110287
70
Gets text of field.
private String getFieldTextValue(final JsonNode rootNode, final String fieldName) { JsonNode node = rootNode.get(fieldName); return node == null ? null : node.textValue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getText()\n {\n return field.getText();\n }", "public String getText() {\r\n\r\n return field.getText();\r\n\r\n }", "public String getTextFromTextField() {\r\n\t\treturn textField.getText();\r\n\t}", "public String getText() {\n return textField.getText();\n }", ...
[ "0.8807903", "0.8734828", "0.8570302", "0.84493595", "0.8277643", "0.81350434", "0.8085766", "0.8085766", "0.8085766", "0.8085766", "0.8085766", "0.8085766", "0.8085766", "0.8085766", "0.8023131", "0.7940508", "0.79340076", "0.7809905", "0.7794129", "0.77841", "0.7775876", ...
0.0
-1
TODO Autogenerated method stub
@Override public Object getModel() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
/ USER INTERFACE ACTIONS
@Override protected BaseItemsGrid createItemsGrid() { return new AdminItemGrid(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface OnUserActionListener {\n\n /**\n * Handles on list item click\n * @param user {@link User}\n * @param action int\n */\n\n public void onUserListItemClicked(User user, int action, int position);\n\n /**\n * Adds new user to remote database via API methods\n * @param...
[ "0.7196487", "0.69977385", "0.6991073", "0.6904559", "0.6875954", "0.6856732", "0.6856732", "0.6856732", "0.68494785", "0.6840679", "0.68147343", "0.6720909", "0.66732913", "0.66626227", "0.66249055", "0.6578292", "0.65725607", "0.6531191", "0.65094864", "0.6504299", "0.64412...
0.0
-1
Do something in response to button
public void refresh() { ConnectivityManager connMgr = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo networkInfo = connMgr.getActiveNetworkInfo(); if (networkInfo != null && networkInfo.isConnected()) { // fetch data DownloadXmlTask task = new DownloadXmlTask(); task.execute("http://api.androidhive.info/pizza/?format=xml"); } else { // display error Log.v("Network", "Error: Network is not available"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void buttonClicked();", "void okButtonClicked();", "public abstract void executeBagButton();", "public void buttonClicked() {\n mSanitizorGame.buttonClicked();\n }", "@Override\n\t\t\tpublic void handle(ActionEvent arg0) {\n\t\t\t\tcon.setResult(btnName);\n\t\t\t}", "protected abstract v...
[ "0.7249539", "0.7046709", "0.70039433", "0.69802755", "0.695", "0.6894674", "0.6863211", "0.68525434", "0.68110895", "0.67752886", "0.6759465", "0.67581564", "0.6724986", "0.67210263", "0.66999584", "0.6679764", "0.6672251", "0.66687185", "0.6659886", "0.6655422", "0.6649388"...
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.6862...
0.0
-1
Parses the contents of an entry. If it encounters a title, summary, or link tag, hands them off to their respective "read" methods for processing. Otherwise, skips the tag.
private Entry readEntry(XmlPullParser parser) throws XmlPullParserException, IOException { parser.require(XmlPullParser.START_TAG, ns, "entry"); String title = null; String summary = null; String link = null; while (parser.next() != XmlPullParser.END_TAG) { if (parser.getEventType() != XmlPullParser.START_TAG) { continue; } String name = parser.getName(); if (name.equals("title")) { title = readTitle(parser); } else if (name.equals("summary")) { summary = readSummary(parser); } else if (name.equals("link")) { link = readLink(parser); } else { skip(parser); } } return new Entry(title, summary, link); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void readEntry(XmlPullParser parser) throws XmlPullParserException, IOException {\n\n while (parser.next() != XmlPullParser.END_TAG) {\n if (parser.getEventType() != XmlPullParser.START_TAG) {\n continue;\n }\n String name = parser.getName();\n\n ...
[ "0.6167862", "0.57353157", "0.5678094", "0.5540308", "0.53899413", "0.530331", "0.52670544", "0.5260317", "0.524297", "0.5127693", "0.5030613", "0.5029715", "0.49812347", "0.49630463", "0.49595594", "0.4959523", "0.49524784", "0.49250296", "0.48774752", "0.48654342", "0.48654...
0.68942046
0
Processes title tags in the feed.
private String readTitle(XmlPullParser parser) throws IOException, XmlPullParserException { parser.require(XmlPullParser.START_TAG, ns, "title"); String title = readText(parser); parser.require(XmlPullParser.END_TAG, ns, "title"); return title; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void prepareTitle()\n {\n DuelTitle title = new DuelTitle();\n addObject(title, 539, 186);\n }", "private void parseTitleField() {\n\t\tif (track.length() == 0) {\n\t\t\tString titleLC = title.toLowerCase();\n\t\t\tfor (Entry<String, String> entry : trackPrefixes.entrySet()) {\n\t\t\t\...
[ "0.6638129", "0.6634174", "0.6613111", "0.62713784", "0.6144391", "0.6121105", "0.61152434", "0.6106296", "0.6101524", "0.60855347", "0.6059316", "0.6057525", "0.60470605", "0.6028447", "0.60239196", "0.60237765", "0.6018703", "0.59755975", "0.59752244", "0.59752244", "0.5975...
0.6404788
3
Processes link tags in the feed.
private String readLink(XmlPullParser parser) throws IOException, XmlPullParserException { String link = ""; parser.require(XmlPullParser.START_TAG, ns, "link"); String tag = parser.getName(); String relType = parser.getAttributeValue(null, "rel"); if (tag.equals("link")) { if (relType.equals("alternate")){ link = parser.getAttributeValue(null, "href"); parser.nextTag(); } } parser.require(XmlPullParser.END_TAG, ns, "link"); return link; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<LinkDetails> scrapeRSSPageForLinks(String rssUrl) {\n\t\tString description = \"\";\n\t\tString title = \"\";\n\t\tString link = \"\";\n\t\tString pubdate = \"\";\n\t\tURL url;\n\t\tInputStream in;\n\n\t\tList<LinkDetails> rssProcessedData = new ArrayList<LinkDetails>();\n\n\t\ttry {\n\t\t\turl = new U...
[ "0.60620683", "0.584682", "0.5748492", "0.5684595", "0.56539875", "0.5625383", "0.5594585", "0.5557412", "0.55255425", "0.55255425", "0.55255425", "0.5518538", "0.55121374", "0.5496201", "0.54662794", "0.54656416", "0.5439604", "0.54082054", "0.5406095", "0.5388527", "0.53754...
0.56169575
6
Processes summary tags in the feed.
private String readSummary(XmlPullParser parser) throws IOException, XmlPullParserException { parser.require(XmlPullParser.START_TAG, ns, "summary"); String summary = readText(parser); parser.require(XmlPullParser.END_TAG, ns, "summary"); return summary; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addAnalysisSummary()\r\n throws XMLStreamException\r\n {\r\n SimpleStartElement start;\r\n SimpleEndElement end;\r\n\r\n addNewline();\r\n\r\n start = new SimpleStartElement(\"analysis_summary\");\r\n start.addAttribute(\"analysi...
[ "0.5930794", "0.58696306", "0.5819763", "0.5800748", "0.57307583", "0.5702281", "0.5676239", "0.5554919", "0.5530308", "0.5515013", "0.5457885", "0.53779876", "0.5319724", "0.5275997", "0.517959", "0.5131853", "0.5097585", "0.5080695", "0.50624204", "0.5056656", "0.50502497",...
0.6147796
0
For the tags title and summary, extracts their text values.
private String readText(XmlPullParser parser) throws IOException, XmlPullParserException { String result = ""; if (parser.next() == XmlPullParser.TEXT) { result = parser.getText(); parser.nextTag(); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getText(final String title) {\n\t\treturn getText(title, null);\n\t}", "public abstract CharSequence getSummary();", "static String text(final DocTree tag) {\n for (final DocTree node : ((UnknownBlockTagTree) tag).getContent()) {\n if (node.getKind() == DocTree.Kind.TEXT) {\n ...
[ "0.5925334", "0.5782488", "0.5735099", "0.56942797", "0.5686872", "0.56126153", "0.55194855", "0.5505085", "0.5455561", "0.53412116", "0.5316387", "0.53059715", "0.53059715", "0.5290075", "0.5273801", "0.52681524", "0.5233378", "0.52155966", "0.52048576", "0.51870954", "0.515...
0.5275051
14
Uses AsyncTask to download the XML feed from stackoverflow.com.
public void loadPage() { if((sPref.equals(ANY)) && (wifiConnected || mobileConnected)) { new DownloadXmlTask().execute(URL); } else if ((sPref.equals(WIFI)) && (wifiConnected)) { new DownloadXmlTask().execute(URL); } else { // show error } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void loadXML(){\n new DownloadXmlTask().execute(URL);\n }", "@Override\n\t\t\tpublic void doAsyncTaskInBackground(CustomAsyncTask customAsyncTask) \n\t\t\t{\n\t\t\t\tif(customAsyncTask.tag == DOWNLOAD_APARTMENTS_XML_TAG)\n\t\t\t\t{\n\t\t\t\t\tXMLRequest req = new XMLRequest(Config.APARTMENTS_URL...
[ "0.6870247", "0.6714287", "0.6494753", "0.629877", "0.6276138", "0.6276138", "0.61485136", "0.614733", "0.61217356", "0.6118014", "0.61040926", "0.60669607", "0.6056425", "0.6050626", "0.60435814", "0.6018634", "0.60135263", "0.6005614", "0.5997848", "0.59917074", "0.5978249"...
0.0
-1
Uploads XML from stackoverflow.com, parses it, and combines it with HTML markup. Returns HTML string.
private String loadXmlFromNetwork(String urlString) throws XmlPullParserException, IOException { InputStream stream = null; // Instantiate the parser StackOverflowXmlParser stackOverflowXmlParser = new StackOverflowXmlParser(); List<Entry> entries = null; String title = null; String url = null; String summary = null; Calendar rightNow = Calendar.getInstance(); DateFormat formatter = new SimpleDateFormat("MMM dd h:mmaa"); // Checks whether the user set the preference to include summary text SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this); boolean pref = sharedPrefs.getBoolean("summaryPref", false); StringBuilder htmlString = new StringBuilder(); htmlString.append("<h3>" + "title: " + "</h3>"); htmlString.append("<em>" + " " + formatter.format(rightNow.getTime()) + "</em>"); try { stream = downloadUrl(urlString); entries = stackOverflowXmlParser.parse(stream); // Makes sure that the InputStream is closed after the app is // finished using it. } finally { if (stream != null) { stream.close(); } } // StackOverflowXmlParser returns a List (called "entries") of Entry objects. // Each Entry object represents a single post in the XML feed. // This section processes the entries list to combine each entry with HTML markup. // Each entry is displayed in the UI as a link that optionally includes // a text summary. for (Entry entry : entries) { htmlString.append("<p><a href='"); htmlString.append(entry.link); htmlString.append("'>" + entry.title + "</a></p>"); // If the user set the preference to include summary text, // adds it to the display. if (pref) { htmlString.append(entry.summary); } } return htmlString.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@POST\n\t@Path(\"upload\")\n\t@Produces(MediaType.TEXT_HTML)\n\t//@Consumes(\"mutipart/form-data\")\n\tpublic String uploadDocument(@Context HttpServletRequest request) {\n\t\tString endHTML = \"\";\n\t\ttry{\n\t\t\tLoggingFilter logFilter = new LoggingFilter();\n\t\t\tif(ServletFileUpload.isMultipartContent(reque...
[ "0.5426539", "0.5319674", "0.5275859", "0.490507", "0.4834079", "0.47842756", "0.47373772", "0.47315222", "0.4716053", "0.4700308", "0.46936274", "0.46531427", "0.46525866", "0.46469975", "0.4639817", "0.46376887", "0.4624997", "0.46182844", "0.46134734", "0.46004874", "0.459...
0.59920716
0
Given a string representation of a URL, sets up a connection and gets an input stream.
private InputStream downloadUrl(String urlString) throws IOException { URL url = new URL(urlString); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setReadTimeout(10000 /* milliseconds */); conn.setConnectTimeout(15000 /* milliseconds */); conn.setRequestMethod("GET"); conn.setDoInput(true); // Starts the query conn.connect(); return conn.getInputStream(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public InputStream readStreamFromString(String url) throws IOException {\n\t\tInputStream in;\n\t\tif (url.matches(\"https?://.*\")) {\n\t\t\tURL u = new URL(url);\n\t\t\tURLConnection urlConnection = u.openConnection();\n\t\t\tin = urlConnection.getInputStream();\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tin = findStrea...
[ "0.7012477", "0.6643289", "0.65813196", "0.6479694", "0.64379483", "0.63879025", "0.6372153", "0.6313515", "0.6284357", "0.6244694", "0.61918", "0.6189053", "0.614528", "0.6107976", "0.60896665", "0.6068601", "0.60523623", "0.6024036", "0.6019764", "0.6004966", "0.6001689", ...
0.60212994
18
Constructors Create a detached TBasicSalaryTypeRecord
public TBasicSalaryTypeRecord() { super(jooq.model.tables.TBasicSalaryType.T_BASIC_SALARY_TYPE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TBasicSalaryTypeRecord(org.jooq.types.ULong id, java.lang.Long tenantId, java.lang.String salaryName, java.lang.Byte isParticipateOvertime, java.lang.Byte isParticipateAttendance, java.lang.String salaryDescription, java.sql.Timestamp createTime, java.sql.Timestamp updateTime) {\n\t\tsuper(jooq.model.tables...
[ "0.673312", "0.63215166", "0.63166094", "0.6081016", "0.6066183", "0.6063454", "0.60595834", "0.59625196", "0.5956871", "0.5933795", "0.593364", "0.5917855", "0.5901814", "0.5844708", "0.5787002", "0.5722594", "0.5710979", "0.5645587", "0.5601838", "0.55913407", "0.5535147", ...
0.7718715
0
Create a detached, initialised TBasicSalaryTypeRecord
public TBasicSalaryTypeRecord(org.jooq.types.ULong id, java.lang.Long tenantId, java.lang.String salaryName, java.lang.Byte isParticipateOvertime, java.lang.Byte isParticipateAttendance, java.lang.String salaryDescription, java.sql.Timestamp createTime, java.sql.Timestamp updateTime) { super(jooq.model.tables.TBasicSalaryType.T_BASIC_SALARY_TYPE); setValue(0, id); setValue(1, tenantId); setValue(2, salaryName); setValue(3, isParticipateOvertime); setValue(4, isParticipateAttendance); setValue(5, salaryDescription); setValue(6, createTime); setValue(7, updateTime); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TBasicSalaryTypeRecord() {\n\t\tsuper(jooq.model.tables.TBasicSalaryType.T_BASIC_SALARY_TYPE);\n\t}", "RecordType createRecordType();", "BriefRecordType createBriefRecordType();", "public GO_RecordType() {\n }", "SummaryRecordType createSummaryRecordType();", "RecordPropertyType createRecordPro...
[ "0.75518185", "0.616906", "0.612633", "0.59795845", "0.59569216", "0.58264154", "0.57756937", "0.5754077", "0.5580386", "0.5529916", "0.54698044", "0.54579496", "0.54396814", "0.53819275", "0.5365728", "0.53113186", "0.53020483", "0.52919877", "0.529154", "0.52842015", "0.526...
0.6652895
1
Reduces the number of points GFA smears to allow it to be represented on three 65character lines of text. The point reduction goes through two phases: Phase I It first tries to remove allowable points, one at a time, based on the impact their individual removal would have on the size of the polygon. Specifically, remove points that increase the size of the polygon the least, while not increasing the overall size of the polygon SMEAR_INCREASE_PCT and not allowing any new points to be SMEAR_INCR_DST distance from the original polygon points. The parameters SMEAR_INCREASE_PCT and SMEAR_INCR_DST are set in prefs.tbl. SMEAR_INCREASE_PCT refers to the area percentage increase when a single point is removed from the polygon. Point reduction continues until the polygon can be represented on three 65character lines of text, or no more points can be removed under the above criteria. Phase II If the polygon still cannot be formatted on three 65character lines, logically divide it into two or more sections: 1. FA Area Boundary Clip: First, try to divide the polygon along the FA Area boundary. If this can be accomplished, check the overall size of each part. Any part less than 3K sq nm will remain with the larger portion; any part greater than 3K sq nm will become another AIRMET. Note that the areal clipping behaves the same as the regional clipping and we should make intact the boundary between two FA areas, which means if a polygon is clipped into two sections in two areas, they must share the exact same points along the boundary. 2. Simple Bisection: Check the results from the FA Area Boundary Bisection. Any section that cannot be formatted in three 65character lines of text must be divided. Choose as a dividing segment the two closest opposite points in the polygon array which also does not intersect any part of the polygon. Determine the midpoint of this segment and snap to the closest snap point. Bisect the polygon using this threepoint segment into two new AIRMET polygons. Again, check to make sure these two polygons can be formatted. If not, redivide again except without a midpoint. Two bisections should be sufficient to format correctly. If not, the user must break it up manually (training issue). Note: new smears may be created and added in this routine.
public void reducePoints ( ArrayList<Gfa> glist, ArrayList<Gfa> snapshots) { ArrayList<Gfa> smearList = new ArrayList<Gfa>(); // Do area clipping and bisection for each smear. for ( Gfa gg : glist ) { smearList.addAll( reducePoints( gg, snapshots ) );; } // Replace the smear list with the new list. glist.clear(); glist.addAll( smearList ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Gfa> reducePoints( Gfa smear, ArrayList<Gfa> snapshots ) {\n\t\t\t\t\n\t\tArrayList<Gfa> glist = new ArrayList<Gfa>();\n \n\t\t/*\n\t\t * Step 1 - reduce points on the whole smear polygon. Note that freezing level \n\t\t * contours are point reduced in af_fzlvl2fmt().\n\t\t */ \t\t\n\t\tGfa ...
[ "0.6460811", "0.6294313", "0.608795", "0.5781836", "0.55112785", "0.5061304", "0.5051333", "0.5047011", "0.49572337", "0.49266958", "0.49207297", "0.49170575", "0.490055", "0.49000615", "0.48473978", "0.47535357", "0.4734641", "0.47311452", "0.47160187", "0.46735644", "0.4672...
0.56828374
4
Reduce points for a single smear.
public ArrayList<Gfa> reducePoints( Gfa smear, ArrayList<Gfa> snapshots ) { ArrayList<Gfa> glist = new ArrayList<Gfa>(); /* * Step 1 - reduce points on the whole smear polygon. Note that freezing level * contours are point reduced in af_fzlvl2fmt(). */ Gfa tSmear = regularPointReduction( smear ); /* * Create a smear with the reduced points and return if the smear can be * formatted into 3-line text now. */ if ( canBeFormatted( tSmear ) ) { smear.setPointsOnly( tSmear.getPoints() ); smear.setReduceFlags( tSmear.getReduceFlags() ); glist.add( smear ); return glist; } /* * Step 2 - Do area clipping to split up the ORIGINAL smear * along area boundary, if needed. */ ArrayList<Gfa> listOfAreaClip = new ArrayList<Gfa>(); listOfAreaClip.addAll( faAreaClip( smear, snapshots ) ); // Step 3 - Do first round of bisection, if necessary. ArrayList<Gfa> listOfFirstBisect = new ArrayList<Gfa>(); for ( Gfa gg : listOfAreaClip ) { //First do point reduction on each of the clipped smears. Gfa tmpSmear = regularPointReduction( gg ); gg.setPointsOnly( tmpSmear.getPoints() ); gg.setReduceFlags( tmpSmear.getReduceFlags() ); if ( canBeFormatted( tmpSmear ) ) { glist.add( gg ); } else { listOfFirstBisect.addAll( bisect( gg, true ) ); } } //See if any middle point are generated in bisection. Coordinate midPt = null; if ( listOfFirstBisect.size() > 0 ) { midPt = (Coordinate)listOfFirstBisect.get(0).getAttribute( BISECT_MIDDLE_POINT ); } // Step 4 - Do second round of bisection, if necessary. for ( Gfa gg : listOfFirstBisect ) { //First do point reduction on each of the bisected smears. Gfa tmpSmear = regularPointReduction( gg ); gg.setPointsOnly( tmpSmear.getPoints() ); gg.setReduceFlags( tmpSmear.getReduceFlags() ); if ( canBeFormatted( tmpSmear ) ) { glist.add( gg ); } else { //Another round of bisect, done. glist.addAll( bisect( gg, false) ); } } // // If bisection happens, check if the middle point generated in the first round // has been used for the second round. If not, remove the middle point from // all smears. // boolean removeMidPt = false; if ( midPt != null ) { int ii = 0; for ( Gfa gg : glist ) { for ( Coordinate cc : gg.getPoints() ) { if ( GfaSnap.getInstance().isSamePoint( cc , midPt, GfaSnap.MAP_PRECISION ) ) { ii++; break; } } } if ( ii < 3 ) { removeMidPt = true; } } if ( removeMidPt ) { for ( Gfa gg : glist ) { Coordinate removePt = null; for ( Coordinate cc : gg.getPoints() ) { if ( GfaSnap.getInstance().isSamePoint( cc , midPt, GfaSnap.MAP_PRECISION ) ) { removePt = cc; break; } } if ( removePt != null ) gg.getPoints().remove( removePt ) ; } } return glist; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Gfa regularPointReduction( Gfa smearIn ) {\n\t\t\n\t\tArrayList<Coordinate> xyList = new ArrayList<Coordinate>( smearIn.getPoints() );\n\t List<Integer> reduceFlg = new ArrayList<Integer>(); \n\t List<Integer> orig = new ArrayList<Integer>();\n\t\t\n\t boolean[] reduceF = smearIn.getReduceFlags();...
[ "0.7366695", "0.6224911", "0.57745814", "0.5707575", "0.5495555", "0.53279483", "0.52185273", "0.5191471", "0.5140718", "0.5110331", "0.50394654", "0.5002475", "0.49769026", "0.49760085", "0.49668926", "0.4957917", "0.49545497", "0.4952747", "0.4919232", "0.4914396", "0.49052...
0.6694572
1
Check if a smear can be formatted into 3 65character lines
public static boolean canBeFormatted( Gfa smear ) { boolean formattable = false; if ( !smear.isSnapshot() ) { String prefix = getPrefixString( smear );; formattable = canBeFormatted( smear.getPoints(), prefix ); } return formattable; // return ( smear.getLinePoints().length <= 5 ) ? true : false; //test purpose only }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void WarningForOverThreeLines( Gfa smear ) {\n\t\t\n\t\tif ( !smear.isSnapshot() ) { \n\t\t String prefix = getPrefixString( smear );\n\t\t \n\t\t boolean formattable = \tcanBeFormatted( smear.getPoints(), prefix );\n\t\t \n\t\t if ( !formattable ) {\n\t\t\t Strin...
[ "0.59478384", "0.5932211", "0.5864419", "0.58194", "0.57693166", "0.57503814", "0.57238257", "0.5668652", "0.56655705", "0.5630078", "0.5585119", "0.557496", "0.5517565", "0.5431859", "0.53915435", "0.5380142", "0.53643245", "0.5340542", "0.5323474", "0.53211814", "0.5309948"...
0.60422546
0
/ Return the proper prefix string based on type of the smear.
private static String getPrefixString( Gfa smear ) { String prefix = ""; if ( !smear.isSnapshot() ) { if ( smear.isOutlook() ) { prefix = Gfa.BOUNDED_BY; } else { prefix = Gfa.FROM; } } return prefix; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String getPrefix();", "public String getStrainPrefix(Db db)\n\t{\n\t\tString prefix = dbHelper.getDbValue(\"exec spMet_getStrainPrefix '\" \n\t\t\t\t+ getStrainType() + \"'\", db);\n\t\tString suffix = dbHelper.getDbValue(\"exec spMet_getIDSuffix\", db);\n\t\tif(WtUtils.isNullOrBlank(suffix))\n\t...
[ "0.7186854", "0.7045212", "0.6930993", "0.6930993", "0.6930993", "0.6930993", "0.69060814", "0.67595434", "0.6739559", "0.6739559", "0.6704556", "0.6635648", "0.65954226", "0.6555723", "0.6521035", "0.64759934", "0.6379263", "0.63506514", "0.6335811", "0.6254203", "0.62531203...
0.7675362
0
/ Check if a list of points can be formatted into 3 65character lines Note: the points are assumed to be in map coordinate.
private static boolean canBeFormatted( ArrayList<Coordinate> pts, String prefix ) { return ReduceGfaPointsUtil.canFormatted( pts, prefix ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean checkLines(List<Point> as) {\n\t\treturn this.trk.containsAll(as);\n\t}", "public Boolean checkCapture(ArrayList<Point> points){\n int length = points.size();\n\n for (int i = 1; i < length; i++) {\n Point lineA = points.get(i);\n\n for (int j = i + 1; j < lengt...
[ "0.59068346", "0.5874666", "0.5874264", "0.58077246", "0.5805947", "0.57047427", "0.5688051", "0.5651252", "0.56454355", "0.5586125", "0.55731535", "0.5326418", "0.5309816", "0.5305079", "0.5252677", "0.5197324", "0.5168891", "0.5166453", "0.5159631", "0.5129536", "0.5127706"...
0.72095865
0
Clips the smear polygon against its FA area AND adjacent area if the points on the polygon cannot be represented on three 65character lines of text. Each clipped part with an area > 3K square nautical miles will produce a new smear. The input is assumed to be in MAP coordinate. Note: 1. If a smear has ONLY one FA area, no clipping will be done, and the original smear is returned. 2. If a smear belongs two FA areas (a few little kinks less than 3K along the boundary could add up to an area > 3K), but these two FA areas do not belong to the same FA region, do not do area clipping.
private ArrayList<Gfa> faAreaClip( Gfa smear, ArrayList<Gfa> snapshots ) { ArrayList<Gfa> newSmears = new ArrayList<Gfa>(); //If smear can be formatted, return. if ( canBeFormatted( smear ) ) { newSmears.add( smear ); return newSmears; } /* * If the smear resides only in one FA area or two areas belong to different * FA regions, no need to clip. */ String faAreas = smear.getGfaArea(); if ( !faAreas.contains( "-" ) || !isSameFaRegion( faAreas ) ) { newSmears.add( smear ); return newSmears; } // Retrieve extended FA area bounds HashMap<String, Geometry> xareaBnds = GfaClip.getInstance().getFaAreaXBoundsInGrid(); /* * Find the intersection points with the extended FA area bounds and snap them. */ Polygon smearPoly = GfaClip.getInstance().gfaToPolygon( smear ); Polygon smearPolyInGrid = GfaClip.getInstance().gfaToPolygonInGrid( smear ); HashMap<Coordinate, Coordinate> areaInterPts = getAreaIntersectionPt( smearPoly ); /* * Do area clipping. The strategy is the same as regional clipping. * * 1. clip the smear polygon against each FA region (WEST, CENTRAL, EAST) * 2. create a list of parts bigger than/equal to 3K for each region * 3. hold the parts smaller than 3K for all regions in another list. */ HashMap<String, ArrayList<Geometry> > clipWithAreas = new HashMap<String, ArrayList<Geometry> >(); ArrayList<Geometry> smallPoly = new ArrayList<Geometry>(); for ( String areaName : xareaBnds.keySet() ) { if ( !faAreas.contains( areaName ) ) continue; clipWithAreas.put( areaName, new ArrayList<Geometry>() ); //Do area clipping as described above. Geometry areaBnd = xareaBnds.get( areaName ); if ( areaBnd.intersects( smearPolyInGrid ) ) { Geometry areaPoly = areaBnd.intersection( smearPolyInGrid ); if ( areaPoly != null ) { for ( int kk = 0; kk < areaPoly.getNumGeometries(); kk++ ) { Geometry bigPoly = areaPoly.getGeometryN( kk ); if ( GfaClip.getInstance().isBiggerInGrid( bigPoly ) ) { clipWithAreas.get( areaName ).add( bigPoly ); } else { smallPoly.add( bigPoly ); } } } } } /* * Create smears from VALID parts and add into the return list * * 1. Union the parts in each FA region with the list of small parts - * If a small part touches one of the bigs (only one, I believe), it * will be united into that big and thus be included into a new * smear. So no part gets lost and all will be included eventually. * 2. When a small part is united into a big one (if they intersect), * the common points are still retained in the result, we need to * remove those extra point. The common points are resulted from the * previous clipping with the area boundaries. * 3. check the resulting union for VALID geometries and create new * smears for each of them. */ for ( String areaName : clipWithAreas.keySet() ) { ArrayList<Geometry> bigs = clipWithAreas.get( areaName ); ArrayList<Geometry> toBeUnioned = new ArrayList<Geometry>(); toBeUnioned.addAll( bigs ); toBeUnioned.addAll( smallPoly ); Geometry result = GfaClip.getInstance().quickUnion( toBeUnioned ); ArrayList<Coordinate> commPts = GfaClip.getInstance().getCommonPoints( bigs, smallPoly ); if ( result != null ) { for ( int kk = 0; kk < result.getNumGeometries(); kk++ ) { Geometry one = result.getGeometryN( kk ); //Remove residue points by clipping followed by subsequent union. Geometry onePart = GfaClip.getInstance().removeCommonPoints( one, commPts ); //Clean up some improper cases Coordinate[] gPts = PgenUtil.gridToLatlon( onePart.getCoordinates() ); ArrayList<Coordinate> points = new ArrayList<Coordinate>(); for ( Coordinate c : gPts ) { points.add( c ); } points.remove( points.size() - 1 ); //Geometry cleanPts = GfaClip.getInstance().cleanupPoints( onePart ); Geometry cleanPts = GfaClip.getInstance().cleanupPoints( GfaClip.getInstance().pointsToGeometry( points ) ); if ( GfaClip.getInstance().isAddableAsSmear( cleanPts, snapshots, smear ) ) { //Replace intersection points with their pre-snapped pair. Geometry rplPts = GfaClip.getInstance().replacePts( cleanPts, areaInterPts ); //Create a new GFA smear. cleanPts = GfaClip.getInstance().cleanupPoints( rplPts ); Gfa newElm = GfaClip.getInstance().geometryToGfa( smear, cleanPts ); newElm.setGfaArea( areaName ); newSmears.add( newElm ); } } } } for ( Gfa gg : newSmears ) { boolean[] reduFlg = new boolean[ gg.getPoints().size() ]; int ii = 0; for ( Coordinate newPt : gg.getPoints() ) { reduFlg[ ii ] = false; for ( int jj = 0; jj < smear.getPoints().size(); jj++ ) { if ( GfaSnap.getInstance().isSamePoint( newPt, smear.getPoints().get( jj ), GfaSnap.MAP_PRECISION ) ) { reduFlg[ ii ] = smear.getReduceFlags()[ jj ]; break; } } ii++; } gg.setReduceFlags( reduFlg ); } return newSmears; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void clipFeatureUsing(final SimpleFeature featureToClip,\n final CoordinateReferenceSystem featureToClipCrs,\n final Geometry clippingGeometryOnMap,\n final CoordinateRefere...
[ "0.56575", "0.5639717", "0.56116974", "0.560309", "0.5498465", "0.5370901", "0.5334972", "0.51565856", "0.49066314", "0.48686796", "0.48495907", "0.48449793", "0.4769435", "0.47544613", "0.47225726", "0.4712773", "0.46497062", "0.45725563", "0.45442495", "0.4516171", "0.45094...
0.6881947
0
This routine clips a GFA polygon against common bounds of the extended FA area bounds and finds the intersection points of the polygon with the bound. Then the intersection points are snapped individually to points outside of the polygon. Both the intersection points and their snapped matches are returned in map coordinate.
private HashMap<Coordinate, Coordinate> getAreaIntersectionPt( Geometry gfaPoly ) { HashMap<Coordinate, Coordinate> interPtsPair = new HashMap<Coordinate, Coordinate>(); ArrayList<Coordinate> interPts = new ArrayList<Coordinate>(); ArrayList<Coordinate> pts; ArrayList<Integer> interIndex = new ArrayList<Integer>(); ArrayList<Integer> indx = new ArrayList<Integer>(); //Reorder in clockwise - first point is repeated at the end. ArrayList<Coordinate> gfaPoints = new ArrayList<Coordinate>(); for ( Coordinate c : gfaPoly.getCoordinates() ) { gfaPoints.add( c ); } ArrayList<Coordinate> cwGfaPts = GfaSnap.getInstance().reorderInClockwise( gfaPoints, null ); //Get all intersection point with FA region common border. HashMap<String, Geometry> areaCommBnds = GfaClip.getInstance().getFaAreaXCommBounds(); for ( Geometry bnd : areaCommBnds.values() ) { pts = GfaClip.getInstance().lineIntersect( cwGfaPts.toArray( new Coordinate[ cwGfaPts.size() ]), bnd.getCoordinates(), indx ); if ( pts.size() > 0 ) { interPts.addAll( pts ); interIndex.addAll( indx ); } } if ( interPts.size() <= 0 ) { return interPtsPair; } /* * Find the area common bound points inside the polygon to ensure * the new snap points will not cluster with these points. */ ArrayList<Coordinate> checkPoints = new ArrayList<Coordinate>(); for ( Geometry g : areaCommBnds.values() ) { for ( Coordinate c : g.getCoordinates() ) { Geometry pp = GfaClip.getInstance().pointsToGeometry( new Coordinate[]{ c } ); if ( !checkPoints.contains( c ) && pp.within( gfaPoly ) ) { checkPoints.add( c ); } } } /* * Now insert each common intersection point into the el polygon * and snap it outside of the el polygon. * * Note: the point cannot be any point of the el polygon or any * snap point that has been used. * * If an intersection point is not within the clustering distance of * the point before it (Pb) or point after it (Pa), simply insert it into * the polygon and snap it. Otherwise, do the following: * * 1. Pick the closer one of Pb and Pa as Pn. * 2. Check if Pn is within the clustering distance of the common boundary * points inside the FROM line. * 3. If so, snap Pn to the closest point not within the clustering distance * and match the intersection point and Pn to the new point. * 4. If not, match the intersection point with Pn. */ ArrayList<Coordinate> usedPoints = new ArrayList<Coordinate>(); usedPoints.addAll( cwGfaPts ); ArrayList<Coordinate> ePts = new ArrayList<Coordinate>(); for ( int ii = 0; ii < interPts.size(); ii++ ) { Coordinate interP = interPts.get( ii ); Coordinate ptBefore = cwGfaPts.get( interIndex.get( ii ) ); Coordinate ptAfter = cwGfaPts.get( interIndex.get( ii ) + 1 ); double qdist1 = GfaSnap.getInstance().distance( interP, ptBefore ); double qdist2 = GfaSnap.getInstance().distance( interP, ptAfter ); int addOne = -1; int qmatch = -1; double qdist; if ( qdist1 < qdist2 ) { qmatch = interIndex.get( ii ); qdist = qdist1; } else { qmatch = interIndex.get( ii ) + 1; qdist = qdist2; } if ( ( qdist / PgenUtil.NM2M ) < GfaSnap.CLUSTER_DIST ) { Coordinate ptMatch = cwGfaPts.get( qmatch ); for ( Coordinate c : checkPoints ) { if ( GfaSnap.getInstance().isCluster( c, ptMatch ) ) { addOne = qmatch; break; } } if ( addOne < 0 ) { interPtsPair.put( new Coordinate( interP ), new Coordinate( ptMatch ) ); continue; //Done - ptMatch is a snapped point. } } // Snap int kk, kk2; if ( addOne >= 0 ) { kk = addOne; kk2 = kk; ePts.clear(); ePts.addAll( cwGfaPts ); } else { ePts.clear(); ePts.addAll( GfaSnap.getInstance().insertArray( cwGfaPts, interIndex.get( ii ) + 1, interP ) ); kk = interIndex.get( ii ) + 1; kk2 = kk; } ePts.remove( ePts.size() - 1 ); Coordinate[] snapped = new Coordinate[1]; //snap.... int status = GfaSnap.getInstance().snapPtGFA( kk, kk2, usedPoints, checkPoints, ePts, true, true, 3.0F, snapped ); if ( status != 0 ) { if ( addOne >= 0 ) { snapped[ 0 ] = new Coordinate( ePts.get( kk ) ); } else { snapped[ 0 ] = new Coordinate( interP ); } } interPtsPair.put( new Coordinate( interP ), new Coordinate( snapped[ 0 ] ) ); if ( addOne >= 0 ) { interPtsPair.put( new Coordinate( cwGfaPts.get( addOne ) ), new Coordinate( snapped[ 0 ] ) ); } usedPoints.add( snapped[ 0 ] ); } return interPtsPair; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Multimap<String, String> intersects(Polygon bounds);", "private ArrayList<Gfa> faAreaClip( Gfa smear, ArrayList<Gfa> snapshots ) {\n \n\t\tArrayList<Gfa> newSmears = new ArrayList<Gfa>();\n\t\t\n\t\t//If smear can be formatted, return.\n\t\tif ( canBeFormatted( smear ) ) {\n\t\t\tnewSmears.add( smear );\n\t\...
[ "0.564751", "0.54341054", "0.5319103", "0.53171796", "0.5269798", "0.52396166", "0.5202843", "0.51784354", "0.50899756", "0.5080441", "0.5061744", "0.50237477", "0.49819311", "0.49712667", "0.4971201", "0.49322867", "0.49269176", "0.49240467", "0.49160406", "0.4856931", "0.48...
0.740618
0
Divides the smear polygon into two polygons if it cannot be represented on 3 lines of 65character text. Two rounds of bisection may be needed. For the first round bisection, we divide the splitting segment into two segments at the middle ( the middle point is snapped to the closest VOR point) and check if these two segments intersect the original polygon. If not, the snapped middle point will be added to the bisected polygons. For the second round and on, no middle points are inserted. The smears from each successful splitting are added to the return list.
private ArrayList<Gfa> bisect( Gfa smear, boolean addMidPt ) { ArrayList<Gfa> newSmears = new ArrayList<Gfa>(); //First check if the polygon can be represented on 3 lines of text. boolean cbf = canBeFormatted( smear ); //Return if it can be formatted already. if ( cbf ) { newSmears.add( smear ); return newSmears; } /* * Find the all potential splitting segments - from the one with the * shortest length among those segments that do not intersect the polygon. */ Coordinate[] smearPts = smear.getLinePoints(); TreeSet<BisectDistInfo> segments = findAllSegments( smearPts ); /* * Compute the size of the original polygon. */ double polyArea = PgenUtil.getSphPolyArea( smearPts ); /* * Now loop over all the possible splitting segments, from shortest * to longest, to find the shortest segment which divides the original * polygon in an acceptable proportion. */ double prefPct = 100.0 - GFA_AF_BISECT_PCT; double prefPctMax = Math.max( prefPct, GFA_AF_BISECT_PCT ); double prefPctMin = Math.min( prefPct, GFA_AF_BISECT_PCT ); ArrayList<Coordinate> tmpPoly = new ArrayList<Coordinate>(); double tarea; double pct; BisectDistInfo bisectSeg = null; for ( BisectDistInfo bd : segments ) { //Generate the polygon starting from indx1 and ending at indx2. tmpPoly.clear(); for ( int ii = bd.start; ii <= bd.end; ii++ ) { tmpPoly.add( new Coordinate( smearPts[ ii ] ) ); } //Compute and compare it's size to the original polygon as a percentage tarea = PgenUtil.getSphPolyArea( tmpPoly.toArray( new Coordinate[ tmpPoly.size() ] ) ); pct = 100.0F * ( tarea / polyArea ); //If the percentage is within the limits, we've found our splitting segment. if ( pct >= prefPctMin && pct <= prefPctMax ) { bisectSeg = new BisectDistInfo( bd.distance, bd.start, bd.end ); break; } } /* * Find the correct number of points for new polygons. For first round * division, the middle point on the splitting segment is calculated * and snapped to be used later. The splitting segment is thus divided * into two segments at the middle point. If either one of them intersects * with the original polygon, the middle point will not be added. */ if ( bisectSeg == null ) { newSmears.add( smear ); } else { //First figure out if we need and could add a middle point. Coordinate midPt = null; if ( addMidPt ) { midPt = new Coordinate(); midPt.x = ( smearPts[ bisectSeg.start ].x + smearPts[ bisectSeg.end ].x ) / 2.0; midPt.y = ( smearPts[ bisectSeg.start ].y + smearPts[ bisectSeg.end ].y ) / 2.0; Coordinate snappedMidPt = GfaSnap.getInstance().snapOnePt( midPt ); if ( !GfaSnap.getInstance().isCluster( snappedMidPt, smearPts[ bisectSeg.start ] ) && !GfaSnap.getInstance().isCluster( snappedMidPt, smearPts[ bisectSeg.end] ) ) { Coordinate[] seg1 = new Coordinate[]{ smearPts[ bisectSeg.start ], snappedMidPt }; Coordinate[] seg2 = new Coordinate[]{ smearPts[ bisectSeg.end ], snappedMidPt }; if ( segIntPoly( seg1, smearPts ) && segIntPoly( seg2, smearPts ) ) { midPt.x = snappedMidPt.x; midPt.y = snappedMidPt.y; } else { addMidPt = false; } } } /* * First polygon - from bisectSeg.start to bisectSeg.end, plus a middle point. */ Gfa first = smear.copy(); ArrayList<Coordinate> coor1 = new ArrayList<Coordinate>(); ArrayList<Boolean> reduFlg1 = new ArrayList<Boolean>(); for ( int ii = bisectSeg.start; ii <= bisectSeg.end; ii++ ) { coor1.add( new Coordinate( smearPts[ ii ] ) ); reduFlg1.add( new Boolean( smear.getReduceFlags()[ ii ] ) ); } if ( addMidPt ) { Coordinate mpt1 = new Coordinate( midPt ); coor1.add( mpt1 ); first.addAttribute( BISECT_MIDDLE_POINT, mpt1 ); reduFlg1.add( new Boolean( false ) ); } first.setPointsOnly( coor1 ); first.setGfaTextCoordinate( first.getCentroid() ); boolean[] redu1 = new boolean[ reduFlg1.size() ]; int kk = 0; for ( Boolean bb : reduFlg1 ) { if ( bb ) { redu1[ kk ] = true; } else { redu1[ kk ] = false; } kk++; } first.setReduceFlags( redu1 ); /* * Second polygon - from 0 to bisectSeg.start, then middle point, continue * from bisectSeg.end to the end. */ Gfa second = smear.copy(); ArrayList<Coordinate> coor2 = new ArrayList<Coordinate>(); ArrayList<Boolean> reduFlg2 = new ArrayList<Boolean>(); for ( int ii = 0; ii <= bisectSeg.start; ii++ ) { coor2.add( new Coordinate( smearPts[ ii ] ) ); reduFlg2.add( new Boolean( smear.getReduceFlags()[ ii ] ) ); } if ( addMidPt ) { Coordinate mpt2 = new Coordinate( midPt ); coor2.add( mpt2 ); second.addAttribute( BISECT_MIDDLE_POINT, mpt2 ); reduFlg2.add( new Boolean( false ) ); } for ( int ii = bisectSeg.end; ii < smearPts.length; ii++ ) { coor2.add( new Coordinate( smearPts[ ii ] ) ); reduFlg2.add( new Boolean( smear.getReduceFlags()[ ii ] ) ); } second.setPointsOnly( coor2 ); second.setGfaTextCoordinate( second.getCentroid() ); boolean[] redu2 = new boolean[ reduFlg2.size() ]; int kj = 0; for ( Boolean bb : reduFlg2 ) { if ( bb ) { redu2[ kj ] = true; } else { redu2[ kj ] = false; } kj++; } second.setReduceFlags( redu2 ); //Add new smears to the list. newSmears.add( first ); newSmears.add( second ); } return newSmears; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Gfa> reducePoints( Gfa smear, ArrayList<Gfa> snapshots ) {\n\t\t\t\t\n\t\tArrayList<Gfa> glist = new ArrayList<Gfa>();\n \n\t\t/*\n\t\t * Step 1 - reduce points on the whole smear polygon. Note that freezing level \n\t\t * contours are point reduced in af_fzlvl2fmt().\n\t\t */ \t\t\n\t\tGfa ...
[ "0.61014515", "0.5816763", "0.53973746", "0.5243774", "0.5056536", "0.5027985", "0.50069153", "0.49991378", "0.49552286", "0.49233663", "0.48822978", "0.48746514", "0.48646575", "0.48513052", "0.4840771", "0.47820985", "0.47590965", "0.47525227", "0.47438473", "0.47406614", "...
0.7538378
0
Finds all segments that does not intersects with other segments of the polygon and has nonclustering length. The input is assumed to be in MAP coordinate. Note: do not repeat the first point of the polygon at the end.
private TreeSet<BisectDistInfo> findAllSegments( Coordinate[] poly ) { TreeSet<BisectDistInfo> distInfo = new TreeSet<BisectDistInfo>(); Coordinate[] seg = new Coordinate[2]; boolean qualify; for ( int ii = 0; ii < (poly.length - 2); ii++ ) { for ( int jj = ii + 2; jj < (poly.length); jj ++ ) { seg[0] = poly[ii]; seg[1] = poly[jj]; qualify = polysegIntPoly( seg, poly ); if ( qualify ) { double dist = GfaSnap.getInstance().distance( seg[0], seg[1] ) / PgenUtil.NM2M; if ( dist > GfaSnap.CLUSTER_DIST ) { distInfo.add( new BisectDistInfo( dist, ii, jj ) ); } } } } return distInfo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private List<List<Segment>> getCleanSegments() {\n List<List<Segment>> clean = new ArrayList<>();\n List<Segment> segments = null;\n Segment previousSegment = null;\n for (Segment segment : getCleanableSegments()) {\n if (segments == null) {\n segments = new ArrayList<>();\n segments...
[ "0.5079548", "0.5059811", "0.5053829", "0.49333388", "0.4907339", "0.49069715", "0.48372754", "0.4784549", "0.47803563", "0.4727705", "0.471369", "0.46681747", "0.4635088", "0.46095416", "0.4604388", "0.460233", "0.4596479", "0.45911077", "0.4579577", "0.456014", "0.45518532"...
0.5207549
0
Verifies if a segment, that consists of any two points on a polygon, intersects with any other segments on the polygon other than the 4 segments starting or ending from the the specified segments' two end points.. The input is assumed to be in MAP coordinate. Note: Do not repeat the first point at the end of the polygon.
private boolean polysegIntPoly( Coordinate[] seg, Coordinate[] poly ) { boolean qualify = true; //Disqualify if the segment's two end points are adjacent on the polygon. List<Coordinate> polyList = Arrays.asList( poly ); int index1 = polyList.indexOf( seg[0] ); int index2 = polyList.indexOf( seg[1] ); int igap = Math.abs(index2 - index1 ); if ( igap == 1 || igap == ( (poly.length) - 1 ) ) { qualify = false; } else { qualify = segIntPoly( seg, poly ); } return qualify; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\t\tpublic void testIntersectAtEndPoints2(){\n\t\t\tGenericLineSegmentsIntersect v=new GenericLineSegmentsIntersect();\n\t\t\tint[][] lines={\n\t\t\t\t\t{1,5,5,1},\n\t\t\t\t\t{1,4,5,0},\n\t\t\t\t\t{2,2,6,10}\n\t\t\t};\n\n\t\t\tassertTrue(v.intersects(lines));\n\t\t}", "private int checkIntersections(Array...
[ "0.63838375", "0.62482864", "0.6226381", "0.6106183", "0.6057872", "0.6007602", "0.59950536", "0.594771", "0.5935924", "0.59080875", "0.59044874", "0.58827424", "0.58205616", "0.5817972", "0.57949334", "0.57702136", "0.5760156", "0.57351536", "0.57172704", "0.56287575", "0.55...
0.5975978
7
Verifies if a segment crosses a polygon defined as it lies within the polygon and intersects the polygon with only two points. The input is assumed to be in MAP coordinate. Note: 1. Do not repeat the first point at the end of the polygon.
private boolean segIntPoly( Coordinate[] segIn, Coordinate[] polyIn ) { boolean qualify = true; //Convert to grid coordinate. Coordinate[] seg = PgenUtil.latlonToGrid( segIn ); Coordinate[] poly = PgenUtil.latlonToGrid( polyIn ); //Get mid-point and form geometries. Coordinate[] midp = new Coordinate[1]; midp[0] = new Coordinate( (seg[0].x + seg[1].x) / 2.0, (seg[0].y + seg[1].y) / 2.0 ); Geometry point = GfaClip.getInstance().pointsToGeometry( midp ); Geometry polygon = GfaClip.getInstance().pointsToGeometry( poly ); //Disqualify if the segment lies outside of the polygon if ( !point.within( polygon ) ) { qualify = false; } else { Geometry segment = GfaClip.getInstance().pointsToGeometry( seg ); if ( segment.intersects( polygon ) ) { Coordinate[] ipts = segment.intersection( polygon ).getCoordinates(); /* * Disqualify if the segment intersects other segments of the polygon - * except the segments that share either the starting or ending * point with the segment on check. */ if ( ipts.length != 2 ) { qualify = false; } } } return qualify; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean rayCrossesSegment(LatLng point, LatLng a, LatLng b) {\n double px = point.longitude,\n py = point.latitude,\n ax = a.longitude,\n ay = a.latitude,\n bx = b.longitude,\n by = b.latitude;\n if (ay > by) {\n ...
[ "0.6336999", "0.6271786", "0.5946218", "0.5934306", "0.5910064", "0.5905473", "0.5803985", "0.5783634", "0.57459295", "0.5709973", "0.56778646", "0.5659957", "0.5652309", "0.5652068", "0.56118053", "0.55841756", "0.5583481", "0.55587924", "0.55503607", "0.55339915", "0.548899...
0.60920084
2
Finds the segments that does not intersects with other segments of the polygon and has nonclustering length. "2slack+1" segments are checked each starting at "index"th vertex of the polygon & ends at a vertex within "index + np/2 slack" to "index + np/2 + slack", where np = total number of point in the polygon. Note: do not repeat the first point of the polygon at the end.
private TreeSet<BisectDistInfo> findSegmentsBySlack( int index, int slack, Coordinate[] polyIn ) { TreeSet<BisectDistInfo> distInfo = new TreeSet<BisectDistInfo>(); //Convert to grid coordinate. Coordinate[] poly = PgenUtil.latlonToGrid( polyIn ); /* * Find the index of ending points to form a splitting segment - * from "index + np/2 - slack" to "index + np/2 + slack" */ int npts = poly.length; int mid = npts / 2; int nseg = 2 * slack + 1; ArrayList<Integer> pointsToCheck = new ArrayList<Integer>(); for ( int ii = 0; ii < nseg; ii++ ) { pointsToCheck.add( ( ii - slack + index + mid + npts ) % npts ); } /* * Find out segments that does not intersect other segments of the * polygon and has a length greater than the clustering distance. */ Coordinate[] seg = new Coordinate[2]; seg[0] = poly[ index ]; boolean qualify; for ( Integer jj : pointsToCheck ) { //Sanity check if( jj >= poly.length ) continue; seg[1] = poly[jj]; qualify = polysegIntPoly( seg, poly ); if ( qualify ) { double dist = GfaSnap.getInstance().distance( seg[0], seg[1] ) / PgenUtil.NM2M; if ( dist > GfaSnap.CLUSTER_DIST ) { distInfo.add( new BisectDistInfo( dist, index, jj ) ); } } } return distInfo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int checkIntersections(ArrayList<Segment> segments){\n\t\tint numberOfIntersections = 0;\n\t\tfor (Segment s: segments){\n\t\t\tSegment firstSegment = s;\n\t\t\tfor (Segment t: segments){\n\t\t\t\tSegment secondSegment = t;\n\t\t\t\tif (!(firstSegment.equals(secondSegment))){\n\t\t\t\t\tif (!this.checkShar...
[ "0.52169174", "0.51800406", "0.51625746", "0.51340985", "0.51304626", "0.49719995", "0.49638823", "0.49501613", "0.49173814", "0.48926315", "0.47922412", "0.47178683", "0.4699934", "0.469106", "0.46589825", "0.4653225", "0.46498954", "0.46216214", "0.46208456", "0.4613327", "...
0.6758249
0
/ Check if two FA areas (connected by "") belong to the same FA region.
private boolean isSameFaRegion( String areas ) { return ( areas.equalsIgnoreCase( Gfa.BOS + "-" + Gfa.MIA ) || areas.equalsIgnoreCase( Gfa.MIA + "-" + Gfa.BOS ) || areas.equalsIgnoreCase( Gfa.SLC + "-" + Gfa.SFO ) || areas.equalsIgnoreCase( Gfa.SFO + "-" + Gfa.SLC ) || areas.equalsIgnoreCase( Gfa.CHI + "-" + Gfa.DFW ) || areas.equalsIgnoreCase( Gfa.DFW + "-" + Gfa.CHI ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean intersects(GISArea other) {\n if (this.isPoint() && other.isPoint()) {\n return this.latitudes.equals(other.latitudes) && this.longitudes.equals(other.longitudes);\n }\n // 2. We're a point, they're not.\n else if (this.isPoint() && other.isRegion()) {\n ...
[ "0.6242988", "0.60303676", "0.58830184", "0.58716106", "0.57639563", "0.5739823", "0.5718594", "0.57171834", "0.5705322", "0.57025516", "0.5691092", "0.5678772", "0.5662314", "0.5627295", "0.5616903", "0.55916154", "0.55674285", "0.555516", "0.55467665", "0.5546269", "0.55134...
0.78019327
0
/ Wrapper to do regular point reduction on a smear.
private Gfa regularPointReduction( Gfa smearIn ) { ArrayList<Coordinate> xyList = new ArrayList<Coordinate>( smearIn.getPoints() ); List<Integer> reduceFlg = new ArrayList<Integer>(); List<Integer> orig = new ArrayList<Integer>(); boolean[] reduceF = smearIn.getReduceFlags(); for ( int ii = 0; ii < reduceF.length; ii++ ) { if ( reduceF[ ii ] ) { reduceFlg.add( 1 ); } else { reduceFlg.add( 0 ); } orig.add( 1 ); } /* for ( int ii = 0; ii < smearIn.getPoints().size(); ii++ ) { System.out.println( "Point " + ii + " (" + smearIn.getPoints().get( ii ).x + "," + smearIn.getPoints().get( ii ).y + ") is " + reduceFlg.get(ii) ); } */ double incrPct = SMEAR_INCR_PCT; double incrPctOrig = REDUCEPTS_INCR_PCT_ORIG; double incrDst = SMEAR_INCR_DST; String prefix = getPrefixString( smearIn ); int ier = ReduceGfaPoints.reduceByPctDist( xyList, reduceFlg, orig, incrPct, incrPctOrig, incrDst, prefix ); boolean[] reduceFl = new boolean[ xyList.size() ]; for (int ii = 0; ii < xyList.size(); ii++ ) { if ( reduceFlg.get( ii ) == 1 ) reduceFl[ ii ] = true; else reduceFl[ ii ] = false; } Gfa newSmear = smearIn.copy(); newSmear.setPointsOnly( xyList ); newSmear.setReduceFlags( reduceFl ); return newSmear; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Gfa> reducePoints( Gfa smear, ArrayList<Gfa> snapshots ) {\n\t\t\t\t\n\t\tArrayList<Gfa> glist = new ArrayList<Gfa>();\n \n\t\t/*\n\t\t * Step 1 - reduce points on the whole smear polygon. Note that freezing level \n\t\t * contours are point reduced in af_fzlvl2fmt().\n\t\t */ \t\t\n\t\tGfa ...
[ "0.6295542", "0.5626382", "0.54034525", "0.5352315", "0.5162585", "0.5056087", "0.5027245", "0.50212187", "0.50188303", "0.5012523", "0.5006624", "0.4992073", "0.49919254", "0.49818024", "0.49510595", "0.49509734", "0.49389496", "0.48895228", "0.48834074", "0.48798546", "0.48...
0.7409085
0
/ Test could be removed later.
private void test() { Coordinate[] polyPts = new Coordinate[]{ new Coordinate(-98.50165524249245,45.216163960194365), new Coordinate(-96.07562805826798,39.725652270504796), new Coordinate(-88.95179971518155,39.08088689505274), new Coordinate(-87.96893561066132,44.647653935023214), new Coordinate(-89.72876449996915,41.54448973482366) }; Coordinate[] seg = new Coordinate[2]; Coordinate midPt = new Coordinate(); midPt.x = ( polyPts[ 0 ].x + polyPts[ 2 ].x ) / 2.0 - 1.0; midPt.y = ( polyPts[ 0 ].y + polyPts[ 2 ].y ) / 2.0 - 1.0; seg[0] = polyPts[ 0 ]; seg[1] = midPt; for ( int ii = 0; ii < (polyPts.length - 2); ii++ ) { for ( int jj = ii + 2; jj < (polyPts.length); jj ++ ) { seg[0] = polyPts[ii]; seg[1] = polyPts[jj]; boolean good = polysegIntPoly( seg, polyPts ); String s; if ( good ) { s = "Qualify!"; } else { s = "Not qualify"; } System.out.println( "\npoint " + ii + "\t<Point Lat=\"" + polyPts[ii].y + "\" Lon=\"" + polyPts[ii].x + "\"/>" + "\t=>\t" + "point " + jj+ "\t<Point Lat=\"" + polyPts[jj].y + "\" Lon=\"" + polyPts[jj].x + "\"/>" + "\t" + s ); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testRemoveACopy() {\n }", "public void testRemoveOrder() {\n }", "@Test\n void removeItem() {\n }", "@Test\n void removeItem() {\n\n }", "@Test\n public void remove() {\n testList.add(42);\n testList.remove(42);\n assertEquals(0, testList.cou...
[ "0.7389616", "0.69074035", "0.68849605", "0.6801025", "0.66928935", "0.6644814", "0.662277", "0.6612536", "0.6556189", "0.655424", "0.6529844", "0.6526358", "0.6517384", "0.651662", "0.64513814", "0.6448276", "0.6378294", "0.63454944", "0.6338456", "0.63328135", "0.6302977", ...
0.0
-1
Check if a smear can be formatted into 3 65character lines, if not, pops up a warning.
public static void WarningForOverThreeLines( Gfa smear ) { if ( !smear.isSnapshot() ) { String prefix = getPrefixString( smear ); boolean formattable = canBeFormatted( smear.getPoints(), prefix ); if ( !formattable ) { String message = ""; if ( prefix.equals( Gfa.FROM ) ) { message = new String( "This AIRMET will generate more than 3 FROM lines when formatted."); } else { message = new String( "This OUTLOOK will generate more than 3 FROM lines when formatted."); } MessageDialog confirmDlg = new MessageDialog( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Over 3 FROM Lines", null, message, MessageDialog.WARNING, new String[]{"OK"}, 0 ); confirmDlg.open(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean weAreTooBrokenToWaitUntilWeAreAbleToCarryThisOut() {\n return (isLineWrappingInvalid() || isShowing() == false);\n }", "private void validateLine1304(Errors errors) {\n }", "public static boolean canBeFormatted( Gfa smear ) {\n\t\t\n\t\tboolean formattable = false;\n\t\tif ( !smear...
[ "0.6030822", "0.58537984", "0.5850573", "0.58098584", "0.57473594", "0.55176145", "0.5514774", "0.55096567", "0.550167", "0.5486207", "0.5467394", "0.5453604", "0.5451983", "0.54425627", "0.5421417", "0.5377577", "0.53394216", "0.52858996", "0.5282954", "0.52696896", "0.52360...
0.7113057
0
Script Settings (Browser definition and behavior
@BeforeTest public void beforeTest() { System.setProperty("webdriver.chrome.driver", "C:\\chromedriver_win32\\chromedriver.exe"); driver = new ChromeDriver(); driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); driver.manage().window().maximize(); driver.get("https://www.facebook.com/"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void configJS() { // Default Joystick else as gamepad\n // jsConfig = chsr.getSelected() == null ? 0 : chsr.getSelected();\n // SmartDashboard.putNumber(\"JS/JS_Config\", jsConfig);\n\n switch (jsConfig) {\n case 0: // Normal 3 joystick config\n norm3JS(...
[ "0.5911377", "0.5879003", "0.5782814", "0.5708359", "0.56964475", "0.5642966", "0.5630488", "0.55884343", "0.5560596", "0.55480266", "0.55250967", "0.55056673", "0.5499582", "0.5441063", "0.54339516", "0.5433305", "0.54280925", "0.54184085", "0.54146516", "0.5413434", "0.5412...
0.0
-1
Creates new form ChangeUserPassword
public ChangeUserPassword(java.awt.Frame parent, boolean modal) { super(parent, modal); initComponents(); setLocationRelativeTo(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sendPasswordToUser(UserForm userForm) {\n }", "void updateUserPassword(User user);", "public void registerNewPassword(View view) {\r\n\t\t// Get the user's current password\r\n\t\tString currentPassword = currentPasswordInput.getText().toString();\r\n\r\n\t\t// Get the new, permanent password t...
[ "0.70647395", "0.6937595", "0.6790869", "0.67750597", "0.675988", "0.675375", "0.65856767", "0.6567402", "0.65416104", "0.65377533", "0.6481368", "0.6465452", "0.6453811", "0.6431941", "0.6430164", "0.64246154", "0.6424431", "0.63945067", "0.6383595", "0.6381813", "0.6377711"...
0.0
-1
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jTextField1 = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); jPasswordField1 = new javax.swing.JPasswordField(); jLabel3 = new javax.swing.JLabel(); jPasswordField2 = new javax.swing.JPasswordField(); jLabel4 = new javax.swing.JLabel(); jPasswordField3 = new javax.swing.JPasswordField(); jLabel5 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jTextField2 = new javax.swing.JTextField(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("මුර පදය වෙනස් කරගන්න"); setResizable(false); jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(74, 138, 240), 3)); jLabel1.setFont(new java.awt.Font("Iskoola Pota", 0, 18)); // NOI18N jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); jLabel1.setText("පරිශීලක කේතය :"); jTextField1.setFont(new java.awt.Font("Iskoola Pota", 0, 18)); // NOI18N jTextField1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField1ActionPerformed(evt); } }); jLabel2.setFont(new java.awt.Font("Iskoola Pota", 0, 18)); // NOI18N jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); jLabel2.setText("පැරණි මුර පදය :"); jPasswordField1.setEditable(false); jPasswordField1.setFont(new java.awt.Font("Iskoola Pota", 0, 18)); // NOI18N jPasswordField1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jPasswordField1ActionPerformed(evt); } }); jLabel3.setFont(new java.awt.Font("Iskoola Pota", 0, 18)); // NOI18N jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); jLabel3.setText("නව මුර පදය :"); jPasswordField2.setEditable(false); jPasswordField2.setFont(new java.awt.Font("Iskoola Pota", 0, 18)); // NOI18N jPasswordField2.setEnabled(false); jPasswordField2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jPasswordField2ActionPerformed(evt); } }); jLabel4.setFont(new java.awt.Font("Iskoola Pota", 0, 18)); // NOI18N jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); jLabel4.setText("නැවත ඇතුලත් කරන්න :"); jPasswordField3.setEditable(false); jPasswordField3.setFont(new java.awt.Font("Iskoola Pota", 0, 18)); // NOI18N jPasswordField3.setEnabled(false); jPasswordField3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jPasswordField3ActionPerformed(evt); } }); jLabel5.setFont(new java.awt.Font("Iskoola Pota", 0, 18)); // NOI18N jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); jLabel5.setText("පරිශීලක නාමය :"); jButton1.setFont(new java.awt.Font("Iskoola Pota", 0, 18)); // NOI18N jButton1.setText("වෙනස් කරන්න"); jButton1.setEnabled(false); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButton2.setFont(new java.awt.Font("Iskoola Pota", 0, 18)); // NOI18N jButton2.setText("ඉවත් වන්න"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jTextField2.setEditable(false); jTextField2.setFont(new java.awt.Font("Iskoola Pota", 0, 18)); // NOI18N jTextField2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField2ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 174, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 383, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPasswordField3, javax.swing.GroupLayout.PREFERRED_SIZE, 383, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jPasswordField2, javax.swing.GroupLayout.PREFERRED_SIZE, 383, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, 383, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 383, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE))))) .addContainerGap()) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 39, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jPasswordField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jPasswordField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) ); pack(); setLocationRelativeTo(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.73191476", "0.72906625", "0.72906625", "0.72906625", "0.72860986", "0.7248112", "0.7213479", "0.72078276", "0.7195841", "0.71899796", "0.71840525", "0.7158498", "0.71477973", "0.7092748", "0.70800966", "0.70558053", "0.69871384", "0.69773406", "0.69548076", "0.69533914", "...
0.0
-1
End of variables declaration//GENEND:variables
private void logIn() { char[] password = jPasswordField1.getPassword(); String userCode = jTextField1.getText(); String txtpassword = ""; for (char pw : password) { txtpassword += pw; } if ("".equals(txtpassword)) { JOptionPane.showMessageDialog(this, textBundle.getTextBundle().getString("enterPassword"), "No Password", JOptionPane.WARNING_MESSAGE); } else if (txtpassword.equals(userData.get(0).toString())) { jPasswordField2.setEnabled(true); jPasswordField3.setEnabled(true); jPasswordField2.setEditable(true); jPasswordField3.setEditable(true); jPasswordField2.grabFocus(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "private void assignment() {\n\n\t\t\t}", "private void kk12() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n pu...
[ "0.6359434", "0.6280371", "0.61868024", "0.6094568", "0.60925734", "0.6071678", "0.6052686", "0.60522056", "0.6003249", "0.59887564", "0.59705925", "0.59680873", "0.5967989", "0.5965816", "0.5962006", "0.5942372", "0.5909877", "0.5896588", "0.5891321", "0.5882983", "0.5881482...
0.0
-1
/ Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the ransom note can be constructed from the magazines ; otherwise, it will return false. Each letter in the magazine string can only be used once in your ransom note. Note: You may assume that both strings contain only lowercase letters.
public boolean canConstruct(String ransomNote, String magazine) { int[] arr = new int[26]; for(char c : magazine.toCharArray()) arr[c - 'a']++; for(char c : ransomNote.toCharArray()) { if(--arr[c - 'a'] < 0) return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean canConstruct(String ransomNote, String magazine) {\n if (ransomNote == null || magazine == null) return false;\r\n if (ransomNote.length() > magazine.length()) return false;\r\n int[] countNote = new int[26];\r\n for (char ch : ransomNote.toCharArray()) {\r\n c...
[ "0.78507906", "0.7575345", "0.6075167", "0.582383", "0.5773452", "0.5736795", "0.5734417", "0.5715327", "0.5715183", "0.5713248", "0.566163", "0.5625287", "0.55996996", "0.5599318", "0.5567408", "0.555214", "0.55454063", "0.5541264", "0.55228233", "0.54754764", "0.54636294", ...
0.79508
0
enleve le brouillard dans toutes les cases que le soldat en argument peut voir
void enleverBrouillard(Soldat s);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sleutelWaarde(){\n if(sleutel100.getX() == speler.getX() && sleutel100.getY() == speler.getY() && veld[speler.getY()][speler.getX()] == 1){\n speler.setSleutelWaarde(sleutel100.getWaarde());\n }\n else if(sleutel1002.getX() == speler.getX() && sleutel1002.getY() == spele...
[ "0.6418562", "0.61340654", "0.6106357", "0.6052642", "0.6024607", "0.5930905", "0.5906739", "0.5904978", "0.58909464", "0.58742213", "0.58500284", "0.58210677", "0.5764773", "0.5759889", "0.5747489", "0.5739166", "0.57372", "0.57168025", "0.5710908", "0.5690081", "0.56816673"...
0.63674355
1
applique le brouillard sur toute la carte
void appliquerBrouillard();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void orina() {\n System.out.println(\"Que bien me quedé! Deposito vaciado.\");\n }", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di friggere un uovo\";\r\n }", "public void baj...
[ "0.60416687", "0.59372014", "0.59216213", "0.58677274", "0.5866296", "0.58059967", "0.5788677", "0.5782895", "0.5774513", "0.57207805", "0.5714609", "0.5665438", "0.5663891", "0.56372774", "0.56372774", "0.562886", "0.5594413", "0.558297", "0.5580461", "0.5559589", "0.5555107...
0.6557642
0
compte le nb de monstres sur la map
int compteMonstres(Soldat unites[][]);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int mapCount(){\r\n\t\treturn this.mapCount;\r\n\t}", "@SuppressWarnings(\"rawtypes\")\n\tpublic static int getMapSize(String titre,Map<Integer, String> map){\n\t\tMap<Integer, String> treeMap = new TreeMap<Integer, String>(map);\n\t\tIterator<Entry<Integer, String>> it = treeMap.entrySet().iterator();\n\...
[ "0.6370444", "0.6321366", "0.6199439", "0.618473", "0.6121973", "0.61197263", "0.61194557", "0.6006211", "0.60039717", "0.59708506", "0.59364617", "0.5921319", "0.59150606", "0.58279926", "0.5824692", "0.5813416", "0.5803952", "0.57918197", "0.57719505", "0.5771523", "0.57707...
0.0
-1
retourne la table des unites
Soldat[][] getUnites();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Units getUnitTable();", "public void setUnitTable(Units value);", "public void llenarTabla(){\n pedidoMatDao.llenarTabla();\n }", "private void setNewTable() {\n\n for (List<Entity> list:\n masterList) {\n for (Entity entity :\n list) {\n ...
[ "0.70610803", "0.6893498", "0.6506551", "0.63660896", "0.63643736", "0.63273096", "0.62824124", "0.6244671", "0.6234154", "0.620473", "0.6189486", "0.6160619", "0.6140341", "0.6101922", "0.60981697", "0.60963124", "0.60842395", "0.6059312", "0.6052557", "0.6002683", "0.600149...
0.6056015
18
retourne l'element a la position donnee
Element getElement(Position pos);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void findElement() {\n\t\t\r\n\t}", "private void actualizarEnConsola() {\n\t\tfor(int i=0; i<elementos.size();i++){\n\t\t\tElemento e = elementos.get(i);\n\t\t\tSystem.out.println(e.getClass().getName()+\"- Posicion: , X: \"+e.getPosicion().getX()+\", Y: \"+ e.getPosicion().getY());\n\t\t}...
[ "0.6315445", "0.623787", "0.6051065", "0.59647214", "0.59534115", "0.5945614", "0.5930392", "0.5886008", "0.58752936", "0.5829929", "0.57988185", "0.57895", "0.57883793", "0.5777059", "0.5752169", "0.57491237", "0.5745502", "0.5743012", "0.57360464", "0.5689369", "0.5682025",...
0.6399005
0
trouve une position vide a partir de la position pos a une distance distance
Position trouverPositionVide(Position pos, int distance);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void calcularDistanciaRecorrer(){\r\n\t\tfloat diferenciax = siguientePunto.x - posicion.x;\r\n\t\tfloat diferenciay = siguientePunto.y - posicion.y;\r\n\t\tdistanciaRecorrer = (float) Math.sqrt(diferenciax*diferenciax+diferenciay*diferenciay);\r\n\t}", "double distance (double px, double py);", "stati...
[ "0.6345015", "0.6294691", "0.6107608", "0.6073681", "0.60491395", "0.604098", "0.59146357", "0.59104323", "0.5888211", "0.58323985", "0.58318555", "0.5809257", "0.57702875", "0.57413393", "0.57375866", "0.57352686", "0.5729237", "0.57100403", "0.57075214", "0.56578994", "0.56...
0.73604876
0
trouve si possible un hero a une distance
public Position trouverHeros(Position pos, int range);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n Hero aventurier = new Hero(200, 100);\n Equipement epee = new Equipement(\"epee\", 0);\n Monsters sorciere = new Monsters(\"witch\", 180, 0);\n Monsters barbare = new Monsters(\"olaf\", 160, 0);//Degat et point attaque sont à 0 car ils prendron...
[ "0.62517035", "0.62056184", "0.60278416", "0.6017205", "0.59991777", "0.5953987", "0.5934248", "0.5905491", "0.58122736", "0.5768745", "0.5746105", "0.5702628", "0.5697852", "0.5693759", "0.568167", "0.5665749", "0.56601477", "0.56480163", "0.56461114", "0.56457835", "0.56400...
0.0
-1
deplace le soldat soldat a la position pos
public boolean deplacerSoldat(Position pos, Soldat soldat) throws WargameException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void descolaPosicao();", "public void despegar(){\n if(this.posicion == 1){\n this.setPosicion(2);\n this.indicarEstado(\"Volando\");\n } else{\n System.out.println(\"No estoy preparado para el despegue\");\n }\n }", "public void removePos(String ...
[ "0.65202093", "0.6476391", "0.62413865", "0.5904169", "0.58172286", "0.57757425", "0.57653964", "0.574326", "0.5742804", "0.5686212", "0.5630278", "0.56171554", "0.5611016", "0.55934495", "0.5593233", "0.55805707", "0.55640775", "0.5486453", "0.5421943", "0.5382547", "0.53620...
0.5499966
17
fait s'attaquer deux soldats entre eux
public void combat(Soldat s1, Soldat s2) throws WargameException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void enleverBrouillard(Soldat s);", "final boolean hanArribatAlFinal() {\n int cont = 0;\n for (int i = 0; i < soldats.size(); i++) {\n if (soldats.get(i).isHaArribat()) {\n cont++;\n }\n }\n\n if (cont == soldats.size()) {\n\n return tr...
[ "0.60297126", "0.5985452", "0.5947658", "0.5869291", "0.58382404", "0.58353835", "0.58111805", "0.579223", "0.57583725", "0.57416874", "0.57238793", "0.57119846", "0.5703614", "0.5683134", "0.5676317", "0.5579232", "0.5556319", "0.5547454", "0.5542322", "0.5538337", "0.553022...
0.5336745
52
charge un fichier de sauvegarde
public void charger() throws WargameException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void salvaPartita(String file) {\n\r\n }", "public void recevoirDossier() {\n try {\n fileInfo = (FileInfo) ois.readObject(); //lire les informations du fichier\n //chemin du fichier en sortie\n String outputFile = fileInfo.getDestinationDirectory() + fileInfo.get...
[ "0.63803697", "0.6345304", "0.62428755", "0.6206972", "0.6073323", "0.59998995", "0.599807", "0.5969308", "0.59646297", "0.584652", "0.5832955", "0.58302784", "0.582258", "0.5809384", "0.5808967", "0.5804656", "0.5796432", "0.5791643", "0.5785018", "0.57818806", "0.57658875",...
0.0
-1
draw the map GUI
public void toutDessiner(Graphics g);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void drawComponents () {\n // Xoa het nhung gi duoc ve truoc do\n mMap.clear();\n // Ve danh sach vi tri cac thanh vien\n drawMembersLocation();\n // Ve danh sach cac marker\n drawMarkers();\n // Ve danh sach cac tuyen duong\n drawRoutes();\n }", ...
[ "0.7439049", "0.7219892", "0.7097681", "0.70744056", "0.70689917", "0.7046056", "0.7015417", "0.6835972", "0.681241", "0.6811169", "0.6670361", "0.66486114", "0.65868145", "0.6582706", "0.6517506", "0.6500329", "0.6499941", "0.6455427", "0.6399871", "0.6390839", "0.6352222", ...
0.0
-1
/ getBusSchedule(String start, Duration frequency) : List Method should return a List of String containing the bus timings for a day given the start time and duration as parameters. The timing in the list should be in 24 hour format hh:mm
public List<String> getBusSchedule(String start, Duration frequency) { DateTimeFormatter formatter = DateTimeFormatter.ofPattern("[HH::mm]"); LocalTime startTime = LocalTime.parse(start); LocalTime endTime = LocalTime.MIDNIGHT; int gap = (int) frequency.toMinutes(); List<String> busTimings = new ArrayList(); int startMinVal = startTime.getHour()*60 + startTime.getMinute(); int endMinVal = endTime.minusHours(1).getHour()*60 + endTime.minusMinutes(1).getMinute(); while(endMinVal - startMinVal > gap) { busTimings.add(startTime.format(formatter)); startTime = startTime.plusMinutes(gap); startMinVal = startMinVal+gap; } busTimings.add(startTime.format(formatter)); busTimings.forEach(logger::debug); return busTimings; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getSchedule();", "List<Tour> getTourSchedule(String line);", "private List<Schedule> getSchedules(String traverserName, int delay) {\n List<ScheduleTimeInterval> intervals =\n new ArrayList<ScheduleTimeInterval>();\n intervals.add(new ScheduleTimeInterval(\n new Schedul...
[ "0.61743087", "0.56702244", "0.56467557", "0.55969167", "0.55790037", "0.55573046", "0.55182934", "0.548158", "0.54597104", "0.5427219", "0.5414575", "0.53855413", "0.5366925", "0.53614765", "0.5352677", "0.5327351", "0.5322732", "0.5321569", "0.53041756", "0.5299536", "0.528...
0.8831968
0
Created by user1 on 2/20/2017.
public interface ApiCallBack { void onSuccess(ApiResponse response); void onFailure(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Date getCreated()\n {\n return null;\n }", "public Date getDateCreated(){return DATE_CREATED;}", "CreationData creationData();", "public Date getCreationDate() {\n\n \n return creationDate;\n\n }", "public void create() {\n\t\t\n\t}", "private stendhal...
[ "0.5939395", "0.5738768", "0.56898224", "0.5649419", "0.5640232", "0.5601057", "0.55831254", "0.55749094", "0.5573677", "0.55662334", "0.5531503", "0.55246544", "0.55196196", "0.5509174", "0.5507058", "0.5506643", "0.5502224", "0.5492307", "0.54898965", "0.5465646", "0.545644...
0.0
-1
Constants used internally by the JIVE user interface, possibly across many classes.
public interface IInternalJiveUIConstants { /** * The prefix of all internal constants. */ public String INTERNAL_ID_PREFIX = "edu.buffalo.cse.jive.internal.ui"; /** * The folder ID of the <code>IFolderLayout</code> used to hold views * related to the current launches. */ public String LAUNCH_FOLDER_ID = INTERNAL_ID_PREFIX + ".launchFolder"; /** * The folder ID of the <code>IFolderLayout</code> used to hold views for * the console or other miscellaneous views. */ public String CONSOLE_FOLDER_ID = INTERNAL_ID_PREFIX + ".consoleFolder"; /** * The folder ID of the <code>IFolderLayout</code> used to hold views * related to the execution state of the active target. */ public String EXECUTION_STATE_FOLDER_ID = INTERNAL_ID_PREFIX + ".executionStateFolder"; /** * The folder ID of the <code>IFolderLayout</code> used to hold views * related to the execution history of the active target. */ public String EXECUTION_HISTORY_FOLDER_ID = INTERNAL_ID_PREFIX + ".executionHistoryFolder"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Constants {\n String PATH_SEPARATOR = \"/\";\n String ROOT_DIRECTORY_SYMBOL = \"/\";\n String COMMAND_OPTION_PREFIX = \"-\";\n String SESSION_CLEAR = \"session clear\";\n}", "public interface IssueConstants {\n static final String VIEW_ID = \"net.refractions.udig.issues.view.issue...
[ "0.71057093", "0.6953012", "0.69476205", "0.6896244", "0.68757063", "0.6851217", "0.684965", "0.6842036", "0.67941666", "0.6753452", "0.67505807", "0.6732311", "0.6680983", "0.662809", "0.6621216", "0.66187066", "0.66026175", "0.6581152", "0.65515053", "0.65440434", "0.654149...
0.697595
1
private static Logger logger = LoggerFactory.getLogger(PropertiesConfigUtil.class);
public static void main(String[] args) { String realPath = getFileRealPath("config/docService.properties"); getPropertiesConfigByResourceRealPath(realPath); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void logProperties() {\n log.info(\"externalPropertiesConfiguration::whoAmI = {}\", this.externalPropertiesConfiguration.getWhoAmI());\n log.info(\"externalPropertiesConfiguration::propertyOne = {}\", this.externalPropertiesConfiguration.getPropertyOne());\n log.info(\"externalProperti...
[ "0.6655808", "0.65820223", "0.6527399", "0.65217936", "0.6423571", "0.6404523", "0.6316277", "0.6277103", "0.6259883", "0.62598413", "0.62246823", "0.6190038", "0.61710954", "0.6167151", "0.6155008", "0.615084", "0.6133244", "0.6125069", "0.61189437", "0.61099905", "0.6103518...
0.0
-1
Given existing customer in db
@Test public void existing_customer_should_be_found() { final String customerId = "123e4567-e89b-42d3-a456-556642440000"; // When final Customer customer = customerRepository.findById(customerId); // Then assertThat(customer).isNotNull(); assertThat(customer.getId()).isEqualTo(customerId); assertThat(customer.getName()).isEqualTo("NAME1"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setExistingCustomer(Customer existingCustomer) { this.existingCustomer = existingCustomer; }", "public boolean addCustomer(Customer customer) throws DatabaseOperationException;", "Customer createCustomer();", "Customer createCustomer();", "Customer createCustomer();", "Customer createCustomer...
[ "0.73939407", "0.72749555", "0.71721673", "0.71721673", "0.71721673", "0.71721673", "0.70315886", "0.70226026", "0.6987213", "0.6940539", "0.6892629", "0.6888843", "0.6859175", "0.6854679", "0.68382347", "0.6717265", "0.671378", "0.6702466", "0.6668849", "0.6659238", "0.66576...
0.6820718
15
Ensure that when we perform a GET /users with multiple users in the system, we retrieved a list containing the users
@Test public void getUsers() throws URISyntaxException { List<CreateUserCommand> usersToCreate = Arrays.asList( new CreateUserCommand(22,"Victor","Varnier"), new CreateUserCommand(23,"Pierre","Bouillon"), new CreateUserCommand(42,"Obi-Wan","Kenobi")); URI createUserUri = getUrlForRoute("/api/users"); List<UserDto> createdUsers = usersToCreate.stream() .map(userToCreate -> restTemplate .postForEntity(createUserUri, userToCreate, UserDto.class) .getBody()) .collect(Collectors.toList()); // Retrieve a list of users URI uri = getUrlForRoute("/api/users"); // Perform the HTTP call ResponseEntity<List<UserDto>> createdResponse = restTemplate.exchange(uri, HttpMethod.GET, null, new ParameterizedTypeReference<>() { }); // Ensure that the list of users is retrieved assertEquals(createdResponse.getStatusCode(), HttpStatus.OK); List<UserDto> retrievedUsers = extractPayload(createdResponse); // Ensure that we retrieved a list containing all the users retrievedUsers.containsAll(createdUsers); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<User> getUsers();", "List<User> getUsers();", "public List getUsers(User user);", "public List<User> getUsers();", "public List<UserDTO> getUsers();", "java.util.List<com.heroiclabs.nakama.api.User> \n getUsersList();", "public List getAllUsers();", "@RequestMapping(value = {\"/users/list\"...
[ "0.79290736", "0.79290736", "0.7861477", "0.7821784", "0.7652903", "0.76398045", "0.75936365", "0.7520237", "0.7498928", "0.7481893", "0.74783045", "0.7450487", "0.7447236", "0.7446162", "0.7437137", "0.7436352", "0.7407772", "0.74036115", "0.7390343", "0.7378196", "0.7378196...
0.0
-1
This function is called when a page is fetched and ready to be processed by your program.
@Override public void visit(Page page) { // Some business logic I won't expose here // My boss won't be happy ;-) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void crawlPage() {\n\t\tlogger.info(\"Starting to crawl \" + page.getLink());\n\t\tconsoleLogger.info(\"Starting to crawl \" + page.getLink());\n\n\t\tDocument document = fetchContent(page);\n\t\tif (document == null)\n\t\t\treturn;\n\n\t\tif (shouldSavePage) {\n\t\t\tsavePage(document, page.getLink());\n\t...
[ "0.6647673", "0.6546964", "0.65196913", "0.645459", "0.6384946", "0.6371112", "0.62784666", "0.6235635", "0.6221516", "0.6207534", "0.6107179", "0.60983235", "0.6091018", "0.60809875", "0.6075406", "0.60425985", "0.60071355", "0.59910786", "0.59888446", "0.59649545", "0.59581...
0.59786063
19
/ 10: / 11:
public boolean generate(World paramaqu, Random paramRandom, BlockPosition paramdt) /* 12: */ { /* 13: 19 */ int i = paramRandom.nextInt(4) + 5; /* 14: 20 */ while (paramaqu.getBlock(paramdt.down()).getType().getMaterial() == Material.water) { /* 15: 21 */ paramdt = paramdt.down(); /* 16: */ } /* 17: 24 */ int j = 1; /* 18: 25 */ if ((paramdt.getY() < 1) || (paramdt.getY() + i + 1 > 256)) { /* 19: 26 */ return false; /* 20: */ } /* 21: */ int n; /* 22: */ int i2; /* 23: 29 */ for (int k = paramdt.getY(); k <= paramdt.getY() + 1 + i; k++) /* 24: */ { /* 25: 30 */ int m = 1; /* 26: 31 */ if (k == paramdt.getY()) { /* 27: 32 */ m = 0; /* 28: */ } /* 29: 34 */ if (k >= paramdt.getY() + 1 + i - 2) { /* 30: 35 */ m = 3; /* 31: */ } /* 32: 37 */ for (n = paramdt.getX() - m; (n <= paramdt.getX() + m) && (j != 0); n++) { /* 33: 38 */ for (i2 = paramdt.getZ() - m; (i2 <= paramdt.getZ() + m) && (j != 0); i2++) { /* 34: 39 */ if ((k >= 0) && (k < 256)) /* 35: */ { /* 36: 40 */ BlockType localatr3 = paramaqu.getBlock(new BlockPosition(n, k, i2)).getType(); /* 37: 41 */ if ((localatr3.getMaterial() != Material.air) && (localatr3.getMaterial() != Material.leaves)) { /* 38: 42 */ if ((localatr3 == BlockList.water) || (localatr3 == BlockList.flowingWater)) /* 39: */ { /* 40: 43 */ if (k > paramdt.getY()) { /* 41: 44 */ j = 0; /* 42: */ } /* 43: */ } /* 44: */ else { /* 45: 47 */ j = 0; /* 46: */ } /* 47: */ } /* 48: */ } /* 49: */ else /* 50: */ { /* 51: 51 */ j = 0; /* 52: */ } /* 53: */ } /* 54: */ } /* 55: */ } /* 56: 57 */ if (j == 0) { /* 57: 58 */ return false; /* 58: */ } /* 59: 61 */ BlockType localatr1 = paramaqu.getBlock(paramdt.down()).getType(); /* 60: 62 */ if (((localatr1 != BlockList.grass) && (localatr1 != BlockList.dirt)) || (paramdt.getY() >= 256 - i - 1)) { /* 61: 63 */ return false; /* 62: */ } /* 63: 66 */ makeDirt(paramaqu, paramdt.down()); /* 64: */ int i3; /* 65: */ int i4; /* 66: */ BlockPosition localdt3; /* 67: 68 */ for (int m = paramdt.getY() - 3 + i; m <= paramdt.getY() + i; m++) /* 68: */ { /* 69: 69 */ n = m - (paramdt.getY() + i); /* 70: 70 */ i2 = 2 - n / 2; /* 71: 71 */ for (i3 = paramdt.getX() - i2; i3 <= paramdt.getX() + i2; i3++) /* 72: */ { /* 73: 72 */ i4 = i3 - paramdt.getX(); /* 74: 73 */ for (int i5 = paramdt.getZ() - i2; i5 <= paramdt.getZ() + i2; i5++) /* 75: */ { /* 76: 74 */ int i6 = i5 - paramdt.getZ(); /* 77: 75 */ if ((Math.abs(i4) != i2) || (Math.abs(i6) != i2) || ((paramRandom.nextInt(2) != 0) && (n != 0))) /* 78: */ { /* 79: 78 */ localdt3 = new BlockPosition(i3, m, i5); /* 80: 79 */ if (!paramaqu.getBlock(localdt3).getType().m()) { /* 81: 80 */ setBlock(paramaqu, localdt3, BlockList.leaves); /* 82: */ } /* 83: */ } /* 84: */ } /* 85: */ } /* 86: */ } /* 87: 86 */ for (int m = 0; m < i; m++) /* 88: */ { /* 89: 87 */ BlockType localatr2 = paramaqu.getBlock(paramdt.up(m)).getType(); /* 90: 88 */ if ((localatr2.getMaterial() == Material.air) || (localatr2.getMaterial() == Material.leaves) || (localatr2 == BlockList.flowingWater) || (localatr2 == BlockList.water)) { /* 91: 89 */ setBlock(paramaqu, paramdt.up(m), BlockList.log); /* 92: */ } /* 93: */ } /* 94: 93 */ for (int m = paramdt.getY() - 3 + i; m <= paramdt.getY() + i; m++) /* 95: */ { /* 96: 94 */ int i1 = m - (paramdt.getY() + i); /* 97: 95 */ i2 = 2 - i1 / 2; /* 98: 96 */ for (i3 = paramdt.getX() - i2; i3 <= paramdt.getX() + i2; i3++) { /* 99: 97 */ for (i4 = paramdt.getZ() - i2; i4 <= paramdt.getZ() + i2; i4++) /* 100: */ { /* 101: 98 */ BlockPosition localdt1 = new BlockPosition(i3, m, i4); /* 102:100 */ if (paramaqu.getBlock(localdt1).getType().getMaterial() == Material.leaves) /* 103: */ { /* 104:101 */ BlockPosition localdt2 = localdt1.west(); /* 105:102 */ localdt3 = localdt1.east(); /* 106:103 */ BlockPosition localdt4 = localdt1.north(); /* 107:104 */ BlockPosition localdt5 = localdt1.south(); /* 108:106 */ if ((paramRandom.nextInt(4) == 0) && (paramaqu.getBlock(localdt2).getType().getMaterial() == Material.air)) { /* 109:107 */ a(paramaqu, localdt2, bbv.S); /* 110: */ } /* 111:109 */ if ((paramRandom.nextInt(4) == 0) && (paramaqu.getBlock(localdt3).getType().getMaterial() == Material.air)) { /* 112:110 */ a(paramaqu, localdt3, bbv.T); /* 113: */ } /* 114:112 */ if ((paramRandom.nextInt(4) == 0) && (paramaqu.getBlock(localdt4).getType().getMaterial() == Material.air)) { /* 115:113 */ a(paramaqu, localdt4, bbv.Q); /* 116: */ } /* 117:115 */ if ((paramRandom.nextInt(4) == 0) && (paramaqu.getBlock(localdt5).getType().getMaterial() == Material.air)) { /* 118:116 */ a(paramaqu, localdt5, bbv.R); /* 119: */ } /* 120: */ } /* 121: */ } /* 122: */ } /* 123: */ } /* 124:122 */ return true; /* 125: */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test108() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\":_]J_/L!uFQ7%)BrL\");\n Token token0 = xPathLexer0.minus();\n assertEquals(\":\", token0.getTokenText());\n assertEquals(6, token0.getTokenType());\n \n Token token1 = xPath...
[ "0.5190743", "0.51410323", "0.50466883", "0.50062495", "0.5000807", "0.49855527", "0.49763608", "0.49398744", "0.49367988", "0.49208373", "0.49089244", "0.49027774", "0.48807818", "0.48748085", "0.48624796", "0.48130545", "0.48081034", "0.47957042", "0.47924152", "0.47883958", ...
0.0
-1
/ 126: / 127:
private void a(World paramaqu, BlockPosition paramdt, int paramInt) /* 128: */ { /* 129:126 */ setBlock(paramaqu, paramdt, BlockList.vine, paramInt); /* 130:127 */ int i = 4; /* 131: */ /* 132:129 */ paramdt = paramdt.down(); /* 133:130 */ while ((paramaqu.getBlock(paramdt).getType().getMaterial() == Material.air) && (i > 0)) /* 134: */ { /* 135:131 */ setBlock(paramaqu, paramdt, BlockList.vine, paramInt); /* 136:132 */ paramdt = paramdt.down(); /* 137:133 */ i--; /* 138: */ } /* 139: */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test104() throws Throwable {\n int int0 = JavaCharStream.hexval('D');\n assertEquals(13, int0);\n }", "public char failsafe_GET()\n { return (char)((char) get_bytes(data, 35, 1)); }", "@Test(timeout = 4000)\n public void test009() throws Throwable {...
[ "0.6015965", "0.59742177", "0.5972257", "0.5922428", "0.57983136", "0.57620585", "0.5718899", "0.57070845", "0.570368", "0.5678297", "0.5667697", "0.56634325", "0.566164", "0.5661466", "0.56435716", "0.56243074", "0.56216264", "0.5612129", "0.5611534", "0.5604216", "0.560108"...
0.0
-1
check if they are the same
public boolean equals(Vector2F v) { return (this.xPos == v.xPos && this.yPos == v.yPos); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasSameAs();", "public boolean allDuplicatesEqual() {\n int[] input = {1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5};\n int dupA = findDuplicatesA(input);\n int dupB = findDuplicatesB(input);\n int dupC = findDuplicatesC(input);\n int dupD = findDuplicatesD(input);\n ...
[ "0.7683209", "0.706411", "0.6961017", "0.6869651", "0.6816665", "0.6796233", "0.6758268", "0.6661888", "0.6659506", "0.6637798", "0.6614542", "0.65862", "0.65196705", "0.64968354", "0.6478967", "0.6467523", "0.6421595", "0.6421298", "0.6412242", "0.6408763", "0.64026153", "...
0.0
-1
getter for screen location
public Vector2F getScreenLocation() { return new Vector2F(xPos, yPos); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Point getLocation() { return loc; }", "public ScreenPosition getPosition()\n {\n return myPosition;\n }", "public abstract String getDisplayLocation();", "public int getLocation()\r\n {\r\n return location;\r\n }", "public Point getLocation() {\n\t\treturn location;\n\t}...
[ "0.7384814", "0.72312456", "0.7216091", "0.7154688", "0.7107671", "0.7106168", "0.71050406", "0.71045065", "0.71020865", "0.71012187", "0.7066448", "0.705774", "0.705774", "0.7035144", "0.7031836", "0.70088917", "0.70088917", "0.6993178", "0.69880146", "0.69862694", "0.698139...
0.80762565
0
getter for world location
public Vector2F getWorldLocation() { return new Vector2F(xPos, yPos); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public World getWorld() {\n return location.getWorld();\n }", "public Location getLocation(){\n\t\tWorld w = Bukkit.getWorld(worldName);\n\t\tif(w==null){\n\t\t\tSystem.out.println(\"Error, null world in Location from SQL\");\n\t\t\treturn null;\n\t\t}\n\t\treturn new Location(w, x+0.5, y, z+0.5);\n\t\...
[ "0.82231605", "0.80275977", "0.7996986", "0.7620403", "0.7520297", "0.7452055", "0.7433667", "0.7428227", "0.7428227", "0.7421314", "0.7339166", "0.7268007", "0.7254311", "0.7254311", "0.72472423", "0.7239686", "0.7232304", "0.7232304", "0.72313005", "0.7228514", "0.7226471",...
0.7810708
3
on screen not in world
public static double getDistanceOnScreen(Vector2F v1, Vector2F v2) { float vector1 = v1.xPos - v2.xPos; float vector2 = v2.yPos - v2.yPos; return Math.sqrt(vector1 * vector1 + vector2 * vector2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isSurfaceWorld()\n {\n return false;\n }", "public boolean isOnscreen( )\r\n {\r\n if ( this.transform.tx( ) + this.width( ) < 0.0f ) return false;\r\n if ( this.transform.tx( ) > SkyDiver.WindowWidth ) return false;\r\n if ( this.transform.ty( ) + this.height( ) < 0.0...
[ "0.6943547", "0.69248235", "0.67614764", "0.65683377", "0.64717865", "0.6433857", "0.6396018", "0.6368049", "0.6364466", "0.6353017", "0.63472885", "0.6340626", "0.6335178", "0.6320418", "0.631841", "0.63057554", "0.6300734", "0.6300734", "0.627571", "0.625473", "0.6246357", ...
0.0
-1
get distance in the world location
public double getDistanceBetweenWorldVectors(Vector2F v) { float dX = Math.abs(getWorldLocation().xPos - v.getWorldLocation().xPos); float dY = Math.abs(getWorldLocation().yPos - v.getWorldLocation().yPos); return Math.abs(dX * dX - dY * dY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double getDistance();", "double getDistanceInMiles();", "public float getDistance();", "public double getDistance() {\n\n final int R = 6371; // Radius of the earth\n double lat1 = latitude;\n double lon1 = longitude;\n double lat2 = 41.917715; //lat2, lon2 is location of St.Charl...
[ "0.76236576", "0.7552088", "0.7490198", "0.7374201", "0.72524005", "0.7212323", "0.7211944", "0.7205532", "0.7203357", "0.7164085", "0.714425", "0.7143586", "0.714096", "0.713508", "0.713508", "0.7105602", "0.70625645", "0.70553946", "0.7041178", "0.703151", "0.70195305", "...
0.0
-1
returns true on success
public static boolean credit(int uid, double amount) { return BankDB.credit(uid, amount); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isSuccess();", "boolean isSuccess();", "boolean isSuccess();", "boolean isSuccess();", "boolean isSuccess();", "boolean isSuccess();", "boolean isSuccess();", "public boolean isSuccess();", "public boolean isSuccess();", "@Override\n\t\tpublic boolean isSuccess() {\n\t\t\treturn false;\n\...
[ "0.75245285", "0.75245285", "0.75245285", "0.75245285", "0.75245285", "0.75245285", "0.75245285", "0.7444541", "0.7444541", "0.7409824", "0.7397376", "0.73401713", "0.7107607", "0.7107607", "0.7107607", "0.7107607", "0.68842643", "0.68842643", "0.68842643", "0.68842643", "0.6...
0.0
-1
returns true on success
public static boolean debit(int uid, double amount) { return BankDB.debit(uid, amount); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isSuccess();", "boolean isSuccess();", "boolean isSuccess();", "boolean isSuccess();", "boolean isSuccess();", "boolean isSuccess();", "boolean isSuccess();", "public boolean isSuccess();", "public boolean isSuccess();", "@Override\n\t\tpublic boolean isSuccess() {\n\t\t\treturn false;\n\...
[ "0.75245285", "0.75245285", "0.75245285", "0.75245285", "0.75245285", "0.75245285", "0.75245285", "0.7444541", "0.7444541", "0.7409824", "0.7397376", "0.73401713", "0.7107607", "0.7107607", "0.7107607", "0.7107607", "0.68842643", "0.68842643", "0.68842643", "0.68842643", "0.6...
0.0
-1
Intent intent= new Intent(tutorial3.this,Preference.class);
public void onClick(View v) { Log.d("test", "Hello Dipankar:"+type); // startActivity(intent); switch(type){ case 1: txt.setTypeface(Typeface.MONOSPACE); break; case 2: txt.setTypeface(Typeface.SANS_SERIF); break; case 3: Typeface tf = Typeface.createFromAsset(getAssets(), "fonts/Molot.otf"); txt.setTypeface(tf); } type =type%3+1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void preferences() {\n\tstartActivity (new Intent(getApplicationContext(), PushPreferencesActivity.class));\n}", "public void go_to_setting(){\n Intent i=new Intent(LoginSelection.this, Configuration.class);\n startActivity(i);\n }", "@Override\n public void onClick(DialogIn...
[ "0.75784934", "0.73142534", "0.73055804", "0.71849614", "0.7018242", "0.69326097", "0.68638414", "0.68294495", "0.6697509", "0.66889143", "0.66816425", "0.6631904", "0.66280055", "0.6620668", "0.66117513", "0.66114646", "0.65979177", "0.6577812", "0.6558461", "0.65337163", "0...
0.0
-1
we read something and perse for unicode...You knwo.
public void afterTextChanged(Editable s) { String d = edit.getText().toString(); Log.d("data","data:::::"+d); txt1.setText(d); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract char read_wchar();", "public String readUTF() throws IOException;", "@Override\n public boolean isUnicode()\n {\n return true;\n }", "@Test\n\tpublic void test_ReadNextUtf8String() throws IOException {\n\t\tBinaryReader br = br(true, -22, -87, -107, -61, -65, 0, -22, -87, -107, 0...
[ "0.6876977", "0.68022734", "0.6752044", "0.66546446", "0.6610939", "0.6554332", "0.6377431", "0.63577247", "0.63218707", "0.6246676", "0.62419933", "0.623753", "0.6231884", "0.62308854", "0.6167355", "0.6167355", "0.6162418", "0.6072441", "0.60703945", "0.6037819", "0.6019219...
0.0
-1