Tutorial by Examples: al

UNION ALL to select all(duplicate values also) German cities from the "Customers" and "Suppliers" tables. Here Country="Germany" is to be specified in the where clause. Query: SELECT City, Country FROM Customers WHERE Country='Germany' UNION ALL SELECT City, Count...
Detailed instructions on getting text set up or installed.
Functional tests are best described as tests for your user stories. If you've dealt with user stories before they normally follow the following pattern: As a [role], I want to [desire], so that [benefit/desired outcome] For the following examples we'll use this user story as an example: As a Du...
A global RegExp match can be performed using preg_match_all. preg_match_all returns all matching results in the subject string (in contrast to preg_match, which only returns the first one). The preg_match_all function returns the number of matches. Third parameter $matches will contain matches in f...
The predicate function matches can be used to evaluate strings on the fly without use of any object declarations. IF matches( val = 'Not a hex string' regex = '[0-9a-f]*' ). cl_demo_output=>display( 'This will not display' ). ELSEIF matches( val = '6c6f7665' reg...
As already pointed out in other pitfalls, catching all exceptions by using try { // Some code } catch (Exception) { // Some error handling } Comes with a lot of different problems. But one perticular problem is that it can lead to deadlocks as it breaks the interrupt system when writ...
The latest version of the Oracle Java style guide mandates that the "then" and "else" statements in an if statement should always be enclosed in "braces" or "curly brackets". Similar rules apply to the bodies of various loop statements. if (a) { //...
Scaling to fit Means that the whole image will be visible but there may be some empty space on the sides or top and bottom if the image is not the same aspect as the canvas. The example shows the image scaled to fit. The blue on the sides is due to the fact that the image is not the same aspect as ...
Following are the Prerequisites for installing Cookiecutter: pip virtualenv PostgreSQL Create a virtualenv for your project and activate it: $ mkvirtualenv <virtualenv name> $ workon <virtualenv name> Now install Cookiecutter using: $ pip install cookiecutter Change dire...
The Symbol.for method allows you to register and look up global symbols by name. The first time it is called with a given key, it creates a new symbol and adds it to the registry. let a = Symbol.for('A'); The next time you call Symbol.for('A'), the same symbol will be returned instead of a new o...
For more complex applications, flat execution profiles may be difficult to follow. This is why many profiling tools also generate some form of annotated callgraph information. gperf2dot converts text output from many profilers (Linux perf, callgrind, oprofile etc.) into a callgraph diagram. You can...
.exr -1 gives you details about the last exception thrown. !analyze -v usually does a good job as well. For .NET, the command !pe of the SOS extension shows details about the .NET exception that was thrown.
Hosted XSLT 2.0 Setup To run XSLT 2.0 in the browser, use one of the following XSLT 2.0 as a service hosts: XSLT Fiddle W3C XSLT Servlet Online XSLT Test Tool
Ref returns and ref locals are useful for manipulating and returning references to blocks of memory instead of copying memory without resorting to unsafe pointers. Ref Return public static ref TValue Choose<TValue>( Func<bool> condition, ref TValue left, ref TValue right) { ...
The keyword partial can be used during type definition of class, struct, or interface to allow the type definition to be split into several files. This is useful to incorporate new features in auto generated code. File1.cs namespace A { public partial class Test { public string...
array_flip function will exchange all keys with its elements. $colors = array( 'one' => 'red', 'two' => 'blue', 'three' => 'yellow', ); array_flip($colors); //will output array( 'red' => 'one', 'blue' => 'two', 'yellow' => 'three' )
When static_cast is used to convert T D::* to T B::*, the member pointed to must belong to a class that is a base class or derived class of B. Otherwise the behavior is undefined. See Derived to base conversion for pointers to members
The following uses of pointer arithmetic cause undefined behavior: Addition or subtraction of an integer, if the result does not belong to the same array object as the pointer operand. (Here, the element one past the end is considered to still belong to the array.) int a[10]; int* p1 = &a...
For the built-in shift operator, the right operand must be nonnegative and strictly less than the bit width of the promoted left operand. Otherwise, the behavior is undefined. const int a = 42; const int b = a << -1; // UB const int c = a << 0; // ok const int d = a << 32; // ...
In this example, a destructor is explicitly invoked for an object that will later be automatically destroyed. struct S { ~S() { std::cout << "destroying S\n"; } }; int main() { S s; s.~S(); } // UB: s destroyed a second time here A similar issue occurs when a st...

Page 146 of 269