Tutorial by Examples: amp

identification division. program-id. altering. date-written. 2015-10-28/06:36-0400. remarks. Demonstrate ALTER. procedure division. main section. *> And now for some altering. contrived. ALTER story TO PROCEED TO beginning GO TO story . *> Jump to a part of the story...
<svg width="400px" height="400px"> <defs> <rect id="defrect" fill="blue" fill-opacity=".5" x="50" y="50" width="100" height="100"/> </defs> <rect fill="red" x="...
<svg width="800px" height="800px"> <defs> <pattern id="pattern1" x="0" y="0" width="0.2" height="0.2" > <circle cx="10" cy="10" r="10" fill="blue" /> <...
An expression template is a compile-time optimization technique used mostly in scientific computing. It's main purpose is to avoid unnecessary temporaries and optimize loop calculations using a single pass (typically when performing operations on numerical aggregates). Expression templates were init...
HTML HEAD <!-- JQuery --> <link rel="stylesheet" href="//code.jquery.com/ui/1.12.0/themes/base/jquery-ui.css" /> <script src="https://code.jquery.com/jquery-1.12.4.js" type="text/javascript"></script> <script src="https://co...
If the web page a contains phone number you can make a call using your phone's dialer. This code checks for the url which starts with tel: then make an intent to open dialer and you can make a call to the clicked phone number: public boolean shouldOverrideUrlLoading(WebView view, String url) { ...
Show usage examples for a specific cmdlet. Get-Help Get-Command -Examples
This code uses the top level Application object to minimize the main Excel window. Sub MinimizeExcel() Application.WindowState = xlMinimized End Sub
#include <stdio.h> #include <math.h> #include <omp.h> #define N 1000000 int main() { double sum = 0; double tbegin = omp_get_wtime(); #pragma omp parallel for reduction( +: sum ) for ( int i = 0; i < N; i++ ) { sum += cos( i ); } ...
program typical_loop use omp_lib implicit none integer, parameter :: N = 1000000, kd = kind( 1.d0 ) real( kind = kd ) :: sum, tbegin, wtime integer :: i sum = 0 tbegin = omp_get_wtime() !$omp parallel do reduction( +: sum ) do i = 1, N sum = ...
On a 8 cores Linux machine using GCC version 4.4, the C codes can be compiled and run the following way: $ gcc -std=c99 -O3 -fopenmp loop.c -o loopc -lm $ OMP_NUM_THREADS=1 ./loopc Computing 1000000 cosines and summing them with 1 threads took 0.095832s $ OMP_NUM_THREADS=2 ./loopc Computing 100...
The following MATLAB script shows how to define and call a basic function: myFun.m: function [out1] = myFun(arg0, arg1) out1 = arg0 + arg1; end terminal: >> res = myFun(10, 20) res = 30
configuration EnableIISFeature { node localhost { WindowsFeature IIS { Ensure = “Present” Name = “Web-Server” } } } If you run this configuration in Powershell (EnableIISFeature), it will produce a localho...
#!/usr/bin/env python """ An annotated simple socket server example in python. WARNING: This example doesn't show a very important aspect of TCP - TCP doesn't preserve message boundaries. Please refer to http://blog.stephencleary.com/2009/04/message-framing.html before adaptin...
#!/usr/bin/env python """ An annotated simple socket client example in python. WARNING: This example doesn't show a very important aspect of TCP - TCP doesn't preserve message boundaries. Please refer to http://blog.stephencleary.com/2009/04/message-framing.html before adaptin...
Adding tags to "describe" or "it" blocks allows you to run only those examples with a given tag. Use the --tag (or -t) option to run examples that match a specified tag. The tag can be a simple name or a name:value pair. If a simple name is supplied, only examples with :name...
$ npm install -g parse-server mongodb-runner $ mongodb-runner start $ parse-server --appId APPLICATION_ID --masterKey MASTER_KEY --databaseURI mongodb://localhost/test You can use any arbitrary string as your application id and master key. These will be used by your clients to authenticate with...
'use strict'; const http = require('http'); const PORT = 8080; const server = http.createServer((request, response) => { let buffer = ''; request.on('data', chunk => { buffer += chunk; }); request.on('end', () => { const responseString = `Received string ${buffe...
In greeter.rb (wherever that goes in your project): class Greeter def greet "Hello, world!" end end In spec/greeter_spec.rb: require_relative '../greeter.rb' RSpec.describe Greeter do describe '#greet' do it "says hello" do expect(Greeter.new.gr...
As the picture aspect ratio example indicates, videos are series of pictures that do not necessarily have the same aspect ratio as the final result to be displayed to the user. So how do you get from those stretched pictures to the normally displayed output? You need a stretching factor! This stret...

Page 17 of 46