Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions.
Please consider following this project’s author, Jon Schlinkert, and consider starring the project to show your :heart: and support.
Install with npm:
What does this do?
This libary generates the source
string to be passed to new RegExp()
for matching a range of numbers.
Example
A string is returned so that you can do whatever you need with it before passing it to new RegExp()
(like adding ^
or $
boundaries, defining flags, or combining it another string).
Why use this library?
Creating regular expressions for matching numbers gets deceptively complicated pretty fast.
For example, let’s say you need a validation regex for matching part of a user-id, postal code, social security number, tax id, etc:
1
=> /1/
(easy enough)1
through 5
=> /[1-5]/
(not bad…)1
or 5
=> /(1|5)/
(still easy…)1
through 50
=> /([1-9]|[1-4][0-9]|50)/
(uh-oh…)1
through 55
=> /([1-9]|[1-4][0-9]|5[0-5])/
(no prob, I can do this…)1
through 555
=> /([1-9]|[1-9][0-9]|[1-4][0-9]{2}|5[0-4][0-9]|55[0-5])/
(maybe not…)0001
through 5555
=> /(0{3}[1-9]|0{2}[1-9][0-9]|0[1-9][0-9]{2}|[1-4][0-9]{3}|5[0-4][0-9]{2}|55[0-4][0-9]|555[0-5])/
(okay, I get the point!)The numbers are contrived, but they’re also really basic. In the real world you might need to generate a regex on-the-fly for validation.
Learn more
If you’re interested in learning more about character classes and other regex features, I personally have always found regular-expressions.info to be pretty useful.
As of April 07, 2019, this library runs >1m test assertions against generated regex-ranges to provide brute-force verification that results are correct.
Tests run in ~280ms on my MacBook Pro, 2.5 GHz Intel Core i7.
Generated regular expressions are optimized:
?
conditionals when number(s) or range(s) can be positive or negativeAdd this library to your javascript application with the following line of code
The main export is a function that takes two integers: the min
value and max
value (formatted as strings or numbers).
const source = toRegexRange('15', '95');
//=> 1[5-9]|[2-8][0-9]|9[0-5]
const regex = new RegExp(`^${source}$`);
console.log(regex.test('14')); //=> false
console.log(regex.test('50')); //=> true
console.log(regex.test('94')); //=> true
console.log(regex.test('96')); //=> false
Type: boolean
Deafault: undefined
Wrap the returned value in parentheses when there is more than one regex condition. Useful when you’re dynamically generating ranges.
console.log(toRegexRange('-10', '10'));
//=> -[1-9]|-?10|[0-9]
console.log(toRegexRange('-10', '10', { capture: true }));
//=> (-[1-9]|-?10|[0-9])
Type: boolean
Deafault: undefined
Use the regex shorthand for [0-9]
:
console.log(toRegexRange('0', '999999'));
//=> [0-9]|[1-9][0-9]{1,5}
console.log(toRegexRange('0', '999999', { shorthand: true }));
//=> \d|[1-9]\d{1,5}
Type: boolean
Default: true
This option relaxes matching for leading zeros when when ranges are zero-padded.
const source = toRegexRange('-0010', '0010');
const regex = new RegExp(`^${source}$`);
console.log(regex.test('-10')); //=> true
console.log(regex.test('-010')); //=> true
console.log(regex.test('-0010')); //=> true
console.log(regex.test('10')); //=> true
console.log(regex.test('010')); //=> true
console.log(regex.test('0010')); //=> true
When relaxZeros
is false, matching is strict:
const source = toRegexRange('-0010', '0010', { relaxZeros: false });
const regex = new RegExp(`^${source}$`);
console.log(regex.test('-10')); //=> false
console.log(regex.test('-010')); //=> false
console.log(regex.test('-0010')); //=> true
console.log(regex.test('10')); //=> false
console.log(regex.test('010')); //=> false
console.log(regex.test('0010')); //=> true
| Range | Result | Compile time |
|---|---|---|
toRegexRange(-10, 10) |
-[1-9]\|-?10\|[0-9] |
132μs |
toRegexRange(-100, -10) |
-1[0-9]\|-[2-9][0-9]\|-100 |
50μs |
toRegexRange(-100, 100) |
-[1-9]\|-?[1-9][0-9]\|-?100\|[0-9] |
42μs |
toRegexRange(001, 100) |
0{0,2}[1-9]\|0?[1-9][0-9]\|100 |
109μs |
toRegexRange(001, 555) |
0{0,2}[1-9]\|0?[1-9][0-9]\|[1-4][0-9]{2}\|5[0-4][0-9]\|55[0-5] |
51μs |
toRegexRange(0010, 1000) |
0{0,2}1[0-9]\|0{0,2}[2-9][0-9]\|0?[1-9][0-9]{2}\|1000 |
31μs |
toRegexRange(1, 50) |
[1-9]\|[1-4][0-9]\|50 |
24μs |
toRegexRange(1, 55) |
[1-9]\|[1-4][0-9]\|5[0-5] |
23μs |
toRegexRange(1, 555) |
[1-9]\|[1-9][0-9]\|[1-4][0-9]{2}\|5[0-4][0-9]\|55[0-5] |
30μs |
toRegexRange(1, 5555) |
[1-9]\|[1-9][0-9]{1,2}\|[1-4][0-9]{3}\|5[0-4][0-9]{2}\|55[0-4][0-9]\|555[0-5] |
43μs |
toRegexRange(111, 555) |
11[1-9]\|1[2-9][0-9]\|[2-4][0-9]{2}\|5[0-4][0-9]\|55[0-5] |
38μs |
toRegexRange(29, 51) |
29\|[34][0-9]\|5[01] |
24μs |
toRegexRange(31, 877) |
3[1-9]\|[4-9][0-9]\|[1-7][0-9]{2}\|8[0-6][0-9]\|87[0-7] |
32μs |
toRegexRange(5, 5) |
5 |
8μs |
toRegexRange(5, 6) |
5\|6 |
11μs |
toRegexRange(1, 2) |
1\|2 |
6μs |
toRegexRange(1, 5) |
[1-5] |
15μs |
toRegexRange(1, 10) |
[1-9]\|10 |
22μs |
toRegexRange(1, 100) |
[1-9]\|[1-9][0-9]\|100 |
25μs |
toRegexRange(1, 1000) |
[1-9]\|[1-9][0-9]{1,2}\|1000 |
31μs |
toRegexRange(1, 10000) |
[1-9]\|[1-9][0-9]{1,3}\|10000 |
34μs |
toRegexRange(1, 100000) |
[1-9]\|[1-9][0-9]{1,4}\|100000 |
36μs |
toRegexRange(1, 1000000) |
[1-9]\|[1-9][0-9]{1,5}\|1000000 |
42μs |
toRegexRange(1, 10000000) |
[1-9]\|[1-9][0-9]{1,6}\|10000000 |
42μs |
Order of arguments
When the min
is larger than the max
, values will be flipped to create a valid range:
Is effectively flipped to:
Steps / increments
This library does not support steps (increments). A pr to add support would be welcome.
New features
Adds support for zero-padding!
Optimizations
Repeating ranges are now grouped using quantifiers. rocessing time is roughly the same, but the generated regex is much smaller, which should result in faster matching.
Inspired by the python library range-regex.
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Running Tests
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
Building docs
(This project’s readme.md is generated by verb, please don’t edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
You might also be interested in these projects:
step
to… more | homepage| Commits | Contributor |
|---|---|
| 63 | jonschlinkert |
| 3 | doowb |
| 2 | realityking |
Jon Schlinkert
Please consider supporting me on Patreon, or start your own Patreon page!
Copyright © 2019, Jon Schlinkert. Released under the MIT License.
This file was generated by verb-generate-readme, v0.8.0, on April 07, 2019.


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/two.20basic.20recursor.20questions.html ---
I know this is probably dependent type theory 101, but I've realised that as a mathematician I am only really interested in structures, and hence don't have a good understanding of recursors [my excitement in discovering that I could do induction on the reals was rather punctured when I realised the recursor was "if it's true for all equivalence classes of Cauchy sequences, then it's true for all reals"].
Q1) The recursor for eq
is basically the assertion that if x = y
then there's a map C x -> C y
where C is Sort-valued (indeed I've been telling the 1st years that transitivity of = is proved by induction on =). But I can't convince myself that this should be the recursor, which just means that I don't understand the precise algorithm which goes from the definition of the inductive type to the definition of the recursor. Where do I learn more about that? Is it easy to see if you think about things the right way?
Q2) =
is a prop and or
is as well. But or
only eliminates to Prop, and =
seems to eliminate to Sort. What is the difference? This might just be Q1 again.
Recursors for propositions make more sense if you look at the drec
recursor.
For Q2 the difference is that or
has two constructors and eq
has one.
Also, every argument to the constructor is either a proposition or mentioned in the Type of the output.
Mario's paper has the generic algorithm
https://github.com/digama0/lean-type-theory
I find it quite hard to read personally.
For eq
, the key is to notice that eq
is not the inductive type, eq a : A -> Prop
is. It has one constructor, refl : (eq a) a
. So suppose you have a dependent family C : Pi (b : A), eq a b -> Prop
, and you want to prove it holds true "everywhere", that is, \all b h, C b h
. Since h : eq a b
, and there is "only one" equality in the inductive family, namely h = (refl : eq a a)
, then it suffices to prove C a (refl a)
. And that's the recursor: C a (refl a) -> \all b (h : a = b), C b h
. If you ignore the last argument, it says C a -> a = b -> C b
.
Sorry about the readability; chapter 2 was intended to be terse so that it can be used as a reference. It's not the best source for motivation
Thanks for these comments. I will go away and think more.
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


