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
Sets this tableview's content insets. A table view is essentially a scroll view that contains a set of static row views that represents the content. Thus, the setContentInsets method facilitates a margin, or inset, distance between the content and the container scroll view. Typically used with the headerPullView property.
public native void setContentInsets(TableViewEdgeInsets value, Animation animation) /*-{ var jso = this.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()(); jso .setContentInsets( value.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()(), animation.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()()); }-*/;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public native void setContentInsets(TableViewEdgeInsets value) /*-{\n\t\tvar jso = this.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()();\n\t\tjso\n\t\t\t\t.setContentInsets(value.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()());\n }-*/;", "public native void setContentInsets(TableViewEdgeInset...
[ "0.73684245", "0.69648826", "0.6562322", "0.57037216", "0.5640787", "0.5272396", "0.5161471", "0.5100921", "0.5096463", "0.50804335", "0.5071845", "0.5055658", "0.5034552", "0.5023925", "0.48545632", "0.47978556", "0.47733277", "0.47434413", "0.47250855", "0.46916282", "0.467...
0.724369
1
Update an existing row, optionally with animation
public native void updateRow(TableViewRow row, TableViewAnimation animation) /*-{ var jso = this.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()(); jso .updateRow( row.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()(), animation.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()()); }-*/;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Kroll.method\n\tpublic void updateRow(int index, Object rowObj, @Kroll.argument(optional = true) KrollDict animation)\n\t{\n\t\tfinal TableViewRowProxy existingRow = getRowByIndex(index);\n\n\t\tif (existingRow != null) {\n\t\t\tfinal TiViewProxy parent = existingRow.getParent();\n\n\t\t\tif (parent != null) {\n\...
[ "0.676669", "0.6278292", "0.6278292", "0.6179203", "0.60568875", "0.5891077", "0.5689451", "0.5669431", "0.56364965", "0.5587688", "0.5587688", "0.5568019", "0.55191433", "0.55127597", "0.54609805", "0.545091", "0.5444789", "0.5434185", "0.541372", "0.54102117", "0.540913", ...
0.7305884
0
Fired when a table row is clicked by the user. A singletap event is generated when the user taps the screen briefly without moving their finger. This gesture will also generate a click event. However, a click event can also be generated when the user touches, moves their finger, and then removes it from the screen. On Android, a click event can also be generated by a trackball click.
public native CallbackRegistration addTableRowClickHandler(TableRowClickHandler handler) /*-{ var jso = this.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()(); var listener = function(e) { var eventObject = @com.emitrom.ti4j.mobile.client.core.events.ui.tableview.TableRowClickEvent::new(Lcom/google/gwt/core/client/JavaScriptObject;)(e); handler.@com.emitrom.ti4j.mobile.client.core.handlers.ui.TableRowClickHandler::onTableRowClick(Lcom/emitrom/ti4j/mobile/client/core/events/ui/tableview/TableRowClickEvent;)(eventObject); }; var name = @com.emitrom.ti4j.mobile.client.core.events.ui.tableview.TableRowClickEvent::EVENT_NAME; var v = jso.addEventListener(name, listener); var toReturn = @com.emitrom.ti4j.mobile.client.core.handlers.ui.CallbackRegistration::new(Lcom/emitrom/ti4j/mobile/client/ui/UIObject;Ljava/lang/String;Lcom/google/gwt/core/client/JavaScriptObject;)(this,name,listener); return toReturn; }-*/;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tprotected void doSingleClick(int row) {\n\t\t\r\n\t}", "@Override\n public void onClick(Row row) {\n }", "@Override\n public void onRowClicked(int position) {\n }", "protected void rowDoubleClicked(JTable table, int row) {\r\n }", "public void...
[ "0.6735501", "0.6455496", "0.64223576", "0.6378784", "0.6208778", "0.62086356", "0.6158339", "0.6003481", "0.59981066", "0.59480816", "0.5938989", "0.5907036", "0.58340466", "0.5808464", "0.57550734", "0.5725039", "0.5724095", "0.5701847", "0.570163", "0.5689062", "0.5653003"...
0.5511207
27
Fired when the device detects a double click against the view.
public native CallbackRegistration addTableRowDblClickHandler(TableRowDblClickHandler handler) /*-{ var jso = this.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()(); var listener = function(e) { var eventObject = @com.emitrom.ti4j.mobile.client.core.events.ui.tableview.TableRowDblClickEvent::new(Lcom/google/gwt/core/client/JavaScriptObject;)(e); handler.@com.emitrom.ti4j.mobile.client.core.handlers.ui.TableRowDblClickHandler::onTableRowDblClick(Lcom/emitrom/ti4j/mobile/client/core/events/ui/tableview/TableRowDblClickEvent;)(eventObject); }; var name = @com.emitrom.ti4j.mobile.client.core.events.ui.tableview.TableRowDblClickEvent::EVENT_NAME; var v = jso.addEventListener(name, listener); var toReturn = @com.emitrom.ti4j.mobile.client.core.handlers.ui.CallbackRegistration::new(Lcom/emitrom/ti4j/mobile/client/ui/UIObject;Ljava/lang/String;Lcom/google/gwt/core/client/JavaScriptObject;)(this,name,listener); return toReturn; }-*/;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onDoubleTapEvent();", "@Override\r\n\tpublic void onDoubleTap() {\n\t\t\r\n\t}", "boolean onDoubleTap(MotionEvent event, int policyFlags);", "void onDoubleClick( View view);", "@Override\n public boolean onDoubleTap(MotionEvent event) {\n mDoubleTapDetected = true;\n return false;\n ...
[ "0.8179489", "0.7957977", "0.791873", "0.7720535", "0.7628853", "0.76259845", "0.7560491", "0.74577206", "0.7426069", "0.7345934", "0.72890633", "0.727476", "0.7271155", "0.72702414", "0.71762997", "0.716217", "0.712751", "0.7073466", "0.7073422", "0.7022917", "0.7006199", ...
0.0
-1
Prepare the statement to insert this result into the database
public PreparedStatement getSaveResultStatement(Connection connection, LightweightResult generalResult) throws SQLException { LightweightCategoricalResult result = (LightweightCategoricalResult) generalResult; PreparedStatement s = connection.prepareStatement(insertStatement); int i = 1; SqlUtils.setSqlParameter(s, result.getControlId(), i++); SqlUtils.setSqlParameter(s, result.getSex(), i++); SqlUtils.setSqlParameter(s, result.getExperimentalId(), i++); SqlUtils.setSqlParameter(s, result.getSex(), i++); SqlUtils.setSqlParameter(s, result.getZygosity(), i++); SqlUtils.setSqlParameter(s, result.getDataSourceId(), i++); SqlUtils.setSqlParameter(s, result.getProjectId(), i++); SqlUtils.setSqlParameter(s, result.getOrganisationId(), i++); SqlUtils.setSqlParameter(s, result.getPipelineId(), i++); SqlUtils.setSqlParameter(s, result.getProcedureId(), i++); SqlUtils.setSqlParameter(s, result.getParameterId(), i++); SqlUtils.setSqlParameter(s, result.getColonyId(), i++); SqlUtils.setSqlParameter(s, result.getDependentVariable(), i++); SqlUtils.setSqlParameter(s, result.getControlSelectionMethod().name(), i++); SqlUtils.setSqlParameter(s, result.getMpAcc(), i++); SqlUtils.setSqlParameter(s, 5, i++); // MP external DB ID = 5 SqlUtils.setSqlParameter(s, result.getMaleControlCount(), i++); SqlUtils.setSqlParameter(s, result.getMaleMutantCount(), i++); SqlUtils.setSqlParameter(s, result.getFemaleControlCount(), i++); SqlUtils.setSqlParameter(s, result.getFemaleMutantCount(), i++); SqlUtils.setSqlParameter(s, result.getMetadataGroup(), i++); SqlUtils.setSqlParameter(s, result.getStatisticalMethod(), i++); SqlUtils.setSqlParameter(s, result.getWorkflow().toString(), i++); SqlUtils.setSqlParameter(s, result.getWeightAvailable().toString(), i++); SqlUtils.setSqlParameter(s, result.getStatus(), i++); SqlUtils.setSqlParameter(s, (String)null, i++); SqlUtils.setSqlParameter(s, (String) null, i++); SqlUtils.setSqlParameter(s, this.getpValue(), i++); SqlUtils.setSqlParameter(s, this.getEffectSize(), i++); SqlUtils.setSqlParameter(s, this.getMalePValue(), i++); SqlUtils.setSqlParameter(s, this.getMaleEffectSize(), i++); SqlUtils.setSqlParameter(s, this.getFemalePValue(), i++); SqlUtils.setSqlParameter(s, this.getFemaleEffectSize(), i++); SqlUtils.setSqlParameter(s, this.getClassificationTag(), i++); SqlUtils.setSqlParameter(s, result.getAdditionalInformation(), i++); return s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void prepareInsertObject() {\n // Require modify row to prepare.\n if (getModifyRow() == null) {\n return;\n }\n\n if (hasMultipleStatements()) {\n for (Enumeration statementEnum = getSQLStatements().elements();\n statementEnum.hasMoreEle...
[ "0.71356887", "0.6522117", "0.6402363", "0.6388939", "0.6310267", "0.6294167", "0.6225532", "0.6188824", "0.6167223", "0.6152749", "0.6143888", "0.601567", "0.598505", "0.5962513", "0.593972", "0.58686846", "0.5780506", "0.57777536", "0.57581496", "0.5745536", "0.57438976", ...
0.5921027
15
TODO fix this method so that it works. Exception missing algorithm
public static SecretKey passSecretKey(char[] password, byte[] salt, String algorithm) { PBEKeySpec mykeyspec = null; SecretKey key = null; try { final int HASH_ITERATIONS = 10000; final int KEY_LENGTH = 256; mykeyspec = new PBEKeySpec(password, salt, HASH_ITERATIONS, KEY_LENGTH); Set<String> algor = Security.getAlgorithms("Cipher"); key = SecretKeyFactory.getInstance((String) (algor.toArray())[0]) .generateSecret(mykeyspec); } catch (NoSuchAlgorithmException ex) { Logger.getLogger(AES.class.getName()).log(Level.SEVERE, null, ex); } catch (InvalidKeySpecException ex) { Logger.getLogger(AES.class.getName()).log(Level.SEVERE, null, ex); } return key; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private V e() throws com.amap.api.col.n3.gh {\n /*\n r6 = this;\n r0 = 0\n r1 = 0\n L_0x0002:\n int r2 = r6.b\n if (r1 >= r2) goto L_0x00cd\n com.amap.api.col.n3.ki r2 = com.amap.api.col.n3.ki.c() // Catch:{ ic -> 0x0043, gh -> 0x0...
[ "0.57707113", "0.5398982", "0.5369369", "0.53483427", "0.53380495", "0.52077633", "0.51986694", "0.5176741", "0.51671696", "0.5152925", "0.5150603", "0.5131035", "0.51212686", "0.5118528", "0.5110165", "0.5109111", "0.51072437", "0.5106778", "0.51064986", "0.50987333", "0.509...
0.0
-1
A method that encrypts plain text into unreadible bytes
public static byte[] encrypt(SecretKey key, byte[] plainText) { byte[] encryptedData = null; try { Cipher c = Cipher.getInstance("AES"); c.init(Cipher.ENCRYPT_MODE, key); encryptedData = c.doFinal(plainText); } catch (IllegalBlockSizeException ex) { Logger.getLogger(AES.class.getName()).log(Level.SEVERE, null, ex); } catch (BadPaddingException ex) { Logger.getLogger(AES.class.getName()).log(Level.SEVERE, null, ex); } catch (InvalidKeyException ex) { Logger.getLogger(AES.class.getName()).log(Level.SEVERE, null, ex); } catch (NoSuchAlgorithmException ex) { Logger.getLogger(AES.class.getName()).log(Level.SEVERE, null, ex); } catch (NoSuchPaddingException ex) { Logger.getLogger(AES.class.getName()).log(Level.SEVERE, null, ex); } return encryptedData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String encrypt(String plainText);", "byte[] encrypt(String plaintext);", "public String encrypt(String geheimtext);", "Encryption encryption();", "public static byte[] encryptText(String plainText,SecretKey secKey) throws Exception{\n\r\n Cipher aesCipher = Cipher.getInstance(\"AES\");\r\n\r\n ...
[ "0.7925081", "0.7456198", "0.7133175", "0.7096321", "0.70864725", "0.70358217", "0.69914615", "0.69504076", "0.6893975", "0.6665818", "0.6644398", "0.66381776", "0.6630933", "0.66206944", "0.660769", "0.65970975", "0.6579108", "0.65659845", "0.65180665", "0.6488857", "0.64188...
0.5956002
50
get results of voting
public List getResults() { List<Candidate> list = new ArrayList<>(); list = getCurrentVoting().getCandidates(); list.sort(Comparator.comparingInt(Candidate::getVoices)); return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printVottingQuestion(){\n for (Voting voting : votingList){\n System.out.println(\"question : \"+voting.getQuestion());\n }\n\n }", "private void results() {\n\t\t// when the election is not closed,\n\t\ttry{\n\t\t\tMap<String,Integer> results = election.getResultsFromPoll...
[ "0.70233196", "0.6945065", "0.6868819", "0.6868819", "0.6689989", "0.66229326", "0.6593956", "0.65039736", "0.6414512", "0.63960844", "0.63960844", "0.6388935", "0.63804847", "0.6260372", "0.62197423", "0.6202703", "0.6122432", "0.6119003", "0.6080645", "0.60782814", "0.60483...
0.69030666
2
Internal initialization method. All of the public constructors invoke this method.
private void init(Writer writer, String encoding) { setOutput(writer, encoding); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void initialize() {}", "protected void initialize() {}", "@Override public void init()\n\t\t{\n\t\t}", "protected void init() {\n }", "protected void initialize() {\n \t\n }", "@Override\n\t\tpublic void init() {\n\t\t}", "private void init() {\n }", "@Override\r\n\tpublic final v...
[ "0.82804847", "0.82804847", "0.8272646", "0.82414645", "0.8225588", "0.81242245", "0.8105814", "0.81044936", "0.8102101", "0.8102101", "0.8086702", "0.8086702", "0.8086702", "0.8086702", "0.8081041", "0.8081041", "0.8079522", "0.8072096", "0.80703926", "0.8055214", "0.8047318...
0.0
-1
Set a new output destination for the document.
public void setOutput(Writer writer, String _encoding) { if (writer == null) { output = new OutputStreamWriter(System.out); } else { output = writer; } encoding = _encoding; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setOutput(File output) {\r\n this.output = output;\r\n }", "void setOutputPath(String outputPath);", "public void setOutputPath(String pOutputPath)\n {\n __m_OutputPath = pOutputPath;\n }", "public abstract void setOutputUrl(String outputUrl);", "public void setOu...
[ "0.6475555", "0.64523625", "0.61853284", "0.6162703", "0.613102", "0.61276597", "0.6051553", "0.5939468", "0.5931767", "0.5911225", "0.59110516", "0.5808878", "0.57818735", "0.5764586", "0.5763814", "0.57461655", "0.57294375", "0.5724807", "0.5681431", "0.5660991", "0.5648142...
0.49698976
81
Set whether the writer should print out the XML declaration (&lt;?xml version='1.0' ... ?>). This option is set to true by default.
public void setXmlDecl(boolean _writeXmlDecl) { this.writeXmlDecl = _writeXmlDecl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@DOMSupport(DomLevel.THREE)\r\n\t@BrowserSupport({BrowserType.FIREFOX_2P})\r\n\t@Property void setXmlStandalone(boolean xmlStandalone);", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\ttry {\n\t\t\treset();\n\n\t\t\tif (writeXmlDecl) {\n\t\t\t\tString e = \"\";\n\t\t\t\tif (encoding != null...
[ "0.6107622", "0.61015403", "0.5995421", "0.5856588", "0.5856548", "0.56943", "0.5661688", "0.5647082", "0.55719626", "0.5557408", "0.5539405", "0.5471141", "0.54578024", "0.54558474", "0.54546636", "0.5453346", "0.53928214", "0.53605723", "0.5354554", "0.5338342", "0.5338057"...
0.6827674
0
Sets the header string. This string will be written right after the xml declaration without any escaping. Useful for generating a boilerplate DOCTYPE decl, PIs, and comments.
public void setHeader(String _header) { this.header = _header; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void xsetHeader(org.apache.xmlbeans.XmlString header);", "void setHeader(java.lang.String header);", "public static void header(String s) {\n\t\t// header2.set(s);\n\t}", "public void setHeader(String header) {\n\t\tthis.header = header;\n\t\tthis.handleConfig(\"header\", header);\n\t}", "protected String ...
[ "0.6791435", "0.65129983", "0.64751893", "0.6247224", "0.61551356", "0.6101506", "0.592105", "0.59012425", "0.58939064", "0.5868", "0.58460057", "0.5810911", "0.57732725", "0.5743009", "0.5661222", "0.5608437", "0.55392545", "0.5508431", "0.5490406", "0.5431827", "0.5414191",...
0.6003329
6
////////////////////////////////////////////////////////////////// Methods from org.xml.sax.ContentHandler. ////////////////////////////////////////////////////////////////// Write the XML declaration at the beginning of the document. Pass the event on down the filter chain for further processing.
@Override public void startDocument() throws SAXException { try { reset(); if (writeXmlDecl) { String e = ""; if (encoding != null) { e = " encoding=\"" + encoding + '\"'; } writeXmlDecl("<?xml version=\"1.0\"" + e + " standalone=\"yes\"?>"); } if (header != null) { write(header); } super.startDocument(); } catch (IOException e) { throw new SAXException(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startDocument()\n throws SAXException {\n newContent = new StringBuffer();\n // TODO: what is the proper way to set this?\n newContent.append(\"<?xml version=\\\"1.0\\\"?>\");\n }", "@Override\r\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();...
[ "0.66569346", "0.64393187", "0.6404173", "0.637102", "0.63565224", "0.62897396", "0.62897396", "0.62650067", "0.62610334", "0.6245708", "0.6237966", "0.623629", "0.6213371", "0.6213371", "0.6213371", "0.61984706", "0.61287045", "0.60588235", "0.6053664", "0.6052947", "0.60339...
0.7256955
0
Write a newline at the end of the document. Pass the event on down the filter chain for further processing.
@Override public void endDocument() throws SAXException { try { super.endDocument(); flush(); } catch (IOException e) { throw new SAXException(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void newLine()\r\n {\r\n logFile.println();\r\n logFile.flush();\r\n }", "public void flushEvent()\n throws SAXException;", "public static void end() {\n Log.writeln(\"<xml-end/> <!-- Non-xml data follows ... -->\");\n }", "@Override\n\tprotected void endOfLine() {\...
[ "0.5746403", "0.5661824", "0.5630367", "0.55401665", "0.5486121", "0.5485964", "0.5459096", "0.5457979", "0.5428974", "0.54136556", "0.53662777", "0.53544396", "0.5353428", "0.5325869", "0.5306458", "0.5298259", "0.52776057", "0.52620745", "0.5223692", "0.52063066", "0.519829...
0.5298749
15
Write a start tag. Pass the event on down the filter chain for further processing.
@Override public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException { try { if (!startTagIsClosed) { write(">"); } elementLevel++; // nsSupport.pushContext(); write('<'); write(qName); writeAttributes(atts); // declare namespaces specified by the startPrefixMapping methods if (!locallyDeclaredPrefix.isEmpty()) { for (Map.Entry<String, String> e : locallyDeclaredPrefix.entrySet()) { String p = e.getKey(); String u = e.getValue(); if (u == null) { u = ""; } write(' '); if ("".equals(p)) { write("xmlns=\""); } else { write("xmlns:"); write(p); write("=\""); } char ch[] = u.toCharArray(); writeEsc(ch, 0, ch.length, true); write('\"'); } locallyDeclaredPrefix.clear(); // clear the contents } // if (elementLevel == 1) { // forceNSDecls(); // } // writeNSDecls(); super.startElement(uri, localName, qName, atts); startTagIsClosed = false; } catch (IOException e) { throw new SAXException(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void handleStart(HtmlDocument.Tag tag) {\n if (!tag.isSelfTerminating()) {\n // Add to the stack of tags needing closing tag\n mSeenTags.push(new TagWrapper(tag, mBuilder.length()));\n }\n }", "public synchronized void writeStart(Transaction t)...
[ "0.61258626", "0.5744731", "0.5581481", "0.55290973", "0.55103457", "0.54702306", "0.53664684", "0.5330486", "0.5279759", "0.5260873", "0.5242344", "0.52234054", "0.5204339", "0.5175452", "0.51635236", "0.5131699", "0.51267606", "0.51265574", "0.5119537", "0.51136076", "0.511...
0.47435772
70
Write an end tag. Pass the event on down the filter chain for further processing.
@Override public void endElement(String uri, String localName, String qName) throws SAXException { try { if (startTagIsClosed) { write("</"); write(qName); write('>'); } else { write("/>"); startTagIsClosed = true; } super.endElement(uri, localName, qName); // nsSupport.popContext(); elementLevel--; } catch (IOException e) { throw new SAXException(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void end() {\n Log.writeln(\"<xml-end/> <!-- Non-xml data follows ... -->\");\n }", "@Override\n public void writeEndElement() throws XMLStreamException {\n closeStartTag();\n if(_depth == 0){\n return;\n }\n if(_ncContextState[_depth]){\n ns...
[ "0.67591053", "0.6364206", "0.61292595", "0.6038151", "0.60166025", "0.60114586", "0.601125", "0.587611", "0.58758706", "0.58629525", "0.5786515", "0.57853687", "0.5774438", "0.5770619", "0.57608026", "0.57540405", "0.5738778", "0.57345146", "0.57297", "0.5723156", "0.5705856...
0.6004727
7
Write character data. Pass the event on down the filter chain for further processing.
@Override public void characters(char ch[], int start, int len) throws SAXException { try { if (!startTagIsClosed) { write('>'); startTagIsClosed = true; } writeEsc(ch, start, len, false); super.characters(ch, start, len); } catch (IOException e) { throw new SAXException(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override // ohos.com.sun.xml.internal.stream.events.DummyEvent\r\n public void writeAsEncodedUnicodeEx(Writer writer) throws IOException {\r\n if (this.fIsCData) {\r\n writer.write(\"<![CDATA[\" + getData() + \"]]>\");\r\n return;\r\n }\r\n charEncode(writer, this.fDa...
[ "0.6526788", "0.6237406", "0.61410874", "0.6124468", "0.6025309", "0.5988107", "0.59796184", "0.593091", "0.5893274", "0.58742815", "0.57952625", "0.5724098", "0.57185566", "0.5673226", "0.56290853", "0.56276375", "0.56029445", "0.5592929", "0.5569979", "0.5562956", "0.554979...
0.49078998
89
Write ignorable whitespace. Pass the event on down the filter chain for further processing.
@Override public void ignorableWhitespace(char ch[], int start, int length) throws SAXException { try { writeEsc(ch, start, length, false); super.ignorableWhitespace(ch, start, length); } catch (IOException e) { throw new SAXException(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic void ignorableWhitespace(char[] ch, int start, int length)\n\t\t\t\tthrows SAXException {\n\t\t\t\n\t\t}", "@Override\n\tpublic void ignorableWhitespace(char[] ch, int start, int length)\n\t\t\tthrows SAXException {\n\t\t\n\t}", "@Override\n\tpublic void ignorableWhitespace(char[] ch, int...
[ "0.63996685", "0.6310153", "0.6310153", "0.6276115", "0.61936754", "0.6178247", "0.61426574", "0.59853756", "0.5902834", "0.57853895", "0.5775046", "0.5683335", "0.5622691", "0.5408891", "0.53941566", "0.5392366", "0.5341839", "0.5326119", "0.51900506", "0.50984037", "0.50926...
0.6107684
7
Write a processing instruction. Pass the event on down the filter chain for further processing.
@Override public void processingInstruction(String target, String data) throws SAXException { try { if (!startTagIsClosed) { write('>'); startTagIsClosed = true; } write("<?"); write(target); write(' '); write(data); write("?>"); if (elementLevel < 1) { write('\n'); } super.processingInstruction(target, data); } catch (IOException e) { throw new SAXException(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void visit(ProcessingInstruction node);", "public void process(WatchedEvent event) {\n\t\t\n\t}", "@Override\n\tpublic void processingInstruction() {\n\t\t\n\t}", "public interface ProcessingInstructionEvent extends LocatedEvent {\n /**\n * Returns the target of the processing instruction.\n */\n Strin...
[ "0.5948071", "0.5756352", "0.5745683", "0.5732534", "0.5551883", "0.54797894", "0.5229676", "0.52291954", "0.5197152", "0.51807785", "0.51749575", "0.5134198", "0.5103834", "0.5079895", "0.5073855", "0.5004965", "0.49956486", "0.49787572", "0.49527422", "0.494929", "0.4926209...
0.0
-1
Start a new element without a qname, attributes or a Namespace URI. This method will provide an empty string for the Namespace URI, and empty string for the qualified name, and a default empty attribute list. It invokes startElement(String, String, String, Attributes)} directly.
public void startElement(String localName) throws SAXException { startElement("", localName, "", EMPTY_ATTS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void startElement( String namespaceURI, String sName, String qName, Attributes attrs );", "public void startElement (String uri, String localName,\n String qName, Attributes attributes)\n throws SAXException\n {\n // no op\n }", "public void startElement(String nsUR...
[ "0.74247766", "0.7025519", "0.69138587", "0.68230975", "0.6632503", "0.66013867", "0.64915305", "0.6478867", "0.6394465", "0.63106495", "0.6310047", "0.62129235", "0.6163117", "0.61449134", "0.6127929", "0.60256225", "0.6000614", "0.5981781", "0.58741385", "0.5871078", "0.580...
0.62730086
11
////////////////////////////////////////////////////////////////// Internal methods. ////////////////////////////////////////////////////////////////// Write a raw character.
protected final void write(char c) throws IOException { output.write(c); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void writeChar(char value);", "String charWrite();", "void write (char ch, int offset);", "void writeChar(final char result) throws WriterException;", "private void writeChar(byte[] bytes) {\n // let terminal do auto wrap around. \n term.writeChar(bytes);\n\n // update cursor \n ...
[ "0.7657424", "0.7516219", "0.6996226", "0.69262886", "0.65910316", "0.6581603", "0.65625715", "0.6494657", "0.6459505", "0.64506996", "0.64459723", "0.6434237", "0.64133817", "0.64108807", "0.63992995", "0.6368455", "0.631475", "0.62601054", "0.62482804", "0.6198044", "0.6189...
0.7150858
2
Write a raw string.
protected final void write(String s) throws IOException { output.write(s); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void writeRaw(String text)\n/* */ throws IOException\n/* */ {\n/* 442 */ int len = text.length();\n/* 443 */ int room = this._outputEnd - this._outputTail;\n/* */ \n/* 445 */ if (room == 0) {\n/* 446 */ _flushBuffer();\n/* 447 */ room = this._outputEnd -...
[ "0.7320881", "0.6718967", "0.64666265", "0.63453734", "0.6335856", "0.626789", "0.6264318", "0.6245811", "0.6243342", "0.6200984", "0.6174019", "0.60846907", "0.6082774", "0.60737795", "0.6046571", "0.6044729", "0.6037916", "0.6032238", "0.5968528", "0.5873774", "0.5821234", ...
0.62307805
9
Write out an attribute list, escaping values. The names will have prefixes added to them.
private void writeAttributes(Attributes atts) throws IOException { int len = atts.getLength(); for (int i = 0; i < len; i++) { char ch[] = atts.getValue(i).toCharArray(); write(' '); write(atts.getQName(i)); write("=\""); writeEsc(ch, 0, ch.length, true); write('"'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void quoteAttr(List<String> items, String name,\n String value) {\n items.add(name);\n items.add(getString(value, true));\n }", "public void dumpAttributeList(Attributes atts)\n {\n\tif (atts.getLength() == 0)\n\t System.out.println(nestStr...
[ "0.6392457", "0.6312529", "0.5984783", "0.591561", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "...
0.70283926
0
Write an array of data characters with escaping.
private void writeEsc(char ch[], int start, int length, boolean isAttVal) throws IOException { escapeHandler.escape(ch, start, length, isAttVal, output); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void writeChars(char[] c, int off, int len) throws IOException;", "private void _writeString(char[] text, int offset, int len)\n/* */ throws IOException\n/* */ {\n/* 1049 */ if (this._characterEscapes != null) {\n/* 1050 */ _writeStringCustom(text, offset, len);\n/* 1051 */ return...
[ "0.64597255", "0.623355", "0.6197165", "0.6152059", "0.6141916", "0.61035997", "0.6079825", "0.605474", "0.597702", "0.5773362", "0.5701028", "0.5675669", "0.5656608", "0.56256354", "0.5574791", "0.55744606", "0.55502665", "0.5550057", "0.5540228", "0.5514068", "0.5431339", ...
0.6581445
0
This class allows for the construction of a vbox which contributes to the layout of the GUI
public Vbox(ImagePane a, ImagePane b,ImagePane c){ super(); AppMenuBar menuBar = new AppMenuBar(a,b,c); HBox hb1 = new HBox(); hb1.getChildren().add(menuBar); HBox hb2 = new HBox(); Button button1 = new Button("Checkers"); Button button2 = new Button("Horizontal Stripes"); Button button3 = new Button("Vertical Stripes"); button1.setOnAction(event ->{ doChecker(a,b,c); }); button2.setOnAction(event ->{ horizontal(a,b,c); }); button3.setOnAction(event ->{ vertical(a,b,c); }); hb2.setSpacing(10); button1.setPrefSize(100,1); button2.setPrefSize(150,1); button3.setPrefSize(150,1); hb2.getChildren().addAll(button1,button2,button3); getChildren().addAll(hb1,hb2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VBox addVBox() {\n\n VBox vbox = new VBox();\n vbox.setPadding(new Insets(10)); // Set all sides to 10\n vbox.setSpacing(8); // Gap between nodes\n\n\n\n Image addCategoryImage = new Image(getClass().getResourceAsStream(\"images/buttons/Add.png\"));\n\n// titl...
[ "0.6970921", "0.69499725", "0.68388623", "0.6810777", "0.66943365", "0.66780454", "0.65003633", "0.64870995", "0.6466989", "0.64367265", "0.64202356", "0.6407937", "0.6403012", "0.63791823", "0.6364571", "0.6355406", "0.63432413", "0.6341456", "0.6305849", "0.6267357", "0.625...
0.6181416
25
Option window that appears to help the user customize the horizontal stripe effect
private void horizontal(ImagePane a, ImagePane b,ImagePane c){ Stage stage = new Stage(); VBox vb = new VBox(); Label label = new Label("Please enter the desired stripe height, in pixels."); TextField textField = new TextField(); vb.setPadding(new Insets(20)); HBox hb = new HBox(); Button cancel = new Button("Cancel"); Button ok = new Button("OK"); ok.setOnAction(event->{ int number = 0; String text = textField.getText(); try { number =Integer.parseInt(text); if(number > 0) c.doHorizontalStripes(a.image, b.image, number); else c.error(); } catch (Exception nfe) { { c.error();} } // try stage.close(); }); cancel.setOnAction(event ->{ stage.close(); }); hb.setSpacing(10); hb.setPadding(new Insets(20)); hb.getChildren().addAll(cancel,ok); vb.getChildren().addAll(label,textField,hb); Scene scene = new Scene(vb); stage.setScene(scene); stage.setTitle("Horizontal Stripe Options"); stage.initModality(Modality.APPLICATION_MODAL); stage.sizeToScene(); stage.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private JMenu optionMenu(final DrawingPanel thePanel) {\r\n final JMenu optionMenu = new JMenu(\"Option\");\r\n optionMenu.setMnemonic(KeyEvent.VK_O);\r\n \r\n final JMenu optionThickness = new JMenu(\"Thickness\");\r\n optionThickness.setMnemonic(KeyEvent.VK_T);\r\n \r\n ...
[ "0.6079633", "0.5663123", "0.564651", "0.5608472", "0.558674", "0.55805176", "0.55010337", "0.54688174", "0.5458781", "0.5454228", "0.54451305", "0.54241705", "0.54094136", "0.5380832", "0.53648514", "0.535688", "0.53436095", "0.5330247", "0.53147376", "0.53137124", "0.528450...
0.5193133
31
Window that appears allowing the user to specify the size of vertical stripes
private void vertical(ImagePane a, ImagePane b,ImagePane c){ Stage stage = new Stage(); VBox vb = new VBox(); Label label = new Label("Please enter the desired stripe height, in pixels."); TextField textField = new TextField(); vb.setPadding(new Insets(20)); HBox hb = new HBox(); Button cancel = new Button("Cancel"); Button ok = new Button("OK"); ok.setOnAction(event->{ int number = 0; String text = textField.getText(); try { number =Integer.parseInt(text); if(number > 0) c.doVerticalStripes(a.image, b.image, number); else c.error(); } catch (NumberFormatException nfe) { c.error(); } // try stage.close(); }); cancel.setOnAction(event ->{ stage.close(); }); hb.setSpacing(10); hb.setPadding(new Insets(20)); hb.getChildren().addAll(cancel,ok); vb.getChildren().addAll(label,textField,hb); Scene scene = new Scene(vb); stage.setScene(scene); stage.setTitle("Vertical Stripe Options"); stage.initModality(Modality.APPLICATION_MODAL); stage.sizeToScene(); stage.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showRectangleSizeSetup() {\n sizeArea.removeAllViewsInLayout();\n sizeArea.addView(heightEdit);\n sizeArea.addView(widthEdit);\n }", "private void drawBox(Graphics window, int hsBtoRGB, int x, int y) {\n\t\t\n\t}", "void calculateChevronTrim() {\n ToolBar tb = new ToolBa...
[ "0.61319613", "0.59431887", "0.5912418", "0.588828", "0.5861593", "0.5842143", "0.57031393", "0.5701032", "0.5683631", "0.5670916", "0.5633905", "0.5611938", "0.5610894", "0.5608667", "0.5602367", "0.559806", "0.55939794", "0.55925864", "0.5577384", "0.55717313", "0.55480903"...
0.5911505
3
Creates a window that allows the user to specify the size of checker for the result image
private void doChecker(ImagePane a, ImagePane b,ImagePane c){ Stage stage = new Stage(); VBox vb = new VBox(); Label label = new Label("Please enter the desired checker width, in pixels."); TextField textField = new TextField(); vb.setPadding(new Insets(20)); HBox hb = new HBox(); Button cancel = new Button("Cancel"); Button ok = new Button("OK"); ok.setOnAction(event->{ int number = 0; String text = textField.getText(); try { number =Integer.parseInt(text); if(number >0) c.doChecker(a.image, b.image, number); c.error(); } catch (Exception nfe) { { c.error();} } // try stage.close(); }); cancel.setOnAction(event ->{ stage.close(); }); hb.setSpacing(10); hb.setPadding(new Insets(20)); hb.getChildren().addAll(cancel,ok); vb.getChildren().addAll(label,textField,hb); Scene scene = new Scene(vb); stage.setScene(scene); stage.setTitle("Checkers Options"); stage.initModality(Modality.APPLICATION_MODAL); stage.sizeToScene(); stage.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createWindow() {\r\n\t\t// Create the picture frame and initializes it.\r\n\t\tthis.createAndInitPictureFrame();\r\n\r\n\t\t// Set up the menu bar.\r\n\t\tthis.setUpMenuBar();\r\n\r\n\t\t// Create the information panel.\r\n\t\t//this.createInfoPanel();\r\n\r\n\t\t// Create the scrollpane for the pictu...
[ "0.6316304", "0.6171482", "0.61460876", "0.59912294", "0.59113824", "0.5902656", "0.58847976", "0.5877417", "0.58643013", "0.584924", "0.5742986", "0.57385045", "0.5698968", "0.56749505", "0.5668642", "0.5668314", "0.5662932", "0.5640536", "0.563535", "0.56198806", "0.5605191...
0.6042356
3
TODO Autogenerated method stub
public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Please Enter your salary:"); int num1 = sc.nextInt(); System.out.println("salary offered:"); int num2 = sc.nextInt(); System.out.println(" Current Leavs : "); int num3 = sc.nextInt(); System.out.println("Leavs Offered:"); int num4 = sc.nextInt(); if (num1 < num2) { System.out.println("Join the company"); } else { System.out.println(" DO not join."); } System.out.println((num1 < num2 ) || (num3 < num4)); System.out.println((num1 < num2 ) && (num3 < num4)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", ...
0.0
-1
implementation of the HttpServlet interface
protected void doGet ( HttpServletRequest req, HttpServletResponse resp ) { QueryResultCache cache = null; if ( getConfig().getUseQueryResultCache() ) { cache = new QueryResultCacheImpl( getConfig().getPathOfQueryResultCache(), getConfig().getMaxQueryResultCacheEntryDuration() ); } log.info( "Start processing request " + req.hashCode() + " with " + getLinkedDataCache().toString() + "." ); // log.info( "real path: " + getServletContext().getRealPath("WW") ); log.info( "getInitialFilesDirectory: " + getInitialFilesDirectory() ); String accept = req.getHeader( "ACCEPT" ); if ( accept != null && ! accept.contains(Constants.MIME_TYPE_RESULT_XML) && ! accept.contains(Constants.MIME_TYPE_XML1) && ! accept.contains(Constants.MIME_TYPE_XML2) && ! accept.contains(Constants.MIME_TYPE_RESULT_JSON) && ! accept.contains(Constants.MIME_TYPE_JSON) && ! accept.contains("application/*") && ! accept.contains("*/*") ) { log.info( "NOT ACCEPTABLE for request " + req.hashCode() + " (ACCEPT header field: " + accept + ")" ); try { resp.sendError( HttpServletResponse.SC_NOT_ACCEPTABLE, "Your client does not seem to accept one of the possible content types (e.g. '" + Constants.MIME_TYPE_RESULT_XML + "', '" + Constants.MIME_TYPE_RESULT_JSON + "')." ); } catch ( IOException e ) { log.error( "Sending the error reponse to request " + req.hashCode() + " caused a " + Utils.className(e) + ": " + e.getMessage(), e ); } return; } // get (and check) the request parameters DirectResultRequestParameters params = new DirectResultRequestParameters (); if ( ! params.process(req) ) { log.info( "BAD REQUEST for request " + req.hashCode() + ": " + params.getErrorMsgs() ); try { resp.sendError( HttpServletResponse.SC_BAD_REQUEST, params.getErrorMsgs() ); } catch ( IOException e ) { log.error( "Sending the error reponse to request " + req.hashCode() + " caused a " + Utils.className(e) + ": " + e.getMessage(), e ); } return; } InputStream cachedResultSet = null; ResultSetMem resultSet = null; if ( ! params.getIgnoreQueryCache() && cache != null && cache.hasResults(params.getQueryString(),params.getResponseContentType()) ) { log.info( "Found cached result set for request " + req.hashCode() + " with query: " + params.getQueryString() ); cachedResultSet = cache.getResults( params.getQueryString(), params.getResponseContentType() ); } else { // execute the query log.info( "Start executing request " + req.hashCode() + " with query:" ); log.info( params.getQueryString() ); LinkTraversalBasedQueryEngine.register(); JenaIOBasedLinkedDataCache ldcache = getLinkedDataCache(); QueryExecution qe = QueryExecutionFactory.create( params.getQuery(), new LinkedDataCacheWrappingDataset(ldcache) ); resultSet = new ResultSetMem( qe.execSelect() ); log.info( "Created the result set (size: " + resultSet.size() + ") for request " + req.hashCode() + "." ); } // create the response OutputStream out = null; try { out = resp.getOutputStream(); } catch ( IOException e ) { log.error( "Getting the response output stream for request " + req.hashCode() + " caused a " + Utils.className(e) + ": " + e.getMessage(), e ); try { resp.sendError( HttpServletResponse.SC_INTERNAL_SERVER_ERROR ); } catch ( IOException e2 ) { log.error( "Sending the error reponse for request " + req.hashCode() + " caused a " + Utils.className(e2) + ": " + e2.getMessage(), e2 ); } return; } // write the response resp.setContentType( params.getResponseContentType() ); try { if ( cachedResultSet == null ) { if ( params.getResponseContentType() == Constants.MIME_TYPE_RESULT_JSON ) { ResultSetFormatter.outputAsJSON( out, resultSet ); } else { ResultSetFormatter.outputAsXML( out, resultSet ); } } else { copy( cachedResultSet, out ); } log.info( "Result written to the response stream for request " + req.hashCode() + "." ); } catch ( Exception e ) { log.error( "Writing the model to the response stream for request " + req.hashCode() + " caused a " + Utils.className(e) + ": " + e.getMessage() ); try { resp.sendError( HttpServletResponse.SC_INTERNAL_SERVER_ERROR ); } catch ( IOException e2 ) { log.error( "Sending an error response for request " + req.hashCode() + " caused a " + Utils.className(e2) + ": " + e2.getMessage(), e2 ); } } // finish try { out.flush(); resp.flushBuffer(); out.close(); log.info( "Response buffer for request " + req.hashCode() + " flushed." ); } catch ( IOException e ) { log.error( "Flushing the response buffer for request " + req.hashCode() + " caused a " + Utils.className(e) + ": " + e.getMessage(), e ); } log.info( "Finished processing request " + req.hashCode() + " with " + getLinkedDataCache().toString() + "." ); if ( cache != null && cachedResultSet == null ) { cache.cacheResults( params.getQueryString(), resultSet ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface HttpServletRequestHandler {\r\n\tpublic void handle(HttpServletRequest request, HttpServletResponse response) throws IOException;\r\n}", "public HttpServlet() {\r\n\t\tsuper();\r\n\t}", "public interface Servlet {\n\n /**\n * Called by the servlet container to indicate to a servlet that...
[ "0.75366014", "0.7535852", "0.7191778", "0.7179958", "0.7138808", "0.7104038", "0.70703906", "0.70621836", "0.7026749", "0.69600576", "0.6925405", "0.6912797", "0.6912797", "0.6885846", "0.6883568", "0.6880476", "0.68672734", "0.6864185", "0.686016", "0.6836465", "0.6824795",...
0.0
-1
Creating object using Builder pattern in java Cake whiteCake = new Cake.Builder().sugar(10).butter(0.5).eggs(2).vanila(2).flour(1.5). bakingpowder(0.75).milk(0.5).build(); Cake is ready to eat :) System.out.println(whiteCake);
public static void main(String args[]) { Person prsn=new Person.PersonBuilder("chenni", "chennai", "hyderabad").lastName("achary").createPerson(); System.out.println(prsn); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Builder builder(){ return new Builder(); }", "static Builder builder() {\n return new Builder();\n }", "public static Builder builder ()\n {\n\n return new Builder ();\n\n }", "public static Builder builder() {\n return new Builder();\n }", "public sta...
[ "0.71449065", "0.6861058", "0.68364346", "0.65917736", "0.65917736", "0.65917736", "0.65917736", "0.6583649", "0.6562036", "0.6562036", "0.6562036", "0.6550176", "0.6539328", "0.6539328", "0.6539328", "0.6539328", "0.6539328", "0.6539328", "0.6539328", "0.6539328", "0.6539328...
0.0
-1
This method returns the entire contents of the generated file. Clients can simply save the value returned from
public abstract String getFormattedContent();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public File generateFile()\r\n {\r\n return generateFile(null);\r\n }", "String getFileOutput();", "private String getFileContents ()\n {\n final String s = m_buffers.values ()//\n .stream ()//\n .flatMap (List::stream)//\n .collect (Collectors.joining ()...
[ "0.7290035", "0.66759884", "0.6640149", "0.6447038", "0.63523966", "0.63477284", "0.63272387", "0.6297333", "0.6293079", "0.62831885", "0.6226365", "0.61909467", "0.6189574", "0.61470115", "0.61157775", "0.60710454", "0.6066242", "0.6065142", "0.6051923", "0.60507023", "0.603...
0.0
-1
Get the file name (without any path). Clients should use this method to determine how to save the results.
public abstract String getFileName();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String ge...
[ "0.80631113", "0.80631113", "0.80631113", "0.80631113", "0.80631113", "0.80631113", "0.80631113", "0.80631113", "0.80631113", "0.78736967", "0.78736967", "0.7849226", "0.7777934", "0.7777934", "0.7777934", "0.7777934", "0.7777934", "0.7763939", "0.77589905", "0.77589905", "0....
0.73365915
42
Gets the target project. Clients can call this method to determine how to save the results.
public String getTargetProject() { return targetProject; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Project getProject() {\r\n return project;\r\n }", "public Project getProject(){\n\t\treturn this.project;\n\t}", "public Project getProject() {\n return project;\n }", "public Project getProject() {\n return project;\n }", "public Project getProject()\n\t{\n\t\treturn this.p...
[ "0.71981287", "0.71633345", "0.7134867", "0.7134867", "0.7134034", "0.713358", "0.7110176", "0.70259327", "0.7006271", "0.70009243", "0.6982487", "0.6920965", "0.6920965", "0.6906892", "0.68535024", "0.6845435", "0.6802391", "0.6728997", "0.6690688", "0.66827416", "0.66146517...
0.76796395
0
Get the target package for the file. Clients should use this method to determine how to save the results.
public abstract String getTargetPackage();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private File getCurrentArtifact() {\n\t\treturn new File(target, jarName.concat(EXTENSION));\n\t}", "java.lang.String getPackage();", "public PackageNode getPackage();", "io.deniffel.dsl.useCase.useCase.Package getPackage();", "public File getLibraryFile() {\n return ((FilePath) this.getClasses().it...
[ "0.63302124", "0.6154308", "0.61270887", "0.6053221", "0.6046287", "0.60059434", "0.5906933", "0.58416814", "0.5833049", "0.58037853", "0.5796651", "0.5752141", "0.57203704", "0.56776094", "0.56706953", "0.56561726", "0.56412196", "0.56398594", "0.560647", "0.5604826", "0.560...
0.6775473
1
/ Main Objective : Handle StringIndexOutOfBound Exception. It will occur whenever an index is invoked of a string, which is not in the range. Program Description Print reverse of a given String value.
public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.println("Enter a string"); String str = scan.next(); String temp = new String(); for (int i= str.length()-1; i >=-1; i--) { try { temp = temp+ str.charAt(i); } catch (StringIndexOutOfBoundsException e) { System.out.print("Reverse String is:" + temp); System.out.println("\nWarning: String have only "+str.length() + " characters"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void reverse(string str) \n{ \n for (int i=str.length()-1; i>=0; i--) \n cout << str[i]; \n}", "static void findReverseString(String string){\n\t\tfor (int i = string.length() -1; i >= 0; i--) {\n\t\t\tSystem.out.print(string.charAt(i));\n\t\t}\n\t}", "@Test\n\tpublic void RevStr() {\n\n\t\tString str ...
[ "0.706004", "0.6848387", "0.6830268", "0.6819092", "0.6655412", "0.66311306", "0.65968883", "0.6539863", "0.6530651", "0.65125936", "0.6487252", "0.6454381", "0.6445978", "0.6433559", "0.6422441", "0.640497", "0.63814086", "0.63578063", "0.6334939", "0.63190746", "0.63086516"...
0.70077884
1
TODO Autogenerated method stub
@Override public int compareTo(StudentBean arg0) { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", ...
0.0
-1
Your code goes here! It is useful to plan out your steps before you get started!
public static void main(String[] args) { Scanner input = new Scanner(System.in); int smallest = 100; int largest = 0; while(true) { System.out.println("Enter a number (-1 to quit):"); int num = input.nextInt(); if(num == -1) { break; } if(num < smallest) { smallest = num; } if(num > largest) { largest = num; } System.out.println("Smallest # so far: " + smallest); System.out.println("Largest # so far: " + largest); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setup() {\n }", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "public void setup() {\r\n\r\n\t}", "public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}", "protected void setup() {\r\n }", "@Overr...
[ "0.6134702", "0.61059", "0.6082178", "0.6056836", "0.59029263", "0.5841001", "0.57670027", "0.57447904", "0.5743919", "0.57186395", "0.57186395", "0.5693298", "0.56807613", "0.5665538", "0.566494", "0.5659341", "0.56574863", "0.56385964", "0.56346357", "0.5617216", "0.5601880...
0.0
-1
/ never use xOffset/yOffset and xOffsetStep/yOffsetStep, because custom launchers will mess with your brain and this problem can't be fixed! Use only xPixelOffset/yPixelOffset (who used yPixelOffset???)))
@Override public void offsetChange (float xOffset, float yOffset, float xOffsetStep, float yOffsetStep, int xPixelOffset, int yPixelOffset) { pixelOffset = xPixelOffset; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setStepCounterTileXY();", "void handlePixelStart(int x, int y, int color);", "private void setPixelInfo(Stroke theStroke)\n\t{\n\t\t// get the data from the stroke in the required format\n\t\tVector ptList = theStroke.getM_ptList();\n\t\t//double [][] strokeMat = theStroke.getPointsAs2DMatrix_Double();\n\...
[ "0.6382225", "0.6119322", "0.6105306", "0.6037622", "0.5986491", "0.59273726", "0.59146833", "0.58807784", "0.5879391", "0.5871269", "0.5819975", "0.5760421", "0.5715558", "0.56824416", "0.56753397", "0.56732875", "0.56529856", "0.56409025", "0.56351686", "0.56148505", "0.560...
0.7323469
0
Created by Dmytro_Kovalskyi on 28.10.2015.
public interface EventListener { void onMessage(GenericRequest message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void cajas() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpu...
[ "0.5837144", "0.57860124", "0.5758308", "0.57032275", "0.5665201", "0.56311333", "0.56207055", "0.561779", "0.561779", "0.561744", "0.5617146", "0.56065273", "0.560563", "0.5556516", "0.5535155", "0.55301297", "0.5522533", "0.55113614", "0.548711", "0.5468421", "0.54488474", ...
0.0
-1
Outputs the GUI to the terminal window and allows the user to input text via a Scanner object s instantiated inside the class. Colours the text using ANSI escape codes from the ConsloleColour enum. Splits the line of text entered into an words delimited ba a space and adds them to an array words. Loops over the words in the array, calling the getGoogleWords method via a WordParser object wp on each word and outputting the result to the terminal. Ten words only output to the terminal before a new line is printed.
public void start() throws Throwable { s = new Scanner(System.in); wp = new WordParser(); while (keepRunning) { System.out.println(ConsoleColour.WHITE_BOLD_BRIGHT); System.out.println("***************************************************"); System.out.println("* GMIT - Dept. Computer Science & Applied Physics *"); System.out.println("* *"); System.out.println("* Eamon's Text Simplifier V0.1 *"); System.out.println("* (AKA Confusing Language Generator) *"); System.out.println("* *"); System.out.println("***************************************************"); System.out.print("Enter Text>"); System.out.print(ConsoleColour.YELLOW_BOLD_BRIGHT); String input = s.nextLine(); String[] words = input.split(" "); System.out.println(""); System.out.println(ConsoleColour.WHITE_BOLD_BRIGHT); System.out.print("Simplified Text>"); System.out.print(ConsoleColour.YELLOW_BOLD_BRIGHT); int count = 0; for (int i = 0; i < words.length; i++) { words[i] = wp.getGoogleWord(words[i]); System.out.print(words[i] + " "); count++; if (count == 10) { System.out.println(); count = 0; } } System.out.println(ConsoleColour.RESET); System.out.println(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void run() {\n\n /**\n * Replace all delimiters with single space so that words can be\n * tokenized with space as delimiter.\n */\n for (int x : delimiters) {\n text = text.replace((char) x, ' ');\n }\n\n StringTokenizer tokenizer = new StringT...
[ "0.6019783", "0.5766576", "0.56118304", "0.5553007", "0.55310816", "0.5485265", "0.54555297", "0.5410443", "0.5201846", "0.51474124", "0.51416016", "0.5137431", "0.5099102", "0.5085368", "0.50824803", "0.5072853", "0.505", "0.5040282", "0.5014732", "0.5005631", "0.50036526", ...
0.6794244
0
Chequeo unicidad de CUIT
private void checkDatosCliente(Cliente cliente) throws ValidacionException{ List<Cliente> clientes = clienteDAOLocal.getClienteByCUIT(cliente.getCuit(), cliente.getId() == null ? 0 : cliente.getId()); if(!clientes.isEmpty()) { throw new ValidacionException(EValidacionException.CLIENTE_YA_EXISTE_CUIT.getInfoValidacion()); } // Chequeo lo del dígito verificador if(!cuitValido(cliente.getCuit())) { throw new ValidacionException(EValidacionException.CLIENTE_CUIT_INVALIDO.getInfoValidacion()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void cajas() {\n\t\t\n\t}", "public int cuantosCursos(){\n return inscripciones.size();\n }", "private void suono(int idGioc) {\n\t\tpartita.effettoCasella(idGioc);\n\t}", "public int contenuto(Casella cas)\n { return contenutoCaselle[cas.riga][cas.colonna]; }", "public int getC...
[ "0.641013", "0.63235676", "0.62549543", "0.62375873", "0.6218627", "0.6217237", "0.62051666", "0.61735684", "0.6171158", "0.61495453", "0.6119126", "0.60974985", "0.60936666", "0.6058181", "0.6047007", "0.6044057", "0.6033783", "0.6026179", "0.599245", "0.5989675", "0.5948990...
0.0
-1
/ access modifiers changed from: protected
public void setFont(String str) { if (Strings.notEmpty(str)) { Typeface typeface = FontUtils.getTypeface(this.textView.getContext(), str); if (typeface != null) { this.textView.setTypeface(typeface); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.640...
0.0
-1
/ access modifiers changed from: protected
public CharSequence obtainTextToMeasure() { return this.textView.getText(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.640...
0.0
-1
Created by mbro8_000 on 08.12.2015.
public interface CountDataRepository extends JpaRepository<CountData,Long>{ //@Query("select c from CountData c where userEntity=:user and servicesEntity=:service order by c.id ") CountData findTop1ByUserEntityAndServicesEntityOrderByIdDesc(UserEntity userEntity,ServicesEntity servicesEntity); List<CountData> findTop2ByUserEntityAndServicesEntityOrderByIdDesc (UserEntity userEntity,ServicesEntity servicesEntity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void bicar() {...
[ "0.5880631", "0.5797255", "0.57903713", "0.57643145", "0.57472795", "0.5718656", "0.5718656", "0.57105464", "0.56978965", "0.5693509", "0.5682743", "0.5674781", "0.56452656", "0.56391805", "0.5606897", "0.5590336", "0.5589793", "0.5559022", "0.5545728", "0.5545728", "0.554181...
0.0
-1
Perform physics simulations here...
private void update(Ball currBall){ currBall.ovalX += currBall.speedX * TIME_STEP; currBall.ovalY += currBall.speedY * TIME_STEP; if (currBall.ovalX >= screenW - currBall.ovalD) { // Right penetration currBall.speedX = -currBall.speedX; currBall.ovalX = currBall.ovalX - 2 * ((currBall.ovalX + currBall.ovalD) - screenW); } else if (currBall.ovalX <= 0) { // Left penetration currBall.speedX = -currBall.speedX; currBall.ovalX = -currBall.ovalX; } if (currBall.ovalY >= screenH - currBall.ovalD) { // Bottom penetration currBall.speedY = -currBall.speedY; currBall.ovalY = currBall.ovalY - 2 * ((currBall.ovalY + currBall.ovalD) - screenH); } else if (currBall.ovalY <= 0) { // Top penetration currBall.speedY = -currBall.speedY; currBall.ovalY = -currBall.ovalY; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void runSimulation(){\r\n initialize();\r\n initialRun();\r\n initialize(\"square\");\r\n initialRun();\r\n initialize(\"circle\");\r\n initialRun();\r\n initialize(\"crack\");\r\n initialRun(); \r\n ...
[ "0.6666454", "0.6563616", "0.6521181", "0.64375746", "0.6366036", "0.6363911", "0.63432187", "0.63260186", "0.62870246", "0.62827724", "0.627463", "0.6260898", "0.6256193", "0.62452966", "0.6224163", "0.6166059", "0.61573845", "0.60901046", "0.608852", "0.6080907", "0.6053479...
0.0
-1
create the functions of the two buttons
private void createbuttons(){ newPatient = (Button) findViewById(R.id.newButton); newPatient.setOnClickListener(buttonClick); registeredPatient = (Button) findViewById(R.id.registeredButton); registeredPatient.setOnClickListener(buttonClick); viewManagement = (Button) findViewById(R.id.viewStaffActivitiesButton); viewManagement.setOnClickListener(buttonClick); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void init_buttons(){\r\n /**\r\n * BOTON NUEVO\r\n */\r\n im_tool1.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonInicio();...
[ "0.7320367", "0.69561857", "0.6917229", "0.68908197", "0.6823597", "0.6660645", "0.66085285", "0.6594059", "0.6585616", "0.6573747", "0.65262794", "0.65111285", "0.6505711", "0.65007204", "0.6477091", "0.64758027", "0.64726985", "0.6459259", "0.64584285", "0.64536875", "0.643...
0.64882565
14
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.logOutLink: Intent logOut = new Intent(PatientOptionScreen.this, HomeScreen.class); logOut.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(logOut); finish(); return true; default: return super.onOptionsItemSelected(item); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ...
[ "0.7904669", "0.78062934", "0.77666116", "0.7727495", "0.7631956", "0.7622029", "0.75855523", "0.7530999", "0.7488249", "0.74583405", "0.74583405", "0.74391454", "0.742199", "0.7403733", "0.73921114", "0.7387281", "0.73795027", "0.73708874", "0.7363864", "0.7356251", "0.73459...
0.0
-1
Crea un nueva instancia de ripio a partir de un elemento xml
public Ripio(Element element) throws ExcepcionLimitesIncorrectosEnElTerreno { String principio = element.getAttributeValue("principio"); String fin = element.getAttributeValue("fin"); this.principio = Integer.parseInt(principio); this.fin = Integer.parseInt(fin); if (this.fin < this.principio) { throw new ExcepcionLimitesIncorrectosEnElTerreno(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object create(Element element) throws IOException, SAXException, ParserConfigurationException;", "RESTElement createRESTElement();", "DomainElement createDomainElement();", "protected abstract M createNewElement();", "public XmlElement() {\n }", "@Override\n protected T createInstance() throws Except...
[ "0.69953257", "0.6389446", "0.6375023", "0.628939", "0.6279473", "0.622823", "0.62054586", "0.6181832", "0.61008984", "0.6077504", "0.6066693", "0.60428196", "0.6036787", "0.5941467", "0.5920577", "0.5917673", "0.590237", "0.58972806", "0.589244", "0.5886443", "0.58451605", ...
0.0
-1
/ TODO findByContractNb return Contract
public Contract findByNumber(int number) { TypedQuery<Contract> query = entityManager.createQuery( "SELECT u FROM Contract u WHERE u.numContract = ?", Contract.class); query.setParameter(1, number); return query.getResultList().isEmpty() ? null : query.getResultList().get(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Contract findById(int id);", "OcCustContract selectByPrimaryKey(String contractNo);", "public Contract find_Contract(Integer contract_id, Integer branch_id) {\n return contract_dao.find(contract_id, branch_id);\n }", "@Override\r\n\tpublic List<ContractTO> findContractTo(String contractNo) {\n\t\tr...
[ "0.68953997", "0.6892425", "0.6798892", "0.6671371", "0.6566973", "0.65214926", "0.65007377", "0.6340729", "0.6190945", "0.61197186", "0.6092724", "0.609112", "0.6089819", "0.6089819", "0.6089819", "0.6089819", "0.6081948", "0.60679656", "0.5991115", "0.5978385", "0.5960636",...
0.7004814
0
SELECT COUNT() FROM Contract u WHERE u.dateStart BETWEEN cast('19900101' as date) AND cast('20191231' as date)
public int numberOfContractBetween(String start, String end){ Query query = entityManager.createQuery( "SELECT u FROM Contract u WHERE u.dateStart BETWEEN cast(:start as date) AND cast(:end as date)"); query.setParameter("start", start); query.setParameter("end", end); return query.getResultList().size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic int getCount(Date dateStart, Date dateEnd) {\n\t\tString hql = \"select sum(cc.count) from cinema_condition cc where cc.date >= ? and cc.date <= ?\";\r\n\t\tQuery query = this.getCurrentSession().createQuery(hql);\r\n\t\tquery.setParameter(0, dateStart);\r\n\t\tquery.setParameter(1, dateEnd);...
[ "0.67274237", "0.6296952", "0.5604255", "0.5509639", "0.54914373", "0.54712766", "0.54269856", "0.5333331", "0.52801514", "0.5260661", "0.5236998", "0.5230565", "0.5190576", "0.5167742", "0.5136257", "0.51037735", "0.5089345", "0.50816804", "0.506676", "0.5055445", "0.498197"...
0.7156087
0
/ Armazena todos os cursos do departamento em um Array
public String[] imprimeCursos() { String[] st = new String[CURSOS.size()]; for (int i = 0; i < st.length; i++) { st[i] = CURSOS.get(i).getNomeCurso(); } return st; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void listarDepartamentos() {\r\n\t\tdepartamentos = departamentoEJB.listarDepartamentos();\r\n\t}", "private void getDepartamentos() {\n try{\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"ServiceQualificationPU\");\n EntityManager em = emf.createEntity...
[ "0.7335228", "0.6889027", "0.68405956", "0.6808572", "0.67326194", "0.6659436", "0.66442895", "0.6520796", "0.6513488", "0.64852685", "0.6398117", "0.63799286", "0.6376482", "0.63604105", "0.6263944", "0.62617755", "0.6209422", "0.61377406", "0.6133472", "0.6098793", "0.60925...
0.0
-1
/ Armazena todos os professores do departamento em um Array
public String[] imprimeProfessores() { String[] st = new String[PROFESSORES.size()]; for (int i = 0; i < st.length; i++) { st[i] = PROFESSORES.get(i).getCodProfessor() + " " + PROFESSORES.get(i).getNome(); } return st; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void listarDepartamentos() {\r\n\t\tdepartamentos = departamentoEJB.listarDepartamentos();\r\n\t}", "public String[] getNombresDepartamentosJefe(){\r\n //Primero obtenemos el arrayList con los departamentos\r\n ArrayList<String> dpts=controlador.getDepartamentosJefe(getEmpleadoActual().getE...
[ "0.71140265", "0.6895171", "0.687562", "0.65550095", "0.6473895", "0.64401203", "0.62919104", "0.6285952", "0.6274007", "0.62603945", "0.62578994", "0.62140745", "0.61635214", "0.6123525", "0.6119446", "0.6118228", "0.6104703", "0.6053449", "0.60389054", "0.60223377", "0.6006...
0.61923987
12
/ Adiciona um curso ao departamento
public boolean addCurso(String nome, String codDPresponsavel) { Boolean testa = true; for (int i = 0; i < CURSOS.size(); i++) { if (CURSOS.get(i).getNomeCurso().equals(nome)) { testa = false; break; } } if (testa == true) { Curso crs = new Curso(nome); crs.setCodDepartamentoResponsavel(codDPresponsavel); CURSOS.add(crs); return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Curso modificaCurso(Curso curso);", "public void crearDepartamento(String nombredep, String num, int nvJefe, int horIn, int minIn, int horCi, int minCi) {\r\n\t\t// TODO Auto-generated method stub by carlos Sánchez\r\n\t\t//Agustin deberia devolverme algo q me indique si hay un fallo alcrearlo cual es\r\n\t\t//h...
[ "0.60742784", "0.59946424", "0.5903824", "0.58368444", "0.5803775", "0.57982934", "0.55810684", "0.5554534", "0.5453355", "0.5442455", "0.5411915", "0.5405863", "0.53915906", "0.5365807", "0.5338941", "0.53259087", "0.53065515", "0.52986926", "0.52760124", "0.5273954", "0.527...
0.5360216
14
/ Remove um Curso do Departamento baseado no nome
public boolean removeCurso(String nome) { Boolean testa = false; for (int i = 0; i < CURSOS.size(); i++) { if (CURSOS.get(i).getNomeCurso().equals(nome)) { BASE.removeCurso(nome); CURSOS.remove(i); testa = true; break; } } if (testa == true) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void remover(Tipo tipo) {\n String sql = \"delete from tipos_servicos where id = ?\";\r\n try {\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, tipo.getId());\r\n \r\n stmt.execute();\r\n } ...
[ "0.6422871", "0.6284953", "0.62003857", "0.61873823", "0.61524117", "0.61524117", "0.6117872", "0.6114262", "0.6110427", "0.60913235", "0.6079049", "0.6077388", "0.60508615", "0.6047539", "0.6037687", "0.60318685", "0.6028537", "0.5982695", "0.5978606", "0.5976439", "0.594661...
0.56629145
78
/ Adiciona professor ao departamento
public boolean addProfessor(String nome, String cpf, String sexo, String endereco, String codProf, String codDepartamento) { Boolean testa = true; for (int i = 0; i < PROFESSORES.size(); i++) { if (PROFESSORES.get(i).getCpf().equals(cpf) == true) { testa = false; break; } } if (testa == true) { Professor prof = new Professor(nome, cpf, sexo, endereco, codProf, codDepartamento); PROFESSORES.add(prof); return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void salvarProfessor(){\n \n this.professor.setName(nome);\n this.professor.setEmail(email);\n this.professor.setSenha(senha);\n\n try {\n \n this.professorServico.persistence(this.professor);\n \n } catch (CadastroUsuarioException e...
[ "0.67269826", "0.6578101", "0.6529837", "0.6497423", "0.6449132", "0.6393339", "0.63834125", "0.62837076", "0.62383074", "0.6186551", "0.6132588", "0.61059695", "0.6095323", "0.6085108", "0.6083131", "0.60552853", "0.60457903", "0.6035985", "0.6033571", "0.6008913", "0.600071...
0.6892998
0
/ Remove professor do departamento baseado e um codProf
public boolean removeProfessor(String codProf) { Boolean testa = false; JOptionPane.showMessageDialog(null, codProf); for (int i = 0; i < PROFESSORES.size(); i++) { if (PROFESSORES.get(i).getCodProfessor().equals(codProf) == true) { if (getBASE().removeProf(codProf) == true) { JOptionPane.showMessageDialog(null, "REMOVIDO DA BASE"); } else { JOptionPane.showMessageDialog(null, "FALHA REMOVIDO DA BASE"); } PROFESSORES.remove(i); testa = true; break; } } if (testa == true) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void remover(Professor p)throws ProfessorNExisteException;", "public void eliminarProfesor(ProfesorAsignatura profesor){\n profesores.remove(profesor);\n }", "public void localizarEremoverProdutoCodigo(Prateleira prat){\r\n //instacia um auxiliar para procura\r\n Produto mockup = new Pr...
[ "0.74122155", "0.7273197", "0.69857085", "0.6965462", "0.68542176", "0.68486446", "0.66692346", "0.6563829", "0.6554962", "0.64675087", "0.6349024", "0.6342283", "0.6338245", "0.6309654", "0.63088053", "0.62811863", "0.62716347", "0.62539035", "0.6233311", "0.6216495", "0.618...
0.73219556
1
/ Busca um professor baseado no index
public Professor getProfIndex(int index) { if (PROFESSORES.size() >= index) { return PROFESSORES.get(index); } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic String falar() {\r\n\t\treturn \"[ \"+getNome()+\" ] Sou Um Professor\";\r\n\t}", "Professor procurarNome(String nome) throws ProfessorNomeNExisteException;", "void viewStudents(Professor professor);", "private void _generateAnAssistantProfessor(int index) {\n String id = _getId(CS_C...
[ "0.65325665", "0.64049727", "0.6082357", "0.59580266", "0.59471333", "0.58990353", "0.5853885", "0.5797871", "0.57650876", "0.5757684", "0.5723158", "0.571676", "0.5710901", "0.56877315", "0.5681407", "0.56748563", "0.56535", "0.5648358", "0.5646152", "0.5643827", "0.5615979"...
0.5986069
3
factory method to swap out lock impl. in one place
static Lock createLock() { return new /*Prio*/Lock(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface PreemptiveLock {\n\n /**\n * 尝试获得锁\n * @return 是否成功获得锁\n * @param lock\n */\n boolean getLock(String lock);\n\n /**\n * 释放锁\n * @param lock\n */\n void releaseLock(String lock);\n}", "public abstract ReentrantLock getLock();", "public void lock() {\n\n ...
[ "0.6831693", "0.6822651", "0.6568443", "0.6551506", "0.65406567", "0.6527223", "0.6526231", "0.64886045", "0.64826924", "0.64422345", "0.641924", "0.6395163", "0.6393649", "0.6358947", "0.6327184", "0.6308344", "0.6292513", "0.62659526", "0.62117964", "0.6171346", "0.6171346"...
0.6823351
1
ez a metodus betolti username alapjen(email) a usert, ha nem lesz sikeres a betoltes jeloljuk throwsal hogy UsernamNotFoundException lesz dobva, el kell azt kapnia az ot hivo metodusnak.
@Override public UserDetailsWithAvatar loadUserByUsername(String userName) throws UsernameNotFoundException { User user = userRepository.findByUserName(userName); //megprobaljuk a repository findbyEmail metodussal megkeresni a user-t if (user == null){ //a repository a talalot egy User Entity-be(olyan Bean ami az adatbazis 1 rekodrjanak adatait tartalmazza) menti throw new UsernameNotFoundException("Invalid username or password."); //Ha a repository nem talalja a user-t es null erteket dob a User Entity akkor UsernameNotFoundException-t dobunk } return new UserDetailsWithAvatar(user.getUserName(), user.getPassword(), mapRolesToAuthorities(user.getRoles()), user.getAvatar()); //Ha a repository talalt a kriteriumnak megfelelo user-t, akkor egy altalunk meghatorozott User Entity class-bol kikerjuk a user adatait, tobbek kozt a role-t is és az itt megtalahto //mapRolesToAuthorities privat metodussal autentikacio listava alakitjuk azt, es ezzel egyutt a user minden ertkevel letrehozunk egy uj //SpringSecurityban mar elore megirt user peldanyt. Ez a user mar kezelni tudja az autentikaciokat, osszehasonlítasokat, lock.olast stb stb. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {\n\t\t// ako se ne radi nasledjivanje, paziti gde sve treba da se proveri email\n\t\tKorisnik user = korisnikService.pronadjiPoMejlu(email);\n\t\t\n\t\tif (user == null) {\n\t\t\tthrow new UsernameNotFoundException(S...
[ "0.7093117", "0.70086044", "0.68168294", "0.67794156", "0.6767143", "0.6684672", "0.6645005", "0.66362125", "0.6591809", "0.65820223", "0.65692717", "0.6529135", "0.64811724", "0.63726354", "0.63695294", "0.6364372", "0.63494766", "0.63452446", "0.6340961", "0.6337907", "0.63...
0.60107094
71
Ez a metudos megkapja a user rolejait collection formajaban. Minden role tartalmaz egy idt es egy megnevezest. A metodus visszateresi erteke egy olyan lista aminek minden eleme egy szerepkor nev alapjan peldanyositott SimpleGrantedAuthority object peldany. Minden ilyen peldany a GrantedAuthority interfacet valositja meg, igy ha el akarjuk kerlni a folytonos modositast arra az esetre ha masfele Authority classt hasznalnank, azt adjuk meg GENERICel a visszateresi erteknek hogy egy olyan Collection aminek tagjai a GrantedAuthority "utodjai"
private Collection<? extends GrantedAuthority> mapRolesToAuthorities(Collection<Role> roles){ return roles.stream() .map(role -> new SimpleGrantedAuthority(role.getName())) .collect(Collectors.toList()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\npublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t// TODO Auto-generated method stub\n\treturn null;\n}", "@Override\n\tpublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t\t final List<GrantedAuthority> authorities = new ArrayList<GrantedAuthority>();\n\t for ...
[ "0.65735227", "0.65690994", "0.65226275", "0.64323854", "0.63841885", "0.6318495", "0.62485874", "0.6234885", "0.61904013", "0.6107547", "0.60882205", "0.60681987", "0.60295784", "0.60043037", "0.5993097", "0.59878504", "0.5986328", "0.5953788", "0.5937127", "0.59006834", "0....
0.592738
19
TODO Autogenerated method stub
@Override protected void parseSelf(String leftstr) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public String getName() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public XmlData doCmd(XmlData inputxd) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public XmlDataStruct getOutputStruct() { 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.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", ...
0.0
-1
Common interface for Sentence writers.
public interface SentenceWriterInterface { void writeSentence(Sentence sentence) throws IOException; void writeHeader() throws IOException ; void writeFooterAndClose() throws IOException ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface SentenceMember {\n}", "public interface LineWriter {\r\n\r\n\t/**\r\n\t * <p> \r\n\t *\t<jdl:section>\r\n\t * \t\t<jdl:text lang='it'>Va a capo.</jdl:text>\r\n\t * \t\t<jdl:text lang='en'>Carriage return.</jdl:text> \r\n\t *\t</jdl:section>\r\n\t * </p> \r\n\t *\r\n\t */\r\n public void prin...
[ "0.64547735", "0.6292085", "0.6264983", "0.6182861", "0.6097148", "0.60009444", "0.5922876", "0.59126353", "0.5891119", "0.58637613", "0.5830852", "0.5799548", "0.57509065", "0.57110006", "0.5709742", "0.5689047", "0.56357586", "0.563232", "0.5631771", "0.55994207", "0.553812...
0.793677
0
REDIRECT CONSOLE OUTPUT TO FILE
public static void RedirectOutput() { try { PrintStream out = new PrintStream(new FileOutputStream("ybus.txt")); System.setOut(out); //Re-assign the standard output stream to a file. } catch (FileNotFoundException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void redirectSystemStreams() {\r\n\t\tOutputStream out = new OutputStream() {\r\n\t\t\t@Override\r\n\t\t\tpublic void write(int b) throws IOException {\r\n\t\t\t\tupdateTextArea(String.valueOf((char) b));\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void write(byte[] b, int off, int len) throws IOExce...
[ "0.64853245", "0.64229584", "0.627956", "0.61706567", "0.61624277", "0.60953444", "0.6047611", "0.6025536", "0.59837943", "0.59733975", "0.5973367", "0.59612083", "0.59157455", "0.59124917", "0.58699983", "0.5861855", "0.58467627", "0.58250403", "0.5815787", "0.5791081", "0.5...
0.7422138
0
OUTPUT YBUS MATRIX IN BUSBRANCH FORMAT
public static void printBusBranch(ArrayList<Ybus> ybus_list) { System.out.println("The Y-bus in the bus-branch is the following:\n"); System.out.println(" From " + " To " + " R (p.u) " + " X (p.u) " + " G (p.u) " + " B (p.u) "+ " Device Type " + "Device "); System.out.println("-------------------------------------------------------------------------------------------------------------------"); for (Ybus branch : ybus_list) { if (branch.devType=="Shunt Capacitor") { System.out.format(" %s %s %.4f %.4f %.4f %.4f %s %s\n", branch.From,branch.To,branch.R,branch.X,branch.Gch,branch.Bch,branch.devType,branch.dev); } else if (branch.devType=="Line") { System.out.format(" %s %s %.4f %.4f %.4f %.4f %s %s\n", branch.From,branch.To,branch.R,branch.X,branch.Gch,branch.Bch,branch.devType,branch.dev); } else { System.out.format(" %s %s %.4f %.4f %.4f %.4f %s %s\n", branch.From,branch.To,branch.R,branch.X,branch.Gch,branch.Bch,branch.devType,branch.dev); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printYbusMatrix(ArrayList<Ybus> ybus_list, ArrayList<BusbarSection> busbar_list) {\n\t\tint Ybus_number=0;\n\t\tComplex temp1, temp2;\n\t\tComplex[][] Ybus_elements;\n\t\tArrayList<BusbarSection> temp_busbar_list = new ArrayList<BusbarSection>();\n\t\tArrayList<UsedYbus> used_Y = new ArrayList<U...
[ "0.64957184", "0.5402114", "0.52920425", "0.5230807", "0.5228452", "0.52145016", "0.52024436", "0.5198645", "0.5179464", "0.51743805", "0.506313", "0.5046463", "0.5021879", "0.50147545", "0.5002684", "0.49919575", "0.49906003", "0.4960957", "0.49456045", "0.49366513", "0.4916...
0.5774203
1
OUTPUT YBUS MATRIX IN TABLE FORMAT
public static void printYbusMatrix(ArrayList<Ybus> ybus_list, ArrayList<BusbarSection> busbar_list) { int Ybus_number=0; Complex temp1, temp2; Complex[][] Ybus_elements; ArrayList<BusbarSection> temp_busbar_list = new ArrayList<BusbarSection>(); ArrayList<UsedYbus> used_Y = new ArrayList<UsedYbus>(); ArrayList<UsedTF> used_TF = new ArrayList<UsedTF>(); UsedYbus fromY; UsedTF fromT; boolean notfound, notfoundT ; for (Ybus branch : ybus_list) { for (BusbarSection busbar : busbar_list) { if (branch.From.equals(busbar.name)) { busbar.connected=true; } if (branch.To.equals(busbar.name)) { busbar.connected=true; } } } for (BusbarSection busbar : busbar_list) { if(busbar.connected) { temp_busbar_list.add(busbar); busbar.number_in_Ybus=Ybus_number; Ybus_number=Ybus_number+1; } } Ybus_elements = new Complex[temp_busbar_list.size()][temp_busbar_list.size()]; for (int i=0;i<temp_busbar_list.size();i++) { for (int j=0;j<temp_busbar_list.size();j++) { Ybus_elements[i][j] = new Complex(0.0,0.0); } } for (Ybus branch : ybus_list) { if (branch.devType=="Shunt Capacitor") { for (BusbarSection busbar : temp_busbar_list) { if (branch.From.equals(busbar.name)||branch.To.equals(busbar.name)) { temp2 = new Complex(branch.Gch, branch.Bch); Ybus_elements[busbar.number_in_Ybus][busbar.number_in_Ybus]=Ybus_elements[busbar.number_in_Ybus][busbar.number_in_Ybus].plus(temp2); } } } else { for (BusbarSection busbar : temp_busbar_list) { notfound = true; notfoundT = true; if (branch.From.equals(busbar.name)) { for (BusbarSection busbar2 : temp_busbar_list) { if (branch.To.equals(busbar2.name)) { for (UsedYbus tempY : used_Y) { if (((branch.From.equals(tempY.From))) && (branch.dev.equals(tempY.dev))) { notfound=false; } } for (UsedYbus tempY : used_Y) { if (((branch.To.equals(tempY.To))) && (branch.dev.equals(tempY.dev))) { notfound=false; } } for (UsedTF tempTF : used_TF) { if (((branch.From.equals(tempTF.From))) && (branch.dev.equals(tempTF.dev))) { notfoundT=false; } } for (UsedTF tempTF : used_TF) { if (((branch.To.equals(tempTF.To))) && (branch.dev.equals(tempTF.dev))) { notfoundT=false; } } temp1 = new Complex(branch.R, branch.X); temp1=temp1.reciprocal(); if (branch.devType=="Line") { temp2 = new Complex(branch.Gch/2, branch.Bch/2); if (notfound) { Ybus_elements[busbar.number_in_Ybus][busbar.number_in_Ybus]=Ybus_elements[busbar.number_in_Ybus][busbar.number_in_Ybus].plus(temp1); Ybus_elements[busbar.number_in_Ybus][busbar.number_in_Ybus]=Ybus_elements[busbar.number_in_Ybus][busbar.number_in_Ybus].plus(temp2); Ybus_elements[busbar2.number_in_Ybus][busbar2.number_in_Ybus]=Ybus_elements[busbar2.number_in_Ybus][busbar2.number_in_Ybus].plus(temp1); Ybus_elements[busbar2.number_in_Ybus][busbar2.number_in_Ybus]=Ybus_elements[busbar2.number_in_Ybus][busbar2.number_in_Ybus].plus(temp2); fromY= new UsedYbus(branch.From,branch.To,branch.devType,branch.dev); used_Y.add(fromY); } Ybus_elements[busbar.number_in_Ybus][busbar2.number_in_Ybus]=Ybus_elements[busbar.number_in_Ybus][busbar2.number_in_Ybus].minus(temp1); Ybus_elements[busbar2.number_in_Ybus][busbar.number_in_Ybus]=Ybus_elements[busbar2.number_in_Ybus][busbar.number_in_Ybus].minus(temp1); } else { if (notfoundT) { Ybus_elements[busbar.number_in_Ybus][busbar.number_in_Ybus]=Ybus_elements[busbar.number_in_Ybus][busbar.number_in_Ybus].plus(temp1); Ybus_elements[busbar2.number_in_Ybus][busbar2.number_in_Ybus]=Ybus_elements[busbar2.number_in_Ybus][busbar2.number_in_Ybus].plus(temp1); fromT= new UsedTF(branch.From,branch.To,branch.devType,branch.dev); used_TF.add(fromT); } Ybus_elements[busbar.number_in_Ybus][busbar2.number_in_Ybus]=Ybus_elements[busbar.number_in_Ybus][busbar2.number_in_Ybus].minus(temp1); Ybus_elements[busbar2.number_in_Ybus][busbar.number_in_Ybus]=Ybus_elements[busbar2.number_in_Ybus][busbar.number_in_Ybus].minus(temp1); } } } } } } } System.out.println("\n\nThe Y-bus in the matrix format is the following:\n"); for (int i=0;i<temp_busbar_list.size();i++) { for (int j=0;j<temp_busbar_list.size();j++) { System.out.format(" %.4f %.4fi |",Ybus_elements[i][j].re,Ybus_elements[i][j].im); } System.out.println(); System.out.println("------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"); System.out.println(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void outDisTable()\n\t{\n\t\tfor(int i = 0; i < sqNum; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < sqNum; j++)\n\t\t\t{\n\t\t\t\tSystem.out.printf(\"%-18s\", \"[\" + i + \",\" + j + \"]:\" + String.format(\" %.8f\", dm[i][j]));\n\t\t\t}\n\t\t\tSystem.out.print(\"\\r\\n\");\n\t\t}\n\t}", "public String getTable(...
[ "0.67814076", "0.64315003", "0.5845639", "0.58241606", "0.57972795", "0.57214135", "0.57178473", "0.5708184", "0.568149", "0.56283426", "0.5628113", "0.55729145", "0.5534862", "0.55188745", "0.54586715", "0.544239", "0.5435222", "0.5426137", "0.54164284", "0.53835887", "0.536...
0.5918825
2
TODO: Rename and change types and number of parameters
public static EchoEffectFragment newInstance() { EchoEffectFragment fragment = new EchoEffectFragment(); return fragment; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void getParameters(Parameters parameters) {\n\n }", "@Override\n\tprotected void initParams() {\n\t\t\n\t}", "public abstract String paramsToString();", "protected void setupParameters() {\n \n \n\n }", "public abstract Result mo5059a(Params... paramsArr);", "public void getParame...
[ "0.59931976", "0.5977712", "0.573602", "0.5673198", "0.5638195", "0.56235766", "0.56187797", "0.5569275", "0.55499786", "0.55272686", "0.5463663", "0.5447239", "0.5438263", "0.54108876", "0.5384065", "0.5374544", "0.53731865", "0.53700835", "0.5359534", "0.5358818", "0.534661...
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View root = inflater.inflate(R.layout.effect_echo_fragment, container, false); /////////////////////////////////////start ECHO////////////////////////////////////// sb_echofWetDryMix = (CircularSeekBar) root.findViewById(R.id.echofWetDryMixSeekBar); sb_echofFeedback = (CircularSeekBar) root.findViewById(R.id.echofFeedbackSeekBar); sb_echofLeftDelay = (DetailedSeekBar) root.findViewById(R.id.echofLeftDelaySeekBar); sb_echofRightDelay = (DetailedSeekBar) root.findViewById(R.id.echofRightDelaySeekBar); sw_echoIPanDelay = (Switch) root.findViewById(R.id.switch_panDalay); sb_echofWetDryMix.setOnSeekBarChangeListener(new CircleSeekBarListener()); sb_echofFeedback.setOnSeekBarChangeListener(new CircleSeekBarListener()); sb_echofLeftDelay.setListener(this); sb_echofRightDelay.setListener(this); sw_echoIPanDelay.setOnCheckedChangeListener(this); return root; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup...
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.66251...
0.0
-1
Created by hy on 2018/6/26
public interface BaseDao { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",...
[ "0.5856736", "0.5609387", "0.55922115", "0.55626136", "0.55217874", "0.55217874", "0.55076104", "0.5489408", "0.54762465", "0.54628813", "0.54461145", "0.54409915", "0.5426908", "0.5378692", "0.5374168", "0.53679097", "0.5361304", "0.5332472", "0.533093", "0.5324477", "0.5315...
0.0
-1
/String wDir = new String(System.getProperty("user.dir")); String imagesDir = wDir + System.getProperty("file.separator") + (new ClientResourceBundle()).getString("LOCAL_IMAGES_DIR") ;
public void jbInit() throws Exception{ this.addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(WindowEvent e) { this_windowClosing(e); } }); okB.setText("Ok"); okB.setMaximumSize(new Dimension(120, 23)); okB.setMinimumSize(new Dimension(100, 23)); okB.setPreferredSize(new Dimension(100, 23)); okB.setIcon(ResourceLoader.getImageIcon("images/button/ok.gif")); okB.addActionListener(new EditCommentDlg_okB_actionAdapter(this)); okB.addKeyListener(new EditCommentDlg_okB_keyAdapter(this)); rejLabel.setText(label); paneM.setLayout(gridBagLayout1); cancelB.setMaximumSize(new Dimension(100, 23)); cancelB.setMinimumSize(new Dimension(100, 23)); cancelB.setPreferredSize(new Dimension(100, 23)); cancelB.setText("Cancel"); cancelB.addActionListener(new EditCommentDlg_cancelB_actionAdapter(this)); cancelB.setIcon(ResourceLoader.getImageIcon("images/button/cancel.gif")); paneM.setMinimumSize(new Dimension(400, 300)); paneM.setPreferredSize(new Dimension(400, 300)); rejArea.setLineWrap(true); rejArea.setWrapStyleWord(true); rejArea.setMargin(new Insets(3, 3, 3, 3)); rejArea.setDoubleBuffered(true); paneM.add(rejLabel, new GridBagConstraints2(0, 0, 2, 1, 0.0, 0.0 ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(10, 10, 0, 5), 0, 0)); paneM.add(rejArea, new GridBagConstraints2(0, 1, 2, 1, 1.0, 1.0 ,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(10, 10, 0, 5), 0, 0)); paneM.add(okB, new GridBagConstraints2(0, 2, 1, 1, 0.0, 0.0 ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(8, 80, 5, 0), 0, 0)); paneM.add(cancelB, new GridBagConstraints2(1, 2, 1, 1, 0.0, 0.0 ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(8, 15, 5, 5), 0, 0)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public String getImageResourcesDir();", "public static String getImageResoucesPath() {\n\t\t//return \"d:\\\\PBC\\\\GitHub\\\\Theia\\\\portal\\\\WebContent\\\\images\";\n\t\treturn \"/Users/anaswhb/Documents/Eclipse/Workspace/portal/WebContent/images\";\n\t\t\n\t}", "private static void displayImagesD...
[ "0.71725273", "0.7097686", "0.6589757", "0.65002334", "0.6347883", "0.63417876", "0.6204053", "0.61831194", "0.6173276", "0.6140412", "0.61287546", "0.6094833", "0.6069115", "0.593789", "0.5914175", "0.58372283", "0.58357245", "0.5833844", "0.5833844", "0.5818473", "0.5795514...
0.0
-1
Read Document from a XML file.
private static Document read (File file) throws MalformedURLException, DocumentException { SAXReader reader = new SAXReader(); Document document = reader.read(file); return document; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Document getDocFromFile(String filename)\r\n throws ParserConfigurationException{\r\n {\r\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder db = dbf.newDocumentBuilder();\r\n Document doc = null;\r\n try{\r\n doc =...
[ "0.7482205", "0.7408792", "0.73114914", "0.7310799", "0.7121775", "0.70956933", "0.70846844", "0.7080422", "0.7075375", "0.7061408", "0.7016562", "0.6934556", "0.68601584", "0.6859491", "0.68560594", "0.6792828", "0.67310596", "0.67169565", "0.66913724", "0.6690239", "0.66655...
0.7392714
2
Adds the specified URL to this set if it is not already present.
public boolean add(URL url) { return super.add(normalize(url)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addURL(URL url) {\n logger.debug(this + \" adding URL \" + url);\n super.addURL(url);\n }", "Builder addUrl(URL value);", "private void addUrl(int urlID)\n\t{\n\t\tfor(int i=0;i<urlIDs.size();i++)\n\t\t{\n\t\t\tif(urlIDs.get(i)==urlID)\n\t\t\t{\n\t\t\t\tisUrlIDAssociatedWithSetInDa...
[ "0.7140356", "0.6998095", "0.6694195", "0.65875685", "0.6478536", "0.63107365", "0.6248596", "0.62485427", "0.6239169", "0.6202418", "0.6193876", "0.6177077", "0.6087228", "0.6017832", "0.59322184", "0.5913437", "0.5913437", "0.5911993", "0.58903664", "0.5887017", "0.58523774...
0.7689163
0
Removes the given URL from this set if it is present.
public boolean remove(URL url) { return super.remove(normalize(url)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final GetHTTP removeUrl() {\n properties.remove(URL_PROPERTY);\n return this;\n }", "public void removeEntry(final String url){\n if(url==null){\n return;\n }\n\n synchronized (mBitmapCache) {\n mBitmapCache.remove(url);\n }\n }", "public void unsetUrlValue()\r\n {\r...
[ "0.7045135", "0.67895156", "0.6670419", "0.64008003", "0.63156915", "0.61571044", "0.61031854", "0.6063471", "0.60434175", "0.594416", "0.5930376", "0.592791", "0.58910793", "0.5796119", "0.5790516", "0.5788344", "0.57849795", "0.57548726", "0.57382303", "0.5712556", "0.57006...
0.7599552
0
Returns true if this set contains the specified element.
public boolean contains(URL url) { return super.contains(normalize(url)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean contains(E element);", "public boolean contains(T element);", "public boolean contains(E element) {\r\n return items.contains(element);\r\n }", "public boolean contains(Object elem);", "@Override\r\n\tpublic boolean contains(T element) {\n\t\treturn false;\r\n\t}", "boolean conta...
[ "0.8411825", "0.82278395", "0.80930704", "0.7987379", "0.78936243", "0.7854058", "0.766955", "0.7630515", "0.7606972", "0.76057774", "0.75142145", "0.73527485", "0.7333135", "0.73297244", "0.7298583", "0.7217081", "0.71591115", "0.7155708", "0.71286654", "0.71110564", "0.7064...
0.0
-1
if the url points to a file then make sure we cleanup ".." "." etc.
public static URL normalize(URL url) { if (url.getProtocol().equals("file")) { try { File f = new File(cleanup(url.getFile())); if(f.exists()) return f.toURL(); } catch (Exception e) {} } return url; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String handleUrl(String s) {\n if (s.endsWith(\"/..\")) {\n int idx = s.lastIndexOf('/');\n s = s.substring(0, idx - 1);\n idx = s.lastIndexOf('/');\n String gs = s.substring(0, idx);\n if (!gs.equals(\"smb:/\")) {\n s = gs...
[ "0.69674957", "0.67782277", "0.63204944", "0.6298665", "0.6265585", "0.6227605", "0.6217084", "0.6158477", "0.6138221", "0.6128526", "0.60824394", "0.60090667", "0.5994327", "0.598557", "0.5972226", "0.59525883", "0.5949456", "0.59430516", "0.5939012", "0.59186", "0.5915561",...
0.7164154
0
Normalize a uri containing ../ and ./ paths.
private static String cleanup(String uri) { String[] dirty = tokenize(uri, "/\\", false); int length = dirty.length; String[] clean = new String[length]; boolean path; boolean finished; while (true) { path = false; finished = true; for (int i = 0, j = 0; (i < length) && (dirty[i] != null); i++) { if (".".equals(dirty[i])) { // ignore } else if ("..".equals(dirty[i])) { clean[j++] = dirty[i]; if (path) { finished = false; } } else { if ((i + 1 < length) && ("..".equals(dirty[i + 1]))) { i++; } else { clean[j++] = dirty[i]; path = true; } } } if (finished) { break; } else { dirty = clean; clean = new String[length]; } } StringBuffer b = new StringBuffer(uri.length()); for (int i = 0; (i < length) && (clean[i] != null); i++) { b.append(clean[i]); if ((i + 1 < length) && (clean[i + 1] != null)) { b.append("/"); } } return b.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static final String normalizePath(String path) {\n\t\t// Normalize the slashes and add leading slash if necessary\n\t\tString normalized = path;\n\t\tif (normalized.indexOf('\\\\') >= 0) {\n\t\t\tnormalized = normalized.replace('\\\\', '/');\n\t\t}\n\n\t\tif (!normalized.startsWith(\"/\")) {\n\t\t\tnormaliz...
[ "0.6682868", "0.6365596", "0.6292953", "0.62494373", "0.6131413", "0.6119213", "0.6092979", "0.59219646", "0.5884456", "0.58636326", "0.57270175", "0.56814253", "0.5665185", "0.5662681", "0.5657695", "0.5643444", "0.56052107", "0.55884314", "0.5538756", "0.54687625", "0.54624...
0.69797987
0
Constructs a string tokenizer for the specified string. All characters in the delim argument are the delimiters for separating tokens. If the returnTokens flag is true, then the delimiter characters are also returned as tokens. Each delimiter is returned as a string of length one. If the flag is false, the delimiter characters are skipped and only serve as separators between tokens. Then tokenizes the str and return an String[] array with tokens.
private static String[] tokenize(String str, String delim, boolean returnTokens) { StringTokenizer tokenizer = new StringTokenizer(str, delim, returnTokens); String[] tokens = new String[tokenizer.countTokens()]; int i = 0; while (tokenizer.hasMoreTokens()) { tokens[i] = tokenizer.nextToken(); i++; } return tokens; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String[] splitString(char delim, String string) {\n\t Vector<String> res = new Vector<String>();\n\t int len = string.length();\n\t int start = 0;\n\t for (int i=0; i<len; i++) {\n\t\t if (string.charAt(i) == delim) {\n\t\t\t res.add(string.substring(start, i));\n\t\t\t start = i+1;\n\t\t }\n...
[ "0.61895275", "0.60010374", "0.5903321", "0.5853131", "0.584403", "0.5819516", "0.5742732", "0.57351536", "0.569221", "0.56242883", "0.56192553", "0.5603791", "0.55730003", "0.5555582", "0.5536989", "0.553262", "0.5463047", "0.54111487", "0.53587466", "0.5343353", "0.53227556...
0.81170946
0
Creates an event multicaster instance which chains listenera with listenerb. Input parameters a and b should not be null, though implementations may vary in choosing whether or not to throw NullPointerException in that case.
CatalogListenerMulticaster(CatalogListener a, CatalogListener b) { this.a = a; this.b = b; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected RegresComponentListenerEventMulticaster(\r\n\t\t\tjava.util.EventListener a, java.util.EventListener b) {\r\n\t\tsuper(a, b);\r\n\t}", "protected static java.util.EventListener addInternal(\r\n\t\t\tjava.util.EventListener a, java.util.EventListener b) {\r\n\t\tif (a == null)\r\n\t\t\treturn b;\r\n\t\t...
[ "0.73693806", "0.6955205", "0.65647936", "0.5581946", "0.54522103", "0.5151529", "0.5069081", "0.5037965", "0.5037924", "0.50297636", "0.50131637", "0.49724954", "0.4924981", "0.49048215", "0.48035905", "0.4785584", "0.47721383", "0.47486344", "0.4712516", "0.4650846", "0.464...
0.68622077
2
Removes a listener from this multicaster and returns the resulting multicast listener.
CatalogListener remove(CatalogListener oldl) { if(oldl == a) return b; if(oldl == b) return a; CatalogListener a2 = removeInternal(a, oldl); CatalogListener b2 = removeInternal(b, oldl); if (a2 == a && b2 == b) { return this; // it's not here } return addInternal(a2, b2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ConnectionListener remove(String listenerID);", "public void removeListener(DCCSessionListener listener) {\n while(this.chatListeners.remove(listener)) {\n // just keep removing the listener until we no longer have any more of that type left\n }\n }", "@Override\n public v...
[ "0.6405831", "0.6287194", "0.6232404", "0.622454", "0.61396295", "0.60958445", "0.6079615", "0.6048172", "0.60381526", "0.6037757", "0.6009284", "0.5981066", "0.5966244", "0.59596187", "0.59545094", "0.5938908", "0.5928391", "0.5900568", "0.58944064", "0.58537036", "0.5845808...
0.0
-1
Register an error reporter with the engine so that any errors generated by the loading of script code can be reported in a nice, pretty fashion. Setting a value of null will clear the currently set reporter. If one is already set, the new value replaces the old.
public static void setErrorReporter(ErrorReporter reporter) { errorReporter = reporter; // Reset the default only if we are not shutting down the system. if(reporter == null) errorReporter = DefaultErrorReporter.getDefaultReporter(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void putTargetError(final ReportWriter reporter) {\n\t\tString s = ((_refXdefName == null || (_refXdefName.length() == 0)\n\t\t\t? (_definition.getName() + '#' + getName())\n\t\t\t: (_refXdefName + '#' + getName())));\n\t\t//Referred object doesn't exist: &{0}\n\t\tgetSPosition().putReport(Report.error(XDEF.XDEF12...
[ "0.55177486", "0.5281803", "0.5227581", "0.5190333", "0.5125987", "0.5088526", "0.49746045", "0.4888388", "0.48718733", "0.4868987", "0.48414156", "0.47851893", "0.475611", "0.4734082", "0.46772757", "0.46506315", "0.46379864", "0.462011", "0.4567808", "0.4557807", "0.453114"...
0.65024567
0
Adds inputmethodlistenera with inputmethodlistenerb and returns the resulting multicast listener.
public static CatalogListener add(CatalogListener a, CatalogListener b) { return (CatalogListener)addInternal(a, b); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static CatalogListener addInternal(CatalogListener a,\r\n CatalogListener b) {\r\n if(a == null)\r\n return b;\r\n\r\n if(b == null)\r\n return a;\r\n\r\n return new CatalogListenerMulticaster(a, b);\r\n }", "publ...
[ "0.54159343", "0.5409581", "0.5233885", "0.51848894", "0.5087769", "0.5076502", "0.50514394", "0.49601895", "0.49410915", "0.4921379", "0.49077973", "0.49023506", "0.48970607", "0.47693604", "0.47547373", "0.47393802", "0.47080505", "0.46833882", "0.46723917", "0.46678603", "...
0.5149006
4
Removes the old componentlistener from componentlistenerl and returns the resulting multicast listener.
public static CatalogListener remove(CatalogListener l, CatalogListener oldl) { return (CatalogListener)removeInternal(l, oldl); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static widgets.regres.RegresComponentListener remove(\r\n\t\t\twidgets.regres.RegresComponentListener l,\r\n\t\t\twidgets.regres.RegresComponentListener oldl) {\r\n\t\tif (l == oldl || l == null)\r\n\t\t\treturn null;\r\n\t\tif (l instanceof RegresComponentListenerEventMulticaster)\r\n\t\t\treturn (widgets....
[ "0.7099612", "0.6468684", "0.62382156", "0.6064055", "0.5934621", "0.5904796", "0.59045565", "0.58610857", "0.5777036", "0.57485485", "0.5744297", "0.5742626", "0.5733004", "0.5710134", "0.5696518", "0.5655258", "0.5654064", "0.5641485", "0.56257", "0.5602348", "0.5592914", ...
0.61869836
3
Methods defined by CatalogListener A tool has been removed. Batched removes will come through the toolsRemoved method.
public void toolGroupAdded(String name, ToolGroup group) { try { a.toolGroupAdded(name, group); } catch(Exception e) { I18nManager intl_mgr = I18nManager.getManager(); String msg = intl_mgr.getString(GROUP_ADD_ERR_PROP) + a; errorReporter.errorReport(msg, e); } try { b.toolGroupAdded(name, group); } catch(Exception e) { I18nManager intl_mgr = I18nManager.getManager(); String msg = intl_mgr.getString(GROUP_ADD_ERR_PROP) + b; errorReporter.errorReport(msg, e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void removeToolListener(ToolListener listener) {\n\t\t//do nothing\n\t}", "public void removeToolListener(ToolListener listener, String toolEvent) {\n\t\t//do nothing\n\t}", "public void toolRemoved(ToolGroupEvent evt) {\n SimpleTool tool = (SimpleTool)evt.getChild();\n remove...
[ "0.7068834", "0.688542", "0.6742472", "0.61514467", "0.59447217", "0.5885293", "0.58665824", "0.5858329", "0.5772995", "0.5752409", "0.57474923", "0.5718151", "0.5696413", "0.5696413", "0.56801796", "0.5646819", "0.56052876", "0.55982435", "0.5598213", "0.5591899", "0.5568468...
0.0
-1
A group of tools have been added.
public void toolGroupsAdded(String name, List<ToolGroup> groups) { try { a.toolGroupsAdded(name, groups); } catch(Exception e) { I18nManager intl_mgr = I18nManager.getManager(); String msg = intl_mgr.getString(GROUPS_ADD_ERR_PROP) + a; errorReporter.errorReport(msg, e); } try { b.toolGroupsAdded(name, groups); } catch(Exception e) { I18nManager intl_mgr = I18nManager.getManager(); String msg = intl_mgr.getString(GROUPS_ADD_ERR_PROP) + b; errorReporter.errorReport(msg, e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addToolsAndCommands() {\n this.selectTargetCadastreObjectTool\n = new CadastreChangeSelectCadastreObjectTool(this.getPojoDataAccess());\n this.selectTargetCadastreObjectTool.setTargetParcelsLayer(targetParcelsLayer);\n this.selectTargetCadastreObjectTool.setCadastre...
[ "0.6838115", "0.6835408", "0.65980506", "0.6444009", "0.6398797", "0.6322226", "0.626232", "0.62458575", "0.6025684", "0.60076344", "0.59414804", "0.5891747", "0.58085304", "0.5787862", "0.577892", "0.5696215", "0.56736594", "0.55871534", "0.5545859", "0.55062246", "0.5503051...
0.63267696
5
A tool has been removed. Batched removes will come through the toolsRemoved method.
public void toolGroupRemoved(String name, ToolGroup group) { try { a.toolGroupRemoved(name, group); } catch(Exception e) { I18nManager intl_mgr = I18nManager.getManager(); String msg = intl_mgr.getString(GROUP_REMOVE_ERR_PROP) + a; errorReporter.errorReport(msg, e); } try { b.toolGroupRemoved(name, group); } catch(Exception e) { I18nManager intl_mgr = I18nManager.getManager(); String msg = intl_mgr.getString(GROUP_REMOVE_ERR_PROP) + b; errorReporter.errorReport(msg, e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void toolRemoved(ToolGroupEvent evt) {\n SimpleTool tool = (SimpleTool)evt.getChild();\n removeToolButton(tool);\n }", "@Override\n\tpublic void removeToolListener(ToolListener listener) {\n\t\t//do nothing\n\t}", "public void removeToolListener(ToolListener listener, String toolEvent) ...
[ "0.73394144", "0.6766936", "0.67453027", "0.6271813", "0.61213076", "0.5935608", "0.5875167", "0.57342565", "0.56938666", "0.5587242", "0.55673516", "0.5551319", "0.5547875", "0.55420935", "0.55392545", "0.5491412", "0.54776496", "0.5475882", "0.54728013", "0.54296035", "0.53...
0.5507506
15
A group of tools have been removed.
public void toolGroupsRemoved(String name, List<ToolGroup> groups) { try { a.toolGroupsRemoved(name, groups); } catch(Exception e) { I18nManager intl_mgr = I18nManager.getManager(); String msg = intl_mgr.getString(GROUPS_ADD_ERR_PROP) + a; errorReporter.errorReport(msg, e); } try { b.toolGroupsRemoved(name, groups); } catch(Exception e) { I18nManager intl_mgr = I18nManager.getManager(); String msg = intl_mgr.getString(GROUPS_REMOVE_ERR_PROP) + b; errorReporter.errorReport(msg, e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void toolRemoved(ToolGroupEvent evt) {\n SimpleTool tool = (SimpleTool)evt.getChild();\n removeToolButton(tool);\n }", "public void toolGroupRemoved(ToolGroupEvent evt) {\n ToolGroup group = (ToolGroup)evt.getChild();\n removeToolGroup(group);\n }", "public void toolGro...
[ "0.66354364", "0.64256936", "0.62826073", "0.62330693", "0.6003055", "0.597007", "0.58660394", "0.58548707", "0.57891434", "0.57779515", "0.57094127", "0.5707926", "0.56807655", "0.5666791", "0.56611365", "0.56571895", "0.56402457", "0.56303656", "0.5556884", "0.5528667", "0....
0.61240834
4
Local Methods Returns the resulting multicast listener from adding listenera and listenerb together. If listenera is null, it returns listenerb; If listenerb is null, it returns listenera If neither are null, then it creates and returns a new CatalogMulticaster instance which chains a with b.
private static CatalogListener addInternal(CatalogListener a, CatalogListener b) { if(a == null) return b; if(b == null) return a; return new CatalogListenerMulticaster(a, b); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "CatalogListenerMulticaster(CatalogListener a, CatalogListener b) {\r\n this.a = a;\r\n this.b = b;\r\n }", "public static CatalogListener add(CatalogListener a,\r\n CatalogListener b) {\r\n return (CatalogListener)addInternal(a, b);\r\n }", "prote...
[ "0.68230736", "0.6362413", "0.58987355", "0.5778346", "0.570258", "0.5601502", "0.5563585", "0.52423567", "0.4972087", "0.47622737", "0.46996137", "0.46188796", "0.45770562", "0.45759946", "0.453638", "0.4527162", "0.45076454", "0.44963372", "0.4490665", "0.44727725", "0.4471...
0.7150664
0
Returns the resulting multicast listener after removing the old listener from listenerl. If listenerl equals the old listener OR listenerl is null, returns null. Else if listenerl is an instance of CatalogMulticaster, then it removes the old listener from it. Else, returns listener l.
private static CatalogListener removeInternal(CatalogListener l, CatalogListener oldl) { if (l == oldl || l == null) { return null; } else if (l instanceof CatalogListenerMulticaster) { return ((CatalogListenerMulticaster)l).remove(oldl); } else { return l; // it's not here } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static widgets.regres.RegresComponentListener remove(\r\n\t\t\twidgets.regres.RegresComponentListener l,\r\n\t\t\twidgets.regres.RegresComponentListener oldl) {\r\n\t\tif (l == oldl || l == null)\r\n\t\t\treturn null;\r\n\t\tif (l instanceof RegresComponentListenerEventMulticaster)\r\n\t\t\treturn (widgets....
[ "0.7048606", "0.6626682", "0.6504969", "0.61925715", "0.58500856", "0.5766279", "0.57483935", "0.56361276", "0.5613331", "0.5605416", "0.5563818", "0.5553158", "0.5530579", "0.5528038", "0.5493947", "0.5487643", "0.548482", "0.54604167", "0.5458059", "0.543166", "0.54082555",...
0.7187212
0
Works only for two dimensional target Variables
public static double calculateVariance(double[][] targetVariables) { double[][] mean = FindPrototype.findOptimalPrototype(targetVariables); int N = targetVariables.length; double numerator = 0; for (int i = 0; i < N; i++) { numerator += EuclideanDistance.calculateEuclideanDistance(Gets.getRowFromMatix(i, targetVariables), mean); } if (N - 1 == 0) { return 0; } else { return numerator / (N - 1); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "N getTarget();", "@InVertex\n Object getTarget();", "public Vector getTargets(){\n return targets;\n }", "Variable getTargetVariable();", "@Test\n\tpublic void targetsTest() {\n\t\tgraph.addVertex(A);\n\t\tgraph.addVertex(B);\n\t\tgraph.addVertex(C);\n\t\tgraph.addVertex(D);\n\t\tList<Vertex...
[ "0.6300907", "0.5977544", "0.59766674", "0.5855856", "0.5853443", "0.57778025", "0.5726565", "0.5663983", "0.5641913", "0.56003094", "0.55912983", "0.5574909", "0.556136", "0.55573654", "0.5535613", "0.55081356", "0.5506809", "0.550563", "0.5498107", "0.53829706", "0.53572416...
0.0
-1
se ejecuta el selecionar el spinner
@Override public void onItemChosen(View labelledSpinner, AdapterView<?> adapterView, View itemView, int position, long id) { String selectedText = adapterView.getItemAtPosition(position).toString(); switch (labelledSpinner.getId()) { case R.id.spinner_planets: //Toast.makeText(getActivity(), "Selected: " + selectedText, Toast.LENGTH_SHORT).show(); selectTextSpinner = selectedText; break; // If you have multiple LabelledSpinners, you can add more cases here } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void runSpinner() {\r\n addItemsOndifficultySpinner();\r\n addListenerOnButton();\r\n addListenerOnSpinnerItemSelection();\r\n }", "private void cargarSpinner() {\n\n admin = new AdminSQLiteOpenHelper(this, \"activo_fijo\", null, 1);\n Base...
[ "0.75305575", "0.71705735", "0.7142913", "0.710292", "0.70523894", "0.7049869", "0.70116174", "0.69817024", "0.6969549", "0.6895293", "0.68654764", "0.6833741", "0.6830279", "0.68264693", "0.6756181", "0.6742811", "0.6712738", "0.6679013", "0.66690916", "0.66614175", "0.66570...
0.0
-1
se ejecuta el selecionar el spinner
@Override public void onNothingChosen(View labelledSpinner, AdapterView<?> adapterView) { // Do something here }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void runSpinner() {\r\n addItemsOndifficultySpinner();\r\n addListenerOnButton();\r\n addListenerOnSpinnerItemSelection();\r\n }", "private void cargarSpinner() {\n\n admin = new AdminSQLiteOpenHelper(this, \"activo_fijo\", null, 1);\n Base...
[ "0.75305545", "0.7170629", "0.71431905", "0.71032846", "0.70510316", "0.7049879", "0.7011319", "0.6981396", "0.697042", "0.6894532", "0.68651927", "0.6833136", "0.68302023", "0.6826705", "0.67568773", "0.67426217", "0.67112756", "0.66805154", "0.6669824", "0.6661761", "0.6656...
0.0
-1
obtener datos de la tabla BD
public void selectDataStateDB(int inicio){ Log.e(TAG, "selectDataStateDB" ); String fechaDesde = txt_fecha_desde.getText().toString().substring(6, 10) + "/" + txt_fecha_desde.getText().toString().substring(3, 5) + "/" + txt_fecha_desde.getText().toString().substring(0, 2) + " 00:00:00"; String fechaHasta = txt_fecha_hasta.getText().toString().substring(6, 10) + "/" + txt_fecha_hasta.getText().toString().substring(3, 5) + "/" + txt_fecha_hasta.getText().toString().substring(0, 2) + " 23:59:59"; // String Estado = selectTextSpinner; //Calendar now = Calendar.getInstance(); //int month = now.get(Calendar.MONTH); //String mes = month < 10 ? "0" + month : "" + month; //String mes = ""+month; try { if (inicio == 1 ) {//validar si en la tabla ahi datos mayor a 0 Log.e(TAG, "FECHA I"+fechaDesde ); Log.e(TAG, "FECHA F"+fechaHasta ); // Log.e(TAG, "ESTADO"+Estado ); if (Utils.GetIStateDateFromDatabase(HealthMonitorApplicattion.getApplication().getStateDao(),fechaDesde,fechaHasta).size()>0) { Log.e(TAG,"GetIStateDateFromDatabase"); //asignamos datos de la tabla a la lista de objeto rowsIState = Utils.GetIStateDateFromDatabase(HealthMonitorApplicattion.getApplication().getStateDao(),fechaDesde,fechaHasta); postExecutionQueryDBLocal(); }else Log.e(TAG,"GetIStateDateFromDatabase"); } else { // if (Utils.GetIStateFromDatabase(HealthMonitorApplicattion.getApplication().getStateDao(),mes).size()>0); { //asignamos datos de la tabla a la lista de objeto // rowsIState=Utils.GetIStateFromDatabase(HealthMonitorApplicattion.getApplication().getStateDao(),mes); } } } catch (SQLException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Tablero consultarTablero();", "public void consultarDatos() throws SQLException {\n String instruccion = \"SELECT * FROM juegos.juegos\";\n try {\n comando = conexion.createStatement();\n resultados = comando.executeQuery(instruccion);\n } catch (SQLException e) {\n ...
[ "0.70812356", "0.6903443", "0.6778733", "0.6462143", "0.6450495", "0.6431346", "0.63911444", "0.6276726", "0.6254214", "0.6243889", "0.62213147", "0.6219443", "0.6217089", "0.62086576", "0.6185412", "0.61718893", "0.6171606", "0.6157161", "0.61565495", "0.6155069", "0.6146157...
0.0
-1
obtener fechay hroa de Calendar
private void inicializarFechaHora(){ Calendar c = Calendar.getInstance(); year1 = c.get(Calendar.YEAR); month1 = (c.get(Calendar.MONTH)+1); String mes1 = month1 < 10 ? "0"+month1 : "" +month1; String dia1 = "01"; String date1 = ""+dia1+"/"+mes1+"/"+year1; txt_fecha_desde.setText(date1); day2 = c.getActualMaximum(Calendar.DAY_OF_MONTH) ; String date2 = ""+day2+"/"+mes1+"/"+ year1; Log.e(TAG,"date2: " + date2 ); txt_fecha_hasta.setText(date2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void get_fecha(){\n //Obtenemos la fecha\n Calendar c1 = Calendar.getInstance();\n fecha.setCalendar(c1);\n }", "public Fecha () {\n\t\tthis.ahora = Calendar.getInstance();\n\t\tahora.set(2018, 3, 1, 15, 15, 0);\t \n\t\taño = ahora.get(Calendar.YEAR);\n\t\tmes = ahora.get(C...
[ "0.7416652", "0.7131858", "0.7045189", "0.6634603", "0.65835637", "0.64731944", "0.64671755", "0.6438272", "0.6406636", "0.63670844", "0.63575935", "0.6298973", "0.6283075", "0.6187994", "0.6165865", "0.6129209", "0.6123041", "0.6107435", "0.6104813", "0.60988665", "0.6068634...
0.63983303
9
TODO Autogenerated method stub Arrays.binarySearch(a, key);
public static void main(String[] args) { Sides t1 = new Sides(1, 2, 3); Sides t2 = new Sides(1, 2, 3); Triangle tr1 = new Triangle(t1); Triangle tr2 = new Triangle(t2); Set<Triangle> s = new HashSet<>(); s.add(tr1); s.add(tr2); System.out.println(s.size()); System.out.println(tr1.compareTo(tr2)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int BinarySearch(Object[] a, int size, Object key) {\n int start = 0;\n int end = size - 1;\n while (start < end) {\n int mid = (start + size) / 2;\n if (key.equals(a[mid])) {\n return mid;\n } else if (((Comparable) key).compareTo(a[mid])...
[ "0.7562864", "0.72580767", "0.72293776", "0.7192378", "0.717777", "0.71569014", "0.7079554", "0.7044561", "0.70415044", "0.6963571", "0.6946076", "0.693003", "0.69145113", "0.6901483", "0.6894889", "0.6871076", "0.6859959", "0.68003243", "0.6753199", "0.67299545", "0.6703862"...
0.0
-1
Add any helper functions you may need here
int countDistinctTriangles(ArrayList<Sides> arr) { // Write your code here // Validate input data if(arr == null || arr.isEmpty()){ return 0; } // Find distinct triangles Set<Triangle> trs = new HashSet<Triangle>(); for(Sides s : arr){ trs.add(new Triangle(s)); } return trs.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "private Helper() {\r\n // empty\r\n }", "@Override\n\tpublic void initUtils() {\n\n\t}", "private HelperLocation() {}", "private stendhal() {\n\t}", "@Override\r\n\tprotected void func03() {\n\t\...
[ "0.6638661", "0.6638661", "0.5753212", "0.57389957", "0.55760986", "0.5569409", "0.5521411", "0.5494392", "0.54877245", "0.5455775", "0.5361803", "0.53525877", "0.53515923", "0.53515923", "0.53515923", "0.53515923", "0.53265685", "0.5323283", "0.5322557", "0.53105515", "0.531...
0.0
-1
Start collection of methods that will fill an array with random numbers, sort the numbers and print what was imported and sorted.
public static void main(String[] args) { int[] array = new int[6]; Week4.fill(array); Week4.print(array); Week4.Sort(array); Week4.print(array); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n int[] arr = ArrayTools.getRandomIntArray(0, 10000, 10);\n ArrayTools.printIntArray(arr);\n int[] sorted = MergeSort.sort(arr);\n ArrayTools.printIntArray(sorted);\n }", "public static void main(String[] args) {\n\t\tint[] randomInts = new ...
[ "0.70547783", "0.6905707", "0.6874767", "0.6787553", "0.66788363", "0.6661264", "0.6658632", "0.66538024", "0.65698814", "0.6547531", "0.6521196", "0.65142703", "0.6514263", "0.6509252", "0.649911", "0.64860016", "0.6447078", "0.64099485", "0.63930887", "0.63924164", "0.63822...
0.6150298
47
Method used to fill the array with random numbers.
static void fill(int[] array) { Random r = new Random(); for(int i = 0; i < array.length; i++) { array[i] = r.nextInt(100); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void fillArray(int[] ar)\n\t{\n\t Random r= new Random();\n\t for(int i = 0; i< ar.length; i++)\n\t {\n\t\t ar[i]= r.nextInt(100);\n\t }\n\t}", "public void generateRandomArray() {\n for (int i = 0; i < arraySize; i++) {\n theArray[i] = (int) (Math.random() * 10) + 10;\n ...
[ "0.80054665", "0.78037006", "0.7750336", "0.75901675", "0.75245196", "0.7242888", "0.7241982", "0.6946738", "0.693147", "0.68953615", "0.6883558", "0.68828166", "0.68574893", "0.6829695", "0.6810711", "0.6770813", "0.676637", "0.67446333", "0.67374235", "0.6671985", "0.665587...
0.79637873
1