>directly knows the people involved in a project and has for years
>says 'fek asking them how'
>consults goggle instead(edited)
kmdkrazy21-Nov-19 02:41 PM
did want to ask dumb questions - ended up looking more dumb(edited)
ComputerGenie 👴👴👴21-Nov-19 02:41 PM
I ask dumb questions all the time
kmdkrazy21-Nov-19 02:41 PM
deal
ComputerGenie 👴👴👴21-Nov-19 02:41 PM
even ones I should already know the answers to
never be afraid to ask anything, especially here; one of the main things we need to do is be able to help people from all levels of knowledge
kmdkrazy21-Nov-19 02:44 PM
the last time I used the repo was probably in April - testing ducks or something like that
im on the right page now
ComputerGenie 👴👴👴21-Nov-19 02:45 PM
Oszy21-Nov-19 02:47 PM
just realized our channel was moved up
nice
ComputerGenie 👴👴👴21-Nov-19 02:48 PM
?
Oszy21-Nov-19 02:49 PM
moved from ecosystem to incubation & consultation
+ 4 new channels
ComputerGenie 👴👴👴21-Nov-19 02:49 PM
because the<PHONE_NUMBER>0000000 we had wasn't enough?
Oszy21-Nov-19 02:52 PM
when we grow it's better to keep things separate. you know it's a chaos in this channel when there's something going on
ComputerGenie 👴👴👴21-Nov-19 02:52 PM
and the 1st post is spam
Oszy21-Nov-19 02:52 PM
did you see that site? i thought my eyes went half blind
ComputerGenie 👴👴👴21-Nov-19 02:53 PM
when we grow it's better to keep things separate.
until it's not because people don't want to keep switching back and forth through 4 channels to have 2 conversations about one project
i thought my eyes went half blind
s-nomp, iirc
Oszy21-Nov-19 02:53 PM
the blurring is s-nomp feature?
SHossain21-Nov-19 02:54 PM
css
ComputerGenie 👴👴👴21-Nov-19 02:54 PM
blurring?
Oszy21-Nov-19 02:54 PM
i know it's css, but what's the purpose of that idk
hover over anything CG
SHossain21-Nov-19 02:54 PM
the purpose is to amuse you or the users
Oszy21-Nov-19 02:55 PM
not amused
ComputerGenie 👴👴👴21-Nov-19 02:55 PM
oh, you mean on the portal page, I thought you meant the actual pool
on the plus side, it'll take him days to add LABS to his pool (if he even can), so he will not spam here soon (edited)
1
YaKorshun | mnshare.info21-Nov-19 04:12 PM
hello, please add my pool from explroer kmdice
hex:6d6e73686172652e696e666f
pool usr: http://mnshare.info/
wallet: RAr9k8HsoFCTTZksoh11GtHQqkkHyWkeCj
MNshare mining pool long, reosc. pplns and solo pool...
Oszy21-Nov-19 04:18 PM
@ComputerGenie 👴👴👴
ComputerGenie 👴👴👴21-Nov-19 04:18 PM
@YaKorshun | mnshare.info no
Oszy21-Nov-19 04:18 PM
I can't see LABS
so don't spam here please
ComputerGenie 👴👴👴21-Nov-19 04:20 PM
I can't see LABS
because it will not work on a stock pool stratum
CHMEX21-Nov-19 04:41 PM
added if that is what he means
ComputerGenie 👴👴👴21-Nov-19 04:41 PM
@CHMEX he doesn't even have a working LABS pool
Oszy21-Nov-19 04:42 PM
he linked kmdice
1
ComputerGenie 👴👴👴21-Nov-19 04:42 PM
he's only sorta got KMDICE and RFOX pools working(edited)
CHMEX21-Nov-19 04:43 PM
yeah my bad I have that kmdice channel muted
ComputerGenie 👴👴👴21-Nov-19 04:44 PM
CHMEX21-Nov-19 04:44 PM
that pool mines like 99% of the blocks...
ComputerGenie 👴👴👴21-Nov-19 04:45 PM
because he put his own hash on it against the 14.03 KSol/s that has been
Oszy21-Nov-19 04:45 PM
440k
lel
CHMEX21-Nov-19 04:45 PM
just burning hash for silly
ComputerGenie 👴👴👴21-Nov-19 04:45 PM
yes
CHMEX21-Nov-19 04:47 PM
ok there is 7.29 USD to be made
maybe its that
ComputerGenie 👴👴👴21-Nov-19 04:47 PM
I just had a BM PSU that's 2 years old go dead in the last hr
Oszy21-Nov-19 04:47 PM
2 loaf of bread
ComputerGenie 👴👴👴21-Nov-19 04:48 PM
there is 7.29 USD to be made
on KMDICE? where?
CHMEX21-Nov-19 04:48 PM
and another 136KMD on the the KMD pair
>>there is 7.29 USD to be made
KMDICE / BTC pair on altbits
ComputerGenie 👴👴👴21-Nov-19 04:48 PM
for the whole pair?
CHMEX21-Nov-19 04:49 PM
ComputerGenie 👴👴👴21-Nov-19 04:49 PM
dumps and takes the full $7
CHMEX21-Nov-19 04:49 PM
some more on KMD
Alright21-Nov-19 04:50 PM
blows my mind that this coin still exists
CHMEX21-Nov-19 04:50 PM
136KMD¨ I guess
ComputerGenie 👴👴👴21-Nov-19 04:50 PM
blows my mind that this coin still exists
being abandoned has privileges
Alright21-Nov-19 04:53 PM
@siu - Chainmakers@jorian can I kill it?
that 571 KMD would do well in the LABS dev fund
jorian21-Nov-19 04:54 PM
Blows my mind that people mine it and trade it
Alright21-Nov-19 04:54 PM
probably because you told them to?
CHMEX21-Nov-19 04:54 PM
you have 72m?
ComputerGenie 👴👴👴21-Nov-19 04:55 PM
One of these things is not like the other
jorian21-Nov-19 04:55 PM
Since when do people have to listen to someone to mine and trade something
Alright21-Nov-19 04:55 PM
Ah no, hadn't looked at volume
no one does
jorian21-Nov-19 04:55 PM
Well then
Alright21-Nov-19 04:55 PM
well it went from "this is a real coin" to "this is a test coin" with no notice
ComputerGenie 👴👴👴21-Nov-19 04:56 PM
blames DP (or whatever new name TripleX gave it)(edited)
Alright21-Nov-19 04:56 PM
also, it's a "test coin" with a CEX market
ComputerGenie 👴👴👴21-Nov-19 04:59 PM
there's a CEX market for many coins that have been abandoned (some as long as 5 years back)
ComputerGenie 👴👴👴21-Nov-19 05:53 PM
so, if there's a market for a test coin, does that mean it passed the test?
PHBA206121-Nov-19 05:58 PM
didn't notice that we just have 3-4 more channels for LABS
ComputerGenie 👴👴👴21-Nov-19 06:00 PM
yes, we do
PHBA206121-Nov-19 06:06 PM
let's hope they will be put into use
jorian21-Nov-19 07:24 PM
what branch is labs on lately?
i still have many_iguana
or should this go in #labs-dev(edited)
PHBA206121-Nov-19 07:44 PM
should rather be in #labs-support probably
I'm on master though(edited)
CHMEX21-Nov-19 08:03 PM
just heads up most of my explorers are down atm incl LABS because of some hardware failure
CHMEX21-Nov-19 08:11 PM
and back
ComputerGenie 👴👴👴21-Nov-19 08:17 PM
hates whomever split LABS into 897000 different channels
jorian21-Nov-19 08:21 PM
probably because @Alright wanted it
ComputerGenie 👴👴👴21-Nov-19 08:21 PM
well, then, fek him too
daemonfox21-Nov-19 08:48 PM
LMAO wtf is happening here?!?
i go away for a day and wow
phm8721-Nov-19 08:52 PM
maybe this channel will be deleted/archived in a near future and only the 4 #labs-* channels will remain ... our future is very vague and unknown(edited)
Do we still have access to the private channel of KMDLabs notaries ? I'll check ... edit: yes, it still exists and we still have access ^^(edited)
ComputerGenie 👴👴👴21-Nov-19 09:12 PM
LMAO wtf is happening here?!?someone decided we needed 1 channel for every active person (edited)


{% extends 'common/base.html' %} {% block body %} 404 Sorry, page you were looking for doesn't exist. Go back to Homepage {% endblock %}


Amos 7:5
Then said I, O Lord GOD, cease, I beseech thee: by whom shall Jacob arise? for he is small.


There are [loading...] on thread comment-count-thread-1.html.
comment-count-thread-1.html
[loading...]
There are [loading...] on thread comment-count-thread-2.html.
comment-count-thread-2.html


--- layout: post title: Rails is moving from SVN to Git categories: - edge author: David published: true date: 2008-04-02 21:39:00.000000000 +01:00 ---
We’ve been preparing for Rails to move the official source repository from Subversion to Git for some time now and it seems that it’ll happen over the next week or so. The premiere will happen alongside the official launch of Github.
The move will also mean that we’re going to be switching ticket tracking to Lighthouse. So now both our repository and ticket tracking will be powered by Rails applications, which is a nice bonus treat.
When the move happens, we’ll freeze the existing Subversion repository and the Trac installation. Both will live on for a long time to come, but will be entirely deprecated. This means that your existing svn:externals will not break, but if you want the latest edge, you’ll have to get it from the new git repository.
So now is a great time to learn more about Git in anticipation of this move. I recommend starting with the Git for SVN’ers crash course.


What are flamegraphs?
Flame graphs
are an invention of Brendan Gregg, a profiling
extraordinaire,
that make it simple to observe the amount of time in each
part of a system's call stack. The X axis shows the calls on
the stack (alphabetically, not in time order) and the Y axis
is the depth of the call stack. The wider the frame, the
more time was spent in it and it's descendants. For this
tool, the size is directly proportional to the elapsed
execution time (in microseconds).
As an example, you can view the trace of an application that
performs database calls in the
onCreate of an
activity
here.
How do I generate a trace file?
To gather traces, use the
Debug#{start,stop}MethodTracing
calls to generate a trace file. Place the call to start
tracing before the code under test, and the call to stop
tracing directly after. Keeping the profile fairly short
will help keep it readable.
If you experience too much of a performance degradation
from the tracing overhead to get a good output, you may
want to try the
startMethodTracingSampling
call available on Android APIs 21 and up. It is
significantly lower overhead, but due to the nature of a
sampling profiler may miss some data.
As an example, here is how one would instrument the
onCreate method of an activity in order to determine what
is causing slow starts:
private static final int MEGABYTE = 1024 * 1024;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Call the resulting trace file 'onCreate.trace', and allow a 128MiB
// buffer for collecting trace data.
Debug.startMethodTracing("onCreate", 128 * MEGABYTE);
// Existing onCreate code
[...]
// Stop method tracing
Debug.stopMethodTracing();
}
I'd like to know more
Feel free to read either the
write-up I
have on the format of the trace file and how it is
converted to a format the flamegraph tool understands, or
read the
source
on Github to see for yourself.


