Tutorial by Examples: c

#include "cuda_runtime.h" #include "device_launch_parameters.h" #include "cuda.h" #include <device_functions.h> #include <cuda_runtime_api.h> #include<stdio.h> #include <cmath> #include<stdlib.h> #include<iostream> #include...
Let's consider situation when you parse number of pages and you want to collect value from element that's optional (can be presented on one page and can be absent on another) for a paticular page. Moreover the element itself, for example, is the most ordinary element on page, in other words no spec...
The npm scripts are commands that npm will run for you when called with the proper arguments. The power and sense of this is to NOT install the npm packages globally poluting your environment. The difference between pre-recognized and custom scripts relies on the run word between the tags, custom s...
Catch is a header only library that allows you to use both TDD and BDD unit test style. The following snippet is from the Catch documentation page at this link: SCENARIO( "vectors can be sized and resized", "[vector]" ) { GIVEN( "A vector with some items" ) { std::vector v( 5 ); ...
Using Line Numbers ... and documenting them in case of error ("The importance of seeing Erl") Detecting which line raises an error is a substantial part of any debugging and narrows the search for the cause. To document identified error lines with a short description completes a successf...
Edit crontab using command crontab -e Add this line to the end of file. * * * * * /fullpath/mycron Exit Verify by command crontab -l
override func numberOfSections(in tableView: UITableView) -> Int { // You need to return minimum one to show the cell inside the tableview return 1 } override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { // return the number of rows i...
For custom tableview cell you need a class that is subclass from UITableViewCell, an example class you can see below. class TableViewCell: UITableViewCell { @IBOutlet weak var lblTitle: UILabel! override func awakeFromNib() { super.awakeFromNib() // Initialization code } overrid...
The simple, yet powerful use of the ISE is e.g. writing code in the top section (with intuitive syntax coloring) and run the code by simply marking it and hitting the F8 key. function Get-Sum { foreach ($i in $Input) {$Sum += $i} $Sum 1..10 | Get-Sum #output 55
Using arrow function as callback function can reduce lines of code. The default syntax for arrow function is () => {} This can be used as callbacks For example if we want to print all elements in an array [1,2,3,4,5] without arrow function, the code will look like this [1,2,3,4,5].forEach...
var sck = "wss://site.com/wss-handler"; var wss = new WebSocket(sck); This uses the wss instead of ws to make a secure web socket connection which make use of HTTPS instead of HTTP

Page 826 of 826