内容可滚动 Text in a pre element is displayed in a fixed-width font, and it preserves both spaces and line breaks. Text in a pre element is displayed in a fixed-width font, and it preserves both spaces and line breaks.


Dark Mode in a single CSS theme file
Basic Setup
- A single, fully themed, 2 color mode, Bootstrap CSS
- Filtered internally by stylesheet media filters
- Does not require and additional JavaScript, or jQuery
Replace the bootstrap stylesheet with the following code:
<!-- Inform the browser that this page supports both dark and light color schemes,
and the page author prefers light. -->
<meta name="color-scheme" content="light dark">
<!-- Bootstrap-Dark CSS -->
<link rel="stylesheet" href="bootstrap-dark.css">
Syntax highlighting uses Prism.js. Copy to clipboard uses Clipboard.js.
This is all you need to enable dark mode with Bootstrap.
Advanced Features
You may also want to be notified when the browser changes the color scheme. For example you may want to toggle a `dark
` class in the body with this code:
<script>
$(document).ready(function(){
// dark mode update and listner
function updateDarkColorScheme() {
if (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches) {
$("body").removeClass('light').addClass("dark").attr( "data-color-scheme", "dark" );
} else {
$("body").addClass('light').removeClass("dark").attr( "data-color-scheme", "light" );
}
}
// Update on first load.
updateDarkColorScheme();
// and every time it changes
if (window.matchMedia) window.matchMedia("(prefers-color-scheme: dark)").addListener( updateDarkColorScheme );
});
</script>
You really don't need the additional code. This is only usefull if you have other dependancies that have not been coded to support dark mode.
Read the README.md for more on this proof of concept.


assert
statement conditions that are constants. assert
statements with constant conditions will either always fail or always succeed.
Such statements might be left over after a refactoring and are probably not intended.
Example:
void foo() {
assert true;
}


St. Mark’s Square reopens in Venice, but water remains high
by COLLEEN BARRYVENICE, Italy (AP) — Tourists and residents have been allowed back into St. Mark’s Square in Venice, a day after it was closed due to exceptionally high tidal waters that swept through most of the lagoon city’s already devastated center.
Despite sunny skies, the city remained on edge Saturday due to possibly more wind-propelled high tidal waters during the weekend. The city was struck Tuesday by devastating floods, the worst in decades.
By late Saturday morning, water was rising again in St. Mark’s Square and the forecast for Sunday was worse. The tide was expected to peak at 1.15 meters (3.7 feet) above sea level on Saturday at noon.
Late Tuesday, water levels in Venice reached 1.87 meters (6 feet, 1 inch) above sea level, the highest flooding since 1966.
COLLEEN BARRY