Preparation time
1-2 hours
Cooking time
30 mins to 1 hour
Serves
Serves 8-10
Dietary
To make the pastry, place the flour, butter, salt and icing sugar into a food processor and pulse until it begins to look like breadcrumbs.
Add the milk and egg yolks and pulse again until it comes together as a dough.
Turn the dough out onto a floured work surface and roll out to a diameter 5cm/2inches larger than that a 28cm/11inch tart case. Push the pastry into the base of the tart case, leaving excess hanging over the sides, and transfer to the fridge to chill for at least 30 minutes.
Preheat the oven to 180C/350F/Gas 4.
Line the chilled pastry case with aluminium foil and cover with rice or baking beans. Transfer to the oven to bake for 20 minutes, then remove the rice or beans and foil. Brush the pastry with the egg wash and return to the oven to bake for a further ten minutes, until golden brown. Remove from the oven and trim off the excess pastry with a sharp knife. Leave to cool.
Reduce the heat of the oven to 170C/340F/Gas 3.
For the filling, place 200g/7oz of the sugar and the water into a saucepan and heat gently until the sugar dissolves.
Add the passion fruit juice, stir well, then remove from the heat and allow to cool.
In a bowl, whisk the eggs with the remaining sugar, until pale and light, then add the cream.
Using a slotted spoon, remove three-quarters of the passion fruit pulp from the syrup and add to the cream mixture along with a tablespoon of the cooled passion fruit juice mixture. Reserve some of the remaining juices to use as extra sauce.
Pour the egg and cream mixture into the cooked tart case, then transfer to the oven on the middle shelf to bake for about 40 minutes, or until the filling has almost set. It should still be a little bit wobbly, but will carry on cooking after it is removed from the oven and will set.
To serve, dust the tart with icing sugar and drizzle with a spoonful of the remaining sauce.


this is a paragraph
this is another paragraph with 2 spaces
Paragraph character is written like <p> this
Pound character is written like this £
Copyright character is written like this ©
1/4 is written like this ¼
Empty character is written like this


qiskit.backends.ibmq.ibmqprovider module¶
Provider for remote IBMQ backends with admin features.
Members¶
Classes¶
IBMQProvider |
Provider for remote IBMQ backends with admin features. |
Reference¶
-
class
qiskit.backends.ibmq.ibmqprovider.
IBMQProvider
[source]¶ Bases:
qiskit.backends.baseprovider.BaseProvider
Provider for remote IBMQ backends with admin features.
This class is the entry point for handling backends from IBMQ, allowing using different accounts.
-
active_accounts
()[source]¶ List all accounts currently in the session.
Returns: - a list with information about the accounts currently
- in the session.
Return type: list[dict]
-
backends
(name=None, filters=None, **kwargs)[source]¶ Return all backends accessible via IBMQ provider, subject to optional filtering.
Parameters: - name (str) – backend name to filter by
- filters (callable) – more complex filters, such as lambda functions e.g. IBMQ.backends(filters=lambda b: b.congiguration[‘n_qubits’] > 5)
- kwargs – simple filters specifying a true/false criteria in the backend configuration or backend status or provider credentials e.g. IBMQ.backends(n_qubits=5, operational=True, hub=’internal’)
Returns: list of backends available that match the filter
Return type: list[IBMQBackend]
Raises: IBMQAccountError
– if no account matched the filter.
-
delete_accounts
(**kwargs)[source]¶ Delete saved accounts from disk, subject to optional filtering.
The filter kwargs can be token, url, hub, group, project. If no filter is passed, all accounts will be deleted from disk.
Raises: IBMQAccountError
– if no account matched the filter.
-
disable_accounts
(**kwargs)[source]¶ Disable accounts in the current session, subject to optional filtering.
The filter kwargs can be token, url, hub, group, project. If no filter is passed, all accounts in the current session will be disabled.
Raises: IBMQAccountError
– if no account matched the filter.
-
enable_account
(token, url='https://quantumexperience.ng.bluemix.net/api', **kwargs)[source]¶ Authenticate and use one IBMQ account during this session.
Login into Quantum Experience or IBMQ using the provided credentials, adding the account to the current session. The account is not stored in disk.
Parameters: - token (str) – Quantum Experience or IBM Q API token.
- url (str) – URL for Quantum Experience or IBM Q (for IBM Q, including the hub, group and project in the URL).
- **kwargs (dict) –
- proxies (dict): Proxy configuration for the API.
- verify (bool): If False, ignores SSL certificates errors
-
load_accounts
(**kwargs)[source]¶ Load IBMQ accounts found in the system into current session, subject to optional filtering.
Automatically load the accounts found in the system. This method looks for credentials in the following locations, in order, and returns as soon as credentials are found:
- in the Qconfig.py file in the current working directory.
- in the environment variables.
- in the qiskitrc configuration file
Raises: IBMQAccountError
– if no credentials are found.
-
save_account
(token, url='https://quantumexperience.ng.bluemix.net/api', **kwargs)[source]¶ Authenticate against IBMQ and save the account to disk for future use.
Login into Quantum Experience or IBMQ using the provided credentials, adding the account to the current session. The account is stored in disk for future use.
Parameters: - token (str) – Quantum Experience or IBM Q API token.
- url (str) – URL for Quantum Experience or IBM Q (for IBM Q, including the hub, group and project in the URL).
- **kwargs (dict) –
- proxies (dict): Proxy configuration for the API.
- verify (bool): If False, ignores SSL certificates errors
-


You fire a p iece of nonmagical ammunition from a ranged weapon or throw a nonmagical w eapon into the air and choose a point within range. Hundreds of duplicates of the ammunition or weapon fall in a volley from above and then disappear. Each creature in a 40-foot-radius. 20-foot-high cylinder centered on that point must make a Dexterity saving throw. A creature takes 8d8 damage on a failed save, or half as much damage on a successful one. The damage type is the same as that of the ammunition or weapon.


--- title: Path Assessment slug: student-path-assessment submenuClass: m-0 --- {% extends "layouts/website-account.html" %} {% block pageHeader %}{% endblock %} {% block beforePage %} {% include 'pages/_path-assessment.path-navbar.html' %}
Measure your skill to find out where to start.


jQuery
Introduction
jQuery is a popular Javascript library for a whole range of page manipulations that are difficult or impossible with HTML or CSS. Usually we use it to create animations or alter the contents of a page without reloading it. Remember that these manipulations are only altering the page as it exists in the memory of the browser. If you reload the page, you’ll reset everything back to the way it was.
jQuery can involve up to three chunks of Javascript, and they need to be loaded via the
), who host it for the rest of the internet to use. This works fine, but if Google ever takes the file down, the functionality on this page would break. The library itself is really only comprehensible for the browser: you never need to look at it or edit it. - Second we have a jQuery plugin:

; this is a Javascript file I downloaded from the developer’s website and am loading locally. Plugins are only necessary for fancier jQuery effects: in our case it’s just the lightbox effect (Part 3) that requires it. - Finally we always write jQuery code that is specific to our page and the effects we want. Often you will see this written in the HTML page between


Async Class
Asynchronous command runner class.
Item Index
Properties
- commands static
Methods
_runAll
-
success
-
run
Command function for all mode.
Parameters:
-
success
Function -
run
[AsyncCommand]
_runAll
-
success
-
run
-
index
-
value
Command function for queue mode.
Parameters:
-
success
Function -
run
[AsyncCommand] -
index
Number -
value
Array
run
()
chainable
Execute the command function.
runAll
()
Async
static
Creates and runs an instance of Async in 'all' mode. This method accepts an unlimited number of arguments. Arguments can be command functions, AsyncCommand config objects, instances of AsyncCommand, instances of Async, or arrays containing any of the above.
Returns:
runAllWithConfig
()
Async
static
Creates and runs an instance of Async in 'all' mode. This method accepts an unlimited number of arguments. The first argument is a config object passed to the AsyncCommand constructor when instantiating dynamically. The rest of the arguments can be command functions, AsyncCommand config objects, instances of AsyncCommand, instances of Async, or arrays containing any of the above.
Returns:
runQueue
()
Async
static
Creates and runs an instance of Async in 'queue' mode. This method accepts an unlimited number of parameters. Parameters can be command functions, AsyncCommand config objects, instances of AsyncCommand, instances of Async, or arrays containing any of the above.
Returns:
runQueue
()
Async
static
Creates and runs an instance of Async in 'queue' mode. This method accepts an unlimited number of parameters. The first argument is a config object passed to the AsyncCommand constructor when instantiating dynamically. The rest of the arguments can be command functions, AsyncCommand config objects, instances of AsyncCommand, instances of Async, or arrays containing any of the above.
Returns:
Properties
commands
Object
static
This is a static object that stores named command definitions for repeat use. This object's keys are the names of commands. The values can either command functions or AsyncCommand config objects.
Attributes
args
Array
protected
The inherited args attribute is protected.
Default: []
Fires event argsChange
Fires when the value for the configuration attribute args
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
completed
Boolean
Boolean value indicating the completed status of the command.
Default: false
Fires event completedChange
Fires when the value for the configuration attribute completed
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
config
Object
A config object passed to the AsyncCommand constructor when instantiating dynamically.
Default: {}
Fires event configChange
Fires when the value for the configuration attribute config
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
ctx
protected
The inherited ctx attribute is protected.
Fires event ctxChange
Fires when the value for the configuration attribute ctx
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
error
Error value passed to the failure event.
Fires event errorChange
Fires when the value for the configuration attribute error
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
failed
Boolean
Boolean value indicating the failed status of the command.
Default: false
Fires event failedChange
Fires when the value for the configuration attribute failed
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
fn
Function
protected
The inherited fn attribute is protected.
Fires event fnChange
Fires when the value for the configuration attribute fn
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
mode
String
Value indicating the run mode. Possible modes are:
- all
- This mode runs all commands. The commands might be completed out of order. The run completes once all commands have completed. The run fails if any command fails.
- queue
- This mode runs one command at a time. It waits for the first command to complete before moving on to the next one. The run completes when the last command has completed. The run fails if a command fails and the remaining commands are not run.
Default: 'queue'
Fires event modeChange
Fires when the value for the configuration attribute mode
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
run
[AsyncCommand]
An array of AsyncCommands to run. Command functions, AsyncCommand config objects, and named command strings will get converted to instances of AsyncCommand.
Default: []
Fires event runChange
Fires when the value for the configuration attribute run
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
started
Boolean
Boolean value indicating the started status of the command.
Default: false
Fires event startedChange
Fires when the value for the configuration attribute started
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
value
Value passed to the success event.
Fires event valueChange
Fires when the value for the configuration attribute value
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
Events
complete
Fired when the command function completes.
failure
protected
Fired when the command function fails.
Event Payload:
-
error
ObjectOptional error value.
start
protected
Fired when the command function starts.
success
protected
Fired when the command function succeeds.
Event Payload:
-
value
ObjectOptional return value from the command function.


404
It looks like you are lost...
Unfortunately, this page does not exist.
Please check your URL
or
Go back to safe place


