Tutorial by Examples

SELECT 1 a, '' b from DUAL; AB1(null)
SELECT 3 * NULL + 5, 'Hello ' || NULL || 'world' from DUAL; 3*NULL+5'HELLO'||NULL||'WORLD'(null)Hello world
SELECT a column_with_null, NVL(a, 'N/A') column_without_null FROM (SELECT NULL a FROM DUAL); COLUMN_WITH_NULLCOLUMN_WITHOUT_NULL(null)N/A NVL is useful to compare two values which can contain NULLs : SELECT CASE WHEN a = b THEN 1 WHEN a <> b THEN 0 else -1 END comparison_without_n...
If the first parameter is NOT NULL, NVL2 will return the second parameter. Otherwise it will return the third one. SELECT NVL2(null, 'Foo', 'Bar'), NVL2(5, 'Foo', 'Bar') FROM DUAL; NVL2(NULL,'FOO','BAR')NVL2(5,'FOO','BAR')BarFoo
SELECT COALESCE(a, b, c, d, 5) FROM (SELECT NULL A, NULL b, NULL c, 4 d FROM DUAL); COALESCE(A,B,C,D,5)4 In some case, using COALESCE with two parameters can be faster than using NVL when the second parameter is not a constant. NVL will always evaluate both parameters. COALESCE will stop a...
A Frame is created like any other controls: <Frame x:Name="contentRoot" Navigated="OnNavigated" Navigating="OnNavigating" /> The navigated/navigating events can then be intercepted to cancel the navigation or show/hide the back button. private...
To navigate to a newest page, we can use the Navigate() method from the frame. contentRoot.Navigate(typeof(MyPage), parameter); where contentRoot is the Frame instance and MyPage a control inheriting from Page In MyPage, the OnNavigatedTo() method will be called once the navigation will complet...
A function that extends the functionality of the array by creating an object oriented remove function. // Need to restrict the extension to elements that can be compared. // The `Element` is the generics name defined by Array for its item types. // This restriction also gives us access to `index(...
There are some spawning rules in Worlds in Bukkit. They are: Animal Spawning Creature Spawning Amount of the above that can be spawned Animal Spawning Animal spawning can be split into the following categories: Water Animals Land Animals To get the amount of animals that can be...
Detailed instructions on getting c++-cli set up or installed.
A good way to visualize a 2d array is as a list of lists. Something like this: lst=[[1,2,3],[4,5,6],[7,8,9]] here the outer list lst has three things in it. each of those things is another list: The first one is: [1,2,3], the second one is: [4,5,6] and the third one is: [7,8,9]. You can access ...
π's Metaprogramming bits & bobs Goals: Teach through minimal targeted functional/useful/non-abstract examples (e.g. @swap or @assert) that introduce concepts in suitable contexts Prefer to let the code illustrate/demonstrate the concepts rather than paragraphs of explanation Avoi...
MQTT(Message Queue Telemetry Transport) is a Publish-Subscribe based "lightweight" messaging protocol for use on top of the TCP/IP stack. It is quite useful for connections with remote locations where a small code footprint is required and/or network bandwidth is at a premium. Ther...
import cv2 def canny_webcam(): "Live capture frames from webcam and show the canny edge image of the captured frames." cap = cv2.VideoCapture(0) while True: ret, frame = cap.read() # ret gets a boolean value. True if reading is successful (I think). frame ...
An input port can be created in many ways, but usually the method starts with open-input-. String port You can use a string as a port using open-input-string. It will create a port that will be able to read from the string. (define p (open-input-string "(a . (b . (c . ()))) 34")) ...
Reading from an input port can be done in many ways. We can use the read method used by the REPL. It will read and interpret space separated expressions. Taking the example from the string port above. We can read from the port like this: (define p (open-input-string "(a . (b . (c . ()))) 3...
import pyglet audio = pyglet.media.load("audio.wav") audio.play() For further information, see pyglet
There is a particular syntax that allow us to write cons cell in a more compact way than using the cons constructor. A pair can be written as such: '(1 . 2) == (cons 1 2) The big difference is that we can create pairs using quote. Otherwise, Scheme would create a proper list (1 . (2 . '())). T...
A pair can be create with the cons function. The name of the function stand for constructor. In Scheme, everything is pretty much based on pairs. (cons a b) The function return a pair containing the element a and b. The first parameter of cons is called car (Content Address Register) and the sec...
The data in the pair can be accessed with utility functions. To access the car, we have to use the car function. (car (cons a b)) > a Also we can verify the following equality: (eq? a (car (cons a b))) > #t

Page 1057 of 1336