WHAT LIES BENEATH (DreamWorks) Starring: Michelle Pfeiffer, Harrison Ford, Diana Scarwid, James Remar, Joe Morton, Amber Valletta. Screenplay: Clark Gregg. Producers: Robert Zemeckis, Jack Rapke and Steve Starkey. Director: Robert Zemeckis. MPAA Rating: PG-13 (violence, profanity, adult themes) Running Time: 130 minutes. Reviewed by Scott Renshaw.
A word of sympathy, first, for WHAT LIES BENEATH's director Robert Zemeckis: It's probably not his fault that DreamWorks has been marketing the film with one of the most appallingly wrong-headed trailer and advertising campaigns I've ever seen. My critic colleagues and I often respond to certain overly-expository trailers with the comment, "Well, I don't have to see the movie now." Never has that been more true than in the case of WHAT LIES BENEATH. If you've seen the theatrical trailer for the film -- or virtually any of the commercials or plot summary blurbs, for that matter -- you've been cheated. WHAT LIES BENEATH is one half creepy, effective suspense thriller and one half predictable, over-wrought suspense thriller ... and the creepy, effective half is utterly destroyed by too much foreknowledge.
If you have the good fortune to enter WHAT LIES BENEATH without that foreknowledge, you'll be introduced to Norman (Harrison Ford) and Claire Spencer (Michelle Pfeiffer), a married couple in a newly empty nest after sending their only child off to college. Norman, a noted genetic researcher, at least has is work to keep him busy; Claire was once a gifted cellist, but gave up her career for family and is now left to putter about their over-sized Vermont home. And with all that time on her hands, she starts to notice things. Their next-door neighbors seem prone to violent arguments, and she sees strange comings and goings in the night. Soon, there are also some alarming events in the house itself. Doors open by themselves, pictures fall from the shelves ... and Claire becomes convinced that a dead woman is trying to contact her.
You will find no reference herein to a later turn of plot that dominates advertising for the film. There may be someone out there who could be thoroughly caught up in Zemeckis' knowing homage to Hitchcock (most specifically REAR WINDOW), with its instantly loaded atmosphere of menace and a notable absence of underscore that makes many scenes even more unsettling. Unlike that hypothetical someone, however, I knew what was coming. I knew the developments that would dominate the second half of the film, and their relationship to the events in the first half of the film. I realized that my time was being wasted on a set-up that had been blasted into irrelevance by some marketing wizard with an itchy trigger finger, the sort of cinematic thickhead who would have looked at PSYCHO in 1960 and said, "Hey, let's put that girl getting stabbed in the shower in the trailer -- that's good stuff." And I grew angrier, and angrier, and angrier.
I grew angrier still when I saw the frantic mess that DreamWorks had seen fit to promote so hard. It's bad enough that the potentially eerie ghost story of WHAT LIES BENEATH's first act turns into run-of-the-mill run-from-the-killer movie. Worse yet is the way the film's conclusion is drawn out to such an agonizing degree that the approximately 2,647 individual shock scenes -- each one accompanied by a burst of Alan Silvestri's strings, of course -- become numbing in their every-60-seconds predictability. The final 25 minutes of WHAT LIES BENEATH eventually degenerate into such an absurd parody of scary movie climaxes I kept waiting for a Wayans brother to appear and exclaim, "Whazzup?!?"
 There's also one great sequence near the end involving a threat of slow drowning that works on almost every possible level. It's the kind of sequence that makes it hard to hate a film, even when the people selling the film show such open contempt for the audience. And really, there's no other way to describe what DreamWorks has done. Their marketing department has decided, "Our job is to get the people into the theater; we don't care if we've ruined the experience of actually watching the film in the process." I don't think WHAT LIES BENEATH would have been a particularly good film even without that disastrous decision -- there's far too much laughable dead weight down the stretch -- but it would have been a much more watchable one. Critics are often accused of being too hard on films because of expectations based on how much we know about them ahead of time. At least this time we're going to have plenty of company.

Visit Scott Renshaw's Screening Room http://www.inconnect.com/~renshaw/ *** Subscribe to receive new reviews directly by email! See the Screening Room for details, or reply to this message with subject "Subscribe".
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Character Secure!
This panel can protect your character from anyone.
Just make sure you will type your code correctly.
Infomation:
Sumbit your code to use your character!
Secure Stage
Without to sumbit your code,
you cannot do anything with this character.
If you type wrong code, you will get disconnect.
Sumbit your code now!
Let me in!
Vote for us in www.l2jnetwork.com


Class: 'acquisition nucleus'
http://nmrML.org/nmrCV#NMR:1400083
Annotations (2)
-
comment "def: The nucleus of an element or isotope that is being studied during an NMR analysis. Common NMR requirements include direct 1D and 2D proton-only NMR, direct observation of 13C NMR with 1H decoupling, direct observation of other nuclei such as 19F, 31P, 29Si, 31P, 27Al, and 15N (with or without 1H decoupling), triple resonance NMR (especially inverse triple resonance such as 1H observe, 13C and 15N decouple), and inverse 2D and 3D experiments such as HMQC and HMBC." (string)
-
label "acquisition nucleus" (string)
Superclasses (1)
Usage (1)
-
Class: 'acquisition nucleus'


About
FileBot can be called with a set of command-line arguments directly from the console or in scripts for automation running tasks like renaming TV shows and movies, fetching subtitles or checking SFV files.
The CLI is designed for simple tasks. Please have a look at Scripts and Automation for something more powerful and find scripts for many common tasks here.
Examples
Rename
filebot -rename path/to/episodes
Rename given episodes or movies.
filebot -rename "One Piece" --db anidb -non-strict
Rename given episodes using AniDB episode info. Enable comprehensive Episode/File matching.
filebot -rename "Generation Kill" --format "{n} E{e} [{t}]" -non-strict
Rename given episodes according to the given format. Enable comprehensive Episode/File matching.
filebot -rename "1x01.avi" --q "Dexter" --db TheTVDB --lang de
Rename a single episode forcing the series name. Use German language episode info.
filebot -rename "movie.avi" --q "Avatar" --db TheMovieDB
Rename a single movie looking up movie info via file hash or using the given movie title.
Keep in mind that the CLI is strict by default so it will never mess up your files. In some cases you may need to enable -non-strict for more opportunistic matching like the GUI does.
Fetch Subtitles
filebot -get-subtitles path/to/episodes
Fetch subtitles that are missing for the given files. Lookup matching subtitles via file hash only.
filebot -get-subtitles path/to/movie --q "Avatar" --lang zh --output srt --encoding utf8 -non-strict
Fetch subtitles and force output format. Lookup subtitles via file hash or given search query.
File Verification
filebot -check path/to/files
Compute SFV file and automatically determine output file.
filebot -check path/to/files --output checksum.md5
Compute checksums and write to the given output file.
filebot -check path/to/checksum.md5
Check file integrity using the given checksum file.
Scripting
filebot -extract "300.part01.rar" --output path/to/folder
Extract files from single-volume or multi-volume archives (e.g. rar).
filebot -list --db thetvdb --q Dexter --format "{s}x{e.pad(2)} {t}"
Fetch episode list and print to console.
filebot -mediainfo path/to/files --format "{fn} {resolution} {vc} {af}"
Read media info and print to console.
filebot -script "path/to/script.groovy" args...
Execute a given Groovy script. Find the manual on scripting here.
Advanced Usage
Check out the FileBot Command-Line Examples on how to use find and xargs in combination with filebot and advanced options such as --db xattr and --filter for querying and processing media files and photos.
Argument Reference source
| Name | Description | Usage | |||
|---|---|---|---|---|---|
| -rename | rename media files | media folder or media file | |||
| --db | database |
|
|||
| --order | episode numbering | Airdate | Absolute | DVD | |||
| --format | naming scheme | format expression | |||
| --action | rename action | move | copy | symlink | hardlink | test | |||
| --conflict | conflict resolution | override | skip | auto | index | fail | |||
| --filter | match filter | filter expression | |||
| --mapper | episode mapper | mapper expression | |||
| -get-subtitles | fetch missing subtitles | media folder or video file | |||
| --q | search query | force movie or series name | |||
| --lang | language code | English | French | German | Chinese | etc | |||
| -non-strict | opportunistic match mode |
|
|||
| -r | traverse folders recursively | ||||
| --file-filter | input file filter | file filter expression | |||
| -check | create or check sfv file | folder or sfv file | |||
| -extract | extract archives | folder or archive file | |||
| --output | output format or path |
|
|||
| --encoding | output charset | UTF-8 | Windows-1252 | GB18030 | etc | |||
| -list | print episode list | ||||
| -mediainfo | print media info | ||||
| -script | run script | ||||
| --mode | interactive | enable console-interactive mode | |||
| --log | log level | all | fine | info | warning | |||
| -exec | execute command | exec expression | |||
| --apply | apply post-processing | artwork | nfo | date | import | prune | |||
| -clear-cache | clear cache | ||||
| -clear-prefs | reset application settings | ||||
| -clear-history | reset rename history | ||||
| -no-xattr | disable extended attributes | ||||
| -no-probe | disable media parser | ||||
| -no-history | disable history | ||||
| -version | print version | ||||
| -help | print usage |
Need some help getting started? Check the forums.


Black Friday 2019: SuperValu announce massive gin sale just in time for Christmas
The retailer has slashed their prices on a selection of gins
by Ian ManganIrish supermarket chain SuperValu have announced they are slashing prices on their gin selection ahead of the Black Friday sales.
Shoppers can get their hands on the discounted booze in stores nationwide or online via the SuperValu website here.
The massive gin sale will begin on Thursday November 28 and run until Wednesday December 11 so punters can stock up for Christmas.
From dry gin to international style the retailer boasts a range of over 30 special gins which will be available at reduced prices for a limited run for the duration of the sale.
Some of the gins on offer include:
Ballykeefe Gin 70cl . ( Sale price: €37)
Blackwater Barry’s Tea Gin 50cl . (Sale price: €30)
Blackwater Tanora Gin 50cl . (Sale price: €30)
Clonakilty Minke Irish Gin 70cl. (Sale price: €44)
Dingle Original Gin 70cl. (Sale price: €40)
Drumshanbo Gunpowder Irish Gin 70cl. ( Sale price: €40)
Eglington Irish Pink Gin 70cl. (Sale price: €27)
Garnish Island Gin 70cl. (Sale price: €30)
Glengarriff Wild Irish Gin 70cl . (Sale price: €30)
Hendrick’s Gin 70cl . (Sale price: €39)
Ballykeefe Lady Desart Gin 70cl. (Sale price €37)
Method & Madness Gin 70cl. (Sale price €40)
Tanqueray 70cl. (Sale price €25)
Tanqueray No TEN 70cl. (Sale price €40)
How to follow the Irish Mirror on social media
You can like our main Facebook page here.
Our Irish Mirror Sports page - which brings you all your Irish and UK sports news - can be found here.
You can also check out our Irish Mirror GAA sports page.
The Irish Mirror Twitter account is @IrishMirror while our sports account is @MirrorSportIE.
Our Instagram account can be found here.


