Tutorial by Examples: o

There are following setups to install opencart on your webserver Download the latest version of opencart for the official website or github and extract the files. In extracted files you can see the upload folder, license.txt file and readme.txt file The upload folder contains all the files to...
Alternate ways to install SymPy from conda. conda is the recommended way, but these are some alternate ways. Including: git, pip, etc.
NSIS installer can be downloaded from http://nsis.sourceforge.net/Download. An exe of 1.6 MB will be downloaded. You can install it using the wizard. While installing there are options to install 1. Full: Installs all the components 2. Lite: Basic and only essential components from the UI 3. Mi...
<!doctype html> <html> <head> <style> body{ background-color:white; } #canvas{border:1px solid red; } </style> <script> window.onload=(function(){ var canvas = document.getElementById("canvas"); var ctx = canvas.getContext(&...
This function will insert an element into an array at a given index: insert(){ h=' ################## insert ######################## # Usage: # insert arr_name index element # # Parameters: # arr_name : Name of the array variable # index : Index to insert at #...
foo() { while [[ "$#" -gt 0 ]] do case $1 in -f|--follow) local FOLLOW="following" ;; -t|--tail) local TAIL="tail=$2" ;; esac shift done echo "FOLLOW: $FOLLOW" echo "TAIL: $...
Steps#1-5 below allow any image or path-shape to be both moved anywhere on the canvas and rotated to any angle without changing any of the image/path-shape's original point coordinates. Move the canvas [0,0] origin to the shape's center point context.translate( shapeCenterX, shapeCenterY ); ...
The Compare attribute compares two properties of a model. The error message can be specified using property ErrorMessage, or using resource files. To use Compare attribute include using for the following namespace: using System.ComponentModel.DataAnnotations; Then you can use the attribute in ...
Canvas apps often rely heavily on user interaction with the mouse, but when the window is resized, the mouse event coordinates that canvas relies on are likely changed because resizing causes the canvas to be offset in a different position relative to the window. Thus, responsive design requires tha...
ps aux | grep <search-term> shows processes matching search-term Example: root@server7:~# ps aux | grep nginx root 315 0.0 0.3 144392 1020 ? Ss May28 0:00 nginx: master process /usr/sbin/nginx www-data 5647 0.0 1.1 145124 3048 ? S Jul18 2:53 nginx: worke...
core.async is about making processes that take values from and put values into channels. (require [clojure.core.async :as a]) Creating channels with chan You create a channel using the chan function: (def chan-0 (a/chan)) ;; unbuffered channel: acts as a rendez-vous point. (def chan-1 (a/chan...
/** * @var \Vendor\Module\Helper\Data */ protected $customHelper; /** * Constructor call * @param \Vendor\Module\Helper\Data $customHelper */ public function __construct( \Vendor\Module\Helper\Data $customHelper ) { $this->customHelper = $customHelper; parent::__co...
You can improve the security for data transit or storing by implementing encrypting techniques. Basically there are two approaches when using System.Security.Cryptography: symmetric and asymmetric. Symmetric Encryption This method uses a private key in order to perform the data transformation. ...
One of the core benefits of Typescript is that it enforces data types of values that you are passing around your code to help prevent mistakes. Let's say you're making a pet dating application. You have this simple function that checks if two pets are compatible with each other... checkCompatible...
Code class Program { static void Main(string[] args) { int a = 20; Console.WriteLine("Inside Main - Before Callee: a = {0}", a); Callee(a); Console.WriteLine("Inside Main - After Callee: a = {0}", a); Console.WriteLine(); ...
This very simple snippet of XQuery can be executed in QueryConsole using the built-in "Documents" database as a sandbox. Each piece of the snippet has a comment to explain what the following line of code means. xquery version "1.0-ml"; (: Let's first insert a simple document to...
If we know the desired URI of the document we are looking for: fn:doc("/stuff/mysimpledocument.xml") Returns the full document from the database, using the URI to locate it. Since this is XQuery, we can use XPath to find the document when we know about the structure, but not the URI: ...
We will now add some additional XML nodes to the "my-document" element and update the document. The snippet again contains comments to explain what is happening. xquery version "1.0-ml"; (: We are preserving the same URI as we used originally :) let $uri := "/stuff/mysimp...
MarkLogic is first and foremost a search engine, so let's use two different methods to search for this document. Using search:search() This gives a peek into using search:search() to develop search applications. This library provides Google-like search results and will likely speed up your develop...
To round out simple examples of CRUD operations, we present the following examples. Always use great care in deleting documents. (: When we know the URI, we can delete it very easily :) let $uri := "/stuff/mysimpledocument.xml" return xdmp:document-delete($uri) or simplified: xdmp:d...

Page 584 of 1038