import {MatFormFieldModule} from '@angular/material/form-field';
MatLabel
The floating label for a mat-form-field
.
Selector: mat-label
MatError
Single error message to be shown underneath the form-field.
Selector: mat-error [matError]
| Name | Description |
|---|---|
@Input()
|
MatHint
Hint text to be shown underneath the form field control.
Selector: mat-hint
| Name | Description |
|---|---|
@Input()
|
Whether to align the hint label at the start or end of the line. |
@Input()
|
Unique ID for the hint. Used for the aria-describedby on the form field control. |
MatPrefix
Prefix to be placed in front of the form field.
Selector: [matPrefix] [matIconPrefix] [matTextPrefix]
MatSuffix
Suffix to be placed at the end of the form field.
Selector: [matSuffix] [matIconSuffix] [matTextSuffix]
MatFormField
Container for form controls that applies Material Design styling and behavior.
Selector: mat-form-field
Exported as: matFormField| Name | Description |
|---|---|
@Input()
|
The form field appearance style. |
@Input()
|
The color palette for the form field. |
@Input()
|
Whether the label should always float or float as the user types. |
@Input()
|
Whether the required marker should be hidden. |
@Input()
|
Text for the form field hint. |
@Input()
|
Whether the form field should reserve space for one line of hint/error text (default) or to have the spacing grow from 0px as needed based on the size of the hint/error content. Note that when using dynamic sizing, layout shifts will occur when hint/error text changes. |
| getConnectedOverlayOrigin | |
|---|---|
|
Gets an ElementRef for the element that a overlay attached to the form field should be positioned relative to. |
|
| Returns | |
ElementRef
|
|
| getLabelId | |
|---|---|
|
Gets the id of the label element. If no label is present, returns |
|
| Returns | |
string | null
|
|
MatFormFieldControl
An interface which allows a control to work inside of a MatFormField
.
| Name | Description |
|---|---|
|
Whether the input is currently in an autofilled state. If property is not present on the control it is assumed to be false. |
|
An optional name for the control type that can be used to distinguish |
|
Whether the control is disabled. |
|
Whether the control is empty. |
|
Whether the control is in an error state. |
|
Whether the control is focused. |
|
The element ID for this control. |
|
Gets the AbstractControlDirective for this control. |
|
The placeholder for this control. |
|
Whether the control is required. |
|
Whether the |
|
Stream that emits whenever the state of the control changes such that the parent |
|
Value of |
|
The value of the control. |
| onContainerClick | |
|---|---|
|
Handles a click on the control's container. |
|
| Parameters | |
|
event MouseEvent
|
|
| setDescribedByIds | |
|---|---|
|
Sets the list of element IDs that currently describe this control. |
|
| Parameters | |
|
ids string[]
|
|
MatFormFieldDefaultOptions
Represents the default options for the form field that can be configured
using the MAT_FORM_FIELD_DEFAULT_OPTIONS
injection token.
| Name | Description |
|---|---|
|
Default form field appearance style. |
|
Default color of the form field. |
|
Whether the label for form fields should by default float |
|
Whether the required marker should be hidden by default. |
|
Whether the form field should reserve space for one line by default. |
FloatLabelType
Type for the available floatLabel values.
type FloatLabelType = 'always' | 'auto';
MatFormFieldAppearance
Possible appearance styles for the form field.
type MatFormFieldAppearance = 'fill' | 'outline';
SubscriptSizing
Behaviors for how the subscript height is set.
type SubscriptSizing = 'fixed' | 'dynamic';
MAT_ERROR
Injection token that can be used to reference instances of MatError
. It serves as
alternative token to the actual MatError
class which could cause unnecessary
retention of the class and its directive metadata.
const MAT_ERROR: InjectionToken<MatError>;
MAT_PREFIX
Injection token that can be used to reference instances of MatPrefix
. It serves as
alternative token to the actual MatPrefix
class which could cause unnecessary
retention of the class and its directive metadata.
const MAT_PREFIX: InjectionToken<MatPrefix>;
MAT_SUFFIX
Injection token that can be used to reference instances of MatSuffix
. It serves as
alternative token to the actual MatSuffix
class which could cause unnecessary
retention of the class and its directive metadata.
const MAT_SUFFIX: InjectionToken<MatSuffix>;
MAT_FORM_FIELD
Injection token that can be used to inject an instances of MatFormField
. It serves
as alternative token to the actual MatFormField
class which would cause unnecessary
retention of the MatFormField
class and its component metadata.
const MAT_FORM_FIELD: InjectionToken<MatFormField>;
MAT_FORM_FIELD_DEFAULT_OPTIONS
Injection token that can be used to configure the default options for all form field within an app.
const MAT_FORM_FIELD_DEFAULT_OPTIONS: InjectionToken<MatFormFieldDefaultOptions>;


This site uses JavaScript. You must allow JavaScript in your browser.
Your browser does not support iframes.


The configuration from the selected branch will be copied into the current branch
({{config.targetBranch.name}}).
If both the source and the target branches belong to the same project, following items will be copied
over:
- Promotion levels and their properties
- Validation stamps and their properties
- Properties
- User build filters
If the source and the target branches do not belong to the same project, following items will be copied
over:
- Promotion levels and their properties
- Validation stamps and their properties
Items already existing in the target branch will not be overridden.
Note that properties and descriptions of all items can be adjusted during the copy
by using the regular expressions
and replacement expressions.


| Package | Description |
|---|---|
| data.managers | |
| data.map | |
| models.directfire | |
| models.movement | |
| sim.entity | |
| sim.obstacles | |
| sim.route | |
| utils | |
| view |
| Modifier and Type | Method and Description |
|---|---|
java.util.Vector<Entity> |
EntityList.findWithin(Coordinate coordinate,
double radius)
Find all entities with a circle centred on the supplied coordinate.
|
private void |
EntityList.testCircle(Coordinate coordinate,
double radius) |
| Modifier and Type | Field and Description |
|---|---|
private Coordinate |
Map.lowerLeft |
private Coordinate |
Map.upperRight |
| Modifier and Type | Method and Description |
|---|---|
Coordinate |
Map.getLL() |
Coordinate |
Map.getUR() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
Map.anyCraters(Coordinate c1,
Coordinate c2) |
static double |
Coordinate.direction(Coordinate c1,
Coordinate c2) |
static double |
Coordinate.distance2D(Coordinate c1,
Coordinate c2) |
static double |
Coordinate.distanceSquare2D(Coordinate c1,
Coordinate c2) |
double |
Map.getAreaHeight(Coordinate c) |
AreaType |
Map.getAreaType(Coordinate c) |
double |
Map.getElevation(Coordinate c) |
RiverType |
Map.getRiverType(Coordinate c) |
RoadType |
Map.getRoadType(Coordinate c) |
double |
Map.getSlope(Coordinate c1,
Coordinate c2) |
Building |
Map.inBuilding(Coordinate c) |
boolean |
Map.onMap(Coordinate c) |
| Constructor and Description |
|---|
Coordinate(Coordinate c) |
| Modifier and Type | Method and Description |
|---|---|
private Coordinate |
DirectFireImpactEvent.selectAimPoint(TargetEntity target) |
| Modifier and Type | Field and Description |
|---|---|
private Coordinate |
MoveEvent.newLocation |
private Coordinate |
TestMoveEventOld.testCurrentLocation |
private Coordinate |
TestMoveEventOld.testObjective |
| Modifier and Type | Method and Description |
|---|---|
private Coordinate |
MoveEvent.calculateFormation()
Calculate where the entity should be relative to the formation leader.
|
private Coordinate |
MoveEvent.getObjective()
Get the objective location this entity is attempting to move to.
|
private Coordinate |
MoveEvent.whereTo()
Determine where the entity is trying to move to.
|
private Coordinate |
MoveEvent.whereToCircle()
Tests if the entity is following a circle order.
|
private Coordinate |
MoveEvent.whereToFormation()
Test to see if the entity is part of a formation.
|
private Coordinate |
MoveEvent.whereToMount()
Tests if the entity has a mount order.
|
private Coordinate |
MoveEvent.whereToMove()
Determine where the entity should move to.
|
private Coordinate |
MoveEvent.whereToPit()
Tests if the entity has a pit order.
|
private Coordinate |
MoveEvent.whereToRoute()
Test if the entity has a valid movement route to follow.
|
| Modifier and Type | Method and Description |
|---|---|
private double |
MoveEvent.calculateDirection(Coordinate oldLocation,
Coordinate newLocation)
Calculate the direction of movement between the entity's current location
and its new one.
|
private double |
MoveEvent.checkCraters(double speed,
Coordinate currentLocation,
Coordinate objective)
Check if the entity's movement will cross a crater and adjust speed
if necessary.
|
private boolean |
MoveEvent.doMove(Coordinate moveObjective)
Perform the move calculation.
|
private void |
MoveEvent.drawLane(Coordinate c1,
Coordinate c2)
Update the minefield lane this entity is creating.
|
private double |
MoveEvent.getSpeed(Coordinate moveObjective)
Calculate the speed the entity can move.
|
private void |
MoveEvent.moveFlyer(Coordinate objective)
The entity is a flier, so perform the movement calculations.
|
private void |
MoveEvent.moveGround(Coordinate objective)
The entity is a ground mover, so perform the appropriate movement calculation.
|
private double |
MoveEvent.moveStep(Coordinate objective)
Perform one step of movement.
|
private double |
MoveEvent.speedDue2Veg(double speed,
Coordinate moveObjective)
Calculate the best speed for the entity given the vegetation it is moving through.
|
private double |
MoveEvent.veloc(double speed,
Coordinate moveObjective)
Calculate the speed based on terrain.
|
private boolean |
MoveEvent.waitingForMyBridge(Platform platform,
Coordinate currentLocation)
Determine if a bridge needs to be recovered or deployed.
|
| Modifier and Type | Field and Description |
|---|---|
private Coordinate |
Entity.circle |
private Coordinate |
Entity.currentLocation |
private Coordinate |
Entity.moveTo |
private Coordinate |
Entity.viewSpot |
| Modifier and Type | Method and Description |
|---|---|
Coordinate |
MoverEntity.getCircle()
If this entity is currently circling, get the coordinate for the
centre of the circle.
|
Coordinate |
Entity.getCircle() |
Coordinate |
TargetEntity.getLocation() |
Coordinate |
ObserverEntity.getLocation() |
Coordinate |
MoverEntity.getLocation()
Get the current location for this entity.
|
Coordinate |
FirerEntity.getLocation() |
Coordinate |
Entity.getLocation() |
Coordinate |
DetectedEntity.getLocation() |
Coordinate |
CarrierEntity.getLocation() |
Coordinate |
MoverEntity.getMoveTo()
Get the location the entity is moving to if it has a move order.
|
Coordinate |
Entity.getMoveTo() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Vector<Coordinate> |
TargetEntity.getElementLocations() |
java.util.Vector<Coordinate> |
Entity.getElementLocations() |
| Modifier and Type | Method and Description |
|---|---|
void |
Entity.setCircle(Coordinate c) |
void |
MoverEntity.setLocation(Coordinate coordinate)
Update the entity's location.
|
void |
Entity.setLocation(Coordinate c) |
void |
MoverEntity.setMoveTo(Coordinate coordinate)
Set the location the entity has been ordered to move to.
|
void |
Entity.setMoveTo(Coordinate c) |
| Modifier and Type | Field and Description |
|---|---|
private Coordinate |
Pit.myLocation |
| Modifier and Type | Method and Description |
|---|---|
Coordinate |
Pit.getLocation() |
| Modifier and Type | Method and Description |
|---|---|
void |
Pit.setLocation(Coordinate location) |
| Modifier and Type | Field and Description |
|---|---|
protected Coordinate |
Node.location |
| Modifier and Type | Method and Description |
|---|---|
Coordinate |
Node.getLocation() |
| Modifier and Type | Method and Description |
|---|---|
void |
Node.setLocation(Coordinate c) |
| Modifier and Type | Method and Description |
|---|---|
static Coordinate |
Parser.parseCoordinate(Coordinate reference,
java.lang.String xstring,
java.lang.String ystring) |
| Modifier and Type | Method and Description |
|---|---|
static Coordinate |
Parser.parseCoordinate(Coordinate reference,
java.lang.String xstring,
java.lang.String ystring) |
| Modifier and Type | Method and Description |
|---|---|
void |
EntityListener.updateLocation(Entity entity,
Coordinate location) |


