Tutorial by Examples: ti

AlchemyLanguage's Targeted Sentiment feature can search your content for target phrases and return sentiment information for each result. This example requires AlchemyLanguage service credentials and Node.js Use a command-line interface to install the Watson Developer Cloud Node.js SDK: $...
AlchemyLanguage can detect general concepts referenced in your content. The service returns Linked Data links for each concept and a URL to a relevant website when possible. This example requires AlchemyLanguage service credentials and Node.js Use a command-line interface to install the Wats...
A value_ptr is a smart pointer that behaves like a value. When copied, it copies its contents. When created, it creates its contents. // Like std::default_delete: template<class T> struct default_copier { // a copier must handle a null T const* in and return null: T* operator()(T co...
If you would like to use vim in a manner similar to sed, you may use the -c flag to run an ex command from the command line. This command will run automatically before presenting the file to you. For example, to replace foo with bar: vim file.txt -c "s/foo/bar" This will open up the fi...
The java command supports a wide range of options: All options start with a single hyphen or minus-sign (-): the GNU/Linux convention of using -- for "long" options is not supported. Options must appear before the <classname> or the -jar <jarfile> argument to be recog...
Enable the module by typing: sudo a2enmod ssl Restart the web server (apache2) so the change is recognized: sudo service apache2 restart Optional (but a good idea): Create a directory that will contain our new certificate files: sudo mkdir /etc/apache2/ssl Create the key and self-signed ...
A question that occasionally on StackOverflow is whether it is appropriate to use assert to validate arguments supplied to a method, or even inputs provided by the user. The simple answer is that it is not appropriate. Better alternatives include: Throwing an IllegalArgumentException using cust...
What can happen in your config file is having a path to a variable that goes through multiple sections. Example Config admins: first-tier: "Kerooker" second-tier: "Mordekaiser" third-tier: "Yesh4" The name "Kerooker" is from section "first-tier...
Classes implement an interface to meet the interface's contract. For example, a C# class may implement IDisposable, public class Resource : IDisposable { private MustBeDisposed internalResource; public Resource() { internalResource = new MustBeDisposed(); } ...
Function contracts allow the programer to check for inconsistencies. Inconsistencies include invalid parameters, checks for the correct return value or an invalid state of the object. The checks can happen before and after the body of the function or method is executed. void printNotGreaterThan42(...
For example if an method is invoked the state of the object may not allow that a method is called with specific parameters or not at all. class OlderThanEighteen { uint age; final void driveCar() in { assert(age >= 18); // variable must be in range } body { ...
Test the application using the development web server, which is included with the App Engine SDK. Run the following Maven command from within your helloworld directory, to compile your app and start the development web server: mvn appengine:devserver The web server is now listening for re...
Detailed instructions on getting sybase set up or installed.
Since Qt 5.5 we have a new wonderful TreeView, a control we've all been waiting for. A TreeView implements a tree representation of items from a model. In general it looks like other QML views - ListView or TableView. But data structure of TreeView is more complex. A data in ListView or TableView...
import sympy as sy x1, x2 = sy.symbols("x1 x2") equations = [ sy.Eq( 2*x1 + 1*x2 , 10 ), sy.Eq( 1*x1 - 2*x2 , 11 ) ] print sy.solve(equations) # Result: {x1: 31/5, x2: -12/5}
import sympy as sy x, y = sy.symbols("x y") # nsolve needs the (in this case: two) equations, the names of the variables # (x,y) we try to evaluate solutions for, and an initial guess (1,1) for the # solution print sy.nsolve((x**3+sy.exp(y)-4,x+3*y),(x,y),(1,1)) The result s...
Even if the result type of the query isn’t an entity type, if the result contains entity types they will still be tracked by default Example : In the following query, which returns an anonymous type, the instances of Book in the result set will be tracked using (var context = new BookC...
We can change our toast using SetGravity method. This method takes three parameters: first is gravity of toast on screen and two others set toast offset from the starting position (which is set by the first parameter): //Toast at bottom left corner of screen Toast t = Toast.MakeText(context, mess...
Detailed instructions on getting clion set up or installed.
Usage To install a module (assuming cpanm is already installed): cpanm Data::Section cpanm ("cpanminus") strives to be less verbose than cpan but still captures all of the installation information in a log file in case it is needed. It also handles many "interactive questions&quo...

Page 345 of 505