Lazy.js it a utility library for JavaScript, similar to Underscore and Lo-Dash but with one important difference: lazy evaluation (also known as deferred execution). This can translate to superior performance in many cases, especially when dealing with large arrays and/or "chaining" together multiple methods. For simple cases (map
, filter
, etc.) on small arrays, Lazy's performance should be similar to Underscore or Lo-Dash.
The following chart illustrates the performance of Lazy.js versus Underscore and Lo-Dash for several common operations using arrays with 10 elements each on Chrome:
You can see that the performance difference becomes much more significant for methods that don't require iterating an entire collection (e.g., indexOf
, take
) as the arrays get larger:
Intrigued? Great! Lazy.js has no external dependencies, so you can get started right away with:
<script type="text/javascript" src="lazy.min.js"></script>
<!-- optional: if you want support for lazy DOM event sequences: -->
<script type="text/javascript" src="lazy.dom.js"></script>
Or, if you're using Node.js:
npm install lazy.js
Now let's look at what you can do with Lazy.js.
We'll start with an array containing 1000 integers. Incidentally, generating such an array using Lazy.js is quite trivial:
var array = Lazy.range(1000).toArray();
Note the toArray
call; without it, what you'll get from Lazy.range
won't be an actual array but rather a Lazy.Sequence
object, which you can iterate over using each
. But we'll get to that in a moment.
Now let's say we want to take the squares of each of these numbers, increment them, and then take the first five even results. We'll use these helper functions, to keep the code concise:
function square(x) { return x * x; }
function inc(x) { return x + 1; }
function isEven(x) { return x % 2 === 0; }
Yes, this is admittedly a very arbitrary goal. (Later I'll get around to thinking of a more realistic scenario.) Anyway, here's one way you might accomplish it using Underscore and its convenient chain
method:
var result = _.chain(array).map(square).map(inc).filter(isEven).take(5).value();
This query does a lot of stuff:
map(square)
: iterates over the array and creates a new 1000-element arraymap(inc)
: iterates over the new array, creating another new 1000-element arrayfilter(isEven)
: iterates over that array, creating yet another new (500-element) arraytake(5)
: all that just for 5 elements!So if performance and/or efficiency were a concern for you, you would probably not do things that way using Underscore. Instead, you'd likely go the procedural route:
var results = [];
for (var i = 0; i < array.length; ++i) {
var value = (array[i] * array[i]) + 1;
if (value % 2 === 0) {
results.push(value);
if (results.length === 5) {
break;
}
}
}
There—now we we haven't created have any extraneous arrays, and we did all of the work in one iteration. Any problems?
Well, yeah. The main problem is that this is one-off code, which isn't reusable and took a bit of time to write. If only we could somehow leverage the expressive power of Underscore but still get the performance of the hand-written procedural solution...
That's where Lazy.js comes in! Here's how we'd write the above query using Lazy.js:
var result = Lazy(array).map(square).map(inc).filter(isEven).take(5);
Looks almost identical, right? That's the idea: Lazy.js aims to be completely familiar to experienced JavaScript devs. Every method from Underscore should have the same name and identical behavior in Lazy.js, except that instead of returning a fully-populated array on every call, it creates a sequence object with an each
method.
What's important here is that no iteration takes place until you call each
, and no intermediate arrays are created. Essentially Lazy.js combines all query operations into a sequence that behaves quite a bit like the procedural code we wrote a moment ago.
Of course, unlike the procedural approach, Lazy.js lets you keep your code clean and functional, and focus on buliding an application instead of optimizing array traversals.
OK, cool. What else can Lazy.js do?
The sequence-based paradigm of Lazy.js lets you do some pretty cool things that simply aren't possible with Underscore's array-based approach. One of these is the generation of indefinite sequences, which can go on forever, yet still support all of Lazy's built-in mapping and filtering capablities.
Want an example? Sure thing! Let's say we want 300 unique random numbers between 1 and 1000.
var uniqueRandsFrom1To1000 = Lazy.generate(function() { return Math.random(); })
.map(function(e) { return Math.floor(e * 1000) + 1; })
.uniq()
.take(300);
// Output: see for yourself!
uniqueRandsFrom1To1000.each(function(e) { console.log(e); });
Pretty neat. How about a slightly more advanced example? Let's use Lazy.js to make a Fibonacci sequence.
var fibonacci = Lazy.generate(function() {
var x = 1,
y = 1;
return function() {
var prev = x;
x = y;
y += prev;
return prev;
};
}());
// Output: undefined
var length = fibonacci.length();
// Output: [2, 2, 3, 4, 6, 9, 14, 22, 35, 56]
var firstTenFibsPlusOne = fibonacci.map(inc).take(10).toArray();
OK, what else?
You've probably seen code snippets before that show how to iterate over an array asynchronously in JavaScript. But have you seen an example packed full of map-y, filter-y goodness like this?
var asyncSequence = Lazy(array)
.async(100) // specifies a 100-millisecond interval between each element
.map(inc)
.filter(isEven)
.take(20);
// This function returns immediately and begins iterating over the sequence asynchronously.
asyncSequence.each(function(e) {
console.log(new Date().getMilliseconds() + ": " + e);
});
All right... what else?
With indefinite sequences, we saw that unlike Underscore and Lo-Dash, Lazy.js doesn't actually need an in-memory collection to iterate over. And asynchronous sequences demonstrate that it also doesn't need to do all its iteration at once.
Now here's a really cool combination of these two features: with a small extension to Lazy.js (lazy.dom.js, a separate file to include in browser-based environments), you can apply all of the power of Lazy.js to handling DOM events. In other words, Lazy.js lets you think of DOM events as a sequence—just like any other—and apply the usual map
, filter
, etc. functions on that sequence.
Here's an example. Let's say we want to handle all mousemove
events on a given DOM element, and show their coordinates in one of two other DOM elements depending on location.
// First we define our "sequence" of events.
var mouseEvents = Lazy.events(sourceElement, "mousemove");
// Map the Event objects to their coordinates, relative to the element.
var coordinates = mouseEvents.map(function(e) {
var elementRect = sourceElement.getBoundingClientRect();
return [
Math.floor(e.clientX - elementRect.left),
Math.floor(e.clientY - elementRect.top)
];
});
// For mouse events on one side of the element, display the coordinates in one place.
coordinates
.filter(function(pos) { return pos[0] < sourceElement.clientWidth / 2; })
.each(function(pos) { displayCoordinates(leftElement, pos); });
// For those on the other side, display them in a different place.
coordinates
.filter(function(pos) { return pos[0] > sourceElement.clientWidth / 2; })
.each(function(pos) { displayCoordinates(rightElement, pos); });
Anything else? Of course!
Now here's something you may not have even thought of: String.match
and String.split
. In JavaScript, each of these methods returns an array of substrings. If you think about it, this often means doing more work than necessary; but it's the quickest way (from a developer's standpoint) to get the job done.
For example, suppose you wanted the first five lines of a block of text. You could always do this:
var firstFiveLines = text.split("\n").slice(0, 5);
But of course, this actually splits the entire string into every single line. If the string is very large, this is quite wasteful.
With Lazy.js, we don't need to split up an entire string just to treat it as a sequence of lines. We can get the same effect by wrapping the string with Lazy
and calling split
:
var firstFiveLines = Lazy(text).split("\n").take(5);
This way we can read the first five lines of an arbitrarily large string (without pre-populating a huge array) and map/reduce on it just as with any other sequence.
Similarly with String.match
: let's say we wanted to find the first 5 alphanumeric matches in a string. With Lazy.js, it's easy!
var firstFiveWords = Lazy(text).match(/[a-z0-9]+/i).take(5);
Piece of cake.
Lazy.js can wrap streams in Node.js as well.
Given any Readable Stream
, you can wrap it with Lazy
just as with arrays:
Lazy(stream)
.take(5) // Read just the first 5 chunks of data read into the buffer.
.each(processData);
For convenience, specialized helper methods for dealing with either file streamas or HTTP streams are also offered. (Note: this API will probably change.)
// Read the first 5 lines from a file:
Lazy.readFile("path/to/file")
.lines()
.take(5)
.each(doSomething);
// Read lines 5-10 from an HTTP response.
Lazy.makeHttpRequest("http://example.com")
.lines()
.drop(5)
.take(5)
.each(doSomething);
In each case, the elements in the sequence will be "chunks" of data most likely comprising multiple lines. The lines()
method splits each chunk into lines (lazily, of course).
Currently the following functions are available (meaning you can call them on any Lazy.Sequence
object, such as what you get back from Lazy(array)
, Lazy.generate
, Lazy(string).split
, &c.):
map
pluck
reduce
(aka inject
or foldl
)reduceRight
(aka foldr
)filter
reject
where
invoke
find
findWhere
first
(aka head
or take
)rest
(aka tail
or drop
)initial
last
sortBy
groupBy
countBy
uniq
zip
concat
without
difference
union
intersection
flatten
compact
shuffle
every
(aka all
)some
(aka any
)indexOf
lastIndexOf
sortedIndex
contains
min
max
This library is experimental and still a work in progress.


Map
Useful Links
Guide
List of Puzzles
Errata
FAQs
Leaderboard
Credits
Character Double
COVID-19
Framing Differences
Leftover Dice
Special Characters
The Heist
Wizards nearby:
Saitama
Hagrid


Hello there!I will consider your offer and i will reply to your submitted e-mail address during the next 48 Hours.
Thank you for contacting me!


To configure an alarm input:
1. Specify parameters displayed.
2. (Optional) Configure common linkage settings.
3. (Optional) Configure other linkage settings.
4. (Optional) Select the All check box to apply the settings of the alarm input to the other alarm inputs.
5. Click Save.
| Report to Management System | Send alarm messages to the camera management system. |
| Text Overlay | Display the duration the alarm persists. |
| Play Alarm Sound | Play the alarm sound. |
| Recording | Start a recording. |
| Snapshot | Take snapshots. |
| Alarm Output | Evoke alarm outputs. |
| PTZ Linkage | Go to a preset position. To use this option, select the PTZ Linkage check box and then a preset ID.
Note: This option applies only to PTZ cameras. |


Cricket Quiz
Easy
-
India played their First T20 Match against _______.
South Africa
-
India played their First ODI Match against _______.
England
-
India played first test match against ________.
England
-
Which is the first cricket club in India ?
Oriental Cricket Club
-
Which is first Indian cricket tournament ?
Bombay Triangular
Medium
-
Who was first test captain of Indian cricket team ?
CK Nayudu
-
Who was first ODI captain of Indian cricket team ?
Ajit Wadekar
-
India won first ODI in ______ against East Africa.
1975
-
India won first Test in 1951-52 against _______.
England
-
India got First Test Series Victory in _______ against Pakistan.
1952
Difficult
-
Who is first Indian cricketer to score 4000 runs and take 400 wickets
?
Kapil Dev
-
Who is first foreign coach appointed for Indian team ?
John Wright
-
Which is First stadium to host a Test match in India ?
Gymkhana Ground in Bombay
-
Which is first Indian bowler to take wicket on the first bowl of
carrier in Test Match ?
Nilesh Kulkarni
-
Which is first Indian bowler to take Wicket on the first bowl of
carrier in ODI ?
S Ramesh


A webpage containing an image and three buttons
Click to see original image
Click to see new image
Click to see another new image


Personalized Media
- Video/Photo editing from Ads to promotional Trailers
- In house Video displays done cheaply and simply
- Get set up with local photographers (traditional or modern)
- Personalized headers and logos for your website and auctions
YOUR NAME HERE AUCTIONSPRESENTSHISTORIC REAL ESTATE AUCTIONLIVE ON SITE 1600 Pennsylvania Ave NW | Your name here |


