Tutorial by Examples

Double Tilde ~~ will perform bitwise NOT operation twice. The following example illustrates use of the bitwise NOT (~~) operator on decimal numbers. To keep the example simple, decimal number 3.5 will be used, cause of it's simple representation in binary format. let number = 3.5; let complement...
~~ Could be used on non-numeric values. A numeric expression will be first converted to a number and then performed bitwise NOT operation on it. If expression cannot be converted to numeric value, it will convert to 0. true and false bool values are exceptions, where true is presented as numeric v...
We can use ~ as a shorthand in some everyday scenarios. We know that ~ converts -1 to 0, so we can use it with indexOf on array. indexOf let items = ['foo', 'bar', 'baz']; let el = 'a'; if (items.indexOf('a') !== -1) {} or if (items.indexOf('a') >= 0) {} can be re-written as if (...
The following example illustrates use of the bitwise NOT (~) operator on decimal numbers. To keep the example simple, decimal number 3.5 will be used, cause of it's simple representation in binary format. let number = 3.5; let complement = ~number; Result of the complement number equals to -4;...
Detailed instructions on getting jenkins-pipeline set up or installed.
Here are some basic best practices for Excel: Flat File Database - Excel IS a Flat File application and should be treated as such Less Worksheet/Workbooks is more. Analyzing will be much faster with fewer worksheets/workbooks to go through. Try to ensure that all raw data is on one workshe...
A simple OGL 4.0 GLSL shader program that shows the use shader subroutines. The program is executed with a phyton script. To run the script, PyOpenGL and NumPy must be installed. The subroutines switch between different geometry generated in the geometry shader and change the surface representatio...
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=...
From the GitHub repo of RxJava, RxJava is a Java VM implementation of Reactive Extensions: a library for composing asynchronous and event-based programs by using observable sequences. It extends the observer pattern to support sequences of data/events and adds operators that allow you to compose seq...
STUFF(Original_Expression, Start, Length, Replacement_expression) STUFF() function inserts Replacement_expression, at the start position specified, along with removing the characters specified using Length parameter. Select FirstName, LastName,Email, STUFF(Email, 2, 3, '*****') as StuffedEmail Fr...
Create a New Project on Google Developer Console To integrate Android application with Google Drive, create the credentials of project in the Google Developers Console. So, we need to create a project on Google Developer console. To create a project on Google Developer Console, follow these steps:...
We will add a file on Google Drive. We will use the createFile() method of a Drive object to create file programmatically on Google Drive. In this example we are adding a new text file in the user’s root folder. When a file is added, we need to specify the initial set of metadata, file contents, and...
Tastypie can be installed with python package management, ie, pip or we can directly checkout the code from Github pip install django-tastypie Checkout from Github
There are other API frameworks out there for Django. You need to assess the options available and decide for yourself. That said, here are some common reasons for tastypie. You need an API that is RESTful and uses HTTP well. You want to support deep relations. You DON’T want to have to write yo...
Tastypie is a reusable app (that is, it relies only on its own code and focuses on providing just a REST-style API) and is suitable for providing an API to any application without having to modify the sources of that app. Not everyone’s needs are the same, so Tastypie goes out of its way to provide...
Up to now we tried get request. (If you need to try other HTTP resquest, use some API testing tools like curl or postman) If you try sending a POST/PUT/DELETE to the resource, you find yourself getting “401 Unauthorized” errors. For safety, Tastypie ships with the authorization class set to ReadOnl...
This is an example of a basic GUI with two buttons that change a value stored in the GUI's handles structure. function gui_passing_data() % A basic GUI with two buttons to show a simple use of the 'handles' % structure in GUI building % Create a new figure. f = figure(); ...
SQL Server 2012 Returns the item at the specified index from a list of values. If index exceeds the bounds of values then NULL is returned. Parameters: index: integer, index to item in values. 1-based. values: any type, comma separated list SELECT CHOOSE (1, 'apples', 'pears', 'oranges', 'b...

IIF

SQL Server 2012 Returns one of two values, depending on whether a given Boolean expression evaluates to true or false. Parameters: boolean_expression evaluated to dtermine what value to return true_value returned if boolean_expression evaluates to true false_value returned if boolean_expressi...
There are three main ways to do sequential plot or animations: plot(x,y), set(h , 'XData' , y, 'YData' , y) and animatedline. If you want your animation to be smooth, you need efficient drawing, and the three methods are not equivalent. % Plot a sin with increasing phase shift in 500 steps x = lin...

Page 1296 of 1336