Tutorial by Examples: ai

This script, from here and here, will return all Tables and Columns where a specified value exists. This is powerful in finding out where a certain value is in a database. It can be taxing, so it is suggested that it be executed in a backup / test enviroment first. DECLARE @SearchStr nvarchar(100) ...
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...
docker network connect app-backend myAwesomeApp-1 This command attaches the myAwesomeApp-1 container to the app-backend network. When you add a container to a user-defined network, the embedded DNS resolver (which is not a full-featured DNS server, and is not exportable) allows each container on ...
docker network disconnect app-backend myAwesomeApp-1 This command detaches the myAwesomeApp-1 container from the app-backend network. The container will no longer be able to communicate with other containers on the network it has been disconnected from, nor use the embedded DNS resolver to look u...
Data-only containers are obsolete and are now considered an anti-pattern! In the days of yore, before Docker's volume subcommand, and before it was possible to create named volumes, Docker deleted volumes when there were no more references to them in any containers. Data-only containers are obsolet...
While attached to a running container with a pty assigned (docker run -it ...), you can press ControlP - ControlQ to detach.
Docker is just a fancy way to run a process, not a virtual machine. Therefore, debugging a process "in a container" is also possible "on the host" by simply examining the running container process as a user with the appropriate permissions to inspect those processes on the host (...
Although it is very tempting to use BETWEEN ... AND ... for a date range, it is problematical. Instead, this pattern avoids most problems: WHERE x >= '2016-02-25' AND x < '2016-02-25' + INTERVAL 5 DAY Advantages: BETWEEN is 'inclusive' thereby including the final date or second. 2...
Sometimes the computation in a Future can create an exception, which will cause the Future to fail. In the "Creating a Future" example, what if the calling code passed 55 and 0 to the divide method? It'd throw an ArithmeticException after trying to divide by zero, of course. How would t...
In the example below we use std::string and operator>> to read items from the file. std::ifstream file("file3.txt"); std::vector<std::string> v; std::string s; while(file >> s) // keep reading until we run out { v.push_back(s); ...
This inserts a json dictionary where one of the members is an array of strings into the table that was created in another example. INSERT INTO myjson(dict) VALUES('{"opening":"Sicilian","variations":["pelikan","dragon","najdorf"]}'); ...
The :global command already has its own topic: The global command
Use DOMContentLoaded when the <script> code interacting with DOM is included in the <head> section. If not wrapped inside the DOMContentLoaded callback, the code will throw errors like Cannot read something of null document.addEventListener('DOMContentLoaded', function(event) { ...
Case classes provide a copy method that creates a new object that shares the same fields as the old one, with certain changes. We can use this feature to create a new object from a previous one that has some of the same characteristics. This simple case class to demonstrates this feature: case cla...
I have the following list: 1. Alon Cohen 2. Elad Yaron 3. Yaron Amrani 4. Yogev Yaron I want to select the first name of the guys with the Yaron surname. Since I don't care about what number it is I'll just put it as whatever digit it is and a matching dot and space after it from the beginni...
Over time, our classes may implement more and more interfaces. When these interfaces have many methods, the total number of methods in our class will become very large. For example, let's suppose that we have two interfaces and a class implementing them: interface Printable { public functio...
C99 These functions returns the floating-point remainder of the division of x/y. The returned value has the same sign as x. Single Precision: #include <math.h> /* for fmodf() */ #include <stdio.h> /* for printf() */ int main(void) { float x = 10.0; float y = 5.1; ...
When the view controller is presented within a tab bar controller, you can access the tab bar controller like this: Swift let tabBarController = viewController.tabBarController Objective-C UITabBarController *tabBarController = self.tabBarController; When the view controller is part on an n...
# application.rb config.time_zone = 'Eastern Time (US & Canada)' config.active_record.default_timezone = :local

Page 15 of 47