execute goal org.apache.maven.plugins:maven

Uncategorized
Question: I have trying a lot to build a code using maven. But I am stuck with an error. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project googleplaycrawler: Compilation failure -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project googleplaycrawler: Compilation failure at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) Answer: you need to add maven-compiler-plugin into your pom.xml. you can find the plugin code below: org.apache.maven.plugins maven-compiler-plugin 3.5.1 1.8 1.8 you can change source and target in configuration tag with your current java version. Read more
Read More

How can I get query string values in JavaScript?

Uncategorized
Question: Is there a plugin-less way of retrieving query string values via jQuery (or without)? If so, how? If not, is there a plugin which can do so? Answer: Some of the solutions posted here are inefficient. Repeating the regular expression search every time the script needs to access a parameter is completely unnecessary, one single function to split up the parameters into an associative-array style object is enough. If you're not working with the HTML 5 History API, this is only necessary once per page load. The other suggestions here also fail to decode the URL correctly. var urlParams; (window.onpopstate = function () { var match, pl = /+/g, // Regex for replacing addition symbol with a space search = /([^&=]+)=?([^&]*)/g, decode = function (s) { return decodeURIComponent(s.replace(pl, "…
Read More

Convert SVG or Base30 to image file

vb.net
Question: I'm trying to convert an SVG file to any format of image file. I'm creating SVG file from base30 value. Public Sub SaveSignature() Dim B30 As New Base30Converter Dim Img = B30.GetData("aQ4895d6d7j5h94840Z39baa6bfb6430Y4538d6a49c59db8863003240Z4374b7ek7j4a33Y255e8j5d6Z52Y3b2428385e9n1vd1Bfq6a4Z4Y3949456Z1e91wi2B2N1u2Eh1H9bY5j81ye1w1u8e5724983329d8pe1Ai1Nf1V1Uft9d5_7WZ266594c4g7gc36452542000Y2648a67334524112100Z1235766Y64Z9ah593420Y75g7d483401000Z34Y133Z332Y7e29262300Z43a3652Y26252556400Z2ig6h2200473720Y2263542006736424241000Z826010") Dim svg = SVGConverter.ToSVG(Img) Dim sw As New System.IO.StreamWriter("D:Sign.svg", False) sw.Write(svg) sw.Close() Dim bmp As Bitmap = renderFile("D:Sign.svg") Dim g As Graphics g = Graphics.FromImage(bmp) Using g g.Clear(Color.White) g.DrawImageUnscaled(bmp, 0, 0) End Using bmp.Save("D:Sign.bmp", System.Drawing.Imaging.ImageFormat.Bmp) bmp.Save("D:Sign.jpg", System.Drawing.Imaging.ImageFormat.Jpeg) bmp.Save("D:Sign.emf", System.Drawing.Imaging.ImageFormat.Emf) End Sub Public Function renderFile(filename As String) As Bitmap Dim displaySize As System.Drawing.Size displaySize.Width = 300 displaySize.Height = 200 Dim svgDoc As SvgDocument = SvgDocument.Open(filename) Dim svgSize = svgDoc.GetDimensions() If svgSize.Width = 0 Then Throw New Exception("SVG does not have size specified. Cannot work with it.") End If Dim displayProportion = (displaySize.Height * 1.0F) / displaySize.Width Dim svgProportion…
Read More

Private network on AWS

Uncategorized
Question: I have a couple of AWS instances in different AWS regions which need to talk to each other. However, in an enterprise network, I am not supposed to open ports for communication. Is there a way to achieve this? Answer: You can setup VPN connections between your VPCs to communicate with each other. Read more
Read More

I want to implement a database using mongoDb mongoose driver for a MEAN stack application with validation from mongoose schema

Uncategorized
Question: I want to know how can I use mongoose schema with required attribute to make the different distinct attributes required to two different type of entities belonging to the same entity set. also i want to know is their a way to do this without population or referencing? broader explanation:- In my database which is school organisation has a strong entity name: members . In this entity i have some common fields for both student members and faculty members like name, age,attendance, unique id, type etc. Here the Type attribute describe that the member is faculty or student. Both the faculty members and students have some distinct attribute. for students:- marks (required attribute) for faculties:- payment (required attribute) I am not getting how to implement this using mongoose schema…
Read More

How to trigger cloudwatch events when there are scheduled maintenance on AWS?

Uncategorized
Question: Once in a while we receive notifications on the "Personal Health Dashboard", indicating that there are scheduled outage on some of our ec2 instances due to maintenance. There is a link on creating cloud watch events from that dashboard but,I'm not able to see any guide to do it. My goal is to enable email notification to several people whenever any maintenance is scheduled by aws. Is there a way to do this? Maybe I missed the docs detailing this, please let me know if such exists. Answer: Check the documentation for a guide: https://docs.aws.amazon.com/health/latest/ug/cloudwatch-events-health.html Read more
Read More

How to access the new FxmlLoader without creating

Uncategorized
Question: I create a X class and this class have a tableView and load datas at initialize method. I click a button to add new object and open new scene, when I try to save object and to show object in X class tableview I use controller:FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/fxml/TimeTableList.fxml")); fxmlLoader.load(); but I created a new FXMLLoader so the objects have been added twice. Because initialize called again. How can I solve this problem. I added method to clear tableview but I'm not sure is it true. public class TimeTableListController { private static ObservableList data = FXCollections.observableArrayList();; private TimeTable aTimeTable; public void initialize() throws SQLException { try { timeTableListTableView.getItems().clear(); addTimeTable(); }catch (SQLException e){ e.printStackTrace(); } } private void addTimeTable() throws SQLException{ try { List timeTableList = Main.dbManager.getTimeTables(); if(timeTableList.size() !=…
Read More

What is simplified in ECMAScript 5 date format compared to ISO 8601

Uncategorized
Question: ECMAScript defines a string interchange format for date-times based upon a simplification of the ISO 8601 Extended Format. The format is as follows: YYYY-MM-DDTHH:mm:ss.sssZ — https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.15 So what exactly is the difference between the two formats? What do I have to be careful about? I noticed that ISO 8601 states that the T can be substituted by a space. What else is "simplified"? To be very specific: This question is about the standard. Browser behavior is interesting, but not the main focus of this question. Answer: ISO 8601 is a standard for a whole range of time and date formats, including:Date Time of day Coordinated universal time (UTC) Local time with offset to UTC Date and time Time intervals Recurring time intervals The ECMA-262 specification (20.3.1.16 in the 2017…
Read More

How to keep value updated after button is pressed?

Uncategorized
Question: I have two view controllers, both with table views. Depending on which row you select in the first table view, the second table view cell's are filled with the subcategories of the min category you select in the initial table view. In the second table view there is also a button. I am trying to pass the value of the row selected in the first table view to the button in the table view cell of the second table view in order to use it in the future and to keep track of the row selected in the first table view. What would be the best way to implement this? Every time I click the button in the table view cell of the second table view I print(initialRow) but…
Read More