The Line Grinder software converts the Gerber plots of PCB circuits into GCode which can then be used to create isolation milled circuit boards. The Eagle software (freeware for smaller PCB boards) is one product which can be used to create the PCB designs suitable for isolation milling. There are a number of things you need to know in order to configure Eagle so that it will save Gerber plot files in a format which the Line Grinder can read.
The following is a step-by-step tutorial using the demo2_inch.brd Eagle PCB design sample which is installed with the Line Grinder software in the Examples - Eagle sub folder. Click on any of the images to make them larger.
The image below shows the demo2_inch.brd PCB design sample open in the Eagle software.
One of the hardest problems to solve when creating isolation milled circuits is how to align the top and bottom copper layers. Line Grinder resolves this issue by requiring pads of a specific size called Reference Pin pads to be added to the PCB. You determine the size you use and tell the Line Grinder software (in the Isolation Cut File Managers) what that size is. Often the Reference Pin Pads are co-incident with the mounting holes of the PCB. If you do not want these pads on your board (as in the example below) - no problem. Just put them outside the border.
The following steps will now place the first Reference Pin pad. Since we do not want to have any mounting holes drilled on this board we will place the Reference Pin pads outside the PCB border.
The image below shows the bottom left Reference Pin pad once it has been sized and positioned. Note that it is centered over a grid dot. This will make it easy to place the other Reference Pin Pads an identical distance from the border.
The main thing about the Reference Pin pads is that they must be of a known unique size, they must be in a rectangular formation and they must be the same distance from the board edges. They can be inside or outside the board - but it is critical that they are equidistant from the edges. You must have at least two Reference Pin Pads. If the IsoFlipMode in your Isolation Cut File Manager is Flip_X then the Reference Pin pads must be on the same line parallel to the X axis. Similarly if the IsoFlipMode in your Isolation Cut File Manager is Flip_Y then the Reference Pin pads must be on the same line parallel to the Y axis. In general it is easier to just put four Reference Pin Pads on the PCB - each equidistant from a border corner.
Note the easy way to create the rest of the Reference Pin pads is just to copy the first pad placed in the step above and then paste it into the design where needed. Once dropped in place, you can easily drag the pad about to get the position right.
The image below shows the PCB with four Reference Pin pads placed. Click on the image to enlarge it and note that the pads are equidistant from the border edges and are in a strict rectangular formation.
Now that the Reference Pin pads have been placed on the PCB, it is time to save the design as Gerber and Excellon files. These files are what the Line Grinder software will read in order to produce the Isolation Milling GCode (and other useful GCode as well). Before we do that we have to adjust a few settings in the section of the eagle.def file which controls the codes emitted to the Gerber plot files. If we do not do this Eagle will include lines of code in the Gerber output which the Line Grinder software will not be able to process. The steps below describe the proceedure.
The image below shows the eagle.def file after the adjustments have been made. Note carefully the placement of the semi-colons - the appropriate areas have been highlighted in red.
Now that eagle.def file has been adjusted, it is time to save the design as Gerber and Excellon files. These files are what the Line Grinder software will read in order to produce the Isolation Milling GCode (and other useful GCode as well). Click on the File menu item at the top of the screen and then choose the CAM Processor ... sub item. Set the Device option to GERBER_RS274X. This will invoke the output using the settings adjusted in the eagle.def file in the step above. The Gerber Output Form is seen in the image below.
Eagle does not seem to have a method of automating the output of the Gerber files or saving the configurations. This means that each plot must be saved individually and the appropriate file name specified for it when the output is saved. The discusson below illustrates this process for the traces and pads associated with the Bottom Copper layer.
The image below show the Eagle CAM Proceesor output form just before the bottom copper Gerber code is saved..
As mentioned above, the other plots (top copper, board outline) will need to be output. This can be done using the methodology described in step 6. Appropriate values for these layers are:
At this point, the files are ready to be read by the Line Grinder software. Once the Line Grinder software is started you will need to create some File Managers - and configure them to settings suitable for your purposes. There is a button on the Settings Tab entitled Add Managers for Eagle that can be used to create a useful set of File Managers to get started with. You will need to adjust the settings as appropriate.
Note that the default setting for the Reference Pin pads is 0.125 inch and the above discussion sets the pins to a value of 0.100 inch. Using the default settings, the Line Grinder software will not be able to find the Reference Pins, and will return an error message when the file is opened. Change the ReferencePinPadDiameter setting in the IsolationCut File Managers for the Top and Bottom Copper layers to a value of 0.100 to fix this problem.
The image below shows the demo2 Top.gbr file after conversion to Isolation GCode in the Line Grinder software.


My Cat Chili
Say: "Hi" to Chili!
A female tortoise-shell cat is looking at the camera
Fun facts about Chili
She is 15 years old!
She gave birth to 5 kittens when she was very young!
She has no teeth!
She loves to sit on your lap!
She is friends with all the neighbours cats!
for more information on Cats click:
Wikipedia entry on Cats!


| 1 | /* | |
| 2 | * Copyright 2001-2005 Stephen Colebourne | |
| 3 | * | |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | * you may not use this file except in compliance with the License. | |
| 6 | * You may obtain a copy of the License at | |
| 7 | * | |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
| 9 | * | |
| 10 | * Unless required by applicable law or agreed to in writing, software | |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 13 | * See the License for the specific language governing permissions and | |
| 14 | * limitations under the License. | |
| 15 | */ | |
| 16 | package org.joda.time.field; | |
| 17 | ||
| 18 | import org.joda.time.DateTimeField; | |
| 19 | ||
| 20 | /** | |
| 21 | * Converts a lenient DateTimeField into a strict one. By being strict, the set | |
| 22 | * throws an IllegalArgumentException if the value is out of bounds. | |
| 23 | * <p> | |
| 24 | * StrictDateTimeField is thread-safe and immutable. | |
| 25 | * | |
| 26 | * @author Brian S O'Neill | |
| 27 | * @see org.joda.time.chrono.StrictChronology | |
| 28 | * @see LenientDateTimeField | |
| 29 | * @since 1.0 | |
| 30 | */ | |
| 31 | public class StrictDateTimeField extends DelegatedDateTimeField { | |
| 32 | ||
| 33 | private static final long serialVersionUID =<PHONE_NUMBER>207950910L; | |
| 34 | ||
| 35 | /** | |
| 36 | * Returns a strict version of the given field. If it is already strict, | |
| 37 | * then it is returned as-is. Otherwise, a new StrictDateTimeField is | |
| 38 | * returned. | |
| 39 | */ | |
| 40 | public static DateTimeField getInstance(DateTimeField field) { | |
| 41 |
1
1. getInstance : negated conditional → KILLED |
if (field == null) { |
| 42 |
1
1. getInstance : mutated return of Object value for org/joda/time/field/StrictDateTimeField::getInstance to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return null; |
| 43 | } | |
| 44 |
1
1. getInstance : negated conditional → KILLED |
if (field instanceof LenientDateTimeField) { |
| 45 | field = ((LenientDateTimeField)field).getWrappedField(); | |
| 46 | } | |
| 47 |
1
1. getInstance : negated conditional → SURVIVED |
if (!field.isLenient()) { |
| 48 |
1
1. getInstance : mutated return of Object value for org/joda/time/field/StrictDateTimeField::getInstance to ( if (x != null) null else throw new RuntimeException ) → KILLED |
return field; |
| 49 | } | |
| 50 |
1
1. getInstance : mutated return of Object value for org/joda/time/field/StrictDateTimeField::getInstance to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return new StrictDateTimeField(field); |
| 51 | } | |
| 52 | ||
| 53 | protected StrictDateTimeField(DateTimeField field) { | |
| 54 | super(field); | |
| 55 | } | |
| 56 | ||
| 57 | public final boolean isLenient() { | |
| 58 |
1
1. isLenient : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return false; |
| 59 | } | |
| 60 | ||
| 61 | /** | |
| 62 | * Does a bounds check before setting the value. | |
| 63 | * | |
| 64 | * @throws IllegalArgumentException if the value is invalid | |
| 65 | */ | |
| 66 | public long set(long instant, int value) { | |
| 67 |
1
1. set : removed call to org/joda/time/field/FieldUtils::verifyValueBounds → NO_COVERAGE |
FieldUtils.verifyValueBounds |
| 68 | (this, value, getMinimumValue(instant), getMaximumValue(instant)); | |
| 69 |
1
1. set : replaced return of long value with value + 1 for org/joda/time/field/StrictDateTimeField::set → NO_COVERAGE |
return super.set(instant, value); |
| 70 | } | |
| 71 | } | |
Mutations | ||
| 41 |
1.1 |
|
| 42 |
1.1 |
|
| 44 |
1.1 |
|
| 47 |
1.1 |
|
| 48 |
1.1 |
|
| 50 |
1.1 |
|
| 58 |
1.1 |
|
| 67 |
1.1 |
|
| 69 |
1.1 |


Orlondo Steinuaer of the Hamilton Tiger-Cats named CFL's coach of the year
CALGARY - Orlondo Steinuaer of the Hamilton Tiger-Cats is the CFL's coach of the year.
Steinauer received the honour Thursday night at the CFL's awards banquet in voting conducted by the Football Reporters of Canada and nine league head coaches.
Steinauer, 46, of Seattle, enjoyed a stellar first season with Hamilton, leading the Ticats to a CFL-best 15-3 record. Steinauer tied the CFL record for regular-season wins by a first-year head coach in guiding the Ticats to their best regular season in franchise history.
Hamilton was a perfect 9-0 at home this year and led the league in scoring (551) while allowing the fewest points (344).
Saskatchewan's Craig Dickenson was the finalist. The first-year head coach led the Riders (13-5) to first in the West Division for the first time since '09.


About
Trevor Sampson
Thanh Dip
Tony Rodriguez
Pyae Naing
Shivam Rai
Surabhi Chavan
Welcome to my Page
Learn more
This site is about pets
Computer Science Student at SFSU.
Role : Backend and Github Master
Intrest : Games, I like games.


§1-11 Effect of repeal on pending suit or prosecution. No suit or prosecution pending at the time of the repeal of any law, for any offense committed, or for the recovery of any penalty or forfeiture incurred under the law so repealed, shall be affected by such repeal. [CC 1859, §23; RL 1925, §25; RL 1935, §27; RL 1945, §27; RL 1955, §1-14; HRS §1-11]
Case Notes
Prosecution for gaming valid though law repealed pending appeal taken for trial de novo. 9 H. 98.
Section applied and minimum term of imprisonment was determinable under the law as it existed at time of commission of crime. 50 H. 351, 440 P.2d 528.