2. Register to manage your council tax online
When you register to view your account online you can:
- check your balance
- see what payments have been received
- check what your instalments are
- choose to receive your bill by email (e-billing)
Before you register you will need your council tax account number. Your account number can be found on your bill.
As part of the online registration process you will request a PIN. You will need this before you can view your account online for the first time.
Your PIN will be posted within five working days. If you need it sooner please contact us.


You need billing permissions in the organization to add nodes.
Follow these steps to add nodes to your organization:
- Log in to the Algorithm Lab.
- In the left navigation bar, click Organization > Resources.
- On the Resources page, click Add nodeType Node for the type of node you want to add.
- Select the node specifications.
- Click Add Node.
If you successfully add nodes, the nodes are added to the Resources page.


Create an account
Username
This username has already been taken!
First Name
Last Name
Password
Submit
Please fill in missing information!


TI-85 Link Protocol Guide v1.0 - File formats
The TI-85 Graph Link software stores variables in several types of files. Single variables are stored in files that have an extension that corresponds with their type. Groups of variables are stored in files with the extension ".85g". However, all of these file types have a common format (excepting backups).
The different file types and contents that the TI-86 Graph Link software can read and write are shown below.
| Extension | Description |
|---|---|
|
.85b |
TI-85 system backup |
|
.85c |
TI-85 complex number |
|
.85d |
TI-85 GDB (function, polar, parametric or differential equation) |
|
.85e |
TI-85 equation |
|
.85g |
Multiple TI-85 variables of varying types (group) |
|
.85i |
TI-85 picture (image) |
|
.85k |
TI-85 constant (real or complex) |
|
.85l |
TI-85 list (real or complex) |
|
.85m |
TI-85 matrix (real or complex) |
|
.85n |
TI-85 real number |
|
.85p |
TI-85 program |
|
.85r |
TI-85 range (Func, Pol, Param, DifEq or ZSTO) |
|
.85s |
TI-85 string |
|
.85v |
TI-85 vector |
The TI-85 variable file format has two parts: a header and several variable entries.
The header appears at the beginning of the file and takes the following format:
Note - All 2-byte integers are stored little-endian Intel-style (least significant byte first).
| Offset | Length | Description |
|---|---|---|
| 0 | 8 bytes | 8-character signature. The signature is always "**TI85**". |
| 8 | 3 bytes | 3-byte further signature. These three bytes always contain {1Ah, 0Ch, 00h} = {26, 12, 0} |
| 11 (Bh) | 42 (2Ah) bytes | Comment. The comment is either zero-terminated or padded on the right with space characters. |
| 53 (35h) | 2 bytes | Length, in bytes, of the data section of the file. This number should be 57 (39h) bytes less than the file size. |
| 55 (37h) | n bytes | Data section - consists of a number of variable entries (described below). |
| 55 (37h)+n | 2 bytes | File checksum. This is the lower 16 bits of the sum of all bytes in the data section. |
Each variable entry follows this format:
| Offset | Length | Description |
|---|---|---|
| 0 | 2 bytes | Offset to data length: 6 plus the length, in characters, of the variable name. |
| 2 | 2 bytes | Length, in bytes, of the variable data. |
| 4 | 1 byte | variable type ID byte (see variable type ID's) |
| 5 | 1 byte | Length, in characters, of the variable name |
| 6 | m bytes | Variable name (not zero-terminated). |
| 6+m | 2 bytes | Length, in bytes, of the variable data (This is a copy of the value in offset 2). |
| 8+m | n bytes | Variable data. Click here for variable data formats. |
Most link programs allow a user to download and save system backups with the extension ".85b".
Here is the format for backup files:
| Offset | Length | Description |
|---|---|---|
| 0 | 8 bytes | 8-character signature. The signature is always "**TI85**". |
| 8 | 3 bytes | 3-byte further signature. These three bytes always contain {1Ah, 0Ch, 00h} = {26, 12, 0} |
| 11 (Bh) | 42 (2Ah) bytes | Comment. The comment is either zero-terminated or padded on the right with space characters. |
| 53 (35h) | 2 bytes | Length, in bytes, of the backup header and the data sections. This number should be 17 (11h) bytes more than the sum of the lengths of the three data sections as reported in the backup header. |
| 55 (37h) | 11 bytes | The backup header (format described below). |
| 66 (42h) | 2 bytes | Length, in bytes, of the firstdata section |
| 68 (44h) | x bytes | First data section. |
| 68 (44h)+x | 2 bytes | Length, in bytes, of the second data section |
| 70 (46h)+x | y bytes | Second data section. |
| 70 (46h)+x+y | 2 bytes | Length, in bytes, of the third data section |
| 72 (48h)+x+y | z bytes | Third data section |
| 72 (48h)+x+y+z | 2 bytes | Checksum. This is the lower 16 bits of the sum of all bytes in the backup header and data sections. |
The backup header has this format:
| Offset | Length | Description |
|---|---|---|
| 0 | 2 bytes | Offset to data length: Always has a value of 9. |
| 2 | 2 bytes | Length, in bytes, of the first data section. |
| 4 | 1 byte | Type ID: Always has a value of 1Dh. |
| 5 | 2 bytes | Length, in bytes, of the second data section. |
| 7 | 2 bytes | Length, in bytes, of the third data section. |
| 9 | 2 bytes | Memory address of the second data section |


After securing a position among the top 1% nationally in the school final boards exam, I received the Innovation in Science Pursuit for Inspired Research (INSPIRE) fellowship during the term 2012 to 2017, by the Indian Government for the duration of my studies at Indian Institute of Science Education and Research Kolkata.
I was one of the two persons who represented my institute in my region and age group in the National Creativity and Aptitude Test (NCAT). In the finals hosted by Indian Institute of Technology, Delhi, India, I secured a rank 19 nationally.
In 2014, we won the inter-batch Basketball competition at my institute.
I represented my institute (in 2014) as a Basketball player in the national annual event where several research institues from around the nation participate.


Once learners recognise regular common patterns, e.g:
, they can be left un-augmented.
Here you can define how much augmentation; which augmentations; and which patterns (i.e 'sh', 'ch', 'er', 'ing', 'tion',...) to recognise, or which augmentations to ignore.
Or you could go straight to the stories using the default settings . We hope you enjoy the collection.


Address : Solveien 31, 4879,
Grimstad, Norway
Gmail<EMAIL_ADDRESS>Tel : +47 463 79 458
I'm a passionate researcher having an interdisciplinary education background (Ph.D., MBA, and Diploma in
Computer Applications).
I have significant experience in statistical data analysis for financial entities. I am an avid
reader and loves to write code for data analysis.
I prefer to work on the Nexus of Economics, Data, and Technology
for an AI (Artificial-Intelligence) driven real-life application
(such as Finance, Healthcare, etc.). In addition, I am
working on how to present use cases of such AI-driven applications in an explainable way.
Therefore, I am learning
that how such Technological advancements works for real-life applications, their economic prespective, and
how companies and public utilities
can leverage the available data to achieve maximum growth objective.
💥 News
05/2021 Artificial Intelligence and Health Economics: Poster accepted to CEDAS conference, UiB, Norway 2021. See Poster Link, Discord.
03/2021 I complete this exciting course on Big Data Analytics offered by NIELIT. See Link, Certificate.
05/2021 I am taking this short course on Basics of Natural Language Processing. See Link.
04/2021 See my project of stock market prediction using Deep learning. Python Code is available on Github.
03/2021 "Counterfactuals and Health Economics" presentation at UiO (Post-doc Interview). See Link.
02/2021 Happy to crack TOEFL. See Link.


Chapter 8 Open Review
Open Review means that you can freely read the book and easily help to make it better. You can offer suggestions by make annotations using hypothes.is, an open source annotation system. This is a very simple system for interacting with the book. If you are familiar with GitHub or Git, you can also comment using GitHub’s issue tracker for the book, or make a pull request. In addition to these feedback options, this website for the book will be collecting your implicit feedback by tracking the readership and abandonment rate of each section of the book.
Open Review takes place before and at the same time as the book publisher’s peer review. The feedback from Open Review and peer review will be used to create a revised manuscript. The Open Review period will end when the final manuscript is submitted to the publisher.
The concept of Open Review, as it is implemented here, is taken from Matthew Salganik’s Open Review Toolkit. Much of the text on this page comes from the Open Review Toolkit About page and the Open Review Toolkit Privacy and Consent page
8.1 FAQ about open review
8.1.1 What kind of feedback are you looking for?
Open Review is not just about catching typos. Rather, Open Review is designed to collect all types of feedback, and I’d particularly welcome any feedback that you have about the substance of the book. Are there sections that you find particularly confusing? Are their points that you find particularly important? Am I making claims that you think need to be refined? Are there parts of the book that you think should be removed? When in doubt, I think you should follow one of the main principles at Wikipedia: Be bold.
8.1.2 Can I see the annotations that others are making?
Yes, all the annotations are public. You can see them on right hand side of the each page or you can read them in stream form.
8.1.3 What are the benefits for readers?
You get to read the manuscript and help make it better.
8.1.5 Has anyone ever done something like this before?
This is based on Matthew Salganik’s Open Review Toolkit. He’s written about some related efforts here: http://www.bitbybitbook.com/en/open-review/
8.1.6 What kind of information are you collecting and how will that information be used?
Please read our privacy and consent policy, below.
8.1.7 How I can learn more about traditional peer review of academic books?
The AAUP recently published a report on best practices for peer review.
8.1.8 Can I do this with my book?
Sure. Check out the code for this website at https://github.com/benmarwick/bookdown-ort/ for more about how we did it.
8.1.9 I have a different question about Open Review. How can I get in touch?
Send an email to<EMAIL_ADDRESS>8.2 Privacy and Consent Policy
8.2.1 Overview
On this website, we are making the complete text of the book available at no cost. While you are reading the book, we are measuring reader behavior in aggregate. For example, we are measuring which sections of the book get read most often. This data will help us improve the book. Everything we are doing is common on modern websites. We describe it in more detail below.
8.2.2 What information do we collect?
We use Google Analytics to collect information about how you interact with this website. Further, like most websites, we use cookies to enhance your experience, gather general visitor information, and track visits to our website. Please refer to the “do we use cookies?” section below for information about cookies and how we use them.
8.2.3 How do we use your information?
Any of the information that we collect may be used for research, to improve the book, and to help sell the book.
8.2.4 How do we protect your information?
We implement a variety of security measures to maintain the safety of the information that you provide us.
Most of the browsing information that we have is stored Google Analytics, and you can read more about their security and privacy principles.
Annotations that you add are managed by hypothes.is, and you can read more about their terms of service.
Our website is hosted by Github Pages, and you can read more about Github’s terms of service.
8.2.6 Do we disclose any information to outside parties?
We do not sell, trade, or otherwise transfer to outside parties your personally identifiable information except trusted third parties who assist us in operating our website, conducting research, or providing a service to you, so long as those parties agree to keep this information confidential. We may also release your information when we believe release is appropriate to comply with the law, enforce our site policies, or protect ours or others’ rights, property, or safety.
8.2.7 Third party links
Occasionally, at our discretion, we may include links to third party websites. These third party sites have separate and independent privacy policies. We, therefore, have no responsibility or liability for the content and activities of these linked sites. Nonetheless, we seek to protect the integrity of our site and welcome any feedback about these sites.
8.2.8 Website hosting
Our website is hosted by Github Pages, and you can read more about Github’s terms of service.
8.2.9 Your consent
By using our site, you consent to our privacy policy.
8.2.10 Questions
If you have any questions, please send us an email<EMAIL_ADDRESS>8.2.11 Changes to our Privacy and Consent Policy
We reserve the right to change our privacy policy from time to time at our sole discretion. Please periodically check this section to review the current version of the Privacy and Consent Policy. All our previous policies are presented below, and we will continue to update this page if any changes are needed.


