Tutorial by Examples: e

You can iterate over the contents of a dictionary with dict for, which is similar to foreach: set theDict {abcd {ab cd} bcde {ef gh} cdef {ij kl}} dict for {theKey theValue} $theDict { puts "$theKey -> $theValue" } This produces this output: abcd -> ab cd bcde -> ef gh c...
Sometimes you need to match a literal (sub-)string with a regular expression despite that substring containing RE metacharacters. While yes, it's possible to write code to insert appropriate backslashes to make that work (using string map) it is easiest to just prefix the pattern with ***=, which ma...
Design (layout XML): <AutoCompleteTextView android:id="@+id/autoCompleteTextView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_centerHorizontal="true&...
Marshal class contains a function named PtrToStructure, this function gives us the ability of reading structures by an unmanaged pointer. PtrToStructure function got many overloads, but they all have the same intention. Generic PtrToStructure: public static T PtrToStructure<T>(IntPtr ptr); ...
DECLARE CURSOR c_emp_to_be_raised(p_sal emp.sal%TYPE) IS SELECT * FROM emp WHERE sal < p_sal; BEGIN FOR cRowEmp IN c_emp_to_be_raised(1000) LOOP dbms_Output.Put_Line(cRowEmp .eName ||' ' ||cRowEmp.sal||'... should be raised ;)'); END LOOP; END; /
SYS_REFCURSOR can be used as a return type when you need to easily handle a list returned not from a table, but more specifically from a function: function returning a cursor CREATE OR REPLACE FUNCTION list_of (required_type_in IN VARCHAR2) RETURN SYS_REFCURSOR IS v_ SYS_REFCURSOR; BEGIN...
This is a minimal possible XSLT transformation. It produces the string value of the source XML document. The output format is text. Source XML document: <t>Hello, World!</t> XSLT transformation: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/T...
If you don't have Visual Studio 2015, go to https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx and select Visual Studio Community. It is a free version that have all the required capabilities to develop Windows 10 application. You can install the Enterprise Edition if you ha...
You can override the default vmoptions with your own personal settings by choosing Help > Edit Custom VM Options from the toolbar. This will create a local copy of the file which you are free to edit. For example, if you double the value set for Xmx, the maximum size of the memory allocation poo...
This example shows the base of almost any XSLT transformation and the most fundamental XSLT design pattern. Producing as output an XML document that is identical to the source XML document. Source XML document: <t>Hello, World!</t> XSLT transformation: <xsl:stylesheet version=&q...
qplot is intended to be similar to base r plot() function, trying to always plot out your data without requiring too much specifications. basic qplot qplot(x = disp, y = mpg, data = mtcars) adding colors qplot(x = disp, y = mpg, colour = cyl,data = mtcars) adding a smoother qplot(x = d...
C++11 During exception handling there is a common use case when you catch a generic exception from a low-level function (such as a filesystem error or data transfer error) and throw a more specific high-level exception which indicates that some high-level operation could not be performed (such as b...
A downcast can be used to make use of a subclass's code and data inside of a function taking a parameter of its superclass. class Rat { var color = "white" } class PetRat: Rat { var name = "Spot" } func nameOfRat(🐭: Rat) -> String { guard let petRat = ...
In the following code let us assume for simplicity that float and uint32_t have the same size. void fun(uint32_t* u, float* f) { float a = *f *u = 22; float b = *f; print("%g should equal %g\n", a, b); } u and f have different base type, and thus the compiler can a...
Detailed instructions on getting seaborn set up or installed.
If we have two pointer arguments of the same type, the compiler can't make any assumption and will always have to assume that the change to *e may change *f: void fun(float* e, float* f) { float a = *f *e = 22; float b = *f; print("is %g equal to %g?\n", a, b); } f...
Detailed instructions on getting MarkLogic set up or installed can be found in the Installation Guide. The full offering of documentation is available via docs.marklogic.com The overall setup process involves Installing the binary/rpm Starting the services Configuring first and subsequent host...
Copy byte-per-byte of a file The following function copies a file into another by performing an exact byte-per-byte copy, ignoring the kind of content (which can be either lines of characters in some encoding or binary data): (defun byte-copy (infile outfile) (with-open-file (instream infile :d...
A common use of macros is to create templates for data structures which obey common rules but may contain different fields. By writing a macro, you can allow the detailed configuration of the data structure to be specified without needing to repeat boilerplate code, nor to use a less efficient struc...
Server side (Host Webservices) Web services must be installed and running (deployed) in a web server as web application components. They can be part of a bigger application, or they can be deployed alone as they may compose a complete application. It is responsibility of the server to forward an i...

Page 651 of 1191