Girl, 13, arrested after ‘gang with machetes brawl and assault police’ at cinema
A 13-year-old girl is among five teenagers who have been arrested following a mass brawl at a cinema.
She was detained alongside two boys and a girl, aged 14, and a 19-year-old man following the fight at the Star City entertainment complex, in Birmingham, that involved 100 youths.
In total seven police officers left with minor facial injuries as they tried to deal with the crowds that were armed with machetes.
The theatre was packed when the fight broke out at around 5.30pm as children queued up to see Frozen 2.
Superintendent Ian Green said: ‘This was a major outbreak of trouble which left families who were just trying to enjoy a night out at the cinema understandably frightened.
Advertisement Advertisement
‘We worked quickly to move the crowds on but were met with a very hostile response and officers had to draw Tasers to restore order.
‘Thankfully, the injuries to our officers were very minor.
‘We understand that families with young children will have been left upset by what they saw last night, but we urge people to appreciate that our aim last night was to protect the public and restore order, and that’s what we achieved.
West Midlands Police, who are still trying to figure out what caused the incident, confirmed they were looking at video footage taken of the incident.
They asked anyone who had more footage to get in touch.
Two machetes and knife were seized near the venue.
Management at the cinema made the decision to close for the evening following the fight.
A dispersal order gave officers the power to move crowds on and arrest those who refused.
By 9pm, the area was largely clear with many held on suspicion of assaulting police, with officers suffering minor facial injuries.
Star City is home to one of Europe’s largest Cinemas and England’s largest Indoor Adventure Golf Course.
Update:
Vue Cinemas has now banned the Blue Story film from all its cinemas following the mass brawl.
A voice message from the company said: ‘We regret that we will no longer be screening the film Blue Story at any of our venues.
Advertisement Advertisement
‘Should you have a booking for this film, please say cancellation when prompted and a member of our team will be with you shortly to assist you with your booking.’
Got a story for Metro.co.uk?
Get in touch with our news team by emailing us at<EMAIL_ADDRESS>For more stories like this, check our news page.


OJscrapper
Dashboard
Interface
Solve Details
Users
Classroom
Username
Profile
Logout
Profile
Generate Report
Personal Information
First Name
Last Name
Email
Username
Update Personal Information
Online Judge Information
Codeforces
VJudge
LightOJ
Update Online Judge Information
Change Password
Current Password
New Password
Confirm New Password
Update Password
Ready to Leave?
×
Select "Logout" below if you are ready to end your current session.


Card
Visitors
1,294
Subscribers
1303
Sales
$ 1,345
Order
576
Number
150GB
Revenue
$ 1,345
Errors
23
Followers
+45K
Visitors
1,294
Subscribers
1303
Sales
$ 1,345
Order
576
Number
150GB
Revenue
$ 1,345
Errors
23
Followers
+45K
3,072
Total conversations
88%
188
Total Sales
25%
12
New Users
70%
1234 **** **** 5678
Sultan Ghani
4/26
1234 **** **** 5678
Sultan Ghani
4/26
1234 **** **** 5678
Sultan Ghani
4/26
17
Users online
27
New Users
213
Transactions
17
Users online
27
New Users
213
Transactions
Todays Income
All Customs Value
$170
Change
75%
Total Revenue
All Customs Value
$120
Change
25%
New Orders
Fresh Order Amount
15
Change
50%
New Users
Joined New User
12
Change
25%
Todays Income
All Customs Value
$170
Change
75%
Total Revenue
All Customs Value
$120
Change
25%
New Orders
Fresh Order Amount
15
Change
50%
New Users
Joined New User
12
Change
25%
132 Sales
12 waiting payments78 Orders
32 shipped1,352 Members
163 registered today132 Comments
16 waitingTimeline
-
Mussum ipsum cacilds
11 hours ago via Twitter
Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts.
-
Mussum ipsum cacilds
Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts.
-
Mussum ipsum cacilds
Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts.
-
Mussum ipsum cacilds
Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts.
-
Mussum ipsum cacilds
Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts.
-
Mussum ipsum cacilds
Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts.
-
Mussum ipsum cacilds
Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts.
Pricing
Basic
- Customizer 14 days trial
- Chat History No
- Statistics 14 days trial
- Support Yes
- Live Support No
Professional
- Customizer Yes
- Chat History 3 Month
- Statistics 3 Month
- Support Yes
- Live Support Yes
Team
- Customizer Yes
- Chat History 1 Year
- Statistics 1 Year
- Support Yes
- Live Support Yes
Pricing 2
Standard
Lorem ipsum- 50GB Disk Space
- 50 Email Accounts
- 50GB Monthly Bandwidth
- 10 Subdomains
- 15 Domains
Business
Lorem ipsum- 60GB Disk Space
- 60 Email Accounts
- 60GB Monthly Bandwidth
- 15 Subdomains
- 20 Domains
Premium
Lorem ipsum- 70GB Disk Space
- 70 Email Accounts
- 70GB Monthly Bandwidth
- 20 Subdomains
- 25 Domains
Customized Card
Joko Subianto
20 Jan 18
Best Design Resources This Week
Some quick example text to build on the card title and make up the bulk of the card's content.
Read More


