Townhouse in Vancouver’s South Main draws six offers in first week
by Kerry Gold4157 Sophia St., No. 15, Vancouver
Asking price: $968,000
Selling price: $999,999
Previous selling prices: $649,000 (2012); $577,500 (2009); $299,000 (2003)
Days on market: 7
Taxes: $2,192.35
Maintenance fee: $403.52
Listing agent: Mary Cleaver, Re/Max Select Realty
The action
Listing agent Mary Cleaver received six offers in the first week of listing the unit. All offers came with conditions. The seller accepted an offer as well as a back-up offer. The buyers who made the original offer removed their conditions and it was accepted, so the back-up offer wasn’t needed.
What they got
This two-level townhouse is located in the popular Main Street area, and because it was built in the 1990s, it’s larger than today’s standard.
The 1,371-square-foot property has two bedrooms, a den and two full bathrooms, as well as large balcony and patio spaces with landscaping. The unit has bamboo floors on the main level and the kitchen and both bathrooms have been renovated. It comes with two parking stalls and rentals are allowed.
The agent’s take
The sellers are a young family who had an accepted offer on a house and were hoping for a quick sale.
“The home had been updated over the years, it showed well, and it will be a nice home for the young couple and their dog that were the successful bidders,” Ms. Cleaver said.
 We have a weekly Real Estate newsletter to help you stay on top of news on the housing market, mortgages, the latest closings and more. Sign up today.
Done Deals
Vancouver house gets 13 offers, sells over asking Asking: $1,370,000 Selling: $1,385,000


{# A fragment for rendering a restricted Topic's vitals in a table #} {# we have the 'topic' in our context. #} {% load asutils %}


Ex-CIA officer sentenced to 19 years in prison for conspiring to spy for China
by Sarah N. Lynch(The Nov 22 story corrects spelling error in Jerry Chun Shing Lee’s name in paragraph 2.)
By Sarah N. Lynch
(Reuters) - A former CIA case officer was sentenced by a federal judge in Virginia on Friday to serve 19 years in prison, after he pleaded guilty in May to conspiring to become a spy for China, federal prosecutors announced.
Jerry Chun Shing Lee, 55, left the CIA in 2007 and moved to Hong Kong. A few years later, in 2010, he was approached by two Chinese intelligence officers who offered to pay him $100,000 and to take care of him “for life” for information he had acquired as a CIA officer.
Hundreds of thousands of dollars were subsequently paid into Lee’s personal bank account between 2010 and 2013, in exchange for his services.
“Instead of embracing that responsibility and honoring his commitment to not disclose national defense information, Lee sold out his country, conspired to become a spy for a foreign government, and then repeatedly lied to investigators about his conduct,” Zachary Terwilliger, the U.S. Attorney for the Eastern District of Virginia, said in a statement.
According to the Justice Department, the FBI conducted a search of Lee’s hotel room in Hawaii in August 2012 and discovered he had an address book and day planner containing handwritten notes he had made during his time as a CIA case officer prior to 2004.
The notes included highly sensitive intelligence, such as the names of CIA assets, operational meeting locations, phone numbers and details on covert facilities.
He later lied to the FBI when he was confronted.
He pleaded guilty in May with conspiring to deliver national security defense information to aid a foreign government.


We are a small, but powerful and independent team of digital project creators, truly loving our job. We start each day with new ideas, help each other grow and learn from one another. Each project needs to be perfected to the extent that allows us to support the reputation of a trusted partner and raises the bar of our ambition higher and higher.


Toggle navigation
Menu
Home
Work
Anthony Heinrich
I'm a Canadian artist currently based in Berlin. Prints of my latest Beirut drawing are available for purchase
here
.
"The Indelible Impression of Tokyo”, pen on paper, 50x70cm, 2017


Lenovo releases Z6 Pro 5G variant in dark blue finish
by RickyOn Friday at Lenovo’s Innovation and Technology Conference in Beijing, the company announced a new variant of the Lenovo Z6 Pro 5G in a new dark blue model. The only differences over the 4G model are the color and added support for 5G.
At the same time, an executive from Lenovo – which primarily sells smartphones in China, announced via Weibo that it will only make 5G smartphones for the Chinese market moving forward.
Lenovo mobile phone in China [is] all in 5G from today! We only do 5G mobile phones! With the arrival of the 5G era, we are welcoming TA with more exciting products. (translated) – Chen Jin, General manager for Lenovo Business.
The Z6 Pro 5G runs a Snapdragon 855 CPU and offers a large 6.39-inch FHD+ Super AMOLED display. There’s also a quad camera with a main 48MP camera, a telephoto 8MP, an ultra-wide 16MP, and a 2MP macro camera. There’s also a 4,000 mAh battery and 32MP front-facing camera.
The Lenovo Z6 Pro 5G is also the cheapest smartphone with 5G support - it has a starting price of CNY 3299 (~$471) and it comes with 8GB of RAM, 256GB of storage, and 5G connectivity. The news is still fresh, so Lenovo has not yet offered availability information about the new dark blue 5G model.


On platforms that support a compilation environment for C where ints are 32 bits but longs and pointers are 64 bits (the LP64 model), it is possible to build the LDM programs to support huge product queues (larger than 2 Gbytes). This document includes instructions for building the LDM programs on such 64-bit platforms.
In general you cannot mix 64-bit LDM programs built for use with huge product queues with 32-bit LDM programs built for queues limited to 2 Gbytes in size. The formats of the two kinds of queues are incompatible.
This will only work on SPARCv9 or later hardware architectures, and in particular not on SPARCv7, SPARCv8, or Intel. To check what architecture your platform uses, invoke
isainfo -n
Next, make sure the Sun package SUNWscpux is installed, which provides utilities for user interface and source build compatibility with SunOS 4.x, and in particular the library /usr/ucblib/sparcv9/librpcsoc.so which is necessary to build a 64-bit version of the LDM. You can either check for that library or check for the package installation with the command
pkginfo -l SUNWscpux
In order to use this library you need to make a change to the LDM src/configure script. Since this is somewhat of an exceptional case, we recommend that you copy the script to another name in the src directory, say, configure.sparcv9. Then edit the configure.sparcv9 script to replace the line
*) libs="-R/usr/ucblib -L/usr/ucblib -lrpcsoc -lnsl"with
*) libs="-R/usr/ucblib/sparcv9 -L/usr/ucblib/sparcv9 -lrpcsoc -lnsl"
Before actually running the configure.sparcv9 script, you must make sure "-xarch=v9" is included in the CFLAGS environment variable. For example,
export CFLAGS=-xarch=v9
When the installation instructions tell you to execute the configure script, execute configure.sparcv9 instead.
Just include the "-64" option in CFLAGS before running the configure script to generate a huge queue version of the LDM programs for IRIX64.
[To be written]
[To be written]
[To be written]


--- layout: archive title: Zulip Chat Archive permalink: /stream/116395-maths/topic/.E2.84.A4.5B(1.2B.E2.88.9Ad).2F2.5D.html ---
As @Mario Carneiro might know, we're doing the special case d=5, but should we generalize it and then PR it?
Just for d=1 mod 4 right?
I think there's definitely an argument for it.
well
These are pretty famous rings
we can do Z[(1+sqrt(3))/2] also, you know
d squarefree and 1 mod 4
you don't want to do that ring Kenny
it's not 2-d over Z
I see what you mean
the denominators pile up
ok let's do Z[(1+sqrt(4d+1))/2] then
the case d>=0 and d<0 are slightly different later on
The number of units in that ring depends on whether d>=0 (always infinite) or d<0 (never)
well they only did Z[sqrt(d)] for d>=0, so I don't want to have to redo everything, so I'll just do d>0
I'm not sure this is a good generalization
Mario these are fundamental objects in number theory
They're the full ring of integers of a real quadratic field
If d=3 mod 4
(1+sqrt n)/2 seems a bit specific
not at all
Here's the logic
The most simple number field is Q
Then there's all the other number fields
but we don't have number fields yet
but the second simplest class of number fields are the quadratic fields
Is there a general quadratic field?
they're all of the form Q(sqrt(t)) for t a rational that is not a square
Yes and we're doing it
that's what I'm going to explain
Q(sqrt(t)) can cunningly be rewritten as Q(sqrt(n)) with n a square-free integer
the fields generated by sqrt(2) and sqrt(18) over Q are the same
because 1/3 is in Q
right
And now there's a theory of integers in these fields
and if n is not 1 and squarefree
which is the general case
then the integers in Q(sqrt(n)) are Z[sqrt(n)] if n is not 1 mod 4
and what the title of this thread is if n=d is 1 mod 4
you mean 1
yes
so then Z[(1+sqrt 5)/2] isn't in the list?
sorry
type
typo
d=5 is fine
If Kenny does Z[(1+sqrt(d))/2] for d a nat which is congruent to 1 mod 4
then we will have the integers of an arbitrary real quadratic field
so what about Z[sqrt 5]? Is this not an integer ring?
yes you did those
Kenny is completing the job
no, the elements of Z[sqrt(5)] are integers
but they are not the full ring of integers
because there is an element alpha of the field of fractions of Z[sqrt(5)]
Having the full ring is important
Z[sqrt(5)] is not integrally closed
The full ring has a property called being "integrally closed"
but they are not all the integers
the ring of integers of Q(sqrt(d)) is Z[sqrt(d)] if d is 3 mod 4 and Z[(1+sqrt(d))/2] if d is 1 mod 4
there are more
which is the root of a monic polynomial with coefficients in Z[sqrt(5)]
Kenny you have to make d squarefree for this to be true
Mario built Z[sqrt(18)]
that's not a full ring of integers either
so d can be in Z
well ok
Does your definition have a conjugation operation?
but it must be not zero or 1
sure there is conjugation
and it must be "squarefree", so if p is prime then p^2 doesn't divide d
the galois group is C2
I would have used alpha and conj alpha
yes that's a good idea
I defined conjugation in Z[(1+sqrt(5))/2]
if alpha is (1+sqrt(d))/2
then its Galois conjugate is 1-alpha
https://github.com/kbuzzard/lean-squares-in-fibonacci/blob/master/src/Zalpha.lean#L256
It is a conjecture that infinitely many of these rings Z[(1+sqrt(d)/2] are unique factorization domains
so if alpha is (1+sqrt(4k+1))/2, then it is the positive root of x^2 - x = k
if k is negative then I think this is (1+37)/2
do these rings make sense for other d?
d=1 mod 4
squarefree
and not 1
you don't want Z[(1+sqrt(9))/2]
That looks like nonsquare
not squarefree
you want squarefree also
you want both
right
To be honest I am a bit confused about that ring
Is it 2-d over Z?
I bet it is
but I can prove it isn't
that's never good
alpha=(1+sqrt(9))/2
oh wait
alpha = 5
ha ha
I am less confused now
lol
Also Z[(1+sqrt 4)/2] is trouble because it has dyadic rationals
If you abstractly make Z[X]/((2X-1)^2-9) or (better) Z[X]/(X^2-X-2)
you don't get the same ring
That's like the split complex numbers I guess
R(sqrt(1))? :-)
R+Ri with i^2=1
right
just R+R
what does Z[(1+sqrt(45))/2] look like
no, it's R x R as a set
as a ring!
+
means direct sum
Kenny it just looks like some random order in Zalpha
It looks a bit like the way Z[sqrt(18)] does in Z[sqrt(2)]
too small
not integrally closed
ideals don't factor uniquely into prime ideals
unique factorization fails
It's quite a stinky ring
Has infinitely many units
UF of course fails
When is it a domain?
when it is nonsquare
Always an ID for d not square
(removed)
But UFD implies full ring of integers
I guess I did that for Z[sqrt d]
right
I didn't do anything with squarefree
You don't need it
because you didn't prove much arithmetic stuff
and had you attempted to do so
and integrally closed isn't a thing I have access to
you would have found yourself with lemmas which only applied when d was 1 or 2 mod 4
So ultimately there should be the theory of number fields in Lean
These are fields equipped with a field map from the rationals
and such that the field is finite-dimensional as a vector space over the rationals
The number constraints are a bit weird to fit in as typeclasses
like Q(2^{1/3})
The number constraints are a bit weird to fit in as typeclasses
like nonsquare?
yes
but it fitted in :P
I'm not a fan of that definition
Oh wooah
Mario did you do Z[sqrt(9)]?
no
yes
lol
Yes, up to the ID part
lol
and then you got stuck
doesn't hurt to do that
I guess not
I added the assumptions when needed
it's just funny
I guess that's exactly the CS thing to do
Mathematicians come to these rings in other ways
I would define the ring Z[(1+sqrt(4d+1))/2] for any integer d
yes
and Z[sqrt(d)] as well Mario
I did that too, in the pell part
for d<0
I defined d := a^2-1
you did what?
and proved theorems for all a>1
In the Matiyesevich proof Kenny, he only needs a very specific kind of Z[sqrt(d)]
a^2-1?
Mario is going for that proof I guess
yes
it's completely ridiculous
a^2-1 is nonsquare so it works
It's important to make a Diophantine equation whose solutions grow exponentially
the pell equation is hard to solve for other values of d
But they needed an explicit one,
the fundamental solution jumps all over
not just some abstract number theory theorem that said that there existed a solution to Pell equation
but for d = a^2-1 it's just (a,1)
so they just considered X^2 - (a^2-1)Y^2=1
:-)
Behaviour of the fundamental solution still not that well understood
hmm I should go and feed the kids I guess
hopefully they're still alive
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