@*
* Copyright 2016 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*@
@import uk.gov.hmrc.cataloguefrontend.RepositoryDetails
@import uk.gov.hmrc.cataloguefrontend.ViewMessages
@(cacheTimestampFormatted: String, teamName:String, repos: Map[String, List[String]], teamMembersLink: String)
@standard_layout(teamName,"teams") {


2020-05-30
Let’s say we have a directory somewhere that we access often; maybe
the directory that contains all our projects, or the parent directory of
a bunch of services. And that directory has an annoyingly long path,
potentially buried deep in some GOPATH
, for example. To get
there, we have to type something like
cd ~/go/src/github.com/bewuethr/awesome-project
every time. Unacceptable, right?
We can use an alias! That’s what I did for a long time. I added
alias cdap='cd "$HOME/go/src/github.com/bewuethr/awesome-project"'
to my ~/.bashrc
1, and was able to
navigate like
$ cdap
$ pwd
/home/benjamin/go/src/github.com/bewuethr/awesome-project
$ ls
bar baz foo go.mod go.sum
$ cd bar
$ pwd
/home/benjamin/go/src/github.com/bewuethr/awesome-project/bar
Great!
CDPATH
I almost always want to access a subdirectory of
awesome-project
, rarely the directory itself. Bash (or any
POSIX conformant shell) has a shell variable called CDPATH
:
a colon-separated list of directories for cd
to use as a
search path.
So, instead of my alias, I’d stick this into my
.bashrc
:
export CDPATH='/home/benjamin/go/src/github.com/bewuethr/awesome-project'
Now, from anywhere in my file system, I can just do this:
$ pwd
/path/to/some/random/directory
$ cd foo
/home/benjamin/go/src/github.com/bewuethr/awesome-project/foo
And sure enough, Bash even helpfully tells me that it took me there! Excellent.
Or is it? Let’s assume I want to change into a directory
foo
within that random directory:
$ pwd
/path/to/some/random/directory
$ ls
errcheck foo lint vet
$ cd foo
/home/benjamin/go/src/github.com/bewuethr/awesome-project/foo
That took me to the foo
from CDPATH
!
Definitely not what I wanted. I could do this instead:
$ cd ./foo
$ pwd
/path/to/some/random/directory/foo
But in reality, that’d more likely look like
$ cd foo # Oops, uses CDPATH!
/home/benjamin/go/src/github.com/bewuethr/awesome-project/foo
$ cd - # Go to previous directory...
/path/to/some/random/directory
$ cd ./foo # Be explicit with ./
and gone is any advantage CDPATH
would have had over an
alias. It tried using it like this for a while, but it got too annoying
and I gave up, went back to my alias.
CDPATH
done rightUntil one day, I really wanted to figure out if there isn’t a better
way. I took a closer look at the Bash manual; from the description of
the cd
builtin:
If the shell variable
CDPATH
exists, it is used as a search path: each directory name inCDPATH
is searched for directory, with alternative directory names inCDPATH
separated by a colon (:
).
And a bit later:
If a non-empty directory name from
CDPATH
is used, or if-
is the first argument, and the directory change is successful, the absolute pathname of the new working directory is written to the standard output.
That was the first hint: “non-empty directory name”!
In the POSIX
spec for cd
, we can read this:
Starting with the first pathname in the <colon>-separated pathnames of CDPATH […] if the pathname is null, test if the concatenation of dot, a <slash> character, and the operand names a directory.
Even more explicit. A null pathname in CDPATH
is
replaced with ./
, which is exactly what I want. The fix is
really a one character change:
export CDPATH=':/home/benjamin/go/src/github.com/bewuethr/awesome-project'
# └── this one!
This prepends a null directory to CDPATH
.
Now I can do this:
$ pwd
/path/to/some/random/directory
$ ls
errcheck foo lint vet
$ cd foo # Does cd ./foo
$ pwd
/path/to/some/random/directory/foo
$ ls
foo.go
$ cd foo # Uses non-null CDPATH path
/home/benjamin/go/src/github.com/bewuethr/awesome-project/foo
Much better!
As the POSIX spec tells us, CDPATH
has been around since
the System V shell. And indeed, the manual for System V Release 3.5 has
this to say:
A nice side effect when using the (pretty standard) bash-completion
package is that it is fully CDPATH
aware (see the implementation
of _cd
), so I can do
$ pwd
/home/benjamin/.vim
$ ls
after autoload bundle colors ftdetect
$ cd f<tab>
foo/ ftdetect/
and get both local and CDPATH
directories.


| 程序包 | 说明 |
|---|---|
| org.apache.giraph.benchmark |
Package of benchmarks for performance testing and optimization
|
| org.apache.giraph.bsp |
Package of generic bulk synchronous processing objects.
|
| org.apache.giraph.comm |
Package of communication related objects, IPC service.
|
| org.apache.giraph.comm.netty |
Package for netty implementations.
|
| org.apache.giraph.comm.netty.handler |
Package for classes which handle requests and responses.
|
| org.apache.giraph.comm.requests |
Package for requests.
|
| org.apache.giraph.conf |
Package of Giraph configuration related things.
|
| org.apache.giraph.edge |
Package of Vertex implementations.
|
| org.apache.giraph.examples |
Package of Giraph examples.
|
| org.apache.giraph.graph |
Package of all the graph related objects, built on the
org.apache.bsp package.
|
| org.apache.giraph.io |
Input/Output related things.
|
| org.apache.giraph.io.formats |
Package of reusable library Giraph objects.
|
| org.apache.giraph.io.iterables |
Iterable wrappers for IO readers/writers
|
| org.apache.giraph.master |
Package of all the master related things.
|
| org.apache.giraph.partition |
Package of partitioning related objects.
|
| org.apache.giraph.utils |
Package of all generic utility classes.
|
| org.apache.giraph.worker |
Package of all the worker related things
|
| 类和说明 |
|---|
| Vertex
Basic abstract class for writing a BSP application for computation.
|
| 类和说明 |
|---|
| FinishedSuperstepStats
Immutable graph stats after the completion of a superstep
|
| GraphState
Immutable global state of the graph.
|
| GraphTaskManager
The Giraph-specific business logic for a single BSP
compute node in whatever underlying type of cluster
our Giraph job will run on.
|
| InputSplitEvents
Simple container of input split events.
|
| InputSplitPaths
Simple container of input split paths for coordination via ZooKeeper.
|
| VertexEdgeCount
Simple immutable structure for storing a final vertex and edge count.
|
| 类和说明 |
|---|
| GraphState
Immutable global state of the graph.
|
| Vertex
Basic abstract class for writing a BSP application for computation.
|
| VertexMutations
Structure to hold all the possible graph mutations that can occur during a
superstep.
|
| 类和说明 |
|---|
| GraphState
Immutable global state of the graph.
|
| TaskInfo
Abstract class for information about any task - worker or master.
|
| Vertex
Basic abstract class for writing a BSP application for computation.
|
| 类和说明 |
|---|
| TaskInfo
Abstract class for information about any task - worker or master.
|
| 类和说明 |
|---|
| VertexMutations
Structure to hold all the possible graph mutations that can occur during a
superstep.
|
| 类和说明 |
|---|
| GraphState
Immutable global state of the graph.
|
| Vertex
Basic abstract class for writing a BSP application for computation.
|
| VertexResolver
Handles all the situations that can arise upon creation/removal of
vertices and edges.
|
| VertexValueFactory
Factory class to create default vertex values.
|
| 类和说明 |
|---|
| Vertex
Basic abstract class for writing a BSP application for computation.
|
| 类和说明 |
|---|
| Vertex
Basic abstract class for writing a BSP application for computation.
|
| 类和说明 |
|---|
| GraphFunctions
Each compute node running on the underlying cluster
is marked with this enum to indicate the worker or
master task(s) it must perform during job runs.
|
| GraphState
Immutable global state of the graph.
|
| GraphStateAware
Interface specifying that the class can be configured with a GraphState.
|
| GraphTaskManager
The Giraph-specific business logic for a single BSP
compute node in whatever underlying type of cluster
our Giraph job will run on.
|
| Vertex
Basic abstract class for writing a BSP application for computation.
|
| VertexChanges
Structure to hold all the possible graph mutations that can occur during a
superstep.
|
| VertexEdgeCount
Simple immutable structure for storing a final vertex and edge count.
|
| VertexMutations
Structure to hold all the possible graph mutations that can occur during a
superstep.
|
| VertexResolver
Handles all the situations that can arise upon creation/removal of
vertices and edges.
|
| VertexValueFactory
Factory class to create default vertex values.
|
| 类和说明 |
|---|
| Vertex
Basic abstract class for writing a BSP application for computation.
|
| 类和说明 |
|---|
| Vertex
Basic abstract class for writing a BSP application for computation.
|
| 类和说明 |
|---|
| Vertex
Basic abstract class for writing a BSP application for computation.
|
| 类和说明 |
|---|
| GraphTaskManager
The Giraph-specific business logic for a single BSP
compute node in whatever underlying type of cluster
our Giraph job will run on.
|
| TaskInfo
Abstract class for information about any task - worker or master.
|
| 类和说明 |
|---|
| Vertex
Basic abstract class for writing a BSP application for computation.
|
| 类和说明 |
|---|
| Vertex
Basic abstract class for writing a BSP application for computation.
|
| 类和说明 |
|---|
| FinishedSuperstepStats
Immutable graph stats after the completion of a superstep
|
| GraphState
Immutable global state of the graph.
|
| GraphTaskManager
The Giraph-specific business logic for a single BSP
compute node in whatever underlying type of cluster
our Giraph job will run on.
|
| TaskInfo
Abstract class for information about any task - worker or master.
|
| VertexEdgeCount
Simple immutable structure for storing a final vertex and edge count.
|
Copyright © 2011-2013 The Apache Software Foundation. All Rights Reserved.


Editors's Picks
latest business news
Oil hits $75 as Iran sanction fears mount
2Oil hits $75 as Iran sanction fears mount
3Oil hits $75 as Iran sanction fears mount
4Oil hits $75 as Iran sanction fears mount
5Oil hits $75 as Iran sanction fears mount


N
eighbor
S
pace
Menu
Menu
Home
Contact
Membership
Community
Log In
Questions?
Comments?
Let Us Know!
Send
© NeighborSpace 2019


This guide will walk you through the development of a regular expression, or regex, annotator in Baleen.
Annotators are the Baleen components that extract information and entities from content being passed through the pipeline. Regular expressions are a way of expressing a pattern that might appear in text. For example, we wouldn't be able to list every possible e-mail address but we are able to describe a pattern that would represent all e-mail addresses.
In this guide, we will be developing a regex annotator to annotate all .com e-mail addresses. That is, any e-mail address that ends in .com will be annotated as a CommsIdentifier.
To start with, let's create a new Java class called ComEmail
which extends AbstractRegexAnnotator
.
The AbstractRegexAnnotator
class provides most of the functionality for us, and we just need to provide a small amount of code to specify what the regular expression is,
and what we should do when we find one.
We will create it in the uk.gov.dstl.baleen.annotators.guides
package to keep it separate from existing annotators.
package uk.gov.dstl.baleen.annotators.regex; import java.util.regex.Matcher; import org.apache.uima.jcas.JCas; import uk.gov.dstl.baleen.annotators.regex.helpers.AbstractRegexAnnotator; import uk.gov.dstl.baleen.types.common.CommsIdentifier; public class ComEmail extends AbstractRegexAnnotator{ public ComEmail() { } @Override protected CommsIdentifier create(JCas jCas, Matcher matcher) { return null; } }
You will notice in the above code that we have had to tell AbstractRegexAnnotator
what type of annotation we will be returning,
and we have also created a constructor function and overridden the create(JCas, Matcher)
function.
It is this function that we will use to create our annotation and set any annotator specific properties.
The constructor of AbstractRegexAnnotator
, our super constructor, will do most of the hard work for us so we just need to pass it the correct things.
There are several constructors available on AbstractRegexAnnotator
, but we will use the one that takes:
private static final String COM_EMAIL_REGEX = "[A-Z0-9._%+-]+@([A-Z0-9.-]+\\.com)"; public ComEmail() { super(COM_EMAIL_REGEX, false, 1.0); }
AbstractRegexAnnotator
requires us to override the create(JCas, Matcher)
function in order to create the annotation.
This function should return an annotation of the correct type with any properties specific to that type (for example, identifier type in our case) set.
You do not need to set standard properties like the value and begin/end, as these will be set for you by the AbstractRegexAnnotator
.
In fact, if you do try to set these they will be overwritten.
The Matcher object provided will contain a Matcher with pattern provided in the constructor and the match for the current entity. This may be useful if you need to set annotation properties based on some logic involving the current match, but is not needed in this example so we will ignore it.
@Override protected CommsIdentifier create(JCas jCas, Matcher matcher) { CommsIdentifier ci = new CommsIdentifier(jCas); ci.setIdentifierType("email"); return ci; }
And that's it! We now have a fully working annotator that will find e-mail addresses ending in .com. Most of the hard work is done behind the scenes, and we just need to implement two simple functions to get our annotator up and running.
To really finish it off, we should provide documentation and unit tests - but that is left as an exercise for the reader!
Now you've built your annotator and want to include it in Baleen, all you need to do is ensure that your class is on the classpath, and then in your pipeline configuration include your class in the pipeline ensuring that you specify the full package and classname.


About Me
My name is Jonathan Vose and I am a senior at Marist College and a member of the Honors Program. Additionally, I am a Biochemistry major (Chemistry major with a concentration in Biochemistry). I will be applying to Chemistry/Biochemistry Ph.D. programs this application cycle. After obtaining my Ph.D., I want to work in the pharmecutical industry, where I will work on the development of novel therapeutics. I was born in Philadelphia and raised in Allentown Pennsylvania. My family is relatively small (just me, my brother, and my mom). However, we have two pets. My cat's name is Christmas, and our dog's name is KD. My cat is without a doubt my favorite. Fun fact: my brother is almost exactly one year younger than me and goes to Temple University. Even though we are only a year apart, we are completely differnet people. I absolutely love music and have been playing the piano since I was in middle school. Although, I don't play as much now. However, my interest in music led me to join my high school's theater program. I was actively involved in my schools theater program for almost four years, where I worked behind the scenes (I am a horrible singer). Aside from music, I love snowboarding, swimming, and traveling.
Chemistry
Python
Piano


Salad salad salads. Salads salads? Salad salad salad. Salad-salad, salad, salad-salad-salads. Salad salad salads. Salads salads? Salad salad salad. Salad-salad, salad, salad-salad-salads.
Salad salad salads. Salads salads? Salad salad salad. Salad-salad, salad, salad-salad-salads. Salad salad salads. Salads salads? Salad salad salad. Salad-salad, salad, salad-salad-salads.
Salad salad salads. Salads salads? Salad salad salad. Salad-salad, salad, salad-salad-salads. Salad salad salads. Salads salads? Salad salad salad. Salad-salad, salad, salad-salad-salads.
Salad salad salads. Salads salads? Salad salad salad. Salad-salad, salad, salad-salad-salads. Salad salad salads. Salads salads? Salad salad salad. Salad-salad, salad, salad-salad-salads.
Salad salad salads. Salads salads? Salad salad salad. Salad-salad, salad, salad-salad-salads. Salad salad salads. Salads salads? Salad salad salad. Salad-salad, salad, salad-salad-salads.
Salad salad salads. Salads salads? Salad salad salad. Salad-salad, salad, salad-salad-salads. Salad salad salads. Salads salads? Salad salad salad. Salad-salad, salad, salad-salad-salads.
Like, seriously. You know something fishy is going on with our Business Salads, right? DISCLAIMER: BUSINESS SALADS DO NOT CONTAIN ANY FISH PRODUCT. I mean, just buy our salads, they're so good for... for your business. Bring these to your next meeting and watch your employees' beaming smiles as they scarf down more and more lettuce and don't get any more work done because they're just too darn happy. DISCLAIMER: BUSINESS SALADS DO NOT CONTAIN ANY LETTUCE. I mean... buy our Business Salads. For business reasons.


The Old Apple Tree
The Old Apple Tree
She sat by the old apple tree up on Black Creek hill, munching on an apple quite contently. Without a care, she quietly looked down on the marvellous and fascinating world below her. There she sat, all alone. But she was not lonely, for she had her apple tree — and he had she.
The sun struck her as she sat there.  The tree had been in full bloom this season, and his children were ripe and delicious. It was with great eagerness that he gave her his fruit. She had made a habit out of visiting him, of climbing his limbs and dozing off for a midsummer nap in his arms now and again. He couldn’t have asked for a better friend.
Of course, he would get cross occasionally when she accidentally trampled one of his saplings, but all was forgiven moments thereafter when she’d giggle and apologize. The love was unquestionably mutual, unconditional, and would have been everlasting.
She’d first found him when he was still young. Her family had moved to the area at the behest of her ailing grandmother; she needed them to help her survive, so her family made the tough decision to leave their comfortable familiarities and head to her Nona’s bedside.
While it was a sad time for her family, it was a happy time for her. She was too young to become absorbed by the maladies that had befallen her family. All she knew was that when the sun was high, the grass was green, and the wind was tame, he would hold her in his arms and life was perfect. Even in her youthful innocence, she somehow understood and capitalized on the notion that ignorance was bliss.
But love turned out to be the once-unseen worm.
One warmer autumn day, she decided to pay a visit to her old friend. Winter was coming, and she knew he wouldn’t be able to play any more. He’d have to go to sleep. For the entire day, she climbed and swung and ate. He nourished her, entertained her, and watched out for her. And she loved him for it.
As the sun set, she made her way home. Down the hill she skipped, stopping for but a moment to look back at the apple tree she so adored. But her happiness turned to sadness as her skip turned to a trudge.
An apple tree was not a boy.


Get a list of applications\n
https://apis.wso2.com/api/am/store/v0.9/applications
GET
apim:subscribe
curl -H "Authorization: Bearer aa0ddec1ac656744234477f20fafcb0d" "http://<IP_ADDRESS>:9763/api/am/store/v0.9/applications"
HTTP/1.1 200 OK
Content-Type: application/json
{
"previous": "",
"list": [
{
"groupId": "",
"subscriber": "admin",
"throttlingTier": "Unlimited",
"applicationId": "367a2361-8db5-4140-8133-c6c8dc7fa0c4",
"description": "",
"status": "APPROVED",
"name": "app1"
},
{
"groupId": "",
"subscriber": "admin",
"throttlingTier": "Unlimited",
"applicationId": "896658a0-b4ee-4535-bbfa-806c894a4015",
"description": null,
"status": "APPROVED",
"name": "DefaultApplication"
}
],
"count": 2,
"next": ""
}
| Type | Name | Description | Schema | Default |
|---|---|---|---|---|
| Query |
groupId optional |
Application Group Id\n |
String | |
| Query |
query optional |
**Search condition**.\n\nYou can search for an application by specifying the name as \"query\" attribute.\n\nEg.\n\"app1\" will match an application if the name is exactly \"app1\".\n\nCurrently this does not support wildcards. Given name must exactly match the application name.\n |
String | |
| Query |
limit optional |
Maximum size of resource array to return.\n |
Integer |
25 |
| Query |
offset optional |
Starting point within the complete list of items qualified.\n |
Integer |
0 |
| Header |
Accept optional |
Media types acceptable for the response. Default is JSON.\n |
String |
JSON |
| Header |
If-None-Match optional |
Validator for conditional requests; based on the ETag of the formerly retrieved\nvariant of the resourec.\n |
String |
| HTTP Code | Description | Schema |
|---|---|---|
200 |
OK.\nApplication list returned.\n |
ApplicationList |
304 |
Not Modified.\nEmpty body because the client has already the latest version of the requested resource.\n |
|
400 |
Bad Request.\nInvalid request or validation error.\n |
Error |
406 |
Not Acceptable.\nThe requested media type is not supported.\n |
Error |


--- title: "Download or upload waypoints or tracks from gps under GNU linux by gpsbabel" date: 2014-12-09T17:29:10 lastmod: 2014-12-09T17:29:10 draft: false # Authors. Comma separated list, e.g. `["Bob Smith", "David Jones"]`. authors: - Ming Su tags: - gps - garmin - gpsbabel - kml - gpx - GNU/linux summary: "Download or upload waypoints or tracks from gps under GNU linux by gpsbabel" ---
I have got a garmin etrex gps which is very old but working pretty well; its major work is for sampling sites navigation in lakes/reservoirs.
By using GPSbabel, I can easily download/upload waypoints/tracks from gps devices under GNU linux.
My workstation doesn’t have a serial port, so I use a usb2serial cable for doing this. In my case, I could find my serial device here:
{% highlight bash %} /dev/ttyUSB0 {% endhighlight %}
For using GPSbabel, you will need to know how to do at least two things: read data from a file, and write it to another file. There are four basic options you need to know to do those things:
{% highlight bash %} Command Meaning -i format Set input format -f filename Read file -o format Set output format -F filename Write output file {% endhighlight %}
example 1: download from gps (garmin serial) and write to .gpx file
{% highlight bash %} gpsbabel -i garmin -f /dev/ttyUSB0 -o gpx -F waypoint.gpx {% endhighlight %}
or to .kml file
{% highlight bash %} gpsbabel -i garmin -f /dev/ttyUSB0 -o gpx -F waypoint.kml {% endhighlight %}
example 2: upload from .gpx or .kml file to gps
{% highlight bash %} gpsbabel -i garmin -f /dev/ttyUSB0 -o gpx -F waypoint.gpx {% endhighlight %}
or
{% highlight bash %} gpsbabel -i garmin -f /dev/ttyUSB0 -o gpx -F waypoint.kml {% endhighlight %}


Collaboration is at the core of the SRCCON:WORK program. Facilitators lead hands-on sessions that explore our conference themes through discussions and project work that prepares us to bring change back to our home newsrooms.
SRCCON:WORK and our other SRCCON events are highly participatory events, where everyone is engaged in learning, building, and problem-solving together. When you run a session at SRCCON:WORK, you’re in a room with dozens of other smart people with an opportunity to compare notes, share skills, and help everyone learn from each other.
SRCCON:WORK will explore how we as a community can make journalism more inclusive, representative, and responsive. It is organized around a set of themes:
Our sessions are built around participation and collaborative problem-solving where every attendee is a peer—our name badges don’t flag organizations or speaker status. We’re all here to learn from each other. We put a lot of intention into the composition of the crowd at SRCCON:WORK, to make it easy to find collaborators and folks who have faced similar questions or who are grappling with them right now. We’re also available to lend support as the conversations continue after this event and into your newsroom or NICAR or beyond.
As a facilitator, you bring your experience and excitement (or even skepticism) to leading a discussion or workshop with a highly engaged group.
 You’re there to guide discussions or collaborative work, and to help attendees contribute and walk away having learned something new.
We’ll have an in-person facilitator training on Wednesday, December 6 from 5:30-6:30pm. It’ll be a great chance to check out the venue, meet other facilitators, and get any last minute facilitation tips.
SRCCON:WORK attendees show up ready to pitch in, whether that’s working through activities, writing collaboratively, or participating in conversations. Much of the work you’ll do as a facilitator will take place in the weeks leading up to SRCCON:WORK, as you outline your session. We’ve found that keeping two things in mind can help translate your awesome ideas into a meaningful experience for SRCCON:WORK attendees:
From there, you have a huge amount of room to explore creative ways to work with attendees. Slide presentations and lectures aren’t what you’re after, but conversations and small-group work are staples on the SRCCON:WORK schedule. There are many outstanding session formats to consider, as well: design exercises, games, technical workshops, role-playing, even physical movement and field trips outside the conference space. Fun is good. We’ll support all sorts of ways to help you engage with people and make abstract concepts real.
Another thing to consider as you map out your session outline: Expect the unexpected. It’s easy to imagine the best-case scenario, where everything runs smoothly and according to plan—and that’s probably exactly how your session will go! But what if you ask your first question and no one answers? What if someone shares an amazing idea, and you want to follow up on it? You’ll be responding to situations like these on the fly, and you’ll be a lot more confident if you’ve thought through some scenarios in advance. Plan more material than you think you’ll need, and know you can feel good about dropping half of it—you just don’t know which half it will be.
And finally, make sure to block out time in your outline for wrapup. Sessions at SRCCON:WORK are 60 minutes long, and we want you to have room to let people share final thoughts and next steps before people head out the door.
Once you’re at the venue, conference staff and volunteers will be around to answer questions and help you with any problems that come up. We’ll also have time at the Wednesday evening facilitator training for you to see the venue and check out the room where you’ll be leading your session. Here are a few more things to help you anticipate what the facilitation experience will be like:
About 125 people will attend SRCCON:WORK, and we program about 3 sessions at a time, so most will have 30 to 40 people in the room. Some topics will draw fewer—and that’s fine! Small sessions are incredibly meaningful for the people who are there, and we want to encourage those conversations.
Some sessions might bring in larger crowds as well, so we encourage you to spend a little time thinking about how you might accommodate different group sizes. Will you be working in small groups that can scale up or down? Are you running an activity that might need extra supplies? We’ll have volunteers available to help you make room adjustments on the fly, but you’ll be happier if you go in knowing how you’ll respond to different crowd sizes.
First and foremost, you’ll be surrounded by peers—people excited about journalism and ready to share their expertise at a journalism-centric conference. More than a third of the attendees at SRCCON:WORK will be session facilitators themselves. All of the participants are folks who expressed an interest in spending two days delving into how we work together, and how to support one another. Folks come to these discussions from a variety of roles related to journalism and tech and with different amounts of time in the field. But everyone is here to share and learn from each other.
As a facilitator, there are a couple ways you can really support the people in your room:
Every room at SRCCON:WORK will be well-stocked with note paper, post-it notes, pens, and sharpies. We’ll make sure you have a whiteboard or a giant scratchpad on an easel, too; if you want to send people away with ideas they can act on, grabbing a marker and whiteboarding the best comments from the room is a great way to do it.
Each room will have a screen so you can connect your laptop and show examples to kick off a discussion. We’ll also set up a shared document for live note-taking, linked right from your session on the SRCCON:WORK schedule. This is a great place to drop links to useful resources for you session attendees.
If you need any special supplies for your session, we’ll ask you to tell us about them ASAP so we can order them and have them ready for you.
The conference schedule sets aside 60 minutes for each SRCCON:WORK session. You don’t have to fill the entire time, but we want you to have plenty of room to dig into a topic and respond to threads that emerge along the way. If your session needs more than 60 minutes, let us know and we can adjust appropriately. The conference schedule also builds in a 30-minute break between sessions—plenty of time for attendees to hang around and ask questions or continue conversations before they head out.
How you use your time is completely up to you. While you won’t need a script like you might for a traditional conference talk, we do thoroughly encourage outlines. Sessions are always a little less daunting once you break them into smaller pieces, and knowing how you plan to budget your time helps you stay on task while you’re doing it live.
SRCCON:WORK works with White Coat Captioning, and we’ll transcribe about 1/3 of our sessions for sharing after the conference is over. The stenographer will be in the Ullyot North room, so if your session is in that spot, it will be transcribed. The transcriptions for these sessions will not be shared live. The transcripts may be shared after the event. We will coordinate with you about whether you would like to share the transcript and how you would like to edit it. We know that at this event folks might want to have a lot more “off the record” conversations, so we won’t share session transcripts live.
SRCCON:WORK is built upon participation and folks are coming to your session expecting to be involved and active. In addition to the expectations you set in your session, we’ve shared some suggestions about how we can take care of each other and ourselves throughout the event. Some things to consider in your role as session facilitator:
Start by setting some ground rules. This can be super helpful for participants, and for you to refer back to as facilitator. Some examples:
Take advantage of your power as facilitator. You’ve set the agenda, and your role is to guide and support conversation.
Work with people in the room. Leading a group of creative people toward a common goal can be hard, especially while you’re juggling time, information, and conversations. A cofacilitator can help lighten the load and keeps each of you from having to be “on” the whole time. But also don’t be afraid to ask an enthusiastic attendee to help keep time, take notes, or watch for people with something to say.
Be clear about outcomes. Call out the goals for each discussion at the outset, check along the way that you’re making progress toward them, and review goals at the end of the session. (This is sometimes referred to as “tell them what you’re going to tell them, then tell them, then tell them what you told them.”)
Overall, use your wisdom and passion as your guide; we greatly appreciate you sharing your time and knowledge with the group, and trust each facilitator to create an optimal sharing environment.
Inclusion is about creating space where people can feel more able to share and work together. It includes respecting things like pronouns and accessibility needs, and at SRCCON:WORK we also encourage you to:
In your sessions and outside them, conference staff will fully support you in making SRCCON:WORK a safe and welcoming space. If you witness or hear about incidents of harassment, intimidation, or other problems, please get us involved. You can find plenty more information in our conference code of conduct.


{% extends "base.html" %} {% block content%} Thank you for submitting {{ survey.title }}.
Back to survey detail


About
I have a Ph.D degree in Automation and Systems Engineering with emphasis on Computer-Aided Hardware Design. I have a strong knowledge in algorithms, data structures, and optimization.
I'm very motivated, persistent, and self-driven. I also have good communication skills and enjoy collaborative work.


Module: ActiveRecord::Scoping::Default::ClassMethods
| Relationships & Source Files | |
| Defined in: | activerecord/lib/active_record/scoping/default.rb |
Instance Attribute Summary
- #ignore_default_scope=(ignore) rw private
- #ignore_default_scope? ⇒ Boolean rw private
-
#scope_attributes? ⇒ Boolean
readonly
Internal use only
Are there attributes associated with this scope?
Instance Method Summary
-
#default_scopes?(all_queries: false) ⇒ Boolean
Checks if the model has any default scopes.
-
#unscoped(&block)
Returns a scope for the model without the previously set scopes.
- #build_default_scope(relation = relation(), all_queries: nil) private
-
#default_scope(scope = nil, all_queries: nil, &block)
private
Use this macro in your model to set a default scope for all operations on the model.
-
#evaluate_default_scope
private
The ignore_default_scope flag is used to prevent an infinite recursion situation where a default scope references a scope which has a default scope which references a scope…
-
#execute_scope?(all_queries, default_scope_obj) ⇒ Boolean
private
If all_queries is nil, only execute on select and insert queries.
Instance Attribute Details
#ignore_default_scope=(ignore) (rw, private)
[ GitHub ]# File 'activerecord/lib/active_record/scoping/default.rb', line 175
def ignore_default_scope=(ignore) ScopeRegistry.set_ignore_default_scope(base_class, ignore) end
#ignore_default_scope? ⇒ Boolean
(rw, private)
[ GitHub ]
# File 'activerecord/lib/active_record/scoping/default.rb', line 171
def ignore_default_scope? ScopeRegistry.ignore_default_scope(base_class) end
#scope_attributes? ⇒ Boolean
(readonly)
Are there attributes associated with this scope?
# File 'activerecord/lib/active_record/scoping/default.rb', line 47
def scope_attributes? # :nodoc: super || default_scopes.any? || respond_to?(:default_scope) end
Instance Method Details
#build_default_scope(relation = relation(), all_queries: nil) (private)
[ GitHub ]# File 'activerecord/lib/active_record/scoping/default.rb', line 135
def build_default_scope(relation = relation(), all_queries: nil) return if abstract_class? if default_scope_override.nil? self.default_scope_override = !Base.is_a?(method(:default_scope).owner) end if default_scope_override # The user has defined their own default scope method, so call that evaluate_default_scope do relation.scoping { default_scope } end elsif default_scopes.any? evaluate_default_scope do default_scopes.inject(relation) do |combined_scope, scope_obj| if execute_scope?(all_queries, scope_obj) scope = scope_obj.scope.respond_to?(:to_proc) ? scope_obj.scope : scope_obj.scope.method(:call) combined_scope.instance_exec(&scope) || combined_scope else combined_scope end end end end end
#default_scope(scope = nil, all_queries: nil, &block) (private)
Use this macro in your model to set a default scope for all operations on the model.
class Article < ActiveRecord::Base
default_scope { where(published: true) }
end
Article.all # => SELECT * FROM articles WHERE published = true
The #default_scope
is also applied while creating/building a record. It is not applied while updating or deleting a record.
Article.new.published # => true
Article.create.published # => true
To apply a #default_scope
when updating or deleting a record, add all_queries: true
:
class Article < ActiveRecord::Base
default_scope -> { where(blog_id: 1) }, all_queries: true
end
Applying a default scope to all queries will ensure that records are always queried by the additional conditions. Note that only where clauses apply, as it does not make sense to add order to queries that return a single object by primary key.
Article.find(1).destroy
#=> DELETE ... FROM `articles` where ID = 1 AND blog_id = 1;
(You can also pass any object which responds to call
to the default_scope
macro, and it will be called when building the default scope.)
If you use multiple #default_scope
declarations in your model then they will be merged together:
class Article < ActiveRecord::Base
default_scope { where(published: true) }
default_scope { where(rating: 'G') }
end
Article.all # => SELECT * FROM articles WHERE published = true AND rating = 'G'
This is also the case with inheritance and module includes where the parent or module defines a #default_scope
and the child or including class defines a second one.
If you need to do more complex things with a default scope, you can alternatively define it as a class method:
class Article < ActiveRecord::Base
def self.default_scope
# Should return a scope, you can call 'super' here etc.
end
end
# File 'activerecord/lib/active_record/scoping/default.rb', line 119
def default_scope(scope = nil, all_queries: nil, &block) # :doc: scope = block if block_given? if scope.is_a?(Relation) || !scope.respond_to?(:call) raise ArgumentError, "Support for calling #default_scope without a block is removed. For example instead " \ "of `default_scope where(color: 'red')`, please use " \ "`default_scope { where(color: 'red') }`. (Alternatively you can just redefine " \ "self.default_scope.)" end default_scope = DefaultScope.new(scope, all_queries) self.default_scopes += [default_scope] end
#default_scopes?(all_queries: false) ⇒ Boolean
Checks if the model has any default scopes. If all_queries is set to true, the method will check if there are any default_scopes for the model where all_queries
is true.
# File 'activerecord/lib/active_record/scoping/default.rb', line 54
def default_scopes?(all_queries: false) if all_queries self.default_scopes.any?(&:all_queries) else self.default_scopes.any? end end
#evaluate_default_scope (private)
The ignore_default_scope flag is used to prevent an infinite recursion situation where a default scope references a scope which has a default scope which references a scope…
# File 'activerecord/lib/active_record/scoping/default.rb', line 182
def evaluate_default_scope return if ignore_default_scope? begin self.ignore_default_scope = true yield ensure self.ignore_default_scope = false end end
#execute_scope?(all_queries, default_scope_obj) ⇒ Boolean
(private)
If all_queries is nil, only execute on select and insert queries.
If all_queries is true, check if the default_scope object has all_queries set, then execute on all queries; select, insert, update and delete.
# File 'activerecord/lib/active_record/scoping/default.rb', line 167
def execute_scope?(all_queries, default_scope_obj) all_queries.nil? || all_queries && default_scope_obj.all_queries end
#unscoped(&block)
Returns a scope for the model without the previously set scopes.
class Post < ActiveRecord::Base
def self.default_scope
where(published: true)
end
end
Post.all # Fires "SELECT * FROM posts WHERE published = true"
Post.unscoped.all # Fires "SELECT * FROM posts"
Post.where(published: false).unscoped.all # Fires "SELECT * FROM posts"
This method also accepts a block. All queries inside the block will not use the previously set scopes.
Post.unscoped {
Post.limit(10) # Fires "SELECT * FROM posts LIMIT 10"
}
# File 'activerecord/lib/active_record/scoping/default.rb', line 42
def unscoped(&block) block_given? ? relation.scoping(&block) : relation end


--- layout: page title: MOCA Stories --- For 2020, MOCA will be celebrating its 40th anniversary and showcasing past events, exhibitions, acquired collections, and other facts about MOCA through its illustrious 40-year history. We hope that you will learn something new while helping us celebrate! 美国华人博物馆（MOCA）于2020年庆祝建馆四十周年，我们将回顾建馆以来辉煌的40年历史，展示以往举办的活动、展览、征集的藏品以及其他相关内容。希望各位在同庆的过程中也可以学到新知！


Fault Injection for Azure PaaS
HOL - Fault Injection for Azure PaaS
Your manager has expressed interest in the stability and fault-tolerance of the new cloud based infrastructure. It’s your task to determine how and if the system will still operate after injecting faults into the environment. The estimated number of concurrent users for this system is 600 people.
Note: In this lab, knowledge of how to deploy a Azure Resource Management (ARM) template and how to publish a website to App Service in Azure is assumed.
Pre-requisites:
-
Latest Azure SDK 2.9.5 installed
Tasks Overview:
1. Set up a scalable and highly available environment This will walk you through deploying main cluster and failover cluster to Azure using ARM template. You will also configure traffic manager and Geo-Replication of the production database from the main cluster to the failover cluster database.
2. Set up Application Insights In this task you will connect your main cluster’s App Service to an Application Insights instance.
3. Fault injection into the main cluster In this task you will configure a load test to simulate users browsing your website and then you will start to decrease number of VM instances run in your App Service.
4. Analyze results of the load test In this task you will collect data from different sources, like build-in App Service’s metrics, Application Insights’ metrics and VSTS’s load test metrics, then use it to draw a conclusion.
5. Test the traffic manager’s functionality In this task you will disable main cluster’s App Service, and confirm that traffic manager will start redirecting to your failover cluster.
HOL:
Task 1: Set up a scalable and highly available environment
In this task you can use any two regions for your clusters as long as Geo-Replication is supported.
Step 1. Clone the PartsUnlimited repository to a local directory.
-
Open a command line (one that supports Git) and navigate to the directory where you want to store your local repositories. For example in a Windows OS, you can create and navigate to
C:\Source\Repos
. -
Clone the repository with the following command:
git clone https://github.com/Microsoft/PartsUnlimited.git
After a few seconds of downloading, all of the code should now be on your local machine.
-
Move into the repository directory that was just created. In a Windows OS, you can use this command:
cd PartsUnlimited
Step 2. Open the PartsUnlimited solution with Visual Studio
In the command line, type the following:
start PartsUnlimited.sln
Alternatively, navigate to where you cloned the repository to e.g. C:\Source\Repos\PartsUnlimited
with explorer and double click on PartsUnlimited.sln
Step 3. Deploying an ARM template for the main cluster.
-
Right click on
PartsUnlimitedEnv
project, selectDeploy
and click onNew...
-
In the “Resource group” dropdown click on
<Create new...>
. Select your subscription, enter a name, selectEast US
in the “Resource group location” dropdown and click on “Create”. -
Select the “FullEnvironmentSetupMerged.json” template and the corresponding param file to deploy. Both files are located at
env
>Templates
folder of your local repository. -
Click on “Edit Parameters…” and enter the details for the main cluster. Click on “Save” and then “Deploy”.
Note: Make sure that:
1) All of the names will be specific to the main cluster and unique across Azure.
2) “PartsUnlimitedDBEdition” must be set to “Standard” for Geo-Replication to work.
Step 4. Deploying an ARM template for the standby cluster.
-
Right click on
PartsUnlimitedEnv
project, selectDeploy
and click onNew...
-
In the “Resource group” dropdown click on
<Create new...>
. Select your subscription, enter a name, selectWest US
in the “Resource group location” dropdown and click on “Create”. -
Select the “FullEnvironmentSetupMerged.json” template and the corresponding param file to deploy.
-
Click on “Edit Parameters…” and enter the details for the standby cluster. Click on “Save” and then “Deploy”.
Note: Make sure that:
1) All of the names will be specific to the main cluster and unique across Azure.
2) “PartsUnlimitedDBEdition” must be set to “Standard” for Geo-Replication to work.
Step 5. Publish PartsUnlimited to the main and standby clusters.
-
Right click on
PartsUnlimitedWebsite
project and selectPublish...
-
Click on “Microsoft Azure App Service”.
-
Select the main cluster, click “OK”, then “Publish”.
-
Similarly, repeat the previous steps for the standby cluster.
Step 6. Set up the scalability of the App Service.
-
Open the resource group of your main cluster and click on the “App Service” instance.
-
Click on “Scale out (App Service plan)”, make sure that “Scale by” is set to “an instance count that I enter manually”, increase the number of instances to 4, then click “Save”.
-
In this lab we will leave the number of instances in the failover cluster at 1.
Note: In this lab we want to control the number of instances running in the App Service, then we can simulate an instance fault by decrementing the total available number of instances. Usually we would prefer to define rules such that the number of instances will scale automatically based on their metrics.
Step 7. Set up the Geo-Replication of the production database.
-
Navigate to the “Overview” page of the main cluster’s resource group and click on the production database server.
-
Click on your database in the list of available databases.
-
Click on “Geo-Replication” and select “West US” in the “Target Regions” list.
-
Set “Secondary type” to “Readable”, select the production database in the standby cluster as a “Target server” and click “OK”.
-
Once the database has been copied, you should be able to see it on the overview page of the standby cluster’s resource group. Note that the production SQL server now has two databases in it.
-
Since we do not intend to use the production database in the standby cluster deployed by the ARM template, let’s delete it. Click on the production database, then on “Delete” and “OK” to confirm.
-
Finally, update the database connection string for the App Service in the standby cluster. Click on the App Service and select “Application settings”. Click on “< Hidden for Security >” to reveal your database connection string.
Note: You should find the data in the following format:
Data Source=tcp:<DBServerName>.database.windows.net,1433;Initial Catalog=<DBName>;User Id=<UserName>@<DBServerName>;Password=<YourPassword>;
-
Modify the username and password to match those selected during the ARM template deployment of the main cluster. Update the DBName to the newly migrated DBName (e.g. PartsUnlimitedMainDB in this Lab).
Note: The final version of the database connection string in this lab should look as follows:
Data Source=tcp:partsunlimitedstandbyserver.database.windows.net,1433;Initial Catalog=PartsUnlimitedMainDB;User Id=AdminUser@partsunlimitedstandbyserver;Password=************;
Step 8. Creating and configuring the traffic manager in Azure.
-
Create a new resource group for the traffic manager.
-
Click on “Resource Groups” and then click on “Add”.
-
Enter the group name, select subscription, specify “East US 2” as a resource group location and click “Create”.
-
-
Open the newly created resource group.
-
Click on the “Add” button.
-
Type “traffic manager” and press “Enter”. This will filter the options. Select “Traffic Manager profile” and click on the “Create” button.
- Enter the name, select “Priority” as the routing method and click “Create”.
Note:
Priority: Traffic Manager will use a primary service endpoint for all traffic, and provide backups in case the primary endpoints are unavailable.
Weighted: Traffic Manager will distribute traffic across a set of endpoints, either evenly or according to weights, which you define.
Performance: Traffic Manager will redirect to the “closest” endpoint in terms of the lowest network latency for each user. -
Navigate to the resource group where the new traffic manager was created and click on it.
- Add an endpoint to the App Service in the main cluster by clicking on “Add”, configuring the endpoint with the settings below, then clicking “OK”.
- Type: “Azure endpoint”
- Name: “PartsUnlimitedMain”
- Target resource type: “App Service”
- Target resource: Select the App Service in your main cluster
-
Priority: 1
- Similarly, add the standby cluster endpoint, with the corresponding settings:
- Type: “Azure endpoint”
- Name: “PartsUnlimitedStandby”
- Target resource type: “App Service”
- Target resource: Select the App Service in your standby cluster
-
Priority: 2
-
Navigate to “Configuration” page, change ‘DNS time to live (TTL)” from 300s to 60s and click on “Save”. Lower TTL is preferable in this case because it defines how often traffic manager will update DNS records and start redirecting to failover cluster in circumstances of the main cluster going offline.
-
Navigate to the “Overview” page of this traffic manager. Click on the link under “DNS name”. The traffic manager will redirect traffic to the main cluster if it’s available, otherwise it will navigate traffic to the standby cluster.
Congratulations, the scalable and highly available environment is now set up.
Note: In a real life situation you might also have a domain name for your website which will need to be set up as a CNAME to the traffic manager’s DNS name.
Task 2: Set up Application Insights
Step 1. Navigate to App Service in your main cluster and click on “Application Insights”, then select your production Application Insights instance in the main cluster and click “OK”. Azure will connect this App Service to the Application Insights instance and will start collecting data.
Task 3: Fault injection into the main cluster
In this task you will simulate a fault in the main cluster by decreasing the number of instances available in your App Service.
Step 1. Set up a Performance test in Azure. In this step, we will run a load test to simulate traffic for the App Service.
-
Navigate to the resource group of your main cluster and click on the App Service instance.
-
Click on “Performance test” and then on “New”.
-
Click on “CONFIGURE TEST USING”, ensure the URL specified is your traffic manager’s URL, then select “Done”. Set “GENERATE LOAD FROM” to the closest region to your App Service to reduce latency.  Click “Run test”. The load test will be run from a linked VSTS account (which will be created if necessary) in 10-15 minutes.
Note: Make sure you familiarize yourself with the costs associated with load testing (Visual Studio Team Services Pricing).
-
Allow the load test to run for five minutes, then decrement the number of instances every five minutes to simulate a series of faults. Do this by scrolling down on the load test page and clicking on the scale of your hosting plan for the main cluster. Decrease the number of instances as appropriate, and click “Save”.
Task 4: Analyze results of the load test
In this task we will analyze the information received from the load test and attempt to determine the optimal number of instances for the App Service.
Step 1. Navigate to the App Service in the main cluster, click on “Performance test” and then on the load test itself.
Step 2. Application Insights collected data can be found by navigating to the resource group of the main cluster and selecting the production instance.
Step 3. Navigate to the “Overview” of your App Service and click on “edit” on the monitoring graph. Select “past hour”, tick all of the http error codes, as well as “Http Server Errors” and click “OK”.
Step 4. Navigate to “Metrics per Instance (App Service plan)” in your App Service for more general performance analyses of the load test.
Based on the graphs above you can see that with 4 instances in the App Service (first 5 mins), the load was manageable but once one of the instance “stopped” responding to the requests, “Http queue” started to build up. If we ran load test with 3 instance for longer than 10-15 minutes, we would start seeing timeouts for some requests even though request queue was building up relatively slowly. Once the second VM “faulted”, traffic became unmanageable for the other 2 instances and we saw about a thousand failed requests. Finally with one instance left response time raised to 9.5 seconds and we continued seeing more and more errors. Based on analysis above we can conclude that if you expect this website to have around 600 concurrent users, then you should absolute minimum of 3 instances and a recommended number of 4 or 5 instances running in your App Service.
Task 5: Test the traffic manager’s functionality
Here we’re looking at how traffic manager can be used to handle fail over events where a datacenter is lost for some reason, perhaps a natural disaster. Main cluster will be simulated to go offline by turning its App Service off.
Step 1. Open your traffic manager’s URL in a browser. It can be found on the “Overview” page of your traffic manager under “DNS name”.
Step 2. Navigate to your App Service in the main cluster. Open the “Overview” page, click on “Stop” and confirm by clicking “Yes”.
Step 3. Return to the tab in your browser with your traffic manager’s URL. Refresh the page until the traffic manager redirects you to the standby cluster’s App Service. You will encounter 403 errors until the DNS changes are propagated.
Note: The amount of time it takes for DNS changes to propagate through the system can be changed in traffic manager’s settings. By default, the refresh time is 300 seconds.
Congratulations!
You’ve completed this HOL! In this lab you have learned how to inject a fault into a PaaS infrastructure, how to set up a failover cluster, run a load test and analyze the results.


