Tutorial by Examples

Samtools can be used to convert between sam and bam: -b indicates that the input file will be in BAM format -S indicates that the stdout should be in SAM format samtools view -sB thing.bam > thing.sam And to convert between sam and bam: samtools view thing.sam > thing.bam samtools ...
Create a new text file named HelloWorld.java and paste this code in it: import org.eclipse.swt.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; public class HelloWorld { public static void main(String[] args) { final Display display = new Display(); ...
Parallelism in Haskell can be expressed using the Eval Monad from Control.Parallel.Strategies, using the rpar and rseq functions (among others). f1 :: [Int] f1 = [1..100000000] f2 :: [Int] f2 = [1..200000000] main = runEval $ do a <- rpar (f1) -- this'll take a while... b <- rpa...
rpar :: Strategy a executes the given strategy (recall: type Strategy a = a -> Eval a) in parallel: import Control.Concurrent import Control.DeepSeq import Control.Parallel.Strategies import Data.List.Ordered main = loop where loop = do putStrLn "Enter a number" ...
We can use rseq :: Strategy a to force an argument to Weak Head Normal Form: f1 :: [Int] f1 = [1..100000000] f2 :: [Int] f2 = [1..200000000] main = runEval $ do a <- rpar (f1) -- this'll take a while... b <- rpar (f2) -- this'll take a while and then some... rseq a return ...
[UIView animateWithDuration:1.0 animations:^{ someView.alpha = 0; otherView.alpha = 1; } completion:^(BOOL finished) { [someView removeFromSuperview]; }]; The carat “^” character defines a block. For example, ^{ … } is a block. More specifically, it is a blo...
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <list> <value>classpath:ReleaseBundle.properties</value> </list> </bean>
Big Data, in its most basic form, can be described as the umbrella term metricized by different aspects of data. These different aspects are Volume(Huge quantity of Data), Velocity(Greater dataflow speeds), Variety(Structured, Unstructured and Semi-structured Data) and Veracity(Making right decis...
try: metadata = metadata['properties'] except KeyError: pass
Add Firebase to Your Android Project Add Firebase to your app To add Firebase to your app you'll need a Firebase project and a Firebase configuration file for your app. Create a Firebase project in the Firebase console, if you don't already have one. If you already have an existing Google proje...
A Cmd cannot be reused after calling its Run, Output or CombinedOutput methods Running a command twice will not work: cmd := exec.Command("xte", "key XF86AudioPlay") _ := cmd.Run() // Play audio key press // .. do something else err := cmd.Run() // Pause audio key press,...
Parameters can be specified in path property of route configuration 'use strict'; const Hapi = require('hapi'); // Create a server with a host and port const server = new Hapi.Server(); server.connection({ host: 'localhost', port: 8000 }); // Add a route path with url par...
TextBox txt = (TextBox)FindControl(yourtxt_Id);
In Rust, there are two main methods to indicate something has gone wrong in a program: A function returning a (potentially custom-defined) Err(E), from the Result<T, E> type and a panic!. Panicking is not an alternative for exceptions, which are commonly found in other languages. In Rust, a p...
Creating arrays explicitly using ArrayNew() Declare an array with the ArrayNew function. Specify the number of dimensions as an argument. ArrayNew(dimension) creates an array of 1–3 dimensions. ColdFusion arrays expand dynamically as data is added. ArrayNew() returns an array. History Intr...
To view all elements in the index change the print options that “sparsifies” the display of the MultiIndex. pd.set_option('display.multi_sparse', False) df.groupby(['A','B']).mean() # Output: # C # A B # a 1 107 # a 2 102 # a 3 115 # b 5 92 # b 8 98 # c 2 87 # c 4 104 #...
The header ctype.h is a part of the standard C library. It provides functions for classifying and converting characters. All of these functions take one parameter, an int that must be either EOF or representable as an unsigned char. The names of the classifying functions are prefixed with 'is'. Ea...
Function countUnique(r As range) As Long 'Application.Volatile False ' optional Set r = Intersect(r, r.Worksheet.UsedRange) ' optional if you pass entire rows or columns to the function Dim c As New Collection, v On Error Resume Next ' to ignore the Run-time error 457: "Th...
import xlsxwriter # create a new file workbook = xlsxwriter.Workbook('your_file.xlsx') # add some new formats to be used by the workbook percent_format = workbook.add_format({'num_format': '0%'}) percent_with_decimal = workbook.add_format({'num_format': '0.0%'}) bold = workbook.add_forma...

Page 935 of 1336