#include <quic_packet_writer_wrapper.h>
◆ QuicPacketWriterWrapper()
| net::QuicPacketWriterWrapper::QuicPacketWriterWrapper |
( |
| ) |
|
|
default |
◆ ~QuicPacketWriterWrapper()
| net::QuicPacketWriterWrapper::~QuicPacketWriterWrapper |
( |
| ) |
|
|
overridedefault |
◆ GetMaxPacketSize()
| QuicByteCount net::QuicPacketWriterWrapper::GetMaxPacketSize |
( |
const QuicSocketAddress & |
peer_address | ) |
const |
|
override |
◆ IsWriteBlocked()
| bool net::QuicPacketWriterWrapper::IsWriteBlocked |
( |
| ) |
const |
|
override |
◆ IsWriteBlockedDataBuffered()
| bool net::QuicPacketWriterWrapper::IsWriteBlockedDataBuffered |
( |
| ) |
const |
|
override |
◆ set_peer_address()
| virtual void net::QuicPacketWriterWrapper::set_peer_address |
( |
const QuicSocketAddress & |
peer_address | ) |
|
|
inlinevirtual |
◆ set_writer()
| void net::QuicPacketWriterWrapper::set_writer |
( |
QuicPacketWriter * |
writer | ) |
|
◆ SetWritable()
| void net::QuicPacketWriterWrapper::SetWritable |
( |
| ) |
|
|
override |
◆ WritePacket()
| WriteResult net::QuicPacketWriterWrapper::WritePacket |
( |
const char * |
buffer, |
|
|
size_t |
buf_len, |
|
|
const QuicIpAddress & |
self_address, |
|
|
const QuicSocketAddress & |
peer_address, |
|
|
PerPacketOptions * |
options |
|
) |
| |
|
override |
◆ writer()
| QuicPacketWriter* net::QuicPacketWriterWrapper::writer |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following files:


--- layout: post title: "The End of a Chapter" date: 2012-02-16 04:59:59 +0000 permalink: /2012/02/16/the-end-of-a-chapter/ category: Personal tags: - Work - KSU - Kennesaw redirect_from: - /blog/the-end-of-a-chapter/ ---
I'm not usually one for reflective personal blog entries, but some events require a brief mention: today was my last day at KSU, and it was an incredibly surreal day. Though I've known this day was coming for over a month, it is still hard to believe that it got here. In many ways, today felt like any other day: the work was similar, things needed to get done. In other ways, there was an 800 pound gorilla in the room: everyone knew that tomorrow I wouldn't be coming to work. When I finally cleared out my office, the finality of what was going on really hit me.
There are friends I have made at KSU that are like none other, and I will genuinely miss them. I hope we will stay in contact and I hope to get back to the Atlanta area sometime and visit them, or perhaps they will make it out to the bay area. Unfortunately, friendships seem to have a tendency to dissolve too easily with distance, but one can always hope that things will be different.
Today, one chapter of my life closes. For now, a brief interlude to relocate to the Bay Area, and then a new chapter begins in 12 short days!


How 'Anas’ cover was allegedly blown in TseAdo land-guards operation
Kennedy Agyapong’s Net 2 TV has confirmed that the young man captured in a viral video is indeed Anas Aremeyaw Anas with shocking revelations.
Net2 TV revealed that the land originally belonged to a La stool lawyer called Kojo Graham who also sold the land to another person.
The new buyer had to fight with Anas because Anas was also laying claim to the said land.
The new owner of the land realizing Anas had been using armed landguards on the land also hired his own landguards who clashed with Anas and overpowered him forcing him to disclose himself as Anas.
According to Net2 TV, Anas initially set out his secret cameras on the said land and connected to his mobile phone to monitor whoever visits the land.
"This the owner of the land also decided not to allow Anas to go scot-free, therefore, he decided to ambush him. Apparently, he [Anas] was on the land together with his landguards and they got ambushed," the narrator said.
"The people who laid ambush on Anas outnumbered the personnel Anas went with, therefore they overpowered him and hence his [Anas] cover was blown."


Account
Change password
Security
Two-factor
autentification
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
ullamco
laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit
in
voluptate velit esse cillum dolore eu fugiat nulla pariatur
White list
Login history
| OS/Browser | Login time & date | IP address |
|---|---|---|
| Windows 7, Chrome 60 | ——————————— | <IP_ADDRESS>.3 |
| Windows 7, Chrome 60 | ——————————— | <IP_ADDRESS>.3 |
| Windows 7, Chrome 60 | ——————————— | <IP_ADDRESS>.3 |
Notification
-
Sending email when payment had been received
-
Sending email after withdraws
-
Sending email with news about system
-
Sending email when system settings were changed
SMS
-
Sending email when payment had been received
-
Sending email after withdraws
-
Sending email with news about system
-
Sending email when system settings were changed


Articles
Error Propogation
Particle Tracking
Plasma Collisions
Dispersion Relations
Townsend Breakdown
Ising Model
Ideal Ballistics
Fourier Series
Resonant Oscillator
Convolutional Networks for Physicists


Report of Juveniles with a Gun 25 Nov 2019, 14:01 by Roger Report of a juvenile in Vera Cruz Park with a gun looking to buy alcohol.


@(myForm: Form[Userdata], faillogin: Option[String], showSignupForm: Boolean, showLoginForm: Boolean, loggedIn: Boolean)(implicit request: Request[AnyContent], messages: Messages) @import helper._ @implicitFieldConstructor = @{ FieldConstructor(twitterBootstrapInput.f) } @main("RepCheck home") { @* * Get an `Html` object by calling the built-in Play welcome * template and passing a `String` message. *@ @if(showLoginForm) { } @if(showSignupForm) { }
Search
@if(!loggedIn) { Log in } else { @*Logged in as: @request.session.get("loggedin").fold("")(n => n)*@ n), None, None, None)" > Account | Logout }
We understand that reputation is the driving force of e-commerce.
Each retailer has a uniquie Repcheck© score, aggregated from numerous sources to provide you with an informed decision.
We aim to provide a platform to markets which do not have a central reputation system to convey themselves fairly. We Encourage honesty and promote trust.


Cool gooey effects using SVG filters
Six menu styles (spaced/stacked round, horizontal, vertical menus)
15+ easily customizable options
Easy to use event API
Fully responsive layout
Support in all modern browsers
$(function() { $("#gooey-round").gooeymenu({ bgColor: "#ffc0cb", contentColor: "white", style: "circle", circle: { radius: 85 }, size: 80 }); });
$(function() { $("#gooey-round").gooeymenu({ circle: { radius: 85 }, open: function() { $(this).find(".gooey-menu-item").css("background-color", "steelblue"); $(this).find(".open-button").css("background-color", "steelblue"); }, close: function(gooey) { $(this).find(".gooey-menu-item").css("background-color", "#00ffff"); $(this).find(".open-button").css("background-color", "#00ffff"); } }); });
Version: 1.0
Created by: Kirill Goltsman
Email<EMAIL_ADDRESS>Put "gooey" plugin folder into your project. Include below code snippets into head
section of your html file. You may include Font Awesome plugin if you want ready-made icons in your menu.
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css"> <link rel="stylesheet" href="gooey/src/gooey.min.css">
Add markup to your html file. You can use any number of menu links and any labels or text for your menu links. The markup structure proposed below is desirable to avoid any bugs. You can use any valid class or id name for your nav
element. This will be automatically handled by the plugin.
Note: If you use several menus on one page, don't forget to create unique ids and names for your hidden checkbox elements that have class ".menu-open".
 <input type="checkbox" class="menu-open" name="menu-open" id="menu-open"/>
To indicate your settings, put the following code within a script
tag in your head
section, html body
element or in a separate Javascript file. Here is an example of how to set a horizontal Gooey Menu with pink menu items. Please, remember that a selector's id or class on which gooeyMenu
function is called should be identical to nav
element id or class in your html markup (in this example, nav
id is gooey
)
$(function() { $("#gooey").gooeymenu({ style: "horizontal", bgColor: "pink" }); });
You have a list of options to tailor a gooey menu to your needs
style: "horizontal", // {String} Sets gooey menu style. Accepted values: "horizontal","vertical","circle" size:70, // {Integer} Sets a menu item's size in pixels margin:"medium", // {String} Sets the margin between menu items. Acts only if "spaced" option of "horizontal" or "vertical" style is selected. Accepted values: "small","medium" and "large" bgColor: "steelblue", // {String} Sets background-color of a menu-item element contentColor:"white", // {String} Sets font color of a menu item's content; transitionStep:100, // {Integer} Sets a speed rate at which each menu item unfolds in milliseconds bounce:false, // {Boolean} Turns "bounce" effect off if {false} and on if {true} bounceLength:"medium", // {String} Sets the bounce length, if bounce effect is enabled. Accepted values: "small", "medium" and "large" hover:"white", // {String} Sets menu items' color on hover // Style-specific settings circle: { radius:80 // {Integer} Sets a radius of menu circle when a menu is opened (in pixels) }, horizontal: { menuItemPosition:"glue" // {String} "Spaced" option sets the spacing of menu items by a specified margin. "Glue" option makes items stacked. }, vertical: { menuItemPosition:"spaced" // {String} "Spaced" option sets the spacing of menu items by a specified margin. "Glue" option makes items stacked. direction:"up" // {String} Values: "up" or "down". A direction in which vertical menu unfolds }, //Callback API open:function(){}, // {function} Fires when a gooey menu is opened.$(this)
context for the function is the element on whichgooeymenu
was called close:function() {} // {function} Fires when a gooey menu is closed.$(this)
context for the function is the element on whichgooeymenu
was called }; };
Style menu's margins and indentation. You may set menu items indentation by changing left/top/right/bottom or margin properties of menu items and menu open button. Since menu's size will depend on a number of items and menu style selected, you have a full freedom to set position of your menu according to your needs. Note, that .navimenu container is relatively positioned by default and menu items are absolutely positioned.
.navimenu .gooey-menu-item, .navimenu .open-button { border-radius: 100%; left: 50px; /* Style left indent */ top:100px; /* Style top indent */ position: absolute; }
Change a burger icon's background
.navimenu .burger { background: white; }
Scripts and plugins used in the demo and these docs


For our project, we decided to implement the bug algorithm with object following. As a high level overview, this algorithm starts by following a straight line path towards the destination and upon detecting an obstacle, follows the edge around until the robot has returned to the original straight line path on the other side of the obstacle.
To do this, we used the optitrack data to direct the robot through the required destinations and checked the LADAR sensor data to determine if an obstacle was in the way of our path. From there, we would navigate in a counter-clockwise fashion, using right wall following to circumvent the obstacle. Data on the robot’s position is sent to a Labview program that tracks its movement along the course.
To handle ball collection, we chose a simplistic mechanical design comprised of splitting the front panel into two, equal sized compartments and a corresponding door for each side. The software would take in camera readings and check it against thresholded HSV values for the detection of blue and orange.
If the number of pixels within the range of either blue or orange exceeded a certain minimum amount, we would flag that a ball was detected and estimate the distance between the robot and the ball. This information is sent to the Labview program and is used to depict the location and color of the ball on the course.
Depending on which color ball we were detecting, we would orient the robot to line the ball up with the corresponding side, drive forward, and rotate the door to open and close to allow the entry of the new ball while simultaneously minimizing the chances of releasing other balls. Upon completion of the course, we would drive to the drop-off locations, stop to allow the balls to settle, open the corresponding door, and reverse to move the robot out of the way.


