Read file path from commandline and displays information about file and directory

The following example console application takes a file path from a commandline argument and then displays information about the file and the containing directory. using System; using System.IO;   public class FileInform {   private static void Main(string[] args) {   if (args.Length == 0) {   Console.WriteLine("Please supply a file name."); return; }   […]
Continue reading…

Enjoyed this post? Share it!

 
 

Read commandline arguments in csharp

This example illustrates how to read commandline arguments in csharp(C#). using System;   namespace W3M { class ArgsExample { public static int Main(string[] args) { for (int i = 0; i < args.Length; i++) { Console.WriteLine(args[i]); } return 0; } } }
Continue reading…

Enjoyed this post? Share it!

 
 

Read commandline arguments in Java

/** * This program prints out all its command-line arguments. **/ public class EchoArgs { public static void main(String[] args) { int i = 0; // Initialize the loop variable while(i < args.length) { // Loop until the end of array System.out.print(args[i] + " "); // Print each argument out i++; // Increment the loop […]
Continue reading…

Enjoyed this post? Share it!

 
 

mysqlshow in MySql

mysqlshow is a command-line interface for end users to see information on tables and columns. The following commands are supported by mysqlshow: “mysqlshow” – Shows all the databases. “mysqlshow databaseName” – Shows all the tables in the specified database. “mysqlshow databaseName tableName” – Shows all the columns in the specified table. “mysqlshow –verbose” – Shows […]
Continue reading…

Enjoyed this post? Share it!

 
 

show all tables with mysql commandline interface

Running the non-SQL command “SHOW TABLES” at the “mysql” prompt will allow us to all the tables in a database.   >cd \mysql\bin >mysql -u root test Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 14 to server version: 5.0.24   mysql> SHOW TABLES; +—————-+ | Tables_in_w3mdb| […]
Continue reading…

Enjoyed this post? Share it!

 
 

MySql commandline interface

mysql is a command-line interface for end users to manage user data objects. You can use “mysql” to run any standard SQL statements against the server. “CREATE TABLE items (name VARCHAR(80));” – Creates a table called “items” with one column. “INSERT INTO items VALUES (‘mysql.w3mentor.com’);” – Inserts a table row into “items” table. “SELECT * […]
Continue reading…

Enjoyed this post? Share it!

 
 

Accessing command line parameters in c# (CSharp)

A C# (CSharp) application can accept any number of arguments from the command line. This allows the user to specify configuration information when the application is launched. The user enters command-line arguments when invoking the application and specifies them after the name of the program/class to be run. For example, suppose a C# application called […]
Continue reading…

Enjoyed this post? Share it!

 
 

How to compile C# (CSharp) programs

csc.exe is the c# command line compiler. After creating the program in a text editor, the program is compiled before being run. C sharp files use .cs extension and the name of the program is arbitrary. Prior to running csc.exe, you may need to run the batch file vcvars32.bat, which is typically found in the […]
Continue reading…

Enjoyed this post? Share it!