Showing posts with label Coding. Show all posts
Showing posts with label Coding. Show all posts

Create a Portable Notes App using just Notepad (Batch Script)


Do you like to take notes of various stuff while working??
Do you want to that your notes are ubiquitous but still doesn't slow down your computer?

Then, Let's Make one yourself. 




The notes you create will be present on your Taskbar for faster access.

You can click on the arrow to Insert  a new Note or View all your notes.

Upon Clicking the "+New Note.bat" file, a dialog will ask you to enter the Name or Title of the new Note.


 

 












         Content of the Note can also be entered for adding descriptive Text about the Note.






The created Note can also be seen in the Taskbar's Toolbar.





You can also Delete the Note if your Work is done or if you don't need the Note anymore.


Coding-Trick: Switch-Case as unWorkable for loop

While working, I thought I could provide few tips on coding in my blog.

So, I thought to share a "short code" in a situation where you want to initialize some values. Each value is initialized by different function. You know the functions but you don't know how many values to initialize.  Uninitialized values should be 0.

Suppose values to initialize

a = f1(); 
b = f2(); 
c = f3(); 
d = f4(); 

 A normal Switch case for the above Situation :

Switch(number_of_values_to_initialize) {

case 1:
          a = f1();
          b = 0;
          c = 0;
          d = 0;
          break;

case 2:
          a = f1();
          b = f2();
          c = 0;
          d = 0;
          break;

case 3:
          a = f1();
          b = f2();
          c = f3();
          d = 0;
          break;

case 4:
          a = f1();
          b = f2();
          c = f3();
          d = f4();
          break; }


 The Shortcut for This Code is :

YOU MAY ALSO LIKE: