Tutorial by Examples: ti

SQL Server 2012 FETCH is generally more useful for pagination, but can be used as an alternative to TOP: SELECT * FROM table_name ORDER BY 1 OFFSET 0 ROWS FETCH NEXT 50 ROWS ONLY
When a runtime error occurs, good code should handle it. The best error handling strategy is to write code that checks for error conditions and simply avoids executing code that results in a runtime error. One key element in reducing runtime errors, is writing small procedures that do one thing. Th...
SELECT ps.name AS PartitionScheme , fg.name AS [FileGroup] , prv.* , LAG(prv.Value) OVER (PARTITION BY ps.name ORDER BY ps.name, boundary_id) AS PreviousBoundaryValue FROM sys.partition_schemes ps INNER JOIN sys.destination_data...
According to this [TechNet Microsoft page][1], Partitioning data enables you to manage and access subsets of your data quickly and efficiently while maintaining the integrity of the entire data collection. When you call the following query the data is not physically moved; only the metadata ab...
Using the Authors table in the Library Database CREATE PROCEDURE GetName ( @input_id INT = NULL, --Input parameter, id of the person, NULL default @name VARCHAR(128) = NULL --Input parameter, name of the person, NULL default ) AS BEGIN SELECT Name + ' is from ' + Country...
CREATE VIEW view_EmployeeInfo WITH ENCRYPTION AS SELECT EmployeeID, FirstName, LastName, HireDate FROM Employee GO
We will use the built in tooth growth dataset. We are interested in whether there is a statistically significant difference in tooth growth when the guinea pigs are given vitamin C vs orange juice. Here's the full example: teethVC = ToothGrowth[ToothGrowth$supp == 'VC',] teethOJ = ToothGrowth[To...
The rep function can be used to repeat a vector in a fairly flexible manner. # repeat counting numbers, 1 through 5 twice rep(1:5, 2) [1] 1 2 3 4 5 1 2 3 4 5 # repeat vector with incomplete recycling rep(1:5, 2, length.out=7) [1] 1 2 3 4 5 1 2 The each argument is especially useful for ex...
var multiplexer = ConnectionMultiplexer.Connect("localhost"); IDatabase db = multiplexer.GetDatabase(); // intialize key with empty string await db.StringSetAsync("key", ""); // create transaction that utilize multiplexing and pipelining ITransaction transacton...
History The first computers Early computers had a block of memory that the programmer put code and data into, and the CPU executed within this environment. Given that the computers then were very expensive, it was unfortunate that it would do one job, stop and wait for the next job to be loaded in...
When the Pentium was being developed, memory sizes, and the programs that ran in them, were getting larger. The OS had to do more and more work to maintain the Paging Subsystem just in the sheer number of Page Indexes that needed to be updated when large programs or data sets were being used. So th...
class Program { private static Lazy<ConnectionMultiplexer> _multiplexer = new Lazy<ConnectionMultiplexer>( () => ConnectionMultiplexer.Connect("localhost"), LazyThreadSafetyMode.ExecutionAndPublication); static void Main(string[] args...
Connect to Redis server and allow admin (risky) commands ConfigurationOptions options = new ConfigurationOptions() { EndPoints = { { "localhost", 6379}}, AllowAdmin = true, ConnectTimeout = 60*1000, }; Connectio...
This example will show you how to create a Windows Forms Application project in Visual Studio. Create Windows Forms Project Start Visual Studio. On the File menu, point to New, and then select Project. The New Project dialog box appears. In the Installed Templates pane, select "...
Open a text editor (like Notepad), and type the code below: using System; using System.ComponentModel; using System.Drawing; using System.Windows.Forms; namespace SampleApp { public class MainForm : Form { private Button btnHello; // The form's con...
In pointer arithmetic, the integer to be added or subtracted to pointer is interpreted not as change of address but as number of elements to move. #include <stdio.h> int main(void) { int array[] = {1, 2, 3, 4, 5}; int *ptr = &array[0]; int *ptr2 = ptr + sizeof(int) * 2; ...
Mesos is a cluster manager aiming for improved resource utilization by dynamically sharing resources among multiple frameworks. It was started at the University of California, Berkeley in 2009 and is in production use in many companies, including Twitter and Airbnb. It became an Apache top-level ...
docker network create app-backend This command will create a simple bridged network called appBackend. No containers are attached to this network by default.
docker network ls This command lists all networks that have been created on the local Docker host. It includes the default bridge bridge network, the host host network, and the null null network. All containers by default are attached to the default bridge bridge network.
6 ES6: myFunction.name Explanation on MDN. As of 2015 works in nodejs and all major browsers except IE. 5 ES5: If you have a reference to the function, you can do: function functionName( func ) { // Match: // - ^ the beginning of the string // - function the w...

Page 162 of 505