Posts

Command to find the proxy server of the system (Windows)

Windows Command to find the proxy server of the system: reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" | find /i "proxyserver"

Root and Install Custom ROM on Samsung Galaxy Grand Duos

Root and Install Custom ROM on Samsung Galaxy Grand Duos: Install Samsung Drivers on the PC. Install Odin for Windows. Download CWM touch for Custom Recovery. Flash this with Odin with Auto Reboot unchecked. Boot into the Recovery mode and install whatever ROM you like. Reference: https://www.youtube.com/watch?v=ABzbBW4usho&spfreload=5 http://www.droidviews.com/best-custom-roms-for-samsung-galaxy-grand-duos-gt-i9082/ https://forum.xda-developers.com/galaxy-grand-duos/development/android-7-1-1-lineageos-rr-n-v5-8-0-t3537748 Comment if you need more help...Happy modding...

How to Encrypt and Decrypt in SQL Server with Certificate

How to Encrypt and Decrypt in SQL Server with Certificate: While using the sensitive data in applications, we need to encrypt it whenever we are storing in the database tables. For this purpose, we usually use the asymmetric keys with certificate. The process is descriped as below... First, we need to create as master key with a password. Later, we need to create a certificate with Subject Name and Expiry Date. Later, we need to create a symmetric key with a algorithm by making use of the certificate. CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'p@ssw0rd' CREATE CERTIFICATE MyCertCert WITH SUBJECT = 'MyTestCert', EXPIRY_DATE = '10/31/2018' CREATE SYMMETRIC KEY MySymKey WITH ALGORITHM = TRIPLE_DES ENCRYPTION BY CERTIFICATE MyCertCert Once the key is created with the certificate, you can see your certificate by making use of the below query. SELECT * FROM sys.certificates Later you can use the below SQL Statements to encrypt or decrypt the cont...

Convert the number to words in C#.NET

Convert the number to words in C#.NET: public static string NumberToWords(int number)         {             if (number == 0)                 return "zero";             if (number < 0)                 return "minus " + NumberToWords(Math.Abs(number));             string words = "";             if ((number / 1000000) > 0)             {                 words += NumberToWords(number / 1000000) + " million ";                 number %= 1000000;             }             if ((number / 1000) > 0)             {             ...

SQL Server String Manipulations

SQL Server String Manipulations: We can use simple regular expressions for "LIKE" to filter as wild card characters.We can use [0-9] for digits and [a-z] for characters. Eg: to filter a 4 digit ZIP code we can use " where ZIP like '[0-9][0-9][0-9][0-9]'"       to filter the string that starts with digit we can use " where name like '[0-9]%'" Like same, we can use ^ for the not match condition and _ for matching one character condition. Eg: to filter names that don't start with p then we can use " where name like '[^p]%'"       to filter names that end with ir then we can use " where name like '_ir'" We can find the index of any character in a string expression with CHARINDEX function. To find the last index of any character, we can use the below... datalength(filename)-charindex('.',reverse(filename),1)

How to enable SSL for IIS Express for DEV env in Visual Studio

Image
How to enable SSL for IIS Express for DEV env in Visual Studio: For already developed projects, after we download it from TFS, if the SSL is enabled, then we need to configure the SSL for IIS Express manually with a self signed  certificate. First, we tell IIS Express to enable SSL for the required site that has been configured on a specific port. eg: https://localhost:44037 The command for the above is as below... cd C:\Program Files (x86)\IIS Express IisExpressAdminCmd.exe setupsslUrl -url:https://localhost:44037/ -UseSelfSigned  After we run the above command for the required sites to be run on SSL, we start running the application. Initially, ASP.NET will ask you to create a self signed certificate for the localhost. After accepting it, a self signed cert will be created under the Local Computer account of the cert store. This cert will be used for the IIS Express to work on SSL. Later you need to tell IIS Express to trust this certificate for the application t...