Source: Brussels Mobility
Evolution per year of the new infrastructure created
The total amount of infrastructure is calculated in kilometers and includes segregated & painted cycle lanes as well as suggested cycle lanes. The Cycle Route Network consists of advisory routes for cyclists wishing to commute medium to long distances. They use calmer streets and less stressful routes. 2003 is an important year, as it saw the creation of a cycle lane on rue de la Loi. It was considered not realistic at the time to take away a car lane to make way for wider sidewalks and cycle lanes. It is now considered insufficient considering the volume of cyclists and pedestrians use the infrastructure.


Chapter 4 Probability and random variables
4.0.1 Probability vs estimation
Here are two quotes from STFS that encapsulate the distinction between probability and estimation:
In probability theory, we think about processes that generate data, and we ask "what can we say about the data generated by such a process?
In statistical estimation and inference, we work in the opposite direction. We start with data, and we ask "what can we say about the process that generated these data?
So, we can define probability as the study of data generated by specified processes - and that’s the focus of this chapter. Later on, when we get to data - we’ll be assuming probabilistic models - but we have to accept the fact that the data we observed were not likely to be generated by the assumed model! But we do the best we can.
4.0.2 What is a probability?
Frequency view
- the probability of a given event is simply the proportion of times it occurs over many trials
- difficult to apply to statements like “what is the probability that it will rain tomorrow” and “what is the probability that a meteor will hit the earth tomorrow” (i.e., one-shot events)
Degrees-of-belief view
- what is the degree of belief in the occurrence of an event that a rational person would have?
An aside: is the universe fundamentally probabilistic or deterministic?
4.0.3 Set notation
A set (\(\Omega\), in STFS) is an unordered collection of objects (elements).
Intersection (\(\cap\)) of two sets is the set of elements that appear in both sets.
Union (\(\cup\)) of two sets is the set that has every element that appears in either of the two original sets.
The complement of a set (\(S^C\)) includes all of the elements not in the original set but present in the sample space (\(\Omega\)) (which contains all possible elements). Subsets are referred to as S, and have the following properties:
\[ \begin{aligned} S \cup S^C = \Omega \\ S \cap S^C = \emptyset \end{aligned} \]
where \(\emptyset\) is used to denote the empty set, or the set with no elements.
A Venn diagram is useful here:
The notation for the probability of an event is typically denoted using either \(P()\) or \([]\):
\[ \begin{aligned} P(event) = [event] \\ \end{aligned} \]
4.1 Kolmogorov’s three axioms of probability
- Probabilities of any event i (\(E_i\)) cannot be negative:
\[ \begin{aligned} \ [E_i] \geq 0 \\ \end{aligned} \]
- The probability of the event that includes every outcome is 1:
\[ \begin{aligned} \ [\Omega] = 1 \\ \end{aligned} \]
- The probability of observing either of two mutually exclusive events is the sum of their individual probabilities:
\[ \begin{aligned} \text{If } E_1 \cap E_2 = \emptyset, \\ \text{then } [E_1 \cup E_2] = [E_1] + [E_2] \end{aligned} \]
4.1.1 Exercise set 4-1
- Given P(\(A\)), we would like to know P(\(A^C\)). We already learned the following properties of complements:
\[ \begin{aligned} A \cup A^C = \Omega \\ A \cap A^C = \emptyset \end{aligned} \] The intersection between \(A\) and \(A^C\) is zero, meaning they don’t share any elements. The union of \(A\) and \(A^C\) is \([\Omega]\). We also learned the 2nd axiom of probability, \([\Omega] = 1\). Therefore:
\[ \begin{aligned} \ [A] + [A^C] = 1 \\ \ [A^C] = 1 - [A] \end{aligned} \]
On paper.
Below I’ve pasted an image of my handwritten version of Edge’s solution - I found it easier to think about once I visualized it using a Venn diagram.
4.2 Conditional probability and independence
The law of conditional probability states that:
\[ \begin{aligned} \ [A \mid B] = \frac{[A \cap B]}{[B]} \\ \end{aligned} \]
If A and B are independent, then:
\[ \begin{aligned} \ [A \mid B] = [A] \\ \end{aligned} \]
4.2.1 Exercise set 4-2
- If we rearrange the law of probability, we get:
\[ \begin{aligned} \ [A \mid B] [B] = [A \cap B] \\ \end{aligned} \]
By definition, if A and B are independent, then we can replace \([A \mid B]\) with \([A]\) and get:
\[ \begin{aligned} \ [A \cap B] = [A] [B] \\ \end{aligned} \]
If we divide both sides by \([A]\), we get:
\[ \begin{aligned} \ [B] = \frac{[A \cap B]}{[A]} \\ \end{aligned} \]
The right-hand side of the above equation is, by the law of conditional probability, equal to \([B \mid A]\) and thus:
\[ \begin{aligned} \ [B] = [B \mid A]\\ \end{aligned} \]
- Suppose you know \([A \mid B]\), \([A]\), and \([B]\). Calculate \([B \mid A]\).
\[ \begin{aligned} \ [A \mid B] = \frac{[A \cap B]}{[B]} \\ \end{aligned} \]
\[ \begin{aligned} \ [A \mid B] [B] = [A \cap B] \\ \end{aligned} \]
\[ \begin{aligned} \ [B \mid A] = \frac{[A \cap B]}{[A]} \\ \end{aligned} \]
\[ \begin{aligned} \ [B \mid A] = \frac{[A \mid B] [B]}{[A]} \\ \end{aligned} \]
4.3 Bayes’ Theorem
4.4 Discrete random variables and distributions
Random variable: e.g., the process of rolling a die, \(X\)
- \(X\) is random, can take integer values 1-6
- \(X\) is not a number yet - it is the unrealized outcome of a random process
- The realization of that process is an instance - which is a number
- Capital \(X\): random variable
- Lower case \(x\): instance
All the probability information is contained in its distribution.
In our case, \(X\) is a discrete random variable, meaning that the number of outcomes is countable, in principle.
Two ways to represent the distribution:
- Probability mass function (pmf), \(f_X(x) = P(X = x)\)
- Cumulative distribution function (cdf), \(F_X(x) = P(X \leq x)\)
The cdf is a series of partial sums of the pmf,
\[ \begin{aligned} F_X(x) = P(X \leq x) = \sum_{x_i \leq x} f_X(x_i) \end{aligned} \] and increases monotonically in \(x\).
4.4.1 Exercise set 4-3
- Flipping a fair coin 3 times. X is a random variable that represents the number of heads observed, and the sample space \(\Omega\) contains the elements {0, 1, 2, 3}. Here are all of the ways we can observe these elements:
x = 0: (T, T, T)
x = 1: (H, T, T); (T, H, T); (T, T, H)
x = 2: (H, H, T); (H, T, H); (T, H, H)
x = 3: (H, H, H)
There are 8 possible instances. Thus, the probability mass function is:
\[ \begin{aligned} f_X(0) =& f_X(3) = 1/8 \\ f_X(1) =& f_X(2) = 3/8 \\ f_X(x) =& 0 \text{ for all other } x \\ \end{aligned} \]
If we sum \(f_X(x_i)\) for all possible \(x_i\), the sum would be 1 (1/8 + 1/8 + 3/8 + 3/8).
In terms of \(F_X\), what is \(P(a \lt X \le b)\), if \(b \gt a\)? Hint: notice that \(a \lt X \le b\) if and only if \(X \leq b\) and \(X > a\).
Note that the cdf, \(F_X\), for \(x = a\) and \(x = b\) are given by the following:
\[ \begin{aligned} F_X(a) =& P(X \le a) \\ F_X(b) =& P(X \le b) \\ \end{aligned} \]
We want the probability of observing a value \(x\) between \(a\) and \(b\), so:
\[ \begin{aligned} P(a \lt X \le b) = F_X(b) - F_X(a) \\ \end{aligned} \]
4.5 Continuous random variables and distributions
What about values that are not countable - anything with a decimal? Impossible to get a specific number, or instance (e.g., the probability a person weighs exactly 70kg), and thus we cannot use the pmf. But we can still use the cdf:
\[ \begin{aligned} F_X(x) = P(X \leq x) \end{aligned} \]
That is, we can ask about the probability that a person will weigh 70kg or less, or whether a person will weigh between 70 and 71kg.
4.5.1 Exercise set 4-4
- \(X\) is a random variable that takes values in the interval [0, 1], and the probability distribution is uniform. Draw the cumulative distribution function \(F_X(x)\) for \(x \in [-1, 2]\).
x <- c(0,1)
Fx <- x
plot(x, Fx, type = "l", xlim = c(-1,2))
lines(c(-1, 0), c(0, 0))
lines(c(1,2), c(1, 1))
- If \(X\) were more likely to land in [0.4, 0.6] than in any other region of length 0.2, the line between 0.4 and 0.6 would be steeper.
4.6 Probability density functions
For a continuous random variable, the pdf is the derivative of the cdf
Recall that the cdf for a discrete random variable is a series of partial sums, given by:
\[ \begin{aligned} F_X(x) = P(X \leq x) = \sum_{x_i \leq x} f_X(x_i) \end{aligned} \]
In an analogous fashion, we can integrate a continuous function to get the cdf of a continous random variable. We define the probability density function \(f_X\) (pdf) of a continuous random variable as:
\[ \begin{aligned} F_X(x) =& \int_{- \infty}^{x} f_X(u) du \\ \end{aligned} \]
Below I have re-created Fig 4-4, with a pdf in the upper panel and a cdf in the lower panel - for an exponential random variable with rate 1.
4.6.1 Additional viz
We can visualize the principle of question 3 from Exercise Set 4-3 using the cdf of a standard normal distribution, where \(a = -1\) and \(b = 1\):
4.6.2 Exercise set 4-5
- If \(f_X(x)\) is a probability density funcion, then total area under \(f_X(x)\) is 1.
- Yes, \(f_x\) can be a probability density funcion, because the area under the function is 1. This situation is different from a probability mass function, because the y-axis values for a pdf can be > 1 (in this case, the maximum y is 10).
4.7 Families of distributions
Two requirements for mass or density functions:
Must be non-negative
Sum of all values is 1 (mass), or area under curve is 1 (density)
Distribution family
- similarly shaped distributions
- summaries of their behavior can be computed from the same functions
- but parameter values differ
4.7.1 Exercise set 4-6
- The probability mass function of the Poisson distribution is \(P(X = k) = \frac{\lambda^k e^{-\lambda}}{k!}\). Plugging in the appropriate values for \(k\) and \(\lambda\) gives:
(i). \(e^{-5}\)
(ii). \(5e^{-5}\)
(iii). \(\frac{25}{2}e^{-5}\)
Use the probability mass function of the geometric distribution with parameter 1/2. If our first “heads” occurs on the 6th flip, then we have five tails before it. We plug \(p\) = 1/2 and \(k\) = 5 into \(P(X = k) = (1-p)^kp\) to get 1/64.
Consider a Poisson distribution with parameter \(\lambda\) = 5. If we want to know the value of the probability mass function for x = 2, \(f_X(2)\), we use the
dpois()
function:
## [1] 0.08422434
To get the value of the cumulative distribution function \(F_X(2)\), we use ppois()
:
## [1] 0.124652
If we want to know the inverse of the cumulative distribution function. That is, we want to know the value of \(q\) that solves the equation \(F_X(q) = p\). What is the number \(q\) such that the probability tha the random variable is less than or equal to \(q\) is \(p\); \(q\) is the \(pth\) percentile of the distribution. We can get this using qpois()
:
## [1] 2
The inverse of the cdf is also called the quantile function. Using the standard normal distribution (mean = 0, sd = 1), plot the probability density function for x \(\in\) [-3, 3].
Plot the cdf for x \(\in\) [-3, 3].
What value of \(x\) is at the 97.5th percentile of the standard normal?
## [1] 1.959964
- Simulating from a normal distribution and from a uniform distribution:
Now take those values between 0 and 1, and feed them into the qnorm
function to get the values at which we see those quantiles:
These values are normally distributed around 0. This plot is saying that most of the probability (in fact ~95%) lies between -2 < y < 2 (2 standard deviations).
r <- seq(-3, 3, length.out = 1000)
cdf <- pnorm(r)
#Draw the normal cumulative distribution function.
plot(r, cdf, type = "l", xaxs = "i", yaxs = "i", xlim = c(-3,
3), xlab = expression(italic(x)), ylab =
expression(paste(italic(F[X]), "(", italic(x), ")", sep = "")),
lwd = 2)
#Draw light grey lines representing random samples from the
#standard normal distribution.
x <- rnorm(100)
for(i in x){
lines(c(i,i), c(min(x), pnorm(i)), col = rgb(190, 190, 190,
alpha = 60, max = 255))
lines(c(min(x)-1,i), c(pnorm(i), pnorm(i)), col = rgb(190,
190, 190, alpha = 60, max = 255))
}
4.7.2 Additional exercise
(Courtesy Blondin & Goodman)
Assume that destructive earthquakes occur in California every 20 years. You’d like to know how probable an earthquake is between now and some future date.
- What distribution family describes the waiting time until California’s next earthquake? What value should we use for this distribution’s parameter? [Hint: convert 20 years to a rate]
Use the exponential distribution, where \(\lambda = 1/20\):
\[ \begin{aligned} f_X(x) = \lambda e ^{-\lambda x} \\ \end{aligned} \]
- What is the probability that an earthquake will happen in the next 10 years? [Hint: You need to find a cumulative distribution function for the distribution you chose, either online or by integration].
Rules for integrating “e raised to the x power”:
\[ \begin{aligned} \int e^xdx =& e^x + c \\ \int e^{ax}dx =& \frac{1}{a} e^{ax} + c \\ \int be^{ax}dx =& \frac{b}{a} e^{ax} + c \\ \end{aligned} \]
With these rules in hand, we can get the cdf by integrating the pdf for the exponential distribution:
\[ \begin{aligned} f_X(x) =& \lambda e ^{-\lambda x} \\ F_X(X = x) =& \int_{0}^{x} \lambda e^{-\lambda x} dx \\ =& \frac{1}{- \lambda} \lambda e^{-\lambda x} \bigg\rvert_{0}^{x} \\ =& -e^{-\lambda x} \rvert_{0}^{x} \\ =& -e^{-\lambda x} \rvert_{0}^{x} \\ =& -e^{-\lambda x} - (-e^{-\lambda 0}) \\ =& -e^{-\lambda x} - (-1) \\ =& 1 -e^{-\lambda x} \\ \end{aligned} \]
Then, plug in \(x = 10\) and \(\lambda = 1/20\):
## [1] 0.3934693
Check to make sure we’ve done this right using the pexp
function in R:
## [1] 0.3934693
- What is the probability that an earthquake will occur between 10 and 20 years from now?
## [1] 0.2386512
- If you have time, write the CDF of your chosen distribution as an R function. It should take a value x and a parameter, and return a probability P(X ≤ x). Use your function to plot the cumulative distribution as a function of x.