Here are some of the product design projects I have worked on. You can also download my in PDF format


--- layout: default title: "Manual" description: "Lab manual" group: subnavigation navorder: 5 --- {% include JB/setup %}
Please visit the Sardana lab Sharepoint site for lab policies and protocols. This is where you will find: mission, information about lab policies and expectations, guidelines for working in the lab, and data management plans.
Our goal is to work as a team to develop creative approaches to answer fundamental questions in cell biology. We are also committed to work together in ensuring that we understand and support diversity, equity and inclusion in science. This is a living document that aims to assist us in achieving these goals more effectively.
We actively seek out opportunities for STEM outreach and science education. We believe in engaging with the broader community and sharing our knowledge, expertise, and enthusiasm to spread our love for curiosity based science.


[§539-12] Application of chapter. This chapter applies to registrations of securities in beneficiary form made before or after April 29, 1998, by decedents dying on or after April 29, 1998. [L 1998, c 63, pt of §1]
Revision Note
"April 29, 1998" substituted for "the effective date of this Act".


AugBin: Analysis of mixed outcome composite endpoints
Welcome to the GUI for efficient analysis of mixed outcome composite responder endpoints. The app allows for the analysis of composite endpoints comprised of one or two continuous components and zero or one binary components. Multiple discrete components may be included by combining them to form a single binary indicator. The methods implemented in this app are discussed in (McMenamin et al., 2019).
A tutorial on how to use the app, along with R code and example data, is available at https://github.com/martinamcm/AugBin.
References
McMenamin M, Barrett JK, Berglind A, Wason JMS. Latent variable modelling for complex composite endpoints. 2019; https://arxiv.org/abs/1902.07037
Wason JM and Seaman SR. Using continuous data on tumour measurements to improve inference in phase II cancer studies. Statistics in Medicine. 2013;32(26):4639–4650. https://doi.org/10.1002/sim.5867


