Tutorial by Examples: st

docker exec -it <container id> /bin/bash It is common to log in an already running container to make some quick tests or see what the application is doing. Often it denotes bad container use practices due to logs and changed files should be placed in volumes. This example allows us log in the...
9.0 // Since the anchor system simply returns constraints, you still need to add them somewhere. View.AddConstraints( new[] { someLabel.TopAnchor.ConstraintEqualTo(TopLayoutGuide.GetBottomAnchor()), anotherLabel.TopAnchor.ConstraintEqualTo(someLabel.BottomAnchor, 6), ...
// Using Visual Format Language requires a special look-up dictionary of names<->views. var views = new NSDictionary( nameof(someLabel), someLabel, nameof(anotherLabel), anotherLabel, nameof(oneMoreLabel), oneMoreLabel ); // It can also take a look-up dictionary for metrics (...
It is possible to mount a host directory to a specific path in your container using the -v or --volume command line option. The following example will mount /etc on the host to /mnt/etc in the container: (on linux) docker run -v "/etc:/mnt/etc" alpine cat /mnt/etc/passwd (on windows) do...
By default, containers created with docker run are given a random hostname. You can give the container a different hostname by passing the --hostname flag: docker run --hostname redbox -d ubuntu:14.04
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" <!-- etc --> > <!-- Internet is required. READ_LOGS are to ensure that the Logcat is transmitted--> <uses-perm...
Maven <dependency> <groupId>ch.acra</groupId> <artifactId>acra</artifactId> <version>4.9.2</version> <type>aar</type> </dependency> Gradle compile 'ch.acra:acra:4.9.2'
Reactive Extensions are published on both NuGet and MyGet. Installing and using them is therefore the same as any other NuGet package: Install-Package System.Reactive NB package names changed between v2 and v3. See the README on Github for more info Breaking changes The NuGet packages have...
Since C++14, the standard provides the class template template <class T, T... Ints> class integer_sequence; template <std::size_t... Ints> using index_sequence = std::integer_sequence<std::size_t, Ints...>; and a generating metafunction for it: template <class T, T N&g...
Python makes it very simple to check whether an item is in a list. Simply use the in operator. lst = ['test', 'twest', 'tweast', 'treast'] 'test' in lst # Out: True 'toast' in lst # Out: False Note: the in operator on sets is asymptotically faster than on lists. If you need to use it ...
There are two ways to achieve that, the first and most known is the following: docker attach --sig-proxy=false <container> This one literally attaches your bash to the container bash, meaning that if you have a running script, you will see the result. To detach, just type: Ctl-P Ctl-Q Bu...
Standard installation All Node.js binaries, installers, and source files can be downloaded here. You can download just the node.exe runtime or use the Windows installer (.msi), which will also install npm, the recommended package manager for Node.js, and configure paths. Installation by package m...
Users of homebrew can install gradle by running brew install gradle
Users of SdkMan can install Gradle by running: sdk install gradle Install specific version sdk list gradle sdk install gradle 2.14 Switch versions sdk use gradle 2.12
Sometimes it's necessary to convert a Discriminated Union to and from a string: module UnionConversion open Microsoft.FSharp.Reflection let toString (x: 'a) = match FSharpValue.GetUnionFields(x, typeof<'a>) with | case, _ -> case.Name let fromStri...
HTML <input type="range"></input> CSS EffectPseudo SelectorThumbinput[type=range]::-webkit-slider-thumb, input[type=range]::-moz-range-thumb, input[type=range]::-ms-thumbTrackinput[type=range]::-webkit-slider-runnable-track, input[type=range]::-moz-range-track, input[type=...
Software needed: Arduino IDE Setup Most Arduino-compatible boards have a USB port and come with a USB cable. Plug in the Arduino using the USB cable, and start up the Arduino IDE. Arduino IDE will start with a new sketch, typically with an emtpy setup() and loop() functions. This is enough to u...
When working on a project, you might be half-way through a feature branch change when a bug is raised against master. You're not ready to commit your code, but you also don't want to lose your changes. This is where git stash comes in handy. Run git status on a branch to show your uncommitted chang...
1. Install Node.js and NPM: Gulp requires Node.js and NPM, Node's package manager. Most installers include NPM with Node.js. Refer to the installation documentation or confirm it is already installed by running the following command in your terminal, npm -v // will return NPM version or error say...
A simple switch statement: switch a + b { case c: // do something case d: // do something else default: // do something entirely different } The above example is equivalent to: if a + b == c { // do something } else if a + b == d { // do something else } else { ...

Page 46 of 369