--- layout: default ---
{{ page.name }} is currently the incumbent in ward {{ page.ward }}.
{% endif %}The candidate for Toronto city council, {{ page.name}}, registered to run in ward {{ page.ward }} on {{candidate.nomination_date }}.
{% if candidate.ran_2010 %}Someone with the name {{ page.name }} ran in the 2010 municipal election. {% endif %} {% if candidate.ran_2006 %}
Someone with the name {{ page.name }} ran in the 2006 municipal election. {% endif %} {% if candidate.contribute_2010 %}
Someone with the name {{ page.name }} contributed ${{ candidate.contribute_2010 }} in the 2010 election.
{% endif %} {% if candidate.contribute_2006 %}Someone with the name {{ page.name }} contributed ${{ candidate.contribute_2006 }} in the 2006 election.
{% endif %} {% if candidate.lobbyist_registry %}Someone with the name {{ page.name }} appears in the lobbyist registry listed as a "{{ candidate.lobbyist_registry }}."
{% endif %}Here is the other information currently on on file for {{ page.name }}:
If doesn't look like there are any phone numbers on file for {{ page.name }} yet. Why don't you consider sending us one?
{% endif %} {% if candidate.address %}Is there information missing for this candidate? Would you mind dropping us a line? It only takes a minute and earns you a spot in our hall of fame.


@DoNotImplement interface PollResult<T>
A data container which represents a batch of elements along with their positions.
PositionedValue |
Position with value data container. interface PositionedValue<T> |
firstPosition |
First position in the batch. open val firstPosition: Long |
isEmpty |
Whether this result has no elements. open val isEmpty: Boolean |
isLastResult |
Whether this result represents the last batch of elements. abstract val isLastResult: Boolean |
lastPosition |
Last position in the batch. open val lastPosition: Long |
positionedValues |
Values with positions abstract val positionedValues: List<PositionedValue<T>> |
remainingElementsCountEstimate |
A non-negative optional estimate for the remaining elements count. abstract val remainingElementsCountEstimate: Long? |
values |
Convenience property to retrieve just the raw elements. open val values: List<T> |


Random Quote Generator
Get Random Quote
Tweet this quote!
Created by
Matt Yang
| Click author name above for more information


AP Top News at 2:31 a.m. EST
by EndPlayThe words Trump had to hear: Investigations, Biden, Clinton
Bloomberg opens door to 2020 Democratic run for president
Residents of Mexican town struggle with fear after massacre
For east Syria, US troops are about much more than oil
Hong Kong protesters blame police after student dies in fall
Top US diplomat struggles to shrug off impeachment inquiry
Iran 5.9 magnitude earthquake kills at least 5, injures 300
Domingo won't perform at Tokyo Olympics cultural events
Sessions, an Alabama icon, faces uncertain path to Senate
Raiders rally to beat Chargers 26-24


Lotto Vending
Help charities and yourself at the same time
Want to jump to a particular section? Introduction, The Product, Market Place, Income or Packages
Thank you for requesting details on one of the latest business opportunities to hit the UK, from Readymade Business 4 U Ltd. We specialize in the full set-up of your chosen product into a fully operational business, including marketing and/or installation, to get your new business off to the best start possible! We believe help and support is a key factor in any new business and we are proud to say that we supply this for as long as you need it, FREE of charge!
“Work for yourself, not by yourself”
Our team have over 30 years experience in this industry and we have the skills to help you build your own business at a fraction of the costs of similar franchise products.
You will “OWN” your business “OUTRIGHT” with Readymade Business. Unlike most franchises, we do not charge a licence fee or any other on-going fees, whatsoever! This makes our product superb value for money. We “DO NOT COMPROMISE”. We offer everthing a similar franchise would but much more, for“YOUR”less. It’s “YOUR” business, we simply set it up for you. We make sure you don’t make the mistakes that, due to a lack of experience, most people who try to go it alone will make! Our tried and tested system, which we have developed over many years, is guaranteed to give you the best possible start and a low risk of failure. We offer all of the positives of a franchise without the complications and high costs normally associated with them.
Lotto vending is a proven concept, just like all of our products, and it has taken off across the UK. Our machines vend tickets at £1 per ticket and the prizes vary from £1, £5, £10, £20, all the way up to £500.00.   Your machines will do all the work for you. We will set-up all of your venues for you (pubs, clubs, etc.) and negotiate any terms. These types of venues are certain to get footfall from people who will purchase tickets, time and time again. Full training is given to ensure you can empty and maintain your machines without fuss. Simply re-order tickets from us, as and when you need, and we’ll send them direct to your door.
“Excellent repeat income”
We will endeavour to locate sites within your preferred area. Should you reside within that area, we will aim to locate sites as close to you as possible so that the minimum travelling as possible for collection and re-stocking. Naturally our primary aim is to secure the best venues possible, so some travelling might be unavoidable for some sites but the additional travel costs should be offset by the income generated from such sites.
We also offer FREE back-up and support for as long as you need it to ensure a smooth transition into your new business. We are always there when, or, if you need us. All that will be left is for you to run your business with ease, re-stocking your machines and collecting your money! Once your initial investment is recouped, it’s profit all the way!
We are so confident that all of the venues we supply will be profitable, that if one proves unprofitable, we will happily arrange to have your machine re-sited to another venue FREE of charge! This is our promise to you and part of our back-up and support.*
In addition to our single-column vending unit, we also offer packages built around our dual-column vending unit.
The double column machines are an additional £250 each but have these added advantages:
- Hold twice as many tickets and hold more money
- You can offer 2 different tickets and this leads to more sales and you won’t have to call out as often to re-stock.
- Access via your smartphone to see how many tickets you have sold.
- Average 30-40% more profit
- Visually bigger displays
Lotto tickets and scratch cards are big business. 99% of people still play after winning and there are thousands of people playing each week in the UK. Many of us enjoy a flutter and our Lotto Vending machines take advantage of this. As soon as the venue starts paying out prize money, word spreads and sales can increase rapidly.
By providing scratch cards from our vending machines, siting the machines in the right venues and with them being quick and easy to buy, they are proving very popular.
“Little work required – let your machines work for you”
Using our professional marketing team, we will arrange to have your machines sited in pubs, clubs etc. We will offer some venues a 20% commission and others a 20% charity donation to cover you legally.
You’ll meet some interesting people in this business, so it’s ideal for those who enjoy getting out and meeting people. Whether you’re retired, semi-retired, or just looking to start a new career, this is for you!
- A repeat business, which is great for you
- We set everything up for you
- The machines do all of the hard work for you
- Passive income
- No overheads
- No selling required
- Full back-up and support
- Secure future - as the Lotto concept has been around for over 20 years and has never been so popular.
“Excellent passive income – little hours – help charities”
Here are some figures so you can understand the potential of this business/investment.
Maximum reward for few hours... “Work in your own time”
The tickets cost you £170 per box of 2,800 tickets, delivered to your door!
The tickets retail at £1 each and 50% is paid out in prize money, leaving a gross profit of £1,400.00.
Less 20% to the venue or your charity and less the £170 to purchase a box, will leave you a net of £950.00.
Your profit per ticket, works out at £0.34p per ticket sold, after all your expenses have been taken out. So, simply x £0.34p by how many tickets you sell and that’s what you make.
The following is based on average sales. We have not used exceptionally high or low sales, simply the average you can expect to earn to be as up-front and as fair as possible.
| Number of Machines | Cost | Sales
(per month) |
Profit
(per month) |
| 4 x Single Column
4 x Double Column |
£4,995+VAT
£5,995+VAT |
1,720
2,150 |
£584.80
£731.00 |
| 6 x Single Column
6 x Double Column |
£7,495+VAT
£8,995+VAT Includes FREE liability insurance and £200 worth of stock |
2,580
3,225 |
£877.20
£1,096.50 |
| 8 x Single Column
8 x Double Column Includes free fitting |
£9,995+VAT
£11,995+VAT Includes FREE liability insurance & £500 worth of stock |
3,440
4,300 |
£1,169.60
£1,462.00 |
| 10 x Single Column
10 x Double Column Includes free fitting |
£12,495+VAT
£14,995+VAT Includes FREE liability insurance, £500 worth of FREE stock & 1 FREE machine |
4,300
5,375 |
£1,462.00
£1,827.50 |
| 20 x Single Column
20 x Double Column Includes free fitting |
£22,995+VAT
£27,995+VAT Includes FREE liability insurance, £1,500 worth of stock, & 2 FREE machines |
8,600
10,750 |
£2,924.00
£3,655.00 |
| 30 x Single Column
30 x Double Column includes free fitting |
£32,495+VAT
£39,995+VAT Includes FREE liability insurance, £4,000 worth of stock & 5 FREE machines |
12,900
16,125 |
£4,386.00
£5,482.50 |
Remember: Look at this as an investment and you’ll see the return is far better than any interest rates the bank can give you and has a better return than gambling on the stock market (and is a lot safer).
Purchasing one of our business opportunities is a more controlled and stable investment. Following your success you can re-invest into more machines if you so desire.
Here are some examples of different machine packages so you can compare your budget to the potential income.
Even selling small amounts per day adds up and can give you a great passive income. Remember; you do not really have to work to receive this income, it is an investment rather than a full time job.
“The profits are there and we’re here to show you how to get it”
Packages start at 4 x machines and venues for only £4,995+VAT. Obviously, the more machines you buy, the cheaper they become and the more money you’ll make. All packages come with the following, unless stated:-
- Full set-up, including all machines and venues supplied with instruction in running your business.
- FREE stock & liability insurance if purchasing 6 machines or more.
- FREE fitting, stock & liability insurance if purchasing 8 machines or more. (These machines are easily fitted if you can drill and plug walls or know someone who can do it for you, if not we can help you – see optional extras)
- A full marketing campaign to obtain venues for your products in your chosen area.
- I.D Badge
- FREE replacement service if one of your venues under performs
- FREE affiliate program
- Full back-up & support
Optional extras
Add installation of your machines and liability insurance from just £300 (ask us for details).


