Tutorial by Examples

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.
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...
docker network rm app-backend This command removes the user-defined app-backend network from the Docker host. All containers on the network not otherwise connected via another network will lose communication with other containers. It is not possible to remove the default bridge bridge network, th...
docker network inspect app-backend This command will output details about the app-backend network. The of the output of this command should look similar to: [ { "Name": "foo", "Id": "a0349d78c8fd7c16f5940bdbaf1adec8d8399b8309b2e8a969bd4e...
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...
main.js A service worker is an event-driven worker registered against an origin and a path. It takes the form of a JavaScript file that can control the web page/site it is associated with, intercepting and modifying navigation and resource requests, and caching resources in a very granular fashio...
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...
docker run -d --name "mysql-1" -v "/var/lib/mysql" mysql This command creates a new container from the mysql image. It also creates a new data volume, which it then mounts in the container at /var/lib/mysql. This volume helps any data inside of it persist beyond the lifetime o...
The vast majority of modern JavaScript environments work according to an event loop. This is a common concept in computer programming which essentially means that your program continually waits for new things to happen, and when they do, reacts to them. The host environment calls into your program, ...
Many interesting operations in common JavaScript programming environments are asynchronous. For example, in the browser we see things like window.setTimeout(() => { console.log("this happens later"); }, 100); and in Node.js we see things like fs.readFile("file.txt", (...
docker-compose.yml version: '2' services: php: image: phpmyadmin/phpmyadmin links: - mysql:db depends_on: - mysql mysql: image: k0st/alpine-mariadb volumes: - ./data/mysql:/var/lib/mysql environment: - MYSQL_DATABASE=mydb ...
Used by awk to split each record into multiple fields: echo "a-b-c d-e-f" | awk 'BEGIN {FS="-"} {print $2}' will result in: b e The variable FS can also be set using the option -F: echo "a-b-c d-e-f" | awk -F '-' '{print $2}' By default, the fields are se...
Used by awk to split the input into multiple records. For example: echo "a b c|d e f" | awk 'BEGIN {RS="|"} {print $0}' produces: a b c d e f By default, the record separator is the newline character. Similarly: echo "a b c|d e f" | awk 'BEGIN {RS="|&quo...
docker volume create --name="myAwesomeApp" Using a named volume makes managing volumes much more human-readable. It is possible to create a named volume using the command specified above, but it's also possible to create a named volume inside of a docker run command using the -v or --vo...

Page 423 of 1336