Ivy School WordPress Theme 1.2.0 - 2019-02-14
Update
- Supported Gutenberg.
- Improved translation file.
Ivy School WordPress Theme 1.1.0 - 2019-01-29
Update
- Included new Driving demo.
Bug fixes
- Fixed some minor bugs (Responsive, WooCommerce).
Ivy School WordPress Theme 1.0.6 - 2019-01-24
Update
- Add option login/logout/register redirect.
- Improved some problems in customize.
Bug fixes
- Fixed some minor bugs (feature image, become an instructor, event).
Ivy School WordPress Theme 1.0.5 - 2018-12-24
Update
Bug fixes
- Fixed some minor bugs (Learnpress, WooCommerce, Shortcode).
Ivy School WordPress Theme 1.0.4 - 2018-12-07
Update
- Add import demo data for Elementor & SiteOrigin.
- Update child theme.
- Update language file.
Bug fixes
- Fixed issue change password and avatar in profile.
- Fixed some minor bugs (Event, WooCommerce, Shortcode).
Ivy School WordPress Theme 1.0.3 - 2018-11-22
Update
Bug fixes
- Fixed Outdated Woocomerce.
- Fixed some minor bugs (Related Courses, Lesson, Certificate ...).
Ivy School WordPress Theme 1.0.2 - 2018-11-19
Update
- Included all LP addon in Dashboard.
- Compatiable with Woocommerce.
- Updated language package.
Bug fixes
- Fixed some minor bugs (Related Courses, Lesson, Certificate ...).
Ivy School WordPress Theme 1.0.1 - 2018-11-12
Update
- Insert Option add google analytics & facebook pixel code.
- Overwrite image Chameleon
- Improved styles for membership checkout.
Bug fixes
Ivy School – Education, University & School - 2018-11-09
- The most amazing Ivy School WordPress Theme was born :)