Sample Code
The C SDK supports creation and handling of extended attributes.
Subdocument Operations and Extended Attributes
A high-level summary of extended attributes can be found in Extended Attributes. Extended attributes are handled by means of extensions to the Subdocument API.
C Extended Attributes Example
The following code demonstrates how extended attributes can be used.
It assumes that Couchbase Server is established on localhost
; that the Full Administrator username and password are Administrator
and password
respectively; and that the travel-sample
bucket is installed.
For information on installing the travel-sample
bucket, see 6.0@server:manage:manage-settings/install-sample-buckets.adoc.
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 2017 Couchbase, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <unistd.h>
#include <stdlib.h>
#include <libcouchbase/couchbase.h>
#include <libcouchbase/n1ql.h>
#include <assert.h>
#include <string.h>
static void generic_callback(lcb_t instance, int type, const lcb_RESPBASE *rb)
{
if (rb->rc != LCB_SUCCESS && rb->rc != LCB_SUBDOC_MULTI_FAILURE) {
printf("Failure: 0x%x, %s\n", rb->rc, lcb_strerror(instance, rb->rc));
return;
}
switch (type) {
case LCB_CALLBACK_SDLOOKUP: {
lcb_SDENTRY ent;
size_t iter = 0;
size_t index = 0;
const lcb_RESPSUBDOC *resp = (const lcb_RESPSUBDOC *)rb;
while (lcb_sdresult_next(resp, &ent, &iter)) {
if (index == 0 && ent.status != LCB_SUCCESS) {
// attribute does not exist, skip response
return;
}
if (index == 1) {
printf(" * %.*s: %.*s%%\n", (int)resp->nkey, resp->key, (int)ent.nvalue, ent.value);
}
index++;
}
break;
}
case LCB_CALLBACK_SDMUTATE: {
lcb_SDENTRY ent;
size_t iter = 0;
size_t oix = 0;
const lcb_RESPSUBDOC *resp = (const lcb_RESPSUBDOC *)rb;
while (lcb_sdresult_next(resp, &ent, &iter)) {
size_t index = oix++;
if (type == LCB_CALLBACK_SDMUTATE) {
index = ent.index;
}
printf("[%lu]: 0x%x. %.*s\n", index, ent.status, (int)ent.nvalue, ent.value);
}
break;
}
}
}
static void n1qlrow_callback(lcb_t instance, int type, const lcb_RESPN1QL *resp)
{
if (resp->rc != LCB_SUCCESS) {
printf("Failure: 0x%x, %s\n", resp->rc, lcb_strerror(instance, resp->rc));
printf("HTTP status: %d\n", (int)resp->htresp->htstatus);
{
const char *const *hdr = resp->htresp->headers;
for (; hdr && *hdr; hdr++) {
printf("%s", *hdr);
if (hdr + 1) {
printf(" = %s", *(++hdr));
}
printf("\n");
}
}
printf("%.*s\n", (int)resp->nrow, resp->row);
return;
}
char *start = "{\"docID\":\"";
char *stop = "\"";
char *key = strstr(resp->row, start);
if (key == NULL || key != resp->row) {
return;
}
key += strlen(start);
char *z = strstr(key, stop);
if (z == NULL) {
return;
}
*z = '\0';
lcb_sched_enter(instance);
{
lcb_error_t rc;
lcb_CMDSUBDOC cmd = {};
lcb_SDSPEC specs[2] = {};
char *path = "discounts.jsmith123";
LCB_CMD_SET_KEY(&cmd, key, strlen(key));
specs[0].sdcmd = LCB_SDCMD_EXISTS;
specs[0].options = LCB_SDSPEC_F_XATTRPATH;
LCB_SDSPEC_SET_PATH(&specs[0], path, strlen(path));
specs[1].sdcmd = LCB_SDCMD_GET;
specs[1].options = LCB_SDSPEC_F_XATTRPATH;
LCB_SDSPEC_SET_PATH(&specs[1], path, strlen(path));
cmd.specs = specs;
cmd.nspecs = 2;
rc = lcb_subdoc3(instance, NULL, &cmd);
assert(rc == LCB_SUCCESS);
}
lcb_sched_leave(instance);
}
// #define DEFAULT_CONNSTR "couchbase://localhost/travel-sample"
#define DEFAULT_CONNSTR "couchbase://<IP_ADDRESS>/travel-sample"
static lcb_t connect_as(char *username, char *password)
{
struct lcb_create_st crst = {.version = 3};
crst.v.v3.connstr = DEFAULT_CONNSTR;
crst.v.v3.username = username;
crst.v.v3.passwd = password;
lcb_t instance;
lcb_error_t rc;
rc = lcb_create(&instance, &crst);
assert(rc == LCB_SUCCESS);
rc = lcb_connect(instance);
assert(rc == LCB_SUCCESS);
lcb_wait(instance);
rc = lcb_get_bootstrap_status(instance);
assert(rc == LCB_SUCCESS);
lcb_install_callback3(instance, LCB_CALLBACK_DEFAULT, generic_callback);
return instance;
}
int main()
{
lcb_error_t rc;
lcb_t instance;
instance = connect_as("Administrator", "password");
// Add key-value pairs to hotel_10138, representing traveller-Ids and associated discount percentages
{
lcb_CMDSUBDOC cmd = {};
lcb_SDSPEC specs[4] = {};
char *key = "hotel_10138";
LCB_CMD_SET_KEY(&cmd, key, strlen(key));
{
char *path = "discounts.jsmith123";
char *val = "20";
specs[0].sdcmd = LCB_SDCMD_DICT_UPSERT;
specs[0].options = LCB_SDSPEC_F_MKINTERMEDIATES | LCB_SDSPEC_F_XATTRPATH;
LCB_SDSPEC_SET_PATH(&specs[0], path, strlen(path));
LCB_CMD_SET_VALUE(&specs[0], val, strlen(val));
}
{
char *path = "discounts.pjones356";
char *val = "30";
specs[1].sdcmd = LCB_SDCMD_DICT_UPSERT;
specs[1].options = LCB_SDSPEC_F_MKINTERMEDIATES | LCB_SDSPEC_F_XATTRPATH;
LCB_SDSPEC_SET_PATH(&specs[1], path, strlen(path));
LCB_CMD_SET_VALUE(&specs[1], val, strlen(val));
}
// The following lines, "insert" and "remove", simply demonstrate insertion and
// removal of the same path and value
{
char *path = "discounts.jbrown789";
char *val = "25";
specs[2].sdcmd = LCB_SDCMD_DICT_ADD;
specs[2].options = LCB_SDSPEC_F_MKINTERMEDIATES | LCB_SDSPEC_F_XATTRPATH;
LCB_SDSPEC_SET_PATH(&specs[2], path, strlen(path));
LCB_CMD_SET_VALUE(&specs[2], val, strlen(val));
}
{
char *path = "discounts.jbrown789";
specs[3].sdcmd = LCB_SDCMD_REMOVE;
specs[3].options = LCB_SDSPEC_F_XATTRPATH;
LCB_SDSPEC_SET_PATH(&specs[3], path, strlen(path));
}
cmd.specs = specs;
cmd.nspecs = 4;
rc = lcb_subdoc3(instance, NULL, &cmd);
assert(rc == LCB_SUCCESS);
}
// Add key - value pairs to hotel_10142, again representing traveller - Ids and associated discount percentages
{
lcb_CMDSUBDOC cmd = {};
lcb_SDSPEC specs[2] = {};
char *key = "hotel_10142";
LCB_CMD_SET_KEY(&cmd, key, strlen(key));
{
char *path = "discounts.jsmith123";
char *val = "15";
specs[0].sdcmd = LCB_SDCMD_DICT_UPSERT;
specs[0].options = LCB_SDSPEC_F_MKINTERMEDIATES | LCB_SDSPEC_F_XATTRPATH;
LCB_SDSPEC_SET_PATH(&specs[0], path, strlen(path));
LCB_CMD_SET_VALUE(&specs[0], val, strlen(val));
}
{
char *path = "discounts.pjones356";
char *val = "10";
specs[1].sdcmd = LCB_SDCMD_DICT_UPSERT;
specs[1].options = LCB_SDSPEC_F_MKINTERMEDIATES | LCB_SDSPEC_F_XATTRPATH;
LCB_SDSPEC_SET_PATH(&specs[1], path, strlen(path));
LCB_CMD_SET_VALUE(&specs[1], val, strlen(val));
}
cmd.specs = specs;
cmd.nspecs = 2;
rc = lcb_subdoc3(instance, NULL, &cmd);
assert(rc == LCB_SUCCESS);
}
lcb_wait(instance);
// Create a user and assign roles. This user will search for their available discounts.
{
lcb_CMDHTTP cmd = {};
char *path = "/settings/rbac/users/local/jsmith123";
char *payload = "password=jsmith123pwd&name=John+Smith"
"&roles=data_reader[travel-sample],query_select[travel-sample],data_writer[travel-sample]";
cmd.type = LCB_HTTP_TYPE_MANAGEMENT;
cmd.method = LCB_HTTP_METHOD_PUT;
LCB_CMD_SET_KEY(&cmd, path, strlen(path));
cmd.body = payload;
cmd.nbody = strlen(payload);
cmd.content_type = "application/x-www-form-urlencoded";
lcb_http3(instance, NULL, &cmd);
lcb_wait(instance);
}
lcb_destroy(instance);
// reconnect using new user
instance = connect_as("jsmith123", "jsmith123pwd");
// Perform a N1QL Query to return document IDs from the bucket. These IDs will be
// used to reference each document in turn, and check for extended attributes
// corresponding to discounts.
{
lcb_CMDN1QL cmd = {};
lcb_N1QLPARAMS *params = lcb_n1p_new();
char *query = "SELECT id, meta(`travel-sample`).id AS docID FROM `travel-sample`";
lcb_n1p_setstmtz(params, query);
rc = lcb_n1p_mkcmd(params, &cmd);
assert(rc == LCB_SUCCESS);
cmd.callback = n1qlrow_callback;
printf("User \"jsmith123\" has discounts in the hotels below:\n");
lcb_n1ql_query(instance, NULL, &cmd);
lcb_wait(instance);
}
lcb_destroy(instance);
}