?2
3
111
ANNOTATION
LABEL.
Oenothera
rosea
L'Her
ex
Ait.
oetikminedBY
p#H.
Raven
&
D.R.
Parnell
FLORA
OF
THE
BERMUDA
ISLANDS
COLLECTED
BY
F.
S.
COLLINS
(Determined
at
and
distributed-from
the
Gray
Herbarium).
N
o.Jjfo
(Qjisv
uytl'UiAXU
OU'
aÀk
sLoclx,
(03-
1970
Z.&
yvtfM
">'3
~yi(yvdL
01447756
Legend -
Level of confidence that token is an accurately-transcribed word
extremely low
very low
low
undetermined
medium
high
very high


Select the Chinese city or cities you want to visit
Follow our pre-set timeline for everything you’ll need on your trip from start to finish. P.S you can also skip over any services you don’t need!
Travel independently with the convenience and freedom you are entitled to have! No fuss, no muss, just explore.
1-2-3, Straight to Your Doorstep
1. Download Form/Pay visa fee from site (step by step fill in advice) and submit back to site
2. Bring your passport to the nearest Fedex/UPS/USPS and give them our account number
3. 1-2 Week Guarantee, Receive Passport with visa in mail
Direct Line from Customer to Local Consultant
1. Type in when-to-when you’ll be in China as well as location
2. Select from list of our available partner tour guides (along with their ratings, availability, etc)
3. Book and get in direct contact with guide through our site
Private PreBooked Taxi/Chauffeur Service
1. Type in date, pickup AND dropoff location and time in pre-set, hourly updated booking table
2. Select from list of available partner drivers and receive: name, number, license plate, car make-model-and color
Two 24/7 Options Just For You
1. LIVE OPTION: Use our live interpretation module service (press the app key and your interpreter would be made available)
2. OFFLINE OPTION: Use Pleco service, offline English to Chinese, and Chinese to English dictionary for translation and communication
Flights, Hotels, Hostels, Motels, and Rental Lodging
Directly book flights via Cheapoair.com, hotels via bookings.com, rental lodging via Airbnb and hostels via hostelworld.com through our site.
All verified for use in China
Use Facebook, etc Whenever and Wherever You Want
Directly purchase and download Astrill VPN to your computer, tablet, or cellphone on our site via Astrill (verified best VPN for China)
Call, Text, Internet, and Use Our App On-The-Go
1. Select from list of data packages along with dates you want to rent the smartphone
2. Choose to pickup phone at airport from tour guide, driver or have it delivered to your accommodations
3. Smartphone will be delivered to your chosen location
Not Just Travelers, Learn from Local Expatriates
Directly access through our site to advice forums on Chinese tips on local expat network sites (CQexpat for Chongqing, Beijinger for Beijing)
A diplomatic exchange between the East and the West through private travel


Script is required. Please give this page the permission to run scripts and use a different browser, reload the page, or wait if it doesn't work.


Want to get fancy? You can pass options to the installer by adding them to the end of the command, like this:
sh <(curl -s https://install.openshift.com/) -e -s rhsm -u<EMAIL_ADDRESS>Here are some useful settings:
-a, --advanced-mode Enable access to message server and db server customization. -c, --config-file FILEPATH The path to an alternate config file -w, --workflow WORKFLOW_ID The installer workflow for unattended deployment. -e, --enterprise-mode Show OpenShift Enterprise options (ignored in unattended mode) -s, --subscription-type TYPE The software source for installation packages. -u, --username USERNAME Red Hat Login username -p, --password PASSWORD Red Hat Login password -d, --debug Enable debugging messages
Origin is the upstream community project for OpenShift Enterprise. There's no better place to develop your new feature and have it battle tested. The best way to try out the latest code is with the all-in-one Docker image.
Want to get fancy? You can pass options to the installer by adding them to the end of the command, like this:
sh <(curl -s https://install.openshift.com/) -e -s rhsm -u<EMAIL_ADDRESS>Here are some useful settings:
-a, --advanced-mode Enable access to message server and db server customization. -c, --config-file FILEPATH The path to an alternate config file -w, --workflow WORKFLOW_ID The installer workflow for unattended deployment. -e, --enterprise-mode Show OpenShift Enterprise options (ignored in unattended mode) -s, --subscription-type TYPE The software source for installation packages. -u, --username USERNAME Red Hat Login username -p, --password PASSWORD Red Hat Login password -d, --debug Enable debugging messages
Want to get fancy? You can pass options to the installer by adding them to the end of the command, like this:
sh <(curl -s https://install.openshift.com/) -e -s rhsm -u<EMAIL_ADDRESS>Here are some useful settings:
-a, --advanced-mode Enable access to message server and db server customization. -c, --config-file FILEPATH The path to an alternate config file -w, --workflow WORKFLOW_ID The installer workflow for unattended deployment. -e, --enterprise-mode Show OpenShift Enterprise options (ignored in unattended mode) -s, --subscription-type TYPE The software source for installation packages. -u, --username USERNAME Red Hat Login username -p, --password PASSWORD Red Hat Login password -d, --debug Enable debugging messages
Want to get fancy? You can pass options to the installer by adding them to the end of the command, like this:
sh <(curl -s https://install.openshift.com/) -e -s rhsm -u<EMAIL_ADDRESS>Here are some useful settings:
-a, --advanced-mode Enable access to message server and db server customization. -c, --config-file FILEPATH The path to an alternate config file -w, --workflow WORKFLOW_ID The installer workflow for unattended deployment. -e, --enterprise-mode Show OpenShift Enterprise options (ignored in unattended mode) -s, --subscription-type TYPE The software source for installation packages. -u, --username USERNAME Red Hat Login username -p, --password PASSWORD Red Hat Login password -d, --debug Enable debugging messages


| DOSE: T+ 0:00 |
60 mg |
IM |
DPT |
| T+ 0:15 |
12 mg |
insufflated |
DPT |
My mood was slightly depressed at the time of the trip, but I was excited about trying DPT as it is something I have been wanting to try for a long time.
4:30pm I inject 60mg of DPT
4:35 I am starting to feel it just a bit
4:40 I am maybe at a weak +2, mild visuals are starting. No nausea yet.
4:45 It is just a little stronger. I snort another 12mg because I do not think the 60mg was enough.
4:50 Feeling moderate nausea, I am going up fast. Now at a med. +3. Visuals getting intense
4:55 Nausea is pretty bad now, I may vomit soon. Hands are getting a little shaky. The trip is not interesting or pleasant. There are swirls and streaks of visuals. They are moving too fast. I feel disoriented. I hear sounds that are similar to airplanes flying by.
5:10 Nausea has not gotten any worse. Pleasant rushes move up and down my body. The sounds have stopped. When I move my fingers or pick things up, my hands tremble. The visuals come in waves. They are very intense at the peaks, but I am not paying much attention to them. The visuals are quite different from any others I have seen. Euphoria is setting in. My mind seems to be expanding.
5:20 The nausea has decreased quite a bit. The pleasant rushes and chills have intensified. I have a feeling that my body and reality are melting. My mind is connecting to a vast consciousness. My soul is being filled with warmth. It feels that I understand something about the nature of reality that can't be put into words.
5:45 The nausea is almost gone. I go from feelings of peace and calmness to extreme euphoria. I have a feeling that everything will be ok and is just as it should be. My view of reality has changed, and nothing seems real. I can physically feel how it has partly melted away. It is hard to tell exactly what I am. I can feel part of myself on the ceiling and in/on other inanimate objects. The visuals are intense when I notice them, but I am not focusing on them. My mind feels like it is partially dissolved in the vast consciousness. There is no anxiety and no darkness to be found here. Everything is beautiful, colors have never seemed so vibrant.
5:55 The vast consciousness is expanding in all directions. It is shaped like a cd without the hole in the middle. My mind is just a ripple or a wave in this consciousness. I can see that this is what we all are. I am filled with warmth and light. This would be a +4 if I could only become a little more immersed in the experience. I am not quite disconnected from reality enough for that. It is not that I am trying to resist it, I just did not take quite enough. The euphoria is bordering on pure bliss. The body high is very pleasant also.
6:30 Things are still pretty much the same as they were half an hour ago. I am somewhat more connected to my body, not feeling my self in other objects. I still feel myself in the expanding consciousness. What this consciousness is, I do not know. Maybe it is god, or the universe. It is impossible to describe the feelings I am having, but you probably understand if you have tripped enough.
7:00-8:00 The intensity is dropping off gradually. My mind is coming back together. I feel as if my soul has been cleansed. Everything seems new and like I am experiencing them for the first time. My hands are still shaky. The body high may be decreasing. I am filled with joy.
8:15 Down to a medium +2. Body high is much weaker. The newness is still there. Euphoria has decreased. I am wishing it would not end, but I have college tomorrow and could not have tripped on anything that lasted longer. I have a feeling that life is going to be better. I have a slight headache now but it may not be due to the DPT. I had a headache earlier today.
9:00 Down to a +1. Hand tremors have stopped, body high is almost gone. Things still seem just a little unreal, but I am almost back to normal. There is still some very light visual patterning and quite a bit of static. I feel great!
10:00 Just about to baseline. Still slight feelings of unrealness. Visuals are almost gone, just more static than usual. I feel a strong sense of well-being. I feel as if I have been cleansed within. These last 5 hours have been amazing!
2:00 AM This is about the time that I get to sleep, still with a slight feeling of unreality.
Next day: I feel tired from a lack of sleep, but my mood is very good.
It has been two days since the trip, and I still feel much better than usual. I have a feeling of optimism and I am normally pessimistic. This improvement should last 2-4 weeks before I return completely to my typical depressed state. That is how long it usually lasts. I will probably trip again soon after that happens. Maybe it will last longer this time. I would have to say that DPT is one of the best psychedelics I have tried. The side effects were not too bad and after the come-up there was no darkness or anxiety at all. I came close to a +4, and this was the first time I have used this substance. I'll be looking forward to doing this again!
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


#include <hwlib-i2c.hpp>
Public Member Functions | |
| virtual void | write_bit (bool x)=0 |
| output a single bit | |
| virtual bool | read_bit ()=0 |
| input (read) a single bit | |
| virtual void | write_start ()=0 |
| output a start bit | |
| virtual void | write_stop ()=0 |
| output a stop bit | |
| virtual bool | read_ack () |
| virtual void | write_ack () |
| virtual void | write_nack () |
| virtual void | write (uint8_t x) |
| virtual void | write (const uint8_t data[], size_t n) |
| virtual uint_fast8_t | read_byte () |
| virtual void | read (bool first_read, uint8_t data[], size_t n) |
i2c primitives abstraction
This class abstracts the primitive i2c operations, on which the higher-level read and write transactions can be implemented.
An implementation must implement these operations:
An implementation can implement these operations (when it can perform these functions more efficiently than the default implementatiosn):
The default implementations do handle neither bus contention nor clock-stretching by a slave.
|
inlinevirtual |
input (read) multiple bytes
The default implementation calls, for each byte
|
inlinevirtual |
input (read) and return an ack
The default implementation inputs a bit and returns its inverse.
|
inlinevirtual |
input (read) a byte
The default implementation inputs 8 bits and returns them as a byte.
|
inlinevirtual |
output (write) a single byte
The default implementation outputs the 8 bits.
|
inlinevirtual |
output (write) multiple bytes
The default implementation calls, for each byte
|
inlinevirtual |
output an ack bit
The default implementation outputs a 0 bit.
|
inlinevirtual |
output a nack bit
The default implementation outputs a 1 bit.


Agenda
- Blog Demos
- Business Items
- Wrapping Up Site
- Django!
Machine Learning Review
Let's talk about when to move this in our class.
Feedback will come before Tuesday
For Demos
Be sure to show what didn't go as plan from following tutorials.
5 Minute Demos of Text Based Games
What Else?
How can we finish this site tonight?


Coverage Summary for Class: UserApp (core.statistics.balance.user)
| Class | Class, % | Method, % | Line, % |
|---|---|---|---|
| UserApp | 0% (0/ 1) | 0% (0/ 7) | 0% (0/ 35) |
1 package core.statistics.balance.user;
2
3 import core.components.Bicycle;
4 import core.components.ElectricalBicycle;
5 import core.components.MechanicalBicycle;
6 import core.components.User;
7 import core.system.MyVelibSystem;
8
9 /**
10 * The Main class in statistics.balance.user : This class has all the algorithms and methods that we need to calculate the statistics
11 * in the application for users, that is to say, standard users or managers.
12 */
13 public class UserApp {
14
15 /**
16 * Getter for the number of rides (or rentings). If the user is still with a bicycle, it will show here a message.
17 *
18 * @param user The user that is being studied
19 * @return an integer that represents the number of rides (or rentings)
20 */
21 public static int getNumberOfRides(User user) {
22 if (user.getBicycle() == null) {
23 return user.getNumberOfRentings();
24 } else {
25 System.out.println("You last ride is still active!");
26 return user.getNumberOfRentings();
27 }
28 }
29
30 /**
31 * Getter for the time spend on bicycle type (Electrical, Mechanical, or other future types due to the Design Patterns used)
32 *
33 * @param user the user
34 * @param bicycle an instance of the bicycle type that we need
35 * @return a double that represents the time spent [in minutes]
36 */
37 public static double getTimeSpentOnBicycle(User user, Bicycle bicycle) {
38 if (bicycle instanceof ElectricalBicycle) {
39 return getTimeSpentOnElectricalBicycle(user);
40 } else if (bicycle instanceof MechanicalBicycle) {
41 return getTimeSpentOnMechanicalBicycle(user);
42 } else {
43 return 0;
44 }
45 }
46
47 /**
48 * Getter for the time credit earned by a user. It calls the getter in the user class
49 *
50 * @param user The used that is being studied
51 * @return The time credit earned by the user in the current time of the application
52 */
53 public static double getTimeCreditEarned(User user) {
54 return user.getTimeCreditBalance();
55 }
56
57 /**
58 * This method is used to get the time spent on electrical bicycles.
59 *
60 * @param user the user that is being studied
61 * @return the time spent on electrical bicycle
62 */
63 public static double getTimeSpentOnElectricalBicycle(User user) {
64 return user.getTimeSpentOnElectricalBicycle();
65 }
66
67 /**
68 * This method is used to get the time spent on mechanical bicycles.
69 *
70 * @param user the user that is being studied
71 * @return the time spent on mechanical bicycle
72 */
73 public static double getTimeSpentOnMechanicalBicycle(User user) {
74 return user.getTimeSpentOnMechanicalBicycle();
75 }
76
77 /**
78 * This method is used to get the informations of users and compute relevant parameters for the users in a give system
79 * parameter 1 : average user balance
80 * parameter 2 : average of all charged money
81 * parameter 3 : user who paid the most in the system
82 *
83 * @param system the system that will be studied
84 */
85 public static void userBalance(MyVelibSystem system) {
86
87 // Calculate the average user balance
88 double averageUserBalance = 0; // Initialize the average to zero
89
90 for (User user : system.getUsers()) {
91 averageUserBalance += user.getMoney();
92 }
93 averageUserBalance /= system.getUsers().size();
94
95 System.out.println("The average user balance is: " + averageUserBalance + "!");
96 System.out.println(); // skip line
97
98
99 // Calculate the average of all charged money
100 double averageOfAllChargedMoney = 0;
101
102 for (User user : system.getUsers()) {
103 averageOfAllChargedMoney += user.getAllMoneyCharged();
104 }
105
106 averageOfAllChargedMoney /= system.getUsers().size();
107
108 System.out.println("The average of all charged money is: " + averageOfAllChargedMoney + "!");
109 System.out.println();
110
111
112 // Calculate the user that paid the most to the myVelib system
113 User userWhoPaidTheMost = system.getUsers().get(0); // Take the first user
114
115 for (User user : system.getUsers()) {
116
117 // If user has a higher allChargedMoney parameter, we change
118 if (user.getAllMoneyCharged() > userWhoPaidTheMost.getAllMoneyCharged()) {
119 userWhoPaidTheMost = user;
120 }
121
122 }
123
124 System.out.println("User who paid the most to the system is: " + userWhoPaidTheMost + "!");
125 System.out.println();
126
127 }
128 }


Severely malnourished girl found by police after teacher's tip
Ohio: Authorities have charged the husband of a malnourished 11-year-old girl's legal guardian.
Authorities learned about the girl's mistreatment from a teacher administering an online test, local television WXIX-TV reported. The girl said she was hungry and explained she was given just a small plate of rice each day.
The girl weighed 21.3 kilograms, roughly 20kg below the average weight for a girl her age. Authorities said she lived in deplorable conditions in a locked trailer monitored by a surveillance camera.
The girl was living in filth and had been isolated for years, forced to sleep at times on a urine-stained mattress, said Brown County prosecutor Zac Corbin.
She was homeschooled and took the online test from home so that she could remain being taught there, authorities said.
WXIX-TV reported 61-year-old Charles Breeze was in custody at a Cincinnati hospital. Breeze was indicted Brown County on endangering children, felonious assault and kidnapping charges.
Forty-seven-year-old Margaret Breeze was indicted on those charges last month. It's unclear whether Charles Breeze has an attorney.
AP


Initializes summary writing for graph execution mode.
tf.compat.v1.summary.initialize( graph=None, session=None )
This operation is a no-op when executing eagerly.
This helper method provides a higher-level alternative to using
tf.contrib.summary.summary_writer_initializer_op
and
tf.contrib.summary.graph
.
Most users will also want to call tf.compat.v1.train.create_global_step
which can happen before or after this function is called.
graph
: A tf.Graph
or tf.compat.v1.GraphDef
to output to the writer.
This function will not write the default graph by default. When
writing to an event log file, the associated step will be zero.session
: So this method can call tf.Session.run
. This defaults
to tf.compat.v1.get_default_session
.RuntimeError
: If the current thread has no default
tf.contrib.summary.SummaryWriter
.ValueError
: If session wasn't passed and no default session.


Asking the Right Questions
Framing the Question to Get the Answer You Need
December 3, 2014
Asking questions is always vital in the learning process. When you don't know something, you can tap into other people's knowledge just simply by asking. There's something to be said for figuring something out on your own, but the beauty of the internet is that you can utilize existing resources to get the information you want.
However, asking the right questions is necessary. Without framing the question the right way, you might get answers, but not necessarily answers that will help you.
My natural inclination has always been to figure things out on my own; however, in the last couple years, I've worked towards asking questions and requesting help when I need clarification. I've found that it's actually saved me lots of time and grief - and that most people are actually eager to help! Even in my personal life, I've progressed from trying to figure out directions myself to asking passerbyers for help.
Asking for help with directions doesn't really require framing the question in any particular way. However, with programming, there are some best practices towards minimizing stress for those Good Samaratins and maximizing your knowledge and the assistance received. When asking questions (whether in person, on the Google+ community, or on StackOverflow), it's important to keep the following in mind.
Imagine that you are trying to answer the question yourself.
You've spend quite some time reviewing the code, trying to figure out the problem. You understand the context of the problem very well. However, someone who is looking at the issue the first time won't understand that context. It's important that you frame the question with all relevant information.
Ensure that the question is easy to read and understand.
This requires that you not only provide relevant information, but to review the question. Proofread to ensure the question is clear, concise, and grammatically correct.
Question title needs to encapsulate the issue.
Make sure that the title specific. General questions like "Why does't this work?" or "Please help!" will likely attract minimal attention and you'll probably get few responses. The title doesn't necesarily need to be a question, but it does need to capture the general theme of the issue at hand. Having a clear, concise title is important because people are browsing through so much information, they shouldn't have to parse through the entire thread just to figure out what your question actually is.
Make sure you provide context.
Provide the language and platform you're referring to. Also, be sure to include any constraints. It's also important to describe what you've already tried; make sure you've done due diligence. Providing sample code can be very helpful, but probably not the entire program - just enough to isolate the problem! Lastly, the larger goal/aim should be clear. Others might have insight or suggestions on how to accomplish that broader goal through a different direction.


System Architect Symbol details for ".Agent and Subject Creation"
Activity (Class)
- Description:
Purposeful and intentional "Event"
- Comment:
-
Previous documented definitions providing the source for the above are:
An exertion of energy initiated by an "Agent" (CBS v2) - this definition is followed by a definition
of its subtypes.
Conscious, directed and purposeful exertion of energy.
"Event" occurring through the volition of an "Agent".
Definitions Used:
Quantity (Class Attribute)
activity for (Association)
- From Class:
Activity
- To Class:
"Activity State"
- From Class:
Activity
- To Class:
"Activity State"
Activity State (Class)
- Description:
"Activity" in a state which it is currently or has been previously.
- Comment:
Note that there are both subtypes (comprising all the possible states) and a "power type" of
"Activity State Type". The latter's contents are identical to the subtypes; it exists in order to
control topics such as access and permission to amend.
Activity State Change (Class)
- Description:
"Activity" changing the state of another "Activity".
Activity/direction (Generalization Node)
Agent (Class)
- Description:
-
Role of a subject enabling it to act purposefully.
- Comment:
-
CBS V2: - A role of a "Subject" which indicates that it has power to act
This is a role which may be played by a "Subject". Sometimes, an "Agent" may be created in order to
assemble a set of responsibilities and authorities prior to a specific "Subject" being identified
and allocated to it.
For purposes of creating an "Authorising Act", an "Agent" may actually be a group of individuals -
for example when joint responsibility is being taken for some decision, as in a clinical case
conference. In such a case the details of the group are taken care of by "Subject" and "Inter
Subject Relationship".
Examples of "Agent":
Dr Smithers within NHS XYZ Trust,
Ms J.Doe in the HXT Pathology laboratory.
A better understanding of the types of "Agent" can be gained from examination of its subtypes.
completion timepoint (Association)
- From Class:
Timepoint
- To Class:
"State Change Activity"
- From Class:
Timepoint
- To Class:
"State Change Activity"
created subject (Association)
- From Class:
Subject
- To Class:
"Subject Creation"
- From Class:
Subject
- To Class:
"Subject Creation"
creating event (Association)
- From Class:
Event
- To Class:
"Subject Creation"
- From Class:
Event
- To Class:
"Subject Creation"
Event (Class)
- Description:
Something which happens.
Event/Essential Type (Generalization Node)
- Base Class:
Event
- Definitions Used:
-
Event (Class)
observer (Association)
- From Class:
"Activity State"
- To Class:
"Subject Creation"
- From Class:
"Activity State"
- To Class:
"Subject Creation"
responsible for (Association)
- From Class:
"Activity State Change"
- To Class:
"Activity State"
- From Class:
"Activity State Change"
- To Class:
"Activity State"
responsible for performance of (Association)
- From Class:
Agent
- To Class:
"State Change Activity"
- From Class:
Agent
- To Class:
"State Change Activity"
SCA/Direction (Generalization Node)
- Base Class:
"State Change Activity"
- Definitions Used:
-
State Change Activity (Class)
State Change Activity (Class)
- Description:
"Activity" which changes the state of an "Object".
- Comment:
The "to" state is deemed to take effect simultaneously with the completion of the state change
activity. There will of course be occasions when the decision to make a state change is made well in
advance of this and that this decision may be communicated to interested parties.
Subject (Class)
- Description:
"Percept" consisting of one or more persistent physical objects.
- Comment:
-
The definition above, as for others, has been distilled from what has been suggested in the past,
including:
The "Object" of interest to an "Agent" (CBS v2).
One or a collection of physical objects.
"Percept" which is a physical object and / or a collection of physical objects.
Persistent perceivable object.
Extension of one or more "Concepts" which is perceived or inferred to exist in the universe.
Subject Creation (Class)
- Description:
Deduction by an "Agent" that a "Subject" was created by an "Event".
Timepoint (Class)
- Description:
"Reference Point" being a point or period in time.


Notifications
Notifications
View all
Khả Hân
appreciated your audio
3m ago
Khả Hân
followed your profile
3m ago
Khả Hân
sent you a friend request
3m ago
Accept
Ignore


, 4. Puttaswaray £15) Mariegowda V. . ' 173012 of iate Maztégowd _ . Agggi about 40' years - .. A . ' ' * 0 1ate"'M'aé'égoWda<EMAIL_ADDRESS>35 years "- V f 6'. A Maﬂcgowda Sonﬁf late Madegowda Agizd about 50 years IN THE HIGH COURT OF KARNATAKA AT BANGA;',c§ é;;§:_.j"'%j%=_.~ DATED THIS THE 22nd DAY OF JANUARY" V' PRESENT ' H' V _ THE HON'BLE MR. 12.13. D1NAKARAN;__ JL§§2"ICE " THE HON'BLE MR.,.jI.JSTi§T-E-Vv§?}_;'3.'"SABHAHET WRFI' PETITION NO. 1"19a;.9/ 2Qi}}§§. ;i§:$&~£3O~:.L-PIL; BETWEEN: x 1. M Shivanna H % A Son of late Madegowda' 51., Aged about AV . 2. Mada:tgowda{@ V' ~ S/0 of late Mallegnvcia ' " ' Aged about 50 years 3. _M D Maéiéildeifa V U _____ s/so lam Doddasizatiaiah Aged _abc§ut _4':"3 .,}'€aI"$,_ "' V 2'-:_'._' " Ma1a.'a.:1eva- 7. 31m Mallamma W/0 Iatc Madegowda Aged about 70 years 8. Kallegowda <13}; Madegowda Son of late Mallegowda Aged about 58 years 9. Puitegowda Son of Madcgowda Aged about 50 years 10. Smt Nagarathna W/o late Shankara Shasri Aged about 45 yeais I1. Puttaswamy, _ _ ._ Son of late Satmegawda ?IV__ " ' Aged abeut S0 ycérs .j 12. Mahadffvu " " V ' Son of late Bd1<ka1cgow7t1a:._V ' Aged aboaut 4{}yea1S -- ' 13. Puttaswamjf"'.. Son of late 4f§'3;r1.t1egow£fiaV_ Agc%{}.a_bo21:t_'E32E_;§:ea;§'s ---------- 14.'''--.,_ am: 1. W] o pitttaswainjfy ' ,/Aged abb-ut"40 yeaiig V resiéiegxiﬁof Greekalli V11' lage " "Jid3?@13'8¢§1a porai, Nanjangud taluk .j}V{YSQj'€ Ciifsitsjict A é ' Iéﬁghavendra Rat», Advocate) 3 ._g3ND{ " s Gﬁtlililli Distilleries Pvt Ltd. Repmscnteé by its Managing {Director C R Nagar Road, Nanjangud 5'?1 301 PETITIONERS. 2. State ot'Karnata1<a Departzxnent of Eoologr and Environment Represented by its Secretary M 8 Buildings, Bangalore 1 - 3. The Deputy Commissioner Mysore distxiot, Mysore 4. Karnataka State Pollution Control Represented by its Chaizman, Subhaschandra Bose Public Utility Buildings, M G Ro:--..id__ Bangalore 1 5. The Commissioner of E-xoisic, _. MS Buildings, Bang;a_1o:§;;e;'1_ _ ;.u:"""'ResPoNoENTs (Sri H N Shashidﬁara7Atiyooe.':e;.'foi' Smt Niloufer Akbar! R3,'--R.3 same R5 Sri D Nagaxaj, Advocate fo1*.R.c'§,A) _ ' This Writ pCﬁ'EiOI1VV"§.S "ﬁled under Articie 226 and 227 of the Constitution of Inéiiagpraying tdideciare that the inaction on the part of Iesfiondent to 57 in no ordering closure of the manazfactriféngactiviﬁee 'of~~«Respondent--1 is in vioiation of the ﬁ1'ndame1;t;aJ righi:.s"gt1a1*anteed to the petitioners under Arﬁoie I4 and'-21;of-the<._Cot1etitution of India and also in violation. of the provisions" of "I33j:1viro1i;.z1iental Protection Act and Air Act. Direct igespondentiel to its manufacturing unit for violation of the ' v . __Statuto1y p.1fovi§s'1'o:1s" etc. , it i3etition coming up for orders this day, the Court: A V _ djelisrered. V following. JUDGMENT
(Delivered by RD. DINAKARAN, CJ.) By consent, writ petition itself is taken up for hearing.
2. On the speciﬁc ground that the Z" respondge;I1t~~'.{ :tr.1_};1'e;£;:1Vf,ze~.
causes water and air pollution by disohargmg eﬁ1ueoj§s.. toe? ..
course of manufacture of spirit and the a_*j§ea about ' land around Gemini. Distillery have»T.¥:§een'e3'ft"ected water of the area has been conmmmeteﬁto avhdepehe of as V evidenced from the repoxt dateei 16.2.2002; Of course based .o o_11dt1c:ted in the presence of 1"§.gI'iCu}.fTt}I'¢',t:3.:':C}f_Zi'3Ct:§'IA;V,' Joint Maﬁaglng Director Sri H.N Beizespondent-concem, the petitioners seei:--theAV'foilo§;t:r;ng 1 " " ihaction on the part of Resﬁoeﬁeote not oxdeﬁng closure of the V' ._§;IIia11ufaefi11*§;o,g activities of Respondent} is in .V V. §;i&;ia1i£m_ of thewfielndazaental rights guaranteed to '=t}1'e.: 1':>efitio31.ers under Article 14 and 21 of the ~ee.ee;5'ng;':i;ut;{¢ﬁ of India and also in violation of the pm5vis5.¢ns of Environmental Pmtection Act, Water Act and Air Act.
(13) Direct Respondent-1 to ciose its VV " "i:nan.1;i:Ia.et11I'§ng unit for violation of the statutory provisions.
(0) Fuxther direct Respondent-E to take immediate steps to restore the water and soil quality in the area to its origjnai condition.
(d) Issue a further direction to ~ 1 io make appropriate compensation fozjiossii' their Agricultural Produce anci_.~w««fo_1E~., A 'i:.11:e~_ deterioration of the soil and 'V J tbs yciarsf'
3) ii: is also further statei:l"':1;h;T%:at 'dosp:i.l'.=:: Wailnove pollution, the 4&1 mspondo11§- has extended their consent for 'ggewage emuent only upto 3(),6.20(}8 .o:.1l"LZ:1c On the submission ():f~T§}£|.§i petitioners, this Court, by its _ interim injunction until the 1*" respondent ﬁled an application for xiacgitiog {.'1e"'iiiI€;'{:{ii:11'oIder dated 15.1.2009.
Sn' Rao, learned counsel for the peﬁﬁoncis'; , learned Advocate for 15* ifCS§)0I1d5ﬂl;"'SIﬁf Akbar, AGA for Respondents 2 to 5 and BV.Nagai4a3, Viigaiiied counsel for the 4"' respondent Pollution =5). is now brought to our notice {hat the Pollution Control in by pmcecdings dated 133* January, 2009 has granted the Z "E 'b 'A Parameter Standard consent till 303* June, 2f){)9. Off course, the said consejdt' 13.1.2009 is subject to certain conditions which axe: V t ' Discharge of eﬁiuents under the Water Act: ' S1. No. Descriytion Permitted quantity 6;? Place of _di.._. discharge _ limits [speciﬁed 2; refei, 1 Tracie 85060 KL in "*2'?O Bio?meﬁ;anated emuent efﬁue11t-- days of (_)pera£:io_n.. jief 5"95.35_.° KL for Spent wash v A E , edmposting and 25515 " M for one time
-. V ; ~ K-'«ed;3.t1tJ_l'ied lanai
-- " appiicaﬁon. BOD of bio-
» --j_'--m_et:hanated efﬂuent , not exceed =*f0O0mg/ 1, The compost '-- _ quality shall conforzcn to """ the standard stipulated. _ _ ' inAm:2exure-i.
2 Spentﬂ Iees E 19I;3.{:3.KL._D't'eA..,V u Shall be used for and o'i:l;_1e1'_ _ inigation after treatment eﬁluent xi - -_ and shall conform to the = ' standards stipulated in E E " Vv ...... .. A1:u1eXure--II.
(3 Domestic '02 KLD Septic tank and soak E " ' ei"?.1;entV'~e ._ pit.
_tA:rL'1exu1*e«-.I__VaI1ci ~II'_:1t=ei'erreCi to above reads hereunder:
AN NEXURE-I COMPOST QUALITY WM ;1__.__W_'§? Maisture content < 35% Vorganic carbon 20--25% Phosphorous 1 5-2. 0°/6 Nitrogen 1.5-2.0"/E:
Potassilgm 20-35% C:N Ratie Z < 1'?
o»c.n.as.'<;>'1s2 compiieei II). Nagaraj, learned counsel appearing for Poll1:{tio_n Board, on instxuctions, submits that the of the Board, we do not see any reason to continue . granted by this Court cm 15.1.2009 ané the same is However, Pollution Conmﬁ Board shall continue to ANNEXURE--lI s1. No. Characteristics Toleraziee iiz15it's'" , ' 1 Colour and odour _See?3.oie_" , 2 Suspended solids mg] }.Max. I 1 O0f V ..
3 Conductivity Micro ' 2259 mho/cnxmax. A' . "
4 PH , 5.5% «.90 1 5 Oil and Grease mg/1.Max' _ V V .
6 Bio~Chem,ical Oxygen Demaiicyé' " 1'00 mg/1. (3 days at 27° C}max.._. ' _ ? r%nceutsodyun1nmag;; «' "Hu .". 60 8 Residual Sodium Cafbonate, } % _ 5.0 mg/1.Max V 1 _ 9 Chloride ( as C1).Mg/i;'ma~1$( " I .. 600 10 Sulphate (:as'«sQg}g_1;g. V. 1000 1 1 Disso1ved..s91ic§;s_ {."Ir1o41'gza;:;1}lc) V , 2100 Note: A1} eﬁ'or1s__Vsh@1;1d1'?:;e made "x*ef@ove coiour and unpleasant odour as far as"p1'azc£i;:abie'gV"' "
6) In thisaview it is suﬁice for this Court to direct the E(}i1u_tjo3;1x Beard to satisfy themselves that the '~59 the eensent order dated 13. 3.2009 are duly "e£§j;ai;£ﬁa;3s h21§a=:_.AAbeen duly complied with by the 1" respondent to LQMWWWWWH oversee compliance of the cc-ndiﬁons. Writ petition is Inf' accorciingly. ,4' 1ndex»'Y!Es/No _ ' g


PaaS Cheatsheet
Quick start guide to deploying apps to PaaS providers
Introduction
This project grew out of my observation that each PaaS provider requires you to configure your project in a special way in order to use their particular service.
Let's say I want to use a MySQL database with a PaaS provider. Rather than digging through their online documentation and code examples, trying to remember how a particular PaaS provider handles the creation and configuration of a MySQL database, I wanted a reference guide that would show me quickly how they do it.
Thus the PaaS cheatsheet was born.
It's currently Django specific as that's my web framework of choice these days, but you can fork the project and add docs for other frameworks such as Rails, Node.js, PHP, Java, etc. Contributions are most welcome! Also see the contribute section below for more info.
Feel free to contact me at @natea on Twitter or on Github.
You can also submit a ticket in the Github issue tracker or comment in the comments box below.
Background
I've been exploring various PaaS providers to see which ones are suitable for integration with Appsembler, a platform that I've been building which SaaS-enables open source web applications.
Appsembler's mission is to make it easier to choose open source web software. Leveraging PaaS, we can more easily offer open source web apps in the SaaS model, and skip the download-configure-deploy dance. And by offering these apps in the SaaS model, it means they can be used by a wider audience - not just technical users.
I wrote a series of blog posts about my experience deploying a Django app to various PaaS providers, and then gave a talk at the local Boston Django users group and also at PyCon 2013. Here are some links to those blog posts and talks in case you're interested in reading more.
Contribute
As mentioned in the introduction, the PaaS Cheatsheet is on Github and you are encouraged to fork it, and add other frameworks or PaaS providers. Just submit a pull request!
In addition to this project, there are two sister projects:
- django-deployer is an attempt to create a universal PaaS agnostic deployer tool for Django projects.
- paasbakeoff contains a skeleton project for Mezzanine, a popular Django-based CMS that lives on the master branch. There are separate branches with example config files to deploy Mezzanine to each PaaS provider.
paasbakeoff is more of a reference repo for testing purposes, but if you'd like to help out with django-deployer, please let me know!
Getting Started
Click a tab to see how to get started with a particular PaaS provider.
Heroku
Download and install the Heroku Toolbelt.
Login, create the app and deploy it with these commands:
$ heroku login
$ heroku create myapp
$ git push heroku master
SSH into the running instance
$ heroku run bash
Dotcloud
Install the dotcloud command line tool with pip.
$ sudo pip install dotcloud
Login, create the app and deploy it with these commands:
$ dotcloud login
$ dotcloud create myapp
$ dotcloud push
SSH into the running instance
$ dotcloud run www
OpenShift
Install the rhc command line tool with gem.
$ sudo gem install rhc
Login, create the app and deploy it with these commands:
$ rhc setup
$ rhc create -a myapp -t python-2.6
$ git push
SSH into a "gear"
When you create an application, your gear is created with a user that runs your application's stack as well as owns your application code in the cloud. To access that application gear with that user, you need to run:
$ rhc app ssh -a {appName}
For scaled applications, the above will get you access to your HAProxy gear.
To get access to your framework gear, SSH onto your HAProxy gear, then review the contents of ~/haproxy-1.4/conf/gear-registry.db:
$ more ~/haproxy-1.4/conf/gear-registry.db
c7e82cd61276415e801c16ffbde81d78@<IP_ADDRESS>:c7e82cd612;c7e82cd612-macdomain.rhcloud.com
Then SSH onto one of those gears on the list (note that the IP address may change, so it's best to use the DNS c7e82cd612-macdomain.rhcloud.com):
$ ssh<EMAIL_ADDRESS>To get access to your DB gear (MySQL in this case), SSH into your HAProxy gear and run this:
$ echo $OPENSHIFT_MYSQL_DB_GEAR_UUID@$OPENSHIFT_MYSQL_DB_GEAR_DNS
Then from either your rhc client machine, or your HAProxy gear, you can run:
$ ssh {$OPENSHIFT_MYSQL_DB_GEAR_UUID}@{$OPENSHIFT_MYSQL_DB_GEAR_DNS}
Elastic Beanstalk
- Deploying a Django Application to AWS Elastic Beanstalk
- Customizing and Configuring a Python Container
- Using Amazon RDS with Python
Download and install the AWS Elastic Beanstalk Command Line tool.
$ wget https://s3.amazonaws.com/elasticbeanstalk/cli/AWS-ElasticBeanstalk-CLI-2.3.1.zip
$ unzip AWS-ElasticBeanstalk-CLI-2.3.1.zip
$ export PATH=$PATH:[path to unzipped EB CLI package]/eb/linux/python2.7/
$ alias eb="python2.7 [path to unzipped EB CLI package]/eb/linux/python2.7/eb"
Create a local git repository and initialize the app:
$ git init
$ eb init
Enter your AWS Access Key ID (current value is "AKIAIOSFODNN7EXAMPLE"):
Enter your AWS Secret Access Key (current value is "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"):
Enter an AWS Elastic Beanstalk application name (auto-generated value is "windows"): djangoapp
Enter an AWS Elastic Beanstalk environment name (current value is "djangoapp-env"):
Create an RDS DB Instance? [y/n]: y
Enter an RDS DB master password: *******
Retype password to confirm: *******
Start and deploy the app:
$ eb start
$ eb status --verbose
$ git aws.push
Requirements
Heroku
Add the following to your requirements.txt file:
Django==1.5
South==0.7.6
psycopg2==2.4.6
# for parsing the DATABASE_URL string
dj-database-url==0.2.1
# for storing static assets on Amazon S3
django-storages==1.1.6
boto==2.8.0
# needed for gunicorn (gunicorn, gevent, greenlet)
gunicorn==0.17.2
gevent==0.13.7
greenlet==0.4.0
Dotcloud
Add the following lines to your requirements.txt file:
Django==1.5
South==0.7.6
psycopg2==2.4.6 # if you're using PostgreSQL
MySQL-python==1.2.4 # if you're using MySQL
OpenShift
Add the following lines to your requirements.txt file:
Django==1.5
South==0.7.6
psycopg2==2.4.6 # if you're using PostgreSQL
MySQL-python==1.2.4 # if you're using MySQL
setup.py
Then create a setup.py file with this line to read the requirements.txt file:
install_requires=open('%s/requirements.txt' % os.environ.get('OPENSHIFT_REPO_DIR', PROJECT_ROOT)).readlines(),
Elastic Beanstalk
Add the following lines to your requirements.txt file:
Django==1.4.1
South==0.7.6
MySQL-python==1.2.3
Database settings
Create the database
$ heroku addons:add heroku-postgresql:dev
Add to settings.py
import dj_database_url
DATABASES = {'default': dj_database_url.config(default='postgres://localhost')}
Add to dotcloud.yml
For PostgreSQL:
db:
type: postgresql
For MySQL:
db:
type: mysql
Add to settings.py
import json
with open('/home/dotcloud/environment.json') as f:
env = json.load(f)
if 'DOTCLOUD_DATA_MYSQL_HOST' in env:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': env['DOTCLOUD_PROJECT'],
'USER': env['DOTCLOUD_DATA_MYSQL_LOGIN'],
'PASSWORD': env['DOTCLOUD_DATA_MYSQL_PASSWORD'],
'HOST': env['DOTCLOUD_DATA_MYSQL_HOST'],
'PORT': int(env['DOTCLOUD_DATA_MYSQL_PORT']),
}
}
elif 'DOTCLOUD_DB_SQL_HOST' in env:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': env['DOTCLOUD_PROJECT'],
'USER': env['DOTCLOUD_DB_SQL_LOGIN'],
'PASSWORD': env['DOTCLOUD_DB_SQL_PASSWORD'],
'HOST': env['DOTCLOUD_DB_SQL_HOST'],
'PORT': int(env['DOTCLOUD_DB_SQL_PORT']),
}
}
Create database
For PostgreSQL:
$ rhc cartridge add -c postgresql-8.4 -a [myapp]
For MySQL:
$ rhc app cartridge add -c mysql-5.1 -a [myapp]
Add to settings.py
import os
import urlparse
DATABASES = {}
if 'OPENSHIFT_MYSQL_DB_URL' in os.environ:
url = urlparse.urlparse(os.environ.get('OPENSHIFT_MYSQL_DB_URL'))
DATABASES['default'] = {
'ENGINE' : 'django.db.backends.mysql',
'NAME': os.environ['OPENSHIFT_APP_NAME'],
'USER': url.username,
'PASSWORD': url.password,
'HOST': url.hostname,
'PORT': url.port,
}
elif 'OPENSHIFT_POSTGRESQL_DB_URL' in os.environ:
url = urlparse.urlparse(os.environ.get('OPENSHIFT_POSTGRESQL_DB_URL'))
DATABASES['default'] = {
'ENGINE' : 'django.db.backends.postgresql_psycopg2',
'NAME': os.environ['OPENSHIFT_APP_NAME'],
'USER': url.username,
'PASSWORD': url.password,
'HOST': url.hostname,
'PORT': url.port,
}
Create database
Read the article Using Amazon RDS with Python.
$ eb init
...
Create an RDS DB Instance? [y/n]:
Enter an RDS DB master password:
Retype password to confirm:
settings.py
import os
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': os.environ['RDS_DB_NAME'],
'USER': os.environ['RDS_USERNAME'],
'PASSWORD': os.environ['RDS_PASSWORD'],
'HOST': os.environ['RDS_HOSTNAME'],
'PORT': os.environ['RDS_PORT'],
}
}
Environment Variables
Adding Environment Variables
$ heroku config:add \
STORAGE=s3storage \
S3_ACCESS_KEY=[Your AWS Access Key] \
S3_SECRET_KEY=[Your AWS Secret Key] \
S3_BUCKET_NAME=[Name for an S3 Bucket] \
REDIS_URI=[Redis URI from OpenRedis] \
DB_URI=[Postgres URI from Heroku] \
PASSCODE=[Your Super Secret Passcode]
Adding Environment Variables
$ dotcloud env set \
'AWS_ACCESS_KEY=IA4F0njNcmKKg3YndpOe' \
'AWS_SECRET_KEY=Ideeghu0Ohghe7oi?Y6ogh7qui%jeiph7yai[coo'
Or in the dotcloud.yml
You don't need to do both. Either set it with 'env set' or add them to the dotcloud.yml file.
www:
type: python
environment:
MODE: production
AWS_ACCESS_KEY=IA4F0njNcmKKg3YndpOe
AWS_SECRET_KEY=Ideeghu0Ohghe7oi?Y6ogh7qui%jeiph7yai[coo
OpenShift exposes many environment variables and you can specify custom environment variables using the following:
SSH into your application and navigate to your data directory.
cd app-root/data
In this directory create a file with your variables (e.g. ".myenv") with content like:
export MY_VAR="something"
And then in your repository in ".openshift/action_hooks/pre_start" add this line:
source ${OPENSHIFT_DATA_DIR}/.myenv
.ebextensions directory
Create an .ebextensions directory in the top-level directory of your source bundle.
$ mkdir .ebextensions
Create a configuration file with the extension .config (e.g., myapp.config) and place it in the .ebextensions top-level directory. For more information, see the Customizing and Configuring a Python Container
.ebextensions/myapp.config
container_commands:
01_syncdb:
command: "django-admin.py syncdb --noinput"
leader_only: true
option_settings:
- namespace: aws:elasticbeanstalk:container:python
option_name: WSGIPath
value: mywebsite/wsgi.py
- option_name: DJANGO_SETTINGS_MODULE
value: mywebsite.settings
- option_name: AWS_SECRET_KEY
value: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
- option_name: AWS_ACCESS_KEY_ID
value: AKIAIOSFODNN7EXAMPLE
WSGI Handler
Procfile
Heroku uses a Procfile. Here's a sample one:
web: gunicorn_django -b <IP_ADDRESS>:\$PORT -w 9 -k gevent --max-requests 250 --preload path/to/settings.py
Or you can run gunicorn standalone (where you have a file mywebsite/wsgi.py):
web: gunicorn -b <IP_ADDRESS>:$PORT -k gevent -w 4 mywebsite.wsgi:application
wsgi.py
import os
import sys
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__),'mywebsite')))
os.environ['DJANGO_SETTINGS_MODULE'] = 'mywebsite.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
wsgi/application
Create a directory called 'wsgi' and inside it, put a file 'application':
#!/usr/bin/env python
import os
import sys
sys.path.append(os.path.join(os.environ['OPENSHIFT_REPO_DIR']))
os.environ['DJANGO_SETTINGS_MODULE'] = 'mywebsite.settings'
virtenv = os.environ['OPENSHIFT_HOMEDIR'] + 'python-2.6/virtenv/'
os.environ['PYTHON_EGG_CACHE'] = os.path.join(virtenv, 'lib/python2.6/site-packages')
virtualenv = os.path.join(virtenv, 'bin/activate_this.py')
try:
execfile(virtualenv, dict(__file__=virtualenv))
except IOError:
pass
## IMPORTANT: Put any additional includes below this line. If placed above this
# line, it's possible required libraries won't be in your searchable path
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
.ebextensions/myapp.config
option_settings:
"aws:elasticbeanstalk:application:environment":
DJANGO_SETTINGS_MODULE: "djproject.settings"
"application_stage": "staging"
"aws:elasticbeanstalk:container:python":
WSGIPath: mywebsite/wsgi.py
NumProcesses: 3
NumThreads: 20
wsgi.py
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mywebsite.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
Static files
Heroku
Heroku doesn't provide a native way to serve up static assets, so you must push your static assets to another provider such as Amazon S3.
STATIC_ROOT
In settings.py:
STATICFILES_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
MEDIA_ROOT
In settings.py
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
django-storages
In requirements.txt
django-storages
In requirements.txt
INSTALLED_APPS += ("storages",)
Amazon S3 configuration
In settings.py
AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "")
AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "")
AWS_STORAGE_BUCKET_NAME = os.environ.get("AWS_STORAGE_BUCKET_NAME", "")
STATIC_URL = 'http://' + AWS_STORAGE_BUCKET_NAME + '.s3.amazonaws.com/'
MEDIA_URL = STATIC_URL + 'media/'
Dotcloud
Dotcloud lets you serve up static assets via Nginx, and persists uploaded media across deploys.
STATIC_ROOT
In settings.py:
STATIC_ROOT = '/home/dotcloud/volatile/static/'
In nginx.conf:
location /static/ { root /home/dotcloud/volatile ; }
MEDIA_ROOT
In settings.py:
MEDIA_ROOT = '/home/dotcloud/data/media/'
Add another line to your nginx.conf:
location /media/ { root /home/dotcloud/data/media; }
OpenShift
OpenShift also provides a directory that gets persisted across deploys, and static mapping using an .htaccess file:
STATIC_ROOT
in settings.py:
STATIC_ROOT = os.path.join(os.environ.get('OPENSHIFT_REPO_DIR'), 'wsgi', 'static')
In wsgi/static/.htaccess:
RewriteEngine On
RewriteRule ^application/static/(.+)$ /static/$1 [L]
MEDIA_ROOT
OpenShift provides a persisted data dir that can be referenced with the environment variable OPENSHIFT_DATA_DIR:
in settings.py:
MEDIA_ROOT = os.path.join(os.environ.get('OPENSHIFT_DATA_DIR'), 'media')
You then need to symlink this directory to the static directory that is being served up by Apache (see above in STATIC_ROOT).
In .openshift/action_hooks/build:
#!/bin/bash
if [ ! -d $OPENSHIFT_DATA_DIR/media ]; then
mkdir $OPENSHIFT_DATA_DIR/media
fi
ln -sf $OPENSHIFT_DATA_DIR/media $OPENSHIFT_REPO_DIR/wsgi/static/media
Elastic Beanstalk
.ebextensions/myapp.config
option_settings:
...
"aws:elasticbeanstalk:container:python:staticfiles":
"/static/": "static/"
Logging
Coming soon! Contributions welcome :)
Scaling
Coming soon! Contributions welcome :)
Backups
Coming soon! Contributions welcome :)
Custom domains
Coming soon! Contributions welcome :)
Coming soon! Contributions welcome :)
SSL / HTTPS
Coming soon! Contributions welcome :)
System packages
Coming soon! Contributions welcome :)
Background jobs
Coming soon! Contributions welcome :)
comments powered by Disqus


