Tutorial by Examples

In Oracle a DATE data type does not have a format; when Oracle sends a DATE to the client program (SQL/Plus, SQL/Developer, Toad, Java, Python, etc) it will send 7- or 8- bytes which represent the date. A DATE which is not stored in a table (i.e. generated by SYSDATE and having "type 13" ...
Use TO_CHAR( date [, format_model [, nls_params]] ): (Note: if a format model is not provided then the NLS_DATE_FORMAT session parameter will be used as the default format model; this can be different for every session so should not be relied on. It is good practice to always specify the format mod...
When Oracle implicitly converts from a DATE to a string or vice-versa (or when TO_CHAR() or TO_DATE() are explicitly called without a format model) the NLS_DATE_FORMAT session parameter will be used as the format model in the conversion. If the literal does not match the format model then an excepti...
When SQL/Plus or SQL Developer display dates they will perform an implicit conversion to a string using the default date format model (see the Setting the Default Date Format Model example). You can change how a date is displayed by changing the NLS_DATE_FORMAT parameter.
CREATE CONTEXT my_ctx USING my_pkg; This creates a context that can only be set by routines in the database package my_pkg, e.g.: CREATE PACKAGE my_pkg AS PROCEDURE set_ctx; END my_pkg; CREATE PACKAGE BODY my_pkg AS PROCEDURE set_ctx IS BEGIN DBMS_SESSION.set_context('MY_CTX','...
The RewriteEngine module within Apache is used to dynamically rewrite URLs and paths depending on various expressions provided: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d ...
A rank-1 array value can be created using an array constructor, with the syntax (/ ... /) [ ... ] The form [...] was introduced in Fortran 2003 and is generally regarded as clearer to read, especially in complex expressions. This form is used exclusively in this example. The values featuring ...
set(my_global_string "a string value" CACHE STRING "a description about the string variable") set(my_global_bool TRUE CACHE BOOL "a description on the boolean cache entry") In case a cached variable is already defined in the cache when CMake processes the ...
set(my_variable "the value is a string") By default, a local variable is only defined in the current directory and any subdirectories added through the add_subdirectory command. To extend the scope of a variable there are two possibilities: CACHE it, which will make it globally av...
When it comes to geographic data, R shows to be a powerful tool for data handling, analysis and visualisation. Often, spatial data is avaliable as an XY coordinate data set in tabular form. This example will show how to create a spatial data set from an XY data set. The packages rgdal and sp provi...
rgdal ESRI shape files can easily be imported into R by using the function readOGR() from the rgdal package. library(rgdal) shp <- readORG(dsn = "/path/to/your/file", layer = "filename") It is important to know, that the dsn must not end with / and the layer does not all...
package { import flash.text.TextField; import flash.display.Sprite; public class TextHello extends Sprite { public function TextHello() { var tf:TextField = new TextField(); tf.text = "Hello World!" tf.x = 50; tf...
Currying is the transformation of a function of n arity or arguments into a sequence of n functions taking only one argument. Use cases: When the values of some arguments are available before others, you can use currying to decompose a function into a series of functions that complete the work in s...
Concurrent collections are a generalization of thread-safe collections, that allow for a broader usage in a concurrent environment. While thread-safe collections have safe element addition or removal from multiple threads, they do not necessarily have safe iteration in the same context (one may not...
'Prefer composition over inheritance' is an important and popular programming principle, used to assign behaviors to objects, as opposed to inheriting many often unneeded behaviors. Behaviour factories var speaker = function (state) { var noise = state.noise || 'grunt'; return { ...
macro(set_my_variable _INPUT) if("${_INPUT}" STREQUAL "Foo") set(my_output_variable "foo") else() set(my_output_variable "bar") endif() endmacro(set_my_variable) Use the macro: set_my_variable("Foo") message(STATUS ${my_outpu...
macro(set_custom_variable _OUT_VAR) set(${_OUT_VAR} "Foo") endmacro(set_custom_variable) Use it with set_custom_variable(my_foo) message(STATUS ${my_foo}) which will print -- Foo
The difference between size and count is: size counts NaN values, count does not. df = pd.DataFrame( {"Name":["Alice", "Bob", "Mallory", "Mallory", "Bob" , "Mallory"], "City":["Seattle", &q...
A method defined in an interface is by default public abstract. When an abstract class implements an interface, any methods which are defined in the interface do not have to be implemented by the abstract class. This is because a class that is declared abstract can contain abstract method declaratio...
Sometimes developers write some code that desires access to stage, or Flash stage, to add listeners. It can work for the first time, then all of a sudden fail to work and produce the error 1009. The code in question can even be on the timeline, as it's the first initiative to add code there, and man...

Page 258 of 1336