Citizens helping citizens lobby for a better government.
Senator Bernie Sanders has introduced the following bills to the floor of the U.S. Senate. Exercise your constitutional rights by lobbying your government in support of Bernie's policies.
×
Call now
×
Email a senator
×
Write a senator


Looking for a risk assessment but none is available?
Worried that your risk assessment is outdated?
Our risk assessments are updated in real-time to the latest information available
Automated creation of risk report
Our engine uses annual financial reports and machine learning models
to create risk reports
Our pricing model minimizes conflict of interest and maintains independence


NW Nerd is a podcast for all things nerdy in the Pacific Northwest and beyond, featuring original reporting, interviews, and discussion.
iTunes Reviews
"I really love this podcast. It gets better and more mature each episode. The features are a deep dive in nerd culture you wouldn't normally hear about."
"I love these guys. I'm always happy to get a little knowledge with my geekification"
"It's the Christian Louboutin of nerd podcasts, AKA something you didn't know you needed in your life."
"This is an amazing podcast even if you are not living in the Pacific NW. I can't wait for more."


Margaret Sanger once said, “No woman can call herself free who does not own and control her body. No woman can call herself free until she can choose consciously whether she will or will not be a mother.” The United States is known for freedom. If this is the case, why are young women in their teens forced to give birth to children they do not want to raise? Right now, we are turning to parents to make choices for their children. However, this might not be beneficial for the children in unhealthy families. Teens should have the right to make their own decisions about their own body that will affect their own future. Parental consent shouldn't be needed for abortions.
Parental consent can be dangerous to those who have problems with their family. Teens with strained relationships with their parents may not be able to get permission. Teens also may not be comfortable talking to their parents about abortion. They might end up taking desperate measures to hide their pregnancy; this can end up putting them in danger as they can get kidnapped. A forced pregnancy is kind of like connecting a stranger's life to yours.  If you stay, it will leave you in danger. Not allowing parental consent is the easiest way to keep teens safe from forced pregnancies and ruined futures.