Ocean [ar78], ocean, in The Outer Sea
Last updated Turn #44
Ocean [ar78], ocean, in The Outer Sea
------------------------------------------------------------------------
13: Orion I [hd3f], ship, 2 hulls, 1 rowing port, 6 sails, arrived from
13: Ocean [ar77], owner:
13: Sir Pigparts [n4b], Imperial Empire, with 16 sailors
14: Orion I [hd3f], ship, 2 hulls, 1 rowing port, 6 sails, departed for
14: Ocean [aq78].
30: It has stopped raining.
Routes leaving Ocean:
North, to Ocean [aq78], 6 days
East, to Ocean [ar79], 6 days
South, to Ocean [as78], 6 days
West, to Ocean [ar77], 6 days


# Keys helper
Keys helper allows to easily generate new RSA or AES keys.
# Provided operations
Below you can find the keys helper's provided operations with some examples
- Generates a new random AES-256 secret key with initializing vector.
fun generateAesKey(bytes: Int = 256): SecretKey
1
- Generates a secret aes key from the given
bytes
.
fun recoverAesKey(bytes: ByteArray): SecretKey
1
- Generates a new RSA key pair having the given
bytes
length.
If no length is specified, the default is going to be 2048.
fun generateRsaKeyPair(bytes: Int = 2048): KeyPair
1
- Generates a new EC key pair of type
secp256k1
fun generateEcKeyPair(): KeyPair
1
- Export public
key
oftype
RSA or EC into an HEX string.
fun exportPublicKeyHEX(key: PublicKey, type: String): String
1
- Export private
key
oftype
RSA or EC into an HEX string.
fun exportPrivateKeyHEX(key: PrivateKey, type: String): String
1


