Tutorial by Examples: sin

The & symbol may be used in a message to allow parameters to be passed to it. Ordered Parameters Message 777 of class sabapdemos: Message with type &1 &2 in event &3 Calling this message with three parameters will return a message using the parameters: MESSAGE i050(sabapdemo...
Most special characters can be escaped using the caret(^). Take a look at the following example. echo > Hi echo ^> Hi This first command would not output > Hi because > is a special character, which means redirect output to a file. In this case, the file is named "Hi" Ho...
As the powershell is installed by default on every windows system from 7/2008 and above it can be used for more complex calculations: @echo off set "expression=(2+3)*10/1000" for /f %%# in ('"powershell %expression%"') do set result=%%# echo %result% Mind the additional do...
WSH/JScript is installed on every windows system since NT so using it for more complex calculations makes it pretty portable. JScript is easier for combining it with batch file : @if (@codesection==@batch) @then @echo off set "expression=2*(2+3)/1000" for /f %%# in ('cscript //nologo...
<?php // if device exists, update timestamp $stmt = $mysqli->prepare("UPDATE new_devices SET nd_timestamp=? WHERE nd_deviceid=?"); $stmt->bind_param('ss', $now, $device); $stmt->execute(); //echo "Affected Rows: ".$stmt->affected_rows; // T...
Here we can find some useful method using PackageManager, Below method will help to get the app name using package name private String getAppNameFromPackage(String packageName, Context context) { Intent mainIntent = new Intent(Intent.ACTION_MAIN, null); mainIntent.addCategory(Intent.CATE...
\documentclass[12pt]{article} \usepackage{titleps} \usepackage{fancyhdr} \usepackage{graphicx} \usepackage{lipsum} % for dummy text \pagestyle{myheadings} \pagestyle{fancy} \fancyhf{} \setlength{\headheight}{30pt} \renewcommand{\headrulewidth}{4pt} \renewcommand{\footrulewidth}{2pt...
\documentclass[12pt]{article} \usepackage{lastpage} \usepackage{fancyhdr} \usepackage{graphicx} \usepackage{lipsum} % for dummy text \pagestyle{myheadings} \pagestyle{fancy} \fancyhf{} \setlength{\headheight}{30pt} \renewcommand{\headrulewidth}{1pt} \renewcommand{\footrulewidth}{2p...
For example without a barrel, a consumer would need three import statements: import { HeroComponent } from '../heroes/hero.component.ts'; import { Hero } from '../heroes/hero.model.ts'; import { HeroService } from '....
You can make function passed to test() method async - then you can use await keyword. Your test will wait until Promises resolve and testing asynchronous code becomes easier and more readable. In the following example call that returns a Promise is changeset.validate(). Please notice also wrapping s...
For creating custom annotations we need to decide Target - on which these annotations will work on like field level, method level, type level etc. Retention - to what level annotation will be available. For this, we have built in custom annotations. Check out these mostly used ones: @Target...
You can also update R from within R by using a handy package called installr. Open R Console (NOT RStudio, this doesn't work from RStudio) and run the following code to install the package and initiate update. install.packages("installr") library("installr") updateR()
Initializing data structure #include <stdio.h> #include <string.h> #include <ei.h> Encoding number #include <stdio.h> #include <ei.h> int main() { } Encoding atom Encoding tuple Encoding list Encoding map
Two main techniques allow passing data between GUI functions and Callbacks: setappdata/getappdata and guidata (read more about it). The former should be used for larger variables as it is more time efficient. The following example tests the two methods' efficiency. A GUI with a simple button is cre...
Consider this example: He went into the cafe "Dostoevski" and said: "Good evening." Here we have two sets of quotes. Let's assume we want to match both, so that our regex matches at "Dostoevski" and "Good evening." At first, you could be tempted to keep...
On the shoulders of the low level drivers, there is pomm. It proposes a modular approach, data converters, listen/notify support, database inspector and much more. Assuming, Pomm has been installed using composer, here is a complete example: <?php use PommProject\Foundation\Pomm; $loader = re...
This example will show you back navigation which is expected generally in most of the flows. You will have to add following code to every screen depending on expected behavior. There are 2 cases: If there are more than 1 screen on stack, device back button will show previous screen. If there is ...
// add tags and categories to pages function add_taxonomies_to_pages() { register_taxonomy_for_object_type( 'post_tag', 'page' ); register_taxonomy_for_object_type( 'category', 'page' ); } add_action( 'init', 'add_taxonomies_to_pages' ); if ( ! is_admin() ) { add_action( 'pre_get_posts...
You can add this code to your custom functions.php file: // add tags and categories to pages function add_taxonomies_to_pages() { register_taxonomy_for_object_type( 'post_tag', 'page' ); register_taxonomy_for_object_type( 'category', 'page' ); } add_action( 'init', 'add_taxonomies_to...

Page 158 of 161