aurora module
import requests import random import colorsys import re # Primary interface for an Aurora light # For instructions or bug reports, please visit # https://github.com/software-2/nanoleaf class Aurora(object): def __init__(self, ip_address: str, auth_token: str): self.baseUrl = "http://" + ip_address + ":16021/api/v1/" + auth_token + "/" self.ip_address = ip_address self.auth_token = auth_token def __repr__(self): return "<Aurora(" + self.ip_address + ")>" def __put(self, endpoint, data: dict) -> requests.request: url = self.baseUrl + endpoint try: r = requests.put(url, json=data) except requests.exceptions.RequestException as e: print(e) return return self.__check_for_errors(r) def __get(self, endpoint: str = "") -> requests.request: url = self.baseUrl + endpoint try: r = requests.get(url) except requests.exceptions.RequestException as e: print(e) return return self.__check_for_errors(r) def __delete(self, endpoint: str = "") -> requests.request: url = self.baseUrl + endpoint try: r = requests.delete(url) except requests.exceptions.RequestException as e: print(e) return return self.__check_for_errors(r) def __check_for_errors(self, r: requests.request) -> requests.request: if r.status_code == 200: if r.text == "": # BUG: Delete User returns 200, not 204 like it should, as of firmware 1.5.0 return None return r.json() elif r.status_code == 204: return None elif r.status_code == 403: print("Error 400: Bad request! (" + self.ip_address + ")") elif r.status_code == 401: print("Error 401: Not authorized! This is an invalid token for this Aurora (" + self.ip_address + ")") elif r.status_code == 404: print("Error 404: Resource not found! (" + self.ip_address + ")") elif r.status_code == 422: print("Error 422: Unprocessible Entity (" + self.ip_address + ")") elif r.status_code == 500: print("Error 500: Internal Server Error (" + self.ip_address + ")") else: print("ERROR! UNKNOWN ERROR " + str(r.status_code) + ". Please post an issue on the GitHub page: https://github.com/software-2/nanoleaf/issues") return None ########################################### # General functionality methods ########################################### @property def info(self): """Returns the full Aurora Info request. Useful for debugging since it's just a fat dump.""" return self.__get() @property def color_mode(self): """Returns the current color mode.""" return self.__get("state/colorMode") def identify(self): """Briefly flash the panels on and off""" self.__put("identify", {}) @property def firmware(self): """Returns the firmware version of the device""" return self.__get("firmwareVersion") @property def model(self): """Returns the model number of the device. (Always returns 'NL22')""" return self.__get("model") @property def serial_number(self): """Returns the serial number of the device""" return self.__get("serialNo") def delete_user(self): """CAUTION: Revokes your auth token from the device.""" self.__delete() ########################################### # On / Off methods ########################################### @property def on(self): """Returns True if the device is on, False if it's off""" return self.__get("state/on/value") @on.setter def on(self, value: bool): """Turns the device on/off. True = on, False = off""" data = {"on": value} self.__put("state", data) @property def off(self): """Returns True if the device is off, False if it's on""" return not self.on @off.setter def off(self, value: bool): """Turns the device on/off. True = off, False = on""" self.on = not value def on_toggle(self): """Switches the on/off state of the device""" self.on = not self.on ########################################### # Brightness methods ########################################### @property def brightness(self): """Returns the brightness of the device (0-100)""" return self.__get("state/brightness/value") @brightness.setter def brightness(self, level): """Sets the brightness to the given level (0-100)""" data = {"brightness": {"value": level}} self.__put("state", data) @property def brightness_min(self): """Returns the minimum brightness possible. (This always returns 0)""" return self.__get("state/brightness/min") @property def brightness_max(self): """Returns the maximum brightness possible. (This always returns 100)""" return self.__get("state/brightness/max") def brightness_raise(self, level): """Raise the brightness of the device by a relative amount (negative lowers brightness)""" data = {"brightness": {"increment": level}} self.__put("state", data) def brightness_lower(self, level): """Lower the brightness of the device by a relative amount (negative raises brightness)""" self.brightness_raise(-level) ########################################### # Hue methods ########################################### @property def hue(self): """Returns the hue of the device (0-360)""" return self.__get("state/hue/value") @hue.setter def hue(self, level): """Sets the hue to the given level (0-360)""" data = {"hue": {"value": level}} self.__put("state", data) @property def hue_min(self): """Returns the minimum hue possible. (This always returns 0)""" return self.__get("state/hue/min") @property def hue_max(self): """Returns the maximum hue possible. (This always returns 360)""" return self.__get("state/hue/max") def hue_raise(self, level): """Raise the hue of the device by a relative amount (negative lowers hue)""" data = {"hue": {"increment": level}} self.__put("state", data) def hue_lower(self, level): """Lower the hue of the device by a relative amount (negative raises hue)""" self.hue_raise(-level) ########################################### # Saturation methods ########################################### @property def saturation(self): """Returns the saturation of the device (0-100)""" return self.__get("state/sat/value") @saturation.setter def saturation(self, level): """Sets the saturation to the given level (0-100)""" data = {"sat": {"value": level}} self.__put("state", data) @property def saturation_min(self): """Returns the minimum saturation possible. (This always returns 0)""" return self.__get("state/sat/min") @property def saturation_max(self): """Returns the maximum saturation possible. (This always returns 100)""" return self.__get("state/sat/max") def saturation_raise(self, level): """Raise the saturation of the device by a relative amount (negative lowers saturation)""" data = {"sat": {"increment": level}} self.__put("state", data) def saturation_lower(self, level): """Lower the saturation of the device by a relative amount (negative raises saturation)""" self.saturation_raise(-level) ########################################### # Color Temperature methods ########################################### @property def color_temperature(self): """Returns the color temperature of the device (0-100)""" return self.__get("state/ct/value") @color_temperature.setter def color_temperature(self, level): """Sets the color temperature to the given level (0-100)""" data = {"ct": {"value": level}} self.__put("state", data) @property def color_temperature_min(self): """Returns the minimum color temperature possible. (This always returns 1200)""" # return self.__get("state/ct/min") # BUG: Firmware 1.5.0 returns the wrong value. return 1200 @property def color_temperature_max(self): """Returns the maximum color temperature possible. (This always returns 6500)""" # return self.__get("state/ct/max") # BUG: Firmware 1.5.0 returns the wrong value. return 6500 def color_temperature_raise(self, level): """Raise the color temperature of the device by a relative amount (negative lowers color temperature)""" data = {"ct": {"increment": level}} self.__put("state", data) def color_temperature_lower(self, level): """Lower the color temperature of the device by a relative amount (negative raises color temperature)""" self.color_temperature_raise(-level) ########################################### # Color RGB/HSB methods ########################################### # TODO: Shame on all these magic numbers. SHAME. @property def rgb(self): """The color of the device, as represented by 0-255 RGB values""" hue = self.hue saturation = self.saturation brightness = self.brightness if hue is None or saturation is None or brightness is None: return None rgb = colorsys.hsv_to_rgb(hue / 360, saturation / 100, brightness / 100) return [int(rgb[0] * 255), int(rgb[1] * 255), int(rgb[2] * 255)] @rgb.setter def rgb(self, color): """Set the color of the device, as represented by either a hex string or a list of 0-255 RGB values""" try: red, green, blue = color except ValueError: try: hexcolor = color reg_match = re.match("^([A-Fa-f0-9]{6})$", hexcolor) if reg_match: red = int(hexcolor[:2], 16) green = int(hexcolor[2:-2], 16) blue = int(hexcolor[-2:], 16) else: print("Error: Color must be in valid hex format.") return except ValueError: print("Error: Color must have one hex value or three 0-255 values.") return if not 0 <= red <= 255: print("Error: Red value out of range! (0-255)") return if not 0 <= green <= 255: print("Error: Green value out of range! (0-255)") return if not 0 <= blue <= 255: print("Error: Blue value out of range! (0-255)") return hsv = colorsys.rgb_to_hsv(red / 255, green / 255, blue / 255) hue = int(hsv[0] * 360) saturation = int(hsv[1] * 100) brightness = int(hsv[2] * 100) data = {"hue": {"value": hue}, "sat": {"value": saturation}, "brightness": {"value": brightness}} self.__put("state", data) ########################################### # Layout methods ########################################### @property def orientation(self): """Returns the orientation of the device (0-360)""" return self.__get("panelLayout/globalOrientation/value") @property def orientation_min(self): """Returns the minimum orientation possible. (This always returns 0)""" return self.__get("panelLayout/globalOrientation/min") @property def orientation_max(self): """Returns the maximum orientation possible. (This always returns 360)""" return self.__get("panelLayout/globalOrientation/max") @property def panel_count(self): """Returns the number of panels connected to the device""" return self.__get("panelLayout/layout/numPanels") @property def panel_length(self): """Returns the length of a single panel. (This always returns 150)""" return self.__get("panelLayout/layout/sideLength") @property def panel_positions(self): """Returns a list of all panels with their attributes represented in a dict. panelId - Unique identifier for this panel x - X-coordinate y - Y-coordinate o - Rotational orientation """ return self.__get("panelLayout/layout/positionData") ########################################### # Effect methods ########################################### _reserved_effect_names = ["*Static*", "*Dynamic*", "*Solid*"] @property def effect(self): """Returns the active effect""" return self.__get("effects/select") @effect.setter def effect(self, effect_name: str): """Sets the active effect to the name specified""" data = {"select": effect_name} self.__put("effects", data) @property def effects_list(self): """Returns a list of all effects stored on the device""" return self.__get("effects/effectsList") def effect_random(self) -> str: """Sets the active effect to a new random effect stored on the device. Returns the name of the new effect.""" effect_list = self.effects_list active_effect = self.effect if active_effect not in self._reserved_effect_names: effect_list.remove(self.effect) new_effect = random.choice(effect_list) self.effect = new_effect return new_effect def effect_set_raw(self, effect_data: dict): """Sends a raw dict containing effect data to the device. The dict given must match the json structure specified in the API docs.""" data = {"write": effect_data} self.__put("effects", data) def effect_details(self, name: str) -> dict: """Returns the dict containing details for the effect specified""" data = {"write": {"command": "request", "animName": name}} return self.__put("effects", data) def effect_details_all(self) -> dict: """Returns a dict containing details for all effects on the device""" data = {"write": {"command": "requestAll"}} return self.__put("effects", data) def effect_delete(self, name: str): """Removed the specified effect from the device""" data = {"write": {"command": "delete", "animName": name}} self.__put("effects", data) def effect_rename(self, old_name: str, new_name: str): """Renames the specified effect saved on the device to a new name""" data = {"write": {"command": "rename", "animName": old_name, "newName": new_name}} self.__put("effects", data)
Classes
class Aurora
class Aurora(object): def __init__(self, ip_address: str, auth_token: str): self.baseUrl = "http://" + ip_address + ":16021/api/v1/" + auth_token + "/" self.ip_address = ip_address self.auth_token = auth_token def __repr__(self): return "<Aurora(" + self.ip_address + ")>" def __put(self, endpoint, data: dict) -> requests.request: url = self.baseUrl + endpoint try: r = requests.put(url, json=data) except requests.exceptions.RequestException as e: print(e) return return self.__check_for_errors(r) def __get(self, endpoint: str = "") -> requests.request: url = self.baseUrl + endpoint try: r = requests.get(url) except requests.exceptions.RequestException as e: print(e) return return self.__check_for_errors(r) def __delete(self, endpoint: str = "") -> requests.request: url = self.baseUrl + endpoint try: r = requests.delete(url) except requests.exceptions.RequestException as e: print(e) return return self.__check_for_errors(r) def __check_for_errors(self, r: requests.request) -> requests.request: if r.status_code == 200: if r.text == "": # BUG: Delete User returns 200, not 204 like it should, as of firmware 1.5.0 return None return r.json() elif r.status_code == 204: return None elif r.status_code == 403: print("Error 400: Bad request! (" + self.ip_address + ")") elif r.status_code == 401: print("Error 401: Not authorized! This is an invalid token for this Aurora (" + self.ip_address + ")") elif r.status_code == 404: print("Error 404: Resource not found! (" + self.ip_address + ")") elif r.status_code == 422: print("Error 422: Unprocessible Entity (" + self.ip_address + ")") elif r.status_code == 500: print("Error 500: Internal Server Error (" + self.ip_address + ")") else: print("ERROR! UNKNOWN ERROR " + str(r.status_code) + ". Please post an issue on the GitHub page: https://github.com/software-2/nanoleaf/issues") return None ########################################### # General functionality methods ########################################### @property def info(self): """Returns the full Aurora Info request. Useful for debugging since it's just a fat dump.""" return self.__get() @property def color_mode(self): """Returns the current color mode.""" return self.__get("state/colorMode") def identify(self): """Briefly flash the panels on and off""" self.__put("identify", {}) @property def firmware(self): """Returns the firmware version of the device""" return self.__get("firmwareVersion") @property def model(self): """Returns the model number of the device. (Always returns 'NL22')""" return self.__get("model") @property def serial_number(self): """Returns the serial number of the device""" return self.__get("serialNo") def delete_user(self): """CAUTION: Revokes your auth token from the device.""" self.__delete() ########################################### # On / Off methods ########################################### @property def on(self): """Returns True if the device is on, False if it's off""" return self.__get("state/on/value") @on.setter def on(self, value: bool): """Turns the device on/off. True = on, False = off""" data = {"on": value} self.__put("state", data) @property def off(self): """Returns True if the device is off, False if it's on""" return not self.on @off.setter def off(self, value: bool): """Turns the device on/off. True = off, False = on""" self.on = not value def on_toggle(self): """Switches the on/off state of the device""" self.on = not self.on ########################################### # Brightness methods ########################################### @property def brightness(self): """Returns the brightness of the device (0-100)""" return self.__get("state/brightness/value") @brightness.setter def brightness(self, level): """Sets the brightness to the given level (0-100)""" data = {"brightness": {"value": level}} self.__put("state", data) @property def brightness_min(self): """Returns the minimum brightness possible. (This always returns 0)""" return self.__get("state/brightness/min") @property def brightness_max(self): """Returns the maximum brightness possible. (This always returns 100)""" return self.__get("state/brightness/max") def brightness_raise(self, level): """Raise the brightness of the device by a relative amount (negative lowers brightness)""" data = {"brightness": {"increment": level}} self.__put("state", data) def brightness_lower(self, level): """Lower the brightness of the device by a relative amount (negative raises brightness)""" self.brightness_raise(-level) ########################################### # Hue methods ########################################### @property def hue(self): """Returns the hue of the device (0-360)""" return self.__get("state/hue/value") @hue.setter def hue(self, level): """Sets the hue to the given level (0-360)""" data = {"hue": {"value": level}} self.__put("state", data) @property def hue_min(self): """Returns the minimum hue possible. (This always returns 0)""" return self.__get("state/hue/min") @property def hue_max(self): """Returns the maximum hue possible. (This always returns 360)""" return self.__get("state/hue/max") def hue_raise(self, level): """Raise the hue of the device by a relative amount (negative lowers hue)""" data = {"hue": {"increment": level}} self.__put("state", data) def hue_lower(self, level): """Lower the hue of the device by a relative amount (negative raises hue)""" self.hue_raise(-level) ########################################### # Saturation methods ########################################### @property def saturation(self): """Returns the saturation of the device (0-100)""" return self.__get("state/sat/value") @saturation.setter def saturation(self, level): """Sets the saturation to the given level (0-100)""" data = {"sat": {"value": level}} self.__put("state", data) @property def saturation_min(self): """Returns the minimum saturation possible. (This always returns 0)""" return self.__get("state/sat/min") @property def saturation_max(self): """Returns the maximum saturation possible. (This always returns 100)""" return self.__get("state/sat/max") def saturation_raise(self, level): """Raise the saturation of the device by a relative amount (negative lowers saturation)""" data = {"sat": {"increment": level}} self.__put("state", data) def saturation_lower(self, level): """Lower the saturation of the device by a relative amount (negative raises saturation)""" self.saturation_raise(-level) ########################################### # Color Temperature methods ########################################### @property def color_temperature(self): """Returns the color temperature of the device (0-100)""" return self.__get("state/ct/value") @color_temperature.setter def color_temperature(self, level): """Sets the color temperature to the given level (0-100)""" data = {"ct": {"value": level}} self.__put("state", data) @property def color_temperature_min(self): """Returns the minimum color temperature possible. (This always returns 1200)""" # return self.__get("state/ct/min") # BUG: Firmware 1.5.0 returns the wrong value. return 1200 @property def color_temperature_max(self): """Returns the maximum color temperature possible. (This always returns 6500)""" # return self.__get("state/ct/max") # BUG: Firmware 1.5.0 returns the wrong value. return 6500 def color_temperature_raise(self, level): """Raise the color temperature of the device by a relative amount (negative lowers color temperature)""" data = {"ct": {"increment": level}} self.__put("state", data) def color_temperature_lower(self, level): """Lower the color temperature of the device by a relative amount (negative raises color temperature)""" self.color_temperature_raise(-level) ########################################### # Color RGB/HSB methods ########################################### # TODO: Shame on all these magic numbers. SHAME. @property def rgb(self): """The color of the device, as represented by 0-255 RGB values""" hue = self.hue saturation = self.saturation brightness = self.brightness if hue is None or saturation is None or brightness is None: return None rgb = colorsys.hsv_to_rgb(hue / 360, saturation / 100, brightness / 100) return [int(rgb[0] * 255), int(rgb[1] * 255), int(rgb[2] * 255)] @rgb.setter def rgb(self, color): """Set the color of the device, as represented by either a hex string or a list of 0-255 RGB values""" try: red, green, blue = color except ValueError: try: hexcolor = color reg_match = re.match("^([A-Fa-f0-9]{6})$", hexcolor) if reg_match: red = int(hexcolor[:2], 16) green = int(hexcolor[2:-2], 16) blue = int(hexcolor[-2:], 16) else: print("Error: Color must be in valid hex format.") return except ValueError: print("Error: Color must have one hex value or three 0-255 values.") return if not 0 <= red <= 255: print("Error: Red value out of range! (0-255)") return if not 0 <= green <= 255: print("Error: Green value out of range! (0-255)") return if not 0 <= blue <= 255: print("Error: Blue value out of range! (0-255)") return hsv = colorsys.rgb_to_hsv(red / 255, green / 255, blue / 255) hue = int(hsv[0] * 360) saturation = int(hsv[1] * 100) brightness = int(hsv[2] * 100) data = {"hue": {"value": hue}, "sat": {"value": saturation}, "brightness": {"value": brightness}} self.__put("state", data) ########################################### # Layout methods ########################################### @property def orientation(self): """Returns the orientation of the device (0-360)""" return self.__get("panelLayout/globalOrientation/value") @property def orientation_min(self): """Returns the minimum orientation possible. (This always returns 0)""" return self.__get("panelLayout/globalOrientation/min") @property def orientation_max(self): """Returns the maximum orientation possible. (This always returns 360)""" return self.__get("panelLayout/globalOrientation/max") @property def panel_count(self): """Returns the number of panels connected to the device""" return self.__get("panelLayout/layout/numPanels") @property def panel_length(self): """Returns the length of a single panel. (This always returns 150)""" return self.__get("panelLayout/layout/sideLength") @property def panel_positions(self): """Returns a list of all panels with their attributes represented in a dict. panelId - Unique identifier for this panel x - X-coordinate y - Y-coordinate o - Rotational orientation """ return self.__get("panelLayout/layout/positionData") ########################################### # Effect methods ########################################### _reserved_effect_names = ["*Static*", "*Dynamic*", "*Solid*"] @property def effect(self): """Returns the active effect""" return self.__get("effects/select") @effect.setter def effect(self, effect_name: str): """Sets the active effect to the name specified""" data = {"select": effect_name} self.__put("effects", data) @property def effects_list(self): """Returns a list of all effects stored on the device""" return self.__get("effects/effectsList") def effect_random(self) -> str: """Sets the active effect to a new random effect stored on the device. Returns the name of the new effect.""" effect_list = self.effects_list active_effect = self.effect if active_effect not in self._reserved_effect_names: effect_list.remove(self.effect) new_effect = random.choice(effect_list) self.effect = new_effect return new_effect def effect_set_raw(self, effect_data: dict): """Sends a raw dict containing effect data to the device. The dict given must match the json structure specified in the API docs.""" data = {"write": effect_data} self.__put("effects", data) def effect_details(self, name: str) -> dict: """Returns the dict containing details for the effect specified""" data = {"write": {"command": "request", "animName": name}} return self.__put("effects", data) def effect_details_all(self) -> dict: """Returns a dict containing details for all effects on the device""" data = {"write": {"command": "requestAll"}} return self.__put("effects", data) def effect_delete(self, name: str): """Removed the specified effect from the device""" data = {"write": {"command": "delete", "animName": name}} self.__put("effects", data) def effect_rename(self, old_name: str, new_name: str): """Renames the specified effect saved on the device to a new name""" data = {"write": {"command": "rename", "animName": old_name, "newName": new_name}} self.__put("effects", data)
Ancestors (in MRO)
- Aurora
- builtins.object
Static methods
def __init__(
self, ip_address, auth_token)
Initialize self. See help(type(self)) for accurate signature.
def __init__(self, ip_address: str, auth_token: str): self.baseUrl = "http://" + ip_address + ":16021/api/v1/" + auth_token + "/" self.ip_address = ip_address self.auth_token = auth_token
def brightness_lower(
self, level)
Lower the brightness of the device by a relative amount (negative raises brightness)
def brightness_lower(self, level): """Lower the brightness of the device by a relative amount (negative raises brightness)""" self.brightness_raise(-level)
def brightness_raise(
self, level)
Raise the brightness of the device by a relative amount (negative lowers brightness)
def brightness_raise(self, level): """Raise the brightness of the device by a relative amount (negative lowers brightness)""" data = {"brightness": {"increment": level}} self.__put("state", data)
def color_temperature_lower(
self, level)
Lower the color temperature of the device by a relative amount (negative raises color temperature)
def color_temperature_lower(self, level): """Lower the color temperature of the device by a relative amount (negative raises color temperature)""" self.color_temperature_raise(-level)
def color_temperature_raise(
self, level)
Raise the color temperature of the device by a relative amount (negative lowers color temperature)
def color_temperature_raise(self, level): """Raise the color temperature of the device by a relative amount (negative lowers color temperature)""" data = {"ct": {"increment": level}} self.__put("state", data)
def delete_user(
self)
CAUTION: Revokes your auth token from the device.
def delete_user(self): """CAUTION: Revokes your auth token from the device.""" self.__delete()
def effect_delete(
self, name)
Removed the specified effect from the device
def effect_delete(self, name: str): """Removed the specified effect from the device""" data = {"write": {"command": "delete", "animName": name}} self.__put("effects", data)
def effect_details(
self, name)
Returns the dict containing details for the effect specified
def effect_details(self, name: str) -> dict: """Returns the dict containing details for the effect specified""" data = {"write": {"command": "request", "animName": name}} return self.__put("effects", data)
def effect_details_all(
self)
Returns a dict containing details for all effects on the device
def effect_details_all(self) -> dict: """Returns a dict containing details for all effects on the device""" data = {"write": {"command": "requestAll"}} return self.__put("effects", data)
def effect_random(
self)
Sets the active effect to a new random effect stored on the device.
Returns the name of the new effect.
def effect_random(self) -> str: """Sets the active effect to a new random effect stored on the device. Returns the name of the new effect.""" effect_list = self.effects_list active_effect = self.effect if active_effect not in self._reserved_effect_names: effect_list.remove(self.effect) new_effect = random.choice(effect_list) self.effect = new_effect return new_effect
def effect_rename(
self, old_name, new_name)
Renames the specified effect saved on the device to a new name
def effect_rename(self, old_name: str, new_name: str): """Renames the specified effect saved on the device to a new name""" data = {"write": {"command": "rename", "animName": old_name, "newName": new_name}} self.__put("effects", data)
def effect_set_raw(
self, effect_data)
Sends a raw dict containing effect data to the device.
The dict given must match the json structure specified in the API docs.
def effect_set_raw(self, effect_data: dict): """Sends a raw dict containing effect data to the device. The dict given must match the json structure specified in the API docs.""" data = {"write": effect_data} self.__put("effects", data)
def hue_lower(
self, level)
Lower the hue of the device by a relative amount (negative raises hue)
def hue_lower(self, level): """Lower the hue of the device by a relative amount (negative raises hue)""" self.hue_raise(-level)
def hue_raise(
self, level)
Raise the hue of the device by a relative amount (negative lowers hue)
def hue_raise(self, level): """Raise the hue of the device by a relative amount (negative lowers hue)""" data = {"hue": {"increment": level}} self.__put("state", data)
def identify(
self)
Briefly flash the panels on and off
def identify(self): """Briefly flash the panels on and off""" self.__put("identify", {})
def on_toggle(
self)
Switches the on/off state of the device
def on_toggle(self): """Switches the on/off state of the device""" self.on = not self.on
def saturation_lower(
self, level)
Lower the saturation of the device by a relative amount (negative raises saturation)
def saturation_lower(self, level): """Lower the saturation of the device by a relative amount (negative raises saturation)""" self.saturation_raise(-level)
def saturation_raise(
self, level)
Raise the saturation of the device by a relative amount (negative lowers saturation)
def saturation_raise(self, level): """Raise the saturation of the device by a relative amount (negative lowers saturation)""" data = {"sat": {"increment": level}} self.__put("state", data)
Instance variables
var auth_token
var baseUrl
var brightness
Returns the brightness of the device (0-100)
var brightness_max
Returns the maximum brightness possible. (This always returns 100)
var brightness_min
Returns the minimum brightness possible. (This always returns 0)
var color_mode
Returns the current color mode.
var color_temperature
Returns the color temperature of the device (0-100)
var color_temperature_max
Returns the maximum color temperature possible. (This always returns 6500)
var color_temperature_min
Returns the minimum color temperature possible. (This always returns 1200)
var effect
Returns the active effect
var effects_list
Returns a list of all effects stored on the device
var firmware
Returns the firmware version of the device
var hue
Returns the hue of the device (0-360)
var hue_max
Returns the maximum hue possible. (This always returns 360)
var hue_min
Returns the minimum hue possible. (This always returns 0)
var info
Returns the full Aurora Info request.
Useful for debugging since it's just a fat dump.
var ip_address
var model
Returns the model number of the device. (Always returns 'NL22')
var off
Returns True if the device is off, False if it's on
var on
Returns True if the device is on, False if it's off
var orientation
Returns the orientation of the device (0-360)
var orientation_max
Returns the maximum orientation possible. (This always returns 360)
var orientation_min
Returns the minimum orientation possible. (This always returns 0)
var panel_count
Returns the number of panels connected to the device
var panel_length
Returns the length of a single panel. (This always returns 150)
var panel_positions
Returns a list of all panels with their attributes represented in a dict.
panelId - Unique identifier for this panel x - X-coordinate y - Y-coordinate o - Rotational orientation
var rgb
The color of the device, as represented by 0-255 RGB values
var saturation
Returns the saturation of the device (0-100)
var saturation_max
Returns the maximum saturation possible. (This always returns 100)
var saturation_min
Returns the minimum saturation possible. (This always returns 0)
var serial_number
Returns the serial number of the device


