Tutorial by Examples: ti

#include <omp.h> void main () { int i; double ZZ, func(), res=0.0; #pragma omp parallel for reduction(+:res) private(ZZ) for (i=0; i< 1000; i++){ ZZ = func(I); res = res + ZZ; } } In the last line: Actually added to a private ...
So the main goal of this function is to : Be standalone because it needs to be written in the main VbScript file and cannot be in an included file (because it defines the include function) Provide enough information if something goes wrong (ie. the file that was being included, the error that oc...
<p class="alert alert-success" *ngIf="names.length > 2">Currently there are more than 2 names!</p>
NgFor provides Some values that can be aliased to local variables index -(variable) position of the current item in the iterable starting at 0 first -(boolean) true if the current item is the first item in the iterable last -(boolean) true if the current item is the last item in the iterable ...
To generate schema, view, controller, migration file for the repository, default CRUD templates and test files for a model (like a scaffolding in Rails) one can use phoenix.gen.html mix task like this: mix phoenix.gen.html Book books title note:text pages:integer author_id:references:authors Wh...
Increment / Decrement A pointer can be incremented or decremented (prefix and postfix). Incrementing a pointer advances the pointer value to the element in the array one element past the currently pointed to element. Decrementing a pointer moves it to the previous element in the array. Pointer ari...
Unfortunately Sencha does not directly give you access to Extjs 4. Their download SDK links lead directly to the newer version of Extjs (currently 6). Although you can still find websites that are hosting the library files (I will have to leave you to it since Extjs is under the LGPL license for o...
Detailed instructions on getting perforce set up or installed.
Display the date by itself (custom field is tour_date): <p>Tour Date <?php the_field('tour_date');?></p>
Let's say you want to show a text field (announcement) based on the time (a scheduled notification message for instance). You need two date-time fields. In our example, one is called start_date and the other end_date. <?php $DateNow = date('Y-m-d H:i:s'); $DateStart = get_field('start_date',...
At the end of the document add the following: \bibliographystyle{style} \bibliography{file location} Create a file with extension .bib and save the citation as follows: @inproceedings{citation_name, title={Paper Title}, author={List Authors}, pages={45--48}, year={2013}, organizat...
There are many ways of creating DataFrames. They can be created from local lists, distributed RDDs or reading from datasources. Using toDF By importing spark sql implicits, one can create a DataFrame from a local Seq, Array or RDD, as long as the contents are of a Product sub-type (tuples and ca...
In our last two examples, numpy assumed that a[0,:] was the first vector, a[1,:] the second, and a[2,:] the third. Numpy.cross has an optional argument axisa that allows us to specify which axis defines the vectors. So, >>> a=np.array([[1,1,1],[0,1,0],[1,0,-1]]) >>> b=np.array([0...
The static factory method is a variation of the factory method pattern. It is used to create objects without having to call the constructor yourself. When to use the Static Factory Method if you want to give a meaningfull name to the method that generates your object. if you want to avoid over...
Java code: public class StdioApplication { public static void main(String[] args) { new ClassPathXmlApplicationContext("classpath:spring/integration/stackoverflow/stdio/stdio.xml"); } } Xml config file <?xml version="1.0" encoding="UTF-8"?&...
This example demonstrates how to develop a simple UWP application. On creation of a "Blank App (Universal Windows)" project there are many essential files that are created in your solution. All files in your project can be seen in the Solution Explorer. Some of the crucial files in your...
The non-null assertion operator, !, allows you to assert that an expression isn't null or undefined when the TypeScript compiler can't infer that automatically: type ListNode = { data: number; next?: ListNode; }; function addNext(node: ListNode) { if (node.next === undefined) { nod...
Let's say you need to add a field to every document in a collection. import pymongo client = pymongo.MongoClient('localhost', 27017) db = client.mydb.mycollection for doc in db.find(): db.update( {'_id': doc['_id']}, {'$set': {'newField': 10} }, upsert=False, multi=False...
Previously, datatables were initialized as follows: var oTable = $("#selector").dataTable(); This used to return a jQuery object which would stored in the variable oTable. And then to access the api to modify table properties, we had to initialize the api differently, as shown below: ...
Conditional predicate will be cleaner and safer by using the NSCompoundPredicate class which provides basic boolean operators for the given predicates. Objective-c AND - Condition NSPredicate *predicate = [NSPredicate predicateWithFormat:@"samplePredicate"]; NSPredicate *anotherPre...

Page 404 of 505