Tutorial by Examples: c

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 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','...
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...
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...
function listener(e:Event):void { var m:MovieClip=e.target as MovieClip; m.x++; } If such a listener is attached to an object that's not a MovieClip descendant (for example, a Sprite), the typecast will fail, and any subsequent operations with its result will throw the 1009 error.
var a:Object; trace(a); // null trace(a.b); // Error 1009 Here, an object reference is declared, but is never assigned a value, be it with new or assignment of a non-null value. Requesting its properties or method results in a 1009 error.
s=this.getChildByName("garbage"); if (s.parent==this) {...} getChildByName() is one of the many functions that can return null if an error occurred when processing its input. Therefore, if you are receiving an object from any function that can possibly return null, check for null first...
prerequisite of scrapy installation: Python 2.7 or above 3.3 pip and setuptools Python packages. lxml OpenSSL. You can install Scrapy using pip. To install using pip run: pip install Scrapy Platform specific installation Anaconda This is the recommended way to install Scrapy. ...
interface ITable { // an indexer can be declared in an interface object this[int x, int y] { get; set; } } class DataTable : ITable { private object[,] cells = new object[10, 10]; /// <summary> /// implementation of the indexer declared in the interface //...
4.0 Declare an associative array declare -A aa Declaring an associative array before initialization or use is mandatory. Initialize elements You can initialize elements one at a time as follows: aa[hello]=world aa[ab]=cd aa["key with space"]="hello world" You can al...

Page 160 of 826