Tutorial by Examples

sink("caraxis_C.c") cat(" /* suitable names for parameters and state variables */ #include <R.h> #include <math.h> static double parms[8]; #define eps parms[0] #define m parms[1] #define k parms[2] #define L parms[3] #define L0 parms[4] #define r p...
sink("caraxis_fortran.f") cat(" c---------------------------------------------------------------- c Initialiser for parameter common block c---------------------------------------------------------------- subroutine init_fortran(daeparms) external daeparms ...
When you compiled and loaded the code in the three examples before (ODEs in compiled languages - definition in R, ODEs in compiled languages - definition in C and ODEs in compiled languages - definition in fortran) you are able to run a benchmark test. library(microbenchmark) R <- function(){...
// Cancel older notification with same id, NotificationManager notificationMgr = (NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE); notificationMgr.cancel(CALL_NOTIFY_ID);// any constant value // Create Pending Intent, Intent notificationIntent = null; PendingInt...
MailMessage represents mail message which can be sent further using SmtpClient class. Several attachments (files) can be added to mail message. using System.Net.Mail; using(MailMessage myMail = new MailMessage()) { Attachment attachment = new Attachment(path); myMail.Attachments.Add...
We shall now see how the Image/File Uploading code works in the native CI method with the help of the forms that has been proposed by the CI way. File uploading in PHP has Two Scenarios. It is mentioned below as follows. Single Image/File uploader - This can be saved with the help of the normal ...
'use strict'; const Hapi = require('hapi'); const Joi = require('joi'); // Create a server with a host and port const server = new Hapi.Server(); server.connection({ host: 'localhost', port: 8000 }); /** * Add a route path with url param */ server.route({ method...
In WSO2 registry is a content store and a metadata repository. In WSO2 products and particularly WSO2 ESB uses registry to store metadata, artifacts (WSDL, XSD etc.,) and other service configurations like endpoints, sequences etc., Registry in WSO2 ESB has three flavours. Local registry Config...
Shell sort, also known as the diminishing increment sort, is one of the oldest sorting algorithms, named after its inventor Donald. L. Shell (1959). It is fast, easy to understand and easy to implement. However, its complexity analysis is a little more sophisticated. The idea of Shell sort is the f...
public class ShellSort { static void SortShell(int[] input, int n) { var inc = 3; while (inc > 0) { int i; for (i = 0; i < n; i++) { var j = i; var temp = input[i]; w...
foo = frozenset(["bar", 1, "Hello!"]) foo[2] = 7 # ERROR foo.add(3) # ERROR Second line would return an error since frozenset members once created aren't assignable. Third line would return error as frozensets do not support functions that can manipulate members.
Given a class SomeClass, let's see how the TypeScript is transpiled into JavaScript. TypeScript source class SomeClass { public static SomeStaticValue: string = "hello"; public someMemberValue: number = 15; private somePrivateValue: boolean = false; constructor ()...
Rabin-Karp Algorithm is a string searching algorithm created by Richard M. Karp and Michael O. Rabin that uses hashing to find any one of a set of pattern strings in a text. A substring of a string is another string that occurs in. For example, ver is a substring of stackoverflow. Not to be confuse...
Matrices are essentially two-dimensional arrays. That means that it associates (i, j) coordinates, where i is the row and j is the column, to a value. So, you could have : m3, 4 = "Hello" The easiest implementation is to make an array or arrays. In python, that would go as follows. ma...
Alsatian is a unit testing framework written in TypeScript. It allows for usage of Test Cases, and outputs TAP-compliant markup. To use it, install it from npm: npm install alsatian --save-dev Then set up a test file: import { Expect, Test, TestCase } from "alsatian"; import { SomeM...
This is a basic tslint.json setup which prevents use of any requires curly braces for if/else/for/do/while statements requires double quotes (") to be used for strings { "rules": { "no-any": true, "curly": true, "quotema...
\documentclass{article} When to use the article class ? For articles in scientific journals, presentations, short reports, program documentation, invitations, ... 1 What are the specificities of this class ? An article doesn't contain chapters or parts. It can be divided in sections, subsectio...
The Maya Python interpreter works like a regular Python intepreter, so it will use the same environment variables to find importable files as any other Python 2.6 or 2.7 installation (described in more detail in the Python documentation. If there is no other python installation on your machine you ...
REPLACE ==magic-number== BY ==65535==.
GCobol >>SOURCE FORMAT IS FIXED *> *************************************************************** *> Purpose: RELATIVE file organization REWRITE example *> Tectonics: cobc -g -debug -W -x relatives.cob *> *********************************************...

Page 989 of 1336