Anexture Dev Site
This site will provide information to the developer communitee about the Anexture platform.


In order to pull the Github repository and update the website files, use the Update from Github button. The Update from Zotero allows to fetch a new publication list from the Zotero group, but changes will appear on the website only with the next update from Github. Please do not run both actions simultaneously.


[← Go back to profile]
GPU accelerated vessel segmentation using
Laplacian eigenmaps
with
Lin Cheng,
Peter Yoon and
Jiajia Zhao
Paper presented at
IASTED PDCN (2014)
Poster presented at the
GPU Technology Conference (2013)
Download
Synopsis
Laplacian eigenmap is an image segmentation algorithm
that began to gain traction in recent years. It involves a generalized
eigenvalue problem which extracts high-level features from local
neighborhood information. Unfortunately, it is computationally costly
to compute eigenvalues of a large linear systems. We make use of
general-purpose GPUs to accelerate the segmentation process.
Publication Details
-
Conference Paper:
Lin Cheng, Hyunsu Cho, and Peter Yoon. “GPU Accelerated
Vessel Segmentation Using Laplacian Eigenmaps,”
Proceedings of the IASTED International Conference on Parallel
and Distributed Computing and Networks, pp. 177-184,
Innsbruck, Austria, February 17, 2014.
-
Poster:
Lin Cheng, Hyunsu Cho, Peter Yoon, and Jiajia Zhao. “GPU
Accelerated Vessel Segmentation Using Laplacian Eigenmaps,”
The GPU Technology Conference 2013, San Jose, CA,
March 18, 2013.
[← Go back to profile]


The First Trailer for Infinity Train Book 2 Is Hiding Behind a Devious Puzzle
by Julie MuncyIf you want to ride this ride, you’re going to have to play along.
The excellent, enigmatic Infinity Train is getting ready to roll back around for its second season, Book 2, and Cartoon Network has released a trailer for it. Well, released might be a generous word: you have to do that yourself. The Infinity Train website is presently an enigma: a claw puzzle that, if solved, might yield something interesting.
Questions abound: what do claw puzzles have to do with trains? How do these particular objects relate to each other? Who’s operating this puzzle?
I’m not going to solve the puzzle for you, but I can offer a hint: the deer wants to visit the flower.
I’m also going to talk a little bit about the trailer, so extra special spoiler warning for that:
Ooh. Mysterious. The trailer shows a glimpse of mirror worlds, train-bound carnivals, and other strange dimensions carried within the Infinity Train. There’s also the possibility of escape, but, well, who knows? Book Two seems poised to continue to build out the lore and the enigma of the train, and that’s exciting stuff indeed.
Also, if you want to catch up on Infinity Train, it’s streaming in full for free on the Cartoon Network app this weekend. Check it out!
For more, make sure you’re following us on our Instagram @ io9dotcom .


{%load static%}
Keep Track Of Your Medical History at any time from any where..!!

Get Notified when you forgot to take Medicine on time.Customize the timings of Notifications through Our Website
If You have a doubt in Medical issue,get answer instanly in our Website


Brake Repairs
Have your brakes started to make a high squeel noise? Or are they just not braking as well as they should? Give us a call.
Read MoreWelcome!
SAS Test and Repair
You have found your one stop site for all your car needs.
We offer all vehicle diagnosis. We offer MOT for all makes and models of vehicle too. We also offere Servicing for all makes and models too. Just give us a call and have you make/model and registration to hand.
About Us
We are a friendly and effient small business based in Stoke-on-Trent.  We pride ourselves on our friendly nature as well as our honesty too.
Our Hours:
Monday - Friday: 8:00 am - 5:00 pm
Saturday: 8:30 am - Noon
- SAS Test and Repair,
Florida Close,
Burslem,
Stoke-on-Trent
ST6 2DJ - Telephone: (01782) 815736;
- E-mail:enquiries@sastestandrepair.co.uk


I’ve decided to start using Smartsteem for content promoting via the @smartmarket bot. However, as a normal user which the platform regard as ‘everyone’, I can only get a vote up to $0.776 as the time being.
At the same time, whitelisted users are entitled to vote-value up to $84.581. I wanted to be one of them and I proceeded to submit my request through their site. Knowing that they have a 40 pages pending whitelist request and have only 4 moderators, I prepared to have a long wait.
To my surprise, I got whitelisted the second day, wow!
I was whitelisted as an one-SmartScore user first, only to find out I was promoted to two star user just now. Not bad! Nonetheless, it wasn’t clear what the is difference between different star users and how to promote to higher grade. Keep posing quality post I supposed?
Anyway, glad that I can buy votes with more value now and get to know that my content is recognized by the team. One stone two birds. Awesome idea execution by @therealwolf and his team by actually make user feels good using little tweaks like these.
Sign up now and get whitelisted if you think your content is quality enough: https://smartsteem.com?r=fr3eze
上篇分享了 @smartsteem 的强大。但是对买赞来说，Smartsteem 把用家分为两类。
第一类就是大众，任何人都可以买赞，但是赞的价值被限制得很厉害。根据上图，大众用家只可以买到最多价值 $0.776 的赞。第二类就是今天的重点介绍啦，白名单用家。用家必须经过团队的审核才可以进入白名单，而成功进入后可买到最高 $84 的赞，差别可是非常之大。
基于自己创作的高度信心我毫不犹豫申请了白名单。没想到第二天就通过了，还获得了二星的评价，这寥寥数人的团队效率真是高得吓人。要知道等待名单可是又四十页之多。
这下好了，我不单可以买到更有价值的赞，也还因为创作内容品质被承认而沾沾自喜不已，一箭双雕也！
如果你想享受高质量服务和对自己的创作品质有信心，马上注册和申请白名单吧: https://smartsteem.com?r=fr3eze
This page is synchronized from the post: ‘Smartsteem whitelist is a touchstone for your content’’s quality 创作品质的试金石’


Main objective of a predictive model is to provide accurated predictions of a new observations. Unfortunately we don't know how well the model performs. In addition, at the current era of omic data where p >> n, is not reasonable applying internal validation using data-splitting. Under this background a good method to assessing model performance is applying internal bootstrap validation (Harrell Jr, Frank E (2015) <doi:10.1007/978-1-4757-3462-1>.) This package provides bootstrap validation for the linear, logistic, multinomial and cox 'glmnet' models as well as lm and glm models.
| Version: | 0.1.65 |
| Imports: | glmnet, pbapply, pROC, parallel, survival, risksetROC |
| Published: | 2018-08-14 |
| Author: | Antonio Jose Canada Martinez |
| Maintainer: | Antonio Jose Canada Martinez <ancamar2 at gmail.com> |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| NeedsCompilation: | no |
| Materials: | README |
| CRAN checks: | BootValidation results |
| Reference manual: | BootValidation.pdf |
| Package source: | BootValidation_0.1.65.tar.gz |
| Windows binaries: | r-devel: BootValidation_0.1.65.zip, r-release: BootValidation_0.1.65.zip, r-oldrel: BootValidation_0.1.65.zip |
| OS X binaries: | r-release: BootValidation_0.1.65.tgz, r-oldrel: BootValidation_0.1.65.tgz |
| Old sources: | BootValidation archive |
Please use the canonical form https://CRAN.R-project.org/package=BootValidation to link to this page.


