Tutorial by Examples: er

To automatically install bower and its components, one must Specify the bower dependency in package.json: "dependencies": { "bower": "^1.7.9" } Use scripts to execute a postinstall command "scripts": { "postinstall": "./...
This serializer has some nice features that the default .net json serializer doesn't have, like Null value handling, you just need to create the JsonSerializerSettings : public static string Serialize(T obj) { string result = JsonConvert.SerializeObject(obj, new JsonSerializerSettings { NullVa...
You can make a URI parameter optional by adding a question mark to the route parameter. You can also specify a default value by using the form parameter=value. public class BooksController : Controller { // eg: /books // eg: /books/1430210079 [Route(“books/{isbn?}”)] public Act...
Pretext This is an introduction to the Hello World program example on the Raspberry Pi written in C. The following example makes use of the command line interface and is set up as a step-by-step guide. Along with creating a Hello World program, the reader will be introduced to simple linux comman...
Another way of doing aggregations is by using the Mongo.Collection#rawCollection() This can only be run on the Server. Here is an example you can use in Meteor 1.3 and higher: Meteor.methods({ 'aggregateUsers'(someId) { const collection = MyCollection.rawCollection() const aggre...
The x64 architecture is the evolution of the older x86 architecture, it kept compatibility with its predecessor (x86 registers are still available) but it also introduced new features: Registers have now a capacity of 64 bits; There are 8 more general-purpose registers; Segment registers are fo...
Example: Customers who can create a post. Each customer can create multiple posts. As soon as customer creates the post, post will be under administrators review. Now we have to fetch the customers list who have all active posts by using sub-query. Note: If a customer has 5 post, among 5 posts if h...
Logs are very important. Recreate an error context can be sometimes very painful due to the lack of information about how and when the error occurred. This example shows: How to add user's data in the error logs How to add post parameters sent when an error occurred How to use WebPr...
Java Code import org.opencv.core.Mat; import org.opencv.core.MatOfRect; import org.opencv.core.Point; import org.opencv.core.Rect; import org.opencv.core.Scalar; import org.opencv.highgui.Highgui; import org.opencv.highgui.VideoCapture; import org.opencv.objdetect.CascadeClassifier; publ...
When you want to work with the data entries in arrays you first need to unwind the array. The unwind operation creates a document for each entry in the array. When you have lot's of documents with large arrays you will see an explosion in number of documents. { "_id" : 1, "item"...
Let us assume we have the following two DataFrames: In [7]: df1 Out[7]: A B 0 a1 b1 1 a2 b2 In [8]: df2 Out[8]: B C 0 b1 c1 The two DataFrames are not required to have the same set of columns. The append method does not change either of the original DataFrames. Inst...
A regex-pattern uses many special characters to describe a pattern. Ex., . means "any character", + is "one or more" etc. To use these characters, as a .,+ etc., in a pattern, you need to escape them to remove their special meaning. This is done by using the escape character whi...
Tuples are frequently used for multiple return values. Much of the standard library, including two of the functions of the iterable interface (next and done), returns tuples containing two related but distinct values. The parentheses around tuples can be omitted in certain situations, making multip...
The IIF statement can be used in expressions to screen for division by zero: =IIF(Fields!PossibleZero.Value=0,0,Fields!Denominator.Value/IIF(Fields!PossibleZero.Value=0,1,Fields!PossibleZero.Value)) SSRS does not short circuit IIF arguments. Therefore, using a single IIF function to screen for ...
In order to use a plain-text editor to create a Console application that is written in C#, you'll need the C# Compiler. The C# Compiler (csc.exe), can be found at the following location: %WINDIR%\Microsoft.NET\Framework64\v4.0.30319\csc.exe N.B. Depending upon which version of the .NET Framework t...
This snippet dumps the contents of the current path to stdout. It uses the ghostscript procedure =only which may not be available on all interpreters. An equivalent procedure on Adobe interpreters is called =print. pathforall is a looping operator which takes 4 procedure bodies as arguments which a...
It is sometimes useful to integrate a custom error logging framework to ensure all exceptions are logged. [ServiceContract] [ErrorHandler] public interface IMyService { } [AttributeUsage(AttributeTargets.Interface)] public class CustomErrorHandler : Attribute, IContractBehavior, IE...
As the official website of Swagger says : Swagger is to define a standard, language-agnostic interface to REST APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. ...
Assume you want to undo a dozen of commits and you want only some of them. git rebase -i <earlier SHA> -i puts rebase in "interactive mode". It starts off like the rebase discussed above, but before replaying any commits, it pauses and allows you to gently modify each commit as i...
docker logs --follow <containerid> This tails the output of the running container. This is useful if you did not set up a logging driver on the docker daemon.

Page 286 of 417