PLEASE NOTE -- Clustering Plugin Users:
Starting with Openfire 3.8.0, this Coherence-based clustering plugin
has been deprecated in favor of the new Hazelcast-based plugin (/plugins/hazelcast).
Refer to the Hazelcast plugin documentation or
this community post
for additional information.
This plugin has been updated and is expected to be compatible with Openfire 3.8.x. However,
please be advised that no functional testing has been performed on the latest version.
This plugin is no longer actively maintained.
The clustering plugin adds support for running multiple redundant Openfire servers together in a cluster. By running Openfire in a cluster, you can distribute the connection load among several servers, as well as having some form of failover in the event that one of your servers dies. This plugin requires a valid Oracle Coherence license.
In order to run Oracle Coherence in production mode, you will need to secure licensing for (at least) the Enterprise Edition (EE) of Coherence. Refer to the Oracle Fusion licensing docs for more information. Openfire uses the Compute Grid InvocationService to distribute tasks among the cluster members, but this feature is currently available only in EE or Grid Edition (GE).
Note that Coherence is configured to run as GE in development mode by default. You can change this setting by overriding the following Java system properties via /etc/sysconfig/openfire (RPM) or openfired.vmoptions (Windows):
-Dtangosol.coherence.edition=EE -Dtangosol.coherence.mode=prod
The current Coherence release is version 3.7.1.
After installing the clustering plugin (by copying clustering.jar into the Openfire plugins directory), follow steps 1 through 4 for adding Oracle Coherence libraries to Openfire. Step 5 explains how to add this plugin to your Openfire setup.
To upgrade from Enterprise, you will need to shut down your server, remove the enterprise.jar file and enterprise directory from the plugins directory in your Openfire install root, and then follow the steps outlined in the Installation section above.
To enable clustering or monitor the cluster go to: Server --> Server Manager --> Clustering
You can change a number of Coherence properties by overriding Java system properties via /etc/sysconfig/openfire (RPM) or openfired.vmoptions (Windows). For example, to change the default cluster multicast port number, use the following:
-Dtangosol.coherence.clusterport=32380
Other such settings may be found in the tangosol-coherence.xml file located in the coherence.jar file, identified via the "system-property" attribute.
If you want to modify or maintain this plugin you will need to get its source code and compile it. Source code of this plugin is now available in the list of plugins that you get when you download the Openfire's source code. Follow these steps to have a working environment:


Roman Polanski Faces Fresh Rape Accusation from 1975
Film director Roman Polanski is facing a fresh rape accusation from a French woman alleging he violently raped her back in 1975.
by https://www.facebook.com/benjkew/, Ben KewIn an interview with Le Parisien, Valentine Monnier accused Polanski of violently raping her at a ski chalet in Gstaad, Switzerland, in 1975.
According to Monnier, Polanski made the attack after dinner one evening where he called her upstairs. When she arrived, a naked Polanski allegedly jumped on her, hitting her and ripping off her clothes before raping her.
Her allegations were later corroborated by other individuals, who confirmed she had informed them of the incident soon after.
Monnier said she felt compelled to come forward ahead release Polanski’s latest film, J’Accuse, which will be released this week. The film recently premiered at the Venice Film Festival where it was awarded the Silver Lion Grand Jury Prize and received mostly positive reviews from critics.
“Rape is a time bomb,” she told the publication. “The memory does not fade. It becomes a ghost and it follows you, and it changes you insidiously.”
The accusations will add fuel to the fire over allegations of sexual misconduct against the 86-year-old filmmaker, who has been living in exile in France since 1978 after fleeing the U.S. while he was awaiting sentencing for the drugging and raping of a 13-year-old girl.
Attempts by U.S. prosecutors have gone nowhere, as he has repeatedly refused to return to the U.S. to face justice.
In September, Polanski even complained about being “harassed” amid the anti-sexual abuse scandal known as the #MeToo movement, decrying accusations of misconduct against him as “absurd.”
Polanski’s attorney, Hervé Témime strongly denied the allegations, adding his client deplored their publication on the eve of his film release and 44 years after the alleged attack.
Follow Ben Kew on Facebook, Twitter at @ben_kew, or email him at bkew@breitbart.com.


callback
Type: Function
An optional callback function as parameter. The current widget object being operated on is passed to the function. The function will execute after the widget has completed rendering.
Example
widget.render(function(widget) { console.log(widget); });


---
layout: post
title: Interpreting Query Plans
date: '2007-01-30T15:05:00.000-06:00'
author: Don Seiler
tags:
- explain plan
- oracle
- sql
modified_time: '2010-11-19T22:48:47.673-06:00'
blogger_id: tag:blogger.com,1999:blog-7032512792942232766.post-855943833074039427
blogger_orig_url: http://www.seiler.us/2007/01/interpreting-query-plans.html
---
Someone one the oracle-l list posted a link to a nice breakdown of everything about Oracle's "explain plan" output. Very nice read.


Speech
The Education Secretary announces £8.5 million for innovative new schemes to provide families with mental health support.
Thank you for that kind introduction.
It’s a genuine pleasure to be here at the opening of this year’s conference, and just such a remarkable privilege to speak to so many people working on behalf of children and their families around the country.
Huge thanks must of course go to Graham [Allen MP ] for his unwavering support and commitment. I know I speak on behalf of the government in expressing deep gratitude for his research over the years.
I also welcome the EIF ’s new report, ‘Spending on late intervention: how we can do better for less’, published today. I’m very much looking forward to reading it.
You have a fascinating day of discussion and debate ahead of you.
Fascinating, but also vital - because it is undoubtedly vital that we help and support people when they’re at their most vulnerable, whether that’s children, teenagers, or their parents.
The thought that any young person might, through no fault of their own, be denied the right chances and opportunities to fulfil their potential should be enough to make anyone with an interest in education and children sit up and think:
That’s why early intervention has been a real priority for the government over recent years - and why it’s a personal priority and a passion for me, too.
Within the Department for Education, our reforms around childcare and the early years will mean that thousands more families will have access to high-quality and affordable early education, and thousands more children from the most disadvantaged backgrounds get the chance they need to start school on an equal footing with their better-off peers.
Because we know that a child that falls behind early on is less likely to catch up. That’s we are determined to ensure all children get those critical basics.
I know that early intervention is often particularly important for the most disadvantaged members of our society. Our ground-breaking reforms to the social work system continue. Because early intervention isn’t just about supporting children at the very beginning of their life, but about acting quickly when a problem gets worse.
In fact, I’m pleased to announce today that we will, with the Department for Health, be supporting a small number of early adopter teaching partnerships to test and refine new and innovative approaches to delivering high-quality training for social work students and qualified practitioners. All to increase expertise in the sector, and ensure that children get the help they need, when they need it.
More widely, the government’s Troubled Families programme aims to turn around the lives of 120,000 families with a broad range of issues, breaking the cycle of disadvantage and avoiding the tragic waste of human potential caused by long-term financial, social, and health problems.
And as a mark of the government’s commitment raising the profile of early intervention, the Chancellor committed £3 million as part of the Autumn Statement to support early intervention pilots over the coming year.
We’ve also created a mental health taskforce. Joining together ministers from across government, including myself and Sam Gyimah on behalf of the Department for Education, the taskforce recognises the complexities of early intervention, and the need for a coherent and comprehensive approach to tackling problems.
Prevention is always better than cure, and that’s why we have a moral mission to provide compassion and support as soon as problems emerge, and do all that we can to ensure that every single child in the country has an equal chance to succeed in life, no matter their background or family circumstances.
Intervening early, rather than just reacting when problems are already getting worse is, put simply, the best way to prevent the serious personal, societal, and financial costs that poor mental health can cause.
Investing money into this area really is spending to save in the long run. Because at least 1 in 4 of the population experiences mental health problems at some point in their life.
Over half of adults who suffer with mental health problems found that their problems started by age 14, and three-quarters by their mid-twenties.
In other words, that’s millions of lives affected by problems that, if caught and addressed in childhood, could have been tackled.
And those millions of lives are affected in so many different ways.
Imagine trying to find happiness and fulfilment in life when it’s hard even to cope with the very basics.
We know that mental health issues can affect someone’s physical health, their social life, their ability to hold down a job, and there are even links with offending and anti-social behaviour.
These heart-breaking personal costs also come with a financial cost - and a cost to the whole of society, too. Children and young people’s mental health disorders alone come with an annual cost of £1.6 billion. Not to mention the suffering and anguish for families affected.
As Education Secretary, I visit schools every week, and talk to headteachers, teachers, school support staff, and pupils about the issues affecting them, their friends, and their schools.
I’m sad to say that mental health comes up heartbreakingly frequently.
Just this week I met an inspirational young man, John, who has now turned his life around after suffering appalling bullying in school. He stopped caring about education, and he stopped caring about himself.
No one gave him the support he needed. No one intervened early enough.
Hearing John’s story made me angry, and it made me even more committed to ensuring that we do all we can to ensure young people get the support they need.
That’s why it’s so important that we give the right amount of money and time to early intervention, so that we can:
But of course, our longer-term aspirations for changes to children’s mental health services will only be fully effective if they’re made to a system in which all those who work with children and young people have the right knowledge of mental health, and make the right links to specialists, when needed.
So, at the heart of early intervention is good knowledge.
We know it’s often teachers that first spot when something is wrong, and that’s why we have published guidance for schools on behaviour and mental health, including further information on mental health difficulties and useful identification tools.
We’ve also funded the PSHE Association to produce guidance on teaching mental health - due to be published next month - with example lesson plans to follow. And we will be publishing a strategy looking at counselling services based in schools. It aims to provide schools with practical evidence-based advice informed by experts on how to ensure counselling they offer is high quality and achieves good outcomes.
At the same time, I want to recognise and applaud the voluntary and community sector organisations that already play a huge role in supporting schools and providing good counselling.
They quite rightly take their cues from children and young people themselves, and they’re especially skilled at building trust and providing help in an inclusive and non-stigmatising way.
Their support extends into the local community, too. That’s absolutely vital.
When I ask my constituents in Loughborough about the mental health support services they need, they mention the importance of community services as well as services in a more formal setting.
So to reward this valuable work and encourage it to grow and thrive, I’ve ensured that a major new theme of our national prospectus grants is, for the first time, mental health. We’re looking for VCS [voluntary and community sector] organisations that can make a real difference by helping professionals, and crucially, children, young people and their families themselves, to recognise mental health issues, do something about them quickly, and get access to the right treatment.
I’m delighted that we’ve seen a great range of really innovative bids from real experts in the field. We’ll be announcing the results of the process in mid-March, with projects getting underway from April onwards.
Speaking of innovation, our innovation programme continues to award money to projects around the country that are providing a fresh look at the support we give children, teenagers, and their families.
This is a government investment of £100 million to help local groups deliver change.
I am pleased to announce today that we have agreed funding for a further 6 successful projects, including some that get right to the heart of tackling some of the most challenging mental health problems experienced by young people in, or on the edge of care.
And I would like to take this opportunity to highlight the fantastic work that 3 of these projects will soon be undertaking.
Including exciting new work by the Priory Education Services, who are working with Suffolk council to pilot a new type of residential home, combining mental health treatment with a smaller and more personal setting, helping teenagers and their families through crisis periods, and avoiding the need for longer-term placements.
And Action for Children, who are working with Barnet, Harrow, and Hounslow councils to run a new suite of evidence-based programmes, assisting local authorities and transforming the support available to teenagers in west London.
Or even the National Implementation Service, which will build on a decade of experience to extend its support to over 70 councils across the country, helping young people to tackle problem behaviour and substance abuse, and stopping them from entering care.
Between them, these projects are benefitting from £8.5 million of funding from the Department for Education. Not only will they impact on the lives of hundreds of teenagers directly, but the programme will help to rethink the way that services offer support across the country.
It’s clear to me that mental health and character education are on opposite sides of the same coin. When I became Education Secretary, one of the first things I did was to add a fifth priority for the department - to prepare well-rounded young people, ready for adult life in modern Britain.
That’s how much I value it.
Children with the right confidence, skills, and resilience will find challenging situations and periods of emotional upheaval much easier to deal with. They’ll have the resilience to remain strong, and if and when problems become more serious, the confidence to ask for help when they need it.
To reflect the importance of a well-rounded education, we’re giving schools and organisations that offer activities promoting character the chance to expand these programmes through a new £3.5 million fund. We are also giving £1 million to the Education Endowment Foundation to help build the evidence base in character education.
Through our newly announced character awards, we will recognise excellence and diversity in character education, acknowledging that character is already being encouraged and developed alongside academic rigour through a variety of programmes within and outside schools across the country.
I’ve spoken to you about what the government is doing, the money we’re providing, and the real importance of VCS organisations in helping the community. And as I have said, it should be clear that early intervention is not just a priority for the government - it’s a personal priority of my own.
Just last week I met the leaders of 3 of the 5 children’s charities behind the ‘Stitch in time’ report, published last summer.
Between them the NSPCC , Barnardo’s, The Children’s Society, Save the Children, and Action for Children, have produced a report that succeeds in articulating the principles of early education, and in offering a challenge to everyone working in children’s services.
But if we want to effect long-lasting culture change in how we best help young people and families in crisis, we need to join up these different strands and work together.
Not just in financial terms, but partnering up, sharing best practice: collaborating and innovating together.
Gathering and sharing evidence about what works. Because proving what works and ensuring that it pays off is the best way to make the strongest case for early intervention.
And making a reality of early intervention will also depend on a wider cultural change and about more joined-up thinking.
I am committed to seeing this drive continue:
so that teenagers like John get the support they need, as soon as they need it
so that the most vulnerable and defenceless members of our society have the voices they need to speak up on their behalf, to demand more support, better services
so that the children I see every week, all over the country, can thrive, happy and secure, because they’ve been given the right care when they need it
Thank you for everything you do in helping this become a reality.
Published: 12 February 2015