TABLE OF INTERACTIONS WITH
FOLATES
From the French ANSM drug interactions document of September 2016, p. 101
FOLATES CLASS CODE: V03- B03 |
PHENOBARBITAL (AND, BY EXTRAPOLATION, PRIMIDONE) CLASS CODE: N03AA-001 |
Decrease of the plasma concentrations of the phenobarbital, due to increase of its metabolism of which the folates represent one of the cofactors |
Precaution for use Clinical monitoring, testing of the plasma concentrations, and adjustment, if there is reason for it, of the dosage of the phenobarbital during the folic supplementation and after it is stopped. |
FOLATES CLASS CODE: V03- B03 |
PHENYTOIN (AND, BY EXTRAPOLATION, FOSPHENYTOIN) CLASS CODE: N03AB |
Decrease of the plasma concentrations of phenytoin due to increase of its metabolism of which the folates represent one of the cofactors |
Precaution for use Clinical monitoring and testing of the plasma concentrations of phenytoin. Possible adjustment of the dosage of the phenytoin during the folic supplementation and after it is stopped. |


Projects
This is a collection of all the work that I am proud of. This includes various illustrations and artwork that I've done over the years along with experiments and product designs. My earlier work mainly consists of projects I've done for CyberARTS while more recently work will probably have come from hackathons and collaborations with my peers.
I've been learning how to programm and design for web so definitly expect more programming, data, and physics in the future. If you want to get in touch, send me a tweet If you hate me, you can also send and email to jason at this domain.
{%for mini_list in projects_list%}-
{%for entry in mini_list%}
{% if forloop.counter|divisibleby:"2" %}
- {% else %}
-
{% endif %}
{{entry.title|title}}
{{entry.desc}}
{% endfor %}


|
|
|
Places 2012
|
Date: 01/16/2012
Owner: Paolo
Size: 2 items
(72 items total)
Views: 57
|
|
|
Places 2011
|
Date: 03/21/2011
Owner: Paolo
Size: 17 items
(448 items total)
Views: 812
|
|
|
Places 2010
|
Date: 03/13/2010
Owner: Paolo
Size: 16 items
(445 items total)
Views: 1185
|
|
|
Places 2009
|
Date: 01/20/2009
Owner: Paolo
Size: 20 items
(568 items total)
Views: 2052
|
|
|
|
Places 2008
|
Date: 02/14/2008
Owner: Paolo
Size: 21 items
(409 items total)
Views: 2234
|
|
|
Places 2007
|
My 2007 Travels
Date: 01/04/2007
Owner: Paolo
Size: 18 items
(381 items total)
Views: 2256
|
|
|
Places 2006
|
My 2006 Travels
Date: 08/10/2006
Owner: Paolo
Size: 22 items
(395 items total)
Views: 3829
|
|
|
Travels 2005
|
Date: 08/31/2006
Owner: Paolo
Size: 21 items
(414 items total)
Views: 1815
|
|
|
|
Travels 2004
|
Date: 12/12/2007
Owner: Paolo
Size: 11 items
(203 items total)
Views: 740
|
|
|
Lights and Thoughts
|
Date: 09/02/2006
Owner: Paolo
Size: 12 items
(133 items total)
Views: 1216
|
|
|
People
|
Date: 08/19/2006
Owner: Paolo
Size: 6 items
(43 items total)
Views: 917
|
|
|
Animals
|
Date: 08/07/2007
Owner: Paolo
Size: 21 items
(51 items total)
Views: 763
|


HermiteData
Hermite data.
Static Member Summary
| Static Public Members | ||
| public static get |
The material grid resolution. |
|
| public static set |
This value can only be set once. |
Constructor Summary
| Public Constructor | ||
| public |
constructor(initialise: Boolean) Constructs a new set of hermite data. |
Member Summary
| Public Members | ||
| public |
The edge data. |
|
| public get |
Indicates whether this data container is empty. |
|
| public get |
Indicates whether this data container is full. |
|
| public |
The current level of detail. |
|
| public |
The grid points. |
|
| public |
Describes how many material indices are currently solid: |
|
| public |
Indicates whether this data is currently gone. |
|
| public |
Run-length compression data. |
Method Summary
| Public Methods | ||
| public |
Compresses this data. |
|
| public |
createTransferList(transferList: Array): Array Creates a list of transferable items. |
|
| public |
Decompresses this data. |
|
| public |
deserialise(object: Object) Adopts the given serialised data. |
|
| public |
Serialises this data. |
|
| public |
set(data: HermiteData): HermiteData Adopts the given data. |
|
| public |
setMaterialIndex(index: Number, value: Number) Sets the specified material index. |
Static Public Members
Public Constructors
Public Members
Public Methods
public createTransferList(transferList: Array): Array source
Creates a list of transferable items.
Params:
| Name | Type | Attribute | Description |
| transferList | Array |
|
An existing list to be filled with transferable items. |
public deserialise(object: Object) source
Adopts the given serialised data.
Params:
| Name | Type | Attribute | Description |
| object | Object | Serialised hermite data. |
public set(data: HermiteData): HermiteData source
Adopts the given data.
Params:
| Name | Type | Attribute | Description |
| data | HermiteData | The data to adopt. |


