Tutorial by Examples: dp

End a line with two or more spaces to create a line break. Ending a line with no spaces or with just one space doesn't create a line beak. Use two or more spaces to create a line break. Use an empty line to make a new paragraph. Ending a line with no spaces or with just one space...
Examine the following strings: foobarfoo bar foobar barfoo the regular expression bar will match all four strings, \bbar\b will only match the 2nd, bar\b will be able to match the 2nd and 3rd strings, and \bbar will match the 2nd and 4th strings.
Each time WordPress loads the page, it will run main loop. The loop is the way to iterate over all elements related to the page you are currently on. Main loop will work on a global WP_Query object. The query has a globalized method have_posts(), that allows us to loop through all results. Finally...
This design pattern is useful for generating a sequence of asynchronous actions from a list of elements. There are two variants : the "then" reduction, which builds a chain that continues as long as the chain experiences success. the "catch" reduction, which builds a chain t...
DataFrame: import pandas as pd import numpy as np np.random.seed(5) df = pd.DataFrame(np.random.randint(100, size=(5, 5)), columns = list("ABCDE"), index = ["R" + str(i) for i in range(5)]) df Out[12]: A B C D E R0 99 78 61 16 73...
MediaPlayer class can be used to control playback of audio/video files and streams. Creation of MediaPlayer object can be of three types: Media from local resource MediaPlayer mediaPlayer = MediaPlayer.create(context, R.raw.resource); mediaPlayer.start(); // no need to call prepare(); create...
Haskell is a pure language, meaning that expressions cannot have side effects. A side effect is anything that the expression or function does other than produce a value, for example, modify a global counter or print to standard output. In Haskell, side-effectful computations (specifically, those wh...
There are three visibility types that you can apply to methods (class/object functions) and properties (class/object variables) within a class, which provide access control for the method or property to which they are applied. You can read extensively about these in the PHP Documentation for OOP Vi...
$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...
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(); }
(defun foobar (x y) (format t "X: ~s~@ Y: ~s~%" x y)) (foobar 10 20) ; X: 10 ; Y: 20 ;=> NIL
Keyword parameters can be defined with the &KEY keyword. They are always optional (see the Optional Parameters example for details of the definition). There may be multiple keyword parameters. (defun foobar (x y &key (z "Default" zp)) (format t "X (~s) and Y (~s) are requi...
Each pair in the dictionary is an instance of KeyValuePair with the same type parameters as the Dictionary. When you loop through the dictionary with For Each, each iteration will give you one of the Key-Value Pairs stored in the dictionary. For Each kvp As KeyValuePair(Of String, String) In curren...
From the official documentation: Gradle. dependencies { compile "com.squareup.picasso:picasso:2.5.2" } Maven: <dependency> <groupId>com.squareup.picasso</groupId> <artifactId>picasso</artifactId> <version>2.5.2</version> </dep...
SharedPreferences allows you to store primitive data types only (boolean, float, long, int, String, and string set). You cannot store more complex objects in SharedPreferences, and as such is really meant to be a place to store user settings or similar, it's not meant to be a database to keep user d...
Enum classes can also declare members (i.e. properties and functions). A semicolon (;) must be placed between the last enum object and the first member declaration. If a member is abstract, the enum objects must implement it. enum class Color { RED { override val rgb: Int = 0xFF0000 ...
Background pages are implicit pages which contain background scripts. A background script is a single long-running script to manage some task or state. It exists for the lifetime of your extension, and only one instance of it at a time is active. You can declare it like this in your manifest.json: ...
var a:Number=0.123456789; trace(a); // 0.123456789 trace(a.toPrecision(4)); // 0.1235 trace(a.toFixed(4)); // 0.1235 trace(a.toExponential(4)); // 1.2345e-1 trace(a.toString(16)); // 0 - works for integer part only var b:Number=12345678.9876543; // a bigg...
reference : NetConnection , NetStream , Video related topics : Working with Sound Basic example of playing an external video file (FLV, MP4, F4V). Code will also play M4A audio files. var nc:NetConnection = new NetConnection(); nc.connect(null); var ns:NetStream = new NetStream(nc); va...
Predicates that impede or prohibit a declarative reading of Prolog programs are extra-logical. Examples of such predicates are: !/0 (->)/2 and if-then-else (\+)/1 These predicates can only be understood procedurally, by taking into account the actual control flow of the interpreter, and a...

Page 4 of 21