Have our next big story? Want to protect your content? We offer ways for you to contact us that help minimize the risk of others determining your identity. The State Press takes privacy seriously.
By using PGP, the content of your emails can be encrypted so that only we can read it. Please note that the sender and subject line are not encrypted, and therefore are vulnerable to being seen by third parties. We suggest using the browser extension Mailvelope to easily send an encrypted email.
Email<EMAIL_ADDRESS>Fingerprint: F2BF D2DF BAF4 C759 2621 BB37 00C2 BED0 690B CEA1
Your digital information can't be snooped on if you don't transmit any! Drop by The State Press
newsroom to talk to staff or leave us a letter. Find us in the basement of the A.J. Matthews
Center.
950 South Cady Mall
Tempe, AZ 85287-1502
Phone:<PHONE_NUMBER>
Fax:<PHONE_NUMBER>


Hi, I'm Victor Peláez, data scientist with an IT engineering background, experience in banking and renewable energy industry as well as in research.
I am also technology enthusiastic and restless looking for new productive and efficient big data tools as machine learning techniques which improve processes, deal with capacity constraints and give me new opportunities to learn
Learn more about me here.


No pains, no gains.
Writings:
novels,
poets, and
tech blogs
Arts:
calligraphy,
drawings
Last updated time: 05/08/2023


Bound value:
{{htmlContent}}
Result of binding to innerHTML:
Result of binding to dataContainer:
Result of bypassSecurityTrustHtml:
Result of binding to sanitizedHtml:
Result of using the safe pipe:


I am a Full Stack Web Developer, residing in Nairobi, Kenya. I enjoy learning new things and implementing them on the exciting projects I'm working on. Want to work together? I'd love to hear from you.
This is an app showing different images of diffrent categories and locations
This a django web application that allows registered users to know about everything happening in your current neighborhood.
a regularly updated website or web page, typically one run by an individual or small group, that is written in an informal or conversational style.


#assign dagger="active">
DInject has moved to avaje.io/inject - taking you there now ...
DInject is orientated for server use
- DInject supports
@PostConstruct
and @PreDestroy
lifecycle
- DInject has
@Factory
and @Bean
- DInject has support for supplying test doubles (similar to Spring test scope)
Both Dagger and DInject
- Use Java annotation processing to generate Java source code to perform dependency injection
- Do not use classpath scanning or reflection
- Determine the ordering of dependency injection at compile time and not runtime
- Support modularity (injecting dependencies across modules)
- Only support Singleton scope


--- layout: page title : Blog group: navigation --- {% include JB/setup %}
To know is to know that you know nothing. That is the true meaning of knowledge. Confucius
To know is to know that you know nothing. That is the true meaning of knowledge.


--- layout: page title: Warning Generator slug: home ---
Map acting weird? Reset Map Refresh Radar Manually


Login
Username
Password
Login!
Register!
Register
Username
Password
Email
Register!
Login!
Logged in as:
null
Logout
Play Now!
News
Dev Blog
Game Guide
×


|
Perl Weekly
Issue #184 - 2015-02-02 - Larry gave his talk at FOSDEM
latest | archive | by Neil Bowers
|
|
Hi,
There was lots of buzz around FOSDEM this last week, but not many videos or blog posts to share with you yet. Get blogging, those of you who went!
More than 200 people have received their second assignment in the CPAN Pull Request Challenge, and plenty are still working on January's. Some people have dropped out, but others have signed up to start in February. As well as pull requests, lots of blogging going on around it.
Editor #3, Neil
|
|
|
CPAN News
|
|
|
|
|
|
|
Perl blogging
|
|
|
My Perly January
by Karen Pauley
Various people are restarting their Ironman blogging this year; Karen has set herself a goal of blogging about Perl at least once a month, and this is her first. TL;DR: she's busy, and gets a lot of email to deal with!
|
|
|
Hacking and blogging
|
|
|
|
|
|
|
Misc
|
|
|
Perl 6
|
|
|
|
|
Gotanda lands
The latest news from Perl 6 (apart from, you know, that talk). MoraVM got 20% faster,
|
|
|
|
Pull Quest Challenge
|
|
|
|
|
|
|
|
|
|
|
The meaning of MetaCPAN favorites
by Neil Bowers (NEILB)
Some ruminating on what MetaCPAN's favorites mean, some statistics on how they've been bestowed to date, and how they're being factoring into the scoring of dists for the Pull Request Challenge.
|
|
|
Tools
|
|
|
Docker: first impressions
by Arthur Axel "fREW" Schmidt (FREW)
Frew shares his experiences and thoughts using Docker for deployment, having used it for testing for nearly a year. I've no experience with Docker, ******************************[1]: you'll just have to decide for yourself.
|
|
|
Critical hit
by Mark Fowler (MARKF)
Jeff Thalhammer gave a talk on Perl::Critic to Albany Perl Mongers. Here Mark shares what he took away from the talk, the biggest win of which was learning about using the only option in a .perlcriticrc file.
|
|
|
|
[1] A joke that was worded a bit strongly and might have been offensive has been deleted. Sorry for not noticing it before it was published. ~ szabgab
|
Language
|
Comparing booleans in Perl
by Andrew Solomon (ILLY)
Andrew shows two of the ways you might compare the boolean true-or-false'ness of two scalars in Perl. Hopefully most of the time readability would win out :-)
|
|
|
Grants
|
|
|
The Ado web framework wasn't funded
by Makoto Nozaki
Two weeks ago we linked to the proposal for the Ado web framework. It wasn't funded, primarily because there's already a lot of choice in Perl web frameworks, so it wasn't clear this was the best use of the funds ($4500 was requested).
|
|
Perl Maven Tutorials
|
|
|
Conferences and Meetups
|
|
|
|
|
|
|
You know, you could get the Perl Weekly right in your mailbox. Every Week. Free of charge!
|


The Nyzo sentinel is a run mode provided by the Nyzo verifier codebase. The following instructions are for an Ubuntu Linux system, but the client will also run on Windows, Mac OS, and other Linux distributions.
If you want to activate web endpoints, ensure that your server has the proper port open to all IP addresses to which you want to permit access. The default port is 80 for HTTP and 443 for HTTPS, but other ports can be used, as is explained later in these instructions.
Begin the installation by updating apt.
sudo apt update
Next, install haveged. This is a program that provides entropy for cryptographically secure random-number generators. The Verifier class loads its private seed in a static block, and lack of sufficient entropy on a system can cause the application to block indefinitely when trying to generate a new private seed for the verifier. The verifier's key is used to by default to sign all Nyzo messages originating from the client.
While the sentinel signs most messages with the keys of its various managed verifiers, the Verifier class must still have a valid key in order for the sentinel to function properly.
sudo apt install haveged -y
Install the Java development kit (JDK). JDK 8 is preferred for Nyzo.
sudo apt install openjdk-8-jdk -y
Install supervisor. This is used to manage the sentinel as a background process.
sudo apt install supervisor -y
Clone the Nyzo verifier repository.
git clone https://github.com/n-y-z-o/nyzoVerifier.git
Change to the new nyzoVerifier directory and build the code.
cd nyzoVerifier && ./gradlew build
Make the Nyzo data root directory.
sudo mkdir -p /var/lib/nyzo/production
Copy the trusted entry points file to the data root directory.
sudo cp trusted_entry_points /var/lib/nyzo/production
Create the supervisor configuration file. The first command makes the script executable. The second command runs the script to generate the file. The third command copies the file to the supervisor configuration directory.
chmod +x nyzoSentinel.sh && ./nyzoSentinel.sh && sudo cp nyzoSentinel.conf /etc/supervisor/conf.d/
If you want to use the web listener and you want to use a port other than 80, add the appropriate line to /var/lib/nyzo/production/preferences. For example, if you wanted to use port 8080 for all run modes, you would add this line:
web_port=8080
If you wanted to use port 603 for just the sentinel, you would add the following line:
web_port_sentinel=603
Now, you need to create the file that tells the sentinel which verifiers to manage. This file needs to be created at /var/lib/nyzo/production/managed_verifiers. Use your favorite text editor to create this file on the instance, or create the file on your computer and copy it to your instance using a tool like scp. Each line in the file should contain the following information for one managed verifier, separated by colons:
If the sentinel transaction flag is included and the value is “y” or “Y”, a µ1 transaction will be added to any block produced for that verifier. This transaction will have “block produced by Nyzo sentinel” in the sender-data field. This transaction is entirely optional. This option was added mostly for entertainment value; it is not intended to be a penalty or fee. It is optional, and the default behavior of the sentinel is omission of this transaction.
The following shows how the managed_verifiers file might look:
To start the sentinel, reload supervisor.
sudo supervisorctl reload
If you want to see the output of the sentinel process to ensure it started properly, you can watch the output of the log file:
tail -f /var/log/nyzo-sentinel.log
You can use the key combination control-c to stop displaying the output of the log file.
To ensure that your verifiers have loaded properly, run the following command:
more /var/log/nyzo-sentinel.log | grep 'ManagedVerifier'
The output should look something like this, with one line for each verifier you specified in the managed_verifiers file:
To ensure that the sentinel is tracking the blockchain, run the following command:
tail -f /var/log/nyzo-sentinel.log | grep 'froze block'
The output should look something like this:
If you watch the output of this command, you should see the block height increasing quickly on a new sentinel. Within about 10 minutes, depending on the network performance of your sentinel and the verifiers it manages, the block height should be very close to the frozen edge height displayed on the Nyzo mesh page. At this point, your sentinel should be protecting the verifiers it manages.
You can use the key combination control-c to stop displaying the output of the log file.
The sentinel also provides a web monitoring interface. To activate the interface, place the following line in /var/lib/nyzo/production/preferences.
start_web_listener=1
The web interface displays summary information about the sentinel and a row for each managed verifier.
The verifier name displays with a dark gray background if it was queried in the last query interval. It displays with in a light gray background if it was not queried. If the key for the verifier is incorrect, the verifier name displays with an orange background.
When a verifier key is incorrect, a message is also displayed below the grid to explain the problem.
Each cell in the grid represents a single request to a verifier. The more recent requests are to the left, and the older requests are to the right. The darkened lines on the cell do not communicate value. They are used to show motion of the cells when all the cells in a row have the same status.
Light green cells indicate responses that appeared to be fine but did not include blocks. Dark green cells indicate valid responses that contained blocks. The number in the cell denotes how many blocks were provided in a response. A red cell indicates an error for the request — either no response was received or the response was invalid.
These instructions are in progress. While the above instructions are sufficient for configuring a sentinel, these instructions will be modified to contain more tips on ensuring that the sentinel is operating properly.