Using ovfconverter from the tools directory, one can easily convert previously exported Ganeti instance into OVF package, supported by VMWare, VirtualBox and some other virtualization software. It is also possible to use instance exported from such a tool and convert it to Ganeti config file, used by gnt-backup import command.
For the internal design of the converter and more detailed description, including listing of available command line options, please refer to Ganeti Instance Import/Export using Open Virtualization Format
As the amount of Ganeti-specific details, that need to be provided in order to import an external instance, is rather large, we will present here some examples of importing instances from different sources. It is also worth noting that there are some limitations regarding support for different hardware.
Available modes for the network include bridged and routed. There is no NIC mode, which is typically used e.g. by VirtualBox. For most usecases this should not be of any effect, since if NetworkSection contains any networks which are not discovered as bridged or routed, the network mode is assigned automatically, using Ganeti’s cluster defaults.
The only values that are taken into account regarding Virtual Hardware (described in VirtualHardwareSection of the .ovf file) are:
Neither USB nor CD-ROM drive are used in Ganeti. We decided to simply ignore unused elements of this section, so their presence won’t raise any warnings.
List of operating systems available on a cluster is viewable using gnt-os list command. When importing from external source, providing OS type in a command line (--os-type=...) is required. This is because even if the type is given in OVF description, it is not detailed enough for Ganeti to know which os-specific scripts to use. Please note, that instance containing disks may only be imported using OS script that supports raw disk images.
Files listed in ovf:References section cannot be hyperlinks.
Most Ganeti instances do not contain grub. This results in some problems when importing to virtualization software that does expect it. Examples of such software include VirtualBox and VMWare.
To avoid trouble, please install grub inside the instance before exporting it.
format option should be set to vmdk in order for instance to be importable by VirtualBox.
Tests using existing versions of VirtualBox (3.16) suggest, that VirtualBox does not support disk compression or OVA packaging. In future versions this might change.
Importing Ganeti instance to VMWare was tested using ovftool.
format option should be set to vmdk in order for instance to be importable by VMWare.
Presence of Ganeti section does seem to cause some problems and therefore it is recommended to use --external option on export.
Import of compressed disks generated by ovfconverter was impossible in current version of ovftool (2.1.0). This seems to be related to old vmdk version. Since the conversion to vmdk format is done using qemu-img, it is possible and in fact expected, that future versions of the latter tool will resolve this problem.
If you are importing instance created using ovfconverter export – you most probably will not have to provide any additional information. In that case, the following is all you need (unless you wish to change some configuration options):
ovfconverter import ganeti.ovf
[...]
gnt-instance import -n <node> <instance name>
In case of importing from external source, you will most likely have to provide the following details:
These are not the only options, but the recommended ones. For the complete list of available options please refer to Command Line description <design-ovf-support.rst>
Minimalistic but complete example of importing Virtualbox’s OVF instance may look like:
ovfconverter virtualbox.ovf --os-type=lenny-image \
--name=xen.test.i1 --disk-template=diskless
[...]
gnt-instance import -n node1.xen xen.test.i1
Exporting instance into .ovf format is pretty streightforward and requires little - if any - explanation. The only compulsory detail is the required disk format, provided using the --format option.
If for some reason it is convenient for you to use ovfconverter to move instance between clusters (e.g. because of the disk compression), the complete example of export may look like this:
gnt-backup export -n node1.xen xen.test.i1
[...]
ovfconverter export --format=vmdk --ova \
/srv/ganeti/export/xen.i1.node1.xen/config.ini
[...]
The result is then in /srv/ganeti/export/xen.i1.node1.xen/xen.test.i1.ova
Typically, when exporting to external tool we do not want Ganeti-specific configuration to be saved. In that case, simply use the --external option:
gnt-backup export -n node1.xen xen.test.i1
[...]
ovfconverter export --external --output-dir ~/ganeti-instance/ \
/srv/ganeti/export/xen.i1.node1.xen/config.ini
If you are encountering trouble when converting the disk, please ensure that you have newest qemu-img version.
The compressed disks and OVA packaging do not work correctly in either VirtualBox (old version) or VMWare.
VirtualBox (3.16 OSE) does not seem to support those two, so there is very little we can do about this.
As for VMWare, the reason behind it not accepting compressed or packed instances created by ovfconverter seems to be related to the old vmdk version.
In Oracle VM Virtualbox 4.0+ there seems to be a problem when importing any OVF instance created by ovfconverter. Reasons are again unknown, this will be investigated.
The disk space requirements for both import and export are at the moment very large - we require free space up to about 3-4 times the size of disks. This will most likely be changed in future versions.