Although ARIMA is quite good at making predictions for time series data. It's pretty time consuming if you want to train multiply series. For this project sepcificly, we need to make 60 days' predictions for 145063 series. Imagine how long that's gonna take. Training and predicting 60 days for 1 series takes about 1 min. Then for 145063 series, it will take 145063/60/24 = 100 days!! Time to seek for solutions from deep neural nets...
I'm sure we know the looped structure of RNN. LSTM has similiar structure and if you unroll the loop we will get the structure like below with several gates within the cell. The left sigmoid layer acts as the forget gate, it decides how much we want to forget in previous timestep. The middle two (a sigmoid and a tanh layer) are for deciding what to update. These two gates combined decided the information being updated and passed to next step. Then, the right two (a sigmoid and a tanh layer) decides the output for this step. More details about structure of LSTM please check colah's blog!
RNN/LSTM are good at extracting patterns in input feature space. And given LSTM’s gated architecture, it has this ability to manipulate its memory state. LSTM is also very flexible in that it has several combinations of sequence to sequence models—many to one: predict at current timestep given all the previous timesteps; many to many: predict multiple future time steps at once given all the previous timesteps; and several other variations. The model I'm using here is many to many model.
Well... not as good as ARIMA sadly 😢. Luckily, I was able to run some experiments.
Only increasing batch does not seem to be helping in any way... If we increase both batch size and number of epochs...
Ok let's what good and bad prediction look like:


Home
About Me
Hometown
Education
Gallery
Hobby
Contact
Phone
+819098779247
+94712575550
e-mail:
geethzin@gmailcom
Facebook
Geethika Kumarisinghe
LinkedIn:
Geethika Kumarisinghe
Any Comment
Name
e-mail:
Comment:


| < Day Day Up > |
12.6. VC Mode IndicatorsVC grabs a bit of the mode line for each buffer visiting a registered file and tries to use it to keep you informed of the version control state of that file. You'll notice that when a buffer is visiting a version-controlled file, the mode tags part of the mode line (shown in parentheses) shows the name of your version control system and a revision number for the file. When those two parts are separated by a dash, the file is not yet checked out; when they're separated by a colon, the file has been checked out, and the revision number is the one the file had when you checked it out. Note that since most people use concurrent version control systems these days, in which you don't check files out or obtain locks, you can think of the dash as meaning unmodified, while the colon means there have been changes that are not yet committed to the repository. If you don't see these indicators, the file isn't registered yet. These three states are illustrated in Figure 12-3. Figure 12-3. Mode lines showing a file that is not under version control, one that is unchanged with respect to the repository, and one that has had changes saved but not yet committed. |
| < Day Day Up > |


Table of Contents
- Controller
Questions & Feedback
Found a typo or an error?
Want to improve this document? Edit it.
Need support or have a technical question?
Post to the user mailing-list.
Master Symfony2 fundamentals
Symfony hosting done right
Discover the SensioLabs Support
Controller
Controller¶
A controller is a PHP function you create that takes information from the
HTTP request and constructs and returns an HTTP response (as a Symfony2
Response
object). The response could be an HTML page, an XML document,
a serialized JSON array, an image, a redirect, a 404 error or anything else
you can dream up. The controller contains whatever arbitrary logic your
application needs to render the content of a page.
See how simple this is by looking at a Symfony2 controller in action.
The following controller would render a page that simply prints Hello world!
:
1 2 3 4 5 6 | use Symfony\Component\HttpFoundation\Response;
public function helloAction()
{
return new Response('Hello world!');
}
|
The goal of a controller is always the same: create and return a Response
object. Along the way, it might read information from the request, load a
database resource, send an email, or set information on the user's session.
But in all cases, the controller will eventually return the Response
object
that will be delivered back to the client.
There's no magic and no other requirements to worry about! Here are a few common examples:
- Controller A prepares a
Response
object representing the content for the homepage of the site. - Controller B reads the
slug
parameter from the request to load a blog entry from the database and create aResponse
object displaying that blog. If theslug
can't be found in the database, it creates and returns aResponse
object with a 404 status code. - Controller C handles the form submission of a contact form. It reads
the form information from the request, saves the contact information to
the database and emails the contact information to the webmaster. Finally,
it creates a
Response
object that redirects the client's browser to the contact form "thank you" page.
Requests, Controller, Response Lifecycle¶
Every request handled by a Symfony2 project goes through the same simple lifecycle. The framework takes care of the repetitive tasks and ultimately executes a controller, which houses your custom application code:
- Each request is handled by a single front controller file (e.g.
app.php
orapp_dev.php
) that bootstraps the application; - The
Router
reads information from the request (e.g. the URI), finds a route that matches that information, and reads the_controller
parameter from the route; - The controller from the matched route is executed and the code inside the
controller creates and returns a
Response
object; - The HTTP headers and content of the
Response
object are sent back to the client.
Creating a page is as easy as creating a controller (#3) and making a route that maps a URL to that controller (#2).
Note
Though similarly named, a "front controller" is different from the
"controllers" talked about in this chapter. A front controller
is a short PHP file that lives in your web directory and through which
all requests are directed. A typical application will have a production
front controller (e.g. app.php
) and a development front controller
(e.g. app_dev.php
). You'll likely never need to edit, view or worry
about the front controllers in your application.
A Simple Controller¶
While a controller can be any PHP callable (a function, method on an object,
or a Closure
), in Symfony2, a controller is usually a single method inside
a controller object. Controllers are also called actions.
1 2 3 4 5 6 7 8 9 10 11 12 | // src/Acme/HelloBundle/Controller/HelloController.php
namespace Acme\HelloBundle\Controller;
use Symfony\Component\HttpFoundation\Response;
class HelloController
{
public function indexAction($name)
{
return new Response('Hello '.$name.'!');
}
}
|
Tip
Note that the controller is the indexAction
method, which lives
inside a controller class (HelloController
). Don't be confused
by the naming: a controller class is simply a convenient way to group
several controllers/actions together. Typically, the controller class
will house several controllers/actions (e.g. updateAction
, deleteAction
,
etc).
This controller is pretty straightforward:
- line 4: Symfony2 takes advantage of PHP 5.3 namespace functionality to
namespace the entire controller class. The
use
keyword imports theResponse
class, which the controller must return. - line 6: The class name is the concatenation of a name for the controller
class (i.e.
Hello
) and the wordController
. This is a convention that provides consistency to controllers and allows them to be referenced only by the first part of the name (i.e.Hello
) in the routing configuration. - line 8: Each action in a controller class is suffixed with
Action
and is referenced in the routing configuration by the action's name (index
). In the next section, you'll create a route that maps a URI to this action. You'll learn how the route's placeholders ({name}
) become arguments to the action method ($name
). - line 10: The controller creates and returns a
Response
object.
Mapping a URL to a Controller¶
The new controller returns a simple HTML page. To actually view this page in your browser, you need to create a route, which maps a specific URL path to the controller:
- YAML
1 2 3 4
# app/config/routing.yml hello: path: /hello/{name} defaults: { _controller: AcmeHelloBundle:Hello:index }
- XML
1 2 3 4
 <route id="hello" path="/hello/{name}"> <default key="_controller">AcmeHelloBundle:Hello:index</default> </route>
- PHP
1 2 3 4
// app/config/routing.php $collection->add('hello', new Route('/hello/{name}', array( '_controller' => 'AcmeHelloBundle:Hello:index', )));
Going to /hello/ryan
now executes the HelloController::indexAction()
controller and passes in ryan
for the $name
variable. Creating a
"page" means simply creating a controller method and associated route.
Notice the syntax used to refer to the controller: AcmeHelloBundle:Hello:index
.
Symfony2 uses a flexible string notation to refer to different controllers.
This is the most common syntax and tells Symfony2 to look for a controller
class called HelloController
inside a bundle named AcmeHelloBundle
. The
method indexAction()
is then executed.
For more details on the string format used to reference different controllers, see Controller Naming Pattern.
Note
This example places the routing configuration directly in the app/config/
directory. A better way to organize your routes is to place each route
in the bundle it belongs to. For more information on this, see
Including External Routing Resources.
Tip
You can learn much more about the routing system in the Routing chapter.
Route Parameters as Controller Arguments¶
You already know that the _controller
parameter AcmeHelloBundle:Hello:index
refers to a HelloController::indexAction()
method that lives inside the
AcmeHelloBundle
bundle. What's more interesting is the arguments that are
passed to that method:
1 2 3 4 5 6 7 8 9 10 11 12 | // src/Acme/HelloBundle/Controller/HelloController.php
namespace Acme\HelloBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class HelloController extends Controller
{
public function indexAction($name)
{
// ...
}
}
|
The controller has a single argument, $name
, which corresponds to the
{name}
parameter from the matched route (ryan
in the example). In
fact, when executing your controller, Symfony2 matches each argument of
the controller with a parameter from the matched route. Take the following
example:
- YAML
1 2 3 4
# app/config/routing.yml hello: path: /hello/{first_name}/{last_name} defaults: { _controller: AcmeHelloBundle:Hello:index, color: green }
- XML
1 2 3 4 5
 <route id="hello" path="/hello/{first_name}/{last_name}"> <default key="_controller">AcmeHelloBundle:Hello:index</default> <default key="color">green</default> </route>
