Tutorial by Examples: com

The arguments passed from the console can be received in the Kotlin program and it can be used as an input. You can pass N (1 2 3 and so on) numbers of arguments from the command prompt. A simple example of a command-line argument in Kotlin. fun main(args: Array<String>) { println(&qu...
public static void main(String args[]) { StringTokenizer st = new StringTokenizer("apple,ball cat,dog", ","); while (st.hasMoreTokens()) { System.out.println(st.nextToken()); } } Output: apple ball cat dog
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&...
The easy way This won't work if there are merge commits in your selection The advanced way Start the rebase dialog:
By default tee command overwrites the file. You can instruct tee to append to the file using the –a option as shown below. $ ls | tee –a file
In this example, we will plot a sine curve and a hyperbolic sine curve in the same plot with a common x-axis having different y-axis. This is accomplished by the use of twinx() command. # Plotting tutorials in Python # Adding Multiple plots by twin x axis # Good for plots having different y axis ...
In this example, a plot with curves having common y-axis but different x-axis is demonstrated using twiny() method. Also, some additional features such as the title, legend, labels, grids, axis ticks and colours are added to the plot. # Plotting tutorials in Python # Adding Multiple plots by twin ...
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"...
Valgrind provides you with the lines at which the error occurred at the end of each line in the format (file.c:line_no). Errors in valgrind are summarised in the following way: ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) The most common errors include: Illegal read/write er...
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...
A comment starts with a forward slash followed immediately by an asterisk (/*), and ends as soon as an asterisk immediately followed by a forward slash (*/) is encountered. Everything in between these character combinations is a comment and is treated as a blank (basically ignored) by the compiler. ...
C99 C99 introduced the use of C++-style single-line comments. This type of comment starts with two forward slashes and runs to the end of a line: // this is a comment This type of comment does not allow multi-line comments, though it is possible to make a comment block by adding several single ...
You can add comment and status to order. Get order : $orderid = 12345; $order = Mage::getModel('sales/order')->load($orderid); And add comment: //$isNotify means you want to notify customer or not. $order->addStatusToHistory($status, $message, $isNotify); $order->save()
Large chunks of code can also be "commented out" using the preprocessor directives #if 0 and #endif. This is useful when the code contains multi-line comments that otherwise would not nest. #if 0 /* Starts the "comment", anything from here on is removed by preprocessor */ /*...
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...
Mostly you're probably working with these scopes: Variables scope is the scope where all variables are assigned to when nothing else is intentionally declared (like the window scope in JavaScript). Form scope When you send a form to your server, all the form fields which can be identified (by se...
#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)...

Page 62 of 65