In this project, you'll build your first neural network and use it to predict daily bike rental ridership. We've provided some of the code, but left the implementation of the neural network up to you (for the most part). After you've submitted this project, feel free to explore the data and the model more.
%matplotlib inline
%config InlineBackend.figure_format = 'retina'
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
A critical step in working with neural networks is preparing the data correctly. Variables on different scales make it difficult for the network to efficiently learn the correct weights. Below, we've written the code to load and prepare the data. You'll learn more about this soon!
data_path = 'Bike-Sharing-Dataset/hour.csv'
rides = pd.read_csv(data_path)
rides.head()
This dataset has the number of riders for each hour of each day from January 1 2011 to December 31 2012. The number of riders is split between casual and registered, summed up in the cnt
column. You can see the first few rows of the data above.
Below is a plot showing the number of bike riders over the first 10 days or so in the data set. (Some days don't have exactly 24 entries in the data set, so it's not exactly 10 days.) You can see the hourly rentals here. This data is pretty complicated! The weekends have lower over all ridership and there are spikes when people are biking to and from work during the week. Looking at the data above, we also have information about temperature, humidity, and windspeed, all of these likely affecting the number of riders. You'll be trying to capture all this with your model.
rides[:24*10].plot(x='dteday', y='cnt')
Here we have some categorical variables like season, weather, month. To include these in our model, we'll need to make binary dummy variables. This is simple to do with Pandas thanks to get_dummies()
.
dummy_fields = ['season', 'weathersit', 'mnth', 'hr', 'weekday']
for each in dummy_fields:
dummies = pd.get_dummies(rides[each], prefix=each, drop_first=False)
rides = pd.concat([rides, dummies], axis=1)
fields_to_drop = ['instant', 'dteday', 'season', 'weathersit',
'weekday', 'atemp', 'mnth', 'workingday', 'hr']
data = rides.drop(fields_to_drop, axis=1)
data.head()
To make training the network easier, we'll standardize each of the continuous variables. That is, we'll shift and scale the variables such that they have zero mean and a standard deviation of 1.
The scaling factors are saved so we can go backwards when we use the network for predictions.
quant_features = ['casual', 'registered', 'cnt', 'temp', 'hum', 'windspeed']
# Store scalings in a dictionary so we can convert back later
scaled_features = {}
for each in quant_features:
mean, std = data[each].mean(), data[each].std()
scaled_features[each] = [mean, std]
data.loc[:, each] = (data[each] - mean)/std
We'll save the data for the last approximately 21 days to use as a test set after we've trained the network. We'll use this set to make predictions and compare them with the actual number of riders.
# Save data for approximately the last 21 days
test_data = data[-21*24:]
# Now remove the test data from the data set
data = data[:-21*24]
# Separate the data into features and targets
target_fields = ['cnt', 'casual', 'registered']
features, targets = data.drop(target_fields, axis=1), data[target_fields]
test_features, test_targets = test_data.drop(target_fields, axis=1), test_data[target_fields]
We'll split the data into two sets, one for training and one for validating as the network is being trained. Since this is time series data, we'll train on historical data, then try to predict on future data (the validation set).
# Hold out the last 60 days or so of the remaining data as a validation set
train_features, train_targets = features[:-60*24], targets[:-60*24]
val_features, val_targets = features[-60*24:], targets[-60*24:]
Below you'll build your network. We've built out the structure and the backwards pass. You'll implement the forward pass through the network. You'll also set the hyperparameters: the learning rate, the number of hidden units, and the number of training passes.
The network has two layers, a hidden layer and an output layer. The hidden layer will use the sigmoid function for activations. The output layer has only one node and is used for the regression, the output of the node is the same as the input of the node. That is, the activation function is $f(x)=x$. A function that takes the input signal and generates an output signal, but takes into account the threshold, is called an activation function. We work through each layer of our network calculating the outputs for each neuron. All of the outputs from one layer become inputs to the neurons on the next layer. This process is called forward propagation.
We use the weights to propagate signals forward from the input to the output layers in a neural network. We use the weights to also propagate error backwards from the output back into the network to update our weights. This is called backpropagation.
Hint: You'll need the derivative of the output activation function ($f(x) = x$) for the backpropagation implementation. If you aren't familiar with calculus, this function is equivalent to the equation $y = x$. What is the slope of that equation? That is the derivative of $f(x)$.
Below, you have these tasks:
self.activation_function
in __init__
to your sigmoid function.train
method.train
method, including calculating the output error.run
method.class NeuralNetwork(object):
def __init__(self, input_nodes, hidden_nodes, output_nodes, learning_rate):
# Set number of nodes in input, hidden and output layers.
self.input_nodes = input_nodes
self.hidden_nodes = hidden_nodes
self.output_nodes = output_nodes
# Initialize weights
self.weights_input_to_hidden = np.random.normal(0.0, self.input_nodes**-0.5,
(self.input_nodes, self.hidden_nodes))
self.weights_hidden_to_output = np.random.normal(0.0, self.hidden_nodes**-0.5,
(self.hidden_nodes, self.output_nodes))
self.lr = learning_rate
#### Set self.activation_function to your implemented sigmoid function ####
#
# Note: in Python, you can define a function with a lambda expression,
# as shown below.
self.activation_function = lambda x : 1./(1. + np.exp(-x)) # Replace 0 with your sigmoid calculation.
### If the lambda code above is not something you're familiar with,
# You can uncomment out the following three lines and put your
# implementation there instead.
#
#def sigmoid(x):
# return 0 # Replace 0 with your sigmoid calculation here
#self.activation_function = sigmoid
def train(self, features, targets):
''' Train the network on batch of features and targets.
Arguments
---------
features: 2D array, each row is one data record, each column is a feature
targets: 1D array of target values
'''
n_records = features.shape[0]
delta_weights_i_h = np.zeros(self.weights_input_to_hidden.shape)
delta_weights_h_o = np.zeros(self.weights_hidden_to_output.shape)
for X, y in zip(features, targets):
#### Implement the forward pass here ####
### Forward pass ###
# Hidden layer - Replace these values with your calculations.
x = np.expand_dims(X, axis=0)
hidden_inputs = np.matmul(x, self.weights_input_to_hidden) # signals into hidden layer
hidden_outputs = self.activation_function(hidden_inputs) # signals from hidden layer
# Output layer - Replace these values with your calculations.
final_inputs = np.matmul(hidden_outputs, self.weights_hidden_to_output) # signals into final output layer
final_outputs = final_inputs # signals from final output layer
#### Implement the backward pass here ####
### Backward pass ###
# Output error - Replace this value with your calculations.
error = y - final_outputs # Output layer error is the difference between desired target and actual output.
# Calculate the hidden layer's contribution to the error
dh = np.reshape(hidden_outputs * (1 - hidden_outputs),
self.weights_hidden_to_output.shape)
hidden_error = error * dh * self.weights_hidden_to_output
# Backpropagated error terms - Replace these values with your calculations.
output_error_term = error
hidden_error_term = hidden_error
# Weight step (input to hidden)
delta_weights_i_h += x.T * hidden_error_term.T
# Weight step (hidden to output)
delta_weights_h_o += output_error_term * np.reshape(hidden_outputs,
self.weights_hidden_to_output.shape)
# Update the weights - Replace these values with your calculations.
self.weights_hidden_to_output += self.lr * delta_weights_h_o/n_records # update hidden-to-output weights with gradient descent step
self.weights_input_to_hidden += self.lr * delta_weights_i_h/n_records # update input-to-hidden weights with gradient descent step
def run(self, features):
''' Run a forward pass through the network with input features
Arguments
---------
features: 1D array of feature values
'''
#### Implement the forward pass here ####
# Hidden layer - replace these values with the appropriate calculations.
hidden_inputs = np.matmul(features, self.weights_input_to_hidden) # signals into hidden layer
hidden_outputs = self.activation_function(hidden_inputs) # signals from hidden layer
# Output layer - Replace these values with the appropriate calculations.
final_inputs = np.matmul(hidden_outputs, self.weights_hidden_to_output) # signals into final output layer
final_outputs = final_inputs # signals from final output layer
return final_outputs
def MSE(y, Y):
return np.mean((y-Y)**2)
Run these unit tests to check the correctness of your network implementation. This will help you be sure your network was implemented correctly befor you starting trying to train it. These tests must all be successful to pass the project.
import unittest
inputs = np.array([[0.5, -0.2, 0.1]])
targets = np.array([[0.4]])
test_w_i_h = np.array([[0.1, -0.2],
[0.4, 0.5],
[-0.3, 0.2]])
test_w_h_o = np.array([[0.3],
[-0.1]])
class TestMethods(unittest.TestCase):
##########
# Unit tests for data loading
##########
def test_data_path(self):
# Test that file path to dataset has been unaltered
self.assertTrue(data_path.lower() == 'bike-sharing-dataset/hour.csv')
def test_data_loaded(self):
# Test that data frame loaded
self.assertTrue(isinstance(rides, pd.DataFrame))
##########
# Unit tests for network functionality
##########
def test_activation(self):
network = NeuralNetwork(3, 2, 1, 0.5)
# Test that the activation function is a sigmoid
self.assertTrue(np.all(network.activation_function(0.5) == 1/(1+np.exp(-0.5))))
def test_train(self):
# Test that weights are updated correctly on training
network = NeuralNetwork(3, 2, 1, 0.5)
network.weights_input_to_hidden = test_w_i_h.copy()
network.weights_hidden_to_output = test_w_h_o.copy()
network.train(inputs, targets)
self.assertTrue(np.allclose(network.weights_hidden_to_output,
np.array([[ 0.37275328],
[-0.03172939]])))
self.assertTrue(np.allclose(network.weights_input_to_hidden,
np.array([[ 0.10562014, -0.20185996],
[0.39775194, 0.50074398],
[-0.29887597, 0.19962801]])))
def test_run(self):
# Test correctness of run method
network = NeuralNetwork(3, 2, 1, 0.5)
network.weights_input_to_hidden = test_w_i_h.copy()
network.weights_hidden_to_output = test_w_h_o.copy()
self.assertTrue(np.allclose(network.run(inputs), 0.09998924))
suite = unittest.TestLoader().loadTestsFromModule(TestMethods())
unittest.TextTestRunner().run(suite)
Here you'll set the hyperparameters for the network. The strategy here is to find hyperparameters such that the error on the training set is low, but you're not overfitting to the data. If you train the network too long or have too many hidden nodes, it can become overly specific to the training set and will fail to generalize to the validation set. That is, the loss on the validation set will start increasing as the training set loss drops.
You'll also be using a method know as Stochastic Gradient Descent (SGD) to train the network. The idea is that for each training pass, you grab a random sample of the data instead of using the whole data set. You use many more training passes than with normal gradient descent, but each pass is much faster. This ends up training the network more efficiently. You'll learn more about SGD later.
This is the number of batches of samples from the training data we'll use to train the network. The more iterations you use, the better the model will fit the data. However, if you use too many iterations, then the model with not generalize well to other data, this is called overfitting. You want to find a number here where the network has a low training loss, and the validation loss is at a minimum. As you start overfitting, you'll see the training loss continue to decrease while the validation loss starts to increase.
This scales the size of weight updates. If this is too big, the weights tend to explode and the network fails to fit the data. A good choice to start at is 0.1. If the network has problems fitting the data, try reducing the learning rate. Note that the lower the learning rate, the smaller the steps are in the weight updates and the longer it takes for the neural network to converge.
The more hidden nodes you have, the more accurate predictions the model will make. Try a few different numbers and see how it affects the performance. You can look at the losses dictionary for a metric of the network performance. If the number of hidden units is too low, then the model won't have enough space to learn and if it is too high there are too many options for the direction that the learning can take. The trick here is to find the right balance in number of hidden units you choose.
import sys
### Set the hyperparameters here ###
iterations = 5000
learning_rate = 1.0
hidden_nodes = 10
output_nodes = 1
N_i = train_features.shape[1]
network = NeuralNetwork(N_i, hidden_nodes, output_nodes, learning_rate)
losses = {'train':[], 'validation':[]}
for ii in range(iterations):
# Go through a random batch of 128 records from the training data set
batch = np.random.choice(train_features.index, size=128)
X, y = train_features.iloc[batch].values, train_targets.iloc[batch]['cnt']
network.train(X, y)
# Printing out the training progress
train_loss = MSE(network.run(train_features).T, train_targets['cnt'].values)
val_loss = MSE(network.run(val_features).T, val_targets['cnt'].values)
sys.stdout.write("\rProgress: {:2.1f}".format(100 * ii/float(iterations)) \
+ "% ... Training loss: " + str(train_loss)[:5] \
+ " ... Validation loss: " + str(val_loss)[:5])
sys.stdout.flush()
losses['train'].append(train_loss)
losses['validation'].append(val_loss)
plt.plot(np.log(losses['train']), label='Training loss')
plt.plot(np.log(losses['validation']), label='Validation loss')
plt.legend()
_ = plt.ylim()
Here, use the test data to view how well your network is modeling the data. If something is completely wrong here, make sure each step in your network is implemented correctly.
fig, ax = plt.subplots(figsize=(8,4))
mean, std = scaled_features['cnt']
predictions = network.run(test_features).T*std + mean
ax.plot(predictions[0], label='Prediction')
ax.plot((test_targets['cnt']*std + mean).values, label='Data')
ax.set_xlim(right=len(predictions))
ax.legend()
dates = pd.to_datetime(rides.iloc[test_data.index]['dteday'])
dates = dates.apply(lambda d: d.strftime('%b %d'))
ax.set_xticks(np.arange(len(dates))[12::24])
_ = ax.set_xticklabels(dates[12::24], rotation=45)
Answer these questions about your results. How well does the model predict the data? Where does it fail? Why does it fail where it does?
Note: You can edit the text in this cell by double clicking on it. When you want to render the text, press control + enter