Personal Information
First Name
{{firstName}}
Last Name
{{lastName}}
Phone
Social Information
Relationship Status
{{relStatus}}
No. of Children:
{{numKids}}
No. of Pets:
{{numPets}}
Occupation
{{occupation}}
Hours of Work per Week
{{workHours}}
Health Information
Please list you main health concerns:
{{healthConcerns}}
Other concerns and/or goals:
{{otherConcerns}}
At what point in your life did you feel best?
{{feelBest}}
Any serious illnesses/hospitalizations/injuries?
{{illnesses}}
How is/was the health of your mother?
{{healthMother}}
How is/was the health of your father?
{{healthFather}}
What is your ancestry?
{{ancestry}}
What blood type are you?
{{bloodType}}
How is your sleep?
{{sleep}}
How many hours do you sleep?
{{sleepHours}}
Do you wake up at night?
{{sleepWake}}
If so, why?
{{whyWake}}
Any pain, stiffness, or swelling?
{{pain}}
Constipation/Diarrhea/Gas?
{{gas}}
Allergies or sensitivities? Please explain:
{{allergies}}
Do you take any supplements or medications? Please list:
{{meds}}
Any healers, helpers, or therapies with which you are involved? Please list:
{{therapies}}
What role do sports and exercise play in your life?
{{exercise}}
Food Information
What do you typically eat?
Will your family and/or friends be supportive of your desire to make food and/or lifestyle changes?
{{supportive}}
Where do you get the rest from?
{{restFood}}
Do you crave sugar, coffee, cigarettes, or have any major addictions?
{{crave}}
The most important thing I should do to improve my health is:
{{improve}}
Additional Comments
Anything else you'd like to share?
{{comments}}


Fixed Nav Bar
Menu
Menu
Home
Projects
Contact
Gallery
Facebook
Explore the world
Wild Forest
Sunny Beach
Sity on Water
Mountain Clouds


Subscribe to new GitHub releases and tags by email or a URL request.
Please login or register first.
Required
Register
{{data.action === ACTION_REGISTER ? 'Register' : 'Login'}}


