Tutorial by Examples: alle

$> perl -MFoo::Bar\ 9999 $> Foo::Bar version 9999 required--this is only version 1.1.
To use multi-threading in MATLAB one can use the batch command. Note that you must have the Parallel Computing toolbox installed. For a time-consuming script, for example, for ii=1:1e8 A(ii)=sin(ii*2*pi/1e8); end to run it in batch mode one would use the following: job=batch("da&quot...
The Symfony Installer is a command line tool that helps you to create new Symfony applications. It requires PHP 5.4 or higher. Downloading and installing the Symfony Installer on Linux / MacOS Open a terminal and execute the following commands: sudo mkdir -p /usr/local/bin sudo curl -LsS https:/...
cx_Freeze - a tool can package your project to excutable/installer after install it by pip, to package demo.py, we need setup.py below. import sys from cx_Freeze import setup, Executable # Dependencies are automatically detected, but it might need fine tuning. build_exe_options = { &...
To calculate the sum of terms (of type float, int or big integer) of a number list, it is preferable to use List.sum In other cases, List.fold is the function that is best suited to calculate such a sum. Sum of complex numbers In this example, we declare a list of complex numbers and we calcu...
One of several applications of bit manipulation is converting a letter from small to capital or vice versa by choosing a mask and a proper bit operation. For example, the a letter has this binary representation 01(1)00001 while its capital counterpart has 01(0)00001. They differ solely in the bit in...
The following prints the current caller class. Note that in this case, the StackWalker needs to be created with the option RETAIN_CLASS_REFERENCE, so that Class instances are retained in the StackFrame objects. Otherwise an exception would occur. public class StackWalkerExample { public stat...
Detailed instructions on getting windows-installer set up or installed.
Gpars offers intuitive ways to handle tasks concurrently import groovyx.gpars.* GParsPool.withPool { def result = dataList.collectParallel { processItem(it) } }
To list all the packages installed in ubuntu, type below command $ apt list --installed Output will show all the installed packages. Listing... Done accountsservice/trusty-updates,now 0.6.35-0ubuntu7.3 i386 [installed] acl/trusty,now 2.2.52-1 i386 [installed,automatic] acpid/trusty,...
If you do not see any logging, you can check if Configure() is called in your application. The easiest way is to add it as an attribute to your assembly: [assembly: log4net.Config.XmlConfigurator(Watch = true)] Then you do not have to add log4net.Config.XmlConfigurator.Configure() anywhere in y...
The procedures bellow will temporarily disable all Excel features at WorkBook and WorkSheet level FastWB() is a toggle that accepts On or Off flags FastWS() accepts an Optional WorkSheet object, or none If the ws parameter is missing it will turn all features on and off for all WorkSh...
import sys import json # load input arguments from the text file filename = sys.argv[ 1 ] with open( filename ) as data_file: input_args = json.loads( data_file.read() ) # cast strings to floats x, y = [ float(input_args.get( key )) for key in [ 'x', 'y' ] ] print json.dumps( { ...
Many repetitive jobs can be performed more efficiently if you utilize more of your computer's resources (i.e. CPU's and RAM). Below is an example of running multiple jobs in parallel. Suppose you have a < list of files >, say output from ls. Also, let these files are bz2 compressed and the fo...
Now, let's imagine we have 1 large file (e.g. 30 GB) that needs to be converted, line by line. Say we have a script, convert.sh, that does this <task>. We can pipe contents of this file to stdin for parallel to take in and work with in chunks such as <stdin> | parallel --pipe --block &l...
ng-repeat is the built-in directive provided by AngularJS, mostly used for listing the array elements on UI dynamically as per the changes in our model. Official "ng-repeat" docs can be found at : https://docs.angularjs.org/api/ng/directive/ngRepeat Also the most common error faced whil...

Page 7 of 7