--- layout: default title: Research Archives permalink: /research-archives/ date: 2016-04-05 11:04:50 ---
These are notes categorized by the archive I visited.


Recently I got a new project that needs to use MCMC. That reminds me of the time when I first learned it from school. I remember at that time I was discussing with Piaoge in butler library. How time flies! So this article aims to review what I have learned and make sure I understand everything correctly.
To understand what is MCMC, I would like to divide these two 'MC's and look at them on by one. At first I would like to summarize this topic in one article, but later on I realized that this is a very good chance for me to review Markov Chain, Monte Carlo Method as well as Bayesian Inference. So in the end I decided to split it into three articles:
- Intro to Monte Carlo Method and Markov Chain
- Metropolis-Hastings Sampling
- Gibbs Sampling
- MCMC Application with Bayesian Inference
Notice that the review of Monte Carlo method and Markov Chain is highly related to MCMC so keep in mind that our final target is to sample from one target distribution.
1.Monte Carlo Method
Definition
Generally speaking, Monte Carlo method relies on repeated random sampling to obtain numerical results.
Monte Carlo methods vary, but tend to follow a particular pattern:
- Define a domain of possible inputs
- Generate inputs randomly from a probability distribution over the domain
- Perform a deterministic computation on the inputs : Aggregate the results (Like expectation)
Application
The Monte Carlo method was created for solving the problem that it is very difficult to calculate the intractable integrals when dealing with the denominator of Bayes Formulas:
\[\int p(x|z)p(z)dz = E_{p(z)}p(x|z) \text{ , x is already known}\]
And what Monte Carlo method does is to find the approximate value of it. The key idea is to sample from \(p(x|z)\) where \(z \sim p(z)\), and the expectation value for all these samples are almost what we want.
One of the simple applications is to use for estimating \(\pi\)：
- Define the domain - We put the circle within one square with side length
- Sample from Uniform Distribution - We sample n point within this area.
- Aggregate the results: The percentage that the points locate in the circle is actually the estimation of \(\pi\).
Advantages
For most of the distributions, especially high-dimensional ones, maybe we can write their specific probability density functions, whereas we don't know in which area we can get large density, and reality is most of the area will have very low density (near 0).That's the dilemma to calculate the arithmetic solution. So here comes the superiority of Monte Carlo method because We almost always get sample data from high density area, thus with very low computation cost, we can get pretty decent estimations. In other words, the sample sequence in some sense completes the mission of "searching for the high density area".
Limitation
However, for most of the high-dimensional distributions, it is very hard to find a proper proposal distribution that covers the targeted function. That's the reason we need to combine it with Markov Chain.
2.Markov Chain
Definition
A Markov chain is a stochastic model describing a sequence of possible events in which the probability of each event depends only on the state attained in the previous event. Mathematically:
\[P(X_{t+1}| X_{t},X_{t-1},...,X_{2},X_{1}) = P(X_{t+1}|X_{t})\]
And we have transition matrix \(P\) to define the probability of each stats's transformation, Where \(P_{ij}\) means the probability of transformation from state i to state j.
Markov Chain Property
One very important property of Markov Chain is that, suppose our initial distribution is \(\pi_0 = [\pi_0(1),...,\pi_0(p)]\) suppose we have p states. After n steps transformation: \(\pi_0\cdot P^n\), it will transform to a stationary distribution. At the same time, we found that the stationary distribution is purely decided by transition matrix \(P\) instead of the starting point \(\pi_0\). Mathematically speaking: \[\pi P = \pi\]
Based on this key property of Markov Chain, people were thinking: we know Markov chain will converge to a stationary distribution no matter what is the start point. So we want to create this kind of Markov Chain that makes the final stationary distribution same with our targeted distribution; So when we randomly start from \(x(0)\), after certain steps n, the Markov chain has converged to the stationary distribution, then \(x(n),x(n+1),...\) can be seen as the sample data from our targeted distribution.
Wow, this is a very clever idea. But now the problem comes to: How can we create this kind of Markov Chain?
To solve the problem above, we need have another very important property from Markov Chain:
Detailed Balance Stationary
Theorem:
If the aperiodic Markov Chain's transition matrix \(P\) and \(\pi(x)\) satisfies: \[\pi(i)P(i \to j) = \pi(j)P(j \to i)\] Then we can say \(\pi(x)\) is the stationary distribution of transition matrix \(P\).
Intuition: This property is very easy to understand, we can think it this way: If \(\pi(x)\) is stationary, it is then reasonable that the amount of value transferred from \(i \to j\) equals to the amount of value transferred from \(j \to i\).
What does this property mean? Actually it tells us: if we can find a transition matrix P that makes our targeted distribution satisfy this equation, then our previous problem is solved. But how can we find it?
Reference:
https://towardsdatascience.com/markov-chain-monte-carlo-in-python-44f7e609be98 https://segmentfault.com/a/1190000012645418 http://www.cnblogs.com/pinard/p/6632399.html http://www.cnblogs.com/pinard/p/6625739.html https://www.jianshu.com/p/28d32aa7cc45


