Tutorial by Examples: e

The following function reads an entire file into a new string and returns it: (defun read-file (infile) (with-open-file (instream infile :direction :input :if-does-not-exist nil) (when instream (let ((string (make-string (file-length instream)))) (read-sequence string instr...
Class Car ... ' Parameterless Constructor Public Sub Class_Initialize() distances_ = Array(0) End Sub ' Default initialization method that can be invoked without ' explicitly using the method name. Public Default Function Init(wheels) wheels_ = ...
Quotes will be output as-is: echo "Some Text" "Some Text" Comment tokens are ignored: echo Hello World REM this is not a comment because it is being echoed! Hello World REM this is not a comment because it is being echoed! However, echo will still output var...
SET TEST=0 IF %TEST% == 0 ( echo TEST FAILED ) ELSE IF %TEST% == 1 ( echo TEST PASSED ) ELSE ( echo TEST INVALID )
FIND command can scan large files line-by-line to find a certain string. It doesn't support wildcards in the search string. find /i "Completed" "%userprofile%\Downloads\*.log" >> %targetdir%\tested.log TYPE scan2.txt | FIND "Failed" /c && echo Scan fai...
The following script shows more advanced split file technique, where FOR function loops through a list of files in a directory, and each file content is piped to FINDSTR that looks for a string containing substring var preceded by undefined number of spaces and superseded by any extra text. Once fou...
Basic Syntax Julia's array comprehensions use the following syntax: [expression for element = iterable] Note that as with for loops, all of =, in, and ∈ are accepted for the comprehension. This is roughly equivalent to creating an empty array and using a for loop to push! items to it. result ...
Configuring the Primary Server Requirements: Replication User for replication activities Directory to store the WAL archives Create Replication user createuser -U postgres replication -P -c 5 --replication + option -P will prompt you for new password + option -c is for max...
To download NetBeans IDE just visit the NetBeans site and download the proper version of the IDE based on your OS, Architecture and technologies. You can select from the following technologies: Java SE. Supports all standard Java SE development features as well as support for NetBeans Platform ...
This example renders justified text. It adds extra functionality to the CanvasRenderingContext2D by extending its prototype or as a global object justifiedText (optional see Note A). Example rendering. Code to render this image is in the usage examples at the bottom. The Example The functi...
Renders text as justified paragraphs. REQUIRES the example Justified text Example render Top paragraph has setting.compact = true and bottom false and line spacing is 1.2 rather than the default 1.5. Rendered by code usage example bottom of this example. Example code // Requires justified...
Detailed instructions on getting embedded-linux set up or installed. ARM Versatile Express Emulation On Qemu Environment Introduction: Host ubuntu :- 12.04 Linux kernel version: linux-4.4 busybox version: 1.24.0 Cross compiler tool chain: arm-2014.05-29-arm-none-linux-gnueabi-i686-pc-linux gnu...
Enumeration types can also be declared without giving them a name: enum { buffersize = 256, }; static unsigned char buffer [buffersize] = { 0 }; This enables us to define compile time constants of type int that can as in this example be used as array length.
Setup An Electron project structure usually looks like this: hello-world-app/ ├── package.json ├── index.js └── index.html Now let's create the files and initialize our package.json. $ mkdir hello-world-app && cd hello-world-app $ touch index.js $ touch index.html $ npm init N...
These two properties work in a similar fashion as the overflow property and accept the same values. The overflow-x parameter works only on the x or left-to-right axis. The overflow-y works on the y or top-to-bottom axis. HTML <div id="div-x"> If this div is too small to displa...
Detailed instructions on getting glsl set up or installed.
Julia uses the standard mathematical meanings of arithmetic operations when applied to matrices. Sometimes, elementwise operations are desired instead. These are marked with a full stop (.) preceding the operator to be done elementwise. (Note that elementwise operations are often not as efficient as...
To get started: Install celery pip install celery configure celery (head to the remarks section) from __future__ import absolute_import, unicode_literals from celery.decorators import task @task def add_number(x, y): return x + y You can run this asynchronously by using the ....
Wrapper script is a script that wraps another script or command to provide extra functionalities or just to make something less tedious. For example, the actual egrep in new GNU/Linux system is being replaced by a wrapper script named egrep. This is how it looks: #!/bin/sh exec grep -E "$@&q...
You can have functions in the PS1 variable, just make sure to single quote it or use escape for special chars: gitPS1(){ gitps1=$(git branch 2>/dev/null | grep '*') gitps1="${gitps1:+ (${gitps1/#\* /})}" echo "$gitps1" } PS1='\u@\h:\w$(gitPS1)$ ' It will...

Page 675 of 1191