SC2001: See if you can use ${variable//search/replace} instead.
string="stirng" ; echo "$string" | sed -e "s/ir/ri/"
string="stirng" ; echo "${string//ir/ri}"
Let's assume somewhere earlier in your code you have put data into a variable (Ex: $string). Now you want to do a search and replace inside the contents of $string and echo the contents out. You could pass this to sed as done in the example above, but for simple substitutions, parameter expansion can do it with less overhead.
Occasionally a more complex sed substitution is required. For example, getting the last character of a string.
string="stirng" ; echo "$string" | sed -e "s/^.*\(.\)$/\1/"
This is a bit simple for the example and there are alternative ways of doing this in the shell, but this SC2001 flags on several of my crazy complex sed commands which are beyond the scope of this example. Utilizing some of the more complex capabilities of sed is required occasionally and it is safe to ignore SC2001.


Hydrogen
Notebook
CV
Archives
article
1
beer
1
bootstrap
1
g-type
1
homebrew
1
html
1
pandas
1
pelican
1
planets
1
post
1
python
2
recipe
1
review
1
sample
2
stars
1
test
2
2019
Another Test Article
Beer Recipe 1
Getting Started With Pelican
2018
My First Review
2002
Sample Bootstrap Post
2001
Alpha Centauri
2000
HTML5 Element Test


SHINE A film review by Michael Redman Copyright 1997 Michael Redman
*** (out of ****)
An Australian child prodigy, bullied by his father to succeed, is on his way to world fame by virtue of his remarkable skill at the piano. He wins contests, impresses the right people and teachers stand in line to work with him. Then it all falls apart amidst sweat, insanity and Rachmaninoff's "Piano Concerto No. 3".
Based on the true story of David Helfgott life, the film has earned numerous awards (Best Actor from New York Film Critics Association, Best Picture from others). It is a powerful portrayal of madness but there is also a certain "emptiness" to it that prevents the film from reaching inside the audience with the intensity that the tale begs for.
Helfgott's journey from childhood through his breakdown to a comeback in his forties is one of triumph over mental illness, however the viewer's emotional involvement often remains detached. And that's too bad. Whatever it is that just doesn't "click" stands in the way of this fine movie being a magnificent one.
Geoffrey Rush who portrays the musician as an adult is wild and right on target as the rambling fast-talking genius-in-left-field. His inspired take on the deranged rivals Dustin Hoffman's Rainman. You'll be unable to take your eyes off him while he is eating up the screen.
One of the problems is that Helfgott condition is never very clear. We see him as a beaten child dominated by his monster father but driven to excel at the keyboard. We watch as he gains more and more skill, learning to use the piano as a means of self-expression. All along, his eye is on his father's Holy Grail: performing the seemingly un-playable "Rach 3".
After masterfully performing the piece, he collapses on stage. The next thing we know, he's institutionalized: a shattered man. Slowly coming back to life, during the next few years the pianist begins to regain his sanity. What happened? It's never very clear and that missing piece of the jigsaw puzzle leaves the picture incomplete.
There are some wonderful scenes between Rush and Helfgott savior/lover/astrologer (Lynn Redgrave) and some truly frightening ones featuring the boy and his father. Based on the reviews and awards, perhaps others see something that I don't, but I couldn't help wanting more.
[This appeared in The "Bloomington Voice", Bloomington, Indiana, 2/27/97. Michael Redman can be reached at<EMAIL_ADDRESS>]
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


{% extends "mails/messages/participant_base.html" %} {% load i18n %} {% block message %}{% blocktrans context 'email' %}
You have been added to team "{{ team_name }}" for the activity "{{ title }}" as a participant.
Head over to the activity page for more information.
If you are unable to participate, please withdraw via the activity page so that others can take your place.
{% endblocktrans %}{% endblock %}


AC Image EXIF Viewer
View EXIF of Images
Loading...
Written by Alva Chien, 2016. Hosted in Microsoft Azure (HongKong).


Master Tenain:
Please help Master Entien of Dion Castle Village stop the enemy raiders from alerting their main force about the location of the item. I will track the transportation team.


Zend Framework 2 has built-in MVC integration with the console. When the user runs an application in a console window, the request will be routed. By matching command line arguments against console routes we have defined in our application, the MVC will invoke a controller and an action.
In this chapter we will learn how ZF2 Controllers can interact with and return output to console window.
See also
In order for a controller to be invoked, at least one route must point to it. To learn about creating console routes, please read the chapter Console routes and routing
Console requests are very similar to HTTP requests. In fact, they implement a common interface and are created at the same time in the MVC workflow. Console routes match against command line arguments and provide a defaults array, which holds the controller and action keys. These correspond with controller aliases in the ServiceManager, and method names in the controller class. This is analogous to the way HTTP requests are handled in ZF2.
See also
To learn about defining and creating controllers, please read the chapter Routing and controllers
In this example we’ll use the following simple route:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | // FILE: modules/Application/config/module.config.php
array(
'router' => array(
'routes' => array(
// HTTP routes are here
)
),
'console' => array(
'router' => array(
'routes' => array(
'list-users' => array(
'options' => array(
'route' => 'show [all|disabled|deleted]:mode users [--verbose|-v]',
'defaults' => array(
'controller' => 'Application\Controller\Index',
'action' => 'show-users'
)
)
)
)
)
),
)
|
This route will match commands such as:
> php public/index.php show users
> php public/index.php show all users
> php public/index.php show disabled users
This route points to the method Application\Controller\IndexController::showUsersAction().
Let’s add it to our controller.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | <?php
namespace Application\Controller;
use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;
class IndexController extends AbstractActionController
{
public function indexAction()
{
return new ViewModel(); // display standard index page
}
public function showUsersAction()
{
$request = $this->getRequest();
// Check verbose flag
$verbose = $request->getParam('verbose') || $request->getParam('v');
// Check mode
$mode = $request->getParam('mode', 'all'); // defaults to 'all'
$users = array();
switch ($mode) {
case 'disabled':
$users = $this->getServiceLocator()->get('users')->fetchDisabledUsers();
break;
case 'deleted':
$users = $this->getServiceLocator()->get('users')->fetchDeletedUsers();
break;
case 'all':
default:
$users = $this->getServiceLocator()->get('users')->fetchAllUsers();
break;
}
}
}
|
We fetch the console request, read parameters, and load users from our (theoretical) users service. In order to make this method functional, we’ll have to display the result in the console window.
The simplest way for our controller to display data in the console window is to return a string. Let’s modify our example to output a list of users:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | public function showUsersAction()
{
$request = $this->getRequest();
// Check verbose flag
$verbose = $request->getParam('verbose') || $request->getParam('v');
// Check mode
$mode = $request->getParam('mode', 'all'); // defaults to 'all'
$users = array();
switch ($mode) {
case 'disabled':
$users = $this->getServiceLocator()->get('users')->fetchDisabledUsers();
break;
case 'deleted':
$users = $this->getServiceLocator()->get('users')->fetchDeletedUsers();
break;
case 'all':
default:
$users = $this->getServiceLocator()->get('users')->fetchAllUsers();
break;
}
if (count($users) == 0) {
// Show an error message in the console
return "There are no users in the database\n";
}
$result = '';
foreach ($users as $user) {
$result .= $user->name . ' ' . $user->email . "\n";
}
return $result; // show it in the console
}
|
On line 27, we are checking if the users service found any users - otherwise we are returning an error message that will be immediately displayed and the application will end.
If there are 1 or more users, we will loop through them with and prepare a listing. It is then returned from the action and displayed in the console window.
Sometimes we might need to check if our method is being called from a console or from a web request. This is useful to block certain methods from running in the console or to change their behavior based on that context.
Here is an example of how to check if we are dealing with a console request:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | namespace Application\Controller;
use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;
use Zend\Console\Request as ConsoleRequest;
use RuntimeException;
class IndexController extends AbstractActionController
{
public function showUsersAction()
{
$request = $this->getRequest();
// Make sure that we are running in a console and the user has not tricked our
// application into running this action from a public web server.
if (!$request instanceof ConsoleRequest) {
throw new RuntimeException('You can only use this action from a console!');
}
// ...
}
}
|
Note
You do not need to secure all your controllers and methods from console requests. Controller actions will only be invoked when at least one console route matches it. HTTP and Console routes are separated and defined in different places in module (and application) configuration.
There is no way to invoke a console action unless there is at least one route pointing to it. Similarly, there is no way for an HTTP action to be invoked unless there is at least one HTTP route that points to it.
The example below shows how a single controller method can handle both Console and HTTP requests:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | namespace Application\Controller;
use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;
use Zend\Console\Request as ConsoleRequest;
use Zend\Http\Request as HttpRequest;
use RuntimeException;
class IndexController extends AbstractActionController
{
public function showUsersAction()
{
$request = $this->getRequest();
$users = array();
// ... fetch users from database ...
if ($request instanceof HttpRequest) {
// display a web page with users list
return new ViewModel($result);
} elseif ($request instanceof ConsoleRequest) {
// ... prepare console output and return it ...
return $result;
} else {
throw new RuntimeException('Cannot handle request of type ' . get_class($request));
}
}
}
|
There are several types of parameters recognized by the Console component - all of them are described in the console routing chapter. Here, we’ll focus on how to retrieve values from distinct parameters and flags.
After a route matches, we can access both literal parameters and value parameters from within the $request container.
Assuming we have the following route:
1 2 3 4 5 6 7 8 9 10 | // inside of config.console.router.routes:
'show-users' => array(
'options' => array(
'route' => 'show (all|deleted|locked|admin) [<groupName>]'
'defaults' => array(
'controller' => 'Application\Controller\Users',
'action' => 'showusers'
)
)
)
|
If this route matches, our action can now query parameters in the following way:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | // an action inside Application\Controller\UsersController:
public function showUsersAction()
{
$request = $this->getRequest();
// We can access named value parameters directly by their name:
$showUsersFromGroup = $request->getParam('groupName');
// Literal parameters can be checked with isset() against their exact spelling
if (isset($request->getParam('all'))) {
// show all users
} elseif (isset($request->getParam('deleted'))) {
// show deleted users
}
// ...
}
|
In case of parameter alternatives, it is a good idea to assign a name to the group, which simplifies the branching in our action controllers. We can do this with the following syntax:
1 2 3 4 5 6 7 8 9 10 | // inside of config.console.router.routes:
'show-users' => array(
'options' => array(
'route' => 'show (all|deleted|locked|admin):userTypeFilter [<groupName>]'
'defaults' => array(
'controller' => 'Application\Controller\Users',
'action' => 'showusers'
)
)
)
|
Now we can use a the group name userTypeFilter to check which option has been selected by the user:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | public function showUsersAction()
{
$request = $this->getRequest();
// We can access named value parameters directly by their name:
$showUsersFromGroup = $request->getParam('groupName');
// The selected option from second parameter is now stored under 'userTypeFilter'
$userTypeFilter = $request->getParam('userTypeFilter');
switch ($userTypeFilter) {
case 'all':
// all users
case 'deleted':
// deleted users
case 'locked'
// ...
// ...
}
}
|
Flags are directly accessible by name. Value-capturing flags will contain string values, as provided by the user. Non-value flags will be equal to true.
Given the following route:
1 2 3 4 5 6 7 8 9 | 'find-user' => array(
'options' => array(
'route' => 'find user [--fast] [--verbose] [--id=] [--firstName=] [--lastName=] [--email=] ',
'defaults' => array(
'controller' => 'Application\Controller\Users',
'action' => 'find',
)
)
)
|
We can easily retrieve values in the following fashion:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | public function findAction()
{
$request = $this->getRequest();
// We can retrieve values from value flags using their name
$searchId = $request->getParam('id', null); // default null
$searchFirstName = $request->getParam('firstName', null);
$searchLastName = $request->getParam('lastName', null);
$searchEmail = $request->getParam('email', null);
// Standard flags that have been matched will be equal to TRUE
$isFast = (bool) $request->getParam('fast', false); // default false
$isVerbose = (bool) $request->getParam('verbose',false);
if ($isFast) {
// perform a fast query ...
} else {
// perform standard query ...
}
}
|
In case of flag alternatives, we have to check each alternative separately:
1 2 3 4 5 6 7 8 9 10 11 12 13 | // Assuming our route now reads:
// 'route' => 'find user [--fast|-f] [--verbose|-v] ... ',
//
public function findAction()
{
$request = $this->getRequest();
// Check both alternatives
$isFast = $request->getParam('fast',false) || $request->getParam('f',false);
$isVerbose = $request->getParam('verbose',false) || $request->getParam('v',false);
// ...
}
|
The source code of this file is hosted on GitHub. Everyone can update and fix errors in this document with few clicks - no downloads needed.


Description: Bind an event handler to the "resize" JavaScript event, or trigger that event on an element.
handler(eventObject): Function() A function to execute each time the event is triggered.
eventData: PlainObject A map of data that will be passed to the event handler.
handler(eventObject): Function() A function to execute each time the event is triggered.
This method is a shortcut for .bind('resize', handler)
in the first and second variations, and .trigger('resize')
in the third.
The resize
event is sent to the window
element when the size of the browser window changes:
$(window).resize(function() {
$('#log').append('
Handler for .resize() called.
');
});
Now whenever the browser window's size is changed, the message is appended to
 one or more times, depending on the browser.
Code in a resize
handler should never rely on the number of times the handler is called. Depending on implementation, resize
events can be sent continuously as the resizing is in progress (the typical behavior in Internet Explorer and WebKit-based browsers such as Safari and Chrome), or only once at the end of the resize operation (the typical behavior in some other browsers such as Opera).
$(window).resize(function() {
$('body').prepend('
' + $(window).width() + '
');
});


380_ttjtftx.py
class Solution:
def minimumTimeRequired(self, jobs: List[int], k: int) -> int:
avg = sum(jobs+[k-1])//k
#print(avg)
jobs = sorted(jobs)[::-1]
#print(jobs)
xs = [0] * k
for j in jobs:
mn = min(xs)
i = xs.index(mn)
xs[i]+=j
bound = max(xs)
n = len(jobs)
xs = [0] * k
ys = [[] for _ in range(k)]
ys[0] = [jobs[0]]
xs[0] = jobs[0]
def dfs(ji):
nonlocal bound
nonlocal ones
#if bound == avg:
# return
if ji == len(jobs):
bound = min(max(xs), bound)
return
j = jobs[ji]
#order = sorted(list(range(k)), key=lambda x:xs[x])
for i in range(ones, k):#order:
if xs[i] + j < bound:
#ys[i].append(j)
xs[i]+=j
dfs(ji+1)
#ys[i].append(j)
xs[i]-=j
# each k at least one job
# n-k jobs left
# if k> n-k, k-(n-k)=2k-n will have only 1 job
ones = max(0, k*2-n)
if k*2-n > 0:
for i in range(ones):
xs[i] = jobs[i]
dfs(ones)
dfs(1)
#print(xs, ys)
#return max(xs)
return bound


About the Blog: This Blog Web App has been made with python and it's Flask Web framework. The Github link for this project can be found here. Contact Me: Twitter - Instagram - Github


五一四天假期，天空正好放晴☀ 气温舒适及不适合宅在家里，不然都对不起愉快地假期了…😅
🌤趁着春光明媚的大早上，洗刷刷整装之后与好盆友相约来到南昌瑶湖森林公园 …大约40分钟左右的地铁行程之后就到了…
进入公园映入眼帘的海阔天空和郁郁葱葱的花木美景瞬间被吸引😍完全把人潮拥挤的路程抛诸脑后了…
闻着春天的气息，吹着小风，躺在柔软的沙滩上…享受这份难得的闲适心情…
当城市的喧嚣成为生活的日常，清风绿水自然的馈赠似乎就成为一种奢望了…
如果你想短暂的逃离嘈杂声的都市和快节奏的压抑生活，不妨可以选择来到这里~~瑶湖郊野🌲森林公园🌸🍀🌷🌹🌻🌺 给自己疲惫的身心放个假吧🤗
这里不仅有美丽的沙滩湖岸🏖 还有澄净的湖光美景🏝 被南昌人称为南昌版的“小马尔代夫”喔~😎
小桥流水鸟语花香，一汪湖水清澈照人，行道长廊满目青翠，秀色可餐的美景简直令人心旷神怡啊…💆
瞧见没…优美宜人的自然生态环境…勾勒出一幅幅靓丽的画面…还有青青湖边草🌱… 清新自然的直觉👃
特别是有着异域风情的茅草屋…烧烤区让慕名而来的游客们欢喜地很呢
随手拍下它们最灿烂的瞬间这便是让我最放松也最满足的时刻了…
这一幕我又想起那首格格的歌《火苗》暖风吹…春来到…欢迎来到瑶湖马尔代夫与阳光沙滩、湖景零距离接触~🤗
During the May 14th holiday, the sky is just fine. The temperature is comfortable and not suitable for the house at home, otherwise I am sorry for a happy holiday…😅
Taking advantage of the bright spring morning, after washing and brushing, I came to Nanchang Yaohu Forest Park with a good friend… It’s about 40 minutes after the subway trip…
The beauty of the open sky and the lush flowers and trees that enter the park are instantly attracted to the crowd and the crowds are completely left behind…

When the hustle and bustle of the city becomes the daily life of life, the natural gift of the breeze and green water seems to be a luxury…
If you want to escape the noisy city and the fast-paced depression for a short time, you can choose to come here~~Yaohu Country Forest Park 放 Give yourself a tired body and mind.
There are not only beautiful beaches and lakes, but also the beautiful scenery of the lake. It is known as the “Little Maldives” by Nanchang.
The bridge is full of water and birds, and the lake is clear and clear. The pavilion is full of greenery. The beautiful scenery is delicious and refreshing…💆
See you no… The beautiful and pleasant ecological environment outlines a moving picture… and the Qingqing Riverside Grass… Fresh and natural
Especially the exotic thatched cottages… The barbecue area makes the tourists who come here happy.
Taking pictures of their most brilliant moments is the moment that makes me the most relaxed and satisfying…
In this scene, I remembered the song of the first song, “The Flame”, the warm wind blows… Spring is coming… Welcome to the Yaohu Maldives and the sun and the beach, the lake view is in close contact~🤗
Love what I love,
Do what I like to do,
Listen to the heart
Feel it with love.
I will never ask for more, whatever that comes, let it be. From the moment you interact with me, our friendly relationship begun. Welcome to my world and looking forward to share more of my stories with you. 😚😘
爱我所爱
行我所行
听从内心
有爱执感觉
无问西东
认识的自然就认识了
不认识的求也求不来～
希望咱们的缘分从这开始…欢迎很好的你一起分享一起交流喔～😚 😘
Thank you for being supportive as always. I appreciate if you can click below link, it will bring you to my #reviewme post. Kindly leave me your comment about me and if possible let me have some credstars ✨ ✨ ✨
感谢亲们对我一直的支持。希望你为我点击一下链接，将会把你带到我的个人凭证留言板，为我留下你宝贵的星星✨✨ ✨
如何有效创造一个 #ReviewMe 的个人凭证留言板！现在开始挣取凭证明星让大家做你的评审
CREATING YOUR PROFILE IS EASY! JUST FOLLOW THE STEPS HERE ☜(ˆ▿ˆc)
Posted from Steem中文社区 : http://cnstm.org/blog/2019/05/15/%e5%8d%97%e6%98%8c%e7%89%88%e9%a9%ac%e5%b0%94%e4%bb%a3%e5%a4%abnanchang-version-of-maldives/
This page is synchronized from the post: 南昌版“马尔代夫”Nanchang version of Maldives


As we know, Ruby is an Object Oriented language, which is a fancy way of saying everything in Ruby is an object, and we are able to manipulate and define those objects to do whatever we want them to do. Classes are used to construct objects. They are essentially the blueprint for an object. The class defines all of the properties the object will have, as well as the methods that can be called on the object. Lets start out with an example. Lets create a class called Programmers. To create a class we have to define and initialize it. Take a look at the code below
class Programmer
def initialize (name, language)
@name = name
@language = language
end
Programmer is now a class. To initialize, or make the Programmer class start, we need to pass two arguments, name and language, to the class. These two variables, name and language, are called Instance Variables. This is because they change with every instance. So every Programmer will have a different name and language. This syntax might be hard to understand at first, but do note that the instance variables are written with @ signs. This is just so that we, and Ruby, know that these variables will change depending on the input that is given.
After we have specified which variables our class needs in order to begin, we can also define a few methods that our class can work with. Take a look at the following examples:
def work
puts “code, code, code, code in #{@language}”
end
def drink_coffee
puts "More caffeine for #{@name}"
end
def display
puts “Hi, my name is #{@name} and I use #{@language} to program”
end
These three methods can be added in our Programmer class so that they can work with our class and output certain data.
To call our new class we use the syntax Class_Name.new(argument(s)). Ok lets see Programmers in action!
class Programmer
CLASS VARIABLE
def initialize (name, language)
@name = name
@language = language
end
def work
puts “code, code, code, code all day in #{@language}”
end
def drink_coffee
puts "More caffeine for #{@name}"
end
def display
puts “Hi, my name is #{@name} and I use #{@language} to program”
end
end
employee = Programmers.new("Melissa", "Ruby")
employee.work
employee.drink_coffee
employee.display
output:
code, code, code, code all day in Ruby
More caffeine for Melissa
Hi, my name is Melissa and I use Ruby to program
Did you see that? These new methods that we just defined, work, drink_coffee, and display, are now functioning methods that we can call on any instance of the Programmer class. It’s important to understand that they methods will only work on the Programmer class, calling them outside of this class will not work.
Ruby has many different kinds of variables, but the four most important to understand with classes are local variable, instance variables, class variables, and global variables. Local variables are the variables that are most common in basic programming. They are simple variables that we assign values to that can only be used locally. Instance variables are Class variables can be used within any definition in the class. Above our initialized definition, we have the variable lsdkfj set to sldkf. This means that in any of these definitions, we can call the variable lsdkfj and it will always equal lsdkfj. Global variables can be used across classes. We could’ve defined lskjf, for example as a global variable. This way whether we were in the Programmer class or the Marketer class, lskfj would always be lsdkfj.
Another thing we could have done is to set attributes for this class. Attributes simplify classes, because you are able to set variables in the beginning, and then come back and call them later in the class. It also shortens the code, because you no longer have to write out each definition.
For example, if you give your variable the attribute of writer, you have told your code, hey you don’t need a definition to set the value of this variable, just set it anywhere in this class. Check out the code below to see this point illustrated:
attr_writer :variable
is the same as doing
def variable=(value)
@variable = value
end
If you write:
attr_reader :variable
thats the same as doing
def variable
@variable
end
If you write:
attr_accessor :variable
thats the same as doing
def variable=(value)
@variable = value
end
def variable
@variable
end
See how many lines of code can be gotten rid of with the use of attributes!
Alright the last thing I want to go over is classes within classes. Since everything in Ruby is an object, and classes are also objects, it is inevitable that we will have classes within classes. Luckily for us, classes are hereditary. The hierarchy of classes starts with the superclass. For example, because all Programmers are people, Programmer would have a superclass of Person. This means that all of the properties that Person (the superclass) has, Programmer also has.
Alrighty, you should have a basic understanding of classes now.
melissawimberly signing off...


@@include("../partials/head.html")
You have full control to manage your own account setting.
Earning this month
Account Balance
Life Time Sales
| COURSES | SALES | AMOUNT | |
|---|---|---|---|
Building Scalable APIs with GraphQL |
34 | $3,145.23 | |
HTML5 Web Front End Development |
30 | $2,611.82 | |
Learn JavaScript Courses from Scratch |
26 | $2,372.19 | |
Get Started: React Js Courses |
20 | $1,145.23 |


Company profile - Canadian Company Capabilities
Third-Party Information Liability Disclaimer
Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.
Gestion R2 Management inc.
Legal Name:
Gestion R2 Management inc.
Operating Name:
R2-Solutions emploi-Employment solutions
Mailing Address:
201-59 Water StCAMPBELLTON, New Brunswick
E3N 1A9
Location Address:
201-59 Water StCAMPBELLTON, New Brunswick
E3N 1A9
Tel.:<PHONE_NUMBER>
Tel.:<PHONE_NUMBER>
Fax:<PHONE_NUMBER>
Logo
Company Profile
R2 Human Resources...Linking talent & jobs!
We are a leading provider of recruitment, outplacement and work transition solutions across Eastern Quebec and the Atlantic Canada.
With a surpassing 85% employment placement rate, we have, over the years, helped thousands of job seekers and employers to match their employment needs.
Since 2003, we have dedicated ourselves to maximizing the potential of talent finding for employers, employment finding for government / insurers beneficiaries and job seekers.
We work tirelessly on one mission only... Develop & connecting talent and work!
Full profile
Full profile
Contact information
Company description
541619 - Other Management Consulting Services
541720 - Research and Development in the Social Sciences and Humanities
611430 - Professional and Management Development Training
Product / Service / Licensing
training
project management
coaching
outsourcing
coaching
Sector information
Unique applications:
D) EVALUATION & REVIEWS OF PROGRAMS & SERVICESLabour Market Analysis Branch: Department of Post Secondary Education, Training and Labour (2008 ongoing) We have been on this standing offer list for the past two years and conducted many programs evaluation and market analysis for the French Community Colleges Network. (CCNB Campbellton, Bathurst, Dieppe, Edmunston & Caraquet)
PEI-CDS (Prince Edward Island Career Development Services) 2009 As the sponsoring partners in the PEI Labour Market Agreement, Human Resources Development Canada (HRCD) and the Province of Prince Edward Island (PEI) our evaluation for this client included: operations, client satisfaction, working environment, a comparison with other service models and non-tangible benefits for clients. We gathered information through multiple sources: data and document review, a client survey, interviews with staff and key stakeholders, interviews and document review related to other service providers in Nova Scotia, New Brunswick and British Columbia.
A portrait of trades occupation in Restigouche 2007 Funded by The Department of Training & Employment Development NB. The study methodology consisted of consultations with a number of target groups. The objectives were to identify the trades that currently face a labour shortage, or are likely to do so in the future, as well as to assess people's perceptions of trades
First Nations Human Resources Development Commission of
Québec (FNHRDCQ) (2010- ongoing) Project Management :
Develop and implement Labour Market Information
services and job placement services in the Fist Nation community of Listuguj through a partnership between the Federal Government of Canada (Service Canada), the Provincial Government of Quebec (MESSQ), the Listuguj Migmaq Development Commission (LMDC) and the First Nations Human Resources Development Commission of Quebec (FNHRDCQ)
Enterprise Restigouche in partnership with : Dept.of PostSecondary Education Training and Labour, ACOA (2010) Performance Management
The LEAN /Essential Skills Initiative [LEAN ES] proposes an approach to improve business performance of 5 manufacturing wood products companies.
The initiative integrates Essential Skills [ES] training in the workplace and the mobilization of human resources [HR] to enhance the productivity improvement [LEAN]
Social Development New Brunswick , Service Canada, WorkSafe NB & Postsecondary Education Training & Labour
(2004-ongoing) Career Management
Develop and Project manage a series of transition programs for over a 200 participants/client with significant personal barriers.
Over 75% of participants have found employment.
Port of Dalhousie
Winter 2010 ongoing Initiation: Developed a business case for the creation of a new industrial chip handling facility including cost estimates and preliminary conceptual drawings for submission to Provincial and Federal funding agencies, obtained $3.1M financing on a $3.9M project.
Planning: Acquired project management team and developed detailed cost management tracking approach, performance of scope management and time management services. Coordination of job meetings and all internal communication services.
Execution: Tendered goods and services for project execution, assigned site management team and provide overall guidance and support for fast decision making.
Monitoring & Control: Stakeholder management to ensure all funding parties are informed on the project monitoring services and claims management approach.
Province of New Brunswick
Summer 2009 Senior Consultant for the development of the Action plan towards self-sufficiency in Northern New Brunswick for the Province of New Brunswick.
Preparation of a comprehensive action plan for all departments of Government of New Brunswick, including all current and planned activity for the following 3 years. Met with all departments and agencies, private sector and associations to determine a common approach for revitalization of Northern New Brunswick. Developed new integrated approaches for Modular Fabrication, Industrial Development and Business Development.
Dept.of PostSecondary Education Training and Labour in partnership with :
The village of St Arthur The Société régionale daménagement & Enterprise Restigouche
(2009 ongoing)
Succession Management
We have ongoing involvement in the development of a Succession Management Process for this village that is greatly affected by business closures. Our involvement includes a major Leadership Development component.
Ei : Working with a steering committee of Executive and Director level individuals to research, develop and implement this process to support the village in his transition and all levels of leadership, through leadership and career planning and development required to sustain their leadership into the future. This professional consultation includes: Community dev., human resources planning, competency development, assessment and integration, career and leadership assessment, development and planning, management and executive coaching, Business dev. and research, creating a dev. corporation and support for change management. The process has included integration of leadership competencies into recruitment, promotion and leadership development practices which are aligned with the Mission, Vision and Values of the newly created development corporation.
Key / Major clients:
gov. CanadaGov. N-B
Municipalities
private company
organismes
Testimonial:
WorkSafe NB (North-West Region)Contact: Lise Hébert
Rehabilitation Specialist-Northwest Region
166 Broadway Boulevard, Suite 300, PO Box 7244,
Grand Falls, NB E3Z 2J9
Fax:<PHONE_NUMBER>
Phone: 1<PHONE_NUMBER>
Email: lise.hebert @ ws-ts.nb.ca Since the spring of 2008, R2 Human Resources has been offering career transition coaching services, testing and outplacement services throughout the northeast and north-western region of New Brunswick.
Labour Market Analysis Directorate/Postsecondary Education Labor & Training
Contact: Mr. Raphael Moore
Chestnut Complex, C. P. 6000
Fredericton, NB
E3B 5H1
Phone:<PHONE_NUMBER>
Fax:<PHONE_NUMBER>
Email: @ raphael.moore gnb.ca Since 2008, R2 Human Resources has conducted market and service analysis for this department.
Department of Social Development
Donna Cormier-Pitre
157 Water Street, Suite 100
Campbellton, New Brunswick E3N 3L4
Phone:<PHONE_NUMBER>
Fax:<PHONE_NUMBER>
Email: Donna.Cormier Pitre @ gnb.ca R2 Human Resources has developed, delivered and managed several training programs funded by the Ministry of Social Development in New Brunswick;
Service Canada
Contact: Mr. Daniel Arseneault
Senior Development Officer
Labour Market and Social Development Programs
Phone:<PHONE_NUMBER>
Fax:<PHONE_NUMBER>
Email: daniel.arseneau @ servicecanada.gc.ca R2 Human Resources has developed and delivered several training in Career Transition and employability skills development.
Enterprise Restigouche
Contact: Mrs Betty-Ann Mercier
97 Roseberry Street, PO Box 825Campbellton, New Brunswick, Canada E3N 3H3
Phone:<PHONE_NUMBER> Fax:<PHONE_NUMBER>
E-mail: betty-ann.mercier @ ent-restigouche.ca Several mandates in HR management and development were carried out on behalf of Enterprise Restigouche and their clients in recent years.
Listuguj Migmaq development center (LMDC)
Contact: Jennifer Labillois-Metallic
2 Pacific Drive Listuguj, Quebec G0C 2R0 Phone:<PHONE_NUMBER> Fax:<PHONE_NUMBER>
Email<EMAIL_ADDRESS>R2 Human Resources project manage a Pan Quebec integration of a labor market information; information service in collaboration with the Commission on Human Resources Development for First Nations, representing over 30 indigenous reservations on the Quebec territory.
Third-Party Information Liability Disclaimer
Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.
Contacts
Contact information
Description
Company description
541619 - Other Management Consulting Services
541720 - Research and Development in the Social Sciences and Humanities
611430 - Professional and Management Development Training
Products, services and licensing
Product / Service / Licensing
training
project management
coaching
outsourcing
coaching
Sector
Sector information
Unique applications:
D) EVALUATION & REVIEWS OF PROGRAMS & SERVICESLabour Market Analysis Branch: Department of Post Secondary Education, Training and Labour (2008 ongoing) We have been on this standing offer list for the past two years and conducted many programs evaluation and market analysis for the French Community Colleges Network. (CCNB Campbellton, Bathurst, Dieppe, Edmunston & Caraquet)
PEI-CDS (Prince Edward Island Career Development Services) 2009 As the sponsoring partners in the PEI Labour Market Agreement, Human Resources Development Canada (HRCD) and the Province of Prince Edward Island (PEI) our evaluation for this client included: operations, client satisfaction, working environment, a comparison with other service models and non-tangible benefits for clients. We gathered information through multiple sources: data and document review, a client survey, interviews with staff and key stakeholders, interviews and document review related to other service providers in Nova Scotia, New Brunswick and British Columbia.
A portrait of trades occupation in Restigouche 2007 Funded by The Department of Training & Employment Development NB. The study methodology consisted of consultations with a number of target groups. The objectives were to identify the trades that currently face a labour shortage, or are likely to do so in the future, as well as to assess people's perceptions of trades
First Nations Human Resources Development Commission of
Québec (FNHRDCQ) (2010- ongoing) Project Management :
Develop and implement Labour Market Information
services and job placement services in the Fist Nation community of Listuguj through a partnership between the Federal Government of Canada (Service Canada), the Provincial Government of Quebec (MESSQ), the Listuguj Migmaq Development Commission (LMDC) and the First Nations Human Resources Development Commission of Quebec (FNHRDCQ)
Enterprise Restigouche in partnership with : Dept.of PostSecondary Education Training and Labour, ACOA (2010) Performance Management
The LEAN /Essential Skills Initiative [LEAN ES] proposes an approach to improve business performance of 5 manufacturing wood products companies.
The initiative integrates Essential Skills [ES] training in the workplace and the mobilization of human resources [HR] to enhance the productivity improvement [LEAN]
Social Development New Brunswick , Service Canada, WorkSafe NB & Postsecondary Education Training & Labour
(2004-ongoing) Career Management
Develop and Project manage a series of transition programs for over a 200 participants/client with significant personal barriers.
Over 75% of participants have found employment.
Port of Dalhousie
Winter 2010 ongoing Initiation: Developed a business case for the creation of a new industrial chip handling facility including cost estimates and preliminary conceptual drawings for submission to Provincial and Federal funding agencies, obtained $3.1M financing on a $3.9M project.
Planning: Acquired project management team and developed detailed cost management tracking approach, performance of scope management and time management services. Coordination of job meetings and all internal communication services.
Execution: Tendered goods and services for project execution, assigned site management team and provide overall guidance and support for fast decision making.
Monitoring & Control: Stakeholder management to ensure all funding parties are informed on the project monitoring services and claims management approach.
Province of New Brunswick
Summer 2009 Senior Consultant for the development of the Action plan towards self-sufficiency in Northern New Brunswick for the Province of New Brunswick.
Preparation of a comprehensive action plan for all departments of Government of New Brunswick, including all current and planned activity for the following 3 years. Met with all departments and agencies, private sector and associations to determine a common approach for revitalization of Northern New Brunswick. Developed new integrated approaches for Modular Fabrication, Industrial Development and Business Development.
Dept.of PostSecondary Education Training and Labour in partnership with :
The village of St Arthur The Société régionale daménagement & Enterprise Restigouche
(2009 ongoing)
Succession Management
We have ongoing involvement in the development of a Succession Management Process for this village that is greatly affected by business closures. Our involvement includes a major Leadership Development component.
Ei : Working with a steering committee of Executive and Director level individuals to research, develop and implement this process to support the village in his transition and all levels of leadership, through leadership and career planning and development required to sustain their leadership into the future. This professional consultation includes: Community dev., human resources planning, competency development, assessment and integration, career and leadership assessment, development and planning, management and executive coaching, Business dev. and research, creating a dev. corporation and support for change management. The process has included integration of leadership competencies into recruitment, promotion and leadership development practices which are aligned with the Mission, Vision and Values of the newly created development corporation.
Key / Major clients:
gov. CanadaGov. N-B
Municipalities
private company
organismes
Testimonial:
WorkSafe NB (North-West Region)Contact: Lise Hébert
Rehabilitation Specialist-Northwest Region
166 Broadway Boulevard, Suite 300, PO Box 7244,
Grand Falls, NB E3Z 2J9
Fax:<PHONE_NUMBER>
Phone: 1<PHONE_NUMBER>
Email: lise.hebert @ ws-ts.nb.ca Since the spring of 2008, R2 Human Resources has been offering career transition coaching services, testing and outplacement services throughout the northeast and north-western region of New Brunswick.
Labour Market Analysis Directorate/Postsecondary Education Labor & Training
Contact: Mr. Raphael Moore
Chestnut Complex, C. P. 6000
Fredericton, NB
E3B 5H1
Phone:<PHONE_NUMBER>
Fax:<PHONE_NUMBER>
Email: @ raphael.moore gnb.ca Since 2008, R2 Human Resources has conducted market and service analysis for this department.
Department of Social Development
Donna Cormier-Pitre
157 Water Street, Suite 100
Campbellton, New Brunswick E3N 3L4
Phone:<PHONE_NUMBER>
Fax:<PHONE_NUMBER>
Email: Donna.Cormier Pitre @ gnb.ca R2 Human Resources has developed, delivered and managed several training programs funded by the Ministry of Social Development in New Brunswick;
Service Canada
Contact: Mr. Daniel Arseneault
Senior Development Officer
Labour Market and Social Development Programs
Phone:<PHONE_NUMBER>
Fax:<PHONE_NUMBER>
Email: daniel.arseneau @ servicecanada.gc.ca R2 Human Resources has developed and delivered several training in Career Transition and employability skills development.
Enterprise Restigouche
Contact: Mrs Betty-Ann Mercier
97 Roseberry Street, PO Box 825Campbellton, New Brunswick, Canada E3N 3H3
Phone:<PHONE_NUMBER> Fax:<PHONE_NUMBER>
E-mail: betty-ann.mercier @ ent-restigouche.ca Several mandates in HR management and development were carried out on behalf of Enterprise Restigouche and their clients in recent years.
Listuguj Migmaq development center (LMDC)
Contact: Jennifer Labillois-Metallic
2 Pacific Drive Listuguj, Quebec G0C 2R0 Phone:<PHONE_NUMBER> Fax:<PHONE_NUMBER>
Email<EMAIL_ADDRESS>R2 Human Resources project manage a Pan Quebec integration of a labor market information; information service in collaboration with the Commission on Human Resources Development for First Nations, representing over 30 indigenous reservations on the Quebec territory.


| java.lang.Object | ||
| ↳ | com.urbanairship.push.notifications.NotificationFactory | |
| ↳ | com.urbanairship.push.notifications.CustomLayoutNotificationFactory |
A notification factory that allows the use of layout XML and a custom notification sound.
A layout resource is required. It can include a ImageView
It must include an ImageView
for an icon, a
TextView
for the alert subject or title, and a TextView
for
the alert message. Each of these is required, but if your layout does not make use of one or
more of the items, set the visibility to gone
(android:visibility="gone"
).
A sample layout.xml file:
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:orientation="vertical"
android:paddingTop="2dip"
android:layout_alignParentTop="true"
android:layout_height="fill_parent">
<ImageView android:id="@+id/icon"
android:src="@drawable/icon_1"
android:layout_marginRight="4dip"
android:layout_marginLeft="5dip"
android:layout_width="100dip"
android:layout_height="100dip" />
<!-- The custom notification requires a subject field.
To accommodate multiple lines in this layout this
field is hidden. Visibility is set to gone. -->
<TextView android:id="@+id/subject"
android:text="Subject"
android:layout_alignTop="@+id/icon"
android:layout_toRightOf="@+id/icon"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:maxLines="1" android:visibility="gone"/>
<!-- The message block. Standard text size is 14dip
but is reduced here to maximize content. -->
<TextView android:id="@+id/message"
android:textSize="12dip"
android:textColor="#FF000000"
android:text="Message"
android:maxLines="4"
android:layout_marginTop="0dip"
android:layout_marginRight="2dip"
android:layout_marginLeft="0dip"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/icon"
android:layout_width="wrap_content" />
</RelativeLayout>
Note: If you are planning on targeting Honeycomb devices (and beyond), the above layout will not display
properly, as it will show black text on the default black background that Honeycomb and above uses for notifications.
Instead of explicitly setting a light background color, which may look out of place across multiple devices,
you should set the android:textAppearance
property on your TextViews to
@android:style/TextAppearance.StatusBar.EventContent.Title
or
@android:style/TextAppearance.StatusBar.EventContent
, which were introduced in API level 9, to ensure
that your layout will adapt gracefully as the platform changes.
Because these styles are not available prior to API level 9, if you intend to make your app backwards compatible with prior API levels, you can do so by building for the newer API but set an older minimum SDK setting for your app, and including the level 9 compatible layout in its own resource directory, called "layout-v9". See the Push Sample application for a concrete example.
Below is a sample Honeycomb-compatible layout, similar to the one above:
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:orientation="vertical"
android:paddingTop="0dip"
android:layout_alignParentTop="true"
android:layout_height="fill_parent">
<ImageView android:id="@+id/icon"
android:src="@drawable/icon"
android:layout_marginRight="10dip"
android:layout_marginLeft="0dip"
android:layout_width="65dip"
android:layout_height="65dip" />
<!-- The custom notification requires a subject field.
To accommodate multiple lines in this layout this
field is hidden. Visibility is set to gone. -->
<TextView android:id="@+id/subject"
android:text="Subject"
android:textAppearance="@android:style/TextAppearance.StatusBar.EventContent.Title"
android:layout_alignTop="@+id/icon"
android:layout_toRightOf="@+id/icon"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:maxLines="1" android:visibility="gone"/>
<!-- The message block. Standard text size is 14dip
but is reduced here to maximize content. -->
<TextView android:id="@+id/message"
android:textSize="12dip"
android:textAppearance="@android:style/TextAppearance.StatusBar.EventContent"
android:text="Message"
android:maxLines="4"
android:layout_marginTop="0dip"
android:layout_marginRight="2dip"
android:layout_marginLeft="0dip"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/icon"
android:layout_width="wrap_content" />
</RelativeLayout>
And here is a sample implementation:
CustomLayoutNotificationFactory nf = new CustomLayoutNotificationFactory(this);
nf.layout = R.layout.notification_layout; // The layout resource to use
nf.layoutIconDrawableId = R.drawable.notification_icon; // The icon you want to display
nf.layoutIconId = R.id.icon; // The icon's layout 'id'
nf.layoutSubjectId = R.id.subject; // The id for the 'subject' field
nf.layoutMessageId = R.id.message; // The id for the 'message' field
//set this ID to a value > 0 if you want a new notification to replace the previous one
nf.constantNotificationId = 100;
//set this if you want a custom sound to play
nf.soundUri = Uri.parse("android.resource://"+this.getPackageName()+"/" +R.raw.notification_mp3);
// Set the factory
UAirship.shared().getPushManager().setNotificationBuilder(nf);
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| public int | constantNotificationId | An optional constant notification ID. | |||||||||
| public int | layout | The layout resource. | |||||||||
| public int | layoutIconDrawableId | The icon drawable to display in the custom layout. | |||||||||
| public int | layoutIconId | The layout id for the icon. | |||||||||
| public int | layoutMessageId | The layout id for the message TextView . |
|||||||||
| public int | layoutSubjectId | The layout id for the subject TextView . |
|||||||||
| public Uri | soundUri | An optional sound URI. | |||||||||
| public int | statusBarIconDrawableId | The icon drawable to display in the status bar. |
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| CustomLayoutNotificationFactory(Context context) |
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Notification |
createNotification(PushMessage pushMessage, int notificationId)
Creates a
Notification for use in the notification bar,
optionally triggering vibration and sound based on the user's preferences. | ||||||||||
| int |
getNextId(PushMessage pushMessage)
Creates a notification ID based on the message and payload.
|
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
From class
com.urbanairship.push.notifications.NotificationFactory
| |||||||||||
|
From class
java.lang.Object
|
An optional constant notification ID.
By default, this builder uses unique, incremented notification IDs. That ID scheme ensures that all notifications are displayed until dismissed by a user. However, if a single notification scheme is desired where each new notification replaces the previous one, set this to a value greater than zero. IfconstantNotificationId <= 0
, the standard incrementing
behavior will be used.
The layout resource.
For example, if the layout isnotification_layout.xml
, use R.layout.notification_layout
.
The icon drawable to display in the custom layout.
For example:R.drawable.notification_icon
The layout id for the icon.
For example:R.id.icon
. This field will be populated with the icon drawable.
The layout id for the message TextView
.
R.id.message
. This field will be populated with the alert message.
The layout id for the subject TextView
.
R.id.subject
. This field will be populated with the application name.
An optional sound URI.
If notnull
, the sound at this URI will be played
when a notification is received.
The icon drawable to display in the status bar.
Creates a Notification
for use in the notification bar,
optionally triggering vibration and sound based on the user's preferences.
null
.| pushMessage | The push message. |
|---|---|
| notificationId | The notification ID. |
null
if no notification is desired.
Creates a notification ID based on the message and payload.
This method could return a constant (to always replace the existing ID) or a payload/message specific ID (to replace in cases where there are duplicates, for example) or a random/sequential (to always add a new notification).| pushMessage | The push message. |
|---|


Participant : Scheduler App, When do you want to meet?
Show Week Schedule
Create Meeting
Cancel Meeting
Search Open Time Slot
Schedule ID
Start date
End date
Submit
Timeslot ID
Participant Name
Submit
Timeslot ID
Secret Code
Submit
Schedule ID
Filter by month
Filter by year
Filter by day of week
Filter by day of month
Submit


| 034:012 Khan | : |
And to Solomon (We subjected) the wind, its morning (stride from sunrise till midnoon) was a month's (journey), and its afternoon (stride from the midday decline of the sun to sunset) was a month's (journey i.e. in one day he could travel two months' journey). And We caused a fount of (molten) brass to flow for him, and there were jinns that worked in front of him, by the Leave of his Lord, and whosoever of them turned aside from Our Command, We shall cause him to taste of the torment of the blazing Fire. |
| 034:012 Maulana | : |
And (We made) the wind (subservient) to Solomon; it made a month's journey in the morning and a month's journey in the evening; and We made a fountain of molten brass to flow for him. And of the jinn there were those who worked before him by the command of his Lord. And whoever turned aside from Our command from among them, We made him taste of the chastisement of burning. |
| 034:012 Pickthal | : |
And unto Solomon (We gave) the wind, whereof the morning course was a month's journey and the evening course a month's journey, and We caused the fount of copper to gush forth for him, and (We gave him) certain of the jinn who worked before him by permission of his Lord. And such of them as deviated from Our command, them We caused to taste the punishment of flaming Fire. |
| 034:012 Rashad | : |
To Solomon we committed the wind at his disposal, traveling one month coming and one month going. And we caused a spring of oil to gush out for him. Also, the jinns worked for him, by his Lord's leave. Any one of them who disregarded our commands, we subjected him to a severe retribution. |
| 034:012 Sarwar | : |
(We made subservient to) Solomon the wind that travelled a month's journey in the morning and a month's journey in the evening. We made a stream of brass flow for him and some of the jinn worked for him by his Lord's command. We would make whichever of them (jinn) who turned away from Our command to suffer a burning torment. |
| 034:012 Shakir | : |
And (We made) the wind (subservient) to Sulaiman, which made a month's journey in the morning and a month's journey m the evening, and We made a fountain of molten copper to flow out for him, and of the jinn there were those who worked before him by the command of his Lord; and whoever turned aside from Our command from among them, We made him taste of the punishment of burning. |
| 034:012 Sherali | : |
And to Solomon WE subjected the wind; its morning course was a month's journey and its evening course was a month's journey too. And WE caused a fount of molten copper to flow for him. And of the jinn were some who worked under him by the command of his Lord. And WE said that whoever of them turned away from Our command, WE would make him taste the punishment of the burning fire. |
| 034:012 Yusufali | : |
And to Solomon (We made) the Wind (obedient): Its early morning (stride) was a month's (journey), and its evening (stride) was a month's (journey); and We made a Font of molten brass to flow for him; and there were Jinns that worked in front of him, by the leave of his Lord, and if any of them turned aside from our command, We made him taste of the Penalty of the Blazing Fire. |
Concepts/Themes Covered: الإيمان > الغيب > الجن Faith> The Unseen World> The Jinn العلوم والفنون > الحقائق العلمية و الإشاة إلى وقائع أيدتهاالإكتشافات العلمية > الريح Science and Art> The Scientific Facts and the Indication to Facts which have been supported by the Scientific Discoveries>The Wind العلوم والفنون > الفنون Science and Art>Arts
This tool uses eight English parallel translations for the Holy Quran imported from Mr. Clay Smith. You can also visit Qurany Concepts for browsing the Quran themes or topics. If you want to search the Holy Quran for keywords, please visit Qurany Keywords.


UK weather: Met Office warnings in place as country braces for more rain
More downpours are on the way
by Caitlin Doherty, Alexander BrockMet Office weather warnings are in place as the UK braces for more rain over the next five days.
Northern England, south west England and south Wales are all preparing for downpours during the next few days.
The East Midlands and South Yorkshire can also expect some heavy showers by midweek, Mirror Online reports .
Met Office weather forecaster Alex Burkill said on Saturday evening: "The heavy rain that affected parts of England today (November 23) has moved north and it's mainly across Scotland right now.
"That's where we've got the warning for tonight, and the heaviest rain and greatest impacts will be there."
A yellow weather warning for rain, which will be in place from 12pm on Tuesday to 3pm on Wednesday, covers much of the south west, including Bristol .
The Met Office has warned the public to expect flooding on the roads and delays to train services.
Weather warnings covering parts of Scotland, south Wales and the south west have also been for today (November 24) and Monday.
UK five-day forecast
Today
Rain clearing northeast Scotland this morning. Elsewhere., dull and misty with drizzle at first. Gradually turning brighter and drier, but further wet and windy weather reaching the southwest later.
Tonight
Rain, heavy at times, spreading across southwest England and Wales, followed by scattered showers. Dry, mainly cloudy and rather mild elsewhere.
Monday
Outbreaks of rain spreading northeast across Britain, with sunny spells and scattered showers in the southwest. These heavy at times with a risk of thunder.
Outlook for Tuesday to Thursday
Unsettled with further outbreaks of rain, showers, and for some, periods of strong winds. Rather mild, but possibly becoming colder in the far north by the end of Thursday.
For the latest news in and around Bristol, visit and bookmark Bristol Live's homepage .


An in-depth exploration of various books, information about an Asian country, and more. It's a work in progress; expect it to be finished by the end of March 2017.
This page contains information about characters from the book So Far from the Bamboo Grove.
The characters that will be included in this are Yoko (the main character), her mother, Ko (her sister), Hideyo, and Corporal Matsumura (a friend of the family).
Photos are being added and will be here soon.
Strength: Yoko's strength is her ability to learn skills that she would never have foreseen herself using prior to leaving the bamboo grove.
Weakness: Her weakness lies in her introvertedness and how scared she is, especially at the beginning of the book.
Defining Moment: Her defining moment is when she wins the writing contest to earn money for her sister and herself.
Essential Question: Why is she not more scared to go to the school with the wealthy Japanese girls?
Image Meaning: The image of a rag doll represents the view of the other girls of the Japanese school on Yoko.
Image is in public domain.
Strength: Yoko's mother's strength is her constant desire to protect her children.
Weakness: Her mother's weakness is that she has difficulty finding a reason to stay alive when her parents died in the bombing.
Defining Moment: Yoko and Ko's mother's defining moment is when she safely brings her children into Japan.
Essential Question: Why did she lose the will to live when her parents were dead, even though her children needed her?
Image Meaning: The police officers represent Mother's protective nature over her children.
Image is in public domain.
Strength: Ko's strength is that she can protect Yoko even when their mother dies.
Weakness: Her weakness lies in the fact that she does not understand Yoko's importance.
Defining Moment: Ko's defining moment is when her mother dies and she must be the head of the family.
Essential Question: Why does she wish Yoko dead and treat Yoko so badly when they needed each other to survive in Japan?
Image Meaning: The boss that works in this office space represents how Ko is bossy with Yoko.
Image is in public domain.
Strength: His strength is that he wants very badly to see his family again.
Weakness: Hideyo's weakness is that he seemed to want to join the student army, missing his family's departure.
Defining Moment: His defining moment is when he makes it to the farmhouse and he is accepted as a brother there.
Essential Question: Why did he fall to the social pressure to join the student army (and then get all of the questions wrong), when it almost cost him ever seeing his family again?
Image Meaning: The friends in the image represent Hideyo's relationship with the Korean family that accepted him.
Image is by Faisal Akram and is licensed under CC BY SA 2.0 (via Wikimedia Commons).
Strength: His strength is that Corporal Matsumura felt the need to see Yoko's family again, and went to great lengths to do so.
Weakness: The corporal's weakness is that he did not feel the will to live until Yoko saw him for the first time.
Defining Moment: His defining moment is when he escapes on the log for four days to see the family.
Essential Question: Why did he suddenly gain the will to live when Yoko promised to dance for him?
Image Meaning: The hard working, motivated soldiers in this image represent the corporal's motivation to see Yoko and her family.
Image is in public domain in Japan, however copyright was restored in the United States under the URAA. It was painted in Japan by Toshi Shimizu in 1944 (the time period of the book, too).
The image is from Wikimedia Commons.


Index
A B C D E F G H I K L M N O P R S T U V W
All Classes All Packages
All Classes All Packages
All Classes All Packages
A
- addButton(String, Button) - Method in enum modele.game.enums.MenuTab
-
Add a button to the tab
- addChannel(AudioID, String, boolean) - Method in class controller.audio.AudioController
-
Add a new AudioChannel to the controller
- addCount(int) - Method in enum modele.game.entities.StaticEntity
-
Add a number of entities to the total count
- addEdge(Edge) - Method in class modele.editor.Shape
- addHighscore(Score) - Method in class modele.game.Game
-
Add a new Highscore to the current highscores
- addImageAtlas(SpriteID, int, String...) - Method in class controller.view.Sprite
-
Add a new Animation to the sprite
- allGumEaten() - Method in class modele.game.Game
-
Return whether or not the player has eaten every GUM and SUPER_GUM
- animationDuration - Variable in class controller.view.ImageAtlas
- animationStart - Variable in class controller.view.ImageAtlas
- APPLE - modele.game.entities.StaticEntity
- areGhostEaten() - Method in class modele.game.Game
-
Return whether or not one of the ghost is in EATEN State
- areGhostFrightened() - Method in class modele.game.Game
-
Return whether or not one of the ghost is in FRIGHTENED State
- atlasMap - Variable in class controller.view.Sprite
- AudioChannel - Class in controller.audio
- AudioChannel(String, boolean) - Constructor for class controller.audio.AudioChannel
- audioChannels - Variable in class controller.audio.AudioController
- audioController - Variable in class controller.input.InputController
- audioController - Variable in class controller.view.ViewController
- AudioController - Class in controller.audio
- AudioController() - Constructor for class controller.audio.AudioController
- AudioID - Enum in controller.audio
- AudioID() - Constructor for enum controller.audio.AudioID
All Classes All Packages


{% extends "base.html" %} {% block content %}
You've successfully signed up for ContactOtter. Give us a little bit while we finish setting up your account, and you'll receive an email when everything is ready.


'Bread' or 'Butter' set for Trump pardon at annual turkey ceremony
by Sommer BrokawNov. 25 (UPI) -- President Donald Trump will pardon one of two turkeys on Tuesday -- either Bread or Butter -- during the traditional White House ceremony.
The pair are from North Carolina and made their public debut Monday, as they were welcomed to Washington, D.C.'s Willard InterContinental Hotel.
The turkeys will stay at the luxury hotel until Tuesday's Turkey Pardoning Ceremony at 2 p.m. EST. Last year, the turkeys were Peas and Carrots -- with Peas getting the pardon. As all turkeys do following the American custom, Bread and Butter will both retire to the Gobblers Rest farm in Blacksburg, Va.
"They're very comfortable - - had a wonderful night's stay with us," hotel General Manager Markus Platzer said.
National Turkey Federation Chairman Kerry Doughty said Trump and the first lady helped choose the turkeys' names from a list of about 15 potentials. The White House has created a poll online in which voters decide which will be famously pardoned on Tuesday.
Farmer Wellie Jackson, who drove the turkeys from North Carolina to the White House, said they were raised like any other turkey but were specially trained how to handle such a public ceremony.
The White House tradition dates back to President Abraham Lincoln's administration.


Please, provide as much information as possible about your setup and the circumstances leading to the problem. Try running diagnostics or Project>Repair. We will try to get back to you as soon as possible.


class InterSliceScheduler:
Basic inter slice scheduler. It implements Round Robin algorithm.
| Method | __init__ |
Undocumented |
| Instance Variable | bw |
Undocumented |
| Instance Variable | FR |
Undocumented |
| Instance Variable | nRBtable |
Undocumented |
| Instance Variable | PRBs |
Undocumented |
| Instance Variable | slices |
Undocumented |
| Instance Variable | dm |
Undocumented |
| Instance Variable | dbFile |
Undocumented |
| Instance Variable | tdd |
Undocumented |
| Instance Variable | granularity |
Undocumented |
| Method | resAlloc |
This method implements Round Robin PRB allocation between the different configured slices. This is a PEM method |
| Method | createSlice |
This method creates a slice and stores it in the slices dictionary. |
| Method | printSliceConfig |
This method stores inter slice scheduling debugging information on the log file. |
This method implements Round Robin PRB allocation between the different configured slices. This is a PEM method


How is it in uk about reactive power charges ? Here up to 20% is free for consumers, but businesses need to either compensate or pay for kVar:s.
As it can be measured as difference between apparent and real power would like to know how accurate the current algorithms are in calculating apparent power. So far a lot of info about real power calculation is made avail here so guess its fairly accurate.
Re: True and reactive power
There is no charge for VAr to domestic users in the UK. Only real power is charged.
To properly measure var, you need to phase shift voltage by 90° and then do the same calculation as you do for real power. Reactive power (when I was taught it was called "imaginary power" - a much better description because it is VA resolved on the imaginary axis) is not the difference between apparent power and real power - remember the vector diagrams:
P2 + VAR2 = VA2
The calculations are essentially as accurate as the calibration of the sensors and the resolution of the ADC. There will be small rounding errors in the maths but these will be orders of magnitude smaller.
Re: True and reactive power
Was thinking more from the standpoint of using Vrms and Irms to calculate PF. As there is some delay in reducing the bias voltage by various filters this promotes some error in the currently available scripts.
Alternatively one could measure the max AD volts point for a CT and get a phase angle compared to maximum Volts AD.
Not all the devices are fully inductive (90 degrees) so dont know if that would work ?
Re: True and reactive power
You need to look at the definition of power factor. The text book equation power factor = cosφ only applies to a text book perfect sine wave. The definition has nothing to do with phase angles, nor timing differences, and is the ratio of real power to apparent power, which is exactly as emonLib calculates it. Therefore it works for real world voltage and current waveforms.
But you originally wanted reactive power - var - did you not? The only way to measure that accurately, as I wrote above, is (assuming the voltage phasor is the reference and aligned with the real axis) to resolve the current vector into the real and imaginary components. And to do that, you need a reference shifted 90 ° from the real axis.


A div! It is half the width of the viewport and a third the height. Six of them could create a full-viewport UI.
A paragraph which follows the single
div
we actually have in this example.


--- layout: post status: publish published: true title: Internet Gentle Flex - Episode 8.02 author: display_name: Corey Fineran login: Corey email<EMAIL_ADDRESS>url: '' author_login: Corey author_email<EMAIL_ADDRESS>wordpress_id: 11693 wordpress_url: http://ivyenvy.com/?p=11693 date: '2016-02-28 22:33:34 +0000' date_gmt: '2016-02-29 04:33:34 +0000' categories: - Podcast tags: [] comments: [] ---
On this episode of the podcast, we celebrate our podcast birthday by talking about the 2016 Cubs Spring Training storylines that interest us the most.
We also talk about Dexter Fowler signing with the Cubs and the trade that sent Chris Coghlan to the A's.
Our Spring Training meet-up is just a few weeks away. You can find details here: Ivy Envy Spring Training Meet-up


Patrons
Sivaji Bandyopadhyay
Director, NITS
Rahul D. Mishra
Dean(SW), NITS
Conveners
Anirban Roy
Vice President
Ankan Kishore Pathak
General Secretary
Chief Coordinator
Abhinav Asthana
General Secretary Technical
Executive Heads
Shivam Singh
Executive Head
Mridupawan Deka
Executive Head
Kunal Sarkar
Executive Head
Technical
Nitish Dash
Technical Head
Samim Jahin
Technical Coordinator
Manabendra Das
Infra Head
Deep Das
Content Head
Nilpaban Nath
Decoration Head
Publicity and PR
Mayukh Paul
Publicity And PR Head
Bikash Nath
Publicity And PR Head
Debaditya Kashyap
Publicity Head
Management
Bhaskar Ganguli
Management Head
Pallab Bor Gohain
Management Head
Monish Revuri
Management Head
Marketing
Prabhu Datta Mohanty
Marketing Head
Tejash Prakash
Marketing Head
Web Team
Abdullah Khilji
Web Developer
Tukan Dutta
Web Developer
Basabee Bora
Web Developer
Design
Samim Jahin
Design Head
Priyam Bhardwaj
Design Head
Design Team
Makarand Patil
Designer
Tushar Agarwal
Designer
Ashapriya Borgohain
Designer
Akashjyoti Hazarika
Designer
Dixita Sarkar
Designer
Patrons
Conveners
Coordinator
Executive
Technical
Heads
Publicity
Management
Marketing
Web
Design
Designers


Event subprocesses
A event subprocess is embedded within the parent process, used to handle exceptions. It can be started with a timer event, a signal, or an error event from the parent process, or with a signal or message event from another pool. When the event subprocess starts, the parent process is aborted. If the parent process is a called process, flow returns to its parent process, which continues to execute in parallel with the event subprocess. An event subprocess has access to all the process variables of the parent process in which it is embedded. No data mapping is required.
Define an event subprocess
To define an event subprocess:
- Select the event subprocess icon in the BPMN elements menu and drag it into the process pool (in the same lane as part of the process or in a separate lane).
- Configure the name of the event subprocess.
- Select the + symbol in the event subprocess element to expand the process drawing space. You can expand it further if necessary, by dragging the lower right corner of the event subprocess outline.
- Add a start event. This must be a start message, start timer, or start error.
- Configure the start event with the condition that triggers the event subprocess. For example, to handle an error case, configure a start error event that is triggered by a error thrown by an end error event on a task.
- Add the steps needed in the subprocess.
- Add an end event.
When the event subprocess diagram is complete, you can hide it by clicking the - symbol. This collapses the event subprocess to a single element in the process diagram. The element shows the name of the event subprocess and the type of its start event.


Bureau d'études Cloud & Docker🔗
Objectives of this BE🔗
This Bureau d'études (BE, for short) will guide you through the essential notions to be able to manipulate with regard to cloud computer and docker,
We will illustrate the following:
- Creation and ssh connection to virtual machine instances
- Usage of managed storage capabilities
- Creating your own docker images
- Exchanging docker images through a Container Registry
- Pulling and running docker images created by your teammates
In particular, this workflow:
Warning
Please read all the text in the question before executing the step-by-step instructions because there might be help or indications after the instructions.
How to run this BE🔗
There are two ways of interacting with google cloud platform,
- Locally with the google-cloud-sdk (4G network & gcloud installed)
- With the web-based Google Coud Shell
We will be using the gcloud
CLI in Google Cloud Shell or the gcloud sdk for the following:
- Create a GCE Virtual Machine
- Connect to SSH with port forwarding to said machine
The rest will be done from the virtual machine except web preview that you can do from your browser
Warning
If you are on ISAE-EDU, using the google-cloud-sdk will not work, you will have to use your web browser exclusively
For the rest of this walkthrough, if it is written "from your local machine", this will be either your web browser, or your laptop's terminal or google cloud shell
If it is written "inside the VM", this means that you have to run the SSH tunnel first...
🙏🏻 Use Google Chrome without any ad blockers for console.cloud.google.com if you have any issues
Warning
⚠ ISAE-EDU is tricky and may prevent you from correctly connecting
⚠ Remember that you may be often disconnected of cloud shell so using the cloud sdk locally is often easier :)
Team composition🔗
You should be in team of 5, however this will work with a minimum of 2 people. Designate a "project manager" (the person who is the most comfortable with the google cloud platform UI). She or He will have the hard task of giving access to his/her GCP project to the other team members to enable collaboration.
This means that the project of the "team leader" will be billed a little more for the duration of this BE, so please be kind with the project and apply good cloud hygiene :)
Each team member picks a different cute mascot and remembers it:
- 🐈 cat
- 🐕 dog
- 👽 (baby) yoda
- 🦉 owl
- 🐼 panda
You should get access to a slack channel to collaborate; use it extensively :)
1 - Share access to projects🔗
- The "project manager" must give access to his/her teammates using the IAM menu
- Add each team member by email address as editor (Quick Access -> Basic -> Editor) by following this tutorial
- Each member should then see in their respective project list the new project
Warning
This means that only one project will be billed. The project manager can remove accesss to the other teammates when the BE is finished. Do not forget to apply proper cloud hygiene and delete your instances when you are finished, even if you are not paying !
2 - Create Google Compute Engine VM🔗
Each team member creates a separate machine on the same project,
Here, you will create a Google Compute Engine instance, preconfigured with everything you need,
If you use the CLI (either your local google cloud sdk or google cloud shell), you can use this
First, set a variable with the name of your instance,
export INSTANCE_NAME="be-cloud-mascot" # RENAME THIS !!!!!!!!!!
Then create your VM
gcloud compute instances create $INSTANCE_NAME \
--zone="europe-west4-a" \
--machine-type="n1-standard-2" \
--image-family="common-cpu" \
--image-project="deeplearning-platform-release" \
--maintenance-policy=TERMINATE \
--scopes="storage-rw" \
--boot-disk-size=50GB
If you use the web interface, follow this
Question
Describe concisely (on slack) to your past self (before the pandemic) what is a Virtual Machine
and what is Google Compute Engine
3 - Connect using SSH to the instance🔗
Option A with google cloud sdk🔗
If you are using the google cloud sdk, you can connect to ssh using the usual command (refer to the first hands-on) with SSH Tunneling
Tunnel the following ports to your local machine:
- 8080: This is reserved for a jupyter lab session by default, it makes it easy to see & edit text
- 8081: You will neeed to run containers and expose them on a port
Hint
gcloud compute ssh {user}@{instance} -- \
-L {client-port}:localhost:{server-port} \
-L {client-port-2}:localhost:{server-port-2}
Go to your browser and connect to http://localhost:8080, you should be in a jupyter lab where you can access a terminal, a text editor etc... this will make your life simpler.
Option B with the web browser (& google cloud shell)🔗
If you can't SSH using the command line you will need to either
- Use the in-browser SSH capabilities to connect to your instance (but that does not allow port forwarding so your life will be harder later on)
- Make a SSH tunnel between Google Cloud Shell and your VM with port forwarding AND use the web preview on port 8080 to access jupyter lab (and the web preview on port 8081 later on)
Question
Describe concisely (on slack) to your past self (before the pandemic) what is a SSH Tunnel and what is port forwarding
4 - Get the necessary resources from Google Cloud Storage🔗
The resources are located at the URI gs://fchouteau-isae-cloud/be/${MASCOT}
,
Your ${MASCOT}
name is either:
- cat
- dog
- owl
- panda
- yoda
I advise you to export MASCOT=....
to remember it :)
ONLY DOWNLOAD your mascot resources (no cheating ! this will only cause confusion later)
Download them to your instance using the gcloud cli (refer to your previous work for more information)
Hint
gsutil -m cp -r {source} {destination}
Go to (cd
) the folder where you downloaded your resources
You should see a file structure like this
fchouteau@be-cloud-mascot:~/be$ tree yoda -L 2
yoda
├── app.py
├── AUTHOR.txt
├── Dockerfile
├── favicon.ico
├── imgs
│ ├── 1.gif
│ ├── 2.gif
│ ├── 3.gif
│ ├── 4.gif
│ └── 5.gif
└── template.html.jinja2
1 directory, 10 files
5 - Build your docker image🔗
Question
- Look at the
Dockerfile
(cat Dockerfile
), what does it seem to do ? - Look at
app.py
(cat app.py
). What is Flask ? What does it seem to do ?
- Edit the file
AUTHOR.txt
to add your name instead of the placeholder - Refer to your previous work to build the image
Danger
On which port is your flask app running ? (cat Dockerfile
)
Note it carefully ! You will need to communicate it to your teammate :)
Hint
To edit a file, it's easier if you are on jupyter lab...
Otherwise you can still use nano
or vim
Here a VIM tutorial https://www.openvim.com/, good luck with that
Otherwise it's simple (or not): vim {file}, switch to edit mode (type :edit
), edit your line, ESCAPE
then exit VIM like this :wq!
Nano is easier ! https://linuxize.com/post/how-to-use-nano-text-editor/
- When building the image, name it appropriately... like
eu.gcr.io/${PROJECT_ID}/webapp-gif:${MASCOT}-1.0
!

