Tutorial by Examples: comp

I wrote a simple C code foo.c int main() { int i = 0; int j = 0; for (i = 0; i < 5; i++) { j = i + 1; } return 0; } When compiled with -O0 i.e. by disabling all compiler optimizations $ gcc -o foo.S foo.c -O0 -S I got this: .file "foo.c&...
You can find a complete reference which CSS3 components are supported on this page In order to use CSS3 in your project Compass provides mixins to support CSS3 features in every browser. On top of your Sass/Scss file you have to specify that you want to use compass @import "compass/css3"...
Request:"http://example.com" GET / HTTP/1.1 Host: example.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0 Accept: text/html,application/xml;q=0.9,*/*;q=0.8 Accept-Encoding: gzip;q=1.0, compress;q=0.5 Accept-Language: en-US,en;q=0.5 Accept-E...
add_action('rest_api_init', 'my_rest_validate_endpoint' ); function my_rest_validate_endpoint() { // Declare our namespace $namespace = 'myrest/v1'; // Register the route // Example URL matching this route: // http://yourdomain/wp-json/myrest/v1/guides/tag=europe/price=...
When using cURL for some queries to the Docker API, it might be a bit tricky to pass some complex structures. Let's say, getting a list of images allows using filters as a query parameter, which have to be a JSON representation of map[string][]string (about the maps in Go you can find more here). H...
If we do many merge operations on a union-find data structure, the paths represented by the parent pointers might be quite long. Path compression, as already described in the theory part, is a simple way of mitigating this issue. We might try to do path compression on the whole data structure after...
#include <opencv2/opencv.hpp> #include using namespace cv; using namespace std; int main(int argc, char** argv) { Mat image; image = imread("C:\Users\Development\Documents\Visual Studio 2013\Projects\ImageIn.bmp", CV_LOAD_IMAGE_GRAYSCALE); // Read the file if (!image.data)...
public class Equatable { public string field1; public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) return false; if (ReferenceEquals(this, obj)) return true; var type = obj.GetType(); if (GetType() != type) re...
Download and install Code::Blocks here. If you're on Windows, be careful to select a file for which the name contains mingw, the other files don't install any compiler. Open Code::Blocks and click on "Create a new project": Select "Console application" and click &...
Depending on whether you have installed composer globally or locally. Locally: php composer.phar create-project slim/slim-skeleton {my-app-name} Globally: composer create-project slim/slim-skeleton {my-app-name} If you are running a webserver (ex. Apache or nginx) point your virtualho...
if you want to see component's individual coverage of tests follow these steps. npm install --save-dev karma-teamcity-reporter Add `require('karma-teamcity-reporter')` to list of plugins in karma.conf.js ng test --code-coverage --reporters=teamcity,coverage-istanbul note that l...
<body onload="__init();"> ... <script src="http://requirejs.org/docs/release/2.3.2/comments/require.js"></script> <script> function __init() { require(["view/index.js"]); } </script> </body>...
{ "module": "amd", // Using AMD module code generator which works with requireJS "rootDir": "./src", // Change this to your source folder "outDir": "./view", ... }
-- loop-based version function hw_loop(v: std_logic_vector) return natural is variable h: natural; begin h := 0; for i in v'range loop if v(i) = '1' then h := h + 1; end if; end loop; return h; end function hw_loop; -- recursive version function hw_tree(v: std_...
An entity represents an object of a game like a player figure or an enemy figure. Since this object does not do much without arms and legs we can add the components to this. To create this system apple has the GKEntity and GKComponent classes. Lets assume we have the following classe for the follow...
Visual Studio Community 2017 Free, fully-featured IDE for students, open-source and individual developer Visual Studio Professional 2017 Professional developer tools, services, and subscription benefits for small teams Visual Studio Enterprise 2017 End-to-end solution to meet demand...
service.ts: import { Injectable } from '@angular/core'; @Injectable() export class AppState { public mylist = []; } parent.component.ts: import {Component} from '@angular/core'; import { AppState } from './shared.service'; @Component({ selector: 'parent-example', templ...
parent.component.ts: import {Component} from '@angular/core'; @Component({ selector: 'parent-example', templateUrl: 'parent.component.html', }) export class ParentComponent { mylistFromParent = []; add() { this.mylistFromParent.push({"itemName":"Something&...
To create a component we add @Component decorator in a class passing some parameters: providers: Resources that will be injected into the component constructor selector: The query selector that will find the element in the HTML and replace by the component styles: Inline styles. NOTE: DO NOT us...

Page 33 of 34