<epam>
presents
●
The Tale of
Cassandra
~
Directed by
Attila Szűcs
<EMAIL_ADDRESS><epam>
presents
Directed by
Attila Szűcs
<EMAIL_ADDRESS>NoSQL database, column based
SQL-like interface
High performance, linear scalability
(Image copyright by Nathan Hurst)
Examples:
set ColumnFamily['rowkey']['column'] = 'value';
get ColumnFamily['rowkey'];
get ColumnFamily['rowkey']['column'];
list ColumnFamily;
del ColumnFamily['rowkey'];
del ColumnFamily['rowkey']['column'];
All nodes are equal
Cluster formation, client connections
The nodes are in constant communication...
It is enough to know a few nodes, you will hear everything...
Waiting for acknowledgement from how many rows
SQL interface on the top of Cassandra data structure.
Being schema-free is nice, but it pushes schema definition to the business layer.
INSERT INTO User
(UserId, FirstName, LastName)
VALUES
(1, 'Ada', 'Lovelace');
UPDATE User SET
FirstName = 'Ada',
LastName = 'Lovelace'
WHERE
UserId = 1;
INSERT INTO Users
(UserName, PasswordHash, FirstName, LastName)
VALUES
('Ada', '###', 'Ada', 'Lovelace')
IF NOT EXISTS;
UPDATE Users
SET PasswordHash = 'newhash'
WHERE UserName = 'Ada'
IF PasswordHash = 'oldhash';
Yes, but it is only metadata.
ALTER TABLE is and quick regardless of the number of rows.
NULL values are not stored.
PRIMARY KEY: Partition key + Clustering key
Collection storage
No joins -> Denormalize data
Multiple tables for the same data
CREATE TABLE tracks_by_album (
id int,
title text,
album text.
artist text,
PRIMARY KEY(album, id)
);
CREATE TABLE tracks_by_artist (
id int,
title text,
album text.
artist text,
PRIMARY KEY(artist, id)
);
CREATE TABLE tracks (
id int,
title text,
album text.
artist text,
PRIMARY KEY(id)
);
CREATE INDEX tracks_by_artist ON tracks(artist);
CREATE INDEX tracks_by_album ON tracks(album);
Performance?
Use with caution - maintained on each node
Works well if already filtered by partition key
Limit number of tables and requests
CREATE TABLE Bill_Clustering
(
BillId int,
Seller text,
Buyer text,
ItemId int,
ItemName text,
ItemPrice decimal,
PRIMARY KEY (BillId, ItemId)
);
CREATE TABLE Bill_Collection
(
BillId int,
Seller text,
Buyer text,
ItemNames list<text>,
ItemPrices list<decimal>,
PRIMARY KEY (BillId)
);
CREATE TYPE Item
(
ItemName text,
ItemPrice decimal
);
CREATE TABLE Bill_Type
(
BillId int,
Seller text,
Buyer text,
Items list<Item>
PRIMARY KEY (BillId)
);
(... and thanks for your attention)
Presentation written in reveal.js by manually editing the HTML file (press view source).