|
{% if completingParty.officer.partyType == 'organization' %}
{{ completingParty.officer.organizationName }}
{% else %}
{{ completingParty.officer.lastName }},
{{ completingParty.officer.firstName }}
{% if completingParty.officer.middleName %}
{{ completingParty.officer.middleName }}
{% endif %}
{% endif %}
|
{% if completingParty.mailingAddress is defined %}
Mailing Address
{{ completingParty.mailingAddress.streetAddress }}
{{ completingParty.mailingAddress.streetAddressAdditional }}
{{ completingParty.mailingAddress.addressCity }}
{{ completingParty.mailingAddress.addressRegion }}
{{ completingParty.mailingAddress.postalCode }}
{{ completingParty.mailingAddress.addressCountry }}
{% if completingParty.mailingAddress.deliveryInstructions is defined %}
{{ completingParty.mailingAddress.deliveryInstructions }}
{% endif %}
|
{% endif %}
{% if completingParty.deliveryAddress is defined %}
Delivery Address
{{ completingParty.deliveryAddress.streetAddress }}
{{ completingParty.deliveryAddress.streetAddressAdditional }}
{{ completingParty.deliveryAddress.addressCity }}
{{ completingParty.deliveryAddress.addressRegion }}
{{ completingParty.deliveryAddress.postalCode }}
{{ completingParty.deliveryAddress.addressCountry }}
{% if completingParty.deliveryAddress.deliveryInstructions is defined %}
{{ completingParty.deliveryAddress.deliveryInstructions }}
{% endif %}
|
{% endif %}


Q.
What is grid based design?
A.
The grid based design has been formulated to be a simple to implement, unseen structure, that helps a web developer quickly arrange their page and the placement of their content.
Q.
What's all the hype about responsive webpages?
A.
A responsive webpage, is one that is aware of the screen resolution and ratio, that it is going to be displayed on, and is coded such that it alters how and what it shows, to best highlight the content of the page accordingly.
Q.
What is semantic structure?
A.
Semantically structuring your HTML and CSS makes it such that strangers to the code can understand what content will go where, when it gets opened in a browser.
i.e. You wrap the different segments of your content with descriptive tags.
Q.
Any other points you found interesting and want to reflect on.
A.
I like the concept of Bootstrap. The idea to have a set source of pre-determined id's, classes and parameters for an individual to quickly lay down the initial frame and structure of a page professionally.
But I can see how it would really come into its element when used, in a project with multiple collaborating developers.


About DNSCrypt
This software encrypts and authenticates DNS packets between your computer
and OpenDNS. This prevents man-in-the-middle attacks and snooping of DNS
traffic by ISPs or others.
Tips:
- If you have a firewall, open TCP and UDP ports 53 and 443.
-
If you prefer reliability over security, enable fallback to
insecure DNS.
-
The FamilyShield service blocks pornographic content,
including OpenDNS "Pornography", "Tasteless" and "Sexuality"
categories, in addition to proxies and anonymizers (which can render
filtering useless). It also blocks phishing and some malware.
Please help by providing feedback!


TAIPEI (TP) TAIWAN
R.O.C.
POSTAGE PAID
LICENCE NO TP6663
CHUNGHWA POST CQ,LTD.
CN 22
PBAA127342633
From:
P. O. BOX<PHONE_NUMBER>01 TAIPEI
TAIWAN (R.O.C.)
Tel:886-3-3833100
This Parcel Transit in Taipei Free Zone
consignee:William P. Moroski II
telephone:2486283458
address:3415 Davison Lake
Road,48462-9523,ORTONVILLE,MI,US
FP2070-1515659585
Quantity and detailed description of contents
Weight(Kg)
Value(USD)
1510440a*1
0.100
1.00
For commercial itmes only if konwn,HS tariff number and country of orgin of goods.
Total Weight
Total Value
0.100
1.00
I,the undersigned,whose name and address are given on the item,certify that the particulars given ir declaration are correct and that this itme does not contain any dangerous article or articles prohibited legislation or by postal or customs regulations.
Data and senders signature:


References
SDO whitepaper (IBM/DEA)
JSR 235: Service Data Objects
Core J2EE Patterns - Transfer Object
Value Object on c2.com
ASM bytecode library
Javassist library
Unit of Work, M. Fowler
back
index


Python Tutorial
Introduction
What is Python?
Python is a popular programming language. It was created by Guido van Rossum, and released in 1991.
It is used for:
- web development (server-side),
- software development,
- mathematics,
- system scripting.
What can Python do?
- Python can be used on a server to create web applications.
- Python can be used alongside software to create workflows.
- Python can connect to database systems. It can also read and modify files.
- Python can be used to handle big data and perform complex mathematics.
- Python can be used for rapid prototyping, or for production-ready software development.
Why Python?
- Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc).
- Python has a simple syntax similar to the English language.
- Python has syntax that allows developers to write programs with fewer lines than some other programming languages.
- Python runs on an interpreter system, meaning that code can be executed as soon as it is written. This means that prototyping can be very quick.
- Python can be treated in a procedural way, an object-oriented way or a functional way.
Syntax
First Python Program
Let us execute programs in different modes of programming.
Interactive Mode ProgrammingInvoking the interpreter without passing a script file as a parameter brings up the following prompt −
$ python
Python 2.4.3 (#1, Nov 11 2010, 13:34:43)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
Type the following text at the Python prompt and press the Enter −
>>> print "Hello, Python!"
If you are running new version of Python, then you would need to use print statement with parenthesis as in print ("Hello, Python!");. However in Python version 2.4.3, this produces the following result −
Hello, Python!
Lines and Indentation
Python provides no braces to indicate blocks of code for class and function definitions or flow control. Blocks of code are denoted by line indentation, which is rigidly enforced.
The number of spaces in the indentation is variable, but all statements within the block must be indented the same amount. For example −
if True: print "True" else: print "False"
However, the following block generates an error −
if True:
print "Answer"
print "True"
else:
print "Answer"
print "False"
Thus, in Python all the continuous lines indented with same number of spaces would form a block. The following example has various statement blocks −
NOTE:-Do not try to understand the logic at this point of time. Just make sure you understood various blocks even if they are without braces.
#!/usr/bin/python import sys try: # open file stream file = open(file_name, "w") except IOError: print "There was an error writing to", file_name sys.exit() print "Enter '", file_finish, print "' When finished" while file_text != file_finish: file_text = raw_input("Enter text: ") if file_text == file_finish: # close the file file.close break file.write(file_text) file.write("\n") file.close() file_name = raw_input("Enter filename: ") if len(file_name) == 0: print "Next time please enter something" sys.exit() try: file = open(file_name, "r") except IOError: print "There was an error reading file" sys.exit() file_text = file.read() file.close() print file_text
Variables
Variables are containers for storing data values.
Creating Variables
Python has no command for declaring a variable.
A variable is created the moment you first assign a value to it.
Example:-
x = 5
y = "John"
print(x)
print(y)
Variables do not need to be declared with any particular type, and can even change type after they have been set.
Example:-
x = 4 # x is of type int
x = "Sally" # x is now of type str
print(x)
Casting
If you want to specify the data type of a variable, this can be done with casting.
Example:-
x = str(3) # x will be '3'
y = int(3) # y will be 3
z = float(3) # z will be 3.0
Get the Type
You can get the data type of a variable with the type() function.
Example:-
x = 5
y = "John"
print(type(x))
print(type(y))
Case-Sensitive
Variable names are case-sensitive.
Example:-
This will create two variables:
a = 4
A = "Sally"
#A will not overwrite a
Data Types
Built-in Data Types
In programming, data type is an important concept.
Variables can store data of different types, and different types can do different things.
Python has the following data types built-in by default, in these categories:
Text Type: str Numeric Types: int, float, complex Sequence Types: list, tuple, range Mapping Type: dict Set Types: set, frozenset Boolean Type: bool Binary Types: bytes, bytearray, memoryview
Setting the Data Type
Example Data Type x = str("Hello World") str x = int(20) int x = float(20.5) float x = complex(1j) complex x = list(("apple", "banana")) list x = tuple(("apple", "banana")) tuple x = range(6) range x = dict(name="John", age=36) dict x = set(("apple", "banana")) set x = frozenset(("apple", "banana"))frozenset x = bool(5) bool x = bytes(5) bytes x = bytearray(5) bytearray x = memoryview(bytes(5)) memoryview
Numbers
There are three numeric types in Python:
- int
- float
- complex
Variables of numeric types are created when you assign a value to them:
Example:-
x = 1 # int
y = 2.8 # float
z = 1j # complex
Int
Int, or integer, is a whole number, positive or negative, without decimals, of unlimited length.
Example:-
x = 1
y =<PHONE_NUMBER>4887711
z = -3255522
print(type(x))
print(type(y))
print(type(z))
Float
Float, or "floating point number" is a number, positive or negative, containing one or more decimals.
Example:-
x = 1.10
y = 1.0
z = -35.59
print(type(x))
print(type(y))
print(type(z))
Complex
Complex numbers are written with a "j" as the imaginary part:
Example:-
x = 3+5j
y = 5j
z = -5j
print(type(x))
print(type(y))
print(type(z))
String
Strings in python are surrounded by either single quotation marks, or double quotation marks.
'hello' is the same as "hello".
You can display a string literal with the print() function:
Example:-
print("Hello")
print('Hello')
Assign String to a Variable
Assigning a string to a variable is done with the variable name followed by an equal sign and the string:
Example:-
a = "Hello"
print(a)
Multiline Strings
You can assign a multiline string to a variable by using three quotes:
Example:-
You can use three double quotes:
a = """Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.""" print(a)
Booleans
Booleans represent one of two values: True or False.
Boolean Values
In programming you often need to know if an expression is True or False.
You can evaluate any expression in Python, and get one of two answers, True or False.
When you compare two values, the expression is evaluated and Python returns the Boolean answer:
Example:-
print(10 > 9)
print(10 == 9)
print(10 < 9))
When you run a condition in an if statement, Python returns True or False:
Example:-Print a message based on whether the condition is True or False:
a = 200 b = 33 if b > a: print("b is greater than a") else: print("b is not greater than a")
Operator
Operators are used to perform operations on variables and values.
In the example below, we use the + operator to add together two values:
Example:-
print(10 + 5)
Python divides the operators in the following groups:
- Arithmetic operators
- Assignment operators
- Comparison operators
- Logical operators
- Identity operators
- Membership operators
- Bitwise operators
List
Lists are used to store multiple items in a single variable.
Lists are one of 4 built-in data types in Python used to store collections of data, the other 3 are Tuple, Set, and Dictionary, all with different qualities and usage.
Lists are created using square brackets:
Example:-Create a List:
thislist = ["apple", "banana", "cherry"]
print(thislist)


