Tutorial by Examples: c

Anchor tag helper is used generate href attributes to link to a particular controller action or MVC route. Basic example <a asp-controller="Products" asp-action="Index">Login</a> Sometimes, we need to specify additional parameters for the controller action that ...
Pass a method into a directive. It provides a way to execute an expression in the context of the parent scope. Method will be executed in the scope of the parent, you may pass some parameters from the child scope there. You should not use {{...}} for interpolation. When you use & in a directi...
In 32-bit Linux, system calls are usually done by using the sysenter instruction (I say usually because older programs use the now deprecated int 0x80) however, this can take up quite alot of space in a program and so there are ways that one can cut corners in order to shorten and speed things up. ...
IF "%~1" == "-help" ( ECHO "Hello" ) where %1 refers to the first command line argument and ~ removes any quotes that were included when the script was called.
Let's say you have an academic system. The bounded contexts would be like this: Admission of new undergraduate students Distribution of students on classrooms considering a schedule of the courses and occupation, size and type of classrooms Management of courses, hierarchies and predecessors of...
The invoice number is used to verify the sale for publishers. Many publishers of paid asset or plugin ask for the invoice number upon request of support. The invoice number is also used as a license key to activate some asset or plugin. The invoice number can be found in two place: After you b...
public class DrawRectangle { public static void main(String[] args) { //Load native library System.loadLibrary(Core.NATIVE_LIBRARY_NAME); //image container object Mat goruntuDizisi=new Mat(); //Read image in file system goruntuDizisi=Imgcodecs.imread("C:\\i...
var httpRequest = new XMLHttpRequest(); httpRequest.onreadystatechange = getData; httpRequest.open('GET', 'https://url/to/some.file', true); httpRequest.send(); function getData(){ if (httpRequest.readyState === XMLHttpRequest.DONE) { alert(httpRequest.responseText); } ...
if a directory contain 2 files: $ ls makefile example.txt and makefile contain the following text %.gz: % gzip $< then you can obtain example.txt.gz by typing in the shell $ make -f makefile example.txt.gz the makefile consist of only one rule that instruct make how to create a...
The following utility can be used for auto-completion of commands: $ which aws_completer /usr/bin/aws_completer $ complete -C '/usr/bin/aws_completer' aws For future shell sessions, consider add this to your ~/.bashrc $ echo "complete -C '/usr/bin/aws_completer' aws" >> ~/.b...
Main features of this Makefile : Automatic detection of C sources in specified folders Multiple source folders Multiple corresponding target folders for object and dependency files Automatic rule generation for each target folder Creation of target folders when they don't exist Dependency ma...
Introduction from http://facebook.github.io/react-native/docs/native-modules-ios.html Sometimes an app needs access to platform API, and React Native doesn't have a corresponding module yet. Maybe you want to reuse some existing Objective-C, Swift or C++ code without having to reimplement it in ...
We will see stream objects being returned by modules like fs etc but what if we want to create our own streamable object. To create Stream object we need to use the stream module provided by NodeJs var fs = require("fs"); var stream = require("stream").Writable; ...
Consider you want to predict the correct answer for XOR popular problem. You Knew what is XOR(e.g [x0 x1] => y). for example [0 0] => 0, [0 1] => [1] and... #Load Sickit learn data from sklearn.neighbors import KNeighborsClassifier #X is feature vectors, and y is correct label(To train...
This example shows more detailed build settings: env=Environment( CPPPATH='/usr/include/boost/', CPPDEFINES=['foo'], LIBS=['bar'], SCONS_CXX_STANDARD='c++11') env.Program('hello', Glob('src/*.cpp')) This builds the executable hello from all the cpp files in src, with the f...
It is a dialog which prompts user to select date using DatePicker. The dialog requires context, initial year, month and day to show the dialog with starting date. When the user selects the date it callbacks via DatePickerDialog.OnDateSetListener. public void showDatePicker(Context context,int init...
A generic schema useful to work with geo-objects like points, linestrings and polygons. Both Mongoose and MongoDB support Geojson. Example of usage in Node/Express: var mongoose = require('mongoose'); var Schema = mongoose.Schema; // Creates a GeoObject Schema. var myGeo= new Schema({ ...
This kind of schema will be useful if you want to keep trace of your items by insertion time or update time. var mongoose = require('mongoose'); var Schema = mongoose.Schema; // Creates a User Schema. var user = new Schema({ name: { type: String }, ...
This is a basic polymer element that show a list of names. <link rel="import" href="../bower_components/polymer/polymer.html"> <dom-module id="basic-list"> <template> <style> </style> <div>Name's list</div&g...
The Binary Search Tree (BST) is a hierarchical data structure with a single pointer to the root node. The Node in the BST generally contains "items" (such as numbers or names) for fast look up. Each node has at-most two children (left and right). Every node is organized by some key data f...

Page 525 of 826