Before Change
// Convert A to dense tensor - needed for the mask to work
// TODO: replace this dense implementation of GraphAttention layer with a sparse implementation
if K.is_sparse(A):
A = tf.sparse_tensor_to_dense(A, validate_indices=False)
// For the GAT model to match that in the paper, we need to ensure that the graph has self-loops,
// since the neighbourhood of node i in eq. (4) includes node i itself.
// Adding self-loops to A via setting the diagonal elements of A to 1.0:
if kwargs.get("add_self_loops", False):
// get the number of nodes from inputs[1] directly
N = K.int_shape(inputs[1])[-1]
if N is not None:
// create self-loops
A = tf.linalg.set_diag(A, K.cast(np.ones((N,)), dtype="float"))
else:
raise ValueError(
"{}: need to know number of nodes to add self-loops; obtained None instead".format(
type(self).__name__
)
)
outputs = []
for head in range(self.attn_heads):
kernel = self.kernels[head] // W in the paper (F x F")
attention_kernel = self.attn_kernels[
After Change
dense += mask
// Apply softmax to get attention coefficients
dense = K.softmax(dense, axis=1) // (N x N), Eq. 3 of the paper
// Apply dropout to features and attention coefficients
dropout_feat = Dropout(self.in_dropout_rate)(features) // (N x F")


QUndoGroup Class Reference
Inherits QObject.
Constructor
- void QUndoGroup(QObject parent)
Constructor Properties
- prototype: The QUndoGroup prototype object
Prototype Object Properties
The QUndoGroup prototype object inherits properties from the QObject prototype object and also has the following properties.
- QUndoStack activeStack()
- void addStack(QUndoStack stack)
- bool canRedo()
- bool canUndo()
- QAction createRedoAction(QObject parent, String prefix)
- QAction createUndoAction(QObject parent, String prefix)
- bool isClean()
- String redoText()
- void removeStack(QUndoStack stack)
- List stacks()
- String undoText()
Instance Properties
QUndoGroup objects have no special properties beyond those inherited from the QUndoGroup prototype object.


About the TASK-TinyDB PackageThe task-tinydb package, included with the TinyOS 1.1 release, includes the "Tiny Application Sensor Kit" (TASK) and the TinyDB query processor.
|
| TASK |
|
TASK is a suite of Java utilities that allows you to manage a network of motes deployed for remote data collection. It includes:
For more information about using and installing TASK, see the TASK Web Site.
Once you have set up TASK on your computer, you can read more about
the Java utilities in the
the TASK documentation included with the release in the file
docs/TASKVisualizer.pdf.
|
| TinyDB |
| TinyDB 0.2 is also included in this package.
TinyDB provides the mote-side functionality for TASK -- it enables you
to collect data from a sensor network by specifying a simple query
which will periodically return a set of sensor readings or a statistical
summary (aggregate) of a set of readings.
TinyDB was originally included with TinyOS 1.0, but version 0.2 adds a number of new features. For more information about TinyDB, including a list of new features, see the TinyDB website or the TinyDB documentation included with this release in the docs/TinyDB.pdf file. For more information about TASK or TinyDB, please contact Wei Hong (wei.hong at intel.com) or Sam Madden (madden at cs.berkeley.edu). |


In this document
Introduction
This document lists the instruction formats used by the Dalvik Executable format and Dalvik bytecode. It is meant to be used in conjunction with the bytecode reference document.
Bitwise descriptions
The first column in the format table lists the bitwise layout of
the format. It consists of one or more space-separated "words" each of
which describes a 16-bit code unit. Each character in a word
represents four bits, read from high bits to low, with vertical bars
("|
") interspersed to aid in reading. Uppercase letters
in sequence from "A
" are used to indicate fields within
the format (which then get defined further by the syntax column). The term
"op
" is used to indicate the position of an eight-bit
opcode within the format. A slashed zero
("Ø
") is used to indicate that all bits must be
zero in the indicated position.
For the most part, lettering proceeds from earlier code units to later code units, and low-order to high-order within a code unit. However, there are a few exceptions to this general rule, which are done in order to make the naming of similar-meaning parts be the same across different instruction formats. These cases are noted explicitly in the format descriptions.
For example, the format "B|A|op CCCC
" indicates
that the format consists of two 16-bit code units. The first word
consists of the opcode in the low eight bits and a pair of four-bit
values in the high eight bits; and the second word consists of a single
16-bit value.
Format IDs
The second column in the format table indicates the short identifier for the format, which is used in other documents and in code to identify the format.
Most format IDs consist of three characters, two digits followed by a
letter. The first digit indicates the number of 16-bit code units in the
format. The second digit indicates the maximum number of registers that the
format contains (maximum, since some formats can accommodate a variable
number of registers), with the special designation "r
" indicating
that a range of registers is encoded. The final letter semi-mnemonically
indicates the type of any extra data encoded by the format. For example,
format "21t
" is of length two, contains one register reference,
and additionally contains a branch target.
Suggested static linking formats have an additional
"s
" suffix, making them four characters total. Similarly,
suggested "inline" linking formats have an additional "i
"
suffix. (In this context, inline linking is like static linking,
except with more direct ties into a machine's implementation.)
Finally, a couple oddball suggested formats (e.g.,
"20bc
") include two pieces of data which are both
represented in its format ID.
The full list of typecode letters are as follows. Note that some forms have different sizes, depending on the format:
| Mnemonic | Bit Sizes | Meaning |
|---|---|---|
| b | 8 | immediate signed byte |
| c | 16, 32 | constant pool index |
| f | 16 | interface constants (only used in statically linked formats) |
| h | 16 | immediate signed hat (high-order bits of a 32- or 64-bit
value; low-order bits are all 0 )
|
| i | 32 | immediate signed int, or 32-bit float |
| l | 64 | immediate signed long, or 64-bit double |
| m | 16 | method constants (only used in statically linked formats) |
| n | 4 | immediate signed nibble |
| s | 16 | immediate signed short |
| t | 8, 16, 32 | branch target |
| x | 0 | no additional data |
Syntax
The third column of the format table indicates the human-oriented syntax for instructions which use the indicated format. Each instruction starts with the named opcode and is optionally followed by one or more arguments, themselves separated with commas.
Wherever an argument refers to a field from the first column, the
letter for that field is indicated in the syntax, repeated once for
each four bits of the field. For example, an eight-bit field labeled
"BB
" in the first column would also be labeled
"BB
" in the syntax column.
Arguments which name a register have the form "vX
".
The prefix "v
" was chosen instead of the more common
"r
" exactly to avoid conflicting with (non-virtual) architectures
on which the Dalvik Executable format might be implemented which themselves
use the prefix "r
" for their registers. (That is, this
decision makes it possible to talk about both virtual and real registers
together without the need for circumlocution.)
Arguments which indicate a literal value have the form
"#+X
". Some formats indicate literals that only
have non-zero bits in their high-order bits; for these, the zeroes
are represented explicitly in the syntax, even though they do not
appear in the bitwise representation.
Arguments which indicate a relative instruction address offset have the
form "+X
".
Arguments which indicate a literal constant pool index have the form
"kind@X
", where "kind
"
indicates which constant pool is being referred to. Each opcode that
uses such a format explicitly allows only one kind of constant; see
the opcode reference to figure out the correspondence. The four
kinds of constant pool are "string
" (string pool index),
"type
" (type pool index), "field
" (field
pool index), and "meth
" (method pool index).
Similar to the representation of constant pool indices, there are
also suggested (optional) forms that indicate prelinked offsets or
indices. There are two types of suggested prelinked value: vtable offsets
(indicated as "vtaboff
") and field offsets (indicated as
"fieldoff
").
In the cases where a format value isn't explicitly part of the syntax
but instead picks a variant, each variant is listed with the prefix
"[X=N]
" (e.g., "[A=2]
") to indicate
the correspondence.
The formats
| Format | ID | Syntax | Notable Opcodes Covered |
|---|---|---|---|
| N/A | 00x | N/A |
pseudo-format used for unused opcodes; suggested for use as the nominal format for a breakpoint opcode |
| ØØ|op | 10x | op |
|
| B|A|op | 12x | op vA, vB |
|
| 11n | op vA, #+B |
||
| AA|op | 11x | op vAA |
|
| 10t | op +AA |
goto | |
| ØØ|op AAAA | 20t | op +AAAA |
goto/16 |
| AA|op BBBB | 20bc | op AA, kind@BBBB |
suggested format for statically determined verification errors; A is the type of error and B is an index into a type-appropriate table (e.g. method references for a no-such-method error) |
| AA|op BBBB | 22x | op vAA, vBBBB |
|
| 21t | op vAA, +BBBB |
||
| 21s | op vAA, #+BBBB |
||
| 21h | op vAA, #+BBBB0000op vAA, #+BBBB000000000000
|
||
| 21c | op vAA, type@BBBBop vAA, field@BBBBop vAA, string@BBBB
|
check-cast const-class const-string |
|
| AA|op CC|BB | 23x | op vAA, vBB, vCC |
|
| 22b | op vAA, vBB, #+CC |
||
| B|A|op CCCC | 22t | op vA, vB, +CCCC |
|
| 22s | op vA, vB, #+CCCC |
||
| 22c | op vA, vB, type@CCCCop vA, vB, field@CCCC
|
instance-of | |
| 22cs | op vA, vB, fieldoff@CCCC |
suggested format for statically linked field access instructions of format 22c | |
| ØØ|op AAAAlo AAAAhi | 30t | op +AAAAAAAA |
goto/32 |
| ØØ|op AAAA BBBB | 32x | op vAAAA, vBBBB |
|
| AA|op BBBBlo BBBBhi | 31i | op vAA, #+BBBBBBBB |
|
| 31t | op vAA, +BBBBBBBB |
||
| 31c | op vAA, string@BBBBBBBB |
const-string/jumbo | |
| A|G|op BBBB F|E|D|C | 35c | [A=5 ] op {vC, vD, vE, vF, vG},
meth@BBBB[ A=5 ] op {vC, vD, vE, vF, vG},
type@BBBB[ A=4 ] op {vC, vD, vE, vF},
kind @BBBB[ A=3 ] op {vC, vD, vE},
kind @BBBB[ A=2 ] op {vC, vD},
kind @BBBB[ A=1 ] op {vC},
kind @BBBB[ A=0 ] op {},
kind @BBBBThe unusual choice in lettering here reflects a desire to make the count and the reference index have the same label as in format 3rc. |
|
| 35ms | [A=5 ] op {vC, vD, vE, vF, vG},
vtaboff@BBBB[ A=4 ] op {vC, vD, vE, vF},
vtaboff@BBBB[ A=3 ] op {vC, vD, vE},
vtaboff@BBBB[ A=2 ] op {vC, vD},
vtaboff@BBBB[ A=1 ] op {vC},
vtaboff@BBBBThe unusual choice in lettering here reflects a desire to make the count and the reference index have the same label as in format 3rms. |
suggested format for statically linked invoke-virtual
and invoke-super instructions of format 35c
|
|
| 35mi | [A=5 ] op {vC, vD, vE, vF, vG},
inline@BBBB[ A=4 ] op {vC, vD, vE, vF},
inline@BBBB[ A=3 ] op {vC, vD, vE},
inline@BBBB[ A=2 ] op {vC, vD},
inline@BBBB[ A=1 ] op {vC},
inline@BBBBThe unusual choice in lettering here reflects a desire to make the count and the reference index have the same label as in format 3rmi. |
suggested format for inline linked invoke-static
and invoke-virtual instructions of format 35c
|
|
| AA|op BBBB CCCC | 3rc | op {vCCCC .. vNNNN}, meth@BBBBop {vCCCC .. vNNNN}, type@BBBBwhere |
|
| 3rms | op {vCCCC .. vNNNN}, vtaboff@BBBBwhere |
suggested format for statically linked invoke-virtual
and invoke-super instructions of format 3rc
|
|
| 3rmi | op {vCCCC .. vNNNN}, inline@BBBBwhere |
suggested format for inline linked invoke-static
and invoke-virtual instructions of format 3rc
|
|
| AA|op BBBBlo BBBB BBBB BBBBhi | 51l | op vAA, #+BBBBBBBBBBBBBBBB |
const-wide |


kindly visit our customer service at<EMAIL_ADDRESS>OR
vist our customer line @<PHONE_NUMBER>4
THANK YOU AS YOU TRAVEL WITH OUR AIRLINE


Located at the far end of the Stonski Kanal, at the southern end of the Peljesac peninsula and about 25NM NW of Dubrovnik, this charming medieval town is worth the detour to visit it. Very un-touristy with some striking architecture.
Position 42°50'N, 17°42.1'E.
Information received in 2010 was that anchoring is permitted here, however, it is likely the harbour master will try to stop you doing so as the holding is very poor and constitutes a risk. Cruisers who have succesfully anchored here have not been charged as the harbour master will take no responsibility if there are problems.
In 2011, cruisers reported that the Port Captain & police went so far as not to permit anchoring and were only allowing yachts to stay on the dock for a fee, or leave.
Excellent shelter.
The Port Captain's office is in the centre of the town. He speaks German as well as Croatian.
Last updated August 2011.


I'm writing about two of my Zolpidem (Ambien) experiences mostly to get them off my chest, partly to show how dangerous this drug can be.
In February of 2011 I was first prescribed Ambien (10mg) for insomnia, as my psychiatrist had tried a few other meds and nothing seemed to be working. It worked wonderfully and put me right to bed. A few weeks later, a male friend was spending the night at my house because he didn't want to drive back to the university's campus. We had previously expressed sexual interest in one another but I knew nothing would happen because I had a boyfriend. When it was just about time to go to bed, I announced I was going to try snorting my Ambien to see what would happen. I had read that sometimes snorting Ambien could cause hallucinations, and at this point I had never taken acid or shrooms and wanted to experience hallucinating for the first time.
Everything past this point is blurry. I remember crushing it and snorting it, and repeating this somewhere between two and five times, but the factual events are questionable. I remember my friend swallowed at least one, and I think I convinced him to snort one. Either way, we were both completely out of it. He told me later I had been talking to a pair of my pants on the floor for at least ten minutes because I thought they were fish. I had also been talking about seeing an army of men in the room that had come to pleasure me, an elf, and an airplane.
I remember everything was moving and breathing and the Ambien had made me extremely aroused. My male friend, P, and I ended up having sex not just once or twice but many times. I remember we didn't use a condom except for one of the times and I'm pretty sure he ended up slipping it off. I don't remember much else, but we both woke up over fourteen hours later with no pants or underwear on. I don't know if I was so torn up about the fact I had cheated on my boyfriend or if the Ambien caused me to be emotional, but I sobbed for most of the morning and ended up breaking my mirror accidentally. Luckily I didn't get pregnant from having un-protected sex since I'm on the pill, but everyone having sex on Ambien should be careful to make sure they're safe.
My next experience happened only last night, June of 2011. I swallowed my 10mg pill as usual, but apparently didn't go to sleep. I ended up snorting two or three more Ambien and wandering outside to smoke a cigarette. I found one of the razors I use to chop up pills when I snort them (which had been hidden for months until then), and took it outside with me. I remember texting my friend (the same from the above story) and telling him that pain felt good. As I sat on the deck, which can easily be seen by several backyards and two streets in my subdivision, I cut myself several times on my thigh and ankle. I realized I probably shouldn't be doing this outside and sat in my living room on the floor and cut myself shallowly a few more times.
During this whole experience I vaguely remember talking to myself, but someone else was responding. It was as if the Ambien had brought out a second personality. When I responded to myself I even used a different voice.  I don't remember anything else except running to the closet to get the first aid kit and trying to flush the contents of the bathroom garbage can down the toilet (which had several empty toilet paper rolls in it and clogged it).
 I went to look in the mirror and discovered that after I had cut the back of my hand I had used the blood like paint and had finger-painted blood all over my body in different swirls and designs. I looked through my text history on my phone with my friend and had really scared him. I had asked him to wake up and come out and play and asked him what his deepest fantasies were and that there was a lot of blood. He stopped responding quickly, saying he was going to bed and he didn't want to hear anymore because it didn't sound like me.
I've also never been diagnosed with having multiple personalities, nor have I ever felt like I've had them when not on Ambien. I have no idea what caused such a horrible reaction this morning, but I've decided to give my Ambien to my friend for her to keep and only give me one pill a night so this doesn't happen again. I'm fine now and didn't lose as much blood as I thought.
I've had a few other weird experiences since being described it, but nothing like the above. I've texted people very personal things that I havent even told my boyfriend. That's why me and my friends call it the truth serum, it brings things out of you you'd never dream of telling otherwise. I've said embarrassing, mean, and just downright strange things while on it before. So just be careful.
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.


rvm FAQ & Notes
This page is simply documenting common concepts and questions that have come up on irc.
General
- rvm is intended to be run as an individual user (not as root, yet)
- rvm must be included at the bottom of the profile files. Otherwise your settings will clobber it's (example: PATH)
- In order to set a ruby version as default when you open new shells, pass --default when doing the 'rvm use' command.
- Currently spaces in paths is not supported. Patches welcome :)
Defaults
- The last ruby version 'used' becomes the default.
- The default implementation (interpreter) is 'ruby'
- The default version of ruby is '1.8.6'
Gems
- Ruby Gems for 1.9.*, jruby, ree are all separate, while with 1.8.X they are shared.
Installation
- *Everything* is installed into ~/.rvm. To remove rvm from your system simply remove ~.rvm.
-
The gem is only used for distribution, you can just as easily clone the github repo and run bash/rvm-install or bash/rvm-update.
After installation the Gem is no longer necessary and can be safely removed.
This also means that you can clone the repository locally and symlink ~/.rvm/bin/rvm to the cloned project bash/rvm file.
Mac OS X
- If you have an error when compiling pertaining to readline, you may need to attempt installing with the following configure option:
rvm install 1.9 --configure "--enable-shared --with-readline-dir=/usr/local"
Note that this error seems to occur when having a macports installed readline along your path.
Netbeans
Thanks to our friendly mr-interweb on IRC:
13:46 mr-interweb: Netbeans was detecting the wrong gem root
13:48 mr-interweb: Just a FYI in case other people have problems with Netbeans, Netbeans does not allow you to type in a path. You must browse to the path, but it will not show you hidden folders. So, you must create symbolic links like "ln -s ~/.gem ~/gem"


The Kano-Konnect project runs in production on an EC2 micro instance in the eu-west-1 Availability zone. At present, the EC2 instance is named "kano-konnect-webserver".
The EC2 instance is part of a security group that exposes port 80 to the open internet. The deployment uses nginx as a reverse proxy to listen on port 80 and route requests from the open internet into a uWSGI webserver. The nginx reverse proxy also directly serves static files (images, CSS, etc.) out of a directory inside the main project repo.
A uWSGI server runs the Django project code. We also run Celery workers to process asynchronous tasks (with tasks and results passed back and forth via a RabbitMQ server.)
<IN THE FUTURE> Finally, an instance of JenkinsCI is running on the server. Jenkins listens to a Github webhook, and when a new build is pushed to the master repo, Jenkin runs the project test suite. If the test suite passes, Jenkins deploys the new commit to the live production server. </FUTURE>
All project/Python code lives in the directory:
/srv/kano_konnect
This directory contains three subdirectories:
releases -- where the actual Python code lives. The live code is current inside releases/kano_konnect. But more directories can be created here to allow testing of new major releases while still enabling rapid rollback.
shared -- where any files that will be common to all releases should live. Currently, that mainly means the project virtualenv which is located at /srv/kano_konnect/shared/env
current -- a symlink to the current, production code.
Static files are served directly off the server from a directory via nginx (see below.)
For ease of use, I track all the statics in Github and simply push/pull them to the server. So the static directory is inside the project repo (currently at /srv/kano_konnect/current/kano_konnect/assets/).
This may not be best practice overall (git is not ideal for non-text files like images) but in my experience it works fine up to at least ~100mb of static assets. And it makes the deployment process much simpler. Just make sure to run:
python manage.py collectstatic
Before pushing commits to Github.
Updating the virtualenv is not yet automated. So if you add new packages to the project, you must install them manually. Do do this, run::
source /srv/kano_konnect/shared/env/bin/activate pip install *your package or requirements file*
The nginx server is configured by two key config files.
The actual nginx server config is at::
/etc/nginx/nginx.conf
And the kano-konnect site specific configuration is at::
/etc/nginx/sites-available/kano_konnect.conf
(The site specific file is symlinked to /etc/nginx/sites-enabled/kano_konnect.conf to make nginx actually serve the site.)
location /static/ must point to the directory where static files live on the server (currently the "assets" directory).
Before pushing a commit to Github, you should collect static files (which will put everything into the assets directory.) Then when you pull on the server, the static assets will be pulled from Github and put in the right place.
location / must point to the socket or port that uUWGI is listening on.
Currently I have uWSGI running on port 9090. It may be somewhat faster to run on a unix socket but for a low traffic site the difference is likely to be immaterial. I'll leave it as it is for now because it currently works fine.
This can easily be changed if you have a preferred way to run uWSGI.
The project repo is owned by the "nobody user" so nginx must run as "nobody". This is accomplished by adding the line::
user nobody nogroup;
To nginx.conf
The uWSGI process (and also Celery -- see below) is managed by supervisor, a python process controller that gives a convenient way to keep the server process alive by restarting it if it crashes for some reason.
Supervisor also gives a way to start/restart the uWSGI process from the commandline via the supervisorctl command, e.g.:
sudo supervisorctl restart kano_konnect-uwsgi
Supervisor needs to be told how to start the uWSGI and celery processes, and those instructions live at::
/etc/supervisor.d/kano_konnect-uwsgi.conf
and:
/etc/supervisor.d/kano_konnect-celeryd.conf
The key line in these files is::
command=/srv/kano_konnect/shared/env/bin/uwsgi --http :9090 --wsgi-file kano_konnect/kano_konnect/wsgi.py
This line must specify exactly how the process would be started from the commandline. If you wish to change uWSGI to use a Unix socket (or an .ini file), you'll need to edit this line.
By default, supervisor routes all log output to the directory:
/var/log/supervisor/
And creates one log file for the stdout and stderr of each managed process.
If you edit supervisor config files, you must "reread" them with the command::
sudo supervisorctl reread
And then reload supervisor with::
sudo supervisorctl reload
You can also restart supervised processes with:
sudo supervisorctl restart [PROCESS_NAME]
The uWSGI configuration is currently very "off the shelf". No .ini file is being used. If you wish to supply a .ini file, write one and edit the supervisor config file for uWSGi to include it via the command line command.
Celery is also managed by supervisor. The integration into Django is specified in the file:
/srv/kano_konnect/current/kano_konnect/kano_konnect/celery.py
Tasks should be specified inside of the file::
/srv/kano_konnect/current/kano_konnect/kano_konnect/tasks.py
On the server, Celery requires rabbitmq to be running. Rabbit should start when the server starts and run automatically, but if it ever crashes it can be restarted with::
sudo service rabbitmq-server restart
Postgres is running as a service on the webserver. The "cluster" contains a database called "kano_konnect". You can interact via psql by doing:
sudo -u postgres psql
The CI integration is currently broken. So code must be updated manually.
To update the repo, simply ssh into the server via something like:
ssh -i ~/.ec2/kano-konnect-key.pem<EMAIL_ADDRESS>Then do:
cd /srv/kano_konnect/current sudo -u nobody git pull source /srv/kano_konnect/shared/env/bin/activate cd kano_konnect/ # sync the database sudo -u nobody python manage.py syncdb --settings=kano_konnect.settings.production


Robby Ray
Portfolio
Resume
Contact
GitHub Portfolio
Work Day Planner
A simple work day calendar to plan your busy schedule and stay organized
GitHub
Live Site
Weather Dashboard
Plan your upcoming trip with real-time weather information based on your preferred U.S. City
GitHub
Live Site
Project One: Get in my Plants!
Collaborative application that allows the user to search for their favorite plant, and listen to a plant-friendly tune every time you search
GitHub
Live Site
Project Two: Santa's Helper
Collaborative application that allows the user to create personalized shopping lists for the holiday season, along with referencing gift prices on Etsy via an external API
GitHub
Live Site