This visualization gives a view of U.S. economic performance over several decades, indicating which years were strong years in which to buy or hold stock, and which years contained economic events that either boosted or wiped out gains from prior years.
Each colored cell represents one year of investment. The Y axis lists the year of investment, while the X axis lists the year of divestment. Therefore, the lower-left corner represents the result of buying long ago and selling long ago. The lower-right corner represents buying long ago and holding over the entire time period. The upper-right corner represents buying and selling very recently.
The data are excess returns, meaning asset return less the risk-free-rate, as measured by Fama & French.
This technique is inspired by an article titled "In Investing, It's When You Start and When You Finish" published by the New York Times on 2 Jan, 2011.
The colors are chosen using Cynthia Brewer's excellent ColorBrewer tool.
The data comes from Ken French's Data Library.


- java.lang.Object
-
- org.joda.money.format.MoneyFormatter
-
- All Implemented Interfaces:
java.io.Serializable
public final class MoneyFormatter extends java.lang.Object implements java.io.Serializable
Formats instances of money to and from a String.Instances of
MoneyFormatter
can be created byMoneyFormatterBuilder
.This class is immutable and thread-safe.
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Locale
getLocale()
Gets the locale to use.boolean
isParser()
Checks whether this formatter can parse.boolean
isPrinter()
Checks whether this formatter can print.MoneyParseContext
parse(java.lang.CharSequence text, int startIndex)
Parses the text extracting monetary information.BigMoney
parseBigMoney(java.lang.CharSequence text)
Fully parses the text into aBigMoney
.Money
parseMoney(java.lang.CharSequence text)
Fully parses the text into aMoney
requiring that the parsed amount has the correct number of decimal places.void
print(java.lang.Appendable appendable, BigMoneyProvider moneyProvider)
Prints a monetary value to anAppendable
converting anyIOException
to aMoneyFormatException
.java.lang.String
print(BigMoneyProvider moneyProvider)
Prints a monetary value to aString
.void
printIO(java.lang.Appendable appendable, BigMoneyProvider moneyProvider)
Prints a monetary value to anAppendable
potentially throwing anIOException
.java.lang.String
toString()
Gets a string summary of the formatter.MoneyFormatter
withLocale(java.util.Locale locale)
Returns a copy of this instance with the specified locale.
-
-
-
Method Detail
-
getLocale
public java.util.Locale getLocale()
Gets the locale to use.- Returns:
- the locale, never null
-
withLocale
public MoneyFormatter withLocale(java.util.Locale locale)
Returns a copy of this instance with the specified locale.Changing the locale may change the style of output depending on how the formatter has been configured.
- Parameters:
locale
- the locale, not null- Returns:
- the new instance, never null
-
isPrinter
public boolean isPrinter()
Checks whether this formatter can print.If the formatter cannot print, an UnsupportedOperationException will be thrown from the print methods.
- Returns:
- true if the formatter can print
-
isParser
public boolean isParser()
Checks whether this formatter can parse.If the formatter cannot parse, an UnsupportedOperationException will be thrown from the print methods.
- Returns:
- true if the formatter can parse
-
print
public java.lang.String print(BigMoneyProvider moneyProvider)
Prints a monetary value to aString
.- Parameters:
moneyProvider
- the money to print, not null- Returns:
- the string printed using the settings of this formatter
- Throws:
java.lang.UnsupportedOperationException
- if the formatter is unable to printMoneyFormatException
- if there is a problem while printing
-
print
public void print(java.lang.Appendable appendable, BigMoneyProvider moneyProvider)
Prints a monetary value to anAppendable
converting anyIOException
to aMoneyFormatException
.Example implementations of
Appendable
areStringBuilder
,StringBuffer
orWriter
. Note thatStringBuilder
andStringBuffer
never throw anIOException
.- Parameters:
appendable
- the appendable to add to, not nullmoneyProvider
- the money to print, not null- Throws:
java.lang.UnsupportedOperationException
- if the formatter is unable to printMoneyFormatException
- if there is a problem while printing
-
printIO
public void printIO(java.lang.Appendable appendable, BigMoneyProvider moneyProvider) throws java.io.IOException
Prints a monetary value to anAppendable
potentially throwing anIOException
.Example implementations of
Appendable
areStringBuilder
,StringBuffer
orWriter
. Note thatStringBuilder
andStringBuffer
never throw anIOException
.- Parameters:
appendable
- the appendable to add to, not nullmoneyProvider
- the money to print, not null- Throws:
java.lang.UnsupportedOperationException
- if the formatter is unable to printMoneyFormatException
- if there is a problem while printingjava.io.IOException
- if an IO error occurs
-
parseBigMoney
public BigMoney parseBigMoney(java.lang.CharSequence text)
Fully parses the text into aBigMoney
.The parse must complete normally and parse the entire text (currency and amount). If the parse completes without reading the entire length of the text, an exception is thrown. If any other problem occurs during parsing, an exception is thrown.
- Parameters:
text
- the text to parse, not null- Returns:
- the parsed monetary value, never null
- Throws:
java.lang.UnsupportedOperationException
- if the formatter is unable to parseMoneyFormatException
- if there is a problem while parsing
-
parseMoney
public Money parseMoney(java.lang.CharSequence text)
Fully parses the text into aMoney
requiring that the parsed amount has the correct number of decimal places.The parse must complete normally and parse the entire text (currency and amount). If the parse completes without reading the entire length of the text, an exception is thrown. If any other problem occurs during parsing, an exception is thrown.
- Parameters:
text
- the text to parse, not null- Returns:
- the parsed monetary value, never null
- Throws:
java.lang.UnsupportedOperationException
- if the formatter is unable to parseMoneyFormatException
- if there is a problem while parsingjava.lang.ArithmeticException
- if the scale of the parsed money exceeds the scale of the currency
-
parse
public MoneyParseContext parse(java.lang.CharSequence text, int startIndex)
Parses the text extracting monetary information.This method parses the input providing low-level access to the parsing state. The resulting context contains the parsed text, indicator of error, position following the parse and the parsed currency and amount. Together, these provide enough information for higher level APIs to use.
- Parameters:
text
- the text to parse, not nullstartIndex
- the start index to parse from- Returns:
- the parsed monetary value, null only if the parse results in an error
- Throws:
java.lang.IndexOutOfBoundsException
- if the start index is invalidjava.lang.UnsupportedOperationException
- if this formatter cannot parse
-
toString
public java.lang.String toString()
Gets a string summary of the formatter.- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string summarising the formatter, never null
-
-


