# Miscellaneous

## Tone

A very nice example on how re-wording can really change the tone of something from this SO thread.

Change Had you looked at the error console, it would have informed you what the issue was, to If you look at the error console, it can tell you what the issue is, really does make a super difference!

## HTTP Methods

### Idempotent

... aside from error or expiration issues ... the side-effects of N > 0 identical requests is the same as for a single request ... The methods GET, HEAD, PUT and DELETE share this property. Also, the methods OPTIONS and TRACE ...

This means that the side effect of a request is identical whether 1 such request is sent or a million! A side effect might be changing a value in a database or uploading a file, for example.

On thing to notice in the above definition is that POST is not necessarily idempotent! I.e., two identical POST requests may have different side effects than a single such request. You'll see why in the section on this method.

### GET

... retrieve whatever information ... is identified by the Request-URI. If the Request-URI refers to a data-producing process, it is the produced data which shall be returned ...

GET is idempotent because the request can be made any number of times but the content on the server will not change. I.e. the side effect is the same whether 1 or many requests are sent (there are no side effects).

### POST

... requests that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI...

"Subordinate" just indicates an "is contained/owned/part-of" relationship. E.g. a file is subordinate to a directory.

"Accept[ing] the enitity ... as a new subordinate" implies that whatever is POSTed is always added as new, which could, for example, be an append operation. Therefore, two such requests will not have the same side effect as one such event. In the former two objects could be added to, say, a list, and in the latter only one. Therefore POST need not be idempotent. In fact, one of the RFC examples is "extending a database through an append operation".

... The actual function performed by the POST method is determined by the server and is usually dependent on the Request-URI ...

In the POST request, and this is the reason for the non-idempotency, the URI identifies the resource that will process/handle the message contents. Because the processing is whatever the server likes, POSTs cannot guarantee idempotency, because the server can do whatever it likes with the message contents... all that was specified was the resource that operates on the contents!

### PUT

...The PUT method requests that the enclosed entity be stored under the supplied Request-URI ..

In a PUT request, the URI identifies the entity in the request, i.e., the message contents. This is why idempotency is required. If we PUT the same uniquely identified thing many times, we should still have one uniquely identified thing!

### DELETE

... requests that the origin server delete the resource identified by the Request-URI ...

## Miscrosoft Word Shortcut Keys

 Task Key Insert an empty field. CTRL+F9 Update selected fields. F9 Switch between a selected field code and its result. SHIFT+F9 Switch between all field codes and their results. ALT+F9 Change the selection to the Symbol font. CTRL+SHIFT+Q Apply subscript formatting (automatic spacing). CTRL+EQUAL SIGN Apply superscript formatting (automatic spacing). CTRL+SHIFT+PLUS SIGN Remove paragraph or character formatting. CTRL+SPACEBAR

## Root Sumsung S3 Mini

Had some problems getting Kingo Root to connect to my phone. It seemed the driver installation would constantly fail. I tried various drivers but the one that worked for me was found here at Android XDA. The driver for "Samsung Galaxy S3 (all variants)" was the one that worked. For some reason the one for "Samsung Galaxy S3" did not!

Having installed that driver Kingo Root worked as it promised :)

## GCC Canaries

StackGuard: A compiler patch used to guard against stack smashing.

## PMT() Formula For Mortgage With Offset Account

Mortgage repayments are "amortized", which means that the mortgage is payed off with a fixed repayment schedule in regular installments over a period of time [Ref].

Wikipedia has a good explanation for the formula used to calculate monthly amortized loan or mortgage payments. The formula, however, does not apply to mortgages with an offset account.

The following is based on the Wikipedia article. $F$ represents the balance of the offset account.

TODO