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
end region Methods Initialize
public TaskDetailDto() { super(); id = 0; project = ""; nameTask = ""; status = ""; asign = ""; priority = ""; dueDate = null; originalEstimate = null; decription = ""; startDate = null; endDate = null; createBy = ""; createOn = null; modifyBy = ""; modifyOn = null; modifyById = null; createById = null; asignId = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void init() {\n \n }", "public void initialize()\n {\n }", "private void init() {\n\n\n\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "private void initialize() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Overri...
[ "0.81041294", "0.8024551", "0.8002646", "0.79893667", "0.7984924", "0.7978612", "0.7974181", "0.796229", "0.796229", "0.7946243", "0.79351264", "0.7933822", "0.7930514", "0.79297626", "0.7925859", "0.7920046", "0.79196995", "0.79189265", "0.79189265", "0.7917734", "0.79114705...
0.0
-1
Zips listed files to given archive file. It creates a new archive. If an archive was already present, it's erased.
public static void zip(BasicShell shell, File archive, List<File> filesToZip) { try { shell.printOut("Creating archive '" + archive.getPath() + "'."); final BufferedOutputStream archiveStream = new BufferedOutputStream(new FileOutputStream(archive)); ZipOutputStream zipStream = new ZipOutputStream(archiveStream); zipStream.setLevel(7); String pwd = shell.pwd().getPath(); for ( File file : filesToZip) { String name = file.getPath(); if (name.equals(pwd)) continue; if ( name.startsWith(pwd) ) { name = name.substring(pwd.length()+1); } ZipEntry entry = new ZipEntry(name); zipStream.putNextEntry(entry); if ( file.isFile() ) { BufferedInputStream fileStream = new BufferedInputStream(new FileInputStream(file)); byte[] buffer = new byte[2048]; int count = fileStream.read(buffer); while ( count > -1 ) { zipStream.write(buffer, 0, count); count = fileStream.read(buffer); } fileStream.close(); } shell.printOut("File '" + entry.getName() + "' added."); } zipStream.close(); } catch (Exception e) { shell.getErrorHandler().handleError(Diagnostic.ERROR, e.getClass().getSimpleName() + ": "+ e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void unCompress()\n\t{\n\t\ttry\n\t\t{\n\t\t\tbyte[] buffer = new byte[4096];\n\t\t\tint bytesIn;\n\t\t\tZipFile rfoFile = new ZipFile(path + fileName);\n\t\t\tEnumeration<? extends ZipEntry> allFiles = rfoFile.entries();\n\t\t\twhile(allFiles.hasMoreElements())\n\t\t\t{\n\t\t\t\tZipEntry ze = (ZipEntry)al...
[ "0.6780418", "0.61994785", "0.5976701", "0.58285916", "0.5818509", "0.5665493", "0.5615313", "0.55908424", "0.55845344", "0.5479195", "0.5478185", "0.5430337", "0.543019", "0.5410482", "0.54086125", "0.53719383", "0.53682286", "0.5348879", "0.53450614", "0.53167444", "0.53156...
0.6130817
2
Unzip given archives file to given destination.
public static void unzip(BasicShell shell, File archive, File destination) { try { shell.printOut("Extracting files from archive '" + archive.getPath() + "'."); ZipFile zipFile = new ZipFile(archive); Enumeration<? extends ZipEntry> e = zipFile.entries(); while (e.hasMoreElements() ) { ZipEntry entry = e.nextElement(); File entryFile = new File(destination, entry.getName()); if ( entry.isDirectory() ) { entryFile.mkdirs(); } else { entryFile.getParentFile().mkdirs(); InputStream entryStream = zipFile.getInputStream(entry); BufferedOutputStream outStream = new BufferedOutputStream(new FileOutputStream(entryFile)); byte[] buffer = new byte[2048]; int count = entryStream.read(buffer); while ( count > -1 ) { outStream.write(buffer, 0, count); count = entryStream.read(buffer); } outStream.flush(); outStream.close(); entryStream.close(); } shell.printOut("Extracted file '" + entry.getName() + "'.") ; } zipFile.close(); } catch (Exception e) { shell.getErrorHandler().handleError(Diagnostic.ERROR, e.getClass().getSimpleName() + ": "+ e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void unZip(String fileName, String unZipTarget) throws IOException {\n this.unzipFileTargetLocation = unZipTarget;\n dirsMade = new TreeSet();\n zippy = new ZipFile(fileName);\n Enumeration all = zippy.entries();\n while (all.hasMoreElements()) {\n getFile((ZipE...
[ "0.67302597", "0.6696408", "0.6599389", "0.6574496", "0.6566076", "0.65397006", "0.6504542", "0.64747566", "0.64573467", "0.64263505", "0.634087", "0.63224024", "0.6313621", "0.6305334", "0.6305334", "0.6259901", "0.6213078", "0.61559516", "0.6137596", "0.61261946", "0.609001...
0.66866034
2
Casts Msg value to Msg table if possible Does not do type conversion, if Msg value is not a table it will return null
public static MessageTable toTable(MessageValue<?> value) { if (value != null && value instanceof MessageTable) { return (MessageTable) value; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String doTableConvert(String sql);", "public OutMessage linkTypeMsg(InMessage msg) {\n\t\treturn null;\n\t}", "T convert(F experimenterMessageCase, D data) throws ConversionException;", "public static String convertString(String sType , String sValue) throws Exception{\n\t\tObject o = new Obj...
[ "0.53311616", "0.5082773", "0.5068267", "0.50117254", "0.49992234", "0.49832818", "0.4963146", "0.49404955", "0.4920902", "0.48431328", "0.47814733", "0.47547278", "0.47537518", "0.47516692", "0.47353807", "0.47283575", "0.47283575", "0.4706176", "0.46870214", "0.46710396", "...
0.6766868
0
Converts Msg value to Msg boolean if possible and if needed
public static MessageBoolean toBoolean(MessageValue<?> value) { if (value != null) { if (value instanceof MessageBoolean) { return (MessageBoolean) value; } else { return new MessageBooleanImpl(value.asString()); } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasMsg();", "public boolean is_set_msg() {\n return this.msg != null;\n }", "public boolean isSetMsg() {\n return this.msg != null;\n }", "private String parseBoolean () {\r\n \r\n assert iMessage!=null;\r\n assert iIndex>=0;\r\n assert iIndex<=iMessage.length();\r\n \r\n ch...
[ "0.6331899", "0.62795925", "0.62140477", "0.6084269", "0.59086406", "0.5815869", "0.5784967", "0.5729419", "0.56890357", "0.56890357", "0.56890357", "0.56890357", "0.56890357", "0.56890357", "0.56890357", "0.56890357", "0.5679417", "0.56386685", "0.5605978", "0.56015253", "0....
0.6470149
0
Converts Msg value to Msg number if possible and if needed
public static MessageNumber toNumber(MessageValue<?> value) { if (value != null) { if (value instanceof MessageNumber) { return (MessageNumber) value; } else { return new MessageNumberImpl(value.asString()); } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BigInteger getMessage();", "int getMsgid();", "netty.framework.messages.MsgId.MsgID getMsgID();", "netty.framework.messages.MsgId.MsgID getMsgID();", "int getClientMsgNo();", "public java.lang.Integer getNummessage() {\r\n\t\treturn nummessage;\r\n\t}", "public int getMsgType(){\r\n ...
[ "0.61690897", "0.5947523", "0.5908825", "0.5908825", "0.58089405", "0.57272184", "0.5724973", "0.5708293", "0.5659886", "0.5636868", "0.56145644", "0.55574214", "0.5550486", "0.5546133", "0.552409", "0.5511026", "0.55042565", "0.547701", "0.54689586", "0.54449165", "0.5430476...
0.65411484
0
Converts Msg value to Msg string if possible and if needed
public static MessageString toString(MessageValue<?> value) { if (value != null) { if (value instanceof MessageString) { return (MessageString) value; } else { return new MessageStringImpl(value.asString()); } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getMsg();", "protected String normalizeExMsg(String msg) {\n return msg;\n }", "private static String getMsg(Object... msgs) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (Object object : msgs) {\n\t\t\tsb.append(object.toString()).append(\"\\n\");\n\t\t}\n\t\treturn sb.toS...
[ "0.71420914", "0.6497901", "0.64805007", "0.6320259", "0.62302274", "0.6221212", "0.62073725", "0.6170165", "0.6132723", "0.6091095", "0.6066734", "0.6047543", "0.6047543", "0.6047543", "0.6047543", "0.6047543", "0.6047543", "0.6047543", "0.6047543", "0.6047543", "0.6047543",...
0.63259095
3
Accion o envio de formularios
@ProcessAction(name = "consultarLista") public void consultarLista(ActionRequest actionRequest, ActionResponse actionResponse) throws IOException, PortletException { LOGGER.info("ID usuario tabla " + ParamUtil.getString(actionRequest, "userID")); String userID = ParamUtil.getString(actionRequest, "userID"); String nombres = StringPool.BLANK; String cargo = StringPool.BLANK; String descripcion = StringPool.BLANK; String imagenprofile = StringPool.BLANK; String estado = StringPool.BLANK; String disponibilidad = StringPool.BLANK; String correo = StringPool.BLANK; String nombreTecnologia = StringPool.BLANK; String imagenTecnologia = StringPool.BLANK; String nombreAsignacion = StringPool.BLANK; String valorAsignacion = StringPool.BLANK; JSONArray tecnologias = null; JSONArray asignacion = null; JSONArray userProfile = null; try { userProfile = api.consultarPerfil(userID); for (int i = 0; i < userProfile.length(); i++) { JSONObject item = userProfile.getJSONObject(i); nombres = item.getString("nombres"); cargo = item.getString("cargo"); descripcion = item.getString("descripcion"); estado = item.getString("estado"); disponibilidad = item.getString("disponibilidad"); correo = item.getString("correo"); imagenprofile =item.getString("imagen"); tecnologias = item.getJSONArray("tecnologias"); for (int j = 0; j < tecnologias.length(); j++) { nombreTecnologia = tecnologias.getJSONObject(j).getString("nombre"); imagenTecnologia= tecnologias.getJSONObject(j).getString("imagen"); } asignacion = item.getJSONArray("asignacion"); for (int k = 0; k < asignacion.length(); k++) { nombreAsignacion = asignacion.getJSONObject(k).getString("nombre"); valorAsignacion = asignacion.getJSONObject(k).getString("valor"); } } } catch (PortalException e) { // TODO Auto-generated catch block e.printStackTrace(); } // Hacer campos visibles en jsp actionRequest.setAttribute("nombres", nombres); actionRequest.setAttribute("cargo", cargo); actionRequest.setAttribute("descripcion", descripcion); actionRequest.setAttribute("imagenprofile", imagenprofile); actionRequest.setAttribute("tecnologias", tecnologias); actionRequest.setAttribute("asignacion", asignacion); actionRequest.setAttribute("nombreTecnologia", nombreTecnologia); actionRequest.setAttribute("imagenTecnologia", imagenTecnologia); actionRequest.setAttribute("nombreAsignacion", nombreAsignacion); actionRequest.setAttribute("valorAsignacion", valorAsignacion); actionRequest.setAttribute("userProfile", userProfile); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(\"enviar\")\n\tpublic String abrirForm() {\n\t\treturn \"contato/form\";\n\t}", "public void limpiarCamposFormBusqueda() {\n\t}", "public void enviaMotorista() {\n\t\tConector con = new Conector();\r\n\t\tString params[] = new String[2];\r\n\r\n\t\tparams[0] = \"op=4\";\r\n\t\tparams[1] = \"ema...
[ "0.6590561", "0.6510707", "0.60046107", "0.5979661", "0.5929833", "0.5919049", "0.58768344", "0.587363", "0.5865239", "0.5842126", "0.5819247", "0.5804534", "0.5781964", "0.57690257", "0.57573205", "0.5706824", "0.5682679", "0.5672097", "0.56699896", "0.5627998", "0.56178963"...
0.0
-1
Accion o envio de formularios
@ProcessAction(name = "consultarProyecto") public void consultarProyecto(ActionRequest actionRequest, ActionResponse actionResponse) throws IOException, PortletException { LOGGER.info("ID Proyecto " + ParamUtil.getString(actionRequest, "projectID")); String projectID = ParamUtil.getString(actionRequest, "projectID"); // Hacer campos visibles en jsp actionRequest.setAttribute("projectID", projectID); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(\"enviar\")\n\tpublic String abrirForm() {\n\t\treturn \"contato/form\";\n\t}", "public void limpiarCamposFormBusqueda() {\n\t}", "public void enviaMotorista() {\n\t\tConector con = new Conector();\r\n\t\tString params[] = new String[2];\r\n\r\n\t\tparams[0] = \"op=4\";\r\n\t\tparams[1] = \"ema...
[ "0.6590561", "0.6510707", "0.60046107", "0.5979661", "0.5929833", "0.5919049", "0.58768344", "0.587363", "0.5865239", "0.5842126", "0.5819247", "0.5804534", "0.5781964", "0.57690257", "0.57573205", "0.5706824", "0.5682679", "0.5672097", "0.56699896", "0.5627998", "0.56178963"...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { MarkIV coffeeMaker = MarkIV.getInstance(); coffeeMaker.makeCoffee(); coffeeMaker.removeCoffeePot(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) throws InterruptedException { ChromeDriver driver=new ChromeDriver(); driver.get("https://appleid.apple.com/account"); driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); driver.findElementByXPath("(//input[@type='text'])[2]").sendKeys("Harsha"); driver.findElementByXPath("(//input[@type='text'])[3]").sendKeys("Kumbam"); Select country=new Select (driver.findElementByXPath("(//select[@aria-required='true'])[1]")); country.selectByVisibleText("India"); driver.findElementByXPath("(//input[@type='text'])[4]").click(); //Thread.sleep(1000); driver.findElementByXPath("(//input[@type='text'])[4]").sendKeys("07/13/2000"); driver.findElementByXPath("//input[@type='email']").sendKeys("harsha@gmail.com"); driver.findElementByXPath("//input[@id='password']").sendKeys("Harsha123@2k"); driver.findElementByXPath("(//input[@type='password'])[2]").sendKeys("Harsha123@2k"); String str=driver.findElementByXPath("//span[@class='form-message']").getText(); System.out.println(str); Select mobile=new Select (driver.findElementByXPath("(//select[@aria-required='true'])[2]")); mobile.selectByVisibleText("+91 (India)"); //driver.findElementByLinkText("Phone number").sendKeys("9876543210"); driver.findElementByXPath("(//input[@aria-required='true'])[7]").sendKeys("9876543210"); // String str1=driver.findElementByXPath("(//span[@class='form-message'])[2]").getText(); // System.out.println(str1); driver.findElementByXPath("//div[@class='overflow-text']").click(); }
{ "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
Returns the full content for the concrete runner file.
public String getRenderedRunnerFileContent( SingleScenarioRunner singleScenarioRunner, final SingleScenario singleScenario ) throws MissingFileException { String runnerTemplatePath = singleScenarioRunner.getRunnerTemplatePath(); String featureFileName = singleScenarioRunner.getFeatureFileName(); String fileString = fileIO.readContentFromFile(runnerTemplatePath); if (runnerTemplatePath.endsWith(".java")) { fileString = replaceJavaTemplatePlaceholders(runnerTemplatePath, featureFileName, fileString); } fileString = fileString.replace(FEATURE_FILE_NAME_PLACEHOLDER, featureFileName); fileString = addScenarioInfo(fileString, singleScenario, runnerTemplatePath); return fileString; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String getContent() throws FileNotFound, CannotReadFile\n {\n Reader input = null;\n try\n {\n input = new InputStreamReader(resource.openStream());\n String content = IOUtils.toString(input).replace(\"\\r\\n\", \"\\n\"...
[ "0.61568964", "0.61375713", "0.5997536", "0.5932564", "0.5843764", "0.56922424", "0.5671665", "0.5651199", "0.55825", "0.55825", "0.5528545", "0.55228597", "0.5519582", "0.549795", "0.54979455", "0.54969954", "0.54751897", "0.5441682", "0.54287636", "0.5404742", "0.53708965",...
0.5798323
5
Perform additional substitutions when the provided template is a java class file.
private String replaceJavaTemplatePlaceholders( final String runnerTemplatePath, final String featureFileName, final String fileString ) { String javaFileName = Paths.get(runnerTemplatePath).getFileName().toString(); String javaFileNameWithoutExtension = javaFileName.substring(0, javaFileName.lastIndexOf('.')); String replacedFileString = fileString.replace(javaFileNameWithoutExtension, featureFileName); replacedFileString = replacedFileString.replaceAll("package .*;", ""); return replacedFileString; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void generateDraftClass(HashMap<String, String> draftDataMap, String template) {\n List<String> rowList = new ArrayList<>(Arrays.asList(template.split(\"\\n\")));\n\n // Creates directory if directory doesn't exist.\n File draftDirectory = new File(draftDirectoryPath);\n if (!dra...
[ "0.574093", "0.5539453", "0.54765224", "0.546341", "0.5293629", "0.51840043", "0.5143989", "0.509203", "0.50595766", "0.50529927", "0.5041583", "0.50002867", "0.49885508", "0.4973584", "0.49413133", "0.49400112", "0.48266268", "0.4811856", "0.48045245", "0.47741157", "0.47719...
0.54304534
4
Write a Java program to search an element in a array list
public static void main(String[] args) { List<String> listOfStrings= new ArrayList<>(); listOfStrings.add("Jeden"); listOfStrings.add("Dwa"); listOfStrings.add("Trzy"); listOfStrings.add("Cztery"); listOfStrings.add("Piec"); boolean contains=listOfStrings.contains("Jeden"); boolean notContains=listOfStrings.contains("Szesc"); System.out.println(contains); System.out.println(notContains); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void search(int arr[],int element)\n {\n for(int i=0;i<arr.length;i++)\n {\n if(arr[i]==element)\n {\n System.out.println(\"The \"+element+\" is located at the position of \"+i);\n System.exit(0);\n }\n }\n }", "private void arraySe...
[ "0.6867523", "0.6832437", "0.67982644", "0.677318", "0.6683831", "0.6670109", "0.66245306", "0.65878606", "0.65746754", "0.6521319", "0.65179574", "0.6459909", "0.6459909", "0.6459909", "0.6459909", "0.6459909", "0.6459909", "0.6459909", "0.6459909", "0.6459909", "0.6459909",...
0.0
-1
Constructor The binary expression constructor uses a series of if statements to determine the operator used. The if statements are ordered using order of operations to assist in the Interpreter portion when computing the results of the expressions. If a valid operator does not exist, an error is thrown.
public binary_ex(String expression) { try { fullExpression = expression.trim(); if (expression.contains("*")) splitExpression(expression, "*"); else if (expression.contains("/")) splitExpression(expression, "/"); else if (expression.contains("+")) splitExpression(expression, "+"); else if (expression.contains("-")) splitExpression(expression, "-"); else if (expression.contains("%")) splitExpression(expression, "%"); else if (expression.contains("\\")) splitExpression(expression, "\\"); else throw new JuliaSyntaxException("arith"); } catch (JuliaSyntaxException e) { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Expression() { }", "public LogicalOperator() {\n this.logical = Logical.And;\n }", "public BinaryExpression(IExpression left, IExpression right, IOperation op) {\r\n\t\tthis.op = op; // passes the reference op parameter to the associated\r\n\t\t\t\t\t\t// field.\r\n\t\tthis.left = left; // passes the...
[ "0.7000462", "0.6747678", "0.66733617", "0.6568737", "0.6522386", "0.65112066", "0.6497198", "0.64465034", "0.6426768", "0.6357289", "0.63292944", "0.62889415", "0.62841374", "0.6273204", "0.62376827", "0.62302643", "0.621958", "0.6211563", "0.6210255", "0.62054235", "0.61494...
0.5994805
33
The splitExpression method takes in a String expression and String op. The variable op is passed to the constructor of the arithmetic operator class which is stored in the class variable operator. The index of the first instance of the operator that is found. That is used to generate two substrings which are the left and right sides of the expression. The substrings left are right are passed as parameters to the arithmetic expression constructor and stored in their respective arthmeitic_ex object, left and right.
public void splitExpression(String expression, String op) { operator = new arithmetic_op(op); expression = expression.trim(); int index = expression.indexOf(op); left = new arithmetic_ex((expression.substring(0, index)).trim()); right = new arithmetic_ex((expression.substring(index + 1)).trim()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String parseExpressionForOperator(String expression) {\n int space = expression.indexOf(\" \");\n String frac1 = expression.substring(0, space);\n String operator = expression.substring(space + 1, space + 2);\n return operator;\n }", "private IMathExpr parseOperator(S...
[ "0.6883432", "0.6744285", "0.6554951", "0.64460534", "0.6433093", "0.6380967", "0.6359107", "0.6349444", "0.6221282", "0.62160873", "0.61560607", "0.61480474", "0.61477435", "0.6089857", "0.6057403", "0.5978089", "0.5968048", "0.595671", "0.5954235", "0.5924815", "0.59125155"...
0.8988352
0
toString method returns the full expression originally passed to the binary expression instance before splitting occured.
public String toString() { return fullExpression; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString() {\n return m_expression;\n }", "public String toString() {\n if (mExpression.size() == 1 && mExpression.get(0).startsWith(\"-\")) {\n return mExpression.get(0);\n }\n\n StringBuilder output = new StringBuilder();\n boolean first = true;\n ...
[ "0.77128035", "0.7481237", "0.7359474", "0.71864986", "0.6992027", "0.69253093", "0.69238615", "0.69204354", "0.6917663", "0.6880741", "0.68610466", "0.68461955", "0.6781008", "0.67475784", "0.6732207", "0.6732207", "0.6721226", "0.67079294", "0.6702028", "0.66144115", "0.659...
0.7670261
1
toGrammar prints out the grammar of this class. Each class represents the LHS abstraction of the Julia grammar. It then calls the toGrammar for each nonterminal piece of the grammar. Full Grammar: >
public void toGrammar() { System.out.println("<binary_expression> -> <arithmeitc_expression> <arithmetic_op> <arithmetic_expression>"); left.toGrammar(); operator.toGrammar(); right.toGrammar(); prefix(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void writeGrammar() {\n grammar = new ArrayList<ArrayList<String>>();\n\n int programLine = 0;\n String inputLine = null;\n try {\n FileReader reader = new FileReader(grammarFile);\n BufferedReader bufferedReader = new BufferedReader(reader);\n\n ...
[ "0.6238588", "0.6069632", "0.60518706", "0.60330755", "0.59421134", "0.59068185", "0.5893124", "0.5825443", "0.5775355", "0.57602996", "0.57094747", "0.56555", "0.5636776", "0.5604189", "0.54738367", "0.53768826", "0.5299784", "0.5283195", "0.5272491", "0.5257026", "0.5177051...
0.73188543
0
Prints the binary expression in prefix notation. Calls prefix method for left and right. Calls operator's getArithmeticOp method to get the operator. i.e. operator left right
public void prefix() { System.out.print(operator.getArithmeticOp() + " "); left.prefix(); right.prefix(); System.out.println(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String toString() { return '(' + left.toString() + ' ' + operation.toString() + ' ' + right.toString() + ')'; }", "@Override\n public String toString() { return '(' + left.toString() + ' ' + operation.toString() + ' ' + right.toString() + ')'; }", "public String toString () {\n ...
[ "0.6674989", "0.6674989", "0.65576845", "0.6210426", "0.61704946", "0.6083421", "0.60298115", "0.60229945", "0.5992534", "0.59412205", "0.59328455", "0.58627623", "0.584576", "0.58325875", "0.5829431", "0.5826968", "0.5817845", "0.5813269", "0.5806517", "0.5789888", "0.578245...
0.77967083
0
Method computes the variable of the expression
public int compute(ArrayList<variable> variables) { int l = left.compute(variables); // get value of left side int r = right.compute(variables); // get value of right side if (l == -999) { // if left side is an id l = getValue(variables, left); // get the value from the variables array list } if (r == -999) { // if right side is an id r = getValue(variables, right); // get the value from the variables array list } if (operator.getArithmeticOp().equals("*")) { return (int) l * r; } else if (operator.getArithmeticOp().equals("/")) { return (int) l / r; } else if (operator.getArithmeticOp().equals("+")) { return (int) l + r; } else if (operator.getArithmeticOp().equals("-")) { return (int) l - r; } else if (operator.getArithmeticOp().equals("%")) { return (int) l % r; } else if (operator.getArithmeticOp().equals("\\")) { return (int) r / l; } else { return -999; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "VariableExp createVariableExp();", "Node getVariable();", "Aliasing getVariable();", "public int expressionEval(String expression){\n\n int result = 0;\n\n\n\n return result;\n }", "public IExpressionValue getUserDefinedVariable(String key);", "Expression getValue();", "Expression getV...
[ "0.68929374", "0.66963154", "0.6660309", "0.66215277", "0.6620974", "0.658324", "0.658324", "0.6570967", "0.65543306", "0.6553024", "0.6536018", "0.6485719", "0.6454498", "0.6430528", "0.6368686", "0.63563675", "0.6350118", "0.6246874", "0.6241022", "0.6237461", "0.6237461", ...
0.5827346
71
If the arithemtic expression is an id, the method finds that id in the variable array list. The value of that id is then returned. If it is not found, an error is thrown.
public int getValue(ArrayList<variable> variables, arithmetic_ex e) { String id = e.getId(); // get id of arithmetic expression try { for (int i = 0; i < variables.size(); i++) { if ((variables.get(i).getId()).trim().equals(id)) // if variable id matches expression id return variables.get(i).getValue(); // return the value from the variable array list } throw new JuliaSyntaxException("compute"); // hasn't returned a value yet, so throw an error } catch (JuliaSyntaxException jse) { } return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String isVar(Exp e) {\n if (e instanceof EId) {\n return ((EId) e).id_;\n } else\n throw new TypeException(\"Expected variable but found: \" + e);\n }", "@Override\n public EnvironmentVariable find(Long id) throws Exception {\n return null;\n }", "public IVari...
[ "0.57049596", "0.56468046", "0.5644988", "0.5528704", "0.5511912", "0.54604083", "0.5415588", "0.5413435", "0.5395203", "0.5382083", "0.53815883", "0.53771794", "0.5305296", "0.5285925", "0.5260581", "0.5169117", "0.5155398", "0.5142571", "0.51237315", "0.51020044", "0.509786...
0.57958305
0
Executes persistence work passed in constructor
public interface PersistenceRunner { /** * Performs persistence work * @param persistenceWork JPA unit of work * @return Executable object to notify completion */ Executable run(PersistenceWork persistenceWork); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Persistence() {}", "public Persistence() {\n\t\tconn = dbConnection();\n\t}", "void start() throws PersistenceException;", "abstract void initPersistance();", "public DataPersistence() {\n storage = new HashMap<>();\n idCounter = 0;\n }", "@Override\n public void execute(Work w...
[ "0.670195", "0.65560424", "0.6390396", "0.62701684", "0.625024", "0.6239892", "0.58628786", "0.58628786", "0.5862454", "0.58613473", "0.5847833", "0.5832418", "0.5803424", "0.5800689", "0.57970744", "0.5795905", "0.5794451", "0.57752806", "0.57727426", "0.57721746", "0.577217...
0.69689184
0
Anything in here will always be executed before each test
@BeforeEach public void beforeEach() { testBasket = new Basket(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void runBeforeTest() {}", "@Before\n public void setUp() {\n System.out.println(\"\\n@Before - Setting Up Stuffs: Pass \"\n + ++setUpCount);\n // write setup code that must be executed before each test method run\n }", "@BeforeAll\n static void setup() {\n ...
[ "0.81695586", "0.7811537", "0.77629846", "0.7674806", "0.7631169", "0.7628445", "0.75689805", "0.7561593", "0.75594723", "0.75594723", "0.75594723", "0.75594723", "0.75594723", "0.75485384", "0.75479835", "0.752601", "0.749252", "0.7489958", "0.74543124", "0.74543124", "0.743...
0.0
-1
Anything in here will always be executed after each test
@AfterEach public void afterEach() { testBasket = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void runAfterTest() {}", "@AfterTest\n\tpublic void afterTest() {\n\t}", "@After\n public void afterTest(){\n }", "@Override\n protected void after() {\n }", "@After\n\tpublic void testEachCleanup() {\n\t\tSystem.out.println(\"Test Completed!\");\n\t}", "@AfterTest\n\tpublic void afterT...
[ "0.815992", "0.7618311", "0.7316253", "0.7198788", "0.7182917", "0.7152395", "0.71491075", "0.7117506", "0.70909864", "0.70899856", "0.7083649", "0.70450383", "0.70390886", "0.7001531", "0.698996", "0.698027", "0.69258946", "0.69116634", "0.6904937", "0.6902863", "0.68975735"...
0.0
-1
No Standard rule for degrees, so for the time being using the one defined on Project presentation, slide 10
private float matchingDegree(OntologyResult match) { switch (match) { case Exact: return 1.0f; case Subsumption: return 0.8f; case PlugIn: return 0.6f; case Structural: return 0.5f; case NotMatched: return 0.0f; default: return 0.0f; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static double degToRad(float deg)\r\n/* 25: */ {\r\n/* 26:32 */ return deg * 3.141592653589793D / 180.0D;\r\n/* 27: */ }", "public String getUnitOfViewAngle() {\n \treturn \"degrees\";\n }", "private static double radToDeg(float rad)\r\n/* 30: */ {\r\n/* 31:39 */ return rad * ...
[ "0.64578605", "0.6434699", "0.63901794", "0.6316969", "0.62483114", "0.62237626", "0.61589736", "0.6081636", "0.6069573", "0.6057386", "0.6057386", "0.6030873", "0.6022949", "0.60188454", "0.60096395", "0.5990671", "0.5977517", "0.5977371", "0.5973771", "0.5968612", "0.596254...
0.0
-1
Recursive "Bruteforce" metode BubbleSort O(n^2)
public void recursiveBubbleSort(int[] numbers) { boolean sorted = false; int posA; int posB; for(int i = 0; i < numbers.length - 1; i++) { if(numbers[i] > numbers[i + 1] && numbers[i] != numbers.length) { posA = numbers[i]; posB = numbers[i + 1]; numbers[i] = posB; numbers[i + 1] = posA; sorted = true; } } if (sorted) { recursiveBubbleSort(numbers); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void sortBubble(int[] tab) {\n boolean alreadySorted=false;\n int temp;\n int n=tab.length;\n int i=0;\n if(tab.length!=0){\n while (i<n-1 && !alreadySorted){\n alreadySorted=true;\n for (int j=0; j<n-1-i;j++){\n if (tab[j...
[ "0.7167602", "0.7034164", "0.7007449", "0.69322693", "0.692657", "0.6883068", "0.6870847", "0.67569053", "0.6755198", "0.6732915", "0.67296124", "0.66639155", "0.6647272", "0.6635847", "0.6625538", "0.66038996", "0.6506145", "0.6505558", "0.64938635", "0.64790756", "0.6436423...
0.65765214
16
Creates new form manage_employee_attendance
public manage_employee_attendance() { initComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public attendance() {\n initComponents();\n setDate();\n controller = new AttendanceController();\n getAllEmployees();\n generateAttendanceId();\n aIdtxt.setVisible(false);\n }", "@GetMapping(\"/showNewEmpForm\")\n\tpublic String showNewEmpForm(Model model) {\n\t\tEmp...
[ "0.647998", "0.63514596", "0.63096774", "0.59823227", "0.5918745", "0.59020025", "0.58612764", "0.58434165", "0.5825844", "0.58092445", "0.58088416", "0.57705945", "0.5728767", "0.5692056", "0.5602168", "0.5533711", "0.55300033", "0.55194235", "0.54992247", "0.54516876", "0.5...
0.6817602
0
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); btMark = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); btsearch = new javax.swing.JButton(); jLabel2 = new javax.swing.JLabel(); btHalf = new javax.swing.JButton(); jLabel4 = new javax.swing.JLabel(); btSearchHalf = new javax.swing.JButton(); jLabel5 = new javax.swing.JLabel(); btViewHalf = new javax.swing.JButton(); jLabel6 = new javax.swing.JLabel(); setOpaque(false); jPanel1.setMaximumSize(new java.awt.Dimension(880, 601)); jPanel1.setMinimumSize(new java.awt.Dimension(880, 601)); jPanel1.setOpaque(false); jPanel1.setPreferredSize(new java.awt.Dimension(880, 601)); jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); btMark.setBackground(new java.awt.Color(51, 204, 255)); btMark.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/smsc/view/photos/mark attendance.png"))); // NOI18N btMark.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 102, 153), 2, true)); btMark.setBorderPainted(false); btMark.setContentAreaFilled(false); btMark.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); btMark.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btMarkMouseClicked(evt); } public void mouseEntered(java.awt.event.MouseEvent evt) { btMarkMouseEntered(evt); } public void mouseExited(java.awt.event.MouseEvent evt) { btMarkMouseExited(evt); } }); jPanel1.add(btMark, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, 260, 250)); jLabel1.setFont(new java.awt.Font("Times New Roman", 1, 18)); // NOI18N jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setText("Mark Employee Attendance"); jPanel1.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 260, -1, -1)); btsearch.setBackground(new java.awt.Color(51, 204, 255)); btsearch.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/smsc/view/photos/search attendance.png"))); // NOI18N btsearch.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 102, 153), 2, true)); btsearch.setBorderPainted(false); btsearch.setContentAreaFilled(false); btsearch.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); btsearch.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btsearchMouseClicked(evt); } public void mouseEntered(java.awt.event.MouseEvent evt) { btsearchMouseEntered(evt); } public void mouseExited(java.awt.event.MouseEvent evt) { btsearchMouseExited(evt); } }); jPanel1.add(btsearch, new org.netbeans.lib.awtextra.AbsoluteConstraints(285, 10, 260, 250)); jLabel2.setFont(new java.awt.Font("Times New Roman", 1, 18)); // NOI18N jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel2.setText("Search Employee Attendance"); jPanel1.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(310, 260, -1, -1)); btHalf.setBackground(new java.awt.Color(51, 204, 255)); btHalf.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 102, 153), 2, true)); btHalf.setBorderPainted(false); btHalf.setContentAreaFilled(false); btHalf.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); btHalf.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseEntered(java.awt.event.MouseEvent evt) { btHalfMouseEntered(evt); } public void mouseExited(java.awt.event.MouseEvent evt) { btHalfMouseExited(evt); } }); jPanel1.add(btHalf, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 290, 260, 250)); jLabel4.setFont(new java.awt.Font("Times New Roman", 1, 18)); // NOI18N jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel4.setText("Manage Employee Halfday Leaves"); jPanel1.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 540, -1, -1)); btSearchHalf.setBackground(new java.awt.Color(51, 204, 255)); btSearchHalf.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 102, 153), 2, true)); btSearchHalf.setBorderPainted(false); btSearchHalf.setContentAreaFilled(false); btSearchHalf.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); btSearchHalf.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseEntered(java.awt.event.MouseEvent evt) { btSearchHalfMouseEntered(evt); } public void mouseExited(java.awt.event.MouseEvent evt) { btSearchHalfMouseExited(evt); } }); jPanel1.add(btSearchHalf, new org.netbeans.lib.awtextra.AbsoluteConstraints(285, 290, 260, 250)); jLabel5.setFont(new java.awt.Font("Times New Roman", 1, 18)); // NOI18N jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel5.setText("Search Employee Halfday Leaves"); jPanel1.add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 540, -1, -1)); btViewHalf.setBackground(new java.awt.Color(51, 204, 255)); btViewHalf.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 102, 153), 2, true)); btViewHalf.setBorderPainted(false); btViewHalf.setContentAreaFilled(false); btViewHalf.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); btViewHalf.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseEntered(java.awt.event.MouseEvent evt) { btViewHalfMouseEntered(evt); } public void mouseExited(java.awt.event.MouseEvent evt) { btViewHalfMouseExited(evt); } }); jPanel1.add(btViewHalf, new org.netbeans.lib.awtextra.AbsoluteConstraints(565, 290, 260, 250)); jLabel6.setFont(new java.awt.Font("Times New Roman", 1, 18)); // NOI18N jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel6.setText("View Employee Halfday Leaves"); jPanel1.add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 540, -1, -1)); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 846, javax.swing.GroupLayout.PREFERRED_SIZE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.7321233", "0.72922724", "0.72922724", "0.72922724", "0.7287021", "0.7250113", "0.7214902", "0.7209478", "0.71973455", "0.71915394", "0.71855843", "0.71602577", "0.7149222", "0.70949143", "0.70813066", "0.70579875", "0.6988272", "0.6978623", "0.6956488", "0.6954857", "0.694...
0.0
-1
get all question of any qid
@GetMapping("/quiz/{qid}") public ResponseEntity<?> getQuestionsOfQuiz(@PathVariable("qid") Long qid){ Quiz quiz = this.quizService.getQuiz(qid); Set<Question> questions = quiz.getQuestions(); List<Question> list = new ArrayList<>(questions); if(list.size() > Integer.parseInt(quiz.getNumberOfQuestions())) { list = list.subList(0, Integer.parseInt(quiz.getNumberOfQuestions())); } list.forEach((q)-> { q.setAnswer(""); }); Collections.shuffle(list); return ResponseEntity.ok(list); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic List<Yquestion> queryYquestion(int qid) {\n\t\treturn ym.queryYquestion(qid);\r\n\t}", "public List<MultQuestion> multChoiceQuestions(int qid);", "List<Question> getQuestions(String surveyId);", "@GetMapping(\"/quiz/all/{qid}\")\n\tpublic ResponseEntity<?> getQuestionsOfQuizAdmin(@PathV...
[ "0.7535263", "0.7362277", "0.72314006", "0.69558346", "0.6939551", "0.6846397", "0.67206556", "0.66955197", "0.6656947", "0.6635293", "0.66213536", "0.6611896", "0.6555799", "0.65207124", "0.6515963", "0.65091443", "0.65000916", "0.6492097", "0.6488585", "0.6483019", "0.64749...
0.6850969
5
get all question of any qid
@GetMapping("/quiz/all/{qid}") public ResponseEntity<?> getQuestionsOfQuizAdmin(@PathVariable("qid") Long qid){ Quiz quiz = new Quiz(); quiz.setqId(qid); Set<Question> questionsOfQuiz = this.questionService.getQuestionOfQuiz(quiz); return ResponseEntity.ok(questionsOfQuiz); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic List<Yquestion> queryYquestion(int qid) {\n\t\treturn ym.queryYquestion(qid);\r\n\t}", "public List<MultQuestion> multChoiceQuestions(int qid);", "List<Question> getQuestions(String surveyId);", "public Question getQuestionbyId(int sid,int qid);", "@GetMapping(\"/quiz/{qid}\")\n\tpubl...
[ "0.7535263", "0.7362277", "0.72314006", "0.6939551", "0.6850969", "0.6846397", "0.67206556", "0.66955197", "0.6656947", "0.6635293", "0.66213536", "0.6611896", "0.6555799", "0.65207124", "0.6515963", "0.65091443", "0.65000916", "0.6492097", "0.6488585", "0.6483019", "0.647491...
0.69558346
3
get a single question
@GetMapping("/{quesId}") public Question get(@PathVariable("quesId") Long quesId) { return this.questionService.getQuestion(quesId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Question getQuestion(String questionId);", "Question getFirstQuestion();", "Question getQuestion();", "public Question getQuestionbyId(int sid,int qid);", "Question getQuestionInPick(String questionId);", "public Question getQuestion(String questionId) {\r\n Question[] questions = currentProcessInsta...
[ "0.83676875", "0.8111332", "0.80574906", "0.76589656", "0.760205", "0.75892884", "0.7476621", "0.7421229", "0.73528457", "0.71517354", "0.705918", "0.6983351", "0.6974716", "0.68639624", "0.68374264", "0.6830063", "0.67843634", "0.67839426", "0.67749614", "0.67640704", "0.675...
0.63535213
42
delete a single question
@DeleteMapping("/{quesId}") public void delete(@PathVariable("quesId") Long quesId) { this.questionService.deleteQuestion(quesId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void deleteQuestion(String questionId);", "public void deleteQuestion(int sid);", "public abstract void deleteQuestion();", "public void deleteQuestion(Question question) throws Exception {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n ...
[ "0.8765562", "0.8523122", "0.81044614", "0.7972788", "0.79545224", "0.7865521", "0.78381246", "0.7757859", "0.7632341", "0.7632341", "0.7632341", "0.7632341", "0.7552296", "0.75072896", "0.74671316", "0.74524367", "0.74274665", "0.7407109", "0.7336842", "0.7310079", "0.729172...
0.67097986
32
/ HashMap data = iMyPageService.getMEM(params); mav.addObject("data", data); System.out.println(data);
@RequestMapping(value = "/teamAdd") public ModelAndView teamAdd(@RequestParam HashMap<String, String> params, ModelAndView mav) throws Throwable { mav.setViewName("teamAdd/teamAdd"); return mav; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Map<String,Object> getDataForPage(String pageUri, VitroRequest vreq, ServletContext context) throws InstantiationException, IllegalAccessException, ClassNotFoundException {\n Map<String, Object> page = vreq.getWebappDaoFactory().getPageDao().getPage(pageUri); \n \n Map<Str...
[ "0.612683", "0.609565", "0.58638215", "0.5838893", "0.5812796", "0.57960856", "0.572406", "0.56207806", "0.55760163", "0.55411047", "0.55183744", "0.55161214", "0.5492142", "0.5488043", "0.5478459", "0.54615146", "0.5426597", "0.54166585", "0.541021", "0.53954893", "0.5386663...
0.0
-1
there will be issue when the type is double/int/long
protected void setId(UiAction uiAction, ResultSet rs, int rowNumber) throws SQLException{ String id = rs.getString(UiActionTable.COLUMN_ID); if(id == null){ //do nothing when nothing found in database return; } uiAction.setId(id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Class getValueType() {\n return Double.class;\n }", "public static void main(String args[]) {\n\t\t \n\t\t // lets define some variables and try to insert other data type value\n\t\t int x = 23;\n\t\t double y ;\n\t\t y = x ; // here we are storing int to double ie. smaller to larger . So...
[ "0.66770065", "0.63548017", "0.6348221", "0.6342794", "0.6286748", "0.6286562", "0.62415045", "0.62285113", "0.6176737", "0.61717606", "0.60764956", "0.60742694", "0.6066293", "0.6032801", "0.60286814", "0.6025049", "0.601542", "0.5959509", "0.59377545", "0.59002924", "0.5898...
0.0
-1
there will be issue when the type is double/int/long
protected void setCode(UiAction uiAction, ResultSet rs, int rowNumber) throws SQLException{ String code = rs.getString(UiActionTable.COLUMN_CODE); if(code == null){ //do nothing when nothing found in database return; } uiAction.setCode(code); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Class getValueType() {\n return Double.class;\n }", "public static void main(String args[]) {\n\t\t \n\t\t // lets define some variables and try to insert other data type value\n\t\t int x = 23;\n\t\t double y ;\n\t\t y = x ; // here we are storing int to double ie. smaller to larger . So...
[ "0.66770065", "0.63548017", "0.6348221", "0.6342794", "0.6286748", "0.6286562", "0.62415045", "0.62285113", "0.6176737", "0.61717606", "0.60764956", "0.60742694", "0.6066293", "0.6032801", "0.60286814", "0.6025049", "0.601542", "0.5959509", "0.59377545", "0.59002924", "0.5898...
0.0
-1
there will be issue when the type is double/int/long
protected void setIcon(UiAction uiAction, ResultSet rs, int rowNumber) throws SQLException{ String icon = rs.getString(UiActionTable.COLUMN_ICON); if(icon == null){ //do nothing when nothing found in database return; } uiAction.setIcon(icon); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Class getValueType() {\n return Double.class;\n }", "public static void main(String args[]) {\n\t\t \n\t\t // lets define some variables and try to insert other data type value\n\t\t int x = 23;\n\t\t double y ;\n\t\t y = x ; // here we are storing int to double ie. smaller to larger . So...
[ "0.66772467", "0.6355419", "0.63483196", "0.6342852", "0.6287018", "0.62868583", "0.62429136", "0.6228538", "0.6178516", "0.6171938", "0.6077349", "0.6074494", "0.6065865", "0.60325575", "0.6027928", "0.6024646", "0.6015092", "0.5959282", "0.5938346", "0.59007293", "0.5899381...
0.0
-1
there will be issue when the type is double/int/long
protected void setTitle(UiAction uiAction, ResultSet rs, int rowNumber) throws SQLException{ String title = rs.getString(UiActionTable.COLUMN_TITLE); if(title == null){ //do nothing when nothing found in database return; } uiAction.setTitle(title); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Class getValueType() {\n return Double.class;\n }", "public static void main(String args[]) {\n\t\t \n\t\t // lets define some variables and try to insert other data type value\n\t\t int x = 23;\n\t\t double y ;\n\t\t y = x ; // here we are storing int to double ie. smaller to larger . So...
[ "0.66770065", "0.63548017", "0.6348221", "0.6342794", "0.6286748", "0.6286562", "0.62415045", "0.62285113", "0.6176737", "0.61717606", "0.60764956", "0.60742694", "0.6066293", "0.6032801", "0.60286814", "0.6025049", "0.601542", "0.5959509", "0.59377545", "0.59002924", "0.5898...
0.0
-1
there will be issue when the type is double/int/long
protected void setDisplayOrder(UiAction uiAction, ResultSet rs, int rowNumber) throws SQLException{ Integer displayOrder = rs.getInt(UiActionTable.COLUMN_DISPLAY_ORDER); if(displayOrder == null){ //do nothing when nothing found in database return; } uiAction.setDisplayOrder(displayOrder); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Class getValueType() {\n return Double.class;\n }", "public static void main(String args[]) {\n\t\t \n\t\t // lets define some variables and try to insert other data type value\n\t\t int x = 23;\n\t\t double y ;\n\t\t y = x ; // here we are storing int to double ie. smaller to larger . So...
[ "0.66770065", "0.63548017", "0.6348221", "0.6342794", "0.6286748", "0.6286562", "0.62415045", "0.62285113", "0.6176737", "0.61717606", "0.60764956", "0.60742694", "0.6066293", "0.6032801", "0.60286814", "0.6025049", "0.601542", "0.5959509", "0.59377545", "0.59002924", "0.5898...
0.0
-1
there will be issue when the type is double/int/long
protected void setBrief(UiAction uiAction, ResultSet rs, int rowNumber) throws SQLException{ String brief = rs.getString(UiActionTable.COLUMN_BRIEF); if(brief == null){ //do nothing when nothing found in database return; } uiAction.setBrief(brief); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Class getValueType() {\n return Double.class;\n }", "public static void main(String args[]) {\n\t\t \n\t\t // lets define some variables and try to insert other data type value\n\t\t int x = 23;\n\t\t double y ;\n\t\t y = x ; // here we are storing int to double ie. smaller to larger . So...
[ "0.66770065", "0.63548017", "0.6348221", "0.6342794", "0.6286748", "0.6286562", "0.62415045", "0.62285113", "0.6176737", "0.61717606", "0.60764956", "0.60742694", "0.6066293", "0.6032801", "0.60286814", "0.6025049", "0.601542", "0.5959509", "0.59377545", "0.59002924", "0.5898...
0.0
-1
there will be issue when the type is double/int/long
protected void setImageUrl(UiAction uiAction, ResultSet rs, int rowNumber) throws SQLException{ String imageUrl = rs.getString(UiActionTable.COLUMN_IMAGE_URL); if(imageUrl == null){ //do nothing when nothing found in database return; } uiAction.setImageUrl(imageUrl); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Class getValueType() {\n return Double.class;\n }", "public static void main(String args[]) {\n\t\t \n\t\t // lets define some variables and try to insert other data type value\n\t\t int x = 23;\n\t\t double y ;\n\t\t y = x ; // here we are storing int to double ie. smaller to larger . So...
[ "0.66772467", "0.6355419", "0.63483196", "0.6342852", "0.6287018", "0.62868583", "0.62429136", "0.6228538", "0.6178516", "0.6171938", "0.6077349", "0.6074494", "0.6065865", "0.60325575", "0.6027928", "0.6024646", "0.6015092", "0.5959282", "0.5938346", "0.59007293", "0.5899381...
0.0
-1
there will be issue when the type is double/int/long
protected void setLinkToUrl(UiAction uiAction, ResultSet rs, int rowNumber) throws SQLException{ String linkToUrl = rs.getString(UiActionTable.COLUMN_LINK_TO_URL); if(linkToUrl == null){ //do nothing when nothing found in database return; } uiAction.setLinkToUrl(linkToUrl); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Class getValueType() {\n return Double.class;\n }", "public static void main(String args[]) {\n\t\t \n\t\t // lets define some variables and try to insert other data type value\n\t\t int x = 23;\n\t\t double y ;\n\t\t y = x ; // here we are storing int to double ie. smaller to larger . So...
[ "0.66770065", "0.63548017", "0.6348221", "0.6342794", "0.6286748", "0.6286562", "0.62415045", "0.62285113", "0.6176737", "0.61717606", "0.60764956", "0.60742694", "0.6066293", "0.6032801", "0.60286814", "0.6025049", "0.601542", "0.5959509", "0.59377545", "0.59002924", "0.5898...
0.0
-1
there will be issue when the type is double/int/long
protected void setExtraData(UiAction uiAction, ResultSet rs, int rowNumber) throws SQLException{ String extraData = rs.getString(UiActionTable.COLUMN_EXTRA_DATA); if(extraData == null){ //do nothing when nothing found in database return; } uiAction.setExtraData(extraData); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Class getValueType() {\n return Double.class;\n }", "public static void main(String args[]) {\n\t\t \n\t\t // lets define some variables and try to insert other data type value\n\t\t int x = 23;\n\t\t double y ;\n\t\t y = x ; // here we are storing int to double ie. smaller to larger . So...
[ "0.66770065", "0.63548017", "0.6348221", "0.6342794", "0.6286748", "0.6286562", "0.62415045", "0.62285113", "0.6176737", "0.61717606", "0.60764956", "0.60742694", "0.6066293", "0.6032801", "0.60286814", "0.6025049", "0.601542", "0.5959509", "0.59377545", "0.59002924", "0.5898...
0.0
-1
there will be issue when the type is double/int/long
protected void setVersion(UiAction uiAction, ResultSet rs, int rowNumber) throws SQLException{ Integer version = rs.getInt(UiActionTable.COLUMN_VERSION); if(version == null){ //do nothing when nothing found in database return; } uiAction.setVersion(version); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Class getValueType() {\n return Double.class;\n }", "public static void main(String args[]) {\n\t\t \n\t\t // lets define some variables and try to insert other data type value\n\t\t int x = 23;\n\t\t double y ;\n\t\t y = x ; // here we are storing int to double ie. smaller to larger . So...
[ "0.66770065", "0.63548017", "0.6348221", "0.6342794", "0.6286748", "0.6286562", "0.62415045", "0.62285113", "0.6176737", "0.61717606", "0.60764956", "0.60742694", "0.6066293", "0.6032801", "0.60286814", "0.6025049", "0.601542", "0.5959509", "0.59377545", "0.59002924", "0.5898...
0.0
-1
A class representing an errors measure
public interface ErrorMeasure { /** * Measure the errors for the given output and target * @param output the output * @param example the example * @return the errors */ public abstract double value(Instance output, Instance example); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public float classError() { return _errors / (float) _rows; }", "@Override\n\tpublic void calculateError() {\n\t\t\n\t}", "public Vector2d getErrm() {\n return errm;\n }", "public double GetTimeError(){\n\t\treturn this.timeError;\n\t}", "public void setError(double error) {\r\n this.error =...
[ "0.7177101", "0.682819", "0.61936736", "0.61186796", "0.6025344", "0.6012905", "0.5999309", "0.5932013", "0.58437645", "0.5809988", "0.57555985", "0.5746555", "0.57452935", "0.57204604", "0.5715733", "0.5715733", "0.5715733", "0.5714631", "0.5682489", "0.56036186", "0.56015",...
0.7303486
0
Measure the errors for the given output and target
public abstract double value(Instance output, Instance example);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double calculateError(double[] outputsActual, double[] outputsTarget) {\n return Utilities.calculateError(outputsActual, outputsTarget);\n }", "void calculateError(double targetValue) {\n this.error = this.getOutput()*(1-this.getOutput())*(this.getOutput()-targetValue);\n }", "private dou...
[ "0.7420077", "0.7071636", "0.6450394", "0.6367062", "0.6270678", "0.62261796", "0.61231124", "0.60578036", "0.5793913", "0.5775103", "0.5773539", "0.56207645", "0.55438197", "0.5452589", "0.54461837", "0.54455954", "0.54202354", "0.5409499", "0.5402611", "0.539818", "0.539220...
0.0
-1
/ renamed from: com.ss.avframework.livestreamv2.InputAudioStream$Observer
public interface Observer { void releaseInputStream(InputAudioStream inputAudioStream); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface AudioPlayListener {\n\n\n /**\n * 播放\n * @param url 音频url 包括网络url,本地路径,raw资源文件\n */\n void play(String url,OnAudioPlayListener onAudioPlayListener);\n\n /**\n * 暂停\n */\n void pause();\n\n /**\n * 开始\n */\n void start();\n\n /**\n * 重新播放\n *...
[ "0.6663762", "0.6620806", "0.6613738", "0.63123685", "0.63098353", "0.6281652", "0.6277885", "0.6273814", "0.61633724", "0.61198896", "0.6105604", "0.60664195", "0.59417", "0.59268266", "0.58947116", "0.5868771", "0.586341", "0.58414084", "0.5831909", "0.5825812", "0.5818604"...
0.7644752
0
/ / / / / / /
public MirroredTypesException(List<? extends TypeMirror> paramList) { /* 69 */ super("Attempt to access Class objects for TypeMirrors " + (paramList = new ArrayList<>(paramList)) /* */ /* 71 */ .toString()); /* 72 */ this.types = Collections.unmodifiableList(paramList); /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "public void divide() {\n\t\t\n\t}", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "private int rightChild(int i){return 2*i+2;}", "public abstract void b...
[ "0.54567957", "0.53680295", "0.53644985", "0.52577376", "0.52142847", "0.51725817", "0.514088", "0.50868535", "0.5072305", "0.504888", "0.502662", "0.50005764", "0.49740013", "0.4944243", "0.4941118", "0.4937142", "0.49095523", "0.48940238", "0.48719338", "0.48613623", "0.486...
0.0
-1
/ / / / / / / / /
public List<? extends TypeMirror> getTypeMirrors() { /* 83 */ return this.types; /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "public void divide() {\n\t\t\n\t}", "private int rightChild(int i){return 2*i+2;}", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "public abstract void b...
[ "0.5531016", "0.54378587", "0.52516115", "0.52405924", "0.5151045", "0.5127977", "0.50680465", "0.5066997", "0.50218964", "0.5013022", "0.5007318", "0.50048536", "0.49997565", "0.4994835", "0.49735898", "0.49699947", "0.49680406", "0.49594593", "0.4937881", "0.49361676", "0.4...
0.0
-1
/ / / / / /
private void readObject(ObjectInputStream paramObjectInputStream) throws IOException, ClassNotFoundException { /* 91 */ paramObjectInputStream.defaultReadObject(); /* 92 */ this.types = null; /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void divide() {\n\t\t\n\t}", "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "public abstract void bepaalGrootte();", "public static void bottomHalf(...
[ "0.5472371", "0.5383522", "0.52979374", "0.5293668", "0.5211566", "0.51842105", "0.5161626", "0.51377255", "0.5100369", "0.5067393", "0.5064298", "0.50376177", "0.49875325", "0.49361488", "0.49140826", "0.49058613", "0.49058613", "0.48946288", "0.48945552", "0.48931476", "0.4...
0.0
-1
4) evaluateWithinBounds: Calculates the vapourphase molar enthalpy of the species at temperature T. Constants: constants[0] = Normal Boiling Point Temperature constants[1] = LiquidPhase Enthalpy constants[2] = Latent Heat of Vaporization
protected double evaluateWithinBounds(double x, double[] constants) { double T = x; double Tb = constants[0]; double hL = constants[1]; double lambda = constants[2]; double[] C = super.getC(); double Hv = EnthalpyVapour.R * ((C[0] * (T - Tb)) + (0.5 * C[1] * (Math.pow(T, 2) - Math.pow(Tb, 2))) + ((1. / 3.) * C[2] * (Math.pow(T, 3) - Math.pow(Tb, 3))) + (-1. * C[3] * (Math.pow(T, -1) - Math.pow(Tb, -1)))); return hL + lambda + Hv; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void getValuationSlot() {\n float locX = M.evaluateLoc.x;\n float locY = M.evaluateLoc.y;\n M.lastZoneValuation = M.evaluateLoc.distanceTo(M.finalMove) * M.moveVectorStr; //Desire to move towards our main goal\n float test1;\n float test2;\n switch (angledRe...
[ "0.55000085", "0.53291315", "0.5213784", "0.51905704", "0.50595117", "0.5053478", "0.5049362", "0.4992604", "0.49440476", "0.49350852", "0.49122176", "0.49052626", "0.48612237", "0.48527098", "0.48089346", "0.47660965", "0.47583944", "0.47350997", "0.46887287", "0.4676782", "...
0.6934277
0
6) getConstantCount() : Returns number of constants.
public int getConstantCount() { return EnthalpyVapour.CONSTANT_COUNT; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int numberOfConstants() {\n return (int) Stream.of(this.template.split(\"\\\\.\"))\n .filter(s -> !s.equals(\"*\")).count();\n }", "int getGeoTargetConstantsCount();", "public int getSize() {\n int size = 5; // 1 (code) + 2 (data length) + 2 (# of constants)\n try...
[ "0.7885833", "0.7027644", "0.66746175", "0.65481156", "0.6529254", "0.6113442", "0.61029524", "0.6086527", "0.6071034", "0.6066414", "0.59607506", "0.5953467", "0.5880954", "0.5870069", "0.5849408", "0.5841066", "0.5821768", "0.5816977", "0.5814204", "0.5804974", "0.58016115"...
0.8814767
0
TODO Autogenerated method stub
public static void main(String[] args) { lis= Arrays.asList(new Integer[] {4,2,0,3,2,5}); solve(); }
{ "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
private static void solve() { List<Integer> rgtMax= new ArrayList<>(); List<Integer> lftMax= new ArrayList<>(); populateRgtMax(rgtMax); populateLftMax(lftMax); int area=findMaxArea(lftMax,rgtMax); System.out.println(area); }
{ "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
private static void populateRgtMax(List<Integer> rgtMax) { int curMax=-1; for(int i= lis.size()-1;i>=0;i--) { rgtMax.add(curMax); if(lis.get(i) > curMax ) curMax= Math.max(curMax, lis.get(i)); else continue; } Collections.reverse(rgtMax); }
{ "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
private static void populateLftMax(List<Integer> lftMax) { int curMax=-1; for(int i= 0;i<lis.size();i++) { lftMax.add(curMax); if(lis.get(i) > curMax ) curMax= Math.max(curMax, lis.get(i)); else continue; } }
{ "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
Creates new form Register
public Register() { initComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(\"/register\")\r\n\tpublic ModelAndView register(@ModelAttribute(\"registerForm\") final UserRegisterForm form) {\r\n\t\treturn new ModelAndView(\"users/register\");\r\n\t}", "public RegisterForm() {\n initComponents();\n }", "public RegisterForm() {\n initComponents();\n }"...
[ "0.74988073", "0.7378112", "0.7378112", "0.7378112", "0.7226365", "0.71316314", "0.7109775", "0.7062638", "0.70401347", "0.69042933", "0.68422097", "0.67940044", "0.67659473", "0.674207", "0.67415524", "0.670495", "0.6669819", "0.66309756", "0.66055095", "0.6573384", "0.65553...
0.634464
36
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jButton1 = new javax.swing.JButton(); jPanel3 = new javax.swing.JPanel(); jPanel1 = new javax.swing.JPanel(); registerfullname = new javax.swing.JTextField(); jLabel3 = new javax.swing.JLabel(); registerusername = new javax.swing.JTextField(); jLabel5 = new javax.swing.JLabel(); registerage = new javax.swing.JTextField(); jLabel6 = new javax.swing.JLabel(); login_btn = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel8 = new javax.swing.JLabel(); registeraddress = new javax.swing.JTextField(); jLabel1 = new javax.swing.JLabel(); registerpassword = new javax.swing.JPasswordField(); Register = new javax.swing.JButton(); jLabelLogin2 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jButton1.setText("jButton1"); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 100, Short.MAX_VALUE) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 100, Short.MAX_VALUE) ); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jPanel1.setBackground(new java.awt.Color(204, 255, 255)); jPanel1.setLayout(null); registerfullname.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { registerfullnameActionPerformed(evt); } }); jPanel1.add(registerfullname); registerfullname.setBounds(120, 120, 290, 30); jLabel3.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel3.setText("UserName : "); jPanel1.add(jLabel3); jLabel3.setBounds(40, 180, 110, 17); registerusername.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { registerusernameActionPerformed(evt); } }); jPanel1.add(registerusername); registerusername.setBounds(120, 170, 290, 30); jLabel5.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N jLabel5.setText("Age : "); jPanel1.add(jLabel5); jLabel5.setBounds(40, 220, 50, 30); registerage.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { registerageActionPerformed(evt); } }); jPanel1.add(registerage); registerage.setBounds(120, 220, 290, 30); jLabel6.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel6.setText("Password : "); jPanel1.add(jLabel6); jLabel6.setBounds(40, 280, 80, 15); login_btn.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N login_btn.setText("LOGIN"); login_btn.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { login_btnMouseClicked(evt); } }); jPanel1.add(login_btn); login_btn.setBounds(280, 410, 50, 20); jPanel2.setBackground(new java.awt.Color(0, 0, 0)); jLabel8.setFont(new java.awt.Font("Tahoma", 1, 36)); // NOI18N jLabel8.setForeground(new java.awt.Color(255, 255, 255)); jLabel8.setText("Registration "); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 369, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(71, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel1.add(jPanel2); jPanel2.setBounds(0, 0, 450, 80); jPanel1.add(registeraddress); registeraddress.setBounds(120, 320, 290, 30); jLabel1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel1.setText("Address:"); jPanel1.add(jLabel1); jLabel1.setBounds(40, 320, 70, 30); registerpassword.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { registerpasswordActionPerformed(evt); } }); jPanel1.add(registerpassword); registerpassword.setBounds(120, 270, 290, 30); Register.setText("Register"); Register.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { RegisterMouseClicked(evt); } }); jPanel1.add(Register); Register.setBounds(320, 370, 90, 30); jLabelLogin2.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N jLabelLogin2.setText("Have an account already?"); jLabelLogin2.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jLabelLogin2MouseClicked(evt); } }); jPanel1.add(jLabelLogin2); jLabelLogin2.setBounds(120, 410, 160, 20); jLabel4.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel4.setText("Full Name : "); jPanel1.add(jLabel4); jLabel4.setBounds(40, 130, 100, 17); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 450, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 450, Short.MAX_VALUE) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.73191476", "0.72906625", "0.72906625", "0.72906625", "0.72860986", "0.7248112", "0.7213479", "0.72078276", "0.7195841", "0.71899796", "0.71840525", "0.7158498", "0.71477973", "0.7092748", "0.70800966", "0.70558053", "0.69871384", "0.69773406", "0.69548076", "0.69533914", "...
0.0
-1
When the toggle button is clicked, this code executes.
private void switchBtnActionPerformed(ActionEvent evt) { if(switchBtn.isSelected()) { switchBtn.setText("MIPS -> C"); switchBtnState = 1; } else { switchBtn.setText("C -> MIPS"); switchBtnState = -1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void Toggle() {\n\t \n }", "protected void execute() { \t\n// \tboolean toggle=true;\n// \tboolean grab = false;\n// \tif(toggle&&button.get()) {//execute once per button push\n// \t\ttoggle=false;//prevents code from being called again until button is released and pressed...
[ "0.755118", "0.7154254", "0.7142039", "0.7095443", "0.7078202", "0.7044807", "0.7000908", "0.6969752", "0.6966333", "0.6859979", "0.68572354", "0.67617625", "0.67507994", "0.6660029", "0.6629322", "0.66250205", "0.66050893", "0.65919", "0.65828073", "0.6574363", "0.65561396",...
0.0
-1
When 'choose file' button is clicked, this code executes.
private void choosefileBtnActionPerformed(ActionEvent evt) { JFileChooser filechooser = new JFileChooser(); int returnValue = filechooser.showOpenDialog(panel); if(returnValue == JFileChooser.APPROVE_OPTION) { filename = filechooser.getSelectedFile().toString(); fileTxtField.setText(filename); codeFile = filechooser.getSelectedFile(); assemblyreader = new mipstoc.read.CodeReader(codeFile); inputTxtArea.setText(assemblyreader.getString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void processChooseFileButton() {\n try {\n dataOutputArea.setText(\"\");\n JFileChooser myFileChooser = new JFileChooser(\".\", FileSystemView.getFileSystemView());\n int returnValue = myFileChooser.showOpenDialog(null);\n if(returnValue == JFileChooser.AP...
[ "0.79288673", "0.7595121", "0.7576315", "0.7473494", "0.7441884", "0.7421623", "0.73790914", "0.7367778", "0.73540634", "0.73471", "0.7345575", "0.72822505", "0.7256489", "0.7243895", "0.7229164", "0.71922743", "0.71757853", "0.71725917", "0.7171434", "0.7129604", "0.7116965"...
0.77557194
1
When the translate button is clicked, this code executes.
private void translateBtnActionPerformed(ActionEvent evt) { if(switchBtnState == 1) { assemblyreader = new mipstoc.read.CodeReader(inputTxtArea.getText()); mipstoc.lexer.Lexer lex = new mipstoc.lexer.Lexer(assemblyreader); mipstoc.parser.Parser parser = new mipstoc.parser.Parser(lex); try { parser.program(); outputTxtArea.setText(mipstoc.parser.Parser.output); mipstoc.parser.Parser.output = ""; } catch(Error e) { Toolkit.getDefaultToolkit().beep(); JOptionPane.showMessageDialog(panel, e.toString(), "Error", JOptionPane.ERROR_MESSAGE); } } else { try { ctomips.reader.ReadFile reader = new ctomips.reader.ReadFile(inputTxtArea.getText()); ctomips.lexer.LexInter li = new ctomips.lexer.LexInter(); ctomips.asm.Assembly ass = new ctomips.asm.Assembly(li); ctomips.lexer.Lexer lex = new ctomips.lexer.Lexer(reader); ctomips.parser.Parser parser = new ctomips.parser.Parser(lex, ass); ctomips.inter.Node.labels = 0; ctomips.lexer.Lexer.line = 1; parser.program(); ass.program(); outputTxtArea.setText(ass.assembStr); ctomips.parser.Parser.output = ""; } catch(IOException ie) { } catch(Error e) { Toolkit.getDefaultToolkit().beep(); JOptionPane.showMessageDialog(panel, e.toString(), "Error", JOptionPane.ERROR_MESSAGE); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tbtTranslate.setEnabled(false);\r\n\t\t\t\tbtTranslate.setText(\"正在翻译..\");\r\n\t\t\t\tString re = Languages.translate(taResult.getText());\r\n\t\t\t\tif(\"\"==re || null==re){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\ttaTranslate.setText(r...
[ "0.7652226", "0.70364374", "0.67359775", "0.6700231", "0.66519856", "0.66466194", "0.66206276", "0.66011196", "0.6458095", "0.6291425", "0.6250822", "0.6086243", "0.6084099", "0.608268", "0.60745794", "0.6053448", "0.60309535", "0.5898058", "0.5888397", "0.58865964", "0.58824...
0.6870467
2
size of the stack
public LinkedListStack() { firstNode = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getSize() {\r\n\t\treturn stack.size();\r\n\t}", "public int getSize(){\n return this.stack.size();\n }", "public int size() {\n \treturn stack.size();\n }", "int size() {\n return stackSize;\n }", "@Override\r\n\tpublic int size() {\r\n\t\treturn stack.length;\r\n\t}", ...
[ "0.85695404", "0.85089684", "0.8482001", "0.84283763", "0.82918966", "0.816369", "0.7859386", "0.7744371", "0.7496939", "0.7432217", "0.7334923", "0.7168407", "0.7129974", "0.7065047", "0.7053018", "0.6905363", "0.6859299", "0.6821442", "0.68144774", "0.68063843", "0.67686933...
0.0
-1
process xml bitch Processing the purchase order, needs to be added to the xml file
public void process(PurchaseOrder po) { File file = new File(path + "/" + ORDERS_XML); try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); InputSource is = new InputSource(); is.setCharacterStream(new FileReader(file)); Document doc = db.parse(is); Element root = doc.getDocumentElement(); Element e = doc.createElement("order"); // Convert the purchase order to an XML format String keys[] = {"orderNum","customerRef","product","quantity","unitPrice"}; String values[] = {Integer.toString(po.getOrderNum()), po.getCustomerRef(), po.getProduct().getProductType(), Integer.toString(po.getQuantity()), Float.toString(po.getUnitPrice())}; for(int i=0;i<keys.length;i++) { Element tmp = doc.createElement(keys[i]); tmp.setTextContent(values[i]); e.appendChild(tmp); } // Set the status to submitted Element status = doc.createElement("status"); status.setTextContent("submitted"); e.appendChild(status); // Set the order total Element total = doc.createElement("orderTotal"); float orderTotal = po.getQuantity() * po.getUnitPrice(); total.setTextContent(Float.toString(orderTotal)); e.appendChild(total); // Write the content all as a new element in the root root.appendChild(e); TransformerFactory tf = TransformerFactory.newInstance(); Transformer m = tf.newTransformer(); DOMSource source = new DOMSource(root); StreamResult result = new StreamResult(file); m.transform(source, result); } catch(Exception e) { System.out.println("Error: " + e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static OrderDTO parsePurchaseOrderXML(Document orderXML) {\n OrderDTO orderDTO = new OrderDTO();\n List<OrderlineDTO> listOrderLineDTO = new ArrayList<OrderlineDTO>();\n int lineCount = 0;\n int fieldsCount = 0;\n\n try {\n orderDTO.setStoreName(orderXML.getElementsByTagName(storeName).i...
[ "0.6623879", "0.6362716", "0.6247964", "0.61684823", "0.61121035", "0.6063292", "0.6047522", "0.5665954", "0.5574057", "0.53982854", "0.53892297", "0.53848714", "0.5333109", "0.5323768", "0.52402836", "0.5218283", "0.5210993", "0.52014107", "0.51908886", "0.5189148", "0.51888...
0.7744413
0
Corresponds to function w_nn(x), see Eqn. 22.10 in [1]. TODO: test, not used currently.
@Override public double getWeight(double x) { if (-0.5 <= x && x < 0.5) return 1; else return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int nn(int x)\n {\n return x > 0 ? 1 : 0;\n }", "private void computeWeights(double w_m) {\n\t\t// Initialise\n\t\tdouble m = Math.floor(lambda);\n\t\tif (!flag) return;\n\t\t\n\t\t// Down\n\t\tint j = (int) m;\n\t\twhile (j > leftTruncation) {\n\t\t\tweights[j-1-leftTruncation] ...
[ "0.6209543", "0.55445784", "0.5459818", "0.5421155", "0.5380668", "0.53452563", "0.53389794", "0.5309462", "0.5265589", "0.5209318", "0.5145935", "0.5129835", "0.50964594", "0.5091493", "0.50909054", "0.50892305", "0.5082551", "0.50642943", "0.5051765", "0.503793", "0.5034717...
0.55514574
1
Created by Donny Dominic on 27012016.
public interface updateTabBarIcon { void updateDeleteIcon(float x, float y, PhotoSortrView.Img imgItem, boolean isPointerDown, boolean isPointerUp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Overri...
[ "0.58745766", "0.56963676", "0.56820554", "0.5672955", "0.5670526", "0.5614913", "0.55790114", "0.55790114", "0.5558534", "0.5557314", "0.5556293", "0.55486315", "0.5494039", "0.5490438", "0.54656345", "0.54647297", "0.5441037", "0.54380274", "0.5437413", "0.54292583", "0.542...
0.0
-1
Panning manually Translates the camera in the X and Y dimensions. Does bounds checking.
@Override public void pan(Vector2 delta) { // keep camera within borders float x = Utils.between(viewCamera.position.x + delta.x, bounds.min.x, bounds.max.x); float y = Utils.between(viewCamera.position.y + delta.y, bounds.min.y, bounds.max.y); viewCamera.position.set(x, y, 0); viewCamera.update(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void panView() {\n double xDistance = currentXOffset - targetXOffset;\n double yDistance = currentYOffset - targetYOffset;\n\n xDistance *= -0.5;\n yDistance *= -0.5;\n\n boolean clearX = Math.abs(xDistance) < 2;\n if (clearX) {\n currentXOffset = targetX...
[ "0.70061785", "0.6716039", "0.66990155", "0.66380274", "0.64787245", "0.6157305", "0.60979664", "0.5899116", "0.5883657", "0.5841495", "0.5824696", "0.5819426", "0.5810836", "0.5803291", "0.57847756", "0.5775908", "0.5727387", "0.56609565", "0.5609323", "0.557196", "0.5540527...
0.67861164
1
Translates the camera in all 3 dimensions. Does bounds checking.
@Override public void pan(Vector3 delta) { // keep camera within borders float x = Utils.between(viewCamera.position.x + delta.x, bounds.min.x, bounds.max.x); float y = Utils.between(viewCamera.position.y + delta.y, bounds.min.y, bounds.max.y); float z = Utils.between(viewCamera.position.z + delta.z, bounds.min.z, bounds.max.z); viewCamera.position.set(x, y, z); viewCamera.update(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateCamera() {\n\t\tVector3f x = new Vector3f();\n\t\tVector3f y = new Vector3f();\n\t\tVector3f z = new Vector3f();\n\t\tVector3f temp = new Vector3f(this.mCenterOfProjection);\n\n\t\ttemp.sub(this.mLookAtPoint);\n\t\ttemp.normalize();\n\t\tz.set(temp);\n\n\t\ttemp.set(this.mUpVector);\n\t\ttemp.cr...
[ "0.64974374", "0.6296229", "0.6084651", "0.6048473", "0.59204775", "0.58289766", "0.5777127", "0.5711406", "0.5687184", "0.5602646", "0.5577445", "0.5547904", "0.551686", "0.5511902", "0.55085677", "0.54973555", "0.5488452", "0.5474201", "0.54332304", "0.539785", "0.53920895"...
0.5819355
6
Translates the camera in all 3 dimensions. Does bounds checking.
@Override public void pan(float x, float y, float z) { // keep camera within borders x = Utils.between(viewCamera.position.x + x, bounds.min.x, bounds.max.x); y = Utils.between(viewCamera.position.y + y, bounds.min.y, bounds.max.y); z = Utils.between(viewCamera.position.z + z, bounds.min.z, bounds.max.z); viewCamera.position.set(x, y, z); viewCamera.update(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateCamera() {\n\t\tVector3f x = new Vector3f();\n\t\tVector3f y = new Vector3f();\n\t\tVector3f z = new Vector3f();\n\t\tVector3f temp = new Vector3f(this.mCenterOfProjection);\n\n\t\ttemp.sub(this.mLookAtPoint);\n\t\ttemp.normalize();\n\t\tz.set(temp);\n\n\t\ttemp.set(this.mUpVector);\n\t\ttemp.cr...
[ "0.64974374", "0.6296229", "0.6084651", "0.6048473", "0.59204775", "0.58289766", "0.5819355", "0.5711406", "0.5687184", "0.5602646", "0.5577445", "0.5547904", "0.551686", "0.5511902", "0.55085677", "0.54973555", "0.5488452", "0.5474201", "0.54332304", "0.539785", "0.53920895"...
0.5777127
7
Rendering Override if there are graphics that need to be rendered. Panner should use its own SpriteBatch.
@Override public void render(float delta) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void render(SpriteBatch batch) {\n\t}", "public abstract void render(SpriteBatch spriteBatch);", "public void render(){\n spriteBatch.begin();\n drawEnemies();\n drawPlayer();\n drawBullets();\n spriteBatch.end();\n if(debug){\n ...
[ "0.745359", "0.7426727", "0.74100864", "0.7379814", "0.7192833", "0.70937014", "0.69786537", "0.6970433", "0.69589263", "0.6914293", "0.68060005", "0.68037814", "0.6798673", "0.6794093", "0.67768365", "0.67726725", "0.6753567", "0.67510694", "0.67271084", "0.6727085", "0.6711...
0.0
-1
width & height are already scaled.
@Override public void resize(int width, int height) { viewCamera.viewportWidth = width; viewCamera.viewportHeight = height; viewCamera.position.set(0, 0, 0); viewCamera.update(); Vector3 min = MIN_BOUND.cpy(); Vector3 max = new Vector3(MAX_BOUND.x - width, MAX_BOUND.y - height, 0); viewCamera.project(min, 0, 0, width, height); viewCamera.project(max, 0, 0, width, height); bounds = new BoundingBox(min, max); // do a pan to reset camera position pan(min); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tfinal public void scale(double x, double y)\n\t{\n\t\twidth *= x;\n\t\theight *= y;\n\t}", "public void initSize() {\n WIDTH = 320;\n //WIDTH = 640;\n HEIGHT = 240;\n //HEIGHT = 480;\n SCALE = 2;\n //SCALE = 1;\n }", "public abstract BufferedImage scale...
[ "0.74785966", "0.7100216", "0.7075639", "0.7059147", "0.69936097", "0.69198674", "0.6839444", "0.68285537", "0.6802287", "0.6753039", "0.67444104", "0.6723397", "0.6675232", "0.66713923", "0.6664888", "0.66529155", "0.66460663", "0.66460663", "0.66460663", "0.66460663", "0.66...
0.0
-1
Mapper for the entity Team and its DTO TeamDTO.
@Mapper(componentModel = "spring", uses = { CustomUserMapper.class, IconMapper.class }) public interface TeamMapper extends EntityMapper<TeamDTO, Team> { /* (non-Javadoc) * @see com.ttth.teamcaring.service.mapper.EntityMapper#toDto(java.lang.Object) */ @Mapping(source = "owner.id", target = "ownerId") @Mapping(source = "icon.id", target = "iconId") TeamDTO toDto(Team team); /* (non-Javadoc) * @see com.ttth.teamcaring.service.mapper.EntityMapper#toEntity(java.lang.Object) */ @Mapping(target = "groups", ignore = true) @Mapping(target = "appointments", ignore = true) @Mapping(source = "ownerId", target = "owner") @Mapping(source = "iconId", target = "icon") Team toEntity(TeamDTO teamDTO); /** * From id. * * @param id the id * @return the team */ default Team fromId(Long id) { if (id == null) { return null; } Team team = new Team(); team.setId(id); return team; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Mapper(uses = {PassengerMapper.class, TicketScheduleSectionMapper.class})\npublic interface TicketMapper {\n\n /**\n * To dto ticket dto.\n *\n * @param ticketEntity the ticket entity\n * @return the ticket dto\n */\n @Mappings({\n @Mapping(target = \"passengerDto\", source = ...
[ "0.62198985", "0.61338985", "0.6116561", "0.59001225", "0.5882696", "0.5848403", "0.5774008", "0.57154024", "0.5684394", "0.5674126", "0.56538534", "0.56444776", "0.5639643", "0.56371975", "0.56351537", "0.5613999", "0.5605752", "0.5591831", "0.5587719", "0.5581962", "0.55692...
0.78375375
0
plans the practiceTimes and sets notifications at those times
@Override public void onClick(View v) { Alarm alarm = new Alarm(getContext(), userId); alarm.setAlarmWithNewPracticeTimes(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ActionInterface timeSchedulingTest(PlayerInfo playerInfo, Timestamp executionTime, double responseFactor) {\r\n\r\n User user = playerInfo.getUser();\r\n int favouriteTime = playerInfo.getReceptivityForPlayer().getFavouriteTimeOfDay(ReceptivityProfile.SignificanceLevel.SPECIFIC);\r\n\r\n ...
[ "0.674904", "0.6402943", "0.63828427", "0.63553834", "0.62454104", "0.6227041", "0.60704577", "0.60596526", "0.60575205", "0.5896097", "0.5790509", "0.57494676", "0.56630373", "0.5618681", "0.55680424", "0.5556579", "0.5505372", "0.55004543", "0.54687786", "0.5452236", "0.544...
0.516654
68
Parses the file with the given filename.
public ArrayList<Operation> parse(String filename) { int ref, op, arg; ArrayList<Operation> retVal; BufferedReader br; String line; String[] lineContent; File file = new File(filename); retVal = new ArrayList<Operation>(); try { br = new BufferedReader(new FileReader(file)); while ((line = br.readLine()) != null) { lineContent = line.split(" "); ref = Integer.parseInt(lineContent[0]); op = Integer.parseInt(lineContent[1]); arg = Integer.parseInt(lineContent[2]); retVal.add(new Operation(ref, op, arg)); } br.close(); return retVal; } catch (Exception e) { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void parse(String filename);", "public void parse(String fileName) throws Exception;", "public String parse(File file);", "protected abstract void parseFile(File f) throws IOException;", "public void parseInputFile(String filename) throws BadInputFormatException {\r\n\t\tString line;\r\n\r\n\t\ttry ...
[ "0.8347835", "0.8027686", "0.7414873", "0.73528993", "0.68828213", "0.6755388", "0.66980344", "0.6691712", "0.642254", "0.6414959", "0.63733053", "0.631838", "0.6255708", "0.62537104", "0.62377185", "0.62257236", "0.6218611", "0.6210062", "0.6208284", "0.6205385", "0.61982274...
0.595247
30
if the location has been sampled before first location should be true set the current lat/long to the updated location if firstLocCheck is false create a new drive with the current location
@Override public void onLocationChanged(Location location) { if(!firstLocCheck){ drive = new Drive(location.getLatitude(),location.getLongitude(),Car.carList.get(carIndex),startTime); firstLocCheck = true; } else { Drive.curLat = location.getLatitude(); Drive.curLong = location.getLongitude(); } System.out.println("Location has changed"); System.out.println(location.getLatitude() + " | " + location.getLongitude()); //updateLoc(location); //locProvider = location.getProvider(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onLocationChanged(Location location) {\n\n if(!locationFound){\n while(mlongitude == 0.0 && mlatitude == 0.0) {\n\n mlatitude = location.getLatitude();\n mlongitude = location.getLongitude();\n }\n\n locationFound = tr...
[ "0.6566353", "0.6538054", "0.6414891", "0.6398111", "0.6387034", "0.6386969", "0.6386969", "0.6344234", "0.63399523", "0.6334755", "0.63188463", "0.631758", "0.6242522", "0.6241823", "0.62241834", "0.6213099", "0.6205608", "0.619898", "0.6168747", "0.6164742", "0.61451507", ...
0.7598287
0
end time from utc
@Override public void onClick(View v) { drive.endTime = System.currentTimeMillis(); //these are static.... drive.totalTime = drive.endTime - drive.startTime; //set instance final lat long to static current lat long drive.finLong = Drive.curLong; drive.finLat = Drive.curLat; System.out.println("You have ended your drive at" + drive.finLat + " | " + drive.finLong); Toast.makeText(getApplicationContext(),"Ending drive",Toast.LENGTH_SHORT).show(); startActivity(new Intent(CurrentDrive.this, DriveEnded.class)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LocalTime getEnd() {\n\treturn end;\n }", "int getEndTime();", "int getEndTime();", "int getEndTime();", "java.util.Calendar getEndTime();", "public long getEnd_time() {\n return end_time;\n }", "public abstract Date getEndTime();", "public LocalTime getEndTime () {\n\t\treturn Da...
[ "0.6827856", "0.6758575", "0.6758575", "0.6758575", "0.6703948", "0.67014396", "0.66770273", "0.6664607", "0.66588295", "0.66111124", "0.66111124", "0.65624404", "0.6561953", "0.6532757", "0.64781976", "0.64780766", "0.6472697", "0.64726865", "0.6465597", "0.64611846", "0.646...
0.0
-1
LOCATION INFO ADAPTED FROM // / This functions propmts user to allow for gps THIS IS NEED TO START THE REQUEST IN CONFIGLOC()
private void gpsRequest(){ new AlertDialog.Builder(this) .setTitle("Enable GPS") .setMessage("Would you like to allow location tracking?") .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { //yes configLoc(); Toast.makeText(getApplicationContext(),"Location tracking is enabled",Toast.LENGTH_SHORT).show(); } }) .setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { //no Toast.makeText(getApplicationContext(),"Location Tracking has been disabled",Toast.LENGTH_SHORT).show(); } }) .setIcon(android.R.drawable.ic_dialog_alert) .show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void configLoc(){\n System.out.println(\"Configuring location\");\n\n // first check for permissions\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) !=\n PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this,\n ...
[ "0.7541306", "0.73979753", "0.71591675", "0.7154587", "0.70012677", "0.69299495", "0.6904219", "0.686761", "0.67851293", "0.6757525", "0.674305", "0.67262983", "0.67246675", "0.67233324", "0.6713415", "0.6695457", "0.66828024", "0.6675027", "0.6669233", "0.66557187", "0.66516...
0.69762534
5
/ Checks the manifest to make sure the user has okay'd the use of gps if not the user will be prompted to make that change then the location manager will fire the request location updates without the call to request location updates location will not be updated
private void configLoc(){ System.out.println("Configuring location"); // first check for permissions if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { requestPermissions(new String[]{Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.INTERNET} , 10); } return; } locationManager.requestLocationUpdates("gps",5000,0,locationListener); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void startLocationUpdates() {\r\n // Begin by checking if the device has the necessary location settings.\r\n mSettingsClient.checkLocationSettings(mLocationSettingsRequest)\r\n .addOnSuccessListener(this, new OnSuccessListener<LocationSettingsResponse>() {\r\n ...
[ "0.7519998", "0.74018526", "0.72357976", "0.723499", "0.7199264", "0.71800005", "0.7082832", "0.70771635", "0.70597196", "0.7043927", "0.70342475", "0.70255166", "0.70251536", "0.70130736", "0.7007315", "0.70065194", "0.7004273", "0.69906867", "0.69823915", "0.69575554", "0.6...
0.68461263
35
foce loop to keep led on is a bad idea camera.autoFocus(this);
@Override public void onAutoFocus(boolean success, Camera camera) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onAutoFocus(boolean success, Camera camera);", "private void toggle_focus() {\n\t\ttry {\n\t\t\tif (!lock_autofocus) {\n\t\t\t\t//getCameraManager().requestAutoFocus(handler, R.id.auto_focus);\n\t\t\t\t\n\t\t\t\tlockAutoFocus.setBackgroundResource(R.drawable.eye_selected);\n\t\t\t} else {\n\t\t\t\tlockAutoF...
[ "0.7650929", "0.7282268", "0.71315914", "0.71311474", "0.7052302", "0.68718", "0.68255156", "0.66924065", "0.66756505", "0.66008836", "0.6599808", "0.6565738", "0.6547142", "0.65461916", "0.6538168", "0.6536638", "0.6533705", "0.6505125", "0.6501317", "0.64608777", "0.6412851...
0.7529595
1
start() Stop the image streamer. The camera will be released during the execution of stop() or shortly after it returns. stop() should be called on the main thread.
public void stop() { synchronized (mLock) { //if (!mRunning) //{ // throw new IllegalStateException("CameraStreamer is already stopped"); //} // if Log.d(TAG, "Stop"); mRunning = false; if (mMJpegHttpStreamer != null) { mMJpegHttpStreamer.stop(); mMJpegHttpStreamer = null; } // if if (mCamera != null) { mCamera.release(); mCamera = null; } // if } // synchronized mLooper.quit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void destroy(){\n Log.d(TAG, \"onDestroy called\");\n runRunnable = false;\n if (mCamera != null) {\n mCamera.stopPreview();\n mCamera.release();\n mCamera = null;\n }\n isPaused = true;\n // TODO stop exe...
[ "0.7317458", "0.704319", "0.7014709", "0.6782997", "0.67785084", "0.6716107", "0.6697385", "0.6679958", "0.66641647", "0.6656565", "0.6603043", "0.65809166", "0.6559791", "0.65166956", "0.6506497", "0.6501727", "0.64810073", "0.6379523", "0.6379523", "0.62718016", "0.62433493...
0.80526507
0
sendPreviewFrame(byte[], camera, long) Thank you, ApiDemos :)
private Camera.Size getOptimalPreviewSize(List<Camera.Size> sizes, int w, int h) { final double ASPECT_TOLERANCE = 0.05; double targetRatio = (double) w / h; if (sizes == null) return null; Camera.Size optimalSize = null; double minDiff = Double.MAX_VALUE; int targetHeight = h; // Try to find an size match aspect ratio and size for (Camera.Size size : sizes) { double ratio = (double) size.width / size.height; if (Math.abs(ratio - targetRatio) > ASPECT_TOLERANCE) continue; if (Math.abs(size.height - targetHeight) < minDiff) { optimalSize = size; minDiff = Math.abs(size.height - targetHeight); } } // Cannot find the one match the aspect ratio, ignore the requirement if (optimalSize == null) { minDiff = Double.MAX_VALUE; for (Camera.Size size : sizes) { if (Math.abs(size.height - targetHeight) < minDiff) { optimalSize = size; minDiff = Math.abs(size.height - targetHeight); } } } return optimalSize; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onPreviewFrame(byte[] data, Camera camera);", "@Override\n\tpublic void onPreviewFrame(byte[] bytes, Camera camera) {\n\n\t}", "@Override\r\n\tpublic void onPreviewFrame(byte[] data, Camera camera) {\r\n\t\tif (camera == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (data == null) {\r\n\t\t\treturn;\r\n\t\t...
[ "0.8511629", "0.8054202", "0.7405713", "0.7379435", "0.7329217", "0.72953725", "0.71791726", "0.7139684", "0.7103969", "0.7094602", "0.6992523", "0.680396", "0.67932326", "0.67156076", "0.67072415", "0.66719234", "0.66351366", "0.6615612", "0.6532058", "0.64890087", "0.643137...
0.0
-1
Created by J on 05/02/2017.
public interface ComicService { @GET("/v1/public/characters/{characterId}/comics") Call<ResponseBody> getComics(@Path("characterId") int characterId, @Query("offset") int offset, @Query("limit") int limit, @Query("ts") long ts, @Query("apikey") String apikey, @Query("hash") String hash); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n public...
[ "0.59584874", "0.5853115", "0.5824897", "0.5822332", "0.58007634", "0.5781821", "0.5762445", "0.5745335", "0.5745335", "0.5723344", "0.56633186", "0.5591055", "0.55867755", "0.5585921", "0.558377", "0.55739", "0.5573458", "0.55652976", "0.55635095", "0.5555431", "0.55483097",...
0.0
-1
TODO Autogenerated method stub
@Override public boolean retry(ITestResult result) { if (!result.isSuccess()) { //Check if test not succeed if (count < maxTry) { //Check if maxtry count is reached count++; //Increase the maxTry count by 1 System.out.println("is this working?"); result.setStatus(ITestResult.FAILURE); //Mark test as failed return true; //Tells TestNG to re-run the test } else { result.setStatus(ITestResult.FAILURE); //If maxCount reached,test marked as failed } } else { result.setStatus(ITestResult.SUCCESS); //If test passes, TestNG marks it as passed } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void attributeAdded(ServletRequestAttributeEvent event) { name=event.getName(); value=event.getValue(); System.out.println(event.getServletRequest()+"范围内添加了名为"+name+",值为"+value+"的属性!"); }
{ "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
Converts an Association to a Constraint in order to allow associations in a profile definition
public static void configureOCL(ResourceSet rset) { Environment.Registry reg = Environment.Registry.INSTANCE; // register prototype environments EcoreEnvironment ecoreEnv = (EcoreEnvironment) EcoreEnvironmentFactory.INSTANCE.createEnvironment(); reg.registerEnvironment(ecoreEnv); UMLEnvironment umlEnv = new UMLEnvironmentFactory(rset).createEnvironment(); reg.registerEnvironment(umlEnv); // register their standard library packages ecoreEnv.getOCLStandardLibrary(); umlEnv.getOCLStandardLibrary(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkForAssociationConstraint()\n {\n try\n {\n String methodName = String.format(\"%sOptions\", name());\n _associationConstraint = _parent.getJavaClass().getMethod(methodName);\n }\n catch (NoSuchMethodException e)\n {\n // ignore\n }\n }", ...
[ "0.5510775", "0.52924275", "0.5094809", "0.48270616", "0.48160917", "0.48160917", "0.47952688", "0.47342783", "0.4672238", "0.46582177", "0.46023276", "0.45803928", "0.4576436", "0.4559461", "0.45512438", "0.44969672", "0.4488147", "0.44822723", "0.44542292", "0.44443333", "0...
0.0
-1
Changing from familiar A (with stillsuit) to familiar B when familiar C is our desired stillsuit familiar
@Test void respectsStillSuitFamiliar() { setupFakeClient(); var cleanups = new Cleanups( withFamiliar(FamiliarPool.GROUPIE), withEquipped(EquipmentManager.FAMILIAR, ItemPool.STILLSUIT), withFamiliarInTerrarium(FamiliarPool.BOWLET), withFamiliarInTerrarium(FamiliarPool.GREY_GOOSE), withProperty("stillsuitFamiliar", "Bowlet")); try (cleanups) { var newFamiliar = FamiliarData.registerFamiliar(FamiliarPool.GREY_GOOSE, 0); var req = new FamiliarRequest(newFamiliar); req.responseText = "You take"; req.processResults(); var requests = getRequests(); assertThat(requests, hasSize(2)); assertPostRequest( requests.get(0), "/familiar.php", "famid=" + FamiliarPool.GROUPIE + "&action=unequip&ajax=1"); assertPostRequest( requests.get(1), "/familiar.php", "action=equip&whichfam=" + FamiliarPool.BOWLET + "&whichitem=10932&ajax=1"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void accusation() {\n\t\tNotebook notebook = turnController.getData().getCurrentTurn()\n\t\t\t\t.getPlayer().getNotebook();\n\t\tCard room = notebook.getViableCards(Card.Type.ROOM).get(0);\n\t\tCard suspect = notebook.getViableCards(Card.Type.SUSPECT).get(0);\n\t\tCard weapon = notebook.getViableCards(Card....
[ "0.5860045", "0.5730745", "0.57154375", "0.5650022", "0.56114304", "0.5558672", "0.55351967", "0.5527559", "0.5513566", "0.55078954", "0.5432807", "0.5419631", "0.5400201", "0.5394032", "0.53804576", "0.53663546", "0.5360106", "0.5333999", "0.5309072", "0.52965206", "0.527535...
0.0
-1
Deque does not override equals, so Deque.equals is the identity of objects We need our own method to test deque eqality.
private static <T> boolean equalsDeque(Deque<T> queue1, Deque<T> queue2) { if (queue1.size() != queue2.size()) { return false; } List<T> copy1 = new ArrayList<>(queue1); List<T> copy2 = new ArrayList<>(queue2); return copy1.equals(copy2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean equals(Object object){\n \tif(object == this) return true;\n \tif(!(object instanceof AbstractQueue)) return false;\n \tAbstractQueue abstractQueue = (AbstractQueue) object;\n \tif(abstractQueue.size() != size()) return false;\n \treturn containsAll(abstractQueue);\n }", "@Overri...
[ "0.66431177", "0.63871366", "0.63044304", "0.62926054", "0.61687857", "0.60807186", "0.6008893", "0.5922882", "0.58910847", "0.58389884", "0.57949954", "0.579114", "0.57563424", "0.57542866", "0.5729672", "0.57076865", "0.57014817", "0.5697773", "0.56972295", "0.5683269", "0....
0.80383456
0
Problem 67: Maximum path sum II By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bottom is 23. 3 7 4 2 4 6 8 5 9 3 That is, 3 + 7 + 4 + 9 = 23. Find the maximum total from top to bottom in p067_triangle.txt, a 15K text file containing a triangle with onehundred rows. NOTE: This is a much more difficult version of Problem 18. See also .
@Test public void shouldSolveProblem67() { assertThat(Euler67Test.solve("small_triangle.txt")).isEqualTo(23); assertThat(Euler67Test.solve("p067_triangle.txt")).isEqualTo(7273); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int maxPathSum(int tri[][], int m, int n)\n {\n // loop for bottom-up calculation\n //i是row,j是column\n for (int i = m - 1; i >= 0; i--)\n {\n for (int j = 0; j <= i; j++)\n {\n // for each element, check both\n // elements just belo...
[ "0.7146464", "0.63628376", "0.6349485", "0.6343041", "0.62747794", "0.6235742", "0.6235154", "0.62337357", "0.61999625", "0.61959076", "0.6134079", "0.6121248", "0.6098351", "0.6087609", "0.60826945", "0.60807586", "0.60788846", "0.605662", "0.6027758", "0.6009006", "0.599881...
0.0
-1
region ========== robot callback ==========
@Override public void onReceive() { //下班充电状态 boolean isRobotWorking = RobotManager.getInstance().isRobotWorking(); int robotStatus = RobotManager.getInstance().getRobotStatus(); boolean isCancellingCharge = RobotManager.getInstance().getIsCancellingCharge(); boolean isGoing2Charge = RobotManager.getInstance().getIsGoing2Charge(); int chargeState = RobotManager.getInstance().getChargeState(); if (robotStatus == 4) { if (isRobotWorking) { translateAnimator.start(); return; } } if (!isRobotWorking && robotStatus != 4 && !isCancellingCharge) { if (chargeState == 0) { translateAnimator.cancel(); choseImage(4); return; } } if (robotStatus != 2 && RobotManager.getInstance().battery.get() != -1 && RobotManager.getInstance().battery.get() <= ConstantValue.batteryThreshold && chargeState == 0) { translateAnimator.cancel(); choseImage(4); return; } else if ((robotStatus == 2) && isRobotWorking && RobotManager.getInstance().battery.get() >= ConstantValue.batteryCeil) { //充电完成开始巡游 //上班时间 LogcatHelper.logd(StatisticsConstant.STARTMOVE, "", StatisticsConstant.WORKENDCHARGE); RobotManager.getInstance().setRobotStatus(0); translateAnimator.start(); return; } else if (robotStatus == 2 && chargeState == 0) { RobotManager.getInstance().setRobotStatus(2); translateAnimator.cancel(); choseImage(4); return; } else if (robotStatus == 3 && chargeState == 0) { translateAnimator.cancel(); choseImage(4); return; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void execute(Robot robot) {\n\t}", "@Override\n public void robotInit() {\n }", "@Override\n public void robotInit() {\n }", "@Override\n public void robotInit() {\n }", "public abstract void interagir (Robot robot);", "public void robotInit() {\n\n }", "public void robotIn...
[ "0.7460076", "0.7417423", "0.7417423", "0.7417423", "0.72715765", "0.72258985", "0.72258985", "0.71378434", "0.6962099", "0.6725089", "0.6725089", "0.6725089", "0.6725089", "0.6725089", "0.6725089", "0.66741955", "0.66063243", "0.65926605", "0.65926605", "0.65541226", "0.6461...
0.0
-1
Construtor de UsuarioAcaoUsuarioHelp que recebe um usuario e um usuario acao
public UsuarioAcaoUsuarioHelper(Usuario usuario, UsuarioAcao usuarioAcao) { this.usuario = usuario; this.usuarioAcao = usuarioAcao; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Usuario(String usuario, String contrasena) {\n \tthis.usuario = usuario;\n \tthis.contrasena = contrasena;\n }", "public void altaUsuario();", "public Usuario(String nickUsuario, String nombreUsuario, String correoUsuario) {\r\n this.nickUsuario = nickUsuario;\r\n this.nombreUsuar...
[ "0.6968886", "0.6896569", "0.6784948", "0.677561", "0.6701073", "0.6627332", "0.6582686", "0.6574203", "0.64368755", "0.64225245", "0.6414877", "0.6387678", "0.6379391", "0.6379391", "0.63732386", "0.63732386", "0.63485116", "0.63485116", "0.63408285", "0.6335758", "0.6330485...
0.7219739
0
TODO: place custom component creation code here
private void createUIComponents() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Component createComponent();", "Component createComponent();", "@Override\n public void initComponent() {\n }", "@Override\n public void initComponent() {\n }", "Component getComponent() {\n/* 224 */ return this.component;\n/* */ }", "@Override\r\n public void initComponent() {\n...
[ "0.748043", "0.748043", "0.710925", "0.710925", "0.70801723", "0.70445067", "0.69780385", "0.6929074", "0.69076335", "0.6886755", "0.67288405", "0.65718913", "0.65718913", "0.65703416", "0.65284145", "0.65241957", "0.6444727", "0.643084", "0.643084", "0.643084", "0.643084", ...
0.69689584
21
Part of ExtraGeometricShape API
public interface GeometricShape { double area(); double perimeter(); void drawShape(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void getShape() {\n\n\t}", "public String whatShape();", "Shape getShape();", "public Shape getShape();", "public Shape getShape() { return shape; }", "public int getMyShape(){ return myShape;}", "public abstract int[] getShape();", "ShapeType getShapeType();", "Shape newShape(G...
[ "0.7153197", "0.71498644", "0.7118603", "0.709525", "0.6991791", "0.6625716", "0.66196024", "0.6613871", "0.6566468", "0.655689", "0.6549852", "0.65216774", "0.6513352", "0.6511739", "0.65091795", "0.64738697", "0.6443819", "0.6394517", "0.6389456", "0.6384129", "0.6379634", ...
0.66971606
5
fill the form for selected Dispatch table row
public void fillTextFieldValues(DispatchVO dispatchVO) { try { billingName.setText(dispatchVO.getBillingName()); companyName.setText(dispatchVO.getCompanyName()); ((TextField)calendar2.getChildren().get(0)).setText(dispatchVO.getDispatchDate()); ((TextField)calendar.getChildren().get(0)).setText(dispatchVO.getInvoiceDate()); FreightAmount.setText(String.valueOf(dispatchVO.getFreightAmount())); numberOfItems.setText(String.valueOf(dispatchVO.getNoOfItems())); Freightmode.setText(dispatchVO.getFreightMode()); invoiceNo.setText(dispatchVO.getInvoiceNo()); shippingTo.setText(dispatchVO.getShippingTo()); trackingNo.setText(dispatchVO.getTrackingNo()); transporter.setText(dispatchVO.getTransporter()); receiver.setText(dispatchVO.getCustomerEmail()); ProductDispatchModifyController.this.dispatchVO=dispatchVO; emailDetails = dispatchDAO.getDispatchOptionDefaultValues(); body.setText(emailDetails.get(CommonConstants.KEY_DISPATCH_MESSAGE)); } catch (Exception e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void populateForm(Appointment row){\n selectedRow = row;\n idText.setText(Integer.toString(row.getId()));\n titleText.setText(row.getTitle());\n descriptionText.setText(row.getDescription());\n for(Location item : locationCombo.getItems()){\n if(item.getCity_sta...
[ "0.7247318", "0.65746385", "0.64743716", "0.64085245", "0.6406176", "0.6371497", "0.6370284", "0.63110644", "0.6310701", "0.6298929", "0.62855524", "0.6250644", "0.62362814", "0.6162334", "0.6159715", "0.6157286", "0.61442995", "0.61153996", "0.60926914", "0.6088303", "0.6075...
0.0
-1
update the product dispatch Entry
public void updateDispatch() { try { DispatchVO dispatchVO = new DispatchVO(); dispatchVO.setBillingName(billingName.getText()); dispatchVO.setCompanyName(companyName.getText()); dispatchVO.setDispatchDate(((TextField)calendar2.getChildren().get(0)).getText()); dispatchVO.setInvoiceDate(((TextField)calendar.getChildren().get(0)).getText()); dispatchVO.setFreightAmount(Double.parseDouble(FreightAmount.getText())); dispatchVO.setNoOfItems(Integer.parseInt(numberOfItems.getText())); dispatchVO.setFreightMode(Freightmode.getText()); dispatchVO.setInvoiceNo(invoiceNo.getText()); dispatchVO.setShippingTo(shippingTo.getText()); dispatchVO.setTrackingNo(trackingNo.getText()); dispatchVO.setTransporter(transporter.getText()); dispatchVO.setId(ProductDispatchModifyController.this.dispatchVO.getId()); dispatchDAO.updateDispatch(dispatchVO); message.setText(CommonConstants.DISPATCH_UPDATE); message.getStyleClass().remove("failure"); message.getStyleClass().add("success"); message.setVisible(true); } catch (Exception e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void update(Product product) {\n\n\t}", "@Override\n\tpublic void update(ExportProduct exportProduct) {\n\t\t\n\t}", "@Override\n public void updateProductCounter() {\n\n }", "public UpdateProduct() {\n\t\tsuper();\t\t\n\t}", "Product updateProductInStore(Product product);", "@Override\n ...
[ "0.65198606", "0.63947153", "0.63925314", "0.6091512", "0.606209", "0.6053426", "0.60054564", "0.59571254", "0.5941203", "0.59186417", "0.5910952", "0.5839801", "0.5826946", "0.5818009", "0.57598037", "0.57594985", "0.57443315", "0.5731345", "0.5730667", "0.5721329", "0.57005...
0.7241309
0
Prevents other classes from declaring new Elevator()
public static Elevator getInstance() { return instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Elevator() {\n\t\t\n \tsuper(\"Elevator\", RobotConstants.ELEVATOR_P, RobotConstants.ELEVATOR_I, RobotConstants.ELEVATOR_D);\n \t\t\n\t\t// TODO Auto-generated constructor stub\n\t}", "Elevator() {\n _currentFloor = Floor.FIRST;\n _passengersOnboard = 0;\n _directionOfTravel = D...
[ "0.7113158", "0.6979307", "0.6836662", "0.66299915", "0.6477612", "0.6283978", "0.62791157", "0.6277008", "0.62382966", "0.62228113", "0.61681515", "0.61362916", "0.60709107", "0.59309167", "0.59078115", "0.58487433", "0.5804337", "0.57463384", "0.5688458", "0.56149286", "0.5...
0.61818635
10
double angle = 41(voltage 2.5) + 21.9;
public void raise(){ elevatorTalon1.set(basePWM); elevatorTalon2.set(basePWM * pwmModifier); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double getAngle();", "double getAngle();", "public double getAngle();", "public double getAngle() { return angle; }", "public void setAngle( double a ) { angle = a; }", "Angle createAngle();", "public double getAngle()\n {\n return (AngleAverage);\n }", "public float getXAngle(){\n ...
[ "0.76924956", "0.76924956", "0.75361204", "0.72229415", "0.7133982", "0.70445997", "0.6908647", "0.6899063", "0.68352973", "0.67860734", "0.6756129", "0.67514956", "0.67514956", "0.6742802", "0.67391866", "0.67205966", "0.66889113", "0.668849", "0.6686682", "0.6678265", "0.66...
0.0
-1
need to evaluate buffer(arraysize)
public void createDataSet(){ final Thread thread = new Thread(new Runnable() { public void run(){ while(true){//we want this running always, it is ok running while robot is disabled. whileCount++; currentVoltage = angleMeter.getVoltage(); //gets the non-average voltage of the sensor runningTotalVoltage[currentIndex] = currentVoltage;//store the new data point currentIndex = (currentIndex + 1) % arraySize;//currentIndex is the index to be changed if (bufferCount < arraySize) { bufferCount++;//checks to see if the array is full of data points } } } }); thread.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract int getNextBufferSize(E[] paramArrayOfE);", "int getBufferSize();", "long arrayLength();", "public int size() { return buffer.length; }", "byte [] getBuffer ();", "public abstract int sizeOf(byte[] array, int offset, int length);", "public int getBufferSize() {\n return count;\n ...
[ "0.7119176", "0.6966537", "0.67025083", "0.6649932", "0.6311945", "0.6138498", "0.61368746", "0.606775", "0.6045907", "0.6017483", "0.5959112", "0.5959112", "0.5942242", "0.590583", "0.5897187", "0.58950627", "0.5860655", "0.5851561", "0.5843976", "0.58295053", "0.5828415", ...
0.0
-1
at the moment elevatorTarget is a voltage, TODO: make some sort of conversion from voltage to angle
public void goToAngle(){ currentAngle = getAverageVoltage2(); if (Math.abs(elevationTarget - currentAngle) <= .1){//TODO: check angle off(); // System.out.println("off"); } else if (elevationTarget > currentAngle && elevationTarget < maxLimit){ raise(); //System.out.println("raise"); } else if (elevationTarget < currentAngle && elevationTarget > minLimit){ //System.out.println("lower"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public float getMotor_ang_target_velocity() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readFloat(__io__address + 132);\n\t\t} else {\n\t\t\treturn __io__block.readFloat(__io__address + 124);\n\t\t}\n\t}", "public double getAngleToTarget(){\n return 0d;\n }", "pub...
[ "0.6090433", "0.60391736", "0.6011782", "0.59853214", "0.59464693", "0.59402347", "0.5883112", "0.5776017", "0.5770762", "0.5676026", "0.55945", "0.54980415", "0.54864514", "0.5450998", "0.5432336", "0.5399394", "0.5397244", "0.5394043", "0.53805083", "0.5377813", "0.53753096...
0.66960365
0
NOW uses StringPot.getVoltage to read voltage to move elevator, changes marked below
public void goTo(final double target){ final Thread thread = new Thread(new Runnable() { public void run(){ goToFlag = false; currentAngle = stringPot.getVoltage(); //change happened here shootTarget = target; while(target > currentAngle && target < maxLimit && currentAngle < maxLimit && canRun && elevateFlag){ currentAngle = stringPot.getVoltage();//change happened here System.out.println("raise " + target); raise(); if(target < currentAngle){ elevateFlag = false; break; } } while(target < currentAngle && target > minLimit && currentAngle > minLimit && canRun && elevateFlag){ currentAngle = stringPot.getVoltage();//change happened here System.out.println("lower " + target); lower(); if(target > currentAngle){ elevateFlag = false; break; } } //System.out.println("off"); off(); } }); thread.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getVoltage ()\n {\n return _voltage;\n }", "int getInputVoltageRaw();", "private static float getVoltage(String id) throws IOException, InterruptedException, NumberFormatException {\n return pi4jSystemInfoConnector.getVoltage(id);\r\n\r\n }", "EDataType getVoltage();", "int...
[ "0.62110615", "0.6157675", "0.6144578", "0.6116419", "0.6108388", "0.6083458", "0.59643775", "0.59516025", "0.58610225", "0.5853645", "0.5801797", "0.57941157", "0.5786057", "0.5771829", "0.5746114", "0.5696335", "0.56524754", "0.56392545", "0.5624028", "0.5602416", "0.554844...
0.6051373
6
Get a Single universite
@GetMapping("/get/{id}") public universites getUniversiteById(@PathVariable Long id) { return IF.getId(id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Univers get(){\n if (instance == null)\n {\n instance = new Univers();\n }\n return instance;\n }", "Uom getUom();", "public Unite obtenirUnite(String unite) {\n\t\t\tUnite resultat = null;\n\t\t\t\n\t\t\tswitch (unite) {\n\t\t\tcase \"heure\":\n\t\t\t\tr...
[ "0.6575715", "0.6428483", "0.6190924", "0.60813797", "0.59892666", "0.5971465", "0.58886826", "0.58730793", "0.5864574", "0.5810155", "0.5747685", "0.57326275", "0.5720502", "0.5712698", "0.5711781", "0.57073236", "0.5666577", "0.5658766", "0.5601346", "0.55816233", "0.558081...
0.581925
9
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof Sucessor)) { return false; } Sucessor other = (Sucessor) object; if ((this.idsucessor == null && other.idsucessor != null) || (this.idsucessor != null && !this.idsucessor.equals(other.idsucessor))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void se...
[ "0.6896886", "0.6838461", "0.67056817", "0.66419715", "0.66419715", "0.6592331", "0.6579151", "0.6579151", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.65624106", "0.65624106", "0.65441847", "0.65243006", "0.65154546", "0.6487427", "0.64778...
0.0
-1
Created by PC on 2017/6/19.
public interface BlogService { List<Blog> queryRecentBlogs(); Map<String,Object> queryBlogs(final String blogType,final String title,String pageStr,String limitStr); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "public final void mo51373a() {\n }", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic vo...
[ "0.61050093", "0.60063565", "0.5844682", "0.5805753", "0.57926714", "0.57793975", "0.57273006", "0.57273006", "0.57096153", "0.5681316", "0.56770754", "0.5666835", "0.5651114", "0.5643596", "0.56272364", "0.5619586", "0.56175923", "0.56138885", "0.5603158", "0.560202", "0.559...
0.0
-1