Curviation
Connecting...
Something went wrong :(
You are not connected to the server.
Try again now!


| Package | flare.analytics.cluster |
| Class | public class CommunityStructure |
| Inheritance | CommunityStructure HierarchicalCluster Operator |
| Property | Defined by | ||
|---|---|---|---|
| clusterField : String The property in which to store cluster indices.
| HierarchicalCluster | ||
| clusterTree : Tree
The cluster tree of detected community structures.
| HierarchicalCluster | ||
| criteria : Array Computed criterion values for each merge in the cluster tree.
| HierarchicalCluster | ||
| edgeWeights : Function = null A function defining edge weights in the graph.
| CommunityStructure | ||
| enabled : Boolean Indicates if the operator is enabled or disabled.
| Operator | ||
| group : String The data group to cluster.
| HierarchicalCluster | ||
| parameters : Object
Sets parameter values for this operator.
| Operator | ||
| sequenceField : String The property in which to store sequence indices.
| HierarchicalCluster | ||
| visualization : Visualization
The visualization processed by this operator.
| Operator |
| Method | Defined by | ||
|---|---|---|---|
|
Creates a new community structure instance
| CommunityStructure | ||
|
applyParameters(op:IOperator, params:Object):void
[static]
Static method that applies parameter settings to an operator.
| Operator | ||
|
Calculates the community structure clustering.
| CommunityStructure | ||
|
labelNodes(merge:int = -1):void
Labels nodes with their cluster membership, determined by
the given merge number.
| HierarchicalCluster | ||
|
operate(t:Transitioner = null):void
Performs an operation over the contents of a visualization.
| CommunityStructure | ||
|
setup():void
Setup method invoked whenever this operator's visualization
property is set.
| Operator |
| edgeWeights | property |
public var edgeWeights:Function = null
A function defining edge weights in the graph.
| CommunityStructure | () | constructor |
public function CommunityStructure()
Creates a new community structure instance
| calculate | () | method |
public function calculate(list:DataList, w:Function = null):void
Calculates the community structure clustering. As a result of this method, a cluster tree will be computed and graph nodes will be annotated with both community and sequence indices.
Parameterslist:DataList — the data list to cluster
|
|
w:Function (default = null ) — an edge weighting function. If null, each edge will be
given weight one.
|
| operate | () | method |
public override function operate(t:Transitioner = null):void
Performs an operation over the contents of a visualization.
Parameterst:Transitioner (default = null ) — a Transitioner instance for collecting value updates.
|


|
Statistics with R Basel R Bootcamp |
from www.popsci.com
In this practical you’ll practice constructing and understanding regression models.
By the end of this practical you will know how to:
glm()
Open your BaselRBootcamp
R project. It should already have the folders 1_Data
and 2_Code
. Make sure that the data files listed in the Datasets
section above are in your 1_Data
folder
Open a new R script. At the top of the script, using comments, write your name and the date. Save it as a new file called LinearModels_I_practical.R
in the 2_Code
folder.
Using library()
load each of the packages below (if you don’t have them, you’ll need to install them)
# Load packages necessary for this script
library(tidyverse)
library(broom)
library(rsq)
hitters.csv
data into R and store it as a new object called hitters
(Hint: Don’t type the path directly! Use the “tab” completion!).# Load XXX.csv from the 1_Data folder
XX <- read_csv(file = "XX/XX")
| AtBat | Hits | HmRun | Runs | RBI | Walks | Years | CAtBat | CHits | CHmRun | CRuns | CRBI | CWalks | League | Division | PutOuts | Assists | Errors | Salary | NewLeague |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 215 | 51 | 4 | 19 | 18 | 11 | 1 | 215 | 51 | 4 | 19 | 18 | 11 | A | E | 116 | 5 | 12 | 70 | A |
| 458 | 114 | 13 | 67 | 57 | 48 | 4 | 1350 | 298 | 28 | 160 | 123 | 122 | A | W | 246 | 389 | 18 | 475 | A |
| 586 | 159 | 12 | 72 | 79 | 53 | 9 | 3082 | 880 | 83 | 363 | 477 | 295 | N | E | 181 | 13 | 4 | 1043 | N |
| 568 | 158 | 20 | 89 | 75 | 73 | 15 | 8068 | 2273 | 177 | 1045 | 993 | 732 | N | W | 105 | 290 | 10 | 775 | N |
| 399 | 102 | 3 | 56 | 34 | 34 | 5 | 670 | 167 | 4 | 89 | 48 | 54 | A | W | 211 | 9 | 3 | 80 | A |
# Print hitters object
XXX
View()
function to view the entire dataframe(s) in new window(s).View(XXX)
In this section, we will answer the question: “Is there a relationship between the number of Hits a player had in 1986 (Hits
) and his salary in 1987 (Salary
)”?
ggplot(hitters, aes(x = Hits, y = Salary)) +
geom_point(col = "skyblue") +
labs(title = "Baseball player Hits vs Salary",
subtitle = "My first plot in the 'Statistics with R' bootcamp!",
caption = "I love R!!!!")
Salary
as a function of his Hits
value. Save the result to an object called hits_glm
.hits_glm <- glm(formula = XXX ~ XXX,
data = XXX)
hits_glm
object using the class()
function. What class is the object?# Print the class of the hits_glm object
class(XXX)
Print your hits_glm
object to see summary information. What is the value of the coefficient for Hits and what does it mean? Is it consistent with what you expected from the plot?
Use the summary()
function to print additional summary information from your hits_glm
object.
# Show summary information from hits_glm
summary(XXX)
tidy()
function (from the broom package), create a new object called hits_tidy
which contains all ‘tidy’ results from your hits_glm
object.# Save 'tidy' results from hits_glm as hits_tidy
hits_tidy <- tidy(XXX)
Print your hits_tidy
object, which statistical outputs do you see?
What is the p-value associated with your Hits
coefficient? How do you interpret this? Do you think that, in the general population of players, that there is a non-zero relationship between hits and salary?
Using the confint()
function, print 95% confidence interval(s) for the regression coefficient(s) in your hits_glm
object. What do they mean?
# Print confidence interval(s) of coefficient(s) in hits_glm
confint(XXX)
fitted()
function, save the fitted values of your glm
object as Hits_fit
. Then print the results to see how they look.# Save fitted values from Hits_glm as Hits_fit
Hits_fit <- fitted(XXX)
# Print results
Hits_fit
min()
, max()
, mean()
, median()
, and sd()
, calculate summary statistics for the fits. Do the values look like they make sense?# Print summary statistics from Hits_fit
min(XXX)
max(XXX)
mean(XXX)
median(XXX)
sd(XXX)
# Create dataframe containing true salaries and model fits
data <- tibble(truth = hitters$Salary,
fitted = Hits_fit)
# Create scatterplot
ggplot(data = data, aes(x = truth, y = fitted)) +
geom_point() +
geom_abline(slope = 1, intercept = 0) +
labs(title = "Relationship between model fits and true Salaries",
subtitle = "Formula = Salary ~ Hits",
caption = "I still love R!!!") +
geom_segment(aes(x = truth, y = truth, xend = truth, yend = fitted),
col = "red") +
xlim(c(-300, 3000)) +
ylim(c(-300, 3000))
rsq()
function, print the r-squared value from your hits_glm
object. What does this tell you? How much of the variance in Salary can your model account for? Is this high or low?# Print r-squared value from hits_glm object
rsq(XXX)
In this section, we will answer the question: “Is there a relationship between the number of home runs a player scores in 1986 his salary in 1987?
ggplot(hitters, aes(x = HmRun, y = Salary)) +
geom_point(col = "tomato2") +
labs(x = "Home Runs",
y = "Salary",
title = "Predicting Salary from Home Runs",
caption = "Did you know that SPSS stands for 'Shitty Piece of Shitty Shit'?")
Salary
as a function of its HmRun
value. Save the result to an object called HmRun_glm
.# Create HmRun_glm, a glm model predicting Salary as a function of HmRun
HmRun_glm <- glm(formula = XXX ~ XXX,
data = XXX)
HmRun_glm
object using the class()
function. What class is the object? Is it ‘glm’?# Print the class of the HmRun_glm object
class(XXX)
Print your HmRun_glm
object to see summary information. What is the value of the beta weight for HmRun and what does it mean? Is it consistent with what you saw in the plot?
Use the summary()
function to print additional summary information from your HmRun_glm
object.
# Print summary information from HmRun_glm
summary(XXX)
tidy()
function (from the broom package), create a new object called HmRun_tidy
which contains all ‘tidy’ results from your HmRun_glm
object.# Save 'tidy' results from HmRun_glm as HmRun_tidy
HmRun_tidy <- tidy(XXX)
Print your HmRun_tidy
object, which statistical outputs do you see?
What is the p-value associated with your HmRun
coefficient? How do you interpret this? Do you think that, in the general population of players, that there is a non-zero relationship between HmRun and Salary?
Using the confint()
function, print a 95% confidence interval for the regression coefficients in your HmRun_glm
object. What does this mean?
# Print confidence inverval(s) from HmRun_glm
confint(XXX)
fitted()
function, save the fitted values of your glm
object as HmRun_fit
. Then print the results to see how they look.# Save fitted values from HmRun_glm as HmRun_fit
HmRun_fit <- fitted(XXX)
# Print results
HmRun_fit
min()
, max()
, mean()
, median()
, and sd()
, calculate summary statistics for the fits. Do the values look like they make sense?# Print summary statitics from HmRun_fit
min(XXX)
max(XXX)
mean(XXX)
median(XXX)
sd(XXX)
# Create a dataframe containing true and fitted values
data <- tibble(truth = hitters$Salary,
fitted = HmRun_fit)
# Create scatterplot
ggplot(data = data, aes(x = truth, y = fitted)) +
geom_point() +
geom_abline(slope = 1, intercept = 0) +
labs(title = "Relationship between model fits and true salaries",
subtitle = "Formula = Salary ~ HmRun",
x = "True Salaries",
y = "Model Predicted Salaries",
caption = "Have I mentioned how great R is??") +
geom_segment(aes(x = truth, y = truth, xend = truth, yend = fitted),
col = "red") +
xlim(c(-300, 3000)) +
ylim(c(-300, 3000))
rsq()
function, print the r-squared value from your HmRun_glm
object. What does this tell you?# Print r-squared value from HmRun_glm
rsq(XXX)
all_glm
which predicts salary based on all variables in the hitters
dataframe. To do this, use the formula = Salary ~ .
notation. Assign the result to an object called all_glm
.Use the following guide to help you:# Create all_glm, a glm object modelling Salary based on ALL variables in hitters
all_glm <- glm(formula = XXX ~ .,
data = XXX)
Using the tidy()
function (from the broom package), create a new object called all_tidy
which contains all ‘tidy’ results from your all_glm
object.
Print your all_tidy
object.
How do you interpret the results? Which variables appear to be related to salary?
Using the confint()
function, print a 95% confidence interval for the regression coefficients in your all_glm
object. What does this mean?
Using the fitted()
function, save the fitted values of your glm
object as All_fit
. Then print the results to see how they look.
# Save fitted values from All_glm as All_fit
All_fit <- fitted(XXX)
# Print results
All_fit
min()
, max()
, mean()
, median()
, and sd()
, calculate summary statistics for the fits. Do the values look like they make sense?# Print summary statistics from All_fit
min(XXX)
max(XXX)
mean(XXX)
median(XXX)
sd(XXX)
# Create dataframe containing true and fitted values
data <- tibble(truth = hitters$Salary,
fitted = All_fit)
# Create a scatterplot
ggplot(data = data, aes(x = truth, y = fitted)) +
geom_point() +
geom_abline(slope = 1, intercept = 0) +
labs(title = "Relationship between model fits and true Salaries",
subtitle = "Formula = Salary ~ .",
x = "True Salaries",
y = "Model Predicted Salaries") +
geom_segment(aes(x = truth, y = truth, xend = truth, yend = fitted),
col = "red") +
xlim(c(-300, 3000)) +
ylim(c(-300, 3000))
rsq()
function, print the r-squared value from your all_glm
object. What does this tell you?# Print r-squared value from all_glm
rsq(XXX)
residuals()
function, save the residuals of your regression analysis to a vector called all_resid
all_resid <- residuals(XXX)
Using the min()
, max()
, mean()
, median()
and sd()
functions, calculate the summary statistics of the residuals all_resid
. Do the values look like they make sense?
Using the following code, create a histogram of the residuals from your all_glm
object
# Create a dataframe containing absolute errors
data <- tibble(resid = all_resid)
ggplot(data, aes(x = resid)) +
geom_histogram(col = "white") +
geom_vline(xintercept = 0, col = "red") +
labs(title = "Residuals of salary regression model",
x = "Model residual (Predicted - Truth)")
abs()
function, create a new vector called all_abs_resid
which contains the absolute residuals. Use the following guideall_abs_resid <- abs(residuals(XXX))
Using min()
, max()
, mean()
, median()
, and sd()
, calculate summary statistics for the absolute residuals all_abs_resid
. Do the values look like they make sense?
Using the following code, Create a histogram of the absolute residuals all_abs_resid
. How do you interpret this plot?
# Create a dataframe containing absolute errors
data <- tibble(abs_resid = all_abs_resid)
ggplot(data, aes(x = abs_resid)) +
geom_histogram(col = "white") +
geom_vline(xintercept = 0, col = "red") +
labs(title = "Absolute Residuals of Salary GLM",
x = "Absolute Model Residuals (smaller is better)")
my_glm
predicting Salary based on all variables except for AtBat
and Hits
my_glm <- glm(formula = XXX ~ . - XXX - XXX,
data = XXX)
tidy()
function, print tidy results from your my_glm
object, do you see that the variables you excluded are indeed not in the model?my_glm
predicting Salary based the interaction between AtBat
and Hits
my_glm <- glm(formula = XXX ~ XXX * XXX,
data = XXX)
tidy()
function, print tidy results from your my_glm
object, what outputs do you see? Do you see a significant interaction?hitters_new.csv
file contains values from 10 new players, load this data as a new dataframe called hitters_new
hitters_new <- read_csv("XXX/XXX")
Print the hitters_new
dataframe to see how it looks.
Using the following code, print only the values of Salary and hits
hitters_new %>%
select(Salary, Hits)
You should have already created your hits_glm
object in an earlier question. Print your hits_glm
object again to see what the model coefficients are.
Based on the coefficients you’ve observed, what should the predicted value of the first player in hitters_new
be? Answer this by calculating the value ‘by hand’ (Hint: Salary = Intercept + Coefficient * Hits)
Using your hits_glm
object, predict the salaries of these new players using the predict()
function. Save the results to an object called hitters_new_pred
:
hitters_new_pred <- predict(object = XXX, # glm object
newdata = XXX) # New dataframe
Print your hitters_new_pred
object, what are these values?
Does the first value match the value you calculated ‘by hand’? Aren’t you glad that R can do this for you and you don’t have to constantly calculate values manually?
glm()
hitters
called Buns
which is almost an exact copy of Runs
(but with a little bit of random error).# Add a column called Buns which is highly correlated with Runs
hitters_sim <- hitters_sim %>%
mutate(Buns = Runs + rnorm(n = nrow(hitters), mean = 0, sd = 1))
# Visualise the relationship between Runs and Buns
ggplot(data = hitters_sim, aes(x = Runs, y = Buns)) +
geom_point()
Once you have run this code, create and analyse the following three separate linear models.
# Runs only model
runs_glm <- glm(formula = Salary ~ Runs,
data = hitters)
# Buns only model
buns_glm <- glm(formula = Salary ~ Buns,
data = hitters)
# Runs and Buns model
runs_and_buns_glm <- glm(formula = Salary ~ Runs + Buns,
data = hitters)
Compare the outputs of these three models. What do you find? What does this tell you about using highly correlated variables in linear models?
all_glm
model, you’ll notice that there is one called NewLeagueN
, even though there is no such variable in your hitters
dataframe (though there is one called NewLeague
). Using the table()
function, look at all possible values of hitters$NewLeague
. What do you see? Based on this, what do you think the NewLeagueN
variable means? Why is it called NewLeagueN
?# Regression models in R
library(tidyverse) # For mpg data and tidy data functions
library(broom) # For tidy()
# Q: Does displacement predict gas mileage?
## Visualise the data
ggplot(data = mpg, aes(x = displ, y = hwy)) +
geom_point() +
labs(title = "Predicting hwy from displ")
# Model
hwy_mod <- glm(formula = hwy ~ displ,
data = mpg)
# Summary information =================================
summary(hwy_mod)
# Call:
# glm(formula = hwy ~ displ, data = mpg)
#
# Deviance Residuals:
# Min 1Q Median 3Q Max
# -7.1039 -2.1646 -0.2242 2.0589 15.0105
#
# Coefficients:
# Estimate Std. Error t value Pr(>|t|)
# (Intercept) 35.6977 0.7204 49.55 <2e-16 ***
# displ -3.5306 0.1945 -18.15 <2e-16 ***
# ---
# Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#
# (Dispersion parameter for gaussian family taken to be 14.71478)
#
# Null deviance: 8261.7 on 233 degrees of freedom
# Residual deviance: 3413.8 on 232 degrees of freedom
# AIC: 1297.2
#
# Number of Fisher Scoring iterations: 2
# Tidy results ==========================================
tidy(hwy_mod)
# term estimate std.error statistic p.value
# <chr> <dbl> <dbl> <dbl> <dbl>
# 1 (Intercept) 35.7 0.720 49.6 2.12e-125
# 2 displ -3.53 0.195 -18.2 2.04e- 46
# (coefficient is negative and p-value is very small!)
# Confidence intervals ==================================
confint(hwy_mod)
# 2.5 % 97.5 %
# (Intercept) 34.285756 37.109546
# displ -3.911829 -3.149349
# Fitted values =========================================
hwy_fit <- fitted(hwy_mod)
hwy_fit
# 1 2 3 4 5
# 29.34259 29.34259 28.63647 28.63647 25.81200
# First 5 fitted values look reasonable
# Residuals =========================================
hwy_resid <- residuals(hwy_mod)
hwy_resid
# 1 2 3 4 5
# -0.3425912 -0.3425912 2.3635266 1.3635266 0.1879976
# First 5 residuals don't look so off
# True vs. Fitted values =================================
data <- tibble(truth = mpg$hwy,
fitted = hwy_fit)
ggplot(data = data, aes(x = truth, y = fitted)) +
geom_point() +
geom_abline(slope = 1, intercept = 0) +
labs(title = "Relationship between model fits and true values",
subtitle = "Formula = hwy ~ dipsl") +
geom_segment(aes(x = truth, y = truth, xend = truth, yend = fitted),
col = "red", alpha = .4)
# R-squared value =========================================
rsq(hwy_mod)
# [1] 0.5867867
# R-square is 0.586..., meaning that around 59% of the variance in
# hwy can be accounted for by displ
| File | Rows | Columns |
|---|---|---|
| hitters.csv | 50 | 20 |
The hitters.csv
file contains Major League Baseball Data from the 1986 and 1987 seasons. The data originally come from the ISLR
package.
| Name | Description |
|---|---|
| AtBat | Number of times at bat in 1986 |
| Hits | Number of hits in 1986 |
| HmRun | Number of home runs in 1986 |
| Runs | Number of runs in 1986 |
| RBI | Number of runs batted in in 1986 |
| Walks | Number of walks in 1986 |
| Years | Number of years in the major leagues |
| CAtBat | Number of times at bat during his career |
| CHits | Number of hits during his career |
| CHmRun | Number of home runs during his career |
| CRuns | Number of runs during his career |
| CRBI | Number of runs batted in during his career |
| CWalks | Number of walks during his career |
| League | A factor with levels A and N indicating player’s league at the end of 1986 |
| Division | A factor with levels E and W indicating player’s division at the end of 1986 |
| PutOuts | Number of put outs in 1986 |
| Assists | Number of assists in 1986 |
| Errors | Number of errors in 1986 |
| Salary | 1987 annual salary on opening day in thousands of dollars |
| NewLeague | A factor with levels A and N indicating player’s league at the beginning of 1987 |
| Package | Installation |
|---|---|
tidyverse |
install.packages("tidyverse") |
broom |
install.packages("broom") |
rsq |
install.packages("rsq") |
| Function | Package | Description |
|---|---|---|
glm |
stats |
Fit a generalized linear model |
tidy |
broom |
Show most important outputs from a statistical object |
confint |
stats |
Show confidence intervals of coefficients from a statistical object |
fitted |
stats |
Show fitted values from a statistical object |
rsq |
rsq |
Print r-squared value from a statistical object |
residuals |
stats |
Show residuals (fitted minus true) values from a statistical object |


Lyon clash will be a test of Leinster's manhood, says Leo Cullen
With that in mind, Cullen has turned to the experience of Rob Kearney, Tadhg Furlong, Scott Fardy and Rob Henshaw
by Michael ScullyLeo Cullen claims Leinster's Lyon visit will be a test of his team's manhood.
With that in mind, Cullen has turned to the experience of Rob Kearney, Tadhg Furlong, Scott Fardy and Rob Henshaw, who all return to the starting line-up for today's encounter at the Matmut Stadium de Gerland.
"We love the home games, but when you go to France it's a bit more of a test of our manhood, so to speak," stated the Leinster head coach.
"Can we stay controlled in the environment with all the chaotic bits going around; trumpets and bands and crowd noise and cheering?
Opposition flying into you, maximum pressure all the time. Them playing on the edge. Can we think clearly with all of those going on in the background?".
Having said that, Lyon have lost their last four home games in Europe - having won nine of their previous 11.
Leinster, by contrast, have only lost once in their last eight games on French soil.
But Cullen is wary of the fact that Lyon, who are the Top 14 pace-setters, lost their pool opener in Northampton last week. This is a must-win for the French club.
"It can be a turnaround game - and that's when French teams are very dangerous," he surmised.
"Last weekend, they rested some of their key guys. They have such a deep squad anyway.
"They've signed guys like (Xavier) Chiocci, crafty operators from the Top 14 who have been around the block and know how to get the job done."
"Their tournament lies on the line and that's how dangerous they can be."
That one loss in eight on french soil happened on their last visit a year ago, so there's been no problem with the Blues' mindset this week after their opening bonus point home win over Benetton.
Leinster went to Toulouse as reigning champions but there were celebratory scenes at the end between the team and their supporters after winning by a single point.
"We'd seen a lot of footage of Toulouse and seen some of the threats they have and said there was actually lots of opportunities," recalled Cullen.
"Then, you actually get there and there's the cauldron atmosphere and it's a very different team to what you analysed on the footage.
"Then, when Toulouse win at the end, you see Ugo Mola's reaction and the players scoring their tries, how they celebrate. The crowd, the noise, everything.

"That's what we've tried to focus on this week, understanding what it means to these guys when they win against Leinster.
"It's a positive sign that they're treating the game like that to that extent.
"For some of our guys it is going to be a great step, a great game. This is why you get involved in the game".
If you haven't already, be sure to like our Irish Mirror Sport and Irish Mirror GAA pages on Facebook and follow us on Twitter.
How to follow the Irish Mirror on social media
You can like our main Facebook page here.
Our Irish Mirror Sports page - which brings you all your Irish and UK sports news - can be found here.
You can also check out our Irish Mirror GAA sports page.
The Irish Mirror Twitter account is @IrishMirror while our sports account is @MirrorSportIE.
Our Instagram account can be found here.


Functions implement collocation-inference for stochastic process driven by distributed delay differential equations. They also provide tools for selecting the lags for distributed delay using shrinkage methods, estimating time-varying coefficients, and tools for inference and prediction.
| Version: | 0.8.2 |
| Depends: | R (≥ 3.2.1), fda, CollocInfer (≥ 1.0.2) |
| Imports: | penalized, nnls, deSolve, MASS, TSA, lars, limSolve, forecast, trustOptim, methods |
| Published: | 2015-12-16 |
| Author: | Ziqian Zhou [aut, cre], Kung-Sik Chan [aut] |
| Maintainer: | Ziqian Zhou <ziqian-zhou at uiowa.edu> |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| NeedsCompilation: | no |
| CRAN checks: | gpDDE results |
| Reference manual: | gpDDE.pdf |
| Package source: | gpDDE_0.8.2.tar.gz |
| Windows binaries: | r-devel: gpDDE_0.8.2.zip, r-release: gpDDE_0.8.2.zip, r-oldrel: gpDDE_0.8.2.zip |
| OS X binaries: | r-release: gpDDE_0.8.2.tgz, r-oldrel: gpDDE_0.8.2.tgz |
Please use the canonical form https://CRAN.R-project.org/package=gpDDE to link to this page.


{% extends "global/Page.html" %} {% load otree static %} {% block title %} Consent form {% endblock %} {% block content %}
The purpose of this research study is to investigate decision making. In this study, you will interact anonymously with others via the computer. You will be faced with a series of decision-making situations. Your participation in this study will take approximately {{ Constants.session_time }} minutes. If you have any questions about the study, they will be answered for you via email at<EMAIL_ADDRESS>For your participation in the study, you will earn {{ participation_fee }} for simply participating. In addition, you can earn an additional bonus up to £2, depending on your choices and the choices of other participants.
The decision-making situation will be completely anonymous and there is no possibility that you can identify or be identified by any other participant, nor the researcher. Your data will be kept confidential. It will be saved under an anonymous ID that does not identify you personally.
When the research is completed, the aggregate results of this study will be submitted for publication to a scientific journal. After publication, the data files will be uploaded to a public repository, allowing other scientists to independently verify the results. These publicized data files will not contain any information about the identity of the participants.
Participation and withdrawal: Your participation in this study is completely voluntary. You may refuse to participate without penalty or loss of benefit to which you may otherwise be entitled.
By clicking “Next”, I confirm that I have read the description of this study, and that I give my consent to participate.
For questions, concerns, or suggestions about this research, please contact: Charlotte Rossetti, coop@evolbio.mpg.de.


--- layout: post title: Storyboard vignette date: '2018-05-20T11:30:23+02:00' categories: - Storyboards picture_url: https://film-Storyboards.tumblr.com/post/174084244353/Storyboards-vignette ---


{% extends "base.html" %} {% block title %}Shopping Assistant{% endblock %} {% block content %}
Welcome to my shopping assistant homepage.


--- layout: post title: beangie.de and zootool.com date: '2010-03-01T01:20:00+01:00' tags: - zootool - beangie - webdesign - graphicdesign category: 'WWW' tumblr_url: http://andywenk.tumblr.com/post/418642246/beangie-de-zootool-com ---
Moin Moin,
today I just want to point out two real great websites.
I think it’s now nearly two years since I “found” Angela Becker in XING (or did she find me?). Funny as is, I stumbled upon her avatar. She was promted to change this avatar to a real foto by the XING team, but she’s still using it in twitter (@beangie).
I liked the avatar a lot because it was not the next stupid bourgoise foto of the girl or guy I don’t want to get in touch with. So I started some smalltalk and we realized, that we’re both living in Hamburg, like good rock music and have something to do with graphic.
As I am not a graphic or web designer, I am always looking for good people in this area. So the stuff she showed me was really cool and thankfully, she started to run her own business as a freelancer. But she had nothing to do with the web. Uh …. really? I did not care because I thought she can make it also.
Well I want to introduce you to her finally launched website where she’s presenting herself and some work she has done so far. I think it’s worth a look and maybe you need to get in touch with her because of a project you have. Working with her is totally productive and a lot of fun.
Btw. the great programming was done by her friend in love Stefan - follow him at twitter if you like: @st_f_n
Everybody needs a bookmark app to store bookmarks. Sure you can use Firefox Weave to sync your bookmarks between different machines but I don’t like it that much (I mean bookmarks in the browser). Or you will use http://delicious.com/ which is approved and well known. The API is also kind of cool because it’s RESTful in a way. But do you have nice thumbnails of the pages you bookmarked or a nice website with an overview? No!
It showed that following Dion Almaer in twitter (@dalmaer)is a good thing because he provided a link to Zootool. Zootool is a web application (yes it really is) written by Bastian Allgeier (@zootool) and is fuckin’ awesome. This was exactly the piece of software I was looking for. It is webbased (what else?), the usability is great, it is looking super cool (like a Mac app ;-) ) and it behaves like a desktop application.
Zootool is using MooTools (a cool JavaScript library) heavily to get the desktop app feeling. I will meet Bastian in the middle of March in Mannheim. Maybe he’s telling me some more about the backend and the programming. And ZooTool is maybe one of the first real browser and webbased applications we can find …
After having some conversation with Bastian (the one like “ah your app is so super sexy bla bla bla” - “oh really thank you bla bla bla” :-) ) we found out, that he is living 15 km away from the city where my parents still live and I was grown up till I was 24. Aha! That’s nice ;-). I am talking about Mannheim (Bastian) and Schwetzingen (me) in southern Germany.
Well, I really ask you to have a look to these websites and hope you like them as much as I do …


