Netstat command

netstat -ano … This command displays process IDs (PIDS) that are associated with active TCP or UDP network connections. netstat -abn … This command displays the process names associated with active TCP or UDP network connections. NOTE: The option ” > c:\PortsList.txt” after the above command will allow generating a text file. Help ?

Read More

MySQL TRIM() function

MySQL TRIM() function returns a string after removing all prefixes or suffixes from the given string. Syntax TRIM( str) Arguments Name Description BOTH Indicates that prefixes from both left and right are to be removed. LEADING Indicates that only leading prefixes are to be removed. TRAILING Indicates that only trailing prefixes are to be removed. remstr The string to be removed. FROM Keyword str The actual string from where remstr is to…

Read More

LINQ
 to 
SQL 
in 
C# – Cheat Sheet

LINQ
 to 
SQL
 in
 C# – Cheat
 Sheet Database context & database create var db = new MyDataContext(@”server=.\SQLEXPRESS;database=my;integrated security=SSPI”); if (!db.DatabaseExists()) db.CreateDatabase(); Select one Insert var only = db.Customers.SingleOrDefault(c => c.CustID == “CHIPS”); var first = db.Customers.FirstOrDefault(c => c.CustID == “CHIPS”); var customer = new Customer() { CustID = “CHIPS”, CompanyName = “Mr. Chips” }; db.Customers.InsertOnSubmit(customer); db.SubmitChanges();   – –  – – – – – – – – – – – – – – – – – – –…

Read More