Chapter 9 Regression
Two views of regression:
Linear regression is a model of the data generating process:
\[ \begin{aligned} Y &= X \beta + \epsilon \\ \epsilon &\sim \mathsf{Normal}(0, \sigma^2) \]
- Gauss-Markov assumptions mean BLUE
- \(\hat{beta}\) unbiased \(\epsilon\) uncorrelated with \(y\), \(\beta\) are unbiased even if assumptions about errors are wrong.
- If errors uncorrelated and homoskedastic, if sample size large, the classic standard errors are correct even if errors aren’t normal.
Conditional expectation function
- OLS is also a model of \(E(y| X)\), which is what we are interested
- Even if the functional form is wrong (not-linear), OLS produces the best linear approximation to the conditional expectation function (CEF).
Agnostic justifications for
When is a CEF Linear?
- Saturated model
- Outcome and covariates are multivariate normal
OLS produces the best linear predictor (mean squared error) of \(y_i\)
Asymptotic OLS Inference
\[ \hat{\beta}_{OLS} = (X'X)X'y \approx E(Y | X) \]
Heteroskedasticity
When will it occur?
- CEF is linear, but \(\sigma^(x) = \Var(Y_i | X = x)\) is not linear
- \(E(Y_i | X_i)\) is not linear, but use a linear regression to approximate it.
How to estimate the variance covariance matrix of \(\beta\)?
9.1 Observational Studies
Identification assumptions
Positivity: All observations can receive the treatment \[ 0 < \Pr(D_i = 1|X, Y(1), Y(0)) < 1 \]
No unmeasured confounding \[ \Pr(D_i = 1 | X, Y(1), Y(0)) = \Pr(D_i = 1 | X) \] or \[ D_i \perp (Y_i(0), Y_i(1) | X_i \] This can be called unconfoundedness, ignorability, selection on observables, no omitted variables, exogenous, conditional exchangeable.
9.2 Regression and Causality
- What does it mean for the \(\hat{\beta}\) to be biased?
- OVB Doesn’t make sense without a causal question?
- Regression is causal if the CEF is causal
- When is the CEF is causal?
9.3 Treatment Effects
Potential outcomes \(Y_i(1)\) and \(Y_i(0)\).
ATE (Average Treatment Effect) \[ \tau = E(Y_i(1) - Y_i(0)) \]
ATT (Average Treatment Effect on the Treated) \[ \tau_{ATT} = E(Y_i(1) - Y_i(0) | D_i = 1) \]
9.4 OLS
Suppose there is a constant treatment effect, \(\tau\): \[ \begin{aligned} Y_i(0) &= \alpha + X'_i \beta + u_i \\ Y_i(1) &= \alpha + \tau + X'_i \beta + u_i \end{aligned} \] This means that \[ Y_i(1) - Y_i(0) = \tau \] for all observations.
The usual regression formula is, \[ \begin{aligned}[t] Y_i &= \underbrace{Y_i(1) D_i}_{\text{received treatment} } + \underbrace{Y_i(0) (1 - D_i)}_{\text{didn't receive treatment}} \\ &= \color{orange}{Y_i(0)} + \color{blue}{(Y_i(1) - Y_i(0)) D_i} \\ &= \color{orange}{\alpha} + \color{blue}{\tau D_i} + \color{orange}{x'_i \beta} + \color{orange}{u_i} \end{aligned} \]
Remember regression anatomy?
Estimate residuals of regression of the treatment and outcome on the covariates \[ \begin{aligned} \tilde{Y}_i = Y_i - E(Y_i | X_i) \\ \tilde{D}_i = D_i - E(D_i | X_i) \end{aligned} \]
Then running a regression of \(\tilde{Y}_i\) on \(\tilde{D}_i\) is equivalent to controlling for \(X_i\). \[ \begin{aligned} \tilde{Y}_i &= \alpha + \tau D_i + x'_i \beta + u_i \\ \tilde{Y}_i &= \alpha + \tau \tilde{D}_i + \tilde{u}_i \end{aligned} \]
What does OLS estimate? \[ \hat{\tau}_{OLS} = \tau + \frac{\Cov(\tilde{D}_i, \tilde{u}_i)}{\Var(\tilde{D}_i)} \]
The key identification assumption is \[ \Cov(\tilde{D}_i, \tilde{u}_i) = 0 \] I.e. conditional on \(X\), there is no relationship between \(D_i\) and \(u_i\).
So \(u_i\) is a function of \(X_i\) and \(Y_i(d)\):
- \(u_i = Y_i(0) - \alpha - X'_i \beta\) when \(D_i = 0\)
- \(u_i = Y_i(1) - \alpha - \tau - X'_i \beta\) when \(D_i = 1\)
- Given \(X_i\), only variation in \(u_i\) comes from \(Y_i(d)\)
No unmeasured confounding implies this: \[ D_i \perp (Y_i(1), Y_i(0)) | X_i \to D_i \perp u_i | X_i \to \Cov(\tilde{D}_i, \tilde{u}_i) = 0 \]
What if it is violated?
Suppose there is an omitted variable \(Z_i\) (residualized from \(X_i\)), \[ \tilde{u}_i = \gamma \tilde{Z}_i + \omega_i \]
\[ \hat{\tau}_{OLS} = \tau + \gamma \frac{\Cov(\tilde{D}_i, \tilde{Z}_i)}{\Var(\tilde{D}_i)} \]
What is the bias in OLS?
- Coefficient of \(Z\) on \(y\) (\(\gamma\))
- Correlation between \(\tilde{D}_i\) and \(\tilde{Z}_i\)
9.5 Heterogeneous Effects and Regression
When does \(\tau = \tau_R\)?
- Constant treatment effects: \(\tau(x) = \tau = \tau_{R}\)
- Constant probability of treatment: \(e(x) = P(D_i = 1|X_i = x) = e\)
- Incorrect model (linearity) in \(X\) leads to more bias
9.6 Balance and Imbalance
See Gelman and Hill (p. 202)
Overlap: the extent to which the range of data is the same across treatment groups
Balance: the extent to which the distribution of data is the same across treatment groups
Imbalance and lack of overlap mean more reliance on the model.
How to evaluate overlap … see below. But plotting the averages of groups for a binary variable (Gelman and Hill, p. 202), or the standardized coefficients of regressions for continuous variables is one way.
Convex hull
King and Zheng: The bias comes from four sources: \[ \text{Bias} = \hat{\tau}_{OLS} - \tau = \Delta_o + \Delta_p + \Delta_{e} + \Delta_{i} \] where
- \(\Delta_o\): Omitted variable bias
- \(\Delta_p\): Post-treatment bias
- \(\Delta_e\): Extrapolation bias—wrong functional form outside the available data
- \(\Delta_i\): Interpolation bias—wrong functional form inside the available data
One way to address this:
The problem: lack of overlap and balance can lead to higher \(\Delta_i\) and \(\Delta_e\).
What can we do about it?
- check for balance and overlap
- use matching instead of regression
- matching before regression. Sometimes called doubly robust.
9.7 Key Things
- Agnostic view of regression: CEF and robust standard errors
- How to evaluate OVB?
- Model dependence
- Pre-treatment vs. post-treatment variables
- Regression vs. matching
9.8 Limited Dependent Variables
Usual advice: use logit/probit for binary, Poisson for counts
OLS (with robust SE) is correct when:
- binary treatment and no covariates (difference in means)
- binary treatment, discrete covariates, saturated models (stratified diff-in-means)
In unsaturated models, OLS is not bad
Want estimate of the Average Marginal Effect (\(\int_X p(X) E(y | X) dX\)).
OLS “line” is not a good estimator of any individual marginal effect, but may be fine for overall AME.
Logit/probit/Poisson:
- try to get model of CEF
- then calculate AME from estimated CEF
Logit/probit/Poisson impose additional distributional assumptions to get CEF. Can help if good. Can hurt if wrong. May not be necessary if only care about AME.
More common in econ than political science. Many marginally methodological political scientists will look at using OLS for LDVs weirdly. Do whatever the reviewer wants even if they are wrong on this front. The entire point is that OLS vs. these models probably won’t be that different for AME (but if they are … you probably have to think very carefully about your model).
9.9 Assessing Selection on Observables
It’s not testable, because it places no restrictions on the observed data. It requires that the distribution of \(Y_i(0)\) is the same for the treatment and non-treatment groups, \[ \underbrace{p( Y_i(0) | D_i = 1, X_i )}_{\text{unobserved}} = \underbrace{p(Y_i(0) | D_i = 0, X_i)}_{\text{observed}} \] But that requires observing the counterfactual, which isn’t known.
Can use DAGs to use find variables to control for via the backdoor criterion, but the DAG must be correct.
What can we do?
- Placebo tests: Test a different \(D_i\) (placebo) that should have no effect.
- Balancing tests: Test that the observed covariate distributions are the same for the treated and untreated groups.
- Sensitivity/Coefficient stability tests: Test that the treatment effect is insensitive to the addition of new control variables.
- Control for as much pre-treatment variables as possible and use principled variable selection methods to optimally trade-off bias and variance.
But the general problem is that this assumption is fundamentally untestable. This is why there is a preference for experiments and methods that try to rely on plausibly exogenous variation in the assignment of \(D_i\):
- instrumental variables (randomization + exclusion restriction)
- over-time-variation (diff-in-diff, fixed effects)
- arbitrary thresholds for treatment assignment (RDD)
9.10 Omitted Variable Tests
The long equation, where we are interested in the estimate of \(\beta\): \[ y_i = \alpha + \beta x_i + \gamma z_i + \epsilon \] If we estimate \[ y_i = \alpha^{(s)} + \beta^{(s)} x_i + \epsilon^{(s)} \] the omitted variable bias formula is, \[ \beta^{(s)} - \beta = \gamma \delta \] where \(\delta\) is the coefficient of the balancing equation (regression of \(x_i\) on \(z_i\)): \[ z_i = \delta_0 + \delta x_i + u_i . \]
How to assess omitted variable bias?
Balancing tests: Test the null hypothesis that \(x\) and \(z\) are uncorrelated. \[ H_0: \delta = 0 \]
Coefficient comparison (sensitivity) test, \[ H_0: \beta^{(s)} - \beta = 0 \]
Note that the coefficient comparison test is equivalent to \[ H_0: \beta^{(s)} - \beta = 0 \leftrightarrow \delta = 0 \text{ or } \gamma = 0 \]
How to implement these? More difficult for multiple controls.
Balancing test: Regress \(z\) on \(x\). Hard with multiple controls. See Sec 5.4.
Covariate comparison: Basically the assumption/intuition in these tests is that going from no-controls to observed controls gives the researcher some insight into how problematic unobserved controls could be.
Informally compare coefficients. Add variables and see if \(\hat{\beta}\) changes substantively.
Hausmann test and Chow tests proposed in Hausmann. Pischke and Pei.
Altonji, Elder, and Taber (2005) propose and Nunn and Wantchekon (2011) use a slightly different method assess potential bias. Let \(\hat{\beta}\) be the OLS estimate of \(\beta\) from the full regression (all covariates), and \(\hat{\beta}^{(s)}\) be the OLS estimate from a regression with no (or few) controls. Calculate \[ B = \frac{\hat{\beta}}{\hat{\beta}^{(s)} - \hat{\beta}} . \] The smaller \(\hat{\beta}^{(s)} - \hat{\beta}\), the less the regression is selected by selection on observables. This should be greater than one. The interpretation of \(B\) is that it is the multiplier that unobserved covariates would have to have in order to make the estimated effect equal to zero.
This coefficient stability argument makes some sense. If we think of observed covariates as a sample from the population of possible covariates, they provide information about the distribution of other unobserved covariates. But this sample isn’t random, and that can have perverse incentives:
If the researcher does a good job controlling for confounders, then the effect of future confounders may appear large.
If the researcher does a poor job controlling for confounders, then the effect of future confounders will appear minimal.
This depends on a pre-existing “good” model, but there’s no way to assess that. Oster (2016) adjusts this method to account for the \(R^2\) of the regression. If it explains a lot, there is less for omitted variables to do. However, the solution is complicated.
9.11 My Advice
Focus on one variable at a time (no all causes regression)
Control for as many pre-treatment covariates as you can
Check that you aren’t controlling for post-treatment variables
If you are only interested in the AME of the treatment, you can include it as a linear term.
It is more important to be flexible as the controls (while trading off bias and variance). You shouldn’t worry about discretizing continuous controls. It isn’t wrong because they are continuous. It may or may not be useful for improving balance.
Formally or informally check the balance and overlap of your regression.
Use regression anatomy to understand how many effective number of observations you have … which observations have the most variation in the treatment after conditioning on the controls. These are the cases which are providing all the information about your inferences.
Use either a principled model selection method with regularization, and/or the OVB tests
Use a placebo test if possible
Use heteroskedasticity consistent (robust) standard errors; possible with autocorrelation or clustering adjustment.
Take the OLS model “seriously but not literally”. It is an approximation of the CEF, and under some assumptions it is a type of weighted average treatment effect. It does not “assume” or “require” that the effect is linear or homogeneous (though it works better in those situations).


Critics slam revamped Didi Chuxing carpool service
BEIJING: Ride-hailing giant Didi Chuxing said on Wednesday (Nov 6) it was reinstating a carpooling service suspended in China last year after two female passengers were murdered by drivers, but critics slammed new safety rules as discriminatory against women.
While men can use the revamped "Hitch" service - which is separate from Didi's main ride-hailing platform - until 11pm, women will only be able to use it between 5am and 8pm at night.
In a statement on social media platform Weibo, Didi said it had added 330 "feature optimisations" in the 435 days since the service was suspended, and received 300,000 suggestions from users.
The new pilot operation will be launched in seven cities this month, Didi said, and will offer users "safe, economical, friendly and environmentally friendly ways to travel."
As part of its new safety drive, Didi will also limit the length of journeys available in the carpool service to less than 50 kilometres.
The news that women were restricted to shorter hours than men was met with angry reactions online.
 I get the point. The root cause of sex crimes is that women go out at night," said Weibo user.
"If the driver grabs money, do you want to tell the passengers not to take valuables with them?" wrote another.
"This is called discrimination," raged a third.
Didi's ride-hailing services are used by hundreds of millions of customers in China.
But the company came under intense criticism after two young female passengers were murdered last year in two separate cases by drivers using the Hitch carpool service.
Didi apologised, suspended Hitch and strengthened its safety features.
The episode fuelled pressure for greater regulation of carpooling services, which generally face less stringent requirements and oversight than regular ride-hailing.
In February this year Didi, which muscled Uber out of China in 2016, said it was planning to make around 2,500 "new hires" in areas including safety technology, product engineering and driver management.
It claims more than 31 million drivers and 550 million users across its various services.


Animating Ember
From the beginning
Rob Harper / @rdharper
Jan 9, 2014
Press s
to see presentation notes
Why bother?
Animation is a requirement to make a web app feel like a native app on a mobile device
Animations help the user preserve context and help show relationships between application states and actions
Why us?
Ember-animated-outlet is a great solution for a set of animation needs (route transitions)
Adding animation to the core library has been discussed , but it's not trivial to design well
But at the app level, it's not so hard
Route Transitions (back button) {{outlet}}
Modals ContainerView or {{outlet}}
...any view coming or going CollectionView or {{each}}
Route transitions: Navigating data hierarchies complete with back button support
Modals: Reveal effects
Lists: deleted items slide away
Implementing all of these boil down to a single view class: ContainerView. Outlets are containers in which the current route's view is rendered. Lists are CollectionViews, subclasses of a container.
Let's start with route animation and modals
Ember.ContainerView = Ember.View.extend(Ember.MutableArray, {
/**
If you would like to display a single view in your ContainerView,
you can set its currentView property. When the currentView property
is set to a view instance, it will be added to the ContainerView. If
the currentView property is later changed to a different view, the
new view will replace the old view. If currentView is set to null,
the last currentView will be removed.
*/
currentView: null
});
ContainerView - it manages the lifecycle of views within it: added views are placed
on the DOM and rendered; removed views are removed from the DOM and destroyed. Its implementation
has a contains a little sugar for managing a single "currentView" using property binding.
CurrentView Default Behaviour
Old View
container.removeObject( oldCurrentView );
New View
container.pushObject( newCurrentView );
We can boil the parts of ContainerView's handling of currentView that we care about down to these two lines of code. Remember that the ContainerView is managed just like an array. Views added to the array are added to the DOM; views removed from the array are removed from the DOM.
Reimplementing Default Behaviour
Edit this example
Here's the simple test harness we'll use as we develop our animation capabilities. We'll subclass ContainerView and get to work. Clicking within the dotted box will advance through steps of the test case, the test case code for the step will be shown below.
Here's our ContainerView subclass with currentView handling reimplemented (copied).
Old View
Ember.run.later( function() {
container.removeObject( oldCurrentView );
}, 2000 );
New View
container.pushObject( newCurrentView );
Recall that ContainerView
manages an array of views
Let's make a simple change to the removal of the view being dismissed. Let's defer that for 2 seconds.
This is fairly useless but illustrates an important point about the ContainerView: recall that it's an array. Just because currentView only allowed to be a single view at any time, the ContainerView can contain as many views as we like. This is arguably the most important point in this presentation.
Edit this example
Notice how the view being removed now sticks around for 2 seconds before being destroyed. Clicking quickly can build up a whole queue of views to be destroyed.
Old View
oldCurrentView.$().fadeOut( 2000, function() {
container.removeObject( oldCurrentView );
});
New View
container.pushObject( newCurrentView );
Change the deferred removal to a fade out then deferred removal.
Old View
oldCurrentView.$().fadeOut( 2000, function() {
container.removeObject( oldCurrentView );
});
New View
container.pushObject(newView);
newView.one('didInsertElement', function() {
newView.$().hide().fadeIn(2000);
});
Adding a fade in will allow us to complete a cross-fade effect. Two things to note:
We have to wait until the new view receives didInsertElement. Until then it is not on the DOM and there isn't an element to fade in
We need to use a little css to position the views ontop of each other
Edit this example
Quick and dirty cross-fading ContainerView in a few lines of code. It's not production ready because there are a number of edge cases and gotchas to consider (covered later) but it's functional.
Now What?
Our ContainerView can easily handle fading in and out modal views by binding to currentView. But what about route transitions?
{{outlet view="myAnimatedContainer"}}
Routes and Modals
Luckily all an outlet is is a ContainerView whose currentView is managed by the Ember Router. By specifying the viewClass to use in an outlet we can instruct Ember to use our subclass and our route changes start animating. This also has the effect of animating on the browser's back button - just another route transition.
Using outlets for modal view containers is also a common pattern and works the same way
Instead of animating currentView
, animate all the views!
Override CollectionView's arrayWillChange
and arrayDidChange
Getting collections ({{each}}) to work requires extending the concepts we applied when changes occur to the single currentView property to a changing array of views.
Edit this example
I've extracted the code to reveal and dismiss views into helper methods
A large amount of the code here is copied from the base implementation of the array change methods. The current implementation doesn't provide hooks to allow us to manipulate the way views are added and removed from the DOM so we have to override the entire method. Breaking up this logic into overridable template methods is arguably the easiest first step for Ember to support animation in the core.
One complicating factor in the implementation is the need to keep a parallel array of views. In the base implementation of the CollectionView the list of child views matched the array content model 1:1. However since we are deferring the removal of views to animate out this relationship is broken. If the content array removes the 3rd item, we need to know which view represents that item.
Whole container...
{{outlet view="myAnimatedContainer" effect="drop"}}
...or by view
MyAnimatedContainer.defineTransition({
from: 'some-parent-view',
to: 'some-child-view',
effect: 'slideLeft',
duration: 500
});
MyAnimatedContainer.defineTransition({
from: 'some-child-view',
to: 'some-parent-view',
effect: 'slideRight',
duration: 250
})
Before discussing some of the gotchas, let's add features!
Whole container: We could control the animation effect on the whole container - every view is given the same treatment. Reasonable choice for many cases
By view: Alternately we could register view-to-view "state transitions"
Delegate to child views...
FadingView = Ember.Mixin.create({
reveal: function() {
var self = this;
return new Ember.RSVP.Promise( function(resolve, reject) {
self.$().hide().fadeIn(500, resolve);
});
},
dismiss: function() {
var self = this;
return new Ember.RSVP.Promise( function(resolve, reject) {
self.$().fadeOut(500, resolve);
});
}
});
MyAlertModal = Ember.View.extend( FadingView, { /* ... */ });
Delegate: Take the effects out of the container and let the child views themselves handle reveal/dismiss while communicating effect completion with promises (although this still requires style-coordination between incoming and outgoing views, e.g. layout)
...or CSS3 Transitions
Enter / Leave Start During
Enter .em-animate .em-enter .em-enter-active
Leave .em-animate .em-leave .em-leave-active
CSS3: Take an Angular ng-animate approach and use css classes for animation setup and execution - my preferred approach. The details of the effect are entirely captured in CSS, nothing in JS.
Caveats and Gotchas
not quite production ready yet...
Container Destruction: Animations could interact with destroyed views
Animation Queues: Jump to the end of active animation when a second is triggered
Initial State: How should view / collection items that start in container be handled?
Container Destruction: If the container is destroyed during an animation it will short circuit the child view destruction. When the animation complete timeout fires both the container and the child view are destroyed. Need to guard.
Animation Queues: Without this you get the effect as we saw earlier with several views animating at once. Canceling can be a pain using CSS3 transitions
Initial State: Initial view contents should probably not animate in. Adding views in arrayDidChange should check to see if container is on the DOM yet and if not, don't animate children in.
Caveats and Gotchas
not quite production ready yet...
Deferred destruction: Two views on the DOM at once, active bindings
Performance: Child view creation can cause major jitter in the animation
Same route, new data: Route's view is reused so no animation
Deferred destruction: Often not an issue but could be. For example, a 3rd party plugin that expects only to be in the DOM once, such as a commenting widget. Also, the view being dismissed still has active bindings which, depending on your app design, could mean it changes as it animates out to reflect new app state.
Performance: If the inbound view contains an iframe that must then load, the animation will stutter terribly. This may necessitate a whole new set of lifecycle signals around animation (didStart, didComplete, didCancel, etc)
Same route, new data: Ember reuses the same route view if the model for the route changes but the view/controller class does not. As such no transition between states will occur. This is not a trivial problem to solve as @ghedamat can attest!
Wrapping Up
Manipulating view lifecycle in a ContainerView can be easy...
...but it means overwriting existing functions, copy pasta
Adding animation to your Ember app can be easy...
...but animation as part of the Ember is not trivial
Robust view lifecycle with deferred support in Ember core → implement animation support with better building blocks


Bomb attack in Syrian town of Al-Bab kills 10 people
by ReutersA bomb attack killed 10 people in the northern Syrian town of Al-Bab near the Turkish border on Saturday, Turkish state-run Anadolu news agency said.
It was not immediately clear who had carried out the attack.
Turkey and its Syrian rebel allies have mounted three separate offensives in northern Syria against Kurdish militia in the region, seizing control of area along the Turkish border, including Al-Bab.


Kitura 2.4 introduces "Type-safe Middleware": middlewares that have a structure and data types that you define, that are instantiated and passed to your handler upon a request. Type-Safe Sessions is an implementation of TypeSafeMiddleware
that allows an application developer to describe the exact structure and content of a session, in the form of a class
conforming to the TypeSafeSession
protocol.
The key feature is in the name: type safety. The previous implementation of KituraSession that can be used alongside "Raw Routing" provides you with a general [String: Any]
store, into which any type could be stored and retrieved. This places the burden of type checking on the user: any value retrieved from the session would need a downcast to its expected type, resulting in boilerplate checking and error handling, and the possibility of runtime errors.
In contrast, TypeSafeSession
has been designed to provide the following guarantees:
TypeSafeSession
is Codable
, so all types that are stored in the session must also be Codable
.Add Kitura-Session
to your Package.swift
dependencies:
.package(url: "https://github.com/IBM-Swift/Kitura-Session.git", from: "3.2.0"),
Add KituraSession
to your Application targets:
.target(name: "Application", dependencies: [ "KituraSession", ...
Regenerate your Xcode project:
swift package generate-xcodeproj
To create a TypeSafeSession
, declare a type that conforms to the TypeSafeSession
protocol:
// Defines the session instance data
final class MySession: TypeSafeSession {
let sessionId: String // Requirement: every session must have an ID
var books: [Book] // User-defined type, where Book conforms to Codable
init(sessionId: String) { // Requirement: must be able to create a new (empty)
self.sessionId = sessionId // session containing just an ID. Assign a default or
books = [] // empty value for any non-optional properties.
}
}
// Defines the configuration of the user's type: how the cookie is constructed, and how the session is
// persisted.
extension MySession {
static let sessionCookie: SessionCookie = SessionCookie(name: "MySession", secret: "Top Secret")
static var store: Store?
}
The minimum requirements for a TypeSafeSession
are:
sessionId: String
,sessionId
,sessionCookie: SessionCookie
that defines the name of the cookie and the secret data used to encrypt it,store: Store?
that defines how sessions should be persisted.If store
is not assigned, then a default in-memory store is used. Kitura-Session-Redis is an example of a persistent store for sessions, which supports expiry.
The MySession
type can then be included in the application's Codable route handlers. For example:
struct Book: Codable {
let title: String
let author: String
}
router.get("/cart") { (session: MySession, respondWith: ([Book]?, RequestError?) -> Void) -> Void in
respondWith(session.books, nil)
}
router.post("/cart") { (session: MySession, book: Book, respondWith: (Book?, RequestError) -> Void) -> Void in
session.books.append(book)
session.save()
respondWith(book, nil)
}
Here the cart accepts a book item of type Book
, appends the book to the list of books in the session, and responds with the book that was added, or a RequestError.internalServerError
if the session could not be saved (such as a failure of the session store).
Note that if you define MySession
as a class, it must be marked final
.
If you define MySession
as a struct, then in order to modify it within a handler, you will first need to assign it to a local variable:
router.post("/cart") { (session: MySessionStruct, book: Book, respondWith: (Book?, RequestError) -> Void) -> Void in
var session = session // Required when mutating a Struct
session.books.append(book)
session.save()
respondWith(book, nil)
}
It is necessary to save the session when updates have been made:
session.save()
To explicitly terminate a session, removing it from the store, call:
session.destroy()
It is possible that the session store could become inaccessible, resulting in a failure to persist or remove sessions from the store. In such cases, an error will be logged for you. However, you can also take additional steps in the case of an error by supplying a callback which takes an Error?
:
router.post("/cart") { (session: MySession, book: Book, respondWith: @escaping (Book?, RequestError) -> Void) -> Void in
session.books.append(book)
session.save() { error in
if let error = error {
respondWith(nil, .internalServerError)
} else {
respondWith(book, nil)
}
}
}
If you have declared MySession
as a class, it is possible to implement an automatic saving of the session by defining a deinitializer on the class:
deinit {
self.save()
}
Be aware that the session will then be saved after every request, regardless of whether it has been modified.
You may also want a method of tracking whether destroy()
has been called, to suppress calling save()
during deinitialization - otherwise, the session will be persisted back into the store again. For example:
var destroyed: Bool = false {
didSet { destroy() }
}
deinit {
if !self.destroyed {
self.save()
}
}
Then, you can replace session.destroy()
with session.destroyed = true
.


Make Application: run mkapp
to generate an app bundle to install and run on a target.
Application bundles are compressed archives containing everything that needs to be sent to your target device to install your app.
The main input for mkapp
is an Application Definition .adef file that contains these definitions:
- executables to build when the app is built
- components and/or other files to build into those executables
- other files to be included as a part of the app
- if the app will run in a sandbox, files to access outside the sandbox
- executables to run when the app is started
- command-line arguments and environment variables to pass to those apps
- limits to place on the app (CPU, memory, etc.)
mkapp
will parse the .adef file, determine which components, interface definitions, and other source files are needed, build those into the libraries and executables required, generate the on-target configuration data needed, and add everything to an app bundle ready for installation on the target.
To display usage, run
mkapp --help
- Note
mkapp
only knows about the app it's building. Typos in binding values won't be detected, but your app will hang. The note in mksys has details how to troubleshoot.
See Application Definition .adef files for details on app def files.
Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.


--- layout: home paginate: true alt_title: "Welcome to Free2Dots!" sub_title: "Exploring the world, two dots at time." introduction: | _This blog is currently updated here_: [Free2Dots](https://free2dots.github.io) Tutorial lessons form a.y. 2018/2019 of the Computational Biophysics course can be found [here](https://gianfree.github.io/QCB/).
A personal space for sharing and learning new topics. In a way to be **free to ...** # Basically Basic is a [Jekyll theme](https://jekyllrb.com/docs/themes/) meant as a substitute for the default --- [Minima](https://github.com/jekyll/minima). Conventions and features found there are fully supported by **Basically Basic**, with a few enhancements thrown in for good measure: # # - Clean responsive design with six customizable skins # - Curriculum Vitæ/Resume layout powered by [JSON data](http://registry.jsonresume.org/) # - About page layout # - Disqus Comments and Google Analytics support # - SEO best practices via [Jekyll SEO Tag](https://github.com/jekyll/jekyll-seo-tag/) #actions: # - label: "Get Started" # icon: github # url: "https://github.com/mmistakes/jekyll-theme-basically-basic" # - label: "Download" # icon: download # url: "https://github.com/mmistakes/jekyll-theme-basically-basic/archive/master.zip" ---


This is NewAny.
Through it, you can create any files as you wish.
Source Code can be found in GitHub.
With MIT License.


UIDevice(MKKit) Category Reference
| Declared in | UIDevice+MKKit.h |
Overview
Overview
Adds methods to UIDevice for quick determination of device types.
Tasks
-
+ deviceType
Determines what type of device is currenty being used and returns a MKDeviceType to match. Possible return values are:-
MKDeviceTypeUnknown
: the type of device could not be determined. -
MKDeviceTypeiPhone
: the devices is an iPhone 3G, 3S, 4, or 4S. -
MKDeviceTypeiPhone5
: the device is an iPhone 5. -
MKDeviceTypeiPad
: the device in an iPad.
-
Class Methods
deviceType
Determines what type of device is currenty being used and returns a MKDeviceType to match. Possible return values are:
-
MKDeviceTypeUnknown
: the type of device could not be determined. -
MKDeviceTypeiPhone
: the devices is an iPhone 3G, 3S, 4, or 4S. -
MKDeviceTypeiPhone5
: the device is an iPhone 5. -
MKDeviceTypeiPad
: the device in an iPad.
+ (MKDeviceType)deviceType
Return Value
MKDeviceType Enum Variable
Declared In
UIDevice+MKKit.h


- Maciej Małecki -
- Marcin Iwanczewski -
Home Assistant
Raspberry Pi
Home Assistant posiada Plugin-Store
| Bit 3 | Bit 2 | Bit 1 | Bit 0 |
| DUP | QoS | QoS | RETAIN |
Rule1 on Switch1#state=1 do publish bedroom.pir.01/stat/MOTION ON;
RuleTimer1 30 endon on Rules#Timer=1 do publish bedroom.pir.01/stat/MOTION OFF endon
binary_sensor:
- platform: mqtt
name: Bedroom PIR sensor
device_class: motion
state_topic: "bedroom.pir.01/stat/MOTION"
switch:
- platform: mqtt
name: "Bed strip left"
state_topic: "bedroom.pir.01/tele/STATE"
command_topic: "bedroom.pir.01/cmnd/POWER"
availability_topic: "bedroom.pir.01/tele/LWT"
payload_on: "ON"
payload_off: "OFF"
Rule1 on Switch1#state=1 do publish bedroom.pir.01/stat/MOTION ON endon
on switch1#state=0 do publish bedroom.pir.01/stat/MOTION OFF endon
automation:
- alias: Turn on left bedstrip when there is movement
trigger:
- entity_id: binary_sensor.bedroom_pir_sensor
platform: state
to: 'on'
action:
- alias: ''
data:
entity_id: light.bedroom_left_pir_switch
service: homeassistant.turn_on
- alias: Turn off left bedstrip 30 seconds after last movement
trigger:
- entity_id: binary_sensor.bedroom_pir_sensor
for: 0:00:30
platform: state
to: 'off'
action:
- data:
entity_id: light.bedroom_left_pir_switch
service: homeassistant.turn_off
Rule1 on RfReceived#Data do publish rainbow.lr/cmd/rfcode/%value% ON endon
binary_sensor:
- platform: mqtt
name: "RF Switch 01"
state_topic: "rainbow.lr/cmd/rfcode/F26A9C"
automation:
- alias: RF Movies
trigger:
- payload: 'ON'
platform: mqtt
topic: rainbow.lr/cmd/rfcode/F26A9C
action:
- scene: scene.movies
MCP1700: LDO 3.3V, Vmax 6V, Vmin 2.3V, dropout 178mV.
on MQTT#Connected do
AsyncEvent,evtPublish
endon
on MQTT#Disconnected do
AsyncEvent,evtNext
endon
on evtPublish do
Publish,%sysname%/vcc,[vcc#vcc]
Publish,%sysname%/temp,[weather#temp]
Publish,%sysname%/hum,[weather#hum]
Publish,%sysname%/press,[weather#press]
AsyncEvent,evtNext
endon
on evtNext do
if [dummy#mode]=0
DeepSleep,900
else
TimerSet,1,60
endif
endon
on Rules#Timer=1 do
AsyncEvent,evtPublish
endon
sensor:
- platform: mqtt
state_topic: Weather_1/temp
name: "weather-1-temp"
device_class: "temperature"
unit_of_measurement: "°C"
- platform: mqtt
state_topic: Weather_1/hum
name: "weather-1-hum"
device_class: "humidity"
unit_of_measurement: "%"
on System#Boot do AsyncEvent,evtStart endon
on System#Wake do AsyncEvent,evtStart endon
on Rules#Timer=2 do
TaskValueSet,3,1,[Plugin#GPIO#Pinstate#14]
TimerSet,4,600
endon
on Rules#Timer=3 do
AsyncEvent,evtNext
endon
on Rules#Timer=4 do
DeepSleep,900
endif
on evtStart do
TaskValueSet,3,1,1
if [Plugin#GPIO#Pinstate#14]=1
TimerSet,2,1
else
if [vcc#vcc]<3.20
DeepSleep,4294
endif
TaskValueSet,3,1,0
endif
TimerSet,3,30
endon
notify:
- name: 'slacknotifier'
platform: slack
api_key: !secret slack_api_key
default_channel: '#general'
Wysłanie powiadomienia przez Slack
automation:
- alias: "Notify on overhumid"
trigger:
platform: numeric_state
entity_id: sensor.weather_1_hum
above: 50
action:
- service: notify.slacknotifier
data_template:
message: "Wilgotność w łazience: {{ states('sensor.weather_1_hum') }}%"
influxdb:
api_version: 2
ssl: true
host: eu-central-1-1.aws.cloud2.influxdata.com
token: !secret influxdb_token
organization: !secret influxdb_org
bucket: homeassistant
include:
entity_globs:
- sensor.weather_*
- sensor.temp_wody
- sensor.garden_*
- sensor.garage_*


|
OCHamcrest
|
Matchers that inspect objects.
Defines | |
| #define | conformsTo HC_conformsTo |
| conformsTo(aProtocol) - Matches if object conforms to a given protocol. | |
| #define | hasDescription HC_hasDescription |
hasDescription(aMatcher) - Matches if object's -description satisfies a given matcher. | |
| #define | hasProperty HC_hasProperty |
| hasProperty(name, valueMatcher) - Matches if object has a method of a given name whose return value satisfies a given matcher. | |
| #define | equalTo HC_equalTo |
| equalTo(anObject) - Matches if object is equal to a given object. | |
| #define | instanceOf HC_instanceOf |
| instanceOf(aClass) - Matches if object is an instance of, or inherits from, a given class. | |
| #define | nilValue() HC_nilValue() |
Matches if object is nil . | |
| #define | notNilValue() HC_notNilValue() |
Matches if object is not nil . | |
| #define | sameInstance HC_sameInstance |
| sameInstance(anObject) - Matches if evaluated object is the same instance as a given object. |
Matchers that inspect objects.
| #define conformsTo HC_conformsTo |
conformsTo(aProtocol) - Matches if object conforms to a given protocol.
| aProtocol | The protocol to compare against as the expected protocol. |
This matcher checks whether the evaluated object conforms to aProtocol.
Example:
(In the event of a name clash, don't #define HC_SHORTHAND
and use the synonym HC_conformsTo
instead.)
| #define equalTo HC_equalTo |
equalTo(anObject) - Matches if object is equal to a given object.
| anObject | The object to compare against as the expected value. |
This matcher compares the evaluated object to anObject for equality, as determined by the -isEqual
: method.
If anObject is nil
, the matcher will successfully match nil
.
(In the event of a name clash, don't #define HC_SHORTHAND
and use the synonym HC_equalTo
instead.)
| #define hasDescription HC_hasDescription |
hasDescription(aMatcher) - Matches if object's -description
satisfies a given matcher.
| aMatcher | The matcher to satisfy, or an expected value for equalTo matching. |
This matcher invokes -description
on the evaluated object to get its description, passing the result to a given matcher for evaluation. If the aMatcher argument is not a matcher, it is implicitly wrapped in an equalTo matcher to check for equality.
Examples:
(In the event of a name clash, don't #define HC_SHORTHAND
and use the synonym HC_hasDescription
instead.)
| #define hasProperty HC_hasProperty |
hasProperty(name, valueMatcher) - Matches if object has a method of a given name whose return value satisfies a given matcher.
| name | The name of a method without arguments that returns an object. |
| valueMatcher | The matcher to satisfy for the return value, or an expected value for equalTo matching. |
This matcher first checks if the evaluated object has a method with a name matching the given name
. If so, it invokes the method and sees if the returned value satisfies valueMatcher
.
While this matcher is called "hasProperty", it's useful for checking the results of any simple methods, not just properties.
Examples:
(In the event of a name clash, don't #define HC_SHORTHAND
and use the synonym HC_hasProperty
instead.)
| #define instanceOf HC_instanceOf |
instanceOf(aClass) - Matches if object is an instance of, or inherits from, a given class.
| aClass | The class to compare against as the expected class. |
This matcher checks whether the evaluated object is an instance of aClass or an instance of any class that inherits from aClass.
Example:
(In the event of a name clash, don't #define HC_SHORTHAND
and use the synonym HC_instanceOf
instead.)
| #define nilValue | ( | ) | HC_nilValue() |
Matches if object is nil
.
(In the event of a name clash, don't #define HC_SHORTHAND
and use the synonym HC_nilValue
instead.)
| #define notNilValue | ( | ) | HC_notNilValue() |
Matches if object is not nil
.
(In the event of a name clash, don't #define HC_SHORTHAND
and use the synonym HC_notNilValue
instead.)
| #define sameInstance HC_sameInstance |
sameInstance(anObject) - Matches if evaluated object is the same instance as a given object.
| anObject | The object to compare against as the expected value. |
This matcher compares the address of the evaluated object to determine if it is the same object as anObject.
(In the event of a name clash, don't #define HC_SHORTHAND
and use the synonym HC_sameInstance
instead.)


This site uses cookies for analytics and personalized content. By continuing to browse this site, you agree to this use.
Click here to dismiss this message.
Learn more about our use of
cookies and how to control them on our site.
{% include footer.html %}


How to Create a New Webpage on the Production Server:
- Create a new file named index.html in gedit
- Add basic html language and save the index.html file
- Create a new file named main.css in gedit
- Add basic css content and save the main.css file
- Git add index.html and main.css
- Git commit
- Git push
- Open sftp and log in
- cd public_html
- put index.html and main.css


Beg Borrow steal
Rules:
1.A Team will comprise of 2 players
All the teams will be provided with a list of items.
2.Team members will have to complete the task within a time limit of 30 minutes.
3.Team can either beg, borrow or steal the items that are enlisted and provided to them
4.Teams will have to get themselves registered before the commencement of the event.
5.After the completion of the task the teams will are required to report to the coordinators for evaluation.
6.Teams will be judged on first come, first serve basis and also the items they were able to collect.


I'm a Toronto based software engineer, initiator and a teacher always looking for ways to learn and contribute to the world. I have 4+ years of industry experience as a software developer. I have also been teaching for 10+ years, including being a Computer Science Teaching Assistant at the University of Toronto.
My strong analytical mind and problem-solving skills are deemed valuable as can be seen in the recommendations section below. My computer programming skills make him a strong team-player who will go above and beyond! Check out my resume below.


sales
Our branchs
Amman- 7th Circle
amman- Aljubiha
Opening hours
Sat-Thu from 9:00AM - 12:00AM
Fri from 4:00PM - 12:00AM
Sat from 1:00PM - 12:00AM
contact information
Tel:<PHONE_NUMBER>555
Tel:<PHONE_NUMBER>556
Mob:<PHONE_NUMBER>99999


Markdown infos
Auteurs
Syntax
Markdown: Syntax : daringfireball.net
linters
textlint
textlint - textlint.github.io (textlint/textlint - github.com)
The pluggable natural language linter for text and markdown.
markdownlint
igorshubovych/markdownlint-cli with DavidAnson/markdownlint (online parser demo)
A Node.js style checker and lint tool for Markdown/CommonMark files.
No auto fix in markdownlint explanation issue.
remarkjs
remarkjs/remark - github.com (remarkjs/remark-lint - github.com)
Markdown processor powered by plugins based on @unifiedjs (and @vfile, @syntax-tree)
style-guide
Markdown Style Guide (cirosantilli/markdown-style-guide - github.com)
Readable and portable Markdown style guide.
tools
parsers
Markdown parsers comparator - www.npmtrends.com
Choosing the Right Markdown Parser - css-tricks.com - 20160201
GitbookIO/markup-it - github.com
JavaScript library to parse and serialize markup content (Markdown and HTML)
markdown-it/markdown-it - github.com
Markdown parser, done right. 100% CommonMark support, extensions, syntax plugins & high speed
markedjs/marked - github.com online demo
A markdown parser and compiler. Built for speed.
It can be used to build export in another format, Holi0317/md2bbc example.
unified.js ecosystem
unified.js.org unifiedjs on medium.com unifiedjs on twitter.com
unified is an interface for processing text with syntax trees and transforming between them.
The idea is to convert any text documents (markdown, html, natural language, …) into a syntax-tree to easily achieve 2 ways transformation.
Syntax-trees comes into 2 types :
- Concrete Syntax Tree (CST) (contains everything to recreate the exact representation, tabs numbers, spaces, etc …)
- Abstract Syntax Tree (AST) (contains just what is needed to recreate exact syntactic representation)
They inherits from unist, a Universal Syntax Tree.
Markdown :
- AST : mdast
- Parser/Compiler : remark
HTML :
- AST : hast
- Parser/Compiler : rehype
Natural language :
- CST : nlcst
- Parser/Compiler : retext
A virtual file format called vfile is used to represent processed documents. It contains the file data, the path, the basename, etc …
| ....................... process() ......................... |
| ......... parse() ..... | run() | ..... stringify() ....... |
+--------+ +----------+
Input ->- | Parser | ->- Syntax Tree ->- | Compiler | ->- Output
+--------+ | +----------+
X
|
+--------------+
| Transformers |
+--------------+


Crossmapping uses a simple Groovy-based DSL that enables you to expressively transform JSON/XML input documents to JSON/XML output documents.
Configuring a crossmap activity is as simple as selecting its mapper script and its input/output documents. You do this on the activity Design tab in MDW Designer. The mapper script is the Groovy asset that performs the transformation. For input/output the dropdown lists include all document variables from your process. However, your selections must be from the supported JSON and XML types listed below. Note that one of the most powerful features of crossmaps is that they can map from JSON to XML and vice-versa using the exact same syntax. In other words, the input and output documents can have different flavors.
Supported input/output types:
When the crossmap activity executes it automatically parses your input document using one of these Groovy Slurpers:
And it creates an empty instance of one of these Builders: The job of your mapper script is to build the output by pulling values from the parsed input. Here's an example that maps from the jsonInput variable to the xmlOutput variable:xmlOutput { namespaces << [ns: 'http://www.centurylink.com/mdw'] ns.game { ns.name 'chess' ns.currentChamp jsonInput.chess.champion ns.gameboard jsonInput.chess.board } }
This examples also illustrates how namespaces can be incorporated into your MarkupBuilder output. It takes the following JSON input:
{"chess": { "board": { "columns": 8, "rows": 8, "shape": "rect" }, "champion": "Deep Blue", "pieces": [ { "movement": "diagonal", "name": "bishop" }, { "movement": "two across, one over", "name": "knight" } ] }}
and produces this XML output (note that not every input property is mapped):
<ns:game xmlns:ns="http://www.centurylink.com/mdw"> <ns:name>chess</ns:name> <ns:currentChamp>Deep Blue</ns:currentChamp> <ns:gameboard columns="8" rows="8" shape="rect"/> </ns:game>


Always pop-out and use compact window
Pop-out tab if the window has several tabs open
Use compact pop-out window
Restore when manually resizing window
Restore when leaving or closing page
Reapply resize to media after navigating to another page while in compact resized stated
Changes are saved automatically.


Efficient tree manipulations for large phylogenies, including pruning, rerooting, calculation of most-recent common ancestors, calculating distances from the tree root and calculating pairwise distances. Calculation of phylogenetic signal and mean trait depth (trait conservatism), ancestral state reconstruction and hidden character prediction of discrete characters. Simulating and fitting models of trait evolution, and generating random trees using birth-death models. Dating trees, comparing two trees, and reading/writing trees to a file. Citation: Louca, Stilianos and Doebeli, Michael (2017) <doi:10.1093/bioinformatics/btx701>.
| Version: | 1.3.4 |
| Depends: | Rcpp (≥ 0.12.10) |
| Imports: | parallel, naturalsort, stats |
| LinkingTo: | Rcpp |
| Suggests: | testthat |
| Published: | 2018-08-16 |
| Author: | Stilianos Louca |
| Maintainer: | Stilianos Louca <louca at zoology.ubc.ca> |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| NeedsCompilation: | yes |
| Citation: | castor citation info |
| CRAN checks: | castor results |
| Reference manual: | castor.pdf |
| Package source: | castor_1.3.4.tar.gz |
| Windows binaries: | r-devel: castor_1.3.4.zip, r-release: castor_1.3.4.zip, r-oldrel: castor_1.3.4.zip |
| OS X binaries: | r-release: castor_1.3.4.tgz, r-oldrel: castor_1.3.4.tgz |
| Old sources: | castor archive |
Please use the canonical form https://CRAN.R-project.org/package=castor to link to this page.


Classes
The following classes are available globally.
-
This class represents a network interface in your system. For example,
en0
with a certain IP address. It is a wrapper around thegetifaddrs
system call.Typical use of this class is to first call
Interface.allInterfaces()
and then use the properties of the interface(s) that you need.See moreSee
/usr/include/ifaddrs.h
Declaration
Swift
open class Interface : CustomStringConvertible, CustomDebugStringConvertible


data class TreeListItem<out T>
This class can be used when representing items in a tree in a list.
T
- the type of data being represented
TreeListItem(data: T, depth: Int)
This class can be used when representing items in a tree in a list. |
val data: T
the data for the item, of type T |
|
val depth: Int
to display a tree like a list, the depth of the node must be known so that the UI can be modified accordingly to show hierarchy. |


Materialize has included 932 Material Design Icons courtesy of Google. You can download them directly from the Material Design specs.
To be able to use these icons, you must include this line in the < head> portion of your HTML code.
To use these icons, use the material-icons class on an element and provide the ligature as the text content.
To control the size of the icon, change the font-size: 30px property of your icon. Optionally you can use preset classes as shown below.


To set single row selection, set singleRowSelectEnable to "true" in grid defination.
To set multi row selection, set multiRowSelectEnable to "true" in grid defination.
In multi row selection, Select All checkbox is given in table header to select/unselect all rows.
In both single/multi select, onSelect($event), onDeselect($event) methods can be bound.
This methods will be run when any row will be selected or de-selected. In $event.data, affected row keys will be passed.
Here getSelectedRowKeys() API is also available, which will return array of all selected rows keys.
On reset of data grid, all selected keys will be removed.
To select row on click set selectRowOnClick to true in grid defination.


Module forma.pattern
A class containing a set or pattern of cells.
The pattern class is the central class of forma
, representing a set of
points or cells. This set can be initialised as empty, or according to a
'prototype' consisting of a NxM table matrix of 1's or 0's. Several helper
methods for the initialisation of a pattern are provided in the
primitives module. Once initialised, a pattern can only be modified by
the insert method, used to add active cells. All other pattern
manipulations return a new, modified pattern rather than modifying patterns
in-place.
Several pattern manipulators are provided here. For example a shift manipulator which shifts the coordinates of an entire pattern, manipulators that enlarge a pattern by a scale factor and modifiers than can rotate or reflect patterns in the x (hreflect) or y (vreflect) axes. Particuarly useful are manipulators which generate new patterns such as the edge (outer hull) or surface (inner-hull) of other patterns. These manipulators can be used with custom definitions of a cell's neighbourhood.
Pattern coordinates should be reliable in [-65536, 65536]. This is
adjustable through the MAX_COORDINATE
constant.
Through an abuse of metatables, all functions can be used either 'procedurally' as
pattern.method(input_pattern, ... )
or as a class method
input_pattern:method(...)
Usage:
-- 'Procedural' style pattern creation local p1 = pattern.new() pattern.insert(p1, 1,1) -- 'Method' style with chaining used for :insert local p2 = pattern.new():insert(1,1) -- Idential as to p1 -- 'Prototype' style local p3 = pattern.new({{1,1,1}, {1,0,1}, {1,1,1}}) -- Fetch a random cell and the medoid (centre-of-mass) cell from a pattern local random_cell = p1:rcell() local medoid_cell = p1:medoid() -- Compute the outer (outside the existing pattern) hull -- Using 8-direction (Moore) neighbourhood local outer_hull = p1:edge(neighbourhood.moore()) -- or equivalently outer_hull = pattern.edge(p1, neighbourhood.moore())
Basic methods
| new (prototype) | Pattern constructor. |
| clone (ip) | Copy an existing pattern. |
| insert (ip, x, y) | Insert a new cell into a pattern. |
| has_cell (ip, x, y) | Check if a cell is active in a pattern. |
| cell_list (ip) | Return a list of cells active in the pattern. |
| size (ip) | Return the number of cells active in a pattern. |
| size_sort (pa, pb) | Size comparator for two patterns. |
Iterators
| cells (ip) | Iterator over active cells in the pattern. |
| cell_coordinates (ip) | Iterator over active cell coordinates in the pattern. |
| shuffled_cells (ip, rng) | Shuffled iterator over active cells in the pattern. |
| shuffled_coordinates (ip, rng) | Shuffled iterator over active cell coordinates in the pattern. |
Metamethods
| __tostring (ip) | Render pattern as a string. |
| __add (a, b) | Add two patterns to each other. |
| __sub (a, b) | Subtract one pattern from another. |
| __eq (a, b) | Pattern equality test. |
Pattern cell selectors
| rcell (ip, rng) | Pattern random cell method. |
| centroid (ip) | Compute the centroid of a pattern. |
| medoid (ip, measure) | Compute the medoid cell of a pattern. |
Pattern manipulators
| shift (ip, sx, sy) | Generate a copy of a pattern shifted by a vector(x,y) |
| normalise (ip) | Copy a pattern, shifting its origin to (0,0). |
| enlarge (ip, f) | Generate an enlarged version of a pattern. |
| rotate (ip) | Rotate a pattern by 90° clockwise about the origin |
| vreflect (ip) | Generate a copy of a pattern, mirroring it vertically. |
| hreflect (ip) | Generate a copy of a pattern, mirroring it horizontally. |
| edge (ip, nbh) | Generate a pattern consisting of all cells on the edge of a provided pattern. |
| surface (ip, nbh) | Generate a pattern consisting of cells on the surface of a provided pattern. |
| intersection (...) | Generate a pattern consisting of the overlapping intersection of existing patterns |
| sum (...) | Generate a pattern consisting of the sum of existing patterns |
Packing methods
| packtile (a, b) | Returns a cell where pattern a overlaps with pattern b . |
| packtile_centre (a, b) | Center-weighted version of pattern.packtile. |
Test methods
| get_max_coordinate () | Returns the maximum hashable coordinate. |
| test_coordinate_map (x, y) | Test the coordinate transform between (x,y) and spatial hash. |
Basic methods
- new (prototype)
-
Pattern constructor.
This method returns a new pattern, according to a prototype. If no
prototype is used, then an empty pattern is returned. For example, if
called with the prototype
{{1,0},{0,1}}
this method will return the pattern:
Active cells are stored in the pattern in a standard integer keyed table, and also as elements in a spatial hash map for fast look-up of active cells.10 01
Parameters:
- prototype (optional) an N*M 2D table of ones and zeros
Returns:
-
a new pattern according to the prototype
- clone (ip)
-
Copy an existing pattern.
Parameters:
- ip input pattern for cloning
Returns:
-
a copy of the pattern ip
- insert (ip, x, y)
-
Insert a new cell into a pattern.
Re-returns the provided cell to enable cascading.
e.g
pattern.new():insert(x,y)
returns a pattern with a single cell at (x,y).Parameters:
- ip pattern for cell insertion
- x first coordinate of new cell
- y second coordinate of new cell
Returns:
-
ip for method cascading
- has_cell (ip, x, y)
-
Check if a cell is active in a pattern.
This has fewer checks than usual as it's a common inner-loop call.
Parameters:
- ip pattern for cell check
- x first coordinate of cell to be returned
- y second coordinate of cell to be returned
Returns:
-
True if pattern
ip
includes the cell at (x,y), False otherwise - cell_list (ip)
-
Return a list of cells active in the pattern.
Parameters:
- ip source pattern for active cell list.
- size (ip)
-
Return the number of cells active in a pattern.
Parameters:
- ip pattern for size check
- size_sort (pa, pb)
-
Size comparator for two patterns.
Useful for table.sort to rank patterns by size (number of cells)
Parameters:
- pa the first pattern for comparison
- pb the second pattern for comparison
Returns:
-
pa:size() > pb:size()
Iterators
- cells (ip)
-
Iterator over active cells in the pattern.
Parameters:
- ip source pattern for active cell iterator
Returns:
-
an iterator returning a cell for every active cell in the pattern
Usage:
local ipattern = primitives.square(10) for icell in ipattern:cells() do print(icell.x, icell.y) end
- cell_coordinates (ip)
-
Iterator over active cell coordinates in the pattern.
Simmilar to pattern.cells but provides an iterator that runs over (x,y)
coordinates instead of cell instances. Normally faster than
pattern.cells as no tables are created here.
Parameters:
- ip source pattern for active cell iterator
Returns:
-
an iterator returning active cell (x,y) coordinates
Usage:
local ipattern = primitives.square(10) for ix, iy in ipattern:cell_coordinates() do print(ix, iy) end
- shuffled_cells (ip, rng)
-
Shuffled iterator over active cells in the pattern.
Simmilar to pattern.cells but provides an iterator that returns cells in a
randomised order, according to a provided random number generator. See
pattern.cells for usage.
Parameters:
- ip source pattern for active cell iterator
- rng (optional) A random number generating table, following the signature of math.random
Returns:
-
an iterator returning a cell for every active cell in the pattern, in a randomised order
- shuffled_coordinates (ip, rng)
-
Shuffled iterator over active cell coordinates in the pattern.
Simmilar to pattern.cell_coordinates but returns cell (x,y) coordinates in
a randomised order according to a provided random number generator. See
pattern.cell_coordinates for usage.
Parameters:
- ip source pattern for active cell iterator
- rng (optional) A random number generating table, following the signature of math.random
Returns:
-
an iterator returning active cell (x,y) coordinates, randomly shuffled
Metamethods
- __tostring (ip)
-
Render pattern as a string.
Prints the stored pattern to string, rendered using the character stored in
pattern.onchar for activated cells and pattern.offchar for unactivated cells.
Parameters:
- ip The pattern to be rendered as a string
Returns:
-
pattern as string
- __add (a, b)
-
Add two patterns to each other.
Parameters:
- a first pattern to be added
- b second pattern to be added
Returns:
-
New pattern consisting of the superset of patterns a and b
- __sub (a, b)
-
Subtract one pattern from another.
Parameters:
- a base pattern
- b pattern to be subtracted from a
Returns:
-
New pattern consisting of the subset of cells in a which are not in b
- __eq (a, b)
-
Pattern equality test.
Parameters:
- a first pattern for equality check
- b second pattern for equality check
Returns:
-
true if patterns are identical, false if not
Pattern cell selectors
- rcell (ip, rng)
-
Pattern random cell method.
Returns a cell at random from the pattern.
Parameters:
- ip pattern for random cell retrieval
- rng (optional) A random number generating table, following the signature of math.random.
Returns:
-
a random cell in the pattern
- centroid (ip)
-
Compute the centroid of a pattern.
Returns the (arithmetic) mean position of all cells in an input pattern.
The centroid is rounded to the nearest integer-coordinate cell. Note this
does not neccesarily correspond to an /active/ cell in the input pattern.
If you need the closest active cell to the centroid, use pattern.medoid.
Parameters:
- ip input pattern
Returns:
-
the cell-coordinate centroid of
ip
- medoid (ip, measure)
-
Compute the medoid cell of a pattern.
Returns the cell with the minimum distance to all other cells in the
pattern, judged by any valid distance measure (default is Euclidean). The
medoid cell represents the centremost active cell of a pattern, for a given
distance metric.
Parameters:
- ip input pattern
- measure (optional) distance measure, default euclidean
Returns:
-
the medoid cell of
ip
for distance metricmeasure
Pattern manipulators
- shift (ip, sx, sy)
-
Generate a copy of a pattern shifted by a vector(x,y)
Parameters:
- ip pattern to be shifted
- sx amount to shift x-coordinates by
- sy amount to shift y-coordinates by
Returns:
-
New pattern consisting of ip shifted by (sx,sy)
- normalise (ip)
-
Copy a pattern, shifting its origin to (0,0).
Parameters:
- ip pattern to be normalised
Returns:
-
A new normalised pattern
- enlarge (ip, f)
-
Generate an enlarged version of a pattern.
This returns a new pattern in which each cell in an input pattern is
converted to a f*f cell block. The returned pattern is in such a way an
'enlarged' version of the input pattern, by a scale factor of 'f' in both x
and y.
Parameters:
- ip pattern to be enlarged
- f factor of enlargement
Returns:
-
enlarged pattern
- rotate (ip)
-
Rotate a pattern by 90° clockwise about the origin
Parameters:
- ip pattern to be rotated
Returns:
-
copy of
ip
which has been rotated by 90° - vreflect (ip)
-
Generate a copy of a pattern, mirroring it vertically.
Parameters:
- ip pattern for reflection
Returns:
-
copy of
ip
which has been is reflected vertically - hreflect (ip)
-
Generate a copy of a pattern, mirroring it horizontally.
Reflect a pattern horizontally
Parameters:
- ip pattern for reflection
Returns:
-
copy of
ip
which has been reflected horizontally - edge (ip, nbh)
-
Generate a pattern consisting of all cells on the edge of a provided pattern.
This returns a new pattern consisting of the inactive neighbours of an input
pattern, for a given definition of neighbourhood. Therefore the edge
method is useful for either enlarging patterns along their surface, or
determining a border of a pattern that does not overlap with the pattern
itself.
Parameters:
- ip pattern for which the edges should be calculated
- nbh defines which neighbourhood to scan in to determine edges (default 8/moore)
Returns:
-
A pattern representing the edge (outer hull) of ip
- surface (ip, nbh)
-
Generate a pattern consisting of cells on the surface of a provided pattern.
This returns a new pattern consisting of all active cells in an input pattern
that neighbour inactive cells. It is therefore very simmilar to pattern.edge but
returns a pattern which completely overlaps with the input pattern. This is therefore
useful when shrinking a pattern by removing a cell from its surface, or determining
a border of a pattern which consists of cells that are present in the original pattern.
Parameters:
- ip pattern for which the surface should be calculated
- nbh defines which neighbourhood to scan in to determine the surface (default 8/moore)
Returns:
-
A pattern representing the surface (inner hull) of ip
- intersection (...)
-
Generate a pattern consisting of the overlapping intersection of existing patterns
Parameters:
- ... patterns for intersection calculation
Returns:
-
A pattern consisting of the overlapping cells of the input patterns
- sum (...)
-
Generate a pattern consisting of the sum of existing patterns
Parameters:
- ... patterns for summation
Returns:
-
A pattern consisting of the sum of the input patterns
Packing methods
- packtile (a, b)
-
Returns a cell where pattern
a
overlaps with patternb
. The returned point has no particular properties w.r.t ordering of possible solutions. Solutions are returned 'first-come-first-served'.Parameters:
- a
the pattern to be packed in
b`. - b ` the domain which we are searching for packing solutions.
Returns:
-
a cell in
b
wherea
can be placed,nil
if impossible. - a
- packtile_centre (a, b)
-
Center-weighted version of pattern.packtile.
Tries to fit pattern
a
as close as possible to patternb
's centre.Parameters:
- a
the pattern to be packed into pattern
b
. - b the domain which we are searching for packing solutions
Returns:
-
a cell in
b
wherea
can be placed, nil if no solution found. - a
the pattern to be packed into pattern
Test methods
- get_max_coordinate ()
-
Returns the maximum hashable coordinate.
Returns:
-
MAX_COORDINATE
- test_coordinate_map (x, y)
-
Test the coordinate transform between (x,y) and spatial hash.
Parameters:
- x test coordinate x
- y test coordinate y
Returns:
-
true if the spatial hash is functioning correctly, false if not


楊建銘*、許世杰、林詩淳、周映妤、陳瑩明（2009期數/2011出版）。失眠嚴重度量表中文版的信、效度探討 (Reliability and validity of the Chinese version of insomnia severity index)。臨床心理學刊 (Archives of Clinical Psychology)。4(2)，95-104。
Chou, Y. Y., & Yang, C.-M. (2009, June). An internet survey on the sleep problems, quality of life, and help-seeking behavior in college students in Taiwan. Sleep, 32 (Abstract Suppl.), p. A393. (23rd Annual Meeting of the Associated Professional Sleep Societies, Seattle, Washington, USA)
Weng, C. Y., Chou, Y. Y., Lin, T. K., & Lin, C. L. (2007). Is autonomic activity an intervening variable between hostility and vascular dilatory function? The fifth World Congress of Behavioural and Cognitive Therapies, Barcelona, Spain.
Sou-Hsin Chien, Chun-Liang Tung, Chia-Ying Weng, Ying-Yu Chou, I-Mei Lin, Chin-Lon Lin (2008). Vegetarianism and Personality Traits. The fifth International Congress on Vegetrarian Nutrition, Loma Linda University, California.


Pairing at times can be interesting, although I do like them more than I thought I would. It can really be a benefit to bounce ideas off another student and ideally finish the challenge quicker since there's two of us on it.  My ideal scenario is working with someone friendly, who has about the same knowledge as I do on these challenges beacuse I hate the thought of typing out ideas too slowly for my pair and/or guide.
When it comes to feedback most of the time I feel pretty good about it. I have struggled at other times in my life responding to negative feedback, even when the person giving the feedback means no harm. The one thing I really feel I need to do during pair sessions is be ready to quickly research an issue. I am still struggling with the Ruby docs and a couple times my pair has asked me to find our issue in the docs, so I need to get more familiar with the information that is there for us in the docs.
Writing feedback is ok, I don't feel like it is very anonymous at DBC. It seems to be ordered in the exact order I paired, and I didn't have to do many pairing sessions before I was able to read the feedback given to me. Because of this, I have a hard time being mean or giving actionable feedback. For 1, I am a beginner, I mean who am I to tell someone how they should work through these challenges. And 2, I don't want to come across as ungreatful after someone helped me complete the challenge, b/c almost every time I've paried so far I've felt it helped me complete the challenge and that I was better off pairing than doing it on my own. So yes, I enjoy the pairing, but I just don't want to be giving my review of someone when I feel they can easily figure out it was me giving that review.
Nick Siefken


fishyLogin
Register for a fishyLogin account below.
You'll neeed an account to track your time in the room. In addition, you can login using Google.
Bootstrap 4.0.0-beta
jQuery 3.2.1


Hello World, My name is Sothea Nhem
Welcome to my web site. I am your host. I will be walking you through some codes.
HTML Elements
To paraphrase the lesson text [...] For example
h1
title
... Notice the use of character entities when wanting show the tags in HTML.
Character Entities
Since the keyboard does not have a © key we need a way to reference this so we say ©. Additionally, greater than and less than are interpreted as HTML tags. These are examples of symbols that we may want to display but will not be able to with out a work around. This is where character entities come into play.
Summary
In summation...


|
KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
|
#include <string>
#include <iostream>
#include <sstream>
#include <cstddef>
#include "mpi.h"
#include "includes/data_communicator.h"
#include "includes/define.h"
#include "includes/model_part.h"
#include "includes/mpi_serializer.h"
#include "mpi/includes/mpi_data_communicator.h"
#include "utilities/timer.h"
Go to the source code of this file.
Namespaces | |
| Kratos | |
| REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES. | |
| Kratos::MPIInternals | |
Macros | |
| #define | CUSTOMTIMER 1 |
| #define | KRATOS_TIMER_START(t) Timer::Start(t); |
| #define | KRATOS_TIMER_STOP(t) Timer::Stop(t); |
Functions | |
Input and output | |
| std::istream & | Kratos::operator>> (std::istream &rIStream, MPICommunicator &rThis) |
| input stream function More... | |
| std::ostream & | Kratos::operator<< (std::ostream &rOStream, const MPICommunicator &rThis) |
| output stream function More... | |
| #define CUSTOMTIMER 1 |
| #define KRATOS_TIMER_START | ( | t | ) | Timer::Start(t); |
| #define KRATOS_TIMER_STOP | ( | t | ) | Timer::Stop(t); |


- r1 - Variable in class org.dyn4j.dynamics.contact.Contact
-
The
Vector2
from the center of
Body
1 to the contact point
- r2 - Variable in class org.dyn4j.dynamics.contact.Contact
-
The
Vector2
from the center of
Body
2 to the contact point
- radius - Variable in class org.dyn4j.dynamics.Body
-
The the rotation disk radius
- radius - Variable in class org.dyn4j.geometry.AbstractShape
-
The maximum radius
- ratio - Variable in class org.dyn4j.dynamics.joint.AngleJoint
-
The angular velocity ratio
- ratio - Variable in class org.dyn4j.dynamics.joint.PulleyJoint
-
The pulley ratio for modeling a block-and-tackle
- Ray - Class in org.dyn4j.geometry
-
Represents a ray.
- Ray(double) - Constructor for class org.dyn4j.geometry.Ray
-
Creates a ray from the origin in the given direction.
- Ray(Vector2) - Constructor for class org.dyn4j.geometry.Ray
-
Creates a ray from the origin in the given direction.
- Ray(Vector2, double) - Constructor for class org.dyn4j.geometry.Ray
-
Creates a ray from the given start point in the given direction.
- Ray(Vector2, Vector2) - Constructor for class org.dyn4j.geometry.Ray
-
Creates a ray from the given start point in the given direction.
- raycast(Ray, double) - Method in interface org.dyn4j.collision.broadphase.BroadphaseDetector
-
Performs a preliminary raycast over all the collidables in the broadphase to improve performance of the
narrowphase raycasts.
- raycast(Ray, double) - Method in class org.dyn4j.collision.broadphase.DynamicAABBTree
-
- raycast(Ray, double) - Method in class org.dyn4j.collision.broadphase.SapBruteForce
-
- raycast(Ray, double) - Method in class org.dyn4j.collision.broadphase.SapIncremental
-
- raycast(Ray, double) - Method in class org.dyn4j.collision.broadphase.SapTree
-
- raycast(Ray, double, Circle, Transform, Raycast) - Static method in class org.dyn4j.collision.narrowphase.CircleDetector
-
Performs a ray cast against the given circle.
- raycast(Ray, double, Convex, Transform, Raycast) - Method in class org.dyn4j.collision.narrowphase.Gjk
-
- Raycast - Class in org.dyn4j.collision.narrowphase
-
- Raycast() - Constructor for class org.dyn4j.collision.narrowphase.Raycast
-
Default constructor.
- Raycast(Vector2, Vector2, double) - Constructor for class org.dyn4j.collision.narrowphase.Raycast
-
Full constructor.
- raycast(Ray, double, Convex, Transform, Raycast) - Method in interface org.dyn4j.collision.narrowphase.RaycastDetector
-
Performs a ray cast given a
Ray
and a
Convex
Shape
returning
true if the ray passes through the convex shape.
- raycast(Ray, double, Segment, Transform, Raycast) - Static method in class org.dyn4j.collision.narrowphase.SegmentDetector
-
Performs a ray cast against the given segment.
- raycast - Variable in class org.dyn4j.dynamics.RaycastResult
-
- raycast(Vector2, Vector2, boolean, boolean, List<RaycastResult>) - Method in class org.dyn4j.dynamics.World
-
Performs a raycast against all the
Body
s in the
World
.
- raycast(Ray, double, boolean, boolean, List<RaycastResult>) - Method in class org.dyn4j.dynamics.World
-
Performs a raycast against all the
Body
s in the
World
.
- raycast(Vector2, Vector2, Body, boolean, RaycastResult) - Method in class org.dyn4j.dynamics.World
-
Performs a raycast against the given
Body
and returns true
if the ray intersects the body.
- raycast(Ray, Body, double, boolean, RaycastResult) - Method in class org.dyn4j.dynamics.World
-
Performs a raycast against the given
Body
and returns true
if the ray intersects the body.
- RaycastAdapter - Class in org.dyn4j.dynamics
-
- RaycastAdapter() - Constructor for class org.dyn4j.dynamics.RaycastAdapter
-
- RaycastDetector - Interface in org.dyn4j.collision.narrowphase
-
Represents an algorithm for determining whether a
Ray
and a
Convex
Shape
intersect, given the ray's maximum length and the convex shape's
transform.
- raycastDetector - Variable in class org.dyn4j.dynamics.World
-
- RaycastListener - Interface in org.dyn4j.dynamics
-
Interface for listening for raycast events.
- RaycastResult - Class in org.dyn4j.dynamics
-
Represents the result of a raycast.
- RaycastResult() - Constructor for class org.dyn4j.dynamics.RaycastResult
-
- Rectangle - Class in org.dyn4j.geometry
-
Represents a
Rectangle
(either axis aligned or oriented).
- Rectangle(double, double) - Constructor for class org.dyn4j.geometry.Rectangle
-
Full constructor.
- RectangularBounds - Class in org.dyn4j.collision
-
- RectangularBounds(Rectangle) - Constructor for class org.dyn4j.collision.RectangularBounds
-
Deprecated.
Creates a new bounds object.
- reference - Variable in class org.dyn4j.geometry.decompose.EarClipping.Vertex
-
The DCEL vertex reference
- referenceAngle - Variable in class org.dyn4j.dynamics.joint.AngleJoint
-
The initial angle between the two bodies
- referenceAngle - Variable in class org.dyn4j.dynamics.joint.PrismaticJoint
-
The initial angle between the two
Body
s
- referenceAngle - Variable in class org.dyn4j.dynamics.joint.RevoluteJoint
-
The initial angle between the two
Body
s
- referenceAngle - Variable in class org.dyn4j.dynamics.joint.WeldJoint
-
The initial angle between the two
Body
s
- referenceEdge - Variable in class org.dyn4j.collision.manifold.IndexedManifoldPointId
-
The reference edge index
- reflex - Variable in class org.dyn4j.geometry.decompose.EarClipping.Vertex
-
Whether this vertex is a reflex vertex
- regular(SweepLine.Vertex, SweepLine.EdgeBinaryTree, DoublyConnectedEdgeList) - Method in class org.dyn4j.geometry.decompose.SweepLine
-
- remove(E) - Method in class org.dyn4j.BinarySearchTree
-
Removes the comparable object from the tree returning the node or
null if the comparable object was not found.
- remove(BinarySearchTree<E>.Node) - Method in class org.dyn4j.BinarySearchTree
-
Removes the given node from this tree and returns
true if the node existed and was removed.
- remove(E, BinarySearchTree<E>.Node) - Method in class org.dyn4j.BinarySearchTree
-
Returns the node removed if the comparable is found, null otherwise.
- remove() - Method in class org.dyn4j.BinarySearchTree.TreeIterator
-
Currently unsupported.
- remove(E) - Method in interface org.dyn4j.collision.broadphase.BroadphaseDetector
-
- remove(E) - Method in class org.dyn4j.collision.broadphase.DynamicAABBTree
-
- remove(DynamicAABBTree<E>.Node) - Method in class org.dyn4j.collision.broadphase.DynamicAABBTree
-
Internal method to remove a node from the tree.
- remove(E) - Method in class org.dyn4j.collision.broadphase.SapBruteForce
-
- remove(E) - Method in class org.dyn4j.collision.broadphase.SapIncremental
-
- remove(E) - Method in class org.dyn4j.collision.broadphase.SapTree
-
- remove(ContactConstraint) - Method in class org.dyn4j.dynamics.contact.ContactManager
-
- remove(Body) - Method in class org.dyn4j.dynamics.World
-
- remove(Body, boolean) - Method in class org.dyn4j.dynamics.World
-
- remove(Joint) - Method in class org.dyn4j.dynamics.World
-
- removeAll() - Method in class org.dyn4j.dynamics.World
-
- removeAll(boolean) - Method in class org.dyn4j.dynamics.World
-
- removeAllBodies() - Method in class org.dyn4j.dynamics.World
-
- removeAllBodies(boolean) - Method in class org.dyn4j.dynamics.World
-
- removeAllBodiesAndJoints() - Method in class org.dyn4j.dynamics.World
-
Removes all the joints and bodies from the world.
- removeAllBodiesAndJoints(boolean) - Method in class org.dyn4j.dynamics.World
-
Removes all the joints and bodies from the world.
- removeAllFixtures() - Method in class org.dyn4j.dynamics.Body
-
Removes all fixtures from this body and returns them.
- removeAllJoints() - Method in class org.dyn4j.dynamics.World
-
- removeAllJoints(boolean) - Method in class org.dyn4j.dynamics.World
-
- removeAllListeners() - Method in class org.dyn4j.dynamics.World
-
Removes all the listeners.
- removeAllListeners(Class<T>) - Method in class org.dyn4j.dynamics.World
-
Removes all the listeners of the specified type.
- removeBody(Body) - Method in class org.dyn4j.dynamics.World
-
- removeBody(Body, boolean) - Method in class org.dyn4j.dynamics.World
-
- removeCondition(FallbackCondition) - Method in class org.dyn4j.collision.narrowphase.FallbackNarrowphaseDetector
-
Removes the given condition to the list of fallback conditions and
returns true if the operation was successful.
- removeFixture(BodyFixture) - Method in class org.dyn4j.dynamics.Body
-
- removeFixture(int) - Method in class org.dyn4j.dynamics.Body
-
- removeFixture(Vector2) - Method in class org.dyn4j.dynamics.Body
-
Removes the first fixture, as determined by the order in which they were added, that
contains the given point and returns it.
- removeFixtures(Vector2) - Method in class org.dyn4j.dynamics.Body
-
Returns all the fixtures that contain the given point.
- removeHalfEdges(int) - Method in class org.dyn4j.geometry.decompose.DoublyConnectedEdgeList
-
Removes the half edges specified by the given interior edge index.
- removeHalfEdges(DoublyConnectedEdgeList.HalfEdge) - Method in class org.dyn4j.geometry.decompose.DoublyConnectedEdgeList
-
Removes the given half edge and its twin.
- removeHalfEdges(int, DoublyConnectedEdgeList.HalfEdge) - Method in class org.dyn4j.geometry.decompose.DoublyConnectedEdgeList
-
Removes the given half edge and its twin.
- removeJoint(Joint) - Method in class org.dyn4j.dynamics.World
-
- removeListener(Listener) - Method in class org.dyn4j.dynamics.World
-
Removes the given listener.
- removeListeners() - Method in class org.dyn4j.dynamics.World
-
- removeMaximum() - Method in class org.dyn4j.BinarySearchTree
-
Removes the maximum value node from this tree.
- removeMaximum(BinarySearchTree<E>.Node) - Method in class org.dyn4j.BinarySearchTree
-
Removes the maximum value node from the subtree of the given node.
- removeMinimum() - Method in class org.dyn4j.BinarySearchTree
-
Removes the minimum value node from this tree.
- removeMinimum(BinarySearchTree<E>.Node) - Method in class org.dyn4j.BinarySearchTree
-
Removes the minimum value node from the subtree of the given node.
- removeNode(BinarySearchTree<E>.Node) - Method in class org.dyn4j.BinarySearchTree
-
Internal method to remove the given node from the tree retaining
all the subtree nodes.
- removeSubtree(E) - Method in class org.dyn4j.BinarySearchTree
-
Removes the node containing the given value and the corresponding
subtree from this tree.
- removeSubtree(BinarySearchTree<E>.Node) - Method in class org.dyn4j.BinarySearchTree
-
Removes the given node and the corresponding subtree from this tree.
- reset() - Method in class org.dyn4j.dynamics.contact.ContactManager
-
- reset() - Method in class org.dyn4j.dynamics.Settings
-
Resets the settings back to defaults.
- restitution - Variable in class org.dyn4j.dynamics.BodyFixture
-
The coefficient of restitution
- restitution - Variable in class org.dyn4j.dynamics.contact.ContactConstraint
-
The coefficient of restitution
- reverseOrderIterator() - Method in class org.dyn4j.BinarySearchTree
-
Returns a new iterator for traversing the tree in reverse order.
- reverseWinding(Vector2...) - Static method in class org.dyn4j.geometry.Geometry
-
Reverses the order of the polygon points within the given array.
- reverseWinding(List<Vector2>) - Static method in class org.dyn4j.geometry.Geometry
-
Reverses the order of the polygon points within the given list.
- RevoluteJoint - Class in org.dyn4j.dynamics.joint
-
Represents a pivot joint.
- RevoluteJoint(Body, Body, Vector2) - Constructor for class org.dyn4j.dynamics.joint.RevoluteJoint
-
Minimal constructor.
- right - Variable in class org.dyn4j.BinarySearchTree.Node
-
The node to the right; the right node is greater than this node
- right - Variable in class org.dyn4j.collision.broadphase.DynamicAABBTree.Node
-
The right child
- right(Vector2, Vector2, Vector2) - Method in class org.dyn4j.geometry.decompose.Bayazit
-
Returns true if the given point p is to the right
of the line created by a-b.
- right - Variable in class org.dyn4j.geometry.decompose.SweepLine.Vertex
-
The previous edge in Counter-Clockwise order
- right() - Method in class org.dyn4j.geometry.Vector2
-
Sets this vector to the right-handed normal of this vector.
- rightOn(Vector2, Vector2, Vector2) - Method in class org.dyn4j.geometry.decompose.Bayazit
-
Returns true if the given point p is to the right
or on the line created by a-b.
- root - Variable in class org.dyn4j.BinarySearchTree
-
The root node of the tree
- root - Variable in class org.dyn4j.collision.broadphase.DynamicAABBTree
-
The root node of the tree
- RopeJoint - Class in org.dyn4j.dynamics.joint
-
Represents a maximum/minimum length distance joint.
- RopeJoint(Body, Body, Vector2, Vector2) - Constructor for class org.dyn4j.dynamics.joint.RopeJoint
-
Minimal constructor.
- rotate(double) - Method in class org.dyn4j.collision.AbstractBounds
-
- rotate(double, Vector2) - Method in class org.dyn4j.collision.AbstractBounds
-
- rotate(double, double, double) - Method in class org.dyn4j.collision.AbstractBounds
-
- rotate(double) - Method in class org.dyn4j.collision.AxisAlignedBounds
-
- rotate(double, double, double) - Method in class org.dyn4j.collision.AxisAlignedBounds
-
- rotate(double, Vector2) - Method in class org.dyn4j.collision.AxisAlignedBounds
-
- rotate(double, double, double) - Method in class org.dyn4j.dynamics.Body
-
- rotate(double, Vector2) - Method in class org.dyn4j.dynamics.Body
-
- rotate(double) - Method in class org.dyn4j.dynamics.Body
-
- rotate(double) - Method in class org.dyn4j.geometry.AbstractShape
-
- rotate(double, Vector2) - Method in class org.dyn4j.geometry.AbstractShape
-
- rotate(double, double, double) - Method in class org.dyn4j.geometry.AbstractShape
-
- rotate(double, double, double) - Method in class org.dyn4j.geometry.Capsule
-
- rotate(double, double, double) - Method in class org.dyn4j.geometry.Ellipse
-
- rotate(double, double, double) - Method in class org.dyn4j.geometry.HalfEllipse
-
- rotate(double, double, double) - Method in class org.dyn4j.geometry.Polygon
-
- rotate(double, double, double) - Method in class org.dyn4j.geometry.Segment
-
- rotate(double, double, double) - Method in class org.dyn4j.geometry.Slice
-
- rotate(double) - Method in class org.dyn4j.geometry.Transform
-
- rotate(double, double, double) - Method in class org.dyn4j.geometry.Transform
-
- rotate(double, Vector2) - Method in class org.dyn4j.geometry.Transform
-
- rotate(double) - Method in interface org.dyn4j.geometry.Transformable
-
Rotates the object about the origin.
- rotate(double, Vector2) - Method in interface org.dyn4j.geometry.Transformable
-
Rotates the object about the given point.
- rotate(double, double, double) - Method in interface org.dyn4j.geometry.Transformable
-
Rotates the object about the given coordinates.
- rotate(double) - Method in class org.dyn4j.geometry.Vector2
-
Rotates about the origin.
- rotate(double, double, double) - Method in class org.dyn4j.geometry.Vector2
-
Rotates the
Vector2
about the given coordinates.
- rotate(double, Vector2) - Method in class org.dyn4j.geometry.Vector2
-
Rotates the
Vector2
about the given point.
- rotateAboutCenter(double) - Method in class org.dyn4j.dynamics.Body
-
Rotates the
Body
about its center of mass.
- rotateAboutCenter(double) - Method in class org.dyn4j.geometry.AbstractShape
-
- rotateAboutCenter(double) - Method in interface org.dyn4j.geometry.Shape
-
Rotates the
Shape
about it's center.


Jacqueline Jossa not doing interviews following reports about husband Dan Osborne
by Ciara WalshJacqueline Jossa was crowned Queen of the Jungle on I'm A Celebrity Get Me Out Of Here 2019.
I'm A Celebrity Get Me Out of Here 2019 winner Jacqueline Jossa won't be doing interviews following recent reports about husband Dan Osborne.
Usually, the winner of the ITV series gives an interview on breakfast talk shows like Lorraine or Good Morning Britain, but today, Lorraine confirmed this won't be the case with Jacqueline.
On Monday's episode, Lorraine was interviewing radio host Roman Kemp, who finished third on the series, when she asked: "Can we talk about little Jacqueline who's Queen of the Jungle?"
Roman replied: "I know she's not doing interviews, I sincerely hope she's in a bubble bath with a glass of something fizzy."
Lorraine's comment comes after recent claims that Dan had a threesome with former Celebrity Big Brother co-stars Natalie Nunn and Chloe Ayling last year.
He denied the allegations at the time and is planning on taking legal action against the tabloid reports.
This isn't the first time Jacqueline and Dan have had a setback in their marriage.
Recent rumours have also suggested that Dan had a fling with Myles Stephenson's ex-girlfriend Gabby Allen.
Dan and Gabby have denied the reports at the time, with Gabby recently saying that she confronted Jacqueline directly about the claims.
I'm A Celebrity Get Me Out Of Here will return to TV screens next year.


This image represents my character of Cheerfullness
This image represents my love of coffee
This image represents my character of friendliness
About Me (Abel Berhane)
I am from Addis Ababa, Ethiopia.
The reason why I joined Moringa School is because the whole idea of the internet and what goes around it
amuses
me, and I wanted to know what happens behind the scenes. I wish to become a professional coder.


This project is a web application designed for searching weather using weather API.
This Website is designed to display static content of TRS Denmark organisation
Bilrens Project is developed for display static content of a organisation and linked with booking system API for booking a appointment
Recat weather project is a web application designed for searching weather using weather API.
This project is test the RGB color knowledge. Player can guess the color of the tile according to combination displayed. If it matches all tiles will be turned to same color.
Recat weather project is a web application designed for searching weather using weather API.
Hello, My name is Chandrashekar Reddy Palle and I'm living in Copenhagen, Denmark. I am a Frontend developer and Test Engineer. I am in love with Functional programming. I did my masters in Computer Science from Halmstad University, Sweden
I have extensive programming knowledge with HTML, CSS, Javascript. I have knowledge of Software development and testing Life Cycle I know React JS, Node JS, JQuery, Karma, Embedded-C Programming and have experience of functional testing with QTP tool.


Nimbus cloud services is the next generation cloud computing with the latest technologies being employed to ease your company’s transition to a cloud base with a complete Cloud Management Platform solution differentiated from all other vendors. Our award-winning technology brings a dynamic element to the table that many of the companies and organizations can benefit from. Our infrastructure presents a platform for companies of all sizes to be able to join the cloud in the shortest time frame possible without a need to invest heavily in the hardware, this allows companies to save cost considerably. Being known for our competitive pricing, we simply offer the best of facilities with the lowest rates in the market; our competitive pricing is another element that keeps our customers satisfied.
Here are some reasons why we are the best choice for your company!
Our friendly and professional support team is dedicated to assist you all year around with all your inquires and technical questions. Our support team can be contacted via phone and live chat at anytime.
By hosting with Nimbus cloud services, in addition to reduction in your capital expenditure you can be assured that our services are provided with highest quality and most affordable, and straight forward pricing in the market to help our customers decision making process much easier.
Our in-house patented technology offers Nimbus Cloud Services customers the best possible security with highest standards. Our enterprise-grade encryption allows our customers to get back to regularity as quickly as possible if something should go wrong.
Nimbus Cloud Services’ core focus lies in Infrastructure-as-a-Service. This consistency in the focus can give our customers the assurance that we are 100 percent driven to provide you with the best services and support in the market.
Nimbus cloud services offers one of the most advanced, user friendly, and complete cloud management platform solutions in the market both in Sri Lanka and internationally. Adaptation of our solution allows your company to be flexible in increasing or decreasing capacity, storage, and functionality; you can have your servers running in no time. Your cloud is just a click away.
Let us help you conserve the environment.By hosting with Nimbus Cloud Services you are contributing to a greener environment, by shifting to Nimbus Cloud Services you can enjoy saving on consumption of energy which in return is going to create a safer environment and save costs for your company.
We help you save money on legacy IT, have a look at our video to find out how you can save money on IT.
You are in safe hands, we specialize in Cloud. Here are what we offer to you and your company.
When you need processing power, storage, networking components or middleware, You will just determine the workload and we would deliver it for you!
Need a platform to go with your infrastructure but dont want to deal with the headaches of licensing? We would manage that for you! Just let us know what platform you need.
You have a lean IT team, you need your IT resources, you will determine the workload, we would manage it for you!
Need a totally independent platform for your resources? we offer you best of the best. Your VPC can be up and running in just an instant.
Here are some of our standard Nimbus Solutions! If this is not what you looking no need to worry, we specialize in customizing. Let us know what is your requirement and we will Customize it for you.
You can download the application form here Download
We are proud of how we have helped our customers with our solutions. Here are some of our customers and partners!
+94 (77) 3099 711
<EMAIL_ADDRESS>106, Reid Avenue,
Colombo 4,
Sri Lanka
Monday-Friday 8:00 Am-5:30 Pm


The ultimate battle for cuteness is here. Simply vote for your favourite pet or take part and have your beloved pets run the gaunlet for pride and win prizes!!!
Votes: 704
Votes: 2731
Time Remaining:
1:00


---
title: Getting Started with Redline Smalltalk
description: Instructions for getting up and running with Redline Smalltalk
layout: default
---
Getting Started with Redline Smalltalk
Quickiest Start - From executables
Follow these instructions to be executing Smalltalk code with Redline Smalltalk as quickly as possible. Note: '>' represents the prompt on your command line / shell.
{% highlight bash %}
>wget https://github.com/redline-smalltalk/redline-smalltalk.github.com/raw/master/assets/redline-deploy.zip
>unzip redline-deploy.zip -d redline
>cd redline
>java -jar redline-0.6-SNAPSHOT.jar st.redline.script.HelloWorld
{% endhighlight %}
You should see the following message from Redline Smalltalk (CURRENTLY with a lot of debug output):
{% highlight bash %}
Hello World from Redline Smalltalk.
{% endhighlight %}
To execute your own Smalltalk code create a file with a '.st' extension using your favourite editor and then execute it with the above 'java -jar' command. Note: Don't add the '.st' when executing with 'stic'. Open the HelloWorld.st file to see an example of Smalltalk code.
If you have decided to adopt a class and help Redline then you need to create a '.st' file in the corresponding folder, and you need to put the associated test under the 'test' folder. For example, if you have adopted the Date class then you would create the 'Date.st' file that defines the Date class in the 'src/main/smalltalk/st/redline/kernel' folder, and a 'DateTest.st' file in the 'src/test/st/redline/kernel' folder.
Don't forget that you may need to edit the 'test/st/redline/kernel/TestSuite.st' file to ensure your test is run as part of the suite.
When you are happy with your adopted class and its tests you can email them to<EMAIL_ADDRESS>along with the DEVELOPER-CERTIFICATE-OF-ORIGIN to have them added to the project sources.
Quick Start - From sources
Follow these instructions to get Redline Smalltalk started with a clean build from source code, and a
running Smalltalk Hello World example. First you will need to get some of the dependencies for Redline sorted
out, these include:
JDK - To compile Redline Smalltalks Java source code.
Apache Maven - To handle the building, dependencies, testing and packaging for the Redline Smalltalk Java source code.
Git - To fetch the source code for Redline Smalltalk.
When you can do the following commands from your command prompt and get the associated results your environment is ready
for Redline Smalltalk. Note: '>' represents the prompt on your command line / shell.
{% highlight bash %}
> javac -version
javac 1.8.0_25
> mvn -v
Apache Maven 3.3.3<PHONE_NUMBER>791599e205a5524ec3e0dfe41d4a06; 2015-04-22T21:57:37+10:00)
> git --version
git version 2.7.4
{% endhighlight %}
*Note: Java versions 1.8 or greater and Maven version 3.0 or greater is ok.
Getting The Source Code
You will need to get the Redline Smalltalk source code checked out from the GitHub repository into a folder where you
want to build Redline Smalltalk. Git will check out the source into a subfolder so the folder you should make and
cd (change directory) into should be a level above. For example, I put my projects in a 'dev' folder so I would be in
that folder when I get the source code. To get the source code execute the following command:
{% highlight bash %}
> git clone https://github.com/redline-smalltalk/redline-smalltalk
{% endhighlight %}
Compiling the Source Code
To compile the Redline Smalltalk source code you need to be in the 'redline-smalltalk' folder and execute the following
command:
{% highlight bash %}
> mvn clean package
{% endhighlight %}
The first time you issue this command Apache Maven will go out to the internet and fetch a lot of dependencies, and this
may take a lot of time. This happens only the first time, and subsequent runs will be much quicker. When Maven has
completed you should see the following output:
{% highlight bash %}
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.383s
{% endhighlight %}
This process has built and Redline Smalltalk Java Archive and run a few tests against it. All of the build outputs we care
about are in the 'target' sub-folder.
Executing Hello World
Redline Smalltalk comes with a few examples and one such example is a simple 'Hello World' script that displays a message
on your screen. Note that this is 'Hello World' example is a Smalltalk script and not a class, as Redline Smalltalk can be used
for simple scripts as well as full applications. Of course there are example classes as well. To execute the example you need
to follow these steps from your command prompt:
{% highlight bash %}
>java -jar target/redline-0.6-SNAPSHOT.jar st.redline.script.HelloWorld
{% endhighlight %}
You should see the following message from Redline Smalltalk (CURRENTLY WITH A LOT OF DEBUG):
{% highlight bash %}
Hello World from Redline Smalltalk.
{% endhighlight %}
You can see the script for the Hello World example under the 'script' sub-folder. By convention Redline and Java keep source
files in sub-folders that correspond to the namespace of the class or script. So HelloWorld.st can be found in the sub-folder
'st/redline'. Please take a moment to look at the contents of this file.
This process has got the latest Redline Smalltalk source code, built it and ran a Smalltalk example. You may want to put the
resulting Redline Smalltalk code elsewhere on your system. If you do want to do this then copy the JAR from the target folder to
that location and be sure to set and export the REDLINE_HOME environment variable to that location.


Share Your Travels
let us know where you've been
photo details
Title
Description
Continent
Choose continent
Asia
Africa
Country
Choose country
China
America
City
Copyright?
All rights reserved
Creative Commons
Creative Commons Types
Attribution
Noncommercial
No Derivative Works
I accept the software license
Rate this photo:
Color Collection:
Date Taken:
Time Taken:


Sign in to Vcoming
Username or email address
Password
Forgot password?
New to Vcoming? Create an account.