Tutorial by Examples: du

Update your project with git pull origin master Update s.version inside MyRepo.podspec Check local errors with pod lib lint MyRepo.podspec git add . & git commit -m "Update pods version" git push origin master Make a new release pod trunk push MyRepo.podspec Source
array_reduce reduces array into a single value. Basically, The array_reduce will go through every item with the result from last iteration and produce new value to the next iteration. Usage: array_reduce ($array, function($carry, $item){...}, $defaul_value_of_first_carry) $carry is the result f...
XE2 program CrossPlatformHelloWorld; uses FMX.Dialogs; {$R *.res} begin ShowMessage('Hello world!'); end. Most of the Delphi supported platforms (Win32/Win64/OSX32/Android32/iOS32/iOS64) also support a console so the WriteLn example fits them well. For the platforms that require...
Most programming languages, including F#, evaluate computations immediately in accord with a model called Strict Evaluation. However, in Lazy Evaluation, computations are not evaluated until they are needed. F# allows us to use lazy evaluation through both the lazy keyword and sequences. // define ...
F#, like most programming languages, uses Strict Evaluation by default. In Strict Evaluation, computations are executed immediately. In contrast, Lazy Evaluation, defers execution of computations until their results are needed. Moreover, the results of a computation under Lazy Evaluation are cached,...
From command line: cpan -l From a Perl script: use ExtUtils::Installed; my $inst = ExtUtils::Installed->new(); my @modules = $inst->modules();
It is good practice to test the calling program's __name__ variable before executing your code. import sys def main(): # Your code starts here # Don't forget to provide a return code return 0 if __name__ == "__main__": sys.exit(main()) Using this pattern ens...
The analog to the meteordump command is meteorrestore. You can do a partial import by selecting the specific collection to import. Particularly useful after running a drop command. # make sure your app is running meteor # then import your data mongorestore --port 3001 --db meteor /path/to/dump...
The following might have undefined behavior due to incorrect pointer alignment: char *memory_block = calloc(sizeof(uint32_t) + 1, 1); uint32_t *intptr = (uint32_t*)(memory_block + 1); /* possible undefined behavior */ uint32_t mvalue = *intptr; The undefined behavior happens as the pointer...
Example of declarations are: int a; /* declaring single identifier of type int */ The above declaration declares single identifier named a which refers to some object with int type. int a1, b1; /* declaring 2 identifiers of type int */ The second declaration declares 2 identifiers named a1 a...
If we consider a heterogenous list, wherein the elements of the list have varied but known types, it might be desirable to be able to perform operations on the elements of the list collectively without discarding the elements' type information. The following example implements a mapping operation ov...
This option causes a dump file to be generated and allows you to specify the relative size of that file (that is, small, medium, or large). Usage: -XXdumpsize:<size> <size>DescriptionnoneDoes not generate a dump file.smallOn Windows, a small dump file is generated (on Linux a full c...
Objects come in their own class, so a simple example would be a car (detailed explanations below): public class Car { //Variables describing the characteristics of an individual car, varies per object private int milesPerGallon; private String name; private String color; ...
Any project that targets netstandard1.X can be packed into a NuGet package by running: dotnet pack The resulting package can be uploaded to NuGet, MyGet, or hosted in a local package source.
Below code showcases multiple Producer/Consumer program. Both Producer and Consumer threads share same global queue. import java.util.concurrent.*; import java.util.Random; public class ProducerConsumerWithES { public static void main(String args[]) { BlockingQueue<Integer> ...
Node modules import url from 'url'; import moment from 'moment'; Meteor packages import { Meteor } from 'meteor/meteor'; import { SimpleSchema } from 'meteor/aldeed:simple-schema';
// Default export export default {}; // Named export export const SomeVariable = {};
xml_import_example.info.yml type: module name: XML import example package: Examples description: "This module helps understanding the Batch API and Queue API with an XML import example" core: 8.x xml_import_example.permissions.yml import content from xml: title: 'Import content...
survival is the most commonly used package for survival analysis in R. Using the built-in lung dataset we can get started with Survival Analysis by fitting a regression model with the survreg() function, creating a curve with survfit(), and plotting predicted survival curves by calling the predict m...
C++14 Those following duration user literals are declared in the namespace std::literals::chrono_literals, where both literals and chrono_literals are inline namespaces. Access to these operators can be gained with using namespace std::literals, using namespace std::chrono_literals, and using names...

Page 16 of 47