Data store is an important piece in most of the modern applications. The implementation can range from a simple text file to a complicated database systems. In this blog post, I will show you how to use Google Spreadsheet as a data store for your application.
Google Spreadsheet provides a convenient way to store, edit, share and retrieve data. This makes Google Spreadsheet appealing if you want to quickly prototype an app and don’t want to spend time building a CRUD interface to manage your data. It is also allow you to output the spreadsheet data in JSON format. This means you use Google spreadsheet as your JSON API.
Publish the spreadsheet to the web
In order to enable this feature, first you need to publish the spreadsheet to the web. You can easily do this by going to the File menu and choose Publish to the web. This only works if you own or have admin access to the spreadsheet. See the screenshot below.
Get the ID of the spreadsheet
The next thing that you have to do is getting the spreadsheet ID from the URL.
The URL of your spreadsheet should be something like this https://docs.google.com/spreadsheets/d/17CAMo4mY7pdlk7jgV2385FLVzDV3L8cUDidhfge8U_J4/edit#gid=0
The spreadsheet ID is the characters between the d
and edit
, which in the example above is 17CAMo4mY7pdlk7jgV2385FLVzDV3L8cUDidhfge8U_J4
Copy the ID and construct the JSON API endpoint
After retrieving the ID, you can start constructing the JSON API endpoint. The URL format as follow:
1
|
|
If we are using the spreadsheet URL in the previous section ( https://docs.google.com/spreadsheets/d/17CAMo4mY7pdlk7jgVRmgD5FLVzDV3L8cUDiHaT8U_J4/edit#gid=0 ), the JSON API URL will be:
1
|
|
The spreadsheet is public but not published to the web
In some cases, you might want to use a public Google spreadsheet but it is not published to the web. I discovered from the official Google forum that you can use importrange
formula to retrieve the data from another spreadsheet and import it into your spreadsheet.
1
|
|
Take for example this public spreadsheet that I don’t have admin access to: https://docs.google.com/spreadsheets/d/1ql32s8kcUB-Q8AEwxrCzPYJzNgaQ2CknW4J0rlnJqfE/edit#gid=1671204426
I will create another spreadsheet and use the importrange
formula to import the data from that public spreadsheet into my spreadsheet
1
|
|
It should look something like this:
As you might think, this solution is prone to error because the formula will break if the owner of the original spreadsheet changes the sheet’s name.
It’s something I can live with since it’s so much easier to update the sheet’s name rather than asking the owner to publish spreadsheet to the web.


--- layout: null --- {% if page.cover %} {% assign cover = page.cover %} {% elsif site.cover %} {% assign cover = site.cover %} {% endif %} {% include head.html %}
For Some Reason The Page You Requested Could Not Be Found On Our Server


Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | 1x 1x | import React from 'react'; import Classes from './AboutUs.css'; const aboutUs = () => (

WHO ARE WE

ABOUT iREPORTER

Corruption is a huge bane to Africa’s development. African countries must develop novel and localised solutions that will curb this menace, hence the birth of iReporter. iReporter enables any/every citizen to bring any form of corruption to the notice of appropriate authorities and the general public. Users can also report on things that needs government intervention.

Communication

iReporter provides a platform for reporting corruption and intervention cases. Anyone can safely share what they experience and observe and can speak out against corruption. Our communication channels include our website, an SMS line, social media, email or post.

Investigation

We investigate selected reports of alleged acts of corruption, in particular those cases that have the most serious impact on our society. We hand our findings over to the relevant authorities to take further action, and we monitor the progress of each case. We work with mainstream and community media to make sure that corruption is fully exposed through our investigative work.

 ); export default aboutUs; |


About 13,000 results (0.37 seconds)
abhiprojectz/motionia: Motionia is a lightweight ... -
js it contains 100+ pre-built animations with a tons of customizations. No need of using any kind of Scroll library, motionia is independent => No dependencies.
Motionia.js - On-demand lightweight animation library! - DEV
Jun 3, 2020 — Welcome. Motionia - a lightweight simplified on demand animation library. With motionia you can animate elements by just one line of code.
Easy Performant JavaScript Animation Engine - Motionia ...
Sep 21, 2020 — Motionia is a lightweight, easy-to-use JavaScript animation library that provides 100+ performant animations from which you can pick to ...
Motionia - JS animation library - Web Design Tips
May 29, 2020 — Welcome Motionia - a lightweight simplified on demand animation library. With motionia you can animate elements by just one line of code.
Motionia.js - On-demand lightweight animation library! | Anicode
Sep 30, 2020 — well here is the motionia.js libarary that works by just one line of coe and can save a lots of time of the web developers wround the world no ...


This may not be helpful as a record of an experience, but it might be of some comfort to people in the same position as me.
Well, it has to be said that I don't think there is any street drug I haven't tried, so moving into the world of legal psychoactive substances was a new thing for me.
(Before I write about my experience of Salvia, a bit of background might be helpful).
I'm nearly twenty years old, and those short years have been a rough time for sure, and I have used drugs (mostly Cocaine) as a form of escapism for the last three years. I've suffered from quite bad depression, coupled with some manic episodes, and a severe case of alcoholosm. I say 'for the last three years' - the only drug I take on any sort of regular basis now is Cannabis, in the form of Skunk, because I know that when I do I'm gonna be absolutely on top of the world for about six to eight hours.
Still - having made progress, in the form of getting off (nearly all) drugs and alcohol, escaping the depression and the manic episodes and generally clearing my life up, I am feeling pretty damned happy generally at this point in time. I smoke a fair bit of tobacco - it keeps me calm, which I find is of benefit to me and others around me, and rather than drinking two bottles of Vodka a night, I'm in the happy position of having on average two cans of beer a week. This isn't through forcing myself not to drink, it's just happened that way through circumstance.
Of course, all of the above had to have a cause, and there are many - but the most recent was a very difficult relationship with a girl I met at university.
Still - enough background - onto the experience.
I guess I wanted to try Salvia, after a friend recommended it to me, and I did some reading on it. Initially, I thought 'I've never heard of this - so it can't be that good', but after reading some other peoples experiences, there was one thing that really interested me: that people have reported being able to gain a sense of understanding of the situations they have been in recently, during or after taking Salvia.
Of course - women are hard enough to understand at any time, but the situation I've been in with the particular girl mentioned above could be described in understated form only, as 'completely incomprehensible'.
So off I went, searching round the internet for some of the extract my friend had recommended to me, and ordered a gram of 20x extract, and a gram of 40x extract. Of course, I can hear the cries of 'you idiot!' of starting out on something that strong, though what comes below may quieten them a little.
Now - I'm doing a four year course at university in chemistry at the moment, so I am gaining a pretty good (general) understanding of how drugs work through my studies, and with my more dangerous forays into the world of narcotics, I have a fairly good understanding of what they do from that point of view as well. I've also learnt how to use them safely.
Still, a few days after the order, a couple of small brown packets turn up in my mail, and I open them excitedly. Inside are the extracts: I'd been looking forward to trying Salvia ever since I hit that 'Submit Order' button on the websites I bought it from. I'd allready planned how I was going to take it, arranged a watcher/sitter, decided what atmosphere would work best, and made my room safe for taking a trip.

We go up to my room, and I show him the information about the drug, so he can know what to expect, and set up a bong.
Erring very much on the side of caution, I put probably less than 0.05g of the 20x extract into the bowl, smoke it, holding the smoke in for thirty or forty seconds, and exhaling slowly, and lie down on my bed with my friend sitting next to me, having asked him to let me be quiet and close my eyes for 15 minutes or so.
After about half an hour has passed, I open my eyes, and see my friend looking at me. 'Was it fun?' he asks expectantly.
The simple answer was no - what I'd smoked was too little to have any effect whatsoever. I had retained full consciousness of the room around me, and had wasted thirty minutes listening to him breathing.
Undeterred, I decide to try another hit. Having read that some people find joints a suitable way to smoke Salvia, we agree that it might be worth a try in combination with the bong, and use the same amount (perhaps a little more), twice over - one lot going in the bong, and one rolled into a joint. Following the same process of inhaling deeply and holding it for half a minute or so for both the bong, and the drags on the joint, I lie down again, expectantly, and hope to find myself somewhere on the edge of oblivion.
After twenty minutes, it is quite clear that doses of the size I was trying were not having the required effect. After getting a drink, and taking a break for half an hour to listen to some relaxing music, I rolled another, larger (probably 0.2g 20x extract or there abouts) joint, and put about the same again into the bong. Deciding to go for the bong first, I smoke it, and follow the same process of inhaling deeply, holding, and exhaling slowly, and again lie on my bed.
After fifteen minutes, the result is negligible. I felt a little warmer than I was before, and was perspiring a little - but the effects couldn't even be considered as strong as weed or hashish. There was no altered perception, and if anything, I felt more aware than I was before I smoked the bong. It became evident that even this dose was not sufficient, and I smoked the joint, followed by another of the same size. Again, no effect.
By this point, both my friend and I were wondering whether we might have been ripped off, and sold something that looked and (apparently) smelled like Salvia, but that in fact wasn't. I pointed out to him that the 40x pack lay unopened, and that that might be worth a try.
Doing some simple sums (both extracts were standardised, so we agreed that this was possible) we calculated how much of the 40x would be a safe start, given that nearly half a gram of 20x had failed to produce any of the desired effects. Working on the assumption that I had been ripped off, we recalculated an initial dose of 40x extract, that would theoretically be simillar to the 20x extract, put it in the bong, and again I smoked it, and laid down.
Having made the room as silent as possible, I shut my eyes, and tried to clear my mind of all thoughts bar one: the image of the girl I'd been having difficulty with recently. It wasn't difficult to get an image there: I love her dearly, and probably will till the day I die, though circumstance and past histories have unfortunately prevented us having a future together.
Eventually, my watch beeps for the hour, breaking the silence, and telling me that 25 minutes have passed, during which time I have again noticed no alteration in perception, and no physiological effects whatsoever.
I sit up, turn to my friend and shake my head. He laughs at me, and reminds me that 'it's all about the mission', and why don't I give the big one a try?
I think about it for a few minutes, and discuss with him what a much larger dose might do to me. We agree that as I've had acid trips before, and that he has kept me safe on those, and can physically restrain me if he needs to, that it might be worth an all or nothing effort.
So, with slightly shaking hands, I divide what remains of the 40x extract into two, and put one pile into the bong. I take the rest of the 20x extract remaining, and roll it into a smallish, but strong joint - exchange all the usual 'if anything bad happens' things, and light them up.
It should be mentioned here that I had had a couple of cans of beer, and a couple of shots of vodka on one of our breaks, so by this point, the alcohol would have been in my system.
I manage to get four or five hits off the bong - good ones anyway - full lung fulls of smoke held for 45 seconds a time, counted out on my friends stopwatch. I then move immediately onto the joint, using a lighter under the end every time I take a drag, again holding for 30 seconds on each painfully large intake of smoke, and fall back on my pillow.
I don't know what it is about me that makes me immune to Salvia Divinorum - but that dose also did absolutely nothing for me.
I fell back on my pillow, not for the effects of the drug, but simply for the pain in my throat at the harsh smoke, and the long holds I took. I stayed there for ten to fifteen minutes, feeling depressingly sober, and unaltered.
After a few minutes cursing myself, my friend and I sat down, and tried to look objectively at what could have gone wrong.
We knew that in principle, joints were not as good as bongs, but having tried both, and found no effect, we couldn't see that there was a problem there.
We also knew that Salvinorin-A has a high boiling point - but that having tried dragging off the joints with a lit lighter under the end, and having inhaled slowly and deeply from the bong, also with the lighter there the whole time, it was unlikely to be the case that I wasn't vapourising the compound.
We considered too that the chemicals in tobacco in the joints might be interfering with the Salvinorin-A, but that my having smoked bongs without tobacco ruled this out.
We considered also the possibility that I had been ripped off by two separate internet stores - the products smelt, appeared, tasted and burnt the same after all - instead of both being genuine, they could both be fake - but this, though possible would seem to be highly unlikely, given the information I had read about the appearance/taste/smell etc, and unlikely for the sheer probability of this happening anyway.
In the end I guess it comes down to one thing. Immunity. I don't know whether it's that I havent smoked enough, or whether I've made some catastrophic mistake in how I was smoking it, or indeed whether I've miscalculated the doses wildly - but the drug had no psychological effect on me whatsoever.
I have about half a gram of the 40x extract left, which I'm going to ask the friend who first told me about Salvia to try, to see whether it really is immunity, or a problem in the method, or that I've been ripped off. For the record, he normally smokes no more than 0.25g of 10x extract, and this is enough to send him into a full blown alternate reality trip.
I tried one more bong before I started writing this, again with no effect, and I'm inclined to say that I think there's something about my physiology that prevents me from feeling the effects.
All in all, it's been a pretty dissappointing day. My sitter has gone home, its half one in the morning, I'm thinking far too much about the girl, and I still don't have any of the answers I'm looking for.
I suppose I'll console myself with something I just saw elsewhere on the internet: 'They did a head count in heaven last night, and one Angel was missing. Give them a call and let them know you're ok...' That's the one thing I do know that was true.
If you're reading this having had a simillar experience (or lack thereof), you have my sympathy - I feel pretty gutted that I've spent fifty quid trying something that would have been great if it had worked, but that apparently does nothing for me. I could have got a quarter of skunk for that, and had a fantastic party with my friends.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Type The Given Word Within Seconds
Time Left: 0
Score: 0
Instructions
Type each word in the given amount of seconds to score. To play again, just type the current word. Your score will rese
Type The Given Word Within Seconds
Type each word in the given amount of seconds to score. To play again, just type the current word. Your score will rese


Terms and Conditions
-
GENERAL
-
Your use of and purchase of products from this site is governed by the terms and
conditions set out below, and as
set out under Security, Copyright, and Delivery. Please note that before placing an
order on our site you will be asked
to agree to these terms and conditions. If you refuse to accept them, you will not
be able to order any products from
our site. We recommend you also read our Privacy Policy. We also recommend that you
print the full terms and conditions
by selecting the print option in the File menu of your browser
-
We may at any time make changes to this site and the details displayed on it,
including but not limited to prices.
-
Delivery will be charged in addition to the price of the products you purchase,
and any such additional charges are
clearly displayed where they apply. For further details on delivery and delivery
charges, please refer to the details
sent with your order confirmation.
-
All images, sizes and measurements are approximate but we do try to make sure
that they are as accurate as possible.
-
We reserve the right to make changes to these terms and conditions at any time.
Every time you order products from
us, the terms and conditions in force at the time of your order will apply to the
contract between you and us.
-
ORDER PROCESS
-
Our shopping pages will guide you through the steps you need to take to place an
order with us. Our order process allows
you to check and amend any errors before submitting your order to us. Please take
the time to read and check your order
at each page of the order process.
-
All orders that you place on this site will be subject to acceptance in accordance
with these terms and conditions. We
may choose not to accept your order if products are shown on the website but are not
available/in stock.
-
The ‘confirmation’ stage sets out the final details of your order. Following this,
we will send to you an email,
acknowledging receipt of your order and detailing the products you have ordered.
However, please note that this does not
mean that your order has been accepted.
-
Acceptance of your order and the completion of the contract between you and us will
take place on despatch to you of the
products ordered, at which time we will send to you an order despatch confirmation
email.
-
DELIVERY
-
We will contact you by email if an item which you have ordered is no longer
available or not in stock and we are not
therefore able to process your order. You may cancel your order straight away if we
are unable to supply the products.
If you choose to proceed with an order for an item not currently in stock we will
contact you as soon as it becomes
available. In the event that the item does not become available within 99 days we
may contact you to confirm that we
cannot process the order.
-
The period stated within which you will receive your order is approximate, the
delivery times stated are for guidance
only. Occasionally our delivery to you may be affected by circumstances beyond our
control. See Section 9 below for our
responsibilities when this happens. Products will be sent to the address given by
you in your order and stated in the
Order Confirmation.
-
We have the right to choose the means and carrier with which we deliver your order.
-
Risk of loss and damage of products passes to you on the date when the products are
delivered.
-
Repeat deliveries may incur additional charges.
-
PRICES, DELIVERY CHARGES, PAYMENT AND OFFERS
-
Payment is taken from your Credit or Debit card at the time of despatch of the
products and in the event that the
payment card has expired we will be unable to take payment and fulfil your order.
Where applicable, VAT (at the
prevailing rate) will be added to the total of all charges on your bill.
-
We make every effort to ensure that the price displayed on our site is correct at
the time of you placing your order.
-
However if an error is discovered in the price of the products that you have
ordered, we will inform you as soon as
possible, and you will be given the opportunity to re-order at the correct price. We
shall be under no obligation to
fulfil an order for a product, which was advertised at an incorrect price; if the
item(s) has been charged and not
despatched we will cancel and refund your order.
-
Pricing structures can differ between regions whilst not emulating direct currency
conversation and we have the right to
update these prices when we require. Offers will be made available to different
regions at varying degrees, at our
discretion.
-
The price of a product does not include delivery charges. Our delivery charges are
as advised to you during the
check-out process, before you confirm your order. To check relevant delivery charges
please email us here.
-
Title in the products which you have ordered on this site will pass to you on
delivery assuming that we have received
payment in full for such products.
-
This site is intended for use by the general public and we therefore do not
automatically provide VAT invoices. They
are, however, available upon request.
-
Promotional codes can only be used online and are subject to this Section 4.8 and
any terms and conditions issued with
the code. We reserve the right to withdraw or cancel them for any reason at any
time. Where a promotional code is issued
to a specific individual, the right to any associated discount is personal to the
recipient and may not be transferred.
Promotional codes distributed or circulated without our prior written approval are
not valid for use and may be refused
or cancelled.
-
CANCELLATION AND REFUNDS
- As a consumer, you have a legal right to cancel a contract under the Consumer
Contracts (Information, Cancellation and
Additional Charges) Regulations 2013, during the period set out in Section 5.3
below. This means that during the
relevant period if you change your mind or decide for any other reason that you do
not want to receive or keep a
product, you can notify us of your decision to cancel the contract and receive a
refund.
-
However, the cancellation right referred to in Section 5.1 above does not apply in
the case of the following products:
items made to your specification;
pierced jewellery;
sealed tea which has become unsealed after delivery.
-
Your legal right to cancel a contract starts from the date of your order despatch
confirmation email, which is when the
contract between us is formed. Your deadline for cancelling the contract then
depends on what you have ordered and how
it is delivered, as set out in the table below:
| Your contract |
End of the Cancellation Period |
|
Your contract is for a single product (which is not delivered in
instalments on separate days).
|
The end date is the end of 14 days after the day on which you receive
the product.
|
|
Your contract is for either of the following: (i) one product which is
delivered in instalments on separate days; (ii)
multiple products which are delivered on separate days.
|
The end date is 14 days after the day on which you receive the last
instalment of the product or the last of the
separate products ordered.
|
-
The easiest way to let us know that you have decided to cancel your contract is to
complete and email or post the
cancellation form on our website . If you use this method we will
email you to confirm we have received your
cancellation. You can also email us. Please quote your order number to help us to
identify it.
-
If you cancel your contract:
We will refund the price you paid for the products. However, please note we are
permitted by law to reduce your refund
to reflect any reduction in the value of the products, if this has been caused by
your handling them in a way which
would not be permitted in a shop.
All products should be returned unused and in their original packaging. We will, in
the circumstances referred to in
Section 5.6 below only, refund any delivery costs you have paid, although, as
permitted by law, the maximum refund will
be the costs of delivery by the least expensive delivery method we offer.
We will make any refunds due to you as soon as possible and in any event within the
deadlines indicated below:
If you have received the product and we have not offered to collect it form you: 14
days after the day on which we
receive the product back from you;
If you have not received the product or you have received it and we have offered to
collect it from you: 14 days after
you inform us of your decision to cancel the contract.
You must return the products in question to us without undue delay and in any event
no later than 14 days after the day
on which you let us know that you wish to cancel the contract.
Please see our Returns page for return details. If we have offered
to collect the
product from you, we will collect the
product from the address to which it was delivered. We will contact you to arrange a
suitable time for collection.
-
If you want to return products to us under this Section 5 because you consider that
they are faulty, they have arrived
damaged or broken, you will be required to provide us with clear photographic
evidence of the alleged fault or damage.
If we agree that the products are faulty or damaged, we will provide you with a
replacement (if available) or refund the
price of the products in full, together with any applicable delivery charges. If you
return products to us because they
have been mis-described, we will refund the price of the products in full, together
with any applicable delivery
charges. Please see our Returns page for further details.
-
We are under a legal duty to supply products that are in conformity with this
contract. As a consumer, you have legal
rights in relation to products that are faulty or not as described. These legal
rights are not affected by your right of
return and refund in this Section 5 or anything else in these terms and conditions.
Advice about your legal rights is
available from your local Citizens’ Advice Bureau or Trading Standards office.
-
INTELLECTUAL PROPERTY
-
You agree that all Intellectual Property Rights and all other materials contained on
this site remain our property.
-
‘Intellectual Property Rights’ means patents, database rights, copyright, design
rights (whether registered or
unregistered), Trademarks (whether registered or unregistered) and other similar
rights, together with the right to
apply for the protection of any such rights.
-
All design, text, graphics, their selection and arrangement and all software
compilations underlying source code,
software, and all other material on this site are our copyright or are the copyright
of its content and technology
providers. All rights are reserved
-
Permission is granted to electronically copy and print in hard copy portions of this
site for the sole purpose of
placing an order with us or for using this site as a shopping resource. Any other
use of the materials on this site –
including reproduction for purposes other than those noted above, modification,
distribution or re-publication – without
our prior written permission of is strictly prohibited.
-
LIABILITY
-
Nothing in these terms and conditions excludes or limits liability for death or
personal injury caused by negligence,
fraudulent misrepresentation, or any other liability, which may not otherwise be
limited or excluded under applicable
law.
-
Subject to Section 7.1 above, other than as expressly provided in these terms and
conditions with respect to specific
products and except for the exclusive remedies set out at Section 5 above, any
indemnities, warranties, terms and
conditions (whether express or implied) are hereby excluded to the fullest extent
permitted under applicable law.
-
Subject to 7.1 above, we will not be liable, in contract, tort (including, without
limitation, negligence), pre-contract
or other representations (other than fraudulent on negligent misrepresentations) or
otherwise out of or in connection
with the terms and conditions for any, economic losses (including without limitation
loss of revenues, data, profits,
contracts, business or anticipated savings); or loss of goodwill or reputation; or
special or indirect losses suffered
or incurred by that party arising out of or in connection with the provisions of any
matter under these terms and
conditions.
-
Notwithstanding the above, subject to Section 7.1 our aggregate liability (whether
in contract, tort or otherwise) for
loss or damage shall in any event be limited to a sum equal to the amount paid or
payable by you for the product(s) in
respect of one incident or series of incidents attributable to the same clause.
-
The products sold on this site are provided for private domestic and consumer use
only. Accordingly, we do not accept
liability for any indirect loss, consequential loss, loss of data, loss of income or
profit, loss of damage to property
and/or loss from claims of third parties arising out of the use of this site or for
any products or services purchased
from us.
-
Clause 7 does not affect your statutory rights as a consumer nor does it affect your
contract cancellation rights.
-
SEVERABILITY
-
If any of these conditions is or becomes invalid or unenforceable, then it will be
modified to remove the invalidity or
unenforceability and will then be binding. All other terms will remain in full force
and effect.
-
A failure to exercise any right or remedy will not affect any right or remedy nor
alter the obligations, which we have
to each other.
-
DELAY OR INABILITY TO SUPPLY
-
We will not be liable to you for any loss or damage which may arise as a result of
the supply of products being
prevented by circumstances beyond our control including the default of any of our
suppliers.
-
MISCELLANEOUS
-
These Terms supersede any and all other conditions, understandings, commitments,
agreements or representations (except
fraudulent misrepresentations) relating to your purchase, whether oral or in
writing, and contain the entire agreement
between us and you relating to your purchase.
- No waiver by us of any breach of these terms and conditions shall be considered as a
waiver of any subsequent breach of
the same or any other position.
-
It is a criminal offence to use a false name or a known invalid credit card to
order. Anyone caught wilfully entering an
erroneous or fictitious order will be prosecuted to the fullest extent of the law.
-
To provide increased value to our customers, we may provide links to other websites
or resources for you to access at
your sole discretion. You acknowledge and agree that, as you have chosen to enter
the linked website we are not
responsible for the availability of such external websites or resources, and do not
review or endorse and are not
responsible or liable, directly or indirectly, for (i) the privacy practices of such
websites, (ii) the content of such
websites, including (without limitation) any advertising, content, products, goods
or other materials or services on or
available from such websites or resources or (iii) the use to which others make of
these websites or resources, nor for
any damage, loss or offence caused or alleged to be caused by, or in connection
with, the use of or reliance on any such
advertising, content, products, goods or other materials or services available on
such external websites or resources.
-
We make no promise that materials on this site are appropriate or available for use
in locations outside the United
Kingdom, and accessing this site from territories where its contents are illegal or
unlawful is prohibited. If you
choose to access this site from locations outside the United Kingdom, you do so on
your own initiative and are
responsible for compliance with local laws. Products sold outside of the European
Union (EU) are sold excluding VAT and
you are responsible for any local tax, charges and custom duties. If you refuse to
pay local taxes, charges and custom
duties and the products are returned to us, we have the right to withhold from the
refund both the initial delivery cost
and the cost of repatriating the products, up to the value of the original delivery
charge.
-
Where we take payment for an order in Pounds Sterling, we are not responsible for
the exchange rate at which a bank
charges its customer, or for any additional charges it makes. In addition, any
refunds are made in the same currency
that the order was placed and we are not responsible for the exchange rate at which
a bank charges its customer, or for
any additional charges it makes.
-
A person who is not a party to these Terms and Conditions shall have no right under
the Contract (Rights of Third
Parties) Act 1999 to enforce any term of these Terms and Conditions but this shall
not affect any right or remedy of a
third party which exists or is available apart from that Act.
-
We reserve the right to transfer, assign, novate or sub-contract the benefit of the
whole or part of any of our rights
or obligations under these terms and conditions or any related contract to any third
party.
-
APPLICABLE LAW
- These Terms and Conditions shall be construed in accordance with the laws of Ireland
and all contracts governed by them
will be deemed to have been made in Ireland.
-
You consent to the exclusive jurisdiction of the Irish Courts all matters regarding
contracts governed by these terms
and conditions except to the extent that we invoke the jurisdiction of the Courts of
any other country.
-
In the event of any conflict between the English version of these terms and
conditions and any translation of them, the
English version will prevail.


Med.Ctr.-Spring
- MAIL TO ADMIN
Username:
Name:
Phone:
Email:
Subject:
Mail Details:
Send
×
Do you want to send this message?
form adm
form success
form


{% load cache %} {% include 'TopBar.html' %} {% cache 300 about %}
Charlie Wu, Tong Qiu, & Zakey Faieq
This project attempts to integrate the current functionality of UVa SIS, Lou's list and the Course Forum, in order to provide students and faculties an efficient way to do academic planning.


THERE was a farmer, and he had three cows, fine fat beauties they were. One was called Facey, the other Diamond, and the third Beauty. One morning he went into his cowshed, and there he found Facey so thin that the wind would have blown her away. Her skin hung loose about her, all her flesh was gone, and she stared out of her great eyes as though she'd seen a ghost; and what was more, the fireplace in the kitchen was one great pile of wood-ash. Well, he was bothered with it; he could not see how all this had come about.
Next morning his wife went out to the shed, and see!  The farmer determined to watch the third night; so he hid in a closet which opened out of the parlour, and he left the door just ajar, that he might see what passed.
Tick, tick, went the clock, and the farmer was nearly tired of waiting; he had to bite his little finger to keep himself awake, when suddenly the door of his house flew open, and in rushed maybe a thousand pixies, laughing and dancing and dragging at Beauty's halter till they had brought the cow into the middle of the room. The farmer really thought he should have died with fright, and so perhaps he would had not curiosity kept him alive.
Tick, tick, went the clock, but he did not hear it now. He was too intent staring at the pixies and his last beautiful cow.  Then out ran some of the little people and brought in firewood and made a roaring blaze on the hearth, and there they cooked the flesh of the cow -- they baked and they boiled, they stewed and they fried.
'Take care,' cried one, who seemed to be the king, 'let no bone be broken.'
Well, when they had all eaten, and had devoured every scrap of beef on the cow, they began playing games with the bones, tossing them one to another. One little leg-bone fell close to the closet door, and the farmer was so afraid lest the pixies should come there and find him in their search for the bone, that he put out his hand and drew it in to him. Then he saw the king stand on the table and say, 'Gather the bones!'
Round and round flew the imps, picking up the bones. 'Arrange them,' said the king; and they placed them all in their proper positions in the hide of the cow.  Whisht! up sprang the cow and lowed dismally. It was alive again; but alas! as the pixies dragged it back to its stall, it halted in the off fore-foot, for a bone was missing.


Master Document
Preface
This is an official document of the KochiOrgBook Public Identity Utility Governance Framework ("KOBPIU-GF"). If you have comments or suggestions, we invite you to submit them using our issue tracker. If you are interested in joining the KOB Consortium, please feel free to contact us.
Version Control
- Version: 0.1
- Governing Board Approval Date: TBD
- Comments: Ratification of the KOBPIU-GF will take place upon the formation of the Governing Board (at first meeting).
- Status: TBD
Acknowledgements
This document was produced on behalf of the KOBPIU Governing Board by the KOBPIU Governance Framework Working Group.
KOBPIU Governance Framework Master Document
1. INTRODUCTION
The purpose of the KOBPIU is to provide a decentralized global public utility for trusted commerce. The KOBPIU-GF works as the constitution for the KOBPIU. It represents an instance of a ToIP Layer One Public Utility Governance Framework under the guidance of the ToIP Utility Foundry Working Group.
The KOBPIU-GF leverages the principles, policies, terminology, and standards necessary to enable trusted digital commerce based on decentralized identity.
A key objective of the KOBPIU-GF is to address any concerns or risks that consortium members may have as itility participants.
The KOBPIU-GF formally consists of a set of interrelated documents shown in blue and yellow in Figure(). The KOB Consortia will also publish additional operational documents, including white papers, FAQs, readiness checklists, design guidelines, sample schemas, etc., as needed.
The documents are organized in three categories; Blue = Normative, Yellow = Assessment, White = Informative.
The normative documents in the KOBPIU-GF V1 are:
- KOBPOIU Governance Framework Master Document V1 - The present document.
- Five legal agreements:
- KOBPIU Steward Agreement V1 — The agreement between the KOB Consortia and all Stewards who operate Nodes of the KOBPIU.
- Transaction Author Agreement V1 — The agreement between the KOB Consortia and all Identity Owners writing Transactions to the KOBPIU Ledger Networks.
- Transaction Endorser Agreement V1 — The agreement between the KOB Consortia and Organizations using Permissioned Write Access.
- Steward Data Processing Agreement (DPA) V1 — The agreement under which Stewards serve as data processors from a data protection regulatory standpoint.
- Transaction Endorser Data Processing Agreement V1 — The DPA that applies to Transaction Endorsers.
- KOBPIU Glossary V1 — The terminology and definitions that apply to all KOBPIU-GF documents and across KOBPIU infrastructure as a whole.
- Controlled Documents — Technical specifications, standards, and policies that are independently maintained and versioned either by the KOB Consortia (e.g., the KOBPIU (TODO:-Change back) DID Method) or external standards bodies (e.g., W3C, OASIS).
Another document, the KOBPIU Trust Assurance Framework, does not directly govern KOBPIU Infrastructure; rather it defines criteria and processes for assessing conformance of KOBPIU actors, including the KOB Consortia, to the policies of the KOBPIU-GF.
2. CORE PRINCIPLES
The following principles guide the development of policies in the KOBPIU-GF
2.1 Self-Sovereignty
Individuals are endowed with and possess an inalienable right to be Identity Owners with the ability to permanently control one or more Self-Sovereign Identities without reliance on any external administrative authority.
- An Identity Owner alone shall determine which Identity Data describe its Identities.
- With regard to managing its own Identity Data, an Identity Owner alone shall determine how and for what purpose(s) it is processed.
- An Identity Owner alone shall determine who has access to its Identity Data.
- An Identity Owner’s Identity Data shall be portable as determined by the Identity Owner and enabled via Open Standards.
- An Identity Owner alone shall have the right to Delegate control of these functions.
2.2 Guardianship
An Individual who does not have the capability to directly control that Individual’s Identity Data (a Dependent) shall have the right to appoint another Identity Owner who has that capability (an Independent or an Organization) to serve as the owner’s Guardian. If a Dependent does not have the capability to directly appoint a Guardian, the Dependent shall still have the right to have a Guardian appointed to act on the Dependent’s behalf. A Dependent has the right tobecome an Independent by claiming full control of the Dependent’s Identity Data. A Guardian has the obligation to promptly assist in this process provided the Dependent can demonstrate that the Dependent has the necessary capabilities. Guardianship shall not be confused with Delegation or Impersonation. Guardianship under the KOBPIU Governance Framework should be mapped in the proper contexts to various legal constructs, including legal guardianship, power of attorney, conservatorship, living trusts, and so on.
2.3 Openness and Interoperability
KOBPIU Infrastructure shall use Open Standards and avoid mechanisms that would prevent Identity Owners from having interoperability or portability of their Identity Data both within the KOBPIU Network and with other networks and systems.
2.4 Accountability
Identity Owners shall be accountable to each other for conformance to the purpose, principles, and policies of the KOBPIU Governance Framework. All KOBPIU Entities shall be responsible for and be able to demonstrate compliance with any other requirements of applicable law. Nothing in the KOBPIU Governance Framework shall require a KOBPIU Entity to breach applicable law in order for it to perform its obligations under the KOBPIU Governance Framework.
2.5 Sustainability
KOBPIU Infrastructure shall be designed and operated to be technically, economically, socially, and environmentally sustainable for the long term.
2.6 Transparency
The KOB Consortia shall practice Open Governance, and the KOB Consortia and the Stewards in their KOBPIU Ledger Roles shall operate with full openness and transparency to the greatest extent feasible consistent with the principles herein, including the proceedings of the KOBPIU Board of Trustees and all KOBPIU Governing Bodies, the development and distribution of KOBPIU Open Source Code, the qualification and operation of Stewards, and any revisions to the KOBPIU Governance Framework.
2.7 Collective Best Interest
The KOB Consortia shall act in the collective best interests of all Identity Owners and shall not favor the interests of any single Identity Owner or group of Identity Owners over the interests of the KOB Consortia as a whole. Note that at present the KOBPIU Governance Framework has no self-enforcing distributed mechanism that neutralises differences of interest among different stakeholders participating in the network, therefore this is the responsibility of the KOB Consortia. Future versions of the KOBPIU Governance Framework shall aim to provide such mechanisms.
2.8 Decentralization by Design
2.8.1 General
KOBPIU Infrastructure shall be decentralized to the greatest extent possible consistent with the other principles herein. As the business, legal, and technical limitations of decentralization may change over time, the KOB Consortia shall continuously examine all points of control, decision, and governance to seek ongoing conformance with this principle.
2.8.2 Diffuse Trust
KOBPIU Infrastructure shall not concentrate power in any single Individual, Organization, Jurisdiction, Industry Sector, or other special interest to the detriment of the Network as a whole. Diffuse Trust shall take into account all forms of diversity among Identity Owners.
2.8.3 Web of Trust
KOBPIU Infrastructure shall be designed to not favor any single root of trust, but empower any KOBPIU Entity to serve as a root of trust and enable all KOBPIU Entities to participate in any number of interwoven Trust Communities.
2.8.4 Censorship Resistance
KOBPIU Infrastructure shall be designed to resist censorship of any Entity while remaining compliant with all applicable laws.
2.8.5 High Availability
KOBPIU Infrastructure shall be designed and implemented to maximize availability of the KOBPIU Network.
2.8.6 No Single Point of Failure
KOBPIU Infrastructure shall be designed and implemented to not have any single point of failure.
2.8.7 Regenerative
KOBPIU Infrastructure shall be designed so that failed components can be quickly and easily replaced by other components.
2.8.8 Distributive
KOBPIU Infrastructure shall be designed and implemented such that authority is vested, functions performed, and resources used by the smallest or most local part of the KOB Consortia that includes all relevant and affected parties. Deliberations should be conducted and decisions made by bodies and methods that reasonably represent all relevant and affected parties and are dominated by none.
2.8.9 Innovation at the Edge
The continued development of the KOBPIU Infrastructure shall encourage innovation to take place at the edges of the network among the members of the KOB Consortia most directly involved or impacted.
2.9 Inclusive by Design
2.9.1 General
The design, governance, and operation of KOBPIU Infrastructure shall follow the principles of Inclusive Design to serve the widest possible community of Identity Owners.
2.9.2 Identity for All
Consistent with the United Nations Sustainable Development Goal 16.9 , the KOB Consortia and the KOBPIU Network shall promote peaceful and inclusive societies for sustainable development; enable access to justice for all; and facilitate effective, accountable, and inclusive institutions at all levels by being accessible to, and inclusive of all Identity Owners without discrimination and with accommodation for physical, economic, or other limitations of Identity Owners to the greatest extent feasible.
2.9.3 People-Centered Design
KOBPIU Developers shall put people at the heart of the design process and enable them to control their own user experience.
2.9.4 Design for Difference
KOBPIU Developers shall strive to understand differences in capabilities and preferences across all potential members of the KOB Consortia and provide adaptable solutions to meet the needs of all potential members.
2.9.5 Test Across Contexts
KOBPIU Developers shall test KOBPIU solutions for use in different Identity Owner environments and contexts.
2.9.6 Offer Choice
KOBPIU Developers shall design flexibility by offering a choice of ways to achieve the same outcome.
2.9.7 Maintain Consistent Experience
KOBPIU Developers shall design comparable experiences for all of their user communities that use consistent design elements and language.
2.10 Privacy by Design
2.10.1 General
The design, governance, and operation of KOBPIU Infrastructure shall follow the Seven Foundational Principles of Privacy by Design to the greatest extent possible consistent with the other principles herein. These principles can be summarized as:
- Proactive not Reactive; Preventative not Remedial
- Privacy as the Default Setting
- Privacy Embedded into Design
- Full Functionality—Positive-Sum, not Zero-Sum
- End-to-End Security—Full Lifecycle Protection
- Visibility and Transparency—Keep it Open
- Respect for User Privacy—Keep it User-Centric
2.10.2 Pairwise Pseudonyms by Default
Agents using the KOBPIU Protocol shall default to assigning Pairwise Pseudonyms, Pairwise Public Keys, and, when necessary, Pairwise Service Endpoints whenever forming a Connection unless specifically directed otherwise by an Identity Owner.
2.10.3 Selective Disclosure by Default
Issuers, Holders, and Verifiers using the KOBPIU Protocol shall default to issuing, holding, and accepting Credentials that support Zero-Knowledge Proofs and privacy-respecting Revocation Registries by default.
2.10.4 Governance Framework Disclosure by Default
KOBPIU Entities shall by default disclose the Governance Framework under which a Connection is created, an Interaction is performed, or a Credential is exchanged. Agents shall by default notify their Identity Owner of any conflict between the Identity Owner’s privacy preferences and the Governance Framework’s privacy policies.
2.10.5 Owner Controlled Storage by Default
Agents shall store Private Data in decentralized data storage controlled by the Identity Owner by default.
2.10.6 Anti-Correlation by Design and Default
KOBPIU Infrastructure shall be designed and implemented to avoid correlation of an Identity Owner, or of a Thing associated with an Identity Owner, without the direct knowledge and informed consent of the Identity Owner.
2.10.7 Guardian and Delegate Confidentiality
The use of a Guardian or Delegate may be confidential information and shall only be disclosed with the authorization of the Identity Owner and of the Guardian and/or Delegate.
2.11 Security by Design
2.11.1 General
The design, governance, and operation of KOBPIU Infrastructure shall follow the principles of Security by Design to the greatest extent feasible consistent with the other principles herein.
2.11.2 System Diversity
The process and policies for selecting Stewards shall optimize availability and security by maximizing diversity of hosting locations, environments, networks, and systems.
2.11.3 Secure Defaults
The default configuration settings and user experience of the applications using KOBPIU Infrastructure shall enforce strong protection by default, including encryption by default.
2.11.4 Least Privilege
Access and authorization of the applications, Agents, and network services that use and comprise KOBPIU Infrastructure shall subscribe to the concept of least privilege.
2.11.5 Anti-Impersonation
Applications shall be designed to not knowingly allow any party other than the Identity Owner to act as (impersonate) the Identity Owner. Impersonation does not include Guardianship or Delegation.
2.11.6 Auditability
Transactions in KOBPIU Infrastructure and actions of application using KOBPIU Infrastructure that require auditing shall be immutably logged, in a tamper-evident way, and be available to verify processing.
2.11.7 Secure Failure
Applications using KOBPIU Infrastructure shall be designed to take an exception or error path that will not create a security weakness exploitable by bad actors.
2.11.8 Pervasive Mediation
Applications using KOBPIU Infrastructure shall not assume authorization is transitive across time and/or space—rather security mechanisms shall check every access to every object, and authorize each action on its own merits, just in time.
2.12 Data Protection by Design and Default
2.12.1 General
KOBPIU Entities, in the processing of personal data, shall adhere to the following data protection principles to the greatest extent feasible consistent with the other principles herein.
2.12.2 Lawfulness, Fairness, and Transparency
Personal data must be processed lawfully, fairly, and in a transparent manner in relation to the Individual.
2.12.3 Purpose Limitation
Personal data must be collected for specified, explicit, and legitimate purposes and not further processed in a way incompatible with those purposes; further processing for archiving purposes in the public interest, or scientific and historical research purposes or statistical purposes, shall not be considered incompatible with the original processing purposes.
2.12.4 Data Minimization
Personal data must be relevant and limited to that which is necessary in relation to the purposes for which it is being processed.
2.12.5 Accuracy
Personal data must be accurate and, where necessary, kept up to date. Every reasonable step must be taken to ensure that where personal data is inaccurate it is erased or rectified without delay.
2.12.6 Storage Limitation
Personal data must be kept in a form which permits identification of Individuals for no longer than the duration necessary for the purposes for which the personal data is being processed.
2.12.7 Integrity and Confidentiality
Personal data must be processed in a manner that provides appropriate security of the personal data, including protection against unauthorized or unlawful processing and against accidental loss, destruction, or damage, using appropriate technical or organizational measures (i.e., information security)
3 CORE POLICIES
3.1 Stewardship
In keeping with all Core Principles and especially the Decentralization by Design and Security by Design principles:
- Policies, practices, procedures, and algorithms governing participation of Stewards and operation of Nodes MUST follow all Core Principles.
- The KOB Consortia MUST publish the following Controlled Documents managed as specified by KOB Consortia :
a. KOBPIU Steward Business Policies
b. KOBPIU Steward Technical Policies. c. KOBPIU Ledger Access Policies.
3.2 Guardianship
In keeping with the Guardianship principle, a Guardian SHOULD:
- Act in the Dependent person’s best interest.
- Exercise good judgment and carefully manage responsibilities.
- Avoid commingling—keep Dependent’s property separate (e.g., separate DIDs, Public Keys, Wallets, Vaults, etc.).
- Keep detailed records of all actions taken on behalf of the Dependent.
- Not violate the Anti-Impersonation principle (section 2.11.5).
- Be subject to applicable legal structures regarding the granting and revocation of Guardianships.
3.3 Inclusion
In keeping with the Inclusive by Design principles:
-
Access to the KOBPIU Network MUST be open to all Individuals and Organizations on a comparable basis without intentional exclusion of specific persons or communities.
-
Developers SHOULD design for different capabilities in different contexts considering: a. Digital Exclusion (e.g., access to connected devices) b. Physical or Cognitive Exclusion (e.g., disability or incapacity) c. Political & Social Status (e.g., stateless individuals; being a child or a woman) d. Financial Status (e.g., having no income) e. Literacy & Language (e.g., low literacy or not speaking local language)
3.4 Trust Assurance
In keeping with all Core Principles and especially the Decentralization by Design principles:
- The KOB Consortia MUST specify policies, practices, and procedures for assessing conformance to the KOBPIU Governance Framework by publishing and maintaining the KOBPIU Trust Assurance Framework as a Controlled Document managed as specified by KOBPIU Governing Bodies.
- The KOBPIU Governance Framework MUST be designed to provide a foundation for Domain-Specific Governance Frameworks (DSGFs) based on the KOBPIU Web of TrustModel.
- As soon as feasible, the KOBPIU Foundation MUST publish a DSGF, the KOBPIU Web of Trust Governance Framework, whose purpose is to enable decentralized discovery,navigation, and verification of DSGFs.
- The KOBPIU Foundation MUST publish the KOBPIU Trust Mark Policies as a Controlled Document managed as specified by KOBPIU Governing Bodies.
- An Entity serving in one of the KOBPIU Infrastructure Roles who meets the requirements in the KOBPIU Trust Assurance Framework MAY use the appropriate KOBPIU Trust Mark as specified in KOBPIU Trust Mark Policies.
3.5 Economics
In keeping with the Sustainability principle:
- The KOB Consortia MUST publish the KOB Economic Policies as a Controlled Document managed as specified by KOBPIU Governing Bodies in conjunction with KOB Foundation legal counsel.
- The KOB Consortia MUST manage Ledger Fees and any mechanism used for paying them to ensure economic viability and sustainability for KOBPIU Infrastructure in keeping with its charter as a non-profit public trust organization.
- The KOB Consortia MUST retain a qualified Auditor to publish an annual public audit of KOBPIU Foundation finances.
Note: KOB Consortia or KOBPIU Foundation?
4 GOVERNANCE
The KOBPIU Governance Framework Master Document and the Controlled Documents listed in Appendix A shall be revised from time to time as KOBPIU Infrastructure grows and evolves. The policies in this section govern this process.
4.1 General
- The KOB Consortia MUST publish KOB Governance Bodies as a Controlled Document managed by the KOB Board of Trustees.
- KOB Governance Bodies MUST specify the KOB Governing Body for each Controlled Document.
- All KOBPIU Governance Framework documents, including Controlled Documents, MUST use keywords in policies as defined in IETF RFC 2119.
- All KOBPIU Governance Framework documents MAY be revised to add non-normative content, such as references to appendices, white papers, or other explanatory materials, without triggering a formal revision review process as defined in this section 4.
4.2 Revisions to the KOBPIU Governance Framework Master Document
These policies apply to any normative revision to the present document, exclusive of Appendix A.
- Revisions to the KOBPIU-GF Master Document MUST respect the Purpose and Core Principles.
- The commencement of any revision process MUST be publicly announced by the KOB Foundation no later than the time of commencement.
- Participation in the revision process MUST be available to all members of the KOB Community.
- Proposed revisions MUST be publicly announced by the KOB Foundation and subject to a minimum 30 day public review period following the announcement.
- Revisions MUST be approved by a supermajority vote of at least two-thirds of the KOB Board of Trustees after the conclusion of the public review period and before the revision takes effect.
- Prior to the next major revision of the KOBPIU-GF Master Document, the KOB Foundation MUST put in place new governance policies implementing the KOBPIU Decentralization by Design principles.
4.3 Revisions to Controlled Documents
These policies apply to any normative revision to the Controlled Documents listed in Appendix A.
- The list of Controlled Documents in Appendix A, as well as each Controlled Document on that list, MAY be revised independently from the KOBPIU Governance Framework Master Document (the present document).
- A Controlled Document MUST be stored in and use the change control mechanisms established by the official KOBPIU Code Repository at the permanent location for the document published in Appendix A.
- Proposed revisions MUST be subject to a minimum 30 day public review period publicly announced by the KOBPIU Foundation.
- Revisions to a Controlled Document MUST be approved by the KOBPIU Board of Trustees after the conclusion of the public review period and before the revision takes effect.


I have been able to grasp the fundamentals of erlang programming quickly. Pattern matching, message passing and other basics of the language felt natural to me even though I had never programmed in a functional language before. So with bubbling enthusiasm I decided to write my web socket application in erlang. Well the use case was pretty good. I needed message passing and concurrency and erlang gives those two for free but I underestimated the effort that it would take to learn OTP.
My previous experience with frameworks has been quite good. I did not have much trouble learning Asp.net MVC or express after getting a hang of c# and javascript. OTP however was quite a challenge and even now I don't feel fluent in it. The main problem was that I was trying to learn too much at the same time. I switched my editor to emacs, fiddled around with rebar for dependency management and building, tired to learn relex for creating releases while I still hadn't written a hello world in cowboy. Any one who is new to web development in erlang will probably use these tools for their application and this post might help flatten learning curve a little.
You can use any text editor to program in erlang but emacs is the recommended one. After installing emacs on your machine open up the terminal and type emacs .emacs
Now copy the code from the erlang emacs manual in the file that pops up and save it. That's it you are ready for erlang development.
This was the easy part though. Emacs comes with it's own key bindings that may seem strange if you are used to modern editors like sublime text or brackets. Working with emacs becomes a lot simpler once you learn how to read the bindings. Consider a simple example C-x C-s
which saves the current file you are working on.
This seems cryptic at first. Here is how you read it. Control+x followed by Control + s
M-x
is read as alt+x
Setting up emacs on erlang gives you a lot of useful features like syntax highlighting, indenting code(M-C-\
) and compilation(C-c C-k
). For a full reference of what can be done with emacs check out this [post] (http://www.erlang.org/doc/man/erlang.el.html). Granted it may take a while to get used to it but development in erlang will be a lot more fun once you learn how to use it.
OTP applications follow a predefined file structure. There will be at least two folders in your project directory. src
and ebin
. Besides this the root folder will also have configuration files for relex and rebar . The src
folder contains the source files viz *.app
, *_app.erl
,*_sup.erl
Developing otp applications involves editing the files in the src folder compiling them and then generating a release.
Rebar takes care of building and compiling src files. For this purpose it needs a config file. A very basic config file looks like
{deps, [
{cowboy, ".*", {git, "https://github.com/extend/cowboy.git",{branch, "master"}}},
{'lager', ".*", {
git, "git://github.com/basho/lager.git", "master"}
}
]}.
What this does is tell rebar of dependencies of the application. In the config file above there are two dependencies cowboy and lager .So when the first time you complie your app you can type rebar get-deps compile
in the terminal and it will fetch all the dependencies and generate beam files in the ebin folder. For all subsequent compilations you can use rebar compile
.
Rebar does more than compilation though. For each build it can run unit tests as well. However that is a topic for another post and for now we just want the basics.
The second step is generating a release of the application the you have compiled. A release is simply your application that is packaged to run on your server or another machine. It is self contained so all you need to do is copy the _rel
folder and you are good to go. Relx helps in creating releases. Like rebar it has a config file. A simple relex configuration looks like
{release, {app, "1"}, [app]}.
{extended_start_script, true}.
The config is pretty straightforward the first tuple contains the atom release
another tuple containing app name and a version number followed by a list containing name of applications to be released.
extended_start_script
instructs relex to create a start script in the release folder.
After creating relex.config in the root just run relex
from your terminal and you should have a release in your _rel
folder
After building and generating a release I was quite confused about what to do next. I did not know how to start the application. It turns out that the _rel folder has the start script in the bin sub folder. So if you app name is say hello then this should do the trick
_rel/bin/app console
console
command simply allows all the status messages from app to be printed on the terminal.
This basic tutorial should be enough for getting your OTP applications to run. I have not covered the use of cowboy framework here intentionally. It is quite a lenghty topic and in subsequent posts I will cover it in more detail as I get to know it better.