This program allows you to compute the MD5 hashes of files as well as verify digest stored in a specified file. It behaves like the classic "md5sum" program, however, much more friendly to windows users. You can easily right click any files/directories in Windows Explorer to invoke the computing job. No typing command is required.
Currently, EasyMD5 supports Windows 98/ME,2000,XP,2003
It's powerful and free! Enjoy this program!


What sort of shape should we make? Choose your shape Circle Square Rectangle
Color of the shape: Red Green Blue Black Maroon
Which way to move the shape: Up Down Left Right


Liberty Thabo Muleya, better known by his stage name Taalibha_LT, is a South
African rapper. The stage name was given to him by a high school friend. He released his first single
titled
Rapping has always been the core of his music career!
He writes his own songs and other artists songs.
As an up coming artist, Photography is one of the things he developed a passion for.
Having a driving school as a family company contributed greatly to the love and skills he has as a driving instructor as well as a driver!
Next for his music career the musician is working on releasing an his first album title
contact Taalibha_LT through the following.
+27 84-992-0042
<EMAIL_ADDRESS>taalibha_lt
Taalibha_LT
TaalibhaL
Taalibha_LT


Elementary
Elementary is a modern-day take on the classic Sherlock Holmes story about a crime-solving duo that cracks the NYPD's most impossible cases. Following his fall from grace in London and a stint in rehab, eccentric Sherlock escapes to Manhattan where his wealthy father forces him to live with his worst nightmare - a sober companion, Dr. Watson.


I was a Senior Research Associate in the Computer Laboratory, affiliated with Queens' College, supervised by Prof. Jon Crowcroft, and mentored by Prof. Andy Hopper. I teach and am an Associated Fellow in Higher Education Academy. I am now a visiting researcher focusing on scientific computing, parallel and distributed computing, applied machine learning. Check out my previous work.
Updated on 2018.04.18


One of the things I've learned is to be receptive of feedback
I value your feedback ☺☺☺ !! Please take a moment to fill the form below to let me know about your experience with my website.


Which of the following statements are NOT true about objects?
Renaming an objecting is called reconstruction.
- Creating a new object is called instantiation.
- Object-oriented programming uses objects to model parts of a program (like LightBots or a world).
- Each object provides a set of behaviors that it understands. These are called methods.
There are not hints for this question


Welcome!
First of all, Perhimpunan Pelajar Indonesia di Australia (PPIA) Monash would like to welcome you to Melbourne and welcome to Monash University / Monash College!
If this is your first year in Melbourne, want to know more about Melbourne and how to survive your first year in Melbourne, you are reading the right book! We understand the life-changing experience of transiting to Melbourne, so we try our best to list helpful survival guides, from food to accommodation, events to road-trips and many more! We hope this would ease your adaptation to your new life transition in Melbourne.
We wish you all the best and looking forward to seeing you at our next events!
Benazir M. Komarudin
President PPIA Monash 2016/2017
president@ppiamonash.org


Stereotype Threat
What it is and what to do about it
Jan 13 2014
Stereotype threat is the idea that the stereotypes typically associated with a certain characteristic of a person will end up becoming self-fulfilling prophecies, in that the person with the characteristic will think of themselves in the way they are usually stereotyped and act accordingly, whether they mean to, or even whether they do so consciously, or not.
While I have been lucky in life not to have encountered many situations in which I have felt the negative effects of stereotype threat, I very much empathize with others who live with this phenomenon on a day-to-day basis, and realize the incredible amount of lost potential that can be a result of stereotype threat. I have always felt that if people are ever to be categorized, the only legitimate category to use is people's true personality and the way their minds work, not anything to do with factors outside of their control, like race, gender, nationality, and so forth. Especially when travelling, I have encountered situations where I meet someone who I find very intellectually similar yet, who I come to empathize with because I quickly realize that the context they live in does not allow them to flourish in the same way that I have done in comparable areas of my life.
The way that I can most relate to stereotype threat on a personal level is in classroom situations. Groups of students tend to develop a certain group personality which is unique to that particular combination of students, and each student often gets stereotyped within the context of that student group. One can be easily become affected, in terms of the way one subconsciously acts, by the way they think other students already perceive them. A student who has started the school term poorly may subconsciously think there is little point to making more of an effort because they are already assumed to be a failure, and vice versa. Furthermore, students who are assumed to be the "smartest" in the class are not helped by stereotype threat either because they may refrain from asking important question out of a fear of appearing stupid to others.
To combat stereotype threat, it is important to remember that we should be the only one's who can define ourselves. We should never let others' preconceived notions of the way we are or the way we "probably will act," given any number of characteristics, determine the way we conduct ourselves.


Running a Programming YouTube Channel - What It's Like and Why You Should Do It Jesse from the codeSTACKr YouTube channel is going to join me for an open QandA to talk about running a programming YouTube channel. We will talk about what our experiences have been like and why you might benefit from creating one as well. Go to https:/...
Azure SQL Database : Manage & Restore Backups - EP02 Hey Coders, Subscribe here - https://www.youtube.com/channel/UCetyodKOWGk5H6FoKoFnkZw Talk to us on - https://www.twitch.tv/curiousdrive Like our page - https://www.facebook.com/curiousdrive/ Follow us on - https://twitter.com/curious_drive Follow us on...
Maintaining ownership continuity of your user account's repositories You can invite someone to manage your user owned repositories if you are not able to.
Weekly Update 190 I went with the "just record it live" approach again this week and honestly, it's working out much better for me. It's easier to publish (no manual retrieval of audio and video from devices, no editing in Premier, no waiting for upload) and doing it in my...
PaperCall.io - Live Coders Conf 2 You may be wondering who we are! We are The Live Coders, an outgoing and enthusiastic group of friendly channels that write code, teach about technology, and promote the technical community. With conferences everywhere being cancelled or postponed, we di...
How Doom's Enemy AI Works 200 IQ demons explained. BFG Edition vs Classic, Nightmare, Fast Monsters: https://www.youtube.com/watch?v=-Klvpd0ReTk Music: The Demons from Adrian's Pen by Bobby Prince Land of Able by Mark Klem Limb Crusher's Clamp by decino Fulfilling Headwear from...
SIGGRAPH 2020 Technical Paper: N-Dimensional Rigid Body Dynamics « Marc ten Bosch Excited to announce that my technical paper “N-Dimensional Rigid Body Dynamics” was accepted to SIGGRAPH 2020! Very proud to present research developed for 4D Toys & Miegakure at such a prestigious conference.
OpenCV directly in the browser (webassembly + webworker) Learn how to use OpenCV in the web without a lot of headaches.