conceived and designed by
use arrow to advance
Michelangelo, 1498-1499
Anonymous, 1568
Anonymous, 1570
del Piombo, 1595
Morganti, 1598
Altdorfer, 1507
Rubens, 1620
Anonymous, 1559
Perrisin, 1660
Anonymous, 1325
Clouet, 1536
Anonymous, 1530
Anonymous, 1515
Holbein, 1538
Passarotti, 15xx?
Passarotti, 1566
El Greco, 1605
(Bohemian, anonymous), 1400
Raphael, 1518-1519
Anonymous, 1420
Anonymous, 1300
Anonymous, 1440
Anonymous, 1300
Tintoretto, 1565
Anonymous, 1532
Anonymous, 1536
Anonymous, 1552
Scrots, 1550
Bosch, 1510


--- status: "draft" title: "Single checkbox" text: "
Single checkboxes are used to confirm a user's selection or preference. For example: to confirm a user agrees to a product's terms and conditions.
You can Use attribute checked
to default to a checked state.
Even single checkbox form groups should be wrapped in a ds-control-group
to maintain form spacing.


Two inches of rain to fall on soaked areas of England
Parts of Britain could see two inches of rain on Saturday, less than a fortnight after parts of the Midlands and north of England were soaked by floods.
Yellow weather warnings are in force across the country throughout the day after the rain started to fall in the South West overnight and will move north towards Scotland throughout the day.
In the East Midlands and North East the Met Office is warning that flooding is likely until midnight, as people continue the clean-up from the deluge earlier this month.
Sorry, this content isn't available on your device.
Wales, central and south-eastern England will escape the worst of the showers.
Met Office forecaster Greg Dewhurst said: “It’s a pretty unsettled start to the weekend, and a very cloudy day today, with heavy rain pushing its way north throughout the day.”
Nine flood warnings are in place throughout England on Saturday, mainly in the South West and North East, alongside 85 less severe flood alerts.
Firefighters in Devon and Cornwall warned drivers to stay away from flooded roads after a number of calls overnight to stranded cars.
Sorry, this content isn't available on your device.
Mr Dewhurst said other rainy areas could also see problems.
He added: “Some places could see 40mm to 50 mm of rain. There’s quite a bit of rainfall to come in the next 24 hours.”
The wet weather will subside on Sunday.
Two yellow weather warnings are in place for the east and north of Scotland until 9am on Sunday, but for most, the rain will have cleared.
Mr Dewhurst said: “On Sunday the rain will ease away. It’s looking like a much brighter day for many.”
Earlier this month, the Army was called in to assist stricken communities after towns and villages around Doncaster and Sheffield and parts of the Midlands were drenched by heavy downpours.
Doncaster Council said 970 homes and businesses in the town were affected by the rain between November 7 and 15.


