Tutorial by Examples

<script src= "http://player.twitch.tv/js/embed/v1.js"></script> <div id="PLAYER_DIV_ID"></div> <script type="text/javascript"> var options = { width: 854, height: 480, video: "v53336925", };...
WordPress [WP] is an open source Content Management System for building apps, websites, and blogs. WP is written in PHP and uses MySQL as the data store for the user content and configuration. It has a rich ecosystem of plugins and themes and enjoys a vibrant open source community, good documentatio...
A module can be "imported", or otherwise "required" by the require() function. For example, to load the http module that ships with Node.js, the following can be used: const http = require('http'); Aside from modules that are shipped with the runtime, you can also require mod...
Node provides the module.exports interface to expose functions and variables to other files. The most simple way to do so is to export only one object (function or variable), as shown in the first example. hello-world.js module.exports = function(subject) { console.log('Hello ' + subject); }...
Considering the following users table: idusername1User12User23User34User45User5 In order to constrain the number of rows in the result set of a SELECT query, the LIMIT clause can be used together with one or two positive integers as arguments (zero included). LIMIT clause with one argument When ...
Bold text can be created by surrounding text with either double asterisks or double underscores: **Bolded text** __Also bolded text__ Result: Bolded text Also bolded text
Italics can be created by surrounding text with either asterisks or with underscores: *Italicized text* _Also italicized_ Result: Italicized text Also italicized
To create strike-through text, surround the text with ~~double tildes~~. Note: on StackExchange this formatting isn't included. Instead use the html tag <s>text</s>. (In chat you can use ---three hyphens---.)
Interface and implementation of a simple category on NSArray, named Filter, with a single method that filters numbers. It is good practice to add a prefix (PF) to the method to ensure we don't overwrite any future NSArray methods. @interface NSArray (PFFilter) - (NSArray *)pf_filterSmaller:(dou...
The following is how to properly use the java.util.Scanner class to interactively read user input from System.in correctly( sometimes referred to as stdin, especially in C, C++ and other languages as well as in Unix and Linux). It idiomatically demonstrates the most common things that are requested ...
This Ruby example uses Mechanize, a library to automate web interactions. client_id is an OAuth client_id. game is the game directory to list. require 'mechanize' master_agent = Mechanize.new client_id = "123" game = "Minecraft" url = "https://api.twitch.tv/kraken...
Markdown supports adding inline code like this, obtained by wrapping text in backticks: `code here` Alternatively, you can put your inline code between <code> and </code> HTML tags. Consider the following markdown code: `This` is an inline code block! <code>This</code> is...
On StackExchange sites, code snippets may provide optional syntax highlighting. On sites like Stack Overflow the default language is derived from the tags used in the associated question (if applicable). In addition, a code snippet's syntax highlighting language may also be defined by adding an HTML...
1. Lists 2. Can be 3. Numbered Lists Can be Numbered Note that the numbers themselves are ignored: 1. This is the first item 5. This is the fifth item 7. This is the seventh item This is the first item This is the fifth item This is the seventh item However, the firs...
Every format type is related to an HTML tag. The First Heading refers to the <h1> tag and is visualized like: Hello World and it's written underlining the text with =: Hello World =========== or by prepending # to the text: # Hello World The Second Heading refers to the <h2&gt...
<script src= "http://player.twitch.tv/js/embed/v1.js"></script> <div id="{PLAYER_DIV_ID}"></div> <script type="text/javascript"> var options = { width: 854, height: 480, channel: "{CHANNEL}" ...
This is an enum that is also a callable function that tests String inputs against precompiled regular expression patterns. import java.util.function.Predicate; import java.util.regex.Pattern; enum RegEx implements Predicate<String> { UPPER("[A-Z]+"), LOWER("[a-z]+&quot...
One use case for assertion is precondition and postcondition. This can be very useful to maintain invariant and design by contract. For a example a length is always zero or positive so this function must return a zero or positive value. #include <stdio.h> /* Uncomment to disable `assert()`...
In this example, we'll be looking at how to store a credit card using the PayPal vault, then reference that stored credit card to process a credit card transaction for a user. The reason why we would want to use the vault is so that we don't have to store sensitive credit card information on our ow...
The following C source file (which we will call hello.c for demonstration purposes) produces an extension module named hello that contains a single function greet(): #include <Python.h> #include <stdio.h> #if PY_MAJOR_VERSION >= 3 #define IS_PY3K #endif static PyObject *hell...

Page 66 of 1336