Tutorial by Examples: sin

Sitecore Instance Manager is open-source tool which is used for managing the local park of Sitecore instances. You can install, locate, maintain, reinstal or delete Sitecore products. It also helps you install your sitecore instance with any sitecore packages, modules and only thing you need to do i...
Vectors can be used as a 2D matrix by defining them as a vector of vectors. A matrix with 3 rows and 4 columns with each cell initialised as 0 can be defined as: std::vector<std::vector<int> > matrix(3, std::vector<int>(4)); C++11 The syntax for initializing them using initia...
CREATE TABLE new_table_name LIKE existing_table_name;
All the records create using CloudKit-related code can be previewed, edited and even removed in CloudKit Dashboard. To access CloudKit Dashboard, go here. There are several parts in the dashboard: Record Types (which will be discussed later) Security Roles (which is where you can set databases ...
[footag foo="value of 1" attribute-2="value of 2"] In wordpress admin we use pre defined shortcodes by writing the shortcode name inside square brackets and optionally adding attributes to it separating by space.
<?php echo do_shortcode("[footag foo='Hi! I am a foo output']"); ?> To print a shortcode using php use the do_shortcode function and echo the returned value.
The following C code uses the OpenMP parallel programming model to write the thread ID and number of threads to stdout using multiple threads. #include <omp.h> #include <stdio.h> int main () { #pragma omp parallel { // ID of the thread in the current team ...
First of all we need to add SQLite support to our application. There are two ways of doing that Download DLL suiting your system from SQLite download page and then add to the project manually Add SQLite dependency via NuGet We'll do it the second way First open the NuGet menu and search f...
You can use a method annotated with @testSetup to write code that will have been executed before each test run: public class AccountService { public static Account fetchAccount() { return [ SELECT Id, Name FROM Account LIMIT 1 ]; } } @isTest public class AccountServiceTest { priv...
While you can use the @testSetup annotation to designate a method to be run before tests are executed, this method will usually only be run once. If you need code to be run before each test, you can use a static block: @isTest public class MyTest { static { // code here will be run before ...
A common chore with charts in Excel is standardizing the size and layout of multiple charts on a single sheet. If done manually, you can hold down ALT while resizing or moving the chart to "stick" to cell boundaries. This works for a couple charts, but a VBA approach is much simpler. Co...
However, x in the generator expression is not just variable, but can be any pattern. In cases of pattern mismatch the generated element is skipped over, and processing of the list continues with the next element, thus acting like a filter: [x | Just x <- [Just 1, Nothing, Just 3]] -- [1, 3] ...
x = np.random.random([100,100]) x.tofile('/path/to/dir/saved_binary.npy') y = fromfile('/path/to/dir/saved_binary.npy') z = y.reshape(100,100) all(x==z) # Output: # True
When data is "tidy," it is often organized into several tables. To combine the data for analysis, we need to "update" one table with values from another. For example, we might have sales data for performances, where attributes of the performer (their budget) and of the location ...
Bottom sheets slide up from the bottom of the screen to reveal more content. They were added to the Android Support Library in v25.1.0 version and supports above all the versions. Make sure the following dependency is added to your app's build.gradle file under dependencies: compile 'com.android...
The syntax for using the aws cli is as follows: aws [options] <command> <subcommand> [parameters] Some examples using the 'ec2' command and the 'describe-instances' subcommand: aws ec2 describe-instances aws ec2 describe-instances --instance-ids <your-id> Example with a ...
You can do a permissions check when sending an Intent to a registered broadcast receiver. The permissions you send are cross-checked with the ones registered under the tag. They restrict who can send broadcasts to the associated receiver. To send a broadcast request with permissions, specify the p...
If you want to Download image as Bitmap using Picasso following code will help you: Picasso.with(mContext) .load(ImageUrl) .into(new Target() { @Override public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) { // Todo: Do some...
git log --pretty=format:"%Cgreen%ci %Cblue%cn %Cgreen%cr%Creset %s" This will give a nice overview of all commits (1 per line) with date, user and commit message. The --pretty option has many placeholders, each starting with %. All options can be found here
To initialize a static final fields that require using more than a single expression, a static initializer can be used to assign the value. The following example initializes a unmodifiable set of Strings: public class MyClass { public static final Set<String> WORDS; static {...

Page 83 of 161