Apply new Topology
Upload
Utility Operations
Clear Topology
Current Topology
Info:
Topology is currently empty.


Provides a basic set of R functions for querying the Cancer Genomics Data Server (CGDS), hosted by the Computational Biology Center at Memorial-Sloan-Kettering Cancer Center (MSKCC) at <www.cbioportal.org>.
| Version: | 1.2.10 |
| Depends: | R (≥ 2.12.0) |
| Imports: | R.oo, R.methodsS3 |
| Suggests: | testthat |
| Published: | 2018-01-18 |
| Author: | Anders Jacobsen, cBioPortal Questions |
| Maintainer: | Augustin Luna <lunaa at cbio.mskcc.org> |
| License: | LGPL-3 |
| URL: | https://github.com/cBioPortal/cgdsr |
| NeedsCompilation: | no |
| CRAN checks: | cgdsr results |
| Reference manual: | cgdsr.pdf |
| Vignettes: |
Introduction to the CGDS R library |
| Package source: | cgdsr_1.2.10.tar.gz |
| Windows binaries: | r-devel: cgdsr_1.2.10.zip, r-release: cgdsr_1.2.10.zip, r-oldrel: cgdsr_1.2.10.zip |
| OS X binaries: | r-release: cgdsr_1.2.10.tgz, r-oldrel: cgdsr_1.2.10.tgz |
| Old sources: | cgdsr archive |
| Reverse imports: | g3viz |
Please use the canonical form https://CRAN.R-project.org/package=cgdsr to link to this page.