Learning Hamiltonians is critical to a range of QIP tasks:
- Metrology
- Learning magnetic fields, etc.
- Calibration
- Static field / pulse power / crosstalk, etc.
- Debugging/Diagnosis
- $T_2$ estimation, other noise finding
- Verification/Validation
- Analog and digital quantum simulation
### **Example**: Ramsey Estimation ###
Suppose $H = \omega \sigma_z / 2$ for some unknown $\omega$.
Traditional approach:
- Prepare $\ket{+} \propto \ket{0} + \ket{1}$, measure “click” w/ pr.:
$
\|\bra{+} \ee^{\ii \omega t \sigma_z / 2} \ket{+}\|^2 = \cos^2(\omega t / 2)
$.
- Repeat for many “shots” to estimate click pr.
- Repeat for many times to estimate signal.
You'll get something that looks a bit like this:
What's $\omega$? Fourier transform and look at the peak.
We can do better.
# $H = H(\vec{x})$. #
Hamiltonian learning is a special case of *parameter estimation*:
given data $D$, what is $\vec{x}$?
---
We want an approach that can work for small and large quantum devices
alike.
To get there, we consider several different approaches to
parameter estimation.
-
Analytic
Sergeevich et al. c4vv95
Ferrie, Granade, and Cory tfx
-
Rejection filter
Wiebe and Granade bk9d
-
Particle filter
Doucet et al. bmch
-
Likelihood-free particle filter
Ferrie and Granade tdj
### The Likelihood Function ###
$\|\bra{+} \ee^{\ii \omega t \sigma_z / 2} \ket{+}\|^2$
defines probability $\Pr(d | \omega; t)$ for every
outcome $d$, model $\omega$ and experiment $t$.
Basis for both maximum-likelihood and Bayesian methods.
### Bayesian Parameter Estimation ###
The likelihood tells us what we learn from data:
$$
\Pr(\vec{x} | d; e) = \frac{\Pr(d | \vec{x}; e)}{\Pr(d | e)} \Pr(\vec{x})
$$
---
Estimate $\hat{x} = \expect[\vec{x} | d; e] = \int \vec{x} \Pr(\vec{x} | d; e)\dd \vec{x}$.
- **Optimal** for mean—squared error.
Inference as an Iterative Algorithm
Input:
Prior $\Pr(\vec{x})$,
data set $D$,
likelihood $\Pr(d | \vec{x}; e)$
- $p(\vec{x}) \gets \Pr(\vec{x})$
- For each datum $d \in D$ and experiment $e$:
-
Update based on $d$:
$p(\vec{x}) \gets \Pr(d | \vec{x}; e) p(\vec{x}) / \Pr(d)$.
- Return $\hat{x} = \int \vec{x}\,p(\vec{x})\,\dd\vec{x}$.
---
At each step, $p(\vec{x})$ also encodes our uncertainty.
**Scalar case**:
$
\expect[(x - \hat{x})^2 | d; e] =
\mathbb{V}[x \mid d; e].
$
**Vector case**: $\expect[(\vec{x} - \hat{x}) (\vec{x} - \hat{x})^\TT | d; e]
= \Cov(\vec{x} | d; e)$.
We can use our posteriors to make *adaptive* decisions:
$$
e_* = \operatorname{arg min}_e \expect_d[\mathbb{V}(x | d; e)]
$$
### **Example**: $x = (\omega)$ ###
Can analytically find posterior for Gaussian priors,
use to adaptively choose $t_k$.
![](./figures/how-t2.png)
**Problem**: may be intractable to analytically compute $$
\hat{x} \defeq
\int \Pr(\vec{x} | d; e) \dd\vec{x} =
\int \frac{
\Pr(d | \vec{x}; e)
}{
\int \Pr(d | \vec{x}; e) \Pr(\vec{x}) \dd\vec{x}
} \Pr(\vec{x}) \dd\vec{x}.
$$
---
**Answer**: numerically approximate $\int f(\vec{x}) \Pr(\vec{x} | d)\dd\vec{x}$.
*Efficient* to use Monte Carlo integration if we can sample from $\Pr(\vec{x})$.
## Rejection Sampling ##
Given samples from $\Pr(\vec{x})$ and likelihood
function $\Pr(d | \vec{x}; e)$, how do we sample
from posterior for datum $d$?
- Draw $\vec{x} \sim \Pr(\vec{x})$,
accept $\vec{x}$ w/ $\Pr(d | \vec{x}; e)$.
Accepted samples are distributed according to posterior.
Rejection Sampling Isn't Enough
Let $D = {d_1, \dots, d_k}$ be a set of data.
$$
\Pr(\text{accept} | \vec{x}) = \Pr(D | \vec{x}) = \prod_{d \in D} \Pr(d | \vec{x})
\overset{k \to \infty}{\longrightarrow} 0.
$$
Example: Biased Coin $x = (p)$
$\Pr(H | p) = p$, $d \in \{H, T\}$.
$p \approx 0.5 \Longrightarrow \Pr(d_1, \dots, d_k | p) \approx 1 / 2^k$.
We will accept exponentially few samples!
### Gaussian Resampling ###
For each datum $d$, use rejection sampling to approximate posterior
moments:
- $\bar{x} \gets \expect[\vec{x} | d]$.
- $\Sigma \gets \operatorname{Cov}[\vec{x} | d] = \expect[\vec{x} \vec{x}^\TT | d] - \bar{x} \bar{x}^\TT$.
---
At the next iteration, draw prior samples from Gaussian with these moments:
$$
\vec{x} \mid d \sim \mathcal{N}(\bar{x}, \Sigma)
$$
Keeps $\Pr(\text{accept}) \approx \text{constant}$.
Can compute $\bar{x}$, $\Sigma$ from
one sample at a time by accumulating
$$
x_{\Sigma} = \sum x
\text{ and }
x^2_{\Sigma} = \sum x^2.
$$
\begin{align}
\bar{x} & = x_{\Sigma} / n_{\text{accept}} \\
\Sigma & = x^2_{\Sigma} / n_{\text{accept}} - \bar{x}^2.
\end{align}
Welford's algorithm: numerically-stable modification.
Rejection Filtering (RejF)
Input:
Prior mean $\bar{x}$, prior covariance $\Sigma$,
number of attempts $m$.
- For each datum $d$ and experiment $e$:
-
$n, \bar{x}', M_2 \gets 0$
- While $n < m$:
-
Draw $\vec{x} \sim \mathcal{N}(\bar{x}, \Sigma)$.
- Accept $\vec{x}$ w/ $\Pr(d | \vec{x}; e)$.
- If accepted, update $n$, $\bar{x}'$, $M_2$.
-
$\bar{x} \gets \bar{x}'$, $\Sigma \gets M_2 / (n - 1)$.
## Advantages of RejF ##
- Accept pr based on a single datum
⇒ likelihood $\not\to 0$.
- Easy to implement
- Never needed to remember each accepted $x$!
- Very low-memory (constant # of
registers), ideal for FPGA use.
- Easily parallelizable
- “Reset rule” can abort from approximation failures.
Example: Phase Estimation, $x = (\phi)$
Prepare state $\ket{\phi}$ s. t. $U\ket{\phi} = \ee^{\ii \phi}\ket{\phi}$,
measure to learn $\phi$.
$\theta = 0 \Rightarrow$ freq. est likelihood, w/ $\phi = \omega$, $M = t$.
Applications
- Interferometry / metrology
Higgins et al.
crwd6w
- Gate calibration / robust PE
Kimmel et al.
bmrg
- Quantum simulation and chemistry
Reiher et al.
1605.03590
Example: Phase Estimation, $x = (\phi)$
**Drawback**: RejF requires posterior after each datum
to be $\approx$ Gaussian.
We can solve this by using a more general approach:
- Weaken Gaussian assumption.
- Generalize the rejection sampling step.
Liu-West Resampler
If we remember each sample $\vec{x}$, we can use them to
relax RejF assumptions.
Input:
$a, h \in [0, 1]$ s.t. $a^2 + h^2 = 1$,
distribution $p(\vec{x})$.
-
Approximate $\bar{x} \gets \expect[\vec{x}]$, $\Sigma \gets \operatorname{Cov}(\vec{x})$
- Draw parent $\vec{x}$ from $p(\vec{x})$.
- Draw $\vec{\epsilon} \sim \mathcal{N}(0, \Sigma)$.
-
Return
new sample $\vec{x}' \gets a \vec{x} + (1 - a) \bar{x} + h \vec{\epsilon}$.
### Why Does Liu-West Work? ###
\begin{align}
\vec{x}' & \gets a \vec{x} + (1 - a) \bar{x} + h \vec{\epsilon} \\\\
\expect[\vec{x}'] & = [a + (1 - a)] \bar{x} \\\\
\Cov(\vec{x}') & = (a^2 + h^2) \Cov(\vec{x}). \\\\
\Longrightarrow a^2 + h^2 & = 1 \text{ preserves } \expect[\vec{x}], \Cov(\vec{x}).
\end{align}
---
Mixes original approximation with $1 - a$ of a Gaussian
matching moments.
- $a \to 0$: RejF (assumed density) approx
- $a \to 1$: Bootstrap
- $a = 0.98$: typical case (2% Gaussian).
### From Samples to Particles ###
Define a particle $(w_i, \vec{x}_i)$ as
a sample $\vec{x}_i$ and a weight $w_i \in [0, 1]$.
- $\expect[\vec{x}] = \sum_i w_i \vec{x}_i$
- $\Cov(\vec{x}) =
\sum_i w_i \vec{x}_i \vec{x}_i^\TT - \expect[\vec{x}]\expect^\TT[\vec{x}]$
- $\expect[f(\vec{x})] = \sum_i w_i f(\vec{x}_i)$
---
Corresponds to
$
p(\vec{x}) \approx \sum_i w_i \delta(\vec{x} - \vec{x}_i).
$
Particles can represent distributions using either
weights or
positions.
Particle Filter
-
Draw $N$ initial samples $\vec{x}_i$ from the prior $\Pr(\vec{x})$
w/ uniform weights.
-
Instead of rej. sampling, update weights
by
\begin{align}
\tilde{w}_i & = w_i \times \Pr(d | \vec{x}_i; e)
\end{align}
-
Renormalize.
\begin{align}
w_i & \mapsto \tilde{w}_i / \sum_i \tilde{w}_i
\end{align}
-
Periodically use Liu-West to draw new $\{\vec{x}_i\}$
with uniform weights.
Useful for Hamiltonian models...
- Rabi/Ramsey/Phase est.
Granade et al.
s87
- Swap spectroscopy
Stenberg et al.
7nw
...as well as other QIP tasks.
- Tomography
Huszár and Holsby
s86
Struchalin et al.
bmg5
Ferrie
7nt
Granade et al.
bhdw,
1605.05039
- Randomized benchmarking
Granade et al.
zmz
- Continuous measurement
Chase and Geremia
chk4q7
- Interferometry/metrology
Granade
10012/9217
### **Example**: $\vec{x} = (\omega, T_2)$ ###
![](figures/unknown-t2.png)
Example: $\vec{x} =$ COSY / Crosstalk
\(
H(\omega_1, \omega_2, J) = \frac12 \left(
\omega_1 \sigma_z \otimes \id +
\omega_2 \id \otimes \sigma_z +
J \sigma_z \otimes \sigma_z
\right)
\)
Example: $\vec{x} =$ COSY / Crosstalk
Estimation and Experimental Practice
We need a bit more to make particle filtering a
practical solution.
-
Error bars
How well do we know $\vec{x}$?
-
Time-dependence
$\vec{x} = \vec{x}(t)$
-
Software impl.
Off-the-shelf.
Dealing with each in turn...
Error Bars
Particle filters report credible regions $X_\alpha$ s.t.
$$
\Pr(\vec{x} \in X_\alpha | d; e) \ge \alpha.
$$
E.g.: Posterior covariance ellipse, convex hull, MVEE.
Time-Dependence
In addition to updating particle weights, move each particle
stochastically:
$$
\vec{x}(t_{k+1}) = \vec{x}(t_k) + \vec{\eta},\qquad
\vec{\eta} \sim \mathcal{N}(0, (t_{k+1} - t_k) \Sigma)
$$
#### **QInfer:** Particle Filter Implementation for Quantum Info ####
We provide an open-source implementation for use in experiment and theory alike.
Written in Python, works with MATLAB and Julia.
Installation
$ pip install qinfer
Updater Loop
>>> updater = SMCUpdater(model, n_particles, prior)
>>> heuristic = heuristic_class(updater)
>>> for idx in range(n_measurements):
... experiment = heuristic()
... datum = model.simulate_experiment(
... true_model, experiment
... )
... updater.update(datum, experiment)
>>> est = updater.est_mean()
SMCUpdater
formalizes particle filtering
as an iterative algorithm.
QInfer Example: RB, $\vec{x} = (p, A, B)$
Setup
>>> import numpy as np
>>> import qinfer as qi
Simplified Estimation
>>> data = np.column_stack([
... counts, seq_lengths, n_shots * np.ones_like(counts)
... ])
>>> mean, cov = qi.simple_est_rb(
... data, n_particles=12000, p_min=0.8
... )
QInfer Example: RB, $\vec{x} = (p, A, B)$
Can also customize model, prior, and updater loop.
Model
>>> model = qi.BinomialModel(
... qi.RandomizedBenchmarkingModel()
... )
Prior
>>> prior = qi.PostselectedDistribution(
... qi.ProductDistribution(
... # Use the same prior over $p$.
... qi.UniformDistribution([0.8, 1]),
... # Tight prior over $A,\,B$.
... qi.MultivariateNormalDistribution(
... np.array([0.498, 0.499]),
... np.diag([0.004, 0.002]) ** 2
... )
... ), model)
Updater Loop
>>> updater = qi.smc.SMCUpdater(model, 8000, prior)
>>> for idx_exp in range(n_exp):
... expparams = np.array(
... [(seq_lengths[idx_exp], n_shots)],
... dtype=model.expparams_dtype)
... updater.update(counts[idx_exp], expparams)
QInfer: Assessing Performance
-
Risk:
average error given $\color{white}{\vec{x}}$
-
Bayes risk:
average error over $\color{white}{\vec{x}}$
- Exact $\hat{x}$ optimal for Bayes risk / squared error.
- Difficult to prove; can find numerically.
Performance Testing
>>> perf = perf_test_multiple(
... n_trials=50, n_exp=50, n_particles=1000,
... model=SimplePrecessionModel(),
... prior=UniformDistribution([0, 1]),
... heuristic_class=ExpSparseHeuristic
... )
Bigger and Better
We've seen that filtering is useful for estimating
small quantum models. Now let's push on to bigger systems.
What challenges do we face for large systems?
Simulation Costs
\begin{align}
\tilde{w}_i & = w_i \times \color{red}{\Pr(d | \vec{x}_i; e)} \\
w_i & \mapsto \tilde{w}_i / \sum_i \tilde{w}_i
\end{align}
- $\Pr(d | \vec{x}_i; e)$ is a *simulation*.
- Need to
simulate for each particle (~1000s calls/datum).
- Infeasible for large quantum models.
Let's do better: use *quantum* simulation instead.
### Two Kinds of Simulation ###
![](figures/simulators.png)
Weak simulators produce *plausible datasets*.
### Likelihood-Free RejF ###
Replace rej. sampling step by drawing
datum from likelihood instead of computing
exact value:
- Draw datum $d'$ from $\Pr(d | \vec{x}; e)$.
- Accept $\vec{x}$ if $d = d'$.
### Likelihood-Free Particle Filtering ###
Can also use frequencies $f$ from weak simulation to
approximate likelihoods
in particle filtering.
$$
\widehat{\Pr}(d | \vec{x}; e) =
\frac{f(d | \vec{x}; e)}{k}
$$
$k$: number of weak simulation calls used.
### **Example**: Noisy Coin ###
How well can we learn the bias $x = (p)$ of a noisy coin?
$$
\Pr(\text{click} | p) = 0.95 p + 0.1 (1 - p)
$$
### Quantum Hamiltonian Learning ###
![](figures/qle.png)
### **Example**: Nearest-Neighbor 1D Ising ###
![](figures/qle-line-ising.png)
We can do more with access to a *trusted*
simulator.
### Quantum Interactivity ###
![](figures/iqle.png)
Perform weak simulations on trusted device only.
We design experiments using the
PGH: Particle Guess Heuristic
-
Draw $\vec{x}_-, \vec{x}_-'$ from current
posterior.
- Let $t = 1 / |\vec{x}_- - \vec{x}_-'|$.
- Return $e = (\vec{x}_-, t)$.
Adaptively chooses experiments such that
$t |\vec{x}_- - \vec{x}_-'| \approx\,$ constant.
### **Example**: Ising on Complete Graph ###
![](figures/iqle-complete-ising.png)
Robust even to wrong model. ($0.5$ NN + $10^{-4}$ Complete)
![](figures/qhl-bad-model.png)
One important approximation: physical locality.
Approximation quality can be bounded if
Lieb-Robinson velocity is finite.
Scan trusted device across untrusted.
Run particle filter only on supported
parameters.
50 qubit Ising chain, 8 qubit simulator, 4 qubit observable
Going Further
- Hyperparameterization
Granade et al.
s87
-
$\Pr(d | y) = \expect_x[\Pr(d | x) \Pr(x | y)]$.
Allows composing w/ noise, inhomogeneity, etc.
- Model selection
Ferrie
7nt
-
Using acceptance ratio or normalizations
enables comparing models.
- Quantum filtering
Wiebe and Granade
1512.03145
-
Rejection filtering can be quantized using
Harrow et al.
bcz3hc.
Welford's Algorithm
Can compute $\bar{x}$, $\Sigma$ from
one sample at a time. Numerically stable.
- $n, \bar{x}, M_2 \gets 0$.
- For each sample $x$:
-
$n \gets n + 1$
-
$\Delta \gets x - \mu$
-
$\bar{x} \gets \bar{x} + \Delta / n$
-
$M_2 \gets M_2 + \Delta (x - \bar{x})$
- Return mean $\bar{x}$, variance $M_2 / (n - 1)$.
Vector case is similar.


Provider Name (case sensitive)
Check all provider names
Max Zoom (20 is max)
Min Zoom (0 is min)
Limit map extent to current view.
Update Map
Close


Check the weather at a National park of your choosing and get up-to-date information and satelite imagery of the land. Create a packing list so you don't forget anything for the trip!
Select a State:
Select a Park:
Check the weather at a National park of your choosing and get up-to-date information and satelite imagery of the land. Create a packing list so you don't forget anything for the trip!


Linear Algebra
Solve a System of Equations
Find Eigenvalues and Eigenvectors
Single Variable Calculus
Differentiate function f(x)
Plot y = f(x)
Here we solve a system of $n$ linear equations in $n$ unknowns.
Number of equations:
Go!


How to Edit This Site
This site is created using the Hugo static site generator. Hugo accepts Markdown and translates it into HTML/CSS/JS based on the provided theme. This site uses the terminal theme. Terminal has some theme-specific features, which are detailed in the previous link.
How to build this site:
Firstly, make sure that you’re using a recent version of Hugo. The version shipped in Debian stable is too old for our purposes. The author is using v0.55.3. You can check your version with the following command:
hugo version
Hugo can be installed on OS X- See Here.
Now that we have Hugo installed, start by cloning the source repository:
git clone --recursive https://github.com/wwucyber/wwucybersite.git
Notice that there is a git submodule, called public
locally, within the repo. This submodule is our build repository,
which is the Github repo that holds our actual HTML/CSS for the live site. There should be no reason to ever push to
the build repo directly- it should only be changed by running our deploy script. The only time you’d need to push directly
to the build repo is if you need to remove a post. Ideally, this will never take place.
Make sure that your submodule is on the correct branch by running the following:
cd public && git checkout master && cd ..
Now, let’s assume we’ve made some changes to the site. To deploy, simply run the included script:
./deploy.sh "Your commit message here"
The deploy script will twice prompt for your Github username and password. This is because it’s pushing to two different repos: the source repo, and the build repo. Once it’s done, your changes should be visible on the website (this website!) within seconds.
An Introduction to Markdown and Hugo:
This section will walk you through how to make a blog post for our site.
The initial creation of a Hugo site has already been handled, so there’s no need to worry about it. If you want to learn how to create your own Hugo site, check out their Getting Started Guide.
Create a new post
Be sure that you’re currently located in the root directory of the repo. Then, run this command:
hugo new "posts/Your Post Title.md"
Use your favorite editor or IDE to open up this file. It’s located at content/posts/Your Post Title.md
.
The first thing you’ll need to do is set draft: false
.
Next, you’ll have to craft your post using Markdown. There are quite a few good resources online to help you learn, if needed. Check out the Markdown tutorial, and consult a Markdown cheatsheet. You can also check out other posts, like this one, to see how they’re written.
Add an image
To add an image, you’ll need to add them to the directory /themes/terminal/static/img
. For best practice, you should
create a sub-directory for each post, in which to store your images. To refer to these images in
a post, refer to the img directory at the root directory, for example, /img/introduction/nyancat.gif
. Here’s an example:
Note that this format is unique to the Terminal theme. If using a different theme, you may end up using raw HTML.
That’s another thing to keep in mind while writing Markdown- it will accept any valid HTML without issue. Here’s an example.
Add a code block
Here’s an example of C code from the Linux kernel:
void nmi_panic(struct pt_regs *regs, const char *msg)
{
int old_cpu, cpu;
cpu = raw_smp_processor_id();
old_cpu = atomic_cmpxchg(&panic_cpu, PANIC_CPU_INVALID, cpu);
if (old_cpu == PANIC_CPU_INVALID)
panic("%s", msg);
else if (old_cpu != cpu)
nmi_panic_self_stop(regs);
}
View your post
Before pushing changes, you can use Hugo to generate and view your post. To do so, run the following:
hugo server
Use your browser to navigate to http://localhost:1313
to see the site. This server will live-reload as you make
changes to your post. You can use this as you write your post to make sure that everything is generated the way
you’re intending.
Push your changes
Now that we’ve finished and verified our post, we can push the changes to the live site. Use the deploy.sh
script
mentioned earlier, and make sure to pass it a useful commit message.
Congratulations! We’re all done, and the site has been improved thanks to your post.


Running the Chart Code
Install
browserify
like this:
npm install -g browserify
Bundle
runtime.js
and all its dependencies:
browserify runtime.js -o bundle.js
Open
index.html
in your browser


discount¶
Note
Discount factors are only implemented in the learning mechanisms Guided associative learning, Expected SARSA, Q-learning, and Actor-critic.
Specifies the discount factor, written as \(\gamma\) in the equations for memory updates, that tells how important future rewards are to the current state. The discount factor is a value between 0 and 1. A reinforcement value \(u\) that occurs \(N\) steps in the future from the current state, is multiplied by \(\gamma^N\) to describe its importance to the current state. For example, consider \(\gamma=0.9\) and a reinforcement value \(u=10\) that is 3 steps ahead of the current state. The importance of this reward to the subject from where it stands is equal to \(10 \cdot 0.9^3 = 7.29\).
The value of the parameter discount
is used in the updating equations described in the mechanisms.
Description¶
discount = v
sets the discount factor to v
.
Examples¶
discount = 0.5
sets the discount factor to 0.5.
@variables x = 0.5
discount = x + 0.1
sets the discount factor to 0.6.


Lightbox and Bootstrap Mega-Menu for Bootstrap 3.3.1 & Jquery 2.1.1
Utilizes Bootstraps modal plugin to implement a lightbox gallery and Custom CSS to Display the Mega-Menu Dropsdowns - Lightbox forked from AshleyDW and Dropdown Mega-Menu forked from YAMM (Yet Another Mega Menu) Geedmo's - YAMM3
Usage
Via data attributes
Launch modal
Via Javascript
Open lightbox
$('#mylink').ekkoLightbox(options);
Implementation
Obviously, you need the modal component that comes with Bootstrap, and jQuery. The delegate function used on this page is:
$(document).delegate('*[data-toggle="lightbox"]', 'click', function(event) {
event.preventDefault();
$(this).ekkoLightbox();
});
If you plan on having galleries, be sure to include the LESS / CSS files.
Options
Options are passed down to the modal object so you can also use any of the original modal options.
Pass the options to the calling function as an object, or set defaults using $.fn.ekkoLightbox.defaults
(excluding modal default options, notable: title, footer, remote)
| Name | type | default | description | data-* |
|---|---|---|---|---|
| source | string | If you can't/don't want to set the href property of an element | data-remote="http://www...." |
|
| gallery | string | For grouping elements | data-gallery="galleryname" |
|
| gallery_parent_selector | string | *:not(.row) |
If the gallery parent isn't a div, use this. | data-parent="any valid selector" |
| left_arrow_class | string | .glyphicon .glyphicon-chevron-left |
The css classes to give to the left arrow | |
| right_arrow_class | string | .glyphicon .glyphicon-chevron-right |
The css classes to give to the right arrow | |
| type | string | Force the lightbox into image/YouTube mode. | data-type="(image|youtube|vimeo)" |
|
| width (videos only; height is calculated by ratio) | integer | Force the width | data-width="[0-9]+]" |
|
| always_show_close | boolean | true |
Always show the close button, even if no title is present | |
| onNavigate | callable | false |
Function call when navigate right or left. First argument is the direction |
Themes
Some quick themes to show how customisation is possible.
Examples
Images from Instagrams "The Week on Instagram | 92"
- Example #1: Single Image
- Example #2: Gallery of Images
- Example #3: Single YouTube & Vimeo Video. Forced width
- Example #4: Gallery of YouTube / Vimeo Videos
- Example #5: Mixed gallery
- Example #6: Programatically call
- Example #7: Via
data-remote
- Example #8: Gallery of different sized images
- Example #9: Images too wide for display
- Example #11: Column wrappers
- Example #12: Global galleries
- Example #13: No-extension images / presume everything is an image
- Example #14: On navigate event example
- Example #15: Hidden elements
- Example #16: Remote content
Example #1: Single Image
Note: uses modal plugin title option via data-title
, and the custom footer tag using data-footer
Example #2: Gallery of Images
By default, gallery images must be wrapped in a tag (probably

) - which doesn't have the class .row
. This is so you can create columns/rows.
A custom selector for the parent can be used, see example #11. Note how the final image is not in the gallery intentionally.
Example #3: Single YouTube / Vimeo Video
YouTube
You can use various YouTube URL formats, the regex used is: /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/
Ghostpoet - Cash and Carry Me Home
Tame Impala - Elephant (using youtu.be link)
Vimeo
You cannot embed Vimeo videos using the standard url (ie http://vimeo.com/80629469); you must link to the embed source (ie player.vimeo.com/video/80629469). This will mean your link url - if the JavaScript fails, will open the full screen player (try opening the first link below in a new tab); the solution to this is to set the lightbox source directly - the second link below does this.
City Lights - from Colin Rich (using embed link)
City Lights - from Colin Rich (with reccommended data-remote
setting)
This also works with photos: GOtags.co.uk
Forcing width
Set the width of the video
Ghostpoet - Cash and Carry Me Home (standard)
Example #6: Programatically call
These two examples are opened via the JavaScript at the bottom of the source.
Example #7: Via data-remote
Example #9: Images too wide for display
All examples on this page are this example. Too high images don't count, scrolling works fine with the original modal.
Example #10: Semantic code
So you want to use

Example #11: Column wrappers
This shows that the images do not need to be columns as per the other examples. Use data-parent
on the gallery item, or set it via the options.
Example #12: Global galleries
If you're gallery images have different parents you may wish to have all images with the same gallery tag to open regardless of their parent. To do this, set data-parent
to the highest element you know of - on this page it is the div.container
.
You can also leave the data-parent
attribute empty, and it will default to document.body
. This example uses a combination of the two.
Example #13: No-extension images / presume everything is an image
If the images you are linking to have no extension, the lightbox cannot detect that is an image; therefore you need to tell the lightbox what data-type
it is.
Click here for an image, but with no extension.
This link is missing the type attribute, and will not work.
This link is linking to a YouTube video, but forcing an image.
Example #14: On navigate event example
The argument given is the direction of navigation. Open your developer console and use any gallery example.
Example #15: Hidden elements
Facebook style, only show a few images but have a large gallery
Example #16: Remote content
The Bootstrap modal originally allowed for remote loading, but this is to be removed in v4; this functionality demonstrates the work around.
Given a URL, that is not an image or video (including unforced types [see example 13]), load the content using jQuery load(). An image and video is given below as proof gallery.


R/asreml_funct.R
stats.spatial.Rd
stats.spatial
Internal routine that calculates goodness-of-fit statisitcs for a
specific fitted model provided as input. Statistics obtained are log-likelihood, AIC,
BIC, heritability based on predictor error variance (heritPEV, only for genotypes 'random'),
A-optimality value, and logarithm of D-optimality value,
stats.spatial( object = NULL, checks = FALSE, solution = NULL, preds = NULL, k = 1, ctable = NULL )
| object | model fit output for object class asreml. Genotype factor is called 'gen' |
|---|---|
| checks | logical to indicate if checks were included in the model (default = FALSE) |
| solution | data frame with the random solutions from asreml (BLUPs) |
| preds | data frame with the predictions for genotypes (required to calculate Aopt, Dopt) |
| k | value 1 or 2 to be used for the denominator of heritabilty calculation (herit.PEV) (default = 2) |
| ctable | table with genotypes and checks (optional) |
A table with goodness-of-fit statistics for models evaluated. This includes columns: number of variance components in the model (n.VC), log-likelihood (logL), Akaike information criteria (AIC), Bayesian information criteria (BIC), heritability based on variance components, heritability based on predictor error variance (heritPEV, only for genotypes 'random'), A-optimality value, and logarithm of D-optimality value.
Salvador A. Gezan. VSN International
# Example: Pending


Background thread to accept connections to read shdr data.
More...
#include <SocketBackEnd.h>
|
| void | HandleAsyncAccept (const boost::system::error_code &error) |
| | HandleAsyncAccept is asio callback to accept replay connection and start thread to service connection. More...
|
| |
|
void | StartAsyncAccept () |
| | StartAsyncAccept starts listening for aychronous connection.
|
| |
|
void | StopAsyncAccept () |
| | StopAsyncAccept stops listening for aychronous connection.
|
| |
| void | Init (std::string domain, LONG portnumber) |
| | Init sets up asio for asynchronous connection and communication. More...
|
| |
| void | StoreSocketString (raw_message_t str) |
| | StoreSocketString raw array to send to all clients. More...
|
| |
|
void | Quit (void) |
| | Quit stop all the communication.
|
| |
|
void | Reset (void) |
| | Reset changes flag to not inited.
|
| |
| std::string & | Ip () |
| | Ip return TCP/IP host that communication occurs on. More...
|
| |
| UINT & | Port () |
| | Port return TCP/IP port number that communication occurs on. More...
|
| |
| int & | Count () |
| | Count number of communication connections listening to replay. More...
|
| |
| void | session (socket_ptr sock) |
| | session is a separate communication thread to each listening client. This thread sends raw messages to the listener. More...
|
| |
| void | server (boost::asio::io_service &io_service, short port) |
| | server thread that listens for connection. More...
|
| |
Background thread to accept connections to read shdr data.
| int& SocketBackEnd::Count |
( |
| ) |
|
|
inline |
Count number of communication connections listening to replay.
- Returns
- integer count.
| void SocketBackEnd::HandleAsyncAccept |
( |
const boost::system::error_code & |
error | ) |
|
HandleAsyncAccept is asio callback to accept replay connection and start thread to service connection.
- Parameters
-
| error | if connection had problem. |
| void SocketBackEnd::Init |
( |
std::string |
domain, |
|
|
LONG |
portnumber |
|
) |
| |
Init sets up asio for asynchronous connection and communication.
- Parameters
-
| domain | ip address to listen on |
| portnumber | port number ot listen for connection. |
| std::string& SocketBackEnd::Ip |
( |
| ) |
|
|
inline |
Ip return TCP/IP host that communication occurs on.
- Returns
- host name as ipv4 address.
| UINT& SocketBackEnd::Port |
( |
| ) |
|
|
inline |
Port return TCP/IP port number that communication occurs on.
- Returns
- port number as integer
| void SocketBackEnd::server |
( |
boost::asio::io_service & |
io_service, |
|
|
short |
port |
|
) |
| |
server thread that listens for connection.
- Parameters
-
| io_service | asio service that handles asychronous communication |
| port | TCP/IP port number to listen for connections. |
| void SocketBackEnd::session |
( |
socket_ptr |
sock | ) |
|
session is a separate communication thread to each listening client. This thread sends raw messages to the listener.
- Parameters
-
| sock | pointer to the socket that is listening. |
| void SocketBackEnd::StoreSocketString |
( |
raw_message_t |
str | ) |
|
StoreSocketString raw array to send to all clients.
- Parameters
-
| str | raw byte array to send to listening clients. |
| std::vector<raw_message_t> SocketBackEnd::_all_bufferssofar |
|
protected |
all raw messages sent so far
| bool SocketBackEnd::_bInited |
|
protected |
class instance inited flag
| raw_message_t SocketBackEnd::_buffer |
|
protected |
| std::string SocketBackEnd::_domainname |
|
protected |
| UINT SocketBackEnd::_ipport |
|
protected |
inteter TCP/IP socket port number
| size_t SocketBackEnd::_nbuffers |
|
protected |
| tcp::acceptor* SocketBackEnd::_pAcceptor |
|
protected |
boost asio TCP acceptor type
| std::string SocketBackEnd::_portnumber |
|
protected |
striong of TCP/IP socket port number
| socket_ptr SocketBackEnd::_pSocket |
|
protected |
| bool SocketBackEnd::bRunning = true |
|
staticprotected |
thread(s) listening and connected running flag
| int SocketBackEnd::nCount = 0 |
|
staticprotected |
The documentation for this class was generated from the following files:
- C:/Users/michalos/Documents/GitHub/MTConnectSolutions/Socket_Replay_Gui/Socket_Replay_Gui/SocketBackEnd.h
- C:/Users/michalos/Documents/GitHub/MTConnectSolutions/Socket_Replay_Gui/Socket_Replay_Gui/SocketBackEnd.cpp


Demo for COMM493 that uses the NLC service to analyze Queen's MBA applications.
This application uses the NLC service to analyze Queen's MBA applications and return the results in a concise and easy to understand manner.
Enter in the text on the left hand side for analysis, or upload files using the button below. When you are finished, press the analyze button for results.


Knitout
Knitout (.k
or .knitout
) is an instruction-oriented and portable knitting machine language.
This is a web version of the knitout-backend-kniterate code developed by the Carnegie Mellon Textiles Lab.
Report bugs.
Get source code (also includes a command-line version).
Knitout (.k
or .knitout
) is an instruction-oriented and portable knitting machine language.


Upload sketch HEX File for RFLink:
Actual version: ???, Available version: ???
Flash newest sketch
You have newest version.


Guardianes 3.0 - Statistics
All Projects
Back to monitoring
Project
Categories
Hexagons inspected
Users
Observations
Leaderboard
Rank
User
Hexagons inspected
Observations
Projects


Start Windows 95
Boot from scratch
Hit ESC to lock or unlock your mouse
CD image
Floppy disk image
Hard drive disk image
Slave Hard drive disk image
Multiboot kernel image (experimental)
Disk images are not uploaded to the server
Memory size
MB
Video Memory size
MB
Networking proxy (leave blank to disable)
Disable audio
Enable ACPI (experimental)
Boot order
CD / Floppy / Hard Disk
CD / Hard Disk / Floppy
Floppy / CD / Hard Disk
Floppy / Hard Disk / CD
Hard Disk / Floppy / CD
Hard Disk / CD / Floppy
Start Emulation
Scale:
Change floppy:
Change CD:
Disk:
Idle
| CPU Speed:
0
mIPS
IDE device (HDA or CDROM)
VGA
Mode:
Resolution:
-
BPP:
-
Mouse:
No


class ADC – analog to digital conversion
The ADC class provides an interface to analog-to-digital convertors, and
represents a single endpoint that can sample a continuous voltage and
convert it to a discretised value.
Example usage:
import machine
adc = machine.ADC(pin) # create an ADC object acting on a pin
val = adc.read_u16() # read a raw analog value in the range 0-65535
Constructors
-
class
machine.
ADC
(id)
Access the ADC associated with a source identified by id. This
id may be an integer (usually specifying a channel number), a
Pin object, or other value supported by the
underlying machine.
Methods
-
ADC.
read_u16
()
Take an analog reading and return an integer in the range 0-65535.
The return value represents the raw reading taken by the ADC, scaled
such that the minimum value is 0 and the maximum value is 65535.


{% extends './layout_index.html' %} {% block page_title %} Chlamydia - NHS.UK {% endblock %} {% block pageTitle %} Chlamydia {% endblock %} {% block pageSubTitle %} Symptoms and when to get tested {% endblock %} {% block navContent %}
Most people with chlamydia don’t have symptoms.
The only way to know if you have it is to get tested.
Get tested if you or any sexual partners:
If you get symptoms, they usually appear within a few weeks of catching chlamydia, but can start later.
Symptoms of chlamydia include:


This tool provides you the ability to identify how to grow your Azure Center of Excellence (practice, community,
or similar) with the intent to provide resources and suggestions. This tool is not designed to me an analysis
of the COE but rather should be used to provide guidance on how to evolve the practice to meet various business
objectives. The tool will provide an assessment of three main areas: Readiness, Delivery, & Business Development.
Below you will find a list of your completed assessments to date. Please click a row for more details, or
create a new assessment.
Your Assessments
Group
Assessment Date
Performed By
{{assessment.group}}
{{formatDate(assessment.created)}}
{{assessment.author.name}}
It does not appear that you have completed any assessments


For my Computer Science 281 Website Design and Development class, I worked with a group of three other students throughout the semester to develop this website from the ground up. It is a portfolio website for a Mathematics and Statistics professor at the University of Saskatchewan that showcases her background, research, publications, classes, and contact info.
We met with the professor several times during the design process to ensure we properly developed what she wanted, and to pitch our design ideas and mock-ups.
The site features a navigation bar that fixes to the top of the screen if the page is scrolled down, nested collapsible information panels, easy insertion of new data or text, and a data table of publications that is sortable based on name or date.