Tutorial by Examples: c

\documentclass{article} When to use the article class ? For articles in scientific journals, presentations, short reports, program documentation, invitations, ... 1 What are the specificities of this class ? An article doesn't contain chapters or parts. It can be divided in sections, subsectio...
REPLACE ==magic-number== BY ==65535==.
GCobol >>SOURCE FORMAT IS FIXED *> *************************************************************** *> Purpose: RELATIVE file organization REWRITE example *> Tectonics: cobc -g -debug -W -x relatives.cob *> *********************************************...
GCobol >>SOURCE FORMAT IS FIXED *> *************************************************************** *> Purpose: Demonstration of the SEARCH verb *> Tectonics: cobc -x searchlinear.cob *> *************************************************************** ...
GCobol >>SOURCE FORMAT IS FIXED *> *************************************************************** *> Purpose: Demonstration of the SEARCH ALL verb and table SORT *> Tectonics: cobc -x -fdebugging-line searchbinary.cob *> ******************************...
When used in an expression out << setprecision(n) or in >> setprecision(n), sets the precision parameter of the stream out or in to exactly n. Parameter of this function is integer, which is new value for precision. Example: #include <iostream> #include <iomanip> #include...
SUBTRACT item-a item-b item-c FROM account-z ROUNDED MODE IS NEAREST-EVEN ON SIZE ERROR DISPLAY "CALL THE BOSS, Account `Z` is OUT OF MONEY" END-DISPLAY PERFORM promisary-processing NOT ON SIZE ERROR PERFORM normal-processing END-SUBTRACT
*> Strip off trailing zero bytes STRING c-string DELIMITED BY LOW-VALUE INTO working-store
In ruby you can add methods to existing instances of any class. This allows you to add behavior to and instance of a class without changing the behavior of the rest of the instances of that class. class Example def method1(foo) puts foo end end #defines method2 on object exp exp = E...
Selection sort is a sorting algorithm, specifically an in-place comparison sort. It has O(n2) time complexity, making it inefficient on large lists, and generally performs worse than the similar insertion sort. Selection sort is noted for its simplicity, and it has performance advantages over more c...
I used C# language to implement Selection sort algorithm. public class SelectionSort { private static void SortSelection(int[] input, int n) { for (int i = 0; i < n - 1; i++) { var minId = i; int j; for (j = i + 1; j < n; j++...
Each instantiation and full specialization of the std::atomic template defines an atomic type. If one thread writes to an atomic object while another thread reads from it, the behavior is well-defined (see memory model for details on data races) In addition, accesses to atomic objects may establish...
1. at(pos) Returns a reference to the element at position pos with bounds checking. If pos is not within the range of the container, an exception of type std::out_of_range is thrown. The complexity is constant O(1). #include <array> int main() { std::array<int, 3> arr; ...
There are two options to render components on server: renderToString and renderToStaticMarkup. renderToString This will render React components to HTML on server. This function will also add data-react- properties to HTML elements so React on client won't have to render elements again. import { r...
import React from 'react'; import { Route, IndexRoute } from 'react-router'; import Index from './containers/home'; import App from './components/app'; //for single Component lazy load use this const ContactComponent = () => { return { getComponent: (location, callback)=> { ...
We want to be able to compile below component and render it in our webpage Filename: src/index.jsx import React from 'react'; import ReactDOM from 'react-dom'; class ToDo extends React.Component { render() { return (<div>I am working</div>); } } ReactDOM.re...
# install react and react-dom $ npm i react react-dom --save # install webpack for bundling $ npm i webpack -g # install babel for module loading, bundling and transpiling $ npm i babel-core babel-loader --save # install babel presets for react and es6 $ npm i babel-preset-react babel-p...
Create a file webpack.config.js in the root of your working directory Filename: webpack.config.js module.exports = { entry: __dirname + "/src/index.jsx", devtool: "source-map", output: { path: __dirname + "/build", filename: "bund...
Create a file .babelrc in the root of our working directory Filename: .babelrc { "presets": ["es2015","react"] }

Page 616 of 826