Keyboard Shortcuts Copy only active window to clipboard Normally, the Print Screen key copies the entire display (or two displays if you got them), ALT + Print Screen only copies the currently active window to the clipboard. Whether taking a screenshot to diagnose a problem, or just because you want to show something to a friend, this will come in handy. Fix those little mistakes Did you know you can undo almost any action? CTRL + Z is the ultimate hot key, and for sure you knew about it already, however note that undo doesn’t just apply to typing. If you accidentally delete or move a file, you can hit CTRL + Z to bring it right back to where it was. In Chrome and Firefox you can also undo closing a tab using CTRL + SHIFT + T. Cycle through open windows Pressing ALT+TAB allows you to cycle through currently open windows. This makes switching back and forth between running processes quick and painless. If you want a more stylish method of cycling through open programs, ...
Awk Script 1. Print Even number of words in each line from file Ans. awk '{for(i=1;i<=NF;i++) if(i%2==0) printf("%s ",$i) else continue printf("\n") }' file1 O/P:-= is command file created awk {file1:- this is awk command example this file is created for awk } 2. Display words having length greater than 10 and consists of digit. Ans. awk '{for(i=1;i<=NF;i++) if(length($i)>10) if(int($i)) printf("%s ",$i) else continue printf("\n") }' file2 O/p: 12345678912 {file2: this is number file 123445 123456789 hcd kkd 72 7832 12345678912 1234156789 124 edne 124de edj 12dw ds5 asjkdeyfendj fdej kjd faiuendhgej dk fdkfj87fdnj77n dfjn jhfd hude7634bfdef }
Java Pragrams /* This is a simple Java program. Call this file "Example.java". */ class Main { // Your program begins with a call to main(). public static void main(String args[]) { System.out.println("This is a simple Java program."); } } //area of a circle class AreaOfCircle { public static void main(String s[]) { double pi, r, a; pi = 3.14; r = 10; a = pi * r * r; System.out.println("Area of circle = " + a); } } //char data type example class CharDemo { public static void main(String s[]) { char ch1; ch1 = 'A'; System.out.println("ch1 = " + ch1); ch1 = 65; //A System.out.println("ch1 = " + ch1); ch1++; // increment ch1 System.out.println("ch1 = " + ch1); } } //Type casting example class Conversion { public static void main(String s[]) { byte b; int i = 257; double d = 3.14; System.out.println("\n\nConversion of int to byte."); b = (byte)i; System.out.println(...
Comments
Post a Comment