Thursday, December 10, 2015

How to add a string at the beginning of each line

On Notepad++
  • Move your cursor to the start of the first line
  • Hold down Alt + Shift and use the cursor down key to extend the selection to the end of the block
  • Write your string and it will be written simultaneous at the beginning of each line.

Monday, November 2, 2015

How to get a macro to run when a cell/cells is/are changed on any worksheet of a specific workbook

Just write the following code on your "VBA Project" -> "This Workbook":

Private Sub Workbook_SheetChange(ByVal sh As Object, ByVal target As Range)

Dim KeyCells As Range

Set sh = ActiveSheet

    Set KeyCells = sh.Range("B20:e25")  ''''change the range to your range
   
    If Not Application.Intersect(KeyCells, sh.Range(target.Address)) _
           Is Nothing Then
         
                '''''''''''please write your code here'''''''''''''
    End If
   
  
End Sub



Wednesday, May 27, 2015

Primitive variables in Java


 If you want to copy the code, it is written below.




public class Application {
    public static void main(String[] args) {
      
            int myNumber=88;
            short myShort= 867;
            long myLong= 9797;
           
            double myDouble= 7.3243;
            float myFloat= 324.3f;
           
            char myChar = 'y';
            boolean myBoolean = true;
           
            byte myByte=127;
           
            System.out.println(myNumber);
            System.out.println(myShort);
            System.out.println(myLong);
            System.out.println(myDouble);
            System.out.println(myFloat);
            System.out.println(myChar);
            System.out.println(myBoolean);
            System.out.println(myByte);
}

}

Hello World in Java


public class Application {

    public static void main(String[] args) {
        System.out.println("Hello World!");
     }

}


Monday, February 16, 2015

How to write in Python online?

Do you want to run a python code without having to download the program and install it?  It is pretty easy, just go to the next link , write the code and run it. The output will appear on the right window:

http://www.codeskulptor.org/