Hello!
My name is Triadi Prabowo, people usually called me Adi. I grew up in Jakarta, Indonesia. I am mostly spent my time coding, playing games, and hang-out with my friends. My latest education is Master of IT (M.I.T) from BINUS University in 2017.
I am striving for excellence and aim to perfection. I like to travel around the world, meeting with people from any backgrounds, or culture. I am always want to be part of interesting and something great, making contribution to community is a thing to be proud of.
I have experienced study abroad in Amsterdam, Netherlands, back when I was pursuing my bachelor degree. At that time, I am making friends from many continents such as Europe, Africa, Asia, and America. We discussed many things from culture to knowledge and we stiil keep in touch until now!
I have experienced working in companies that helped me to improve myself and learn about working in professional environment, managing team members relationship, aim to deliver best results, and knowledge in coding skills.
Expertise
Currently, I am focusing in JavaScript development using Node.js:
- Languages: TypeScript, Vanilla JavaScript, JSX
- Frameworks: Angular.js, Angular 2+ Universal, React.js & Next.js, Express.js, Ionic 1+
- Unit Testing: Jasmine, Jest, Karma
- Templating: pug.js, ejs, handlebar, @nguniversal
- Styling: Stylus, SASS/LESS, styled-components, BEM CSS, CSS Modules, PostCSS
- Styling Frameworks: Bootstrap 3+, Material UI
- Libraries: jQuery, Angular Material, Redux, RxJS, socket.io, Google Maps, Mapbox, Google Firebase, ngCordova, Underscore/Lodash, ImageMagick, passport.js
- Logger / Monitoring Tools: RPM Newrelic, bugsnag, winston.js, morgan, winston-postgres
- Build Tools: Gulp, Webpack
- Web Services: Nginx, apache2, docker.io, pm2
- CI/CD: CircleCI
- Cloud Services: AWS (ec2, s3, rds), DigitalOcean
Research Topic Interest
I would like to be part of your team and looking forward to work with you if you have research based on these topics:
- Mobile Application
- Web Application
- Application Deployment
- Application Architecture
- GPS & GSM
- Tracking & Monitoring Application