REPOSITORY TAG IMAGE ID CREATED SIZE
eu.gcr.io/{your project}/{your-app} 1.0 d1c5993848bf 2 minutes ago 62.1MB
Question
Describe concisely (on slack) to your past self (before the pandemic) what is a Docker Image
6 - Push your Docker image in the Container Registry🔗
-
Help your team mates so that everybody can build his/her Docker Image
Question
Describe succintly (on slack) to your past self (before the pandemic) what is a Container Registry
In the end, things should look like this
7 - Pull Docker Images from your teammates🔗
-
Select another mascot and pull the corresponding docker image from the registry
-
List the docker images you have. You should have at least 2 including yours
8 - Run Docker Containers from their Docker Images🔗
-
Run your container while mapping the correct port to your VM 8081. Which port is it ? Well, ask the one who built the image.
-
When running the container, setup the
USER
environment variable to your name !
Hint
the port is not the same as yours
if you don't set the username, it will show later ;)
9 - Display the results & share them🔗
-
TECHNICALLY you just launched a webapp on the port 8081 of your remote instance.
-
If you have a ssh tunnel directly from your laptop, ensure that you made a tunnel for your port 8081 to any port of your machine then, go to
http://localhost:(your port)
inside your browser. The resulting webpage should appear -
If you are using google cloud shell, open web preview on port 8081 (you should have a tunnel running between your google cloud shell and your instance)
Success
- The webpage should show the mascot your chose to run
- The webpage should show the name of the author (not you)
- The webpage should show your name
Bug
If any of the three item above are missing, find the bug and solve it :)
Example
Try to refresh the webpage to make more gifs appear
Share your result on slack
10. Cleanup the GCP project🔗
- Remove your VMs
- Remove images from the container registry
Success
🎉 you have successfully finished the BE. You know how to manipulate the basic notions around cloud computing and docker so that you won't be completely lost when someone will talk about it
If you have time left on your hands, do the Kubernetes TP !