Tutorial by Examples: by

If we want to order the data differently for per group, we can add a CASE syntax to the ORDER BY. In this example, we want to order employees from Department 1 by last name and employees from Department 2 by salary. IdFNameLNamePhoneNumberManagerIdDepartmentIdSalaryHireDate1JamesSmith1234567890NUL...
Its possible to change *.vmoptions and idea.properties files without editing them in the PhpStorm installation folder. Follow the steps below: Step 1: Run Help - Edit Custom VM Options... Step 2: Confirm the creation of the configuration file, if prompted Step 3: Add following lines if yo...
Orders a collection by a specified value. When the value is an integer, double or float it starts with the minimum value, which means that you get first the negative values, than zero and afterwords the positive values (see Example 1). When you order by a char the method compares the ascii val...
Orders a collection by a specified value. When the value is an integer, double or float it starts with the maximal value, which means that you get first the positive values, than zero and afterwords the negative values (see Example 1). When you order by a char the method compares the ascii val...
A numeric type used to store 8-bit signed integers. sbyte is an alias for System.SByte, and takes up 1 byte of memory. For the unsigned equivalent, use byte. Valid range is -127 to 127 (the leftover is used to store the sign). sbyte a = 127; // 127 sbyte b = -127; // -127 sbyte c = 200; // Err...
Modifying the strings returned by the standard functions getenv(), strerror() and setlocale() is undefined. So, implementations may use static storage for these strings. The getenv() function, C11, §7.22.4.7, 4, says: The getenv function returns a pointer to a string associated with the matched...
The specification says: A byte range digest shall be computed over a range of bytes in the file, that shall be indicated by the ByteRange entry in the signature dictionary. This range should be the entire file, including the signature dictionary but excluding the signature value itself (the Conte...
This is very similar to using an Application subclass and overriding the attachBaseContext() method. However, using this method, you don't need to override attachBaseContext() as this is already done in the MultiDexApplication superclass. Extend MultiDexApplication instead of Application: package...
A conversion that involves calling an explicit constructor or conversion function can't be done implicitly. We can request that the conversion be done explicitly using static_cast. The meaning is the same as that of a direct initialization, except that the result is a temporary. class C { std:...
Care must be taken when initializing variables of type float to literal values or comparing them with literal values, because regular floating point literals like 0.1 are of type double. This may lead to surprises: #include <stdio.h> int main() { float n; n = 0.1; if (n > ...
Description This is a self-contained running example including/showcasing: minimum dependencies needed, Java Configuration, Bean declaration by annotation and Java Configuration, Dependency Injection by Constructor and by Property, and Pre/Post hooks. Dependencies These dependencies are needed in...
Once an object has an effective type, you should not attempt to modify it through a pointer of another type, unless that other type is a character type, char, signed char or unsigned char. #include <inttypes.h> #include <stdio.h> int main(void) { uint32_t a = 57; // conversion...
Depending on the structure of your data, you can create variables that update dynamically. DECLARE @CurrentID int = (SELECT TOP 1 ID FROM Table ORDER BY CreateDate desc) DECLARE @Year int = 2014 DECLARE @CurrentID int = (SELECT ID FROM Table WHERE Year = @Year) In most cases, you will want...
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; // ...
The received bytes have to be decoded with the correct character encoding to be interpreted as text: Python 3.x3.0 import urllib.request response = urllib.request.urlopen("http://stackoverflow.com/") data = response.read() encoding = response.info().get_content_charset() html = d...
A reference is not an object, and unlike an object, it is not guaranteed to occupy some contiguous bytes of memory. The standard leaves it unspecified whether a reference requires any storage at all. A number of features of the language conspire to make it impossible to portably examine any storage ...
If you store a list of tags in a row as coma separated values, STRING_SPLIT function enables you to transform list of tags into a table of values. CROSS APPLY enables you to "join" values parsed by STRING_SPLIT function with a parent row. Imagine that you have a Product table with a colu...
You can list all files ignored by git in current directory with command: git status --ignored So if we have repository structure like this: .git .gitignore ./example_1 ./dir/example_2 ./example_2 ...and .gitignore file containing: example_2 ...than result of the command will be: $ g...
while IFS= read -r line; do echo "$line" done <file If file may not include a newline at the end, then: while IFS= read -r line || [ -n "$line" ]; do echo "$line" done <file
var='line 1 line 2 line3' while IFS= read -r line; do echo "-$line-" done <<< "$var" or readarray -t arr <<< "$var" for i in "${arr[@]}";do echo "-$i-" done

Page 12 of 23