TRAINSPOTTING A film review by Edwin Jahiel Copyright 1996 Edwin Jahiel
(UK, 1996)*** Directed by Danny Boyle. Written by John Hodge from the novel by Irvine Welsh.Photography, Brian Tufano. Editing, Masahiro Hirakubo. Production design, Kave Quinn. Cast: Ewan McGregor (Renton), Ewen Bremner (Spud), Jonny Lee Miller (Sick Boy), Kevin McKidd (Tommy), Robert Carlyle (Begbie), Kelly Macdonald (Diane) and Shirley Henderson (Gail). A Miramax release. 93 minutes. Rated R (everything you can imagine in a drug movie). At the Art.
"England and America are two countries divided by a common language." Never has this been so true as in "Trainspotting," even though the US release is said to have been partly or fully redubbed. The film, set mostly among low-class to lower-middle class people in Edinburgh's suburb of Leith, is not spoken in the often colorful, singsong Scottish burr but in a slang that most of us will find from 50 to 75 percent impenetrable, although the almost constant voice-over by the main character, Mark, is relatively clear. The story, however, does come through in its essentials, especially as the younger people who do all the talking do not drop literary gems in the process. This is filmmaking at the opposite pole of Masterpiece Theatre.
Still, I am sorry I didn't see the picture at the Cannes Festival, where it was a most sought-after film among the not competing titles. It was subtitled in French, which means that , ironically, a lot more French people than Americans have gotten the details of dialogues or monologues. There is a short subtitled stretch in "Trainspotting," but that's in a conversation inside a dance-hall where the din is deafening.
The movie is about a group of mostly male friends and co-addicts.  If I understood the goings-on correctly, one pal is clean, another (the violent Begbie) is addicted to drink. Overall though, and no matter what type of addiction, heroin reigns supreme, with its grunge, its glum, its filthy rooms populated mostly by syringes and needles--plus a baby who is neglected.
But then everything else is neglected. The Big H has taken over, has made its victims victimize others (thefts and other crimes) to sustain the habit. A familiar story, rendered unfamiliar up to a point by merciless, harrowing depictions that have little or none of the sentimentality of many other drug movies.
The movie has been a runaway hit in the UK, where it has been repeatedly compared to "A Clockwork Orange" and where it has caused controversies --one criticism being that it does not condemn drugs.
It does not, indeed, not in a preaching way, but it still is powerfully anti-drugs simply by showing what happens to its habituees. On the other hand, while it shows, abundantly, the symptoms, it does not go to the causes --something far more difficult to do and necessitating much more than a mere 93 minutes. There is even a cop-out when Mark says "Who needs reasons when you've got heroin?" -- dumb, dead-end reasoning. And Mark (or one of the group) comes up with the praise of heroin: "Take the best orgasm you ever had, multiply by a thousand, and you're still nowhere near."
Reasons, however, are given. They are in the deja vu, rebel-without-a-cause tradition. Mark gives us the classic, ironic anti-bourgeois-life cause. "Choose life. Choose a job. Choose a career. Choose a family. Choose good health, low cholesterol and dental insurance. Choose fixed-interest mortgage repayments."
The film is at its best when portraying the friends, their milieu, their drug and sexual adventures (there's an instant pickup of a too-young Catholic school girl that flashes right away to sex), and the surrealism of their hallucinations. The most notable one is when a man goes to the "Worst Toilet in Scotland," drops in by mistake a couple of capsules, then plunges in after them in a nightmarish scene that takes him underwater. Next best (?) is when Mark, who has overdosed, is taken to Emergency then back to his parents' home, where, in his bed he gets frightening shakes, sweats, chills and visions.
After a test for AIDS, he says "I'm the luckiest of men. I'm HIV negative in the middle of an epidemic." He then decides to stay clean. But wait... Next, he looks for "something new" which is a respectable job in London. Here the movie fails in its intent. There's a rather sudden transition to Mark in London, walking about the City in a correct business suit, looking like a neat and healthy employee of whatever business it is, and saying in voice-over "For the first time in my life I was almost content."
The way this was presented is so gauche that I thought it was another figment of Mark's imagination --but it was not. Then back in the saddle again, Mark and Co. get in n a deal to buy smack from some Russian sailors and resell it. They asked for 20,000 pounds, got 16,000. Pretty good, and pretty well filmed. So is the testing of the smack by Mark who gets hooked again, but, at the end, in a realistic illustration of "No honor among thieves" sneaks away with the wherewithal to be voluntarily co-opted by the bourgeois life he had so despised.
There's more to this film than I can reveal but essentially, its strength is in the dispassionate way it documents the life of those "unfortunates" who, had they been alcoholics instead, I would have called them "sediment." There are some injections of humor that may or may not work for you.
Within the plethora of "Addiction of the Month" theatrical and TV movies, "Trainspotting" stands as "Addiction of the Year." I wish,for comparison, that I had the time to see again a fierce competitor, the excellent "Panic in Needle Park" (USA, 1971) by Jerry Schatzberg, Al Pacino's second feature and his explosive entrance in the Great Actors class.
The movie's cryptic title refers to the British hobby of standing by passing trains and collecting the numbers on locomotives. This may be taken as an addiction, a useless habit. Stupid perhaps, but at least, benign.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


#assign n0_docs="true"> <#assign n1_query_find="true"> <#assign exists= "true">
The exists query is a convenience that sets the query to only select the Id property, use a maxRows = 1 and tests if the query returns a row.
```java boolean userExists = new QContact<EMAIL_ADDRESS>.exists(); ``` ```sql select t0.id from contact t0 where t0.email = ? limit 1 ```We could instead write this query using findIds() and maxRows() but it is a common enough pattern to perform checks like this that we have this exists query.


Class: Aws::SMS::Client
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
::Seahorse::Client::Base
|
|
|
Instance Chain:
|
|
| Inherits: |
Seahorse::Client::Base
|
| Defined in: | (unknown) |
Overview
An API client for AWS Server Migration Service. To construct a client, you need to configure a :region
and :credentials
.
sms = Aws::SMS::Client.new(
region: region_name,
credentials: credentials,
# ...
)
See #initialize
for a full list of supported configuration options.
Region
You can configure a default region in the following locations:
ENV['AWS_REGION']
Aws.config[:region]
Go here for a list of supported regions.
Credentials
Default credentials are loaded automatically from the following locations:
ENV['AWS_ACCESS_KEY_ID']
andENV['AWS_SECRET_ACCESS_KEY']
Aws.config[:credentials]
- The shared credentials ini file at
~/.aws/credentials
(more information) - From an instance profile when running on EC2
You can also construct a credentials object from one of the following classes:
- ::Aws::Credentials
- ::Aws::SharedCredentials
- ::Aws::InstanceProfileCredentials
- ::Aws::AssumeRoleCredentials
Alternatively, you configure credentials with :access_key_id
and
:secret_access_key
:
# load credentials from disk
creds = YAML.load(File.read('/path/to/secrets'))
Aws::SMS::Client.new(
access_key_id: creds['access_key_id'],
secret_access_key: creds['secret_access_key']
)
Always load your credentials from outside your application. Avoid configuring credentials statically and never commit them to source control.
Class Method Summary
-
.new(options = {}) ⇒ Aws::SMS::Client
constructor
Constructs an API client.
::Seahorse::Client::Base - Inherited
| .add_plugin | Registers a plugin with this client. |
| .api, .clear_plugins, .define, | |
| .extend | Alias for Seahorse::Client::Base.define. |
| .new | See additional method definition at line 18. |
| .plugins | Returns the list of registered plugins for this Client. |
| .remove_plugin, .set_api, .set_plugins |
Instance Attribute Summary
::Seahorse::Client::Base - Inherited
Instance Method Summary
-
#create_replication_job(options = {}) ⇒ Types::CreateReplicationJobResponse
The CreateReplicationJob API is used to create a ReplicationJob to replicate a server on AWS.
-
#delete_replication_job(options = {}) ⇒ Struct
The DeleteReplicationJob API is used to delete a ReplicationJob, resulting in no further ReplicationRuns.
-
#delete_server_catalog(options = {}) ⇒ Struct
The DeleteServerCatalog API clears all servers from your server catalog.
-
#disassociate_connector(options = {}) ⇒ Struct
The DisassociateConnector API will disassociate a connector from the Server Migration Service, rendering it unavailable to support replication jobs.
-
#get_connectors(options = {}) ⇒ Types::GetConnectorsResponse
The GetConnectors API returns a list of connectors that are registered with the Server Migration Service.
-
#get_replication_jobs(options = {}) ⇒ Types::GetReplicationJobsResponse
The GetReplicationJobs API will return all of your ReplicationJobs and their details.
-
#get_replication_runs(options = {}) ⇒ Types::GetReplicationRunsResponse
The GetReplicationRuns API will return all ReplicationRuns for a given ReplicationJob.
-
#get_servers(options = {}) ⇒ Types::GetServersResponse
The GetServers API returns a list of all servers in your server catalog.
-
#import_server_catalog(options = {}) ⇒ Struct
The ImportServerCatalog API is used to gather the complete list of on-premises servers on your premises.
-
#start_on_demand_replication_run(options = {}) ⇒ Types::StartOnDemandReplicationRunResponse
The StartOnDemandReplicationRun API is used to start a ReplicationRun on demand (in addition to those that are scheduled based on your frequency).
-
#update_replication_job(options = {}) ⇒ Struct
The UpdateReplicationJob API is used to change the settings of your existing ReplicationJob created using CreateReplicationJob.
-
#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ Boolean
Waiters polls an API operation until a resource enters a desired state.
-
#waiter_names ⇒ Array<Symbol>
Returns the list of supported waiters.
::Seahorse::Client::Base - Inherited
| #build_request | Builds and returns a |
| #operation, #operation_names |
::Seahorse::Client::HandlerBuilder - Included
Constructor Details
.new(options = {}) ⇒ Aws::SMS::Client
Constructs an API client.
Instance Method Details
#create_replication_job(options = {}) ⇒ Types::CreateReplicationJobResponse
The CreateReplicationJob API is used to create a ReplicationJob to replicate a server on AWS. Call this API to first create a ReplicationJob, which will then schedule periodic ReplicationRuns to replicate your server to AWS. Each ReplicationRun will result in the creation of an AWS AMI.
#delete_replication_job(options = {}) ⇒ Struct
The DeleteReplicationJob API is used to delete a ReplicationJob, resulting in no further ReplicationRuns. This will delete the contents of the S3 bucket used to store SMS artifacts, but will not delete any AMIs created by the SMS service.
#delete_server_catalog(options = {}) ⇒ Struct
The DeleteServerCatalog API clears all servers from your server catalog. This means that these servers will no longer be accessible to the Server Migration Service.
#disassociate_connector(options = {}) ⇒ Struct
The DisassociateConnector API will disassociate a connector from the Server Migration Service, rendering it unavailable to support replication jobs.
#get_connectors(options = {}) ⇒ Types::GetConnectorsResponse
The GetConnectors API returns a list of connectors that are registered with the Server Migration Service.
#get_replication_jobs(options = {}) ⇒ Types::GetReplicationJobsResponse
The GetReplicationJobs API will return all of your ReplicationJobs and their details. This API returns a paginated list, that may be consecutively called with nextToken to retrieve all ReplicationJobs.
#get_replication_runs(options = {}) ⇒ Types::GetReplicationRunsResponse
The GetReplicationRuns API will return all ReplicationRuns for a given ReplicationJob. This API returns a paginated list, that may be consecutively called with nextToken to retrieve all ReplicationRuns for a ReplicationJob.
#get_servers(options = {}) ⇒ Types::GetServersResponse
The GetServers API returns a list of all servers in your server catalog. For this call to succeed, you must previously have called ImportServerCatalog.
#import_server_catalog(options = {}) ⇒ Struct
The ImportServerCatalog API is used to gather the complete list of on-premises servers on your premises. This API call requires connectors to be installed and monitoring all servers you would like imported. This API call returns immediately, but may take some time to retrieve all of the servers.
#start_on_demand_replication_run(options = {}) ⇒ Types::StartOnDemandReplicationRunResponse
The StartOnDemandReplicationRun API is used to start a ReplicationRun on demand (in addition to those that are scheduled based on your frequency). This ReplicationRun will start immediately. StartOnDemandReplicationRun is subject to limits on how many on demand ReplicationRuns you may call per 24-hour period.
#update_replication_job(options = {}) ⇒ Struct
The UpdateReplicationJob API is used to change the settings of your existing ReplicationJob created using CreateReplicationJob. Calling this API will affect the next scheduled ReplicationRun.
#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ Boolean
Waiters polls an API operation until a resource enters a desired state.
Basic Usage
Waiters will poll until they are succesful, they fail by entering a terminal state, or until a maximum number of attempts are made.
# polls in a loop, sleeping between attempts client.waiter_until(waiter_name, params)
Configuration
You can configure the maximum number of polling attempts, and the
delay (in seconds) between each polling attempt. You configure
waiters by passing a block to #wait_until
:
# poll for ~25 seconds
client.wait_until(...) do |w|
w.max_attempts = 5
w.delay = 5
end
Callbacks
You can be notified before each polling attempt and before each
delay. If you throw :success
or :failure
from these callbacks,
it will terminate the waiter.
started_at = Time.now
client.wait_until(...) do |w|
# disable max attempts
w.max_attempts = nil
# poll for 1 hour, instead of a number of attempts
w.before_wait do |attempts, response|
throw :failure if Time.now - started_at > 3600
end
end
Handling Errors
When a waiter is successful, it returns true
. When a waiter
fails, it raises an error. All errors raised extend from
::Aws::Waiters::Errors::WaiterFailed.
begin
client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
# resource did not enter the desired state in time
end
#waiter_names ⇒ Array
<Symbol
>
Returns the list of supported waiters. The following table lists the supported waiters and the client method they call:
| Waiter Name | Client Method | Default Delay: | Default Max Attempts: |
|---|


Wiggam Week 3: Garment, Sublimation, UV Printing
In this week we started to expand to multiple machines. First we madea t-shirt to either represent Hudson or Western Reserve
Academy. Secondly we used the UV Printer in which I made a golf ball. Lastly, we used sublimation in which I designed a gaming mousepad. This
mousepad was designed with a CSGO "fire and ice" theme with my favorite teams and gaming companies bordering the mousepad. It
was completed with my gamertag at the bottom.