Nodes
Node Name
IP Address
FQDN
Platform
Uptime
Environment
Actions
Unable to Connect to Chef Server.
×
Close
Import Nodes
Organization
Business Groups
*
Project
*
Username
*
Please enter Node Username
Choose Authentication Type
Password
Pem File
Password
Required
Please enter Node Password
Pem File
Browse
Assign Users
*
User1
User2
User3
User4
User5
Assign Users
*
Monitoring:
Tag imported server :
Select Server
*
Monitoring Server
LDAP Server
AD Server
×
Close
Importing Nodes


[Mission]
Our mission is simple - to provide a beautiful, inclusive space for people to of all backgorunds to come to work. We want to foster inspiration, community, and creativity.
Simply put: We want you to love where you work!
Our mission is simple - to provide a beautiful, inclusive space for people to of all backgorunds to come to work. We want to foster inspiration, community, and creativity.
Simply put: We want you to love where you work!


Name
HPL_copyL Copy the current panel into a contiguous workspace.
Synopsis
#include "hpl.h"
void
HPL_copyL(
HPL_T_panel *
PANEL
);
Description
HPL_copyL
copies the panel of columns, the L1 replicated submatrix,
the pivot array and the info scalar into a contiguous workspace for
later broadcast.
The copy of this panel into a contiguous buffer can be enforced by
specifying -DHPL_COPY_L in the architecture specific Makefile.
Arguments
PANEL (input/output) HPL_T_panel *
On entry, PANEL points to the current panel data structure
being broadcast.
See Also
HPL_binit,
HPL_bcast,
HPL_bwait.


JTC
Testbedding
Footprint
To develop a dynamic and future-ready industrial landscape in Singapore, JTC takes the lead in driving innovation, sustainability and construction productivity in all our developments. Not only do we strive to develop innovative facilities, we endeavour to make sure that our developments are sustainable and environmentally friendly.
To this end, we have also formed partnerships with industry players, research institutes, and institutes of higher learning to enable new innovative projects to be test-bedded in our estates so that they can be brought to market faster.


---
layout: post
title: Linux Distros
date: '2010-11-09T15:17:00.000-08:00'
author: Naren Salem
tags:
modified_time: '2010-11-09T15:17:34.750-08:00'
blogger_id: tag:blogger.com,1999:blog-360727496473333342.post-5276674893122108661
blogger_orig_url: https://frigments.blogspot.com/2010/11/linux-distros.html
---
So on my new machine, I installed Ubuntu Maverick. Felt like I should go with the latest out there. Right? I also played with some other live cds and I really liked Linux Mint. The package management and system settings are better laid out and accessible.
The first few days were nice and shiny and calm. Then I started doing some real stuff on my new machine.


In her one-year Husker career, Kelsey Robinson lived up to the hype, delivering Nebraska's first Big Ten Player of the year in addition to helping the Huskers exceed expectations in what some considered a 'rebuilding year'. With the National Player of the Year award set to be announced today, the time has come for us to try and put Robinson's year into perspective, but as Husker coach John Cook is quick to point out, that is no easy task.
"There's just so many ways you can evaluate her. You need to read the book 'Moneyball', she's the Moneyball player," he said. "There are things that statistically show up and there are outside of the box things that show up in other ways."
Well coach, we may not have a Brad Pitt-type character hanging out around the office, but what we did come up with was a way to develop our own theory on what truly makes a player successful. After kicking around the best ways to completely account for a hitter's worth, we eventually developed the "Hitter Performance Rating" to try and put all of Robinson's contributions into one stat, and compare her numbers to the rest of the country:
[Kills - Attack Errors + Service Aces - Service Errors - Return Errors +
(Digs * Team Hit %) + Solo Blocks + (Block Assists/2) - Block Errors] / Sets = HPR
Once we started plugging in numbers, we realized there was something to this new formula, especially when you put them in context.


Peter Johnstone
About
|
Portfolio
|
Contact
Portfolio
Hangman
RPG Game
Trivia Game
Rutgers Info Widget
Rock Paper Scissors
Connect With Me


| ${value} Active Energy Cost per Second | 1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 |
| ${value}m Radius | 6 |
| +${value} Damage to Undead | 3 5 7 9 11 13 15 17 19 21 23 25 |
| +${value}% Less Damage from Undead | 15 19 23 28 32 36 41 45 49 54 58 62 |
| MaxLevel | 8 |
| UltimateLevel | 12 |


Welcome to FreeFree’s Documentation!¶
FreeFree¶
Motivations¶
There are always some books that we don’t need anymore but someone may want them. Although we can use second-hand platform to sell the books, sometimes we may want to just give or even throw them away since there is no insufficient space to store them. Also, sometimes we want some books for temporary use but it’s a waste to buy them. A free book give-way platform will help these people especially for students to get the books they need and give away the books then unwanted.
What is it¶
This web applicaion that aims to help people to get books they want for free. People can sign up to be a user and get the notifications of the availibilities to the books they need. Also, based on their locations some items have higher priorities to be recommended. Uses can use wishlist of ISBN number or book info to note which books they need. It’s a good way to help and benefit each other.
More features¶
More items (like furniture, pet products) to be in the list
Based on the owners’ intention, some items can be provided with a second-hand trading platform
API Documentation¶
-
class
spider.book_item.
Book
¶ -
static
calculate_start
(page)¶ Returns an integer representing the start fitting in outside API function. Calculate the start index of the API function parameter by page and PER_PAGE.
- Parameters
page (int) – Specified page number
- Returns
start index
- Return type
int
-
search_by_isbn
(isbn)¶ Get formatted HTTP response by isbn number and record it in the books attribute.
- Parameters
isbn (string) – The unique ID number in specific format of books used for search.
-
search_by_keyword
(q)¶ Get formatted HTTP response by keyword q and record results in books attribute.
- Parameters
q (string) – Keywords for searching books.
-
static
-
class
view_models.book.
BookViewModel
(book)¶ - Parameters
price (string) – price of book
summary (string) – summary of book
image (string) – images of book
-
property
intro
¶ Get a short introduction of books in format of ‘author/publisher/price’ or ‘author/price’ when publisher is null or unknown.
- Returns
A string of short introduction to book
- Return type
string
-
class
view_models.book.
BookCollection
¶ -
fill
(book_item, keyword)¶ Fill the BookViewModel objects into books attribute
- Parameters
book_item (obj) – Book object returned by HTTP response
keyword (str) – Query keywords for searching book_item
-
-
class
view_models.drift.
DriftViewModel
(drift, current_user_id)¶ -
static
requester_or_gifter
(drift, current_user_id)¶ Based on the drift records confirm an user with current_user_id is a requester of a giver of the book.
- Parameters
drift – the record related to current_user_id in the database
current_user_id (str) – user id linked to drift record
- Returns
A string of the user identity
- Return type
string, requester or gifter
-
static
-
class
models.gift.
Gift
(*args: Any, **kwargs: Any)¶ -
property
book
¶ The information of the books related to the gifts which is returned by the external APIs.
- Returns
one piece response in the format of Book object
- Return type
object
-
classmethod
get_user_gifts
(uid)¶ Get all the gifts records related to the user with uid.
- Parameters
uid (str) – user id
- Returns
gift records in the database
- Return type
Obj
-
classmethod
get_wish_counts
(isbn_list)¶ Count the number of the wishes related to the book with isbn numbers included in isbn_list.
- Parameters
isbn_list (list) – a list of isbn numbers
- Returns
a list of the wish counts of the books of each isbn number
- Return type
list
-
is_yourself_gift
(uid)¶ Determine if the gift record related to the user with uid.
- Parameters
uid (str) – user id
- Returns
True or False
- Return type
Boolean
-
classmethod
recent
()¶ Recent book info of the gifts which are ordered by create_time.
- Returns
list of records in the format of Book object
- Return type
list
-
property
reset_book
¶ The information of the books related to the gifts which is returned by the external APIs.
- Returns
one piece response in the format of BookViewModel object
- Return type
object
-
property
-
class
models.user.
User
(*args: Any, **kwargs: Any)¶ -
can_drift
()¶ Wheter the user can begin a trasaction.
- Returns
True or False
- Return type
Boolean
-
can_save_to_list
(isbn)¶ Check if the book with isbn number can be related to the current user
- Parameters
isbn (str) – book isbn number
- Returns
True or False
- Return type
Boolean
-
check_password
(raw)¶ Check user passwords through hash code
- Parameters
raw (str) – user passwords
- Returns
True or False
- Return type
Boolean
-
generate_token
(expiration=600)¶ Generate a temporary token to hide the user id from safety problems.
- Parameters
expiration – expiration time (seconds)
- Returns
a token
- Return type
str
-
static
reset_password
(token, new_password)¶ Based on the token to reset user’s passwords without user id.
- Parameters
token (str) – a temporary token indicating the user id
new_password (str) – new password
- Returns
True if reset password succefully
- Return type
Boolean
-
property
summary
¶ User’s info summary
- Returns
A dictionary containing user nickname, beans, email address and trasaction history count.
- Return type
dict
-
-
models.user.
get_user
(uid)¶ Get current user through uid.
- Parameters
uid (str) – user id
- Returns
The current user
- Return type
Obj
-
libs.helper.
is_isbn_or_key
(word)¶ Return if the word is isbn number or keyword.
- Parameters
word (string) – query keywords to get HTTP response
- Returns
isbn or key
- Return type
string
-
class
libs.http_helper.
HTTP
¶ -
static
get
(url, return_json=True)¶ Reformat HTTP get response into text or json
- Parameters
url (string) – URL link to get HTTP response
return_json (boolean) – if the returned results json format or not, defaults to Ture
- Returns
return formatted HTTP response
- Return type
json format or string
-
static
-
class
libs.enums.
PendingStatus
(value)¶ -
classmethod
pending_str
(status, key)¶ Turn the pending status value to string.
- Parameters
status (Enum object.) – Four situations. 1 represent WAITING, 2 represents SUCCESS, 3 represents REJECT and 4 represents WITHDRAW.
key (str) – Represent the identity of the current user, that is Requester or Giver.
- Returns
A short statement of the current trasaction (8 situations in total).
- Return type
string
-
classmethod


