Tutorial by Examples: o

gnu-cobol is available via the homebrew system. Open a terminal window from /Applications/Utilities/Terminal or use the keypress Command+Space and type "Terminal". If you do not have the homebrew system installed, add it by typing, or copying and pasting into your terminal: ruby -e &quo...
PHP has built in function pcntl_fork for creating child process. pcntl_fork is same as fork in unix. It does not take in any parameters and returns integer which can be used to differentiate between parent and child process. Consider the following code for explanation <?php // $pid is the P...
Interprocess communication allows programmers to communicate between different processes. For example let us consider we need to write an PHP application that can run bash commands and print the output. We will be using proc_open , which will execute the command and return a resource that we can com...
The simplest possible binary you could build Has no dependencies Takes no command line arguments Just writes "Hello world!" to stdout After you've built buildapp, you can just... $ buildapp --eval '(defun main (argv) (declare (ignore argv)) (write-line "Hello, world!"))'...
A more realistic example involves a project you're building with multiple files on disk (rather than an --eval option passed to buildapp), and some dependencies to pull in. Because arbitrary things can happen during the finding and loading of asdf systems (including loading other, potentially unrel...
Aside from pinned examples, it is not possible to enforce the order of examples. Instead, order is naturally selected in descending order of total votes. The most popular example will therefore bubble to the top of the collection of examples.
HTML Form Use a file type input and the browser will provide a field that lets the user select a file to upload. Only forms with the post method can send file data. Make sure to set the form's enctype=multipart/form-data attribute. Otherwise the file's name will be sent but not the file's data...
Uploaded files are available in request.files, a MultiDict mapping field names to file objects. Use getlist — instead of [] or get — if multiple files were uploaded with the same field name. request.files['profile'] # single file (even if multiple were sent) request.files.getlist('charts') # li...
WTForms provides a FileField to render a file type input. It doesn't do anything special with the uploaded data. However, since Flask splits the form data (request.form) and the file data (request.files), you need to make sure to pass the correct data when creating the form. You can use a Combine...
It may be useful to have one catch-all view where you handle complex logic yourself based on the path. This example uses two rules: The first rule specifically catches / and the second rule catches arbitrary paths with the built-in path converter. The path converter matches any string (including sl...
An enumerations value in no way needs to be unique: #include <stdlib.h> /* for EXIT_SUCCESS */ #include <stdio.h> /* for printf() */ enum Dupes { Base, /* Takes 0 */ One, /* Takes Base + 1 */ Two, /* Takes One + 1 */ Negative = -1, AnotherZero /* Takes Negativ...
SQL Server 2008 R2 SET TRANSACTION ISOLATION LEVEL SNAPSHOT Specifies that data read by any statement in a transaction will be the transactionally consistent version of the data that existed at the start of the transaction, i.e., it will only read data that has been committed prior to the transa...
We can create it by two way. First from database properties designer mode: And by sql scripts: USE master; GO -- Create the database with the default data -- filegroup and a log file. Specify the -- growth increment and the max size for the -- primary data file. CREATE DATABASE TestDB ON...
CROSS APPLY enables you to "join" rows from a table with dynamically generated rows returned by some table-value function. Imagine that you have a Company table with a column that contains an array of products (ProductList column), and a function that parse these values and returns a set ...
CROSS APPLY enables you to "join" rows from a table with collection of JSON objects stored in a column. Imagine that you have a Company table with a column that contains an array of products (ProductList column) formatted as JSON array. OPENJSON table value function can parse these values...
If you store a list of tags in a row as coma separated values, STRING_SPLIT function enables you to transform list of tags into a table of values. CROSS APPLY enables you to "join" values parsed by STRING_SPLIT function with a parent row. Imagine that you have a Product table with a colu...
Stop the MySQL (mysqld) server/daemon process. Start the MySQL server process the --skip-grant-tables option so that it will not prompt for a password: mysqld_safe --skip-grant-tables & Connect to the MySQL server as the root user: mysql -u root Change password: (5.7.6 and newer): ALT...
Detailed instructions on getting azure-active-directory set up or installed.
It is well known that you cannot use the same file for input and ouput in the same command. For instance, $ cat header.txt body.txt >body.txt doesn’t do what you want. By the time cat reads body.txt, it has already been truncated by the redirection and it is empty. The final result will be th...
On Julia, you can define more than one method for each function. Suppose we define three methods of the same function: foo(x) = 1 foo(x::Number) = 2 foo(x::Int) = 3 When deciding what method to use (called dispatch), Julia chooses the more specific method that matches the types of the argument...

Page 580 of 1038