Tech Programming Ideas is one of the best places on the programming for programmers. Learn coding with Tech Programming Ideas tutorials. We are covered android programming, php, yii2 framework, javascript, mysql, vb.net etc.
Switch case statements are a substitute for long if statements that compare a variable to several integral values
The switch statement is a multiway branch statement. It provides an easy way to dispatch execution to different parts of code based on the value of the expression.
Switch is a control statement that allows a value to change control of execution.
SYNTAX
switch(index){
case 0:
//Do this and thisbreak;
case 1:
//Do this and thisbreak;
case 2:
//Do this and this:break;
default: //For all other cases, do thisbreak;
}
requestWindowFeature(Window.FEATURE_NO_TITLE);//will hide the title
getSupportActionBar().hide(); //hide the title bar
The setFlags() method of Window class is used to display content in full screen mode. You need to pass theWindowManager.LayoutParams.FLAG_FULLSCREEN constant in the setFlags method.
Function Age (varBirthDate As Variant) As Integer Dim varAge As Variant
If IsNull(varBirthdate) then Age = 0: Exit Function
varAge = DateDiff("yyyy", varBirthDate, Now) If Date < DateSerial(Year(Now), Month(varBirthDate), _ Day(varBirthDate)) Then varAge = varAge - 1 End If Age = CInt(varAge) End Function
How to close a program from the terminal in ubuntu
The program name with:
pkill <name_of_program>
use of program PID (process id)
kill it with kill <PID>
Steps for close program
1. open a Terminal window
2. To view a list of running processes, enter the following text at the prompt and press Enter.
$ ps -A
eg : pkill filezilla - use program name. To kill a process using its PID, enter the “killall” command (without the quotes) at the prompt, followed by a space, and then the corresponding PID from the generated list. Press Enter.