Tutorial by Examples: amp

A. The syntax is presented above. The following selector matches all <input> elements in an HTML document that are not disabled and don't have the class .example: HTML: <form> Phone: <input type="tel" class="example"> E-mail: <input type="em...
The :only-child CSS pseudo-class represents any element which is the only child of its parent. HTML: <div> <p>This paragraph is the only child of the div, it will have the color blue</p> </div> <div> <p>This paragraph is one of the two children of the ...
This is a basic Hello World program in NASM assembly for 32-bit x86 Linux, using system calls directly (without any libc function calls). It's a lot to take in, but over time it will become understandable. Lines starting with a semicolon(;) are comments. If you don't already know low-level Unix sy...
MSTest (the default testing framework) requires you to have your test classes decorated by a [TestClass] attribute, and the test methods with a [TestMethod] attribute, and to be public. [TestClass] public class FizzBuzzFixture { [TestMethod] public void Test1() { //arrange...
It is obvious to assume that the percentage value of margin to margin-left and margin-right would be relative to its parent element. .parent { width : 500px; height: 300px; } .child { width : 100px; height: 100px; margin-left: 10%; /* (parentWidth * 10/100) => 50px ...
using System; using System.Collections.Generic; using System.Linq; using System.Numerics; // also add reference to System.Numberics namespace ConsoleApplication33 { class Program { private static IEnumerable<BigInteger> Fibonacci() { BigInteger p...
To Illustrate the MERGE Statement, consider the following two tables - dbo.Product : This table contains information about the product that company is currently selling dbo.ProductNew: This table contains information about the product that the company will sell in the future. The foll...
Most of the guidance for creating good examples for Q&A carries over into the documentation. Make it minimal and get to the point. Complications and digressions are counterproductive. Include both working code and prose explaining it. Neither one is sufficient on its own. Don't re...
// 1. Base example not using language support for covariance, dynamic type checking. class Top { public: virtual Top* clone() const = 0; virtual ~Top() = default; // Necessary for `delete` via Top*. }; class D : public Top { public: Top* clone() const override ...
// 2. Covariant result version of the base example, static type checking. class Top { public: virtual Top* clone() const = 0; virtual ~Top() = default; // Necessary for `delete` via Top*. }; class D : public Top { public: D* /* ← Covariant return */ clone() const over...
Create an empty directory somewhere ... mkdir HelloWorld cd HelloWorld Then use the built in scaffolding technology to create a Hello World sample dotnet new console -o This command creates two files: HelloWorld.csproj describes the project dependencies, settings, and Target Framework ...
Update: TensorFlow now supports 1D convolution since version r0.11, using tf.nn.conv1d. Consider a basic example with an input of length 10, and dimension 16. The batch size is 32. We therefore have a placeholder with input shape [batch_size, 10, 16]. batch_size = 32 x = tf.placeholder(tf.float...
One example per topic may be pinned by clicking the pin icon in the bottom left corner of the example. So long as a topic is pinned, it will stay at the top of a topic's example collection.
To get started: Install celery pip install celery configure celery (head to the remarks section) from __future__ import absolute_import, unicode_literals from celery.decorators import task @task def add_number(x, y): return x + y You can run this asynchronously by using the ....
The ServiceLoader is a simple and easy to use built-in mechanism for dynamic loading of interface implementations. With the service loader - providing means for instantation (but not the wiring) - a simple dependency injection mechanism can be built in Java SE. With the ServiceLoader interface and ...
If we know the desired URI of the document we are looking for: fn:doc("/stuff/mysimpledocument.xml") Returns the full document from the database, using the URI to locate it. Since this is XQuery, we can use XPath to find the document when we know about the structure, but not the URI: ...
MarkLogic is first and foremost a search engine, so let's use two different methods to search for this document. Using search:search() This gives a peek into using search:search() to develop search applications. This library provides Google-like search results and will likely speed up your develop...
The dependencies for your projects are specified in a single text file called a Podfile. CocoaPods will resolve dependencies between libraries, fetch the resulting source code, then link it together in an Xcode workspace to build your project. Create a podfile # Next line contains target platf...
NIO appeared in Java 1.4 and introduced the concept of "Channels", which are supposed to be faster than regular I/O. Network-wise, the SelectableChannel is the most interesting as it allows to monitor different states of the Channel. It works in a similar manner as the C select() system ca...
It is very common to get a StackOverflowError error while calling recursive function. Scala standard library offers TailCall to avoid stack overflow by using heap objects and continuations to store the local state of the recursion. Two examples from the scaladoc of TailCalls import scala.util.cont...

Page 16 of 46