Ivan Torres
About Me
(current)
Portfolio
Contact
Portfolio
Playr App
Click Here to Visit
My Weather App
Click Here to Visit
Ivan's Burger Joint
Click Here to Visit
Work Schedule App
Click Here to Visit
Work Schedule App
Click Here to Visit
Work Schedule App
Click Here to Visit


This class to represent a body of the physics engine.
More...
#include <Body.h>
|
|
bodyindex | mID |
| | ID of the body.
|
| |
|
bool | mIsAlreadyInIsland |
| | True if the body has already been added in an island (for sleeping technique)
|
| |
|
bool | mIsAllowedToSleep |
| | True if the body is allowed to go to sleep for better efficiency.
|
| |
| bool | mIsActive |
| | True if the body is active. More...
|
| |
|
bool | mIsSleeping |
| | True if the body is sleeping (for sleeping technique)
|
| |
|
decimal | mSleepTime |
| | Elapsed time since the body velocity was bellow the sleep velocity.
|
| |
|
void * | mUserData |
| | Pointer that can be used to attach user data to the body.
|
| |
This class to represent a body of the physics engine.
You should not instantiante this class but instantiate the CollisionBody or RigidBody classes instead.
◆ Body()
| Body::Body |
( |
bodyindex |
id | ) |
|
◆ getId()
| bodyindex reactphysics3d::Body::getId |
( |
| ) |
const |
|
inline |
Return the ID of the body.
- Returns
- The id of the body
◆ getUserData()
| void * reactphysics3d::Body::getUserData |
( |
| ) |
const |
|
inline |
Return a pointer to the user data attached to this body.
- Returns
- A pointer to the user data you have attached to the body
◆ isActive()
| bool reactphysics3d::Body::isActive |
( |
| ) |
const |
|
inline |
Return true if the body is active.
- Returns
- True if the body currently active and false otherwise
◆ isAllowedToSleep()
| bool reactphysics3d::Body::isAllowedToSleep |
( |
| ) |
const |
|
inline |
Return whether or not the body is allowed to sleep.
- Returns
- True if the body is allowed to sleep and false otherwise
◆ isSleeping()
| bool reactphysics3d::Body::isSleeping |
( |
| ) |
const |
|
inline |
Return whether or not the body is sleeping.
- Returns
- True if the body is currently sleeping and false otherwise
◆ setIsActive()
| void Body::setIsActive |
( |
bool |
isActive | ) |
|
|
virtual |
◆ setIsAllowedToSleep()
| void Body::setIsAllowedToSleep |
( |
bool |
isAllowedToSleep | ) |
|
Set whether or not the body is allowed to go to sleep.
- Parameters
-
| isAllowedToSleep | True if the body is allowed to sleep |
◆ setUserData()
| void reactphysics3d::Body::setUserData |
( |
void * |
userData | ) |
|
|
inline |
Attach user data to this body.
- Parameters
-
| userData | A pointer to the user data you want to attach to the body |
◆ mIsActive
| bool reactphysics3d::Body::mIsActive |
|
protected |
True if the body is active.
An inactive body does not participate in collision detection, is not simulated and will not be hit in a ray casting query. A body is active by default. If you set this value to "false", all the proxy shapes of this body will be removed from the broad-phase. If you set this value to "true", all the proxy shapes will be added to the broad-phase. A joint connected to an inactive body will also be inactive.
The documentation for this class was generated from the following files:
- /home/daniel/Development/Git/reactphysics3d/src/body/Body.h
- /home/daniel/Development/Git/reactphysics3d/src/body/Body.cpp


Book anytime, anywhere
Manage
Bookings
Excess
Baggeage
Lounge
Access
Airport
Hotel
Air Maga
Service
Hotel
Bookings
Cars/Bike
Rental
Economy form
INR 69746
Economy form
INR56261
Economy form
INR326498
Economy form
INR897466
Economy form
INR125649
Economy form
INR 69746
Book anytime, anywhere
Book anytime, anywhere
Book anytime, anywhere
Book anytime, anywhere
Together we, go further
Explore more of the world through seamless connections with our partners and travel further within our extended network.


A small script that manages your pages state via document.documentElement.classlist
. 😎
Used configuration:
var states = new States('coolPrefix-');
“I am a <p>
element and I switch states using the data-state
attribute (I have no callback).”
Current document.documentElement.classList
:


Home Page
Detail Page
The Challenge
Charlene knew the task would not be easy. She interviewed those who had tried and failed before her. She looked up the history of the house and its residents. She thought she was prepared. But she had no idea of the challenges ahead of her.
Charlene
On her eighteenth birthday, Charlene Griffin is thrown out of the house by her widowed mother. She has a job, but no place to live. Now she needs to find a permanent place to stay, but it isn't easy for her. The offer of a house, even if it is haunted, catches her attention.
The Bookstore
Charlene Griffin works at the Zephyr Butterfly Bookstore. The bookstore is located in a strip mall. Amy Snow is the owner. Rachel Park also works there. Storytime is on Wednesday morning.
The House
The Dalrymple mansion is haunted, and the current owner, Lester Wolf, doesn't want it. He is offering the house to anyone who can stay overnight. But the ghosts don't want the house to change owners, and they're willing to go to any lengths to keep the house to themselves. Many have tried to claim the house. None have succeeded. Will Charlene Griffin be able to banish the ghosts and claim the house?


Today I will go over an important component of Ruby, classes. When I first started learning about classes, classes were explained to me as being factories within the Ruby language. Inside these factories, objects can be built and these objects are referred to as being ‘instances of the class’. Here we have a Car class, with attributes of make and model:
class Car def initialize(make, model) @make = make @model = model end end
Our goal is to make a new instance of the Car class. This is achieved by calling .new on our class and defining it’s make and model. .new actually calls the initialize method, which takes the make and model as it’s parameters and sets them as the attributes of your new car object.
car_1 = Car.new (“Honda”, “Civic”)
Within a class there can be methods that interact with the class object. Let’s create a method to that will paint our car object a specific color.
def car_color(color) “Spraying your car #{color} color.” endTo call our method on car_1:
p car_1.car_color(“blue”) #=> “Spraying your car blue color”
The method, car_color, is an instance method. As an instance method it can only be used after an instance of the class was created with the initialize method. From there, you can access the method by calling the method on the instance of the class that is created, in our case it would be car_1.
Going back to our initialize method, notice there are @ in front of the make and model. This means that make and model are actually instance variables, and instance variables are available to every method of the class. As instance variables, this is why make and model are accessible in the car_color method.
On the other hand, there are local variables. Local variables are only available inside the method it is defined, and not shared across the entire class. In our car_color method, color is a local variable, which means it can not be accessed outside the method. To turn color into an instance variable, I can do the following:
def car_color(color) @color = color “Spraying your car #{@color} color.” end
As @color, now it can be access outside of the car_color method.


