Posts

Showing posts from May, 2017

Important 100+ CMD Commands for Windows

First of all open the CMD by clocking on START > RUN > CMD. Then type these CMD Commands: 1. Accessibility Controls – access.cpl 2. Accessibility Wizard – accwiz 3. Add Hardware Wizard – hdwwiz.cpl 4. Add/Remove Programs – appwiz.cpl 5. Administrative Tools – control admintools 6. Automatic Updates – wuaucpl.cpl 7. Bluetooth Transfer Wizard – fsquirt 8. Calculator – calc 9. Certificate Manager – certmgr.msc 10. Character Map – charmap 11. Check Disk Utility – chkdsk 12. Clipboard Viewer – clipbrd 13. Command Prompt – cmd 14. Component Services – dcomcnfg 15. Computer Management – compmgmt.msc 16. Control Panel – control 17. Date and Time Properties – timedate.cpl 18. DDE Shares – ddeshare 19. Device Manager – devmgmt.msc 20. Direct X Troubleshooter – dxdiag 21. Disk Cleanup Utility – cleanmgr 22. Disk Defragment – dfrg.msc 23. Disk Management – diskmgmt.msc 24. Disk Partition Manager – diskpart 25. Display Properties – control desktop 26. Display Pr

Online String Manipulation Tool

In this post you will find free online tools to perform common string manipulations such as reversing a string, calculating a string's length or encoding a string. This tool provide the below String Operation. Reverse A String Calculate String Length Word Count Tool Count The Occurrences Of A Substring Within A String Convert A String To Uppercase, Lowercase Or Proper Case HTML-Encode A String HTML-Decode A String String To Hex Converter Hex To String Converter String To Binary Converter Binary To String Converter Decimal To Binary Converter Binary To Decimal Converter Decimal To Hex Converter Hex To Decimal Converter URL-Encode A String URL-Decode A String Convert Hex Values To RGB Convert RGB Values To Hex Base64-Encode A String Base64-Decode A String Character Encoder / Decoder Character Encoding Errors Analyzer Character Encoding Table Index >>   http://string-functions.com

What is Advanced Encryption Standard (AEC) and online tool to encrypt and decrypt data using AEC.

How to use AES encryption? If you want to encrypt a text put it in the white textarea above, set the key of the encryption then push the Encrypt button.The result of the encryption will appear in base64 encoded to prevent character encoding problems.If you want to decrypt a text be sure it is in base64 encoded and is encrypted with AES algorithm!Put the encrypted text in the white textarea, set the key and push the Decrypt button. When is helpful to use AES encryption? When you want to encrypt a confidential text into a decryptable format, for example when you need to send sensitive data in e-mail.The decryption of the encrypted text it is possible only if you know the right password. What is AES encryption? AES (acronym of Advanced Encryption Standard) is a symmetric encryption algorithm.The algorithm was developed by two Belgian cryptographer Joan Daemen and Vincent Rijmen. AES was designed to be efficient in both hardware and software, and supports a block leng

How to start a thread when your WAR is deployed ?

you can define a context listener within the web.xml: <web-app>     <listener>        <listener-class>com.mypackage.MyServletContextListener</listener-class>     </listener> </web-app> Then implement that class something like: public class MyServletContextListener implements ServletContextListener {     private MyThreadClass myThread = null;     public void contextInitialized(ServletContextEvent sce) {         if ((myThread == null) || (!myThread.isAlive())) {             myThread = new MyThreadClass();             myThread.start();         }     }     public void contextDestroyed(ServletContextEvent sce){         try {             myThread.doShutdown();             myThread.interrupt();         } catch (Exception ex) {         }     } }

Sample code for how to send SMS in java using HTTP Requests

import java.net.HttpURLConnection; import java.net.URL; import java.net.URLEncoder; public class SendSMS { public static void main(String[] args) { try { String requestUrl  = "http://sms.cellapps.com/sendsms.php?"+ "UserId=" +    URLEncoder.encode("XXXX", "UTF-8") + "&Pwd=" +      URLEncoder.encode("XXXX", "UTF-8") +  "&Mobileno=" + URLEncoder.encode("XXXX", "UTF-8") +  "&Msg=" +      URLEncoder.encode("This is test sms", "UTF-8") +  "&SenderId=" + URLEncoder.encode("Alert", "UTF-8"); System.out.println("URL : "+requestUrl); URL url = new URL(requestUrl); HttpURLConnection uc = (HttpURLConnection)url.openConnection(); System.out.println("Request Status code : " +uc.getResponseCode()); if(uc.getResponseCode()== 200){ System.out.println("Message Send Successfully"

Convert from Decimal to Binary, Octal or Hex in Java using Integer.toXXXString(int)

Integer class does provide lots of unitily methods to be consumed directly Integer decimal1 = 21 ; System.out.println(decimal1 + "=" + Integer.toBinaryString(decimal1)); Integer decimal2 = 302 ; System.out.println(decimal2 + "=" + Integer.toOctalString(decimal2)); Integer decimal3 = 43981 ; System.out.println(decimal3 + "=" + Integer.toHexString(decimal3)); Output: 21 = 10101 302 = 456 43981 = abcd

Convert from Decimal to Binary, Octal or Hex using java

Use Integer.toString(int input, int radix) to convert from an Integer to any type of base number. Integer decimal1 = 21 ; String binaryNumber = Integer.toString(decimal1, 2 ); System.out.println(decimal1 + " in Base 2 : " + binaryNumber); Integer decimal2 = 302 ; String octalNumber = Integer.toString(decimal2, 8 ); System.out.println(decimal2 + " in Base 8 : " + octalNumber); Integer decimal3 = 43981 ; String hexNumber = Integer.toString(decimal3, 16 ); System.out.println(decimal2 + " in Base 16 : " + hexNumber); Output: 21 in Base 2 : 10101 302 in Base 8 : 456 43981 in Base 16 : abcd

Convert from Binary, Octal or Hex to Decimal number in java

Use Integer.parseInt(String input, int radix) to convert from any type of number to an Integer. String binaryNumber = "10101" ; int decimal1 = Integer.parseInt(binaryNumber, 2 ); System.out.println(binaryNumber + " in Base 10 : " + decimal1); String octalNumber = "456" ; int decimal2 = Integer.parseInt(octalNumber, 8 ); System.out.println(octalNumber + " in Base 10 : " + decimal2); String hexNumber = "ABCD" ; int decimal3 = Integer.parseInt(hexNumber, 16 ); System.out.println(hexNumber + " in Base 10 : " + decimal3); Output: 10101 in Base 10 : 21 456 in Base 10 : 302 ABCD in Base 10 : 43981