Tutorial by Examples: cte

Converting between encodings is easy with C++11 and most compilers are able to deal with it in a cross-platform manner through <codecvt> and <locale> headers. #include <iostream> #include <codecvt> #include <locale> #include <string> using namespace std; i...
The protected internal keyword marks field, methods, properties and nested classes for use inside the same assembly or derived classes in another assembly: Assembly 1 public class Foo { public string MyPublicProperty { get; set; } protected internal string MyProtectedInternalPropert...
The contents of files and network messages may represent encoded characters. They often need to be converted to unicode for proper display. In Python 2, you may need to convert str data to Unicode characters. The default ('', "", etc.) is an ASCII string, with any values outside of ASCII ...
VBA is compiled in run-time, which has a huge negative impact on it's performance, everything built-in will be faster, try to use them. As an example I'm comparing SUM and COUNTIF functions, but you can use if for anything you can solve with WorkSheetFunctions. A first attempt for those would be t...
Const baseString As String = "Hello World" Dim charLength As Long charLength = Len(baseString) 'charlength = 11
Dim lineOfHyphens As String 'Assign a string with 80 repeated hyphens lineOfHyphens = String$(80, "-")
Dim stringOfSpaces As String 'Assign a string with 255 repeated spaces using Space$ stringOfSpaces = Space$(255) 'Assign a string with 255 repeated spaces using String$ stringOfSpaces = String$(255, " ")
The System.String class supports a number of methods to convert between uppercase and lowercase characters in a string. System.String.ToLowerInvariant is used to return a String object converted to lowercase. System.String.ToUpperInvariant is used to return a String object converted to upper...
Introduction When the 80286 was invented, it supported the legacy 8086 Segmentation (now called "Real Mode"), and added a new mode called "Protected Mode". This mode has been in every x86 processor since, albeit enhanced with various improvements such as 32- and 64-bit addressin...
Switching into Protected Mode is easy: you just need to set a single bit in a Control Register. But staying in Protected Mode, without the CPU throwing up its hands and resetting itself due to not knowing what to do next, takes a lot of preparation. In short, the steps required are as follows: ...
Characters can be escaped using character references, in element content or attribute values. Their Unicode codepoint can be specified in decimal or hex. <?xml version="1.0"?> <document> The line feed character can be escaped with a decimal (
) or hex (
) ...
wildcard characters are used with the SQL LIKE operator. SQL wildcards are used to search for data within a table. Wildcards in SQL are:%, _, [charlist], [^charlist] % - A substitute for zero or more characters Eg: //selects all customers with a City starting with "Lo" SEL...
It is good practice to test the calling program's __name__ variable before executing your code. import sys def main(): # Your code starts here # Don't forget to provide a return code return 0 if __name__ == "__main__": sys.exit(main()) Using this pattern ens...
The tr method returns a copy of a string where the characters of the first argument are replaced by the characters of the second argument. "string".tr('r', 'l') # => "stling" To replace only the first occurrence of a pattern with with another expression use the sub method ...
Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\stack\index.php on line 4 If you get an error like this (or sometimes unexpected $end, depending on PHP version), you will need to make sure that you've matched up all inverted commas, all parentheses, all curly braces, all brac...
Apart from LF the only allowed white space character is Space (ASCII value 32). Note that this implies that other white space characters (in, for instance, string and character literals) must be written in escaped form. \', \", \\, \t, \b, \r, \f, and \n should be preferred over corres...
Check existing partitions on Schema SELECT * FROM user_tab_partitions;
If you want to change the order of a character strings you can use parentheses in the pattern to group parts of the string together. These groups can in the replacement argument be addresed using consecutive numbers. The following example shows how you can reorder a vector of names of the form &quo...
The AUROC is one of the most commonly used metric to evaluate a classifier's performances. This section explains how to compute it. AUC (Area Under the Curve) is used most of the time to mean AUROC, which is a bad practice as AUC is ambiguous (could be any curve) while AUROC is not. Overview – Abb...
It is possible to easily catch the exception without any try catch block. public class ListTest { private final List<Object> list = new ArrayList<>(); @Test(expected = IndexOutOfBoundsException.class) public void testIndexOutOfBoundsException() { list.get(0); } } ...

Page 6 of 14