CREATE VIEW view_PersonEmployee
AS
SELECT P.LastName,
P.FirstName,
E.JobTitle
FROM Employee AS E
INNER JOIN Person AS P
ON P.BusinessEntityID = E.BusinessEntityID
GO
Views can use joins to select data from numerous sources like tables, table functio...
UPDATE HelloWorlds
SET HelloWorld = 'HELLO WORLD!!!'
WHERE Id = 5
The above code updates the value of the field "HelloWorld" with "HELLO WORLD!!!" for the record where "Id = 5" in HelloWorlds table.
Note: In an update statement, It is advised to use a "where&...
A simple form of updating is incrementing all the values in a given field of the table.
In order to do so, we need to define the field and the increment value
The following is an example that increments the Score field by 1 (in all rows):
UPDATE Scores
SET score = score + 1
This can be dang...
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...
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.
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...
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", (...
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...
An Akka MessageDispatcher is what makes Akka Actors "tick", it is the engine of the machine so to speak. All MessageDispatcher implementations are also an ExecutionContext, which means that they can be used to execute arbitrary code, for instance Futures.
Every ActorSystem will have a def...
So in case you want to give your Actor a different dispatcher than the default, you need to do two things, of which the first is to configure the dispatcher in your application.conf:
my-dispatcher {
# Dispatcher is the name of the event-based dispatcher
type = Dispatcher
# What kind of Exe...
Using docker-machine is the best method to install Docker on a machine. It will automatically apply the best security settings available, including generating a unique pair of SSL certificates for mutual authentication and SSH keys.
To create a local machine using Virtualbox:
docker-machine create...
Use the lazy_static crate to create global immutable variables which are initialized at runtime. We use HashMap as a demonstration.
In Cargo.toml:
[dependencies]
lazy_static = "0.1.*"
In main.rs:
#[macro_use]
extern crate lazy_static;
lazy_static! {
static ref HASHMAP: Hash...