- PHP
1 2 3 4 5
// app/config/routing.php $collection->add('hello', new Route('/hello/{first_name}/{last_name}', array( '_controller' => 'AcmeHelloBundle:Hello:index', 'color' => 'green', )));
The controller for this can take several arguments:
1 2 3 4 | public function indexAction($first_name, $last_name, $color)
{
// ...
}
|
Notice that both placeholder variables ({first_name}
, {last_name}
)
as well as the default color
variable are available as arguments in the
controller. When a route is matched, the placeholder variables are merged
with the defaults
to make one array that's available to your controller.
Mapping route parameters to controller arguments is easy and flexible. Keep the following guidelines in mind while you develop.
The order of the controller arguments does not matter
Symfony is able to match the parameter names from the route to the variable names in the controller method's signature. In other words, it realizes that the
{last_name}
parameter matches up with the$last_name
argument. The arguments of the controller could be totally reordered and still work perfectly:1 2 3 4
public function indexAction($last_name, $color, $first_name) { // ... }
Each required controller argument must match up with a routing parameter
The following would throw a
RuntimeException
because there is nofoo
parameter defined in the route:1 2 3 4
public function indexAction($first_name, $last_name, $color, $foo) { // ... }
Making the argument optional, however, is perfectly ok. The following example would not throw an exception:
1 2 3 4
public function indexAction($first_name, $last_name, $color, $foo = 'bar') { // ... }
Not all routing parameters need to be arguments on your controller
If, for example, the
last_name
weren't important for your controller, you could omit it entirely:1 2 3 4
public function indexAction($first_name, $color) { // ... }
Tip
Every route also has a special _route
parameter, which is equal to
the name of the route that was matched (e.g. hello
). Though not usually
useful, this is equally available as a controller argument.
The Request
as a Controller Argument¶
For convenience, you can also have Symfony pass you the Request
object
as an argument to your controller. This is especially convenient when you're
working with forms, for example:
1 2 3 4 5 6 7 8 9 | use Symfony\Component\HttpFoundation\Request;
public function updateAction(Request $request)
{
$form = $this->createForm(...);
$form->bind($request);
// ...
}
|
Creating Static Pages¶
You can create a static page without even creating a controller (only a route and template are needed).
Use it! See How to render a Template without a custom Controller.
The Base Controller Class¶
For convenience, Symfony2 comes with a base Controller
class that assists
with some of the most common controller tasks and gives your controller class
access to any resource it might need. By extending this Controller
class,
you can take advantage of several helper methods.
Add the use
statement atop the Controller
class and then modify the
HelloController
to extend it:
1 2 3 4 5 6 7 8 9 10 11 12 13 | // src/Acme/HelloBundle/Controller/HelloController.php
namespace Acme\HelloBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;
class HelloController extends Controller
{
public function indexAction($name)
{
return new Response('Hello '.$name.'!');
}
}
|
This doesn't actually change anything about how your controller works. In
the next section, you'll learn about the helper methods that the base controller
class makes available. These methods are just shortcuts to using core Symfony2
functionality that's available to you with or without the use of the base
Controller
class. A great way to see the core functionality in action
is to look in the
Controller
class
itself.
Tip
Extending the base class is optional in Symfony; it contains useful
shortcuts but nothing mandatory. You can also extend
ContainerAware
. The service
container object will then be accessible via the container
property.
Note
You can also define your Controllers as Services.
Common Controller Tasks¶
Though a controller can do virtually anything, most controllers will perform the same basic tasks over and over again. These tasks, such as redirecting, forwarding, rendering templates and accessing core services, are very easy to manage in Symfony2.
Redirecting¶
If you want to redirect the user to another page, use the redirect()
method:
1 2 3 4 | public function indexAction()
{
return $this->redirect($this->generateUrl('homepage'));
}
|
The generateUrl()
method is just a helper function that generates the URL
for a given route. For more information, see the Routing
chapter.
By default, the redirect()
method performs a 302 (temporary) redirect. To
perform a 301 (permanent) redirect, modify the second argument:
1 2 3 4 | public function indexAction()
{
return $this->redirect($this->generateUrl('homepage'), 301);
}
|
Tip
The redirect()
method is simply a shortcut that creates a Response
object that specializes in redirecting the user. It's equivalent to:
1 2 3 | use Symfony\Component\HttpFoundation\RedirectResponse;
return new RedirectResponse($this->generateUrl('homepage'));
|
Forwarding¶
You can also easily forward to another controller internally with the forward()
method. Instead of redirecting the user's browser, it makes an internal sub-request,
and calls the specified controller. The forward()
method returns the Response
object that's returned from that controller:
1 2 3 4 5 6 7 8 9 10 11 | public function indexAction($name)
{
$response = $this->forward('AcmeHelloBundle:Hello:fancy', array(
'name' => $name,
'color' => 'green',
));
// ... further modify the response or return it directly
return $response;
}
|
Notice that the forward() method uses the same string representation of
the controller used in the routing configuration. In this case, the target
controller class will be HelloController
inside some AcmeHelloBundle
.
The array passed to the method becomes the arguments on the resulting controller.
This same interface is used when embedding controllers into templates (see
Embedding Controllers). The target controller method should
look something like the following:
1 2 3 4 | public function fancyAction($name, $color)
{
// ... create and return a Response object
}
|
And just like when creating a controller for a route, the order of the arguments
to fancyAction
doesn't matter. Symfony2 matches the index key names
(e.g. name
) with the method argument names (e.g. $name
). If you
change the order of the arguments, Symfony2 will still pass the correct
value to each variable.
Tip
Like other base Controller
methods, the forward
method is just
a shortcut for core Symfony2 functionality. A forward can be accomplished
directly via the http_kernel
service. A forward returns a Response
object:
1 2 3 4 5 6 7 8 | $httpKernel = $this->container->get('http_kernel');
$response = $httpKernel->forward(
'AcmeHelloBundle:Hello:fancy',
array(
'name' => $name,
'color' => 'green',
)
);
|
Rendering Templates¶
Though not a requirement, most controllers will ultimately render a template
that's responsible for generating the HTML (or other format) for the controller.
The renderView()
method renders a template and returns its content. The
content from the template can be used to create a Response
object:
1 2 3 4 5 6 7 8 | use Symfony\Component\HttpFoundation\Response;
$content = $this->renderView(
'AcmeHelloBundle:Hello:index.html.twig',
array('name' => $name)
);
return new Response($content);
|
This can even be done in just one step with the render()
method, which
returns a Response
object containing the content from the template:
1 2 3 4 | return $this->render(
'AcmeHelloBundle:Hello:index.html.twig',
array('name' => $name)
);
|
In both cases, the Resources/views/Hello/index.html.twig
template inside
the AcmeHelloBundle
will be rendered.
The Symfony templating engine is explained in great detail in the Templating chapter.
Tip
You can even avoid calling the render
method by using the @Template
annotation. See the FrameworkExtraBundle documentation
more details.
Tip
The renderView
method is a shortcut to direct use of the templating
service. The templating
service can also be used directly:
1 2 3 4 5 | $templating = $this->get('templating');
$content = $templating->render(
'AcmeHelloBundle:Hello:index.html.twig',
array('name' => $name)
);
|
Note
It is possible to render templates in deeper subdirectories as well, however be careful to avoid the pitfall of making your directory structure unduly elaborate:
1 2 3 4 5 | $templating->render(
'AcmeHelloBundle:Hello/Greetings:index.html.twig',
array('name' => $name)
);
// index.html.twig found in Resources/views/Hello/Greetings is rendered.
|
Accessing other Services¶
When extending the base controller class, you can access any Symfony2 service
via the get()
method. Here are several common services you might need:
1 2 3 4 5 6 7 | $request = $this->getRequest();
$templating = $this->get('templating');
$router = $this->get('router');
$mailer = $this->get('mailer');
|
There are countless other services available and you are encouraged to define
your own. To list all available services, use the container:debug
console
command:
1 | $ php app/console container:debug
|
For more information, see the Service Container chapter.
Managing Errors and 404 Pages¶
When things are not found, you should play well with the HTTP protocol and return a 404 response. To do this, you'll throw a special type of exception. If you're extending the base controller class, do the following:
1 2 3 4 5 6 7 8 9 10 | public function indexAction()
{
// retrieve the object from database
$product = ...;
if (!$product) {
throw $this->createNotFoundException('The product does not exist');
}
return $this->render(...);
}
|
The createNotFoundException()
method creates a special NotFoundHttpException
object, which ultimately triggers a 404 HTTP response inside Symfony.
Of course, you're free to throw any Exception
class in your controller -
Symfony2 will automatically return a 500 HTTP response code.
1 | throw new \Exception('Something went wrong!');
|
In every case, a styled error page is shown to the end user and a full debug error page is shown to the developer (when viewing the page in debug mode). Both of these error pages can be customized. For details, read the "How to customize Error Pages" cookbook recipe.
Managing the Session¶
Symfony2 provides a nice session object that you can use to store information about the user (be it a real person using a browser, a bot, or a web service) between requests. By default, Symfony2 stores the attributes in a cookie by using the native PHP sessions.
Storing and retrieving information from the session can be easily achieved from any controller:
1 2 3 4 5 6 7 8 9 10 | $session = $this->getRequest()->getSession();
// store an attribute for reuse during a later user request
$session->set('foo', 'bar');
// in another controller for another request
$foo = $session->get('foo');
// use a default value if the key doesn't exist
$filters = $session->get('filters', array());
|
These attributes will remain on the user for the remainder of that user's session.
Flash Messages¶
You can also store small messages that will be stored on the user's session for exactly one additional request. This is useful when processing a form: you want to redirect and have a special message shown on the next request. These types of messages are called "flash" messages.
For example, imagine you're processing a form submit:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | public function updateAction()
{
$form = $this->createForm(...);
$form->bind($this->getRequest());
if ($form->isValid()) {
// do some sort of processing
$this->get('session')->getFlashBag()->add('notice', 'Your changes were saved!');
return $this->redirect($this->generateUrl(...));
}
return $this->render(...);
}
|
After processing the request, the controller sets a notice
flash message
and then redirects. The name (notice
) isn't significant - it's just what
you're using to identify the type of the message.
In the template of the next action, the following code could be used to render
the notice
message:
- Twig
1 2 3 4 5
{% for flashMessage in app.session.flashbag.get('notice') %}
 {{ flashMessage }}
 {% endfor %}
- PHP
1 2 3 4 5
<?php foreach ($view['session']->getFlashBag()->get('notice') as $message): ?>
 <?php echo "
$message
" ?>
 <?php endforeach; ?>
By design, flash messages are meant to live for exactly one request (they're "gone in a flash"). They're designed to be used across redirects exactly as you've done in this example.
The Response Object¶
The only requirement for a controller is to return a Response
object. The
Response
class is a PHP
abstraction around the HTTP response - the text-based message filled with HTTP
headers and content that's sent back to the client:
1 2 3 4 5 6 7 8 | use Symfony\Component\HttpFoundation\Response;
// create a simple Response with a 200 status code (the default)
$response = new Response('Hello '.$name, 200);
// create a JSON-response with a 200 status code
$response = new Response(json_encode(array('name' => $name)));
$response->headers->set('Content-Type', 'application/json');
|
Tip
The headers
property is a
HeaderBag
object with several
useful methods for reading and mutating the Response
headers. The
header names are normalized so that using Content-Type
is equivalent
to content-type
or even content_type
.
Tip
There are also special classes to make certain kinds of responses easier:
- For JSON, there is
JsonResponse
. See Creating a JSON Response. - For files, there is
BinaryFileResponse
. See Serving Files.
The Request Object¶
Besides the values of the routing placeholders, the controller also has access
to the Request
object when extending the base Controller
class:
1 2 3 4 5 6 7 8 9 | $request = $this->getRequest();
$request->isXmlHttpRequest(); // is it an Ajax request?
$request->getPreferredLanguage(array('en', 'fr'));
$request->query->get('page'); // get a $_GET parameter
$request->request->get('page'); // get a $_POST parameter
|
Like the Response
object, the request headers are stored in a HeaderBag
object and are easily accessible.
Final Thoughts¶
Whenever you create a page, you'll ultimately need to write some code that
contains the logic for that page. In Symfony, this is called a controller,
and it's a PHP function that can do anything it needs in order to return
the final Response
object that will be returned to the user.
To make life easier, you can choose to extend a base Controller
class,
which contains shortcut methods for many common controller tasks. For example,
since you don't want to put HTML code in your controller, you can use
the render()
method to render and return the content from a template.
In other chapters, you'll see how the controller can be used to persist and fetch objects from a database, process form submissions, handle caching and more.


HTML Video Player (Demo)
Your browser does not support HTML video.
Play/Pause
Small
Normal
Big
© code by S-n Amil 20.08.2021


Make sure your system meet the following requirements.
For the installation details, please refer to:
http://cenalulu.github.io/jekyll/setup-comment-for-your-blog/?utm_source=tuicool
Note, it’s recommended that to work on Unix/Linux though it’s able to work on Windows (you have to cater for the compatiblity).
If you want to add comment feature, please follow the below tutorial:


Introduction¶
What is GRU?¶
GRU is a host-centric inventory management system. It is used to visualize and provide context on individual servers and more importantly, on groups of servers.
It was designed in order to help operations teams, as well as developers to better understand their infrastructure and to provide a unified view of available compute resources.
Motivation¶
Understanding which compute resources exist (and which business context they serve) can be tricky. In many cases, this information is scattered across several systems.
GRU is designed to give an accurate view of compute resources available to us. The main primitive in GRU is the Host. By providing different ways to slice and dice an inventory (or, collection of hosts) and allowing plugins to give external context regarding each host, we can better discover, understand and optimize our infrastructure.
Plugins, that are at the center of GRU, are used to integrate information and actions from external systems. These can include monitoring, CMDB, real time metrics, cost info, service checks and more. By uniting all these into one place we can easily reason about our resources and provide visibility to operations and software engineers.


Weather Search
This demonstration proposes to use a Weather collection deployed on Watson Discovery service
- - Use the form to select a persona and then one of the typical query this persona may do
- - Or use the query field to enter a free plain english query
- - The mockup button is for testing without Discovery, it is a static response


Geometric Figures
Calculate the are and the perimeter of the following figures.
Square
write how long each side of your square is:
Calculate perimeter
Calculate area
Triangles
write how long the sides of the triangle are:
Calculate perimeter
Calculate area
Circle
write how long the radius of the circle is:
Calculate perimeter
Calculate area


Salazar lodges ban appeal with top sports court
by AGENCE FRANCE PRESSELAUSANNE, Switzerland, Nov 11 – Disgraced running coach Alberto Salazar has lodged an appeal against a four-year ban for doping offences, the Court of Arbitration for Sport announced on Monday.
Jeffrey Brown, a Texas endocrinologist who treated many of Salazar’s athletes at Nike’s Oregon Project training hub in Portland, has also appealed against his suspension.
CAS said it has “registered the appeals” against decisions rendered by the American Arbitration Association, North American Court of Arbitration for Sport Panel “in which they were found to have committed anti-doping rule violations and sanctioned with a four-year period of ineligibility.”
CAS said two arbitration procedures had been opened and both men had requested more time to prepare their case.
“At this stage, it appears that the hearings in these two matters are unlikely to take place before March 2020,” said CAS.
Salazar’s doping offences include trafficking testosterone, tampering with the doping control process, and administering illicit infusions of the fat-burning substance, L-carnitine.
He denies any wrongdoing.
Last month Nike, which backed Salazar after his suspension by the US Anti-Doping Agency announced it was shutting down the Oregon Project.
Mark Parker, who at the time was Nike chief executive but has since stepped aside, said when Salazar’s ban was announced that the company would still support the coach, best known for coaching Britain’s four-time Olympic champion Mo Farah, in his appeal.
(Visited 16 times, 5 visits today)


This package provides a framework for metrics instrumentation and publication.
The instrumentation of metrics just need to implement the simple
MetricsSource
interface with a single getMetrics
method; The consumers of metrics just need to implement the simple
MetricsSink
interface with a putMetrics
method along with the init
and flush
methods.
Producers register the metrics
sources with a metrics system, while consumers register the sinks. A
default metrics system is provided to marshal metrics from sources to
sinks based on (per source/sink) configuration options. Metrics
from getMetrics
would also be published and queryable via
the standard JMX mechanism. This document targets the framework
users. Framework developers could consult the
design
document for architecture and implementation notes.
org.apache.hadoop.metrics2.impl
org.apache.hadoop.metrics2.lib
MetricMutable[Gauge*|Counter*|Stat]
and
MetricsRegistry
.
org.apache.hadoop.metrics2.filter
GlobFilter
and RegexFilter
.
org.apache.hadoop.metrics2.source
JvmMetricsSource
.
org.apache.hadoop.metrics2.sink
FileSink
.
Here is a simple MetricsSource:
class MyMetrics implements MetricsSource { public void getMetrics(MetricsBuilder builder, boolean all) { builder.addRecord("myRecord").setContext("myContext") .addGauge("myMetric", "My metrics description", 42); } }
In this example there are three names:
Note, the boolean argument all
, if true, means that the
source should send all the metrics it defines, even if the metrics
are unchanged since last getMetrics
call. This enable an
optimization for less copying for metrics that don't change much
(total capacity of something etc. which only changes when new
resources (nodes or disks) are being added.)
Here is a simple MetricsSink:
public class MySink implements MetricsSink { public void putMetrics(MetricsRecord record) { System.out.print(record); } public void init(SubsetConfiguration conf) {} public void flush() {} }
In this example there are three additional concepts:
In order to make use our MyMetrics
and MySink
,
they need to be hooked up to a metrics system. In this case (and most
cases), the DefaultMetricsSystem
would suffice.
DefaultMetricsSystem.initialize("test"); // called once per application DefaultMetricsSystem.INSTANCE.register("MyMetrics", "my metrics description", new MyMetrics());
Sinks are usually specified in a configuration file, say, "hadoop-metrics2-test.properties", as:
test.sink.mysink0.class=com.example.hadoop.metrics.MySink
The configuration syntax is:
[prefix].[source|sink|jmx|].[instance].[option]
In the previous example, test
is the prefix and
mysink0
is an instance name.
DefaultMetricsSystem
would try to load
hadoop-metrics2-[prefix].properties
first, and if not found,
try the default hadoop-metrics2.properties
in the class path.
Note, the [instance]
is an arbitrary name to uniquely
identify a particular sink instance. The asterisk (*
) can be
used to specify default options.
Consult the metrics instrumentation in {@link org.apache.hadoop.metrics2.source.JvmMetricsSource}, {@link org.apache.hadoop.ipc.metrics.RpcInstrumentation}, etc. for more examples.
One of the features of the default metrics system is metrics filtering configuration by source, context, record/tags and metrics. The least expensive way to filter out metrics would be at the source level, e.g., filtering out source named "MyMetrics". The most expensive way would be per metric filtering.
Here are some examples:
test.sink.file0.class=org.apache.hadoop.metrics2.sink.FileSink test.sink.file0.context=foo
In this example, we configured one sink instance that would
accept metrics from context foo
only.
*.source.filter.class=org.apache.hadoop.metrics2.filter.GlobFilter test.*.source.filter.include=foo test.*.source.filter.exclude=bar
In this example, we specify a source filter that includes source
foo
and excludes bar
. When only include
patterns are specified, the filter operates in the white listing mode,
where only matched sources are included. Likewise, when only exclude
patterns are specified, only matched sources are excluded. Sources that
are not matched in either patterns are included as well when both patterns
are present. Note, the include patterns have precedence over the exclude
patterns.
Similarly, you can specify the record.filter
and
metrics.filter
options, which operate at record and metric
level, respectively. Filters can be combined to optimize
the filtering efficiency.
class MyMetrics extends MyInstrumentation implements MetricsSource { final MetricsRegistry registry = new MetricsRegistry("myRecord"); final MetricMutableGaugeInt gauge0 = registry.newGauge("myGauge", "my gauge description", 0); final MetricMutableCounterLong counter0 = registry.newCounter("myCounter", "my metric description", 0L); final MetricMutaleStat stat0 = registry.newStat("myStat", "my stat description", "ops", "time"); @Override public void setGauge0(int value) { gauge0.set(value); } @Override public void incrCounter0() { counter0.incr(); } @Override public void addStat0(long elapsed) { stat0.add(elapsed); } public void getMetrics(MetricsBuilder builder, boolean all) { registry.snapshot(builder.addRecord(registry.name()), all); } }Note, in this example we introduced the following:
snapshot
. The MetricMutableStat
in particular, provides a way to measure latency and throughput of an
operation. In this particular case, it produces a long counter
"myStat_num_ops" and double gauge "myStat_avg_time" when snapshotted.
Users of the previous metrics system would notice the lack of
context
prefix in the configuration examples. The new
metrics system decouples the concept for context (for grouping) with the
implementation where a particular context object does the updating and
publishing of metrics, which causes problems when you want to have a
single context to be consumed by multiple backends. You would also have to
configure an implementation instance per context, even if you have a
backend that can handle multiple contexts (file, gangalia etc.):
| Before | After |
|---|---|
context1.class=org.hadoop.metrics.file.FileContext context2.class=org.hadoop.metrics.file.FileContext ... contextn.class=org.hadoop.metrics.file.FileContext |
myprefix.sink.file.class=org.hadoop.metrics2.sink.FileSink |
In the new metrics system, you can simulate the previous behavior by using the context option in the sink options like the following:
| Before | After |
|---|---|
context0.class=org.hadoop.metrics.file.FileContext context0.fileName=context0.out context1.class=org.hadoop.metrics.file.FileContext context1.fileName=context1.out ... contextn.class=org.hadoop.metrics.file.FileContext contextn.fileName=contextn.out |
myprefix.sink.*.class=org.apache.hadoop.metrics2.sink.FileSink myprefix.sink.file0.context=context0 myprefix.sink.file0.filename=context1.out myprefix.sink.file1.context=context1 myprefix.sink.file1.filename=context1.out ... myprefix.sink.filen.context=contextn myprefix.sink.filen.filename=contextn.out |
to send metrics of a particular context to a particular backend. Note,
myprefix
is an arbitrary prefix for configuration groupings,
typically they are the name of a particular process
(namenode
, jobtracker
, etc.)


public static class Browser.Companion
| Modifier and Type | Method and Description |
|---|---|
void |
configure(kotlin.jvm.functions.Function1<? super com.github.epadronu.balin.config.ConfigurationBuilder,kotlin.Unit> block)
Domain-Specific language that let's you configure Balin's global
behavior.
|
void |
drive(kotlin.jvm.functions.Function0<? extends org.openqa.selenium.WebDriver> driverFactory,
boolean autoQuit,
kotlin.jvm.functions.Function1<? super com.github.epadronu.balin.core.Browser,kotlin.Unit> block)
This method represents the entry point for the Domain-Specific
Language which Balin is built around.
|
void |
drive(Configuration configuration,
kotlin.jvm.functions.Function1<? super com.github.epadronu.balin.core.Browser,kotlin.Unit> block)
This method represents the entry point for the Domain-Specific
Language which Balin is built around.
|
public void configure(@NotNull kotlin.jvm.functions.Function1<? super com.github.epadronu.balin.config.ConfigurationBuilder,kotlin.Unit> block)
Domain-Specific language that let's you configure Balin's global behavior.
val desiredConfigurationSetup = Configuration(false, testFactory)
Browser.configure {
autoQuit = desiredConfigurationSetup.autoQuit
driverFactory = desiredConfigurationSetup.driverFactory
}
Assert.assertEquals(Browser.desiredConfiguration, desiredConfigurationSetup)
block
- here you can interact with the DSL.public void drive(@NotNull kotlin.jvm.functions.Function0<? extends org.openqa.selenium.WebDriver> driverFactory, boolean autoQuit, @NotNull kotlin.jvm.functions.Function1<? super com.github.epadronu.balin.core.Browser,kotlin.Unit> block)
This method represents the entry point for the Domain-Specific Language which Balin is built around.
drive
is the main abstraction layer for Selenium-WebDriver. Inside
the block
it receives as parameter, you can interact with the
driver and use all the features Balin has to offer.
// Given the Kotlin's website index page URL
val indexPageUrl = "https://kotlinlang.org/"
Browser.drive(driverFactory) {
// When I visit such URL
// Then I should change the browser's URL to the given one
assertEquals(to(indexPageUrl), indexPageUrl)
// And I should get the title of the Kotlin's website index page
assertEquals(title, "Kotlin Programming Language")
}
public void drive(@NotNull Configuration configuration, @NotNull kotlin.jvm.functions.Function1<? super com.github.epadronu.balin.core.Browser,kotlin.Unit> block)
This method represents the entry point for the Domain-Specific Language which Balin is built around.
drive
is the main abstraction layer for Selenium-WebDriver. Inside
the block
it receives as parameter, you can interact with the
driver and use all the features Balin has to offer.
// Given the Kotlin's website index page URL
val indexPageUrl = "https://kotlinlang.org/"
Browser.drive(driverFactory) {
// When I visit such URL
// Then I should change the browser's URL to the given one
assertEquals(to(indexPageUrl), indexPageUrl)
// And I should get the title of the Kotlin's website index page
assertEquals(title, "Kotlin Programming Language")
}


Table of Contents - deepopenstruct-0.1.2 Documentation
Pages
README
deepopenstruct
Installation
Usage
Note on Patches/Pull Requests
Author & Credits
Classes/Modules
DeepOpenStruct
PatchedOpenStruct
Methods
::load — DeepOpenStruct
#id — PatchedOpenStruct
#type — PatchedOpenStruct


Skip to Main content
Home
Contact Us
Use meaningful Link text
Title
Section Meaningful Heading
Section Meaningful Heading


There are currently two variants of Video, stable and testing. We highly recommend using testing, as the stable branch is old. (The testing branch will be merged into stable in the coming months.)
On Windows and macOS, you can download Video directly within Racket. On Linux you also need to install FFmpeg.
Open DrRacket and go to File -> Install Package
In the dialog box that pops up, type video-testing. Note the '-testing', if you miss that the wrong package will be installed.
And that's it. You can also press F1 for documentation.
raco pkg install video
We highly recommend installing Video's testing build. The latest build of the stable branch requires manual library installation.
Currently Installing Video stable is a three step process. First you need to install Racket; then, you need to install MLT; and finally you can use Racket to install Video.
First ensure that raco
is in your $PATH
,
and then run:
raco pkg install video


Track an AR marker. Take a picture of one of these markers. Make sure it has a white border.
Markers detected:


Indexing is performed by adding a new document to an existing or new index:
1 | $index->addDocument($doc);
|
There are two ways to create document object. The first is to do it manually.
Manual Document Construction
1 2 3 4 5 | $doc = new Zend\Search\Lucene\Document();
$doc->addField(Zend\Search\Lucene\Field::Text('url', $docUrl));
$doc->addField(Zend\Search\Lucene\Field::Text('title', $docTitle));
$doc->addField(Zend\Search\Lucene\Field::unStored('contents', $docBody));
$doc->addField(Zend\Search\Lucene\Field::binary('avatar', $avatarData));
|
The second method is to load it from HTML or Microsoft Office 2007 files:
Document loading
1 2 3 4 | $doc = Zend\Search\Lucene\Document\Html::loadHTML($htmlString);
$doc = Zend\Search\Lucene\Document\Docx::loadDocxFile($path);
$doc = Zend\Search\Lucene\Document\Pptx::loadPptFile($path);
$doc = Zend\Search\Lucene\Document\Xlsx::loadXlsxFile($path);
|
If a document is loaded from one of the supported formats, it still can be extended manually with new user defined fields.
You should define indexing policy within your application architectural design.
You may need an on-demand indexing configuration (something like OLTP system). In such systems, you usually add one document per user request. As such, the MaxBufferedDocs option will not affect the system. On the other hand, MaxMergeDocs is really helpful as it allows you to limit maximum script execution time. MergeFactor should be set to a value that keeps balance between the average indexing time (it’s also affected by average auto-optimization time) and search performance (index optimization level is dependent on the number of segments).
If you will be primarily performing batch index updates, your configuration should use a MaxBufferedDocs option set to the maximum value supported by the available amount of memory. MaxMergeDocs and MergeFactor have to be set to values reducing auto-optimization involvement as much as possible [1]. Full index optimization should be applied after indexing.
Index optimization
1 | $index->optimize();
|
In some configurations, it’s more effective to serialize index updates by organizing update requests into a queue and processing several update requests in a single script execution. This reduces index opening overhead, and allows utilizing index document buffering.
| [1] | An additional limit is the maximum file handlers supported by the operation system for concurrent open operations |
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.


The I chord is also commonly heard in second inversion. Second inversion chords are abbreviated 64. In the key of C, a second inversion I chord, or I64 (read “one six four”), is just a C major chord with a G played in the bass. So far, the inverted chords we’ve studied have functioned much like their root position equivalents. However, this is often not the case for the I64. One of the most important uses of I64 is immediately before a strong cadential V chord. The combination of a I64 and V creates a strong cadential effect. This is so common in music that it has been given a special name - the “cadential I64”. An example of a song that uses the cadential I64 is below:
I64 and V have such a strong cadential feel together that they shouldn’t be repeated over and over again in a short progression. In fact, one of the most typical uses of I64 → V is to end a song. Typically the V would cadence directly to a strong final I chord. Here is an example of a song that uses the cadential I64 to end the song:
Notice that “Circle of Life” doesn’t actually go directly to the I from V because an extra IV chord has been inserted to prolong the progression for a full measure. When our ears hear I64 → V, they really expect to hear a I. Creating a sense of anticipation for a particular chord and then going to a different one instead creates what is known as a “deceptive cadence.” Although we will not cover in detail the theory behind deceptive cadences here, using deception is yet another way in which you as the songwriter can create tension and resolution in your chord progressions.
While using I64 as a pre-cadence to V is the most common use of I64, it does have other uses as well. As with the other inversions we’ve learned, it is typical to use the scale degree in the bass to link neighboring chords (in this case the chords IV and vi). Here is an example of a song that uses this technique along with other inverted chords to create a descending bass line.
I64 has what scale degree in the bass?
The most common use of the I64 is to strongly end a chord progression (often to end a song). What chords follow the I64 when it is functioning in this way?
Second inversion chords in general are much less common than first inversion chords. In fact, seeing a 64 on any other chord than I is rare in popular music. However, every now and then a song pops up that finds a new and creative way to incorporate a second inversion chord. Recently both Adele and One Republic have made use of a chord that had essentially been unused in popular music: the iii64.
What scale degree does a iii64 have in the bass?
Recall that the iii chord in root position is relatively inflexible in that it generally must be followed by a IV or a vi chord. Since the iii64 does not have the tenacity of its root position complement, this rule does not necessarily apply, although going to vi or IV is still a good idea.
Using your knowledge of popular harmony so far, see if you can figure out what the iii64 might be used for:
Here is a demonstration of the iii64 linking I and vi. Compare this with the progression for “Can You Feel The Love Tonight” in the previous section.


Lazy load the image on your page when they're on focus
Check out the project homepage.
Check out the source code on GitHub.
Copyright 2014 Stefano Grassi


{% include head.html %}
{% include navbar.html %}
Loading...
{% include navbar.html %}
Welcome to the
Differentiable Universe Initiative
Learn More
{{ content }}
{% include footer.html %}


United Nations Declaration of Human Rights Browser
Select Language by Name
Language
$details
$extras
This data was loaded into Adabas database $dbid file $file from the
Natural Language Toolkit
udhr corpora with 10k samples of 290 languages derived from the
United Nations Declaration of Human Rights
powered
© 2008 Software AG


Where to get checked There are many places to get checked up as teen mom and many places are free. The following are some clinics you can look into depending on where you live: Pregnancy Care Centers Women health clinics Planned Parenthood health Centers Even calling 311 to get more informed because every place is different Many clinics will ask for insurance but you can sometimes depending on which clinics or health care center you choose can have low costs offers. There’s websites were you can look for clinics near you an example is http://www.teensource.org/find-a-clinic Ways to stay protected It’s fine to have fun once in a while but you need to know the after effects of it and what can happen if you don’t take the proper precautions. There are so many deadly diseases out in the world and you can get infected if you and your partner aren’t being safe. Some of those diseases include: HIV STD’s ( in the United States 63 million people yearly are transmitted STD’s during sex) Herpes Chlamydia Genital warts And many more other types of diseases. Some diseases can further on leave sterile meaning you won’t be able to have kids. Sexually transmitted diseases can further on have a even bigger toll on your life such as getting cancer or brain damage. Worse case scenario dying. Some ways to stay protected: Using condoms when having sex (male or female but female condoms tend to have a stronger resistance than male condoms) Having drugs or alcohol before sex can be dangerous because you won’t be aware and might forget to protect yourself Know your partner and who they are as a person There are any places to get condoms such as Nurses or doctors office or even health centers.


Wife of jailed Mexican governor bailed by UK court
LONDON (Reuters) - The wife of a disgraced former Mexican state governor, serving a nine-year jail sentence for money laundering and links to organized crime, was granted bail on Tuesday by a British court which will decide whether she should be extradited to Mexico.
Karime Macias, 43, who is wanted by Mexico on the charge of conspiracy to defraud the Gulf Coast state of Veracruz, was arrested in London last month after handing herself into police.
A judge in Veracruz, where Macias’ husband Javier Duarte governed from 2010 to 2016, issued a warrant for her arrest in 2018 for the alleged misuse of over 112 million pesos ($5.9 million) in funds from a social welfare program.
She was initially remanded in custody after her arrest on Oct. 29, but at London’s Westminster Magistrates’ Court on Tuesday Judge Michael Snow said she could be released on bail having met the requirement of providing a security of 150,000 pounds ($193,500).
Asked by the judge to confirm her name, Macias said Duarte was her ex-husband and she wished to be known as Karime Macias Tubilla.
Mexican prosecutors say Duarte, a member of former President Enrique Pena Nieto’s Institutional Revolutionary Party (PRI), headed an organization whose criminal operations were carried out in Veracruz, the eastern Gulf state of Campeche and Mexico City between 2011 and 2016.
Top Mexican auditor ASF said in 2016 that the irregularities in public funds under Duarte were the most it had ever seen.
Macias will appear again at the same London court on Jan. 9 for a case management hearing.


menu
Home
Roselyne M.
Passionate QA Engineer, Rubyist.
My abilità/Skills
99%
QA Engineering
95%
Test automation
95%
Continuous Learning
95%
Critical Thinking