Posts

electron pacakger giving error 'System.AggregateException: One or more errors occurred

Hey guys! Can anyone suggest me to solve this problem during building installer package for windows in node.js with electron framework.As I show error below. Well, sometimes you are not so lucky: Failed with exit code: 4294967295 Output: System.AggregateException: One or more errors occurred. ---> System.ComponentModel.Win32Exception: The specified executable is not a valid application for this OS platform. at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) at Squirrel.Utility. d__11.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.Utility. d__23.MoveNext() --- End of inner exception stack trace --- a

how to run node js file

Image
Hey Friends! How are you ? I think you all are fine if not then I pray to God for your good health and happy life.I got a lot of mail from readers about nodejs. So I have decided to prepare couple of post to clear basic concepts of node.js and I have prepared few posts and I promised you that from these posts you can be able to clear your basic concepts. Now, at first we set up our system so that it can be able to run node js file. You are not launching rocket just running a node js file. Don't worry because you are not launching rocket in which you have to consider a lot of parameters.Your problem is just to run  node js file. Sharp your axe. Once Abraham Lincoln had said "Give me six hours to chop down a tree and I will spend the first four sharpening the axe." So before run node js file at first we have to prepare system so that it can be able to run node js file. for this purpose  at first consider we have to consider about node js setup. n

Java Web Scraping

Image
Today I introduced you from a new word i.e. Web scraping this word is used for extracting data from a website for some purpose. In this technique we extract large amount data from website and store inside our local file or we can also store these data inside our database for personal use .Now this technique is widely used all around the world because in the age of Information data is every thing.As much amount of you have as much power you have.Most of programming languages contains package for Web Scraping such in python we used BeautifulSoup.  BeautifulSoup is a fantastic tool of python for web Scraping. I don't know much about python and I am good in java so, here I am discussing here  how we can scarp data from website using concepts of Java? Now, we are presenting a little package for Java web Scarping. Jsoup is an open source Java HTML parser. Jsoup is an open source HTML parser which is used for scraping in Java.It uses DOM,CSS and Jquery-like methods for extra

Java Variable Types

Image
Variables are name of reserved memory location inside Program.  Based on Position of Declaration and behavior all Variables are divided into three categories. Local Variable Instance Variable Static Variable                                                                               Local Variable : Variable that is declared inside method is called Local Variable. Instance Variable : If a variable value varied from object to object then such type of variable are called Instance Variable. In case of Instance Variable a separate copy of instance variable is created. Where we have to declare Instance Variable ?  Instance Variable should be declared within class directly, but outside of any method or block or constructor. Note: As we discussed previously variable declared inside any method or block or constructor as known as Local Variable. class InstanceVariable{ int x=10; public static void main(String a[]){ } } When Instance Variable wi

Subsequence Equality

Image
Hey guys, This problem I have taken from www.codechef.com to speed up our coding practice skills and now regularly add a new problem with its solution to clear our Java concept and sharp our logical skills. Problem :  Chef Tobby is playing a rapid fire with Bhuvan. He gives Bhuvan a string  S  and each time, Bhuvan has to guess whether there exists  2  equal  subsequences  in the string or not. Bhuvan got a perfect score in the game with Chef Tobby. However, Chef Tobby has now asked Bhuvan to write a program that will do this automatically given a string  S . Bhuvan is an intelligent man but he does not know how to write a code. Can you help him? Find two different subsequences such that they are equal in their value, more formally, find two sequences of indices (a 1 , a 2 , ..., a k-1 , a k ) and (b 1 , b 2 , ..., b k-1 , b k ) such that: 1≤ a i , b i  ≤ |S| a i  < a i+1  for all valid i b i  < b i+1  for all valid i S a i  = S b i  for all valid i there exist

Secure Database Connectivity in node.js with mysql

Image
Hi Everyone! Yesterday my friend Andrea from Italy asked me a question about secure Database connectivity in node.js with mysql i.e. he wants to a secure database connection in node.js for some secure keys like username,password,database name that we use during database connectivity.His problem is obviously right from security point of view as we know that JavaScript is client side scripting knowledge so it is compiled on client side so after inspecting page some one can be able to view these secure keys which I discussed previously. I surf internet and found there are various ways to solve this problem I am not discussing all of them here but also I discussing here two of them and after this discussion I think Andrea and other reader who are facing with same problem can be able to resolve their problem. I choose two ways to solve this problem. Connection code in app.js file Create a Json file Connection code in app.js file : Javascript is client side language and code i

node.js web server module

Image
What is web server ? Web servers can refer to hardware or software or both of them working together. Web servers are computers that are usually setup in facilities called Data Centers and operated by hosting companies.The files stored on web servers are read by browsers.Browsers communicates with web servers to bring you information from internet. Purpose of Web server Store website so that people can visit them on internet. It serves file as per request. It can send same or different file to one or more than one user at the same time. Today I am discussing a small node.js application probably you are familiar with this example but it is mandatory to create a base.During this example I will discuss about starting a web server using node js.In node js one thing is very interesting that you need not install any other setup like Apache Tomcat or any other for node js application.You can run your application with node js setup that you have already install during your first