Tutorial by Examples: l

In this code example, the char pointer p is initialized to the address of a string literal. Attempting to modify the string literal has undefined behavior. char *p = "hello world"; p[0] = 'H'; // Undefined behavior However, modifying a mutable array of char directly, or through a poin...
Smoothing, also known as blurring, is one of the most commonly used operation in Image Processing. The most common use of the smoothing operation is to reduce noise in the image for further processing. There are many algorithms to perform smoothing operation. We'll look at one of the most commonl...
Detailed instructions on getting resharper set up or installed.
With the shape-outside CSS property one can define shape values for the float area so that the inline content wraps around the shape instead of the float's box. CSS img:nth-of-type(1) { shape-outside: circle(80px at 50% 50%); float: left; width: 200px; } img:nth-of-type(2) { shape-ou...
A hexadecimal number is a value in base-16. There are 16 digits, 0-9 and the letters A-F (case does not matter). A-F represent 10-16. An octal number is a value in base-8, and uses the digits 0-7. A binary number is a value in base-2, and uses the digits 0 and 1. All of these numbers result in ...
let strings = "bananas,apples,pear".split(","); split returns an iterator. for s in strings { println!("{}", s) } And can be "collected" in a Vec with the Iterator::collect method. let strings: Vec<&str> = "bananas,apples,pear"....
Python has only limited support for parsing ISO 8601 timestamps. For strptime you need to know exactly what format it is in. As a complication the stringification of a datetime is an ISO 8601 timestamp, with space as a separator and 6 digit fraction: str(datetime.datetime(2016, 7, 22, 9, 25, 59, 55...
Given a JList like JList myList = new JList(items); the selected items in the list can be modified through the ListSelectionModel of the JList: ListSelectionModel sm = myList.getSelectionModel(); sm.clearSelection(); // clears the selection sm.setSelectionInterval(inde...
This example adds a list of places with image and name by using an ArrayList of custom Place objects as dataset. Activity layout The layout of the activity / fragment or where the RecyclerView is used only has to contain the RecyclerView. There is no ScrollView or a specific layout needed. <?x...
There can be situations when you decide that one set of display objects should always be above another set of objects, for example, arrows over heads, explosions over something that just exploded, etc. To perform this as simple as possible, you need to designate and create a set of Sprites, arrange ...
Send-MailMessage -From [email protected] -Subject "Email Subject" -To [email protected] -SmtpServer smtp.com
$parameters = @{ From = '[email protected]' To = '[email protected]' Subject = 'Email Subject' Attachments = @('C:\files\samplefile1.txt','C:\files\samplefile2.txt') BCC = '[email protected]' Body = 'Email body' BodyAsHTML = $False CC = '[email protected]' Credential = Get-Crede...
Install JDK 8 (Windows, Linux) and set the path (Windows). Install Scala (Linux), For Windows visit http://www.scala-lang.org/download/ download and install binary distribution, set the environment variable for scala in PATH which is in \scala\bin. Installing Typesafe activator (It contains Scal...
Constructor overloading is not available in As3. In order to provide a different way to retrieve an instance of a class, a public static method can be provided to serve as an alternative "constructor". An example for that is flash.geom.Point, which represents a 2D point object. The coor...
The most common way to install the RSpec gem is using Bundler. Add this line to your application's Gemfile: gem 'rspec' And then execute bundle to install the dependencies: $ bundle Alternatively, you can install the gem manually: $ gem install rspec After installing the gem, run the fol...
import flash.net.URLRequest; import flash.media.Sound; import flash.media.SoundChannel; import flash.events.Event; var snd:Sound; = new Sound(); var sndChannel:SoundChannel var sndTimer:Timer; snd.addEventListener(Event.COMPLETE, soundLoaded); snd.load(new URLRequest("soundFile.mp3&...
import flash.net.URLRequest; import flash.media.Sound; import flash.events.Event; var req:URLRequest = new URLRequest("filename.mp3"); var snd:Sound = new Sound(req); snd.addEventListener(Event.COMPLETE, function(e: Event) { snd.play(0, int.MAX_VALUE); // There is no way to...
import flash.net.URLRequest; import flash.media.Sound; import flash.events.Event; var req:URLRequest = new URLRequest("click.mp3"); var snd:Sound = new Sound(req); snd.addEventListener(Event.COMPLETE, function(e: Event) { snd.play(); }
package { import flash.events.EventDispatcher; public class AbstractDispatcher extends EventDispatcher { public function AbstractDispatcher(target:IEventDispatcher = null) { super(target); } } } To dispatch an event on an instance: var dispatcher:AbstractDispatcher =...
There are situations when you need to calculate something really large in your Flash application, while not interrupting the user's experience. For this, you need to devise your lengthy process as a multi-step process with saved state between iterations. For example, you need to perform a background...

Page 157 of 861