Events
|
Sydney .NET User
Group
Monday 17th November
|
This months user group is getting a special treat! Chris
Kinsman, MS Regional Director from Seattle will be giving
a presentation on his favourite topic, ASP .NET
Still writing ASP 3.0 or older code? Looking for a
discussion of the issues you will face bringing this code
forward into ASP.NET? Want to move your code to ASP.NET to
take advantage of the great new features? Come to this
session to gain an understanding of the differences
between ASP and ASP.NET
|
|
Monday 17th of November, 5:45 pm at Microsoft, 1
Epping Road
>See You There!
|
Sorry I can't make it
|
|
SSW Tech
Breakfast
The Best Third Party Tools
Friday 28th November
|
In the big world of Microsoft it's easy to forget that
there's a lot of other smart cookies out there building
great programs and utilities. You could spend hours
scouring the net for the latest .exe or you could save
time and let Adam show you the best new products
around.
In this session Adam will show you tools that will help
you write code quicker, upsize faster than ever before,
and build better HTML pages, along with dozens of other
useful tricks that will no doubt save you time if you're
developing in SQL Server, Access, VB.NET and ASP.NET.
Find out more about SSW
Tech Breakfasts
Book NOW
|
|
|
|


|
| | Quad (char *grid_type, char *fs_type, int ndim, int param, double alpha=0.0, double betta=1.0) |
| | Constructor: initializes the rule type, sparseness type, dimensionality, level or ppd parameter, and two optional parameters for quadrature rule. More...
|
| |
| | Quad (Array1D< string > &grid_types, char *fs_type, Array1D< int > ¶m, Array1D< double > &alphas, Array1D< double > &bettas) |
| | Constructor, overloaded for dimension-unisotropy: initializes the dimension-specific rule types, sparseness type, dimension-specific ppd or level, and two optional parameters for quadrature rule per each dimension. More...
|
| |
| | Quad () |
| | Constructor: empty. More...
|
| |
| | ~Quad () |
| | Destructor. More...
|
| |
| void | init () |
| | Initialization function. More...
|
| |
| void | SetAlpha (double alpha) |
| | Set the parameter alpha. More...
|
| |
| void | SetBeta (double betta) |
| | Set the parameter beta. More...
|
| |
| void | SetDomain (Array1D< double > &aa, Array1D< double > &bb) |
| | Set the domain endpoints (for compact support domains) More...
|
| |
| void | SetDomain (Array1D< double > &aa) |
| | Set the domain endpoint (for semi-infinite domains) More...
|
| |
| void | GetDomain (Array1D< double > &aa, Array1D< double > &bb) const |
| | Get the domain endpoints (for compact support domains) More...
|
| |
| void | GetDomain (Array1D< double > &aa) const |
| | Get the domain endpoint (for semi-infinite domains) More...
|
| |
| void | SetRule (Array2D< double > &q, Array1D< double > &w) |
| | Set the rule externally (only quadrature points and weights) More...
|
| |
| void | SetRule (Array2D< double > &q, Array1D< double > &w, Array2D< int > &ind) |
| | Set the rule externally (quadrature points, weights and indices) Dummy function for backward compatibility. More...
|
| |
| void | SetRule () |
| | Set the rule externally (quadrature points, weights, indices, and the level) More...
|
| |
| void | GetRule (Array2D< double > &q, Array1D< double > &w) |
| | Get the quadrature rule. More...
|
| |
| void | GetRule (Array2D< double > &q, Array1D< double > &w, Array2D< int > &ind) |
| | Get the quadrature rule with indexing Dummy function for backward compatibility. More...
|
| |
| void | SetQdpts (Array2D< double > &q) |
| | Externally set quadrature points. More...
|
| |
| void | SetWghts (Array1D< double > &w) |
| | Externally set the weights. More...
|
| |
| void | GetQdpts (Array2D< double > &q) |
| | Externally set the indices. More...
|
| |
| void | GetWghts (Array1D< double > &w) |
| | Get the weights. More...
|
| |
| void | SetLevel (int param) |
| | Get the indices. More...
|
| |
| void | nextLevel () |
| | Compute the indices of the next-level points. More...
|
| |
| int | GetNQ () |
| | Get the number of quadrature points. More...
|
| |
| void | SetVerbosity (int verbosity) |
| | Set the verbosity level. More...
|
| |
|
| | Quad (const Quad &) |
| | Dummy copy constructor, which should not be used as it is currently not well defined. More...
|
| |
| void | MultiplyTwoRules (QuadRule *rule1, QuadRule *rule2, QuadRule *rule_prod) |
| | Multiply two rules (full tensor product) More...
|
| |
| void | MultiplyManyRules (int nrules, QuadRule *rules, QuadRule *rule_prod) |
| | Multiply many rules (full tensor product) More...
|
| |
| void | MultiplyManyRules_ (int nrules, QuadRule *rules, QuadRule *rule_prod) |
| |
| void | AddTwoRules (QuadRule *rule1, QuadRule *rule2, QuadRule *rule_sum) |
| | Add two rules. More...
|
| |
| void | SubtractTwoRules (QuadRule *rule1, QuadRule *rule2, QuadRule *rule_sum) |
| | Subtract two rules. More...
|
| |
| void | create1DRule (string gridtype, Array1D< double > &qdpts, Array1D< double > &wghts, int ngr, double a, double b) |
| | Compute 1D rules. More...
|
| |
| void | create1DRule_CC (Array1D< double > &qdpts, Array1D< double > &wghts, int ngr, double a, double b) |
| | Clenshaw-Curtis (includes the endpoints) More...
|
| |
| void | create1DRule_LU (Array1D< double > &qdpts, Array1D< double > &wghts, int ngr, double a, double b) |
| | Legendre-Uniform. More...
|
| |
| void | create1DRule_HG (Array1D< double > &qdpts, Array1D< double > &wghts, int ngr) |
| | Gauss-Hermite. More...
|
| |
| void | create1DRule_NC (Array1D< double > &qdpts, Array1D< double > &wghts, int ngr, double a, double b) |
| | Newton-Cotes (i.e. equispaced, includes the endpoints) More...
|
| |
| void | create1DRule_NCO (Array1D< double > &qdpts, Array1D< double > &wghts, int ngr, double a, double b) |
| | Newton-Cotes open (i.e. excludes the endpoints) More...
|
| |
| void | create1DRule_CCO (Array1D< double > &qdpts, Array1D< double > &wghts, int ngr, double a, double b) |
| | Clenshaw-Curtis open (i.e. excludes the endpoints) More...
|
| |
| void | create1DRule_JB (Array1D< double > &qdpts, Array1D< double > &wghts, int ngr, double a, double b) |
| | Jacobi-Beta. More...
|
| |
| void | create1DRule_LG (Array1D< double > &qdpts, Array1D< double > &wghts, int ngr) |
| | Gamma-Laguerre. More...
|
| |
| void | create1DRule_SW (Array1D< double > &qdpts, Array1D< double > &wghts, int ngr) |
| | Stieltjes-Wigert. More...
|
| |
| void | create1DRule_pdf (Array1D< double > &qdpts, Array1D< double > &wghts, int ngr, double a, double b) |
| | Custom rule given the recursive coefficients of the corresponding orthogonal polynomials. More...
|
| |
| void | create1DRule_GP3 (Array1D< double > &qdpts, Array1D< double > &wghts, int ngr, double a, double b) |
| | Gauss-Patterson starting with Legendre-Uniform 3. More...
|
| |
| void | getMultiIndexLevel (Array2D< int > &multiIndexLevel, int level, int ndim) |
| | Auxilliary function: get the level of the multi-index. More...
|
| |
| void | compressRule (QuadRule *rule) |
| | Compress the rule, i.e. merge repeating points. More...
|
| |
|
| Array1D< double > | aa_ |
| | The left endpoints of the domain. More...
|
| |
| Array1D< double > | bb_ |
| | the right endpoints of the domain More...
|
| |
| int | quadverbose_ |
| | Verbosity level. More...
|
| |
| double | alpha_ |
| | The first parameter of the rule, if any. More...
|
| |
| double | beta_ |
| | The second parameter of the rule, if any. More...
|
| |
| Array1D< double > | alphas_ |
| | The first parameter of the rule, if any. More...
|
| |
| Array1D< double > | betas_ |
| | The second parameter of the rule, if any. More...
|
| |
| QuadRule | rule_ |
| | The quadrature rule structure. More...
|
| |
| int | ndim_ |
| | The dimensionality. More...
|
| |
| int | nlevel_ |
| | The current level, working variable for hierarchical construction. More...
|
| |
| int | maxlevel_ |
| | The level for sparse rules, or the number of grid points per dim for full product rules. More...
|
| |
| Array1D< int > | param_ |
| |
| Array2D< int > | npts_all |
| | Working arrays. More...
|
| |
| Array2D< int > | npts_1_all |
| |
| Array2D< QuadRule > | qr_all |
| |
| Array2D< QuadRule > | qr_1_all |
| |
| int | growth_rule_ |
| | Growth rule: exponential(0) or linear(1) More...
|
| |
| Array1D< int > | growth_rules_ |
| | Growth rules: exponential(0) or linear(1) More...
|
| |
| string | grid_type_ |
| | Grid type: 'CC','CCO','NC','NCO','LU', 'HG', 'JB', 'LG', 'SW', 'pdf', or 'GP3'. More...
|
| |
| Array1D< string > | grid_types_ |
| | Vector of grid types: 'CC','CCO','NC','NCO','LU', 'HG', 'JB', 'LG', 'SW', 'pdf', or 'GP3'. More...
|
| |
| string | fs_type_ |
| | Sparseness type (full or sparse) More...
|
| |
Generates quadrature rules.
- Note
- Besides quadrature rules corresponding to PC bases (i.e. LU, HG, LG, SW, JB), Clenshaw-Curtis(CC) and Newton-Cotes(NC) as well as their Open (with no endpoints) versions (CCO, NCO) are implemented. Also, Gauss-Patterson (GP3) and custom (pdf) rules are added.
Grid type: 'CC','CCO','NC','NCO','LU', 'HG', 'JB', 'LG', 'SW', 'pdf', or 'GP3'.
Vector of grid types: 'CC','CCO','NC','NCO','LU', 'HG', 'JB', 'LG', 'SW', 'pdf', or 'GP3'.