Most programming languages contain good parts and bad parts. I discovered that I could be a better programmer by using only the good parts and avoiding the bad parts. After all, how can you build something good out of bad parts?
The best parts of Javascript include: * functions * loose typing (variables are declared as variables, without a type) * dynamic objects * object literal notation (where you can create an object already with a list of key/value pairs inside curly braces)
The worst parts include global variables - there is a common global object namespace where they’re all lumped together and they’re essential to the language.
Javascript has a class free object makeup, relying instead on objects inheriting properties directly from other objects - this is prototypal inheritance.
Always use // for comments, even multi-line ones to avoid having to escape
/*
characters.
NaN
(Not-a-Number) is not equal to any value (including
itself) and is essentially an illegal number value, but
typeOf(NaN)===number is true
isNaN(number)
to check for NaNsNumber methods are discussed in Chapter 8.
Single quotes are often used to define a String in JavaScript, but if a person’s name has an apostrophe (and the developer does not know the difference between an apostrophe and single quote) it is useful to “escape” the apostrophe character:
var name = 'Patrick O\'Brian'; // using a backslash in front of the apostrophe
console.log('name:', name); // name: Patrick O'Brian
further reading: https://webdesignledger.com/common-typography-mistakes-apostrophes-versus-quotation-marks
String methods are discussed in Chapter 8.
break
and continue
to provide more precise
control over exactly which statement to break or continue. Format: labelname: statement
and then
continue labelname;
case
statements, the optional
default statement is executed, otherwise the matching case statement is
carried out
hasOwnProperty(variable)
to
make sure the property belongs to the object you want
and is not instead an inherited property from the prototype chain:
for (myvariable in object) {
if (object.hasOwnProperty(myvariable)) {
... //statements to be executed
}
}
catch
clause in a try statement
must create a new variable that will catch the
exception object
throw
statement is the try
block it’s
in, or the try
of the function it’s in
return
statement,
return===undefined
break
exits the statement and continue
forces
a new iteration of the loop, both with the optional
label mentioned above
expression ? expression2 : expression3
, if expression
is truthy, execute expresion2; if it’s falsy, execute
expression3
(expression1, expression2, etc)
.name
or
[expression]
as used in an array
Javascript simple types: * numbers (has object-like methods but they are immutable) * strings (has object-like methods but they are immutable) * booleans (has object-like methods but they are immutable) * null * undefined
All other values are objects including arrays and functions.
Objects are class free, can contain other objects and can inherit properties from their prototypes (which can reduce object initialisation time and memory consumption).
var empty_object = {};
var today = {
day: "Wednesday",
month: "April",
year: 2014,
weather: { //objects can contain nested objects like this one
morning: "sunny",
afternoon: "cloudy"
}
}
today.weather.morning
or with square brackets
today['month']
var weath = today.weather.evening || "unknown"
Object.create
method is now available in ES5 (but the
method is in the book if required for older versions)
More details in Chapter 6
typeof
includes all properties in the prototype chain
including functions
hasOwnProperty(type);
which returns true if that
property exists only in that object itself (not the chain)
today.hasOwnProperty('number') //will return true
today.hasOwnProperty('constructor') //will return false
var i;
var properties = [
'day', 'month', 'year'
];
for (i = 0; i < properties.length; i++) {
document.writeIn(properties[i] + ':' + today[properties[i]]);
}
delete today.month
var MYAPP = {}
MYAPP.today = {
day: "Wednesday",
month: "April",
year: 2014,
weather: { //objects can contain nested objects like this one
morning: "sunny",
afternoon: "cloudy"
}
}
//Making sure all other variables (like today) are contained within this one global variable (MYAPP) means none of them have global scope and therefore the risk of naming conflicts, etc in your application is reduced
The best thing about JavaScript is its implementation of functions.
function
itself(parameters)
{statements}
* Functions can be nested within functions and the inner function can access all the parameters of the outer function as well as its own
function (parameters)
this
and arguments
are also passed
to the function when it is invoked, but their value depends on how the
function is invoked
this
to
retrieve or update values from the object
this
they
are considered public methods
this
even in inner functions
this
within an inner function will therefore refer
to its own this
and not the one
in global scope
Workaround: Artificially create a new this
:
myObject.double = function() {
//in the book, the var here is called `that` but name changed for clarity
var globalScopeThis = this; //workaround
var innerFunc = function() {
globalScopeThis.value = add(globalScopeThis.value, globalScopeThis.value);
};
innerFunc(); //invoke innerFunc as function
};
myObject.double();
console.log(myObject.value);
new
, that function contains
a link to the function’s prototype
new
//create a function Quo that takes a string - Quo will be our prototype function as we will see
var Quo = function (string){
this.status = string;
}
//Now create a get_status method for Quo - this will be a public method
Quo.prototype.get_status = function () {
return this.status;
}
//create a new instance of Quo using the prefix NEW
var myQuo = new Quo("happy");
//because of the use of the new prefix, myQuo is an instance of Quo which means it can access the public method get_status from it's prototype
document.writeIn(myQuo.get_status()); //returns 'happy'
apply
method lets you
choose the value to be bound to this
function.apply(valueForThis, arrayOfParamentersForFunction);
var array = [5, 2] //will be the parameters for our function
var sum = add.apply(null, array); //value of 'this' is null and value of sum is 7 as the 'apply' method passes 5 and 2 to the 'add' method
arguments
array which contains all the arguments that were
supplied when the function was invoked
arguments
array
//inside the function
for (i = 0; i < arguments.length; i++) {
dosomething; //e.g. sum +=arguments[i]
}
arguments
lacks all the array methods except .length because of a
bug
return
statement, it returns
immediately
without carrying out the remaining statements in the function
value
or if
unspecified, it returns undefined
new
prefix (used when
creating a new object so it must return an object) and
the return
value is not an object, then
this
(the new object) is returned instead.”
throw
statement interrupts the execution of the code is
used to handle expected exceptions like an incorrect type of argument
(e.g. a string where a number is expected)
throw
statement should have an
exception object with a name
holding the
type of exception and a message
with an explanation of it +
any other properties you like
//Thinking through what exceptions could happen in an add function, the main function contains the throw statement with the exception object
var add = function (a,b) {
if (typeof a !== 'number' || typeof b !== 'number'){
throw {
name: 'TypeError';
message: 'The add function requires numbers';
}
}
return a + b;
}
try
block where the exception object from the
throw
statement in add() will pass control to a
single catch clause for all exceptions
//When you use the function later on, add a try block with a catch clause to catch the exception object
var try_it = function () {
try{
add("seven"); //will throw an exception as it is not a number
}
catch (e) {
document.writeIn(e.name + ':' + e.message);
}
}
try_it(); //you could rewrite this function so the argument is passed in here where it is invoked
Object.prototype
(or function, array, string, number,
regular expression or boolean), you make it available to all the
instances of that object so you don’t have to use the
prototype
property again
String.method ('trim', function () {
return this.replace(/ˆ\s+|\s+$/g, ''); //uses regular expression
});
//Makes a method available to all functions, ONLY when it definitely does not already exist
Function.prototype.method (methodName, func) {
if (!this.prototype[methodName]){
this.prototype[methodName] = func;
return this;
}
};
var variable = function functionName (parameters){
//wrap the statements to be executed and the recursive call in a loop statement so it doesn't recurse forever
//statements to be executed in the function;
functionName(arguments);
};
functionName (initialArguments); //initial call to the function
this
or that
so it becomes impossible to
change them from outside of the object except in ways explicitly
permitted by the methods (like passing them a parameter)
undefined
this
instead of undefined
, they return the object which can then be passed to the next method,
e.g getElement(myBox).move(350,150)
gets the element and
then passes is to the move function for the next action
.
as above)
curry
method allows you to partially evaluate an
existing function
curry
as in add.curry(10);
) and then later
passed the second argument
add(a,b)
) into a chain of functions that take a
single argument each (addA = add(A); addA(B);
where the two
functions are now add()
& addA()
)
//set up a simple function that we will customise with curry
var add = function (a,b){
return a + b;
}
var addTen = add.curry(10); //passes 10 as the first argument to the add() function
addTen(20); //The use of the curry method in addTen means addTen === add(10, 20);
curry
method natively but
this can be added to the Function.protoype
:
Function.method('curry', function() {
var slice = Array.prototype.slice,
args = slice.apply(arguments),
that = this;
return function () {
return that.apply(null, args.concat(slice.apply(arguments)));
}
});
var meoizer = function (memo, fundamental) {
var shell = function (n) {
var result = memo[n];
if (typeof result !== 'number') {
result = fundamental(shell, n);
memo[n] = result;
}
return result;
}
return shell;
}
Javascript is a prototypal language, which means that objects inherit directly from other objects
Main benefit of inheritance is code reuse - you only have to specify differences.
Javascript can mimic classical inheritance but has a much richer set of code reuse patterns * This chapter looks at the more straightforward patterns but it is always best to keep it simple
new
prefix) work
like classes to mimic the classical structure
new
prefix,
this
is not bound to the new object - it is instead
bound to the global object and you’ll be unwittingly altering these
instead!
Rather than: var myObject = maker (f, l, m, c, s)
which has
too many parameters to remember in the right order, use an
object specifier:
to contain them. They can now be listed in any order
Also useful to pass object specifiers to JSON (see Appendix E notes)
var myObject = Object.create(originalObjectName)
name
and saying
properties are now completely
private and only accessible to the get_name
and
says
method
var mammal = function (spec) {
var that = {}; //that is a new object which is basically a container of 'secrets' shared to the rest of the inheritance chain
that.get_name = function () {
return spec.name;
};
that.says = function () {
return spec.saying || ''; //returns an empty string if no 'saying' argument is passed through the spec object when calling mammal
};
return that; //returns the object that contains the now private properties and methods (under functional scope)
}
var myMammal = mammal({name: 'Herb'});
Creating an object ‘cat’ can now inherit from the
mammal
constructor and only pay attention to the differences
between it and mammal
:
var cat = function (spec) {
spec.saying = spec.saying || 'meow'; //if spec.saying doesn't already exists, make it 'meow'
var that = mammal(spec); //here the object 'container of secrets' is set up inheriting from mammal already
//functions and property augmentations happen here
return that; //as above
}
this
or that
is a
durable object and cannot be compromised by attackers
that
bundle
(i.e. your ‘container of secrets’)
Javascript only has array-like objects which are slower than ‘real’ arrays.
Retrieval and updating of properties works the same as with an object except with integer property names.
Arrays have their own literal format and their own set of methods (Chapter 8 - Methods).
[a, b, c, etc]
length
property will increase
to contain the new element - it will not give an error
.length
to a smaller number than the current
length of the array, it will
delete any properties with a subscript >= the new
length
push()
method is sometimes useful to add an element to
the end of an array
numbers.push('go') //adds the element 'go' to the end of the numbers
array
delete
but this leaves a hole in the array
array.splice(keyInArray, howManyElementsToDelete)
which
changes the keys for the remaining values in the array so there is no
hole left
for
statement can be used to iterate over all the
properties of an array (as it is an object)
for in
as it does not iterate
through the properties in order and sometimes pulls in from further up
the prototype chain
The rule is simple: when the property names [keys] are small sequential integers, you should use an array. Otherwise, use an object.
typeof array === object
var is_array = function (value) {
return Object.prototype.toString.apply(value) === '[object Array]';
//apply(value) binds `value` to `this` & returns true if `this` is an array
}
Array.prototype
which can be
augmented using the format:
//capital A in Array means this refers to the prototype
Array.method('reduce', function (parameters){
//define variables and function
//return a value
});
Array.prototype
myArray.total = function () { //statements to execute; }
adds a ‘total’ function to the array myArray
Object.create()
will create an
object - lacking the length
property - not an array.
[]
will create an empty array as they are not
initialized in JavaScript
undefined
undefined
values, you can write a function that
will prep your array to have a certain number of defined values,
essentially initializing it with certain values in place
Array.dim
function is outlined on page 63 which will
allow var myArray = Array.dim(10,0)
to make an array
with 10 zeroes starting from the first position in the array(0)
A regular expression is the specification of the syntax of a simple language
Used with regexp.exec
, regexp.test
,
string.match
, string.replace
,
string.search
and string.split
to interact with
string (more in Chapter 8 - Methods)
Quite convoluted and difficult to read as they do not allow comments or whitespace so a JavaScript regular expression must be on a single line
/ˆ(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([ˆ?#]*))?(?:\?([ˆ#]*))?(?:#(.*))?$/
Breaking it down one portion (factor) at a time: *
Note that the string starts and ends with a slash /
*
ˆ
indicates the beginning of a string *
(?:([A-Za-z]+):)?
* (?:...)
indicates a
noncapturing group, where the ‘…’ is replaced by the group that you wish to match, but not
save to anywhere * Suffix ?
indicates the group is optional,
so it could or could not exist in the string - it could even exist more
than once * ()
around the ([A-Za-z]+) indicates a
capturing group which is therefore
captured and placed in the result
array * They groups are
placed in the array in order, so the first will appear in
result[1]
*
Noncapturing groups are preferred to capturing groups
because capturing groups have a performance penalty (on account of saving
to the result array) * You can also have
capturing groups within noncapturing groups such
as
(?:Bob says: (\w+))
* [...]
indicates a character class * A-Za-z
is
a character class containing all 26 letters of the alphabet in both upper
and lower case * Suffix +
means character class will be
matched one or more times * Suffix :
is matched
literally (so the letters will be followed by a colon in this case) *
(\/{0,3})
* \/
The backslash \
escapes the forward slash /
(which traditionally
symbolises the end of the regular expression literal) and together they
indicate that the forward slash /
should be matched * Suffix
{0,3}
means the slash /
will be matched between
0 and 3 times * ([0-9.\-A-Za-z]+)
* String made up of one or
more (note the +
at the end denoting possible multiple
occurrences) digits, letters (upper or lower case), full stops (.) or
hyphens (-) * Note that the hyphen was escaped with a backslash
\-
as hyphens usually denote a range but in this
case is a hyphen within the expression * (?::(\d+))?
*
\d
represents a digit character so this will be a
sequence of one or more digit characters (as per the
+
) * The digit characters will be immediately preceded by a
colon :
* (\d+)
will be the fourth capturing
group in this expression, it is also optional (?
)
and inside a non-capturing group (?:...)
*
(?:\/([ˆ?#]*))?
* Another optional group (?
),
beginning with a literal slash /
(escaped by the backslash) *
The ˆ
at the beginning of character class
[ˆ?#]
means it includes all characters
except ? and # * This actually leaves the regexp open to attack
because too many characters are included in the character class * The
*
indicates the character class will appear
zero or more times * (?:\?([ˆ#]*))?
* We’ve seen
everything here before: An optional capturing group starting with a
literal ?
(escaped by the backslash) with zero or more
characters that are not # * (?:#(.*))?
* Final optional group
beginning with a #
* .
matches any character
except a line ending character * $
represents the
end of a string
ˆ
and $
are important because they anchor
the regexp
and checks whether the string matched against it contains
only what is in the regexp
ˆ
and $
weren’t present, it would check
that the string contained the regexp but wouldn’t
necessarily be only made up of this
ˆ
checks the string starts with the
regexp
$
checks the string ends with the
regexp
Another example
/ˆ-?\d+(?:\.\d*)?(?:e[+\-]?\d+)?$/i;
Most of this we have seen before but here are the new bits: * The
i
at the end means ignore case when matching letters
* -?
means the minus sign is optional *
(?:\.\d*)
matches a decimal point followed by
zero or more digits (123.6834.4442284 does not match) *
Note this expression only uses noncapturing groups
3 flags exist in regular expressions: i
means insensitive -
ignore the character case, g
means global - to match multiple
items and m
means multiline - where ˆ and $ can match
line-ending characters
Two ways to build a regular expression: 1.
Regular Expression literals as per the examples above start and
end with a slash /
* Here the flags are appended after the
final slash, for example /i
* Be careful:
RegExp
objects made by regular expression literals share a
single instance 2. Use RegExp
constructor * The first
parameter is the string to be made into a RegExp
object, the
second is the flag * Useful when all information for creating the regular
expression is not available at time of programming * Backslashes mean
something in the constructor, so these must be doubled and quotes must be
escaped
//example creating a regular expression object that matches a JavaScript string
var my_regexp = new RegExp("'(?:\\\\.|[ˆ\\\\\\'])*'", 'g');
|
provides a match if any of the sequences provided match.
In "into".match(/in|int/);
, the in will be a match
so it doesn’t even look at the int.
A regexp sequence is made up of one or more regexp
factors. If there are no quantifiers after the
factor (like ?
, *
or +
), the factor
will be matched one time.
A regexp factor can be a character, a parenthesized group, a character class, or an escape sequence.
It’s essentially a portion of the full RegExp
, like what we
broke down the regexp above into.
\
to be taken literally, or they will take on an
alternative meaning: / [ ] ( ) { } ? + * | . ˆ$
\
prefix
does not make letters or digits literal
.
matches any character except line-endingˆ
matches the beginning of the text when
lastIndex
property is zero, or matches line-ending
character when the m
flag is present
ˆ
inside a
character class means NOT, so [ˆ0-9]
means does not match a digit
$
matches the beginning of the text or a line-ending
character when the m
flag is present
As well as escaping special characters in regexp factors, the backslash
has additional uses: * As in strings, \f
is the formfeed
character, \n
is new line, \r
is carriage
return, \t
is tab and \u
specifies Unicode as a
16-bit hex. But
\b
is not a backspace character *
\d
=== [0-9] and \D
is the opposite, NOT (ˆ) a
digit, [ˆ0-9] * \s
matches is a partial set of Unicode
whitespace characters and \S
is the opposite *
\w
=== [0-9A-Za-z] and \W
=== [ˆ0-9A-Za-z] but
useless for any real world language (because of accents
on letters, etc) * \1
refers to the text captured in group 1
so it is matched again later on in the regexp * \2
refers to
group 2, \3
to group 3 and so on
*\b
is a bad part. It was supposed to be a
word-boundary anchor but is useless for multilingual applications
Four kinds of groups: *
Capturing: (...)
where each group is
captured into the result
array - the first capturing group in
the regexp goes into result[1]
, the second into
result[2]
and so on *
Noncapturing (?:...)
where the text is
matched, but not captured and saved anywhere, making is
slightly faster than a capturing group (has no bearing on
numbering of capturing groups) * Positive lookahead, a
bad part: (?=...)
acts like a noncapturing
group except after the match is made, it goes back to where text started *
Negative lookahead, a bad part:
(?!...)
is like a positive lookahead but only matches if
there is no match with what is in it
[]
, for example vowels:
[aeiou]
ˆ
as the first character after the opening
[
to mean NOT the characters in the character set
There are specific characters that must be escaped in a character class: - / [ ] ˆ
A quantifier at the end of a factor indicates how many times the
factor should be matched * A number in curly braces means the factor
should match that many times, so /o{3}
matches ooo *
Two comma-seperated numbers in curly braces provide the range of
times a factor should match, so {3,5}
indicates it will match
3, 4 or 5 times * Zero or one times (same thing
as saying something is optional) can be ?
or
{0,1}
* Zero or more times can be
*
or {0,}
*
One or more times can be +
or
{1,}
Prefer to use ‘zero or more’ or ‘one or more’ matching over the ‘zero or one’ matching - i.e. prefer greedy matching over lazy matching
Produces new array copying the original array with the
items
appended to it (does not modify the original array like
array.push(item)
does). If the item
is an array,
its elements are appended.
Creates a string of all the array’s elements, separated by the
separator
. Use an empty string separator
(’’) to
join without separation.
Removes last element of array. Returns undefined
for
empty arrays.
Modifies the array, appending items
onto the end. Returns the new
length
of the array.
Modifies the array by reversing the order of the elements.
Removes the first element of the array (does not leave a hole in
the array - same effect as using the .splice(a,b)
method) and
returns that first element.
Different to splice
.
‘slice’ creates a new array, copying from the
start
element and stopping at the element before the
end
value given. If no end
is given, default is
array.length
.
Negative values for start
and end
will have
array.length
added to them and if
start
>end
, it will return an
empty array.
JavaScript has a sort()
method which was created only to
compare strings and therefore sorts numbers incorrectly (it will sort them
as 1, 15, 2, 23, 54 for example). Therefore, we have to write a comparison
function which returns 0 if the two elements you are comparing
are equal, a positive number if the first element should come
first and a negative number if the second element should come
first. Then pass this comparison function to sort()
as a
parameter to allow it to sort array elements intelligently.
Page 80-82 in the book takes you through various iterations of the comparison functions - for numbers, simple strings, objects and objects with multiple keys (for example if you want to sort objects by first and last names). These should be taken from the book when required.
Removes elements from the array making sure there are no holes left in the array. It is most popularly used for deleting elements from an array.
It removes the deleteCount
number of elements from the array
starting from the start
position. If there are
item
parameters passed to it, it will replace the deleted
elements in the array with the items
.
It returns an array containing the deleted elements.
Works like push
but adds items
to the front of the array instead of the end. Returns the
new length
of the array.
The apply
method invokes a function, passing in the object
that will be bound to this
and optional array of
arguments.
Converts number to a string in
exponential form (e.g. 3.14e+0).
fractionDigits
(from 0 to 20) gives the number of decimal
places.
Converts number to a string in
decimal form (e.g. 3.1415927).
fractionDigits
(from 0 to 20) gives the number of decimal
places.
Converts number to a string in decimal form (e.g. 3.1415927). The
difference from toFixed
is that precision
(from
0 to 21) gives the number of total digits.
Converts number to a string.
radix
is an optional parameter between 2 and 36 and
gives the base. The default radix is 10.
Does not look at the property chain. Returns true if the
object contains the property name
.
Most powerful (and slowest) regexp method.
Checks the string
against the regexp (starting at
position 0) and returns an array containing the matches.
The regexp is set up with various capturing groups and these
determine the elements that go in the array: * the 0 element of the array
will contain the part of string
that matched the
regexp * element 1 of the array will contain the text captured by
the first capturing group in regexp * element 2 of the array will
contain the text captured by the second capturing group in
regexp and so on * if the match fails, it returns
null
If the
regexp contains a g
flag
(e.g. var regexp =
/[ˆ<>]+|<(\/?)([A-Za-z]+)([ˆ<>]*)>/g;
), there is a lot more to look out for: * Searching begins at
regexp.lastIndex
(initially zero) * If a match is found,
lastIndex
becomes the position of the
first character of the match * If no match is
found, lastIndex
is reset to zero * If searching for multiple
occurrences of a pattern by calling exec
in a loop, ensure
you reset lastIndex
when exiting the loop and
remember ˆ
only matches
when lastIndex
is equal to zero
Example on page 87 of the book is worth reading to improve understanding.
Simplest (and fastest) regexp method.
If regexp matches the string
it returns
true. Otherwise it returns false.
Do not use the g
flag with this method.
Returns character at position pos
in the string
starting from 0. If pos
is less than zero or bigger
than the string itself it return an empty string.
Same as charAt
except it returns the
integer that represents the
code point value of the character at position pos
. Returns NaN
if string.length <
pos
< 0.
Creates new string concatenating various strings.
+
tends to be used instead of this method (e.g. var cat = 'c'+'a'+'t';
)
Searches for searchString
within string starting at
position position
(an optional parameter). If
position
is not provided, search starts at the beginning of
the string. Returns the integer
position of the first matched character or -1 if no
match is found.
Same as indexOf
but searches
from the end of the string instead of the beginning.
Compares string to that
parameter and returns: * 0
if string === that
* -1 if string <
that
NB. ‘a’ < ‘A’, comparison is not just in length.
Works the same way as regexp.exec(string)
if there is no g
flag in the
regexp
.
If there is a g
flag in teh regexp
, it produces
an array of the matches but excludes the capturing groups
Searches for the searchValue
in string and replaces
it with the replaceValue
.
If searchValue
is a: * string, only its
first occurrence will be replaced with the
replaceValue
* regexp with a g flag,
all occurrences will be replaced with the
replaceValue
; otherwise, only the
first occurrence will be replaced
If replaceValue
is a: * string, a
$
value has a special meaning when used in the
replaceValue
that conveys what to replace - see table on page
90 for possible variations on $
* function,
it is called for each match and the
string result of the function is used as the replacement text *
string result of the first call will replace capture group 1 of the
string and so on
Similar to .indexOf(string)
but takes a
regexp
instead of a string
, returning the
position of the first match (or -1 if there is no match).
The g
flag is ignored.
Creates a new string by copying the characters from the
start
position to the character before the
end
position in string.
The end
parameter is optional and defaults to
string.length. If either parameter is negative,
string.length is added to it.
Creates an array of strings by splitting apart
string at the points where the separator
appears
(e.g. if the separator is ‘.’, ab.cd’ becomes [‘ab’, ‘cd’]). * If
separator is an empty string, an array of single characters is
produced. * limit
is optional and determines how
many pieces are to be split off from the original string. * The
separator
can be a regexp
but * text from
capturing groups within the regexp will be included in the split - e.g. in
var e = text.split(/\s*(,)\s*/);
the commas (,) will each be
included as a separate element in the resulting array * some systems
ignore empty strings when the separator
is a
regexp
No reason to use, use slice
instead.
Produces a new string converted to lower case, using the rules for the particular locale (geography).
Produces a new string converted to upper case, using the rules for the particular locale (geography).
Produces a new string converted to lower case.
Produces a new string converted to upper case.
Produces a new string from a series of numbers.
var a = String.fromCharCode(67, 97, 116); //a === 'Cat'
NB. You’re calling the prototype here, not replacing ‘String’ with your
own variable.
JavaScripts’s loose typing and excessive error tolerance provide little compile-time assurance of our programs’ quality, so to compensate, we should code with strict discipline.
We should avoid the bad parts of JavaScript, but also the useful parts that can be occasionally dangerous >the likelihood a program will work [as intended] is significantly enhanced by our ability to read it
if
and while
to avoid
confusion on what the statement is actually doing
{
on the same (first) line as
the statement to avoid JavaScript’s
semicolon insertion issues -
i.e if (a) { ...
//comment
and not block commenting
(unless you’re commenting out code)
Each feature you add to something has a lot of different costs (documentation costs, specification, design, testing and development costs) and these are often not properly accounted for. > Features that offer value to a minority of users impose a cost on all users
We cope with the complexity of feature-driven design by finding and sticking with the good parts. For example, microwaves do a ton of different things, but most people just use one setting, the timer and the clock. So why not design with just the good parts?
Need to know what all the pitfalls are with these parts.
These are variables that are visible throughout the code in any scope. They can be changed at any time by any part of the program which makes them unreliable in larger complex programs. This can also lead to naming conflicts which can cause your code to fail or you to accidentally overwrite a global variable.
Defined in three ways: * Using a var
statement
outside of any function; var foo = value
; *
By adding a property to the global object (container of all global
variables), such as window
in browsers;
window.foo = value;
* Using a variable without declaring it
with var
, which makes it an implied global;
foo = value
Although JavaScript has block syntax (i.e. is written in blocks) like a lot of other programming languages, it has functional scope and not block scope.
Variables should all be declared at the top of the function and not littered throughout the block.
Attempts to correct faulty programs by automatically inserting semicolons. Do not depend on this as it can hide underlying issues.
Also ensure opening curly braces ({) are on the first line of a statement, otherwise semicolons will be erroneously inserted and cause problems:
//Ensure curly braces open on the first line of a statement
return {
status: true //for example
};
//instead of
return
{
status:true
};
Most JavaScript reserved words are not used in the language but cannot be used to name variables or parameters.
If used as the key in object literals, they must be quoted. For
example object - {'case' : value};
or
object['final'] = value;
as case and
final are both reserved words.
JavaScript characters are 16 bits which only cover the original Unicode Basic Multilingual Place.
Watch out for: * typeof null
which returns ‘object’ instead
of ‘null’ * incorrect reporting on typeof regular expressions, with some
implementations returning ‘object’ and some returning ‘function’ * arrays
are objects in JavaScript so typeof array
will return
‘object’
All object
s are truthy and null
is
falsy, so you can use the following to tell them apart:
if (my_value && typeof my_value === 'object') {
//then my value is definitely an object or an array because not only is its 'typeof' an object but it's also truthy (first statement)
}
typeof NaN === 'number'
even though it stands for
not-a-number
NaN
then at least one of them will have generated
NaN
NaN !=== NaN
isNaN(value)
can be used to distinguish numbers from NaN
For numbers, best use your own isNumber formula:
var isNumber = function isNumber(value) {
return typeof value === 'number' && isFinite(value); //isFinite() rejects NaN and Infinity, but is only good for numbers, not strings
}
JavaScript doesn’t have real arrays, it has array-like objects.
To test if value is an array:
if (my_value && typeof my_value === 'object' && typeof my_value.length === 'number' &&
!(my_value.propertyIsEnumerable('length'))) {
//my_value is definitely an array!
}
The arguments
array isn’t an array, just an object with a
length property.
0
, NaN
, ''
, false
,
null
and undefined
are all
falsy values, but they are not interchangeable.
When testing for a missing member of an object for example, you need to
use undefined
and not null
.
undefined
and NaN
are actually global variables
instead of constants but don’t change their values.
JavaScript objects inherit members from the prototype chain so they are never truly empty.
To test for membership without prototype chain involvement, use the
hasOwnProperty
method or limit your results (for example, to
specific types like number so you know you’re not dragging in object
members from up the prototype for example if that’s what’s causing the
problem).
Avoid these altogether
==
and !=
: Don’t function
properly when result is false, use ===
or
!==
instead
with
statement: Intended to provide a
shortcut to properties of an object but results vary every time it is
run
eval
: Adds unnecessary complication and compromises the
security of the application
setTimeout
and
setInterval
should also be avoided as this makes them
act like eval
continue
statement: Forces a loop into its
next iteration but the code is usually much improved when re-written
without continue
switch
fall through: In a
switch
statement, each case
falls through to
the next case
unless you explicitly disrupt the flow, but
using these intentional fall throughs makes the
unintentional ones that are causing errors basically impossible
to find
{}
to block in statements so as to avoid misinterpretation
and aid error finding
&
, |
,
ˆ
, ˜
, >>
,
>>>
or <<
&&
for example
++
and --
: This one seems
debatable to me; Douglas Crockford finds it makes his coding style much
more cryptic and difficult to read (the book uses +=1
and
-=1
instead)
The function statement vs the function expression: To use
JavaScript well, important to understand that
functions are values. * A function statement is
shorthand for a var statement with a function value, so
function foo() {}
(a function statement) means pretty much
the same as var foo = function foo(){};
(a function
expression) * Logically, to write the language well you should define a
function before using it, but in JavaScript, function statements (using
just function foo(){}
) are hoisted to the top of the
scope in which they are defined - this encourages sloppy programming and
should be avoided * function statements also don’t function consistently
in if
statements * if you need to start a function expression
with the word function,
wrap it in parentheses (), or JavaScript assumes it’s a
function statement
Typed wrappers:
Don’t use new Boolean
or new String
or
new Number
, it’s completely unnecessary. Also avoid new Object
and
new Array
and use {}
and
[]
instead.
new
operator: Functions that
are intended to be used with new
(conventionally starting
with a capital letter) should be avoided (don’t define them) as they can
cause all kinds of issues and complex bugs which are difficult to catch.
void: In JavaScript, this actually takes a value
and returns undefined
, which is hugely confusing and
not helpful. Don’t use it.
JSLint is a code quality tool for JavaScript which checks your syntax.
Having read through this appendix (you can read more about JSLint here), I tend more towards JSHint, a fork of JSLint. It allows programmers to customise for themselves which the good parts and bad parts are and define their own subset, although naturally there are a number of pre-defined options. This is a really fantastic article on using JSHint; it’s simple and aimed at having you using JSHint in a few minutes as well as providing various sources for pre-defined subsets.


(comment: As originally posted on the OUBS Blog)

This is the first course book on the Finance part of the MBA at the OUBS. It deals primarly with understanding the way corporations get financing and their relationships with financiers. Here both private and public sector are taken into account. A major part of all of this is money, which fulfils three functions: - being a medium of exchange - being a store of value - being a unit of account

This is actually interesting in relation to the founding concept of VISA, which was: If anything imaginable was possible, if there were no constraints whatever, what would be the nature of an ideal organization to create and world’s premier system for the exchange of value? (From Dee Hock, Birth of the Chaordic Age)

The book looks both at the internal and external parts of financial management, which is often not about finance but about ratios that are a lot easier to compare.

Finance has had a broad effect on our world, both in the private sector, where things have moved from maximize size to optimize size through finance, and in the public sector where privatisation has grown and public sector enterprises are generally being managed from a financial viewpoint too.

Finance must always weight short-term spending versus long-term goals. This is also why often the chain of command between those who implement the strategy and those who go into detail is often very short in finance. You need to see the broad picture and the detail. Some questions will be asked repeatedly: - which projects should a company invest in? - how should it procure financing to pay for them?

This brings us to four basic themes in finance: - information, accountability and control - return - risk - markets and market efficiency.

In terms of financial vocabulary you need to remember that there is a different between US and UK terminology even though things are moving closer together with globalisation.

The mathematics of finance are extensive, but reoccuring themes are things like net present value and discounted cash flow. You need to remember that mathematics can do a lot of things, including giving you the wrong answer. You need to look at whether the system you used will give you the right answer.

Finance, Accounting and Corporate Governance

This part is mainly in relation to our first theme, being information, accountability and control. Finance and accounting are actually often closely related within a company even though they are concerned with different thing. Finance is mainly about making decisions for the future while accounting is about the past. This is also the difference about what a treasurer and a financial controller does. The treasurer is looking at liquidity, external funds, financial risks, relationships to providers of funds, analyst and the financial press. The financial controller is looking more at building annual accounts or monthly accounts for managers, including budgets with their key relationships being the auditors.

The corporate governance part can be best explained with agency theory.

… a contract under which one or more persons (the principals) engage another person (the agent) to perform some service on their behalf which involves delegating some decision-making authority to the agent. - Jensen and Meckling (1976)

Here we need to remember that the agent might have other information than the principal and the principal never 100% knows what the agent’s decisions are based on. There is a moral hazard then about the agent knowing that he cannot be exactly monitored and doing things in his interest while appearing to do them in the principals interest, but only appearing so.

Legislators are now trying to control the situation by a framework for reporting guidelines for limited liability companies where the problem is highlighted as the owners are not owning the company but only shares. The relationship with between shareholders and the management of the company needs to be somehow regulated to make it clear what the terms of that relationship are in light of potential conflict.

The information asymmetry has been address by disclosure requirements for corporations while linking corporate performance to management pay has been established to closer link the interests of management and shareholders. In light of problem in this relationship there are now corporate governance codex in different shapes and sizes in most countires. In the UK there is the ‘Principles of Good Governance’ and ‘Codes of Best Practice’. In Germany there is now the Der deutsche Corporate Governance Codex’. Some of the effects can be seen in annual reports.

Looking closer at changes in corporate reporting from 1951 to 2001, it can be seen that reports have become a lot more elaborate growing something like seven times in size. They are also often more understandable (to benefit the small shareholder) and have more information about directors compensation.

Return on Investment

Our second theme was return, and a fair one at that. The idea is to find a way to think about how much it is worth to wait to have money. In terms of return, you should think about percentage return and take into account the total returns, including potential tax benefits, appreciation, interest and whatever else is giving you monetary value. And you need to include the time value of money, which is worth more to you today than would be in 10 years, the same $100 that is. Here to take into account your time preference for money, your risk premium and an adjustment for inflation.

Time preference is about that given a choice, you would rather have money today than tomorrow, as it would lower your choices (once the money is gone it’s gone) and the price depends on the supply and demand. Time preference is estimated between 2-2.5% in relation to the government dept market and 3-3.5% in case of Treasury economists. Once you established your rate, it is likely to remain stable over time.

Then we have inflation. Remember that the inflation is always an estimate and largely depends on what you spend your money on. So if we have a time preference of 3% and want to lend you $100 for a year, then we would want $103 in a years time in case there is no inflation. Presuming we have an inflation of 5% then we would need to get $105 x 103% = $108.15. These 8.15% are called the nominal rate of return, while the 3% are called the real rate of return.

Investment Risk

Here we are looking at both the second and third theme, being return and risk. In general there is a risk/return tradeoff or rather, an uncertainty attached to a certain return really materialising. You can find this value by looking at the mean return of a set of data and then calculating the standard deviation. The fun thing of the standard deviation is that for 2S, 95.4% of the expected values for the return are included in the probability. If you get a mean return of 10% and have a standard deviation of 2% then you can say with 95% certainty that your real return will between 8% and 12%.

What are the risk factors though. Here maturity, liquidity, variability of income, default or credit risk, event risk and interest rate risk are important. There are two financial instruments that we need to understand, equity and dept.

Borrowers for example want to keep money as long as possible while investors want their money back as fast as possible. This conflict is reconciled through the stock market or secondary capital market, with the primary capital market being the issuance of securities by companies who then get money. The secondary capital market is rather about management of liquidity of issued securities.

In general, return and risk can be looked at closer through DCF (discounted cash flow) and NPV (net present value) analysis. DCF allows you to evaluate two investments with maturity, cash flow and risk in mind and NPV lets you decide whether to go ahead with an investment. You need to discount cash flows with your required rate of return in this case. The difference between the value of the discounted cash flow and the cost of investment can be the seen as the NPV of the investment.

The market context

Here the last of the four themes comes in, being markets and market efficiency. In general financial markets bring a large number of buyers and sellers together, allowing them to easily find each other. This does not remove volatility though. The question is whether markets are valueing investments fairly at all time, meaning that they are efficient, nobody has more information than anybody else and hence you all know what something is worth and have the same idea about the price. In a perfect market there would also be no entry or exit barrier and no transaction costs.

It hence becomes obvious that financial markets are not perfect. Then the question becomes if they are totally imperfect, meaning that they are totally random and profit does not only come from coincidence? Based on research from the 1950s and 1960s, you cannot predict the way the stock markets turn, something being called the random walk theory. The problem was seen in the fact that information needs to filter through, but all available information was priced into a stock. This is the idea of the efficient markets hypothesis (EMH).

The EMH is found in Roberts (1967) and Fama (1970). Fama argued that "in an efficient market at any point in time the actual price of a security will be a good estimate of its intrinsic value". The important point though is that this is based on all available information and the things that the market believes to be happening in the future. There are different levels of EMH:

Strong-form EMH: All public information establishes a price and if some private information tells you that the price is too low, you buy until demand and supply makes it right again. This is hard to prove though. Only the person that first acts on inside information wins. This of course is hard to prove.

Semi-strong form EMH: Here the market is efficient when all publicly available information is quickly reflected in the stock price. Here, even fundamental analysis cannot produce consistently higher returns.

Weak form EMH: Here all information that is reflected in the stock price is old, or already available information. Any new information is unrelated to the available information, as it is new, and hence stock prices movements of new information cannot be predicted. This brings us back to the random walk theory. The study of past movements cannot predict future prices (chart analysis)

The arguement against all of this is that investors are not that rational but that their is a herd instinct, churn in protfolios, under- or over-react, and more. Other anomalies include the ‘small firm’ effect (they grow more in value than the market), the January effect (outperformance of small cap stocks was done in January), mean reversion (stocks travel arround their mean, meaning that they fall lower if they climbed higher).

Looking at real market data from 1900 to 2000 to get some hard statistics, researchers found the problem of finding a (at least partly) correct inflation, getting all the data, and getting over a bias of survivors about what would have been bought without hindsight. The found two things very interesting. First, there is a close relations been theoretical seperate market, even at the start at the century and not only in the last 20 years. Second, higher risk and higher return indeed go hand in hand.

Otherwise, get the book out and get some more interesting stats that I won’t repeat here.


Google Earth Enterprise Documentation Home | Get started
Upgrade to GEE 5.x
You can upgrade to Google Earth Enterprise 5.x from versions 4.0.0 through 4.4.1.
Before you upgrade
We recommend you do the following before upgrading to GEE 5.x:
- Confirm your hardware and software meet the minimum requirements.
- Apply the latest Linux distribution software patches
- Create backups of data stored in the
/opt/google/gehttpd/
folders, including display rule templates, snippet profiles, icons, virtual 2D and 3D hosts, custom KML data (including SuperOverlays), custom web pages, CGI scripts, web applications, and JavaScript or HTML files.Note: During the uninstallation/installation, contents of
/opt/google/gehttpd
and other key folders are automatically backed up to:
/var/opt/google/fusion-backups
These backups are stored in aDATE.TIME
named folder, for example,20140310.160027/
. - Remove symbolic links from
/opt/google/gehttpd/
to other directories. - Create backup copies of any customized Apache Server configuration files, SSL/HTTPS certificates, user access lists, symbolic links to other files system directories, and files served from the Apache document root
/opt/google/gehttpd/htdocs
. - Move or copy portable globe files (glb or glm) from the default globes folder:
/opt/google/gehttpd/htdocs/cutter/globes
. - Run garbage collect for stream/search on the GEE server machine. This will clean all previously deleted databases in
/gevol/published_dbs;
/opt/google/bin/geserveradmin --garbagecollect --server_type stream
/opt/google/bin/geserveradmin --garbagecollect --server_type search
Upgrading
To upgrade to GEE 5.x:
- Stop
gefusion
andgeserver
. - If you are upgrading from GEE 4.x to 5.x, uninstall previous versions of Google Earth Enterprise Fusion and Server.
Note: When you uninstall Google Earth Enterprise Fusion and Server, your asset root remains unchanged; none of your resources or assets are removed.
- Install GEE Fusion and Server 5.x.
- For GEE Server, run the following command:
sudo -u gepguser /opt/google/bin/geresetpgdb
Note:
geresetpgd
deletes registering information about Fusion databases on GEE Server. After installing GEE Server/Fusion you will need to:- Rebuild 3D database assets; if Push is not available, then the database assets needs to be rebuilt.
- Push all 3D and 2D Mercator databases. 2D Plate Carrée databases are not valid in GEE 5.0. See Web Map Service (WMS) for projection support for Plate Carrée maps.
- Upgrade asset root:
sudo /opt/google/bin/geupgradeassetroot --assetroot /gevol/assets
- Optionally enable cutter:
/opt/google/bin/gecutter enable
- Start
gefusion
andgeserver
.
After you upgrade
After upgrading:
- Restore backups of data stored in the
/opt/google/gehttpd/
folders, either from your own backup copies or from the backup folder automatically created during uninstallation/installation:/var/opt/google/fusion-backups
.Only restore data that you have customized, including display rule templates, snippet profiles, icons, virtual 2D and 3D hosts, custom KML data (including SuperOverlays), custom web pages, CGI scripts, web applications, JavaScript or HTML files, Apache Server configuration files, SSL/HTTPS certificates, user access lists, symbolic links to other files system directories, and files served from the Apache document root/opt/google/gehttpd/htdocs
. - Rebuild your 3D Fusion database assets (minimal rebuild will be forced for terrain and imagery projects). For 2D Mercator databases, rebuilding is not required.
Note: Push is not available if rebuild is required. You will need to push each database (3D and 2D Mercator databases) to GEE Server (database will be registered on server, and updated files will be pushed), where they can then be published from the GEE Server Admin console. GEE Server supports serving imagery packets of old 2D Mercator and 3D Fusion databases.
Compatibility with Google Earth EC
GEE 5.x is compatible with Google Earth Enterprise Client (EC) and Plugin versions 7.0.1 - 7.3.x for Windows, Mac, and Linux.


Home
Set pin for any command
Pin:
(13 for LED_BUILTIN)
pinMode
Mode:
INPUT
OUTPUT
ANALOG
PWM
SERVO
SHIFT
I2C
ONEWIRE:
STEPPER
SERIAL
PULLUP
IGNORE
UNKOWN
Send
You must set the pin to the corresponding mode with the command above at least once before you do any of the following:
digitalRead
Read Once
Subscribe to Reading
Unsubscribe from Reading
digitalWrite
Send 0
Send 1
Replies
Clear Table
Time
Type
Payload
Error


Toggle navigation
MSS
About
Customize
Download
Contact us
Modern
Social
Secretary
Use our CSV to input your contacts, relationships, and other relevant information for your cards.
Download
Now