If you use MIMIC data or code in your work, please cite the following publication:
MIMIC-III, a freely accessible critical care database. Johnson AEW, Pollard TJ, Shen L, Lehman L, Feng M, Ghassemi M, Moody B, Szolovits P, Celi LA, and Mark RG.
Scientific Data (2016). DOI: 10.1038/sdata.2016.35.
Available from: http://www.nature.com/articles/sdata201635


{% extends 'registration/base.html' %} {% load crispy_forms_tags %} {% block content %}
Have an account ? Log in
Forgot Password ?


To: {{item.approverId | truncate: 20}}
created: {{item.dateCreated}}
Response from: {{item.approverId}} {{item.approvalMessage}}
download response document here
more_vert


US military drone disappears over Libyan capital, officials say
by David AaroThe U.S. military announced Friday it lost an unarmed drone over Tripoli, the Libyan capital -- the site of a months-long battle between the Libyan National Army and militias allied with the United Nations-supported government.
The U.S. Africa Command said the remotely piloted aircraft was part of an operation conducted in Libya to assess the area's security and monitor for violent extremist activity. They didn't give a reason for the drone loss on Thursday, but the command will be investigating.
"These operations are critical to counter-terror activity in Libya and are fully coordinated with appropriate government officials," according to a statement.
'MISHAP' IN OKLAHOMA KILLS 2 AIR FORCE PILOTS ON TRAINING MISSION
Since 2015, Libya has been divided between two governments, one based in Tripoli and the other in the country’s east. Forces loyal to the eastern government have been trying to wrest control of the capital since April.
An Italian drone was shot down Wednesday southeast of Tripoli by forces loyal to the eastern government.
CLICK HERE TO GET THE FOX NEWS APP
In September, the U.S. military said it carried out several airstrikes against the Islamic State group in Libya, killing more than 40 militants. Those were the first U.S. strikes in the North African country in over a year.
Oil-rich Libya descended into chaos in 2011 when an international military coalition helped rebels overthrow longtime autocrat Moammar Gadhafi. Islamic extremists have exploited the chaos to expand their reach in the country.
The Associated Press contributed to the report


TypeSharp
Convert C# POCOs to TypeScript
Select Files
Select All
Convert
Generated files can be found at
To interface
Optinal Fields
Property Naming Conventions
No change
Camel
Pascal
Overwrite existed files?
Yes
No
Append


AdoptAPet is an animal shelter that specializes in habitating and naturing animals and later offer them up for adoption to willing candidates
" Until one has loved an animal a part of one's soul remains
unawakened "
Anatole France
Bring back color to the world,
adopt a pet
AdoptAPet is an animal shelter that specializes in habitating and naturing animals and later offer them up for adoption to willing candidates
Pets available for adoption
Brown Bernese mountain dog that loves to read
Grey and white Egyptian Cat that sings
Brown Bernese mountain dog that loves to read
Brown Bernese mountain dog that loves to read
Brown Bernese mountain dog that loves to read
Brown Bernese mountain dog that loves to read
Brown Bernese mountain dog that loves to read
Brown Bernese mountain dog that loves to read
Brown Bernese mountain dog that loves to read


This function will take an .au sound file of a vowel sound, read it into a matlab sound vector and process it using formant analysis to determine the vowel spoken. This file does little analysis itself; rather it calls the other necessary m-files in the order needed to process the sound. Therefore, to run this program you also need the called functions: normalize.m, formants.m, and weightedvowelguess.m
Click here to view our Vowel Recognition Main Program M-File.
Click here to download our Vowel Recognition Main Program M-File.
* Note: the ".bin" extension on the m-file does NOT indicate a
binary file type.
It only tricks your browser into downloading
the file instead of viewing it.