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...
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...
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) {
...
#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...
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...