Tutorial by Examples

Min

Find the smallest value of column: select min(age) from employee; Above example will return smallest value for column age of employee table. Syntax: SELECT MIN(column_name) FROM table_name;
Detailed instructions on getting jboss set up or installed.
Function to customize snackbar public static Snackbar makeText(Context context, String message, int duration) { Activity activity = (Activity) context; View layout; Snackbar snackbar = Snackbar .make(activity.findViewById(android.R.id.content), message, d...
You can use Snackbar.Callback to listen if the snackbar was dismissed by user or timeout. Snackbar.make(getView(), "Hi snackbar!", Snackbar.LENGTH_LONG).setCallback( new Snackbar.Callback() { @Override public void onDismissed(Snackbar snackbar, int event)...
Guice is a Java library. To use it you have to add a JAR file into the classpath of your Java project. Sample classes Below are several classes for a "Hello, world!" example. An interface of a hello "service": public interface HelloWorldService { public void sayHello(); ...
This is an example of using Android Support Library V7 RecyclerView. Support libraries are generally recommended because they provide backward-compatible versions of new features, provide useful UI elements that are not included in the framework, and provide a range of utilities that apps can draw o...
The scope of a variable in a block { ... }, begins after declaration and ends at the end of the block. If there is nested block, the inner block can hide the scope of a variable which is declared in the outer block. { int x = 100; // ^ // Scope of `x` begins here // } // ...
To declare a single instance of a variable which is accessible in different source files, it is possible to make it in the global scope with keyword extern. This keyword says the compiler that somewhere in the code there is a definition for this variable, so it can be used everywhere and all write/r...
DECLARE @startdate CHAR(8), @numberDays TINYINT SET @startdate = '20160101' SET @numberDays = 10; WITH CTE_DatesTable AS ( SELECT CAST(@startdate as date) AS [date] UNION ALL SELECT DATEADD(dd, 1, [date]) FROM CTE_DatesTable WHERE DATEADD(dd, 1, [date]) <= DateAdd(DAY, @nu...
Integer literals are used to provide integral values. Three numerical bases are supported, indicated by prefixes: BasePrefixExampleDecimalNone5Octal00345Hexadecimal0x or 0X0x12AB, 0X12AB, 0x12ab, 0x12Ab Note that this writing doesn't include any sign, so integer literals are always positive. Somet...
The calc() function is the part of a new syntax in CSS3 in which you can calculate (mathematically) what size/position your element occupies by using a variety of values like pixels, percentages, etc. Note:- Whenever you use this function, always take care of the space between two values calc(100% -...
The border-collapse property applies only to tables (and elements displayed as display: table or inline-table) and sets whether the table borders are collapsed into a single border or detached as in standard HTML. table { border-collapse: separate; /* default */ border-spacing: 2px; /* Only w...
Table showing size and values range of all primitive types: data typenumeric representationrange of valuesdefault valuebooleann/afalse and truefalsebyte8-bit signed-27 to 27 - 10-128 to +127short16-bit signed-215 to 215 - 10-32,768 to +32,767int32-bit signed-231 to 231 - 10-2,147,483,648 to +2,147,...
XHProf is a PHP profiler originally written by Facebook, to provide a more lightweight alternative to XDebug. After installing the xhprof PHP module, profiling can be enabled / disabled from PHP code: xhprof_enable(); doSlowOperation(); $profile_data = xhprof_disable(); The returned array wil...
Currying is the technique of translating the evaluation of a function that takes multiple arguments into evaluating a sequence of functions, each with a single argument. This is normally useful when for example: different arguments of a function are calculated at different times. (Example 1) di...
All variables in powershell begin with a US dollar sign ($). The simplest example of this is: $foo = "bar" This statement allocates a variable called foo with a string value of "bar".
To remove a variable from memory, one can use the Remove-Item cmdlet. Note: The variable name does NOT include the $. Remove-Item Variable:\foo Variable has a provider to allow most *-item cmdlets to work much like file systems. Another method to remove variable is to use Remove-Variable cmdlet...
The default scope for a variable is the enclosing container. If outside a script, or other container then the scope is Global. To specify a scope, it is prefixed to the variable name $scope:varname like so: $foo = "Global Scope" function myFunc { $foo = "Function (local) scope&...
Some recommended PEP8 style guidelines for imports: Imports should be on separate lines: from math import sqrt, ceil # Not recommended from math import sqrt # Recommended from math import ceil Order imports as follows at the top of the module: Standard libr...
The typical workflow of training and using neural networks, regardless of the library used, goes like this: Training Data Getting the training data: the X variable is the input, and the Y variable is the output. The simplest thing to do is to learn a logic gate, where X is a vector or two number...

Page 459 of 1336