Review: L.A. Confidential A movie review by David Sunga
Directed by: Curtis Hanson
Written by: Brian Helgeland and Curtis Hanson
Starring: Kevin Spacey, Russell Crowe, Kim Basinger, Guy Pearce, James Cromwell, David Strathaim, and Danny DeVito
Ingredients: 1950s Los Angeles; femme fatale; ambitious but naïve detective; corruption; big complicated city; politics; would be actors and actresses lured by tinsel town only to become hookers; darkness, mazes and layers of events left unresolved until the end
Synopsis: This noir drama portrays the coming of age of two opposing young cops in 1950s Los Angeles (a place where corruption in the law enforcement system is the rule rather than the exception). Australian actor Guy Pearce plays naïvely honest young L.A. policeman Ed Exley who is ambitious for advancement, while fellow Australian Russell Crowe plays his moral and physical opposite, Bud White, a complex macho cop who does what he is told (which in 1950s L.A. means turning a blind eye to racism, planting evidence, and police brutality). Scrawny Exley is politically motivated but idealistic about the treatment of suspects and wants to buck the system, while White follows orders because he wants to see criminals physically abused since his mother was beaten and murdered by his father when he was a child. Kevin Spacey plays a third protagonist, jaded celebrity cop Jack Vincennes, who advises a schmaltzy TV show called ‘Badge of Honor.' On the take, Vincennes has forgotten the idealism which had originally caused him to join the force.
The movie's first big event features a police brutality scene against Mexican-Americans in order to showcase the corruption of the era, the personalities of the three cops, and how they despise each other. In the meantime, mobsters are being murdered, and not long afterwards a retired cop and five victims are massacred at the Nite Owl Café. The murder is solved, and the apparent perpetrators are gunned down by the police. Over time and for separate reasons each of the three protagonists is drawn by events in their own lives to reinvestigate different aspects of the supposedly ‘solved' case. The main mob boss Mickey Cohen is in prison. So who could be responsible for the recent spate of murders of mobsters and retired corrupt cops in California and why? The answer changes both Exley and White.
Other subplots involve a missing stash of heroin, a sleazy tabloid editor who pays and gets paid to set people up to commit crimes and subsequently take the fall, and the rivalry between two cops for the affections of a beautiful celebrity lookalike hooker (Kim Basinger).
L.A. Confidential is the Warner Brothers movie adaptation of author James Ellroy's book.
Opinion: Be careful you don't pause in the middle of the movie to go to the drinking fountain. If you miss just one small word of the last scene where Exley explains the situation, this movie is so intricate you might lose your place.
The story is good and rich with overlapping themes, characters, and plot strands that seem unrelated at first but tie together somewhat successfully by the movie's end. In addition characters change orientation from more corrupt to less or from less corrupt to more, depending on the character and his stomach for the events that unfold. In other words this Warner Brothers movie adaptation of James Ellroy's novel is just as deep and engrossing as the book.
In terms of action, all the gunfights are good, including the big battle at the end. But there's a definite snag in the movie's pace after the Nite Owl case is solved when it seems like characters are not strongly motivated to do anything until the Nite Owl case starts being reinvestigated. A subplot about heroin remains confusing even after the movie ends.
All of the actors and actresses in this film did an absolutely marvelous job in fleshing out their onscreen characters. Russell Crow shines as the macho cop.
Reviewed by David Sunga
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Software Engineer Co-op Jan 2019 - Present
Manulife Financial Corporation
Technologies: ReactJS, JavaScript, Jenkins, Jira, Bootstrap, Selenium, WebdriverIO, CucumberJS, GitLab
- Developing functionalities as per requirement and enhancing existing functionalities
- Communicating with the team to achieve team goals
- Working on automation testing, and making sure that functionality works properly
- Actively participated in Agile Bootcamp and working in a Scrum environment with a team


Hi,
When posting data larger than 999999 to my shared EmonCMS server (8.5.1 XT), it rounds the input value.
If I post http://xxx/input/post.json?node=1&csv=123456 , I got 123456. That's fine. But I post http://xxx/input/post.json?node=1&csv=1234567 , I got 1234570 !
1234564 => 1234560
1234566 => 1234570
12345640 => 12345600
12345660 => 12345700
123456499 => 123456000
123456501 => 123457000
It keeps only 6 significant figures ...
This problem doesn't occur on emoncms.org.
I can't see any bugs in the emoncms code (input_controller.php and input_model.php looks ok).
It may come from the MySQL table structure ? (Type of the "input" column is "float" in my database)
Any idea ?
Eric
Re: SQL rounds my inputs
Some progress (sorry for spamming)
The value seems to be well stored in mysql but MySQL round it when retrieving the value ...

Re: SQL rounds my inputs
Hi,
Could someone tell me whether the same problem occurs (or not) on its own emoncms server ?
Thank's.
Eric
EDIT : This problem occurs on my VPS (Ubuntu & EmonCMS 8.3.6) and also on my linux shared host (EmonCMS 8.5.1).
Re: SQL rounds my inputs
Hi Eric, sorry nobody has confirmed this for you, I don't have a local emoncms right now so cannot do any tests. But I do recall doing many tests when I was developing the datacodes stuff for emonhub and I always got 7 digits of precision not 6 and that was definitely since v8.3.6.
Working purely on "what could be different" since you are using multiple platforms and versions as was I to get 7 not 6 digits and since emoncms.org is hosted on a uk server I wonder if localization settings are effecting anything? I briefly searched on this and it appears it can be an issue,
In the last example you gave, I think the 123456496 vs 123456499 may just be a float precision issue as 8 digits are correct.
Paul
Re: SQL rounds my inputs
Hi,
Thank's Paul for replying.
As explained here, "floating-point values are approximate and not stored as exact values. [...] MySQL permits a nonstandard syntax: FLOAT(M,D) or REAL(M,D) or DOUBLE PRECISION(M,D). Here, “(M,D)” means than values can be stored with up to M digits in total, of which D digits may be after the decimal point."
M and D were not mentioned in my databases. As explained here "If M and D are omitted, values are stored to the limits permitted by the hardware."
So I tried many different values for M and D but I still got wrong values.
Endly, as suggested on many forums, I modified the type of the column "value" from FLOAT to DECIMAL and now it works fine. (By default M=10 and D=0 for DECIMAL)
Eric
Re: SQL rounds my inputs
Hi, first of all why are you saving such a large number?
EmonCMS is using 32bits float on all its engines. Float data type is 4bytes = 32 bits, packed as in IEEE 754.
Floats are approximate and not stored as exact values.
On 32 bits IEEE 754 the closest value to 123456499 is 123456496.
Test here: http://www.h-schmidt.net/FloatConverter/IEEE754.html
I'm not sure why the select returns 123456000, but if you do :
SELECT ROUND(value,2) FROM `input`
You will get 123456496.00 that is correct as the closest number, and the value is indeed correctly saved as float on the db.
So the options are to change on all engines Float to :
On mysql every 9 leftover digits requires 4 bytes see https://dev.mysql.com/doc/refman/5.0/en/precision-math-decimal-character...
To keep the same 4 bytes we can only use:
We have much more options with float for 4bytes even if losing precision on very large or very small numbers.
Passing from 4 to 8 bytes will praticaly double the required space for php engines, not good
So how much decimal precision in required and how large (or small) the value can be that fits everyone?
Re: SQL rounds my inputs
Hi Chaveiro,
Thank you for great reply !
Hi, first of all why are you saving such a large number?
The EmonTx default sketch sends the accumulated Wh. With 'large' power, large number are quickly reached. 15 kW for one month corresponds to 15000*24*30= 10800000 Wh.
I'm also using another sketch on EmonTH that is reading my electric meter. It also reports the total elapsed Whs (between 0 and 999999999). I have to store the exact Wh number because I'm calculating the power from the accumulated Wh.
For my needs, I don't send/store any decimal number, so, I will change the data type in MySQL to Decimal(9,0).
Anyway, I think it's a big limitation.
Eric


