var assert = require('assert');
var utils = require('./utils');
var logging = require('./logging');
var assert = require('assert');
var utils = require('./utils');
var logging = require('./logging');
The Connection class manages HTTP/2 connections. Each instance corresponds to one transport stream (TCP stream). It operates by sending and receiving frames and is implemented as an object mode Duplex stream.
var Duplex = require('stream').Duplex;
exports.Connection = Connection;
The main aspects of managing the connection are:
function Connection(firstStreamId, settings, log) {
Duplex.call(this, { objectMode: true });
this._log = (log || logging.root).child({ component: 'connection' });
this._initializeStreamManagement(firstStreamId);
this._initializeSettingsManagement(settings);
this._initializeLifecycleManagement();
this._initializeFlowControl();
}
Connection.prototype = Object.create(Duplex.prototype, { constructor: { value: Connection } });
| ^ | ^
v | v |
+--------------+ +--------------+
+---| stream1 |---| stream2 |---- .... ---+
| | +----------+ | | +----------+ | |
| | | stream1. | | | | stream2. | | |
| +-| upstream |-+ +-| upstream |-+ |
| +----------+ +----------+ |
| | ^ | ^ |
| v | v | |
| +-----+-------------+-----+-------- .... |
| ^ | | | |
| | v | | |
| +--------------+ | | |
| | stream0 | | | |
| | connection | | | |
| | management | multiplexing |
| +--------------+ flow control |
| | ^ |
| _read() | | _write() |
| v | |
| +------------+ +-----------+ |
| |output queue| |input queue| |
+----------------+------------+-+-----------+-----------------+
| ^
read() | | write()
v |
var Stream = require('./stream').Stream;
Initialization:
Connection.prototype._initializeStreamManagement = function _initializeStreamManagement(firstStreamId) {
streams are stored in two data structures:
_streamsIds
is the primary registry of streams. It's a sparse array that serves as an
id -> stream map.
_streamPriorities
is an ordered set of streams that are allowed to send data. The order
is determined by stream priorities. (currently, it's order of creation)
Streams that are not allowed to send data are not present in this set. There are two possible reason for this:
this._streamsIds = [];
this._streamPriorities = [];
this._next_stream_id
this._next_stream_id = firstStreamId;
_control
stream that corresponds to stream ID 0 (connection level frames).
When there's an incoming control frame, then an event with name equal to frame.type
is
emitted on _control
. this._control = new Duplex({ objectMode: true });
this._control._write = function(frame, encoding, done) {
this.emit(frame.type, frame);
done();
};
this._control._read = utils.noop;
this._control.on('readable', this.emit.bind(this, 'stream_readable'));
this._streamsIds[0] = this._streamPriorities[0] = { upstream: this._control, priority: -1 };
_streamLimit
can
be set by the SETTINGS_MAX_CONCURRENT_STREAMS setting. this._streamCount = 0;
this._streamLimit = Infinity;
this._control.on('SETTINGS_MAX_CONCURRENT_STREAMS', this._updateStreamLimit.bind(this));
};
Connection.prototype.getIdOf = function getIdOf(stream) {
return this._streamsIds.indexOf(stream);
};
Changing the stream count limit
Connection.prototype._updateStreamLimit = function _updateStreamLimit(newStreamLimit) {
this._streamLimit = newStreamLimit;
this.emit('stream_slot_change');
};
Creating a new (inbound or outbound) stream with the given id
means
Connection.prototype._newStream = function _newStream(id) {
this._log.trace({ id: id }, 'Adding new stream.');
var stream = new Stream(this._log.child({ stream: id }));
this._streamsIds[id] = stream;
return stream;
};
Connection.prototype._activateStream = function _activateStream(stream) {
this._log.trace({ id: this.getIdOf(stream) }, 'Activating stream.');
this._streamPriorities.push(stream);
stream.upstream.on('readable', this.emit.bind(this, 'stream_readable'));
};
Creating an inbound stream with the given id
Connection.prototype._incomingStream = function _incomingStream(id) {
this._log.debug({ id: id }, 'New incoming stream.');
var stream = this._newStream(id);
this._activateStream(stream);
this.emit('incoming_stream', stream, id);
return stream;
};
Creating an outbound stream with the next available ID
Connection.prototype.createStream = function createStream() {
var self = this;
var id = this._next_stream_id;
this._next_stream_id += 2;
this._log.trace({ id: id }, 'Creating new outbound stream.');
var stream = this._newStream(id);
var blocked = false;
var activated = false;
function tryToActivate() {
If blocked or already activated, then there's nothing to do
if (blocked || activated) {
return;
}
If there's enough slot, then do the activation
if (self._streamCount < self._streamLimit) {
self._activateStream(stream);
activated = true;
}
Else try again when slots free up
else {
self.once('stream_slot_change', tryToActivate);
}
}
stream.on('promise_initiated', function() {
blocked = true;
});
stream.on('promise_sent', function() {
blocked = false;
tryToActivate();
});
stream.on('state', function(state) {
var active_states = ['HALF_CLOSED_LOCAL', 'HALF_CLOSED_REMOTE', 'OPEN'];
var was_active = (active_states.indexOf(stream.state) !== -1);
var is_active = (active_states.indexOf(state) !== -1);
if (!was_active && is_active) {
tryToActivate();
} else if (was_active && !is_active) {
self._streamCount -= 1;
self.emit('stream_slot_change');
}
});
return stream;
};
The _read
method is a virtual method of the Duplex class that has to be implemented by
child classes. It reads frames from streams and pushes them to the output buffer.
Connection.prototype._read = function _read() {
this._log.trace('Starting forwarding frames from streams.');
var more_needed = true, stream, stream_id, frame;
for (var i = 0; i < this._streamPriorities.length && more_needed; i++) {
stream = this._streamPriorities[i];
stream_id = this.getIdOf(stream);
while (frame = stream.upstream.read()) {
frame.stream = stream_id;
if (frame.type === 'PUSH_PROMISE') {
frame.promised_stream.emit('promise_sent');
frame.promised_stream = this.getIdOf(frame.promised_stream);
}
more_needed = this._send(frame);
}
}
if (i === this._streamPriorities.length) {
this._log.trace('More chunk is needed, but we could not provide more.');
this.once('stream_readable', this._read.bind(this));
}
else if (more_needed === null) {
this._log.trace('We could not send more because of insufficient flow control window.');
this.once('window_update', this._read.bind(this));
}
_read
is called again by Duplex else if (more_needed === false) {
this._log.trace('No more chunk needed, stopping forwarding.');
}
};
The _write
method is another virtual method of the Duplex class that has to be implemented
by child classes. It forwards the given frame to the appropriate stream:
Connection.prototype._write = function write(frame, encoding, done) {
var stream = this._streamsIds[frame.stream];
this.streams
if (!stream) {
stream = this._incomingStream(frame.stream);
}
this.emit('receiving', frame);
stream
's upstream
stream.upstream.write(frame);
done();
};
Settings management initialization:
Connection.prototype._initializeSettingsManagement = function _initializeSettingsManagement(settings) {
this._log.info('Sending the first SETTINGS frame as part of the connection header.');
assert('SETTINGS_MAX_CONCURRENT_STREAMS' in settings);
assert('SETTINGS_INITIAL_WINDOW_SIZE' in settings);
this.set(settings);
this.once('receiving', function(frame) {
if (frame.stream === 0 && frame.type === 'SETTINGS') {
this._log.info('Receiving the first SETTINGS frame as part of the connection header.');
} else {
this._log.fatal({ frame: frame }, 'Invalid connection header: first frame is not SETTINGS.');
this.emit('error');
}
});
_receiveSettings
method this._control.on('SETTINGS', this._receiveSettings.bind(this));
};
Handling of incoming SETTINGS frames.
Connection.prototype._receiveSettings = function _receiveSettings(frame) {
for (var name in frame.settings) {
this._control.emit(name, frame.settings[name]);
}
};
Changing one or more settings value and sending out a SETTINGS frame
Connection.prototype.set = function set(settings) {
this._control.push({
type: 'SETTINGS',
settings: settings
});
};
The main responsibilities of lifecycle management code:
Connection.prototype._initializeLifecycleManagement = function _initializeLifecycleManagement() {
this._pings = {};
this._control.on('PING', this._receivePing.bind(this));
this._control.on('GOAWAY', this._receiveGoaway.bind(this));
this._lastIncomingStream = 0;
this.on('incoming_stream', function(stream, id) {
this._lastIncomingStream = id;
}.bind(this));
};
Generating a string of length 16 with random hexadecimal digits
Connection.prototype._generatePingId = function _generatePingId() {
do {
var id = '';
for (var i = 0; i < 16; i++) {
id += Math.floor(Math.random()*16).toString(16);
}
} while(!(id in this._pings));
return id;
};
Sending a ping and calling callback
when the answer arrives
Connection.prototype.ping = function ping(callback) {
var id = this._generatePingId();
var data = new Buffer(id, 'hex');
this._pings[id] = callback;
this._log.debug({ data: data }, 'Sending PING.');
this._control.push({
type: 'PING',
flags: {
PONG: false
},
data: new Buffer(id, 'hex')
});
};
Answering pings
Connection.prototype._receivePing = function _receivePing(frame) {
if (frame.flags.PONG) {
var id = frame.data.toString('hex');
if (id in this._pings) {
this._log.debug({ data: frame.data }, 'Receiving answer for a PING.');
this._pings[id]();
delete this._pings[id];
} else {
this._log.warning({ data: frame.data }, 'Unsolicited PING answer.');
}
} else {
this._log.debug({ data: frame.data }, 'Answering PING.');
this._control.push({
type: 'PING',
flags: {
PONG: true
},
data: frame.data
});
}
};
Terminating the connection
Connection.prototype.close = function close(error) {
this.push({
type: 'GOAWAY',
last_stream: this._lastIncomingStream,
error: error || 'NO_ERROR'
});
this.push(null);
};
Connection.prototype._receiveGoaway = function _receiveGoaway(frame) {
this.push(null);
};
Connection.prototype._initializeFlowControl = function _initializeFlowControl() {
Turning off flow control for incoming frames (not yet supported).
this._control.push({
type: 'WINDOW_UPDATE',
flags: {
END_FLOW_CONTROL: true
},
window_size: 0
});
Initializing flow control for outgoing frames
this._window = INITIAL_WINDOW_SIZE;
this._control.on('WINDOW_UPDATE', this._updateWindow.bind(this));
};
When a HTTP/2.0 connection is first established, new streams are created with an initial flow control window size of 65535 bytes.
var INITIAL_WINDOW_SIZE = 65535;
A SETTINGS frame can alter the initial flow control window size for all current streams. When the
value of SETTINGS_INITIAL_WINDOW_SIZE changes, a receiver MUST adjust the size of all stream by
calling the setInitialWindowSize
method. The window size has to be modified by the difference
between the new value and the old value.
Connection.prototype.setInitialWindowSize = function setInitialWindowSize(initialWindowSize) {
this._window = this._window - this._initialWindowSize + initialWindowSize;
this._initialWindowSize = initialWindowSize;
};
Flow control can be disabled for all streams on the connection using the disableFlowControl
method. This may happen when there's a SETTINGS frame received with the
SETTINGS_FLOW_CONTROL_OPTIONS setting.
Connection.prototype.disableFlowControl = function disableFlowControl() {
this._window = Infinity;
};
The _updateWindow
method gets called every time there's an incoming WINDOW_UPDATE frame. It
modifies the modifies the flow control window:
Connection.prototype._updateWindow = function _updateWindow(frame) {
if (frame.flags.END_FLOW_CONTROL) {
this.disableFlowControl();
} else {
this._window += frame.window_size;
}
this.emit('window_update');
};
Connection.prototype._send = function _send(frame) {
if (frame && frame.type === 'DATA') {
if (frame.data.length > this._window) {
return null;
}
this._window -= frame.data.length;
}
return this.push(frame);
};


Supplemental dispatcher API¶
In this section we describe the supplemental dispatcher API of dash-store.
Warning
For the time being, this dispatcher API is experimental and subject to change.
dispatch¶
import { dispatch } from 'dash-store/dispatch';
dispatch(store, { type: 'actionTag', ... }); // from (1)
dispatch(store, 'actionTag', args...); // form (2)
dispatch(store, ['actionTag', args...]); // form (3)
This function dispatches a specific action designated by
actionTag
(string symbols looks like 'reset'
).
The dispatch function recognizes a several different dispatching conventions.
In the form (1), actions to dispatch are represented a JavaScript
Object. The action type will be determined by a property named such
as type
, and the function of the action will be called by the
following convention:
dispatch(store, { type: 'actionTag', ... }); // form (1)
// ↓
fn({ type: 'actionTag', ... });
Note
The default propery key for actionTags is type
. You can change
this by setActionKey.
In the form (2), actions are represented similar to the oridinal
function call. The action type will be determined by the second
argument actionTag
. the function of the action will be called by
the following convention:
dispatch(store, 'actionTag', args...); // form (2)
// ↓
fn(args...);
The form (3) is simliar to the form (2). The difference to the
form (2) is that actionTag
and following arguments are
surounded by []
:
dispatch(store, ['actionTag', args...]); // form (3)
// ↓
fn(args...);
Example:
const store = createStore({ counter: 0 });
const update = update.bind(null, store);
addActions(store, {
set: ({ value = 0 }) => update(state, { ...state, counter: value },
increment: i => update(state, { ...state, counter: state.counter + i }),
decrement: i => update(state, { ...state, counter: state.counter - i }),
});
...
dispatch(store, { type: 'set', value: 0 }); // form (1)
dispatch(store, 'inc', 1); // form (2)
dispatch(store, ['dec', 1]); // form (3)
Hint
You can create a specialized version of dispatch for your store by bind() method:
const store = createStore({ cnt: 0 });
const update = update.bind(null, store);
addActions(store, { inc: () => update(s => { ...s, cnt: s.cnt + 1), ... });
dispatch2 = dispatch.bind(null, store); // ← create a new dispatch function
...
dispatch2('inc');
addActions¶
import { addActions } from 'dash-store/dispatch';
addActions(store, addition);
This function adds actions to the store. The actions to add are represented as a JavaScript Object in the following form:
{
actionTag1: function1,
actionTag2: function2,
...
}
Example:
const store = createStore({ counter: 0 });
const update = update.bind(null, store);
addActions(store, {
reset: () => update(state, { ...state, counter: 0 },
increment: i => update(state, { ...state, counter: state.counter + i }),
decrement: i => update(state, { ...state, counter: state.counter - i }),
});
addActionList¶
import { addActionList } from 'dash-store/dispatch';
addActionList(store, addition);
This function adds actions to the store. The actions to add are represented as an array of arrays in the following form:
[
['actionTag1', function1],
['actionTag2', function2],
...
]
Example:
export const store = createStore({ counter: 0 });
const update = update.bind(null, store);
addActionList(store, [
['reset', () => update(state, { ...state, counter: 0 }],
['increment', i => update(state, { ...state, counter: state.counter + i })],
['decrement', i => update(state, { ...state, counter: state.counter - i })],
]);
setActionKey¶
import { setActionKey } from 'dash-store/dispatch';
setActionKey(store, key);
This function change the property key to determine actionTag from a JavaScript Object supplied to dispatch function.
Note
The default action key is 'type'
.
Example:
const store = createStore({ ... });
setActionKey(store, 'tag'); // → { tag: 'action', ... }
setOnDispatchHook¶
import { setOnDispatchHook } from 'dash-store/dispatch';
setOnDispatchHook(store, fn);
This function sets a onDispach hook which will be called befor every action of the store performed dispatch.
The hook functiion fn
should have the following signatre:
fn(store, args);
Where the args
is an array which holds the entire argument list
passed to dispatch except the first one (store).
Example:
const store = createStore(...);
setOnDispatchHook(store, fn);
...
dispatch(store, arg1, arg2, arg3, ...);
// ↓
// fn(store, [arg1, arg2, arg3, ...]);


jasyncapicmp is a tool to compare two versions of a asyncapi specification:
java -jar target/jasyncapicmp-0.0.1-jar-with-dependencies.jar -o old.yaml -n new.yaml
It can also be used as a library to parse and compare asyncapi specifications:
AsyncApiParser asyncApiParser = new AsyncApiParser();
AsyncApi oldAsyncApi = asyncApiParser.parse(oldFile, config.getOldPath());
AsyncApi newAsyncApi = asyncApiParser.parse(newFile, config.getNewPath());
AsyncApiComparator comparator = new AsyncApiComparator();
ObjectDiff diff = comparator.compare(oldAsyncApi, newAsyncApi);
There is also a maven plugin available.
Every time you release a new version of an API defined by a asyncapi specification, you need to check if only these things have changed that you wanted to change. Probably you also have to inform the clients of the API about and changes and want to document them.
Without the appropriate tooling, this task is tedious and error-prone. This tool/library helps you to determine the differences between two versions of an asyncapi specification.
Development of this tool is not completed, yet. Hence, there are a lot of planned features:
To use the tool you can clone the repository, build the tool and run it:
git clone https://github.com/siom79/jasyncapicmp.git
cd jasyncapicmp
mvn package
java -jar target/jasyncapicmp-0.0.1-jar-with-dependencies.jar -o old.yaml -n new.yaml
A read-to-use jar file with all dependencies can be downloaded from the Maven Central Repository here.
Be sure to download the file with the extension -jar-with-dependencies.jar
.
You can also use it as a library:
<dependency>
<groupId>io.github.siom79.jasyncapicmp</groupId>
<artifactId>jasyncapicmp</artifactId>
<version>0.0.1</version>
</dependency>
To integrate the output into your build, you can utilize the maven plugin:
<build>
<plugins>
<plugin>
<groupId>io.github.siom79.jasyncapicmp</groupId>
<artifactId>jasyncapicmp-maven-plugin</artifactId>
<version>0.0.1</version>
<executions>
<execution>
<id>cmp</id>
<phase>verify</phase>
<goals>
<goal>jasyncapicmp</goal>
</goals>
<configuration>
<oldVersion>
<file>old_2.6.0.yaml</file>
</oldVersion>
<newVersion>
<file>new_2.6.0.yaml</file>
</newVersion>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Sample output:
asyncapi: 2.6.0 (===)
id: https://github.com/siom79/jasyncapicmp (===)
info: (===)
description: This is a sample app. (===)
termsOfService: https://asyncapi.org/terms/ (===)
title: AsyncAPI Sample App (===)
version: 1.0.0 (*** old: 0.1.0)
license: (===)
name: Apache 2.0 (===)
url: https://www.apache.org/licenses/LICENSE-2.0.html (===)
contact: (===)
name: API Support (===)
url: https://www.asyncapi.org/support (===)
email<EMAIL_ADDRESS>(*** old<EMAIL_ADDRESS>servers: (===)
production: (===)
protocol: secure-mqtt (===)
description: The production API server (===)
url: gigantic-server.com:{port}/path (===)
variables: (===)
port: (===)
defaultValue: 8883 (===)
enums: (***)
- 8883 (===)
- 8884 (+++)
channels: (===)
userSignedUp: (===)
subscribe: (===)
summary: Action to sign a user up. (===)
operationId: userSignup (===)
message: (===)
contentType: application/json (===)
payload: (===)
type: object (===)
properties: (===)
role: (+++, compatibility change: SCHEMA_PROPERTY_ADDED)
type: string (+++)
user: (===)
type: string (===)
[...]
The following incompatibilities ares detected:
| Incompatibility | Backward compatible | Forward compatible |
|---|---|---|
| CHANNEL_ADDED | true | true |
| CHANNEL_REMOVED | false | false |
| OPERATION_OPERATION_ID_CHANGED | false | false |
| MESSAGE_MESSAGE_ID_CHANGED | false | false |
| MESSAGE_CONTENT_TYPE_CHANGED | false | false |
| MESSAGE_SCHEMA_FORMAT_CHANGED | false | false |
| SCHEMA_TYPE_CHANGED | false | false |
| SCHEMA_PROPERTY_ADDED | true | true |
| SCHEMA_PROPERTY_REMOVED | true | true |
| SCHEMA_PROPERTY_REQUIRED_ADDED | false | true |
| SCHEMA_PROPERTY_REQUIRED_REMOVED | true | false |
| SCHEMA_MIN_LENGTH_INCREASED | false | true |
| SCHEMA_MIN_LENGTH_DECREASED | true | false |
| SCHEMA_MAX_LENGTH_INCREASED | true | false |
| SCHEMA_MAX_LENGTH_DECREASED | false | true |


Disneyland Paris launch FREE flights for kids during winter season
The offers are available during the park's winter season
by Jonathan YatesDisneyland Paris has launched a number of deals for its winter season.
Holidaymakers can bag themselves 35% off hotels and tickets as well as free flights or ferry trip ahead of the all-new Frozen Celebration kicking off in 2020.
A highlight among Disneyland's winter deals is a free flights offer for children under 12 years old.
If you're arriving between January 6 and March 31 in 2020 then one child will fly free with every one paying adult, which includes flights from Birmingham Airport with Flybe.
The other option is a free ferry crossing with P&O Ferries if you'd rather make the trip by car. This offer applies to a standard car on a return trip from Dover to Calais.
Plus you can also make savings of 35% on Disney hotels and tickets if you're arriving any time between now and April 1.
So if you book your hotel and tickets at the same as the free flight or ferry deal is valid then you can make savings on the entire trip as the two can be used together as well as during school holidays.
This discount is available on a minimum stay of two nights and three days and maximum stay of four nights and five days at the Disneyland Hotel, Newport Bay Club, Sequoia Lodge and Davy Crockett Ranch.
January 11 sees the launch of Frozen Celebration at Disneyland Paris with the chance to meet Elsa, Anna and friends, festive floats, new souvenirs and treats and a brand new interactive animation experience in the Studio Park.
Other departure airports available in the deal are Cardiff International, Edinburgh, Exeter, Manchester and Southampton.
The free flights or ferry offer is available on bookings made until November 27.
To find out more and to book go to disneylandparis.com.


Welcome to the Lambda School CS Wiki
Everything can be found on the Pages tab to the right.
The Annex
The annex can be found
here. This is a collection of repositories that used to be taught as part of
the LambdaSchool CS curriculum but are now no longer taught for various
reasons. For the curious student, the annex makes these archived
repositories available for exploration. Note that these repositories are
no longer actively managed. Bugs and issues may be prevalent in these
repositories.
CS Lore
- [[Lambda Problem Solving Framework]]
- [[Top Dev HOWTO]]
- [[Getting Your Vagrant Environment Up and Running]]
- [[Solving Programming Problems]]
- [[Using HackerRank]]
- [[Computing Big O]]
- [[Python’s Default Argument Values and Lists]]
- [[Polya’s Problem Solving Techniques]]
- [[Computer Science Reading List]]
- [[Arrays, prototypes, slices, calls]]
- [[C and Cpp Debugging in VS Code]]
- [[Casting Signed to Unsigned in C]]
- [[Keeping GitHub Forks in Sync]]
- [[Getting Your C Compiler Installed]]
- [[Why Learn Computer Science?]]
- [[Why Learn C?]]
- [[How to Google Effectively]]
- [[How Unix Pipes are Implemented]]
- [[How to Read Specifications and Code]]
- [[Useful vim commands]]
- [[Javascript/Python cheatsheet]]
- [[Installing Python 3]]
- [[Command Line Primer]]
- [[CS Coding Style Guidelines]]
- [[Interview Practice Resources]]
- [[CodeSignal GCA Info]]
-
Building a SQLite Clone in C
Other Lore
- [[GitHub Wiki HowTo]]
- [[Collected Interview Questions]]
- [[On Remote Work]]


Lovely DOM - Mouse IO Test
MouseEnter/MouseLeave Events Test
Direct Handling
Boo!
UJS Handling
Boo!
More Complicated Case
Some
sort
of
text
Some
sort
of
text
Some
sort
of
text
Some
sort
of
text
Some
sort
of
text
Some
sort
of
text


Students Page
Analyze Student data
No student data..
{{ (students | filter:searchStudent | filter:{type: typevalue}).length }} students


Azure Static Web Apps Auth
Provider
Name of the identity provider
User ID
An Azure Static Web Apps-specific unique ID for the user
Username
Username or email address of the user
User’s roles
Roles used during authorization. One role per line.
Note: roles "authenticated" and "anonymous" will be added automatically if not provided.
Login
Clear


Ohio Local Takes Advantage of Winter Mix, Creates Spidery Snow Art
For one individual in Ohio, the state’s recent wintery mix brought on an impulse to create some snow art in the shape of a large spider in its web.
Footage of the curious find was filmed and shared on Facebook by Scott Halbrook earlier this week. “Happening now in downtown Cleveland one guy takes advantage of the snow in an open area,” reads the video’s caption.
While many onlookers likely welcomed the surprise, the spidery artwork presumably left arachnophobes wanting the piece replaced with a more soothing image.


Class: Aws::GameLift::Types::ScalingPolicy
| Inherits: |
Struct
|
| Defined in: |
(unknown) |
Overview
Rule that controls how a fleet is scaled. Scaling policies are uniquely identified by the combination of name and fleet ID.
Instance Attribute Summary collapse
-
#comparison_operator ⇒ String
Comparison operator to use when measuring a metric against the threshold value.
Possible values:
-
#evaluation_periods ⇒ Integer
Length of time (in minutes) the metric must be at or beyond the threshold before a scaling event is triggered.
-
#fleet_id ⇒ String
Unique identity for the fleet associated with this scaling policy.
-
#metric_name ⇒ String
Name of the GameLift-defined metric that is used to trigger an adjustment.
-
#name ⇒ String
Descriptive label associated with a scaling policy.
-
#scaling_adjustment ⇒ Integer
Amount of adjustment to make, based on the scaling adjustment type.
-
#scaling_adjustment_type ⇒ String
Type of adjustment to make to a fleet\'s instance count (see FleetCapacity):
-
#status ⇒ String
Current status of the scaling policy.
-
#threshold ⇒ Float
Metric value used to trigger a scaling event.
Instance Attribute Details
#comparison_operator ⇒ String
Comparison operator to use when measuring a metric against the threshold value.
Possible values:
- GreaterThanOrEqualToThreshold
- GreaterThanThreshold
- LessThanThreshold
- LessThanOrEqualToThreshold
#evaluation_periods ⇒ Integer
Length of time (in minutes) the metric must be at or beyond the threshold before a scaling event is triggered.
#fleet_id ⇒ String
Unique identity for the fleet associated with this scaling policy.
#metric_name ⇒ String
Name of the GameLift-defined metric that is used to trigger an adjustment.
- ActivatingGameSessions – number of game sessions in the process of
being created (game session status =
ACTIVATING
). - ActiveGameSessions – number of game sessions currently running
(game session status =
ACTIVE
). - CurrentPlayerSessions – number of active or reserved player
sessions (player session status =
ACTIVE
orRESERVED
). - AvailablePlayerSessions – number of player session slots currently
available in active game sessions across the fleet, calculated by
subtracting a game session\'s current player session count from its
maximum player session count. This number does include game sessions
that are not currently accepting players (game session
PlayerSessionCreationPolicy
=DENY_ALL
). - ActiveInstances – number of instances currently running a game session.
- IdleInstances – number of instances not currently running a game
session.
Possible values:
- ActivatingGameSessions
- ActiveGameSessions
- ActiveInstances
- AvailablePlayerSessions
- CurrentPlayerSessions
- IdleInstances
#name ⇒ String
Descriptive label associated with a scaling policy. Policy names do not need to be unique.
#scaling_adjustment ⇒ Integer
Amount of adjustment to make, based on the scaling adjustment type.
#scaling_adjustment_type ⇒ String
Type of adjustment to make to a fleet\'s instance count (see FleetCapacity):
- ChangeInCapacity – add (or subtract) the scaling adjustment value from the current instance count. Positive values scale up while negative values scale down.
- ExactCapacity – set the instance count to the scaling adjustment value.
- PercentChangeInCapacity – increase or reduce the current instance
count by the scaling adjustment, read as a percentage. Positive values
scale up while negative values scale down.
Possible values:
- ChangeInCapacity
- ExactCapacity
- PercentChangeInCapacity
#status ⇒ String
Current status of the scaling policy. The scaling policy is only in
force when in an ACTIVE
status.
- ACTIVE – The scaling policy is currently in force.
- UPDATEREQUESTED – A request to update the scaling policy has been received.
- UPDATING – A change is being made to the scaling policy.
- DELETEREQUESTED – A request to delete the scaling policy has been received.
- DELETING – The scaling policy is being deleted.
- DELETED – The scaling policy has been deleted.
- ERROR – An error occurred in creating the policy. It should be
removed and recreated.
Possible values:
- ACTIVE
- UPDATE_REQUESTED
- UPDATING
- DELETE_REQUESTED
- DELETING
- DELETED
- ERROR
#threshold ⇒ Float
Metric value used to trigger a scaling event.


Brazilian living in Germany it´s been 5 years. Graduated in Communication Science-Journalism. It´s been 2 years ago I decided to start my career in IT to improve my skills and develop good content with my knowledge on communication and content creation. I started some training and online courses using some platforms like @Udemy and @cursoemvideo. After that, I finished some training such as: - FrontEnd Developer Bootcamp - BTA Berlin - Basic knowledge of Web - Development Tools such as Javascript, Html5, Css3. - Knowledge in Bootstrap, Python, Vue Js and React. I´m starting the journey into IT governance and Agile methods such as ITIL@ and SCRUM. I have plans to understand more about the life cycle in IT and looking for an opportunity where I can use all my skills and grow my passion in this area. I would like to start as a Junior Programming or even 1st Level Support/Backoffice to use my knowledge and learn even more. I´m proactive, passionate about learning, and always focused on improving myself.
in the near future:
If you are also starting this new journey in IT feel free to send me messages and maybe we can help each other exchanging ideas and experiences. I will love to help and be helped.


Welcome to markup guides!!!!
your guide to present and past markdown languages
we will try to cover every markup language
Why are you doing that?
Because some markup language could be forgotten and the page could be down!!!
IS THIS A BIG GOAL?
yes
we support WML at: wml page


Hey everyone so from few days I was working on a project that is a Desktop-based app that can encrypt a file so that none can see and use that file without permission of myself. There are lots of app in the market that do kinds of stuff related to this but they all were PAID apps since I am unable to buy those, I decided to make one for myself and for the users who cannot afford those high-end apps. i choose python 3 and GUI library to create a GUI version to get rid of those default Oldschool black console window, though the app does not look premium I tried to make this as minimal and easy to use interface.
Click the button below to see the Demo/Tutorial video
View Demo


I am a Epicodus student based in Portland, Oregon. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
June 29, 2017
Our objective for this assingment was to recreate Wikipedia front page by using HTML, CSS and bootstrap. My project that I am linking here was done in 3.5 hours. I worked alone on this project.
June 29, 2017
The objective for this project was to use bootstrap grid. I also used some bootstrap panels, wells, and basic styling. This project took me 2 hours and I worked on it solo.
June 28, 2017
Our objective for this project was to work with a pair and complete the assingment togeather using HTML, CSS and bootstrap. I was paired with Colin Person and we worked on this project for 1 hours. The project came together smothly and as you can see we added a little bit of humor to it.
June 27, 2017
This is the first project that I worked on with a pair in Epicodus coding program. I was paired with Ryan and the objective was to design a web page that was a blog for our dog. We spent 45 minutes putting togeather a basic page with HTML and CSS.


Black Jack casino game implemented in the form of a web app.
A weather app to see current weather of particular city / current location.
A Web Based project to design a system to see patient medical history.


Prince Harry, Prince William gather for Remembrance Day ceremony amid rumors of royal rift
by WABCLONDON -- The British royals made a public appearance Saturday amid rumors of a rift among the so-called "Fab Four."
The Queen, her two grandsons and their spouses gathered for reflections at London's Cenotaph in honor of Remembrance Day, a British holiday dedicated to war heroes from the United Kingdom and its allies.
This sighting comes shortly after Prince Harry and Meghan, Duchess of Sussex, revealed their struggles with public life and Harry's relationship with his brother William.
"We're brothers. We'll always be brothers. We're certainly on different paths at the moment, but I will always be there for him, and he will always be there for me," Harry said during his South African trip.
Harry and William were seen entering The Cenotaph separately, with Harry and Meghan on Queen Elizabeth's left and William and Kate, Duchess of Cambridge, seated directly to her right.
Yet this is not unusual, as these events are often arranged by the seniority of the royals' positions.
Remembrance Day ceremonies continued into Sunday.


Former NYC mayor Bloomberg preparing presidential run: Report
NEW YORK: Former New York mayor Michael Bloomberg is preparing to enter the crowded race to become the Democratic nominee for the 2020 presidential election, US media reported on Thursday (Nov 7).
The 77-year-old Bloomberg is expected to file paperwork in at least one state this week declaring himself a candidate, according to multiple outlets including The New York Times.
The billionaire Bloomberg had said back in March he wouldn't run, but has been toying for weeks with the idea of seeking the White House after all, according to an advisor, who was quoted as saying he had yet to make a final decision.
He has, though, sent members of staff to Alabama to gather the necessary signatures required to register for that state's primary ahead of the deadline Friday in anticipation of a bid, the reports said.
The move is the first clear sign that Bloomberg, long touted as a possible US presidential candidate, is getting ready to battle it out to take on President Donald Trump.
Bloomberg, one of the richest people in the United States, ran the Big Apple from 2001 to 2013.
He has switched between the Republican and Democratic parties over years and also served as an independent mayor.
He is perceived as a centrist figure close to Wall Street who views Elizabeth Warren and Bernie Sanders, two of the frontrunners, as too left-wing.
"He thinks (leader) Joe Biden is weak and Sanders and Warren can't win," the New York Post quoted a source familiar with Bloomberg's plans as saying.
His entry would bloat an already crowded field of contenders, with 17 candidates currently vying for the right to take on Trump as the Democratic nominee.


type at least 3 characters to get autocomplete suggestions
source, download and more info at Tihauan/jquery-autolist


krill Antarctic data distribution life larval stages densities Fig grid Res Euphausia density depth Scotia mean water late sampling distributions early habitat shelf maps Peninsula furcilia season used stage krill, spawning Deep temperature {border-style database Available South Southern [Internet]. adult from: px;} #ffffff;} eggs larvae Polar based high juvenile study Mar Oceanogr Sea Siegel Table calyptopes season. stations Ocean krill. sea superba Atkinson Krill composite databases nauplii stages. Ecol abundance analysis available cells environmental ice south-west In: Sea. length net provide provided sector surveys years Hofmann Murphy habitats juveniles post-larval waters (no. Atlantic Discovery Prog Ser. additional austral data, fishery food large metanauplii number size superba) values (Figs Biology Marine Pakhomov Pap. Stud United areas cell compiled described development eggs, era hotspots ocean px; range relative scale shown time {font-family Biol. Data Georgia KRILLBASE-abundance Marguerite Oceanogr. Ross Writing average calyptope circumpolar coverage egg females font-size latitude main males management modern numbers oceanic paper partitioning population postlarval records relatively similar source strong superba, tip total year (i.e. Antarct Bay Click Distribution Ecology Hill However, LINK Methodology Project Quetin Sci. Sciences Supervision Watkins adults area change contains developmental different double; editing feeding file. fishing frequency including juveniles, longitude map nursery review sample sampled series southern suggests surface using warming west –): (DOCX) Bransfield CCAMLR Circumpolar Conceptualization Earth Environmental Funding KRILLBASE KRILLBASE-length-frequency Klinck Reiss Research Southampton, Thorpe West administration biomass border-color border-width broad cells. collected data. deep degree derive differences differing evidence extracted factors highest information mesh multiple overall patterns plots plotted research restricted scientific season, solid; stages, summer survey temperatures {font-style {font-weight (January ./j.dsr... Antarctica Aquatic Arc Arc. Cambridge Dana) December Everson Fish Investigation January Kawaguchi Kingdom Life Nat National Resources Schmidt Shetland Spatial Strait Table. Trivelpiece Ward Water Weddell [], analyses bathymetric bathymetry bold calculated calyptopes, catch catches clearly climate combined commercial comparison concentrated concept courier; create current cycle demography determine direction ecosystem em; excluded existing female following furcilia, future given hauls horizontal identifying implications important include laboratory localised location male marine near nets objective particularly parts period populations position potential predators production provides pt;} quantitative reach recruitment regions relation role screening seasonal shows single small spanning stage. stock studies study. success support supported table transport use variability variation vertical western wide winter


--- title: Interpretable Machine Learning by Christoph Molnar author: "Bodo Burger" date: "2019-02-26" tags: ["Interpretable ML", "explainable AI"] categories: ["Books"] draft: False ---
The digital version of the book can be bought on leanpub. You can find a free online version of the book here: https://christophm.github.io/interpretable-ml-book
The introduction covers three short stories that illustrate the detrimental consequences of a world controlled by black box machine learning models (1.1). They serve as motivation for why we want to use methods that improve understanding of an opaque model. The goal is that a human can understand a model so that he can consistently predict its results.
Chapter 2 lays the foundation for the discussion on machine learning interpretability by answering the following questions:
The presented interpretation methods are repeatedly applied to three freely available data sets representing different kinds of prediction tasks: daily bike rentals (regression), cancer risk factors (classification) and YouTube spam comments (text classification). Chapter 3 introduces the datasets in more detail.
This chapter presents models that are interpretable by itself. For Molnar these are
These models have in common that the result is accessible to the user without further steps. They differ in regards to linearity, monotonicity, the possibility to include feature interactions and the tasks they can handle.
The interpretation of linear regression is straightforward. We compute a coefficient (or a weight in ML terminology) for each feature that tells us how much the predicted target increases if we increase the corresponding feature by one unit, all other features held constant. (Effect plots)[https://christophm.github.io/interpretable-ml-book/limo.html#visual-interpretation] can help to understand a feature’s contribution to the prediction.


We aggregate methodologies!
- unleash cross-media bandwidth
- matrix 24/365 vortals
- engage robust users
- engineer e-business architectures
- revolutionize value-added e-tailers
- productize revolutionary infomediaries
- innovate next-generation infomediaries
- cultivate cross-platform e-tailers
- orchestrate real-time users
- brand interactive content


| init_oauth1.0 {httr} | R Documentation |
See demos for use.
init_oauth1.0( endpoint, app, permission = NULL, is_interactive = interactive(), private_key = NULL )
endpoint |
An OAuth endpoint, created by |
app |
An OAuth consumer application, created by
|
permission |
optional, a string of permissions to ask for. |
is_interactive |
DEPRECATED |
private_key |
Optional, a key provided by |


Common interview questions and answers
1. Tell me about yourself ?
keywords: confidence, enthusiasm, education, past work experience,
I am 27 years old now, and I was born in Hebei province, China. I was graduated from HuaQiao university in 2012, majored in software engineering. After that, I went to Beijing University of Posts and Telecommunications for advanced study in computer science and technology. I did an intern in siemens China from 2012-2014. The project is about a fuzz testing system to find vulnerabilities of the equipments. My main duty is to implement new features and debug, using cpp under Fedora 18.
I took part in Google Summer of Code from April to August 2015, the project is to improve the robustness of John the ripper. I did fuzz testing for this project, and finally, there were more than 100 bugs found. And some bugs were fixed by me. What’s mnore, I implmented two new features and improved the fuzz testing speed by 10 times.
That’s all.
2. What are your strengths ?
A. I can focus my full attention on my work, and I am very efficient. B. I am good at making plans and I have great execution. C. Because of my very outgoing nature, many people have said that I am quite approachable.
3. What are your weaknesses ?
Perfectionist
Here is one weakness, since I love the computer science, so I usually want to know why ? Why the size of the executable files have great different when you have many static variables which are initialized by zero or nonzeroes ?
Why the cpp can support polymorphism ?
I always try to accomplish everything, and I just want everything to be perfect but then I realized that I am losing out at the same time. So maybe that makes some projects pretty late.
4. Where do you see yourself in five years ?
Well five years from now, I want to be an expert in some areas of computer science. Such as linux programming environment, or linux kernel, or software architecture.
5. What do you know about our company ?
A. IBM i software engineer
IBM i is one of important IBM operation systems which is running on an IBM Power Systems, offering a highly scalable and virus resistant architecture. CSTL IBM i team was found in 2005 and had grown up with more than 100 people by now.
6. How well do you handle change ?
I think I can handle change well. Changes are everywhere, sometimes they are small and sometimes they are big. I think I am prepared for any changes, since I am flexible and hard working.
7. Do you work well under pressure ?
I think I can work well under pressure. The pressure usually comes when we must accomplish our goal in short time. I will cooperate with my colleagues to make plans and try our best to finish our task.
8. How do you make important decisions ?
I would weigh on the pros and cons, and also I would take some adive from my team members. I am sure that would help me to come on the decision.
Continue reading...


Submit Job
Job Name:
Description:
Cancel
Submit Job
×
Editor
Menu
X
[]
()
Save
Save Macro
Save Macro and Close
Language
OpenSBP
G-Code
Execute
Run Code Immediately (Ctrl+Enter)
Save and Submit as Separate New Job
X


| Overview | Namespace | Class | Index | Help |
| PUBLIC MEMBERS: | CLASSES | STRUCTS | UNIONS | ENUMS | TYPEDEFS | METHODS | STATIC METHODS | DATA | STATIC DATA |
| virtual | abstract | interface | template |
| NO | NO | NO | NO |
Methods |
|
| WeakReferenceHelper( ) throw( ); |
Default ctor. Creates an empty weak reference. |
| WeakReferenceHelper( const WeakReferenceHelper & rWeakRef ) throw( ); |
Copy ctor. Initialize this reference with the same interface as in rWeakRef. |
| WeakReferenceHelper( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xInt ) throw( ); |
Initialize this reference with the hard interface reference xInt. If the implementation behind xInt does not support XWeak or XInt is null then this reference will be null. |
| ~WeakReferenceHelper( ) throw( ); |
Releases this reference. |
| WeakReferenceHelper & operator=( const WeakReferenceHelper & rWeakRef ) throw( ); |
Releases this reference and takes over rWeakRef. |
| WeakReferenceHelper & operator=( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xInt ) throw( ); |
|
| sal_Bool operator==( const WeakReferenceHelper & rObj ) const throw( ); |
Returns true if both weak refs reference to the same object. |
| ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > get( ) const throw( ); |
Gets a hard reference to the object. |
| operator Reference< XInterface >( ) const throw( ); |
Gets a hard reference to the object. |
| void clear( ) throw( ); |
Releases this reference. |
Copyright © 2012, The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.


Edna Jonson I'm a paragraph. Click here to add your own text and edit me. It’s easy. Just click “Edit Text” or double click me and you can start adding your own content and make changes to the font. Feel free to drag and drop me anywhere you like on your page.  This is a great space to write long text about your company and your services. You can use this space to go into a little more detail about your company. Talk about your team and what services you provide. Tell your visitors the story of how you came up with the idea for your business and what makes you different from your competitors.  At Wix we’re passionate about making templates that allow you to build fabulous websites and it’s all thanks to the support and feedback from users like you! Keep up to date with New Releases and what’s Coming Soon in Wixellaneous in Support. Feel free to tell us what you think and give us feedback in the Wix Forum. If you’d like to benefit from a professional designer’s touch, head to the Wix Arena and connect with one of our Wix Pro designers. Or if you need more help you can simply type your questions into the Support Forum and get instant answers. To keep up to date with everything Wix, including tips and things we think are cool, just head to the Wix Blog! !
ARCHIBONG ONUK
I'm a paragraph. Click here to add your own text and edit me.


Vanderbilt Psychiatric Hospital
Dates of employment: 04/2014-Present
Providine assistance to RN staff. Process with patients and provide them with adequate care. Leading educational and therapeutic group sessions. Charting patients' daily activies.
Providine assistance to RN staff. Process with patients and provide them with adequate care. Leading educational and therapeutic group sessions. Charting patients' daily activies.
Teacher's Assistant. Helping head teacher assist the students in class with their in class assignments. Watching over students on the playground and during field trips. Lending handicapped students a helping hand.
Direct Service Professional.  Managing and giving medications.
Stocker. Unpacking and organizing stock to be displayed on sales floor.


Education
Master of Science in Computer Science University of Illinois at Urbana-Champaign
Bachelor of Science in Computer Science University of Illinois at Urbana-Champaign
Industry
Software Development Engineer Intern
Amazon AWS
Research Labs
The Zenvisage Team develops data visualization software. In addition to frontend & backend support, I work among graduate students and professors for academic research. This project is led by Prof. Aditya Parameswaran. As an example of my work, please take a look at my undergraduate thesis or the Zenvisage website.
The Entity Search Team was a team of undergrads led by Prof. Kevin C.C. Chang. We developed information retrieval software related to Named Entity Recognition and Web Search.
Industry
I served 2 years in the army as a KATUSA for the ROK-US alliance. I was dispatched to the Public Relations Office of United States Forces Korea to bridge gaps between the US and ROK army.


Prepare yourself for Battle!
Battleship
Basic Gameplay
- Two players begin the game
- Prepare for Battle
- Theres a 10 x 10 ocean grid for each players ships
- Each player secretly places their ships on their grid
- The ships are: 1 5sq aircraft carrier, 1 4sq battleship, 1 3sq submarine, 1 3sq destroyer and 1 2sq patrol boat
- The ships cant overlap
- The ships cant be diagonal
- This should be drag and drop!
- Animated coin toss to see who goes first *
- On Each Players Turn:
- The active player:
- Pick a target square on the grid that represents the other player, to aim
- Click “Fire” button, to fire
- Or press Enter, to fire *
- The current players board that represents the enemy also animates to show the hit or miss
- If a ship is sunk, the game reads outloud “You sunk my !”
- If a ship is sunk, the board now shows which ship was sunk
- If a ship is sunk, the board pops up an excerpt of the wikipedia article on that ship, using the Wikipedia API.
- The inactive player:
- Their board configuration will rotate to show their own board
- Once the active player has played, the inactive players board animates to show the hit or miss
- If a ship is sunk, the game reads outloud “The enemy sunk your !”
- Then, both players boards rotate to switch which player is active
- End of Gameplay
- Once the 5th ship of a given player is sunk, the other player is declared the winner
- The game reads outloud
If you get bored:
Other Requirements:
- Must be tested using Mocha
- Must use sass. The amount of sass is left up to the individual, except:
- Must take advantage of at least one mixin
- Must use sockets for the two-player gameplay
Eliza’s Breakdown
### Set up Player’s Grid
1. 2 players: Bob & Sue
+ First player Shows Up (Sue)
+ Second Player Shows Up (Bob)
+ Cointoss => First Player Starts (Sue)
+ Deluxe: Animated Coin toss
2. Place Ships
+ 10 x 10 grid
+ Does not have to be a grid
+ can be a box (Xpx x Xpx) with background of a grid
+ http://jqueryui.com/draggable/#snap-to
+ 5 ships
+ Drag from ship box onto the player’s grid
+ drag across cells using (Snap-to-Grid: grid = size of cells)
+ click on icon to rotate ship
+ After both players have set up their grid click done
### How objects communicate with each other (UML)
1. UML Class Diagram
2. Grid:
3. Player Grid: ship_locations


The XML data set supports an observer mechanism that allows an object or callback function to receive event notifications.
|
Notification |
Description |
|---|---|
|
onPreLoad |
The data set is about to send a request for data. If the data set depends on other data sets, this event notification will not send until they are all loaded successfully. |
|
onPostLoad |
The request for data was successful. The data is accessible. |
|
onLoadError |
An error occurred while requesting the data. |
|
onDataChanged |
The data in the data set has been modified. |
|
onPreSort |
The data in the data set is about to be sorted. |
|
onPostSort |
The data in the data set has been sorted. |
|
onCurrentRowChanged |
The data set's notion of the current row has changed. |
To receive notifications, an object must define a method for each notification it is interested in receiving, and then register itself as an observer on the data set. For example, an object interested in onDataChanged notifications must define an onDataChanged() method and then call addObserver().
var dsPhotos = new Spry.Data.XMLDataSet("/photos.php?galleryid=2000", "/gallery/photos/photo"); ... var myObserver = new Object; myObserver.onDataChanged = function(dataSet, data) { alert("onDataChanged called!"); }; dsPhotos.addObserver(myObserver);
The first argument for each notification method is the object that is sending the notification. For data set observers, this is always the dataSet object. The second argument is either undefined, or an object that depends on the type of notification.
|
Notification |
Data passed into notification |
|---|---|
|
onPreLoad |
undefined |
|
onPostLoad |
undefined |
|
onLoadError |
The Spry.Utils.loadURL.Request object that was used when making the request |
|
onDataChanged |
undefined |
|
onPreSort |
Object with the following properties: |
|
oldSortColumns: An array of columns used during the last sort. |
|
|
oldSortOrder: The sort order used during the last sort. |
|
|
newSortColumns: The array of columns about to be used for the sort. |
|
|
newSortOrder: The sort order about to be used for the sort. |
|
|
onPostSort |
Object with the following properties: |
|
oldSortColumns: An array of the columns used in the previous sort. |
|
|
oldSortOrder: The sort order used during the previous sort. |
|
|
newSortColumns: The array of columns used for the sort. |
|
|
newSortOrder: The sort order used for the sort. |
|
|
onCurrentRowChanged |
Object with the following properties: |
|
oldRowID: The ds_RowID of the last current row. |
|
|
newRowID: The ds_RowID of the current row. |
To stop an object from receiving notifications, the object must be removed from the list of observers with a call to removeObserver().
var dsPhotos = new Spry.Data.XMLDataSet("/photos.php?galleryid=2000", "/gallery/photos/photo"); ... dsPhotos.removeObserver(myObserver);
Functions can also be registered as observers. The main difference between object and function observers is that an object is only notified for the notification methods it defines, whereas a function observer is called for every type of event notification.
var dsPhotos = new Spry.Data.XMLDataSet("/photos.php?galleryid=2000", "/gallery/photos/photo"); ... function myObserverFunc(notificationType, dataSet, data) { if (notificationType == "onDataChanged") alert("onDataChanged called!"; else if (notificationType == "onPostSort") alert("onPostSort called!"; }; dsPhotos.addObserver(myObserverFunc);
A function observer is registered with the same call to addObserver.
When the function is called, the first argument to be passed into it is the notification type. This is a string that is the name of the notification. The second argument is the notifier, which in this case is the data set, and the third argument is the data for the notification.
To stop a function observer from receiving notifications, it must be removed from the list of observers with a call to removeObserver().
var dsPhotos = new Spry.Data.XMLDataSet("/photos.php?galleryid=2000", "/gallery/photos/photo"); ... dsPhotos.removeObserver(myObserverFunc);


--- title: MODIStsp v. 1.3.9 is out ! author: Lorenzo Busetto date: '2019-06-24' slug: modistsp-v-1-3-9-is-out categories: - MODIStsp - R - preprocessing - time series - Vegetation Indexes - MODIS tags: - MODIStsp - R header: caption: '' image: '' ---
A new version of MODIStsp (1.3.9) is on CRAN as of today !
This version:


This blog will tell you a little bit about classes and ids and about the best practices in using them.
11 Feb 2021
Classes and id's are two types of selectors. We define them and give them a function in CSS and then assign them to our HTML elements to make the elements more specific.
In the CSS, a class selector is a name preceded by a full stop (“.”) and an ID selector is a name preceded by a hash character (“#”)
So the CSS would look something like this -
And the HTML code would look like this -
This is the final output -
Both these do pretty much the same thing, you target an element specifically and then manipulate it to be different from other elements.
But then "why have both?", you may ask.......I will tell you.
The difference between an ID and a class is that an ID can be used to identify one element, whereas a class can be used to identify more than one. Important things to remember -
- A class name can be used by multiple elements
- Each element can have multiple classes.
- An ID on the other hand, can only be used by one element
- Each element can only have one id.
So now, what are the best practices?
I've already mentioned the most important rule: make your ids unique but assign your classes to as many elements as you want. Having said that; if you don't need them, don't use them. Avoid things like this -
We can see that this is an anchor element and it is a link. We don't need to apply a class because we can easily just add styling via its tag. Other HTML tags that we can target directly are paragraph tags and header tags. Only if you need to individually style them (for example a title) does it make sense to give them another selector.
Also, when you create classes or Ids, you should make them descriptive but keep it as short as possible. Instead of calling a class/id "top navigation bar" just use "topnav".
Hope that helped in understanding classes and id's a bit more. And stay tuned for more posts...
Have an awesome day! 😁


Rampaging weeds help to set the US landscape ablaze
Iconic landscapes of the western United States are more likely to burn if they are overrun by invasive grasses.
Invasion by non-native grasses sharply increases fire risk in a variety of ecosystems across the continental United States, from deciduous forest in the east to the deserts of the southwest.
Emily Fusco at the University of Massachusetts, Amherst, and her colleagues used government records, satellite fire data and computer models to analyse the impact of 12 species of non-native grasses on fire trends in 29 US ecological regions. The researchers then compared these patterns in invaded and uninvaded landscapes.
The results showed that fire had burned more of a habitat riddled with one of eight weed species than the same type of habitat without the invader. For example, flames had torched 2.3 times as much dry shrubland invaded by Schismus barbatus grass than dry shrubland free of this species. Of the eight fire-promoting weeds, six increased fire frequency in the ecosystems that they had invaded.
The authors suggest that the presence of invasive grasses should be considered more prominently in future land-management plans.


The code can support an unlimited number of scroll areas. See documentation online Set up nested div's for each scroll area assigning a unique ID to each. Use these ID's for the style specifications for each scroll area. The elements containing the scroll controls and/or scrollbars also need unique ID's and style specifications set up. |
Back to index


public class Server
extends java.lang.Object
Server
class is the back-end foundation for the
client-server architecture. It contains the essential features required to
represent a server. To fully utilize this class' capabilities, it is
preferable to extend the class to fine-tune the server. The data transmission
for each connected client is handled by the NetworkCommunication
class. Also, each client has its own thread for network data transmission.NetworkCommunication
,
ServerClient
| Modifier and Type | Field and Description |
|---|---|
(package private) java.util.List<ServerClient> |
clientList
A list of the connected clients.
|
private java.lang.Thread |
listeningThread
The server's own thread for listening to new connections.
|
private boolean |
running
A flag for whether the server is running or not.
|
private java.net.ServerSocket |
serverSocket
The socket of the server.
|
| Constructor and Description |
|---|
Server()
Constructs a new
Server instance. |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<ServerClient> |
getClientList()
Returns an unmodifiable list of all currently connected clients.
|
boolean |
isRunning()
Returns the connection status of the server.
|
protected void |
onClientConnected(ServerClient client)
This method is triggered automatically when the client has successfully
connected to the server.
|
protected void |
onClientDisconnected(ServerClient client)
This method is triggered automatically when the client has disconnected
from the server.
|
(package private) <T extends NetworkSerializable> |
onReceivedData(T data,
ServerClient sender)
This method is triggered automatically when the server has received data
from any client.
|
protected void |
onServerFailedToStart(int port)
This method is triggered automatically when the server has failed to
start running
startServer(int) method. |
protected void |
onServerStarted(int port)
This method is triggered automatically when the server has successfully
started running via the
startServer(int) method. |
protected void |
onServerStopped(int port)
This method is triggered automatically when the server has stopped
running via the
stopServer() method. |
private void |
resetInstance()
Used internally to reset the instance's variables.
|
(package private) void |
run()
The
run method handles the new client connections. |
<T extends NetworkSerializable> |
sendDataTo(T data,
ServerClient recipient)
Sends the specified data object to the specified client.
|
<T extends NetworkSerializable> |
sendDataToAll(T data)
Sends the specified data object to all connected clients.
|
<T extends NetworkSerializable> |
sendDataToMatch(T data,
java.util.function.Predicate<ServerClient> predicate)
Sends the specified data object to the specified clients that are
identified by the predicate.
|
void |
startServer(int port)
Attempts to start the server.
|
void |
stopServer()
Stops the server from running, which terminates all connections.
|
java.lang.String |
toString()
Returns a nicely formatted string representation of the server object
along with its connection status and number of connected clients.
|
final java.util.List<ServerClient> clientList
private java.lang.Thread listeningThread
private volatile boolean running
private java.net.ServerSocket serverSocket
public Server()
Server
instance. The constructor sets up
the shutdown hook for when the server is terminated unexpectedly by
disconnecting all clients from the server. It will terminate all server
connections and stop the listening thread.public final java.util.List<ServerClient> getClientList()
public final boolean isRunning()
protected void onClientConnected(ServerClient client)
client
- - the client that connected to the serverprotected void onClientDisconnected(ServerClient client)
client
- - the client that disconnected from the serverfinal <T extends NetworkSerializable> void onReceivedData(T data, ServerClient sender)
NetworkSerializable
interface. The data received is handled by
the interface via the NetworkSerializable.handleOnServer(Server, ServerClient)
method.T
- - the class type of the data receiveddata
- - the data object receivedsender
- - the sender of the dataNetworkSerializable
,
ServerClient
protected void onServerFailedToStart(int port)
startServer(int)
method.port
- - the attempted port of the serverprotected void onServerStarted(int port)
startServer(int)
method.port
- - the port of the server that startedprotected void onServerStopped(int port)
stopServer()
method.port
- - the port of the server that stoppedprivate final void resetInstance()
final void run()
run
method handles the new client connections. This
method should never be explicitly called as it automatically handled by
the ServerThread
class, which calls this method on a separate
thread. Incoming data will trigger the
onReceivedData(NetworkSerializable, ServerClient)
method, where
the user is able to override and handle the data as he or she wishes.ClientThread
public final <T extends NetworkSerializable> void sendDataTo(T data, ServerClient recipient) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException
T
- - the class type of the data to senddata
- - the data to send to the specified clientrecipient
- - the client who we want to send tojava.lang.IllegalArgumentException
- - thrown when data
or recipient
is
nulljava.lang.IllegalStateException
- - thrown when recipient
is not connectedpublic final <T extends NetworkSerializable> void sendDataToAll(T data) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException
T
- - the class type of the data to senddata
- - the data to send to all connected clientsjava.lang.IllegalArgumentException
- - thrown when data
is nulljava.lang.IllegalStateException
- - thrown when any supposedly connected ServerClient
instance is not connectedpublic final <T extends NetworkSerializable> void sendDataToMatch(T data, java.util.function.Predicate<ServerClient> predicate) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException
T
- - the class type of the data to senddata
- - the data object to sendpredicate
- - a predicate that defines which clients receive the packetjava.lang.IllegalArgumentException
- - thrown when data
or predicate
is
nulljava.lang.IllegalStateException
- - thrown when any supposedly connected ServerClient
instance that matches the condition in the predicate is not
connectedpublic final void startServer(int port)
onServerStarted(int)
- if the server started
successfullyonServerFailedToStart(int)
- if the server failed to start,
most likely that the port is already in useport
- - the port to run the server onpublic final void stopServer()
onServerStopped(int)
will be triggered.public java.lang.String toString()
toString
in class java.lang.Object


PageSpeed Console
About the Console
The PageSpeed Console reports various problems your installation has that can
lead to sub-optimal performance. The console graphs metrics for these
problems over time so that you can see the result of your changes
improving or degrading your performance. You can view it by enabling it and
then visiting /pagespeed_admin/console
from your server. The
console works by saving snapshots of the statistics reported by
PageSpeed and then using the Google Chart Tools API to graph those
statistics over time.
Configuring the Console
The PageSpeed Console is configured with several directives in the configuration file. See PageSpeed Installation and Configuration for details about this file. Each of these directives is explained here.
-
Statistics
must be enabled to report statistics. -
StatisticsLogging
must be enabled so that graphs of statistics over time can be drawn in the console. -
LogDir
must be set so that we have a directory to store statistic logs. -
In order to access the console, you must set a handler appropriately.
For example, to make the console only accessible from localhost:
- Apache:
ModPagespeedStatistics on ModPagespeedStatisticsLogging on ModPagespeedLogDir /var/log/pagespeed <Location /pagespeed_admin> Order allow,deny Allow from localhost Allow from <IP_ADDRESS> SetHandler pagespeed_admin </Location>
- Nginx:
pagespeed Statistics on; pagespeed StatisticsLogging on; pagespeed LogDir /var/log/pagespeed; pagespeed AdminPath /pagespeed_admin; location ~ ^/pagespeed_admin { allow <IP_ADDRESS>; deny all; }
Additionally these optional parameters may be configured:
-
StatisticsLoggingIntervalMs
may be set to indicate how often to log statistics snapshots (in milliseconds). -
StatisticsLoggingMaxFileSizeKb
may be set to indicate the maximum size for the logfile (in kilobytes).
For example, to log once a minute with a maximum log size of 1 MB:
- Apache:
ModPagespeedStatisticsLoggingIntervalMs 60000 ModPagespeedStatisticsLoggingMaxFileSizeKb 1024
- Nginx:
pagespeed StatisticsLoggingIntervalMs 60000; pagespeed StatisticsLoggingMaxFileSizeKb 1024;
Accessing the Console
The console can be accessed by browsing to
http://your.example.com/pagespeed_admin/console
. Access to
this page can be controlled using standard access directives.
Note that if you would like to access the console from machines other
than your server, you will need to allow access to
/pagespeed_admin
.
Graphed metrics
The PageSpeed console displays graphs for these metrics:- Resources not loaded because of fetch failures: Images, CSS or JavaScript could not be loaded because backend HTTP fetch failed. Remedy: You may have to reconfigure your server to allow outgoing connections or to have access to DNS.
-
Resources not rewritten because of restrictive Cache-Control headers:
Resources could not be rewritten because they had restrictive Cache-Control
headers explicitly set (for example:
Cache-Control: private
,Cache-Control: max-age=0
orCache-Control: no-transform
). Remedy: Reconfigure your server to serve these resources with public caching headers (or no Cache-Control headers at all). For example,Header set Cache-Control "max-age=600"
in Apache config. - Cache misses: Resources were not rewritten because they were not found in cache. This is expected while your cache warms up, soon after you install, however if it continues to be high, your cache is probably too small. Remedy: Increase the FileCacheSizeKb to be about 5 times as large as your website content (to store all of the original resources and various versions of rewritten resources).
-
Cache lookups that were expired:
Although these resources were found in cache, they were not rewritten
because they were older than their max-age.
Remedy: (A) Enable
LoadFromFile to tell
the server to load the files straight from disk rather than through
HTTP. (B) Reconfigure your server to serve resources with longer TTL.
For example,
Header set Cache-Control "max-age=3600"
to set one hour TTL in Apache config. - CSS files not rewritten because of parse errors: CSS files could not be rewritten because our parser found syntax errors that it could not recover from. Remedy: Fix CSS files to use proper syntax. You can use the stand-alone css_minify_main to find what part of the CSS file has parse errors. We have had some problems in the past with valid CSS3 or proprietary CSS extensions causing CSS parsing errors. If you find that your valid CSS is failing to parse, let us know on our discussion group so we can fix the parser.
- JavaScript minification failures: JavaScript files could not be minified because our parser found some syntax problem that it could not recover from. This is very uncommon. Remedy: As with CSS, fix the JavaScript files that had problems.
-
Image rewrite failures:
Image files were not rewritten for various reasons:
image_norewrites_high_resolution
: Image was too large. Currently we only rewrite images below 8 Megapixels. Remedy: Resize original images to a reasonable size.image_rewrites_dropped_decode_failure
: Image could not be parsed by our code. Remedy: Fix malformed images.image_rewrites_dropped_due_to_load
: Image was not rewritten because your system was already busy rewriting other images. This generally can happen when you first install PageSpeed while the cache warms up. Remedy: If image rewrites continue to be dropped after a day or so, you may need to increase your cache size or increase the ImageMaxRewritesAtOnce.image_rewrites_dropped_mime_type_unknown
: Image could not be rewritten because we do not recognize its MIME-type. For example, we do not parseimage/x-icon
orimage/svg+xml
. Remedy: Convert your images to a type that we understand (gif, png, jpg, webp) or perhaps just fix a broken server config that is serving images with a bogusContent-Type
header.image_rewrites_dropped_server_write_fail
: Unexpected server error while rewriting images. If you get a significant number of these write to our discussion group so we can investigate.


Dusk Priestess:
[Exchange %stoneColor% Seal Stones for Ancient Adena]
You currently possess %stoneCount% %stoneColor% Seal Stones. How many do you want to exchange for Ancient Adena? One %stoneColor% Seal Stone is worth %stoneValue% Ancient Adena.
[Enter the quantity you wish to exchange.]


#include "host.h"
#include <wait.h>
#include <stdlib.h>
#include "at90usb1287.h"
#include <avr/io.h>
#include "uart.h"
#include <core/core.h>
#include <usbspec/usb11spec.h>
Functions | |
| void | at90usb1287_roothub_probe () |
| void | at90usb1287_roothub_check () |
| void | at90usb1287_start_transfer () |
| void | hcdi_init () |
| u8 | hcdi_enqueue (usb_transfer_descriptor *td) |
| u8 | hcdi_dequeue (usb_transfer_descriptor *td) |
| void | hcdi_irq () |
Variables | |
| usb_device * | device_on_downstream |
| usb_transfer_descriptor * | td_usba |
| usb_transfer_descriptor * | td_usbb |
| usb_driver | at90usb1287_roothub |
| usb_device * | device_on_downstream |
| void at90usb1287_roothub_check | ( | ) |
This function is called periodical, to notice port changes after an hub
| void at90usb1287_roothub_probe | ( | ) |
Find and initial root hub
| void at90usb1287_start_transfer | ( | ) |
| u8 hcdi_dequeue | ( | usb_transfer_descriptor * | td | ) |
Remove an transfer descriptor from transfer queue.
| u8 hcdi_enqueue | ( | usb_transfer_descriptor * | td | ) |
hcdi_enqueue takes usb_irp and split it into several usb packeges (SETUP,IN,OUT) In the usbstack they are transported with the usb_transfer_descriptor data structure.
| void hcdi_init | ( | ) |
Intial host controller and necessary software structures.
| void hcdi_irq | ( | ) |
IRQ from host controller.
Initial value:
{ .name = "at90usb1287_roothub", .probe = at90usb1287_roothub_probe, .check = at90usb1287_roothub_check, .data = NULL, }


---
layout: post
title: Mac OSX Terminal Permissions Issues
date: '2015-10-06T16:39:00.002+01:00'
author: John Smith
tags:
- npm
- sudo
- permisssions
- chown
- homebrew
modified_time: '2015-10-06T16:39:09.352+01:00'
blogger_id: tag:blogger.com,1999:blog-31446756.post-282821029370221487
blogger_orig_url: http://www.solrevdev.com/2015/10/mac-osx-terminal-permissions-issues.html
---
So with Node Package Manager, HomeBrew, PIP and various other package managers that throw errors on my aging development Mac the following rightly or wrongly fixes most if not all of the issues.
I am posting here to save me searching every day for the syntax and answer
sudo chown -R :admin /usr/local


-
Who I am
Hi, I'm David.
I'm a Chicagoan originally from the great state of Ohio.
I'm a proud alumnus of Northwestern University (despite our historic mediocrity in atheltics) where I studied MMSS and Economics.
-
Where I'm headed
I'm embarking on a journey into software development.
In my career so far, I've really enjoyed being at intersection of business and technology, and hope to put a stake in the ground there and stay forever.
-
What I've done
I started my career at the Boston Consulting Group, learning the ways of business strategy and client service.
I then moved to ContextMedia, where I learned to be an operator in the fast-growing healthcare technology space.


|
|
HINSTANCE | instance |
| |
|
WGLCREATECONTEXT_T | CreateContext |
| |
|
WGLDELETECONTEXT_T | DeleteContext |
| |
|
WGLGETPROCADDRESS_T | GetProcAddress |
| |
|
WGLGETCURRENTDC_T | GetCurrentDC |
| |
|
WGLMAKECURRENT_T | MakeCurrent |
| |
|
WGLSHARELISTS_T | ShareLists |
| |
|
GLFWbool | extensionsLoaded |
| |
|
PFNWGLSWAPINTERVALEXTPROC | SwapIntervalEXT |
| |
|
PFNWGLGETPIXELFORMATATTRIBIVARBPROC | GetPixelFormatAttribivARB |
| |
|
PFNWGLGETEXTENSIONSSTRINGEXTPROC | GetExtensionsStringEXT |
| |
|
PFNWGLGETEXTENSIONSSTRINGARBPROC | GetExtensionsStringARB |
| |
|
PFNWGLCREATECONTEXTATTRIBSARBPROC | CreateContextAttribsARB |
| |
|
GLFWbool | EXT_swap_control |
| |
|
GLFWbool | ARB_multisample |
| |
|
GLFWbool | ARB_framebuffer_sRGB |
| |
|
GLFWbool | EXT_framebuffer_sRGB |
| |
|
GLFWbool | ARB_pixel_format |
| |
|
GLFWbool | ARB_create_context |
| |
|
GLFWbool | ARB_create_context_profile |
| |
|
GLFWbool | EXT_create_context_es2_profile |
| |
|
GLFWbool | ARB_create_context_robustness |
| |
|
GLFWbool | ARB_context_flush_control |
| |
The documentation for this struct was generated from the following file:


This project is funded by NSF HDR Awards 1939945, 1940059, 1940062, and 1940330
CyVerse is supported by the National Science Foundation under Grant No. DBI-0735191, DBI-1265383, DBI-1743442
Code licenced under BSD 3 clause. Documentation licensed under Creative Commons CC-BY-4.0.


Stylus-UI
A minimalist Stylus boilerplate
Get StartedWhy use Stylus-UI
Stylus-UI provides a minimal setup of styles for a fast and clean starting point. Specially designed for better performance and higher productivity with fewer properties to reset resulting in cleaner code. No framework, just a solid starting point using some conventions & functional classes we've established over the years at Clock.
Getting Started
Stylus-UI provides minimal styles for you to get started with your project and so to ensure that you are never fighting the boilerplate trying to customise it or override styles, we recommend that you download the .zip file and place the extracted files in your project.
For compilation we've included a gulpfile.js
which compiles
assets/styles/stylus-ui.styl
by default and outputs the compiled assets to public/assets/main.css
and public/assets/main.min.css
.
You should add a CSS Reset in the header of your project (normalize is a good choice, see the example below), then
add the Stylus-UI compiled stylesheet after the CSS Reset. Once downloaded and placed within your project, please
follow the instructions below.
Install dependencies
If you have an existing package.json
in your project, you should install the dev-dependencies
listed below. If not, you can use the package.json
included with Stylus-UI and simply run npm i
to install all required dependencies.
// Ensure that Gulp is installed globally
$ npm install -g gulp
// Install the Stylus-UI dependencies & add to package.json
npm i --save-dev gulp-stylus gulp-sourcemaps gulp-autoprefixer gulp-cssnano gulp-plumber gulp-clean gulp-watch gulp-rename gulp-size gulp-notify gulp-exec
Usage
Add these tags in the head of your layout.

<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic">

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.css">

<link rel="stylesheet" href="/public/styles/main.min.css">

Mixins
Stylus-UI uses Stylus-Mixins to make working with
certain CSS elements easier.
The mixins you're most likely to use the most are rem()
and the media query mixins.
Instead of working with px
values, simply pass the pixel value to the rem mixin. We set the $base--font-size
in settings.styl
and apply it the the html
element in
foundations/_base.styl
.
By using rem through-out your project, you ensure that property values are set relative to the base font size.
.navigation-item
font-size rem(12)
Stylus-UI takes a mobile first approach to responsive design, so should you need to adjust styles for tablet or
desktop, you will need to use The Media Query Grid.
Fortunately we've made this considerably easier for you. The settings for media queries and breakpoints reside in
settings.styl
, and the grid is constructed in _grid.styl
.
We highly encourage you to modify these files to suit your own project.
.navigation-item
color $color--primary
font-size rem(12)
// adjust the font size for tablet up
+width-min($mq--tablet)
font-size rem(14)
// adjust the font size for desktop up
+width-min($mq--desktop)
font-size rem(16)
// adjust the font color for tablet only using the range mixin
+width-range($mq--tablet, $mq--desktop -1)
color $color--secondary
The Grid
The Grid is a fluid system with a max width of 1280px
that shrinks with the browser/device at
smaller sizes.
The max width can be changed by adjusting the $base--max-width
variable in foundations/_settings.styl
and all columns will resize accordingly.
The grid utilises Flexbox and takes a mobile-first approach. Simply add columns you want in a row, and they'll evenly take up
the available space. If you want three columns, add three columns, if you want five columns, add five
columns.
There is no restriction on number of columns, but we advise you to use your common sense.
We follow BEM conventions for column modifiers as shown below.
Please note, that since the grid takes a mobile first approach, each breakpoint inherits from the previous breakpoint. For example, if you modify the grid size at a specific breakpoint, all larger breakpoints will inherit this modification. So if you modify the grid for tablet, think of it as modifying the grid for tablet and up.
// Mobile will span 100%. Tablet and desktop (and any larger breakpoints) will span 50%.
column column--50-tablet
If you intend to target a specific breakpoint and modify its grid only, simply append -only
to your
grid modifier. For example, if we wanted all sections to span 100% of the screen, but only tablet should span
50%, our classes would look like column column--50-tablet-only
. Now mobile and desktop would span
100%, but tablet would only span 50%.
Nested Grids
Media Query Grid
Typography
CSS3 introduces a few new units, including the rem
unit, which stands for "root em". The
rem
unit is relative to the font-size of the root element
. That means that
we can define a single font size on the root element, and define all rem
units to be a percentage of
that. The typography has font-size
defined in 1.6rem (16px) and line-height
in 1.6
(24px). stylus-ui uses the font-family
Roboto,
created by Christian Robertson, and provided by Google.
Heading

5.0rem (50px)
Heading

4.2rem (42px)
Heading

3.6rem (36px)
Heading

3.0rem (30px)
Heading

2.4rem (24px)
Heading

1.5rem (15px)

The base type is 16px over 1.6 line height (24px)

Anchor
Emphasis
Small
Strong
Underline

Heading

Heading

Heading

Heading

Heading

Heading

Buttons
The Button, an essential part of any user experience. Buttons come in three basic styles in stylus-ui: The
<button>
element has flat color by default, whereas .button--outline
has a simple
outline around, and .button--clear
is entirely clear.

Anchor button
<button>Button element</button>
<input type="submit" value="submit input">
<input type="button" value="button input">

Anchor button
<button class="button--outline">Button element</button>
<input class="button--outline" type="submit" value="submit input">
<input class="button--outline" type="button" value="button input">
Forms
The Form has never been exactly fun, and it can be downright painful on a mobile device with its on-screen keyboard. stylus-ui help to make this much easier with design focused on the user experience.
<form>
<fieldset>
Name
<input type="text" placeholder="Niall O'Brien" id="nameField">
Comment
<textarea placeholder="Hi there …" id="commentField"></textarea>

<input type="checkbox" id="confirmField">
Send a copy to yourself

<input type="submit" value="Send">
</fieldset>
</form>

Lists
The List is a very versatile and common way to display items. stylus-ui has three types of lists: The unordered
list use

element will be marked with a outline circles, the ordered list use

element and your items will be marked with numbers, the description list use

element and
your items will not be marking, only spacings.
- Unordered lists have basic styles
-
They use the circle list style
- Nested lists styled to feel right
- Can nest either type of list into the other
- Just more list items
- Ordered lists also have basic styles
-
They use the decimal list style
- Ordered and unordered can be nested
- Can nest either type of list into the other
- Last list item just for the fun

Unordered list item 1

Unordered list item 2

Ordered list item 1

Ordered list item 2

Description list item 1

Description list item 1.1

Code
Code styling is kept basic – just wrap anything in a
and it will appear like
this
. For blocks of code, wrap a
with a

.
.navigation-item
color #9b4dca

.navigation-item
color #9b4dca

Blockquotes
The Blockquote represents a section that is quoted from another source.
Stylus-UI is pretty cool.

Stylus-UI is pretty cool.

Tables
The Table element represents data in two dimensions or more. We encourage the use of proper formatting with

and

to create a

. The code
becomes
cleaner without disturbing understanding.
| Name | Age | Height | Location |
|---|---|---|---|
| Stephen Curry | 27 | 1,91 | Akron, OH |
| Klay Thompson | 25 | 2,01 | Los Angeles, CA |

Name
Age
Height
Location

Stephen Curry
27
1,91
Akron, OH

Klay Thompson
25
2,01
Los Angeles, CA

Utilities
Stylus-UI has some functional classes to improve the prototype productivity.
Typography
.font-family-inherit .font-size-inherit .text-decoration-none .bold .regular .italic .caps .left-align .center .right-align .justify .nowrap .break-word .line-height-default .line-height-1 .line-height-2 .line-height-3 .line-height-4 .list-style-none .underline .truncate .list-reset
Layout
.inline .block .inline-block .table .table-cell .overflow-hidden .overflow-scroll .overflow-auto .clearfix .left .right .fit .max-width-1 .max-width-2 .max-width-3 .max-width-4 .border-box
Align
.align-baseline .align-top .align-middle .align-bottom
Margin & Padding
m = margin, p = padding. t = top, r = right, b = bottom, l = left, x = horizontal, y = vertical. 0 - 4 = smallest - largest.
.m0 .mt0 .mr0 .mb0 .ml0 .mx0 .my0 .m1 .mt1 .mr1 .mb1 .ml1 .my1 .mx1 etc. etc. .my4 .mx4
.p0 .pt0 .pr0 .pb0 .pl0 .px0 .py0 .p1 .pt1 .pr1 .pb1 .pl1 .py1 .px1 etc. etc. .py4 .px4
Borders
.border .border-top .border-right .border-bottom .border-left .border-none .rounded .circle .rounded-top .rounded-right .rounded-bottom .rounded-left .not-rounded
Position
.relative .absolute .fixed .top-0 .right-0 .bottom-0 .left-0 .z1 .z2 .z3 .z4
Hide
Mobile first, breakpoints assume screen-size and up much like the grid. Eg. .hide-tablet = .hide-tablet-and-up.
.hide .hide-mobile-only .hide-tablet .hide-tablet-only .hide-desktop .display-none
Colors
For background colors, prefix with 'bg-', eg. .bg-red.
For border colors, prefix with 'border-', eg. .border-red. Ensure you add .border first.
.black .gray .silver .white .aqua .blue .navy .teal .green .olive .lime .yellow .orange .red .fuchsia .purple .maroon .color-inherit .muted
Darken / Lighten
.bg-darken-1 .bg-darken-2 .bg-darken-3 .bg-darken-4 .bg-lighten-1 .bg-lighten-2 .bg-lighten-3 .bg-lighten-4
Background Images
.bg-cover .bg-contain .bg-center .bg-top .bg-right .bg-bottom .bg-left .bg-no-repeat .bg-repeat-x .bg-repeat-y
Browser Support
While not designed for old browsers, stylus-ui has support for some old versions, but we recommend using the latest versions of their browsers.
- Chrome latest
- Firefox latest
- IE latest
- Opera latest
- Safari latest


You can use the Chat Room tool for real-time, unstructured conversations among site participants who are logged into the site at the same time.
Instructors can easily create an "Online Office Hours" chat room for student questions and answers. Dispersed collaboration groups can use Chat as a space to have conversations across distances or catch up with conversations that they may have missed.
Multiple rooms: Site leaders can use
Options
to add rooms to accommodate more than one
discussion. Participants can click Change Room
to access
other discussions.
Default room: Site leaders can use
Options
to specify which room is visible by default to
participants accessing the tool.
Display: Changes you make in Options
also
apply to how the Chat Room features appear to site participants.
Clear history: Permanently delete all messages from a chat room.
For help documentation about the Chat Room tool, see Chat Room.


This document describes how to download data from the DataONE Federation of Member Nodes. Before data can be downloaded from DataONE it is necessary to find the identifiers that are associated with the data. The DataONE search facility is used to find these identifiers that are used to download any metadata file or dataset.
Note: In this R package documentation, dataone refers to the R package and DataONE refers to the Federation of Member Nodes and the computer infrastructure comprising these data repositories.
The dataone::query method is used to send data searches from
R to the DataONE search facility, and is shown in the examples in the
next section. A more complete description of using the query method to
search DataONE is available in the searching-dataone vignette
(vignette("searching-dataone"
)).
The DataONE Coordinating Node (CN) contains metadata about datasets from all Member Nodes (MN) in the network. Sending a query to the CN may find matching datasets located on potentially any Member Node in the network. The search may be limited to the data holdings of a particular MN by either specifying the “datasource” search term in the query sent to the CN, or by just sending the query to a specific MN.
The following query shows how to query the entire DataONE network and locate and download data from any MN that has the desired data:
library(dataone)
<- CNode("PROD")
cn # Ask for the id, title and abstract
<- list(q="abstract:kelp", fq="attribute:biomass", fq="id:doi*",
queryParams fq="formatType:METADATA", fl="id,title,abstract")
<- query(cn, solrQuery=queryParams, as="data.frame", parse=FALSE)
result 1,c("id", "title")] result[
The result object, a data.frame, can be inspected to determine which matching dataset to download, as multiple matching dataset identifiers may be returned from the query. Each object in DataONE is uniquely identified by a Persistent Identifier (PID) that can be used to refer to the object and perform operations on it, such as downloading it to a local machine.
(As an alternative to retrieving dataset information from a query, it is of course possible to use the DataONE web browser search interface located at https://search.dataone.org to find the identifiers of data to download.)
In the R example, after inspecting the result data, we will use the first matching dataset:
<- result[1,'id'] pid
Now that the PID is determined, the MN that holds the data must be located. For this, the resolve method is used to find an MN that holds the data and that is currently available:
<- resolve(cn, pid)
locations <- locations$data[2, "nodeIdentifier"]
mnId <- getMNode(cn, mnId) mn
Multiple MNs may hold the data, depending on the DataONE replication policy that is in effect for the dataset and which member nodes are currently available. (DataONE copies or ‘replicates’ datasets from one MN to other MNs, depending on what was requested by the user when a dataset was first uploaded to DataONE). In this example the second location from the resolve list will be downloaded. Now the call can be made that downloads the object itself:
<- getObject(mn, pid) obj
If the search is limited to a particular MN, in this case the Knowledge Network for Biocomplexity (KNB), then the search and download are performed with the statements:
# Query the data holdings on a member node
<- CNode("PROD")
cn <- getMNode(cn, "urn:node:KNB")
mn <- list(q="abstract:habitat", fl="id,title,abstract")
queryParams <- query(mn, queryParams, as="data.frame", parse=FALSE)
result # Choose the first matchin PID
<- result[1,'id']
pid <- getObject(mn, pid) obj
This approach uses the getDataObject method from the R package. The getDataObject method determines which member node in DataONE holds the data item and downloads it into a datapack::DataObject. The DataObject R object is a wrapper that contains the data bytes for the DataONE dataset requested as well as the DataONE system metadata for the object.
<- D1Client("PROD", "urn:node:KNB")
d1c # Ask for the id, title and abstract
<- list(q="abstract:\"biogenic hydrocarbon\"", fq="id:doi*",
queryParams fq="formatType:METADATA", fl="id,title")
<- query(d1c@mn, solrQuery=queryParams, as="data.frame", parse=FALSE)
result <- result[1,'id']
pid <- getDataObject(d1c, pid)
dataObj <- getData(dataObj)
bytes <- rawToChar(bytes) metadataXML
The following functions are available to extract information from the DataObject:
For example, to extract the data byes from the DataObject:
<- getData(dataObj) dataBytes
In addition to the DataObject functions, the complete set of information from the DataONE system metadata is available from the object’s slot:
str(dataObj@sysmeta)
A DataONE data package is a collection of datasets that are documented by a metadata object that is also included in the package. For example, a data package might contain all source data, scripts and analysis products for an experiment or study. For example, the data package available from the Knowledge Network for Biocomplexity that is available https://knb.ecoinformatics.org/#view/corina_logan.20.3 that contains data for an experiment related to Western scrub-jays food caching behaviors.
Note: to use the getPackage method, the id parameter must be the package identifier associated with the ORE package description. If the pid of the metadata object or science data object is known, then the package identifier can be discovered using a query such as:
<- CNode()
cn <- getMNode(cn, "urn:node:KNB")
mn <- list(q="id:Blandy.77.1", fl="resourceMap")
queryParamList <- query(cn, solrQuery=queryParamList, as="data.frame")
result <- result[1,1] packagePid
Once the package identifier is determined, the entire data package can be downloaded using the getPackage method:
<- CNode()
cn <- getMNode(cn, "urn:node:KNB")
mn <- getPackage(mn, id=packagePid) bagitFileName
Care must be taken, however, as these commands download the entire package.
The package is downloaded to a single file that is structured according to the Bagit packaging guidelines. The getPackage method returns the name this file that is created in a temporary directory.
Because the getPackage method downloads the entire collection of files for a data package, the downloaded Bagit file can be quiet large and may take a significant amount of time to download, depending on the package contents.
Technical information about DataONE data package design and contents is available at DataONE data packages


Action required to load native assemblies
To deploy an application that uses spatial data types to a machine that does not have 'System CLR Types for SQL Server' installed you also need to deploy the native assembly SqlServerSpatial140.dll. Both x86 (32 bit) and x64 (64 bit) versions of this assembly have been added to your project under the SqlServerTypes\x86 and SqlServerTypes\x64 subdirectories. The native assembly msvcr120.dll is also included in case the C++ runtime is not installed.
You need to add code to load the correct one of these assemblies at runtime (depending on the current architecture).
ASP.NET Web Sites
For ASP.NET Web Sites, add the following block of code to the code behind file of the Web Form where you have added Report Viewer Control:
Default.aspx.cs: public partial class _Default : System.Web.UI.Page { static bool _isSqlTypesLoaded = false; public _Default() { if (!_isSqlTypesLoaded) { SqlServerTypes.Utilities.LoadNativeAssemblies(Server.MapPath("~")); _isSqlTypesLoaded = true; } } }
ASP.NET Web Applications
For ASP.NET Web Applications, add the following line of code to the Application_Start method in Global.asax.cs:
SqlServerTypes.Utilities.LoadNativeAssemblies(Server.MapPath("~/bin"));
Desktop Applications
For desktop applications, add the following line of code to run before any spatial operations are performed:
SqlServerTypes.Utilities.LoadNativeAssemblies(AppDomain.CurrentDomain.BaseDirectory);


Sign up
Customer
Service Man
Sign in with
social network
Log in with facebook
Log in with Twitter
Log in with Google+
OR


TODO: It is advised to prefix all component selectors, when creating the app component add a prefix, then update this component to match.
Loading application...


These are the code samples for The Book of OpenLayer3. Feel free to download the source code and contribute to this repository:
Demonstrates the basics on how to work with properties on ol.Object instances and register listener functions.
ol.Object