Tutorial by Examples: 3

maplist/2 and maplist/3 are higher-order predicates, which allow the definition of a predicate to be lifted about a single element to lists of such elements. These predicates can be defined using call/2 and call/3 as building blocks and ship with many Prolog systems. For example: ?- maplist(dif(a)...
3D transforms can be use to create many 3D shapes. Here is a simple 3D CSS cube example: HTML: <div class="cube"> <div class="cubeFace"></div> <div class="cubeFace face2"></div> </div> CSS: body { perspective-origin: 5...
using System; using System.Security.Cryptography; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { string source = "Hello World!"; using (SHA384 sha384Hash = SHA384.Create()) ...
Installing aws cli in Ubuntu / Debian Instance sudo apt-get install -y python-dev python-pip sudo pip install awscli aws --version aws configure Installing aws cli using python Using pip you can install aws cli in windows, OS X and Linux sudo pip install awscli Configuring the AWS Comman...
Unit Test Unit tests are used to ensure that your code has no syntax error and to test the logic of your code to work as what you expected. Quick example: src/AppBundle/Calculator/BillCalculator.php <?php namespace AppBundle\Calculator; use AppBundle\Calculator\TaxCalculator; class Bi...
Because in .NET 3.5 and older you don't have Lazy<T> class you use the following pattern: public class Singleton { private Singleton() // prevents public instantiation { } public static Singleton Instance { get { return Nested.instanc...
Build numberDescription15.0.4623.1001June 201415.0.4631.1001July 201415.0.4641.1001August 201415.0.4649.1001September 201415.0.4659.1001October 201415.0.4667.1000November 201415.0.4675.1000December 201415.0.4693.1001February 201515.0.4701.1001March 201515.0.4711.1000April 2015 (SP1 REQ)15.0.4719.100...
This attribute can change the background of the Status Bar icons (at the top of the screen) to white. <style name="AppTheme" parent="Theme.AppCompat"> <item name="android:windowLightStatusBar">true</item> </style>
High Level Design The 80386 is a 32-bit processor, with a 32-bit addressable memory space. The designers of the Paging subsystem noted that a 4K page design mapped into those 32 bits in quite a neat way - 10 bits, 10 bits and 12 bits: +-----------+------------+------------+ | Dir index | Page ind...
cdecl is a Windows 32-bit function calling convention which is very similar to the calling convention used on many POSIX operating systems (documented in the i386 System V ABI). One of the differences is in returning small structs. Parameters Parameters are passed on the stack, with the first arg...
stdcall is used for 32-bit Windows API calls. Parameters Parameters are passed on the stack, with the first parameter closest to the top of the stack. The callee will pop these values off of the stack before returning. Return Value Scalar return values are placed in EAX. Saved and Clobbered Re...
# make this routine available outside this translation unit .globl string_to_integer string_to_integer: # function prologue push %ebp mov %esp, %ebp push %esi # initialize result (%eax) to zero xor %eax, %eax # fetch pointer to the string mov 8(%ebp), %e...
As parameters (8, 16, 32 bits) 8, 16, 32 bits integers are always passed, on the stack, as full width 32 bits values1. No extension, signed or zeroed, is needed. The callee will just use the lower part of the full width values. //C prototype of the callee void __attribute__((cdecl)) foo(char ...
As parameters (float, double) Floats are 32 bits in size, they are passed naturally on the stack. Doubles are 64 bits in size, they are passed, on the stack, respecting the Little Endian convention1, pushing first the upper 32 bits and than the lower ones. //C prototype of callee double foo(dou...
Since the Physical Address Extension (PAE) mode that was introduced in the Pentium Pro (and Pentum M) was such a change to the Operating System memory management subsystem, when Intel designed the Pentium II they decided to enhance the "normal" Page mode to support the new Physical Address...
Add following record in 'your_file.xml': <openerp> <data> <template id="assets_common" name="your_module_name assets" inherit_id="web.assets_common"> <xpath expr="." position="inside"> <link rel...
#Edit the value of a cell (2 methods) $Sheet->Range("A1")->{Value} = 1234; $Sheet->Cells(1,1)->{Value} = 1234; #Edit the values in a range of cells $Sheet->Range("A8:C9")->{Value} = [[ undef, 'Xyzzy', 'Plugh' ], [ 42, 'Pe...
The sum 1 + 2 + 3 + ... + n Simplifies to n(n+1) / 2. Notice that this quantity is Θ(n2). This shortcut arises frequently in the analysis of algorithms like insertion sort or selection sort. Numbers of the form n(n+1)/2 are called the triangular numbers.
Const baseString As String = "Foo Bar" Dim leftText As String leftText = Left$(baseString, 3) 'leftText = "Foo"
Const baseString As String = "Foo Bar" Dim rightText As String rightText = Right$(baseString, 3) 'rightText = "Bar"

Page 2 of 11