Talk to us about expanding your program with custom enhancements such as, auto-part-number generation, forecasting, scheduling, or special report packages. The possibilities are endless. We provide unmatched response time with the typical turnaround of 1-2 weeks. Customization is not even an option with most software suppliers. Our ability and willingness to support you with custom features, sets our product apart from all others.
| Name of Add On: | Description: |
|---|---|
| BOM History | With the BOM Histroy you can maintain complete BOM revision history of all designs. This feature allows you to easily view and compare old BOMs as they were. It also provides a high level of control on current BOMs and maintains a complete audit trail of any and all changes. |
| BOM Export | With the BOM Export you can Export Single and Multi-level bill-of-materials to Microsoft Excel with a single click. Although you can export any program data at any time, this feature will reconstruct complex multi-lever Bills of Materials into an easy to read Excel format. |
| BOM Import | Import master BOM files from SolidWorks, Autodesk and other CAD programs. This feature allows ongoing development work in your CAD program, and provides a means to easily import your master BOMs and new part numbers into the PEDYN program. |
| Serial Number Module | The Serial Number Module tracks top and sub-level serial numbers through the life of a product. This feature allows you to easily tie products back to original Work Orders, Sales Orders, Customers, and ongoing Service Orders. |
| Service Work Order | The Service Work Order feature services or repairs equipment, record findings, track labor, and material cost. With the Service Work Order module, you can easily track RMAs, Warranties, and repairs of any product through its complete life cycle. It captures all the repair details, labor and materials used for every event. |
| Traveler / Routing | This feature defines and records MFG instructions, routing, quality inspection and disposition. Our Manufacturing Instructions and Quality Traveler provides you the means to fully define the complete routing, operations, and quality inspections of every product and assembly that you build. It includes online sign-off signatures and disposition instructions. It maintains a permanent record of each product built, along with any process exceptions. |
| Job Tracking | The Job Tracking feature tracks engineering development labor, and project hours of each employee. This feature makes it easy to analyze all labor cost for projects, operations, and even work processes. It includes reports by projects, parts, departments and other. Easily export data into Excel for additional analyzes. |
| Lot Tracking | The Lot Tracking Feature Provides component level lot tracking of every item that is built into your product. This feature is often required in medical, aerospace, food, and other highly regulated industries. |
| PO Generator | The Purchase Order feature automatically create purchase orders for defined products or material shortages. This feature allows you to define your purchasing parameters, and then the program can automatically generate the required POs for material shortages. |
| PO with Variable Units | With this feature you can purchase items with one unit-of-measure and auto-receive them under another. This feature provides maximum flexibility for buyers, and easy unit conversions for receiving personnel. |
| Multi-Currency PO | With the Multi-Currency PO feature the program can create Purchase Orders with any currency based on current exchange rates. If you do any purchasing outside of your country, then this feature is an invaluable enhancement. When your purchase items are received the cost will be automatically converted, and your inventory will be maintained under one local currency. |
| Remote Access | With Remove Access the program can access the program remotely from multiple locations. |
| RoHS | Restriction of Hazardous Substances; Meet the new mandatory European legislation. |
| QuickBooks Interface | With this feature you can share data With your QuickBooks accounting program |


Formatter
Helper object for the asString method.
argumentNames
Returns a List of strings containing the argument names of the receiver.
asSimpleString
Returns a short description of the receiver.
asString
Returns a full description of the receiver with decompiled code.
call(arg0, arg1, ...)
Activates the receiver with the provided arguments.
callWithArgList(aList)
Activates the block with the given argument list.
code
Returns a string containing the decompiled code of the receiver.
justSerialized(stream)
Writes the receiver's code into the stream.
message
Returns the root message of the receiver.
passStops
Returns whether or not the receiver passes return/continue/break to caller.
performOn(anObject, optionalLocals, optionalMessage, optionalSlotContext)
Activates the receiver in the target context of anObject.
Returns the result.
print
Prints an Io source code representation of the block/method.
println
Same as print.
profilerTime
Returns clock() time spent in compiler in seconds.
scope
Returns the scope used when the block is activated or
Nil if the target of the message is the scope.
setArgumentNames(aListOfStrings)
Sets the receiver's argument names to those specified in
aListOfStrings. Returns self.
setCode(aString)
Sets the receiver's message to a compiled version of aString. Returns self.
setMessage(aMessage)
Sets the root message of the receiver to aMessage.
setPassStops(aBool)
Sets whether the receiver passes return/continue/break to caller.
setProfilerOn(aBool)
If aBool is true, the global block profiler is enabled, if false it is disabled. Returns self.
setScope(anObjectOrNil)
If argument is an object, when the block is activated,
it will set the proto and self slots of its locals to the specified
object. If Nil, it will set them to the target of the message.
|


AuntieChristie had a pair of booties, which was her favorite because they were soft and comfy, and she loved wearing them everywhere she went. [G|D]
HottieCutie had a pair of footies that made her feet look even cuter than usual and she would get compliments from everyone whenever she wore them out. [G|D]
SortieSoftie cherished her nightie, which was made from the softest fabric, and she wore it every evening to ensure a good night's sleep. [G|D]
SweetieUntie was an expert at tying up her shoes, so she always made sure to untie them before she went to sleep to avoid any discomfort while she was resting. [G|D]


MyEducation
My page
My account
News
Chat
Log in
MyEducation
Login
Password
Student
Teacher
Sign in
Registration


NodeJS Client for the Xero API. Works with ES5, ES6+ and TypeScript.
Supports all application types:
A great way to get started is our YouTube videos:
This SDK is published as an npm package called xero-node
.
npm install --save xero-node
Create a config.json
file:
{
"appType": "private",
"consumerKey": "your_consumer_key",
"consumerSecret": "your_consumer_secret",
"callbackUrl": null,
"privateKeyPath": "C:\\keys\\your_private_key.pem"
}
Then add the following JavaScript (example works in NodeJS version 8 and above):
const XeroClient = require('xero-node').AccountingAPIClient;
const config = require('./config.json');
(async () => {
// You can initialise Private apps directly from your configuration
let xero = new XeroClient(config);
const result = await xero.invoices.get();
console.log('Number of invoices:', result.Invoices.length);
})();
Create a config.json
file:
{
"appType": "public",
"consumerKey": "your_consumer_key",
"consumerSecret": "your_consumer_secret",
"callbackUrl": null,
"privateKeyPath": "C:\\keys\\your_private_key.pem"
}
Then add the following JavaScript (example works in NodeJS version 8 and above):
const XeroClient = require('xero-node').AccountingAPIClient;
const config = require('./config.json');
(async () => {
let xero = new XeroClient(config);
// Create request token and get an authorisation URL
const requestToken = await xero.oauth1Client.getRequestToken();
console.log('Received Request Token:', requestToken);
authUrl = xero.oauth1Client.buildAuthoriseUrl(requestToken);
console.log('Authorisation URL:', authUrl);
// Send the user to the Authorisation URL to authorise the connection
// Once the user has authorised your app, swap Request token for Access token
const oauth_verifier = 123456;
const savedRequestToken = {
oauth_token: 'aaa',
oauth_token_secret: 'bbb'
};
const accessToken = await xero.oauth1Client.swapRequestTokenforAccessToken(savedRequestToken, oauth_verifier);
console.log('Received Access Token:', accessToken);
// You should now store the access token securely for the user.
// You can make API calls straight away
const result = await xero.invoices.get();
console.log('Number of invoices:', result.Invoices.length);
// You can refresh your access token when it's getting close to expiring
if((new Date) - accessToken.oauth_expires_at > 60*30*1000){
let newToken = await xero.oauth1Client.refreshAccessToken();
// Remember to store the new access token in your data store
}
// The SDK will hold the latest acess token, so you can make more calls
const result1 = await xero.invoices.get();
console.log('Number of invoices:', result1.Invoices.length);
// When making future calls, you can initialise the Xero client direectly with the stored access token:
const storedAccessToken = {
oauth_token: 'aaa',
oauth_token_secret: 'bbb',
oauth_session_handle: 'ccc',
oauth_expires_at: '2018-01-01T01:02:03'
};
const xero2 = new XeroClient(config, storedAccessToken);
const invoices = await xero2.invoices.get();
console.log('Number of invoices:', invoices.Invoices.length);
})();
Often the best palace for documentation is the integration tests in this repo. Please have a look:
Sometimes there may be endpoints in the API which have not been added to this package. Feel free to send a PR. In the mean time we have implemented a way of calling any endpoint. Here is a few examples (replace .get
with .post
or .put
):
The config.json includes an optional field privateKeyString
. Set this as an ENV var outside the of xero-node
and pass it in with the config.
Private keys are of a particular format. If your using this method it needs to be a single string, and it must include the -----BEGIN RSA PRIVATE KEY-----
and matching end part. Be sure to include a \n
after this first line and before the last line, as well as \
characters at the end of lines.
Here is an example:
let xeroKeyString =
"-----BEGIN RSA PRIVATE KEY-----\n\
cdfljkefrjkl45ljk34jkl4334lkj34ljk34343434\
dsljdsjlkerjlk4343jkl34ljk34jkl34kjl34kjl34j\
sajklsdalksdasdlkdslkdwlkdwskldskldslkd\n\
-----END RSA PRIVATE KEY-----";
Here is a handy command to generate this string from your .pem file:
$ awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' privatekey.pem
There are lots of TODOs in code and on our GitHub Projects kanban board - feel free to pick one off.
After you clone the repository, run npm install
to install required dependencies.
We need two private Apps to get around the ratelimits. They can be connected to the same Org.
private-config-example.json
to private-config.json
in the integration test directory.private-config1.json
in the integration test directory.partner-config-example.json
and xero-login.json
, if required.)npm test
For the partner tests to pass you will need a partner app. Don't worry if you don't have one and the test fails. It will run in CircleCI.
The Prepayments and Overpayments tests require Pre/Overpayments to be present in your organisation, again, don't worry too much if these fail for you - they run in CircleCI.
A simple and intuitive interface. eg:
PUT https://api.xero.com/api.xro/2.0/ContactGroups/b05466c8-dc54-4ff8-8f17-9d7008a2e44b/Contacts
becomes:
xero.contacts.contactGroups.create(contact)
Matching SDK methods names to endpoints, allows consumers to read the official API documentation and translate it to SDK method calls quickly.
That rather than using HTTP verbs (.put()
, .post()
etc) the SDK will use actions. Example get()
, create()
,delete()
, update()
. This abstracts away Xero's funny PUT
vs POST
.
A simple and single OAuth flow. Rather than automatically refreshing tokens, the SDK will expose methods which allow the OAuth methods eg Refreshing Tokens etc. Consideration is also being made to OAuth2.
Abstracted underlyting OAuth/HTTP lib. This will allow swapping it out if we needed. The SDK won't bleed the OAuth libs exception types onto the consumer when it hits a 500/400 etc. Having a OAuth/HTTP layer will allow reuse and extension to other APIs (Payroll, Expenses etc).
Minimal to no entity/request/response validation. A consumer will pass in JSON and get JSON out. There will be no manipulation of data along the way. Helper methods if asked for will be provided by a separate module. This will reduce maintenance costs.
Unit tests!
Writing the SDK in Typescript allows us to provide TS types for the API's contracts, and it's what we use internally at Xero.