Tutorial by Examples: o

Returns a table with a rows containing the values that were actual (current) at the specified point in time in the past. SELECT * FROM Employee FOR SYSTEM_TIME AS OF '2016-08-06 08:32:37.91'
Required compiler features can be specified on a target using the command target_compile_features: add_library(foo foo.cpp ) target_compile_features(foo PRIVATE # scope of the feature cxx_constexpr # list of features ) The features must be part of CMAKE_C_COMPILE_FE...
function getSheetData() { var sheet = SpreadsheetApp.getActiveSheet(); var startRow = 2; // First row of data to process var numRows = 100; // Number of rows to process var startCol = 1; //First column of data to process var numCols = 15; // Number of columns to process ...
Given - A have sheet of employees who have requested for reimbursement. Requirement - We should sent out an email to the employee when their reimbursement is processed So, the sheet is as follows: The function for sending out an email is as follows: function getDataSheet() { sheet = Sprea...
In the above example, if we want to send out HTML content as message in the email, then create a HTML file by going to File -> New -> HTML file Now you can see a HTML file besides your gs file as follows : Now, update the getMessage() method from above example as follows : function getMes...
A simple PL/pgSQL function: CREATE FUNCTION active_subscribers() RETURNS bigint AS $$ DECLARE -- variable for the following BEGIN ... END block subscribers integer; BEGIN -- SELECT must always be used with INTO SELECT COUNT(user_id) INTO subscribers FROM users WHERE subscribed...
You can iterate over the contents of a dictionary with dict for, which is similar to foreach: set theDict {abcd {ab cd} bcde {ef gh} cdef {ij kl}} dict for {theKey theValue} $theDict { puts "$theKey -> $theValue" } This produces this output: abcd -> ab cd bcde -> ef gh c...
Sometimes you need to match a literal (sub-)string with a regular expression despite that substring containing RE metacharacters. While yes, it's possible to write code to insert appropriate backslashes to make that work (using string map) it is easiest to just prefix the pattern with ***=, which ma...
MSDN: Determines whether a sequence contains a specified element by using a specified IEqualityComparer<T> List<int> numbers = new List<int> { 1, 2, 3, 4, 5 }; var result1 = numbers.Contains(4); // true var result2 = numbers.Contains(8); // false List<int> secondN...
Design (layout XML): <AutoCompleteTextView android:id="@+id/autoCompleteTextView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_centerHorizontal="true&...
DECLARE CURSOR c_emp_to_be_raised(p_sal emp.sal%TYPE) IS SELECT * FROM emp WHERE sal < p_sal; BEGIN FOR cRowEmp IN c_emp_to_be_raised(1000) LOOP dbms_Output.Put_Line(cRowEmp .eName ||' ' ||cRowEmp.sal||'... should be raised ;)'); END LOOP; END; /
BEGIN FOR x IN (SELECT * FROM emp WHERE sal < 100) LOOP dbms_Output.Put_Line(x.eName ||' '||x.sal||'... should REALLY be raised :D'); END LOOP; END; / First advantage is there is no tedious declaration to do (think of this horrible "CURSOR" thing you had in previous ve...
SYS_REFCURSOR can be used as a return type when you need to easily handle a list returned not from a table, but more specifically from a function: function returning a cursor CREATE OR REPLACE FUNCTION list_of (required_type_in IN VARCHAR2) RETURN SYS_REFCURSOR IS v_ SYS_REFCURSOR; BEGIN...
Declare the cursor to scan a list of records Open it Fetch current record into variables (this increments position) Use %notfound to detect end of list Don't forget to close the cursor to limit resources consumption in current context -- DECLARE CURSOR curCols IS -- select column name a...
This is a minimal possible XSLT transformation. It produces the string value of the source XML document. The output format is text. Source XML document: <t>Hello, World!</t> XSLT transformation: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/T...
If you don't have Visual Studio 2015, go to https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx and select Visual Studio Community. It is a free version that have all the required capabilities to develop Windows 10 application. You can install the Enterprise Edition if you ha...
You can override the default vmoptions with your own personal settings by choosing Help > Edit Custom VM Options from the toolbar. This will create a local copy of the file which you are free to edit. For example, if you double the value set for Xmx, the maximum size of the memory allocation poo...
This example shows the base of almost any XSLT transformation and the most fundamental XSLT design pattern. Producing as output an XML document that is identical to the source XML document. Source XML document: <t>Hello, World!</t> XSLT transformation: <xsl:stylesheet version=&q...
qplot is intended to be similar to base r plot() function, trying to always plot out your data without requiring too much specifications. basic qplot qplot(x = disp, y = mpg, data = mtcars) adding colors qplot(x = disp, y = mpg, colour = cyl,data = mtcars) adding a smoother qplot(x = d...
C++11 During exception handling there is a common use case when you catch a generic exception from a low-level function (such as a filesystem error or data transfer error) and throw a more specific high-level exception which indicates that some high-level operation could not be performed (such as b...

Page 561 of 1038