Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Launch Java process programmatically in Java

In some cases while working on some automation testcase, developers would like to launch Java process programmatically so that the tests can be ran without manual intervention. Java provides such methods to achieve this.ProcessBuilder can be used to build a Java process which can be launched when everything is ready. Basically it can take a list of parameters which are similar to the command line options/arguments. For example, if you want to launch a Java process, you can do following.public final class JavaProcess { private String output = ""; private String javaHome = ""; public ...

8,265 0       JAVA COMMAND LINE PROCESSBUILDER


  Data as code

What is a good command line parser API? A good command line parser should consider below 5 aspects:Support convenient help information generationSupport sub commands, for example, git has push,pull,commit sub commands.Support single character option, word option, flag option and option with parameter.Support default option, for example, if no -port is set, set it as 5037Support usage model, for example, tar's -c and -x is mutually exclusive, they belong to different usage models.Here are some outstanding command line parse API.1. getopt()getopt() is the standard function of libc, we can f...

6,625 2       COMMAND LINE API


  Linux Command Line tips that every Linux user should know t

Below is the collection of Linux command line tips which I’ve found useful for Linux users. To get more information about the command mentioned below just open your terminal and type man <command>.Things a Linux user must learnLearn bash: No need to refer a lengthy bash guide or something else. Just read the complete man page of bash (man bash).Learn vim: You might be using Emacs or Eclipse for your work all the time but nothing can compete vim.Learn ssh: Learn the basics of passwordless authentication.Learn basics of bash job management: Using &, Ctrl-C, fg, bg, Ctrl-Z, jobs,...

9,056 0       TIPS COMMAND LINE LINUX UNIX


  Steps to connect to MySQL on Windows Command Line

To connect to MySQL database on Windows through Command line, there are some steps to be followed.1. You need to start the MySQL service, you can go to Start->Control Panel->System and Securities->Administrative Tools->Component Service->Services(local), then on the right panel, you can find one service name called MySQL and you should start this service2. Go the the MySQL installation folder, which is something like this : C:\Program Files\MySQL\MySQL Server 5.1. In this folder, find the bin folder.3. Open a command console and change the working directory to C:\Program Fi...

15,576 0       MYSQL COMMAND LINE CONNECTION WINDOW MYSQLD


  Run MySQL on Command Line in Windows

Sometimes if we want to run MySQL but we don't have phpMyAdmin installed. What should we do?On Windows we can run MySQL in following steps:Open Console Window->Type "mysqld -u root". This means we start the mysql server with username root. This program will handle all the communications between our console window and the actual data;After starting the server, we need to use a client to connect to the server and communicate with it. the mysql program is right for this. Next in the command console, we type "mysql -u root -p" to connect the server. By default, after the installation,the defaul...

8,131 0       WINDOWS MYSQL COMMAND LINE CONSOLE DEFAU


  socket_create() from command prompt with WAMP

Problem:I’m working on a wamp system, and have started playing around with sockets. I enabled sockets via the wamp interface:wamp : PHP settings : PHP extensions : php_socketsand could run my php file via my browser.When trying to run the same file via the command prompt (start : run : cmd), I got the following error:Fatal error: Call to undefined function socket_create() in … on line …Solution:The command prompt uses a different php.ini file to the apache server.The Apache php.ini file is accessible via the taskbar icon, and is located at:X:\WAMP INSTALL DIR\Apach...

6,385 0       PHP WAMP WINDOWS COMMAND LINE SOCKET


  Send email from Ubuntu command line

First install exim4 and exim4-config using the package manager then install mailxsudo apt-get install mailutilsand follow the promptsonce this is set up use the command “mail” to check your mail.if you would like to send mail type “mail” followed by the email address to mail it to egmail me@examplecomenter the subject and pressenter the body and keep pressing enter as many times as you need to, when your body is finished, press “Ctrl” and “D" together this will prompt you for a cc etc and finally the mail will be sent.If you want to setup mail client, ...

5,084 0       EMAIL UBUNTU COMMAND LINE MAILUTILS