Tutorial by Examples: c

Increase the saturation level of an image with ctx.globalCompositeOperation = 'saturation'; The amount of the effect can be controled with the alpha setting or the amount of saturation in the fill overlay // Render the image ctx.globalCompositeOperation='source-atop'; ctx.drawImage(image, 0, ...
Simple pull When you are working on a remote repository (say, GitHub) with someone else, you will at some point want to share your changes with them. Once they have pushed their changes to a remote repository, you can retrieve those changes by pulling from this repository. git pull Will do it, ...
Excel formulas are used to process simple or complex equations and output the result to a specific cell within a worksheet. (There is an exception to this where the WorksheetFunction class is used in VBA programming, however VBA is out of scope for this tag - please refer to the excel-vba or vba ...
This function return the standart gravity constant in the specified acceleration units (1 for cm/s², 2 for ft/s², 3 for m/s²) /** * Returns the standard gravity constant in the specified acceleration units * Values taken from https://en.wikipedia.org/wiki/Standard_gravity on July 24, 2016. ...
In order to prevent a button from firing multiple times within a short period of time (let's say 2 clicks within 1 second, which may cause serious problems if the flow is not controlled), one can implement a custom SingleClickListener. This ClickListener sets a specific time interval as threshold (...
Html5 Canvas gives you the ability to fetch and change the color of any pixel on the canvas. You can use Canvas's pixel manipulation to: Create a color-picker for an image or select a color on a color-wheel. Create complex image filters like blurring and edge detection. Recolor any part of an ...
PrepareForSegue: func prepareForSegue(_ segue:UIStoryboardSegue, sender sender:AnyObject?) Notifies the view controller that a segue is about to be performed Parameters segue: The segue object. sender: The object that initialized the segue. Example in Swift Perform a task if the ident...
ShouldPerformSegueWithIdentifier: func shouldPerformSegueWithIdentifier(_ identifier:String, sender sender:AnyObject?) -> Bool Determines whether the segue with the specified identifier should be performed. Parameters Identifier: String that identifies the triggered segue Sender: The...
Unwind Segues Unwind Segues give you a way to “unwind” the navigation stack and specify a destination to go back to. The signature of this function is key to Interface Builder recognizing it. It must have a return value of IBAction and take one parameter of UIStoryboardSegue. The name of the ...
PerformSegueWithIdentifier: func performSegueWithIdentifier(_ identifier:String, sender sender:AnyObject?) Initiates the segue with the specified identifier from the current view controller's storyboard file Parameters Identifier: String that identifies the triggered segue Sender: The ob...
Map k v provides a Monoid instance with the following semantics: mempty is the empty Map, i.e. the same as Map.empty m1 <> m2 is the left-biased union of m1 and m2, i.e. if any key is present both in m1 and m2, then the value from m1 is picked for m1 <> m2. This operation is also ava...
If the administrator creates your database for you when setting up your permissions, you can begin using it. Otherwise, you need to create it yourself: mysql> CREATE DATABASE menagerie; Under Unix, database names are case sensitive (unlike SQL keywords), so you must always refer to your datab...
Overview Gtk+ supports a workflow where the task of user interface design and the task of programming are decoupled. Although the user interface elements such as buttons, menus, layout etc. can be directly added from code, this approach not only clutters the code, but also makes changing the UI for...
In some instances, you will want to send data from JS client to the R server. Here is a basic example using javascript's Shiny.onInputChange function: library(shiny) runApp( list( ui = fluidPage( # create password input HTML('<input type="password" id="passw...
To install DevExpress .NET products on your development machine, it is first necessary to obtain the DevExpress .NET Products Installer. You can download it from the http://www.devexpress.com website in one of the following ways, based on the status of your current account. Download the Trial ...
You can use the heroku create command to create a Heroku application. Each application you deploy to Heroku has its own code base, environment variables, addons, etc. Each Heroku application has a globally unique name. If you try to create a Heroku application whose name is already taken, you will ...
This a python example function for sequence writing in fasta format. Parameters: filename(String) - A file name for writing sequence in fasta format. seq(String) - A DNA or RNA sequence. id(String) - The ID of the given sequence. desc(String) - A short description of the given sequence. im...
This example demonstrates usage of POSIX record locks (a.k.a. process-associated locks), provided by fcntl function (POSIX base standard). Notes: Exclusive and shared locks are supported. Can be applied to a byte range, optionally automatically expanding when data is appended in future (control...
This example demonstrates usage of lockf function (POSIX XSI). Notes: Only exclusive locks are supported. Can be applied to a byte range, optionally automatically expanding when data is appended in future (controlled by len argument and position set with lseek function). Locks are released on ...
Components and Props As React concerns itself only with an application's view, the bulk of development in React will be the creation of components. A component represents a portion of the view of your application. "Props" are simply the attributes used on a JSX node (e.g. <SomeComponen...

Page 481 of 826