Euro zone needs to strengthen domestic demand: ECB's Lagarde
by ReutersFRANKFURT (Reuters) - The euro zone needs to strengthen domestic demand, including via greater public investment, if it is to withstand weakness abroad, the European Central Bank's new President Christine Lagarde said on Friday.
"The answer lies in converting the world’s second largest economy into one that is open to the world but confident in itself – an economy that makes full use of Europe’s potential to unleash higher rates of domestic demand and long-term growth," Lagarde said.
She reaffirmed the ECB would do its part by continuing "to support the economy and respond to future risks" while monitoring "the side effects" of its easy money policy.


litescene.js
Litescene.js is a component based scene graph library in Javascript that provides a realistic rendering pipeline on top of WebGL.
It implements common classes like Scene, SceneNode, Camera, Light and Transform.
It relies on litegl.js for the low-level webgl actions.
Some of the main features:
- Component based node system.
- Binary formats for meshes.
- Ubershader material system
- Easy to extend
Usage
Examples
Documentation
There is an automatic generated documentation online.
Check also the gl-matrix documentation to a better understanding of how to operate with matrices and vectors.


Created by theif519 on 11/25/2015.
This is a simple EventBus implementation utilizing RxJava. The basic idea of it was taken from here...
http://nerds.weddingpartyapp.com/tech/2014/12/24/implementing-an-event-bus-with-rxjava-rxbus/
To summarize, this class utilizes Rx to the fullest to allow a completely decoupled broadcsating system,
without the hassle of setting up Intents, adding intent extras (and lord knows if you need to add like
10 things to an Intent, you need to do it sequentially (I.E, no fluent interface) so 10 things would take a
minimum of 10 lines. And since BroadcastReceiver was made for general purpose, to send an object, even
locally, it must implement either Serializable or Parcelable, even though there is no need for IPC.
 Also, it allows you to send an object directly, without needing
to marshall it into an Intent or even a Message. It is as simple as publishing the object. Also, the user
can subscribe/register for certain events, which returns a Observable which can be subscribed to. It works
by simply filtering out events which are not of the specified type.
For example usage, see this extremely simple way of sending a String as an event, without the complexity
of a normal broadcast receiver. Here is how it would normally look...
LocalBroadcastManager manager = LocalBroadcastManager.getInstance(this); // Need context
Intent intent = new Intent(...);  Now we have to make another global constant just for this type.
manager.sendBroadcast(intent);
But wait wait wait, what if we do not have a context to give it? That's what getInstance() takes, a context.
What if we wish to broadcast something from inside of another thread, or even better yet, what if you want
to use a context within an custom listener (I.E View.OnTouchListener)? Okay, no biggie, you can pass in another
context. What if it's something which is final and cannot be overridden? Okay, also not too big of a deal, you
can follow the AppContext getInstance() singleton pattern/workaround (probably an anti-pattern) which actually
goes against Android's best practices, but everyone has to settle with it because it's the only way to do it.
Not to mention other complications, like "How do I know if the message has been received? How do I receive
a response to know it has been received if I go that route? What if I have an error, how should I return that?"
These were all things which plagued me just a couple weeks ago before I started using RxJava. Now, lets demonstrate
how to use this RxBus, and how simple it is.
RxBus.publish("Hello World");
Done. No need for serializing. If the object itself sent cannot be serialized/parceled, you're suddenly
not screwed any longer. Of course this is restricted to local events, but so is LocalBroadcastManager. It can be
called from any class, any thread, anywhere (that is within this process).
Now on that note, I am not bashing Android's LocalBroadcastManager, especially not the normal BroadcastManager, as
IPC is VERY complicated and is not easy to do. However, this event bus is an easy to use implementation and fits this
project's purposes perfectly.


Welcome to the Hackathon
Submit an idea, vote on projects, view your event schedule and more in this all-inclusive app. Brought to you by the UF Student Web Development Team.
Submitting Projects and Ideas
On the home screen you'll find various buttons used to interface with the app. The topmost solid green button allows you to submit a project and the one below
it lets you submit an idea for a potential project. Clicking on the Project submission button will take you to a three-part project
creation screen. The first section will allow you to add a title and description for your project. The second section will allow you
to specify a category for the project. The final section will allow you to add team members assigned to the project for easy tracking.
Below the project submission button is the Idea submission button. Clicking this button will take you to the idea creation page. On this page
you will be able to specify a title and long description for your potential idea


Checks that classes annotated by
@Singleton
do not have constructors unless it is declared non strict.


Tabs ease the burden of large pages by dividing them into easy to digest sub-pages
Vertical Tabs are most often used as a form of secondary navigation on pages that have a large number of sub-pages. For those with a fixed, smaller number of sub-pages, using Horizontal Tabs might be more appropriate.
Horizontal tabs can be used anywhere, but are most commonly used as a secondary navigational elements on pages that have a limited number of sub pages. Those with long lists of sub pages are better served using Vertical Tabs.
Horizontal and Vertical tabs may be used in conjunction on pages where secondary and tertiary levels of navigation are required.
<hc-tab-set direction="horizontal" >
<hc-tab tabTitle="Tab 1">
Tab content 1
</hc-tab>
<hc-tab tabTitle="Tab 2">
Tab content 2
</hc-tab>
</hc-tab-set>
<hc-tab-set>
<hc-tab tabTitle="Tab 1" routerLink="/components/tabs/tab1"></hc-tab>
<hc-tab tabTitle="Tab 2" routerLink="/components/tabs/tab2"></hc-tab>
</hc-tab-set>
In the case of apps that use vertical tabs as full page navigation structure (as on
this Cashmere site), it can be useful to add a line of CSS to .vertical-container
.
This line extends the tabs to the full height of the page, even if the content of the tabs
is shorter than that. The 53px in this line compenstates for the navbar, so if you are
using a subbnav as well, you'll want to include that height in the subtraction.
{{fullScreenCode}}
| tabTitle | Type: String | On Tab Component. Use to change the title of the tab |
|---|---|---|
| routerLink | Type: String | On Tab Component. Use to set the router location for the tab. Must be set for all tabs or no tabs |
| direction | Type: 'vertical' | 'horizontal' (default: 'vertical') | On Tab Set component. Determines whether horizontal or vertical tabs. |


Zerstorer Marcela:
Go to
Trader Nika at the General Store
and bring back the supply manifest. Since our Warehouse supplies are low, we must be sure that there is no shortage there as well...


Source code for pyspark.streaming.flume
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
import sys
if sys.version >= "3":
from io import BytesIO
else:
from StringIO import StringIO
from py4j.protocol import Py4JJavaError
from pyspark.storagelevel import StorageLevel
from pyspark.serializers import PairDeserializer, NoOpSerializer, UTF8Deserializer, read_int
from pyspark.streaming import DStream
__all__ = ['FlumeUtils', 'utf8_decoder']
[docs]def utf8_decoder(s):
""" Decode the unicode as UTF-8 """
if s is None:
return None
return s.decode('utf-8')
[docs]class FlumeUtils(object):
@staticmethod
[docs] def createStream(ssc, hostname, port,
storageLevel=StorageLevel.MEMORY_AND_DISK_2,
enableDecompression=False,
bodyDecoder=utf8_decoder):
"""
Create an input stream that pulls events from Flume.
:param ssc: StreamingContext object
:param hostname: Hostname of the slave machine to which the flume data will be sent
:param port: Port of the slave machine to which the flume data will be sent
:param storageLevel: Storage level to use for storing the received objects
:param enableDecompression: Should netty server decompress input stream
:param bodyDecoder: A function used to decode body (default is utf8_decoder)
:return: A DStream object
"""
jlevel = ssc._sc._getJavaStorageLevel(storageLevel)
helper = FlumeUtils._get_helper(ssc._sc)
jstream = helper.createStream(ssc._jssc, hostname, port, jlevel, enableDecompression)
return FlumeUtils._toPythonDStream(ssc, jstream, bodyDecoder)
@staticmethod
[docs] def createPollingStream(ssc, addresses,
storageLevel=StorageLevel.MEMORY_AND_DISK_2,
maxBatchSize=1000,
parallelism=5,
bodyDecoder=utf8_decoder):
"""
Creates an input stream that is to be used with the Spark Sink deployed on a Flume agent.
This stream will poll the sink for data and will pull events as they are available.
:param ssc: StreamingContext object
:param addresses: List of (host, port)s on which the Spark Sink is running.
:param storageLevel: Storage level to use for storing the received objects
:param maxBatchSize: The maximum number of events to be pulled from the Spark sink
in a single RPC call
:param parallelism: Number of concurrent requests this stream should send to the sink.
Note that having a higher number of requests concurrently being pulled
will result in this stream using more threads
:param bodyDecoder: A function used to decode body (default is utf8_decoder)
:return: A DStream object
"""
jlevel = ssc._sc._getJavaStorageLevel(storageLevel)
hosts = []
ports = []
for (host, port) in addresses:
hosts.append(host)
ports.append(port)
helper = FlumeUtils._get_helper(ssc._sc)
jstream = helper.createPollingStream(
ssc._jssc, hosts, ports, jlevel, maxBatchSize, parallelism)
return FlumeUtils._toPythonDStream(ssc, jstream, bodyDecoder)
@staticmethod
def _toPythonDStream(ssc, jstream, bodyDecoder):
ser = PairDeserializer(NoOpSerializer(), NoOpSerializer())
stream = DStream(jstream, ssc, ser)
def func(event):
headersBytes = BytesIO(event[0]) if sys.version >= "3" else StringIO(event[0])
headers = {}
strSer = UTF8Deserializer()
for i in range(0, read_int(headersBytes)):
key = strSer.loads(headersBytes)
value = strSer.loads(headersBytes)
headers[key] = value
body = bodyDecoder(event[1])
return (headers, body)
return stream.map(func)
@staticmethod
def _get_helper(sc):
try:
return sc._jvm.org.apache.spark.streaming.flume.FlumeUtilsPythonHelper()
except TypeError as e:
if str(e) == "'JavaPackage' object is not callable":
FlumeUtils._printErrorMsg(sc)
raise
@staticmethod
def _printErrorMsg(sc):
print("""
________________________________________________________________________________________________
Spark Streaming's Flume libraries not found in class path. Try one of the following.
1. Include the Flume library and its dependencies with in the
spark-submit command as
$ bin/spark-submit --packages org.apache.spark:spark-streaming-flume:%s ...
2. Download the JAR of the artifact from Maven Central http://search.maven.org/,
Group Id = org.apache.spark, Artifact Id = spark-streaming-flume-assembly, Version = %s.
Then, include the jar in the spark-submit command as
$ bin/spark-submit --jars <spark-streaming-flume-assembly.jar> ...
________________________________________________________________________________________________
""" % (sc.version, sc.version))


THE MASK OF ZORRO
Release Date: July 17, 1998 Starring: Antonio Banderas, Anthony Hopkins, Catherine Zeta Jones, Stuart Wilson, Matthew Letscher Directed by: Martin Campbell Distributed by: Sony Pictures Entertainment / TriStar Pictures MPAA Rating: PG-13 (intense action and violence) URL: http://www.execpc.com/~kinnopio/reviews/1998/mask.htm
For the first time in a long time, both the experienced cinema-goer and the novice movie-watcher get to experience top-notch derring-do and flamboyance without having to travel to an obscure film festival. With a zest normally reserved for independent or little-known features, THE MASK OF ZORRO combines excellent acting and theatrics with guns-blazing action with sensual romanticism with an interesting story for a smorgasboard of demographic targets. Everything about ZORRO is handled thoughtfully, carefully, and intelligently for a motion picture that definitely comes in at above par.
Directed by Martin Campbell, whose last feature saw the return of James Bond in GOLDENEYE, the movie is set in early 19th century Mexico tells the story of the legendary folk hero, Zorro. The masked man is to Mexicans then what Batman is to prepubescent comic readers today - a man who works against crime and injustice anonymously. Similar to Batman, Zorro's true identity is that of an aristocrat, Don Diego de la Vega (Anthony Hopkins). And so it begins, as Zorro strides onto the screen a la James Bond, etches his Z into space, and the audience is ready. The story, then: Diego wearies of his extensive tenure as Zorro and, after losing his wife and daughter to a cruel tyrant (Stuart Wilson), he retires into hiding. Many years later, he comes across a young man named Alejandro Murrieta (Antonio Banderas) who is seeking to avenge his brother's death.
The opening scenes, which develop the characters and motives of Don Diego and Alejandro, are well done in every respect. The audiences grow to know and like the characters. Both are well-cast, Banderas for his sex appeal and Hopkins for his wizened countenance; these appointments continue to show their worth as Banderas and Hopkins play off of each other for the movie's comic relief. As the story continues, it turns out that the man who murdered Alejandro's brother, Captain Harrison Love (Matthew Letscher) now works for Don Diego's villain, Don Rafael Montero. Don Diego takes Alejandro under his wing and trains him to be his successor as the masked hero of Mexico. Unfortunately for both men, the wrench in their plans is the reappearance of Don Diego's daughter, Elena (Catherine Zeta Jones) who had been raised as Montero's own during the intervening years.
Jones plays Elena with noticeable strength and energy, and the result of this is a romance that sizzles veritably between Elena and Alejandro. Although the relationship between Elena and her mostly-unknown father Don Diego is not hit upon until late in the movie, it nevertheless provides a believable motive for Diego's character to take the actions that he does. The only plot hole that the John Eskow, Ted Elliot, and Terry Rossio script encounters, in fact, is the post-Cold War-esque invention of a motive for Don Rafael. Although the Zorro's primary goal was to defend the wronged in the Mexican Revolution, the lack of such an event means that the same villain must inspire a new revolution, this time with the succession of California from the United States. But for all of the fun and games that follows, it's definitely worth looking past; it's also worth paying full price to see the pic.
FINAL AWARD FOR "THE MASK OF ZORRO": 3.5 stars - a great movie.
-- Craig Roush<EMAIL_ADDRESS>-- Kinnopio's Movie Reviews http://www.execpc.com/~kinnopio
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


Redmi K20 Pro (8GB+256GB) now selling for $327 - Gizchina.com
by Efe UdinRedmi K20 Pro (8GB+256GB) now selling for $327
1 (20%) 1 vote
The Redmi K20 Pro is one of many Xiaomi devices that is currently receiving the MIUI 11 update. As the Chinese 11.11 sales hit the road, Redmi announced that the K20 Pro 8GB+256GB version now sells for 2299 yuan ($327). It’s quite interesting to get an 8GB+256GB device for less than $350.
The Redmi K20 Pro is the first true flagship of the Redmi brand. Lu Weibing, vice president of Xiaomi Group and general manager of Redmi brand, said that the K20 series complements Redmi’s deficiency in flagship phones. The K20 series is the only flagship series of the Redmi brand.
This smartphone comes with a 6.39-inch AMOLED full-screen display with a resolution of 1080 x 2340. It is equipped with Qualcomm Snapdragon 855 flagship platform coupled with up to 8GB of RAM and 256GB of internal storage. In the camera department, it uses a 20MP pop-up front camera. In addition, it comes with a 48MP main sensor on the rear as well as a 13MP and 8MP shooters. Its lights are kept on with a 4000 mAh battery which supports 27W fast charge.
According to Lu Weibing, the ultimate price/performance ratio is a business model for Redmi and not sales tactics. All in all, the current price of the K20 Pro is very competitive.


--- layout: jumbohead title: Bootstrap Kit has_navbar: 1 header: '
All you want from Bootstrap but don`t have in Bootstrap (yet).
GitHub NPM
Currently v4.0.1
Didn't find a component?
Request -or- Contribute


rotten > Library > Travel > Cities > Dallas
Dallas, TX
Timeline
| 22 Nov 1963 |
John F. Kennedy assassinated at Dealey Plaza, Dallas. |
| 1975 |
The Pepsi Challenge commences in Dallas, TX. |
| 1978 |
Debbie Does Dallas. |
| 6 Jun 1996 |
Darlie Routier stabs her children to death with a kitchen knife, Rowlett TX. |
Pornopolis |
Rotten |
Faces of Death |
Famous Nudes
|


Cartelle is Stevijn van Olst, Johnny Slack and friends. We are a digital creative studio from Amsterdam. We focus on interactive concepting, design, art direction, development, animation, 3D and creative programming.
Contact
We’d love to hear from you. For any enquiries, please contact us at hello@cartelle.nl.